fix: correct webgl-spoofing.patch indentation to match Firefox 146

Firefox 146 uses 8 spaces for switch statement indentation, not 9.
Fixed three hunks:
- UNMASKED_RENDERER (line 275-276)
- UNMASKED_VENDOR (line 288-290)
- COLOR_WRITEMASK (line 301-303)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Nirupam Bhowmick
2025-12-22 01:42:46 +00:00
co-authored by Claude
parent d915d23ca4
commit c7df5f8bc4
+13 -13
View File
@@ -272,8 +272,8 @@ index a1e5c4792d..be99491bf8 100644
}
@@ -2573,7 +2573,11 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
switch (pname) {
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_RENDERER_WEBGL:
switch (pname) {
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_RENDERER_WEBGL:
+ if (auto value = MaskConfig::GetString("webGl:renderer")) {
+ ret = Some(value.value());
+ break;
@@ -282,12 +282,12 @@ index a1e5c4792d..be99491bf8 100644
ret = Some("Mozilla"_ns);
} else {
ret = GetUnmaskedRenderer();
if (ret && StaticPrefs::webgl_sanitize_unmasked_renderer()) {
ret = Some(webgl::SanitizeRenderer(*ret));
if (ret && StaticPrefs::webgl_sanitize_unmasked_renderer()) {
ret = Some(webgl::SanitizeRenderer(*ret));
@@ -2584,6 +2588,10 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
break;
break;
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_VENDOR_WEBGL:
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_VENDOR_WEBGL:
+ if (auto value = MaskConfig::GetString("webGl:vendor")) {
+ ret = Some(value.value());
+ break;
@@ -295,19 +295,19 @@ index a1e5c4792d..be99491bf8 100644
ret = ShouldResistFingerprinting(RFPTarget::WebGLRenderInfo)
? Some("Mozilla"_ns)
: GetUnmaskedVendor();
break;
break;
@@ -2675,7 +2683,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);
case LOCAL_GL_COLOR_WRITEMASK: {
const auto mask = uint8_t(*maybe);
const auto bs = std::bitset<4>(mask);
- const auto src = std::array<bool, 4>{bs[0], bs[1], bs[2], bs[3]};
+ const auto src = MaskConfig::MParamGL<std::array<bool, 4>>(
+ pname, std::array<bool, 4>{bs[0], bs[1], bs[2], bs[3]},
+ mIsWebGL2);
JS::Rooted<JS::Value> arr(cx);
if (!dom::ToJSValue(cx, src.data(), src.size(), &arr)) {
rv = NS_ERROR_OUT_OF_MEMORY;
JS::Rooted<JS::Value> arr(cx);
if (!dom::ToJSValue(cx, src.data(), src.size(), &arr)) {
rv = NS_ERROR_OUT_OF_MEMORY;
@@ -3091,6 +3101,24 @@ ClientWebGLContext::GetShaderPrecisionFormat(const GLenum shadertype,
const FuncScope funcScope(*this, "getShaderPrecisionFormat");
if (IsContextLost()) return nullptr;