From 32b6036a56ea858ead682ccfc3250d5e004cf8db Mon Sep 17 00:00:00 2001 From: Nirupam Bhowmick <48842933+heydryft@users.noreply.github.com> Date: Thu, 25 Dec 2025 21:57:57 +0000 Subject: [PATCH] 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) --- .../roverfox/font-fingerprinting.context.patch | 10 +++++----- patches/webgl-spoofing.patch | 18 ++++-------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/patches/roverfox/font-fingerprinting.context.patch b/patches/roverfox/font-fingerprinting.context.patch index 81c250b8..cd7393ab 100644 --- a/patches/roverfox/font-fingerprinting.context.patch +++ b/patches/roverfox/font-fingerprinting.context.patch @@ -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; diff --git a/patches/webgl-spoofing.patch b/patches/webgl-spoofing.patch index 455cf96f..38d48997 100644 --- a/patches/webgl-spoofing.patch +++ b/patches/webgl-spoofing.patch @@ -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);