From 0fc8793fc0ccbc7cab16eae5a69fa9da4ab97f5b Mon Sep 17 00:00:00 2001 From: Nirupam Bhowmick <48842933+heydryft@users.noreply.github.com> Date: Mon, 22 Dec 2025 00:00:37 +0000 Subject: [PATCH] fix: update playwright and network patches for Firefox 146 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Playwright patch (BrowsingContext): - Update CanonicalBrowsingContext.cpp line 274→274 with SetParentalControlsEnabled context - Update BrowsingContext.h CurrentOrientationType line 205→209, add HasOrientationOverride field - Update BrowsingContext.h DisplayMode section line 246→253 - Update BrowsingContext.h DidSet section line 1164→1278, change LanguageOverride nsString→nsCString, add TimezoneOverride Network patch: - Update SetAcceptEncodings line 1850→2113 - Add isDictionary parameter to function signature - Update if condition to handle isDictionary case 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- patches/playwright/0-playwright.patch | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/patches/playwright/0-playwright.patch b/patches/playwright/0-playwright.patch index f51597a8..91a091f2 100644 --- a/patches/playwright/0-playwright.patch +++ b/patches/playwright/0-playwright.patch @@ -245,20 +245,21 @@ diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h index b42c32133c6490755ae4e1c599255418e6443011..afa502833ba55c94dbd30726d37450c460a69e2b 100644 --- a/docshell/base/BrowsingContext.h +++ b/docshell/base/BrowsingContext.h -@@ -205,10 +205,10 @@ struct EmbedderColorSchemes { +@@ -209,11 +209,11 @@ struct EmbedderColorSchemes { FIELD(GVInaudibleAutoplayRequestStatus, GVAutoplayRequestStatus) \ /* ScreenOrientation-related APIs */ \ FIELD(CurrentOrientationAngle, float) \ - FIELD(CurrentOrientationType, mozilla::dom::OrientationType) \ + FIELD(CurrentOrientationType, dom::OrientationType) \ FIELD(OrientationLock, mozilla::hal::ScreenOrientation) \ + FIELD(HasOrientationOverride, bool) \ FIELD(UserAgentOverride, nsString) \ - FIELD(TouchEventsOverrideInternal, mozilla::dom::TouchEventsOverride) \ + FIELD(TouchEventsOverrideInternal, dom::TouchEventsOverride) \ FIELD(EmbedderElementType, Maybe) \ FIELD(MessageManagerGroup, nsString) \ FIELD(MaxTouchPointsOverride, uint8_t) \ -@@ -246,6 +246,9 @@ struct EmbedderColorSchemes { +@@ -253,6 +256,9 @@ struct EmbedderColorSchemes { * embedder element. */ \ FIELD(EmbedderColorSchemes, EmbedderColorSchemes) \ FIELD(DisplayMode, dom::DisplayMode) \ @@ -295,7 +296,7 @@ index b42c32133c6490755ae4e1c599255418e6443011..afa502833ba55c94dbd30726d37450c4 bool CanSet(FieldIndex, dom::ForcedColorsOverride, ContentParent*) { return IsTop(); -@@ -1164,12 +1180,24 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { +@@ -1278,13 +1297,25 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { void DidSet(FieldIndex, dom::ForcedColorsOverride aOldValue); @@ -306,7 +307,9 @@ index b42c32133c6490755ae4e1c599255418e6443011..afa502833ba55c94dbd30726d37450c4 void WalkPresContexts(Callback&&); void PresContextAffectingFieldChanged(); - void DidSet(FieldIndex, nsString&& aOldValue); + void DidSet(FieldIndex, nsCString&& aOldValue); + + void DidSet(FieldIndex, nsString&& aOldValue); + bool CanSet(FieldIndex, + dom::PrefersReducedMotionOverride, ContentParent*) { @@ -333,15 +336,20 @@ diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/Canonica index 4953744c3f627bb68b78606d8ae4bf6ab649398a..17c7cc94dafc76cd72aacddfd633b7df58eeae78 100644 --- a/docshell/base/CanonicalBrowsingContext.cpp +++ b/docshell/base/CanonicalBrowsingContext.cpp -@@ -274,6 +274,8 @@ void CanonicalBrowsingContext::ReplacedBy( +@@ -274,7 +274,9 @@ void CanonicalBrowsingContext::ReplacedBy( txn.SetForceOffline(GetForceOffline()); txn.SetTopInnerSizeForRFP(GetTopInnerSizeForRFP()); txn.SetIPAddressSpace(GetIPAddressSpace()); + txn.SetPrefersReducedMotionOverride(GetPrefersReducedMotionOverride()); + txn.SetForcedColorsOverride(GetForcedColorsOverride()); + txn.SetParentalControlsEnabled(GetParentalControlsEnabled()); - // Propagate some settings on BrowsingContext replacement so they're not lost - // on bfcached navigations. These are important for GeckoView (see bug + if (!GetLanguageOverride().IsEmpty()) { + // Reapply language override to update the corresponding realm. + txn.SetLanguageOverride(GetLanguageOverride()); + } + if (!GetTimezoneOverride().IsEmpty()) { + // Reapply timezone override to update the corresponding realm. @@ -1705,6 +1707,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI, return; }