fix: remove incomplete function context from malformed patch hunks

Fixed 9 malformed patch errors by removing incomplete function context
from hunk headers. The patch command was failing because hunk headers
had partial function signatures that were cut off mid-expression.

Changes:
- playwright/0-playwright.patch: Remove incomplete GetBrowsingContext( context
- voice-spoofing.patch: Remove incomplete nsSynthVoiceRegistry::GetInstance() context
- webgl-spoofing.patch: Remove incomplete GetShaderPrecisionFormat context
- webrtc-ip-spoofing.patch: Remove incomplete SetLocalDescription context
- font-fingerprinting.context.patch: Remove incomplete CanvasBidiProcessor context
- webrtc-ip.context.patch: Remove incomplete SetFontSpacingSeed context
- fingerprint-injection.patch: Remove incomplete NS_IMPL_CYCLE_COLLECTION_INHERITED context
- geolocation-spoofing.patch: Fix malformed hunk by removing FINAL_LIBRARY line and adjusting hunk header
- font-hijacker.patch: Remove incomplete UTF8StringOrArrayBufferOrArrayBufferView context

All hunks now use simple @@ headers without function context to avoid
malformed patch errors during application.

🤖 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 03:57:47 +00:00
co-authored by Claude
parent ed306e305a
commit 21a12aaedf
9 changed files with 11 additions and 13 deletions
+2 -2
View File
@@ -382,9 +382,9 @@ index 4bd1e0c964..a5a95d3fdf 100644
#include "mozilla/GeckoBindings.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/DocumentInlines.h"
@@ -40,6 +41,10 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(nsScreen, DOMEventTargetHelper,
@@ -40,6 +41,10 @@
mScreenOrientation)
int32_t nsScreen::PixelDepth() {
+ if (auto value = MaskConfig::GetUint32("screen.colorDepth"))
+ return value.value();
+2 -2
View File
@@ -126,8 +126,8 @@ index 70c06609e9..66b2666621 100644
class FontFace;
@@ -35,6 +37,20 @@ class UTF8StringOrArrayBufferOrArrayBufferView;
@@ -35,6 +37,20 @@
namespace mozilla::dom {
+// Helper function to check if a font is in the allowed list
+1 -3
View File
@@ -73,15 +73,13 @@ diff --git a/dom/geolocation/moz.build b/dom/geolocation/moz.build
index 2d6b6b5fab..0c7ed74c6d 100644
--- a/dom/geolocation/moz.build
+++ b/dom/geolocation/moz.build
@@ -81,6 +81,9 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
@@ -81,3 +81,6 @@
if CONFIG["MOZ_ENABLE_DBUS"]:
LOCAL_INCLUDES += ["/dom/system/linux"]
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
+
+# DOM Mask
+LOCAL_INCLUDES += ["/camoucfg"]
+
+FINAL_LIBRARY = "xul"
diff --git a/dom/system/NetworkGeolocationProvider.sys.mjs b/dom/system/NetworkGeolocationProvider.sys.mjs
index 7edc62b4a6..19b77aa6b6 100644
+1 -1
View File
@@ -16,7 +16,7 @@ diff --git a/accessible/xpcom/xpcAccessibleDocument.cpp b/accessible/xpcom/xpcAc
index 3229ee415b93b9a47d7d40605ed7b509744c94ad..c2cc38ded257a02de8922312057892bf9d0cad7b 100644
--- a/accessible/xpcom/xpcAccessibleDocument.cpp
+++ b/accessible/xpcom/xpcAccessibleDocument.cpp
@@ -151,6 +151,13 @@ xpcAccessibleDocument::GetBrowsingContext(
@@ -151,6 +151,13 @@
return NS_OK;
}
@@ -520,7 +520,7 @@ index 403fe3fabe..dae1655f29 100644
#include "mozilla/dom/FontFaceSetImpl.h"
#include "mozilla/dom/FontFaceSet.h"
#include "mozilla/dom/HTMLCanvasElement.h"
@@ -4526,10 +4527,20 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor final
@@ -4526,10 +4527,20 @@
} else {
flags &= ~gfx::ShapedTextFlags::TEXT_IS_RTL;
}
+1 -1
View File
@@ -388,7 +388,7 @@ index 605f8bbb9f..83755fd8d5 100644
+#include "WebRTCIPManager.h"
#include "nsDocShell.h"
#include "mozilla/OriginAttributes.h"
@@ -7531,6 +7532,126 @@ void nsGlobalWindowInner::SetFontSpacingSeed(uint32_t seed, ErrorResult& aRv) {
@@ -7531,6 +7532,126 @@
}
}
+1 -1
View File
@@ -23,7 +23,7 @@ index e5a1353d6b..4a4a5b080b 100644
namespace mozilla::dom {
@@ -169,6 +171,20 @@ nsSynthVoiceRegistry* nsSynthVoiceRegistry::GetInstance() {
@@ -169,6 +171,20 @@
// Start up all speech synth services.
NS_CreateServicesFromCategory(NS_SPEECH_SYNTH_STARTED, nullptr,
NS_SPEECH_SYNTH_STARTED);
+1 -1
View File
@@ -308,7 +308,7 @@ index a1e5c4792d..be99491bf8 100644
JS::Rooted<JS::Value> arr(cx);
if (!dom::ToJSValue(cx, src.data(), src.size(), &arr)) {
rv = NS_ERROR_OUT_OF_MEMORY;
@@ -3091,8 +3103,26 @@ ClientWebGLContext::GetShaderPrecisionFormat(const GLenum shadertype,
@@ -3091,8 +3103,26 @@
const FuncScope funcScope(*this, "getShaderPrecisionFormat");
if (IsContextLost()) return nullptr;
+1 -1
View File
@@ -10,7 +10,7 @@ index 235d5dde8f..d0102a6746 100644
#include "nsContentUtils.h"
#include "nsDOMJSUtils.h"
#include "nsGlobalWindowInner.h"
@@ -1582,7 +1584,15 @@ PeerConnectionImpl::SetLocalDescription(int32_t aAction, const char* aSDP) {
@@ -1582,7 +1584,15 @@
}
};