diff --git a/browser_patches/firefox/UPSTREAM_CONFIG.sh b/browser_patches/firefox/UPSTREAM_CONFIG.sh index 7956cc114d..c1afbe1b76 100644 --- a/browser_patches/firefox/UPSTREAM_CONFIG.sh +++ b/browser_patches/firefox/UPSTREAM_CONFIG.sh @@ -1,3 +1,3 @@ REMOTE_URL="https://github.com/mozilla/gecko-dev" BASE_BRANCH="release" -BASE_REVISION="bc78b98043438d8ee2727a483b6e10dedfda883f" +BASE_REVISION="5cfa81898f6eef8fb1abe463e5253cea5bc17f3f" diff --git a/browser_patches/firefox/juggler/TargetRegistry.js b/browser_patches/firefox/juggler/TargetRegistry.js index c40c831d01..586f6c9af5 100644 --- a/browser_patches/firefox/juggler/TargetRegistry.js +++ b/browser_patches/firefox/juggler/TargetRegistry.js @@ -393,7 +393,7 @@ class PageTarget { this._videoRecordingInfo = undefined; this._screencastRecordingInfo = undefined; this._dialogs = new Map(); - this.forcedColors = 'no-override'; + this.forcedColors = 'none'; this.disableCache = false; this.mediumOverride = ''; this.crossProcessCookie = { @@ -635,7 +635,8 @@ class PageTarget { } updateForcedColorsOverride(browsingContext = undefined) { - (browsingContext || this._linkedBrowser.browsingContext).forcedColorsOverride = (this.forcedColors !== 'no-override' ? this.forcedColors : this._browserContext.forcedColors) || 'no-override'; + const isActive = this.forcedColors === 'active' || this._browserContext.forcedColors === 'active'; + (browsingContext || this._linkedBrowser.browsingContext).forcedColorsOverride = isActive ? 'active' : 'none'; } async setInterceptFileChooserDialog(enabled) { @@ -858,8 +859,8 @@ function fromProtocolReducedMotion(reducedMotion) { function fromProtocolForcedColors(forcedColors) { if (forcedColors === 'active' || forcedColors === 'none') return forcedColors; - if (forcedColors === null) - return undefined; + if (!forcedColors) + return 'none'; throw new Error('Unknown forced colors: ' + forcedColors); } @@ -893,7 +894,7 @@ class BrowserContext { this.forceOffline = false; this.disableCache = false; this.colorScheme = 'none'; - this.forcedColors = 'no-override'; + this.forcedColors = 'none'; this.reducedMotion = 'none'; this.videoRecordingOptions = undefined; this.crossProcessCookie = { diff --git a/browser_patches/firefox/juggler/components/Juggler.js b/browser_patches/firefox/juggler/components/Juggler.js index d919935fb5..aa51a88879 100644 --- a/browser_patches/firefox/juggler/components/Juggler.js +++ b/browser_patches/firefox/juggler/components/Juggler.js @@ -105,7 +105,10 @@ class Juggler { }; // Force create hidden window here, otherwise its creation later closes the web socket! - Services.appShell.hiddenDOMWindow; + // Since https://phabricator.services.mozilla.com/D219834, hiddenDOMWindow is only available on MacOS. + if (Services.appShell.hasHiddenWindow) { + Services.appShell.hiddenDOMWindow; + } let pipeStopped = false; let browserHandler; diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diff index 5902d600c2..785f3e485f 100644 --- a/browser_patches/firefox/patches/bootstrap.diff +++ b/browser_patches/firefox/patches/bootstrap.diff @@ -106,10 +106,10 @@ index 213a99ed433d5219c2b9a64baad82d14cdbcd432..ee4f6484cdfe80899c28a1d9607494e5 browser/chrome/browser/content/activity-stream/data/content/tippytop/favicons/allegro-pl.ico browser/defaults/settings/main/search-config-icons/96327a73-c433-5eb4-a16d-b090cadfb80b diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in -index da760e143740a166df14d055cf3ec7b095b93d10..a7579b3eae69f3b706094693d9b0edaec049e83b 100644 +index 8aa6bf65634b6b82d448d57b337c3186bc6e5f96..49e98523b335d982a63863f6b93ae3db443fc925 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in -@@ -189,6 +189,9 @@ +@@ -196,6 +196,9 @@ @RESPATH@/chrome/remote.manifest #endif @@ -167,10 +167,10 @@ index d49c6fbf1bf83b832795fa674f6b41f223eef812..7ea3540947ff5f61b15f27fbf4b95564 const transportProvider = { setListener(upgradeListener) { diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp -index e1721f31d491aa8a7977eaca3d2f7f8a048546de..b3bc2d575dc3f794cbc08c603e70d34bbe69efed 100644 +index 9b5c8143cb7f31a2eac982b0bbec4985816bdf5a..104ec4e5221af5647a776711fd349bbb0817aff4 100644 --- a/docshell/base/BrowsingContext.cpp +++ b/docshell/base/BrowsingContext.cpp -@@ -106,8 +106,15 @@ struct ParamTraits +@@ -106,8 +106,11 @@ struct ParamTraits template <> struct ParamTraits @@ -181,14 +181,10 @@ index e1721f31d491aa8a7977eaca3d2f7f8a048546de..b3bc2d575dc3f794cbc08c603e70d34b +template <> +struct ParamTraits + : public mozilla::dom::WebIDLEnumSerializer {}; -+ -+template <> -+struct ParamTraits -+ : public mozilla::dom::WebIDLEnumSerializer {}; template <> - struct ParamTraits -@@ -2818,6 +2825,40 @@ void BrowsingContext::DidSet(FieldIndex, + struct ParamTraits +@@ -2865,6 +2868,23 @@ void BrowsingContext::DidSet(FieldIndex, PresContextAffectingFieldChanged(); } @@ -208,29 +204,12 @@ index e1721f31d491aa8a7977eaca3d2f7f8a048546de..b3bc2d575dc3f794cbc08c603e70d34b + } + }); +} -+ -+void BrowsingContext::DidSet(FieldIndex, -+ dom::ForcedColorsOverride aOldValue) { -+ MOZ_ASSERT(IsTop()); -+ if (ForcedColorsOverride() == aOldValue) { -+ return; -+ } -+ PreOrderWalk([&](BrowsingContext* aContext) { -+ if (nsIDocShell* shell = aContext->GetDocShell()) { -+ if (nsPresContext* pc = shell->GetPresContext()) { -+ pc->MediaFeatureValuesChanged( -+ {MediaFeatureChangeReason::SystemMetricsChange}, -+ MediaFeatureChangePropagation::JustThisDocument); -+ } -+ } -+ }); -+} + void BrowsingContext::DidSet(FieldIndex, nsString&& aOldValue) { MOZ_ASSERT(IsTop()); diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h -index 61135ab0d7894c500c3c5d80d107e283c01b6830..cc8eb043f1f78214843ec7b335dd9932587d9bbd 100644 +index 98a34cab1ffd393a5ee3cbca7799d024b3d4ac71..fdba3572ed3d2c7a6491c42ee535bf04a3585da4 100644 --- a/docshell/base/BrowsingContext.h +++ b/docshell/base/BrowsingContext.h @@ -203,10 +203,10 @@ struct EmbedderColorSchemes { @@ -246,33 +225,27 @@ index 61135ab0d7894c500c3c5d80d107e283c01b6830..cc8eb043f1f78214843ec7b335dd9932 FIELD(EmbedderElementType, Maybe) \ FIELD(MessageManagerGroup, nsString) \ FIELD(MaxTouchPointsOverride, uint8_t) \ -@@ -244,6 +244,10 @@ struct EmbedderColorSchemes { +@@ -246,6 +246,8 @@ struct EmbedderColorSchemes { * embedder element. */ \ FIELD(EmbedderColorSchemes, EmbedderColorSchemes) \ FIELD(DisplayMode, dom::DisplayMode) \ + /* playwright addition */ \ + FIELD(PrefersReducedMotionOverride, dom::PrefersReducedMotionOverride) \ -+ /* playwright addition */ \ -+ FIELD(ForcedColorsOverride, dom::ForcedColorsOverride) \ /* The number of entries added to the session history because of this \ * browsing context. */ \ FIELD(HistoryEntryCount, uint32_t) \ -@@ -937,6 +941,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { - return GetPrefersColorSchemeOverride(); +@@ -946,6 +948,10 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { + return GetForcedColorsOverride(); } + dom::PrefersReducedMotionOverride PrefersReducedMotionOverride() const { + return GetPrefersReducedMotionOverride(); + } -+ -+ dom::ForcedColorsOverride ForcedColorsOverride() const { -+ return GetForcedColorsOverride(); -+ } + bool IsInBFCache() const; bool AllowJavascript() const { return GetAllowJavascript(); } -@@ -1101,6 +1113,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { +@@ -1125,6 +1131,15 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { void WalkPresContexts(Callback&&); void PresContextAffectingFieldChanged(); @@ -284,32 +257,24 @@ index 61135ab0d7894c500c3c5d80d107e283c01b6830..cc8eb043f1f78214843ec7b335dd9932 + void DidSet(FieldIndex, + dom::PrefersReducedMotionOverride aOldValue); + -+ -+ bool CanSet(FieldIndex, -+ dom::ForcedColorsOverride, ContentParent*) { -+ return IsTop(); -+ } -+ -+ void DidSet(FieldIndex, -+ dom::ForcedColorsOverride aOldValue); + void DidSet(FieldIndex, nsString&& aOldValue); bool CanSet(FieldIndex, bool, ContentParent*) { diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp -index f0d8cb25398472d8720fcacc47081d95d3e9887c..a680d4458360c8515712ef0a986415113ae8a4e0 100644 +index 57bd331851a3604a2d413bf2f0142532d341fa19..68dda8274473d99953d2bee0640d5bec5479827f 100644 --- a/docshell/base/CanonicalBrowsingContext.cpp +++ b/docshell/base/CanonicalBrowsingContext.cpp -@@ -324,6 +324,8 @@ void CanonicalBrowsingContext::ReplacedBy( - txn.SetHasRestoreData(GetHasRestoreData()); +@@ -325,6 +325,8 @@ void CanonicalBrowsingContext::ReplacedBy( txn.SetShouldDelayMediaFromStart(GetShouldDelayMediaFromStart()); txn.SetForceOffline(GetForceOffline()); + txn.SetTopInnerSizeForRFP(GetTopInnerSizeForRFP()); + txn.SetPrefersReducedMotionOverride(GetPrefersReducedMotionOverride()); + txn.SetForcedColorsOverride(GetForcedColorsOverride()); // Propagate some settings on BrowsingContext replacement so they're not lost // on bfcached navigations. These are important for GeckoView (see bug -@@ -1594,6 +1596,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI, +@@ -1610,6 +1612,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI, return; } @@ -323,7 +288,7 @@ index f0d8cb25398472d8720fcacc47081d95d3e9887c..a680d4458360c8515712ef0a98641511 } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp -index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c4032e9f9b4b 100644 +index 17f0d7fa7032a0aade92a8ecacd27017fea28a05..e1728e7cb162fcd96478050eab45ed439098c5b0 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -15,6 +15,12 @@ @@ -385,7 +350,7 @@ index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c403 mAllowAuth(mItemType == typeContent), mAllowKeywordFixup(false), mDisableMetaRefreshWhenInactive(false), -@@ -3046,6 +3063,214 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) { +@@ -3018,6 +3035,214 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) { return NS_OK; } @@ -600,7 +565,7 @@ index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c403 NS_IMETHODIMP nsDocShell::GetIsNavigating(bool* aOut) { *aOut = mIsNavigating; -@@ -4739,7 +4964,7 @@ nsDocShell::GetVisibility(bool* aVisibility) { +@@ -4714,7 +4939,7 @@ nsDocShell::GetVisibility(bool* aVisibility) { } void nsDocShell::ActivenessMaybeChanged() { @@ -609,7 +574,7 @@ index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c403 if (RefPtr presShell = GetPresShell()) { presShell->ActivenessMaybeChanged(); } -@@ -6688,6 +6913,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType, +@@ -6641,6 +6866,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType, return false; // no entry to save into } @@ -620,7 +585,7 @@ index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c403 MOZ_ASSERT(!mozilla::SessionHistoryInParent(), "mOSHE cannot be non-null with SHIP"); nsCOMPtr viewer = mOSHE->GetDocumentViewer(); -@@ -8420,6 +8649,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) { +@@ -8373,6 +8602,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) { true, // aForceNoOpener getter_AddRefs(newBC)); MOZ_ASSERT(!newBC); @@ -633,7 +598,7 @@ index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c403 return rv; } -@@ -9556,6 +9791,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState, +@@ -9520,6 +9755,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState, nsINetworkPredictor::PREDICT_LOAD, attrs, nullptr); nsCOMPtr req; @@ -650,7 +615,7 @@ index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c403 rv = DoURILoad(aLoadState, aCacheKey, getter_AddRefs(req)); if (NS_SUCCEEDED(rv)) { -@@ -12754,6 +12999,9 @@ class OnLinkClickEvent : public Runnable { +@@ -12724,6 +12969,9 @@ class OnLinkClickEvent : public Runnable { mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied, mTriggeringPrincipal); } @@ -660,7 +625,7 @@ index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c403 return NS_OK; } -@@ -12843,6 +13091,8 @@ nsresult nsDocShell::OnLinkClick( +@@ -12813,6 +13061,8 @@ nsresult nsDocShell::OnLinkClick( nsCOMPtr ev = new OnLinkClickEvent(this, aContent, loadState, noOpenerImplied, aIsTrusted, aTriggeringPrincipal); @@ -670,7 +635,7 @@ index c15a424a05d23287ee21726a5fb21ff5691e4c2b..fa9989e313bbb7bf049ce1519733c403 } diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h -index 0ea84df4dde885fd8e7f7e6045db56a0fa6b2691..b00bc444a5a25e63f98e583959d5f6812caf1815 100644 +index 0cf72f8fffb40a4205f9d2cb339f4ebd9031373f..0b09b2877781d0693d466b66e6ff00872988af4a 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -15,6 +15,7 @@ @@ -689,7 +654,7 @@ index 0ea84df4dde885fd8e7f7e6045db56a0fa6b2691..b00bc444a5a25e63f98e583959d5f681 class nsGlobalWindowOuter; class FramingChecker; -@@ -401,6 +403,15 @@ class nsDocShell final : public nsDocLoader, +@@ -403,6 +405,15 @@ class nsDocShell final : public nsDocLoader, void SetWillChangeProcess() { mWillChangeProcess = true; } bool WillChangeProcess() { return mWillChangeProcess; } @@ -705,7 +670,7 @@ index 0ea84df4dde885fd8e7f7e6045db56a0fa6b2691..b00bc444a5a25e63f98e583959d5f681 // Create a content viewer within this nsDocShell for the given // `WindowGlobalChild` actor. nsresult CreateDocumentViewerForActor( -@@ -1004,6 +1015,8 @@ class nsDocShell final : public nsDocLoader, +@@ -1006,6 +1017,8 @@ class nsDocShell final : public nsDocLoader, bool CSSErrorReportingEnabled() const { return mCSSErrorReportingEnabled; } @@ -714,7 +679,7 @@ index 0ea84df4dde885fd8e7f7e6045db56a0fa6b2691..b00bc444a5a25e63f98e583959d5f681 // Handles retrieval of subframe session history for nsDocShell::LoadURI. If a // load is requested in a subframe of the current DocShell, the subframe // loadType may need to reflect the loadType of the parent document, or in -@@ -1291,6 +1304,16 @@ class nsDocShell final : public nsDocLoader, +@@ -1283,6 +1296,16 @@ class nsDocShell final : public nsDocLoader, bool mAllowDNSPrefetch : 1; bool mAllowWindowControl : 1; bool mCSSErrorReportingEnabled : 1; @@ -781,10 +746,10 @@ index fdc04f16c6f547077ad8c872f9357d85d4513c50..199f8fdb0670265c715f99f5cac1a2b2 * This attempts to save any applicable layout history state (like * scroll position) in the nsISHEntry. This is normally done diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp -index 79f3524037e954eb693e2882d91a7632e6e1df41..2b75a1eaff4d166f68ca4a943e10cf9c6ab28bbf 100644 +index b460181916b4f4edfc1a56e8b06f6506bd81465b..2a493209a2667ad8c5e84b893b5ce01d0dcc3fee 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp -@@ -3783,6 +3783,9 @@ void Document::SendToConsole(nsCOMArray& aMessages) { +@@ -3745,6 +3745,9 @@ void Document::SendToConsole(nsCOMArray& aMessages) { } void Document::ApplySettingsFromCSP(bool aSpeculative) { @@ -794,7 +759,7 @@ index 79f3524037e954eb693e2882d91a7632e6e1df41..2b75a1eaff4d166f68ca4a943e10cf9c nsresult rv = NS_OK; if (!aSpeculative) { // 1) apply settings from regular CSP -@@ -3840,6 +3843,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) { +@@ -3802,6 +3805,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) { MOZ_ASSERT(!mScriptGlobalObject, "CSP must be initialized before mScriptGlobalObject is set!"); @@ -806,7 +771,7 @@ index 79f3524037e954eb693e2882d91a7632e6e1df41..2b75a1eaff4d166f68ca4a943e10cf9c // If this is a data document - no need to set CSP. if (mLoadedAsData) { return NS_OK; -@@ -4641,6 +4649,10 @@ bool Document::HasFocus(ErrorResult& rv) const { +@@ -4603,6 +4611,10 @@ bool Document::HasFocus(ErrorResult& rv) const { return false; } @@ -817,7 +782,7 @@ index 79f3524037e954eb693e2882d91a7632e6e1df41..2b75a1eaff4d166f68ca4a943e10cf9c if (!fm->IsInActiveWindow(bc)) { return false; } -@@ -19139,6 +19151,66 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const { +@@ -19462,6 +19474,35 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const { return PreferenceSheet::PrefsFor(*this).mColorScheme; } @@ -849,57 +814,25 @@ index 79f3524037e954eb693e2882d91a7632e6e1df41..2b75a1eaff4d166f68ca4a943e10cf9c + + return LookAndFeel::GetInt(LookAndFeel::IntID::PrefersReducedMotion, 0) == 1; +} -+ -+bool Document::ForcedColors() const { -+ auto* docShell = static_cast(GetDocShell()); -+ nsIDocShell::ForcedColorsOverride forcedColors; -+ if (docShell && docShell->GetForcedColorsOverride(&forcedColors) == NS_OK) { -+ switch (forcedColors) { -+ case nsIDocShell::FORCED_COLORS_OVERRIDE_ACTIVE: -+ return true; -+ case nsIDocShell::FORCED_COLORS_OVERRIDE_NONE: -+ return false; -+ case nsIDocShell::FORCED_COLORS_OVERRIDE_NO_OVERRIDE: -+ break; -+ }; -+ } -+ -+ if (auto* bc = GetBrowsingContext()) { -+ switch (bc->Top()->ForcedColorsOverride()) { -+ case dom::ForcedColorsOverride::Active: -+ return true; -+ case dom::ForcedColorsOverride::None: -+ return false; -+ case dom::ForcedColorsOverride::No_override: -+ break; -+ } -+ } -+ -+ if (mIsBeingUsedAsImage) { -+ return false; -+ } -+ return !PreferenceSheet::PrefsFor(*this).mUseDocumentColors; -+} + bool Document::HasRecentlyStartedForegroundLoads() { if (!sLoadingForegroundTopLevelContentDocument) { return false; diff --git a/dom/base/Document.h b/dom/base/Document.h -index 7a8d8f2a716fc613c4095eaf1a18017887b9b924..e030e6b7ad63ad7c95227ed8f54e946190a638d8 100644 +index 9b748acbce8e4dd1c1393aa5d26170747ec48228..a8bc4c52651ea32128388d1e5f486b7fe0203d4b 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h -@@ -4077,6 +4077,9 @@ class Document : public nsINode, +@@ -4108,6 +4108,8 @@ class Document : public nsINode, // color-scheme meta tag. ColorScheme DefaultColorScheme() const; + bool PrefersReducedMotion() const; -+ bool ForcedColors() const; + static bool HasRecentlyStartedForegroundLoads(); static bool AutomaticStorageAccessPermissionCanBeGranted( diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp -index e26e0968c11905a39bfcfeea60b4989126780084..376165771df0e215d9e1c78ae5d3669e525bcf31 100644 +index d7ed73aee3af96096e36ead6d1aeecec7269556d..b2f3b53f46bfbcca044a7d9f18a694469b4884d5 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -344,14 +344,18 @@ void Navigator::GetAppName(nsAString& aAppName) const { @@ -938,7 +871,7 @@ index e26e0968c11905a39bfcfeea60b4989126780084..376165771df0e215d9e1c78ae5d3669e // The returned value is cached by the binding code. The window listens to the // accept languages change and will clear the cache when needed. It has to -@@ -2307,7 +2317,8 @@ bool Navigator::Webdriver() { +@@ -2298,7 +2308,8 @@ bool Navigator::Webdriver() { } #endif @@ -962,10 +895,10 @@ index 6abf6cef230c97815f17f6b7abf9f1b1de274a6f..46ead1f32e0d710b5b32e61dff72a4f7 dom::MediaCapabilities* MediaCapabilities(); dom::MediaSession* MediaSession(); diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp -index 8518005d2938d35da7681c1b4230cacbe8fbaf03..e501e7e3351b6f5bdd07020dea658b9f8508b126 100644 +index 80df23b73f132c2b6ec99df1cb219878d6ea8639..0b82f7117805f0ad5ccca21532f87852eaae3ecf 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp -@@ -8809,7 +8809,8 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8793,7 +8793,8 @@ nsresult nsContentUtils::SendMouseEvent( bool aIgnoreRootScrollFrame, float aPressure, unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow, PreventDefaultResult* aPreventDefault, bool aIsDOMEventSynthesized, @@ -975,7 +908,7 @@ index 8518005d2938d35da7681c1b4230cacbe8fbaf03..e501e7e3351b6f5bdd07020dea658b9f nsPoint offset; nsCOMPtr widget = GetWidget(aPresShell, &offset); if (!widget) return NS_ERROR_FAILURE; -@@ -8817,6 +8818,7 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8801,6 +8802,7 @@ nsresult nsContentUtils::SendMouseEvent( EventMessage msg; Maybe exitFrom; bool contextMenuKey = false; @@ -983,7 +916,7 @@ index 8518005d2938d35da7681c1b4230cacbe8fbaf03..e501e7e3351b6f5bdd07020dea658b9f if (aType.EqualsLiteral("mousedown")) { msg = eMouseDown; } else if (aType.EqualsLiteral("mouseup")) { -@@ -8841,6 +8843,12 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8826,6 +8828,12 @@ nsresult nsContentUtils::SendMouseEvent( msg = eMouseHitTest; } else if (aType.EqualsLiteral("MozMouseExploreByTouch")) { msg = eMouseExploreByTouch; @@ -996,7 +929,7 @@ index 8518005d2938d35da7681c1b4230cacbe8fbaf03..e501e7e3351b6f5bdd07020dea658b9f } else { return NS_ERROR_FAILURE; } -@@ -8851,7 +8859,14 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8836,7 +8844,14 @@ nsresult nsContentUtils::SendMouseEvent( Maybe pointerEvent; Maybe mouseEvent; @@ -1012,7 +945,7 @@ index 8518005d2938d35da7681c1b4230cacbe8fbaf03..e501e7e3351b6f5bdd07020dea658b9f MOZ_ASSERT(!aIsWidgetEventSynthesized, "The event shouldn't be dispatched as a synthesized event"); if (MOZ_UNLIKELY(aIsWidgetEventSynthesized)) { -@@ -8870,8 +8885,11 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8855,8 +8870,11 @@ nsresult nsContentUtils::SendMouseEvent( contextMenuKey ? WidgetMouseEvent::eContextMenuKey : WidgetMouseEvent::eNormal); } @@ -1024,7 +957,7 @@ index 8518005d2938d35da7681c1b4230cacbe8fbaf03..e501e7e3351b6f5bdd07020dea658b9f mouseOrPointerEvent.pointerId = aIdentifier; mouseOrPointerEvent.mModifiers = GetWidgetModifiers(aModifiers); mouseOrPointerEvent.mButton = aButton; -@@ -8884,6 +8902,8 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8869,6 +8887,8 @@ nsresult nsContentUtils::SendMouseEvent( mouseOrPointerEvent.mClickCount = aClickCount; mouseOrPointerEvent.mFlags.mIsSynthesizedForTests = aIsDOMEventSynthesized; mouseOrPointerEvent.mExitFrom = exitFrom; @@ -1034,10 +967,10 @@ index 8518005d2938d35da7681c1b4230cacbe8fbaf03..e501e7e3351b6f5bdd07020dea658b9f nsPresContext* presContext = aPresShell->GetPresContext(); if (!presContext) return NS_ERROR_FAILURE; diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h -index b4b2244ddfbe43efa055788297a103c49989d921..2d22cdf8b25d9ce0e0daabb09f315d61a214a2be 100644 +index d9556910b2e27aebd648835353a6843347d6f8ac..61fdbfda2c43e3265fa8bc48a1d0f5f38f70b48c 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h -@@ -3047,7 +3047,8 @@ class nsContentUtils { +@@ -3039,7 +3039,8 @@ class nsContentUtils { int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow, mozilla::PreventDefaultResult* aPreventDefault, @@ -1048,7 +981,7 @@ index b4b2244ddfbe43efa055788297a103c49989d921..2d22cdf8b25d9ce0e0daabb09f315d61 static void FirePageShowEventForFrameLoaderSwap( nsIDocShellTreeItem* aItem, diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp -index c77bf80d5e1fc6db342ab47e85b7950f8a15a2d8..2f61c71cdb82b73c1de1a357315d9243a0b8c639 100644 +index 7e22693477bb4ededfc3fff568f3993db6abb838..91379e3032b64e08892790a72c6cc421983cf94e 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -685,6 +685,26 @@ nsDOMWindowUtils::GetPresShellId(uint32_t* aPresShellId) { @@ -1126,10 +1059,10 @@ index 47ff326b202266b1d7d6af8bdfb72776df8a6a93..b8e084b0c788c46345b1455b8257f171 MOZ_CAN_RUN_SCRIPT nsresult SendTouchEventCommon( diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp -index cbd5cb8e4525454cac0470a14bdc63d45bf53b9a..a73297f3faafe5895453f0a6996aa30a77a97267 100644 +index f24942e513f85a0f750eabaeb429889a9cf99092..74683b60bdfac459c0047c52b7efefa9aae1c01a 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp -@@ -1697,6 +1697,10 @@ Maybe nsFocusManager::SetFocusInner(Element* aNewContent, +@@ -1712,6 +1712,10 @@ Maybe nsFocusManager::SetFocusInner(Element* aNewContent, (GetActiveBrowsingContext() == newRootBrowsingContext); } @@ -1140,7 +1073,7 @@ index cbd5cb8e4525454cac0470a14bdc63d45bf53b9a..a73297f3faafe5895453f0a6996aa30a // Exit fullscreen if a website focuses another window if (StaticPrefs::full_screen_api_exit_on_windowRaise() && !isElementInActiveWindow && (aFlags & FLAG_RAISE)) { -@@ -2282,6 +2286,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear, +@@ -2297,6 +2301,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear, bool aIsLeavingDocument, bool aAdjustWidget, bool aRemainActive, Element* aElementToFocus, uint64_t aActionId) { @@ -1148,7 +1081,7 @@ index cbd5cb8e4525454cac0470a14bdc63d45bf53b9a..a73297f3faafe5895453f0a6996aa30a LOGFOCUS(("<>", aActionId)); // hold a reference to the focused content, which may be null -@@ -2328,6 +2333,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear, +@@ -2343,6 +2348,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear, return true; } @@ -1160,7 +1093,7 @@ index cbd5cb8e4525454cac0470a14bdc63d45bf53b9a..a73297f3faafe5895453f0a6996aa30a // Keep a ref to presShell since dispatching the DOM event may cause // the document to be destroyed. RefPtr presShell = docShell->GetPresShell(); -@@ -3005,7 +3015,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow, +@@ -3020,7 +3030,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow, } } @@ -1172,7 +1105,7 @@ index cbd5cb8e4525454cac0470a14bdc63d45bf53b9a..a73297f3faafe5895453f0a6996aa30a // care of lowering the present active window. This happens in // a separate runnable to avoid touching multiple windows in diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp -index f2aa07e2c1e6df28e165b1868ad9717248360972..2b1b406c4fdf6d0716b9c29c3e640de210eae749 100644 +index 8973a1e401670d32808136d47ab8efb0e396a549..0889b2ff12540c9aa36d9efc5d81fb684513b686 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -2516,10 +2516,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument, @@ -1217,7 +1150,7 @@ index f2aa07e2c1e6df28e165b1868ad9717248360972..2b1b406c4fdf6d0716b9c29c3e640de2 void nsGlobalWindowOuter::SetDocShell(nsDocShell* aDocShell) { diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h -index e2a2b560b565e6eb3cd5b4e77eb30051afe7a418..81eaca3fb0acfe90bf07acb4115a0db0786c6998 100644 +index b388bfb6ea26a88c29d9d14dfbc375ff7bd09eec..8685e4cece9d2cc2511b9d3022c891df6dc1660d 100644 --- a/dom/base/nsGlobalWindowOuter.h +++ b/dom/base/nsGlobalWindowOuter.h @@ -317,6 +317,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget, @@ -1229,10 +1162,10 @@ index e2a2b560b565e6eb3cd5b4e77eb30051afe7a418..81eaca3fb0acfe90bf07acb4115a0db0 // Outer windows only. virtual void EnsureSizeAndPositionUpToDate() override; diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp -index 091d04dd79da3acc33aa22405ddb984ba486dfe2..40bb124fd735c2d214221c1a5fac442e26f7564e 100644 +index 03990e9ed30f4dfa7d3dbec40942ce1121b07b8d..2dd4ac45ad0aec598ad9c00e6e280757b33c7648 100644 --- a/dom/base/nsINode.cpp +++ b/dom/base/nsINode.cpp -@@ -1402,6 +1402,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions, +@@ -1426,6 +1426,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions, mozilla::GetBoxQuadsFromWindowOrigin(this, aOptions, aResult, aRv); } @@ -1295,10 +1228,10 @@ index 091d04dd79da3acc33aa22405ddb984ba486dfe2..40bb124fd735c2d214221c1a5fac442e DOMQuad& aQuad, const GeometryNode& aFrom, const ConvertCoordinateOptions& aOptions, CallerType aCallerType, diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h -index 3bc7ff8a3d9e7f3148f51da13f34ea1b3ca2ba77..dcb47740ca93ab237e4f55d4225f77283f5f404b 100644 +index c7d56c4f8ed4400ac7e5dd5b168862c8bfc8c7aa..1a8469bb00cfdcc1b6e7675c4a19e4ae9ad18637 100644 --- a/dom/base/nsINode.h +++ b/dom/base/nsINode.h -@@ -2317,6 +2317,10 @@ class nsINode : public mozilla::dom::EventTarget { +@@ -2322,6 +2322,10 @@ class nsINode : public mozilla::dom::EventTarget { nsTArray>& aResult, ErrorResult& aRv); @@ -1338,11 +1271,11 @@ index 8b4c1492c64884d83eb1553bc40b921e0da601b7..ee66eaa21d8e8c208204ef73fca5b3d7 static bool DumpEnabled(); diff --git a/dom/chrome-webidl/BrowsingContext.webidl b/dom/chrome-webidl/BrowsingContext.webidl -index 864890f6a23b21a2a59687e4e2873b6837c05fbb..a34005c323d4b8e35b5bdb2b6eec2a268f8adc4b 100644 +index 28e8d8cb9c61ff8362b2d191d47c3630d2cb0b34..0058e60aaab21f8003bbe1bf3f271c63ed78f29a 100644 --- a/dom/chrome-webidl/BrowsingContext.webidl +++ b/dom/chrome-webidl/BrowsingContext.webidl -@@ -53,6 +53,24 @@ enum PrefersColorSchemeOverride { - "dark", +@@ -61,6 +61,15 @@ enum ForcedColorsOverride { + "active", }; +/** @@ -1353,37 +1286,25 @@ index 864890f6a23b21a2a59687e4e2873b6837c05fbb..a34005c323d4b8e35b5bdb2b6eec2a26 + "reduce", + "no-preference", +}; -+ -+/** -+ * CSS forced-colors values. -+ */ -+enum ForcedColorsOverride { -+ "none", -+ "active", -+ "no-override", /* This clears the override. */ -+}; + /** * Allowed overrides of platform/pref default behaviour for touch events. */ -@@ -209,6 +227,12 @@ interface BrowsingContext { - // Color-scheme simulation, for DevTools. - [SetterThrows] attribute PrefersColorSchemeOverride prefersColorSchemeOverride; +@@ -220,6 +229,9 @@ interface BrowsingContext { + // Forced-colors simulation, for DevTools + [SetterThrows] attribute ForcedColorsOverride forcedColorsOverride; + // Reduced-Motion simulation, for DevTools. + [SetterThrows] attribute PrefersReducedMotionOverride prefersReducedMotionOverride; -+ -+ // Forced-Colors simulation, for DevTools. -+ [SetterThrows] attribute ForcedColorsOverride forcedColorsOverride; + /** * A unique identifier for the browser element that is hosting this * BrowsingContext tree. Every BrowsingContext in the element's tree will diff --git a/dom/geolocation/Geolocation.cpp b/dom/geolocation/Geolocation.cpp -index 21717aba5547b973e439ae9ba525f358d044d3f8..274cdebc2e0a2eb9f8b7743d24921204a417f76d 100644 +index 140ad5a3e651cc3dc7c31ff7efebbd3cecb0076d..cae2d2af93a3d881d2a934d446945f356c3b6070 100644 --- a/dom/geolocation/Geolocation.cpp +++ b/dom/geolocation/Geolocation.cpp -@@ -24,6 +24,7 @@ +@@ -29,6 +29,7 @@ #include "nsComponentManagerUtils.h" #include "nsContentPermissionHelper.h" #include "nsContentUtils.h" @@ -1391,7 +1312,7 @@ index 21717aba5547b973e439ae9ba525f358d044d3f8..274cdebc2e0a2eb9f8b7743d24921204 #include "nsGlobalWindowInner.h" #include "mozilla/dom/Document.h" #include "nsINamed.h" -@@ -264,10 +265,8 @@ nsGeolocationRequest::Allow(JS::Handle aChoices) { +@@ -432,10 +433,8 @@ nsGeolocationRequest::Allow(JS::Handle aChoices) { return NS_OK; } @@ -1404,7 +1325,7 @@ index 21717aba5547b973e439ae9ba525f358d044d3f8..274cdebc2e0a2eb9f8b7743d24921204 CachedPositionAndAccuracy lastPosition = gs->GetCachedPosition(); if (lastPosition.position) { EpochTimeStamp cachedPositionTime_ms; -@@ -475,8 +474,7 @@ void nsGeolocationRequest::Shutdown() { +@@ -643,8 +642,7 @@ void nsGeolocationRequest::Shutdown() { // If there are no other high accuracy requests, the geolocation service will // notify the provider to switch to the default accuracy. if (mOptions && mOptions->mEnableHighAccuracy) { @@ -1414,7 +1335,7 @@ index 21717aba5547b973e439ae9ba525f358d044d3f8..274cdebc2e0a2eb9f8b7743d24921204 if (gs) { gs->UpdateAccuracy(); } -@@ -785,8 +783,14 @@ void nsGeolocationService::StopDevice() { +@@ -961,8 +959,14 @@ void nsGeolocationService::StopDevice() { StaticRefPtr nsGeolocationService::sService; already_AddRefed @@ -1430,7 +1351,7 @@ index 21717aba5547b973e439ae9ba525f358d044d3f8..274cdebc2e0a2eb9f8b7743d24921204 if (nsGeolocationService::sService) { result = nsGeolocationService::sService; -@@ -878,7 +882,9 @@ nsresult Geolocation::Init(nsPIDOMWindowInner* aContentDom) { +@@ -1054,7 +1058,9 @@ nsresult Geolocation::Init(nsPIDOMWindowInner* aContentDom) { // If no aContentDom was passed into us, we are being used // by chrome/c++ and have no mOwner, no mPrincipal, and no need // to prompt. @@ -1442,7 +1363,7 @@ index 21717aba5547b973e439ae9ba525f358d044d3f8..274cdebc2e0a2eb9f8b7743d24921204 mService->AddLocator(this); } diff --git a/dom/geolocation/Geolocation.h b/dom/geolocation/Geolocation.h -index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1efb9a5d7 100644 +index 992de29b5d2d09c19e55ebb2502215ec9d05a171..cdc20567b693283b0fd5a5923f7ea54210bd1712 100644 --- a/dom/geolocation/Geolocation.h +++ b/dom/geolocation/Geolocation.h @@ -31,6 +31,7 @@ @@ -1453,7 +1374,7 @@ index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1 class nsGeolocationService; class nsGeolocationRequest; -@@ -48,13 +49,14 @@ struct CachedPositionAndAccuracy { +@@ -51,13 +52,14 @@ struct CachedPositionAndAccuracy { bool isHighAccuracy; }; @@ -1469,9 +1390,9 @@ index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1 static mozilla::StaticRefPtr sService; NS_DECL_THREADSAFE_ISUPPORTS -@@ -179,6 +181,8 @@ class Geolocation final : public nsIGeolocationUpdate, public nsWrapperCache { - // null. - static already_AddRefed NonWindowSingleton(); +@@ -189,6 +191,8 @@ class Geolocation final : public nsIGeolocationUpdate, public nsWrapperCache { + BrowsingContext* aBrowsingContext, + geolocation::ParentRequestResolver&& aResolver); + nsGeolocationService* GetGeolocationService() { return mService; }; + @@ -1505,7 +1426,7 @@ index d40c2a230c8c86f585935061d05e20b405c906fe..29547e7a0d75fdc8b8b30344db322874 return NS_OK; } diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl -index 89202fa1ff22593e7cb5e20fc40b3b3b8e114449..61ed40c8454c6e85876cbc7c240496cc96f77239 100644 +index 4f0fc82a36c5ef5daa99d3623d4e7dac467038e2..9076e43644a2bd82fbaca41fb0e3559dc5f20c24 100644 --- a/dom/interfaces/base/nsIDOMWindowUtils.idl +++ b/dom/interfaces/base/nsIDOMWindowUtils.idl @@ -374,6 +374,26 @@ interface nsIDOMWindowUtils : nsISupports { @@ -1536,10 +1457,10 @@ index 89202fa1ff22593e7cb5e20fc40b3b3b8e114449..61ed40c8454c6e85876cbc7c240496cc * touchstart, touchend, touchmove, and touchcancel * diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp -index 0335a887fe157210f9eef58bf63be879f7d5de2b..dfbb8dae406f9d9276a2719f515ac5a51f8a671d 100644 +index 017d579a4c529587ff6730a8bbcd748840ff91ac..4be9d8ee6b6c9e4bbc9c7a2568e883ae43039348 100644 --- a/dom/ipc/BrowserChild.cpp +++ b/dom/ipc/BrowserChild.cpp -@@ -1656,6 +1656,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent, +@@ -1674,6 +1674,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent, if (postLayerization) { postLayerization->Register(); } @@ -1576,10 +1497,10 @@ index 5aa445d2e0a6169e57c44569974d557b3baf7064..671f71979b407f0ca17c66f13805e851 } diff --git a/dom/media/systemservices/video_engine/desktop_capture_impl.cc b/dom/media/systemservices/video_engine/desktop_capture_impl.cc -index d4b40fda96ea759eb92e1351e1046a9e0b85689b..b2123a3be05b2622a5e07d5ee32752d0feaaa57f 100644 +index c43a1b3b245101c974742c5e50f54857e538bbfb..c07a568da3342cbf2af07471fa6959cb242b9a4e 100644 --- a/dom/media/systemservices/video_engine/desktop_capture_impl.cc +++ b/dom/media/systemservices/video_engine/desktop_capture_impl.cc -@@ -137,9 +137,10 @@ int32_t ScreenDeviceInfoImpl::GetOrientation(const char* aDeviceUniqueIdUTF8, +@@ -52,9 +52,10 @@ namespace webrtc { DesktopCaptureImpl* DesktopCaptureImpl::Create(const int32_t aModuleId, const char* aUniqueId, @@ -1591,30 +1512,20 @@ index d4b40fda96ea759eb92e1351e1046a9e0b85689b..b2123a3be05b2622a5e07d5ee32752d0 + aType, aCaptureCursor); } - int32_t WindowDeviceInfoImpl::Init() { -@@ -412,7 +413,7 @@ static bool UsePipewire() { + static DesktopCaptureOptions CreateDesktopCaptureOptions() { +@@ -155,8 +156,10 @@ static std::unique_ptr CreateTabCapturer( static std::unique_ptr CreateDesktopCapturerAndThread( CaptureDeviceType aDeviceType, DesktopCapturer::SourceId aSourceId, - nsIThread** aOutThread) { + nsIThread** aOutThread, bool aCaptureCursor) { DesktopCaptureOptions options = CreateDesktopCaptureOptions(); - std::unique_ptr capturer; - -@@ -462,8 +463,10 @@ static std::unique_ptr CreateDesktopCapturerAndThread( - - capturer->SelectSource(aSourceId); - -- capturer = std::make_unique(std::move(capturer), -- options); -+ if (aCaptureCursor) { -+ capturer = std::make_unique( -+ std::move(capturer), options); -+ } - } else if (aDeviceType == CaptureDeviceType::Browser) { - // XXX We don't capture cursors, so avoid the extra indirection layer. We - // could also pass null for the pMouseCursorMonitor. -@@ -480,7 +483,8 @@ static std::unique_ptr CreateDesktopCapturerAndThread( ++ if (aCaptureCursor) ++ options.set_prefer_cursor_embedded(aCaptureCursor); + auto ensureThread = [&]() { + if (*aOutThread) { + return *aOutThread; +@@ -253,7 +256,8 @@ static std::unique_ptr CreateDesktopCapturerAndThread( } DesktopCaptureImpl::DesktopCaptureImpl(const int32_t aId, const char* aUniqueId, @@ -1624,7 +1535,7 @@ index d4b40fda96ea759eb92e1351e1046a9e0b85689b..b2123a3be05b2622a5e07d5ee32752d0 : mModuleId(aId), mTrackingId(mozilla::TrackingId(CaptureEngineToTrackingSourceStr([&] { switch (aType) { -@@ -497,6 +501,7 @@ DesktopCaptureImpl::DesktopCaptureImpl(const int32_t aId, const char* aUniqueId, +@@ -270,6 +274,7 @@ DesktopCaptureImpl::DesktopCaptureImpl(const int32_t aId, const char* aUniqueId, aId)), mDeviceUniqueId(aUniqueId), mDeviceType(aType), @@ -1632,7 +1543,7 @@ index d4b40fda96ea759eb92e1351e1046a9e0b85689b..b2123a3be05b2622a5e07d5ee32752d0 mControlThread(mozilla::GetCurrentSerialEventTarget()), mNextFrameMinimumTime(Timestamp::Zero()), mCallbacks("DesktopCaptureImpl::mCallbacks") {} -@@ -521,6 +526,19 @@ void DesktopCaptureImpl::DeRegisterCaptureDataCallback( +@@ -294,6 +299,19 @@ void DesktopCaptureImpl::DeRegisterCaptureDataCallback( } } @@ -1652,7 +1563,7 @@ index d4b40fda96ea759eb92e1351e1046a9e0b85689b..b2123a3be05b2622a5e07d5ee32752d0 int32_t DesktopCaptureImpl::StopCaptureIfAllClientsClose() { { auto callbacks = mCallbacks.Lock(); -@@ -553,7 +571,7 @@ int32_t DesktopCaptureImpl::StartCapture( +@@ -333,7 +351,7 @@ int32_t DesktopCaptureImpl::StartCapture( DesktopCapturer::SourceId sourceId = std::stoi(mDeviceUniqueId); std::unique_ptr capturer = CreateDesktopCapturerAndThread( @@ -1661,7 +1572,7 @@ index d4b40fda96ea759eb92e1351e1046a9e0b85689b..b2123a3be05b2622a5e07d5ee32752d0 MOZ_ASSERT(!capturer == !mCaptureThread); if (!capturer) { -@@ -663,6 +681,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result aResult, +@@ -441,6 +459,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result aResult, frameInfo.height = aFrame->size().height(); frameInfo.videoType = VideoType::kARGB; @@ -1678,18 +1589,18 @@ index d4b40fda96ea759eb92e1351e1046a9e0b85689b..b2123a3be05b2622a5e07d5ee32752d0 frameInfo.width * frameInfo.height * DesktopFrame::kBytesPerPixel; diff --git a/dom/media/systemservices/video_engine/desktop_capture_impl.h b/dom/media/systemservices/video_engine/desktop_capture_impl.h -index 9aebaa39321839eb3beb503fc4ed33e303bb0deb..1dd75f3cdb8078b01c4d43a0ac3d8a6ea3ec47ab 100644 +index a76b7de569db1cb42728a5514fb80e5c46e0344e..3d61ad8d3aa4a7eaf96957dcd680e1e1ee8abdf4 100644 --- a/dom/media/systemservices/video_engine/desktop_capture_impl.h +++ b/dom/media/systemservices/video_engine/desktop_capture_impl.h -@@ -25,6 +25,7 @@ +@@ -26,6 +26,7 @@ + #include "api/video/video_sink_interface.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/video_capture/video_capture.h" - #include "rtc_base/synchronization/mutex.h" +#include "rtc_base/deprecated/recursive_critical_section.h" - - #include "desktop_device_info.h" - #include "MediaEngineSource.h" -@@ -45,6 +46,33 @@ namespace webrtc { + #include "mozilla/DataMutex.h" + #include "mozilla/Maybe.h" + #include "mozilla/TimeStamp.h" +@@ -42,17 +43,44 @@ namespace webrtc { class VideoCaptureEncodeInterface; @@ -1720,10 +1631,7 @@ index 9aebaa39321839eb3beb503fc4ed33e303bb0deb..1dd75f3cdb8078b01c4d43a0ac3d8a6e + int32_t capture_counter_ = 0; +}; + - // simulate deviceInfo interface for video engine, bridge screen/application and - // real screen/application device info - -@@ -160,13 +188,13 @@ class BrowserDeviceInfoImpl : public VideoCaptureModule::DeviceInfo { + // Reuses the video engine pipeline for screen sharing. // As with video, DesktopCaptureImpl is a proxy for screen sharing // and follows the video pipeline design class DesktopCaptureImpl : public DesktopCapturer::Callback, @@ -1739,7 +1647,7 @@ index 9aebaa39321839eb3beb503fc4ed33e303bb0deb..1dd75f3cdb8078b01c4d43a0ac3d8a6e [[nodiscard]] static std::shared_ptr CreateDeviceInfo(const int32_t aId, -@@ -180,6 +208,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback, +@@ -66,6 +94,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback, void DeRegisterCaptureDataCallback( rtc::VideoSinkInterface* aCallback) override; int32_t StopCaptureIfAllClientsClose() override; @@ -1748,7 +1656,7 @@ index 9aebaa39321839eb3beb503fc4ed33e303bb0deb..1dd75f3cdb8078b01c4d43a0ac3d8a6e int32_t SetCaptureRotation(VideoRotation aRotation) override; bool SetApplyRotation(bool aEnable) override; -@@ -203,7 +233,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback, +@@ -89,7 +119,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback, protected: DesktopCaptureImpl(const int32_t aId, const char* aUniqueId, @@ -1758,9 +1666,9 @@ index 9aebaa39321839eb3beb503fc4ed33e303bb0deb..1dd75f3cdb8078b01c4d43a0ac3d8a6e virtual ~DesktopCaptureImpl(); private: -@@ -211,6 +242,9 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback, - static constexpr uint32_t kMaxDesktopCaptureCpuUsage = 50; +@@ -98,6 +129,9 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback, void InitOnThread(std::unique_ptr aCapturer, int aFramerate); + void UpdateOnThread(int aFramerate); void ShutdownOnThread(); + + rtc::RecursiveCriticalSection mApiCs; @@ -1768,7 +1676,7 @@ index 9aebaa39321839eb3beb503fc4ed33e303bb0deb..1dd75f3cdb8078b01c4d43a0ac3d8a6e // DesktopCapturer::Callback interface. void OnCaptureResult(DesktopCapturer::Result aResult, std::unique_ptr aFrame) override; -@@ -218,6 +252,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback, +@@ -105,6 +139,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback, // Notifies all mCallbacks of OnFrame(). mCaptureThread only. void NotifyOnFrame(const VideoFrame& aFrame); @@ -1822,10 +1730,10 @@ index 3b39538e51840cd9b1685b2efd2ff2e9ec83608a..c7bf4f2d53b58bbacb22b3ebebf6f3fc return aGlobalOrNull; diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp -index ff2e907c0d8fc05c6e39fae612eceed405b62712..40ec25b5588a1628f9d9bd16886bed83dad49b90 100644 +index 17a205b2607208a696a470f81223c4d2618e6bec..90dc5c04f395a3e7c98cc6eff146aa78dc03d1cf 100644 --- a/dom/security/nsCSPUtils.cpp +++ b/dom/security/nsCSPUtils.cpp -@@ -22,6 +22,7 @@ +@@ -23,6 +23,7 @@ #include "nsSandboxFlags.h" #include "nsServiceManagerUtils.h" #include "nsWhitespaceTokenizer.h" @@ -1833,7 +1741,7 @@ index ff2e907c0d8fc05c6e39fae612eceed405b62712..40ec25b5588a1628f9d9bd16886bed83 #include "mozilla/Assertions.h" #include "mozilla/Components.h" -@@ -133,6 +134,11 @@ void CSP_ApplyMetaCSPToDoc(mozilla::dom::Document& aDoc, +@@ -134,6 +135,11 @@ void CSP_ApplyMetaCSPToDoc(mozilla::dom::Document& aDoc, return; } @@ -1869,10 +1777,10 @@ index 2f71b284ee5f7e11f117c447834b48355784448c..2640bd57123c2b03bf4b06a2419cd020 * returned quads are further translated relative to the window * origin -- which is not the layout origin. Further translation diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp -index 1ba2051ed316956a5a71f85ed5fa0735d54716e5..c0d6f45ce14040a79cfe134a4f8254434a4c53cc 100644 +index be23f9f192208c30849ff640ab67debdef3f3ca6..6c14aa9dd751f20838c915b5a0a3d66f13f9dcc5 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp -@@ -1007,7 +1007,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) { +@@ -1005,7 +1005,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) { AssertIsOnMainThread(); nsTArray languages; @@ -1881,7 +1789,7 @@ index 1ba2051ed316956a5a71f85ed5fa0735d54716e5..c0d6f45ce14040a79cfe134a4f825443 RuntimeService* runtime = RuntimeService::GetService(); if (runtime) { -@@ -1194,8 +1194,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) { +@@ -1191,8 +1191,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) { } // The navigator overridden properties should have already been read. @@ -1891,7 +1799,7 @@ index 1ba2051ed316956a5a71f85ed5fa0735d54716e5..c0d6f45ce14040a79cfe134a4f825443 mNavigatorPropertiesLoaded = true; } -@@ -1817,6 +1816,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted( +@@ -1813,6 +1812,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted( } } @@ -1905,7 +1813,7 @@ index 1ba2051ed316956a5a71f85ed5fa0735d54716e5..c0d6f45ce14040a79cfe134a4f825443 template void RuntimeService::BroadcastAllWorkers(const Func& aFunc) { AssertIsOnMainThread(); -@@ -2342,6 +2348,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers( +@@ -2338,6 +2344,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers( } } @@ -1947,10 +1855,10 @@ index 58894a8361c7ef1dddd481ca5877a209a8b8ff5c..c481d40d79b6397b7f1d571bd9f6ae5c bool IsWorkerGlobal(JSObject* global); diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp -index 2b48cc2980165ce51ded62faef96b93b781ede32..d8dc90983353c2f5cc1db56e327c4533d524cc1d 100644 +index ee89a9ffbe33754bd41643555a621ca6f62e5465..9d9ec1aac7858129ad5adef62ab359d1ea667082 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp -@@ -700,6 +700,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable { +@@ -718,6 +718,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable { } }; @@ -1969,7 +1877,7 @@ index 2b48cc2980165ce51ded62faef96b93b781ede32..d8dc90983353c2f5cc1db56e327c4533 class UpdateLanguagesRunnable final : public WorkerThreadRunnable { nsTArray mLanguages; -@@ -2113,6 +2125,16 @@ void WorkerPrivate::UpdateContextOptions( +@@ -2131,6 +2143,16 @@ void WorkerPrivate::UpdateContextOptions( } } @@ -1986,7 +1894,7 @@ index 2b48cc2980165ce51ded62faef96b93b781ede32..d8dc90983353c2f5cc1db56e327c4533 void WorkerPrivate::UpdateLanguages(const nsTArray& aLanguages) { AssertIsOnParentThread(); -@@ -5740,6 +5762,15 @@ void WorkerPrivate::UpdateContextOptionsInternal( +@@ -5768,6 +5790,15 @@ void WorkerPrivate::UpdateContextOptionsInternal( } } @@ -2003,10 +1911,10 @@ index 2b48cc2980165ce51ded62faef96b93b781ede32..d8dc90983353c2f5cc1db56e327c4533 const nsTArray& aLanguages) { WorkerGlobalScope* globalScope = GlobalScope(); diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h -index da25a495a8930f7b88958553164d86fe2869416f..38f92829438ead78d73d96ee48a3fcab46c337d7 100644 +index 8ca40304e014da2e6898f71ac214f7ca1ab19e87..e0179f6db7fdc679f104bf180c181ab1ac85b4ad 100644 --- a/dom/workers/WorkerPrivate.h +++ b/dom/workers/WorkerPrivate.h -@@ -432,6 +432,8 @@ class WorkerPrivate final +@@ -433,6 +433,8 @@ class WorkerPrivate final void UpdateContextOptionsInternal(JSContext* aCx, const JS::ContextOptions& aContextOptions); @@ -2015,7 +1923,7 @@ index da25a495a8930f7b88958553164d86fe2869416f..38f92829438ead78d73d96ee48a3fcab void UpdateLanguagesInternal(const nsTArray& aLanguages); void UpdateJSWorkerMemoryParameterInternal(JSContext* aCx, JSGCParamKey key, -@@ -1069,6 +1071,8 @@ class WorkerPrivate final +@@ -1070,6 +1072,8 @@ class WorkerPrivate final void UpdateContextOptions(const JS::ContextOptions& aContextOptions); @@ -2077,10 +1985,10 @@ index 523e84c8c93f4221701f90f2e8ee146ec8e1adbd..98d5b1176e5378431b859a2dbd4d4e77 inline ClippedTime TimeClip(double time); diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp -index 6ca6c31830066f9677988daca8566e93a8335c26..3f963dbf6127c997810e380802e56b023b5db4c8 100644 +index 880e716c24464c93283410417f8e69d6d233d105..6e046fbd2e643dace5ad7796740253df3ddf2cbe 100644 --- a/js/src/debugger/Object.cpp +++ b/js/src/debugger/Object.cpp -@@ -2468,7 +2468,11 @@ Maybe DebuggerObject::call(JSContext* cx, +@@ -2474,7 +2474,11 @@ Maybe DebuggerObject::call(JSContext* cx, invokeArgs[i].set(args2[i]); } @@ -2247,10 +2155,10 @@ index 0ec6ee3eb37c6493d8a25352fd0e54e1927bceab..885dba71bc5815e5f6f3ec2700c376aa // No boxes to return return; diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp -index 2cc3c5673e246ac38cdaddb457ce36ee4c7356ce..61093cd52fc049ad77d84dd837731071fdace69d 100644 +index 27fd20e845af4c96cd1798debba57422872fab66..bcd1351884fb6de8f04062283dc677e057ada988 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp -@@ -11163,7 +11163,9 @@ bool PresShell::ComputeActiveness() const { +@@ -11194,7 +11194,9 @@ bool PresShell::ComputeActiveness() const { if (!browserChild->IsVisible()) { MOZ_LOG(gLog, LogLevel::Debug, (" > BrowserChild %p is not visible", browserChild)); @@ -2262,10 +2170,10 @@ index 2cc3c5673e246ac38cdaddb457ce36ee4c7356ce..61093cd52fc049ad77d84dd837731071 // If the browser is visible but just due to be preserving layers diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp -index d8995d6d94f5861d8ed839613768eb269b44e362..b946de49a0ecab449a9d1aff24c38f69a431eec0 100644 +index 43d7e5008b352b7deb198ffc81fedf5de3f4b72a..c62d9f87a84c01994ad735146491219ef4f0e42e 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp -@@ -698,6 +698,10 @@ bool nsLayoutUtils::AllowZoomingForDocument( +@@ -699,6 +699,10 @@ bool nsLayoutUtils::AllowZoomingForDocument( !aDocument->GetPresShell()->AsyncPanZoomEnabled()) { return false; } @@ -2276,7 +2184,7 @@ index d8995d6d94f5861d8ed839613768eb269b44e362..b946de49a0ecab449a9d1aff24c38f69 // True if we allow zooming for all documents on this platform, or if we are // in RDM. BrowsingContext* bc = aDocument->GetBrowsingContext(); -@@ -9768,6 +9772,9 @@ void nsLayoutUtils::ComputeSystemFont(nsFont* aSystemFont, +@@ -9645,6 +9649,9 @@ void nsLayoutUtils::ComputeSystemFont(nsFont* aSystemFont, /* static */ bool nsLayoutUtils::ShouldHandleMetaViewport(const Document* aDocument) { @@ -2287,10 +2195,10 @@ index d8995d6d94f5861d8ed839613768eb269b44e362..b946de49a0ecab449a9d1aff24c38f69 return StaticPrefs::dom_meta_viewport_enabled() || (bc && bc->InRDMPane()); } diff --git a/layout/style/GeckoBindings.h b/layout/style/GeckoBindings.h -index c18d38d8ad2f80bb0d3512d1a9ae965c594bb356..22736c86eb5e3d0a44563c312e34032c157f3abe 100644 +index acb5b24776c8591933d1abcbcc7b254cf2ceb4e4..191ddd1f43bd704294727555c3d5137d69c1460c 100644 --- a/layout/style/GeckoBindings.h +++ b/layout/style/GeckoBindings.h -@@ -595,6 +595,7 @@ float Gecko_MediaFeatures_GetResolution(const mozilla::dom::Document*); +@@ -593,6 +593,7 @@ float Gecko_MediaFeatures_GetResolution(const mozilla::dom::Document*); bool Gecko_MediaFeatures_PrefersReducedMotion(const mozilla::dom::Document*); bool Gecko_MediaFeatures_PrefersReducedTransparency( const mozilla::dom::Document*); @@ -2299,10 +2207,10 @@ index c18d38d8ad2f80bb0d3512d1a9ae965c594bb356..22736c86eb5e3d0a44563c312e34032c const mozilla::dom::Document*); mozilla::StylePrefersColorScheme Gecko_MediaFeatures_PrefersColorScheme( diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp -index cc86d1abf6ccfe48530607c41cd675612cbe5582..8cce20c719fee8a0480ae6ea1fd53c6639d0bd7b 100644 +index 94f01a53378c67b78346cf13f43431d9a5d104d9..4861de461648699360ed8c0453126c6c80587745 100644 --- a/layout/style/nsMediaFeatures.cpp +++ b/layout/style/nsMediaFeatures.cpp -@@ -260,11 +260,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) { +@@ -265,11 +265,7 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) { } bool Gecko_MediaFeatures_PrefersReducedMotion(const Document* aDocument) { @@ -2312,28 +2220,24 @@ index cc86d1abf6ccfe48530607c41cd675612cbe5582..8cce20c719fee8a0480ae6ea1fd53c66 - } - return LookAndFeel::GetInt(LookAndFeel::IntID::PrefersReducedMotion, 0) == 1; + return aDocument->PrefersReducedMotion(); -+} -+ -+bool Gecko_MediaFeatures_ForcedColors(const Document* aDocument) { -+ return aDocument->ForcedColors(); } bool Gecko_MediaFeatures_PrefersReducedTransparency(const Document* aDocument) { diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp -index 21d5a5e1b4193d058c30268ab73c8d595436b381..11b960ec0ff3ea77857cb915d05bbdbb6772bb37 100644 +index 283e991f921f877ddfc6b15e8dbe08f92bf3342b..7d08aa7fa4a40255a93c617fc2cc99d6b3f666d6 100644 --- a/netwerk/base/LoadInfo.cpp +++ b/netwerk/base/LoadInfo.cpp -@@ -693,7 +693,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs) - mHasInjectedCookieForCookieBannerHandling( +@@ -694,7 +694,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs) rhs.mHasInjectedCookieForCookieBannerHandling), mWasSchemelessInput(rhs.mWasSchemelessInput), -- mHttpsUpgradeTelemetry(rhs.mHttpsUpgradeTelemetry) { -+ mHttpsUpgradeTelemetry(rhs.mHttpsUpgradeTelemetry), + mHttpsUpgradeTelemetry(rhs.mHttpsUpgradeTelemetry), +- mIsNewWindowTarget(rhs.mIsNewWindowTarget) { ++ mIsNewWindowTarget(rhs.mIsNewWindowTarget), + mJugglerLoadIdentifier(rhs.mJugglerLoadIdentifier) { } LoadInfo::LoadInfo( -@@ -2461,4 +2462,16 @@ LoadInfo::SetHttpsUpgradeTelemetry( +@@ -2488,4 +2489,16 @@ LoadInfo::SetSkipHTTPSUpgrade(bool aSkipHTTPSUpgrade) { return NS_OK; } @@ -2351,26 +2255,29 @@ index 21d5a5e1b4193d058c30268ab73c8d595436b381..11b960ec0ff3ea77857cb915d05bbdbb + } // namespace mozilla::net diff --git a/netwerk/base/LoadInfo.h b/netwerk/base/LoadInfo.h -index 6ba1d8e11efbbf75f4a44d4977587429ad1371f8..d834f1f5528264f59c4547f00825e0a3b433d9dd 100644 +index 0598c9703fdd0f8f71cc9d88ade4c8bc8b241af6..bfb71b848104c7df0c3784a95801a87d5f9cc20b 100644 --- a/netwerk/base/LoadInfo.h +++ b/netwerk/base/LoadInfo.h -@@ -413,9 +413,10 @@ class LoadInfo final : public nsILoadInfo { +@@ -413,12 +413,13 @@ class LoadInfo final : public nsILoadInfo { bool mHasInjectedCookieForCookieBannerHandling = false; bool mWasSchemelessInput = false; - nsILoadInfo::HTTPSUpgradeTelemetryType mHttpsUpgradeTelemetry = nsILoadInfo::NOT_INITIALIZED; + + bool mIsNewWindowTarget = false; + bool mSkipHTTPSUpgrade = false; + + uint64_t mJugglerLoadIdentifier = 0; }; // This is exposed solely for testing purposes and should not be used outside of diff --git a/netwerk/base/TRRLoadInfo.cpp b/netwerk/base/TRRLoadInfo.cpp -index 9dc2bb0da6871b905abd17d931e555429977c6c2..b71cf6393492346f16417b3ba745a235a483be22 100644 +index d1aad5d3a3863f62b17ebb01d9d6dc02c5dbcf71..8b3640504c877fccd75d523dc45c3a1c812f4ceb 100644 --- a/netwerk/base/TRRLoadInfo.cpp +++ b/netwerk/base/TRRLoadInfo.cpp -@@ -903,5 +903,15 @@ TRRLoadInfo::SetHttpsUpgradeTelemetry( +@@ -923,5 +923,15 @@ TRRLoadInfo::SetSkipHTTPSUpgrade(bool aSkipHTTPSUpgrade) { return NS_ERROR_NOT_IMPLEMENTED; } @@ -2387,13 +2294,14 @@ index 9dc2bb0da6871b905abd17d931e555429977c6c2..b71cf6393492346f16417b3ba745a235 } // namespace net } // namespace mozilla diff --git a/netwerk/base/nsILoadInfo.idl b/netwerk/base/nsILoadInfo.idl -index daccd1dc75fb1f6ba88c8f734e10c14cbdbffe8f..9621ca5dc05f12a8d81da787fa479fe03ea99e4c 100644 +index afe180f91f6b4921408955db499fcb47f1da509f..89e9dd69dccd3bff11076595244e106a06d80de1 100644 --- a/netwerk/base/nsILoadInfo.idl +++ b/netwerk/base/nsILoadInfo.idl -@@ -1590,4 +1590,5 @@ interface nsILoadInfo : nsISupports +@@ -1600,4 +1600,6 @@ interface nsILoadInfo : nsISupports + * When true, this load will never be upgraded to HTTPS. */ - [infallible] attribute nsILoadInfo_HTTPSUpgradeTelemetryType httpsUpgradeTelemetry; - + [infallible] attribute boolean skipHTTPSUpgrade; ++ + [infallible] attribute unsigned long long jugglerLoadIdentifier; }; diff --git a/netwerk/base/nsINetworkInterceptController.idl b/netwerk/base/nsINetworkInterceptController.idl @@ -2409,10 +2317,10 @@ index 7f91d2df6f8bb4020c75c132dc8f6bf26625fa1e..ba6569f4be8fc54ec96ee44d5de45a09 /** * Set the status and reason for the forthcoming synthesized response. diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp -index ef946929c9bbd7903c8e3b32bcb373d5096aed52..a2814c5c891e2877aca9fdb4698385282b8743a9 100644 +index 82c6137d8c52c8fd2ba3542d6f7a645ad1e73f11..5f31e5e1c9cb44d49ac61b6f6bda0189424c2685 100644 --- a/netwerk/ipc/DocumentLoadListener.cpp +++ b/netwerk/ipc/DocumentLoadListener.cpp -@@ -171,6 +171,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext, +@@ -172,6 +172,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext, loadInfo->SetTextDirectiveUserActivation( aLoadState->GetTextDirectiveUserActivation()); loadInfo->SetIsMetaRefresh(aLoadState->IsMetaRefresh()); @@ -2459,10 +2367,10 @@ index e81a4538fd45c13aa60d933de5f4f32ce69fb5f2..d7945f81295c497485a09696f06ce041 if (mPump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) { mPump->PeekStream(CallTypeSniffers, static_cast(this)); diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp -index 071ed8da4135102b0b1fedce32326bdc0657c3fd..063b516001a674b558046f9191f08352eb671801 100644 +index d05b06c3f9ddba3b40d5969730474eaf0d843cb1..9b2cc35c504e1044ac681c62c107f8feb6c16938 100644 --- a/parser/html/nsHtml5TreeOpExecutor.cpp +++ b/parser/html/nsHtml5TreeOpExecutor.cpp -@@ -1391,6 +1391,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta( +@@ -1334,6 +1334,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta( void nsHtml5TreeOpExecutor::AddSpeculationCSP(const nsAString& aCSP) { NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); @@ -2547,10 +2455,10 @@ index 6dfd07d6b676a99993408921de8dea9d561f201d..e3c6794363cd6336effbeac83a179f37 readonly attribute boolean securityCheckDisabled; }; diff --git a/services/settings/Utils.sys.mjs b/services/settings/Utils.sys.mjs -index 73c83e526be1a3a252f995d0718e3975d50bffa7..db5977c54221e19e107a8325a0834302c2e84546 100644 +index 12fef6cde815a9301944c399a58f27a7e4c4d5d7..0f7f06d1002a089547d1b15d7d8ddf264f28b529 100644 --- a/services/settings/Utils.sys.mjs +++ b/services/settings/Utils.sys.mjs -@@ -95,7 +95,7 @@ function _isUndefined(value) { +@@ -97,7 +97,7 @@ const _cdnURLs = {}; export var Utils = { get SERVER_URL() { @@ -2559,7 +2467,7 @@ index 73c83e526be1a3a252f995d0718e3975d50bffa7..db5977c54221e19e107a8325a0834302 ? lazy.gServerURL : AppConstants.REMOTE_SETTINGS_SERVER_URL; }, -@@ -108,6 +108,9 @@ export var Utils = { +@@ -110,6 +110,9 @@ export var Utils = { log, get shouldSkipRemoteActivityDueToTests() { @@ -2569,30 +2477,6 @@ index 73c83e526be1a3a252f995d0718e3975d50bffa7..db5977c54221e19e107a8325a0834302 return ( (lazy.isRunningTests || Cu.isInAutomation) && this.SERVER_URL == "data:,#remote-settings-dummy/v1" -diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs -index df1c5e464b845b6a8bfedadb86d0e7aab7fd3ffc..34451e791bb59f635134de702d9e5f641fe8df79 100644 ---- a/servo/components/style/gecko/media_features.rs -+++ b/servo/components/style/gecko/media_features.rs -@@ -303,10 +303,16 @@ impl ForcedColors { - - /// https://drafts.csswg.org/mediaqueries-5/#forced-colors - fn eval_forced_colors(context: &Context, query_value: Option) -> bool { -- let forced = context.device().forced_colors(); -+ let prefers_forced_colors = -+ unsafe { bindings::Gecko_MediaFeatures_ForcedColors(context.device().document()) }; -+ let query_value = match query_value { -+ Some(v) => v, -+ None => return prefers_forced_colors, -+ }; - match query_value { -- Some(query_value) => query_value == forced, -- None => forced != ForcedColors::None, -+ ForcedColors::Active => prefers_forced_colors, -+ ForcedColors::Requested => prefers_forced_colors, -+ ForcedColors::None => !prefers_forced_colors, - } - } - diff --git a/toolkit/components/browser/nsIWebBrowserChrome.idl b/toolkit/components/browser/nsIWebBrowserChrome.idl index 75555352b8a15a50e4a21e34fc8ede4e9246c7cc..72855a404effa42b6c55cd0c2fcb8bdd6c2b3f9f 100644 --- a/toolkit/components/browser/nsIWebBrowserChrome.idl @@ -2625,10 +2509,10 @@ index 00a5381133f8cec0de452c31c7151801a1acc0b9..5d3e3d6f566dc724f257beaeb994ceda if (provider.failed) { diff --git a/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp b/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp -index 6a40d032449e780bfeb77934ba141317b94e7189..1468d38355058b985f18613bd6e3bc84086fae40 100644 +index 3aeddf503de749ecd2d87cac2e8185db0ae265d5..85f5f06ca3beee0b4aa6c51551bbe5a4390ed0df 100644 --- a/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp +++ b/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp -@@ -553,7 +553,7 @@ void PopulateLanguages() { +@@ -487,7 +487,7 @@ void PopulateLanguages() { // sufficient to only collect this information as the other properties are // just reformats of Navigator::GetAcceptLanguages. nsTArray languages; @@ -2638,10 +2522,10 @@ index 6a40d032449e780bfeb77934ba141317b94e7189..1468d38355058b985f18613bd6e3bc84 for (const auto& language : languages) { diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp -index 3314cb813f6ceb67096eeda0864ad3b16c0616cb..5aac63649e186d624a9905a5d16513f8353f5515 100644 +index 76d85f007ba2198921f9deccfa91efc185af183b..689f0656debc6e50078828bde830c357cc7efaec 100644 --- a/toolkit/components/startup/nsAppStartup.cpp +++ b/toolkit/components/startup/nsAppStartup.cpp -@@ -371,7 +371,7 @@ nsAppStartup::Quit(uint32_t aMode, int aExitCode, bool* aUserAllowedQuit) { +@@ -365,7 +365,7 @@ nsAppStartup::Quit(uint32_t aMode, int aExitCode, bool* aUserAllowedQuit) { nsCOMPtr windowEnumerator; nsCOMPtr mediator( do_GetService(NS_WINDOWMEDIATOR_CONTRACTID)); @@ -2666,10 +2550,10 @@ index 654903fadb709be976b72f36f155e23bc0622152..815b3dc24c9fda6b1db6c4666ac68904 int32_t aMaxSelfProgress, int32_t aCurTotalProgress, diff --git a/toolkit/components/windowwatcher/nsWindowWatcher.cpp b/toolkit/components/windowwatcher/nsWindowWatcher.cpp -index e3f616c4efd5d7e10ed372afa4b5c4d2d93e6a67..abb7772184c9baf23025c1577d1284b6ed1959fb 100644 +index 585a957fd8a1467dc262bd1ca2058584fd8762c9..16ad38c3b7d753c386e091af700d1bebd4c59e3e 100644 --- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp +++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp -@@ -1881,7 +1881,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent( +@@ -1875,7 +1875,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent( // Open a minimal popup. *aIsPopupRequested = true; @@ -2683,10 +2567,10 @@ index e3f616c4efd5d7e10ed372afa4b5c4d2d93e6a67..abb7772184c9baf23025c1577d1284b6 /** diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs -index 6c2b400952492266a184c96b4a1ce71e87df7ffe..6e1fb4f59b6a6d70100e1eb1d15c937d8480988a 100644 +index f7a6f11d510b895869673f842f29d9de9e433766..5be30f341b01acfe496a3178bef3f79282d5dfeb 100644 --- a/toolkit/mozapps/update/UpdateService.sys.mjs +++ b/toolkit/mozapps/update/UpdateService.sys.mjs -@@ -3894,6 +3894,8 @@ export class UpdateService { +@@ -3895,6 +3895,8 @@ export class UpdateService { } get disabledForTesting() { @@ -2707,6 +2591,22 @@ index f42ed17a4a75689ae9c8e769d7b6e2c3f654b8ee..5af0877335339407160dd7d10b89bd3d "/toolkit/components/telemetry/tests/marionette", ] +diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp +index 318ee7e293b917534128d2c0fa631ecf369b5119..6049f5a260153f963710f45e6fd2345521e1180b 100644 +--- a/toolkit/xre/nsAppRunner.cpp ++++ b/toolkit/xre/nsAppRunner.cpp +@@ -5640,7 +5640,10 @@ nsresult XREMain::XRE_mainRun() { + + if (!AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownConfirmed)) { + #ifdef XP_MACOSX +- if (!BackgroundTasks::IsBackgroundTaskMode()) { ++# if defined(MOZ_BACKGROUNDTASKS) ++ if (!BackgroundTasks::IsBackgroundTaskMode()) ++# endif // defined(MOZ_BACKGROUNDTASKS) ++ { + rv = appStartup->CreateHiddenWindow(); + NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); + } diff --git a/toolkit/xre/nsWindowsWMain.cpp b/toolkit/xre/nsWindowsWMain.cpp index 7eb9e1104682d4eb47060654f43a1efa8b2a6bb2..a8315d6decf654b5302bea5beeea34140c300ded 100644 --- a/toolkit/xre/nsWindowsWMain.cpp @@ -2743,10 +2643,10 @@ index 7eb9e1104682d4eb47060654f43a1efa8b2a6bb2..a8315d6decf654b5302bea5beeea3414 // Only run this code if LauncherProcessWin.h was included beforehand, thus // signalling that the hosting process should support launcher mode. diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp -index fe72a2715da8846146377e719559c16e6ef1f7ff..a5959143bac8f62ee359fa3883a844f3fe541685 100644 +index 01ca680039edcc9f56900a40e0a94cb77a367383..36f3f9a13bc0e3da3285a7a14c824c1bad9a0799 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp -@@ -813,6 +813,12 @@ void nsDocLoader::DocLoaderIsEmpty(bool aFlushLayout, +@@ -812,6 +812,12 @@ void nsDocLoader::DocLoaderIsEmpty(bool aFlushLayout, ("DocLoader:%p: Firing load event for document.open\n", this)); @@ -2760,7 +2660,7 @@ index fe72a2715da8846146377e719559c16e6ef1f7ff..a5959143bac8f62ee359fa3883a844f3 // nsDocumentViewer::LoadComplete that doesn't do various things // that are not relevant here because this wasn't an actual diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp -index 139a43a1780dac34a6d8b135accac9cf39beef3f..2a855c3ae87e4e5a431cb1547cda0ee88490ca33 100644 +index 2c27ae5c68810557ab4b60efd4b4893433dff77d..29b1916903da6eebdbc38f987fda0d947c31e872 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -112,6 +112,7 @@ @@ -2771,7 +2671,7 @@ index 139a43a1780dac34a6d8b135accac9cf39beef3f..2a855c3ae87e4e5a431cb1547cda0ee8 #include "mozilla/Preferences.h" #include "mozilla/ipc/URIUtils.h" -@@ -872,6 +873,12 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension( +@@ -864,6 +865,12 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension( return NS_OK; } @@ -2784,7 +2684,7 @@ index 139a43a1780dac34a6d8b135accac9cf39beef3f..2a855c3ae87e4e5a431cb1547cda0ee8 nsresult nsExternalHelperAppService::GetFileTokenForPath( const char16_t* aPlatformAppPath, nsIFile** aFile) { nsDependentString platformAppPath(aPlatformAppPath); -@@ -1494,7 +1501,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) { +@@ -1485,7 +1492,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) { // Strip off the ".part" from mTempLeafName mTempLeafName.Truncate(mTempLeafName.Length() - ArrayLength(".part") + 1); @@ -2797,7 +2697,7 @@ index 139a43a1780dac34a6d8b135accac9cf39beef3f..2a855c3ae87e4e5a431cb1547cda0ee8 mSaver = do_CreateInstance(NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); -@@ -1683,7 +1695,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) { +@@ -1671,7 +1683,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) { return NS_OK; } @@ -2835,7 +2735,7 @@ index 139a43a1780dac34a6d8b135accac9cf39beef3f..2a855c3ae87e4e5a431cb1547cda0ee8 if (NS_FAILED(rv)) { nsresult transferError = rv; -@@ -1744,6 +1785,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) { +@@ -1732,6 +1773,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) { bool alwaysAsk = true; mMimeInfo->GetAlwaysAskBeforeHandling(&alwaysAsk); @@ -2845,7 +2745,7 @@ index 139a43a1780dac34a6d8b135accac9cf39beef3f..2a855c3ae87e4e5a431cb1547cda0ee8 if (alwaysAsk) { // But we *don't* ask if this mimeInfo didn't come from // our user configuration datastore and the user has said -@@ -2260,6 +2304,16 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver, +@@ -2248,6 +2292,16 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver, NotifyTransfer(aStatus); } @@ -2862,7 +2762,7 @@ index 139a43a1780dac34a6d8b135accac9cf39beef3f..2a855c3ae87e4e5a431cb1547cda0ee8 return NS_OK; } -@@ -2743,6 +2797,15 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) { +@@ -2731,6 +2785,15 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) { } } @@ -2879,7 +2779,7 @@ index 139a43a1780dac34a6d8b135accac9cf39beef3f..2a855c3ae87e4e5a431cb1547cda0ee8 // OnStartRequest) mDialog = nullptr; diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h -index e880b90b2df85fb3b1ab3ba8d2fc181b824e2272..dbadd74dea9b245d68da3b2856e16b7b98c655d0 100644 +index 2dd4ff87bda3e0ba395cca168c42b37db1713ddf..83e8a3d328e325b3f50f593c9ea71692f9c7d401 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.h +++ b/uriloader/exthandler/nsExternalHelperAppService.h @@ -258,6 +258,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService, @@ -2891,7 +2791,7 @@ index e880b90b2df85fb3b1ab3ba8d2fc181b824e2272..dbadd74dea9b245d68da3b2856e16b7b }; /** -@@ -463,6 +465,9 @@ class nsExternalAppHandler final : public nsIStreamListener, +@@ -455,6 +457,9 @@ class nsExternalAppHandler final : public nsIStreamListener, * Upon successful return, both mTempFile and mSaver will be valid. */ nsresult SetUpTempFile(nsIChannel* aChannel); @@ -2973,10 +2873,10 @@ index 1c25e9d9a101233f71e92288a0f93125b81ac1c5..22cf67b0f6e3ddd2b3ed725a314ba6a9 } #endif diff --git a/widget/MouseEvents.h b/widget/MouseEvents.h -index 3d469853bbd30c433ee7b6d2be7175caa568196e..214b92f0a8913fb6667b7554410d4cd58c53cad3 100644 +index 413b3f00a9659a8d0760745a006bc72b3e4de846..3d26a1c5c1c9ff1feea698165085ae1a88517f86 100644 --- a/widget/MouseEvents.h +++ b/widget/MouseEvents.h -@@ -327,6 +327,9 @@ class WidgetMouseEvent : public WidgetMouseEventBase, +@@ -363,6 +363,9 @@ class WidgetMouseEvent : public WidgetMouseEventBase, // Otherwise, this must be 0. uint32_t mClickCount = 0; @@ -2986,14 +2886,14 @@ index 3d469853bbd30c433ee7b6d2be7175caa568196e..214b92f0a8913fb6667b7554410d4cd5 // Whether the event should ignore scroll frame bounds during dispatch. bool mIgnoreRootScrollFrame = false; -@@ -341,6 +344,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, +@@ -386,6 +389,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, mContextMenuTrigger = aEvent.mContextMenuTrigger; mExitFrom = aEvent.mExitFrom; mClickCount = aEvent.mClickCount; + mJugglerEventId = aEvent.mJugglerEventId; mIgnoreRootScrollFrame = aEvent.mIgnoreRootScrollFrame; + mIgnoreCapturingContent = aEvent.mIgnoreCapturingContent; mClickEventPrevented = aEvent.mClickEventPrevented; - } diff --git a/widget/cocoa/NativeKeyBindings.mm b/widget/cocoa/NativeKeyBindings.mm index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce8050630a1aa 100644 --- a/widget/cocoa/NativeKeyBindings.mm @@ -3057,6 +2957,30 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805 break; } if (aEvent.IsMeta()) { +diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp +index 6f5b0ba67b59635256d444f6b56be656c0caac04..90815bb3d3ed2801fc2eba16db168f454dad9d67 100644 +--- a/widget/gtk/nsFilePicker.cpp ++++ b/widget/gtk/nsFilePicker.cpp +@@ -21,6 +21,7 @@ + #include "mozilla/Components.h" + #include "mozilla/Preferences.h" + #include "mozilla/dom/Promise.h" ++#include "gfxPlatform.h" + + #include "nsArrayEnumerator.h" + #include "nsEnumeratorUtils.h" +@@ -421,6 +422,11 @@ nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { + return NS_OK; + } + ++ // Don't attempt to open a real file-picker in headless mode. ++ if (gfxPlatform::IsHeadless()) { ++ return NS_ERROR_NOT_AVAILABLE; ++ } ++ + NS_ConvertUTF16toUTF8 title(mTitle); + + GtkWindow* parent_widget = diff --git a/widget/headless/HeadlessCompositorWidget.cpp b/widget/headless/HeadlessCompositorWidget.cpp index bb4ee9175e66dc40de1871a7f91368fe309494a3..747625e3869882300bfbc18b184db5151dd90c1a 100644 --- a/widget/headless/HeadlessCompositorWidget.cpp @@ -3249,10 +3173,10 @@ index 9856991ef32f25f51942f8cd664a09bec2192c70..948947a421179e91c51005aeb83ed0d1 ~HeadlessWidget(); bool mEnabled; diff --git a/widget/nsGUIEventIPC.h b/widget/nsGUIEventIPC.h -index 02775a7f27f5697bc33872d997198ce305556970..6c1ae0e371ee012ef47c8e9c74f949da05ad0025 100644 +index cfededb82aa739c38f028bcaea0f3fa39d74f663..d3469a594f9e3b210d230c914de91da4cf9eff82 100644 --- a/widget/nsGUIEventIPC.h +++ b/widget/nsGUIEventIPC.h -@@ -234,6 +234,7 @@ struct ParamTraits { +@@ -244,6 +244,7 @@ struct ParamTraits { aParam.mExitFrom.value())); } WriteParam(aWriter, aParam.mClickCount); @@ -3260,7 +3184,7 @@ index 02775a7f27f5697bc33872d997198ce305556970..6c1ae0e371ee012ef47c8e9c74f949da } static bool Read(MessageReader* aReader, paramType* aResult) { -@@ -258,6 +259,7 @@ struct ParamTraits { +@@ -268,6 +269,7 @@ struct ParamTraits { aResult->mExitFrom = Some(static_cast(exitFrom)); } rv = rv && ReadParam(aReader, &aResult->mClickCount); diff --git a/browser_patches/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.sh index 3fb94ec302..bfca024bd6 100644 --- a/browser_patches/webkit/UPSTREAM_CONFIG.sh +++ b/browser_patches/webkit/UPSTREAM_CONFIG.sh @@ -1,3 +1,3 @@ REMOTE_URL="https://github.com/WebKit/WebKit.git" BASE_BRANCH="main" -BASE_REVISION="8ceb1da47e75a488ae4c12017a861636904acd4f" +BASE_REVISION="76c95d6131edd36775a5eac01e297926fc974be8" diff --git a/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m b/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m index f9708d364d..b4d08b700a 100644 --- a/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m +++ b/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m @@ -33,6 +33,7 @@ #import #import #import +#import #import #import #import @@ -240,6 +241,8 @@ const NSActivityOptions ActivityOptions = configuration.preferences._hiddenPageDOMTimerThrottlingAutoIncreases = NO; configuration.preferences._pageVisibilityBasedProcessSuppressionEnabled = NO; configuration.preferences._domTimersThrottlingEnabled = NO; + // Do not auto play audio and video with sound. + configuration.defaultWebpagePreferences._autoplayPolicy = _WKWebsiteAutoplayPolicyAllowWithoutSound; _WKProcessPoolConfiguration *processConfiguration = [[[_WKProcessPoolConfiguration alloc] init] autorelease]; processConfiguration.forceOverlayScrollbars = YES; configuration.processPool = [[[WKProcessPool alloc] _initWithConfiguration:processConfiguration] autorelease]; diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff index ea833df5fd..2776a182d7 100644 --- a/browser_patches/webkit/patches/bootstrap.diff +++ b/browser_patches/webkit/patches/bootstrap.diff @@ -1,8 +1,8 @@ diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt -index db9554ed7eb6ddb62de1bc549a8e7c50944c7869..b6ce1761f11281c6362790ee59d83feed6f717cf 100644 +index 37aca585f67028500a828354396c9e59ccfe273d..f32c64abe10c08b44a75b4682ab2885a4d258799 100644 --- a/Source/JavaScriptCore/CMakeLists.txt +++ b/Source/JavaScriptCore/CMakeLists.txt -@@ -1398,22 +1398,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS +@@ -1402,22 +1402,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json ${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json @@ -31,10 +31,10 @@ index db9554ed7eb6ddb62de1bc549a8e7c50944c7869..b6ce1761f11281c6362790ee59d83fee ${JAVASCRIPTCORE_DIR}/inspector/protocol/ServiceWorker.json ${JAVASCRIPTCORE_DIR}/inspector/protocol/Target.json diff --git a/Source/JavaScriptCore/DerivedSources-input.xcfilelist b/Source/JavaScriptCore/DerivedSources-input.xcfilelist -index eebcd3f03aeb560fd70ab52b325e21c5ced74321..340323566ea7c8f5d85303c7adb4570913a41451 100644 +index 7b9566ebe6355e6cb853e59a478a17a29953e856..a8d3266e69c4700a8b5ed806f456e8d1bc3194b9 100644 --- a/Source/JavaScriptCore/DerivedSources-input.xcfilelist +++ b/Source/JavaScriptCore/DerivedSources-input.xcfilelist -@@ -99,21 +99,26 @@ $(PROJECT_DIR)/inspector/protocol/CPUProfiler.json +@@ -100,21 +100,26 @@ $(PROJECT_DIR)/inspector/protocol/CPUProfiler.json $(PROJECT_DIR)/inspector/protocol/CSS.json $(PROJECT_DIR)/inspector/protocol/Canvas.json $(PROJECT_DIR)/inspector/protocol/Console.json @@ -62,10 +62,10 @@ index eebcd3f03aeb560fd70ab52b325e21c5ced74321..340323566ea7c8f5d85303c7adb45709 $(PROJECT_DIR)/inspector/protocol/Security.json $(PROJECT_DIR)/inspector/protocol/ServiceWorker.json diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make -index 99dd36c7234cecd9c6620c94c4e6e93ff6548d77..d2017ded67f3e811d0f905be238c73ccb0348aa7 100644 +index 103f0b77b93558944be1770a00e1a149d7257812..a580b33ea9a7f2f74547f77c1dab4caa019dce81 100644 --- a/Source/JavaScriptCore/DerivedSources.make +++ b/Source/JavaScriptCore/DerivedSources.make -@@ -299,22 +299,27 @@ INSPECTOR_DOMAINS := \ +@@ -303,22 +303,27 @@ INSPECTOR_DOMAINS := \ $(JavaScriptCore)/inspector/protocol/CSS.json \ $(JavaScriptCore)/inspector/protocol/Canvas.json \ $(JavaScriptCore)/inspector/protocol/Console.json \ @@ -121,19 +121,19 @@ index 9bc5d1fd8e2a7e576be046b3c6ae1266696cf552..610f810db1dd6865c500c0796386a828 { return addPrefixToIdentifier(++s_lastUsedIdentifier); diff --git a/Source/JavaScriptCore/inspector/IdentifiersFactory.h b/Source/JavaScriptCore/inspector/IdentifiersFactory.h -index eb25aedee4cd9ebe007e06c2515b37ee095b06f4..badf6559595c8377db1089ca3c25008e1be2c8f1 100644 +index 4113ddb45d4a8d08379d4dc56c44cde56162accf..e00cb9cb01a7a241f3f25b1e4cdc2fcaee92b3ac 100644 --- a/Source/JavaScriptCore/inspector/IdentifiersFactory.h +++ b/Source/JavaScriptCore/inspector/IdentifiersFactory.h @@ -31,6 +31,7 @@ namespace Inspector { - class JS_EXPORT_PRIVATE IdentifiersFactory { + class IdentifiersFactory { public: -+ static void initializeWithProcessID(uint64_t); - static String createIdentifier(); - static String requestId(unsigned long identifier); ++ JS_EXPORT_PRIVATE static void initializeWithProcessID(uint64_t); + JS_EXPORT_PRIVATE static String createIdentifier(); + JS_EXPORT_PRIVATE static String requestId(unsigned long identifier); }; diff --git a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp -index 143135027999755614d5fae2b897d8dd5e62d611..a357963f3350d29ea0fd90a20ac2393ff6a0efa9 100644 +index 8b39848154ecab9f7daa2d21c85562a319cd06d7..c8a1f44cb4516993899ffe1404b6c3865d42433a 100644 --- a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp +++ b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp @@ -85,7 +85,10 @@ static RefPtr jsToInspectorValue(JSC::JSGlobalObject* globalObject, @@ -149,10 +149,10 @@ index 143135027999755614d5fae2b897d8dd5e62d611..a357963f3350d29ea0fd90a20ac2393f return nullptr; inspectorObject->setValue(name.string(), inspectorValue.releaseNonNull()); diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp -index 3b2056bf5a71301383e0895d77cc6f16842235a9..eaf73171ce70ac43abbe404122a263ce708bb41f 100644 +index 1f5d0adbf624bd24ef1e525967e6e82e8c37b4e5..4fe0f364b4ccd11774bf29f772e0a568549a4322 100644 --- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp +++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp -@@ -100,7 +100,7 @@ void BackendDispatcher::registerDispatcherForDomain(const String& domain, Supple +@@ -102,7 +102,7 @@ void BackendDispatcher::registerDispatcherForDomain(const String& domain, Supple m_dispatchers.set(domain, dispatcher); } @@ -161,7 +161,7 @@ index 3b2056bf5a71301383e0895d77cc6f16842235a9..eaf73171ce70ac43abbe404122a263ce { Ref protect(*this); -@@ -145,6 +145,9 @@ void BackendDispatcher::dispatch(const String& message) +@@ -147,6 +147,9 @@ void BackendDispatcher::dispatch(const String& message) requestId = *requestIdInt; } @@ -172,18 +172,19 @@ index 3b2056bf5a71301383e0895d77cc6f16842235a9..eaf73171ce70ac43abbe404122a263ce // We could be called re-entrantly from a nested run loop, so restore the previous id. SetForScope scopedRequestId(m_currentRequestId, requestId); diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h -index 0c83a1c3baa3bdbb30e53c11aaafd8bda34309cd..127616bbdb65b0867266e5bd6a63bd5a58212870 100644 +index 2eba743177c016a3415d4a5deafc552e842dd0fa..939d14be7a2703777652467f0f60e67ef1c5e0f8 100644 --- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h +++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h -@@ -84,7 +84,10 @@ public: +@@ -83,8 +83,11 @@ public: + ServerError }; - void registerDispatcherForDomain(const String& domain, SupplementalBackendDispatcher*); -- void dispatch(const String& message); -+ + enum class InterceptionResult { Intercepted, Continue }; + using Interceptor = WTF::Function&)>; -+ void dispatch(const String& message, Interceptor&& interceptor = Interceptor()); ++ + JS_EXPORT_PRIVATE void registerDispatcherForDomain(const String& domain, SupplementalBackendDispatcher*); +- JS_EXPORT_PRIVATE void dispatch(const String& message); ++ JS_EXPORT_PRIVATE void dispatch(const String& message, Interceptor&& interceptor = Interceptor()); // Note that 'unused' is a workaround so the compiler can pick the right sendResponse based on arity. // When is fixed or this class is renamed for the JSON::Object case, @@ -222,7 +223,7 @@ index 0cc2127c9c12c2d82dea9550bad73f4ffb99ba24..8ca65cc042d435cbc0e05dcc5c5dfc95 } diff --git a/Source/JavaScriptCore/inspector/InspectorTarget.h b/Source/JavaScriptCore/inspector/InspectorTarget.h -index 082dd93cb0505c5bc7a2d5a7cf78fa0306809082..3f50f49ef9e691b3dc57dafd66c1e7d323736f40 100644 +index b555c2e5a071d0a6a016061cc60755449557556d..d019346f0932296d15212c76a4a9b56beb565ff4 100644 --- a/Source/JavaScriptCore/inspector/InspectorTarget.h +++ b/Source/JavaScriptCore/inspector/InspectorTarget.h @@ -66,8 +66,12 @@ public: @@ -367,25 +368,10 @@ index e47c6ca59f37fbf18ca8a393df72e0472363fabd..b393465540595220561ae00afb854082 void InspectorTargetAgent::didCommitProvisionalTarget(const String& oldTargetID, const String& committedTargetID) diff --git a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h -index 1ccce5707ca2a4743029614777bb6b9938f8a09c..cbb3466a855887d4dac3a6064e5de6ead051c1a6 100644 +index 04377b714a6ccb5294c65d592e74350621d470ba..b6de937bfa3e6185ce29f4e432d327a3cedee6df 100644 --- a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h +++ b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h -@@ -37,12 +37,12 @@ namespace Inspector { - - class InspectorTarget; - --class InspectorTargetAgent final : public InspectorAgentBase, public TargetBackendDispatcherHandler, public CanMakeCheckedPtr { -+class JS_EXPORT_PRIVATE InspectorTargetAgent final : public InspectorAgentBase, public TargetBackendDispatcherHandler, public CanMakeCheckedPtr { - WTF_MAKE_NONCOPYABLE(InspectorTargetAgent); - WTF_MAKE_TZONE_ALLOCATED(InspectorTargetAgent); - WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(InspectorTargetAgent); - public: -- JS_EXPORT_PRIVATE InspectorTargetAgent(FrontendRouter&, BackendDispatcher&); -+ InspectorTargetAgent(FrontendRouter&, BackendDispatcher&); - ~InspectorTargetAgent() final; - - // InspectorAgentBase -@@ -53,14 +53,19 @@ public: +@@ -53,8 +53,11 @@ public: Protocol::ErrorStringOr setPauseOnStart(bool) final; Protocol::ErrorStringOr resume(const String& targetId) final; Protocol::ErrorStringOr sendMessageToTarget(const String& targetId, const String& message) final; @@ -393,22 +379,20 @@ index 1ccce5707ca2a4743029614777bb6b9938f8a09c..cbb3466a855887d4dac3a6064e5de6ea + Protocol::ErrorStringOr close(const String& targetId, std::optional&& runBeforeUnload) override; // Target lifecycle. -- JS_EXPORT_PRIVATE void targetCreated(InspectorTarget&); -- JS_EXPORT_PRIVATE void targetDestroyed(InspectorTarget&); -- JS_EXPORT_PRIVATE void didCommitProvisionalTarget(const String& oldTargetID, const String& committedTargetID); -+ void targetCreated(InspectorTarget&); -+ void targetDestroyed(InspectorTarget&); + void targetCrashed(InspectorTarget&); -+ void didCommitProvisionalTarget(const String& oldTargetID, const String& committedTargetID); - + void targetCreated(InspectorTarget&); + void targetDestroyed(InspectorTarget&); + void didCommitProvisionalTarget(const String& oldTargetID, const String& committedTargetID); +@@ -62,6 +65,9 @@ public: // Target messages. -- JS_EXPORT_PRIVATE void sendMessageFromTargetToFrontend(const String& targetId, const String& message); -+ void sendMessageFromTargetToFrontend(const String& targetId, const String& message); -+ -+ bool isConnected() { return m_isConnected; } + void sendMessageFromTargetToFrontend(const String& targetId, const String& message); ++ bool shouldPauseOnStart() const { return m_shouldPauseOnStart; } ++ bool isConnected() { return m_isConnected; } ++ private: // FrontendChannel + FrontendChannel::ConnectionType connectionType() const; diff --git a/Source/JavaScriptCore/inspector/protocol/DOM.json b/Source/JavaScriptCore/inspector/protocol/DOM.json index 27c65fbda226f1cd5bfd68944fe87fb9b2a688a6..b036f050859ee88004a7bf6daa4bb73835360615 100644 --- a/Source/JavaScriptCore/inspector/protocol/DOM.json @@ -903,10 +887,10 @@ index 96af27ece2ac200e11c4311b3ca0d9d3b5a048da..3168f7806fcbdabec07acc5e304bae1e ], "events": [ diff --git a/Source/JavaScriptCore/inspector/protocol/Page.json b/Source/JavaScriptCore/inspector/protocol/Page.json -index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c6462bbff82 100644 +index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..c14ec5652c0e9d311d94947e38a9e0da701046ef 100644 --- a/Source/JavaScriptCore/inspector/protocol/Page.json +++ b/Source/JavaScriptCore/inspector/protocol/Page.json -@@ -20,7 +20,14 @@ +@@ -20,7 +20,15 @@ "ScriptEnabled", "ShowDebugBorders", "ShowRepaintCounter", @@ -918,11 +902,12 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 + "NotificationsEnabled", + "FullScreenEnabled", + "InputTypeMonthEnabled", -+ "InputTypeWeekEnabled" ++ "InputTypeWeekEnabled", ++ "FixedBackgroundsPaintRelativeToDocument" ] }, { -@@ -62,6 +69,12 @@ +@@ -62,6 +70,12 @@ "enum": ["None", "Lax", "Strict"], "description": "Same-Site policy of a cookie." }, @@ -935,7 +920,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 { "id": "Frame", "type": "object", -@@ -125,6 +138,50 @@ +@@ -125,6 +139,50 @@ { "name": "secure", "type": "boolean", "description": "True if cookie is secure." }, { "name": "sameSite", "$ref": "CookieSameSitePolicy", "description": "Cookie Same-Site policy." } ] @@ -986,7 +971,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 } ], "commands": [ -@@ -144,6 +201,14 @@ +@@ -144,6 +202,14 @@ { "name": "revalidateAllResources", "type": "boolean", "optional": true, "description": "If true, all cached subresources will be revalidated when the main resource loads. Otherwise, only expired cached subresources will be revalidated (the default behavior for most WebKit clients)." } ] }, @@ -1001,7 +986,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 { "name": "navigate", "description": "Navigates current page to the given URL.", -@@ -160,6 +225,14 @@ +@@ -160,6 +226,14 @@ { "name": "value", "type": "string", "optional": true, "description": "Value to override the user agent with. If this value is not provided, the override is removed. Overrides are removed when Web Inspector closes/disconnects." } ] }, @@ -1016,7 +1001,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 { "name": "overrideSetting", "description": "Allows the frontend to override the inspected page's settings.", -@@ -283,6 +356,28 @@ +@@ -283,6 +357,28 @@ { "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." } ] }, @@ -1045,7 +1030,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 { "name": "snapshotNode", "description": "Capture a snapshot of the specified node that does not include unrelated layers.", -@@ -303,7 +398,8 @@ +@@ -303,7 +399,8 @@ { "name": "y", "type": "integer", "description": "Y coordinate" }, { "name": "width", "type": "integer", "description": "Rectangle width" }, { "name": "height", "type": "integer", "description": "Rectangle height" }, @@ -1055,7 +1040,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 ], "returns": [ { "name": "dataURL", "type": "string", "description": "Base64-encoded image data (PNG)." } -@@ -321,12 +417,64 @@ +@@ -321,12 +418,64 @@ { "name": "setScreenSizeOverride", "description": "Overrides screen size exposed to DOM and used in media queries for testing with provided values.", @@ -1121,7 +1106,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 } ], "events": [ -@@ -334,14 +482,16 @@ +@@ -334,14 +483,16 @@ "name": "domContentEventFired", "targetTypes": ["page"], "parameters": [ @@ -1140,7 +1125,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 ] }, { -@@ -351,6 +501,14 @@ +@@ -351,6 +502,14 @@ { "name": "frame", "$ref": "Frame", "description": "Frame object." } ] }, @@ -1155,7 +1140,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 { "name": "frameDetached", "description": "Fired when frame has been detached from its parent.", -@@ -379,7 +537,8 @@ +@@ -379,7 +538,8 @@ "targetTypes": ["page"], "parameters": [ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has scheduled a navigation." }, @@ -1165,7 +1150,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 ] }, { -@@ -390,6 +549,22 @@ +@@ -390,6 +550,22 @@ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has cleared its scheduled navigation." } ] }, @@ -1188,7 +1173,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c64 { "name": "defaultUserPreferencesDidChange", "description": "Fired when the default value of a user preference changes at the system level.", -@@ -397,6 +572,42 @@ +@@ -397,6 +573,42 @@ "parameters": [ { "name": "preferences", "type": "array", "items": { "$ref": "UserPreference" }, "description": "List of user preferences that can be overriden and their new system (default) values." } ] @@ -1694,18 +1679,6 @@ index 52920cded24a9c6b0ef6fb4e518664955db4f9fa..bbbabc4e7259088b9404e8cc07eecd6f ] }, { -diff --git a/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp b/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp -index 7c2ecd2c9afe3882903a590a76504d98da49f0af..9472d74977234a97e7ede76a042e22884c492594 100644 ---- a/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp -+++ b/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp -@@ -28,7 +28,6 @@ - - #include "CodeBlock.h" - #include "JSCInlines.h" --#include "ProfilerDumper.h" - #include - - namespace JSC { namespace Profiler { diff --git a/Source/JavaScriptCore/runtime/ConsoleClient.h b/Source/JavaScriptCore/runtime/ConsoleClient.h index 24891ad836086fd23024fcb4d08ca63f6974c812..29f4b6b1923383fec7a99d28a4e815dc4536d160 100644 --- a/Source/JavaScriptCore/runtime/ConsoleClient.h @@ -1719,18 +1692,19 @@ index 24891ad836086fd23024fcb4d08ca63f6974c812..29f4b6b1923383fec7a99d28a4e815dc private: enum ArgumentRequirement { ArgumentRequired, ArgumentNotRequired }; diff --git a/Source/ThirdParty/libwebrtc/CMakeLists.txt b/Source/ThirdParty/libwebrtc/CMakeLists.txt -index 2557956d875e6d5be0d83368f4eaaa8083585c26..da7bde1dc256e9e1f4d13469e150970f5090a993 100644 +index 347f61b918ee705f510c9e28d49acc5b3aac1f3c..b1718ebbdd3157938895b281497642de08216bbd 100644 --- a/Source/ThirdParty/libwebrtc/CMakeLists.txt +++ b/Source/ThirdParty/libwebrtc/CMakeLists.txt -@@ -453,6 +453,7 @@ set(webrtc_SOURCES - Source/third_party/boringssl/src/crypto/x509/x_val.c - Source/third_party/boringssl/src/crypto/x509/x_x509a.c - Source/third_party/boringssl/src/crypto/x509/x_x509.c +@@ -5,6 +5,8 @@ file(MAKE_DIRECTORY ${libwebrtc_DERIVED_SOURCES_DIR}) + + enable_language(ASM) + ++add_definitions(-DLIBYUV_DISABLE_SVE) + - Source/third_party/boringssl/src/decrepit/bio/base64_bio.c - Source/third_party/boringssl/src/decrepit/blowfish/blowfish.c - Source/third_party/boringssl/src/decrepit/cast/cast.c -@@ -532,6 +533,11 @@ set(webrtc_SOURCES + if (NOT APPLE) + find_package(LibVpx 1.10.0) + if (NOT LIBVPX_FOUND) +@@ -601,6 +603,11 @@ set(webrtc_SOURCES Source/third_party/crc32c/src/src/crc32c.cc Source/third_party/crc32c/src/src/crc32c_portable.cc Source/third_party/crc32c/src/src/crc32c_sse42.cc @@ -1742,7 +1716,7 @@ index 2557956d875e6d5be0d83368f4eaaa8083585c26..da7bde1dc256e9e1f4d13469e150970f Source/third_party/libyuv/source/compare.cc Source/third_party/libyuv/source/compare_common.cc Source/third_party/libyuv/source/compare_gcc.cc -@@ -2406,6 +2412,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE +@@ -2476,6 +2483,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE Source/third_party/libsrtp/config Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include @@ -1767,22 +1741,14 @@ index 0c5c8e689bdddec766f9de5bffd4444a5e068d77..330dd1f585e530722178c65c883641a2 // FIXME: Set WEBRTC_USE_BUILTIN_ISAC_FIX and WEBRTC_USE_BUILTIN_ISAC_FLOAT for iOS and Mac diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp -index fe9c7b3f648392219fdf5be8d2bab99e1b4959e4..def7770bc94a1f533add081e907826058f169bbe 100644 +index c6fb5ee1c32a896cd247d339ce5471b0c0628a89..e234adaff73a7302aa8847f32ad1fec545b087b1 100644 --- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp +++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp -@@ -403,3 +403,24 @@ __ZN3rtc15CountIPMaskBitsERKNS_9IPAddressE - __ZN3rtc19IPAddressPrecedenceERKNS_9IPAddressE - __ZNK3rtc16InterfaceAddresseqERKS0_ - __ZNK3rtc16InterfaceAddress8ToStringEv -+__ZN8mkvmuxer11SegmentInfo15set_writing_appEPKc +@@ -421,3 +421,16 @@ __ZNK8mkvmuxer7Segment16GetTrackByNumberEy + __ZN8mkvmuxer6Tracks11kAv1CodecIdE + __ZN8mkvmuxer6Tracks11kVp8CodecIdE + __ZN8mkvmuxer6Tracks11kVp9CodecIdE +__ZN8mkvmuxer11SegmentInfo4InitEv -+__ZN8mkvmuxer7Segment10OutputCuesEb -+__ZN8mkvmuxer7Segment13AddVideoTrackEiii -+__ZN8mkvmuxer7Segment4InitEPNS_10IMkvWriterE -+__ZN8mkvmuxer7Segment8AddFrameEPKhyyyb -+__ZN8mkvmuxer7Segment8FinalizeEv -+__ZN8mkvmuxer7SegmentC1Ev -+__ZN8mkvmuxer7SegmentD1Ev +__ZN8mkvmuxer9MkvWriterC1EP7__sFILE +_ARGBToI420 +_vpx_codec_destroy @@ -1795,32 +1761,8 @@ index fe9c7b3f648392219fdf5be8d2bab99e1b4959e4..def7770bc94a1f533add081e90782605 +_vpx_codec_iface_name +_vpx_codec_version_str +_vpx_codec_vp8_cx -diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc b/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc -index 9ada3cdc5f6ceecabdc4b17998754a7bf3adb0e9..1136def8438ec98a8f96bfd67fd9b0691bb3ffaf 100644 ---- a/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc -+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtcp_transceiver_impl.cc -@@ -16,6 +16,7 @@ - #include "absl/algorithm/container.h" - #include "absl/memory/memory.h" - #include "absl/types/optional.h" -+#include "api/call/transport.h" - #include "api/video/video_bitrate_allocation.h" - #include "modules/rtp_rtcp/include/receive_statistics.h" - #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" -diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h264.h b/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h264.h -index f95c3b6c6b73a01974f26d88bcc533e5032ddb66..6a9368c60824cd32649c93286522d779cac59bd2 100644 ---- a/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h264.h -+++ b/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/rtp_format_h264.h -@@ -16,6 +16,7 @@ - - #include - #include -+#include - #include - - #include "api/array_view.h" diff --git a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj -index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a7bee394e 100644 +index 10f3107c5688e799c6466a1e74f834637b39d2b2..ac3ce66727fb6de865fe1df7b94ed1debba56212 100644 --- a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj +++ b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj @@ -35,6 +35,20 @@ @@ -1844,17 +1786,7 @@ index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a /* Begin PBXBuildFile section */ 2D6BFF60280A93DF00A1A74F /* video_coding.h in Headers */ = {isa = PBXBuildFile; fileRef = 4131C45B234C81710028A615 /* video_coding.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2D6BFF61280A93EC00A1A74F /* video_codec_initializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4131C45E234C81720028A615 /* video_codec_initializer.h */; settings = {ATTRIBUTES = (Public, ); }; }; -@@ -5144,6 +5158,9 @@ - DDF30D9127C5C725006A526F /* receive_side_congestion_controller.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF30D9027C5C725006A526F /* receive_side_congestion_controller.h */; }; - DDF30D9527C5C756006A526F /* bwe_defines.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF30D9327C5C756006A526F /* bwe_defines.h */; }; - DDF30D9627C5C756006A526F /* remote_bitrate_estimator.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF30D9427C5C756006A526F /* remote_bitrate_estimator.h */; }; -+ F3B7819924C7CC5200FCB122 /* mkvmuxerutil.cc in Sources */ = {isa = PBXBuildFile; fileRef = F3B7819624C7CC5100FCB122 /* mkvmuxerutil.cc */; }; -+ F3B7819A24C7CC5200FCB122 /* mkvmuxer.cc in Sources */ = {isa = PBXBuildFile; fileRef = F3B7819724C7CC5200FCB122 /* mkvmuxer.cc */; }; -+ F3B7819B24C7CC5200FCB122 /* mkvwriter.cc in Sources */ = {isa = PBXBuildFile; fileRef = F3B7819824C7CC5200FCB122 /* mkvwriter.cc */; }; - /* End PBXBuildFile section */ - - /* Begin PBXBuildRule section */ -@@ -5632,6 +5649,13 @@ +@@ -5653,6 +5667,13 @@ remoteGlobalIDString = DDF30D0527C5C003006A526F; remoteInfo = absl; }; @@ -1868,42 +1800,7 @@ index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ -@@ -11217,6 +11241,9 @@ - DDF30D9027C5C725006A526F /* receive_side_congestion_controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = receive_side_congestion_controller.h; sourceTree = ""; }; - DDF30D9327C5C756006A526F /* bwe_defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bwe_defines.h; sourceTree = ""; }; - DDF30D9427C5C756006A526F /* remote_bitrate_estimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = remote_bitrate_estimator.h; sourceTree = ""; }; -+ F3B7819624C7CC5100FCB122 /* mkvmuxerutil.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mkvmuxerutil.cc; path = mkvmuxer/mkvmuxerutil.cc; sourceTree = ""; }; -+ F3B7819724C7CC5200FCB122 /* mkvmuxer.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mkvmuxer.cc; path = mkvmuxer/mkvmuxer.cc; sourceTree = ""; }; -+ F3B7819824C7CC5200FCB122 /* mkvwriter.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mkvwriter.cc; path = mkvmuxer/mkvwriter.cc; sourceTree = ""; }; - FB39D0D11200F0E300088E69 /* libwebrtc.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwebrtc.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; - /* End PBXFileReference section */ - -@@ -20069,6 +20096,7 @@ - isa = PBXGroup; - children = ( - CDFD2F9224C4B2F90048DAC3 /* common */, -+ F3B7819524C7CC1300FCB122 /* mkvmuxer */, - CDEBB19224C0191800ADBD44 /* webm_parser */, - ); - path = libwebm; -@@ -20480,6 +20508,16 @@ - path = include; - sourceTree = ""; - }; -+ F3B7819524C7CC1300FCB122 /* mkvmuxer */ = { -+ isa = PBXGroup; -+ children = ( -+ F3B7819724C7CC5200FCB122 /* mkvmuxer.cc */, -+ F3B7819624C7CC5100FCB122 /* mkvmuxerutil.cc */, -+ F3B7819824C7CC5200FCB122 /* mkvwriter.cc */, -+ ); -+ name = mkvmuxer; -+ sourceTree = ""; -+ }; - FB39D06E1200ED9200088E69 = { - isa = PBXGroup; - children = ( -@@ -23772,6 +23810,7 @@ +@@ -23816,6 +23837,7 @@ ); dependencies = ( 410B3827292B73E90003E515 /* PBXTargetDependency */, @@ -1911,7 +1808,7 @@ index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a DD2E76E827C6B69A00F2A74C /* PBXTargetDependency */, CDEBB4CC24C01AB400ADBD44 /* PBXTargetDependency */, 411ED040212E0811004320BA /* PBXTargetDependency */, -@@ -23854,6 +23893,7 @@ +@@ -23898,6 +23920,7 @@ 4460B8B92B155B6A00392062 /* vp9_qp_parser_fuzzer */, 444A6EF02AEADFC9005FE121 /* vp9_replay_fuzzer */, 44945C512B9BA1C300447FFD /* webm_fuzzer */, @@ -1919,9 +1816,9 @@ index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a ); }; /* End PBXProject section */ -@@ -23937,6 +23977,23 @@ +@@ -24001,6 +24024,23 @@ shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Scripts/create-symlink-to-altroot.sh\"\n"; + shellScript = "[ -z \"${WK_DERIVED_SDK_HEADERS_DIR}\" -o -d \"${WK_DERIVED_SDK_HEADERS_DIR}\" ] && touch \"${SCRIPT_OUTPUT_FILE_0}\"\n"; }; + F31720B127FE216400EEE407 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; @@ -1943,17 +1840,7 @@ index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ -@@ -25924,6 +25981,9 @@ - 5CDD865E1E43B8B500621E92 /* min_max_operations.c in Sources */, - 4189395B242A71F5007FDC41 /* min_video_bitrate_experiment.cc in Sources */, - 41B8D8FB28CB85CB00E5FA37 /* missing_mandatory_parameter_cause.cc in Sources */, -+ F3B7819A24C7CC5200FCB122 /* mkvmuxer.cc in Sources */, -+ F3B7819924C7CC5200FCB122 /* mkvmuxerutil.cc in Sources */, -+ F3B7819B24C7CC5200FCB122 /* mkvwriter.cc in Sources */, - 4131C387234B957D0028A615 /* moving_average.cc in Sources */, - 41FCBB1521B1F7AA00A5DF27 /* moving_average.cc in Sources */, - 5CD286101E6A64C90094FDC8 /* moving_max.cc in Sources */, -@@ -26796,6 +26856,11 @@ +@@ -26864,6 +26904,11 @@ target = DDF30D0527C5C003006A526F /* absl */; targetProxy = DD2E76E727C6B69A00F2A74C /* PBXContainerItemProxy */; }; @@ -1965,7 +1852,7 @@ index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ -@@ -27371,6 +27436,27 @@ +@@ -27439,6 +27484,27 @@ }; name = Production; }; @@ -1993,7 +1880,7 @@ index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a FB39D0711200ED9200088E69 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */; -@@ -27673,6 +27759,16 @@ +@@ -27741,6 +27807,16 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Production; }; @@ -2010,19 +1897,39 @@ index 4450f961579b52a88876cfc2d72a59bab4ccb863..4a217d81585ce495237aa013d3ace98a FB39D0731200ED9200088E69 /* Build configuration list for PBXProject "libwebrtc" */ = { isa = XCConfigurationList; buildConfigurations = ( +diff --git a/Source/ThirdParty/skia/CMakeLists.txt b/Source/ThirdParty/skia/CMakeLists.txt +index 2f20123e16626a3a1b76534ea4c0c38522228e06..3ab6fa2fe2a297e98597985903ba7ba735d6d436 100644 +--- a/Source/ThirdParty/skia/CMakeLists.txt ++++ b/Source/ThirdParty/skia/CMakeLists.txt +@@ -5,6 +5,7 @@ if (NOT WIN32) + find_package(Freetype 2.9.0 REQUIRED) + find_package(Fontconfig 2.13.0 REQUIRED) + endif () ++find_package(Threads REQUIRED) + find_package(WebP REQUIRED COMPONENTS mux) + + if (ANDROID) +@@ -950,6 +951,7 @@ endif () + target_link_libraries(Skia PRIVATE + JPEG::JPEG + PNG::PNG ++ Threads::Threads + WebP::mux + ) + diff --git a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml -index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70506b415d 100644 +index 97c903534c16864727f7ea5528ab56bfa5b3104a..fd0f0232df11883c9627ed71950f438ea007b480 100644 --- a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml +++ b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml -@@ -607,6 +607,7 @@ ApplePayEnabled: - default: false +@@ -613,6 +613,7 @@ ApplePayEnabled: + richJavaScript: true # FIXME: This is on by default in WebKit2 PLATFORM(COCOA). Perhaps we should consider turning it on for WebKitLegacy as well. +# Playwright: enable on all platforms to align with Safari. AsyncClipboardAPIEnabled: type: bool status: mature -@@ -617,7 +618,7 @@ AsyncClipboardAPIEnabled: +@@ -623,7 +624,7 @@ AsyncClipboardAPIEnabled: default: false WebKit: "PLATFORM(COCOA) || PLATFORM(GTK)" : true @@ -2031,7 +1938,21 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 WebCore: default: false -@@ -2046,6 +2047,7 @@ CrossOriginEmbedderPolicyEnabled: +@@ -868,13 +869,10 @@ BlobFileAccessEnforcementEnabled: + sharedPreferenceForWebProcess: true + defaultValue: + WebKitLegacy: +- "PLATFORM(COCOA)": true + default: false + WebKit: +- "PLATFORM(COCOA)": true + default: false + WebCore: +- "PLATFORM(COCOA)": true + default: false + + BlobRegistryTopOriginPartitioningEnabled: +@@ -2194,6 +2192,7 @@ CrossOriginEmbedderPolicyEnabled: WebCore: default: false @@ -2039,7 +1960,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 CrossOriginOpenerPolicyEnabled: type: bool status: stable -@@ -2086,7 +2088,7 @@ CustomPasteboardDataEnabled: +@@ -2234,7 +2233,7 @@ CustomPasteboardDataEnabled: WebKitLegacy: default: false WebKit: @@ -2047,8 +1968,8 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 + "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)": true default: false - CustomStateSetEnabled: -@@ -2145,6 +2147,7 @@ DOMAudioSessionFullEnabled: + DNSPrefetchingEnabled: +@@ -2279,6 +2278,7 @@ DOMAudioSessionFullEnabled: WebCore: default: false @@ -2056,7 +1977,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 DOMPasteAccessRequestsEnabled: type: bool status: internal -@@ -2156,7 +2159,7 @@ DOMPasteAccessRequestsEnabled: +@@ -2290,7 +2290,7 @@ DOMPasteAccessRequestsEnabled: default: false WebKit: "PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(VISION)": true @@ -2065,7 +1986,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 WebCore: default: false -@@ -2516,7 +2519,7 @@ DirectoryUploadEnabled: +@@ -2639,7 +2639,7 @@ DirectoryUploadEnabled: WebKitLegacy: default: false WebKit: @@ -2074,7 +1995,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 default: false WebCore: default: false -@@ -2939,10 +2942,10 @@ FullScreenEnabled: +@@ -3103,10 +3103,10 @@ FullScreenEnabled: WebKitLegacy: default: false WebKit: @@ -2087,7 +2008,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 default: false sharedPreferenceForWebProcess: true -@@ -3595,6 +3598,7 @@ InspectorAttachmentSide: +@@ -3795,6 +3795,7 @@ InspectorAttachmentSide: WebKit: default: 0 @@ -2095,7 +2016,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 InspectorStartsAttached: type: bool status: embedder -@@ -3602,7 +3606,7 @@ InspectorStartsAttached: +@@ -3802,7 +3803,7 @@ InspectorStartsAttached: exposed: [ WebKit ] defaultValue: WebKit: @@ -2104,7 +2025,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 InspectorWindowFrame: type: String -@@ -3953,9 +3957,10 @@ LayoutViewportHeightExpansionFactor: +@@ -4153,9 +4154,10 @@ LayoutViewportHeightExpansionFactor: WebCore: default: 0 @@ -2116,7 +2037,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 category: html humanReadableName: "Lazy iframe loading" humanReadableDescription: "Enable lazy iframe loading support" -@@ -3963,9 +3968,9 @@ LazyIframeLoadingEnabled: +@@ -4163,9 +4165,9 @@ LazyIframeLoadingEnabled: WebKitLegacy: default: true WebKit: @@ -2128,7 +2049,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 LazyImageLoadingEnabled: type: bool -@@ -5461,7 +5466,7 @@ PermissionsAPIEnabled: +@@ -5695,7 +5697,7 @@ PermissionsAPIEnabled: WebKitLegacy: default: false WebKit: @@ -2137,7 +2058,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 default: false WebCore: default: false -@@ -5524,6 +5529,19 @@ PitchCorrectionAlgorithm: +@@ -5758,6 +5760,19 @@ PitchCorrectionAlgorithm: WebCore: default: MediaPlayerEnums::PitchCorrectionAlgorithm::BestAllAround @@ -2156,8 +2077,8 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 + PointerLockOptionsEnabled: type: bool - status: testable -@@ -6060,7 +6078,7 @@ ScreenOrientationAPIEnabled: + status: stable +@@ -6308,7 +6323,7 @@ ScreenOrientationAPIEnabled: WebKitLegacy: default: false WebKit: @@ -2166,7 +2087,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 WebCore: default: false sharedPreferenceForWebProcess: true -@@ -7389,6 +7407,7 @@ UseCGDisplayListsForDOMRendering: +@@ -7704,6 +7719,7 @@ UseCGDisplayListsForDOMRendering: default: true sharedPreferenceForWebProcess: true @@ -2174,7 +2095,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 UseGPUProcessForCanvasRenderingEnabled: type: bool status: stable -@@ -7401,7 +7420,7 @@ UseGPUProcessForCanvasRenderingEnabled: +@@ -7716,7 +7732,7 @@ UseGPUProcessForCanvasRenderingEnabled: defaultValue: WebKit: "ENABLE(GPU_PROCESS_BY_DEFAULT)": true @@ -2183,7 +2104,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 default: false UseGPUProcessForDOMRenderingEnabled: -@@ -7444,6 +7463,7 @@ UseGPUProcessForMediaEnabled: +@@ -7759,6 +7775,7 @@ UseGPUProcessForMediaEnabled: "ENABLE(GPU_PROCESS_BY_DEFAULT)": true default: false @@ -2191,7 +2112,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 UseGPUProcessForWebGLEnabled: type: bool status: internal -@@ -7455,7 +7475,7 @@ UseGPUProcessForWebGLEnabled: +@@ -7770,7 +7787,7 @@ UseGPUProcessForWebGLEnabled: default: false WebKit: "ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": true @@ -2201,7 +2122,7 @@ index 5b41178d65c94c1b0e1a51e37b21f9b6e827dbdd..716f80a56e5850b26bc7c0d1b2d91d70 WebCore: "ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": true diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h -index 62e05e9711b88f291833ec11fea15caba8d1826c..279be00347cbe501ba09040a511627ed308ecdbd 100644 +index 05707f446c2ad5a709f78fd7950a3c099f5f02e2..dae9ff949061a18cd149d63fe937c1cbfc302f4e 100644 --- a/Source/WTF/wtf/PlatformEnable.h +++ b/Source/WTF/wtf/PlatformEnable.h @@ -409,7 +409,7 @@ @@ -2223,10 +2144,10 @@ index 62e05e9711b88f291833ec11fea15caba8d1826c..279be00347cbe501ba09040a511627ed #if !defined(ENABLE_TOUCH_ACTION_REGIONS) diff --git a/Source/WTF/wtf/PlatformEnableCocoa.h b/Source/WTF/wtf/PlatformEnableCocoa.h -index 256964d0373b4ec43ddccc4c7c50ab9d85259294..c6aff1223553dcdbe2ac5165bc2fd9df763ee191 100644 +index 93435c6b18c4abb7934ac880a6bbb86b05a33756..b81515175fd55e4460a5ef398f9d3af28aeb70e6 100644 --- a/Source/WTF/wtf/PlatformEnableCocoa.h +++ b/Source/WTF/wtf/PlatformEnableCocoa.h -@@ -794,7 +794,7 @@ +@@ -802,7 +802,7 @@ #endif #if !defined(ENABLE_SEC_ITEM_SHIM) @@ -2236,7 +2157,7 @@ index 256964d0373b4ec43ddccc4c7c50ab9d85259294..c6aff1223553dcdbe2ac5165bc2fd9df #if !defined(ENABLE_SERVER_PRECONNECT) diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h -index fff5b0214d7706179adf40c2701018c260c1c657..fa53df1cd9bbe9348636ce70ede2bcdbfbb2af84 100644 +index 1779062c715c2232d13bb8c8e21dd82d932817df..8e35f41126a904460b812cdcef9350f224cc40ce 100644 --- a/Source/WTF/wtf/PlatformHave.h +++ b/Source/WTF/wtf/PlatformHave.h @@ -433,7 +433,7 @@ @@ -2248,7 +2169,7 @@ index fff5b0214d7706179adf40c2701018c260c1c657..fa53df1cd9bbe9348636ce70ede2bcdb #define HAVE_OS_DARK_MODE_SUPPORT 1 #endif -@@ -1249,7 +1249,8 @@ +@@ -1234,7 +1234,8 @@ #endif #if PLATFORM(MAC) @@ -2258,49 +2179,15 @@ index fff5b0214d7706179adf40c2701018c260c1c657..fa53df1cd9bbe9348636ce70ede2bcdb #endif #if !defined(HAVE_LOCKDOWN_MODE_PDF_ADDITIONS) && \ -diff --git a/Source/WTF/wtf/StdLibExtras.h b/Source/WTF/wtf/StdLibExtras.h -index 134f4922b0bd97ff80caaf7e4ac31b387f1c064f..f132cea6ad3306c5f1bd6252a53bb7b411b0bb54 100644 ---- a/Source/WTF/wtf/StdLibExtras.h -+++ b/Source/WTF/wtf/StdLibExtras.h -@@ -27,6 +27,7 @@ - #pragma once - - #include -+#include - #include - #include - #include -@@ -45,6 +46,22 @@ - - #define SINGLE_ARG(...) __VA_ARGS__ // useful when a macro argument includes a comma - -+// FIXME: Custom implementation not needed once all Linux systems use >libstdc++-10. -+#if !defined(__cpp_lib_bit_cast) || __cpp_lib_bit_cast < 201806L -+namespace std { -+ -+template ::value -+ && std::is_trivially_copyable::value, -+ int>::type = 0> -+inline constexpr T bit_cast(const U &value) { -+ return __builtin_bit_cast(T, value); -+} -+ -+} -+#endif -+ - // Use this macro to declare and define a debug-only global variable that may have a - // non-trivial constructor and destructor. When building with clang, this will suppress - // warnings about global constructors and exit-time destructors. diff --git a/Source/WTF/wtf/unicode/UTF8Conversion.h b/Source/WTF/wtf/unicode/UTF8Conversion.h -index 007b8fe3292f326504013be8198ae020f7aacf35..4439f901b4a9a92d881c7cee24ad9cd28149d276 100644 +index 007b8fe3292f326504013be8198ae020f7aacf35..1c722c473732ffe05fdb61010fa4417e3e399d1f 100644 --- a/Source/WTF/wtf/unicode/UTF8Conversion.h +++ b/Source/WTF/wtf/unicode/UTF8Conversion.h -@@ -27,6 +27,10 @@ +@@ -27,6 +27,11 @@ #include ++// Can be probably removed when we drop Debian 11. +#ifdef Success +#undef Success +#endif @@ -2309,10 +2196,10 @@ index 007b8fe3292f326504013be8198ae020f7aacf35..4439f901b4a9a92d881c7cee24ad9cd2 namespace Unicode { diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make -index f4df43f3fca6ec439815f3d0f2195abad6b046d6..9706dd76ea82d1dc23226c0ad5fd8cb57ba555b0 100644 +index f3c5f1acd4bcc6b51fa2175ac1f786280023d24b..041585f28cf7a38d4261b27b5e9be5e3b8cc65fc 100644 --- a/Source/WebCore/DerivedSources.make +++ b/Source/WebCore/DerivedSources.make -@@ -1191,6 +1191,10 @@ JS_BINDING_IDLS := \ +@@ -1220,6 +1220,10 @@ JS_BINDING_IDLS := \ $(WebCore)/dom/SubscriberCallback.idl \ $(WebCore)/dom/SubscriptionObserver.idl \ $(WebCore)/dom/SubscriptionObserverCallback.idl \ @@ -2323,7 +2210,7 @@ index f4df43f3fca6ec439815f3d0f2195abad6b046d6..9706dd76ea82d1dc23226c0ad5fd8cb5 $(WebCore)/dom/Text.idl \ $(WebCore)/dom/TextDecoder.idl \ $(WebCore)/dom/TextDecoderStream.idl \ -@@ -1783,9 +1787,6 @@ JS_BINDING_IDLS := \ +@@ -1814,9 +1818,6 @@ JS_BINDING_IDLS := \ ADDITIONAL_BINDING_IDLS = \ DocumentTouch.idl \ GestureEvent.idl \ @@ -2334,7 +2221,7 @@ index f4df43f3fca6ec439815f3d0f2195abad6b046d6..9706dd76ea82d1dc23226c0ad5fd8cb5 vpath %.in $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) diff --git a/Source/WebCore/Modules/geolocation/Geolocation.cpp b/Source/WebCore/Modules/geolocation/Geolocation.cpp -index 268f1dfa20097a708f1531975a908fa782b1adb2..5b5eb45dc77aa09be9df39073998eb7a25f44163 100644 +index 90bf15adb6a36e190f68448a125b5446a0674631..d64af222f0c824a7cd719e250c1023071465d24e 100644 --- a/Source/WebCore/Modules/geolocation/Geolocation.cpp +++ b/Source/WebCore/Modules/geolocation/Geolocation.cpp @@ -360,8 +360,9 @@ bool Geolocation::shouldBlockGeolocationRequests() @@ -2349,7 +2236,7 @@ index 268f1dfa20097a708f1531975a908fa782b1adb2..5b5eb45dc77aa09be9df39073998eb7a } diff --git a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm b/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm -index 506ebb25fa290f27a75674a6fe5506fc311910d6..07d34c567b42aca08b188243c3f036f64a8da0c4 100644 +index b2b0391c120d527a9ab4bc6daf8bff7ea5d03cf7..d490a95f89f21536fce4f403b86399160abefc23 100644 --- a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm +++ b/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm @@ -195,6 +195,7 @@ - (void)sendEndIfNeeded @@ -2385,10 +2272,10 @@ index 506ebb25fa290f27a75674a6fe5506fc311910d6..07d34c567b42aca08b188243c3f036f6 [self sendSpeechEndIfNeeded]; diff --git a/Source/WebCore/PlatformWPE.cmake b/Source/WebCore/PlatformWPE.cmake -index 2aada6f29a04eb3fb0530c47d0fb76f8e3d1bb9f..b936f5862a246c9bf30adbb593c348450b1510ba 100644 +index 9a7c34a144f55c4d333ebd6f5e86aa9fcec3f9f4..8c55646049ac55cd8dc483ce75bbb12030ef7c68 100644 --- a/Source/WebCore/PlatformWPE.cmake +++ b/Source/WebCore/PlatformWPE.cmake -@@ -59,6 +59,8 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS +@@ -60,6 +60,8 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS platform/graphics/gbm/PlatformDisplayGBM.h platform/graphics/libwpe/PlatformDisplayLibWPE.h @@ -2398,13 +2285,13 @@ index 2aada6f29a04eb3fb0530c47d0fb76f8e3d1bb9f..b936f5862a246c9bf30adbb593c34845 set(CSS_VALUE_PLATFORM_DEFINES "HAVE_OS_DARK_MODE_SUPPORT=1") diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt -index 7b59e7fab81dbf2fa1847b40f1aac9437c6af62d..689a87649ab0a1aef273528d41840cca6ced46fe 100644 +index c22eb8b9b958976182c3ce078035f3f6238bb297..fcf83f02fdff9b91143d264a2e72ac2062125541 100644 --- a/Source/WebCore/SourcesCocoa.txt +++ b/Source/WebCore/SourcesCocoa.txt -@@ -716,3 +716,9 @@ testing/cocoa/WebViewVisualIdentificationOverlay.mm +@@ -721,3 +721,9 @@ testing/cocoa/WebViewVisualIdentificationOverlay.mm platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify platform/graphics/cocoa/GraphicsContextGLCocoa.mm @no-unify - platform/graphics/cv/GraphicsContextGLCVCocoa.cpp @no-unify + platform/graphics/cv/GraphicsContextGLCVCocoa.mm @no-unify + +// Playwright begin +JSTouch.cpp @@ -2458,12 +2345,12 @@ index 3c68a8ed10cd24cffd26b4b70c3adad8eb6ba91f..b36dee714fdceba5248922bfb6d20469 +JSSpeechSynthesisEventInit.cpp +// Playwright: end. diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj -index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b0c8cc322 100644 +index a30a792bb3990e024a09567fa5f21631858fb58d..55746a752863d94b440e8b401309dd69484af2c0 100644 --- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj -@@ -6224,6 +6224,13 @@ - EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE3A4FF0C7A430600956A37 /* ColorMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; +@@ -6329,6 +6329,13 @@ EDEC98030AED7E170059137F /* WebCorePrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = EDEC98020AED7E170059137F /* WebCorePrefix.h */; }; + EE0C7E042CE845CB0043DAF8 /* CSSPositionTryRule.h in Headers */ = {isa = PBXBuildFile; fileRef = EE0C7E002CE845CB0043DAF8 /* CSSPositionTryRule.h */; }; EFCC6C8F20FE914400A2321B /* CanvasActivityRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */; settings = {ATTRIBUTES = (Private, ); }; }; + F050E16823AC9C080011CE47 /* PlatformTouchEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F050E16623AC9C070011CE47 /* PlatformTouchEvent.h */; settings = {ATTRIBUTES = (Private, ); }; }; + F050E16A23AD660C0011CE47 /* Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F050E16923AD660C0011CE47 /* Touch.cpp */; }; @@ -2475,7 +2362,7 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b F12171F616A8CF0B000053CA /* WebVTTElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F12171F416A8BC63000053CA /* WebVTTElement.h */; }; F32BDCD92363AACA0073B6AE /* UserGestureEmulationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = F32BDCD72363AACA0073B6AE /* UserGestureEmulationScope.h */; }; F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; -@@ -20367,6 +20374,14 @@ +@@ -20816,6 +20823,14 @@ EE7A169F2C607BFA0057B563 /* StartViewTransitionOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StartViewTransitionOptions.h; sourceTree = ""; }; EFB7287B2124C73D005C2558 /* CanvasActivityRecord.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasActivityRecord.cpp; sourceTree = ""; }; EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasActivityRecord.h; sourceTree = ""; }; @@ -2490,7 +2377,7 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b F12171F316A8BC63000053CA /* WebVTTElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTElement.cpp; sourceTree = ""; }; F12171F416A8BC63000053CA /* WebVTTElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTElement.h; sourceTree = ""; }; F32BDCD52363AAC90073B6AE /* UserGestureEmulationScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserGestureEmulationScope.cpp; sourceTree = ""; }; -@@ -28052,6 +28067,11 @@ +@@ -28555,6 +28570,11 @@ BC4A5324256055590028C592 /* TextDirectionSubmenuInclusionBehavior.h */, 2D4F96F11A1ECC240098BF88 /* TextIndicator.cpp */, 2D4F96F21A1ECC240098BF88 /* TextIndicator.h */, @@ -2502,7 +2389,7 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b F48570A42644C76D00C05F71 /* TranslationContextMenuInfo.h */, F4E1965F21F26E4E00285078 /* UndoItem.cpp */, 2ECDBAD521D8906300F00ECD /* UndoItem.h */, -@@ -34451,6 +34471,8 @@ +@@ -35368,6 +35388,8 @@ 29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */, 1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */, 1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */, @@ -2511,7 +2398,7 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b 0FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */, 935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */, F491A66A2A9FEFA300F96146 /* PlatformWheelEvent.serialization.in */, -@@ -37208,6 +37230,7 @@ +@@ -38149,6 +38171,7 @@ AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */, 6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */, 6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */, @@ -2519,7 +2406,7 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b 7CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */, 7CE7FA591EF882300060C9D6 /* DocumentTouch.h */, A8185F3209765765005826D9 /* DocumentType.cpp */, -@@ -41975,6 +41998,8 @@ +@@ -43001,6 +43024,8 @@ F4E90A3C2B52038E002DA469 /* PlatformTextAlternatives.h in Headers */, 0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */, 074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */, @@ -2528,7 +2415,7 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b CDD08ABD277E542600EA3755 /* PlatformTrackConfiguration.h in Headers */, CD1F9B022700323D00617EB6 /* PlatformVideoColorPrimaries.h in Headers */, CD1F9B01270020B700617EB6 /* PlatformVideoColorSpace.h in Headers */, -@@ -43261,6 +43286,7 @@ +@@ -44322,6 +44347,7 @@ 0F54DD081881D5F5003EEDBB /* Touch.h in Headers */, 71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */, 0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */, @@ -2536,7 +2423,7 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b 0F54DD0A1881D5F5003EEDBB /* TouchList.h in Headers */, 070334D71459FFD5008D8D45 /* TrackBase.h in Headers */, BE88E0C21715CE2600658D98 /* TrackListBase.h in Headers */, -@@ -44423,6 +44449,8 @@ +@@ -45498,6 +45524,8 @@ 2D22830323A8470700364B7E /* CursorMac.mm in Sources */, 5CBD59592280E926002B22AA /* CustomHeaderFields.cpp in Sources */, 07E4BDBF2A3A5FAB000D5509 /* DictationCaretAnimator.cpp in Sources */, @@ -2545,7 +2432,7 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b 7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */, 4667EA3E2968D9DA00BAB1E2 /* GameControllerHapticEffect.mm in Sources */, 46FE73D32968E52000B8064C /* GameControllerHapticEngines.mm in Sources */, -@@ -44511,6 +44539,9 @@ +@@ -45587,6 +45615,9 @@ CE88EE262414467B007F29C2 /* TextAlternativeWithRange.mm in Sources */, BE39137129B267F500FA5D4F /* TextTransformCocoa.cpp in Sources */, 51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */, @@ -2556,10 +2443,10 @@ index 391eed371e8c521098e78df1990dd5dd0a2e1c52..0eb1418a2d334e58faf5011bc65f797b 538EC8021F96AF81004D22A8 /* UnifiedSource1.cpp in Sources */, 538EC8051F96AF81004D22A8 /* UnifiedSource2-mm.mm in Sources */, diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp -index 409ba22d242695a6612a1a2217bb555bd1a382cf..18d6af9e268b353d639aee78642576d6de96fc60 100644 +index 8d5aae2faffe469a44fdeee680b0a608487eb750..9389e0f7a372120cea95d95ee74ad59ff0810f62 100644 --- a/Source/WebCore/accessibility/AccessibilityObject.cpp +++ b/Source/WebCore/accessibility/AccessibilityObject.cpp -@@ -69,6 +69,7 @@ +@@ -70,6 +70,7 @@ #include "HTMLTableSectionElement.h" #include "HTMLTextAreaElement.h" #include "HitTestResult.h" @@ -2567,7 +2454,7 @@ index 409ba22d242695a6612a1a2217bb555bd1a382cf..18d6af9e268b353d639aee78642576d6 #include "LocalFrame.h" #include "LocalizedStrings.h" #include "MathMLNames.h" -@@ -4018,7 +4019,12 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const +@@ -4039,7 +4040,12 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const if (roleValue() == AccessibilityRole::ApplicationDialog) return AccessibilityObjectInclusion::IncludeObject; @@ -2581,33 +2468,11 @@ index 409ba22d242695a6612a1a2217bb555bd1a382cf..18d6af9e268b353d639aee78642576d6 } bool AccessibilityObject::isWithinHiddenWebArea() const -diff --git a/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp b/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp -index bdfc31aa68fb0cf0e71351ae86b2af8a903a3c57..fbe06025d4147848cc4c7f3e3bac299da8c98f85 100644 ---- a/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp -+++ b/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp -@@ -289,7 +289,7 @@ String AccessibilityObjectAtspi::text() const - if (!value.isNull()) - return value; - -- auto text = m_coreObject->textUnderElement(TextUnderElementMode(TextUnderElementMode::Children::IncludeAllChildren)); -+ auto text = m_coreObject->textUnderElement({ TextUnderElementMode::Children::IncludeAllChildren }); - if (auto* renderer = m_coreObject->renderer()) { - if (is(*renderer) && downcast(*renderer).markerRenderer()) { - if (renderer->style().direction() == TextDirection::LTR) { -@@ -315,7 +315,7 @@ unsigned AccessibilityObject::getLengthForTextRange() const - textLength = downcast(*renderer).text().length(); - - if (!textLength && allowsTextRanges()) -- textLength = textUnderElement(TextUnderElementMode(TextUnderElementMode::Children::IncludeAllChildren)).length(); -+ textLength = textUnderElement({ TextUnderElementMode::Children::IncludeAllChildren }).length(); - - return textLength; - } diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h -index 479938f501c65222a5820087c578184d64169dec..9bf7df2bc66c77b92edb1f93887922071d539458 100644 +index 73946c90c05b0df97746d1e0b67b29274176f081..4bb2265f523ee4fb21ddda22819420ccdb9b154c 100644 --- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h +++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h -@@ -185,6 +185,8 @@ namespace WebCore { +@@ -186,6 +186,8 @@ namespace WebCore { macro(DelayNode) \ macro(DeprecationReportBody) \ macro(DigitalCredential) \ @@ -2617,7 +2482,7 @@ index 479938f501c65222a5820087c578184d64169dec..9bf7df2bc66c77b92edb1f9388792207 macro(DynamicsCompressorNode) \ macro(ElementInternals) \ diff --git a/Source/WebCore/css/query/MediaQueryFeatures.cpp b/Source/WebCore/css/query/MediaQueryFeatures.cpp -index a4f2b2d167f77b19104daa9c56f62ae76485cb1a..c877d2439414452c4dfb79a6881dcf85e1d35fa0 100644 +index db901b29c12a0d49a5898d05421a813a627b8dc0..1ea6b452ecce001e3d3729a2c86c47fa9174b562 100644 --- a/Source/WebCore/css/query/MediaQueryFeatures.cpp +++ b/Source/WebCore/css/query/MediaQueryFeatures.cpp @@ -364,7 +364,11 @@ const FeatureSchema& forcedColors() @@ -2644,10 +2509,10 @@ index a4f2b2d167f77b19104daa9c56f62ae76485cb1a..c877d2439414452c4dfb79a6881dcf85 case ForcedAccessibilityValue::On: return true; diff --git a/Source/WebCore/dom/DataTransfer.cpp b/Source/WebCore/dom/DataTransfer.cpp -index 0aec57b302c54f2b02beaeec4a9a6733612212a9..726895552b252b83cdb4f9dd87867a6afc3ed101 100644 +index 2e0a6ccf6778b23f4338c981ae3799c589beccab..4d6b5c864dad7719cedd5668f7d32428be904248 100644 --- a/Source/WebCore/dom/DataTransfer.cpp +++ b/Source/WebCore/dom/DataTransfer.cpp -@@ -512,6 +512,14 @@ Ref DataTransfer::createForDrag(const Document& document) +@@ -520,6 +520,14 @@ Ref DataTransfer::createForDrag(const Document& document) return adoptRef(*new DataTransfer(StoreMode::ReadWrite, Pasteboard::createForDragAndDrop(PagePasteboardContext::create(document.pageID())), Type::DragAndDropData)); } @@ -2663,10 +2528,10 @@ index 0aec57b302c54f2b02beaeec4a9a6733612212a9..726895552b252b83cdb4f9dd87867a6a { auto dataTransfer = adoptRef(*new DataTransfer(StoreMode::ReadWrite, makeUnique(), Type::DragAndDropData)); diff --git a/Source/WebCore/dom/DataTransfer.h b/Source/WebCore/dom/DataTransfer.h -index 6ca2550bf509381165e5da22cc894ccf6378f45c..535bd1b05e8d90b291235cfc3cb425084455ff26 100644 +index 6327b8ff7709ed58bfd8140e59af87cb3a1f2b51..562812425187e2bae137abb4903a1497d6c4fbab 100644 --- a/Source/WebCore/dom/DataTransfer.h +++ b/Source/WebCore/dom/DataTransfer.h -@@ -91,6 +91,9 @@ public: +@@ -92,6 +92,9 @@ public: #if ENABLE(DRAG_SUPPORT) static Ref createForDrag(const Document&); @@ -2873,7 +2738,7 @@ index 7813532cc52d582c42aebc979a1ecd1137765f08..c01cbd53ad2430a6ffab9a80fc73e74a #endif // USE(LIBWPE) diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp -index e582d1bc610c7794c4ad181511317d2378b9248b..4c6be4b94913a4649b33f1989def3433455b7109 100644 +index 26e7ca561e3923e2b11da48e777348d3928bff53..a151c289dcd1aef5e0f26faaa7785137296829b8 100644 --- a/Source/WebCore/html/FileInputType.cpp +++ b/Source/WebCore/html/FileInputType.cpp @@ -37,6 +37,7 @@ @@ -2884,7 +2749,7 @@ index e582d1bc610c7794c4ad181511317d2378b9248b..4c6be4b94913a4649b33f1989def3433 #include "LocalFrame.h" #include "LocalizedStrings.h" #include "MIMETypeRegistry.h" -@@ -158,6 +159,11 @@ void FileInputType::handleDOMActivateEvent(Event& event) +@@ -160,6 +161,11 @@ void FileInputType::handleDOMActivateEvent(Event& event) if (input.isDisabledFormControl()) return; @@ -2896,7 +2761,7 @@ index e582d1bc610c7794c4ad181511317d2378b9248b..4c6be4b94913a4649b33f1989def3433 if (!UserGestureIndicator::processingUserGesture()) return; -@@ -346,7 +352,9 @@ void FileInputType::setFiles(RefPtr&& files, RequestIcon shouldRequest +@@ -348,7 +354,9 @@ void FileInputType::setFiles(RefPtr&& files, RequestIcon shouldRequest pathsChanged = true; else { for (unsigned i = 0; i < length; ++i) { @@ -2908,28 +2773,28 @@ index e582d1bc610c7794c4ad181511317d2378b9248b..4c6be4b94913a4649b33f1989def3433 break; } diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp -index 9cffa4217cecadfc6813da5fa1a92ec1ca9b8796..32da50b05bb8563e0ded48734451a8e9967e48af 100644 +index ee592715641d111078aec266c9b35c0eea9a6f48..bc403a764837abce3c7771c31c4909b6c0de211e 100644 --- a/Source/WebCore/inspector/InspectorController.cpp +++ b/Source/WebCore/inspector/InspectorController.cpp -@@ -290,6 +290,8 @@ void InspectorController::disconnectFrontend(FrontendChannel& frontendChannel) +@@ -300,6 +300,8 @@ void InspectorController::disconnectFrontend(FrontendChannel& frontendChannel) // Unplug all instrumentations since they aren't needed now. InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgents.get()); + -+ m_pauseWhenShown = false; ++ m_pauseOnStart = PauseCondition::DONT_PAUSE; } m_inspectorClient->frontendCountChanged(m_frontendRouter->frontendCount()); -@@ -309,6 +311,8 @@ void InspectorController::disconnectAllFrontends() +@@ -319,6 +321,8 @@ void InspectorController::disconnectAllFrontends() // The frontend should call setInspectorFrontendClient(nullptr) under closeWindow(). ASSERT(!m_inspectorFrontendClient); -+ m_pauseWhenShown = false; ++ m_pauseOnStart = PauseCondition::DONT_PAUSE; + if (!m_frontendRouter->hasFrontends()) return; -@@ -397,8 +401,8 @@ void InspectorController::inspect(Node* node) +@@ -402,8 +406,8 @@ void InspectorController::inspect(Node* node) if (!enabled()) return; @@ -2940,25 +2805,35 @@ index 9cffa4217cecadfc6813da5fa1a92ec1ca9b8796..32da50b05bb8563e0ded48734451a8e9 ensureDOMAgent().inspect(node); } -@@ -541,4 +545,24 @@ void InspectorController::didComposite(LocalFrame& frame) +@@ -546,4 +550,34 @@ void InspectorController::didComposite(LocalFrame& frame) InspectorInstrumentation::didComposite(frame); } -+void InspectorController::pauseWhenShown() ++void InspectorController::pauseOnStart(PauseCondition condition) +{ -+ m_pauseWhenShown = true; ++ m_pauseOnStart = condition; +} + +void InspectorController::resumeIfPausedInNewWindow() +{ -+ m_pauseWhenShown = false; ++ m_pauseOnStart = PauseCondition::DONT_PAUSE; +} + -+void InspectorController::didShowNewWindow() ++void InspectorController::didFinishPageCreation() +{ -+ if (!m_pauseWhenShown) -+ return; -+ while (m_pauseWhenShown) { ++ if (m_pauseOnStart == PauseCondition::WHEN_CREATION_FINISHED) ++ runLoopWhilePaused(); ++} ++ ++void InspectorController::didShowPage() ++{ ++ if (m_pauseOnStart == PauseCondition::WHEN_SHOWN) ++ runLoopWhilePaused(); ++} ++ ++void InspectorController::runLoopWhilePaused() ++{ ++ while (m_pauseOnStart != PauseCondition::DONT_PAUSE) { + if (RunLoop::cycle() == RunLoop::CycleResult::Stop) + break; + } @@ -2966,25 +2841,35 @@ index 9cffa4217cecadfc6813da5fa1a92ec1ca9b8796..32da50b05bb8563e0ded48734451a8e9 + } // namespace WebCore diff --git a/Source/WebCore/inspector/InspectorController.h b/Source/WebCore/inspector/InspectorController.h -index 41cb9b8d298fbb4cb833346015fbf67c78577dbd..fa1b489eadfc5469bfeec6a35336ffa7fba2c8c1 100644 +index 4f5c1e836876710a554455ec53733f72db63de58..774c4a66af84664a7a83ba0790d147f7bbb4236a 100644 --- a/Source/WebCore/inspector/InspectorController.h +++ b/Source/WebCore/inspector/InspectorController.h -@@ -103,6 +103,10 @@ public: +@@ -106,6 +106,12 @@ public: WEBCORE_EXPORT void willComposite(LocalFrame&); WEBCORE_EXPORT void didComposite(LocalFrame&); -+ WEBCORE_EXPORT void pauseWhenShown(); ++ enum class PauseCondition { DONT_PAUSE, WHEN_SHOWN, WHEN_CREATION_FINISHED }; ++ WEBCORE_EXPORT void pauseOnStart(PauseCondition); + WEBCORE_EXPORT void resumeIfPausedInNewWindow(); -+ WEBCORE_EXPORT void didShowNewWindow(); ++ WEBCORE_EXPORT void didShowPage(); ++ WEBCORE_EXPORT void didFinishPageCreation(); + // Testing support. - WEBCORE_EXPORT bool isUnderTest() const; + bool isUnderTest() const { return m_isUnderTest; } void setIsUnderTest(bool isUnderTest) { m_isUnderTest = isUnderTest; } -@@ -156,6 +160,7 @@ private: +@@ -136,6 +142,7 @@ private: + + PageAgentContext pageAgentContext(); + void createLazyAgents(); ++ void runLoopWhilePaused(); + + WeakRef m_page; + Ref m_instrumentingAgents; +@@ -159,6 +166,7 @@ private: bool m_isAutomaticInspection { false }; bool m_pauseAfterInitialization = { false }; bool m_didCreateLazyAgents { false }; -+ bool m_pauseWhenShown { false }; ++ PauseCondition m_pauseOnStart { PauseCondition::DONT_PAUSE }; }; } // namespace WebCore @@ -3509,7 +3394,7 @@ index c028341e84e59a6b1b16107fd74feb21f70b12ab..d385418ac34e8f315f201801a2c65226 + } diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp -index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f9b17ae3f 100644 +index 418700e6fc6432afb3b5091d12ced07a263cccea..a160505c5f419566d2ad83d62f368614dec16ea2 100644 --- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp +++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp @@ -55,6 +55,7 @@ @@ -3570,7 +3455,7 @@ index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f } static Color parseOptionalConfigColor(const String& fieldName, JSON::Object& configObject) -@@ -196,6 +205,20 @@ static bool parseQuad(Ref&& quadArray, FloatQuad* quad) +@@ -195,6 +204,20 @@ static bool parseQuad(Ref&& quadArray, FloatQuad* quad) return true; } @@ -3588,10 +3473,10 @@ index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f + renderer->absoluteQuads(quads); +} + - class RevalidateStyleAttributeTask { + class RevalidateStyleAttributeTask final : public CanMakeCheckedPtr { WTF_MAKE_TZONE_ALLOCATED_INLINE(RevalidateStyleAttributeTask); - public: -@@ -470,6 +493,20 @@ Node* InspectorDOMAgent::assertNode(Inspector::Protocol::ErrorString& errorStrin + WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(RevalidateStyleAttributeTask); +@@ -476,6 +499,20 @@ Node* InspectorDOMAgent::assertNode(Inspector::Protocol::ErrorString& errorStrin return node.get(); } @@ -3612,7 +3497,7 @@ index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f Document* InspectorDOMAgent::assertDocument(Inspector::Protocol::ErrorString& errorString, Inspector::Protocol::DOM::NodeId nodeId) { RefPtr node = assertNode(errorString, nodeId); -@@ -1544,16 +1581,7 @@ Inspector::Protocol::ErrorStringOr InspectorDOMAgent::highlightNode(std::o +@@ -1550,16 +1587,7 @@ Inspector::Protocol::ErrorStringOr InspectorDOMAgent::highlightNode(std::o Inspector::Protocol::ErrorStringOr InspectorDOMAgent::highlightNode(std::optional&& nodeId, const Inspector::Protocol::Runtime::RemoteObjectId& objectId, Ref&& highlightInspectorObject, RefPtr&& gridOverlayInspectorObject, RefPtr&& flexOverlayInspectorObject, std::optional&& showRulers) { Inspector::Protocol::ErrorString errorString; @@ -3630,7 +3515,7 @@ index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f if (!node) return makeUnexpected(errorString); -@@ -1808,15 +1836,155 @@ Inspector::Protocol::ErrorStringOr InspectorDOMAgent::setInspectedNode(Ins +@@ -1814,15 +1842,155 @@ Inspector::Protocol::ErrorStringOr InspectorDOMAgent::setInspectedNode(Ins return { }; } @@ -3789,7 +3674,7 @@ index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f if (!object) return makeUnexpected("Missing injected script for given nodeId"_s); -@@ -3082,7 +3250,7 @@ Inspector::Protocol::ErrorStringOr InspectorDO +@@ -3088,7 +3256,7 @@ Inspector::Protocol::ErrorStringOr InspectorDO return makeUnexpected("Missing node for given path"_s); } @@ -3798,7 +3683,7 @@ index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f { Document* document = &node->document(); if (auto* templateHost = document->templateDocumentHost()) -@@ -3091,12 +3259,18 @@ RefPtr InspectorDOMAgent::resolveNod +@@ -3097,12 +3265,18 @@ RefPtr InspectorDOMAgent::resolveNod if (!frame) return nullptr; @@ -3820,7 +3705,7 @@ index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f } Node* InspectorDOMAgent::scriptValueAsNode(JSC::JSValue value) -@@ -3204,4 +3378,89 @@ Inspector::Protocol::ErrorStringOr> In +@@ -3210,4 +3384,89 @@ Inspector::Protocol::ErrorStringOr> In #endif } @@ -3911,10 +3796,10 @@ index f2d47e0b0a15f48600bb6edd10430073ea60d9ee..20ee16a8c858599340ae33869baa188f + } // namespace WebCore diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.h b/Source/WebCore/inspector/agents/InspectorDOMAgent.h -index 978176d20859bf70ce8e44acbb052ceca9463b06..44fd236a64a05290c9f3cbf0b17398f74c711d3b 100644 +index ab0499c5e381855f55fa89227f4da05c7bcf40b1..e506a903ba60173b47135d5b18cfa0d3cdd8783e 100644 --- a/Source/WebCore/inspector/agents/InspectorDOMAgent.h +++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.h -@@ -58,6 +58,7 @@ namespace WebCore { +@@ -59,6 +59,7 @@ namespace WebCore { class AXCoreObject; class CharacterData; @@ -3922,7 +3807,7 @@ index 978176d20859bf70ce8e44acbb052ceca9463b06..44fd236a64a05290c9f3cbf0b17398f7 class DOMEditor; class Document; class Element; -@@ -92,6 +93,7 @@ public: +@@ -94,6 +95,7 @@ public: static String toErrorString(Exception&&); static String documentURLString(Document*); @@ -3930,7 +3815,7 @@ index 978176d20859bf70ce8e44acbb052ceca9463b06..44fd236a64a05290c9f3cbf0b17398f7 // We represent embedded doms as a part of the same hierarchy. Hence we treat children of frame owners differently. // We also skip whitespace text nodes conditionally. Following methods encapsulate these specifics. -@@ -135,7 +137,7 @@ public: +@@ -137,7 +139,7 @@ public: Inspector::Protocol::ErrorStringOr> performSearch(const String& query, RefPtr&& nodeIds, std::optional&& caseSensitive); Inspector::Protocol::ErrorStringOr>> getSearchResults(const String& searchId, int fromIndex, int toIndex); Inspector::Protocol::ErrorStringOr discardSearchResults(const String& searchId); @@ -3939,7 +3824,7 @@ index 978176d20859bf70ce8e44acbb052ceca9463b06..44fd236a64a05290c9f3cbf0b17398f7 Inspector::Protocol::ErrorStringOr>> getAttributes(Inspector::Protocol::DOM::NodeId); #if PLATFORM(IOS_FAMILY) Inspector::Protocol::ErrorStringOr setInspectModeEnabled(bool, RefPtr&& highlightConfig, RefPtr&& gridOverlayConfig, RefPtr&& flexOverlayConfig); -@@ -172,6 +174,10 @@ public: +@@ -174,6 +176,10 @@ public: Inspector::Protocol::ErrorStringOr setInspectedNode(Inspector::Protocol::DOM::NodeId); Inspector::Protocol::ErrorStringOr setAllowEditingUserAgentShadowTrees(bool); Inspector::Protocol::ErrorStringOr> getMediaStats(Inspector::Protocol::DOM::NodeId); @@ -3950,7 +3835,7 @@ index 978176d20859bf70ce8e44acbb052ceca9463b06..44fd236a64a05290c9f3cbf0b17398f7 // InspectorInstrumentation Inspector::Protocol::DOM::NodeId identifierForNode(Node&); -@@ -213,7 +219,7 @@ public: +@@ -215,7 +221,7 @@ public: Node* nodeForId(Inspector::Protocol::DOM::NodeId); Inspector::Protocol::DOM::NodeId boundNodeId(const Node*); @@ -3959,7 +3844,7 @@ index 978176d20859bf70ce8e44acbb052ceca9463b06..44fd236a64a05290c9f3cbf0b17398f7 bool handleMousePress(); void mouseDidMoveOverElement(const HitTestResult&, OptionSet); void inspect(Node*); -@@ -225,12 +231,15 @@ public: +@@ -227,12 +233,15 @@ public: void reset(); Node* assertNode(Inspector::Protocol::ErrorString&, Inspector::Protocol::DOM::NodeId); @@ -3975,7 +3860,7 @@ index 978176d20859bf70ce8e44acbb052ceca9463b06..44fd236a64a05290c9f3cbf0b17398f7 private: #if ENABLE(VIDEO) void mediaMetricsTimerFired(); -@@ -260,7 +269,6 @@ private: +@@ -262,7 +271,6 @@ private: void processAccessibilityChildren(AXCoreObject&, JSON::ArrayOf&); Node* nodeForPath(const String& path); @@ -3984,7 +3869,7 @@ index 978176d20859bf70ce8e44acbb052ceca9463b06..44fd236a64a05290c9f3cbf0b17398f7 void discardBindings(); diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp -index adbedee377dad747f03b98cfdcf719b4283e51b2..475365f50feeb28354fa3e86ff847a6fd65c8a21 100644 +index fb89241329b3d1c4ae05c985070b27f2c360ccf6..442a3d263b6ec7e72ff60ec0d3507d96ed5642eb 100644 --- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp +++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp @@ -59,6 +59,7 @@ @@ -4140,13 +4025,14 @@ index eda400879afb10b687fcbb317c9fdbb3be9c94cd..f3a382c44b53e6b1507fc046e22bff68 } // namespace WebCore diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp -index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb98c6cc8fb 100644 +index 4393f2d882d6fc829ce69115e6f5e6db93eee1a6..9e58595296aaa3770ad660515e362c7045ad6082 100644 --- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp +++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp -@@ -32,19 +32,26 @@ +@@ -32,19 +32,27 @@ #include "config.h" #include "InspectorPageAgent.h" ++#include "AXCoreObject.h" +#include "AXObjectCache.h" +#include "BackForwardController.h" #include "CachedResource.h" @@ -4170,11 +4056,9 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 #include "HTMLNames.h" #include "ImageBuffer.h" #include "InspectorClient.h" -@@ -55,10 +62,13 @@ - #include "LocalFrame.h" - #include "LocalFrameView.h" +@@ -57,8 +65,12 @@ #include "MIMETypeRegistry.h" --#include "MemoryCache.h" + #include "MemoryCache.h" #include "Page.h" +#include "PageRuntimeAgent.h" +#include "PlatformScreen.h" @@ -4185,7 +4069,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 #include "ScriptController.h" #include "ScriptSourceCode.h" #include "SecurityOrigin.h" -@@ -66,15 +76,23 @@ +@@ -66,14 +78,23 @@ #include "StyleScope.h" #include "Theme.h" #include @@ -4205,24 +4089,23 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 #include #include #include --#include +#include + #include #if ENABLE(APPLICATION_MANIFEST) - #include "CachedApplicationManifest.h" -@@ -95,6 +113,11 @@ using namespace Inspector; +@@ -95,6 +116,11 @@ using namespace Inspector; WTF_MAKE_TZONE_ALLOCATED_IMPL(InspectorPageAgent); -+static HashMap>& createdUserWorlds() { -+ static NeverDestroyed>> nameToWorld; ++static UncheckedKeyHashMap>& createdUserWorlds() { ++ static NeverDestroyed>> nameToWorld; + return nameToWorld; +} + static bool decodeBuffer(std::span buffer, const String& textEncodingName, String* result) { if (buffer.data()) { -@@ -341,6 +364,7 @@ InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorClien +@@ -347,6 +373,7 @@ InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorClien , m_frontendDispatcher(makeUnique(context.frontendRouter)) , m_backendDispatcher(Inspector::PageBackendDispatcher::create(context.backendDispatcher, this)) , m_inspectedPage(context.inspectedPage) @@ -4230,7 +4113,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 , m_client(client) , m_overlay(overlay) { -@@ -370,12 +394,20 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::enable() +@@ -376,12 +403,20 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::enable() defaultUserPreferencesDidChange(); @@ -4251,7 +4134,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 setShowPaintRects(false); #if !PLATFORM(IOS_FAMILY) -@@ -427,6 +459,22 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::reload(std::optiona +@@ -434,6 +469,22 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::reload(std::optiona return { }; } @@ -4274,7 +4157,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 Inspector::Protocol::ErrorStringOr InspectorPageAgent::navigate(const String& url) { auto* localMainFrame = dynamicDowncast(m_inspectedPage.mainFrame()); -@@ -450,6 +498,13 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideUserAgent(c +@@ -457,6 +508,13 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideUserAgent(c return { }; } @@ -4288,7 +4171,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Inspector::Protocol::Page::Setting setting, std::optional&& value) { auto& inspectedPageSettings = m_inspectedPage.settings(); -@@ -463,6 +518,12 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Ins +@@ -470,6 +528,12 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Ins inspectedPageSettings.setAuthorAndUserStylesEnabledInspectorOverride(value); return { }; @@ -4301,8 +4184,8 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 case Inspector::Protocol::Page::Setting::ICECandidateFilteringEnabled: inspectedPageSettings.setICECandidateFilteringEnabledInspectorOverride(value); return { }; -@@ -488,6 +549,38 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Ins - inspectedPageSettings.setNeedsSiteSpecificQuirksInspectorOverride(value); +@@ -496,6 +560,45 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Ins + m_client->setDeveloperPreferenceOverride(InspectorClient::DeveloperPreference::NeedsSiteSpecificQuirks, value); return { }; +#if ENABLE(NOTIFICATIONS) @@ -4331,6 +4214,13 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 +#endif + return { }; + ++ case Protocol::Page::Setting::FixedBackgroundsPaintRelativeToDocument: ++ // Enable this setting similar to iOS to ensure scrolling works with ++ // `background-attachment: fixed`. ++ // See https://github.com/microsoft/playwright/issues/31551. ++ inspectedPageSettings.setFixedBackgroundsPaintRelativeToDocument(value.value_or(false)); ++ return { }; ++ +#if ENABLE(POINTER_LOCK) + case Protocol::Page::Setting::PointerLockEnabled: + inspectedPageSettings.setPointerLockEnabled(value.value_or(false)); @@ -4340,7 +4230,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 case Inspector::Protocol::Page::Setting::ScriptEnabled: inspectedPageSettings.setScriptEnabledInspectorOverride(value); return { }; -@@ -500,6 +593,12 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Ins +@@ -508,6 +611,12 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Ins inspectedPageSettings.setShowRepaintCounterInspectorOverride(value); return { }; @@ -4353,7 +4243,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 case Inspector::Protocol::Page::Setting::WebSecurityEnabled: inspectedPageSettings.setWebSecurityEnabledInspectorOverride(value); return { }; -@@ -900,15 +999,16 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::setShowPaintRects(b +@@ -908,15 +1017,16 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::setShowPaintRects(b return { }; } @@ -4375,7 +4265,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 } void InspectorPageAgent::frameNavigated(LocalFrame& frame) -@@ -916,13 +1016,38 @@ void InspectorPageAgent::frameNavigated(LocalFrame& frame) +@@ -924,13 +1034,38 @@ void InspectorPageAgent::frameNavigated(LocalFrame& frame) m_frontendDispatcher->frameNavigated(buildObjectForFrame(&frame)); } @@ -4395,7 +4285,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 + + String processIDString = frameID.left(dotPos); + uint64_t pid = strtoull(processIDString.ascii().data(), 0, 10); -+ auto processID = LegacyNullableObjectIdentifier(pid); ++ auto processID = ObjectIdentifier(pid); + String frameIDString = frameID.substring(dotPos + 1); + uint64_t frameIDNumber = strtoull(frameIDString.ascii().data(), 0, 10); + return WebCore::FrameIdentifier { @@ -4417,7 +4307,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 } Frame* InspectorPageAgent::frameForId(const Inspector::Protocol::Network::FrameId& frameId) -@@ -934,20 +1059,21 @@ String InspectorPageAgent::frameId(Frame* frame) +@@ -942,20 +1077,21 @@ String InspectorPageAgent::frameId(Frame* frame) { if (!frame) return emptyString(); @@ -4447,7 +4337,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 } LocalFrame* InspectorPageAgent::assertFrame(Inspector::Protocol::ErrorString& errorString, const Inspector::Protocol::Network::FrameId& frameId) -@@ -958,11 +1084,6 @@ LocalFrame* InspectorPageAgent::assertFrame(Inspector::Protocol::ErrorString& er +@@ -966,11 +1102,6 @@ LocalFrame* InspectorPageAgent::assertFrame(Inspector::Protocol::ErrorString& er return frame; } @@ -4459,7 +4349,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 void InspectorPageAgent::frameStartedLoading(LocalFrame& frame) { m_frontendDispatcher->frameStartedLoading(frameId(&frame)); -@@ -973,9 +1094,9 @@ void InspectorPageAgent::frameStoppedLoading(LocalFrame& frame) +@@ -981,9 +1112,9 @@ void InspectorPageAgent::frameStoppedLoading(LocalFrame& frame) m_frontendDispatcher->frameStoppedLoading(frameId(&frame)); } @@ -4471,7 +4361,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 } void InspectorPageAgent::frameClearedScheduledNavigation(Frame& frame) -@@ -1022,6 +1143,12 @@ void InspectorPageAgent::defaultUserPreferencesDidChange() +@@ -1030,6 +1161,12 @@ void InspectorPageAgent::defaultUserPreferencesDidChange() m_frontendDispatcher->defaultUserPreferencesDidChange(WTFMove(defaultUserPreferences)); } @@ -4484,7 +4374,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 #if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT) void InspectorPageAgent::defaultAppearanceDidChange() { -@@ -1035,6 +1162,9 @@ void InspectorPageAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapp +@@ -1043,6 +1180,9 @@ void InspectorPageAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapp return; if (m_bootstrapScript.isEmpty()) @@ -4494,8 +4384,8 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 return; frame.script().evaluateIgnoringException(ScriptSourceCode(m_bootstrapScript, JSC::SourceTaintedOrigin::Untainted, URL { "web-inspector://bootstrap.js"_str })); -@@ -1082,6 +1212,51 @@ void InspectorPageAgent::didRecalculateStyle() - m_overlay->update(); +@@ -1090,6 +1230,51 @@ void InspectorPageAgent::didRecalculateStyle() + protectedOverlay()->update(); } +void InspectorPageAgent::runOpenPanel(HTMLInputElement* element, bool* intercept) @@ -4546,7 +4436,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 Ref InspectorPageAgent::buildObjectForFrame(LocalFrame* frame) { ASSERT_ARG(frame, frame); -@@ -1179,6 +1354,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent) +@@ -1187,6 +1372,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent) userAgent = m_userAgentOverride; } @@ -4559,7 +4449,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 void InspectorPageAgent::applyEmulatedMedia(AtomString& media) { if (!m_emulatedMedia.isEmpty()) -@@ -1206,11 +1387,13 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::snapshotNode(Insp +@@ -1214,11 +1405,13 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::snapshotNode(Insp return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes); } @@ -4574,7 +4464,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 IntRect rectangle(x, y, width, height); auto* localMainFrame = dynamicDowncast(m_inspectedPage.mainFrame()); -@@ -1224,6 +1407,43 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::snapshotRect(int +@@ -1232,6 +1425,43 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::snapshotRect(int return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes); } @@ -4610,7 +4500,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 +Protocol::ErrorStringOr InspectorPageAgent::setTouchEmulationEnabled(bool enabled) +{ + setScreenHasTouchDeviceOverride(enabled); -+ m_inspectedPage.settings().setTouchEventsEnabled(enabled); ++ m_inspectedPage.settings().setTouchEventDOMAttributesEnabled(enabled); + return { }; +} + @@ -4618,7 +4508,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 #if ENABLE(WEB_ARCHIVE) && USE(CF) Inspector::Protocol::ErrorStringOr InspectorPageAgent::archive() { -@@ -1240,7 +1460,6 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::archive() +@@ -1248,7 +1478,6 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::archive() } #endif @@ -4626,7 +4516,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 Inspector::Protocol::ErrorStringOr InspectorPageAgent::setScreenSizeOverride(std::optional&& width, std::optional&& height) { if (width.has_value() != height.has_value()) -@@ -1258,6 +1477,508 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::setScreenSizeOverri +@@ -1266,6 +1495,498 @@ Inspector::Protocol::ErrorStringOr InspectorPageAgent::setScreenSizeOverri localMainFrame->setOverrideScreenSize(FloatSize(width.value_or(0), height.value_or(0))); return { }; } @@ -4759,8 +4649,6 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 + return "ImageMap"_s; + case AccessibilityRole::ImageMapLink: + return "ImageMapLink"_s; -+ case AccessibilityRole::Incrementor: -+ return "Incrementor"_s; + case AccessibilityRole::Insertion: + return "Insertion"_s; + case AccessibilityRole::Label: @@ -4805,8 +4693,6 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 + return "Menu"_s; + case AccessibilityRole::MenuBar: + return "MenuBar"_s; -+ case AccessibilityRole::MenuButton: -+ return "MenuButton"_s; + case AccessibilityRole::MenuItem: + return "MenuItem"_s; + case AccessibilityRole::MenuItemCheckbox: @@ -4843,14 +4729,8 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 + return "Row"_s; + case AccessibilityRole::RowGroup: + return "RowGroup"_s; -+ case AccessibilityRole::RubyBase: -+ return "RubyBase"_s; -+ case AccessibilityRole::RubyBlock: -+ return "RubyBlock"_s; + case AccessibilityRole::RubyInline: + return "RubyInline"_s; -+ case AccessibilityRole::RubyRun: -+ return "RubyRun"_s; + case AccessibilityRole::RubyText: + return "RubyText"_s; + case AccessibilityRole::ScrollArea: @@ -4939,7 +4819,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 + return "Unknown"_s; +} + -+static Ref snapshotForAXObject(RefPtr axObject, Node* nodeToFind) ++static Ref snapshotForAXObject(WTF::RefPtr axObject, Node* nodeToFind) +{ + auto axNode = Inspector::Protocol::Page::AXNode::create() + .setRole(roleFromObject(axObject)) @@ -5029,7 +4909,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 + if (!axObject->children().isEmpty()) { + Ref> children = JSON::ArrayOf::create(); + for (auto& childObject : axObject->children()) -+ children->addItem(snapshotForAXObject(childObject, nodeToFind)); ++ children->addItem(snapshotForAXObject(childObject.ptr(), nodeToFind)); + axNode->setChildren(WTFMove(children)); + } + return axNode; @@ -5137,7 +5017,7 @@ index 85f9e83e59abc5a1089a4f2b56f0dab99437d948..22843714b46b158faa929be669638cb9 } // namespace WebCore diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.h b/Source/WebCore/inspector/agents/InspectorPageAgent.h -index 4f78a536c4030b8065d189aacc378d56d3451198..8ffac8bf16c00543ab8cf410e603b06204357714 100644 +index dee4a5033bc6e948e301e9b681d82758c4e92689..6a3db5c90e798693ac3cd6547207713dfa947364 100644 --- a/Source/WebCore/inspector/agents/InspectorPageAgent.h +++ b/Source/WebCore/inspector/agents/InspectorPageAgent.h @@ -32,8 +32,10 @@ @@ -5151,8 +5031,8 @@ index 4f78a536c4030b8065d189aacc378d56d3451198..8ffac8bf16c00543ab8cf410e603b062 #include #include #include -@@ -42,11 +44,16 @@ - #include +@@ -43,11 +45,16 @@ + #include #include +namespace Inspector { @@ -5168,7 +5048,7 @@ index 4f78a536c4030b8065d189aacc378d56d3451198..8ffac8bf16c00543ab8cf410e603b062 class InspectorClient; class InspectorOverlay; class LocalFrame; -@@ -79,6 +86,8 @@ public: +@@ -80,6 +87,8 @@ public: OtherResource, }; @@ -5177,7 +5057,7 @@ index 4f78a536c4030b8065d189aacc378d56d3451198..8ffac8bf16c00543ab8cf410e603b062 static bool sharedBufferContent(RefPtr&&, const String& textEncodingName, bool withBase64Encode, String* result); static Vector cachedResourcesForFrame(LocalFrame*); static void resourceContent(Inspector::Protocol::ErrorString&, LocalFrame*, const URL&, String* result, bool* base64Encoded); -@@ -99,8 +108,11 @@ public: +@@ -100,8 +109,11 @@ public: Inspector::Protocol::ErrorStringOr enable(); Inspector::Protocol::ErrorStringOr disable(); Inspector::Protocol::ErrorStringOr reload(std::optional&& ignoreCache, std::optional&& revalidateAllResources); @@ -5189,7 +5069,7 @@ index 4f78a536c4030b8065d189aacc378d56d3451198..8ffac8bf16c00543ab8cf410e603b062 Inspector::Protocol::ErrorStringOr overrideSetting(Inspector::Protocol::Page::Setting, std::optional&& value); Inspector::Protocol::ErrorStringOr overrideUserPreference(Inspector::Protocol::Page::UserPreferenceName, std::optional&&); Inspector::Protocol::ErrorStringOr>> getCookies(); -@@ -116,45 +128,65 @@ public: +@@ -117,45 +129,65 @@ public: #endif Inspector::Protocol::ErrorStringOr setShowPaintRects(bool); Inspector::Protocol::ErrorStringOr setEmulatedMedia(const String&); @@ -5260,19 +5140,19 @@ index 4f78a536c4030b8065d189aacc378d56d3451198..8ffac8bf16c00543ab8cf410e603b062 double timestamp(); + void ensureUserWorldsExistInAllFrames(const Vector&); - static bool mainResourceContent(LocalFrame*, bool withBase64Encode, String* result); - static bool dataContent(std::span data, const String& textEncodingName, bool withBase64Encode, String* result); -@@ -170,17 +202,21 @@ private: + Ref protectedOverlay() const; + +@@ -173,17 +205,22 @@ private: RefPtr m_backendDispatcher; Page& m_inspectedPage; + Inspector::InjectedScriptManager& m_injectedScriptManager; InspectorClient* m_client { nullptr }; - InspectorOverlay* m_overlay { nullptr }; + WeakRef m_overlay; - WeakHashMap m_frameToIdentifier; MemoryCompactRobinHoodHashMap> m_identifierToFrame; -- HashMap m_loaderToIdentifier; + HashMap m_loaderToIdentifier; String m_userAgentOverride; + String m_platformOverride; AtomString m_emulatedMedia; @@ -5452,18 +5332,18 @@ index b70ca7636463b9199bcbb21bfea055870ba33b34..25fdc23bfb71985fe1af04bddc360d11 } // namespace WebCore diff --git a/Source/WebCore/loader/CookieJar.h b/Source/WebCore/loader/CookieJar.h -index 2b0060e70df5765f37426eb32c98540dd3a51356..e4682fb4fad491c906ea4b5b1e98c0631e387a7b 100644 +index ae94a796b1d0c9fee05ec342cfa58b8a0248875b..c0b3bcdaca1f473cca7299db3de69329766daf0b 100644 --- a/Source/WebCore/loader/CookieJar.h +++ b/Source/WebCore/loader/CookieJar.h -@@ -46,6 +46,7 @@ struct CookieStoreGetOptions; +@@ -47,6 +47,7 @@ struct CookieStoreGetOptions; class NetworkStorageSession; class StorageSessionProvider; struct SameSiteInfo; +class ResourceLoader; - class WEBCORE_EXPORT CookieJar : public RefCounted, public CanMakeWeakPtr { + class WEBCORE_EXPORT CookieJar : public RefCountedAndCanMakeWeakPtr { public: -@@ -78,6 +79,9 @@ public: +@@ -79,6 +80,9 @@ public: virtual void clearCache() { } virtual void clearCacheForHost(const String&) { } @@ -5474,10 +5354,10 @@ index 2b0060e70df5765f37426eb32c98540dd3a51356..e4682fb4fad491c906ea4b5b1e98c063 protected: static SameSiteInfo sameSiteInfo(const Document&, IsForDOMCookieAccess = IsForDOMCookieAccess::No); diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp -index 1d674f45b41aa4dbd9c864e7da1af9cef5d6d127..2a004184f256d909ca19de77913162adde5d8486 100644 +index ef8c9cbc1c786172081c9b04bdc55a65ae40593e..8eff311ff2b9e88cb484c01d935b97f23eec47ba 100644 --- a/Source/WebCore/loader/DocumentLoader.cpp +++ b/Source/WebCore/loader/DocumentLoader.cpp -@@ -769,8 +769,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc +@@ -765,8 +765,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc if (!didReceiveRedirectResponse) return completionHandler(WTFMove(newRequest)); @@ -5488,7 +5368,7 @@ index 1d674f45b41aa4dbd9c864e7da1af9cef5d6d127..2a004184f256d909ca19de77913162ad switch (navigationPolicyDecision) { case NavigationPolicyDecision::IgnoreLoad: case NavigationPolicyDecision::LoadWillContinueInAnotherProcess: -@@ -1538,11 +1540,17 @@ void DocumentLoader::detachFromFrame(LoadWillContinueInAnotherProcess loadWillCo +@@ -1535,11 +1537,17 @@ void DocumentLoader::detachFromFrame(LoadWillContinueInAnotherProcess loadWillCo if (auto navigationID = std::exchange(m_navigationID, { })) m_frame->loader().client().documentLoaderDetached(*navigationID, loadWillContinueInAnotherProcess); @@ -5509,23 +5389,23 @@ index 1d674f45b41aa4dbd9c864e7da1af9cef5d6d127..2a004184f256d909ca19de77913162ad { m_navigationID = navigationID; diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h -index ef3d4036774db95ef807ad01744f1a9ce715fd81..50d78b5c277d034b8455e2df6f3dbf3d8425ea29 100644 +index 710b76ba378d0242be7b9fb469203fcd9ec18252..23ebc0f38d5a5a19b23c748149fbbc8aa36059df 100644 --- a/Source/WebCore/loader/DocumentLoader.h +++ b/Source/WebCore/loader/DocumentLoader.h -@@ -217,6 +217,8 @@ public: +@@ -218,6 +218,8 @@ public: WEBCORE_EXPORT virtual void detachFromFrame(LoadWillContinueInAnotherProcess); + void replacedByFragmentNavigation(LocalFrame&); + WEBCORE_EXPORT FrameLoader* frameLoader() const; - CheckedPtr checkedFrameLoader() const; + RefPtr protectedFrameLoader() const; WEBCORE_EXPORT SubresourceLoader* mainResourceLoader() const; diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp -index 4061749da911827143c27b1db9c685a08c9bde6c..060da14ddac0bcf30f010ed9e65cc652b767a8bd 100644 +index b38b5938d46ef64d1736bc8b2eebd166d18983a9..0f315f7c0739ea210493a6d19520421c48c645d0 100644 --- a/Source/WebCore/loader/FrameLoader.cpp +++ b/Source/WebCore/loader/FrameLoader.cpp -@@ -1306,6 +1306,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr stat +@@ -1323,6 +1323,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr stat } m_client->dispatchDidNavigateWithinPage(); @@ -5533,7 +5413,7 @@ index 4061749da911827143c27b1db9c685a08c9bde6c..060da14ddac0bcf30f010ed9e65cc652 document->statePopped(stateObject ? stateObject.releaseNonNull() : SerializedScriptValue::nullValue()); m_client->dispatchDidPopStateWithinPage(); -@@ -1828,6 +1829,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t +@@ -1846,6 +1847,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t const String& httpMethod = loader->request().httpMethod(); if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) { @@ -5541,17 +5421,18 @@ index 4061749da911827143c27b1db9c685a08c9bde6c..060da14ddac0bcf30f010ed9e65cc652 RefPtr oldDocumentLoader = m_documentLoader; NavigationAction action { frame->protectedDocument().releaseNonNull(), loader->request(), InitiatedByMainFrame::Unknown, loader->isRequestFromClientOrUserInput(), policyChecker().loadType(), isFormSubmission }; -@@ -1864,7 +1866,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t +@@ -1882,8 +1884,10 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t } RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()) || frame->history().provisionalItem()); + InspectorInstrumentation::willCheckNavigationPolicy(m_frame); + auto policyDecisionMode = loader->triggeringAction().isFromNavigationAPI() ? PolicyDecisionMode::Synchronous : PolicyDecisionMode::Asynchronous; policyChecker().checkNavigationPolicy(ResourceRequest(loader->request()), ResourceResponse { } /* redirectResponse */, loader, WTFMove(formState), [this, frame, allowNavigationToInvalidURL, completionHandler = completionHandlerCaller.release()] (const ResourceRequest& request, WeakPtr&& weakFormState, NavigationPolicyDecision navigationPolicyDecision) mutable { + InspectorInstrumentation::didCheckNavigationPolicy(m_frame, navigationPolicyDecision != NavigationPolicyDecision::ContinueLoad); continueLoadAfterNavigationPolicy(request, RefPtr { weakFormState.get() }.get(), navigationPolicyDecision, allowNavigationToInvalidURL); completionHandler(); - }, PolicyDecisionMode::Asynchronous); -@@ -3148,10 +3152,15 @@ String FrameLoader::userAgent(const URL& url) const + }, policyDecisionMode); +@@ -3169,10 +3173,15 @@ String FrameLoader::userAgent(const URL& url) const String FrameLoader::navigatorPlatform() const { @@ -5569,7 +5450,7 @@ index 4061749da911827143c27b1db9c685a08c9bde6c..060da14ddac0bcf30f010ed9e65cc652 } void FrameLoader::dispatchOnloadEvents() -@@ -3615,6 +3624,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error, LoadWill +@@ -3646,6 +3655,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error, LoadWill checkCompleted(); if (frame->page()) checkLoadComplete(loadWillContinueInAnotherProcess); @@ -5578,7 +5459,7 @@ index 4061749da911827143c27b1db9c685a08c9bde6c..060da14ddac0bcf30f010ed9e65cc652 } void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, const SecurityOrigin* requesterOrigin, bool shouldContinue, NavigationHistoryBehavior historyHandling) -@@ -4499,9 +4510,6 @@ String FrameLoader::referrer() const +@@ -4530,9 +4541,6 @@ String FrameLoader::referrer() const void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() { @@ -5588,7 +5469,7 @@ index 4061749da911827143c27b1db9c685a08c9bde6c..060da14ddac0bcf30f010ed9e65cc652 Vector> worlds; ScriptController::getAllWorlds(worlds); for (auto& world : worlds) -@@ -4511,13 +4519,12 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() +@@ -4542,13 +4550,12 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world) { Ref frame = m_frame.get(); @@ -5621,10 +5502,10 @@ index 91340dc21042f545592b442bc42dbceed06219b2..f3591fe333761b10a25ddaf4a4f8d721 virtual bool shouldPerformSecurityChecks() const { return false; } virtual bool havePerformedSecurityChecks(const ResourceResponse&) const { return false; } diff --git a/Source/WebCore/loader/NavigationScheduler.cpp b/Source/WebCore/loader/NavigationScheduler.cpp -index f8dc5dbb8e4583bc8d595cee184adf58aa765c6c..8c2d54e5d2543b71a733e7356c99e3c1b7642341 100644 +index 6ca24eb3b82344b60b33298989857a68ecdc39cb..ca17da3fb6148a1789618f501f85069c1c9b9ead 100644 --- a/Source/WebCore/loader/NavigationScheduler.cpp +++ b/Source/WebCore/loader/NavigationScheduler.cpp -@@ -766,7 +766,7 @@ void NavigationScheduler::startTimer() +@@ -812,7 +812,7 @@ void NavigationScheduler::startTimer() Seconds delay = 1_s * m_redirect->delay(); m_timer.startOneShot(delay); @@ -5633,20 +5514,8 @@ index f8dc5dbb8e4583bc8d595cee184adf58aa765c6c..8c2d54e5d2543b71a733e7356c99e3c1 m_redirect->didStartTimer(frame, m_timer); // m_redirect may be null on return (e.g. the client canceled the load) } -diff --git a/Source/WebCore/loader/PolicyChecker.cpp b/Source/WebCore/loader/PolicyChecker.cpp -index 8f9d997be3da9d2374e1fb50d48c48cdc6542559..4aae7eef8933ddd6a4cae28bc4ef43d3567fda68 100644 ---- a/Source/WebCore/loader/PolicyChecker.cpp -+++ b/Source/WebCore/loader/PolicyChecker.cpp -@@ -46,6 +46,7 @@ - #include "HTMLFrameOwnerElement.h" - #include "HTMLPlugInElement.h" - #include "HitTestResult.h" -+#include "InspectorInstrumentation.h" - #include "LocalDOMWindow.h" - #include "LocalFrame.h" - #include "LocalFrameLoaderClient.h" diff --git a/Source/WebCore/loader/ProgressTracker.cpp b/Source/WebCore/loader/ProgressTracker.cpp -index b74c5258454b0df9f74aa8a5297674b733925685..b6c3999745368c7f7e2e6176bfca6dc09c49f539 100644 +index ac208c49bca32e5f2215d881733f2c11396bd18f..7ea80906fea17a592a00c63c8d810a53d893ae45 100644 --- a/Source/WebCore/loader/ProgressTracker.cpp +++ b/Source/WebCore/loader/ProgressTracker.cpp @@ -161,6 +161,8 @@ void ProgressTracker::progressCompleted(LocalFrame& frame) @@ -5661,17 +5530,17 @@ index b74c5258454b0df9f74aa8a5297674b733925685..b6c3999745368c7f7e2e6176bfca6dc0 @@ -187,8 +189,6 @@ void ProgressTracker::finalProgressComplete() m_client->progressFinished(*frame); protectedPage()->progressFinished(*frame); - frame->checkedLoader()->loadProgressingStatusChanged(); + frame->protectedLoader()->loadProgressingStatusChanged(); - - InspectorInstrumentation::frameStoppedLoading(*frame); } void ProgressTracker::incrementProgress(ResourceLoaderIdentifier identifier, const ResourceResponse& response) diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp -index 3d811dc807fe10e78221357f76e6851e5788b43e..a1bd9d168a1faa39bc8d122da5e3e8192eb392ce 100644 +index 3b4b56c0dc2845f6993cc1d60c65648be74b125f..f8ec6be1f5765b58ced741a348c62a82cf446d3c 100644 --- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp +++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp -@@ -1136,8 +1136,11 @@ ResourceErrorOr> CachedResourceLoader::requ +@@ -1154,8 +1154,11 @@ ResourceErrorOr> CachedResourceLoader::requ request.updateReferrerPolicy(document() ? document()->referrerPolicy() : ReferrerPolicy::Default); @@ -5685,7 +5554,7 @@ index 3d811dc807fe10e78221357f76e6851e5788b43e..a1bd9d168a1faa39bc8d122da5e3e819 if (RefPtr documentLoader = m_documentLoader.get()) { bool madeHTTPS { request.resourceRequest().wasSchemeOptimisticallyUpgraded() }; -@@ -1754,8 +1757,9 @@ Vector> CachedResourceLoader::allCachedSVGImages() const +@@ -1773,8 +1776,9 @@ Vector> CachedResourceLoader::allCachedSVGImages() const ResourceErrorOr> CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequest&& request) { @@ -5698,10 +5567,10 @@ index 3d811dc807fe10e78221357f76e6851e5788b43e..a1bd9d168a1faa39bc8d122da5e3e819 ASSERT(m_document); if (request.charset().isEmpty() && m_document && (type == CachedResource::Type::Script || type == CachedResource::Type::CSSStyleSheet)) diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h -index bcc9390a5c7b00e0f3d41baea920453e7b3ac73a..07898280d090a78949876042a64103d4ead18d7f 100644 +index b7d2b467606fb5406769b1c49384aac7b41f7298..633dc036f990798a6d62bb0b50125c6cd5df44aa 100644 --- a/Source/WebCore/page/ChromeClient.h +++ b/Source/WebCore/page/ChromeClient.h -@@ -341,7 +341,7 @@ public: +@@ -351,7 +351,7 @@ public: #endif #if ENABLE(ORIENTATION_EVENTS) @@ -5711,10 +5580,10 @@ index bcc9390a5c7b00e0f3d41baea920453e7b3ac73a..07898280d090a78949876042a64103d4 #if ENABLE(INPUT_TYPE_COLOR) diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp -index cedf16dffeceb7941de7eca75f6c6800ecacf06f..03296e2cc70e9bd4468ff6161a16378077b0f69c 100644 +index 7e2577a7e448e543a2c5a8fcdae04a72dc4076f0..99348d9bf3c65d2c732a80a652fe592084d8441c 100644 --- a/Source/WebCore/page/EventHandler.cpp +++ b/Source/WebCore/page/EventHandler.cpp -@@ -4372,6 +4372,12 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr +@@ -4398,6 +4398,12 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr if (!document) return false; @@ -5727,7 +5596,15 @@ index cedf16dffeceb7941de7eca75f6c6800ecacf06f..03296e2cc70e9bd4468ff6161a163780 dragState().dataTransfer = DataTransfer::createForDrag(*document); auto hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No; -@@ -5001,7 +5007,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve +@@ -4984,6 +4990,7 @@ static HitTestResult hitTestResultInFrame(LocalFrame* frame, const LayoutPoint& + return result; + } + ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN + HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEvent& event) + { + Ref frame = m_frame.get(); +@@ -5059,7 +5066,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve // Increment the platform touch id by 1 to avoid storing a key of 0 in the hashmap. unsigned touchPointTargetKey = point.id() + 1; @@ -5736,7 +5613,7 @@ index cedf16dffeceb7941de7eca75f6c6800ecacf06f..03296e2cc70e9bd4468ff6161a163780 bool pointerCancelled = false; #endif RefPtr touchTarget; -@@ -5048,7 +5054,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve +@@ -5106,7 +5113,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve // we also remove it from the map. touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey); @@ -5745,7 +5622,7 @@ index cedf16dffeceb7941de7eca75f6c6800ecacf06f..03296e2cc70e9bd4468ff6161a163780 HitTestResult result = hitTestResultAtPoint(pagePoint, hitType | HitTestRequest::Type::AllowChildFrameContent); pointerTarget = result.targetElement(); pointerCancelled = (pointerTarget != touchTarget); -@@ -5071,7 +5077,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve +@@ -5129,7 +5136,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve if (!targetFrame) continue; @@ -5754,11 +5631,19 @@ index cedf16dffeceb7941de7eca75f6c6800ecacf06f..03296e2cc70e9bd4468ff6161a163780 // FIXME: WPE currently does not send touch stationary events, so create a naive TouchReleased PlatformTouchPoint // on release if the hit test result changed since the previous TouchPressed or TouchMoved if (pointState == PlatformTouchPoint::TouchReleased && pointerCancelled) { +@@ -5219,6 +5226,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve + + return swallowedEvent; + } ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN + #endif // ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS) + + #if ENABLE(TOUCH_EVENTS) diff --git a/Source/WebCore/page/FocusController.cpp b/Source/WebCore/page/FocusController.cpp -index c911a4a6ac3f89485cd69917d1f50145b0779b7e..081c8e9a23a5a5d8f4ccd2205016ca0acf2ce64a 100644 +index b945aaa8fc59d043f8177acc443f0cbba2f5bb71..fc0c93ea6cdf66d7c9a38350230cda6ed9950f17 100644 --- a/Source/WebCore/page/FocusController.cpp +++ b/Source/WebCore/page/FocusController.cpp -@@ -581,13 +581,14 @@ bool FocusController::relinquishFocusToChrome(FocusDirection direction) +@@ -586,13 +586,14 @@ bool FocusController::relinquishFocusToChrome(FocusDirection direction) return false; Ref page = m_page.get(); @@ -5776,19 +5661,19 @@ index c911a4a6ac3f89485cd69917d1f50145b0779b7e..081c8e9a23a5a5d8f4ccd2205016ca0a } diff --git a/Source/WebCore/page/FrameSnapshotting.cpp b/Source/WebCore/page/FrameSnapshotting.cpp -index 084db825e36bd46126fea95fc7183bf2e931be7e..dac3caef67600f8c7c945fd857a91140a23d0303 100644 +index ce7eca624ce26cdb4440ca6ce5e3c9f912d5f384..0104c784711709e04128495a6bf6b188fdd8021c 100644 --- a/Source/WebCore/page/FrameSnapshotting.cpp +++ b/Source/WebCore/page/FrameSnapshotting.cpp -@@ -115,7 +115,7 @@ RefPtr snapshotFrameRectWithClip(LocalFrame& frame, const IntRect& +@@ -111,7 +111,7 @@ RefPtr snapshotFrameRectWithClip(LocalFrame& frame, const IntRect& // Other paint behaviors are set by paintContentsForSnapshot. frame.view()->setPaintBehavior(paintBehavior); - float scaleFactor = frame.page()->deviceScaleFactor(); + float scaleFactor = options.flags.contains(SnapshotFlags::OmitDeviceScaleFactor) ? 1 : frame.page()->deviceScaleFactor(); + if (options.flags.contains(SnapshotFlags::PaintWith3xBaseScale)) + scaleFactor = 3; - if (frame.page()->delegatesScaling()) - scaleFactor *= frame.page()->pageScaleFactor(); -@@ -130,7 +130,13 @@ RefPtr snapshotFrameRectWithClip(LocalFrame& frame, const IntRect& +@@ -129,7 +129,13 @@ RefPtr snapshotFrameRectWithClip(LocalFrame& frame, const IntRect& if (!buffer) return nullptr; @@ -5802,7 +5687,7 @@ index 084db825e36bd46126fea95fc7183bf2e931be7e..dac3caef67600f8c7c945fd857a91140 if (!clipRects.isEmpty()) { Path clipPath; -@@ -139,7 +145,10 @@ RefPtr snapshotFrameRectWithClip(LocalFrame& frame, const IntRect& +@@ -138,7 +144,10 @@ RefPtr snapshotFrameRectWithClip(LocalFrame& frame, const IntRect& buffer->context().clipPath(clipPath); } @@ -5815,19 +5700,19 @@ index 084db825e36bd46126fea95fc7183bf2e931be7e..dac3caef67600f8c7c945fd857a91140 } diff --git a/Source/WebCore/page/FrameSnapshotting.h b/Source/WebCore/page/FrameSnapshotting.h -index 5b365008debe6b8d5a95a572a4c2725b0a7a519d..2c6ad49a45a1759f446aced179c0c5a7bfb4b07a 100644 +index 3ab70c27fef52f5d933cd2338a7c2f96e2debc88..39fc13df5ce132f8d028cd5039c607fe8963ddcf 100644 --- a/Source/WebCore/page/FrameSnapshotting.h +++ b/Source/WebCore/page/FrameSnapshotting.h -@@ -55,6 +55,7 @@ enum class SnapshotFlags : uint16_t { - Shareable = 1 << 7, +@@ -56,6 +56,7 @@ enum class SnapshotFlags : uint16_t { Accelerated = 1 << 8, ExcludeReplacedContent = 1 << 9, -+ OmitDeviceScaleFactor = 1 << 10, + PaintWith3xBaseScale = 1 << 10, ++ OmitDeviceScaleFactor = 1 << 11, }; struct SnapshotOptions { diff --git a/Source/WebCore/page/History.cpp b/Source/WebCore/page/History.cpp -index 709a8aca3d10170ce8394efaeb8eaa0eff9bfacf..40b2ccc937b36b17686cc2231e6f33ebb3e6f712 100644 +index c114526d3b536993fe20cb2452b913c01d3f65dc..0cdd416742e5a9205f8114ef84ddea3cfce03293 100644 --- a/Source/WebCore/page/History.cpp +++ b/Source/WebCore/page/History.cpp @@ -32,6 +32,7 @@ @@ -5848,7 +5733,7 @@ index 709a8aca3d10170ce8394efaeb8eaa0eff9bfacf..40b2ccc937b36b17686cc2231e6f33eb } diff --git a/Source/WebCore/page/LocalFrame.cpp b/Source/WebCore/page/LocalFrame.cpp -index 53f47ce0a1a4bccf35e183bdb1e7d7ea3208e7ed..9ce65588de61f0c2e8f6a7ee804c93c6a5520d2e 100644 +index 43cbdcdc0a278fda65592af1a7b20babf0e055e4..11efd76361ace87f0ad276525cec399e2a103595 100644 --- a/Source/WebCore/page/LocalFrame.cpp +++ b/Source/WebCore/page/LocalFrame.cpp @@ -41,6 +41,7 @@ @@ -5874,16 +5759,16 @@ index 53f47ce0a1a4bccf35e183bdb1e7d7ea3208e7ed..9ce65588de61f0c2e8f6a7ee804c93c6 +#include "NodeRenderStyle.h" #include "NodeTraversal.h" #include "Page.h" - #include "ProcessWarming.h" -@@ -189,6 +192,7 @@ LocalFrame::LocalFrame(Page& page, ClientCreator&& clientCreator, FrameIdentifie + #include "ProcessSyncClient.h" +@@ -193,6 +196,7 @@ LocalFrame::LocalFrame(Page& page, ClientCreator&& clientCreator, FrameIdentifie void LocalFrame::init() { + InspectorInstrumentation::frameAttached(this); - checkedLoader()->init(); + protectedLoader()->init(); } -@@ -405,7 +409,7 @@ void LocalFrame::orientationChanged() +@@ -409,7 +413,7 @@ void LocalFrame::orientationChanged() IntDegrees LocalFrame::orientation() const { if (RefPtr page = this->page()) @@ -5892,8 +5777,8 @@ index 53f47ce0a1a4bccf35e183bdb1e7d7ea3208e7ed..9ce65588de61f0c2e8f6a7ee804c93c6 return 0; } #endif // ENABLE(ORIENTATION_EVENTS) -@@ -1370,6 +1374,362 @@ void LocalFrame::updateSandboxFlags(SandboxFlags flags, NotifyUIProcess notifyUI - m_sandboxFlags = flags; +@@ -1381,6 +1385,364 @@ void LocalFrame::setScrollingMode(ScrollbarMode scrollingMode) + view->setCanHaveScrollbars(m_scrollingMode != ScrollbarMode::AlwaysOff); } +#if !PLATFORM(IOS_FAMILY) @@ -5942,6 +5827,7 @@ index 53f47ce0a1a4bccf35e183bdb1e7d7ea3208e7ed..9ce65588de61f0c2e8f6a7ee804c93c6 + return true; +} + ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN +Node* LocalFrame::qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, const NodeQualifier& nodeQualifierFunction, ShouldApproximate shouldApproximate, ShouldFindRootEditableElement shouldFindRootEditableElement) +{ + adjustedViewportLocation = viewportLocation; @@ -6053,6 +5939,7 @@ index 53f47ce0a1a4bccf35e183bdb1e7d7ea3208e7ed..9ce65588de61f0c2e8f6a7ee804c93c6 + + return approximateNode; +} ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_END + +Node* LocalFrame::deepestNodeAtLocation(const FloatPoint& viewportLocation) +{ @@ -6256,7 +6143,7 @@ index 53f47ce0a1a4bccf35e183bdb1e7d7ea3208e7ed..9ce65588de61f0c2e8f6a7ee804c93c6 #undef FRAME_RELEASE_LOG_ERROR diff --git a/Source/WebCore/page/LocalFrame.h b/Source/WebCore/page/LocalFrame.h -index 38fe2680b461f6a319f6b976412fff6a5af9950f..ca63f835abf84b00fb7e57361b1969400ceb8f4a 100644 +index a585d427d1e7fd0f04defd8bb0e80841356f4948..05434b295c929791a1f14ab674ea7e0390e8e0ff 100644 --- a/Source/WebCore/page/LocalFrame.h +++ b/Source/WebCore/page/LocalFrame.h @@ -28,8 +28,10 @@ @@ -6270,15 +6157,7 @@ index 38fe2680b461f6a319f6b976412fff6a5af9950f..ca63f835abf84b00fb7e57361b196940 #include "ScrollTypes.h" #include "UserScriptTypes.h" #include -@@ -71,7 +73,6 @@ namespace WebCore { - class Color; - class LocalDOMWindow; - class DataDetectionResultsStorage; --class Document; - class Editor; - class Element; - class EventHandler; -@@ -115,8 +116,8 @@ enum { +@@ -115,8 +117,8 @@ enum { }; enum OverflowScrollAction { DoNotPerformOverflowScroll, PerformOverflowScroll }; @@ -6288,7 +6167,7 @@ index 38fe2680b461f6a319f6b976412fff6a5af9950f..ca63f835abf84b00fb7e57361b196940 class LocalFrame final : public Frame { public: -@@ -226,10 +227,6 @@ public: +@@ -227,10 +229,6 @@ public: WEBCORE_EXPORT DataDetectionResultsStorage& dataDetectionResults(); #endif @@ -6299,7 +6178,7 @@ index 38fe2680b461f6a319f6b976412fff6a5af9950f..ca63f835abf84b00fb7e57361b196940 WEBCORE_EXPORT Node* deepestNodeAtLocation(const FloatPoint& viewportLocation); WEBCORE_EXPORT Node* nodeRespondingToClickEvents(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, SecurityOrigin* = nullptr); WEBCORE_EXPORT Node* nodeRespondingToDoubleClickEvent(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation); -@@ -237,6 +234,10 @@ public: +@@ -238,6 +236,10 @@ public: WEBCORE_EXPORT Node* nodeRespondingToScrollWheelEvents(const FloatPoint& viewportLocation); WEBCORE_EXPORT Node* approximateNodeAtViewportLocationLegacy(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation); @@ -6310,7 +6189,7 @@ index 38fe2680b461f6a319f6b976412fff6a5af9950f..ca63f835abf84b00fb7e57361b196940 WEBCORE_EXPORT NSArray *wordsInCurrentParagraph() const; WEBCORE_EXPORT CGRect renderRectForPoint(CGPoint, bool* isReplaced, float* fontSize) const; -@@ -304,6 +305,7 @@ public: +@@ -305,6 +307,7 @@ public: WEBCORE_EXPORT FloatSize screenSize() const; void setOverrideScreenSize(FloatSize&&); @@ -6318,7 +6197,7 @@ index 38fe2680b461f6a319f6b976412fff6a5af9950f..ca63f835abf84b00fb7e57361b196940 void selfOnlyRef(); void selfOnlyDeref(); -@@ -363,7 +365,6 @@ private: +@@ -368,7 +371,6 @@ private: #if ENABLE(DATA_DETECTION) std::unique_ptr m_dataDetectionResults; #endif @@ -6326,7 +6205,7 @@ index 38fe2680b461f6a319f6b976412fff6a5af9950f..ca63f835abf84b00fb7e57361b196940 void betterApproximateNode(const IntPoint& testPoint, const NodeQualifier&, Node*& best, Node* failedNode, IntPoint& bestPoint, IntRect& bestRect, const IntRect& testRect); bool hitTestResultAtViewportLocation(const FloatPoint& viewportLocation, HitTestResult&, IntPoint& center); -@@ -371,6 +372,7 @@ private: +@@ -376,6 +378,7 @@ private: enum class ShouldFindRootEditableElement : bool { No, Yes }; Node* qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, const NodeQualifier&, ShouldApproximate, ShouldFindRootEditableElement = ShouldFindRootEditableElement::Yes); @@ -6335,10 +6214,10 @@ index 38fe2680b461f6a319f6b976412fff6a5af9950f..ca63f835abf84b00fb7e57361b196940 ViewportArguments m_viewportArguments; diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp -index 93122d37376bc11488f27dea245534d7657e281d..1cccbbb3379a468bca19903ab1eb34cdd285a93c 100644 +index 45764553395dc05bb5dbbcebca65ae441b827ee6..4452870fa80d2233bf22720e6730ebcfb5763557 100644 --- a/Source/WebCore/page/Page.cpp +++ b/Source/WebCore/page/Page.cpp -@@ -609,6 +609,45 @@ void Page::setOverrideViewportArguments(const std::optional& +@@ -632,6 +632,45 @@ void Page::setOverrideViewportArguments(const std::optional& document->updateViewportArguments(); } @@ -6384,7 +6263,7 @@ index 93122d37376bc11488f27dea245534d7657e281d..1cccbbb3379a468bca19903ab1eb34cd ScrollingCoordinator* Page::scrollingCoordinator() { if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) { -@@ -3974,6 +4013,26 @@ void Page::setUseDarkAppearanceOverride(std::optional valueOverride) +@@ -4018,6 +4057,26 @@ void Page::setUseDarkAppearanceOverride(std::optional valueOverride) #endif } @@ -6412,10 +6291,10 @@ index 93122d37376bc11488f27dea245534d7657e281d..1cccbbb3379a468bca19903ab1eb34cd { if (insets == m_fullscreenInsets) diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h -index 55887f532ee42163e7ea0c34a31f1c8bdc0d808f..cc0d6b05a2132c96e45e956cbccabe61df434953 100644 +index 35b77368186161eef9637470b70d438f358ea6aa..2619738f4cb1e7c060435b22921aaca9e5003de0 100644 --- a/Source/WebCore/page/Page.h +++ b/Source/WebCore/page/Page.h -@@ -354,6 +354,9 @@ public: +@@ -360,6 +360,9 @@ public: const std::optional& overrideViewportArguments() const { return m_overrideViewportArguments; } WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional&); @@ -6425,7 +6304,7 @@ index 55887f532ee42163e7ea0c34a31f1c8bdc0d808f..cc0d6b05a2132c96e45e956cbccabe61 static void refreshPlugins(bool reload); WEBCORE_EXPORT PluginData& pluginData(); void clearPluginData(); -@@ -422,6 +425,10 @@ public: +@@ -431,6 +434,10 @@ public: #if ENABLE(DRAG_SUPPORT) DragController& dragController() { return m_dragController.get(); } const DragController& dragController() const { return m_dragController.get(); } @@ -6436,8 +6315,8 @@ index 55887f532ee42163e7ea0c34a31f1c8bdc0d808f..cc0d6b05a2132c96e45e956cbccabe61 #endif FocusController& focusController() const { return *m_focusController; } WEBCORE_EXPORT CheckedRef checkedFocusController() const; -@@ -605,6 +612,10 @@ public: - WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); +@@ -617,6 +624,10 @@ public: + WEBCORE_EXPORT void setUseColorAppearance(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); bool defaultUseDarkAppearance() const { return m_useDarkAppearance; } void setUseDarkAppearanceOverride(std::optional); + std::optional useReducedMotionOverride() const { return m_useReducedMotionOverride; } @@ -6447,7 +6326,7 @@ index 55887f532ee42163e7ea0c34a31f1c8bdc0d808f..cc0d6b05a2132c96e45e956cbccabe61 #if ENABLE(TEXT_AUTOSIZING) float textAutosizingWidth() const { return m_textAutosizingWidth; } -@@ -1057,6 +1068,11 @@ public: +@@ -1070,6 +1081,11 @@ public: WEBCORE_EXPORT void setInteractionRegionsEnabled(bool); #endif @@ -6459,7 +6338,7 @@ index 55887f532ee42163e7ea0c34a31f1c8bdc0d808f..cc0d6b05a2132c96e45e956cbccabe61 #if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY) DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); } #endif -@@ -1289,6 +1305,9 @@ private: +@@ -1325,6 +1341,9 @@ private: #if ENABLE(DRAG_SUPPORT) UniqueRef m_dragController; @@ -6469,7 +6348,7 @@ index 55887f532ee42163e7ea0c34a31f1c8bdc0d808f..cc0d6b05a2132c96e45e956cbccabe61 #endif std::unique_ptr m_focusController; #if ENABLE(CONTEXT_MENUS) -@@ -1369,6 +1388,8 @@ private: +@@ -1405,6 +1424,8 @@ private: bool m_useElevatedUserInterfaceLevel { false }; bool m_useDarkAppearance { false }; std::optional m_useDarkAppearanceOverride; @@ -6478,7 +6357,7 @@ index 55887f532ee42163e7ea0c34a31f1c8bdc0d808f..cc0d6b05a2132c96e45e956cbccabe61 #if ENABLE(TEXT_AUTOSIZING) float m_textAutosizingWidth { 0 }; -@@ -1549,6 +1570,11 @@ private: +@@ -1585,6 +1606,11 @@ private: #endif std::optional m_overrideViewportArguments; @@ -6491,7 +6370,7 @@ index 55887f532ee42163e7ea0c34a31f1c8bdc0d808f..cc0d6b05a2132c96e45e956cbccabe61 #if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY) RefPtr m_deviceOrientationUpdateProvider; diff --git a/Source/WebCore/page/PageConsoleClient.cpp b/Source/WebCore/page/PageConsoleClient.cpp -index 52ceeb42346f843bec6734584e7d36beb7845abd..5bf7ff1870fdd011ea16419ab517bfa6ff51d874 100644 +index 7a951f2599ee142d22318055badaa4c6b1acc53a..51fda467e6ff06249e58ca1cda5d955e68370c6c 100644 --- a/Source/WebCore/page/PageConsoleClient.cpp +++ b/Source/WebCore/page/PageConsoleClient.cpp @@ -437,4 +437,9 @@ Ref PageConsoleClient::protectedPage() const @@ -6517,10 +6396,10 @@ index 153fc36199f26adbfb61cbef6744ffe31a68b951..cc667e06700013fd5e994467e19536d2 Ref protectedPage() const; diff --git a/Source/WebCore/page/PointerCaptureController.cpp b/Source/WebCore/page/PointerCaptureController.cpp -index f1040d32a97110c5b8d802450f36794f1d0f34fd..469c6cc7674578e5f2623a23c3f151bc65d278c1 100644 +index e24fbc296a8bbfb784eaeb3b773b6384c2679b7b..a172c06103bb20d20e905d7cacec0830fd464f02 100644 --- a/Source/WebCore/page/PointerCaptureController.cpp +++ b/Source/WebCore/page/PointerCaptureController.cpp -@@ -198,7 +198,7 @@ bool PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier(Poi +@@ -204,7 +204,7 @@ bool PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier(Poi return capturingData && capturingData->preventsCompatibilityMouseEvents; } @@ -6529,7 +6408,7 @@ index f1040d32a97110c5b8d802450f36794f1d0f34fd..469c6cc7674578e5f2623a23c3f151bc static bool hierarchyHasCapturingEventListeners(Element* target, const AtomString& eventName) { for (RefPtr currentNode = target; currentNode; currentNode = currentNode->parentInComposedTree()) { -@@ -503,7 +503,7 @@ void PointerCaptureController::cancelPointer(PointerID pointerId, const IntPoint +@@ -554,7 +554,7 @@ void PointerCaptureController::cancelPointer(PointerID pointerId, const IntPoint capturingData->pendingTargetOverride = nullptr; capturingData->state = CapturingData::State::Cancelled; @@ -6539,10 +6418,10 @@ index f1040d32a97110c5b8d802450f36794f1d0f34fd..469c6cc7674578e5f2623a23c3f151bc #endif diff --git a/Source/WebCore/page/PointerCaptureController.h b/Source/WebCore/page/PointerCaptureController.h -index 99676da258803e8348ae1fee23e7e3883fb0b888..0477e6dff22db0e7f2d78cb8ecb863ec5fea136f 100644 +index 9245baa0c317bb3dfa8a2a1666953d320cb85ee1..55445eb29e095ef4b6d6918728885a267a3b8183 100644 --- a/Source/WebCore/page/PointerCaptureController.h +++ b/Source/WebCore/page/PointerCaptureController.h -@@ -59,7 +59,7 @@ public: +@@ -60,7 +60,7 @@ public: RefPtr pointerEventForMouseEvent(const MouseEvent&, PointerID, const String& pointerType); @@ -6551,8 +6430,8 @@ index 99676da258803e8348ae1fee23e7e3883fb0b888..0477e6dff22db0e7f2d78cb8ecb863ec void dispatchEventForTouchAtIndex(EventTarget&, const PlatformTouchEvent&, unsigned, bool isPrimary, WindowProxy&, const IntPoint&); #endif -@@ -79,12 +79,12 @@ private: - +@@ -81,12 +81,12 @@ private: + WeakPtr activeDocument; RefPtr pendingTargetOverride; RefPtr targetOverride; -#if ENABLE(TOUCH_EVENTS) && (PLATFORM(IOS_FAMILY) || PLATFORM(WPE)) @@ -6740,7 +6619,7 @@ index 29492dd39b08db28aad2bf2439eb3e2bbcf25ad7..2b603cb8440b1b5057c87fcbd6909c61 ) diff --git a/Source/WebCore/platform/DragData.h b/Source/WebCore/platform/DragData.h -index 34f49853b1d5ac8d8409bbd36d203bf7dfbb08e8..6d2808d510413e89ae9851733437d15b7660cd4a 100644 +index 2ebb3221cb3818f20abc7b7c3307ea7644f49d49..e0bffb6f5adee0b0a202340f633c2def1955b384 100644 --- a/Source/WebCore/platform/DragData.h +++ b/Source/WebCore/platform/DragData.h @@ -47,7 +47,7 @@ typedef void* DragDataRef; @@ -6880,18 +6759,10 @@ index 63ffd6ca32c3baee03db2a9419c4f7e9de45388a..c60c7a8d1f110472117c8c4e969fd05f #endif diff --git a/Source/WebCore/platform/PlatformScreen.cpp b/Source/WebCore/platform/PlatformScreen.cpp -index ae46341ba71c7f6df7c607bd852338cdb7f83fe1..b318c0771192344a6891c1f097cb0b93dabe8237 100644 +index ae46341ba71c7f6df7c607bd852338cdb7f83fe1..a11db190d86f5e3ec4c7cee6c5b3ea93f2380646 100644 --- a/Source/WebCore/platform/PlatformScreen.cpp +++ b/Source/WebCore/platform/PlatformScreen.cpp -@@ -25,6 +25,7 @@ - - #include "config.h" - #include "PlatformScreen.h" -+#include "DeprecatedGlobalSettings.h" - - #if PLATFORM(COCOA) || PLATFORM(GTK) || (PLATFORM(WPE) && ENABLE(WPE_PLATFORM)) - -@@ -73,3 +74,25 @@ const ScreenData* screenData(PlatformDisplayID screenDisplayID) +@@ -73,3 +73,25 @@ const ScreenData* screenData(PlatformDisplayID screenDisplayID) } // namespace WebCore #endif // PLATFORM(COCOA) || PLATFORM(GTK) || (PLATFORM(WPE) && ENABLE(WPE_PLATFORM)) @@ -6918,10 +6789,10 @@ index ae46341ba71c7f6df7c607bd852338cdb7f83fe1..b318c0771192344a6891c1f097cb0b93 +} // namespace WebCore +#endif diff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h -index f10a43820dca4bdeafe67b330243a698f3334f5a..a8e3a9b96cd8b3b36174da42abc0ccac6cb5b17c 100644 +index 6ffb85dbfcc01be76ef498f4f7478747912ca7d7..a6e0a3347e36a01b9aeca524747d14ff63f4c529 100644 --- a/Source/WebCore/platform/PlatformScreen.h +++ b/Source/WebCore/platform/PlatformScreen.h -@@ -151,13 +151,18 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr); +@@ -154,12 +154,16 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr); #endif #if ENABLE(TOUCH_EVENTS) @@ -6941,8 +6812,6 @@ index f10a43820dca4bdeafe67b330243a698f3334f5a..a8e3a9b96cd8b3b36174da42abc0ccac #endif #endif -+ - } // namespace WebCore diff --git a/Source/WebCore/platform/PlatformTouchEvent.h b/Source/WebCore/platform/PlatformTouchEvent.h index 23f011953c66f401553bedfaef3485af215ae083..a73da2ebe47f0d8dc57f3d0159e8f299abb61c96 100644 --- a/Source/WebCore/platform/PlatformTouchEvent.h @@ -6970,7 +6839,7 @@ index 34715d27b529750fc866db87cd330b5184286771..3eefa218af075f76d98012cdeae7e4b3 // create a PlatformTouchPoint of type TouchCancelled artificially PlatformTouchPoint(unsigned id, State state, IntPoint screenPos, IntPoint pos) diff --git a/Source/WebCore/platform/Skia.cmake b/Source/WebCore/platform/Skia.cmake -index 616a44dba554ac1429c074f1fe9509a3f544ef1e..73c9b605221dbd036713afa9d1935902444833b3 100644 +index b3a6d971c8e9935c8ee6fe16c91f4210a8ee22dc..72380815f319976a132079bb4b41bf5b429c87e3 100644 --- a/Source/WebCore/platform/Skia.cmake +++ b/Source/WebCore/platform/Skia.cmake @@ -13,6 +13,7 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS @@ -6980,7 +6849,7 @@ index 616a44dba554ac1429c074f1fe9509a3f544ef1e..73c9b605221dbd036713afa9d1935902 + platform/graphics/skia/ImageBufferUtilitiesSkia.h platform/graphics/skia/SkiaHarfBuzzFont.h platform/graphics/skia/SkiaHarfBuzzFontCache.h - ) + platform/graphics/skia/SkiaPaintingEngine.h diff --git a/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp b/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp index 8f36dda49adafd4a542e24e3c4dd33d42be00d27..953b6f88f8deb597d2179a8cec7b717b7cf6dc5a 100644 --- a/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp @@ -7162,7 +7031,7 @@ index eb9710f7d61121f2414c8aa6734dc27653e292bb..9c0c7b350a6140681242ce36a180d686 // Determine the string for this item. const UChar* str = cp.data() + items[i].iCharPos; diff --git a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp -index 979ec06ecd698b60066dc6775bf1b647624baa56..14d06fdd5b7b7df2a1942ed975cebf117beb4d1f 100644 +index 979ec06ecd698b60066dc6775bf1b647624baa56..1b3056aada9f352cc558f85fea0fd6c494b5201f 100644 --- a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp +++ b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp @@ -37,8 +37,10 @@ @@ -7180,9 +7049,9 @@ index 979ec06ecd698b60066dc6775bf1b647624baa56..14d06fdd5b7b7df2a1942ed975cebf11 } -+static const HashMap& gdkToWindowsKeyCodeMap() ++static const UncheckedKeyHashMap& gdkToWindowsKeyCodeMap() +{ -+ static HashMap* result; ++ static UncheckedKeyHashMap* result; + static std::once_flag once; + std::call_once( + once, @@ -7405,7 +7274,7 @@ index 979ec06ecd698b60066dc6775bf1b647624baa56..14d06fdd5b7b7df2a1942ed975cebf11 + GDK_KEY_Subtitle, + GDK_KEY_Video + }; -+ result = new HashMap(); ++ result = new UncheckedKeyHashMap(); + for (unsigned gdkKeyCode : gdkKeyCodes) { + int winKeyCode = PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode(gdkKeyCode); + // If several gdk key codes map to the same win key code first one is used. @@ -7445,19 +7314,6 @@ index 9ea18000578dd47295b2ce4da7fa00b39b5cac81..41bdd2d741b469acb134220df7e0c102 { auto* display = gdk_display_get_default(); if (!display) -diff --git a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp -index c65514727c0e915e06c460cba7530f9ae2d8e0e6..7836b21f81e77b869099f78ad6bdd0788df7eb70 100644 ---- a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp -+++ b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp -@@ -39,6 +39,8 @@ - - namespace WebCore { - -+ScrollbarThemeGtk::~ScrollbarThemeGtk() = default; -+ - ScrollbarTheme& ScrollbarTheme::nativeTheme() - { - static ScrollbarThemeGtk theme; diff --git a/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp b/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp index ae439e30f1fb239d18e1164e8896dfb272c75673..4cf29eda13d1f2dc2f03750c0ef8985b17de7f50 100644 --- a/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp @@ -7666,7 +7522,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..4cf29eda13d1f2dc2f03750c0ef8985b #endif // USE(LIBWPE) diff --git a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp -index a8674916429908cabb86bd95dc5b3da217e1556b..75cbb518708ebd459b1ed8e3206cdb02e502067d 100644 +index a8674916429908cabb86bd95dc5b3da217e1556b..6a464e2b0c1c45cd4e8effba678b8dde9dd870da 100644 --- a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp +++ b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp @@ -30,9 +30,11 @@ @@ -7685,9 +7541,9 @@ index a8674916429908cabb86bd95dc5b3da217e1556b..75cbb518708ebd459b1ed8e3206cdb02 return 0; } -+static const HashMap& WPEToWindowsKeyCodeMap() ++static const UncheckedKeyHashMap& WPEToWindowsKeyCodeMap() +{ -+ static HashMap* result; ++ static UncheckedKeyHashMap* result; + static std::once_flag once; + std::call_once( + once, @@ -7910,7 +7766,7 @@ index a8674916429908cabb86bd95dc5b3da217e1556b..75cbb518708ebd459b1ed8e3206cdb02 + WPE_KEY_Subtitle, + WPE_KEY_Video + }; -+ result = new HashMap(); ++ result = new UncheckedKeyHashMap(); + for (unsigned WPEKeyCode : WPEKeyCodes) { + int winKeyCode = PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode(WPEKeyCode); + // If several gdk key codes map to the same win key code first one is used. @@ -7929,7 +7785,7 @@ index a8674916429908cabb86bd95dc5b3da217e1556b..75cbb518708ebd459b1ed8e3206cdb02 { switch (val) { diff --git a/Source/WebCore/platform/libwpe/PlatformPasteboardLibWPE.cpp b/Source/WebCore/platform/libwpe/PlatformPasteboardLibWPE.cpp -index c62e88f8c3aa40f01618cdaf0c0e22a2404b17ad..02411ac6bb361c2677c269945f665e0a92ccb902 100644 +index 64afe805b4418d9e57cc7a2704498a97162b93ab..86c385359352853d2884226f478168f890b0c8f0 100644 --- a/Source/WebCore/platform/libwpe/PlatformPasteboardLibWPE.cpp +++ b/Source/WebCore/platform/libwpe/PlatformPasteboardLibWPE.cpp @@ -31,10 +31,18 @@ @@ -7942,9 +7798,9 @@ index c62e88f8c3aa40f01618cdaf0c0e22a2404b17ad..02411ac6bb361c2677c269945f665e0a namespace WebCore { -+static HashMap& sharedPasteboard() ++static UncheckedKeyHashMap& sharedPasteboard() +{ -+ static NeverDestroyed> pasteboard; ++ static NeverDestroyed> pasteboard; + return pasteboard.get(); +} + @@ -7957,10 +7813,9 @@ index c62e88f8c3aa40f01618cdaf0c0e22a2404b17ad..02411ac6bb361c2677c269945f665e0a { - struct wpe_pasteboard_string_vector pasteboardTypes = { nullptr, 0 }; - wpe_pasteboard_get_types(m_pasteboard, &pasteboardTypes); -- -- for (unsigned i = 0; i < pasteboardTypes.length; ++i) { -- auto& typeString = pasteboardTypes.strings[i]; -- types.append(String({ typeString.data, typeString.length })); +- for (auto& typeString : unsafeMakeSpan(pasteboardTypes.strings, pasteboardTypes.length)) { +- const auto length = std::min(static_cast(typeString.length), std::numeric_limits::max()); +- types.append(String({ typeString.data, length })); - } - - wpe_pasteboard_string_vector_free(&pasteboardTypes); @@ -7975,7 +7830,8 @@ index c62e88f8c3aa40f01618cdaf0c0e22a2404b17ad..02411ac6bb361c2677c269945f665e0a - if (!string.length) - return String(); - -- String returnValue({ string.data, string.length }); +- const auto length = std::min(static_cast(string.length), std::numeric_limits::max()); +- String returnValue({ string.data, length }); - - wpe_pasteboard_string_free(&string); - return returnValue; @@ -7984,21 +7840,21 @@ index c62e88f8c3aa40f01618cdaf0c0e22a2404b17ad..02411ac6bb361c2677c269945f665e0a void PlatformPasteboard::write(const PasteboardWebContent& content) { -- static const char plainText[] = "text/plain;charset=utf-8"; -- static const char htmlText[] = "text/html;charset=utf-8"; +- static constexpr auto plainText = "text/plain;charset=utf-8"_s; +- static constexpr auto htmlText = "text/html;charset=utf-8"_s; - - CString textString = content.text.utf8(); - CString markupString = content.markup.utf8(); - -- struct wpe_pasteboard_string_pair pairs[] = { +- std::array pairs = { { - { { nullptr, 0 }, { nullptr, 0 } }, - { { nullptr, 0 }, { nullptr, 0 } }, -- }; +- } }; - wpe_pasteboard_string_initialize(&pairs[0].type, plainText, strlen(plainText)); - wpe_pasteboard_string_initialize(&pairs[0].string, textString.data(), textString.length()); - wpe_pasteboard_string_initialize(&pairs[1].type, htmlText, strlen(htmlText)); - wpe_pasteboard_string_initialize(&pairs[1].string, markupString.data(), markupString.length()); -- struct wpe_pasteboard_string_map map = { pairs, 2 }; +- struct wpe_pasteboard_string_map map = { pairs.data(), pairs.size() }; - - wpe_pasteboard_write(m_pasteboard, &map); - @@ -8032,24 +7888,11 @@ index c62e88f8c3aa40f01618cdaf0c0e22a2404b17ad..02411ac6bb361c2677c269945f665e0a } Vector PlatformPasteboard::typesSafeForDOMToReadAndWrite(const String&) const -diff --git a/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/LibWebRTCProviderGStreamer.h b/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/LibWebRTCProviderGStreamer.h -index 0552842dbe3f3a2c12a504178f5a8ca977e1c4db..2ef3b1b459d8a9b4e86b4556feeb4f0737f05c54 100644 ---- a/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/LibWebRTCProviderGStreamer.h -+++ b/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/LibWebRTCProviderGStreamer.h -@@ -31,6 +31,8 @@ - #include "GStreamerVideoEncoderFactory.h" - #include "LibWebRTCProvider.h" - -+#include "LibWebRTCProvider.h" -+ - namespace WebCore { - - class WEBCORE_EXPORT LibWebRTCProviderGStreamer : public LibWebRTCProvider { diff --git a/Source/WebCore/platform/network/HTTPHeaderMap.cpp b/Source/WebCore/platform/network/HTTPHeaderMap.cpp -index 65679251a5c66afcf60ed4d4267169eefed745f5..2cb9dc1f0e777fd172e52f5a6c8f4d6910c08c47 100644 +index d22cc965746c1b55ed9242af878a590a487ecae5..2c7649e3fa5bd13e456e1e1d90da37a813a75aca 100644 --- a/Source/WebCore/platform/network/HTTPHeaderMap.cpp +++ b/Source/WebCore/platform/network/HTTPHeaderMap.cpp -@@ -236,8 +236,11 @@ void HTTPHeaderMap::add(HTTPHeaderName name, const String& value) +@@ -234,8 +234,11 @@ void HTTPHeaderMap::add(HTTPHeaderName name, const String& value) auto index = m_commonHeaders.findIf([&](auto& header) { return header.key == name; }); @@ -8063,20 +7906,19 @@ index 65679251a5c66afcf60ed4d4267169eefed745f5..2cb9dc1f0e777fd172e52f5a6c8f4d69 m_commonHeaders.append(CommonHeader { name, value }); } diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h -index bf887012d2f391eb6169a9e53b40cb3c682e6d70..4954dfb7ed9ee711b126552dc9130f265059d270 100644 +index 00d37bb9aac7aa0db5a7cc7acdff5611a44e4aaa..6e23adbdb9035bb4698232b2086b4ac0fcff7dea 100644 --- a/Source/WebCore/platform/network/NetworkStorageSession.h +++ b/Source/WebCore/platform/network/NetworkStorageSession.h -@@ -185,6 +185,8 @@ public: +@@ -184,6 +184,7 @@ public: + NetworkingContext* context() const; #endif - + WEBCORE_EXPORT void setCookiesFromResponse(const URL& firstParty, const SameSiteInfo&, const URL&, const String& setCookieValue); -+ + WEBCORE_EXPORT HTTPCookieAcceptPolicy cookieAcceptPolicy() const; WEBCORE_EXPORT void setCookie(const Cookie&); - WEBCORE_EXPORT void setCookies(const Vector&, const URL&, const URL& mainDocumentURL); diff --git a/Source/WebCore/platform/network/ResourceResponseBase.cpp b/Source/WebCore/platform/network/ResourceResponseBase.cpp -index 91cba6cadafd7c3739c2293b6146321b5ba0ea28..a1a52db245a2b480614901b650524872596a6c47 100644 +index 774748f1bb47fdefa53b820db5fc891077125de7..4f9220dace7d300d2326692383944f3a560d8cb8 100644 --- a/Source/WebCore/platform/network/ResourceResponseBase.cpp +++ b/Source/WebCore/platform/network/ResourceResponseBase.cpp @@ -78,6 +78,7 @@ ResourceResponseBase::ResourceResponseBase(std::optional d @@ -8087,7 +7929,7 @@ index 91cba6cadafd7c3739c2293b6146321b5ba0ea28..a1a52db245a2b480614901b650524872 , m_networkLoadMetrics(data && data->networkLoadMetrics ? Box::create(*data->networkLoadMetrics) : Box { }) , m_certificateInfo(data ? data->certificateInfo : std::nullopt) , m_httpStatusCode(data ? data->httpStatusCode : 0) -@@ -896,6 +897,7 @@ std::optional ResourceResponseBase::getResponseData() cons +@@ -901,6 +902,7 @@ std::optional ResourceResponseBase::getResponseData() cons String { m_httpStatusText }, String { m_httpVersion }, HTTPHeaderMap { m_httpHeaderFields }, @@ -8095,7 +7937,7 @@ index 91cba6cadafd7c3739c2293b6146321b5ba0ea28..a1a52db245a2b480614901b650524872 m_networkLoadMetrics ? std::optional(*m_networkLoadMetrics) : std::nullopt, m_source, m_type, -@@ -969,6 +971,11 @@ std::optional Coder Coder httpStatusCode; decoder >> httpStatusCode; if (!httpStatusCode) -@@ -1023,6 +1030,7 @@ std::optional Coder Coder m_networkLoadMetrics; mutable std::optional m_certificateInfo; -@@ -292,7 +297,7 @@ struct ResourceResponseData { +@@ -294,7 +299,7 @@ struct ResourceResponseData { ResourceResponseData() = default; ResourceResponseData(ResourceResponseData&&) = default; ResourceResponseData& operator=(ResourceResponseData&&) = default; @@ -8140,7 +7982,7 @@ index 95c24f85913c09bdf2e7b9e6c4e308d9528b06af..d6da8d829b0f40a9f234429aa97c5bd0 : url(WTFMove(url)) , mimeType(WTFMove(mimeType)) , expectedContentLength(expectedContentLength) -@@ -301,6 +306,7 @@ struct ResourceResponseData { +@@ -303,6 +308,7 @@ struct ResourceResponseData { , httpStatusText(WTFMove(httpStatusText)) , httpVersion(WTFMove(httpVersion)) , httpHeaderFields(WTFMove(httpHeaderFields)) @@ -8148,7 +7990,7 @@ index 95c24f85913c09bdf2e7b9e6c4e308d9528b06af..d6da8d829b0f40a9f234429aa97c5bd0 , networkLoadMetrics(WTFMove(networkLoadMetrics)) , source(source) , type(type) -@@ -323,6 +329,7 @@ struct ResourceResponseData { +@@ -325,6 +331,7 @@ struct ResourceResponseData { String httpStatusText; String httpVersion; HTTPHeaderMap httpHeaderFields; @@ -8157,7 +7999,7 @@ index 95c24f85913c09bdf2e7b9e6c4e308d9528b06af..d6da8d829b0f40a9f234429aa97c5bd0 ResourceResponseBase::Source source; ResourceResponseBase::Type type; diff --git a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm -index cac3c4ba93f274637a93e0a20a4a0828c9c1bb46..e9f310f158015ed7a14ef2eb06d1d4d3f96d067d 100644 +index b101c64297f845dd72c80a28893c6a3f4e4d8c05..72e289b9fbeb40f11c161b0c0b1b743e173cf849 100644 --- a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm +++ b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm @@ -493,6 +493,22 @@ bool NetworkStorageSession::setCookieFromDOM(const URL& firstParty, const SameSi @@ -8325,7 +8167,7 @@ index 09ab1320beacc41ae92399f3320aaf805d9d81d1..e1caf6e7ebd61151439a9c86350e5712 { GUniquePtr targetCookie(cookie.toSoupCookie()); diff --git a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp -index 71c773f4532b6670c4f29496cc8c4bd3093304b1..5876dfa98bb9cdb78d0de807d4408ae661c3f288 100644 +index fd2a8e09edb5e076d8c436c69c41660bcd4f312e..455e9c4881744a86fdeaf29ebe50b303f7535825 100644 --- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp +++ b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp @@ -40,6 +40,7 @@ @@ -8361,10 +8203,10 @@ index c3ffc7392c0b7fa099a7dd4e4be977cdee1c803c..9570dbb0f2c42ca38598a8898183c9b3 HGLOBAL createGlobalData(const String&); HGLOBAL createGlobalData(const Vector&); diff --git a/Source/WebCore/platform/win/DragDataWin.cpp b/Source/WebCore/platform/win/DragDataWin.cpp -index 0379437d84807e4a8d3846afac5ec8a70e743e70..1ae19e2b755e99c9f4c3e6d5dc0e4f8b6ebe8ab3 100644 +index 0379437d84807e4a8d3846afac5ec8a70e743e70..5b0461bf12535d4900ffaddc2a87826280505233 100644 --- a/Source/WebCore/platform/win/DragDataWin.cpp +++ b/Source/WebCore/platform/win/DragDataWin.cpp -@@ -40,7 +40,7 @@ +@@ -40,12 +40,13 @@ namespace WebCore { @@ -8373,14 +8215,12 @@ index 0379437d84807e4a8d3846afac5ec8a70e743e70..1ae19e2b755e99c9f4c3e6d5dc0e4f8b : m_clientPosition(clientPosition) , m_globalPosition(globalPosition) , m_platformDragData(0) -@@ -48,6 +48,7 @@ DragData::DragData(const DragDataMap& data, const IntPoint& clientPosition, cons + , m_draggingSourceOperationMask(sourceOperationMask) , m_applicationFlags(flags) ++ , m_dragDestinationActionMask(dragDestinationAction) , m_pageID(pageID) , m_dragDataMap(data) -+ , m_dragDestinationActionMask(dragDestinationAction) { - } - @@ -63,7 +64,7 @@ bool DragData::containsURL(FilenameConversionPolicy filenamePolicy) const || (filenamePolicy == ConvertFilenames && (m_dragDataMap.contains(filenameWFormat()->cfFormat) || m_dragDataMap.contains(filenameFormat()->cfFormat))); } @@ -8415,10 +8255,10 @@ index d450bf9d0fd1f0bf8f28db483ac9d3d60fa9d114..72a59403a0b5493aea4a8e28eb15eac2 OptionSet PlatformKeyboardEvent::currentStateOfModifierKeys() diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp -index 03e5dc0b6ff099c281c61f05b29cf155b96922af..9b4694bc816e0e62a37c57e64729f183baca9080 100644 +index ec0b9f28cd41d15acb6feaa2132f08afb8a92b6b..496f5ec6733e72c28a55a748983dd868a0ef863b 100644 --- a/Source/WebCore/platform/win/PasteboardWin.cpp +++ b/Source/WebCore/platform/win/PasteboardWin.cpp -@@ -1137,7 +1137,21 @@ void Pasteboard::writeCustomData(const Vector& data) +@@ -1138,7 +1138,21 @@ void Pasteboard::writeCustomData(const Vector& data) } clear(); @@ -8440,7 +8280,7 @@ index 03e5dc0b6ff099c281c61f05b29cf155b96922af..9b4694bc816e0e62a37c57e64729f183 if (::OpenClipboard(m_owner)) { const auto& customData = data.first(); customData.forEachPlatformStringOrBuffer([](auto& type, auto& stringOrBuffer) { -@@ -1176,4 +1190,25 @@ void Pasteboard::write(const Color&) +@@ -1177,4 +1191,25 @@ void Pasteboard::write(const Color&) { } @@ -8910,19 +8750,6 @@ index 0000000000000000000000000000000000000000..a76b583a1e65cd6999fab4784c22dd9c +}; + +} // namespace WebCore -diff --git a/Source/WebCore/rendering/AncestorSubgridIterator.cpp b/Source/WebCore/rendering/AncestorSubgridIterator.cpp -index 4613cfc6af155593459f8af9c2bf4211a01383b9..209542305a8454da2f80691ab7759b0f62b32604 100644 ---- a/Source/WebCore/rendering/AncestorSubgridIterator.cpp -+++ b/Source/WebCore/rendering/AncestorSubgridIterator.cpp -@@ -30,7 +30,7 @@ - - namespace WebCore { - --AncestorSubgridIterator::AncestorSubgridIterator() = default; -+AncestorSubgridIterator::AncestorSubgridIterator() { }; - - AncestorSubgridIterator::AncestorSubgridIterator(SingleThreadWeakPtr firstAncestorSubgrid, GridTrackSizingDirection direction) - : m_firstAncestorSubgrid(firstAncestorSubgrid) diff --git a/Source/WebCore/rendering/RenderTextControl.cpp b/Source/WebCore/rendering/RenderTextControl.cpp index 02afb718cfae6a4314ab704fbe6a70d88a530312..ed32870de0571317a6527d89a14a6a51b7acfd33 100644 --- a/Source/WebCore/rendering/RenderTextControl.cpp @@ -8943,7 +8770,7 @@ index 02afb718cfae6a4314ab704fbe6a70d88a530312..ed32870de0571317a6527d89a14a6a51 { auto innerText = innerTextElement(); diff --git a/Source/WebCore/rendering/RenderTextControl.h b/Source/WebCore/rendering/RenderTextControl.h -index b55e0d2d78beb62a7efa08cf7d47e8a9ebad362d..352d12a72fa72479d70164ea130648d9c26ff05a 100644 +index 8ff886aec15c960e06408f638892579a6c3f4879..a5f8889818e456504c82a99994dcf4b21774b99d 100644 --- a/Source/WebCore/rendering/RenderTextControl.h +++ b/Source/WebCore/rendering/RenderTextControl.h @@ -37,9 +37,9 @@ public: @@ -8980,25 +8807,11 @@ index db95c8273bd0deb3f903a45d02fc07bbbd8ab305..bf88228b4c838b90d11d430cc9429d51 WorkerOrWorkletGlobalScope& m_globalScope; }; -diff --git a/Source/WebKit/InspectorGResources.cmake b/Source/WebKit/InspectorGResources.cmake -index b9c1f0ad55ef8ddf18e0314a6f4ad8b490e5b214..a1e3b60f8e74988b072eb8cbca201fd84a45b2bc 100644 ---- a/Source/WebKit/InspectorGResources.cmake -+++ b/Source/WebKit/InspectorGResources.cmake -@@ -13,4 +13,9 @@ macro(WEBKIT_BUILD_INSPECTOR_GRESOURCES _derived_sources_dir _output_file) - SOURCE_XML ${_derived_sources_dir}/InspectorGResourceBundle.xml - RESOURCE_DIRS ${_derived_sources_dir}/InspectorResources/WebInspectorUI - ) -+ -+ add_custom_target(${_output_file} -+ ALL -+ DEPENDS ${_derived_sources_dir}/${_output_file} -+ ) - endmacro() diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp -index 298c215460d4c52d8d232e960bec52c2d05a9071..9c903e398c05e451df9131eae1d9a828cf2e6088 100644 +index c677a1dda62afcad62a41f1b8b8ff886ce7412ee..1df6de27593cab0e5f96c9d906a45f55003e1a66 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp -@@ -97,6 +97,8 @@ +@@ -96,6 +96,8 @@ #if PLATFORM(COCOA) #include @@ -9007,7 +8820,7 @@ index 298c215460d4c52d8d232e960bec52c2d05a9071..9c903e398c05e451df9131eae1d9a828 #endif #if ENABLE(APPLE_PAY_REMOTE_UI) -@@ -1109,6 +1111,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID) +@@ -1130,6 +1132,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID) storageSession->clearPageSpecificDataForResourceLoadStatistics(pageID); } @@ -9023,10 +8836,10 @@ index 298c215460d4c52d8d232e960bec52c2d05a9071..9c903e398c05e451df9131eae1d9a828 { if (auto* storageSession = protectedNetworkProcess()->storageSession(m_sessionID)) diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h -index 99a6472171acdf8ebffa29a86d69f47d8ea55d64..a95eb97d93656e78bad1a1d3450d3563886fc485 100644 +index 590065cea0e5ed1167f6f8fc1a747c2d32a23c01..2807fb69297332011f38b5c3a27973ca53754c0a 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h -@@ -366,6 +366,8 @@ private: +@@ -374,6 +374,8 @@ private: void clearPageSpecificData(WebCore::PageIdentifier); @@ -9036,10 +8849,10 @@ index 99a6472171acdf8ebffa29a86d69f47d8ea55d64..a95eb97d93656e78bad1a1d3450d3563 void logUserInteraction(RegistrableDomain&&); diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in -index 9377d0c9381ec40342dc8bbe60e80781116b2d3c..b29b70264d0b5e9409e8467db75bc0a5a3febc5a 100644 +index c493d8e359dfdd393cee8ab77d25fc08e942ba77..4934c6b5038953ec1f1662b03400f6d1f8fec9d7 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in -@@ -75,6 +75,8 @@ messages -> NetworkConnectionToWebProcess WantsDispatchMessage { +@@ -79,6 +79,8 @@ messages -> NetworkConnectionToWebProcess WantsDispatchMessage { ClearPageSpecificData(WebCore::PageIdentifier pageID); @@ -9049,10 +8862,10 @@ index 9377d0c9381ec40342dc8bbe60e80781116b2d3c..b29b70264d0b5e9409e8467db75bc0a5 LogUserInteraction(WebCore::RegistrableDomain domain) ResourceLoadStatisticsUpdated(Vector statistics) -> () diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.cpp b/Source/WebKit/NetworkProcess/NetworkProcess.cpp -index 12b9f1488877b94e520f83191cd15b09836e9666..f65093ab8653a2f5c05a1c5a69f0f2b83d679e07 100644 +index 239ba1501c57b46b28f7e6442ae9a65935b7fcf0..819e8c69ddc28abbac2a82ced2c80ad41db9a1c3 100644 --- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp +++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp -@@ -638,6 +638,12 @@ void NetworkProcess::registrableDomainsExemptFromWebsiteDataDeletion(PAL::Sessio +@@ -648,6 +648,12 @@ void NetworkProcess::registrableDomainsExemptFromWebsiteDataDeletion(PAL::Sessio completionHandler({ }); } @@ -9066,18 +8879,10 @@ index 12b9f1488877b94e520f83191cd15b09836e9666..f65093ab8653a2f5c05a1c5a69f0f2b8 { if (auto* session = networkSession(sessionID)) { diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.h b/Source/WebKit/NetworkProcess/NetworkProcess.h -index dbc90242cd84de5ef39b404e0b9262fcdf7cd371..82c91b9edb72f4f48676d0e458448981e346917a 100644 +index a4ff8274229c85548135766cd1623d65813d9a12..6d500eeae356757850cfd55d62d6ec75ffe280d1 100644 --- a/Source/WebKit/NetworkProcess/NetworkProcess.h +++ b/Source/WebKit/NetworkProcess/NetworkProcess.h -@@ -33,6 +33,7 @@ - #include "DownloadManager.h" - #include "NetworkContentRuleListManager.h" - #include "QuotaIncreaseRequestIdentifier.h" -+#include "StorageNamespaceIdentifier.h" - #include "UseDownloadPlaceholder.h" - #include "WebPageProxyIdentifier.h" - #include "WebResourceLoadStatisticsStore.h" -@@ -84,6 +85,7 @@ class SessionID; +@@ -84,6 +84,7 @@ class SessionID; namespace WebCore { class CertificateInfo; @@ -9085,7 +8890,7 @@ index dbc90242cd84de5ef39b404e0b9262fcdf7cd371..82c91b9edb72f4f48676d0e458448981 class CurlProxySettings; class ProtectionSpace; class NetworkStorageSession; -@@ -220,6 +222,9 @@ public: +@@ -227,6 +228,9 @@ public: void registrableDomainsWithLastAccessedTime(PAL::SessionID, CompletionHandler>)>&&); void registrableDomainsExemptFromWebsiteDataDeletion(PAL::SessionID, CompletionHandler)>&&); @@ -9096,7 +8901,7 @@ index dbc90242cd84de5ef39b404e0b9262fcdf7cd371..82c91b9edb72f4f48676d0e458448981 void clearUserInteraction(PAL::SessionID, RegistrableDomain&&, CompletionHandler&&); void deleteAndRestrictWebsiteDataForRegistrableDomains(PAL::SessionID, OptionSet, RegistrableDomainsToDeleteOrRestrictWebsiteDataFor&&, CompletionHandler&&)>&&); diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in -index aa95d1cc6e90fd24d3dad3ff1b8052de66fc23f2..b57b6d72cd1d9bf34dc347750e2d2fb9d0111389 100644 +index 07286a774824c1ebab411668c173450aaa3d8db0..4a424aa025202517aa5392b969cfe50552628f14 100644 --- a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in +++ b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in @@ -85,6 +85,8 @@ messages -> NetworkProcess : AuxiliaryProcess WantsAsyncDispatchMessage { @@ -9109,10 +8914,10 @@ index aa95d1cc6e90fd24d3dad3ff1b8052de66fc23f2..b57b6d72cd1d9bf34dc347750e2d2fb9 ClearUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () DumpResourceLoadStatistics(PAL::SessionID sessionID) -> (String dumpedStatistics) diff --git a/Source/WebKit/NetworkProcess/NetworkSession.h b/Source/WebKit/NetworkProcess/NetworkSession.h -index 50b6499bcef54f3eeac6f3885e0e58783604100c..16b1fad0436fb307f524e3ae36e70043a3c6b168 100644 +index e04e1ab157e39b042af9a9a02866ad871264a496..7ba4f9bba80d8c8af7bb1a6383b36bb436ce26c4 100644 --- a/Source/WebKit/NetworkProcess/NetworkSession.h +++ b/Source/WebKit/NetworkProcess/NetworkSession.h -@@ -202,6 +202,9 @@ public: +@@ -204,6 +204,9 @@ public: void lowMemoryHandler(WTF::Critical); @@ -9122,7 +8927,7 @@ index 50b6499bcef54f3eeac6f3885e0e58783604100c..16b1fad0436fb307f524e3ae36e70043 void removeSoftUpdateLoader(ServiceWorkerSoftUpdateLoader* loader) { m_softUpdateLoaders.remove(loader); } void addNavigationPreloaderTask(ServiceWorkerFetchTask&); ServiceWorkerFetchTask* navigationPreloaderTaskFromFetchIdentifier(WebCore::FetchIdentifier); -@@ -317,6 +320,7 @@ protected: +@@ -321,6 +324,7 @@ protected: bool m_privateClickMeasurementDebugModeEnabled { false }; std::optional m_ephemeralMeasurement; bool m_isRunningEphemeralMeasurementTest { false }; @@ -9131,7 +8936,7 @@ index 50b6499bcef54f3eeac6f3885e0e58783604100c..16b1fad0436fb307f524e3ae36e70043 HashSet> m_keptAliveLoads; diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm -index 70ba7cd36661a2500783052f04076888f92c0eea..8b26ac70f0daa99ba8800e5785d54e31457f17af 100644 +index 9525ea0ff6d7a3ae90ceb319a13600f682524c32..4461f24b5087cae6203b4c0f12db4edc0e2c2380 100644 --- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm +++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm @@ -772,6 +772,8 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece @@ -9158,7 +8963,7 @@ index 70ba7cd36661a2500783052f04076888f92c0eea..8b26ac70f0daa99ba8800e5785d54e31 #if !LOG_DISABLED LOG(NetworkSession, "%llu didReceiveResponse completionHandler (%d)", taskIdentifier, policyAction); diff --git a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp -index 63ca8f8066acb3be4b4dc8350bcc712e535bdd38..3dc3657ac2dc8ab89f56acb0615dd571091821b4 100644 +index 1e1c7897c858ddd5a1c69a4d5942102f5649ef14..1d2a4835905018a39bc33488e9bc1450cb728179 100644 --- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp +++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp @@ -80,10 +80,18 @@ NetworkDataTaskCurl::NetworkDataTaskCurl(NetworkSession& session, NetworkDataTas @@ -9229,16 +9034,16 @@ index 63ca8f8066acb3be4b4dc8350bcc712e535bdd38..3dc3657ac2dc8ab89f56acb0615dd571 void NetworkDataTaskCurl::invokeDidReceiveResponse() { didReceiveResponse(ResourceResponse(m_response), NegotiatedLegacyTLS::No, PrivateRelayed::No, std::nullopt, [this, protectedThis = Ref { *this }](PolicyAction policyAction) { -@@ -324,6 +363,8 @@ void NetworkDataTaskCurl::invokeDidReceiveResponse() - downloadPtr->didCreateDestination(m_pendingDownloadLocation); +@@ -323,6 +362,8 @@ void NetworkDataTaskCurl::invokeDidReceiveResponse() + download->didCreateDestination(m_pendingDownloadLocation); if (m_curlRequest) m_curlRequest->completeDidReceiveResponse(); + else if (firstRequest().url().protocolIsData()) -+ downloadDataURL(*downloadPtr); ++ downloadDataURL(download); break; } default: -@@ -412,6 +453,8 @@ void NetworkDataTaskCurl::willPerformHTTPRedirection() +@@ -411,6 +452,8 @@ void NetworkDataTaskCurl::willPerformHTTPRedirection() m_curlRequest->setUserPass(m_initialCredential.user(), m_initialCredential.password()); m_curlRequest->setAuthenticationScheme(ProtectionSpace::AuthenticationScheme::HTTPBasic); } @@ -9289,7 +9094,7 @@ index 0f7c70e405d00416c9e5e58f9c56423a4cf3947c..b730722c5bdb3949bedc1a578089bb3e bool m_blockingCookies { false }; diff --git a/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp b/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp -index 486849ef6f550a0f3caab311abf5743c6d38e5af..afeaac63a18d9e71d3afead23b7da4fecfc27544 100644 +index 49685c872d0fb042a401612201a7448af6f1ac8b..e98efc1c2e7e5a85980c8d39afcb600a1f6c5d23 100644 --- a/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp +++ b/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp @@ -68,7 +68,7 @@ void NetworkSessionCurl::clearAlternativeServices(WallTime) @@ -9302,7 +9107,7 @@ index 486849ef6f550a0f3caab311abf5743c6d38e5af..afeaac63a18d9e71d3afead23b7da4fe void NetworkSessionCurl::didReceiveChallenge(WebSocketTask& webSocketTask, WebCore::AuthenticationChallenge&& challenge, CompletionHandler&& challengeCompletionHandler) diff --git a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp -index 06a8233cbe44e7dfe1515498d511db39091f1acc..00818acd28155d526707967a01146d00199f4aa4 100644 +index 57da1a448cc75e4a24f0a2b3e7159452da8da2df..f64b446e074cb58c36be5f68ccb07e4584a38a1f 100644 --- a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp +++ b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp @@ -39,11 +39,12 @@ @@ -9325,10 +9130,10 @@ index 06a8233cbe44e7dfe1515498d511db39091f1acc..00818acd28155d526707967a01146d00 - m_streamID = m_scheduler.createStream(request.url(), *this, WebCore::CurlStream::ServerTrustEvaluation::Enable, localhostAlias); + m_streamID = m_scheduler.createStream(request.url(), ignoreCertificateErrors, *this, WebCore::CurlStream::ServerTrustEvaluation::Enable, localhostAlias); - m_channel->didSendHandshakeRequest(WebCore::ResourceRequest(m_request)); + channel.didSendHandshakeRequest(WebCore::ResourceRequest(m_request)); } -@@ -260,7 +261,7 @@ void WebSocketTask::tryServerTrustEvaluation(WebCore::AuthenticationChallenge&& +@@ -265,7 +266,7 @@ void WebSocketTask::tryServerTrustEvaluation(WebCore::AuthenticationChallenge&& if (networkSession() && networkSession()->networkProcess().localhostAliasesForTesting().contains(m_request.url().host())) localhostAlias = WebCore::CurlStream::LocalhostAlias::Enable; @@ -9338,19 +9143,19 @@ index 06a8233cbe44e7dfe1515498d511db39091f1acc..00818acd28155d526707967a01146d00 didFail(WTFMove(errorReason)); }); diff --git a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.h b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.h -index 0072cb40252b35ab54d8693562ee66a4c7ef6f45..2a44ad16131c80ee74bbb79a110ef16be9ab0765 100644 +index 70c88bf553159e26e63c6dc735ae2bb4358df698..967b2c849206784efe3b0d9a2364cd3e7600b1f9 100644 --- a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.h +++ b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.h -@@ -59,7 +59,7 @@ struct SessionSet; - class WebSocketTask : public CanMakeWeakPtr, public WebCore::CurlStream::Client { +@@ -55,7 +55,7 @@ class WebSocketTask : public CanMakeWeakPtr, public CanMakeChecke WTF_MAKE_TZONE_ALLOCATED(WebSocketTask); + WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(WebSocketTask); public: - WebSocketTask(NetworkSocketChannel&, WebPageProxyIdentifier, const WebCore::ResourceRequest&, const String& protocol, const WebCore::ClientOrigin&); + WebSocketTask(NetworkSocketChannel&, WebPageProxyIdentifier, const WebCore::ResourceRequest&, const String& protocol, bool ignoreCertificateErrors, const WebCore::ClientOrigin&); virtual ~WebSocketTask(); void sendString(std::span, CompletionHandler&&); -@@ -112,6 +112,7 @@ private: +@@ -110,6 +110,7 @@ private: WebPageProxyIdentifier m_webProxyPageID; WebCore::ResourceRequest m_request; String m_protocol; @@ -9378,7 +9183,7 @@ index a6d86f1388e8cae7c3939d1ecffb2c46eb5054c5..9e11224335211908fe8bf14edc4c22e9 ;; Except deny access to new-style iOS Keychain folders which are UUIDs. (deny file-read* file-write* diff --git a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp -index 73b2b6b95706f735badf6235225a31926bfcca66..39cfe910a3cde500a41259be60ac2e6e32fdb82e 100644 +index d781f70f2c31ff5631773684893a40d738bd9856..6270cfd7707a190f123b9750a31162fbc64c3086 100644 --- a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp +++ b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp @@ -461,6 +461,8 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr&& inputStream) @@ -9438,23 +9243,11 @@ index 599c405513ee38c74da12c01dafc23c6ece86aa0..5af7dc9306d211a5cff1736013716b08 #endif } -diff --git a/Source/WebKit/Platform/IPC/MessageSender.h b/Source/WebKit/Platform/IPC/MessageSender.h -index 214f41901fa6648d281da7e1129ae888f0b2c510..30081fb3bd783ef8cbfee1dcea4ffe5f8786eedc 100644 ---- a/Source/WebKit/Platform/IPC/MessageSender.h -+++ b/Source/WebKit/Platform/IPC/MessageSender.h -@@ -27,6 +27,7 @@ - - #include - #include -+#include - - namespace IPC { - diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake -index efbb4cdb0f382c1a917062c63727036e00723be1..8a9e53def5166e9a6afa983a1ed84634bb092ec0 100644 +index 232378e3be5e4e1b4bdd9f97a722f518f8fdec33..fed6a3de75b889fa90e18cb95300ceecb3e80d40 100644 --- a/Source/WebKit/PlatformGTK.cmake +++ b/Source/WebKit/PlatformGTK.cmake -@@ -329,6 +329,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES +@@ -327,6 +327,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES ${GSTREAMER_PBUTILS_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${LIBSOUP_INCLUDE_DIRS} @@ -9464,7 +9257,7 @@ index efbb4cdb0f382c1a917062c63727036e00723be1..8a9e53def5166e9a6afa983a1ed84634 ) list(APPEND WebKit_INTERFACE_INCLUDE_DIRECTORIES -@@ -359,6 +362,9 @@ if (USE_LIBWEBRTC) +@@ -363,6 +366,9 @@ if (USE_LIBWEBRTC) list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/libwebrtc/Source/" "${THIRDPARTY_DIR}/libwebrtc/Source/webrtc" @@ -9474,7 +9267,7 @@ index efbb4cdb0f382c1a917062c63727036e00723be1..8a9e53def5166e9a6afa983a1ed84634 ) endif () -@@ -410,6 +416,12 @@ else () +@@ -414,6 +420,12 @@ else () set(WebKitGTK_ENUM_HEADER_TEMPLATE ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypesGtk3.h.in) endif () @@ -9488,7 +9281,7 @@ index efbb4cdb0f382c1a917062c63727036e00723be1..8a9e53def5166e9a6afa983a1ed84634 set(WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_INSTALLED_HEADERS}) list(REMOVE_ITEM WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.h) diff --git a/Source/WebKit/PlatformWPE.cmake b/Source/WebKit/PlatformWPE.cmake -index e1d7d2a9e635c753459db079170ef5385dc1a637..28fbd58183e126f73a9f3ccbaa682ae3593f1e79 100644 +index 3c5bdcf25c6f9c0c86d0c4550d5dc7486f99d703..259fce0cf15b4263148f6f6da59161001875b465 100644 --- a/Source/WebKit/PlatformWPE.cmake +++ b/Source/WebKit/PlatformWPE.cmake @@ -117,6 +117,8 @@ list(APPEND WebKit_SERIALIZATION_IN_FILES @@ -9508,7 +9301,7 @@ index e1d7d2a9e635c753459db079170ef5385dc1a637..28fbd58183e126f73a9f3ccbaa682ae3 ) if (ENABLE_2022_GLIB_API) -@@ -432,7 +435,16 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES +@@ -430,7 +433,16 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES ${GIO_UNIX_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${LIBSOUP_INCLUDE_DIRS} @@ -9526,10 +9319,10 @@ index e1d7d2a9e635c753459db079170ef5385dc1a637..28fbd58183e126f73a9f3ccbaa682ae3 list(APPEND WebKit_LIBRARIES WPE::libwpe diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmake -index 7da9a409b65a577566f143a26a9717d4ba687a3c..711b5e1c4c82dfdf9ac6139a6de0785d29c1cc20 100644 +index d68c315379e227e41722991651c1c1285194bad6..401aa471b17032bf3fb3f3de8bc14f14fd304719 100644 --- a/Source/WebKit/PlatformWin.cmake +++ b/Source/WebKit/PlatformWin.cmake -@@ -56,8 +56,13 @@ list(APPEND WebKit_SOURCES +@@ -55,8 +55,13 @@ list(APPEND WebKit_SOURCES UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp UIProcess/win/AutomationClientWin.cpp @@ -9543,7 +9336,7 @@ index 7da9a409b65a577566f143a26a9717d4ba687a3c..711b5e1c4c82dfdf9ac6139a6de0785d UIProcess/win/WebPageProxyWin.cpp UIProcess/win/WebPopupMenuProxyWin.cpp UIProcess/win/WebProcessPoolWin.cpp -@@ -73,6 +78,7 @@ list(APPEND WebKit_SOURCES +@@ -72,6 +77,7 @@ list(APPEND WebKit_SOURCES WebProcess/MediaCache/WebMediaKeyStorageManager.cpp WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp @@ -9551,7 +9344,7 @@ index 7da9a409b65a577566f143a26a9717d4ba687a3c..711b5e1c4c82dfdf9ac6139a6de0785d WebProcess/WebPage/AcceleratedSurface.cpp -@@ -121,8 +127,81 @@ list(APPEND WebKit_PUBLIC_FRAMEWORK_HEADERS +@@ -117,8 +123,81 @@ list(APPEND WebKit_PUBLIC_FRAMEWORK_HEADERS list(APPEND WebKit_PRIVATE_LIBRARIES comctl32 @@ -9633,26 +9426,14 @@ index 7da9a409b65a577566f143a26a9717d4ba687a3c..711b5e1c4c82dfdf9ac6139a6de0785d list(APPEND WebProcess_SOURCES WebProcess/EntryPoint/win/WebProcessMain.cpp -diff --git a/Source/WebKit/Shared/API/c/wpe/WebKit.h b/Source/WebKit/Shared/API/c/wpe/WebKit.h -index a9aa21f5589dec453db1713c8846e0d2e687f552..9b94469d078d92e4b9e0c8149122b19a4d3b5307 100644 ---- a/Source/WebKit/Shared/API/c/wpe/WebKit.h -+++ b/Source/WebKit/Shared/API/c/wpe/WebKit.h -@@ -76,6 +76,7 @@ - // From Source/WebKit/UIProcess/API/C - #include - #include -+#include - #include - #include - #include diff --git a/Source/WebKit/Shared/AuxiliaryProcess.h b/Source/WebKit/Shared/AuxiliaryProcess.h -index 33eb250f82068c481176be8e1ba6f9bc935f544a..519be7021eb53e3a6f18953ff004218e13f0819c 100644 +index 4510beb0b7403138abef4c9b5e892271fe8beaab..dae8f31ef187d7b086dd84d7e356839dc2811154 100644 --- a/Source/WebKit/Shared/AuxiliaryProcess.h +++ b/Source/WebKit/Shared/AuxiliaryProcess.h -@@ -214,6 +214,11 @@ struct AuxiliaryProcessInitializationParameters { - #if PLATFORM(COCOA) - SDKAlignedBehaviors clientSDKAlignedBehaviors; - #endif +@@ -212,6 +212,11 @@ struct AuxiliaryProcessInitializationParameters { + IPC::Connection::Identifier connectionIdentifier; + HashMap extraInitializationData; + WTF::AuxiliaryProcessType processType; +// Playwright begin +#if !PLATFORM(COCOA) + bool shouldEnableSharedArrayBuffer { false }; @@ -9661,18 +9442,6 @@ index 33eb250f82068c481176be8e1ba6f9bc935f544a..519be7021eb53e3a6f18953ff004218e }; } // namespace WebKit -diff --git a/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.h b/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.h -index b09b17a5bff38e3ba8d6bb53da9ef09d229bdb61..46aa1caa93402711a08f5980387a957f783038e5 100644 ---- a/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.h -+++ b/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.h -@@ -27,6 +27,7 @@ - - #import - #import -+#import - - namespace WebKit { - diff --git a/Source/WebKit/Shared/NativeWebKeyboardEvent.h b/Source/WebKit/Shared/NativeWebKeyboardEvent.h index c72c9733800b6f836c4d3ccb0b50d40c3ee83067..e2955ddebe388d886ca43d733dce0eb58256ce8b 100644 --- a/Source/WebKit/Shared/NativeWebKeyboardEvent.h @@ -9777,10 +9546,10 @@ index ea1eb9f00feaaecf73bdddc37c904e88f43bfa85..8a631e5293a11abd650958baad4e9678 #endif }; diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in -index 13f2e0158846e32155fc0ee9e9639f66d96e0f3f..3e8be3a130075a67c07fa192e788b24dab997480 100644 +index 309c0b92bc4fbd53ba15c0f334f753a4ba5d4416..d6c03e6ff85c8107d8ba58b69572a85019dd91d9 100644 --- a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in +++ b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in -@@ -2752,6 +2752,9 @@ class WebCore::AuthenticationChallenge { +@@ -2769,6 +2769,9 @@ class WebCore::AuthenticationChallenge { class WebCore::DragData { #if PLATFORM(COCOA) String pasteboardName(); @@ -9790,7 +9559,7 @@ index 13f2e0158846e32155fc0ee9e9639f66d96e0f3f..3e8be3a130075a67c07fa192e788b24d #endif WebCore::IntPoint clientPosition(); WebCore::IntPoint globalPosition(); -@@ -3311,6 +3314,7 @@ enum class WebCore::WasPrivateRelayed : bool; +@@ -3567,6 +3570,7 @@ enum class WebCore::WasPrivateRelayed : bool; String httpStatusText; String httpVersion; WebCore::HTTPHeaderMap httpHeaderFields; @@ -9799,10 +9568,10 @@ index 13f2e0158846e32155fc0ee9e9639f66d96e0f3f..3e8be3a130075a67c07fa192e788b24d WebCore::ResourceResponseBase::Source source; WebCore::ResourceResponseBase::Type type; diff --git a/Source/WebKit/Shared/WebKeyboardEvent.cpp b/Source/WebKit/Shared/WebKeyboardEvent.cpp -index b80bcb39473ecec86be5671f38698130bd9acbf3..d886cbac5f4c073e14e12f257fa920419ea0cf39 100644 +index 8040819bba9dcde87311aaafe7d8177d0e07281d..24972c0a357324d27910ae6ff1979d1c6b8bc758 100644 --- a/Source/WebKit/Shared/WebKeyboardEvent.cpp +++ b/Source/WebKit/Shared/WebKeyboardEvent.cpp -@@ -52,6 +52,24 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S +@@ -51,6 +51,24 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S ASSERT(isKeyboardEventType(type())); } @@ -9827,7 +9596,7 @@ index b80bcb39473ecec86be5671f38698130bd9acbf3..d886cbac5f4c073e14e12f257fa92041 #elif PLATFORM(GTK) WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional>&& preeditUnderlines, std::optional&& preeditSelectionRange, Vector&& commands, bool isAutoRepeat, bool isKeypad) -@@ -75,6 +93,24 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S +@@ -74,6 +92,24 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S ASSERT(isKeyboardEventType(type())); } @@ -9852,7 +9621,7 @@ index b80bcb39473ecec86be5671f38698130bd9acbf3..d886cbac5f4c073e14e12f257fa92041 #elif PLATFORM(IOS_FAMILY) WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, bool isAutoRepeat, bool isKeypad, bool isSystemKey) -@@ -138,6 +174,27 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S +@@ -137,6 +173,27 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S #endif @@ -9916,10 +9685,10 @@ index fd4722dd38df74f259d8add02025549022a0a205..e1c33f6d766707170935b3e77e81098c void setPosition(const WebCore::IntPoint& position) { m_position = position; } const WebCore::IntPoint& globalPosition() const { return m_globalPosition; } diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h -index a75ea6985662cfb232a4910189191759a20f34b9..6e5fc673484ce3ca9750bb8a7dd56d6f704b7b66 100644 +index 4fe4a84a939e46607a2871fcbdd96b1357573915..4eb0e10f4c079cf3bc7e94f6c02afd09ffe5015c 100644 --- a/Source/WebKit/Shared/WebPageCreationParameters.h +++ b/Source/WebKit/Shared/WebPageCreationParameters.h -@@ -306,6 +306,8 @@ struct WebPageCreationParameters { +@@ -303,6 +303,8 @@ struct WebPageCreationParameters { bool httpsUpgradeEnabled { true }; @@ -9929,10 +9698,10 @@ index a75ea6985662cfb232a4910189191759a20f34b9..6e5fc673484ce3ca9750bb8a7dd56d6f bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload { false }; #endif diff --git a/Source/WebKit/Shared/WebPageCreationParameters.serialization.in b/Source/WebKit/Shared/WebPageCreationParameters.serialization.in -index 2c3fc666d67714ab966a9b991ed2eccc45cf1ff1..929ee387024355c40333ae7e12d7155688299e32 100644 +index b819a2ee2af4b6d3e6eeabecf6ef770eaf988bbe..e43123a99d7c2fff6ea2875001631f2b52aa70c0 100644 --- a/Source/WebKit/Shared/WebPageCreationParameters.serialization.in +++ b/Source/WebKit/Shared/WebPageCreationParameters.serialization.in -@@ -230,6 +230,8 @@ enum class WebCore::UserInterfaceLayoutDirection : bool; +@@ -227,6 +227,8 @@ enum class WebCore::UserInterfaceLayoutDirection : bool; bool httpsUpgradeEnabled; @@ -9941,6 +9710,28 @@ index 2c3fc666d67714ab966a9b991ed2eccc45cf1ff1..929ee387024355c40333ae7e12d71556 #if PLATFORM(IOS) || PLATFORM(VISION) bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload; #endif +diff --git a/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp b/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp +index 40d482a1860598391363027e63b010b3ce32b014..e654ae5e7c54b788badd463b1f2b653160d0370e 100644 +--- a/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp ++++ b/Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp +@@ -32,7 +32,7 @@ + + namespace WebKit { + +-#if ENABLE(DEVELOPER_MODE) ++#if TRUE + static String getExecutablePath() + { + CString executablePath = FileSystem::currentExecutablePath(); +@@ -44,7 +44,7 @@ static String getExecutablePath() + + static String findWebKitProcess(const char* processName) + { +-#if ENABLE(DEVELOPER_MODE) ++#if TRUE + static const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH"); + if (execDirectory) { + String processPath = FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(execDirectory), StringView::fromLatin1(processName)); diff --git a/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp b/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp index 8d33ceb065fb3e90372b0c696779189d07838da0..6e3194c3e96e46bfa09f8d706324e6515df1e7f4 100644 --- a/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp @@ -10012,10 +9803,10 @@ index 0000000000000000000000000000000000000000..f4f09d171ebf9774b3f8744751d220d3 + bool canSmartReplace() +} diff --git a/Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp b/Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp -index ce942ed6ce6bfda002e94c81633d56b2464c129d..0db4d7e6ab7f584b18d923f1ece6b498be1d463d 100644 +index b00e6ecd0deb54eed0c2f05ba54c75a37383a90e..df085b96df4c8f5c1cb8cc25db20d019ad20f67e 100644 --- a/Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp +++ b/Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp -@@ -44,6 +44,15 @@ +@@ -40,6 +40,15 @@ namespace WebKit { @@ -10031,8 +9822,8 @@ index ce942ed6ce6bfda002e94c81633d56b2464c129d..0db4d7e6ab7f584b18d923f1ece6b498 AuxiliaryProcessMainCommon::AuxiliaryProcessMainCommon() { #if ENABLE(BREAKPAD) -@@ -97,6 +106,10 @@ bool AuxiliaryProcessMainCommon::parseCommandLine(int argc, char** argv) - JSC::Config::configureForTesting(); +@@ -94,6 +103,10 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_END + } #endif +// Playwright begin @@ -10043,13 +9834,13 @@ index ce942ed6ce6bfda002e94c81633d56b2464c129d..0db4d7e6ab7f584b18d923f1ece6b498 } diff --git a/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp b/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp -index 7fd5cbb0fec93a2f305a6d41f14946ec6dae778e..4332ec81e0d24928000483b3e554e385ee3b9ff1 100644 +index 9edb5fbcd103cd8d1b224dfd60ac88aabe9626d2..9ed392ae3809f8bda92a2765ffadc643f23fe856 100644 --- a/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp +++ b/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp @@ -41,6 +41,10 @@ bool AuxiliaryProcessMainCommon::parseCommandLine(int argc, char** argv) m_parameters.connectionIdentifier = IPC::Connection::Identifier { reinterpret_cast(parseIntegerAllowingTrailingJunk(StringView::fromLatin1(argv[++i])).value_or(0)) }; else if (!strcmp(argv[i], "-processIdentifier") && i + 1 < argc) - m_parameters.processIdentifier = LegacyNullableObjectIdentifier(parseIntegerAllowingTrailingJunk(StringView::fromLatin1(argv[++i])).value_or(0)); + m_parameters.processIdentifier = ObjectIdentifier(parseIntegerAllowingTrailingJunk(StringView::fromLatin1(argv[++i])).value_or(0)); +// Playwright begin + else if (!strcmp(argv[i], "-enable-shared-array-buffer")) + m_parameters.shouldEnableSharedArrayBuffer = true; @@ -10058,7 +9849,7 @@ index 7fd5cbb0fec93a2f305a6d41f14946ec6dae778e..4332ec81e0d24928000483b3e554e385 JSC::Config::configureForTesting(); else if (!strcmp(argv[i], "-disable-jit")) diff --git a/Source/WebKit/Shared/win/WebEventFactory.cpp b/Source/WebKit/Shared/win/WebEventFactory.cpp -index 4d418e2bd7f970bc5bfebceb88adb172e5eb8540..8a58380d830f9a8aec3b4240d9c8cf7e65eaccdc 100644 +index a1044685ff596361f14f418a1d1f0b133dee385a..2916a6f8e0c370b860ea45106c34d8dd82547f93 100644 --- a/Source/WebKit/Shared/win/WebEventFactory.cpp +++ b/Source/WebKit/Shared/win/WebEventFactory.cpp @@ -484,7 +484,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message @@ -10071,10 +9862,10 @@ index 4d418e2bd7f970bc5bfebceb88adb172e5eb8540..8a58380d830f9a8aec3b4240d9c8cf7e #endif // ENABLE(TOUCH_EVENTS) diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt -index e1914a5393ae2e099fd9fc70d46cb4f1ad2a9aee..3918547200acc80c76a4c55136d28295c60a4217 100644 +index 3fd56653a93792ebde4b607e1f7157d5aa95b933..06108563862ca29350a62ba3ddf5186bd702706a 100644 --- a/Source/WebKit/Sources.txt +++ b/Source/WebKit/Sources.txt -@@ -385,6 +385,7 @@ Shared/XR/XRDeviceProxy.cpp +@@ -384,6 +384,7 @@ Shared/XR/XRDeviceProxy.cpp UIProcess/AuxiliaryProcessProxy.cpp UIProcess/BackgroundProcessResponsivenessTimer.cpp UIProcess/BrowsingContextGroup.cpp @@ -10082,7 +9873,7 @@ index e1914a5393ae2e099fd9fc70d46cb4f1ad2a9aee..3918547200acc80c76a4c55136d28295 UIProcess/DeviceIdHashSaltStorage.cpp UIProcess/DisplayLink.cpp UIProcess/DisplayLinkProcessProxyClient.cpp -@@ -394,16 +395,20 @@ UIProcess/FrameLoadState.cpp +@@ -393,16 +394,20 @@ UIProcess/FrameLoadState.cpp UIProcess/FrameProcess.cpp UIProcess/GeolocationPermissionRequestManagerProxy.cpp UIProcess/GeolocationPermissionRequestProxy.cpp @@ -10103,7 +9894,7 @@ index e1914a5393ae2e099fd9fc70d46cb4f1ad2a9aee..3918547200acc80c76a4c55136d28295 UIProcess/RemotePageDrawingAreaProxy.cpp UIProcess/RemotePageProxy.cpp UIProcess/ResponsivenessTimer.cpp -@@ -445,6 +450,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp +@@ -444,6 +449,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp UIProcess/WebPageDiagnosticLoggingClient.cpp UIProcess/WebPageGroup.cpp UIProcess/WebPageInjectedBundleClient.cpp @@ -10125,10 +9916,10 @@ index e1914a5393ae2e099fd9fc70d46cb4f1ad2a9aee..3918547200acc80c76a4c55136d28295 UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp UIProcess/Media/MediaUsageManager.cpp diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt -index 747fe6c2c1f8d8058ad4ecf3a671f80f5da60d78..1767179349cda6228a3dc7fc25e64b969e9a9668 100644 +index 691526c0539d33e3bf69a84d26eb24b1f5d8202a..1e195cc3f2fa96059f3293ce3aca9ad5d1a55258 100644 --- a/Source/WebKit/SourcesCocoa.txt +++ b/Source/WebKit/SourcesCocoa.txt -@@ -267,6 +267,7 @@ UIProcess/API/Cocoa/_WKArchiveExclusionRule.mm +@@ -269,6 +269,7 @@ UIProcess/API/Cocoa/_WKArchiveExclusionRule.mm UIProcess/API/Cocoa/_WKAttachment.mm UIProcess/API/Cocoa/_WKAutomationSession.mm UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.mm @@ -10136,7 +9927,7 @@ index 747fe6c2c1f8d8058ad4ecf3a671f80f5da60d78..1767179349cda6228a3dc7fc25e64b96 UIProcess/API/Cocoa/_WKContentRuleListAction.mm UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm UIProcess/API/Cocoa/_WKCustomHeaderFields.mm @no-unify -@@ -457,6 +458,7 @@ UIProcess/Inspector/ios/WKInspectorHighlightView.mm +@@ -463,6 +464,7 @@ UIProcess/Inspector/ios/WKInspectorHighlightView.mm UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.mm UIProcess/Inspector/mac/RemoteWebInspectorUIProxyMac.mm @@ -10145,10 +9936,10 @@ index 747fe6c2c1f8d8058ad4ecf3a671f80f5da60d78..1767179349cda6228a3dc7fc25e64b96 UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm UIProcess/Inspector/mac/WKInspectorViewController.mm diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt -index e193244e152b0c7ca76ecfd3b761412e80e0019a..e557aa325075828ccb94cc2cd62d10751847c4ef 100644 +index d72fbeaf135545416a2997d557fd0bead76dc486..a68862ac8f44c4a54d39483af518b99071a85c0f 100644 --- a/Source/WebKit/SourcesGTK.txt +++ b/Source/WebKit/SourcesGTK.txt -@@ -130,6 +130,7 @@ UIProcess/API/glib/WebKitAutomationSession.cpp @no-unify +@@ -122,6 +122,7 @@ UIProcess/API/glib/WebKitAutomationSession.cpp @no-unify UIProcess/API/glib/WebKitBackForwardList.cpp @no-unify UIProcess/API/glib/WebKitBackForwardListItem.cpp @no-unify UIProcess/API/glib/WebKitClipboardPermissionRequest.cpp @no-unify @@ -10156,15 +9947,15 @@ index e193244e152b0c7ca76ecfd3b761412e80e0019a..e557aa325075828ccb94cc2cd62d1075 UIProcess/API/glib/WebKitContextMenuClient.cpp @no-unify UIProcess/API/glib/WebKitCookieManager.cpp @no-unify UIProcess/API/glib/WebKitCredential.cpp @no-unify -@@ -259,6 +260,7 @@ UIProcess/glib/DisplayVBlankMonitor.cpp +@@ -251,6 +252,7 @@ UIProcess/glib/DisplayVBlankMonitor.cpp UIProcess/glib/DisplayVBlankMonitorDRM.cpp UIProcess/glib/DisplayVBlankMonitorTimer.cpp UIProcess/glib/FenceMonitor.cpp +UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp UIProcess/glib/ScreenManager.cpp - UIProcess/glib/SystemSettingsManager.cpp + UIProcess/glib/SystemSettingsManagerProxy.cpp UIProcess/glib/WebPageProxyGLib.cpp -@@ -277,6 +279,7 @@ UIProcess/gtk/DisplayX11.cpp @no-unify +@@ -269,6 +271,7 @@ UIProcess/gtk/DisplayX11.cpp @no-unify UIProcess/gtk/DisplayWayland.cpp @no-unify UIProcess/gtk/WebDateTimePickerGtk.cpp UIProcess/gtk/HardwareAccelerationManager.cpp @@ -10172,7 +9963,7 @@ index e193244e152b0c7ca76ecfd3b761412e80e0019a..e557aa325075828ccb94cc2cd62d1075 UIProcess/gtk/KeyBindingTranslator.cpp UIProcess/gtk/PointerLockManager.cpp @no-unify UIProcess/gtk/PointerLockManagerWayland.cpp @no-unify -@@ -290,6 +293,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cpp +@@ -282,6 +285,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cpp UIProcess/gtk/WebColorPickerGtk.cpp UIProcess/gtk/WebContextMenuProxyGtk.cpp UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp @@ -10182,10 +9973,10 @@ index e193244e152b0c7ca76ecfd3b761412e80e0019a..e557aa325075828ccb94cc2cd62d1075 UIProcess/gtk/WebPasteboardProxyGtk.cpp UIProcess/gtk/WebPopupMenuProxyGtk.cpp diff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt -index a5952c5ba4380b03bc418ce33332ad3d9a3dc372..ca966a925647e37cc00f74b704957e270600a4e2 100644 +index f655188213595d7e990faa208258486a8e721bb1..88f81226b302ea9b190b3d72576992746531a882 100644 --- a/Source/WebKit/SourcesWPE.txt +++ b/Source/WebKit/SourcesWPE.txt -@@ -132,6 +132,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify +@@ -124,6 +124,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify UIProcess/API/glib/WebKitAutomationSession.cpp @no-unify UIProcess/API/glib/WebKitBackForwardList.cpp @no-unify UIProcess/API/glib/WebKitBackForwardListItem.cpp @no-unify @@ -10193,7 +9984,7 @@ index a5952c5ba4380b03bc418ce33332ad3d9a3dc372..ca966a925647e37cc00f74b704957e27 UIProcess/API/glib/WebKitContextMenuClient.cpp @no-unify UIProcess/API/glib/WebKitCookieManager.cpp @no-unify UIProcess/API/glib/WebKitCredential.cpp @no-unify -@@ -165,6 +166,7 @@ UIProcess/API/glib/WebKitOptionMenu.cpp @no-unify +@@ -157,6 +158,7 @@ UIProcess/API/glib/WebKitOptionMenu.cpp @no-unify UIProcess/API/glib/WebKitOptionMenuItem.cpp @no-unify UIProcess/API/glib/WebKitPermissionRequest.cpp @no-unify UIProcess/API/glib/WebKitPermissionStateQuery.cpp @no-unify @@ -10201,7 +9992,7 @@ index a5952c5ba4380b03bc418ce33332ad3d9a3dc372..ca966a925647e37cc00f74b704957e27 UIProcess/API/glib/WebKitPolicyDecision.cpp @no-unify UIProcess/API/glib/WebKitPrivate.cpp @no-unify UIProcess/API/glib/WebKitProtocolHandler.cpp @no-unify -@@ -201,6 +203,7 @@ UIProcess/API/soup/HTTPCookieStoreSoup.cpp +@@ -193,6 +195,7 @@ UIProcess/API/soup/HTTPCookieStoreSoup.cpp UIProcess/API/wpe/InputMethodFilterWPE.cpp @no-unify UIProcess/API/wpe/PageClientImpl.cpp @no-unify UIProcess/API/wpe/WebKitColor.cpp @no-unify @@ -10209,20 +10000,21 @@ index a5952c5ba4380b03bc418ce33332ad3d9a3dc372..ca966a925647e37cc00f74b704957e27 UIProcess/API/wpe/WebKitInputMethodContextWPE.cpp @no-unify UIProcess/API/wpe/WebKitInputMethodContextImplWPE.cpp @no-unify UIProcess/API/wpe/WebKitPopupMenu.cpp @no-unify -@@ -229,6 +232,7 @@ UIProcess/glib/DisplayVBlankMonitor.cpp +@@ -221,6 +224,7 @@ UIProcess/glib/DisplayVBlankMonitor.cpp UIProcess/glib/DisplayVBlankMonitorDRM.cpp UIProcess/glib/DisplayVBlankMonitorTimer.cpp UIProcess/glib/FenceMonitor.cpp +UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp UIProcess/glib/ScreenManager.cpp - UIProcess/glib/SystemSettingsManager.cpp + UIProcess/glib/SystemSettingsManagerProxy.cpp UIProcess/glib/WebPageProxyGLib.cpp -@@ -262,7 +266,12 @@ UIProcess/linux/MemoryPressureMonitor.cpp +@@ -254,8 +258,13 @@ UIProcess/linux/MemoryPressureMonitor.cpp UIProcess/soup/WebProcessPoolSoup.cpp UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp +UIProcess/wpe/InspectorTargetProxyWPE.cpp UIProcess/wpe/ScreenManagerWPE.cpp + UIProcess/wpe/SystemSettingsManagerProxyWPE.cpp +UIProcess/wpe/WebColorPickerWPE.cpp +UIProcess/wpe/WebDateTimePickerWPE.cpp +UIProcess/wpe/WebPageInspectorEmulationAgentWPE.cpp @@ -10230,7 +10022,7 @@ index a5952c5ba4380b03bc418ce33332ad3d9a3dc372..ca966a925647e37cc00f74b704957e27 UIProcess/wpe/WebPageProxyWPE.cpp UIProcess/wpe/WebPreferencesWPE.cpp -@@ -289,6 +298,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp +@@ -282,6 +291,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp @@ -10239,8 +10031,47 @@ index a5952c5ba4380b03bc418ce33332ad3d9a3dc372..ca966a925647e37cc00f74b704957e27 WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp WebProcess/WebPage/AcceleratedSurface.cpp +diff --git a/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp b/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp +index c1a03ab72d496d65b1036a7227ad0e23d896f89f..a17ffd445f3070e579aa11fac24dca881585903b 100644 +--- a/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp ++++ b/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp +@@ -255,6 +255,11 @@ WebPageProxy* PageConfiguration::relatedPage() const + return m_data.relatedPage.get(); + } + ++WebKit::WebPageProxy* PageConfiguration::openerPageForInspector() const ++{ ++ return m_data.openerPageForInspector.get(); ++} ++ + WebPageProxy* PageConfiguration::pageToCloneSessionStorageFrom() const + { + return m_data.pageToCloneSessionStorageFrom.get(); +diff --git a/Source/WebKit/UIProcess/API/APIPageConfiguration.h b/Source/WebKit/UIProcess/API/APIPageConfiguration.h +index 8e7d7abc63f5740a0ad05c811470bd476219c93f..0c16acfa885b2d648c58ebf14f2babd5547d6571 100644 +--- a/Source/WebKit/UIProcess/API/APIPageConfiguration.h ++++ b/Source/WebKit/UIProcess/API/APIPageConfiguration.h +@@ -155,6 +155,10 @@ public: + WebKit::WebPageProxy* relatedPage() const; + void setRelatedPage(WeakPtr&& relatedPage) { m_data.relatedPage = WTFMove(relatedPage); } + ++ // This is similar to relatedPage(), but it is also set for noopener links. ++ WebKit::WebPageProxy* openerPageForInspector() const; ++ void setOpenerPageForInspector(WeakPtr&& openerPageForInspector) { m_data.openerPageForInspector = WTFMove(openerPageForInspector); } ++ + WebKit::WebPageProxy* pageToCloneSessionStorageFrom() const; + void setPageToCloneSessionStorageFrom(WeakPtr&&); + +@@ -510,6 +514,7 @@ private: + #endif + RefPtr pageGroup; + WeakPtr relatedPage; ++ WeakPtr openerPageForInspector; + std::optional openerInfo; + WebCore::Site openedSite; + WTF::String openedMainFrameName; diff --git a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp -index d561c07ae53a60c6503a355ed620bc289a2220ae..b950ac5190d8d05c66718c545c76d53d45cfff9d 100644 +index a08bd7c99393d04b0b377e404196bc2fda008038..9943de5d16474cf9a506f7c2b0daf555abdfc9cf 100644 --- a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp +++ b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp @@ -52,6 +52,10 @@ Ref ProcessPoolConfiguration::copy() @@ -10255,7 +10086,7 @@ index d561c07ae53a60c6503a355ed620bc289a2220ae..b950ac5190d8d05c66718c545c76d53d copy->m_shouldTakeUIBackgroundAssertion = this->m_shouldTakeUIBackgroundAssertion; copy->m_shouldCaptureDisplayInUIProcess = this->m_shouldCaptureDisplayInUIProcess; diff --git a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h -index 32ef9bd308e520f5ac7173639c8b23ea91cde037..7a80553c2d91b9236f563fa1b76aa8a50b8545ba 100644 +index 1dd06677f5b6712abce52103c0209ef46a25ed77..869c2a1eec2797cd7fabee4ed7949cefb47ca361 100644 --- a/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h +++ b/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h @@ -96,6 +96,16 @@ public: @@ -10275,7 +10106,7 @@ index 32ef9bd308e520f5ac7173639c8b23ea91cde037..7a80553c2d91b9236f563fa1b76aa8a5 bool alwaysRunsAtBackgroundPriority() const { return m_alwaysRunsAtBackgroundPriority; } void setAlwaysRunsAtBackgroundPriority(bool alwaysRunsAtBackgroundPriority) { m_alwaysRunsAtBackgroundPriority = alwaysRunsAtBackgroundPriority; } -@@ -173,6 +183,10 @@ private: +@@ -178,6 +188,10 @@ private: bool m_ignoreSynchronousMessagingTimeoutsForTesting { false }; bool m_attrStyleEnabled { false }; bool m_shouldThrowExceptionForGlobalConstantRedeclaration { true }; @@ -10286,21 +10117,8 @@ index 32ef9bd308e520f5ac7173639c8b23ea91cde037..7a80553c2d91b9236f563fa1b76aa8a5 bool m_alwaysRunsAtBackgroundPriority { false }; bool m_shouldTakeUIBackgroundAssertion { true }; bool m_shouldCaptureDisplayInUIProcess { DEFAULT_CAPTURE_DISPLAY_IN_UI_PROCESS }; -diff --git a/Source/WebKit/UIProcess/API/APITargetedElementRequest.h b/Source/WebKit/UIProcess/API/APITargetedElementRequest.h -index 47e2ab76c6dc7ed92cd953f1462e6f4bd149e1d7..e70efd325dd229a207e1790cbf75954189ee87f6 100644 ---- a/Source/WebKit/UIProcess/API/APITargetedElementRequest.h -+++ b/Source/WebKit/UIProcess/API/APITargetedElementRequest.h -@@ -34,7 +34,7 @@ class WebPageProxy; - - namespace API { - --class TargetedElementRequest final : public ObjectImpl { -+class TargetedElementRequest final : public ObjectImpl { - public: - bool shouldIgnorePointerEventsNone() const { return m_request.shouldIgnorePointerEventsNone; } - void setShouldIgnorePointerEventsNone(bool value) { m_request.shouldIgnorePointerEventsNone = value; } diff --git a/Source/WebKit/UIProcess/API/APIUIClient.h b/Source/WebKit/UIProcess/API/APIUIClient.h -index 6c81074a5b918563a68a549b21be1c970a395643..0a9e1809f65ef749870c17d61e426e222af5463a 100644 +index f7d8880ba2c010245a69e779f5a3d11f6af6b4e0..4ed7b422d72c8814aec0f1d9cbcf466dc464fe17 100644 --- a/Source/WebKit/UIProcess/API/APIUIClient.h +++ b/Source/WebKit/UIProcess/API/APIUIClient.h @@ -116,6 +116,7 @@ public: @@ -10355,10 +10173,10 @@ index 026121d114c5fcad84c1396be8d692625beaa3bd..edd6e5cae033124c589959a42522fde0 } #endif diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp -index 01fa2b32627f99540d82009dad97b6dbe921b59f..c5eaffd5f2496215dc4d45bf415bf41d3e216901 100644 +index 048cd54f4b349d48d023f5532e4606f96340bfc2..562ad6fc0cfc3a7082ef19ab2bf592718bb16fa6 100644 --- a/Source/WebKit/UIProcess/API/C/WKPage.cpp +++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp -@@ -1795,6 +1795,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient +@@ -1800,6 +1800,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient completionHandler(String()); } @@ -10372,7 +10190,7 @@ index 01fa2b32627f99540d82009dad97b6dbe921b59f..c5eaffd5f2496215dc4d45bf415bf41d void setStatusText(WebPageProxy* page, const String& text) final { if (!m_client.setStatusText) -@@ -1824,6 +1831,8 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient +@@ -1829,6 +1836,8 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient { if (!m_client.didNotHandleKeyEvent) return; @@ -10442,10 +10260,10 @@ index 1484f064ec89ee8c25c35df9f0a4462896699415..0622f4d5fc9144b9059395d9d0730a4a // Version 15. WKPageDecidePolicyForSpeechRecognitionPermissionRequestCallback decidePolicyForSpeechRecognitionPermissionRequest; diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm -index 26c2e39dbc49f9435a94ae4825e2ac5def1b061f..3bdf9f44707a0edc4c82a0f77a943df772e83828 100644 +index 6625fbd43fe223d7be556283e43abd70bb664d5b..9bbd46a892af196c32636d622d959aef1b6d14b3 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm +++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm -@@ -702,6 +702,16 @@ - (void)_setMediaCaptureRequiresSecureConnection:(BOOL)requiresSecureConnection +@@ -697,6 +697,16 @@ - (void)_setMediaCaptureRequiresSecureConnection:(BOOL)requiresSecureConnection _preferences->setMediaCaptureRequiresSecureConnection(requiresSecureConnection); } @@ -10463,7 +10281,7 @@ index 26c2e39dbc49f9435a94ae4825e2ac5def1b061f..3bdf9f44707a0edc4c82a0f77a943df7 { return _preferences->inactiveMediaCaptureStreamRepromptIntervalInMinutes(); diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h -index 39065a0262f7c1a4ce35ba7373105df0b5ef17ee..fbde5990b2d881b2aec01dd99482bbb77f74e7b4 100644 +index 07f25e73846777573709a8091fab19fe576e4282..e194073bc1a0dac8f2e2bf25f430c8624f2cb932 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h +++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h @@ -119,6 +119,7 @@ typedef NS_ENUM(NSInteger, _WKPitchCorrectionAlgorithm) { @@ -10475,7 +10293,7 @@ index 39065a0262f7c1a4ce35ba7373105df0b5ef17ee..fbde5990b2d881b2aec01dd99482bbb7 @property (nonatomic, setter=_setICECandidateFilteringEnabled:) BOOL _iceCandidateFilteringEnabled WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); @property (nonatomic, setter=_setInactiveMediaCaptureStreamRepromptIntervalInMinutes:) double _inactiveMediaCaptureStreamRepromptIntervalInMinutes WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h -index ca205ac38f92e95c24830d30657d093afd22f02b..aeaf6335ab9fc0590cd723e0c585677a014c4549 100644 +index 11fd07547370723575352866358867b5dddb8a61..8d59d73717325a92e3eb892384daf35d8eb3fb17 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h +++ b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h @@ -149,6 +149,12 @@ WK_SWIFT_UI_ACTOR @@ -10492,18 +10310,10 @@ index ca205ac38f92e95c24830d30657d093afd22f02b..aeaf6335ab9fc0590cd723e0c585677a /*! @abstract A delegate to request permission for microphone audio and camera video access. @param webView The web view invoking the delegate method. diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h -index eff4cf557033561ab20762d93a58c2d71f5505f0..2fd5a2515c54d9edcab48fa3d993298fa3969648 100644 +index eff4cf557033561ab20762d93a58c2d71f5505f0..9418e2c51e50190dee2b5d7c854eacea8c5a4b76 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h +++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h -@@ -24,7 +24,6 @@ - */ - - #import -- - #import - - #if __has_include() -@@ -126,6 +125,8 @@ WK_CLASS_AVAILABLE(macos(10.11), ios(9.0)) +@@ -126,6 +126,8 @@ WK_CLASS_AVAILABLE(macos(10.11), ios(9.0)) #endif #endif @@ -10513,7 +10323,7 @@ index eff4cf557033561ab20762d93a58c2d71f5505f0..2fd5a2515c54d9edcab48fa3d993298f NS_ASSUME_NONNULL_END diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm -index 211037030a86db642e99c3881488897cd2d8caa9..eb6fb610dd5db0a10f1d121f0d9519943b9d9c0b 100644 +index 233c902323f43300cbe7a4a0a02f6afdb8c9dc1c..5484a2101a984612c1bde529250ad75c3ebcdfd2 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm +++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm @@ -55,6 +55,7 @@ @@ -10524,7 +10334,7 @@ index 211037030a86db642e99c3881488897cd2d8caa9..eb6fb610dd5db0a10f1d121f0d951994 #import #import #import -@@ -489,6 +490,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple +@@ -493,6 +494,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple }); } @@ -10664,7 +10474,7 @@ index 0000000000000000000000000000000000000000..69eb9c6aa30beb8ea21a0ef647e46304 +} +@end diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h -index 9eadc5f1a8c9b002ab96727a1fb472403a21cf24..f3ceaaa8a23690b77e01aed1ed532e3afccd866c 100644 +index 6b3a806a282b8de4af64b0db7d04215a4321c924..f437ed7c7c6c1492f110141861aa7feeb8096246 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h +++ b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h @@ -67,6 +67,7 @@ WK_CLASS_AVAILABLE(macos(10.10), ios(8.0)) @@ -10676,7 +10486,7 @@ index 9eadc5f1a8c9b002ab96727a1fb472403a21cf24..f3ceaaa8a23690b77e01aed1ed532e3a @property (nonatomic) BOOL processSwapsOnNavigationWithinSameNonHTTPFamilyProtocol WK_API_AVAILABLE(macos(12.0), ios(15.0)); @property (nonatomic) BOOL prewarmsProcessesAutomatically WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm -index df71be1e30c4a13fe9565d309c7bbfb82e049d06..8424a471e7841d300174aa54143578f8d18ad15f 100644 +index 56d52f9a7c6a893b598daacbfa6d491a7ed22460..83fee0d877594f20eade4b963c1fff08171838e7 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm +++ b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm @@ -241,6 +241,16 @@ - (BOOL)processSwapsOnNavigation @@ -10696,18 +10506,6 @@ index df71be1e30c4a13fe9565d309c7bbfb82e049d06..8424a471e7841d300174aa54143578f8 - (void)setPrewarmsProcessesAutomatically:(BOOL)prewarms { _processPoolConfiguration->setIsAutomaticProcessWarmingEnabled(prewarms); -diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm -index 041fc95fcabaa12ba65da4e8d3ee3e9253b8dff8..4506f3208b8a338fc1bcdae6e9f227f9434b8bda 100644 ---- a/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm -+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm -@@ -24,6 +24,7 @@ - */ - - #import "config.h" -+#import "WKWebViewPrivate.h" - #import "_WKRemoteWebInspectorViewControllerInternal.h" - - #if PLATFORM(MAC) diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.h b/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.h index 4974e14214e2bb3e982325b885bab33e54f83998..cacdf8c71fab248d38d2faf03f7affdcfed1ef62 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.h @@ -10720,18 +10518,32 @@ index 4974e14214e2bb3e982325b885bab33e54f83998..cacdf8c71fab248d38d2faf03f7affdc typedef NS_ENUM(NSInteger, _WKUserStyleLevel) { _WKUserStyleUserLevel, -diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm -index 8f7d300c449fd3323f3a47630a5b87835e7b2350..8b2b098f0bc8d9ad27654c33f616c0b73330573c 100644 ---- a/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm -+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm -@@ -35,6 +35,7 @@ - #import "WebPageProxy.h" - #import "_WKUserContentWorldInternal.h" +diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKWebPushDaemonConnection.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKWebPushDaemonConnection.mm +index 0a6086b000eb61013e49ce0c1cc5a26ec275bdc2..261bb8828df3e282fd6c4a2fa8ec8684342465a2 100644 +--- a/Source/WebKit/UIProcess/API/Cocoa/_WKWebPushDaemonConnection.mm ++++ b/Source/WebKit/UIProcess/API/Cocoa/_WKWebPushDaemonConnection.mm +@@ -32,6 +32,7 @@ + #import "WKSecurityOriginInternal.h" + #import "WebPushDaemonConnectionConfiguration.h" + #import "_WKNotificationDataInternal.h" ++#import "_WKWebPushMessageInternal.h" + #import "_WKWebPushSubscriptionDataInternal.h" + #import + #import +diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKWebPushSubscriptionData.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKWebPushSubscriptionData.mm +index 0a78daba00961bf10564a0b53067960b71d8b61d..696408b77c82e205a134edf2ee17ff971af226f3 100644 +--- a/Source/WebKit/UIProcess/API/Cocoa/_WKWebPushSubscriptionData.mm ++++ b/Source/WebKit/UIProcess/API/Cocoa/_WKWebPushSubscriptionData.mm +@@ -28,6 +28,9 @@ #import -+#import - #import + #import - @implementation _WKUserStyleSheet ++#import ++#import ++ + @implementation _WKWebPushSubscriptionData + + - (void)dealloc diff --git a/Source/WebKit/UIProcess/API/glib/WebKitBrowserInspector.cpp b/Source/WebKit/UIProcess/API/glib/WebKitBrowserInspector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..575245fc1f279a75f7e74c26652cf772a2fc95b7 @@ -10935,10 +10747,10 @@ index 0000000000000000000000000000000000000000..e0b1da48465c850f541532ed961d1b77 +WebKit::WebPageProxy* webkitBrowserInspectorCreateNewPageInContext(WebKitWebContext*); +void webkitBrowserInspectorQuitApplication(); diff --git a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp -index bfc64d267c52ab6174bbde5c6f6471313ffbbd22..4110313841d5b4c8b944d52e24e76dac0710453d 100644 +index 9b6d8db85df969e609de036fac67374226ecd48e..2b293d5f24e562f06859432580f2cdfe40f8b9a6 100644 --- a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp +++ b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp -@@ -94,6 +94,10 @@ private: +@@ -101,6 +101,10 @@ private: page.makeViewBlankIfUnpaintedSinceLastLoadCommit(); webkitWebViewRunJavaScriptPrompt(m_webView, message.utf8(), defaultValue.utf8(), WTFMove(completionHandler)); } @@ -10950,10 +10762,10 @@ index bfc64d267c52ab6174bbde5c6f6471313ffbbd22..4110313841d5b4c8b944d52e24e76dac bool canRunBeforeUnloadConfirmPanel() const final { return true; } diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp -index f34220b0e7629d4bbdf311f73ce7a1b4d7212e0a..b4940b7058022c73402e5ea76b4e592a295f5b84 100644 +index 49d382e0d469ca081754255feb71a70fca6acb13..2a5532502d0c34f1ad5e5d393ec12f52ad68ff7c 100644 --- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp +++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp -@@ -421,10 +421,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa +@@ -422,10 +422,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa } } @@ -10973,7 +10785,7 @@ index f34220b0e7629d4bbdf311f73ce7a1b4d7212e0a..b4940b7058022c73402e5ea76b4e592a GUniquePtr bundleFilename(g_build_filename(injectedBundleDirectory(), INJECTED_BUNDLE_FILENAME, nullptr)); WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(object); -@@ -483,6 +492,8 @@ static void webkitWebContextConstructed(GObject* object) +@@ -484,6 +493,8 @@ static void webkitWebContextConstructed(GObject* object) static void webkitWebContextDispose(GObject* object) { @@ -10982,7 +10794,7 @@ index f34220b0e7629d4bbdf311f73ce7a1b4d7212e0a..b4940b7058022c73402e5ea76b4e592a WebKitWebContextPrivate* priv = WEBKIT_WEB_CONTEXT(object)->priv; if (!priv->clientsDetached) { priv->clientsDetached = true; -@@ -944,6 +955,11 @@ WebKitNetworkSession* webkit_web_context_get_network_session_for_automation(WebK +@@ -945,6 +956,11 @@ WebKitNetworkSession* webkit_web_context_get_network_session_for_automation(WebK return nullptr; #endif } @@ -10995,7 +10807,7 @@ index f34220b0e7629d4bbdf311f73ce7a1b4d7212e0a..b4940b7058022c73402e5ea76b4e592a /** * webkit_web_context_set_cache_model: diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in -index b8c2337af32ac3ce5be2b494f02c259392af994e..b1e4b2660fa30acad76888e2fe9bd50673a76549 100644 +index 15fe3e8e5652147ba54af266eda66b3962c074b9..d463fa78af375badb239c890da50ba1125e19de8 100644 --- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in +++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in @@ -161,6 +161,10 @@ webkit_web_context_set_automation_allowed (WebKitWebContext @@ -11019,10 +10831,10 @@ index c1945fbe717a42afc1f51d64a80c7de3fa9009ba..ab63fe19b00ecbd64c9421e6eecad3e2 #endif +int webkitWebContextExistingCount(); diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp -index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7fe389b8a7 100644 +index 8fcb4462e8f0f25dc07498e3e62e36ca21e04d9c..9470855f7b233049b1b3b10ee1a47690f502a8eb 100644 --- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp +++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp -@@ -34,6 +34,7 @@ +@@ -35,6 +35,7 @@ #include "WebContextMenuItem.h" #include "WebContextMenuItemData.h" #include "WebFrameProxy.h" @@ -11030,23 +10842,7 @@ index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7f #include "WebKitAuthenticationRequestPrivate.h" #include "WebKitBackForwardListPrivate.h" #include "WebKitContextMenuClient.h" -@@ -51,6 +52,7 @@ - #include "WebKitNavigationClient.h" - #include "WebKitNotificationPrivate.h" - #include "WebKitPermissionStateQueryPrivate.h" -+#include "WebKitPointerLockPermissionRequest.h" - #include "WebKitPrivate.h" - #include "WebKitResponsePolicyDecision.h" - #include "WebKitScriptDialogPrivate.h" -@@ -91,7 +93,6 @@ - #if PLATFORM(GTK) - #include "WebKitFaviconDatabasePrivate.h" - #include "WebKitInputMethodContextImplGtk.h" --#include "WebKitPointerLockPermissionRequest.h" - #include "WebKitPrintOperationPrivate.h" - #include "WebKitWebInspectorPrivate.h" - #include "WebKitWebViewBasePrivate.h" -@@ -147,6 +148,7 @@ enum { +@@ -148,6 +149,7 @@ enum { CLOSE, SCRIPT_DIALOG, @@ -11054,7 +10850,7 @@ index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7f DECIDE_POLICY, PERMISSION_REQUEST, -@@ -507,6 +509,16 @@ GRefPtr WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& p +@@ -516,6 +518,16 @@ GRefPtr WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& p void WebKitWebViewClient::frameDisplayed(WKWPE::View&) { @@ -11071,7 +10867,7 @@ index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7f { SetForScope inFrameDisplayedGuard(m_webView->priv->inFrameDisplayed, true); for (const auto& callback : m_webView->priv->frameDisplayedCallbacks) { -@@ -523,6 +535,18 @@ void WebKitWebViewClient::frameDisplayed(WKWPE::View&) +@@ -532,6 +544,18 @@ void WebKitWebViewClient::frameDisplayed(WKWPE::View&) } } @@ -11090,7 +10886,7 @@ index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7f void WebKitWebViewClient::willStartLoad(WKWPE::View&) { webkitWebViewWillStartLoad(m_webView); -@@ -609,7 +633,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision* +@@ -618,7 +642,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision* static gboolean webkitWebViewPermissionRequest(WebKitWebView*, WebKitPermissionRequest* request) { @@ -11099,7 +10895,7 @@ index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7f if (WEBKIT_IS_POINTER_LOCK_PERMISSION_REQUEST(request)) { webkit_permission_request_allow(request); return TRUE; -@@ -929,6 +953,10 @@ static void webkitWebViewConstructed(GObject* object) +@@ -941,6 +965,10 @@ static void webkitWebViewConstructed(GObject* object) priv->websitePolicies = adoptGRef(webkit_website_policies_new()); Ref configuration = priv->relatedView && priv->relatedView->priv->configurationForNextRelatedView ? priv->relatedView->priv->configurationForNextRelatedView.releaseNonNull() : webkitWebViewCreatePageConfiguration(webView); @@ -11110,7 +10906,7 @@ index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7f webkitWebViewCreatePage(webView, WTFMove(configuration)); webkitWebContextWebViewCreated(priv->context.get(), webView); -@@ -1958,6 +1986,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) +@@ -1980,6 +2008,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) G_TYPE_BOOLEAN, 1, WEBKIT_TYPE_SCRIPT_DIALOG); @@ -11126,7 +10922,7 @@ index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7f /** * WebKitWebView::decide-policy: * @web_view: the #WebKitWebView on which the signal is emitted -@@ -2750,6 +2787,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const +@@ -2765,6 +2802,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const webkit_script_dialog_unref(webView->priv->currentScriptDialog); } @@ -11151,7 +10947,7 @@ index 2d318375d33835ad78f75bd8169d9050ca850485..d607b8b2357c2b843b3654ccaa31fd7f { if (!webView->priv->currentScriptDialog) diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h -index 76f5b743cfe0a713897666545feb6fe07d6b16e8..4f13cca3cea9b20fbdb16cd5de0833832298d29a 100644 +index bf5b4c2bcca722e4d008f12194344c29c0db8824..ee6ee6b476ac28dee3a5983d03ba89ad0c9eb9ff 100644 --- a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h +++ b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h @@ -64,6 +64,7 @@ void webkitWebViewRunJavaScriptAlert(WebKitWebView*, const CString& message, Fun @@ -11175,10 +10971,10 @@ index 805f9f638c1630b5e9310494ae2970262de001cc..add3e80896c2e82bdd12cee15c8014bf #include <@API_INCLUDE_PREFIX@/WebKitClipboardPermissionRequest.h> #include <@API_INCLUDE_PREFIX@/WebKitColorChooserRequest.h> diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp -index 8deb2ea57ad6e55b79053d392ef43e6191e036f4..54f45f129acb3b83aaae11f7895c749d20c3ce9e 100644 +index ebd7d55886465375c70fb3265f6655fe43c62966..b5d2169c2b76474f12038727a66cf69e5ed23ebd 100644 --- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp +++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp -@@ -273,6 +273,8 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool +@@ -268,6 +268,8 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool { if (wasEventHandled || event.type() != WebEventType::KeyDown || !event.nativeEvent()) return; @@ -11187,7 +10983,7 @@ index 8deb2ea57ad6e55b79053d392ef43e6191e036f4..54f45f129acb3b83aaae11f7895c749d // Always consider arrow keys as handled, otherwise the GtkWindow key bindings will move the focus. guint keyval; -@@ -371,9 +373,9 @@ void PageClientImpl::selectionDidChange() +@@ -366,9 +368,9 @@ void PageClientImpl::selectionDidChange() webkitWebViewSelectionDidChange(WEBKIT_WEB_VIEW(m_viewWidget)); } @@ -11200,7 +10996,7 @@ index 8deb2ea57ad6e55b79053d392ef43e6191e036f4..54f45f129acb3b83aaae11f7895c749d void PageClientImpl::didChangeContentSize(const IntSize& size) diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h -index 56693a6cace9e41e6f353393303e36290de768fe..f28839fee5f3769d0cebf2836615d0c91fddfb76 100644 +index 536e66027bdcfec08e28503d3dd715e3c51a2c9f..2cfba18152fd87c10e1bb7630515a677799f1bbc 100644 --- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h +++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h @@ -109,7 +109,7 @@ private: @@ -11313,10 +11109,10 @@ index 496079da90993ac37689b060b69ecd4a67c2b6a8..af30181ca922f16c0f6e245c70e5ce7d G_BEGIN_DECLS diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp -index 55efbd0732f7d74fc0702d012d13465686b9bfae..9efb28a02ddb82da4b7ae0868ec29e5ec95af6f1 100644 +index 4d4f62a1a5dfc153773c3fe7c37c4fd9c0cfa4b5..647fdfbf93889c966806d5f4285a1fc0724923cc 100644 --- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp +++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp -@@ -2894,6 +2894,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase) +@@ -2902,6 +2902,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase) #endif } @@ -11328,7 +11124,7 @@ index 55efbd0732f7d74fc0702d012d13465686b9bfae..9efb28a02ddb82da4b7ae0868ec29e5e void webkitWebViewBaseEnterAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase, const LayerTreeContext& layerTreeContext) { ASSERT(webkitWebViewBase->priv->acceleratedBackingStore); -@@ -2950,12 +2955,12 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase) +@@ -2958,12 +2963,12 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase) webkitWebViewBase->priv->acceleratedBackingStore->update({ }); } @@ -11402,7 +11198,7 @@ index 7636ad733e7be66a74f8fede966b0acb905a5842..cf54287353d1e529c6765e3caf8d283a virtual void didChangePageID(WKWPE::View&) { } virtual void didReceiveUserMessage(WKWPE::View&, WebKit::UserMessage&&, CompletionHandler&& completionHandler) { completionHandler(WebKit::UserMessage()); } diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp -index ee491999df7919658c48d8eb457577335d3c5b90..09b834a89f84fb6b37f059c2cc4cce98313817e2 100644 +index 97b321f1d8bb33175f963af0f6ffe741b50e28e6..d03085cbaad14e3ed88817bf5f26facbe9a24538 100644 --- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp +++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp @@ -34,9 +34,13 @@ @@ -11432,16 +11228,7 @@ index ee491999df7919658c48d8eb457577335d3c5b90..09b834a89f84fb6b37f059c2cc4cce98 namespace WebKit { WTF_MAKE_TZONE_ALLOCATED_IMPL(PageClientImpl); -@@ -212,7 +222,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I - - WebCore::IntRect PageClientImpl::rootViewToAccessibilityScreen(const WebCore::IntRect& rect) - { -- return rootViewToScreen(rect); -+ return rootViewToScreen(rect); - } - - void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&, bool) -@@ -491,6 +501,64 @@ void PageClientImpl::selectionDidChange() +@@ -487,6 +497,64 @@ void PageClientImpl::selectionDidChange() m_view.selectionDidChange(); } @@ -11506,7 +11293,7 @@ index ee491999df7919658c48d8eb457577335d3c5b90..09b834a89f84fb6b37f059c2cc4cce98 WebKitWebResourceLoadManager* PageClientImpl::webResourceLoadManager() { return m_view.webResourceLoadManager(); -@@ -501,4 +569,23 @@ void PageClientImpl::callAfterNextPresentationUpdate(CompletionHandler&& +@@ -497,4 +565,23 @@ void PageClientImpl::callAfterNextPresentationUpdate(CompletionHandler&& m_view.callAfterNextPresentationUpdate(WTFMove(callback)); } @@ -11517,7 +11304,7 @@ index ee491999df7919658c48d8eb457577335d3c5b90..09b834a89f84fb6b37f059c2cc4cce98 +} +#endif + -+RefPtr PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color& color, const WebCore::IntRect& rect, Vector&&) ++RefPtr PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color& color, const WebCore::IntRect& rect, ColorControlSupportsAlpha, Vector&&) +{ + return WebColorPickerWPE::create(*page, color, rect); +} @@ -11531,10 +11318,10 @@ index ee491999df7919658c48d8eb457577335d3c5b90..09b834a89f84fb6b37f059c2cc4cce98 + } // namespace WebKit diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h -index 8397c722a45b279415f1648ad4673e99240089d9..41955881ad0db72ba0a27f4960330bb8dc237d2a 100644 +index 353515ae3a699d85314a924ba6fc4e9610ade23b..8a541023be8549e2c1fced51af6ed03dcd67fc6f 100644 --- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h +++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h -@@ -171,9 +171,24 @@ private: +@@ -170,9 +170,24 @@ private: void didChangeWebPageID() const override; void selectionDidChange() override; @@ -11551,7 +11338,7 @@ index 8397c722a45b279415f1648ad4673e99240089d9..41955881ad0db72ba0a27f4960330bb8 +#endif + +#if ENABLE(INPUT_TYPE_COLOR) -+ RefPtr createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&, Vector&&) override; ++ RefPtr createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&, ColorControlSupportsAlpha, Vector&&) override; +#endif +#if ENABLE(DATE_AND_TIME_INPUT_TYPES) + RefPtr createDateTimePicker(WebPageProxy&) override; @@ -11866,10 +11653,10 @@ index 2f1182cb91a00353eace0b71612df096391c2450..d71d7fc724b046fab41285bb8f390cb6 void didChangePageID(WKWPE::View&) override; void didReceiveUserMessage(WKWPE::View&, WebKit::UserMessage&&, CompletionHandler&&) override; diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSession.h b/Source/WebKit/UIProcess/Automation/WebAutomationSession.h -index 1f2e33b690d6be4f27838008f0eb32696023c8c7..4cf688212cd7c57fc46b376e6be7b7b51fe342de 100644 +index 1eb1f76b903199f5af64d48cb5ce5b54c2c67571..3d25a50fd22352a7fc2d2e638eb559313c36966b 100644 --- a/Source/WebKit/UIProcess/Automation/WebAutomationSession.h +++ b/Source/WebKit/UIProcess/Automation/WebAutomationSession.h -@@ -236,6 +236,8 @@ public: +@@ -256,6 +256,8 @@ public: void didDestroyFrame(WebCore::FrameIdentifier); @@ -11878,7 +11665,7 @@ index 1f2e33b690d6be4f27838008f0eb32696023c8c7..4cf688212cd7c57fc46b376e6be7b7b5 private: RefPtr webPageProxyForHandle(const String&); String handleForWebPageProxy(const WebPageProxy&); -@@ -287,7 +289,6 @@ private: +@@ -300,7 +302,6 @@ private: // Get base64-encoded PNG data from a bitmap. static std::optional platformGetBase64EncodedPNGData(WebCore::ShareableBitmap::Handle&&); @@ -11887,10 +11674,10 @@ index 1f2e33b690d6be4f27838008f0eb32696023c8c7..4cf688212cd7c57fc46b376e6be7b7b5 // Save base64-encoded file contents to a local file path and return the path. // This reuses the basename of the remote file path so that the filename exposed to DOM API remains the same. diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp -index a3a4997f987ba09829d54f26c1cc70842c658f87..b8cb97db12695db3bec61a01cf8073213b40f6ac 100644 +index 67b26803f31aed0690ffd4e0aa26a842edce5eea..61bb0a44b067847d3cb45ad397c9c3572e107a89 100644 --- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp +++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp -@@ -168,7 +168,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau +@@ -167,7 +167,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix); #endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) @@ -11903,10 +11690,10 @@ index a3a4997f987ba09829d54f26c1cc70842c658f87..b8cb97db12695db3bec61a01cf807321 platformGetLaunchOptions(launchOptions); } diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h -index 70aa53ec6d79c71bf2394e88f7e4c3bc8f70d4ec..bea35c50cc2288f16f86c4930d565e1247a1bba9 100644 +index a8ee41c1155989a57a5c0bd09c5144e8103c7c7c..172d567478e36d275a23ae3db82281f4a7af5c26 100644 --- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h +++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h -@@ -294,13 +294,16 @@ protected: +@@ -296,13 +296,16 @@ protected: InitializationActivityAndGrant initializationActivityAndGrant(); @@ -11925,10 +11712,10 @@ index 70aa53ec6d79c71bf2394e88f7e4c3bc8f70d4ec..bea35c50cc2288f16f86c4930d565e12 // Connection::Client diff --git a/Source/WebKit/UIProcess/BackingStore.h b/Source/WebKit/UIProcess/BackingStore.h -index 945c62704e0b25f04e9ee4be88b21f88aeda8bd9..409c1c560b2462bf59f19dfee7941748b54fd22c 100644 +index f72e17dc0973d4523c4b29a14754ec6d6036e06f..153f7b8495404513e20db757c0269f9e3c4d0e2d 100644 --- a/Source/WebKit/UIProcess/BackingStore.h +++ b/Source/WebKit/UIProcess/BackingStore.h -@@ -67,6 +67,7 @@ public: +@@ -69,6 +69,7 @@ public: float deviceScaleFactor() const { return m_deviceScaleFactor; } void paint(PlatformPaintContextPtr, const WebCore::IntRect&); @@ -12047,44 +11834,23 @@ index 0000000000000000000000000000000000000000..cd66887de171cda7d15a8e4dc6dbff63 +} // namespace WebKit + +#endif // ENABLE(REMOTE_INSPECTOR) -diff --git a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h -index aaa27547f4ad4e3cc5551f621472554f4ed287bb..294e11d5b5cac544b62254e9951580b4339f0f17 100644 ---- a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h -+++ b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h -@@ -29,6 +29,7 @@ - - #include "SOAuthorizationSession.h" - #include -+#include - - OBJC_CLASS WKSOSecretDelegate; - OBJC_CLASS WKWebView; -@@ -40,6 +41,8 @@ class PageConfiguration; - - namespace WebKit { - -+class WebPageProxy; -+ - // FSM: Idle => Active => Completed - class PopUpSOAuthorizationSession final : public SOAuthorizationSession { - public: -diff --git a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.h b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.h -index 11caa19f1f40a55fa4378ac092632731cd16f9e0..56b6ec4a8a1f6dfd199e24a91bb4c9113ba6e08c 100644 ---- a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.h -+++ b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.h -@@ -27,6 +27,7 @@ +diff --git a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h +index 1eb07a8bfadb2c4477698940b9429eefacc7d059..30e8b82bb1d8ca88ec5af80580c0ca751d10485f 100644 +--- a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h ++++ b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h +@@ -25,6 +25,7 @@ #if HAVE(APP_SSO) -+#import "APIPageConfiguration.h" - #include - #include - #include ++#import "SOAuthorizationSession.h" + #import + + namespace WebKit { diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.h b/Source/WebKit/UIProcess/Cocoa/UIDelegate.h -index 49c6fb1049761c89e9e0e40869f4d57d042c227b..acaa86f77435ba1be932e574d4b62ae2716f27e8 100644 +index 47da0ee168267f6a4a27602ea0c3cffdeb0a8a44..70eef746a34ebc037e56b4a81675e1184a37d178 100644 --- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.h +++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.h -@@ -106,6 +106,7 @@ private: +@@ -102,6 +102,7 @@ private: void runJavaScriptAlert(WebPageProxy&, const WTF::String&, WebFrameProxy*, FrameInfoData&&, Function&& completionHandler) final; void runJavaScriptConfirm(WebPageProxy&, const WTF::String&, WebFrameProxy*, FrameInfoData&&, Function&& completionHandler) final; void runJavaScriptPrompt(WebPageProxy&, const WTF::String&, const WTF::String&, WebFrameProxy*, FrameInfoData&&, Function&&) final; @@ -12092,7 +11858,7 @@ index 49c6fb1049761c89e9e0e40869f4d57d042c227b..acaa86f77435ba1be932e574d4b62ae2 void presentStorageAccessConfirmDialog(const WTF::String& requestingDomain, const WTF::String& currentDomain, CompletionHandler&&); void requestStorageAccessConfirm(WebPageProxy&, WebFrameProxy*, const WebCore::RegistrableDomain& requestingDomain, const WebCore::RegistrableDomain& currentDomain, std::optional&&, CompletionHandler&&) final; void decidePolicyForGeolocationPermissionRequest(WebPageProxy&, WebFrameProxy&, const FrameInfoData&, Function&) final; -@@ -223,6 +224,7 @@ private: +@@ -220,6 +221,7 @@ private: bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1; bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1; bool webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler : 1; @@ -12101,10 +11867,10 @@ index 49c6fb1049761c89e9e0e40869f4d57d042c227b..acaa86f77435ba1be932e574d4b62ae2 bool webViewRequestStorageAccessPanelForDomainUnderCurrentDomainForQuirkDomainsCompletionHandler : 1; bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1; diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm -index 45d81b21bbc47418f77dd5a49c032c694db3f08c..10466388e3380e939ad8199f059b25491a61e48f 100644 +index 1994f291d7e492daaefecfe93b4aa24f3d89fdef..03410eb4546e23a9f5f6ac6a3dd809207cff31e4 100644 --- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm +++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm -@@ -122,6 +122,7 @@ void UIDelegate::setDelegate(id delegate) +@@ -134,6 +134,7 @@ void UIDelegate::setDelegate(id delegate) m_delegateMethods.webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)]; m_delegateMethods.webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)]; m_delegateMethods.webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)]; @@ -12112,7 +11878,7 @@ index 45d81b21bbc47418f77dd5a49c032c694db3f08c..10466388e3380e939ad8199f059b2549 m_delegateMethods.webViewRequestStorageAccessPanelUnderFirstPartyCompletionHandler = [delegate respondsToSelector:@selector(_webView:requestStorageAccessPanelForDomain:underCurrentDomain:completionHandler:)]; m_delegateMethods.webViewRequestStorageAccessPanelForDomainUnderCurrentDomainForQuirkDomainsCompletionHandler = [delegate respondsToSelector:@selector(_webView:requestStorageAccessPanelForDomain:underCurrentDomain:forQuirkDomains:completionHandler:)]; m_delegateMethods.webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:)]; -@@ -458,6 +459,15 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy& page, const WTF::St +@@ -465,6 +466,15 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy& page, const WTF::St }).get()]; } @@ -12127,9 +11893,9 @@ index 45d81b21bbc47418f77dd5a49c032c694db3f08c..10466388e3380e939ad8199f059b2549 + void UIDelegate::UIClient::requestStorageAccessConfirm(WebPageProxy& webPageProxy, WebFrameProxy*, const WebCore::RegistrableDomain& requestingDomain, const WebCore::RegistrableDomain& currentDomain, std::optional&& organizationStorageAccessPromptQuirk, CompletionHandler&& completionHandler) { - if (!m_uiDelegate) + RefPtr uiDelegate = m_uiDelegate.get(); diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm -index 2d04117422e1e10ca59fec5af93b312352b948e5..d7a04374498d58311914ca538d316f362164ac62 100644 +index 9c83bff69be2da80e51e91ce08cfbfcbcd7b3dd5..b70a8450fc3b69e2d27aff88474502cdc0bdc8f8 100644 --- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm +++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm @@ -42,7 +42,9 @@ @@ -12231,10 +11997,10 @@ index 2d04117422e1e10ca59fec5af93b312352b948e5..d7a04374498d58311914ca538d316f36 #if ENABLE(ATTACHMENT_ELEMENT) diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm -index 2d583997574502b60b74208ad01349b7f1bc17d2..ffa9871e3679684d82d508c91137651231112c20 100644 +index 6eca9f4d7e1e1d54bc41a68f689ec1dcce54f354..7feb9b894f852d4a2c93ebeb580f7b6636da9670 100644 --- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm +++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm -@@ -436,7 +436,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END +@@ -435,7 +435,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END auto screenProperties = WebCore::collectScreenProperties(); parameters.screenProperties = WTFMove(screenProperties); #if PLATFORM(MAC) @@ -12243,7 +12009,7 @@ index 2d583997574502b60b74208ad01349b7f1bc17d2..ffa9871e3679684d82d508c911376512 #endif #if (PLATFORM(IOS) || PLATFORM(VISION)) && HAVE(AGX_COMPILER_SERVICE) -@@ -831,8 +831,8 @@ void WebProcessPool::registerNotificationObservers() +@@ -830,8 +830,8 @@ void WebProcessPool::registerNotificationObservers() }]; m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) { @@ -12255,7 +12021,7 @@ index 2d583997574502b60b74208ad01349b7f1bc17d2..ffa9871e3679684d82d508c911376512 m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidBecomeActiveNotification object:NSApp queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) { diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -index d15636e78679112ea910a43d45b2930676b15d6a..72c9a4c6327712073190c33774bec559bf026003 100644 +index c09616b4b076136888cda95c3c74137cf2668a42..f2ee3ee1417f4716157f004ef53d441d94c7e1c3 100644 --- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp +++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp @@ -33,6 +33,7 @@ @@ -12291,7 +12057,7 @@ index d15636e78679112ea910a43d45b2930676b15d6a..72c9a4c6327712073190c33774bec559 namespace WebKit { using namespace WebCore; -@@ -164,6 +174,11 @@ void DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange(CompletionH +@@ -180,6 +190,11 @@ void DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange(CompletionH completionHandler(); } @@ -12303,7 +12069,7 @@ index d15636e78679112ea910a43d45b2930676b15d6a..72c9a4c6327712073190c33774bec559 void DrawingAreaProxyCoordinatedGraphics::setBackingStoreIsDiscardable(bool isBackingStoreDiscardable) { #if !PLATFORM(WPE) -@@ -225,6 +240,45 @@ void DrawingAreaProxyCoordinatedGraphics::updateAcceleratedCompositingMode(uint6 +@@ -241,6 +256,45 @@ void DrawingAreaProxyCoordinatedGraphics::updateAcceleratedCompositingMode(uint6 updateAcceleratedCompositingMode(layerTreeContext); } @@ -12348,8 +12114,8 @@ index d15636e78679112ea910a43d45b2930676b15d6a..72c9a4c6327712073190c33774bec559 + bool DrawingAreaProxyCoordinatedGraphics::alwaysUseCompositing() const { - return m_webPageProxy->preferences().acceleratedCompositingEnabled() && m_webPageProxy->preferences().forceCompositingMode(); -@@ -279,6 +333,12 @@ void DrawingAreaProxyCoordinatedGraphics::didUpdateGeometry() + if (!m_webPageProxy) +@@ -300,6 +354,12 @@ void DrawingAreaProxyCoordinatedGraphics::didUpdateGeometry() // we need to resend the new size here. if (m_lastSentSize != m_size) sendUpdateGeometry(); @@ -12363,7 +12129,7 @@ index d15636e78679112ea910a43d45b2930676b15d6a..72c9a4c6327712073190c33774bec559 #if !PLATFORM(WPE) diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h -index a7cf6a9f232b4c2d6803ed8d6b3fa2273bfe0a2e..5fbbe2a55625f651e190b0c2197b9c7f97814624 100644 +index 69f3479dd407e43d2cf3193b599c35d94d320aff..8b042dc992a1160b312d119cccee8c84b954eb15 100644 --- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h +++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h @@ -29,6 +29,7 @@ @@ -12371,10 +12137,10 @@ index a7cf6a9f232b4c2d6803ed8d6b3fa2273bfe0a2e..5fbbe2a55625f651e190b0c2197b9c7f #include "DrawingAreaProxy.h" #include "LayerTreeContext.h" +#include + #include #include #include - -@@ -56,6 +57,10 @@ public: +@@ -60,6 +61,10 @@ public: bool isInAcceleratedCompositingMode() const { return !m_layerTreeContext.isEmpty(); } const LayerTreeContext& layerTreeContext() const { return m_layerTreeContext; } @@ -12385,7 +12151,7 @@ index a7cf6a9f232b4c2d6803ed8d6b3fa2273bfe0a2e..5fbbe2a55625f651e190b0c2197b9c7f void dispatchAfterEnsuringDrawing(CompletionHandler&&); -@@ -79,6 +84,9 @@ private: +@@ -85,6 +90,9 @@ private: void enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) override; void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, UpdateInfo&&) override; void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) override; @@ -12395,7 +12161,7 @@ index a7cf6a9f232b4c2d6803ed8d6b3fa2273bfe0a2e..5fbbe2a55625f651e190b0c2197b9c7f bool shouldSendWheelEventsToEventDispatcher() const override { return true; } -@@ -122,6 +130,7 @@ private: +@@ -128,6 +136,7 @@ private: // The last size we sent to the web process. WebCore::IntSize m_lastSentSize; @@ -12403,7 +12169,7 @@ index a7cf6a9f232b4c2d6803ed8d6b3fa2273bfe0a2e..5fbbe2a55625f651e190b0c2197b9c7f #if !PLATFORM(WPE) bool m_isBackingStoreDiscardable { true }; -@@ -130,6 +139,10 @@ private: +@@ -136,6 +145,10 @@ private: RunLoop::Timer m_discardBackingStoreTimer; #endif std::unique_ptr m_drawingMonitor; @@ -12415,10 +12181,10 @@ index a7cf6a9f232b4c2d6803ed8d6b3fa2273bfe0a2e..5fbbe2a55625f651e190b0c2197b9c7f } // namespace WebKit diff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp -index 81b64958bf7f9e86a54bc41028aea1b983ce7133..bd9697fc26ca4c903891178bfd884ee35c953eed 100644 +index 1a6f1e5eae420cd6f792de69748be771e735d083..6c31ab3e5f8ed3327f52cf2e54e9055219b06cce 100644 --- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp +++ b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp -@@ -40,8 +40,10 @@ +@@ -41,8 +41,10 @@ #include #include #include @@ -12429,10 +12195,10 @@ index 81b64958bf7f9e86a54bc41028aea1b983ce7133..bd9697fc26ca4c903891178bfd884ee3 #if PLATFORM(MAC) #include -@@ -62,7 +64,10 @@ DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebsiteDataStor - , m_request(resourceRequest) - , m_originatingPage(originatingPage) - , m_frameInfo(API::FrameInfo::create(FrameInfoData { frameInfoData }, originatingPage)) +@@ -66,7 +68,10 @@ DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebsiteDataStor + #if HAVE(MODERN_DOWNLOADPROGRESS) + , m_assertion(ProcessAssertion::create(getCurrentProcessID(), "WebKit DownloadProxy DecideDestination"_s, ProcessAssertionType::FinishTaskInterruptable)) + #endif + , m_uuid(createVersion4UUIDString()) { + if (auto* instrumentation = m_dataStore->downloadInstrumentation()) @@ -12440,21 +12206,24 @@ index 81b64958bf7f9e86a54bc41028aea1b983ce7133..bd9697fc26ca4c903891178bfd884ee3 } DownloadProxy::~DownloadProxy() -@@ -81,9 +86,12 @@ static RefPtr createData(std::span data) +@@ -85,12 +90,15 @@ static RefPtr createData(std::span data) void DownloadProxy::cancel(CompletionHandler&& completionHandler) { if (m_dataStore) { -- protectedDataStore()->protectedNetworkProcess()->sendWithAsyncReply(Messages::NetworkProcess::CancelDownload(m_downloadID), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler)] (std::span resumeData) mutable { +- protectedDataStore()->protectedNetworkProcess()->sendWithAsyncReply(Messages::NetworkProcess::CancelDownload(m_downloadID), [weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)] (std::span resumeData) mutable { + auto* instrumentation = m_dataStore->downloadInstrumentation(); -+ protectedDataStore()->protectedNetworkProcess()->sendWithAsyncReply(Messages::NetworkProcess::CancelDownload(m_downloadID), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler), instrumentation] (std::span resumeData) mutable { - m_legacyResumeData = createData(resumeData); - completionHandler(m_legacyResumeData.get()); ++ protectedDataStore()->protectedNetworkProcess()->sendWithAsyncReply(Messages::NetworkProcess::CancelDownload(m_downloadID), [weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler), instrumentation] (std::span resumeData) mutable { + RefPtr protectedThis = weakThis.get(); + if (!protectedThis) + return completionHandler(nullptr); + protectedThis->m_legacyResumeData = createData(resumeData); + completionHandler(protectedThis->m_legacyResumeData.get()); + if (instrumentation) -+ instrumentation->downloadFinished(m_uuid, "canceled"_s); - m_downloadProxyMap->downloadFinished(*this); ++ instrumentation->downloadFinished(protectedThis->m_uuid, "canceled"_s); + if (RefPtr downloadProxyMap = protectedThis->m_downloadProxyMap.get()) + downloadProxyMap->downloadFinished(*protectedThis); }); - } else -@@ -153,6 +161,33 @@ void DownloadProxy::decideDestinationWithSuggestedFilename(const WebCore::Resour +@@ -162,6 +170,33 @@ void DownloadProxy::decideDestinationWithSuggestedFilename(const WebCore::Resour suggestedFilename = m_suggestedFilename; suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(suggestedFilename, response.mimeType()); @@ -12485,10 +12254,10 @@ index 81b64958bf7f9e86a54bc41028aea1b983ce7133..bd9697fc26ca4c903891178bfd884ee3 + return; + } + - m_client->decideDestinationWithSuggestedFilename(*this, response, ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler)] (AllowOverwrite allowOverwrite, String destination) mutable { + protectedClient()->decideDestinationWithSuggestedFilename(*this, response, ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler)] (AllowOverwrite allowOverwrite, String destination) mutable { SandboxExtension::Handle sandboxExtensionHandle; if (!destination.isNull()) { -@@ -215,6 +250,8 @@ void DownloadProxy::didFinish() +@@ -224,6 +259,8 @@ void DownloadProxy::didFinish() updateQuarantinePropertiesIfPossible(); #endif m_client->didFinish(*this); @@ -12496,8 +12265,8 @@ index 81b64958bf7f9e86a54bc41028aea1b983ce7133..bd9697fc26ca4c903891178bfd884ee3 + instrumentation->downloadFinished(m_uuid, String()); // This can cause the DownloadProxy object to be deleted. - m_downloadProxyMap->downloadFinished(*this); -@@ -225,6 +262,8 @@ void DownloadProxy::didFail(const ResourceError& error, std::span + if (RefPtr downloadProxyMap = m_downloadProxyMap.get()) +@@ -235,6 +272,8 @@ void DownloadProxy::didFail(const ResourceError& error, std::span m_legacyResumeData = createData(resumeData); m_client->didFail(*this, error, m_legacyResumeData.get()); @@ -12505,24 +12274,24 @@ index 81b64958bf7f9e86a54bc41028aea1b983ce7133..bd9697fc26ca4c903891178bfd884ee3 + instrumentation->downloadFinished(m_uuid, error.localizedDescription()); // This can cause the DownloadProxy object to be deleted. - m_downloadProxyMap->downloadFinished(*this); + if (RefPtr downloadProxyMap = m_downloadProxyMap.get()) diff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.h b/Source/WebKit/UIProcess/Downloads/DownloadProxy.h -index 8418c16c5ee94c3ea37962d1db4b961d18dc391e..fb8a8ba64c499d92f17891e0268fe3c1163913c0 100644 +index c11230e2bdf0260db06b011a235d7687908d8943..015d84a1c1e3bc94ad11602879460256508313fa 100644 --- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.h +++ b/Source/WebKit/UIProcess/Downloads/DownloadProxy.h -@@ -156,6 +156,7 @@ private: - #if PLATFORM(COCOA) - RetainPtr m_progress; +@@ -165,6 +165,7 @@ private: + #if HAVE(MODERN_DOWNLOADPROGRESS) + RefPtr m_assertion; #endif + String m_uuid; }; } // namespace WebKit diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.h b/Source/WebKit/UIProcess/DrawingAreaProxy.h -index a6897e8688b39c7ca3131b3b730a0fec1d3727e2..0f0e67c3eaa49351266d7666189e168a4f9cce7c 100644 +index 575ef6907ad84bcedf75b5fe2fd205a70e4edfb3..12d06c53ff697feec8a4816d44368b7df81bc803 100644 --- a/Source/WebKit/UIProcess/DrawingAreaProxy.h +++ b/Source/WebKit/UIProcess/DrawingAreaProxy.h -@@ -90,6 +90,7 @@ public: +@@ -91,6 +91,7 @@ public: const WebCore::IntSize& size() const { return m_size; } bool setSize(const WebCore::IntSize&, const WebCore::IntSize& scrollOffset = { }); @@ -12530,7 +12299,7 @@ index a6897e8688b39c7ca3131b3b730a0fec1d3727e2..0f0e67c3eaa49351266d7666189e168a virtual void minimumSizeForAutoLayoutDidChange() { } virtual void sizeToContentAutoSizeMaximumSizeDidChange() { } -@@ -177,6 +178,10 @@ private: +@@ -178,6 +179,10 @@ private: virtual void update(uint64_t /* backingStoreStateID */, UpdateInfo&&) { } virtual void exitAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, UpdateInfo&&) { } #endif @@ -12542,10 +12311,10 @@ index a6897e8688b39c7ca3131b3b730a0fec1d3727e2..0f0e67c3eaa49351266d7666189e168a } // namespace WebKit diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in b/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in -index fc5c53f18ad2dee2c2f40cdbb86ca7f24b262d8d..d93d804d3a8ebaa30856710df544f3db5aa7ad2d 100644 +index 4d19362fcc71426002d8aafdd7401c01077ef051..7a1ebc8b200d3214f7fd0c4b1d062890bc49995e 100644 --- a/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in +++ b/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in -@@ -30,4 +30,7 @@ messages -> DrawingAreaProxy NotRefCounted { +@@ -30,4 +30,7 @@ messages -> DrawingAreaProxy { Update(uint64_t stateID, struct WebKit::UpdateInfo updateInfo) CanDispatchOutOfOrder ExitAcceleratedCompositingMode(uint64_t backingStoreStateID, struct WebKit::UpdateInfo updateInfo) #endif @@ -12843,10 +12612,10 @@ index 0000000000000000000000000000000000000000..4ec8b96bbbddf8a7b042f53a8068754a +cairo_status_t cairo_image_surface_write_to_jpeg_mem(cairo_surface_t *sfc, unsigned char **data, size_t *len, int quality); diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..229fd8e721648b07057af413f0fb8424af2ed926 +index 0000000000000000000000000000000000000000..033bf77bca2de127e55cbf55a9e0b0c358fc81f9 --- /dev/null +++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp -@@ -0,0 +1,387 @@ +@@ -0,0 +1,392 @@ +/* + * Copyright (C) 2020 Microsoft Corporation. + * @@ -12883,6 +12652,7 @@ index 0000000000000000000000000000000000000000..229fd8e721648b07057af413f0fb8424 +#include +#include +#include ++#include +#include +#include +#include @@ -12909,6 +12679,8 @@ index 0000000000000000000000000000000000000000..229fd8e721648b07057af413f0fb8424 +#include +#endif + ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN ++ +namespace WebKit { + +const int kMaxFramesInFlight = 1; @@ -13234,6 +13006,8 @@ index 0000000000000000000000000000000000000000..229fd8e721648b07057af413f0fb8424 +#endif + +} // namespace WebKit ++ ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_END diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h new file mode 100644 index 0000000000000000000000000000000000000000..f53bb59c65a4ced0360e473fb9ed9a36d1179310 @@ -13351,10 +13125,10 @@ index 0000000000000000000000000000000000000000..f53bb59c65a4ced0360e473fb9ed9a36 +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..9f3a9fb9ca1881b9c81493bf5a21382d4015c74c +index 0000000000000000000000000000000000000000..760f6ab8714c45f0019e583970767ea40e35d818 --- /dev/null +++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp -@@ -0,0 +1,438 @@ +@@ -0,0 +1,443 @@ +/* + * Copyright (c) 2010, The WebM Project authors. All rights reserved. + * Copyright (c) 2013 The Chromium Authors. All rights reserved. @@ -13391,6 +13165,7 @@ index 0000000000000000000000000000000000000000..9f3a9fb9ca1881b9c81493bf5a21382d +#include +#include +#include ++#include +#include +#include +#include @@ -13408,6 +13183,8 @@ index 0000000000000000000000000000000000000000..9f3a9fb9ca1881b9c81493bf5a21382d +#include +#endif + ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN ++ +using namespace WebCore; + +namespace WebKit { @@ -13793,6 +13570,8 @@ index 0000000000000000000000000000000000000000..9f3a9fb9ca1881b9c81493bf5a21382d + + +} // namespace WebKit ++ ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_END diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h new file mode 100644 index 0000000000000000000000000000000000000000..caf0474267c1bda6346f7b025b6646bb4f1b56d9 @@ -14016,7 +13795,7 @@ index 0000000000000000000000000000000000000000..e2ce910f3fd7f587add552275b7e7176 + +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp -index 23426ee5d9f3a01e5216267810f48091779384ca..78edcf784aa90cd9296faa539d235e741f826d32 100644 +index 77bdb25abf77bc0f7f00d3dbd57b0eb751c99488..6d3a93a009cff0f70f2b1a1e674827c24a26a947 100644 --- a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp +++ b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp @@ -28,7 +28,7 @@ @@ -14028,32 +13807,23 @@ index 23426ee5d9f3a01e5216267810f48091779384ca..78edcf784aa90cd9296faa539d235e74 #include "WebPageInspectorTarget.h" #include "WebPageMessages.h" #include "WebPageProxy.h" -@@ -43,19 +43,17 @@ WTF_MAKE_TZONE_ALLOCATED_IMPL(InspectorTargetProxy); - - std::unique_ptr InspectorTargetProxy::create(WebPageProxy& page, const String& targetId, Inspector::InspectorTargetType type) - { -- return makeUnique(page, targetId, type); -+ return makeUnique(page, nullptr, targetId, type); +@@ -46,13 +46,13 @@ std::unique_ptr InspectorTargetProxy::create(WebPageProxy& + return makeUnique(page, targetId, type); } -std::unique_ptr InspectorTargetProxy::create(ProvisionalPageProxy& provisionalPage, const String& targetId, Inspector::InspectorTargetType type) +std::unique_ptr InspectorTargetProxy::create(ProvisionalPageProxy& provisionalPage, const String& targetId) { -- Ref page = provisionalPage.page(); -- auto target = InspectorTargetProxy::create(page, targetId, type); -- target->m_provisionalPage = provisionalPage; -- return target; -+ return makeUnique(provisionalPage.page(), &provisionalPage, targetId, Inspector::InspectorTargetType::Page); - } + RefPtr page = provisionalPage.page(); + if (!page) + return nullptr; --InspectorTargetProxy::InspectorTargetProxy(WebPageProxy& page, const String& targetId, Inspector::InspectorTargetType type) -+InspectorTargetProxy::InspectorTargetProxy(WebPageProxy& page, ProvisionalPageProxy* provisionalPage, const String& targetId, Inspector::InspectorTargetType type) - : m_page(page) -+ , m_provisionalPage(provisionalPage) - , m_identifier(targetId) - , m_type(type) - { -@@ -102,6 +100,31 @@ void InspectorTargetProxy::didCommitProvisionalTarget() +- auto target = InspectorTargetProxy::create(*page, targetId, type); ++ auto target = InspectorTargetProxy::create(*page, targetId, Inspector::InspectorTargetType::Page); + target->m_provisionalPage = provisionalPage; + return target; + } +@@ -105,6 +105,31 @@ void InspectorTargetProxy::didCommitProvisionalTarget() m_provisionalPage = nullptr; } @@ -14086,10 +13856,10 @@ index 23426ee5d9f3a01e5216267810f48091779384ca..78edcf784aa90cd9296faa539d235e74 { return !!m_provisionalPage; diff --git a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.h b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.h -index edd6e7f1799279ed3d0eb81b6c2eef9f5b375134..4552047ddc305d1da8ab2c0ca319392d95359a2c 100644 +index edd6e7f1799279ed3d0eb81b6c2eef9f5b375134..d4231f84f3c52641f4d9e88559e8e1a4845b7163 100644 --- a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.h +++ b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.h -@@ -38,13 +38,13 @@ class WebPageProxy; +@@ -38,12 +38,12 @@ class WebPageProxy; // NOTE: This UIProcess side InspectorTarget doesn't care about the frontend channel, since // any target -> frontend messages will be routed to the WebPageProxy with a targetId. @@ -14100,13 +13870,11 @@ index edd6e7f1799279ed3d0eb81b6c2eef9f5b375134..4552047ddc305d1da8ab2c0ca319392d public: static std::unique_ptr create(WebPageProxy&, const String& targetId, Inspector::InspectorTargetType); - static std::unique_ptr create(ProvisionalPageProxy&, const String& targetId, Inspector::InspectorTargetType); -- InspectorTargetProxy(WebPageProxy&, const String& targetId, Inspector::InspectorTargetType); + static std::unique_ptr create(ProvisionalPageProxy&, const String& targetId); -+ InspectorTargetProxy(WebPageProxy&, ProvisionalPageProxy*, const String& targetId, Inspector::InspectorTargetType); + InspectorTargetProxy(WebPageProxy&, const String& targetId, Inspector::InspectorTargetType); ~InspectorTargetProxy() = default; - Inspector::InspectorTargetType type() const final { return m_type; } -@@ -56,12 +56,17 @@ public: +@@ -56,8 +56,13 @@ public: void connect(Inspector::FrontendChannel::ConnectionType) override; void disconnect() override; void sendMessageToTargetBackend(const String&) override; @@ -14118,15 +13886,10 @@ index edd6e7f1799279ed3d0eb81b6c2eef9f5b375134..4552047ddc305d1da8ab2c0ca319392d + void platformActivate(String& error) const; + WeakRef m_page; -+ WeakPtr m_provisionalPage; String m_identifier; Inspector::InspectorTargetType m_type; -- WeakPtr m_provisionalPage; - }; - - } // namespace WebKit diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp -index e4f2f719746ed69b1226be2d47b16666f2067772..e94eba914cf44bad58c63be024a862d904baf690 100644 +index e4f2f719746ed69b1226be2d47b16666f2067772..c0e4452b9c8e286e1944b47e46acf49bdaee439a 100644 --- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp +++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp @@ -26,13 +26,21 @@ @@ -14393,7 +14156,7 @@ index e4f2f719746ed69b1226be2d47b16666f2067772..e94eba914cf44bad58c63be024a862d9 void WebPageInspectorController::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type) { addTarget(InspectorTargetProxy::create(protectedInspectedPage(), targetId, type)); -@@ -184,6 +363,32 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta +@@ -184,6 +363,48 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta m_targetAgent->sendMessageFromTargetToFrontend(targetId, message); } @@ -14403,7 +14166,7 @@ index e4f2f719746ed69b1226be2d47b16666f2067772..e94eba914cf44bad58c63be024a862d9 + m_targetAgent->setPauseOnStart(shouldPause); +} + -+bool WebPageInspectorController::shouldPauseLoading() const ++bool WebPageInspectorController::shouldPauseLoadRequest() const +{ + if (!m_frontendRouter->hasFrontends()) + return false; @@ -14412,10 +14175,26 @@ index e4f2f719746ed69b1226be2d47b16666f2067772..e94eba914cf44bad58c63be024a862d9 + return false; + + auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageIDInMainFrameProcess())); ++ // The method is expeted to be called only when the WebPage has already been ++ // initilized, so the target must exist. + ASSERT(target); + return target->isPaused(); +} + ++bool WebPageInspectorController::shouldPauseInInspectorWhenShown() const ++{ ++ if (!m_frontendRouter->hasFrontends()) ++ return false; ++ ++ if (!m_inspectedPage->isPageOpenedByDOMShowingInitialEmptyDocument()) ++ return false; ++ ++ // The method is called from WebPageProxy::initializePage and the ++ // target is not created yet (it is created after the new page is ++ // initialized and attached to the process). ++ return m_targetAgent->shouldPauseOnStart(); ++} ++ +void WebPageInspectorController::setContinueLoadingCallback(WTF::Function&& callback) +{ + auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageIDInMainFrameProcess())); @@ -14426,7 +14205,7 @@ index e4f2f719746ed69b1226be2d47b16666f2067772..e94eba914cf44bad58c63be024a862d9 bool WebPageInspectorController::shouldPauseLoading(const ProvisionalPageProxy& provisionalPage) const { if (!m_frontendRouter->hasFrontends()) -@@ -203,7 +408,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag +@@ -203,7 +424,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag void WebPageInspectorController::didCreateProvisionalPage(ProvisionalPageProxy& provisionalPage) { @@ -14435,7 +14214,7 @@ index e4f2f719746ed69b1226be2d47b16666f2067772..e94eba914cf44bad58c63be024a862d9 } void WebPageInspectorController::willDestroyProvisionalPage(const ProvisionalPageProxy& provisionalPage) -@@ -287,4 +492,30 @@ void WebPageInspectorController::browserExtensionsDisabled(HashSet&& ext +@@ -287,4 +508,30 @@ void WebPageInspectorController::browserExtensionsDisabled(HashSet&& ext m_enabledBrowserAgent->extensionsDisabled(WTFMove(extensionIDs)); } @@ -14467,7 +14246,7 @@ index e4f2f719746ed69b1226be2d47b16666f2067772..e94eba914cf44bad58c63be024a862d9 + } // namespace WebKit diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h -index 29457fc3c76c963bf50b44c011f64398efbae676..999160e64365ad73e87601094b69a86224a2b54e 100644 +index 29457fc3c76c963bf50b44c011f64398efbae676..b931b09dbf2768bdfa49633fc6329fb49b09205a 100644 --- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h +++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h @@ -26,19 +26,43 @@ @@ -14491,7 +14270,7 @@ index 29457fc3c76c963bf50b44c011f64398efbae676..999160e64365ad73e87601094b69a862 +#include +#endif + -+#if USE(CAIRO) ++#if USE(CAIRO) || PLATFORM(GTK) +#include +#endif @@ -14560,7 +14339,7 @@ index 29457fc3c76c963bf50b44c011f64398efbae676..999160e64365ad73e87601094b69a862 bool hasLocalFrontend() const; -@@ -67,11 +122,29 @@ public: +@@ -67,11 +122,30 @@ public: #if ENABLE(REMOTE_INSPECTOR) void setIndicating(bool); #endif @@ -14584,13 +14363,14 @@ index 29457fc3c76c963bf50b44c011f64398efbae676..999160e64365ad73e87601094b69a862 + void setPauseOnStart(bool); + -+ bool shouldPauseLoading() const; ++ bool shouldPauseLoadRequest() const; ++ bool shouldPauseInInspectorWhenShown() const; + void setContinueLoadingCallback(WTF::Function&&); + bool shouldPauseLoading(const ProvisionalPageProxy&) const; void setContinueLoadingCallback(const ProvisionalPageProxy&, WTF::Function&&); -@@ -86,11 +159,12 @@ public: +@@ -86,11 +160,12 @@ public: void browserExtensionsDisabled(HashSet&&); private: @@ -14604,19 +14384,18 @@ index 29457fc3c76c963bf50b44c011f64398efbae676..999160e64365ad73e87601094b69a862 Ref m_frontendRouter; Ref m_backendDispatcher; -@@ -99,11 +173,17 @@ private: - WeakRef m_inspectedPage; - +@@ -101,9 +176,16 @@ private: CheckedPtr m_targetAgent; + HashMap> m_targets; + + WebPageInspectorEmulationAgent* m_emulationAgent { nullptr }; + WebPageInspectorInputAgent* m_inputAgent { nullptr }; + InspectorScreencastAgent* m_screecastAgent { nullptr }; - HashMap> m_targets; - ++ CheckedPtr m_enabledBrowserAgent; bool m_didCreateLazyAgents { false }; -+ HashMap m_pendingNavigations; ++ UncheckedKeyHashMap m_pendingNavigations; + + static WebPageInspectorControllerObserver* s_observer; }; @@ -14855,7 +14634,7 @@ index 0000000000000000000000000000000000000000..d0e11ed81a6257c011df23d5870da740 +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..a7a92f6d3730b64e1a8864158f6dbebbabc0b68c +index 0000000000000000000000000000000000000000..f7b2ecd583cd1eb5bb9e81becdfe07f5a855f2a9 --- /dev/null +++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp @@ -0,0 +1,1006 @@ @@ -15239,7 +15018,7 @@ index 0000000000000000000000000000000000000000..a7a92f6d3730b64e1a8864158f6dbebb + + String browserContextID = toBrowserContextIDProtocolString(page.sessionID()); + String pageProxyID = toPageProxyIDProtocolString(page); -+ auto* opener = page.configuration().relatedPage(); ++ auto* opener = page.configuration().openerPageForInspector(); + String openerId; + if (opener) + openerId = toPageProxyIDProtocolString(*opener); @@ -15867,7 +15646,7 @@ index 0000000000000000000000000000000000000000..a7a92f6d3730b64e1a8864158f6dbebb +#endif // ENABLE(REMOTE_INSPECTOR) diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h new file mode 100644 -index 0000000000000000000000000000000000000000..0a3b5a7604ec1abca5c2fff66b02ada96ddce4d1 +index 0000000000000000000000000000000000000000..2cd467df987e1679ff8918c2867bf253ce105b8c --- /dev/null +++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h @@ -0,0 +1,140 @@ @@ -16000,11 +15779,11 @@ index 0000000000000000000000000000000000000000..0a3b5a7604ec1abca5c2fff66b02ada9 + std::unique_ptr m_client; + std::unique_ptr m_frontendDispatcher; + Ref m_playwrightDispatcher; -+ HashMap> m_pageProxyChannels; ++ UncheckedKeyHashMap> m_pageProxyChannels; + BrowserContext* m_defaultContext; -+ HashMap> m_downloads; -+ HashMap> m_browserContexts; -+ HashMap> m_browserContextDeletions; ++ UncheckedKeyHashMap> m_downloads; ++ UncheckedKeyHashMap> m_browserContexts; ++ UncheckedKeyHashMap> m_browserContextDeletions; + bool m_isEnabled { false }; +}; + @@ -16091,10 +15870,10 @@ index 0000000000000000000000000000000000000000..e7a3dcc533294bb6e12f65d79b5b716b + +#endif // ENABLE(REMOTE_INSPECTOR) diff --git a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp -index 28a4d766b125615ec3111f4e42c0831bfb69e094..4f15f2335f56220da2fa50ff0ec61b6872d6fd3f 100644 +index 348b454826ee9278e45ed6e265136a55296ee2d1..16575216af8c7b836c52f3747d73ce206b226855 100644 --- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp +++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp -@@ -176,6 +176,13 @@ void ProcessLauncher::launchProcess() +@@ -178,6 +178,13 @@ void ProcessLauncher::launchProcess() nargs++; } #endif @@ -16106,9 +15885,9 @@ index 28a4d766b125615ec3111f4e42c0831bfb69e094..4f15f2335f56220da2fa50ff0ec61b68 + } +// Playwright end - char** argv = g_newa(char*, nargs); - unsigned i = 0; -@@ -192,6 +199,10 @@ void ProcessLauncher::launchProcess() + WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN // GTK/WPE port + +@@ -196,6 +203,10 @@ void ProcessLauncher::launchProcess() if (configureJSCForTesting) argv[i++] = const_cast("--configure-jsc-for-testing"); #endif @@ -16118,7 +15897,7 @@ index 28a4d766b125615ec3111f4e42c0831bfb69e094..4f15f2335f56220da2fa50ff0ec61b68 +// Playwright end argv[i++] = nullptr; - // Warning: we want GIO to be able to spawn with posix_spawn() rather than fork()/exec(), in + WTF_ALLOW_UNSAFE_BUFFER_USAGE_END diff --git a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp index fac881d7c3d44758591d7a9f392a3992ce9f9a72..35eba5a0b31fc6e2d6e5c05c9f866c03d2e1c7d0 100644 --- a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp @@ -16146,20 +15925,8 @@ index fac881d7c3d44758591d7a9f392a3992ce9f9a72..35eba5a0b31fc6e2d6e5c05c9f866c03 PROCESS_INFORMATION processInformation { }; BOOL result = ::CreateProcess(0, commandLine.data(), 0, 0, true, 0, 0, 0, &startupInfo, &processInformation); -diff --git a/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp b/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp -index 1c2e1038c2a00264eebac03c1e89e6d5a5d247a0..714e4d09ab152330bc281e7c9e8e43e9131af27e 100644 ---- a/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp -+++ b/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp -@@ -30,6 +30,7 @@ - - #include "Logging.h" - #include "MediaSessionCoordinatorProxyPrivate.h" -+#include "MessageSenderInlines.h" - #include "RemoteMediaSessionCoordinatorMessages.h" - #include "RemoteMediaSessionCoordinatorProxyMessages.h" - #include "WebPageProxy.h" diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h -index 960043d7db4e4898380e11300e73e6fe52c6da07..9a5cedfce7dfe331a71ecb10d4dc08845db512d6 100644 +index 06169e91f403da8cb53b1fe6b718b22eeb0a51fe..0162c16f55d6ef76c31887fdf48d184c54f38f18 100644 --- a/Source/WebKit/UIProcess/PageClient.h +++ b/Source/WebKit/UIProcess/PageClient.h @@ -74,6 +74,11 @@ @@ -16184,10 +15951,10 @@ index 960043d7db4e4898380e11300e73e6fe52c6da07..9a5cedfce7dfe331a71ecb10d4dc0884 +#endif +#endif + - namespace WebKit { - class PageClient; - } -@@ -377,7 +388,20 @@ public: + namespace API { + class Attachment; + class HitTestResult; +@@ -372,7 +383,20 @@ public: virtual void selectionDidChange() = 0; #endif @@ -16335,7 +16102,7 @@ index 0000000000000000000000000000000000000000..3c8fd0549f1847515d35092f0f49b060 + +#endif // ENABLE(FULLSCREEN_API) diff --git a/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp b/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp -index 924718f62be57635f13afd3edb3f079906b31540..81d5cb24004311941063610aa4830d92fa3633bc 100644 +index 949c12f22544a17e9047def6f1ddf6a6e6fc1adc..bfd4d442f971e3956ed6d6962f7a570ff0a0755c 100644 --- a/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp +++ b/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp @@ -25,6 +25,7 @@ @@ -16348,10 +16115,10 @@ index 924718f62be57635f13afd3edb3f079906b31540..81d5cb24004311941063610aa4830d92 #include "ProvisionalFrameCreationParameters.h" diff --git a/Source/WebKit/UIProcess/RemoteInspectorPipe.cpp b/Source/WebKit/UIProcess/RemoteInspectorPipe.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..1a824be7d9fcb225d018b4a821fa895e844d7805 +index 0000000000000000000000000000000000000000..b1ddac8c1442cb4da17f50d92599ef9aff6d4066 --- /dev/null +++ b/Source/WebKit/UIProcess/RemoteInspectorPipe.cpp -@@ -0,0 +1,225 @@ +@@ -0,0 +1,230 @@ +/* + * Copyright (C) 2019 Microsoft Corporation. + * @@ -16384,6 +16151,7 @@ index 0000000000000000000000000000000000000000..1a824be7d9fcb225d018b4a821fa895e + +#include "InspectorPlaywrightAgent.h" +#include ++#include +#include +#include +#include @@ -16399,6 +16167,8 @@ index 0000000000000000000000000000000000000000..1a824be7d9fcb225d018b4a821fa895e +#include +#endif + ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN ++ +namespace WebKit { + +namespace { @@ -16577,6 +16347,8 @@ index 0000000000000000000000000000000000000000..1a824be7d9fcb225d018b4a821fa895e +} // namespace WebKit + +#endif // ENABLE(REMOTE_INSPECTOR) ++ ++WTF_ALLOW_UNSAFE_BUFFER_USAGE_END diff --git a/Source/WebKit/UIProcess/RemoteInspectorPipe.h b/Source/WebKit/UIProcess/RemoteInspectorPipe.h new file mode 100644 index 0000000000000000000000000000000000000000..6d04f9290135069359ce6bf8726546482fd1dc95 @@ -16648,32 +16420,8 @@ index 0000000000000000000000000000000000000000..6d04f9290135069359ce6bf872654648 +} // namespace WebKit + +#endif // ENABLE(REMOTE_INSPECTOR) -diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h b/Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h -index a91f8ca1dabd76b41632ea2d5d4223a7c657dc19..1c9de7acb15fa190a08ab4dc9d30772766a06989 100644 ---- a/Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h -+++ b/Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h -@@ -30,6 +30,7 @@ - #include "DisplayLinkObserverID.h" - #include "MomentumEventDispatcher.h" - #include "NativeWebWheelEvent.h" -+#include "RemoteLayerTreeNode.h" - #include - #include - #include -@@ -41,6 +42,11 @@ - #include - #include - #include -+#include -+#include -+ -+#include "NativeWebWheelEvent.h" -+#include "WebPage.h" - - namespace WebCore { - class PlatformWheelEvent; diff --git a/Source/WebKit/UIProcess/RemotePageProxy.cpp b/Source/WebKit/UIProcess/RemotePageProxy.cpp -index ba2898874c785f21fb68b77b5a15fd18ce9d68fd..9e0094660772ee3985b6f05700992104ba870e6d 100644 +index eae3ae7fdac55067463e1571068ec8cf25408bd9..707e9feec18d94c3a14b49e5826cab1026ff234a 100644 --- a/Source/WebKit/UIProcess/RemotePageProxy.cpp +++ b/Source/WebKit/UIProcess/RemotePageProxy.cpp @@ -44,6 +44,7 @@ @@ -16684,94 +16432,18 @@ index ba2898874c785f21fb68b77b5a15fd18ce9d68fd..9e0094660772ee3985b6f05700992104 #include #include -diff --git a/Source/WebKit/UIProcess/RemotePageProxy.h b/Source/WebKit/UIProcess/RemotePageProxy.h -index 9fef5ebf4661c8aa1df77907ff7c3f077c6bf001..e1ee1fd8ea17b03ca3fcedc8b5d920d67bf90373 100644 ---- a/Source/WebKit/UIProcess/RemotePageProxy.h -+++ b/Source/WebKit/UIProcess/RemotePageProxy.h -@@ -76,7 +76,6 @@ class WebProcessProxy; - - struct FrameInfoData; - struct FrameTreeCreationParameters; --struct NavigationActionData; - - class RemotePageProxy : public IPC::MessageReceiver { - WTF_MAKE_TZONE_ALLOCATED(RemotePageProxy); -diff --git a/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp b/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp -index 40531b866fda1c35dbddb90f2ac1027688b2a09c..82003f78d7d2c9fbf2d393187636cf8b0bcf228f 100644 ---- a/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp -+++ b/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp -@@ -37,6 +37,7 @@ - #include - #include - #include -+#include - - #define U2F_RELEASE_LOG(fmt, ...) RELEASE_LOG(WebAuthn, "%p [transport=%s] - U2fAuthenticator::" fmt, this, transportForDebugging().utf8().data(), ##__VA_ARGS__) - -diff --git a/Source/WebKit/UIProcess/WebContextMenuProxy.cpp b/Source/WebKit/UIProcess/WebContextMenuProxy.cpp -index 71fdc0b69e820af7f955482b42562e941eeac349..2a2d55e5a67aa7120193fd55913d3dbbbac62919 100644 ---- a/Source/WebKit/UIProcess/WebContextMenuProxy.cpp -+++ b/Source/WebKit/UIProcess/WebContextMenuProxy.cpp -@@ -33,6 +33,7 @@ - #include "WebPageMessages.h" - #include "WebPageProxy.h" - #include "WebProcessProxy.h" -+#include "MessageSenderInlines.h" - - namespace WebKit { - diff --git a/Source/WebKit/UIProcess/WebContextMenuProxy.h b/Source/WebKit/UIProcess/WebContextMenuProxy.h -index e2ded3c65b9680346be2534a3e970e2f425a83a8..b0c006c1dcbfae4b33530f8eae04f9868cd4d8b9 100644 +index c951d8577473371d8eb59ad651451737349c4389..b38cd0967ae45733a94594fd25900ddc1d49c3f6 100644 --- a/Source/WebKit/UIProcess/WebContextMenuProxy.h +++ b/Source/WebKit/UIProcess/WebContextMenuProxy.h -@@ -46,6 +46,7 @@ public: - virtual ~WebContextMenuProxy(); +@@ -49,6 +49,7 @@ public: + void deref() const final { RefCounted::deref(); } virtual void show(); + virtual void hide() {} WebPageProxy* page() const { return m_page.get(); } -diff --git a/Source/WebKit/UIProcess/WebFrameProxy.cpp b/Source/WebKit/UIProcess/WebFrameProxy.cpp -index 1cbf04be848366e881fd8ceec3de82628786548b..03ba18dcd9eb7b8c9ad95b5546adbcf2e8b76e4a 100644 ---- a/Source/WebKit/UIProcess/WebFrameProxy.cpp -+++ b/Source/WebKit/UIProcess/WebFrameProxy.cpp -@@ -31,6 +31,7 @@ - #include "Connection.h" - #include "DrawingAreaMessages.h" - #include "DrawingAreaProxy.h" -+#include "FormDataReference.h" - #include "FrameProcess.h" - #include "FrameTreeCreationParameters.h" - #include "FrameTreeNodeData.h" -@@ -42,6 +43,7 @@ - #include "RemotePageProxy.h" - #include "WebFramePolicyListenerProxy.h" - #include "WebNavigationState.h" -+#include "WebPageInspectorController.h" - #include "WebPageMessages.h" - #include "WebPageProxy.h" - #include "WebPageProxyMessages.h" -diff --git a/Source/WebKit/UIProcess/WebNavigationState.h b/Source/WebKit/UIProcess/WebNavigationState.h -index 26077dc941a14d58e6a07182d650abb48cc8b62c..77ed2b05ded42183b8274e46c69957f7b6dc2eae 100644 ---- a/Source/WebKit/UIProcess/WebNavigationState.h -+++ b/Source/WebKit/UIProcess/WebNavigationState.h -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include "WebPageProxy.h" - - namespace WebKit { - class WebNavigationState; -@@ -54,7 +55,6 @@ enum class FrameLoadType : uint8_t; - - namespace WebKit { - --class WebPageProxy; - class WebBackForwardListItem; - - class WebNavigationState : public CanMakeWeakPtr { diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a8d10ae990997684766df46719c65aa8dd77f28 @@ -16939,7 +16611,7 @@ index 0000000000000000000000000000000000000000..0a8d10ae990997684766df46719c65aa +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h new file mode 100644 -index 0000000000000000000000000000000000000000..b70bfe0411571f4d181a7fae3186aaae7cd7b831 +index 0000000000000000000000000000000000000000..d00d00ce8fd800dc1497b36b8a495c5b9aef6f58 --- /dev/null +++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h @@ -0,0 +1,76 @@ @@ -17015,7 +16687,7 @@ index 0000000000000000000000000000000000000000..b70bfe0411571f4d181a7fae3186aaae + Ref m_backendDispatcher; + WebPageProxy& m_page; + Vector> m_commandsToRunWhenShown; -+ HashMap> m_permissions; ++ UncheckedKeyHashMap> m_permissions; +}; + +} // namespace WebKit @@ -17513,10 +17185,10 @@ index 0000000000000000000000000000000000000000..26a2a3c0791c334f811ec99a630314f8 + +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp -index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf42681697b2ed14 100644 +index d6d3a2ad0eca1473543f79daa4a4a6fbf8c0d2a9..0c38e87c731d802974780d4d84a3e02db2fc180e 100644 --- a/Source/WebKit/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit/UIProcess/WebPageProxy.cpp -@@ -195,12 +195,14 @@ +@@ -197,12 +197,14 @@ #include #include #include @@ -17531,7 +17203,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 #include #include #include -@@ -222,6 +224,7 @@ +@@ -225,6 +227,7 @@ #include #include #include @@ -17539,7 +17211,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 #include #include #include -@@ -229,12 +232,15 @@ +@@ -232,11 +235,14 @@ #include #include #include @@ -17548,14 +17220,13 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 #include #include #include - #include +#include #include +#include #include #include #include -@@ -319,6 +325,9 @@ +@@ -321,6 +327,9 @@ #if USE(GBM) #include "AcceleratedBackingStoreDMABuf.h" #endif @@ -17565,7 +17236,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 #include #endif -@@ -443,6 +452,8 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms; +@@ -445,6 +454,8 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms; static constexpr Seconds audibleActivityClearDelay = 10_s; #endif @@ -17574,7 +17245,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageProxyCounter, ("WebPageProxy")); #if PLATFORM(COCOA) -@@ -868,6 +879,10 @@ WebPageProxy::~WebPageProxy() +@@ -916,6 +927,10 @@ WebPageProxy::~WebPageProxy() if (preferences->mediaSessionCoordinatorEnabled()) GroupActivitiesSessionNotifier::singleton().removeWebPage(*this); #endif @@ -17585,25 +17256,25 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 } Ref WebPageProxy::Internals::protectedPage() const -@@ -1429,6 +1444,7 @@ void WebPageProxy::finishAttachingToWebProcess(const Site& site, ProcessLaunchRe +@@ -1487,6 +1502,7 @@ void WebPageProxy::finishAttachingToWebProcess(const Site& site, ProcessLaunchRe if (RefPtr pageClient = this->pageClient()) pageClient->didRelaunchProcess(); - internals().pageLoadState.didSwapWebProcesses(); + protectedPageLoadState()->didSwapWebProcesses(); + m_inspectorController->didFinishAttachingToWebProcess(); } void WebPageProxy::didAttachToRunningProcess() -@@ -1437,7 +1453,7 @@ void WebPageProxy::didAttachToRunningProcess() +@@ -1495,7 +1511,7 @@ void WebPageProxy::didAttachToRunningProcess() #if ENABLE(FULLSCREEN_API) ASSERT(!m_fullScreenManager); -- m_fullScreenManager = makeUnique(*this, protectedPageClient()->fullScreenManagerProxyClient()); -+ m_fullScreenManager = makeUnique(*this, m_fullScreenManagerClientOverride ? *m_fullScreenManagerClientOverride : protectedPageClient()->fullScreenManagerProxyClient()); +- m_fullScreenManager = WebFullScreenManagerProxy::create(*this, protectedPageClient()->fullScreenManagerProxyClient()); ++ m_fullScreenManager = WebFullScreenManagerProxy::create(*this, m_fullScreenManagerClientOverride ? *m_fullScreenManagerClientOverride : protectedPageClient()->fullScreenManagerProxyClient()); #endif #if ENABLE(VIDEO_PRESENTATION_MODE) ASSERT(!m_playbackSessionManager); -@@ -1877,6 +1893,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess() - return m_legacyMainFrameProcess; +@@ -1951,6 +1967,21 @@ Ref WebPageProxy::ensureProtectedRunningProcess() + return ensureRunningProcess(); } +RefPtr WebPageProxy::loadRequestForInspector(WebCore::ResourceRequest&& request, WebFrameProxy* frame) @@ -17621,11 +17292,45 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 + return navigation; +} + - RefPtr WebPageProxy::loadRequest(ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, IsPerformingHTTPFallback isPerformingHTTPFallback, API::Object* userData) + RefPtr WebPageProxy::loadRequest(WebCore::ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, IsPerformingHTTPFallback isPerformingHTTPFallback, std::unique_ptr&& lastNavigationAction, API::Object* userData) { if (m_isClosed) -@@ -2507,6 +2538,61 @@ void WebPageProxy::setControlledByAutomation(bool controlled) - websiteDataStore().protectedNetworkProcess()->send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0); +@@ -2042,11 +2073,29 @@ void WebPageProxy::loadRequestWithNavigationShared(Ref&& proces + + navigation->setIsLoadedWithNavigationShared(true); + protectedProcess->markProcessAsRecentlyUsed(); +- if (!protectedProcess->isLaunching() || !url.protocolIsFile()) +- protectedProcess->send(Messages::WebPage::LoadRequest(WTFMove(loadParameters)), webPageID); ++ ++ // Pause loading for new window navigation. ++ Function continuation = [ ++ weakThis = WeakPtr { protectedThis }, ++ weakProcess = WeakPtr { protectedProcess }, ++ loadParameters = WTFMove(loadParameters), ++ webPageID, ++ url ++ ]() mutable { ++ RefPtr innerProtectedProcess = weakProcess.get(); ++ RefPtr innerProtectedThis = weakThis.get(); ++ if (!innerProtectedProcess || !innerProtectedThis) ++ return; ++ if (!innerProtectedProcess->isLaunching() || !url.protocolIsFile()) ++ innerProtectedProcess->send(Messages::WebPage::LoadRequest(WTFMove(loadParameters)), webPageID); ++ else ++ innerProtectedProcess->send(Messages::WebPage::LoadRequestWaitingForProcessLaunch(WTFMove(loadParameters), innerProtectedThis->internals().pageLoadState.resourceDirectoryURL(), innerProtectedThis->identifier(), true), webPageID); ++ innerProtectedProcess->startResponsivenessTimer(); ++ }; ++ if (protectedThis->m_inspectorController->shouldPauseLoadRequest()) ++ protectedThis->m_inspectorController->setContinueLoadingCallback(WTFMove(continuation)); + else +- protectedProcess->send(Messages::WebPage::LoadRequestWaitingForProcessLaunch(WTFMove(loadParameters), protectedThis->internals().pageLoadState.resourceDirectoryURL(), protectedThis->identifier(), true), webPageID); +- protectedProcess->startResponsivenessTimer(); ++ continuation(); + }); + } + +@@ -2588,6 +2637,61 @@ void WebPageProxy::setControlledByAutomation(bool controlled) + protectedWebsiteDataStore()->protectedNetworkProcess()->send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0); } +void WebPageProxy::setAuthCredentialsForAutomation(std::optional&& credentials, std::optional&& origin) @@ -17634,7 +17339,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 + m_authOriginForAutomation = WTFMove(origin); +} + -+void WebPageProxy::setPermissionsForAutomation(const HashMap>& permissions) ++void WebPageProxy::setPermissionsForAutomation(const UncheckedKeyHashMap>& permissions) +{ + m_permissionsForAutomation = permissions; +} @@ -17686,7 +17391,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 void WebPageProxy::createInspectorTarget(IPC::Connection& connection, const String& targetId, Inspector::InspectorTargetType type) { MESSAGE_CHECK_BASE(!targetId.isEmpty(), connection); -@@ -2756,6 +2842,24 @@ void WebPageProxy::updateActivityState(OptionSet flagsToUpdate) +@@ -2837,6 +2941,24 @@ void WebPageProxy::updateActivityState(OptionSet flagsToUpdate) bool wasVisible = isViewVisible(); RefPtr pageClient = this->pageClient(); internals().activityState.remove(flagsToUpdate); @@ -17711,7 +17416,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 if (flagsToUpdate & ActivityState::IsFocused && pageClient->isViewFocused()) internals().activityState.add(ActivityState::IsFocused); if (flagsToUpdate & ActivityState::WindowIsActive && pageClient->isViewWindowActive()) -@@ -3522,7 +3626,7 @@ void WebPageProxy::performDragOperation(DragData& dragData, const String& dragSt +@@ -3603,7 +3725,7 @@ void WebPageProxy::performDragOperation(DragData& dragData, const String& dragSt if (!hasRunningProcess()) return; @@ -17720,7 +17425,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 URL url { dragData.asURL() }; if (url.protocolIsFile()) protectedLegacyMainFrameProcess()->assumeReadAccessToBaseURL(*this, url.string(), [] { }); -@@ -3550,6 +3654,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag +@@ -3631,6 +3753,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag if (!hasRunningProcess()) return; @@ -17729,7 +17434,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 auto completionHandler = [this, protectedThis = Ref { *this }, action, dragData] (std::optional dragOperation, WebCore::DragHandlingMethod dragHandlingMethod, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const IntRect& insertionRect, const IntRect& editableElementRect, std::optional remoteUserInputEventData) mutable { if (!m_pageClient) return; -@@ -3561,7 +3667,7 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag +@@ -3642,7 +3766,7 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag dragData.setClientPosition(remoteUserInputEventData->transformedPoint); performDragControllerAction(action, dragData, remoteUserInputEventData->targetFrameID); }; @@ -17738,7 +17443,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 ASSERT(dragData.platformData()); sendWithAsyncReplyToProcessContainingFrame(frameID, Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags()), WTFMove(completionHandler)); #else -@@ -3595,14 +3701,35 @@ void WebPageProxy::didPerformDragControllerAction(std::optionalpageClient()) pageClient->didPerformDragControllerAction(); @@ -17778,7 +17483,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 } didStartDrag(); } -@@ -3624,6 +3751,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo +@@ -3705,6 +3850,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo setDragCaretRect({ }); } @@ -17803,7 +17508,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 void WebPageProxy::didStartDrag() { if (!hasRunningProcess()) -@@ -3631,6 +3776,26 @@ void WebPageProxy::didStartDrag() +@@ -3712,6 +3875,26 @@ void WebPageProxy::didStartDrag() discardQueuedMouseEvents(); send(Messages::WebPage::DidStartDrag()); @@ -17830,7 +17535,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 } void WebPageProxy::dragCancelled() -@@ -3778,26 +3943,47 @@ void WebPageProxy::processNextQueuedMouseEvent() +@@ -3859,26 +4042,47 @@ void WebPageProxy::processNextQueuedMouseEvent() process->startResponsivenessTimer(); } @@ -17890,7 +17595,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 } void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function&& action) -@@ -3965,6 +4151,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled) +@@ -4047,6 +4251,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled) if (RefPtr automationSession = configuration().processPool().automationSession()) automationSession->wheelEventsFlushedForPage(*this); @@ -17899,16 +17604,16 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 } void WebPageProxy::cacheWheelEventScrollingAccelerationCurve(const NativeWebWheelEvent& nativeWheelEvent) -@@ -4100,7 +4288,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b) +@@ -4182,7 +4388,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b) void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent) { -#if ENABLE(ASYNC_SCROLLING) && PLATFORM(COCOA) +#if ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) for (auto& touchPoint : touchStartEvent.touchPoints()) { - auto location = touchPoint.location(); + auto location = touchPoint.locationInRootView(); auto update = [this, location](TrackingType& trackingType, EventTrackingRegions::EventType eventType) { -@@ -4723,6 +4911,7 @@ void WebPageProxy::receivedNavigationActionPolicyDecision(WebProcessProxy& proce +@@ -4804,6 +5010,7 @@ void WebPageProxy::receivedNavigationActionPolicyDecision(WebProcessProxy& proce void WebPageProxy::receivedPolicyDecision(PolicyAction action, API::Navigation* navigation, RefPtr&& websitePolicies, Ref&& navigationAction, WillContinueLoadInNewProcess willContinueLoadInNewProcess, std::optional sandboxExtensionHandle, std::optional&& consoleMessage, CompletionHandler&& completionHandler) { @@ -17916,28 +17621,23 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 if (!hasRunningProcess()) return completionHandler(PolicyDecision { }); -@@ -5671,6 +5860,12 @@ void WebPageProxy::pageScaleFactorDidChange(IPC::Connection& connection, double - m_pageScaleFactor = scaleFactor; - } - -+void WebPageProxy::viewScaleFactorDidChange(IPC::Connection& connection, double scaleFactor) -+{ -+ MESSAGE_CHECK_BASE(scaleFactorIsValid(scaleFactor), connection); +@@ -5790,6 +5997,7 @@ void WebPageProxy::viewScaleFactorDidChange(IPC::Connection& connection, double + MESSAGE_CHECK_BASE(scaleFactorIsValid(scaleFactor), connection); + if (!legacyMainFrameProcess().hasConnection(connection)) + return; + m_viewScaleFactor = scaleFactor; -+} -+ - void WebPageProxy::pluginScaleFactorDidChange(IPC::Connection& connection, double pluginScaleFactor) - { - MESSAGE_CHECK_BASE(scaleFactorIsValid(pluginScaleFactor), connection); -@@ -6283,6 +6478,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref&& process, We + + forEachWebContentProcess([&] (auto& process, auto pageID) { + if (&process == &legacyMainFrameProcess()) +@@ -6436,6 +6644,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref&& process, We RefPtr protectedPageClient { pageClient() }; - m_navigationState->didDestroyNavigation(process->coreProcessIdentifier(), navigationID); + protectedNavigationState()->didDestroyNavigation(process->coreProcessIdentifier(), navigationID); + m_inspectorController->didDestroyNavigation(navigationID); } void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, std::optional navigationID, URL&& url, URL&& unreachableURL, const UserData& userData, WallTime timestamp) -@@ -6603,6 +6799,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref&& p +@@ -6761,6 +6970,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref&& p m_failingProvisionalLoadURL = { }; @@ -17946,15 +17646,26 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 // If the provisional page's load fails then we destroy the provisional page. if (m_provisionalPage && m_provisionalPage->mainFrame() == &frame && willContinueLoading == WillContinueLoading::No) m_provisionalPage = nullptr; -@@ -7966,6 +8164,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w +@@ -8151,8 +8362,9 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w if (RefPtr page = originatingFrameInfo->page()) openerAppInitiatedState = page->lastNavigationWasAppInitiated(); +- auto navigationDataForNewProcess = navigationActionData.hasOpener ? nullptr : makeUnique(navigationActionData); + m_inspectorController->willCreateNewPage(windowFeatures, request.url()); + ++ auto navigationDataForNewProcess = navigationActionData.hasOpener ? nullptr : makeUnique(navigationActionData); auto completionHandler = [ this, protectedThis = Ref { *this }, -@@ -8043,6 +8242,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w +@@ -8221,6 +8433,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w + configuration->setInitialSandboxFlags(effectiveSandboxFlags); + configuration->setWindowFeatures(WTFMove(windowFeatures)); + configuration->setOpenedMainFrameName(openedMainFrameName); ++ configuration->setOpenerPageForInspector(*this); + + if (RefPtr openerFrame = WebFrameProxy::webFrame(originatingFrameInfoData.frameID); navigationActionData.hasOpener && openerFrame) { + configuration->setRelatedPage(*this); +@@ -8245,6 +8458,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w void WebPageProxy::showPage() { m_uiClient->showPage(this); @@ -17962,7 +17673,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 } bool WebPageProxy::hasOpenedPage() const -@@ -8157,6 +8357,10 @@ void WebPageProxy::closePage() +@@ -8359,6 +8573,10 @@ void WebPageProxy::closePage() if (isClosed()) return; @@ -17973,7 +17684,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:"); if (RefPtr pageClient = this->pageClient()) pageClient->clearAllEditCommands(); -@@ -8194,6 +8398,8 @@ void WebPageProxy::runJavaScriptAlert(IPC::Connection& connection, FrameIdentifi +@@ -8396,6 +8614,8 @@ void WebPageProxy::runJavaScriptAlert(IPC::Connection& connection, FrameIdentifi } runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler&& completion) mutable { @@ -17982,7 +17693,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 page.m_uiClient->runJavaScriptAlert(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)]() mutable { reply(); completion(); -@@ -8215,6 +8421,8 @@ void WebPageProxy::runJavaScriptConfirm(IPC::Connection& connection, FrameIdenti +@@ -8417,6 +8637,8 @@ void WebPageProxy::runJavaScriptConfirm(IPC::Connection& connection, FrameIdenti if (RefPtr automationSession = configuration().processPool().automationSession()) automationSession->willShowJavaScriptDialog(*this); } @@ -17991,7 +17702,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler&& completion) mutable { page.m_uiClient->runJavaScriptConfirm(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)](bool result) mutable { -@@ -8238,6 +8446,8 @@ void WebPageProxy::runJavaScriptPrompt(IPC::Connection& connection, FrameIdentif +@@ -8440,6 +8662,8 @@ void WebPageProxy::runJavaScriptPrompt(IPC::Connection& connection, FrameIdentif if (RefPtr automationSession = configuration().processPool().automationSession()) automationSession->willShowJavaScriptDialog(*this); } @@ -18000,7 +17711,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply), defaultValue](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler&& completion) mutable { page.m_uiClient->runJavaScriptPrompt(page, message, defaultValue, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)](auto& result) mutable { -@@ -8366,6 +8576,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(IPC::Connection& connection, Fram +@@ -8568,6 +8792,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(IPC::Connection& connection, Fram return; } } @@ -18009,7 +17720,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 // Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer. protectedLegacyMainFrameProcess()->stopResponsivenessTimer(); -@@ -8936,6 +9148,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo, +@@ -9134,6 +9360,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo, } #if ENABLE(FULLSCREEN_API) @@ -18021,7 +17732,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 WebFullScreenManagerProxy* WebPageProxy::fullScreenManager() { return m_fullScreenManager.get(); -@@ -9041,6 +9258,17 @@ void WebPageProxy::requestDOMPasteAccess(DOMPasteAccessCategory pasteAccessCateg +@@ -9244,6 +9475,17 @@ void WebPageProxy::requestDOMPasteAccess(IPC::Connection& connection, DOMPasteAc } } @@ -18039,7 +17750,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 m_pageClient->requestDOMPasteAccess(pasteAccessCategory, requiresInteraction, elementRect, originIdentifier, WTFMove(completionHandler)); } -@@ -9979,6 +10207,8 @@ void WebPageProxy::mouseEventHandlingCompleted(std::optional event +@@ -10241,6 +10483,8 @@ void WebPageProxy::mouseEventHandlingCompleted(std::optional event if (RefPtr automationSession = configuration().processPool().automationSession()) automationSession->mouseEventsFlushedForPage(*this); didFinishProcessingAllPendingMouseEvents(); @@ -18048,7 +17759,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 } } -@@ -10014,6 +10244,7 @@ void WebPageProxy::keyEventHandlingCompleted(std::optional eventTy +@@ -10275,6 +10519,7 @@ void WebPageProxy::keyEventHandlingCompleted(std::optional eventTy if (!canProcessMoreKeyEvents) { if (RefPtr automationSession = configuration().processPool().automationSession()) automationSession->keyboardEventsFlushedForPage(*this); @@ -18056,9 +17767,9 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 } } -@@ -10431,7 +10662,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason) - { - WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%" PUBLIC_LOG_STRING, processTerminationReasonToString(reason).characters()); +@@ -10696,7 +10941,10 @@ void WebPageProxy::dispatchProcessDidTerminate(WebProcessProxy& process, Process + if (m_preferences->siteIsolationEnabled()) + m_browsingContextGroup->processDidTerminate(*this, process); - bool handledByClient = false; + bool handledByClient = m_inspectorController->pageCrashed(reason); @@ -18068,16 +17779,16 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 if (m_loaderClient) handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this); else -@@ -11065,6 +11299,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc +@@ -11343,6 +11591,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc - parameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false; + parameters.httpsUpgradeEnabled = preferences->upgradeKnownHostsToHTTPSEnabled() ? configuration->httpsUpgradeEnabled() : false; -+ parameters.shouldPauseInInspectorWhenShown = m_inspectorController->shouldPauseLoading(); ++ parameters.shouldPauseInInspectorWhenShown = m_inspectorController->shouldPauseInInspectorWhenShown(); + #if PLATFORM(IOS) || PLATFORM(VISION) // FIXME: This is also being passed over the to WebProcess via the PreferencesStore. parameters.allowsDeprecatedSynchronousXMLHttpRequestDuringUnload = allowsDeprecatedSynchronousXMLHttpRequestDuringUnload(); -@@ -11229,8 +11465,42 @@ void WebPageProxy::allowGamepadAccess() +@@ -11502,8 +11752,42 @@ void WebPageProxy::allowGamepadAccess() #endif // ENABLE(GAMEPAD) @@ -18120,7 +17831,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) { m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = Ref { *this }, authenticationChallenge] (bool shouldAllowLegacyTLS) { if (shouldAllowLegacyTLS) -@@ -11324,6 +11594,12 @@ void WebPageProxy::requestGeolocationPermissionForFrame(IPC::Connection& connect +@@ -11597,6 +11881,12 @@ void WebPageProxy::requestGeolocationPermissionForFrame(IPC::Connection& connect request->deny(); }; @@ -18133,7 +17844,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 // FIXME: Once iOS migrates to the new WKUIDelegate SPI, clean this up // and make it one UIClient call that calls the completionHandler with false // if there is no delegate instead of returning the completionHandler -@@ -11386,6 +11662,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi +@@ -11659,6 +11949,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi shouldChangeDeniedToPrompt = false; if (sessionID().isEphemeral()) { @@ -18146,7 +17857,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 completionHandler(shouldChangeDeniedToPrompt ? PermissionState::Prompt : PermissionState::Denied); return; } -@@ -11400,6 +11682,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi +@@ -11673,6 +11969,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi return; } @@ -18160,7 +17871,7 @@ index dc95df8cd29f53622308310d998c3659a0190a71..f11fde5085cd28fe011372dcdf426816 completionHandler(shouldChangeDeniedToPrompt ? PermissionState::Prompt : PermissionState::Denied); return; diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h -index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61bdef5c20e 100644 +index 304e437942e1269b0ada34b4f11789b84713b1b1..8e4f32d830657337e6451932bb1f75b2f3d1430e 100644 --- a/Source/WebKit/UIProcess/WebPageProxy.h +++ b/Source/WebKit/UIProcess/WebPageProxy.h @@ -26,6 +26,7 @@ @@ -18170,8 +17881,8 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b +#include "APIWebsitePolicies.h" #include "MessageReceiver.h" #include - #include -@@ -38,6 +39,20 @@ + #include +@@ -40,6 +41,20 @@ #include #include #include @@ -18192,15 +17903,15 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b #if USE(DICTATION_ALTERNATIVES) #include -@@ -119,6 +134,7 @@ class DragData; +@@ -122,6 +137,7 @@ class DragData; class Exception; class FloatPoint; class FloatQuad; -+typedef HashMap> DragDataMap; ++typedef UncheckedKeyHashMap> DragDataMap; class FloatRect; class FloatSize; class FontAttributeChanges; -@@ -461,6 +477,7 @@ class WebExtensionController; +@@ -467,6 +483,7 @@ class WebExtensionController; class WebFramePolicyListenerProxy; class WebFrameProxy; class WebFullScreenManagerProxy; @@ -18208,7 +17919,7 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b class WebInspectorUIProxy; class WebKeyboardEvent; class WebMouseEvent; -@@ -684,6 +701,8 @@ public: +@@ -695,6 +712,8 @@ public: void setControlledByAutomation(bool); WebPageInspectorController& inspectorController() { return *m_inspectorController; } @@ -18217,7 +17928,7 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b #if PLATFORM(IOS_FAMILY) void showInspectorIndication(); -@@ -717,6 +736,7 @@ public: +@@ -728,6 +747,7 @@ public: bool hasSleepDisabler() const; #if ENABLE(FULLSCREEN_API) @@ -18225,28 +17936,29 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b WebFullScreenManagerProxy* fullScreenManager(); API::FullscreenClient& fullscreenClient() const { return *m_fullscreenClient; } -@@ -805,6 +825,12 @@ public: +@@ -817,6 +837,12 @@ public: - void setPageLoadStateObserver(std::unique_ptr&&); + void setPageLoadStateObserver(RefPtr&&); + void setAuthCredentialsForAutomation(std::optional&&, std::optional&&); -+ void setPermissionsForAutomation(const HashMap>&); ++ void setPermissionsForAutomation(const UncheckedKeyHashMap>&); + void setOrientationOverride(std::optional&& angle); + void setActiveForAutomation(std::optional active); + void logToStderr(const String& str); + void initializeWebPage(const WebCore::Site&, WebCore::SandboxFlags); - void setDrawingArea(std::unique_ptr&&); + void setDrawingArea(RefPtr&&); + +@@ -848,6 +874,8 @@ public: + RefPtr loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, WebCore::IsPerformingHTTPFallback); + RefPtr loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, WebCore::IsPerformingHTTPFallback, std::unique_ptr&&, API::Object* userData = nullptr); -@@ -832,6 +858,7 @@ public: - RefPtr loadRequest(WebCore::ResourceRequest&&); - RefPtr loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy); - RefPtr loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, WebCore::IsPerformingHTTPFallback, API::Object* userData = nullptr); + RefPtr loadRequestForInspector(WebCore::ResourceRequest&&, WebFrameProxy*); ++ RefPtr loadFile(const String& fileURL, const String& resourceDirectoryURL, bool isAppInitiated = true, API::Object* userData = nullptr); RefPtr loadData(Ref&&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr); RefPtr loadData(Ref&&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, WebCore::ShouldOpenExternalURLsPolicy); -@@ -898,6 +925,7 @@ public: +@@ -931,6 +959,7 @@ public: PageClient* pageClient() const; RefPtr protectedPageClient() const; @@ -18254,15 +17966,7 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b void setViewNeedsDisplay(const WebCore::Region&); void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, WebCore::ScrollIsAnimated); -@@ -1427,6 +1455,7 @@ public: - #endif - - void pageScaleFactorDidChange(IPC::Connection&, double); -+ void viewScaleFactorDidChange(IPC::Connection&, double); - void pluginScaleFactorDidChange(IPC::Connection&, double); - void pluginZoomFactorDidChange(IPC::Connection&, double); - -@@ -1511,14 +1540,20 @@ public: +@@ -1556,14 +1585,20 @@ public: void didStartDrag(); void dragCancelled(); void setDragCaretRect(const WebCore::IntRect&); @@ -18284,7 +17988,7 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b #endif void processDidBecomeUnresponsive(); -@@ -1757,6 +1792,7 @@ public: +@@ -1808,6 +1843,7 @@ public: void setViewportSizeForCSSViewportUnits(const WebCore::FloatSize&); WebCore::FloatSize viewportSizeForCSSViewportUnits() const; @@ -18292,7 +17996,7 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b void didReceiveAuthenticationChallengeProxy(Ref&&, NegotiatedLegacyTLS); void negotiatedLegacyTLS(); void didNegotiateModernTLS(const URL&); -@@ -1790,6 +1826,8 @@ public: +@@ -1841,6 +1877,8 @@ public: #if PLATFORM(COCOA) || PLATFORM(GTK) RefPtr takeViewSnapshot(std::optional&&); RefPtr takeViewSnapshot(std::optional&&, ForceSoftwareCapturingViewportSnapshot); @@ -18301,7 +18005,7 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b #endif void wrapCryptoKey(Vector&&, CompletionHandler>&&)>&&); -@@ -2722,6 +2760,7 @@ private: +@@ -2805,6 +2843,7 @@ private: RefPtr launchProcessForReload(); void requestNotificationPermission(const String& originString, CompletionHandler&&); @@ -18309,18 +18013,18 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b void didChangeContentSize(const WebCore::IntSize&); void didChangeIntrinsicContentSize(const WebCore::IntSize&); -@@ -3237,8 +3276,10 @@ private: - String m_overrideContentSecurityPolicy; +@@ -3326,8 +3365,10 @@ private: + String m_openedMainFrameName; RefPtr m_inspector; + InspectorDialogAgent* m_inspectorDialogAgent { nullptr }; #if ENABLE(FULLSCREEN_API) + std::unique_ptr m_fullScreenManagerClientOverride; - std::unique_ptr m_fullScreenManager; + RefPtr m_fullScreenManager; std::unique_ptr m_fullscreenClient; #endif -@@ -3433,6 +3474,22 @@ private: +@@ -3527,6 +3568,22 @@ private: std::optional m_currentDragOperation; bool m_currentDragIsOverFileInput { false }; unsigned m_currentDragNumberOfFilesToBeAccepted { 0 }; @@ -18343,38 +18047,30 @@ index 22132a82fb63a08f4f18a9b7b915d81f930429c8..880a013168f401f85aa1215a0fd0f61b #endif bool m_mainFrameHasHorizontalScrollbar { false }; -@@ -3604,6 +3661,10 @@ private: +@@ -3698,6 +3755,10 @@ private: RefPtr messageBody; }; Vector m_pendingInjectedBundleMessages; + std::optional m_credentialsForAutomation; + std::optional m_authOriginForAutomation; -+ HashMap> m_permissionsForAutomation; ++ UncheckedKeyHashMap> m_permissionsForAutomation; + std::optional m_activeForAutomation; #if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION) - std::unique_ptr m_webDeviceOrientationUpdateProviderProxy; + RefPtr m_webDeviceOrientationUpdateProviderProxy; diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in -index d5a3dbad2866cfb6980f2f47764eba902be9b60c..4872ea89b4d92649cef4681685239cf49b2bb30e 100644 +index e28a28652ad75c4f4efe1b52868a10ab8ea4691b..218fe89bf5e342e496ccc986cc6bee750e23eb38 100644 --- a/Source/WebKit/UIProcess/WebPageProxy.messages.in +++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in -@@ -30,6 +30,7 @@ messages -> WebPageProxy { +@@ -34,6 +34,7 @@ messages -> WebPageProxy { RunJavaScriptConfirm(WebCore::FrameIdentifier frameID, struct WebKit::FrameInfoData frameInfo, String message) -> (bool result) Synchronous RunJavaScriptPrompt(WebCore::FrameIdentifier frameID, struct WebKit::FrameInfoData frameInfo, String message, String defaultValue) -> (String result) Synchronous MouseDidMoveOverElement(struct WebKit::WebHitTestResultData hitTestResultData, OptionSet modifiers, WebKit::UserData userData) + LogToStderr(String text) - DidChangeViewportProperties(struct WebCore::ViewportAttributes attributes) DidReceiveEvent(enum:uint8_t WebKit::WebEventType eventType, bool handled, struct std::optional remoteUserInputEventData) -@@ -186,6 +187,7 @@ messages -> WebPageProxy { - #endif - - PageScaleFactorDidChange(double scaleFactor) -+ ViewScaleFactorDidChange(double scaleFactor) - PluginScaleFactorDidChange(double zoomFactor) - PluginZoomFactorDidChange(double zoomFactor) - -@@ -316,10 +318,14 @@ messages -> WebPageProxy { + SetCursor(WebCore::Cursor cursor) +@@ -327,10 +328,14 @@ messages -> WebPageProxy { StartDrag(struct WebCore::DragItem dragItem, WebCore::ShareableBitmapHandle dragImage) SetPromisedDataForImage(String pasteboardName, WebCore::SharedMemory::Handle imageHandle, String filename, String extension, String title, String url, String visibleURL, WebCore::SharedMemory::Handle archiveHandle, String originIdentifier) #endif @@ -18384,14 +18080,14 @@ index d5a3dbad2866cfb6980f2f47764eba902be9b60c..4872ea89b4d92649cef4681685239cf4 #endif +#if PLATFORM(WIN) && ENABLE(DRAG_SUPPORT) -+ StartDrag(HashMap> dragDataMap) ++ StartDrag(UncheckedKeyHashMap> dragDataMap) +#endif + #if PLATFORM(IOS_FAMILY) && ENABLE(DRAG_SUPPORT) DidHandleDragStartRequest(bool started) DidHandleAdditionalDragItemsRequest(bool added) diff --git a/Source/WebKit/UIProcess/WebProcessCache.cpp b/Source/WebKit/UIProcess/WebProcessCache.cpp -index 0bf66ef96022b16fe27cff481b41ebb369b5803a..9e3092647e880a75f7df26c361e220b8c89a603e 100644 +index a52ebc98999087f70ff74a3a21355409a1224f95..460b87c90611bbbbea5970d6a45aacb8c17be0f3 100644 --- a/Source/WebKit/UIProcess/WebProcessCache.cpp +++ b/Source/WebKit/UIProcess/WebProcessCache.cpp @@ -92,6 +92,10 @@ bool WebProcessCache::canCacheProcess(WebProcessProxy& process) const @@ -18406,10 +18102,10 @@ index 0bf66ef96022b16fe27cff481b41ebb369b5803a..9e3092647e880a75f7df26c361e220b8 } diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp -index b5a8f1b2da36d5c53d46d3b6e0a63e34d41db5d3..4df997597541f123cbd3f7e0b2016a26223b9b8e 100644 +index 640f3f891ef5fc07eb88dbe2d5c74430061bfbac..6bac8aa05755a9686002d35e47aa8eee648993ee 100644 --- a/Source/WebKit/UIProcess/WebProcessPool.cpp +++ b/Source/WebKit/UIProcess/WebProcessPool.cpp -@@ -439,10 +439,10 @@ void WebProcessPool::setAutomationClient(std::unique_ptr& +@@ -438,10 +438,10 @@ void WebProcessPool::setAutomationClient(std::unique_ptr& void WebProcessPool::setOverrideLanguages(Vector&& languages) { @@ -18422,7 +18118,7 @@ index b5a8f1b2da36d5c53d46d3b6e0a63e34d41db5d3..4df997597541f123cbd3f7e0b2016a26 #if ENABLE(GPU_PROCESS) if (RefPtr gpuProcess = GPUProcessProxy::singletonIfCreated()) -@@ -450,9 +450,10 @@ void WebProcessPool::setOverrideLanguages(Vector&& languages) +@@ -449,9 +449,10 @@ void WebProcessPool::setOverrideLanguages(Vector&& languages) #endif #if USE(SOUP) for (Ref networkProcess : NetworkProcessProxy::allNetworkProcesses()) @@ -18434,7 +18130,7 @@ index b5a8f1b2da36d5c53d46d3b6e0a63e34d41db5d3..4df997597541f123cbd3f7e0b2016a26 void WebProcessPool::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled) { -@@ -926,7 +927,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa +@@ -928,7 +929,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa #endif parameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel(); @@ -18444,10 +18140,10 @@ index b5a8f1b2da36d5c53d46d3b6e0a63e34d41db5d3..4df997597541f123cbd3f7e0b2016a26 parameters.urlSchemesRegisteredAsEmptyDocument = copyToVector(m_schemesToRegisterAsEmptyDocument); diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp -index a508a91e3659c59614314d0f8abf559cf36818d2..866887ee5dfd6bacc12ab2068411270daae0d43e 100644 +index a9335579083e325126d2c1de5ca89108a5d9f4a8..c42e19f3f9aeca5202fbaf6cf88c922c3508d4bf 100644 --- a/Source/WebKit/UIProcess/WebProcessProxy.cpp +++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp -@@ -190,6 +190,11 @@ Vector> WebProcessProxy::allProcesses() +@@ -192,6 +192,11 @@ Vector> WebProcessProxy::allProcesses() }); } @@ -18459,7 +18155,7 @@ index a508a91e3659c59614314d0f8abf559cf36818d2..866887ee5dfd6bacc12ab2068411270d RefPtr WebProcessProxy::processForIdentifier(ProcessIdentifier identifier) { return allProcessMap().get(identifier); -@@ -548,6 +553,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt +@@ -554,6 +559,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt if (WebKit::isInspectorProcessPool(protectedProcessPool())) launchOptions.extraInitializationData.add("inspector-process"_s, "1"_s); @@ -18487,10 +18183,10 @@ index a508a91e3659c59614314d0f8abf559cf36818d2..866887ee5dfd6bacc12ab2068411270d if (isPrewarmed()) diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h -index 1b3c5b61e3e3a175632f2a92ca6947b05f05defc..38011071cef8dc662c617a18b16777956bad3868 100644 +index 7d9e93ea058e783f32ef1d0a6ca0182175da64c4..303655051c9b8f91868ebaaca74a61d851ddbd59 100644 --- a/Source/WebKit/UIProcess/WebProcessProxy.h +++ b/Source/WebKit/UIProcess/WebProcessProxy.h -@@ -170,6 +170,7 @@ public: +@@ -177,6 +177,7 @@ public: static void forWebPagesWithOrigin(PAL::SessionID, const WebCore::SecurityOriginData&, const Function&); static Vector> allowedFirstPartiesForCookies(); @@ -18498,23 +18194,11 @@ index 1b3c5b61e3e3a175632f2a92ca6947b05f05defc..38011071cef8dc662c617a18b1677795 void initializeWebProcess(WebProcessCreationParameters&&); -diff --git a/Source/WebKit/UIProcess/WebScreenOrientationManagerProxy.h b/Source/WebKit/UIProcess/WebScreenOrientationManagerProxy.h -index ed7f2f625f8dad92c3cfc8f5eff8a8acee9d1b1d..5aac771624649e0d9ccb4e52754dfac1d6228c71 100644 ---- a/Source/WebKit/UIProcess/WebScreenOrientationManagerProxy.h -+++ b/Source/WebKit/UIProcess/WebScreenOrientationManagerProxy.h -@@ -26,6 +26,7 @@ - #pragma once - - #include "MessageReceiver.h" -+#include "SharedPreferencesForWebProcess.h" - #include - #include - #include diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp -index a4a20ceb0dec282cebb7bf7d5f901c8ab8acfe0f..1780fd157b48474a63b5a6a5a583f57b64789ff0 100644 +index 069845674e159025683e063219431aa20e3a5a3e..8f3963b6316404bfb0c13305d1272cf15002b1f4 100644 --- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp +++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp -@@ -311,7 +311,8 @@ SOAuthorizationCoordinator& WebsiteDataStore::soAuthorizationCoordinator(const W +@@ -314,7 +314,8 @@ SOAuthorizationCoordinator& WebsiteDataStore::soAuthorizationCoordinator(const W static Ref networkProcessForSession(PAL::SessionID sessionID) { @@ -18524,7 +18208,7 @@ index a4a20ceb0dec282cebb7bf7d5f901c8ab8acfe0f..1780fd157b48474a63b5a6a5a583f57b if (sessionID.isEphemeral()) { // Reuse a previous persistent session network process for ephemeral sessions. for (auto& dataStore : allDataStores().values()) { -@@ -2324,6 +2325,12 @@ void WebsiteDataStore::originDirectoryForTesting(WebCore::ClientOrigin&& origin, +@@ -2343,6 +2344,12 @@ void WebsiteDataStore::originDirectoryForTesting(WebCore::ClientOrigin&& origin, protectedNetworkProcess()->websiteDataOriginDirectoryForTesting(m_sessionID, WTFMove(origin), type, WTFMove(completionHandler)); } @@ -18538,7 +18222,7 @@ index a4a20ceb0dec282cebb7bf7d5f901c8ab8acfe0f..1780fd157b48474a63b5a6a5a583f57b void WebsiteDataStore::hasAppBoundSession(CompletionHandler&& completionHandler) const { diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h -index fa85e9ad259588bb309c98c9550d4e46a487cbf1..092417a3e98eeddeea29b3d9b1c0131bac503386 100644 +index ca5511eaf8b0af08a20c44fa2350b3a1d94d46cb..9855dc78e84374042d3f28e980475b4dd639a8c6 100644 --- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h +++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h @@ -97,6 +97,7 @@ class DeviceIdHashSaltStorage; @@ -18571,7 +18255,7 @@ index fa85e9ad259588bb309c98c9550d4e46a487cbf1..092417a3e98eeddeea29b3d9b1c0131b class WebsiteDataStore : public API::ObjectImpl, public CanMakeWeakPtr { public: static Ref defaultDataStore(); -@@ -305,11 +315,13 @@ public: +@@ -306,11 +316,13 @@ public: const WebCore::CurlProxySettings& networkProxySettings() const { return m_proxySettings; } #endif @@ -18586,7 +18270,7 @@ index fa85e9ad259588bb309c98c9550d4e46a487cbf1..092417a3e98eeddeea29b3d9b1c0131b void setNetworkProxySettings(WebCore::SoupNetworkProxySettings&&); const WebCore::SoupNetworkProxySettings& networkProxySettings() const { return m_networkProxySettings; } void setCookiePersistentStorage(const String&, SoupCookiePersistentStorageType); -@@ -396,6 +408,12 @@ public: +@@ -400,6 +412,12 @@ public: static const String& defaultBaseDataDirectory(); #endif @@ -18599,7 +18283,7 @@ index fa85e9ad259588bb309c98c9550d4e46a487cbf1..092417a3e98eeddeea29b3d9b1c0131b void resetQuota(CompletionHandler&&); void resetStoragePersistedState(CompletionHandler&&); #if PLATFORM(IOS_FAMILY) -@@ -570,9 +588,11 @@ private: +@@ -576,9 +594,11 @@ private: WebCore::CurlProxySettings m_proxySettings; #endif @@ -18612,7 +18296,7 @@ index fa85e9ad259588bb309c98c9550d4e46a487cbf1..092417a3e98eeddeea29b3d9b1c0131b WebCore::SoupNetworkProxySettings m_networkProxySettings; String m_cookiePersistentStoragePath; SoupCookiePersistentStorageType m_cookiePersistentStorageType { SoupCookiePersistentStorageType::SQLite }; -@@ -599,6 +619,10 @@ private: +@@ -605,6 +625,10 @@ private: RefPtr m_cookieStore; RefPtr m_networkProcess; @@ -18624,10 +18308,10 @@ index fa85e9ad259588bb309c98c9550d4e46a487cbf1..092417a3e98eeddeea29b3d9b1c0131b std::unique_ptr m_soAuthorizationCoordinator; #endif diff --git a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp -index 351268d32fc4f25fe63021d1e6de62d0f2784ddb..0b8b0830a516085f0666dd04fa6be3c3dbde2e7c 100644 +index ac64c2a3cb5d1e8e46ba1835623a5c12825e3ea1..6ad7a5adc5198ae035c5cb815b6db8f033910f3a 100644 --- a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp +++ b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp -@@ -105,6 +105,14 @@ void GeoclueGeolocationProvider::stop() +@@ -114,6 +114,14 @@ void GeoclueGeolocationProvider::stop() } m_sourceType = LocationProviderSource::Unknown; @@ -18642,7 +18326,7 @@ index 351268d32fc4f25fe63021d1e6de62d0f2784ddb..0b8b0830a516085f0666dd04fa6be3c3 } void GeoclueGeolocationProvider::setEnableHighAccuracy(bool enabled) -@@ -377,6 +385,8 @@ void GeoclueGeolocationProvider::createGeoclueClient(const char* clientPath) +@@ -386,6 +394,8 @@ void GeoclueGeolocationProvider::createGeoclueClient(const char* clientPath) return; } @@ -18874,7 +18558,7 @@ index 0000000000000000000000000000000000000000..ac01ad1653b22a0f22c45a196659e68f +#endif // ENABLE(REMOTE_INSPECTOR) diff --git a/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.h b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.h new file mode 100644 -index 0000000000000000000000000000000000000000..394f07e1754be52b7d503d5720cba5d3724c5f4d +index 0000000000000000000000000000000000000000..441442d899e4088f5c24ae9f70c3e4ffa1e6d340 --- /dev/null +++ b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.h @@ -0,0 +1,61 @@ @@ -18932,7 +18616,7 @@ index 0000000000000000000000000000000000000000..394f07e1754be52b7d503d5720cba5d3 +private: + WebKitWebContext* findContext(WTF::String& error, PAL::SessionID); + -+ HashMap> m_idToContext; ++ UncheckedKeyHashMap> m_idToContext; + WebCore::SoupNetworkProxySettings m_proxySettings; +}; + @@ -18940,18 +18624,18 @@ index 0000000000000000000000000000000000000000..394f07e1754be52b7d503d5720cba5d3 + +#endif // ENABLE(REMOTE_INSPECTOR) diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h -index ce120bac5e1c6018ec637181d4b9d08cf85a1f32..2fe169f2f2976a73d275cc089d0df32541dbdec3 100644 +index b2e2a636725674a1619f92d67c7846358374b9e3..7bc4914766b3b03e586c6662c6da33ceac466c0b 100644 --- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h +++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h -@@ -30,6 +30,7 @@ - #include +@@ -32,6 +32,7 @@ + #include typedef struct _cairo cairo_t; +typedef struct _cairo_surface cairo_surface_t; #if USE(GTK4) typedef struct _GdkSnapshot GdkSnapshot; -@@ -59,6 +60,8 @@ public: +@@ -61,6 +62,8 @@ public: #else virtual bool paint(cairo_t*, const WebCore::IntRect&) = 0; #endif @@ -18961,10 +18645,10 @@ index ce120bac5e1c6018ec637181d4b9d08cf85a1f32..2fe169f2f2976a73d275cc089d0df325 virtual void unrealize() { }; virtual int renderHostFileDescriptor() { return -1; } diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp -index 95f8f8a3cc14be838e5170a94ec4b2328afde62f..0a4af599d5e711b9c4eaa1c27cd7442121e07627 100644 +index fc6a465e3518c6d9be65b9cb4677b9734b023741..431337fb8576c41e7a59440b2f867b0bebce9776 100644 --- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp +++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp -@@ -707,4 +707,30 @@ RendererBufferFormat AcceleratedBackingStoreDMABuf::bufferFormat() const +@@ -729,4 +729,30 @@ RendererBufferFormat AcceleratedBackingStoreDMABuf::bufferFormat() const return buffer ? buffer->format() : RendererBufferFormat { }; } @@ -18996,10 +18680,10 @@ index 95f8f8a3cc14be838e5170a94ec4b2328afde62f..0a4af599d5e711b9c4eaa1c27cd74421 + } // namespace WebKit diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h -index 8fa631f95a39298a9b4876b7d1b52bcacc3dc4af..d8c15d27ad8210739da490f32999b395fae9b65b 100644 +index a208bbefafd88a3d95f6c2be35f7f700c86bda90..c603c7eb3501989e79ebc31b1c4eb6e1d2523ffe 100644 --- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h +++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h -@@ -94,6 +94,7 @@ private: +@@ -98,6 +98,7 @@ private: #else bool paint(cairo_t*, const WebCore::IntRect&) override; #endif @@ -19007,7 +18691,7 @@ index 8fa631f95a39298a9b4876b7d1b52bcacc3dc4af..d8c15d27ad8210739da490f32999b395 void unrealize() override; void update(const LayerTreeContext&) override; RendererBufferFormat bufferFormat() const override; -@@ -242,6 +243,9 @@ private: +@@ -247,6 +248,9 @@ private: RefPtr m_committedBuffer; WebCore::Region m_pendingDamageRegion; HashMap> m_buffers; @@ -19071,19 +18755,19 @@ index 0000000000000000000000000000000000000000..bf78de1915940c2d3292514cf0fe4e68 +} + +} // namespace WebKit -diff --git a/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp b/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp -index 97191083e1c5b5283599e394e56553fc5e5cd6a1..e8c7cbb6cd9431b1720aafb8dfd0abdc97f17a39 100644 ---- a/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp -+++ b/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp -@@ -35,6 +35,8 @@ - #include - #include +diff --git a/Source/WebKit/UIProcess/gtk/SystemSettingsManagerProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/SystemSettingsManagerProxyGtk.cpp +index aa702b018d881739fb464246e7c7d7236adfe97b..f711e1608e6d8b988d2d0bc99893d5b0137a07ae 100644 +--- a/Source/WebKit/UIProcess/gtk/SystemSettingsManagerProxyGtk.cpp ++++ b/Source/WebKit/UIProcess/gtk/SystemSettingsManagerProxyGtk.cpp +@@ -117,6 +117,8 @@ int SystemSettingsManagerProxy::xftDPI() const -+using namespace WebCore; -+ - namespace WebKit { - - Ref WebDateTimePickerGtk::create(WebPageProxy& page) + bool SystemSettingsManagerProxy::followFontSystemSettings() const + { ++ // Align with WPE's behavior, which always returns false. ++ return false; + #if USE(GTK4) + #if GTK_CHECK_VERSION(4, 16, 0) + GtkFontRendering fontRendering; diff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d9672b0f831b5b7f6acf14ede26e1e8e9a65389 @@ -19306,19 +18990,6 @@ index 2a17b59c9be6ecc76b0ec0a16d9f4866dffa0bf4..0d5c58a88b0e5197254d0eb5bd6eee04 m_primarySelectionOwner = frame; } -diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm -index fa78d12c9cbc8c3d0d3957afb98536d2a411e241..f13c49a59ba14eec2f1d345f2837f47dd62bc049 100644 ---- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm -+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm -@@ -495,6 +495,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect) - - void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled) - { -+ if (!event.nativeEvent()) -+ return; - [contentView() _didHandleKeyEvent:event.nativeEvent() eventWasHandled:eventWasHandled]; - } - diff --git a/Source/WebKit/UIProcess/mac/InspectorPlaywrightAgentClientMac.h b/Source/WebKit/UIProcess/mac/InspectorPlaywrightAgentClientMac.h new file mode 100644 index 0000000000000000000000000000000000000000..2aabc02a4b5432f68a6e85fd9689775608f05a67 @@ -19529,10 +19200,10 @@ index 0000000000000000000000000000000000000000..8adbd51bfecad2a273117588bf50f8f7 + +#endif diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.h b/Source/WebKit/UIProcess/mac/PageClientImplMac.h -index 48c64d82d9cb1274d4127b5b719a5a80d711c54c..5f27aafbb74af7b42aa7096b25e388bce43dec24 100644 +index 6d9f836ed08eb488e40831e8c93cfe7201ebdd9a..02f75742b4d473b7854e3792c6665c8c93d5687d 100644 --- a/Source/WebKit/UIProcess/mac/PageClientImplMac.h +++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.h -@@ -58,6 +58,8 @@ class PageClientImpl final : public PageClientImplCocoa +@@ -60,6 +60,8 @@ class PageClientImpl final : public PageClientImplCocoa WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(PageClientImpl); #endif public: @@ -19541,7 +19212,7 @@ index 48c64d82d9cb1274d4127b5b719a5a80d711c54c..5f27aafbb74af7b42aa7096b25e388bc PageClientImpl(NSView *, WKWebView *); virtual ~PageClientImpl(); -@@ -174,6 +176,9 @@ private: +@@ -175,6 +177,9 @@ private: void updateAcceleratedCompositingMode(const LayerTreeContext&) override; void didFirstLayerFlush(const LayerTreeContext&) override; @@ -19551,7 +19222,7 @@ index 48c64d82d9cb1274d4127b5b719a5a80d711c54c..5f27aafbb74af7b42aa7096b25e388bc RefPtr takeViewSnapshot(std::optional&&) override; RefPtr takeViewSnapshot(std::optional&&, ForceSoftwareCapturingViewportSnapshot) override; void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override; -@@ -229,6 +234,10 @@ private: +@@ -230,6 +235,10 @@ private: void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override; #endif @@ -19563,7 +19234,7 @@ index 48c64d82d9cb1274d4127b5b719a5a80d711c54c..5f27aafbb74af7b42aa7096b25e388bc void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&) override; void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&) override; diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm -index 8af5332c0d74f1b6e057c142f830cfae4274c81a..e452dfa8ba0bf97770f091f1f69d6dc01ac03358 100644 +index 5f6008cd5d0bd76c7d3731a36f9d3605710c7c19..eac8caf9b5cd8ff2cdd41dd84a07413bab7badc3 100644 --- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm +++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm @@ -110,6 +110,13 @@ namespace WebKit { @@ -19620,7 +19291,7 @@ index 8af5332c0d74f1b6e057c142f830cfae4274c81a..e452dfa8ba0bf97770f091f1f69d6dc0 } void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip) -@@ -482,6 +499,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect) +@@ -478,6 +495,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect) void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled) { @@ -19629,7 +19300,7 @@ index 8af5332c0d74f1b6e057c142f830cfae4274c81a..e452dfa8ba0bf97770f091f1f69d6dc0 m_impl->doneWithKeyEvent(event.nativeEvent(), eventWasHandled); } -@@ -501,6 +520,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl +@@ -497,6 +516,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl RefPtr PageClientImpl::createPopupMenuProxy(WebPageProxy& page) { @@ -19638,7 +19309,7 @@ index 8af5332c0d74f1b6e057c142f830cfae4274c81a..e452dfa8ba0bf97770f091f1f69d6dc0 return WebPopupMenuProxyMac::create(m_view, page.popupMenuClient()); } -@@ -642,6 +663,12 @@ CALayer *PageClientImpl::footerBannerLayer() const +@@ -638,6 +659,12 @@ CALayer *PageClientImpl::footerBannerLayer() const return m_impl->footerBannerLayer(); } @@ -19651,7 +19322,7 @@ index 8af5332c0d74f1b6e057c142f830cfae4274c81a..e452dfa8ba0bf97770f091f1f69d6dc0 RefPtr PageClientImpl::takeViewSnapshot(std::optional&&) { return m_impl->takeViewSnapshot(); -@@ -837,6 +864,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR +@@ -833,6 +860,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR #endif // ENABLE(FULLSCREEN_API) @@ -19665,7 +19336,7 @@ index 8af5332c0d74f1b6e057c142f830cfae4274c81a..e452dfa8ba0bf97770f091f1f69d6dc0 void PageClientImpl::navigationGestureDidBegin() { m_impl->dismissContentRelativeChildWindowsWithAnimation(true); -@@ -1020,6 +1054,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c +@@ -1016,6 +1050,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c bool PageClientImpl::windowIsFrontWindowUnderMouse(const NativeWebMouseEvent& event) { @@ -19676,7 +19347,7 @@ index 8af5332c0d74f1b6e057c142f830cfae4274c81a..e452dfa8ba0bf97770f091f1f69d6dc0 } diff --git a/Source/WebKit/UIProcess/mac/SecItemShimProxy.messages.in b/Source/WebKit/UIProcess/mac/SecItemShimProxy.messages.in -index 21c925bafb662dbe961baaad7f25bf4296236d76..5496a33c558a00a5ba96d10223e600aa38de99c4 100644 +index 5ddabc8529a1d7c8121d834289aa0e70a5dcd7d7..0bec72101447def53facd42881358e4cb34b656e 100644 --- a/Source/WebKit/UIProcess/mac/SecItemShimProxy.messages.in +++ b/Source/WebKit/UIProcess/mac/SecItemShimProxy.messages.in @@ -20,11 +20,11 @@ @@ -19684,7 +19355,7 @@ index 21c925bafb662dbe961baaad7f25bf4296236d76..5496a33c558a00a5ba96d10223e600aa # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#if ENABLE(SEC_ITEM_SHIM) - messages -> SecItemShimProxy NotRefCounted { + messages -> SecItemShimProxy { -#if ENABLE(SEC_ITEM_SHIM) SecItemRequestSync(WebKit::SecItemRequestData request) -> (std::optional response) Synchronous @@ -19706,10 +19377,10 @@ index e34faa8ae2933154efdbf0492a2f17af7a46f83b..54b509837bb767ac3ab28d1d7059462c bool showAfterPostProcessingContextData(); diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm -index fa0104e2bf2d81e0c1d9a4f4765033dd84cc94db..a073c9203099f024dad99156582a20996065d019 100644 +index 590e689455e912c35642b9fbafa6cd9a34041eac..27ff44679509d9e82fb4ad556ace0cf7368206e4 100644 --- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm +++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm -@@ -504,6 +504,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler takeViewSnapshot(ForceSoftwareCapturingViewportSnapshot); void saveBackForwardSnapshotForCurrentItem(); diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.mm b/Source/WebKit/UIProcess/mac/WebViewImpl.mm -index 5775c9c17409f13c967b0fdb2030e4bb65982c50..35f3e6bcd38f93066c5d54e906431ae1ba23fa9f 100644 +index 926d93ba3cab0bec3396dc044921e2337a331836..3857bfd5d010ce1ee443f10f96730f084f38984e 100644 --- a/Source/WebKit/UIProcess/mac/WebViewImpl.mm +++ b/Source/WebKit/UIProcess/mac/WebViewImpl.mm -@@ -2416,6 +2416,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace() +@@ -2390,6 +2390,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace() if (!m_colorSpace) m_colorSpace = [NSColorSpace sRGBColorSpace]; } @@ -19943,8 +19614,8 @@ index 5775c9c17409f13c967b0fdb2030e4bb65982c50..35f3e6bcd38f93066c5d54e906431ae1 ASSERT(m_colorSpace); return WebCore::DestinationColorSpace { [m_colorSpace CGColorSpace] }; -@@ -4554,6 +4559,17 @@ static RetainPtr takeWindowSnapshot(CGSWindowID windowID, bool captu - return adoptCF(WebCore::cgWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, windowID, imageOptions)); +@@ -4528,6 +4533,17 @@ static RetainPtr takeWindowSnapshot(CGSWindowID windowID, bool captu + return WebCore::cgWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, windowID, imageOptions); } +// Paywright begin @@ -19963,10 +19634,10 @@ index 5775c9c17409f13c967b0fdb2030e4bb65982c50..35f3e6bcd38f93066c5d54e906431ae1 return takeViewSnapshot(ForceSoftwareCapturingViewportSnapshot::No); diff --git a/Source/WebKit/UIProcess/win/InspectorPlaywrightAgentClientWin.cpp b/Source/WebKit/UIProcess/win/InspectorPlaywrightAgentClientWin.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..dd7fe0604188bb025f361f1c44685e38bbf935ca +index 0000000000000000000000000000000000000000..4f54a9445e5a7ecdb750c5c521da4f397776e633 --- /dev/null +++ b/Source/WebKit/UIProcess/win/InspectorPlaywrightAgentClientWin.cpp -@@ -0,0 +1,90 @@ +@@ -0,0 +1,89 @@ +/* + * Copyright (C) 2020 Microsoft Corporation. + * @@ -20046,7 +19717,6 @@ index 0000000000000000000000000000000000000000..dd7fe0604188bb025f361f1c44685e38 + WebCore::CurlProxySettings settings(WTFMove(proxyURL), String(proxyBypassList)); + browserContext->dataStore->setNetworkProxySettings(WTFMove(settings)); + } -+ PAL::SessionID sessionID = browserContext->dataStore->sessionID(); + return browserContext; +} + @@ -20319,7 +19989,7 @@ index 0000000000000000000000000000000000000000..8b474c730139b44a13c9d5b2d13ee204 + +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/win/WebView.cpp b/Source/WebKit/UIProcess/win/WebView.cpp -index 2946296119ea0f551f02d37c41a8e5cec5b74249..68501ee0817ce21f48300a74f05726882630b23c 100644 +index 8b521de62266d4a7fad3624b548401a4c8056f9f..c6da98e334fbd090a8c63b690afb25697ac344d7 100644 --- a/Source/WebKit/UIProcess/win/WebView.cpp +++ b/Source/WebKit/UIProcess/win/WebView.cpp @@ -556,9 +556,8 @@ LRESULT WebView::onSizeEvent(HWND hwnd, UINT, WPARAM, LPARAM lParam, bool& handl @@ -20736,18 +20406,6 @@ index 0000000000000000000000000000000000000000..a7d88f8c745f95af21db71dcfce368ba +} + +} // namespace WebKit -diff --git a/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp b/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp -index 33c5c1918e7496f08166a168e9ba6b091515e547..bdc4976cb290ff608c6bcae37a2ec2addd59b221 100644 ---- a/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp -+++ b/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp -@@ -31,6 +31,7 @@ - #include "PageClientImpl.h" - #include "UserMessage.h" - #include "WebProcessProxy.h" -+#include - #include - - #if USE(ATK) diff --git a/Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp b/Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp index 9b688ad328317fea4fd96ce66e9714bad8f0f937..402a36a9c565e13ec298aa7f014f0d9208ebddb7 100644 --- a/Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp @@ -20763,23 +20421,11 @@ index 9b688ad328317fea4fd96ce66e9714bad8f0f937..402a36a9c565e13ec298aa7f014f0d92 } } // namespace WebKit -diff --git a/Source/WebKit/WPEPlatform/CMakeLists.txt b/Source/WebKit/WPEPlatform/CMakeLists.txt -index 2b64d1b5b013d53b18b7757fe3b3f3d9a0501571..e8f28808f5ef0532319a4462fd285c0770d7ce52 100644 ---- a/Source/WebKit/WPEPlatform/CMakeLists.txt -+++ b/Source/WebKit/WPEPlatform/CMakeLists.txt -@@ -96,6 +96,7 @@ set(WPEPlatform_SYSTEM_INCLUDE_DIRECTORIES - - set(WPEPlatform_LIBRARIES - Epoxy::Epoxy -+ rt - WTF - ${GLIB_GIO_LIBRARIES} - ${GLIB_GOBJECT_LIBRARIES} diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj -index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e5171783467 100644 +index cf7270a1be953c9ceea9b62e3c0c1d4b60e3ad42..2500ac12bcfb21dd8f2a4371fd5e9ae76ffc6613 100644 --- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj +++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj -@@ -1585,6 +1585,7 @@ +@@ -1577,6 +1577,7 @@ 5CABDC8722C40FED001EDE8E /* APIMessageListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CABDC8322C40FA7001EDE8E /* APIMessageListener.h */; }; 5CADDE05215046BD0067D309 /* WKWebProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C74300E21500492004BFA17 /* WKWebProcess.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5CAECB6627465AE400AB78D0 /* UnifiedSource115.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CAECB5E27465AE300AB78D0 /* UnifiedSource115.cpp */; }; @@ -20787,7 +20433,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 5CAF7AA726F93AB00003F19E /* adattributiond.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CAF7AA526F93A950003F19E /* adattributiond.cpp */; }; 5CAFDE452130846300B1F7E1 /* _WKInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CAFDE422130843500B1F7E1 /* _WKInspector.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5CAFDE472130846A00B1F7E1 /* _WKInspectorInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CAFDE442130843600B1F7E1 /* _WKInspectorInternal.h */; }; -@@ -2407,6 +2408,18 @@ +@@ -2388,6 +2389,18 @@ DF0C5F28252ECB8E00D921DB /* WKDownload.h in Headers */ = {isa = PBXBuildFile; fileRef = DF0C5F24252ECB8D00D921DB /* WKDownload.h */; settings = {ATTRIBUTES = (Public, ); }; }; DF0C5F2A252ECB8E00D921DB /* WKDownloadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF0C5F26252ECB8E00D921DB /* WKDownloadDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; DF0C5F2B252ED44000D921DB /* WKDownloadInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DF0C5F25252ECB8E00D921DB /* WKDownloadInternal.h */; }; @@ -20806,7 +20452,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 DF462E0F23F22F5500EFF35F /* WKHTTPCookieStorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF462E0E23F22F5300EFF35F /* WKHTTPCookieStorePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; DF462E1223F338BE00EFF35F /* WKContentWorldPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF462E1123F338AD00EFF35F /* WKContentWorldPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; DF7A231C291B088D00B98DF3 /* WKSnapshotConfigurationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF7A231B291B088D00B98DF3 /* WKSnapshotConfigurationPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; -@@ -2500,6 +2513,8 @@ +@@ -2481,6 +2494,8 @@ E5BEF6822130C48000F31111 /* WebDataListSuggestionsDropdownIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = E5BEF6802130C47F00F31111 /* WebDataListSuggestionsDropdownIOS.h */; }; E5CB07DC20E1678F0022C183 /* WKFormColorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E5CB07DA20E1678F0022C183 /* WKFormColorControl.h */; }; E5CBA76427A318E100DF7858 /* UnifiedSource120.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5CBA75F27A3187800DF7858 /* UnifiedSource120.cpp */; }; @@ -20815,7 +20461,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 E5CBA76527A318E100DF7858 /* UnifiedSource118.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5CBA76127A3187900DF7858 /* UnifiedSource118.cpp */; }; E5CBA76627A318E100DF7858 /* UnifiedSource116.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5CBA76327A3187B00DF7858 /* UnifiedSource116.cpp */; }; E5CBA76727A318E100DF7858 /* UnifiedSource119.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5CBA76027A3187900DF7858 /* UnifiedSource119.cpp */; }; -@@ -2523,6 +2538,9 @@ +@@ -2504,6 +2519,9 @@ EBA8D3B727A5E33F00CB7900 /* PushServiceConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = EBA8D3B127A5E33F00CB7900 /* PushServiceConnection.mm */; }; EBDF51D12C8FBC4700EA1376 /* WebsitePushAndNotificationsEnabledPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = EBDF51CF2C8FBC4700EA1376 /* WebsitePushAndNotificationsEnabledPolicy.h */; }; ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -20824,7 +20470,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 + F3867F0A24607D4E008F0F31 /* InspectorScreencastAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F3867F0424607D2B008F0F31 /* InspectorScreencastAgent.h */; }; F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */; settings = {ATTRIBUTES = (Private, ); }; }; F40C3B712AB401C5007A3567 /* WKDatePickerPopoverController.h in Headers */ = {isa = PBXBuildFile; fileRef = F40C3B6F2AB40167007A3567 /* WKDatePickerPopoverController.h */; }; - F416F1C02C5C3E360085D8DD /* WKScrollViewTrackingTapGestureRecognizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F416F1BE2C5C3E360085D8DD /* WKScrollViewTrackingTapGestureRecognizer.h */; }; + F41145682CD939E0004CDBD1 /* _WKTouchEventGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = F41145652CD939E0004CDBD1 /* _WKTouchEventGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -6282,6 +6300,7 @@ 5CABDC8522C40FCC001EDE8E /* WKMessageListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMessageListener.h; sourceTree = ""; }; 5CABE07A28F60E8A00D83FD9 /* WebPushMessage.serialization.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebPushMessage.serialization.in; sourceTree = ""; }; @@ -20833,7 +20479,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 5CAECB5E27465AE300AB78D0 /* UnifiedSource115.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource115.cpp; sourceTree = ""; }; 5CAF7AA426F93A750003F19E /* adattributiond */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = adattributiond; sourceTree = BUILT_PRODUCTS_DIR; }; 5CAF7AA526F93A950003F19E /* adattributiond.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = adattributiond.cpp; sourceTree = ""; }; -@@ -7969,6 +7988,19 @@ +@@ -7977,6 +7996,19 @@ DF0C5F24252ECB8D00D921DB /* WKDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownload.h; sourceTree = ""; }; DF0C5F25252ECB8E00D921DB /* WKDownloadInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownloadInternal.h; sourceTree = ""; }; DF0C5F26252ECB8E00D921DB /* WKDownloadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownloadDelegate.h; sourceTree = ""; }; @@ -20853,7 +20499,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 DF462E0E23F22F5300EFF35F /* WKHTTPCookieStorePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHTTPCookieStorePrivate.h; sourceTree = ""; }; DF462E1123F338AD00EFF35F /* WKContentWorldPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentWorldPrivate.h; sourceTree = ""; }; DF58C6311371AC5800F9A37C /* NativeWebWheelEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebWheelEvent.h; sourceTree = ""; }; -@@ -8129,6 +8161,8 @@ +@@ -8137,6 +8169,8 @@ E5CBA76127A3187900DF7858 /* UnifiedSource118.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource118.cpp; sourceTree = ""; }; E5CBA76227A3187900DF7858 /* UnifiedSource117.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource117.cpp; sourceTree = ""; }; E5CBA76327A3187B00DF7858 /* UnifiedSource116.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource116.cpp; sourceTree = ""; }; @@ -20862,7 +20508,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 E5DEFA6726F8F42600AB68DB /* PhotosUISPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotosUISPI.h; sourceTree = ""; }; EB0D312D275AE13300863D8F /* com.apple.webkit.webpushd.mac.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.webkit.webpushd.mac.plist; sourceTree = ""; }; EB0D312E275AE13300863D8F /* com.apple.webkit.webpushd.ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.webkit.webpushd.ios.plist; sourceTree = ""; }; -@@ -8162,6 +8196,14 @@ +@@ -8170,6 +8204,14 @@ ECA680D31E6904B500731D20 /* ExtraPrivateSymbolsForTAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtraPrivateSymbolsForTAPI.h; sourceTree = ""; }; ECBFC1DB1E6A4D66000300C7 /* ExtraPublicSymbolsForTAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtraPublicSymbolsForTAPI.h; sourceTree = ""; }; F036978715F4BF0500C3A80E /* WebColorPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPicker.cpp; sourceTree = ""; }; @@ -20877,7 +20523,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDragDestinationAction.h; sourceTree = ""; }; F40C3B6F2AB40167007A3567 /* WKDatePickerPopoverController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKDatePickerPopoverController.h; path = ios/forms/WKDatePickerPopoverController.h; sourceTree = ""; }; F40C3B702AB40167007A3567 /* WKDatePickerPopoverController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKDatePickerPopoverController.mm; path = ios/forms/WKDatePickerPopoverController.mm; sourceTree = ""; }; -@@ -8487,6 +8529,7 @@ +@@ -8503,6 +8545,7 @@ 3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */, 3766F9F1189A1254003CF19B /* libicucore.dylib in Frameworks */, 7B9FC5BB28A5233B007570E7 /* libWebKitPlatform.a in Frameworks */, @@ -20885,7 +20531,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */, 37694525184FC6B600CDE21F /* Security.framework in Frameworks */, 37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */, -@@ -11435,6 +11478,7 @@ +@@ -11507,6 +11550,7 @@ 99788ACA1F421DCA00C08000 /* _WKAutomationSessionConfiguration.mm */, 990D28A81C6404B000986977 /* _WKAutomationSessionDelegate.h */, 990D28AF1C65203900986977 /* _WKAutomationSessionInternal.h */, @@ -20893,7 +20539,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 5C4609E222430E4C009943C2 /* _WKContentRuleListAction.h */, 5C4609E322430E4D009943C2 /* _WKContentRuleListAction.mm */, 5C4609E422430E4D009943C2 /* _WKContentRuleListActionInternal.h */, -@@ -12785,6 +12829,7 @@ +@@ -12853,6 +12897,7 @@ E34B110C27C46BC6006D2F2E /* libWebCoreTestShim.dylib */, E34B110F27C46D09006D2F2E /* libWebCoreTestSupport.dylib */, DDE992F4278D06D900F60D26 /* libWebKitAdditions.a */, @@ -20901,7 +20547,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 57A9FF15252C6AEF006A2040 /* libWTF.a */, 5750F32A2032D4E500389347 /* LocalAuthentication.framework */, 570DAAB0230273D200E8FC04 /* NearField.framework */, -@@ -13359,6 +13404,12 @@ +@@ -13426,6 +13471,12 @@ children = ( 9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */, 9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */, @@ -20914,7 +20560,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 ); path = Agents; sourceTree = ""; -@@ -13367,6 +13418,7 @@ +@@ -13434,6 +13485,7 @@ isa = PBXGroup; children = ( A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorUIProxyMac.mm */, @@ -20922,7 +20568,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 1CA8B935127C774E00576C2B /* WebInspectorUIProxyMac.mm */, 99A7ACE326012919006D57FD /* WKInspectorResourceURLSchemeHandler.h */, 99A7ACE42601291A006D57FD /* WKInspectorResourceURLSchemeHandler.mm */, -@@ -14074,6 +14126,7 @@ +@@ -14151,6 +14203,7 @@ E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */, 46A2B6061E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.cpp */, 46A2B6071E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.h */, @@ -20930,7 +20576,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 5C6D69352AC3935D0099BDAF /* BrowsingContextGroup.cpp */, 5C6D69362AC3935D0099BDAF /* BrowsingContextGroup.h */, 5CA98549210BEB5A0057EB6B /* BrowsingWarning.h */, -@@ -14098,6 +14151,8 @@ +@@ -14175,6 +14228,8 @@ BC06F43912DBCCFB002D78DE /* GeolocationPermissionRequestProxy.cpp */, BC06F43812DBCCFB002D78DE /* GeolocationPermissionRequestProxy.h */, 2DD5A72A1EBF09A7009BA597 /* HiddenPageThrottlingAutoIncreasesCounter.h */, @@ -20939,7 +20585,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 5CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */, 5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */, 31607F3819627002009B87DA /* LegacySessionStateCoding.h */, -@@ -14131,6 +14186,7 @@ +@@ -14208,6 +14263,7 @@ 1A0C227D2451130A00ED614D /* QuickLookThumbnailingSoftLink.mm */, 1AEE57232409F142002005D6 /* QuickLookThumbnailLoader.h */, 1AEE57242409F142002005D6 /* QuickLookThumbnailLoader.mm */, @@ -20947,7 +20593,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 5CCB54DC2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.cpp */, 5CCB54DB2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.h */, 5C907E9A294D507100B3402D /* RemotePageProxy.cpp */, -@@ -14231,6 +14287,8 @@ +@@ -14308,6 +14364,8 @@ BC7B6204129A0A6700D174A4 /* WebPageGroup.h */, 2D9EA3101A96D9EB002D2807 /* WebPageInjectedBundleClient.cpp */, 2D9EA30E1A96CBFF002D2807 /* WebPageInjectedBundleClient.h */, @@ -20956,7 +20602,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 9B7F8A502C785725000057F3 /* WebPageLoadTiming.h */, BC111B0B112F5E4F00337BAB /* WebPageProxy.cpp */, BC032DCB10F4389F0058C15A /* WebPageProxy.h */, -@@ -14406,6 +14464,7 @@ +@@ -14486,6 +14544,7 @@ BC646C1911DD399F006455B0 /* WKBackForwardListItemRef.h */, BC646C1611DD399F006455B0 /* WKBackForwardListRef.cpp */, BC646C1711DD399F006455B0 /* WKBackForwardListRef.h */, @@ -20964,7 +20610,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 BCB9E24A1120E15C00A137E0 /* WKContext.cpp */, BCB9E2491120E15C00A137E0 /* WKContext.h */, 1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */, -@@ -14980,6 +15039,9 @@ +@@ -15060,6 +15119,9 @@ 07EF07592745A8160066EA04 /* DisplayCaptureSessionManager.h */, 07EF07582745A8160066EA04 /* DisplayCaptureSessionManager.mm */, 7AFA6F682A9F57C50055322A /* DisplayLinkMac.cpp */, @@ -20974,7 +20620,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 1AFDE65B1954E8D500C48FFA /* LegacySessionStateCoding.cpp */, 0FCB4E5818BBE3D9000FCFC9 /* PageClientImplMac.h */, 0FCB4E5918BBE3D9000FCFC9 /* PageClientImplMac.mm */, -@@ -15003,6 +15065,8 @@ +@@ -15083,6 +15145,8 @@ E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */, E55CD20124D09F1F0042DB9C /* WebDateTimePickerMac.h */, E55CD20224D09F1F0042DB9C /* WebDateTimePickerMac.mm */, @@ -20983,15 +20629,15 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */, BC5750951268F3C6006F0F12 /* WebPopupMenuProxyMac.h */, BC5750961268F3C6006F0F12 /* WebPopupMenuProxyMac.mm */, -@@ -16050,6 +16114,7 @@ +@@ -16142,6 +16206,7 @@ 99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */, 990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */, 990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */, + D71A944A2372290B002C4D9E /* _WKBrowserInspector.h in Headers */, 5C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */, 5C4609E8224317BB009943C2 /* _WKContentRuleListActionInternal.h in Headers */, - 1A5704F81BE01FF400874AF1 /* _WKContextMenuElementInfo.h in Headers */, -@@ -16355,6 +16420,7 @@ + 9B4CE9512CD99B7C00351173 /* _WKContentWorldConfiguration.h in Headers */, +@@ -16451,6 +16516,7 @@ E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */, 4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */, 1A5705111BE410E600874AF1 /* BlockSPI.h in Headers */, @@ -20999,7 +20645,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 5CA9854A210BEB640057EB6B /* BrowsingWarning.h in Headers */, A7E69BCC2B2117A100D43D3F /* BufferAndBackendInfo.h in Headers */, BC3065FA1259344E00E71278 /* CacheModel.h in Headers */, -@@ -16537,7 +16603,11 @@ +@@ -16634,7 +16700,11 @@ BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */, CE550E152283752200D28791 /* InsertTextOptions.h in Headers */, 9197940523DBC4BB00257892 /* InspectorBrowserAgent.h in Headers */, @@ -21011,7 +20657,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 A5E391FD2183C1F800C8FB31 /* InspectorTargetProxy.h in Headers */, C5BCE5DF1C50766A00CDE3FA /* InteractionInformationAtPosition.h in Headers */, 2D4D2C811DF60BF3002EB10C /* InteractionInformationRequest.h in Headers */, -@@ -16797,6 +16867,7 @@ +@@ -16894,6 +16964,7 @@ 0F6E7C532C4C386800F1DB85 /* RemoteDisplayListRecorderMessages.h in Headers */, F451C0FE2703B263002BA03B /* RemoteDisplayListRecorderProxy.h in Headers */, A78A5FE42B0EB39E005036D3 /* RemoteImageBufferSetIdentifier.h in Headers */, @@ -21019,7 +20665,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */, 2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */, 1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */, -@@ -16850,6 +16921,7 @@ +@@ -16947,6 +17018,7 @@ E1E552C516AE065F004ED653 /* SandboxInitializationParameters.h in Headers */, E36FF00327F36FBD004BE21A /* SandboxStateVariables.h in Headers */, 7BAB111025DD02B3008FC479 /* ScopedActiveMessageReceiveQueue.h in Headers */, @@ -21027,7 +20673,7 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 463BB93A2B9D08D80098C5C3 /* ScriptMessageHandlerIdentifier.h in Headers */, F4E28A362C923814008120DD /* ScriptTelemetry.h in Headers */, E4D54D0421F1D72D007E3C36 /* ScrollingTreeFrameScrollingNodeRemoteIOS.h in Headers */, -@@ -17203,6 +17275,8 @@ +@@ -17299,6 +17371,8 @@ 939EF87029D112EE00F23AEE /* WebPageInlines.h in Headers */, 9197940823DBC4CB00257892 /* WebPageInspectorAgentBase.h in Headers */, A513F5402154A5D700662841 /* WebPageInspectorController.h in Headers */, @@ -21036,29 +20682,64 @@ index 9c88c517a12bbf6f81717d698754ddd2e93c0147..07c80602d45db2139cf7c2d651212e51 A543E30C215C8A8D00279CD9 /* WebPageInspectorTarget.h in Headers */, A543E30D215C8A9000279CD9 /* WebPageInspectorTargetController.h in Headers */, A543E307215AD13700279CD9 /* WebPageInspectorTargetFrontendChannel.h in Headers */, -@@ -19623,6 +19697,8 @@ +@@ -19739,7 +19813,43 @@ 522F792928D50EBB0069B45B /* HidService.mm in Sources */, 2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */, 2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */, + D7EB04E72372A73B00F744CE /* InspectorPlaywrightAgentClientMac.mm in Sources */, + D79902B2236E9404005D6F7E /* InspectorTargetProxyMac.mm in Sources */, - 1CC94E532AC92F190045F269 /* JSWebExtensionAPIAction.mm in Sources */, - 1C2B4D4B2A819D0D00C528A1 /* JSWebExtensionAPIAlarms.mm in Sources */, - 1C8ECFEA2AFC7DCB007BAA62 /* JSWebExtensionAPICommands.mm in Sources */, -@@ -20069,6 +20145,8 @@ - E3816B3D27E2463A005EAFC0 /* WebMockContentFilterManager.cpp in Sources */, - 31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */, - 2DF6FE52212E110900469030 /* WebPage.cpp in Sources */, ++ 1CC94E532AC92F190045F269 /* JSWebExtensionAPIAction.mm in Sources */, ++ 1C2B4D4B2A819D0D00C528A1 /* JSWebExtensionAPIAlarms.mm in Sources */, ++ 1C8ECFEA2AFC7DCB007BAA62 /* JSWebExtensionAPICommands.mm in Sources */, ++ 1C40052C2B2B953D00F2D9EE /* JSWebExtensionAPICookies.mm in Sources */, ++ 331102402B17B99800B21C8C /* JSWebExtensionAPIDeclarativeNetRequest.mm in Sources */, ++ 1C517F452B74393C00C46EDC /* JSWebExtensionAPIDevTools.mm in Sources */, ++ 1C517F432B74393C00C46EDC /* JSWebExtensionAPIDevToolsExtensionPanel.mm in Sources */, ++ 1C517F472B74393C00C46EDC /* JSWebExtensionAPIDevToolsInspectedWindow.mm in Sources */, ++ 1C517F462B74393C00C46EDC /* JSWebExtensionAPIDevToolsNetwork.mm in Sources */, ++ 1C517F412B74393C00C46EDC /* JSWebExtensionAPIDevToolsPanels.mm in Sources */, ++ B6114A7F29394A1600380B1B /* JSWebExtensionAPIEvent.mm in Sources */, ++ 1C5DC471290B33A20061EC62 /* JSWebExtensionAPIExtension.mm in Sources */, ++ B6CCAAB929A445E90092E846 /* JSWebExtensionAPILocalization.mm in Sources */, ++ 1CCEE4532B0989FC0034E059 /* JSWebExtensionAPIMenus.mm in Sources */, ++ 1C5DC4552908AC900061EC62 /* JSWebExtensionAPINamespace.mm in Sources */, ++ 1C386F362AF409F9004108F0 /* JSWebExtensionAPINotifications.mm in Sources */, ++ B61AFA4929510D0F008220B1 /* JSWebExtensionAPIPermissions.mm in Sources */, ++ 1C9A15CF2ABDF1E2002CC12A /* JSWebExtensionAPIPort.mm in Sources */, ++ 1C5DC472290B33A60061EC62 /* JSWebExtensionAPIRuntime.mm in Sources */, ++ B63E9A6F2AAF2B2D005F4561 /* JSWebExtensionAPIScripting.mm in Sources */, ++ 029D6BB22C407AA30068CF99 /* JSWebExtensionAPISidebarAction.mm in Sources */, ++ 029D6BB12C407AA30068CF99 /* JSWebExtensionAPISidePanel.mm in Sources */, ++ B63C10342B51C0B6004A69B8 /* JSWebExtensionAPIStorage.mm in Sources */, ++ B63C10372B51C102004A69B8 /* JSWebExtensionAPIStorageArea.mm in Sources */, ++ 1C5ACFAB2A96F8D500C041C0 /* JSWebExtensionAPITabs.mm in Sources */, ++ 1C15497F2926C073001B9E5B /* JSWebExtensionAPITest.mm in Sources */, + 1C0F05BE2CFA5D2E007D1F62 /* JSWebExtensionAPIUnified.mm in Sources */, ++ 3375A3772942A19D0028536D /* JSWebExtensionAPIWebNavigation.mm in Sources */, ++ 33F68338293FF6F5005C63C0 /* JSWebExtensionAPIWebNavigationEvent.mm in Sources */, ++ B63A99772B7EA002004611FD /* JSWebExtensionAPIWebPageNamespace.mm in Sources */, ++ B63A99782B7EA002004611FD /* JSWebExtensionAPIWebPageRuntime.mm in Sources */, ++ 3399E1532B59EFD7008BFB60 /* JSWebExtensionAPIWebRequest.mm in Sources */, ++ 337042022B58A0B70077FF78 /* JSWebExtensionAPIWebRequestEvent.mm in Sources */, ++ 1C5ACFA62A96F8C400C041C0 /* JSWebExtensionAPIWindows.mm in Sources */, ++ 1C5ACFA72A96F8C400C041C0 /* JSWebExtensionAPIWindowsEvent.mm in Sources */, + 1C5DC45F2909B05A0061EC62 /* JSWebExtensionWrapperCocoa.mm in Sources */, + C14D37FE24ACE086007FF014 /* LaunchServicesDatabaseManager.mm in Sources */, + C1710CF724AA643200D7C112 /* LaunchServicesDatabaseObserver.mm in Sources */, +@@ -20162,6 +20272,8 @@ + 074E87E12CF8EA3D0059E469 /* WebPage+NavigationDeciding.swift in Sources */, + 078B04A02CF18EAB00B453A6 /* WebPage+NavigationPreferences.swift in Sources */, + 07CB79962CE9435700199C49 /* WebPage.swift in Sources */, + D79902B1236E9404005D6F7E /* WebPageInspectorEmulationAgentMac.mm in Sources */, + D79902B3236E9404005D6F7E /* WebPageInspectorInputAgentMac.mm in Sources */, C0CE72A01247E71D00BC0EC4 /* WebPageMessageReceiver.cpp in Sources */, BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */, C0CE72A01B47E71D00BC0EC4 /* WebPageTestingMessageReceiver.cpp in Sources */, diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp -index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d9143afd03a 100644 +index cd28fa2f67ccd957ae04d59a86506f1c83659112..e66d60a8bf55b96c16a5582cd19939f3baa80a97 100644 --- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp +++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp -@@ -236,6 +236,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou +@@ -245,6 +245,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou } #endif @@ -21070,7 +20751,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 #if ENABLE(PDFJS) if (tryLoadingUsingPDFJSHandler(resourceLoader, trackingParameters)) return; -@@ -245,12 +250,16 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou +@@ -254,12 +259,16 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou return; if (InspectorInstrumentationWebKit::shouldInterceptRequest(resourceLoader)) { @@ -21093,7 +20774,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 } WEBLOADERSTRATEGY_RELEASE_LOG("scheduleLoad: URL will be scheduled with the NetworkProcess"); -@@ -369,7 +378,8 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadPara +@@ -379,7 +388,8 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadPara parameters.linkPreconnectEarlyHintsEnabled = mainFrame->settings().linkPreconnectEarlyHintsEnabled(); } @@ -21103,7 +20784,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 { auto identifier = *resourceLoader.identifier(); -@@ -384,7 +394,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL +@@ -394,7 +404,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL RunLoop::main().dispatch([resourceLoader = Ref { resourceLoader }, error = blockedError(request)] { resourceLoader->didFail(error); }); @@ -21112,7 +20793,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 } } -@@ -394,7 +404,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL +@@ -404,7 +414,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be scheduled with the NetworkProcess with priority %d, storedCredentialsPolicy %i", resourceLoader.url().string().latin1().data(), static_cast(resourceLoader.request().priority()), (int)storedCredentialsPolicy); @@ -21120,7 +20801,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 loadParameters.identifier = identifier; loadParameters.webPageProxyID = trackingParameters.webPageProxyID; loadParameters.webPageID = trackingParameters.pageID; -@@ -484,14 +493,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL +@@ -494,14 +503,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL if (loadParameters.options.mode != FetchOptions::Mode::Navigate) { ASSERT(loadParameters.sourceOrigin); @@ -21138,7 +20819,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 loadParameters.isMainFrameNavigation = isMainFrameNavigation; if (loadParameters.isMainFrameNavigation && document) -@@ -532,6 +538,17 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL +@@ -542,6 +548,17 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL } ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials); @@ -21156,7 +20837,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 std::optional existingNetworkResourceLoadIdentifierToResume; if (loadParameters.isMainFrameNavigation) -@@ -547,7 +564,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL +@@ -557,7 +574,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL } auto loader = WebResourceLoader::create(resourceLoader, trackingParameters); @@ -21165,7 +20846,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 } void WebLoaderStrategy::scheduleInternallyFailedLoad(WebCore::ResourceLoader& resourceLoader) -@@ -957,7 +974,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier +@@ -967,7 +984,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier bool WebLoaderStrategy::isOnLine() const { @@ -21174,7 +20855,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 } void WebLoaderStrategy::addOnlineStateChangeListener(Function&& listener) -@@ -984,6 +1001,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet +@@ -994,6 +1011,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet void WebLoaderStrategy::setOnLineState(bool isOnLine) { @@ -21186,7 +20867,7 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 if (m_isOnLine == isOnLine) return; -@@ -992,6 +1014,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine) +@@ -1002,6 +1024,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine) listener(isOnLine); } @@ -21200,18 +20881,18 @@ index d2b9d07144dab5d57cf91942d55a2b140a802d7f..4ad2d136a352af588c2c3efa8e470d91 { WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::SetCaptureExtraNetworkLoadMetricsEnabled(enabled), 0); diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h -index 1a106f701e2756b5b5e19f828f97a7c0b838ae19..3ccc019ea234c414129f6c1209574f3b0387aa9f 100644 +index a835521fae8043c1c3d6202288b0c3a9f92aa81b..0c8bee6c0a02e6adb1b9e56d77613253111fffd2 100644 --- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h +++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h -@@ -43,6 +43,7 @@ struct FetchOptions; +@@ -44,6 +44,7 @@ struct FetchOptions; namespace WebKit { class NetworkProcessConnection; +class NetworkResourceLoadParameters; class WebFrame; class WebPage; - class WebURLSchemeTaskProxy; -@@ -91,6 +92,9 @@ public: + class WebProcess; +@@ -96,6 +97,9 @@ public: bool isOnLine() const final; void addOnlineStateChangeListener(Function&&) final; void setOnLineState(bool); @@ -21221,7 +20902,7 @@ index 1a106f701e2756b5b5e19f828f97a7c0b838ae19..3ccc019ea234c414129f6c1209574f3b void setExistingNetworkResourceLoadIdentifierToResume(std::optional existingNetworkResourceLoadIdentifierToResume) { m_existingNetworkResourceLoadIdentifierToResume = existingNetworkResourceLoadIdentifierToResume; } -@@ -143,6 +147,7 @@ private: +@@ -149,6 +153,7 @@ private: Vector> m_onlineStateChangeListeners; std::optional m_existingNetworkResourceLoadIdentifierToResume; bool m_isOnLine { true }; @@ -21230,10 +20911,10 @@ index 1a106f701e2756b5b5e19f828f97a7c0b838ae19..3ccc019ea234c414129f6c1209574f3b } // namespace WebKit diff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp -index c28454bdba0426c66f1f24c854761b2ddd0354a0..ee73825ca10881ebd8099af5382b7cb5c7efc882 100644 +index 752ac70125786e40d4976059f2f9c55982e746d7..adcbfb36714703e202f7e11a9113a2df03e399dc 100644 --- a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp +++ b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp -@@ -189,9 +189,6 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR +@@ -188,9 +188,6 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR } m_coreLoader->didReceiveResponse(inspectorResponse, [this, protectedThis = WTFMove(protectedThis), interceptedRequestIdentifier, policyDecisionCompletionHandler = WTFMove(policyDecisionCompletionHandler), overrideData = WTFMove(overrideData)]() mutable { @@ -21243,7 +20924,7 @@ index c28454bdba0426c66f1f24c854761b2ddd0354a0..ee73825ca10881ebd8099af5382b7cb5 if (!m_coreLoader || !m_coreLoader->identifier()) { m_interceptController.continueResponse(interceptedRequestIdentifier); return; -@@ -209,6 +206,8 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR +@@ -208,6 +205,8 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR } }); }); @@ -21252,24 +20933,11 @@ index c28454bdba0426c66f1f24c854761b2ddd0354a0..ee73825ca10881ebd8099af5382b7cb5 return; } -diff --git a/Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp b/Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp -index e314c2987e348a0abee8b655caff3a1c3b3c4564..882746d581bd8db6f2fad5944f09ee9fe9e0e55b 100644 ---- a/Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp -+++ b/Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp -@@ -85,7 +85,7 @@ void NotificationPermissionRequestManager::startRequest(const SecurityOriginData - - m_page->sendWithAsyncReply(Messages::WebPageProxy::RequestNotificationPermission(securityOrigin.toString()), [this, protectedThis = Ref { *this }, securityOrigin, permissionHandler = WTFMove(permissionHandler)](bool allowed) mutable { - -- auto innerPermissionHandler = [this, protectedThis = Ref { *this }, securityOrigin, permissionHandler = WTFMove(permissionHandler)] (bool allowed) mutable { -+ auto innerPermissionHandler = [this, protectedThis, securityOrigin, permissionHandler = WTFMove(permissionHandler)] (bool allowed) mutable { - WebProcess::singleton().supplement()->didUpdateNotificationDecision(securityOrigin.toString(), allowed); - - auto permissionHandlers = m_requestsPerOrigin.take(securityOrigin); diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp -index 39cd00b233c10fc167feed68802b9930bf88e7ca..0e1cd22bdebf9d57074d264104843ca76e820b98 100644 +index b2f4f1e2978f3bcd72a2c7af6705028af47e9300..f334bfa826c49ee7bc09a9042329dbe27479b27c 100644 --- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp +++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp -@@ -476,6 +476,8 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev +@@ -481,6 +481,8 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev { // Notify the bundle client. auto page = protectedPage(); @@ -21279,20 +20947,10 @@ index 39cd00b233c10fc167feed68802b9930bf88e7ca..0e1cd22bdebf9d57074d264104843ca7 } diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp -index dd03326b1ad54e1d363d722cfe86bb779fbeead1..71ab72cdff9870dbf9fc017e8e61ab73e1437262 100644 +index dd03326b1ad54e1d363d722cfe86bb779fbeead1..f54d631dc4034c995cbd74ec6b545c3c7dd25990 100644 --- a/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp +++ b/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp -@@ -30,6 +30,9 @@ - - #include "WebPage.h" - #include -+#include -+#include -+#include - - namespace WebKit { - using namespace WebCore; -@@ -53,7 +56,7 @@ OptionSet WebDragClient::dragSourceActionMaskForPoint(const In +@@ -53,7 +53,7 @@ OptionSet WebDragClient::dragSourceActionMaskForPoint(const In return m_page->allowedDragSourceActions(); } @@ -21301,30 +20959,11 @@ index dd03326b1ad54e1d363d722cfe86bb779fbeead1..71ab72cdff9870dbf9fc017e8e61ab73 void WebDragClient::startDrag(DragItem, DataTransfer&, Frame&) { } -diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp -index 698a9701706dc8d6772f6565ae39c454fe8bf641..cafbb07349e175f786e3450a2132683e80273217 100644 ---- a/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp -+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp -@@ -1581,14 +1581,6 @@ void WebLocalFrameLoaderClient::transitionToCommittedForNewPage(InitializingIfra - - if (initializingIframe == InitializingIframe::No) - webPage->scheduleFullEditorStateUpdate(); -- --#if USE(COORDINATED_GRAPHICS) -- if (shouldUseFixedLayout) { -- view->setDelegatedScrollingMode(shouldUseFixedLayout ? DelegatedScrollingMode::DelegatedToNativeScrollView : DelegatedScrollingMode::NotDelegated); -- view->setPaintsEntireContents(shouldUseFixedLayout); -- return; -- } --#endif - } - - void WebLocalFrameLoaderClient::didRestoreFromBackForwardCache() diff --git a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm -index 69b851554679018aefe2c22b79671f7796d9e8b8..50e985ded3cdc9aaa5f30f7776c29cbc23c2b2b8 100644 +index 2713e431893efd17c95d163f14aec45b27e0d6fc..b96b1d9cba20af611837915412fa4202667e800d 100644 --- a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm +++ b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm -@@ -129,7 +129,8 @@ static WebCore::CachedImage* cachedImage(Element& element) +@@ -128,7 +128,8 @@ static WebCore::CachedImage* cachedImage(Element& element) void WebDragClient::declareAndWriteDragImage(const String& pasteboardName, Element& element, const URL& url, const String& label, LocalFrame*) { @@ -21461,7 +21100,7 @@ index 0000000000000000000000000000000000000000..226b3bf6bd83d2606a0aeb627ae9302f + +#endif // ENABLE(DRAG_SUPPORT) diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp -index 3faeacda3c578ef2fd86e4a04b09315017dc47f1..174c8d565a00a519e12510c77fff4cfb63cc7a8a 100644 +index ac4b96234c1c2a32dbeae20431c83152dcede91c..6a3c70a9fd2d2f4f413f0e3e925280fb261c4d2c 100644 --- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp +++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp @@ -39,6 +39,7 @@ @@ -21472,24 +21111,7 @@ index 3faeacda3c578ef2fd86e4a04b09315017dc47f1..174c8d565a00a519e12510c77fff4cfb #include #include #include -@@ -103,6 +104,16 @@ void DrawingAreaCoordinatedGraphics::scroll(const IntRect& scrollRect, const Int - ASSERT(m_scrollRect.isEmpty()); - ASSERT(m_scrollOffset.isEmpty()); - ASSERT(m_dirtyRegion.isEmpty()); -+// Playwright begin -+#if !PLATFORM(WIN) -+ if (m_webPage->mainFrameView() && m_webPage->mainFrameView()->useFixedLayout()) { -+ IntRect visibleRect = IntRect(m_layerTreeHost->viewportController().visibleContentsRect()); -+ visibleRect.move(-scrollDelta.width(), -scrollDelta.height()); -+ m_layerTreeHost->scrollNonCompositedContents(visibleRect); -+ return; -+ } -+#endif -+// Playwright end - m_layerTreeHost->scrollNonCompositedContents(scrollRect); - return; - } -@@ -566,6 +577,11 @@ void DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode(GraphicsLay +@@ -557,6 +558,11 @@ void DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode(GraphicsLay m_scrollOffset = IntSize(); m_displayTimer.stop(); m_isWaitingForDidUpdate = false; @@ -21501,7 +21123,7 @@ index 3faeacda3c578ef2fd86e4a04b09315017dc47f1..174c8d565a00a519e12510c77fff4cfb } void DrawingAreaCoordinatedGraphics::sendEnterAcceleratedCompositingModeIfNeeded() -@@ -623,6 +639,11 @@ void DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode() +@@ -614,6 +620,11 @@ void DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode() // UI process, we still need to let it know about the new contents, so send an Update message. send(Messages::DrawingAreaProxy::Update(0, WTFMove(updateInfo))); } @@ -21513,58 +21135,20 @@ index 3faeacda3c578ef2fd86e4a04b09315017dc47f1..174c8d565a00a519e12510c77fff4cfb } void DrawingAreaCoordinatedGraphics::scheduleDisplay() -diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp -index cc48ff93f937051121c38776e3c5c74ed6d70e8a..722dbdb4a881404f00a7e65e3e092f4873bde093 100644 ---- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp -+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp -@@ -205,8 +205,16 @@ void LayerTreeHost::scrollNonCompositedContents(const IntRect& rect) - m_scrolledSinceLastFrame = true; - - auto* frameView = m_webPage.localMainFrameView(); -+ -+// Playwright begin -+#if PLATFORM(WIN) - if (!frameView || !frameView->delegatesScrolling()) -+ return -+#else -+ if (!frameView) - return; -+#endif -+// Playwright end - - m_viewportController.didScroll(rect.location()); - didChangeViewport(); -@@ -327,6 +335,10 @@ void LayerTreeHost::didChangeViewport() - - if (!view->useFixedLayout()) - view->notifyScrollPositionChanged(m_lastScrollPosition); -+// Playwright begin -+ else -+ m_viewportController.didScroll(m_lastScrollPosition); -+// Playwright end - } - - if (m_lastPageScaleFactor != pageScale) { diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h -index ea6ae1b9beff5a6bd4cbc7d52bcfa6da71a5b86b..efcdea566c836bcee32ff93546ee8a845dbe176b 100644 +index 1d62e85762b73fa351384ba79ae5f48df02193b3..e8f8c2186a2dd87d01dcff19ebbb0fd74f500fb4 100644 --- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h +++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h -@@ -117,6 +117,13 @@ public: +@@ -138,6 +138,7 @@ public: #if PLATFORM(WPE) && USE(GBM) && ENABLE(WPE_PLATFORM) void preferredBufferFormatsDidChange(); #endif -+ -+// Playwright begin -+#if USE(COORDINATED_GRAPHICS) -+ const SimpleViewportController& viewportController() const { return m_viewportController; } -+#endif -+// Playwright end + private: - #if USE(COORDINATED_GRAPHICS) void layerFlushTimerFired(); + void flushLayers(); diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp b/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp -index 98f4dbab8521e1677047713093614d5ff6cb886f..e24a67b67bf9f1af419c98ecfb3e7ae034751c32 100644 +index 428e10e8311dfb3201439688f5ad35a4d609b95c..b03ccee5c7057875092607d01b72265d63a2cfd9 100644 --- a/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp +++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp @@ -27,6 +27,7 @@ @@ -21590,10 +21174,10 @@ index 98f4dbab8521e1677047713093614d5ff6cb886f..e24a67b67bf9f1af419c98ecfb3e7ae0 { if (m_hasRemovedMessageReceiver) diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.h b/Source/WebKit/WebProcess/WebPage/DrawingArea.h -index c93d6787d88298575059259d2d45826e9d23c44b..3d42c0d9625e6c976f7cacda4bffcdf5c65b7217 100644 +index c641cf97ccc4b954ac699c0b1bdda10444abbe5c..a4f9198d9dd588cc872473b5502405d131bfe6be 100644 --- a/Source/WebKit/WebProcess/WebPage/DrawingArea.h +++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.h -@@ -165,6 +165,9 @@ public: +@@ -166,6 +166,9 @@ public: virtual bool enterAcceleratedCompositingModeIfNeeded() = 0; virtual void backgroundColorDidChange() { }; #endif @@ -21604,7 +21188,7 @@ index c93d6787d88298575059259d2d45826e9d23c44b..3d42c0d9625e6c976f7cacda4bffcdf5 #if PLATFORM(WPE) && USE(GBM) && ENABLE(WPE_PLATFORM) virtual void preferredBufferFormatsDidChange() { } diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp -index 2a79682f5d837df439d4b18805a695d48341bd56..6423f2a8aa1fe0af5e2a4073f96538fde67b765c 100644 +index a31872554bb37f3335ea48866461107b32556ba3..d7bbe179a3b16db259062eac7cb65de2aac8afa9 100644 --- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp +++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp @@ -44,6 +44,7 @@ @@ -21615,7 +21199,7 @@ index 2a79682f5d837df439d4b18805a695d48341bd56..6423f2a8aa1fe0af5e2a4073f96538fd #include #include #include -@@ -429,6 +430,12 @@ void WebCookieJar::removeChangeListener(const String& host, const WebCore::Cooki +@@ -455,6 +456,12 @@ void WebCookieJar::removeChangeListener(const String& host, const WebCore::Cooki } #endif @@ -21629,10 +21213,10 @@ index 2a79682f5d837df439d4b18805a695d48341bd56..6423f2a8aa1fe0af5e2a4073f96538fd String WebCookieJar::cookiesInPartitionedCookieStorage(const WebCore::Document&, const URL&, const WebCore::SameSiteInfo&) const diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.h b/Source/WebKit/WebProcess/WebPage/WebCookieJar.h -index a050f15e1a9295ffccb46cb1b4fd801750f8ac33..49e28dceccb19d15149e54913fcc00b0544e9a7a 100644 +index c25dbee9c0202246efaaedd9f3206d246cfc734c..94da3d92a2b6b1ec468c7db3bb19cae79ec29bd6 100644 --- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.h +++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.h -@@ -74,6 +74,8 @@ public: +@@ -75,6 +75,8 @@ public: void clearCache() final; @@ -21642,10 +21226,10 @@ index a050f15e1a9295ffccb46cb1b4fd801750f8ac33..49e28dceccb19d15149e54913fcc00b0 WebCookieJar(); diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp -index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c042cb480d 100644 +index a3cef9a9f48791fdd86c039ef76b0a23e1301d8a..9a79ae8681499c0ff76b856add6d5efd084f3b62 100644 --- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp -@@ -236,6 +236,7 @@ +@@ -237,6 +237,7 @@ #include #include #include @@ -21653,17 +21237,20 @@ index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c0 #include #include #include -@@ -1078,6 +1079,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) +@@ -1117,6 +1118,12 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) + setLinkDecorationFilteringData(WTFMove(parameters.linkDecorationFilteringData)); + setAllowedQueryParametersForAdvancedPrivacyProtections(WTFMove(parameters.allowedQueryParametersForAdvancedPrivacyProtections)); #endif - #endif // HAVE(SANDBOX_STATE_FLAGS) - ++ // For popup windows WebPage::Show() maybe called in the next lines from the constructor, ++ // at which point the page is not in the WebProcess's map yet and it is not safe to ++ // dispatch nested message loop and receive IPC messages. To mitigate that, the actual ++ // pause is postponed until the page is added to the map. + if (parameters.shouldPauseInInspectorWhenShown) -+ m_page->inspectorController().pauseWhenShown(); -+ - updateThrottleState(); - #if ENABLE(ACCESSIBILITY_ANIMATION_CONTROL) - updateImageAnimationEnabled(); -@@ -2043,6 +2047,22 @@ void WebPage::loadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, st ++ m_page->inspectorController().pauseOnStart(parameters.windowFeatures ? InspectorController::PauseCondition::WHEN_CREATION_FINISHED : InspectorController::PauseCondition::WHEN_SHOWN); + if (parameters.windowFeatures) { + m_page->applyWindowFeatures(*parameters.windowFeatures); + m_page->chrome().show(); +@@ -2074,6 +2081,22 @@ void WebPage::loadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, st frame->loadDidCommitInAnotherProcess(layerHostingContextIdentifier); } @@ -21685,8 +21272,8 @@ index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c0 + void WebPage::loadRequest(LoadParameters&& loadParameters) { - WEBPAGE_RELEASE_LOG(Loading, "loadRequest: navigationID=%" PRIu64 ", shouldTreatAsContinuingLoad=%u, lastNavigationWasAppInitiated=%d, existingNetworkResourceLoadIdentifierToResume=%" PRIu64, loadParameters.navigationID ? loadParameters.navigationID->toUInt64() : 0, static_cast(loadParameters.shouldTreatAsContinuingLoad), loadParameters.request.isAppInitiated(), valueOrDefault(loadParameters.existingNetworkResourceLoadIdentifierToResume).toUInt64()); -@@ -2238,7 +2258,9 @@ void WebPage::stopLoading() + WEBPAGE_RELEASE_LOG(Loading, "loadRequest: navigationID=%" PRIu64 ", shouldTreatAsContinuingLoad=%u, lastNavigationWasAppInitiated=%d, existingNetworkResourceLoadIdentifierToResume=%" PRIu64, loadParameters.navigationID ? loadParameters.navigationID->toUInt64() : 0, static_cast(loadParameters.shouldTreatAsContinuingLoad), loadParameters.request.isAppInitiated(), loadParameters.existingNetworkResourceLoadIdentifierToResume ? loadParameters.existingNetworkResourceLoadIdentifierToResume->toUInt64() : 0); +@@ -2269,7 +2292,9 @@ void WebPage::stopLoading() void WebPage::stopLoadingDueToProcessSwap() { SetForScope isStoppingLoadingDueToProcessSwap(m_isStoppingLoadingDueToProcessSwap, true); @@ -21696,90 +21283,31 @@ index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c0 } bool WebPage::defersLoading() const -@@ -2339,17 +2361,14 @@ void WebPage::setSize(const WebCore::IntSize& viewSize) - view->resize(viewSize); - m_drawingArea->setNeedsDisplay(); - --#if USE(COORDINATED_GRAPHICS) - if (view->useFixedLayout()) - sendViewportAttributesChanged(m_page->viewportArguments()); --#endif - - #if ENABLE(ACCESSIBILITY_ISOLATED_TREE) - cacheAXSize(m_viewSize); +@@ -2860,6 +2885,22 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum + #else + UNUSED_PARAM(viewportArguments); #endif - } - --#if USE(COORDINATED_GRAPHICS) - void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArguments) - { - RefPtr localMainFrame = dynamicDowncast(m_page->mainFrame()); -@@ -2374,20 +2393,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg - - ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize); - -- // If no layout was done yet set contentFixedOrigin to (0,0). -- IntPoint contentFixedOrigin = view->didFirstLayout() ? view->fixedVisibleContentRect().location() : IntPoint(); -- -- // Put the width and height to the viewport width and height. In css units however. -- // Use FloatSize to avoid truncated values during scale. -- FloatSize contentFixedSize = m_viewSize; -- -- contentFixedSize.scale(1 / attr.initialScale); -- view->setFixedVisibleContentRect(IntRect(contentFixedOrigin, roundedIntSize(contentFixedSize))); -+#if ENABLE(CSS_DEVICE_ADAPTATION) -+ FrameView* view = m_page->mainFrame().view(); -+ // CSS viewport descriptors might be applied to already affected viewport size -+ // if the page enables/disables stylesheets, so need to keep initial viewport size. -+ view->setInitialViewportSize(roundedIntSize(m_viewSize)); -+#endif - - attr.initialScale = m_page->viewportArguments().zoom; // Resets auto (-1) if no value was set by user. - - // This also takes care of the relayout. - setFixedLayoutSize(roundedIntSize(attr.layoutSize)); -+ scaleView(deviceWidth / attr.layoutSize.width()); - - #if USE(COORDINATED_GRAPHICS) - m_drawingArea->didChangeViewportAttributes(WTFMove(attr)); -@@ -2395,7 +2412,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg - send(Messages::WebPageProxy::DidChangeViewportProperties(attr)); - #endif - } --#endif - - void WebPage::drawRect(GraphicsContext& graphicsContext, const IntRect& rect) - { -@@ -2686,6 +2702,7 @@ void WebPage::scaleView(double scale) - } - - m_page->setViewScaleFactor(scale); -+ send(Messages::WebPageProxy::ViewScaleFactorDidChange(scale)); - scalePage(pageScale, scrollPositionAtNewScale); - } - -@@ -2865,18 +2882,14 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum - viewportConfigurationChanged(); - #endif - --#if USE(COORDINATED_GRAPHICS) - RefPtr localMainFrame = dynamicDowncast(m_page->mainFrame()); - RefPtr view = localMainFrame ? localMainFrame->view() : nullptr; - if (view && view->useFixedLayout()) - sendViewportAttributesChanged(viewportArguments); -+#if USE(COORDINATED_GRAPHICS) - else - m_drawingArea->didChangeViewportAttributes(ViewportAttributes()); - #endif -- --#if !PLATFORM(IOS_FAMILY) && !USE(COORDINATED_GRAPHICS) -- UNUSED_PARAM(viewportArguments); --#endif ++ ++ // Playwright begin ++ RefPtr localMainFrame = dynamicDowncast(m_page->mainFrame()); ++ RefPtr view = localMainFrame ? localMainFrame->view() : nullptr; ++ if (view && view->useFixedLayout()) { ++ if (m_viewSize.isEmpty()) ++ return; ++ Settings& settings = m_page->settings(); ++ int deviceWidth = (settings.deviceWidth() > 0) ? settings.deviceWidth() : m_viewSize.width(); ++ int deviceHeight = (settings.deviceHeight() > 0) ? settings.deviceHeight() : m_viewSize.height(); ++ int minimumLayoutFallbackWidth = std::max(settings.layoutFallbackWidth(), m_viewSize.width()); ++ ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize); ++ setFixedLayoutSize(roundedIntSize(attr.layoutSize)); ++ scaleView(deviceWidth / attr.layoutSize.width()); ++ } ++ // Playwright end } #if !PLATFORM(IOS_FAMILY) -@@ -3594,6 +3607,13 @@ void WebPage::setLastKnownMousePosition(WebCore::FrameIdentifier frameID, IntPoi - frame->coreLocalFrame()->eventHandler().setLastKnownMousePosition(eventPoint, globalPoint); +@@ -3617,6 +3658,13 @@ void WebPage::flushDeferredScrollEvents() + corePage()->flushDeferredScrollEvents(); } +#if ENABLE(ORIENTATION_EVENTS) @@ -21792,7 +21320,7 @@ index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c0 void WebPage::flushDeferredDidReceiveMouseEvent() { if (auto info = std::exchange(m_deferredDidReceiveMouseEvent, std::nullopt)) -@@ -3878,6 +3898,97 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent, CompletionHandlersendMessageToTargetBackend(targetId, message); } @@ -21898,19 +21426,24 @@ index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c0 +{ + m_page->inspectorController().resumeIfPausedInNewWindow(); +} ++ ++void WebPage::didAddWebPageToWebProcess() ++{ ++ m_page->inspectorController().didFinishPageCreation(); ++} + void WebPage::insertNewlineInQuotedContent() { RefPtr frame = m_page->checkedFocusController()->focusedOrMainFrame(); -@@ -4206,6 +4322,7 @@ void WebPage::didCompletePageTransition() +@@ -4205,6 +4354,7 @@ void WebPage::didCompletePageTransition() void WebPage::show() { send(Messages::WebPageProxy::ShowPage()); -+ m_page->inspectorController().didShowNewWindow(); ++ m_page->inspectorController().didShowPage(); } void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension) -@@ -5364,7 +5481,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana +@@ -5365,7 +5515,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana #if ENABLE(DRAG_SUPPORT) @@ -21919,7 +21452,7 @@ index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c0 void WebPage::performDragControllerAction(DragControllerAction action, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet draggingSourceOperationMask, SelectionData&& selectionData, OptionSet flags, CompletionHandler, DragHandlingMethod, bool, unsigned, IntRect, IntRect, std::optional)>&& completionHandler) { if (!m_page) -@@ -7764,6 +7881,10 @@ void WebPage::didCommitLoad(WebFrame* frame) +@@ -7788,6 +7938,10 @@ void WebPage::didCommitLoad(WebFrame* frame) #endif flushDeferredDidReceiveMouseEvent(); @@ -21930,7 +21463,7 @@ index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c0 } void WebPage::didFinishDocumentLoad(WebFrame& frame) -@@ -8047,6 +8168,9 @@ Ref WebPage::createDocumentLoader(LocalFrame& frame, const Resou +@@ -8090,6 +8244,9 @@ Ref WebPage::createDocumentLoader(LocalFrame& frame, const Resou WebsitePoliciesData::applyToDocumentLoader(WTFMove(*m_pendingWebsitePolicies), documentLoader); m_pendingWebsitePolicies = std::nullopt; } @@ -21941,10 +21474,10 @@ index f37c00d9bdbdc7754ce8bd75c1be645617a3e019..9242983dfaccb87fb55e8126a1c903c0 return documentLoader; diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h -index dfee35656503c64f8f31ab52756aefdeef38b676..bd0d0408d17d0f4c1ff9352866e80c1ce27a19cd 100644 +index 06525fa5fec204ac72bb3c2f4b7f37d83ab17105..ef1ed29cb9d74b7f4293ed3f498d13a8a343ffd6 100644 --- a/Source/WebKit/WebProcess/WebPage/WebPage.h +++ b/Source/WebKit/WebProcess/WebPage/WebPage.h -@@ -71,6 +71,7 @@ +@@ -65,6 +65,7 @@ #include #include #include @@ -21952,7 +21485,7 @@ index dfee35656503c64f8f31ab52756aefdeef38b676..bd0d0408d17d0f4c1ff9352866e80c1c #include #include #include -@@ -1178,11 +1179,11 @@ public: +@@ -1234,11 +1235,11 @@ public: void clearSelection(); void restoreSelectionInFocusedEditableElement(); @@ -21964,9 +21497,9 @@ index dfee35656503c64f8f31ab52756aefdeef38b676..bd0d0408d17d0f4c1ff9352866e80c1c -#if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK) +#if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK) && !PLATFORM(WPE) void performDragControllerAction(std::optional, DragControllerAction, WebCore::DragData&&, CompletionHandler, WebCore::DragHandlingMethod, bool, unsigned, WebCore::IntRect, WebCore::IntRect, std::optional)>&&); - void performDragOperation(WebCore::DragData&&, SandboxExtension::Handle&&, Vector&&, CompletionHandler&&); + void performDragOperation(WebCore::DragData&&, SandboxExtensionHandle&&, Vector&&, CompletionHandler&&); #endif -@@ -1197,6 +1198,9 @@ public: +@@ -1253,6 +1254,9 @@ public: void didStartDrag(); void dragCancelled(); OptionSet allowedDragSourceActions() const { return m_allowedDragSourceActions; } @@ -21976,8 +21509,8 @@ index dfee35656503c64f8f31ab52756aefdeef38b676..bd0d0408d17d0f4c1ff9352866e80c1c #endif void beginPrinting(WebCore::FrameIdentifier, const PrintInfo&); -@@ -1272,8 +1276,11 @@ public: - void gestureEvent(WebCore::FrameIdentifier, const WebGestureEvent&, CompletionHandler, bool, std::optional)>&&); +@@ -1328,8 +1332,11 @@ public: + void gestureEvent(WebCore::FrameIdentifier, const WebGestureEvent&); #endif -#if PLATFORM(IOS_FAMILY) @@ -21989,23 +21522,24 @@ index dfee35656503c64f8f31ab52756aefdeef38b676..bd0d0408d17d0f4c1ff9352866e80c1c void dynamicViewportSizeUpdate(const DynamicViewportSizeUpdate&); bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; } void willStartUserTriggeredZooming(); -@@ -1423,6 +1430,7 @@ public: +@@ -1479,6 +1486,8 @@ public: void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType); void disconnectInspector(const String& targetId); void sendMessageToTargetBackend(const String& targetId, const String& message); + void resumeInspectorIfPausedInNewWindow(); ++ void didAddWebPageToWebProcess(); void insertNewlineInQuotedContent(); -@@ -1940,6 +1948,7 @@ private: - void createProvisionalFrame(ProvisionalFrameCreationParameters&&, WebCore::FrameIdentifier); - void destroyProvisionalFrame(WebCore::FrameIdentifier); - void loadDidCommitInAnotherProcess(WebCore::FrameIdentifier, std::optional); -+ void loadRequestInFrameForInspector(LoadParameters&&, WebCore::FrameIdentifier); +@@ -1889,6 +1898,7 @@ public: + void showContextMenuFromFrame(const WebCore::FrameIdentifier&, const ContextMenuContextData&, const UserData&); + #endif void loadRequest(LoadParameters&&); - [[noreturn]] void loadRequestWaitingForProcessLaunch(LoadParameters&&, URL&&, WebPageProxyIdentifier, bool); - void loadData(LoadParameters&&); -@@ -1981,6 +1990,7 @@ private: ++ void loadRequestInFrameForInspector(LoadParameters&&, WebCore::FrameIdentifier); + + void setTopContentInset(float); + +@@ -2065,6 +2075,7 @@ private: void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled); #elif ENABLE(TOUCH_EVENTS) void touchEvent(const WebTouchEvent&, CompletionHandler, bool)>&&); @@ -22013,17 +21547,7 @@ index dfee35656503c64f8f31ab52756aefdeef38b676..bd0d0408d17d0f4c1ff9352866e80c1c #endif void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&); -@@ -2126,9 +2136,7 @@ private: - void addLayerForFindOverlay(CompletionHandler)>&&); - void removeLayerForFindOverlay(CompletionHandler&&); - --#if USE(COORDINATED_GRAPHICS) - void sendViewportAttributesChanged(const WebCore::ViewportArguments&); --#endif - - void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex); - void setTextForActivePopupMenu(int32_t index); -@@ -2732,6 +2740,7 @@ private: +@@ -2829,6 +2840,7 @@ private: UserActivity m_userActivity; Markable m_pendingNavigationID; @@ -22032,7 +21556,7 @@ index dfee35656503c64f8f31ab52756aefdeef38b676..bd0d0408d17d0f4c1ff9352866e80c1c bool m_mainFrameProgressCompleted { false }; diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in -index fbfdfdff9c550c9becb8ed9243755926450a9566..61d5056d4ef7d079cfdabc6d31c5a31e58cac907 100644 +index 5840247c1e8c94462c5106d385a7674ff023dbf3..02147c2cf05c35fdef280b08bceee1bd35cda79d 100644 --- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in +++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in @@ -53,10 +53,13 @@ messages -> WebPage WantsAsyncDispatchMessage { @@ -22050,7 +21574,7 @@ index fbfdfdff9c550c9becb8ed9243755926450a9566..61d5056d4ef7d079cfdabc6d31c5a31e SetOverrideViewportArguments(std::optional arguments) DynamicViewportSizeUpdate(struct WebKit::DynamicViewportSizeUpdate target) -@@ -146,6 +149,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -147,6 +150,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType ConnectInspector(String targetId, Inspector::FrontendChannel::ConnectionType connectionType) DisconnectInspector(String targetId) SendMessageToTargetBackend(String targetId, String message) @@ -22058,7 +21582,7 @@ index fbfdfdff9c550c9becb8ed9243755926450a9566..61d5056d4ef7d079cfdabc6d31c5a31e #if ENABLE(REMOTE_INSPECTOR) SetIndicating(bool indicating); -@@ -156,6 +160,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -157,6 +161,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType #endif #if !ENABLE(IOS_TOUCH_EVENTS) && ENABLE(TOUCH_EVENTS) TouchEvent(WebKit::WebTouchEvent event) -> (std::optional eventType, bool handled) @@ -22066,7 +21590,7 @@ index fbfdfdff9c550c9becb8ed9243755926450a9566..61d5056d4ef7d079cfdabc6d31c5a31e #endif CancelPointer(WebCore::PointerID pointerId, WebCore::IntPoint documentPoint) -@@ -189,6 +194,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -190,6 +195,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType CreateProvisionalFrame(struct WebKit::ProvisionalFrameCreationParameters creationParameters, WebCore::FrameIdentifier frameID) DestroyProvisionalFrame(WebCore::FrameIdentifier frameID); LoadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, std::optional layerHostingContextIdentifier) @@ -22074,7 +21598,7 @@ index fbfdfdff9c550c9becb8ed9243755926450a9566..61d5056d4ef7d079cfdabc6d31c5a31e LoadRequestWaitingForProcessLaunch(struct WebKit::LoadParameters loadParameters, URL resourceDirectoryURL, WebKit::WebPageProxyIdentifier pageID, bool checkAssumedReadAccessToResourceURL) LoadData(struct WebKit::LoadParameters loadParameters) LoadSimulatedRequestAndResponse(struct WebKit::LoadParameters loadParameters, WebCore::ResourceResponse simulatedResponse) -@@ -354,10 +360,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -355,10 +361,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType RemoveLayerForFindOverlay() -> () # Drag and drop. @@ -22087,7 +21611,7 @@ index fbfdfdff9c550c9becb8ed9243755926450a9566..61d5056d4ef7d079cfdabc6d31c5a31e PerformDragControllerAction(std::optional frameID, enum:uint8_t WebKit::DragControllerAction action, WebCore::DragData dragData) -> (std::optional dragOperation, enum:uint8_t WebCore::DragHandlingMethod dragHandlingMethod, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, WebCore::IntRect insertionRect, WebCore::IntRect editableElementRect, struct std::optional remoteUserInputEventData) PerformDragOperation(WebCore::DragData dragData, WebKit::SandboxExtensionHandle sandboxExtensionHandle, Vector sandboxExtensionsForUpload) -> (bool handled) #endif -@@ -367,6 +373,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -368,6 +374,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType DragCancelled() #endif @@ -22099,10 +21623,10 @@ index fbfdfdff9c550c9becb8ed9243755926450a9566..61d5056d4ef7d079cfdabc6d31c5a31e RequestDragStart(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet allowedActionsMask) RequestAdditionalItemsForDragSession(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet allowedActionsMask) diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm -index 51c574b2a235066fae685d32f10d06b4a5ae824f..6993e6d3e2e886dc97c0614841dd827655253c42 100644 +index 6aac070297286654160c9cc5a5cf7de58dd1db87..4eddcc5c72784ca51ea87f2a9abb2504edfdbca7 100644 --- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm +++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm -@@ -803,21 +803,37 @@ String WebPage::platformUserAgent(const URL&) const +@@ -800,21 +800,37 @@ String WebPage::platformUserAgent(const URL&) const bool WebPage::hoverSupportedByPrimaryPointingDevice() const { @@ -22191,10 +21715,10 @@ index f17f5d719d892309ed9c7093384945866b5117b9..1dba47bbf0dbd0362548423a74b38034 } diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp -index 095d4e45286cf0c9ffd5fc35c0de32bd0126b53b..4cf1db20e4c51777a443d3109227b7e4155a8145 100644 +index 94ec05dfede5cdb951323424a7776048ceb20921..4982962fd12f9bab1df21f855289b110b9aa8511 100644 --- a/Source/WebKit/WebProcess/WebProcess.cpp +++ b/Source/WebKit/WebProcess/WebProcess.cpp -@@ -89,6 +89,7 @@ +@@ -90,6 +90,7 @@ #include "WebsiteData.h" #include "WebsiteDataStoreParameters.h" #include "WebsiteDataType.h" @@ -22202,7 +21726,7 @@ index 095d4e45286cf0c9ffd5fc35c0de32bd0126b53b..4cf1db20e4c51777a443d3109227b7e4 #include #include #include -@@ -367,6 +368,14 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter +@@ -370,6 +371,14 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter { JSC::Options::AllowUnfinalizedAccessScope scope; JSC::Options::allowNonSPTagging() = false; @@ -22217,7 +21741,7 @@ index 095d4e45286cf0c9ffd5fc35c0de32bd0126b53b..4cf1db20e4c51777a443d3109227b7e4 JSC::Options::notifyOptionsChanged(); } -@@ -374,6 +383,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter +@@ -377,6 +386,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter platformInitializeProcess(parameters); updateCPULimit(); @@ -22226,8 +21750,16 @@ index 095d4e45286cf0c9ffd5fc35c0de32bd0126b53b..4cf1db20e4c51777a443d3109227b7e4 } void WebProcess::initializeConnection(IPC::Connection* connection) +@@ -931,6 +942,7 @@ void WebProcess::createWebPage(PageIdentifier pageID, WebPageCreationParameters& + accessibilityRelayProcessSuspended(false); + } + ASSERT(result.iterator->value); ++ result.iterator->value->didAddWebPageToWebProcess(); + } + + void WebProcess::removeWebPage(PageIdentifier pageID) diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm -index d694170887445e2eed73340666bc4847aef4f9a6..6ced22d0953a39582285201e0946d68f954644ad 100644 +index 64e9b56bbc644c8ed1583cdbf41878738860292d..fe83a85ccf53ee33f5a6a7461b40078d77928b61 100644 --- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm +++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm @@ -4223,7 +4223,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END @@ -22240,10 +21772,10 @@ index d694170887445e2eed73340666bc4847aef4f9a6..6ced22d0953a39582285201e0946d68f - (void)touch:(WebEvent *)event { diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm -index 016c97818b87a5205b1eebce2350c2d7bfb02975..4fe0109484f571bf1cfe53afb57bdf69a4fb295c 100644 +index e1ecaa50847e76f2a02c62f5534a2e07f3df4fcd..2e79ce45b739517a03a464f223850aa0690d56d3 100644 --- a/Source/WebKitLegacy/mac/WebView/WebView.mm +++ b/Source/WebKitLegacy/mac/WebView/WebView.mm -@@ -3983,7 +3983,7 @@ + (void)_doNotStartObservingNetworkReachability +@@ -3986,7 +3986,7 @@ + (void)_doNotStartObservingNetworkReachability } #endif // PLATFORM(IOS_FAMILY) @@ -22252,7 +21784,7 @@ index 016c97818b87a5205b1eebce2350c2d7bfb02975..4fe0109484f571bf1cfe53afb57bdf69 - (NSArray *)_touchEventRegions { -@@ -4025,7 +4025,7 @@ - (NSArray *)_touchEventRegions +@@ -4028,7 +4028,7 @@ - (NSArray *)_touchEventRegions }).autorelease(); } @@ -22293,10 +21825,10 @@ index 0000000000000000000000000000000000000000..dd6a53e2d57318489b7e49dd7373706d + LIBVPX_LIBRARIES +) diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake -index 4785f6f0c833e7fe5f9cefd586364ccebf41ec32..e77686f25ea59b03c68de4178532496d97898d46 100644 +index 55aa3aea78f8286b04421f052f9e422e05f676a0..98ffe458294436b4c9224c412275e32fb61cd4ae 100644 --- a/Source/cmake/OptionsGTK.cmake +++ b/Source/cmake/OptionsGTK.cmake -@@ -7,6 +7,9 @@ SET_PROJECT_VERSION(2 47 0) +@@ -7,6 +7,9 @@ SET_PROJECT_VERSION(2 47 2) set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string") @@ -22317,7 +21849,7 @@ index 4785f6f0c833e7fe5f9cefd586364ccebf41ec32..e77686f25ea59b03c68de4178532496d include(GStreamerDefinitions) include(FindGLibCompileResources) -@@ -64,6 +71,10 @@ WEBKIT_OPTION_DEFINE(USE_SYSTEM_UNIFDEF "Whether to use a system-provided unifde +@@ -67,6 +74,10 @@ WEBKIT_OPTION_DEFINE(USE_SYSTEM_UNIFDEF "Whether to use a system-provided unifde WEBKIT_OPTION_DEPEND(USE_SYSTEM_SYSPROF_CAPTURE USE_SYSPROF_CAPTURE) @@ -22328,7 +21860,7 @@ index 4785f6f0c833e7fe5f9cefd586364ccebf41ec32..e77686f25ea59b03c68de4178532496d SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE}) if (DEVELOPER_MODE) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS PRIVATE ON) -@@ -148,6 +159,20 @@ endif () +@@ -153,6 +164,20 @@ endif () WEBKIT_OPTION_DEPEND(ENABLE_GPU_PROCESS USE_GBM) @@ -22349,22 +21881,8 @@ index 4785f6f0c833e7fe5f9cefd586364ccebf41ec32..e77686f25ea59b03c68de4178532496d include(GStreamerDependencies) # Finalize the value for all options. Do not attempt to use an option before -diff --git a/Source/cmake/OptionsMSVC.cmake b/Source/cmake/OptionsMSVC.cmake -index 5828bf9ef028ea200a73f973937d610a8771f85f..27f9a084eb0eecd67287c14dc4c363d3042cf965 100644 ---- a/Source/cmake/OptionsMSVC.cmake -+++ b/Source/cmake/OptionsMSVC.cmake -@@ -45,6 +45,9 @@ string(REGEX REPLACE "/W3" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) - string(REGEX REPLACE "/W3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(/W4) - -+# Not apply class-level dllexport and dllimport attributes to inline member functions -+WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(/Zc:dllexportInlines-) -+ - # Make sure incremental linking is turned off, as it creates unacceptably long link times. - string(REPLACE "/INCREMENTAL[:A-Z]+" "" CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) - string(REPLACE "/INCREMENTAL[:A-Z]+" "" CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG}) diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake -index fc5429ddf2701ba46e4283a40392903b45400d1f..2c3aebacb3b12dad50d70aed66dc3ba25d91ba29 100644 +index 18252cd9598ad7554ece3a8a3f02435aa75e7737..311430134a2f44deaaf19e40b0f7ab393c898ccb 100644 --- a/Source/cmake/OptionsWPE.cmake +++ b/Source/cmake/OptionsWPE.cmake @@ -21,6 +21,9 @@ find_package(WebP REQUIRED COMPONENTS demux) @@ -22377,11 +21895,12 @@ index fc5429ddf2701ba46e4283a40392903b45400d1f..2c3aebacb3b12dad50d70aed66dc3ba2 WEBKIT_OPTION_BEGIN() SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE}) -@@ -83,6 +86,28 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90) +@@ -83,6 +86,29 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PUBLIC ON) endif () +# Playwright begin. ++WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MINIBROWSER PUBLIC ON) +WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PDFJS PUBLIC OFF) +WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE OFF) +WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_THUNDER PRIVATE OFF) @@ -22406,8 +21925,8 @@ index fc5429ddf2701ba46e4283a40392903b45400d1f..2c3aebacb3b12dad50d70aed66dc3ba2 # Public options specific to the WPE port. Do not add any options here unless # there is a strong reason we should support changing the value of the option, # and the option is not relevant to other WebKit ports. -@@ -112,6 +137,11 @@ WEBKIT_OPTION_CONFLICT(ENABLE_WPE_PLATFORM ENABLE_WPE_1_1_API) - WEBKIT_OPTION_DEPEND(ENABLE_DOCUMENTATION ENABLE_INTROSPECTION) +@@ -116,6 +142,11 @@ WEBKIT_OPTION_DEPEND(ENABLE_DOCUMENTATION ENABLE_INTROSPECTION) + WEBKIT_OPTION_DEPEND(USE_QT6 ENABLE_WPE_PLATFORM) WEBKIT_OPTION_DEPEND(USE_SYSTEM_SYSPROF_CAPTURE USE_SYSPROF_CAPTURE) +# Playwright begin. @@ -22419,10 +21938,10 @@ index fc5429ddf2701ba46e4283a40392903b45400d1f..2c3aebacb3b12dad50d70aed66dc3ba2 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BUBBLEWRAP_SANDBOX PUBLIC ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE ON) diff --git a/Source/cmake/OptionsWin.cmake b/Source/cmake/OptionsWin.cmake -index a09700bfc69078e82e426ea5cd13fd3d8e84d3ec..52055ce7362d4283a333e5a50f73a12c9b2fa5e2 100644 +index a61f5b5b7c2a193365eadc1996179e2b6f845c0f..94d6772b86429ef5c66f7b7f69fa04bbfc20eebe 100644 --- a/Source/cmake/OptionsWin.cmake +++ b/Source/cmake/OptionsWin.cmake -@@ -71,6 +71,27 @@ find_package(ZLIB 1.2.11 REQUIRED) +@@ -76,6 +76,27 @@ find_package(ZLIB 1.2.11 REQUIRED) find_package(LibPSL 0.20.2 REQUIRED) find_package(WebP REQUIRED COMPONENTS demux) @@ -22450,7 +21969,7 @@ index a09700bfc69078e82e426ea5cd13fd3d8e84d3ec..52055ce7362d4283a333e5a50f73a12c WEBKIT_OPTION_BEGIN() # FIXME: Most of these options should not be public. -@@ -136,6 +157,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF) +@@ -141,6 +162,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF) SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS ON) SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS ON) @@ -22466,7 +21985,7 @@ index a09700bfc69078e82e426ea5cd13fd3d8e84d3ec..52055ce7362d4283a333e5a50f73a12c set(USE_ANGLE_EGL ON) diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake -index c3c683b650cbbbc882aad6d7f2202abe367af7f6..c3447733a57a09089f178f1c7c7763816252e94c 100644 +index 4882f3de3d9cb011a666563f0bc0e142a705518f..d3f674bf78792088a60a631c245a1fa86dca4d53 100644 --- a/Source/cmake/WebKitCompilerFlags.cmake +++ b/Source/cmake/WebKitCompilerFlags.cmake @@ -122,7 +122,7 @@ macro(WEBKIT_ADD_TARGET_CXX_FLAGS _target) @@ -22493,10 +22012,10 @@ index 576835410df6deac60f0158f1d2d1ef1e5f4c78d..9b492cfe5fef8de340a80f2af70a7d68 WEB_PREFERENCES_GENERATED_FILES = \ TestOptionsGeneratedWebKitLegacyKeyMapping.cpp \ diff --git a/Tools/MiniBrowser/gtk/BrowserTab.c b/Tools/MiniBrowser/gtk/BrowserTab.c -index 6e6c4a5abecb12c6b30e90a93c539b9b9ff27e04..851b4b9ef8da2d4277313503734138f73cdba292 100644 +index 6d48c378699e87f55bbd2550d4971a295b831a24..efb0d8e1e0f7db5d4ce81bc58a97e6c4034ff0b3 100644 --- a/Tools/MiniBrowser/gtk/BrowserTab.c +++ b/Tools/MiniBrowser/gtk/BrowserTab.c -@@ -117,19 +117,34 @@ static void isLoadingChanged(WebKitWebView *webView, GParamSpec *paramSpec, Brow +@@ -117,19 +117,38 @@ static void isLoadingChanged(WebKitWebView *webView, GParamSpec *paramSpec, Brow } } @@ -22504,7 +22023,11 @@ index 6e6c4a5abecb12c6b30e90a93c539b9b9ff27e04..851b4b9ef8da2d4277313503734138f7 +{ + if (webkit_response_policy_decision_is_mime_type_supported(responseDecision)) + return TRUE; -+ const gchar* mimeType = webkit_uri_response_get_mime_type(webkit_response_policy_decision_get_response(responseDecision)); ++ WebKitURIResponse* response = webkit_response_policy_decision_get_response(responseDecision); ++ const guint statusCode = webkit_uri_response_get_status_code(response); ++ if (statusCode == 205 || statusCode == 204) ++ return TRUE; ++ const gchar* mimeType = webkit_uri_response_get_mime_type(response); + if (!mimeType || mimeType[0] == '\0') + return FALSE; + // https://bugs.webkit.org/show_bug.cgi?id=277204 / Ubuntu 24.04 / glib 2.76+ or higher @@ -22535,7 +22058,7 @@ index 6e6c4a5abecb12c6b30e90a93c539b9b9ff27e04..851b4b9ef8da2d4277313503734138f7 return TRUE; } -@@ -180,6 +195,11 @@ static void loadChanged(WebKitWebView *webView, WebKitLoadEvent loadEvent, Brows +@@ -180,6 +199,11 @@ static void loadChanged(WebKitWebView *webView, WebKitLoadEvent loadEvent, Brows #endif } @@ -22547,7 +22070,7 @@ index 6e6c4a5abecb12c6b30e90a93c539b9b9ff27e04..851b4b9ef8da2d4277313503734138f7 static GtkWidget *createInfoBarQuestionMessage(const char *title, const char *text) { GtkWidget *dialog = gtk_info_bar_new_with_buttons("No", GTK_RESPONSE_NO, "Yes", GTK_RESPONSE_YES, NULL); -@@ -741,6 +761,7 @@ static void browserTabConstructed(GObject *gObject) +@@ -746,6 +770,7 @@ static void browserTabConstructed(GObject *gObject) g_signal_connect(tab->webView, "notify::is-loading", G_CALLBACK(isLoadingChanged), tab); g_signal_connect(tab->webView, "decide-policy", G_CALLBACK(decidePolicy), tab); g_signal_connect(tab->webView, "load-changed", G_CALLBACK(loadChanged), tab); @@ -22555,7 +22078,7 @@ index 6e6c4a5abecb12c6b30e90a93c539b9b9ff27e04..851b4b9ef8da2d4277313503734138f7 g_signal_connect(tab->webView, "load-failed-with-tls-errors", G_CALLBACK(loadFailedWithTLSerrors), tab); g_signal_connect(tab->webView, "permission-request", G_CALLBACK(decidePermissionRequest), tab); g_signal_connect(tab->webView, "run-color-chooser", G_CALLBACK(runColorChooserCallback), tab); -@@ -793,6 +814,9 @@ static char *getInternalURI(const char *uri) +@@ -798,6 +823,9 @@ static char *getInternalURI(const char *uri) if (g_str_has_prefix(uri, "about:") && !g_str_equal(uri, "about:blank")) return g_strconcat(BROWSER_ABOUT_SCHEME, uri + strlen ("about"), NULL); @@ -22877,7 +22400,7 @@ index 8433f5360dc4a5f43b68b67192fb3d9bf5064cf1..9fa8f53e90fe5a32be1c8e7a9daa6404 g_clear_object(&interfaceSettings); diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp -index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be432ab3ec 100644 +index f5403031c914d7fedeb4649c4891beb7d681007e..eb1fe97ebb4e55eb1d4443e5f66566471ad9733f 100644 --- a/Tools/MiniBrowser/wpe/main.cpp +++ b/Tools/MiniBrowser/wpe/main.cpp @@ -49,6 +49,9 @@ static gboolean headlessMode; @@ -22890,7 +22413,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be static const char* contentFilter; static const char* cookiesFile; static const char* cookiesPolicy; -@@ -125,6 +128,9 @@ static const GOptionEntry commandLineOptions[] = +@@ -127,6 +130,9 @@ static const GOptionEntry commandLineOptions[] = #endif { "size", 's', 0, G_OPTION_ARG_CALLBACK, reinterpret_cast(parseWindowSize), "Specify the window size to use, e.g. --size=\"800x600\"", nullptr }, { "version", 'v', 0, G_OPTION_ARG_NONE, &printVersion, "Print the WPE version", nullptr }, @@ -22900,7 +22423,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, nullptr, "[URL]" }, { nullptr, 0, 0, G_OPTION_ARG_NONE, nullptr, nullptr, nullptr } }; -@@ -283,15 +289,38 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul +@@ -285,15 +291,38 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul g_main_loop_quit(data->mainLoop); } @@ -22941,7 +22464,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be { auto backend = createViewBackend(defaultWindowWidthLegacyAPI, defaultWindowHeightLegacyAPI); WebKitWebViewBackend* viewBackend = nullptr; -@@ -306,12 +335,27 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi +@@ -308,12 +337,27 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi }, backend.release()); } @@ -22975,7 +22498,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be #if ENABLE_WPE_PLATFORM if (auto* wpeView = webkit_web_view_get_wpe_view(newWebView)) { -@@ -326,6 +370,10 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi +@@ -328,6 +372,10 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi g_hash_table_add(openViews, newWebView); @@ -22986,9 +22509,9 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be return newWebView; } -@@ -395,13 +443,101 @@ static WebKitFeature* findFeature(WebKitFeatureList* featureList, const char* id - return nullptr; +@@ -415,13 +463,105 @@ void loadConfigFile(WPESettings* settings) } + #endif +static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationAction*, gpointer user_data) +{ @@ -22999,7 +22522,11 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be +{ + if (webkit_response_policy_decision_is_mime_type_supported(responseDecision)) + return true; -+ const gchar* mimeType = webkit_uri_response_get_mime_type(webkit_response_policy_decision_get_response(responseDecision)); ++ auto response = webkit_response_policy_decision_get_response(responseDecision); ++ const auto statusCode = webkit_uri_response_get_status_code(response); ++ if (statusCode == 205 || statusCode == 204) ++ return true; ++ const gchar* mimeType = webkit_uri_response_get_mime_type(response); + if (!mimeType || mimeType[0] == '\0') + return false; + // https://bugs.webkit.org/show_bug.cgi?id=277204 / Ubuntu 24.04 / glib 2.76+ or higher @@ -23089,7 +22616,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be webkit_network_session_set_itp_enabled(networkSession, enableITP); if (proxy) { -@@ -428,10 +564,18 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* +@@ -448,10 +588,18 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* webkit_cookie_manager_set_persistent_storage(cookieManager, cookiesFile, storageType); } } @@ -23110,7 +22637,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be webkit_website_data_manager_set_itp_enabled(manager, enableITP); if (proxy) { -@@ -462,6 +606,7 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* +@@ -482,6 +630,7 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* } #endif @@ -23118,7 +22645,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be WebKitUserContentManager* userContentManager = nullptr; if (contentFilter) { GFile* contentFilterFile = g_file_new_for_commandline_arg(contentFilter); -@@ -540,6 +685,15 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* +@@ -560,6 +709,15 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* "autoplay", WEBKIT_AUTOPLAY_ALLOW, nullptr); @@ -23134,7 +22661,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be auto* webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW, "backend", viewBackend, "web-context", webContext, -@@ -584,8 +738,6 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* +@@ -606,8 +764,6 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* } #endif @@ -23143,7 +22670,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), webView); g_signal_connect(webView, "permission-request", G_CALLBACK(decidePermissionRequest), nullptr); g_signal_connect(webView, "create", G_CALLBACK(createWebView), application); -@@ -597,16 +749,11 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* +@@ -619,16 +775,11 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* webkit_web_view_set_background_color(webView, &color); if (uriArguments) { @@ -23165,7 +22692,7 @@ index f94a8a96c313860ef01de37108acc7c462d13795..f95494c1923c6a3fff562a4da73fa4be webkit_web_view_load_uri(webView, "https://wpewebkit.org"); g_object_unref(webContext); -@@ -702,8 +849,14 @@ int main(int argc, char *argv[]) +@@ -725,8 +876,14 @@ int main(int argc, char *argv[]) } } @@ -23205,43 +22732,6 @@ index 470dcf1f4440f3db350fc416150a2e792a2777c7..31cbc0d22e63d054cf6edcc220a1c6b4 # WebInspectorUI must come after JavaScriptCore and WebCore but before WebKit and WebKit2 my $webKitIndex = first { $projects[$_] eq "Source/WebKitLegacy" } 0..$#projects; -diff --git a/Tools/Scripts/generate-bundle b/Tools/Scripts/generate-bundle -index 297e7d7b3d0889235e621f5c48c1f1480d9685ce..7a7eab25ec0f14ed53f8e688ec9916f2eb7b584e 100755 ---- a/Tools/Scripts/generate-bundle -+++ b/Tools/Scripts/generate-bundle -@@ -677,8 +677,6 @@ class BundleCreator(object): - # bunddle WebKit libraries - objects_to_copy.extend(self._get_webkit_binaries()) - objects_to_copy.append(self._get_webkit_lib('InjectedBundle')) -- if self._platform == 'wpe': -- objects_to_copy.append(self._get_webkit_lib('InspectorResources')) - # Bundle extra system related libraries - gio_modules = self._get_gio_modules() - objects_to_copy.extend(gio_modules) -@@ -766,6 +764,9 @@ class BundleCreator(object): - if needs_to_create_wpe_backend_symlink: - self._ensure_wpe_backend_symlink() - -+ if self._platform == 'wpe': -+ self._bundler.copy(os.path.join(self._buildpath, 'WebInspectorUI', 'DerivedSources', 'inspector.gresource')) -+ - # Now copy data files to share dir (only needed when bunding all for MiniBrowser). - # We assume that the system uses standard paths at /usr/share and /etc for this resources - # Every path should be checked and if some one is not found, then it will raise an error. -diff --git a/Tools/Scripts/webkitpy/binary_bundling/bundle.py b/Tools/Scripts/webkitpy/binary_bundling/bundle.py -index 2d0faab03b2376f3edd20bb2c727ed425ef1aec5..e315434a61800d102e2bac75ac651c3f9e77d3e7 100644 ---- a/Tools/Scripts/webkitpy/binary_bundling/bundle.py -+++ b/Tools/Scripts/webkitpy/binary_bundling/bundle.py -@@ -49,6 +49,9 @@ class BinaryBundler: - def set_use_sys_lib_directory(self, should_use_sys_lib_directory): - self._should_use_sys_lib_directory = should_use_sys_lib_directory - -+ def copy(self, orig_file): -+ shutil.copy(orig_file, self._destination_dir) -+ - def copy_and_maybe_strip_patchelf(self, orig_file, type='bin', strip=True, patchelf_removerpath=True, patchelf_nodefaultlib=False, patchelf_setinterpreter_relativepath=None, object_final_destination_dir=None): - """ This does the following: - 1. Copies the binary/lib (object) diff --git a/Tools/WebKitTestRunner/CMakeLists.txt b/Tools/WebKitTestRunner/CMakeLists.txt index 9e53f459e444b9c10fc5248f0e8059df6c1e0041..c17c875a7dd3ca05c4489578ab32378bca45a7c9 100644 --- a/Tools/WebKitTestRunner/CMakeLists.txt @@ -23258,10 +22748,10 @@ index 9e53f459e444b9c10fc5248f0e8059df6c1e0041..c17c875a7dd3ca05c4489578ab32378b "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityController.idl" "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityTextMarker.idl" diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp -index c1212470ee2e66c2113958894fce3245bbedda5a..1a4ae8ce2386e07267445dbca6f46b5d4a7d26ac 100644 +index 1e020026255e1904c5b80d5232de7c1899f894bc..3a74de8ff4f615b86755e18c3414b24f185c17c8 100644 --- a/Tools/WebKitTestRunner/TestController.cpp +++ b/Tools/WebKitTestRunner/TestController.cpp -@@ -983,6 +983,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options) +@@ -984,6 +984,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options) 0, // requestStorageAccessConfirm shouldAllowDeviceOrientationAndMotionAccess, runWebAuthenticationPanel, @@ -23325,128 +22815,11 @@ index c1381b06b378a5121be926b1dfda3e5509bcd051..773e5882b6f2269201ca49433d0b6986 + + } // namespace WTR -diff --git a/Tools/glib/dependencies/apt b/Tools/glib/dependencies/apt -index 65f8c1ff14a68b7961328fcc284a837c92d4f205..a2731ce34b12b0de7b476a69f906244390cf0cce 100644 ---- a/Tools/glib/dependencies/apt -+++ b/Tools/glib/dependencies/apt -@@ -68,6 +68,7 @@ PACKAGES=( - libwebp-dev - libwoff-dev - libxml2-utils -+ libxcb-glx0-dev - libxslt1-dev - mesa-common-dev - ninja-build diff --git a/Tools/jhbuild/jhbuild-minimal.modules b/Tools/jhbuild/jhbuild-minimal.modules -index 9b006a3700330c89bfbb14906acb5cbaa160b8b2..74d34b7f90ac6bd444cf444e6911d53418aec901 100644 +index 3a0b7425900b14ce2aa0d48aa914cd69bff1f332..918dc2a3ac6716708ee372278f74877324abee3d 100644 --- a/Tools/jhbuild/jhbuild-minimal.modules +++ b/Tools/jhbuild/jhbuild-minimal.modules -@@ -10,6 +10,7 @@ - - - -+ - - - -@@ -28,11 +29,11 @@ - - - -+ - - - - -- - - - -@@ -40,40 +41,22 @@ - - - -+ -+ -+ -+ - -+ -+ - -- - -- -- -- -- -- -- -- -- -- -- -- -- -- - - - -@@ -117,6 +100,32 @@ - - - -+ -+ -+ -+ -+ -+ libaom.pc -+ -+ -+ -+ -+ libavif.pc -+ -+ -+ -+ -+ -+ -+ - - - libdrm.pc -@@ -128,7 +137,6 @@ +@@ -186,7 +186,6 @@ @@ -23455,10 +22828,10 @@ index 9b006a3700330c89bfbb14906acb5cbaa160b8b2..74d34b7f90ac6bd444cf444e6911d534 diff --git a/Tools/wpe/backends/fdo/HeadlessViewBackendFdo.cpp b/Tools/wpe/backends/fdo/HeadlessViewBackendFdo.cpp -index 05b0196555fbc993ebff3088c1f5926c4cfe391a..dd82d6c324f158045372fb48552fa919d3f50b4f 100644 +index df22308266c6f69d24a60905f8d05e4e80f21b9b..2d0838070dc10793418cbb648b095a5ffa76f1b8 100644 --- a/Tools/wpe/backends/fdo/HeadlessViewBackendFdo.cpp +++ b/Tools/wpe/backends/fdo/HeadlessViewBackendFdo.cpp -@@ -180,32 +180,30 @@ void HeadlessViewBackend::updateSnapshot(PlatformBuffer exportedBuffer) +@@ -210,32 +210,30 @@ void HeadlessViewBackend::updateSnapshot(PlatformBuffer exportedBuffer) return; } @@ -23507,7 +22880,7 @@ index 05b0196555fbc993ebff3088c1f5926c4cfe391a..dd82d6c324f158045372fb48552fa919 wl_shm_buffer_end_access(shmBuffer); } -@@ -214,7 +212,7 @@ void HeadlessViewBackend::updateSnapshot(PlatformBuffer exportedBuffer) +@@ -244,7 +242,7 @@ void HeadlessViewBackend::updateSnapshot(PlatformBuffer exportedBuffer) cairo_surface_destroy(m_snapshot); m_snapshot = cairo_image_surface_create_for_data(buffer, CAIRO_FORMAT_ARGB32,