fix: correct OriginAttributes.h include location in CanvasRenderingContext2D

- Firefox 146 alphabetizes includes differently
- Moved from line 59 (after Document.h) to line 39 (after MathAlgorithms.h)
- CanvasRenderingContext2D.cpp now patches cleanly
- 11 rejects remaining (down from 13)
This commit is contained in:
Nirupam Bhowmick
2025-12-25 21:57:57 +00:00
parent 30e93d772b
commit 32b6036a56
2 changed files with 9 additions and 19 deletions
@@ -514,12 +514,12 @@ diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderin
index 403fe3fabe..dae1655f29 100644
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -59,4 +59,5 @@
#include "mozilla/dom/Document.h"
@@ -39,4 +39,5 @@
#include "mozilla/MathAlgorithms.h"
+#include "mozilla/OriginAttributes.h"
#include "mozilla/dom/FontFaceSetImpl.h"
#include "mozilla/dom/FontFaceSet.h"
#include "mozilla/dom/HTMLCanvasElement.h"
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/PresShellInlines.h"
@@ -4526,10 +4527,20 @@
} else {
flags &= ~gfx::ShapedTextFlags::TEXT_IS_RTL;
+4 -14
View File
@@ -271,16 +271,7 @@ index a1e5c4792d..be99491bf8 100644
return;
}
@@ -2433,11 +2435,15 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
break;
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_VENDOR_WEBGL:
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_RENDERER_WEBGL: {
if (!IsExtensionEnabled(WebGLExtensionID::WEBGL_debug_renderer_info)) {
EnqueueError_ArgEnum("pname", pname);
return;
}
@@ -2573,8 +2575,12 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
switch (pname) {
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_RENDERER_WEBGL:
+ if (auto value = MaskConfig::GetString("webGl:renderer")) {
@@ -293,9 +284,9 @@ index a1e5c4792d..be99491bf8 100644
ret = GetUnmaskedRenderer();
if (ret && StaticPrefs::webgl_sanitize_unmasked_renderer()) {
ret = Some(webgl::SanitizeRenderer(*ret));
@@ -2451,8 +2457,12 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
@@ -2584,8 +2590,12 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
break;
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_VENDOR_WEBGL:
+ if (auto value = MaskConfig::GetString("webGl:vendor")) {
+ ret = Some(value.value());
@@ -306,8 +297,7 @@ index a1e5c4792d..be99491bf8 100644
: GetUnmaskedVendor();
break;
@@ -2675,8 +2685,10 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
// 4 bools
@@ -2675,7 +2685,9 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
case LOCAL_GL_COLOR_WRITEMASK: {
const auto mask = uint8_t(*maybe);
const auto bs = std::bitset<4>(mask);