From 03031a6d2c78f79385b5180cc3a2ca38b5c4389a Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Tue, 14 Nov 2023 10:18:18 -0800 Subject: [PATCH] chore: update browser patches to d8f2e2984 (#28139) --- browser_patches/firefox/UPSTREAM_CONFIG.sh | 2 +- browser_patches/firefox/juggler/Helper.js | 1 - .../firefox/juggler/NetworkObserver.js | 1 - .../firefox/juggler/TargetRegistry.js | 1 - .../firefox/juggler/components/Juggler.js | 1 - .../juggler/content/JugglerFrameChild.jsm | 1 - .../firefox/juggler/content/PageAgent.js | 5 +- .../firefox/juggler/content/Runtime.js | 19 +- .../firefox/juggler/content/main.js | 1 - .../juggler/protocol/BrowserHandler.js | 1 - .../firefox/juggler/protocol/PageHandler.js | 1 - .../firefox/patches/bootstrap.diff | 322 ++-- browser_patches/webkit/UPSTREAM_CONFIG.sh | 2 +- browser_patches/webkit/patches/bootstrap.diff | 1670 ++++++++--------- browser_patches/webkit/pw_run.sh | 20 +- 15 files changed, 1008 insertions(+), 1040 deletions(-) diff --git a/browser_patches/firefox/UPSTREAM_CONFIG.sh b/browser_patches/firefox/UPSTREAM_CONFIG.sh index 55da63f51e..1d0ae8eca7 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="f5bc1abb4f0841558f7531e0c15a7577d23ed21c" +BASE_REVISION="bf57fe91c49f319e7f65636ed223e5f7b4b7738a" diff --git a/browser_patches/firefox/juggler/Helper.js b/browser_patches/firefox/juggler/Helper.js index 797acd4627..9572aa37ad 100644 --- a/browser_patches/firefox/juggler/Helper.js +++ b/browser_patches/firefox/juggler/Helper.js @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const uuidGen = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator); -const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); class Helper { decorateAsEventEmitter(objectToDecorate) { diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.js index c21c9effbe..a8a8321974 100644 --- a/browser_patches/firefox/juggler/NetworkObserver.js +++ b/browser_patches/firefox/juggler/NetworkObserver.js @@ -5,7 +5,6 @@ "use strict"; const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js'); -const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm'); const { ChannelEventSinkFactory } = ChromeUtils.import("chrome://remote/content/cdp/observers/ChannelEventSink.jsm"); diff --git a/browser_patches/firefox/juggler/TargetRegistry.js b/browser_patches/firefox/juggler/TargetRegistry.js index 479d04d144..25be3c67af 100644 --- a/browser_patches/firefox/juggler/TargetRegistry.js +++ b/browser_patches/firefox/juggler/TargetRegistry.js @@ -4,7 +4,6 @@ const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js'); const {SimpleChannel} = ChromeUtils.import('chrome://juggler/content/SimpleChannel.js'); -const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const {Preferences} = ChromeUtils.import("resource://gre/modules/Preferences.jsm"); const {ContextualIdentityService} = ChromeUtils.import("resource://gre/modules/ContextualIdentityService.jsm"); const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm'); diff --git a/browser_patches/firefox/juggler/components/Juggler.js b/browser_patches/firefox/juggler/components/Juggler.js index a3740acc45..d919935fb5 100644 --- a/browser_patches/firefox/juggler/components/Juggler.js +++ b/browser_patches/firefox/juggler/components/Juggler.js @@ -6,7 +6,6 @@ var EXPORTED_SYMBOLS = ["Juggler", "JugglerFactory"]; const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); const {ComponentUtils} = ChromeUtils.import("resource://gre/modules/ComponentUtils.jsm"); -const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const {Dispatcher} = ChromeUtils.import("chrome://juggler/content/protocol/Dispatcher.js"); const {BrowserHandler} = ChromeUtils.import("chrome://juggler/content/protocol/BrowserHandler.js"); const {NetworkObserver} = ChromeUtils.import("chrome://juggler/content/NetworkObserver.js"); diff --git a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm index 80b532c6b9..529f6d3b58 100644 --- a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm +++ b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm @@ -1,7 +1,6 @@ "use strict"; const { Helper } = ChromeUtils.import('chrome://juggler/content/Helper.js'); -const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); const { initialize } = ChromeUtils.import('chrome://juggler/content/content/main.js'); const Ci = Components.interfaces; diff --git a/browser_patches/firefox/juggler/content/PageAgent.js b/browser_patches/firefox/juggler/content/PageAgent.js index f3a3e745c2..614d5b5101 100644 --- a/browser_patches/firefox/juggler/content/PageAgent.js +++ b/browser_patches/firefox/juggler/content/PageAgent.js @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const Ci = Components.interfaces; const Cr = Components.results; @@ -462,6 +461,10 @@ class PageAgent { } async _dispatchKeyEvent({type, keyCode, code, key, repeat, location, text}) { + if (code === 'OSLeft') + code = 'MetaLeft'; + else if (code === 'OSRight') + code = 'MetaRight'; const frame = this._frameTree.mainFrame(); const tip = frame.textInputProcessor(); if (key === 'Meta' && Services.appinfo.OS !== 'Darwin') diff --git a/browser_patches/firefox/juggler/content/Runtime.js b/browser_patches/firefox/juggler/content/Runtime.js index 3a132ae542..a5fa7a03dd 100644 --- a/browser_patches/firefox/juggler/content/Runtime.js +++ b/browser_patches/firefox/juggler/content/Runtime.js @@ -63,7 +63,6 @@ class Runtime { if (isWorker) { this._registerWorkerConsoleHandler(); } else { - const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); this._registerConsoleServiceListener(Services); this._registerConsoleAPIListener(Services); } @@ -240,8 +239,8 @@ class Runtime { return {success: true, obj: obj.promiseValue}; if (obj.promiseState === 'rejected') { const debuggee = executionContext._debuggee; - exceptionDetails.text = debuggee.executeInGlobalWithBindings('e.message', {e: obj.promiseReason}).return; - exceptionDetails.stack = debuggee.executeInGlobalWithBindings('e.stack', {e: obj.promiseReason}).return; + exceptionDetails.text = debuggee.executeInGlobalWithBindings('e.message', {e: obj.promiseReason}, {useInnerBindings: true}).return; + exceptionDetails.stack = debuggee.executeInGlobalWithBindings('e.stack', {e: obj.promiseReason}, {useInnerBindings: true}).return; return {success: false, obj: null}; } let resolve, reject; @@ -268,8 +267,8 @@ class Runtime { return; }; const debuggee = pendingPromise.executionContext._debuggee; - pendingPromise.exceptionDetails.text = debuggee.executeInGlobalWithBindings('e.message', {e: obj.promiseReason}).return; - pendingPromise.exceptionDetails.stack = debuggee.executeInGlobalWithBindings('e.stack', {e: obj.promiseReason}).return; + pendingPromise.exceptionDetails.text = debuggee.executeInGlobalWithBindings('e.message', {e: obj.promiseReason}, {useInnerBindings: true}).return; + pendingPromise.exceptionDetails.stack = debuggee.executeInGlobalWithBindings('e.stack', {e: obj.promiseReason}, {useInnerBindings: true}).return; pendingPromise.resolve({success: false, obj: null}); } @@ -442,7 +441,7 @@ class ExecutionContext { _instanceOf(debuggerObj, rawObj, className) { if (this._domWindow) return rawObj instanceof this._domWindow[className]; - return this._debuggee.executeInGlobalWithBindings('o instanceof this[className]', {o: debuggerObj, className: this._debuggee.makeDebuggeeValue(className)}).return; + return this._debuggee.executeInGlobalWithBindings('o instanceof this[className]', {o: debuggerObj, className: this._debuggee.makeDebuggeeValue(className)}, {useInnerBindings: true}).return; } _createRemoteObject(debuggerObj) { @@ -532,7 +531,7 @@ class ExecutionContext { } _serialize(obj) { - const result = this._debuggee.executeInGlobalWithBindings('stringify(e)', {e: obj, stringify: this._jsonStringifyObject}); + const result = this._debuggee.executeInGlobalWithBindings('stringify(e)', {e: obj, stringify: this._jsonStringifyObject}, {useInnerBindings: true}); if (result.throw) throw new Error('Object is not serializable'); return result.return === undefined ? undefined : JSON.parse(result.return); @@ -564,9 +563,9 @@ class ExecutionContext { if (!completionValue) throw new Error('evaluation terminated'); if (completionValue.throw) { - if (this._debuggee.executeInGlobalWithBindings('e instanceof Error', {e: completionValue.throw}).return) { - exceptionDetails.text = this._debuggee.executeInGlobalWithBindings('e.message', {e: completionValue.throw}).return; - exceptionDetails.stack = this._debuggee.executeInGlobalWithBindings('e.stack', {e: completionValue.throw}).return; + if (this._debuggee.executeInGlobalWithBindings('e instanceof Error', {e: completionValue.throw}, {useInnerBindings: true}).return) { + exceptionDetails.text = this._debuggee.executeInGlobalWithBindings('e.message', {e: completionValue.throw}, {useInnerBindings: true}).return; + exceptionDetails.stack = this._debuggee.executeInGlobalWithBindings('e.stack', {e: completionValue.throw}, {useInnerBindings: true}).return; } else { exceptionDetails.value = this._serialize(completionValue.throw); } diff --git a/browser_patches/firefox/juggler/content/main.js b/browser_patches/firefox/juggler/content/main.js index eb971b5d4d..4b891b3a76 100644 --- a/browser_patches/firefox/juggler/content/main.js +++ b/browser_patches/firefox/juggler/content/main.js @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js'); const {FrameTree} = ChromeUtils.import('chrome://juggler/content/content/FrameTree.js'); const {SimpleChannel} = ChromeUtils.import('chrome://juggler/content/SimpleChannel.js'); diff --git a/browser_patches/firefox/juggler/protocol/BrowserHandler.js b/browser_patches/firefox/juggler/protocol/BrowserHandler.js index df32c10bb6..7bec58108a 100644 --- a/browser_patches/firefox/juggler/protocol/BrowserHandler.js +++ b/browser_patches/firefox/juggler/protocol/BrowserHandler.js @@ -5,7 +5,6 @@ "use strict"; const {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); -const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const {TargetRegistry} = ChromeUtils.import("chrome://juggler/content/TargetRegistry.js"); const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js'); const {PageHandler} = ChromeUtils.import("chrome://juggler/content/protocol/PageHandler.js"); diff --git a/browser_patches/firefox/juggler/protocol/PageHandler.js b/browser_patches/firefox/juggler/protocol/PageHandler.js index 7d148fa113..d526e93caa 100644 --- a/browser_patches/firefox/juggler/protocol/PageHandler.js +++ b/browser_patches/firefox/juggler/protocol/PageHandler.js @@ -5,7 +5,6 @@ "use strict"; const {Helper, EventWatcher} = ChromeUtils.import('chrome://juggler/content/Helper.js'); -const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm"); const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm'); const {NetworkObserver, PageNetwork} = ChromeUtils.import('chrome://juggler/content/NetworkObserver.js'); const {PageTarget} = ChromeUtils.import('chrome://juggler/content/TargetRegistry.js'); diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diff index 4881645247..a16414d2d7 100644 --- a/browser_patches/firefox/patches/bootstrap.diff +++ b/browser_patches/firefox/patches/bootstrap.diff @@ -26,10 +26,10 @@ index 1886621c373fe1fd5ff54092afc4c64e9ca9a8fd..a0febf72885410b45227171c63e823ec + readonly attribute boolean isUpdatePendingForJugglerAccessibility; }; diff --git a/accessible/xpcom/xpcAccessibleDocument.cpp b/accessible/xpcom/xpcAccessibleDocument.cpp -index 94b04cf2f653a4b7274897eb6051dccdd4fe8404..fd6775e71c3d7c348ab2f1c5b4ea2dc4c18f787c 100644 +index d616e476b2149de5703077563680905e40db0459..7a8a48d5e7303a298a3e2e9fdf64558b3cdbe654 100644 --- a/accessible/xpcom/xpcAccessibleDocument.cpp +++ b/accessible/xpcom/xpcAccessibleDocument.cpp -@@ -132,6 +132,13 @@ xpcAccessibleDocument::GetChildDocumentAt(uint32_t aIndex, +@@ -131,6 +131,13 @@ xpcAccessibleDocument::GetChildDocumentAt(uint32_t aIndex, return *aDocument ? NS_OK : NS_ERROR_INVALID_ARG; } @@ -106,10 +106,10 @@ index 93e7dbae2281680827abb482f6f34e90076f3b3a..f7045a29c6ed50876775abe2d45a47df gmp-clearkey/0.1/manifest.json i686/gmp-clearkey/0.1/manifest.json diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in -index 41d13e23c4f4160e469aa81a632b5ed336130edb..3d690727ba3394485093f062093f26b2739ee497 100644 +index 5296d2b4b195d6c5d3f61aa43ea8d1d2fdad053f..f60e585d11167579418592f702788fb0ff6d5db5 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in -@@ -203,6 +203,9 @@ +@@ -197,6 +197,9 @@ @RESPATH@/chrome/remote.manifest #endif @@ -167,10 +167,10 @@ index 4236ec2921bd57c58cfffdf1cdcf509d76fca3db..23d0cb1f06bb8c7a1cac8fcec94a99fb const transportProvider = { setListener(upgradeListener) { diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp -index db232f63e48e2950a997baac63f2b3cc069ddb18..3d2088308789276ad8e940dda4ebf3800f487e3a 100644 +index ebf183695a5473c4b01fd2a27682128c9f678349..1180f2334ac46b3a824b2d541e5f7d9dc9f81895 100644 --- a/docshell/base/BrowsingContext.cpp +++ b/docshell/base/BrowsingContext.cpp -@@ -113,6 +113,20 @@ struct ParamTraits +@@ -114,6 +114,20 @@ struct ParamTraits mozilla::dom::PrefersColorSchemeOverride::None, mozilla::dom::PrefersColorSchemeOverride::EndGuard_> {}; @@ -191,7 +191,7 @@ index db232f63e48e2950a997baac63f2b3cc069ddb18..3d2088308789276ad8e940dda4ebf380 template <> struct ParamTraits : public ContiguousEnumSerializer< -@@ -2746,6 +2760,40 @@ void BrowsingContext::DidSet(FieldIndex, +@@ -2781,6 +2795,40 @@ void BrowsingContext::DidSet(FieldIndex, PresContextAffectingFieldChanged(); } @@ -233,10 +233,10 @@ index db232f63e48e2950a997baac63f2b3cc069ddb18..3d2088308789276ad8e940dda4ebf380 nsString&& aOldValue) { MOZ_ASSERT(IsTop()); diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h -index 4c245337b7db24f94011ad75fa2a3b32c9a3574c..946b4592794499455b7e2d7d208b7ca43242a414 100644 +index 3c8a11e5dcbb37ad915d63bbd5ad9fa11b3dcac8..92dc6aa8961ba35a9c0c2943f7201be55c29b9da 100644 --- a/docshell/base/BrowsingContext.h +++ b/docshell/base/BrowsingContext.h -@@ -199,10 +199,10 @@ struct EmbedderColorSchemes { +@@ -200,10 +200,10 @@ struct EmbedderColorSchemes { FIELD(GVInaudibleAutoplayRequestStatus, GVAutoplayRequestStatus) \ /* ScreenOrientation-related APIs */ \ FIELD(CurrentOrientationAngle, float) \ @@ -249,7 +249,7 @@ index 4c245337b7db24f94011ad75fa2a3b32c9a3574c..946b4592794499455b7e2d7d208b7ca4 FIELD(EmbedderElementType, Maybe) \ FIELD(MessageManagerGroup, nsString) \ FIELD(MaxTouchPointsOverride, uint8_t) \ -@@ -240,6 +240,10 @@ struct EmbedderColorSchemes { +@@ -241,6 +241,10 @@ struct EmbedderColorSchemes { * embedder element. */ \ FIELD(EmbedderColorSchemes, EmbedderColorSchemes) \ FIELD(DisplayMode, dom::DisplayMode) \ @@ -260,7 +260,7 @@ index 4c245337b7db24f94011ad75fa2a3b32c9a3574c..946b4592794499455b7e2d7d208b7ca4 /* The number of entries added to the session history because of this \ * browsing context. */ \ FIELD(HistoryEntryCount, uint32_t) \ -@@ -924,6 +928,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { +@@ -919,6 +923,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { return GetPrefersColorSchemeOverride(); } @@ -275,7 +275,7 @@ index 4c245337b7db24f94011ad75fa2a3b32c9a3574c..946b4592794499455b7e2d7d208b7ca4 bool IsInBFCache() const; bool AllowJavascript() const { return GetAllowJavascript(); } -@@ -1085,6 +1097,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { +@@ -1083,6 +1095,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { void WalkPresContexts(Callback&&); void PresContextAffectingFieldChanged(); @@ -300,10 +300,10 @@ index 4c245337b7db24f94011ad75fa2a3b32c9a3574c..946b4592794499455b7e2d7d208b7ca4 bool CanSet(FieldIndex, bool, ContentParent*) { diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp -index 42a6700afa0e9ff3c5161b1d18f327b3d9ed76f8..3b83cafc2e549fe3affad3547a1b145f821a888d 100644 +index 2f383a90e6600e051bd5ade5c131b4f54f14eb0f..73c17acec9c187dba8250659fede89ce6360d0dc 100644 --- a/docshell/base/CanonicalBrowsingContext.cpp +++ b/docshell/base/CanonicalBrowsingContext.cpp -@@ -1456,6 +1456,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI, +@@ -1467,6 +1467,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI, return; } @@ -317,7 +317,7 @@ index 42a6700afa0e9ff3c5161b1d18f327b3d9ed76f8..3b83cafc2e549fe3affad3547a1b145f } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp -index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531eac3d5da9 100644 +index 85b49f3d8d380275125ff5bff205b66a587d0071..2dbd5d543a0e688beba81d7ed58e779e38e9e2f6 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -15,6 +15,12 @@ @@ -357,15 +357,15 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e #include "nsIDocumentLoaderFactory.h" #include "nsIDOMWindow.h" #include "nsIEditingSession.h" -@@ -207,6 +216,7 @@ - #include "nsFocusManager.h" - #include "nsGlobalWindow.h" +@@ -208,6 +217,7 @@ + #include "nsGlobalWindowInner.h" + #include "nsGlobalWindowOuter.h" #include "nsJSEnvironment.h" +#include "nsJSUtils.h" #include "nsNetCID.h" #include "nsNetUtil.h" #include "nsObjectLoadingContent.h" -@@ -349,6 +359,14 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext, +@@ -350,6 +360,14 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext, mAllowDNSPrefetch(true), mAllowWindowControl(true), mCSSErrorReportingEnabled(false), @@ -380,7 +380,7 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e mAllowAuth(mItemType == typeContent), mAllowKeywordFixup(false), mDisableMetaRefreshWhenInactive(false), -@@ -3197,6 +3215,234 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) { +@@ -3203,6 +3221,234 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) { return NS_OK; } @@ -615,7 +615,7 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e NS_IMETHODIMP nsDocShell::GetIsNavigating(bool* aOut) { *aOut = mIsNavigating; -@@ -4876,7 +5122,7 @@ nsDocShell::GetVisibility(bool* aVisibility) { +@@ -4894,7 +5140,7 @@ nsDocShell::GetVisibility(bool* aVisibility) { } void nsDocShell::ActivenessMaybeChanged() { @@ -624,7 +624,7 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e if (RefPtr presShell = GetPresShell()) { presShell->ActivenessMaybeChanged(); } -@@ -6809,6 +7055,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType, +@@ -6829,6 +7075,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType, return false; // no entry to save into } @@ -635,7 +635,7 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e MOZ_ASSERT(!mozilla::SessionHistoryInParent(), "mOSHE cannot be non-null with SHIP"); nsCOMPtr viewer = mOSHE->GetContentViewer(); -@@ -8590,6 +8840,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) { +@@ -8613,6 +8863,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) { true, // aForceNoOpener getter_AddRefs(newBC)); MOZ_ASSERT(!newBC); @@ -648,7 +648,7 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e return rv; } -@@ -9665,6 +9921,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState, +@@ -9688,6 +9944,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState, nsINetworkPredictor::PREDICT_LOAD, attrs, nullptr); nsCOMPtr req; @@ -665,7 +665,7 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e rv = DoURILoad(aLoadState, aCacheKey, getter_AddRefs(req)); if (NS_SUCCEEDED(rv)) { -@@ -12825,6 +13091,9 @@ class OnLinkClickEvent : public Runnable { +@@ -12861,6 +13127,9 @@ class OnLinkClickEvent : public Runnable { mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied, mTriggeringPrincipal); } @@ -675,7 +675,7 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e return NS_OK; } -@@ -12909,6 +13178,8 @@ nsresult nsDocShell::OnLinkClick( +@@ -12945,6 +13214,8 @@ nsresult nsDocShell::OnLinkClick( nsCOMPtr ev = new OnLinkClickEvent(this, aContent, loadState, noOpenerImplied, aIsTrusted, aTriggeringPrincipal); @@ -685,7 +685,7 @@ index fb1b70fbcff37a233a4396a768358a36e773ddc3..c1c654f99462f2868607729c9126531e } diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h -index 0f360bf1f5f2e9067f42d270b4fb6745116a0ee2..8eee7e4d1a287b38d2d2aa1af1ac719a6c7c940b 100644 +index 21cd7c944b391bf0333c7bdc815200db33ef0afe..aa8d79b0d3bd34419c5d625678f3cd1231e2b46f 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -16,6 +16,7 @@ @@ -729,7 +729,7 @@ index 0f360bf1f5f2e9067f42d270b4fb6745116a0ee2..8eee7e4d1a287b38d2d2aa1af1ac719a // 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 -@@ -1323,6 +1336,17 @@ class nsDocShell final : public nsDocLoader, +@@ -1327,6 +1340,17 @@ class nsDocShell final : public nsDocLoader, bool mAllowDNSPrefetch : 1; bool mAllowWindowControl : 1; bool mCSSErrorReportingEnabled : 1; @@ -804,10 +804,10 @@ index 68f32e968c7e1bc1d0b2b2894320a177a9ae44d2..9e61465ffad927d7b3e972f753940196 * 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 b8d736619d4ea457b7db95d1815bd85697475133..d128299ab7a5e7f8fb00474571805361df0e00d2 100644 +index e8788de4fff443ee3dfc0830b759ba5eadd24591..ee7556aa27ea65af6dd0997cbe7fdef376915ed8 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp -@@ -3682,6 +3682,9 @@ void Document::SendToConsole(nsCOMArray& aMessages) { +@@ -3674,6 +3674,9 @@ void Document::SendToConsole(nsCOMArray& aMessages) { } void Document::ApplySettingsFromCSP(bool aSpeculative) { @@ -817,7 +817,7 @@ index b8d736619d4ea457b7db95d1815bd85697475133..d128299ab7a5e7f8fb00474571805361 nsresult rv = NS_OK; if (!aSpeculative) { // 1) apply settings from regular CSP -@@ -3739,6 +3742,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) { +@@ -3731,6 +3734,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) { MOZ_ASSERT(!mScriptGlobalObject, "CSP must be initialized before mScriptGlobalObject is set!"); @@ -829,7 +829,7 @@ index b8d736619d4ea457b7db95d1815bd85697475133..d128299ab7a5e7f8fb00474571805361 // If this is a data document - no need to set CSP. if (mLoadedAsData) { return NS_OK; -@@ -4578,6 +4586,10 @@ bool Document::HasFocus(ErrorResult& rv) const { +@@ -4568,6 +4576,10 @@ bool Document::HasFocus(ErrorResult& rv) const { return false; } @@ -840,7 +840,7 @@ index b8d736619d4ea457b7db95d1815bd85697475133..d128299ab7a5e7f8fb00474571805361 if (!fm->IsInActiveWindow(bc)) { return false; } -@@ -18471,6 +18483,68 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const { +@@ -18552,6 +18564,68 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const { return LookAndFeel::PreferredColorSchemeForContent(); } @@ -910,10 +910,10 @@ index b8d736619d4ea457b7db95d1815bd85697475133..d128299ab7a5e7f8fb00474571805361 if (!sLoadingForegroundTopLevelContentDocument) { return false; diff --git a/dom/base/Document.h b/dom/base/Document.h -index bb4e5a8e8114167d442e3593d240de74e9a6b12a..1a7b0a0bb8431c6c17dc0ccb1600ad97bbe005cd 100644 +index 11df804cff46806024f735c5cc907a9554ba1bd6..f6ce23bea6824dcedd545da6d95cde59037f24a6 100644 --- a/dom/base/Document.h +++ b/dom/base/Document.h -@@ -4067,6 +4067,9 @@ class Document : public nsINode, +@@ -4059,6 +4059,9 @@ class Document : public nsINode, // color-scheme meta tag. ColorScheme DefaultColorScheme() const; @@ -924,10 +924,10 @@ index bb4e5a8e8114167d442e3593d240de74e9a6b12a..1a7b0a0bb8431c6c17dc0ccb1600ad97 static bool AutomaticStorageAccessPermissionCanBeGranted( diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp -index eedeee0364cefb0bcf5412483f452cb5454eb1a5..922775338a270ecd70f2ad284e627da63b37cb5b 100644 +index 9a5f6913b0682ad39824a2504734e58af9ae845e..baf24386e37daac95700d0715bf00cca1ebcd84f 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp -@@ -330,14 +330,18 @@ void Navigator::GetAppName(nsAString& aAppName, CallerType aCallerType) const { +@@ -327,14 +327,18 @@ void Navigator::GetAppName(nsAString& aAppName) const { * for more detail. */ /* static */ @@ -948,7 +948,7 @@ index eedeee0364cefb0bcf5412483f452cb5454eb1a5..922775338a270ecd70f2ad284e627da6 // Split values on commas. for (nsDependentSubstring lang : -@@ -389,7 +393,13 @@ void Navigator::GetLanguage(nsAString& aLanguage) { +@@ -386,7 +390,13 @@ void Navigator::GetLanguage(nsAString& aLanguage) { } void Navigator::GetLanguages(nsTArray& aLanguages) { @@ -963,7 +963,7 @@ index eedeee0364cefb0bcf5412483f452cb5454eb1a5..922775338a270ecd70f2ad284e627da6 // 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 -@@ -564,7 +574,13 @@ bool Navigator::CookieEnabled() { +@@ -561,7 +571,13 @@ bool Navigator::CookieEnabled() { return granted; } @@ -979,10 +979,10 @@ index eedeee0364cefb0bcf5412483f452cb5454eb1a5..922775338a270ecd70f2ad284e627da6 void Navigator::GetBuildID(nsAString& aBuildID, CallerType aCallerType, ErrorResult& aRv) const { diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h -index cbe8d6bb27eb75b1c0eb920c69eccc99fd6133b2..49da35b1f9ec2a81c5886f277fd52ec492ca8418 100644 +index f878c11dff3d448dfa2520c7fe7e4e9cb63f7ea7..c1a30391eb31e28e1c22dff82bb9526bc7e058dd 100644 --- a/dom/base/Navigator.h +++ b/dom/base/Navigator.h -@@ -216,7 +216,7 @@ class Navigator final : public nsISupports, public nsWrapperCache { +@@ -213,7 +213,7 @@ class Navigator final : public nsISupports, public nsWrapperCache { StorageManager* Storage(); @@ -992,10 +992,10 @@ index cbe8d6bb27eb75b1c0eb920c69eccc99fd6133b2..49da35b1f9ec2a81c5886f277fd52ec4 dom::MediaCapabilities* MediaCapabilities(); dom::MediaSession* MediaSession(); diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp -index 5cb5a088269287b6f9a3d36cca658043464cd5cc..d0b4929c5996efc03392b7093d14e01cabab8acf 100644 +index 52650a856f8e69069c857327fb63d27f4be1ccfb..0a125653d377065b79ef8d63a1062ab83525a643 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp -@@ -8520,7 +8520,8 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8554,7 +8554,8 @@ nsresult nsContentUtils::SendMouseEvent( bool aIgnoreRootScrollFrame, float aPressure, unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow, PreventDefaultResult* aPreventDefault, bool aIsDOMEventSynthesized, @@ -1005,7 +1005,7 @@ index 5cb5a088269287b6f9a3d36cca658043464cd5cc..d0b4929c5996efc03392b7093d14e01c nsPoint offset; nsCOMPtr widget = GetWidget(aPresShell, &offset); if (!widget) return NS_ERROR_FAILURE; -@@ -8528,6 +8529,7 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8562,6 +8563,7 @@ nsresult nsContentUtils::SendMouseEvent( EventMessage msg; Maybe exitFrom; bool contextMenuKey = false; @@ -1013,7 +1013,7 @@ index 5cb5a088269287b6f9a3d36cca658043464cd5cc..d0b4929c5996efc03392b7093d14e01c if (aType.EqualsLiteral("mousedown")) { msg = eMouseDown; } else if (aType.EqualsLiteral("mouseup")) { -@@ -8552,6 +8554,12 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8586,6 +8588,12 @@ nsresult nsContentUtils::SendMouseEvent( msg = eMouseHitTest; } else if (aType.EqualsLiteral("MozMouseExploreByTouch")) { msg = eMouseExploreByTouch; @@ -1026,7 +1026,7 @@ index 5cb5a088269287b6f9a3d36cca658043464cd5cc..d0b4929c5996efc03392b7093d14e01c } else { return NS_ERROR_FAILURE; } -@@ -8560,12 +8568,21 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8594,12 +8602,21 @@ nsresult nsContentUtils::SendMouseEvent( aInputSourceArg = MouseEvent_Binding::MOZ_SOURCE_MOUSE; } @@ -1050,7 +1050,7 @@ index 5cb5a088269287b6f9a3d36cca658043464cd5cc..d0b4929c5996efc03392b7093d14e01c event.pointerId = aIdentifier; event.mModifiers = GetWidgetModifiers(aModifiers); event.mButton = aButton; -@@ -8576,8 +8593,10 @@ nsresult nsContentUtils::SendMouseEvent( +@@ -8610,8 +8627,10 @@ nsresult nsContentUtils::SendMouseEvent( event.mPressure = aPressure; event.mInputSource = aInputSourceArg; event.mClickCount = aClickCount; @@ -1062,10 +1062,10 @@ index 5cb5a088269287b6f9a3d36cca658043464cd5cc..d0b4929c5996efc03392b7093d14e01c nsPresContext* presContext = aPresShell->GetPresContext(); if (!presContext) return NS_ERROR_FAILURE; diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h -index 1259b13761c2d51e1ddca54433a49b2a5949a790..ec356bb54f04249d19a984e1f4b2d5d57009b64f 100644 +index b09dacc2be6db55a3c11a7f8b89eee9a131fde91..fbeb1b2fe9f14e63c416b0501d08cd7855d95476 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h -@@ -2934,7 +2934,8 @@ class nsContentUtils { +@@ -2947,7 +2947,8 @@ class nsContentUtils { int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow, mozilla::PreventDefaultResult* aPreventDefault, @@ -1076,7 +1076,7 @@ index 1259b13761c2d51e1ddca54433a49b2a5949a790..ec356bb54f04249d19a984e1f4b2d5d5 static void FirePageShowEventForFrameLoaderSwap( nsIDocShellTreeItem* aItem, diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp -index 2ccd99469917b6fc0b0c99f8ff579d7040e65669..2968275ddc32b7bb9eb7337ef90328bb00c1aabf 100644 +index 991fe527e558d47ed79b7ae46fe0f6ee12d9fdab..c688fab82de76b00cc8b45dd3d465a7e6fcb6fd5 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -684,6 +684,26 @@ nsDOMWindowUtils::GetPresShellId(uint32_t* aPresShellId) { @@ -1154,10 +1154,10 @@ index 63968c9b7a4e418e4c0de6e7a75fa215a36a9105..decf3ea3833ccdffd49a7aded2d600f9 MOZ_CAN_RUN_SCRIPT nsresult SendTouchEventCommon( diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp -index ba77a1f00d43be4ec98b698cf0d9f4fab8343dd2..f146d1dfadbaa2e75f8b60f3dafe056a179ef018 100644 +index 141617e93a6bf4d0b15f7461c87124b9d5d2b69d..9bfd6ba7e28a9aeb78993d9c6a7639b176fa4363 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp -@@ -1656,6 +1656,10 @@ Maybe nsFocusManager::SetFocusInner(Element* aNewContent, +@@ -1671,6 +1671,10 @@ Maybe nsFocusManager::SetFocusInner(Element* aNewContent, (GetActiveBrowsingContext() == newRootBrowsingContext); } @@ -1168,7 +1168,7 @@ index ba77a1f00d43be4ec98b698cf0d9f4fab8343dd2..f146d1dfadbaa2e75f8b60f3dafe056a // Exit fullscreen if a website focuses another window if (StaticPrefs::full_screen_api_exit_on_windowRaise() && !isElementInActiveWindow && (aFlags & FLAG_RAISE)) { -@@ -2946,7 +2950,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow, +@@ -2942,7 +2946,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow, } } @@ -1180,10 +1180,10 @@ index ba77a1f00d43be4ec98b698cf0d9f4fab8343dd2..f146d1dfadbaa2e75f8b60f3dafe056a // 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 9893fb0ed13eeebe55f8eda7bb3d898ff6eebba7..247784c89d5d68840638f40f77523e600f13bbf6 100644 +index c9a45b8a21e63f344704637d325383d240584fa7..661c41aecad66814690190d8229c30e32a94da21 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp -@@ -2482,7 +2482,7 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument, +@@ -2489,7 +2489,7 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument, &nsGlobalWindowInner::FireOnNewGlobalObject)); } @@ -1192,7 +1192,7 @@ index 9893fb0ed13eeebe55f8eda7bb3d898ff6eebba7..247784c89d5d68840638f40f77523e60 // We should probably notify. However if this is the, arguably bad, // situation when we're creating a temporary non-chrome-about-blank // document in a chrome docshell, don't notify just yet. Instead wait -@@ -2501,10 +2501,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument, +@@ -2508,10 +2508,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument, }(); if (!isContentAboutBlankInChromeDocshell) { @@ -1213,7 +1213,7 @@ index 9893fb0ed13eeebe55f8eda7bb3d898ff6eebba7..247784c89d5d68840638f40f77523e60 } } -@@ -2625,6 +2631,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() { +@@ -2632,6 +2638,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() { } } @@ -1234,10 +1234,10 @@ index 9893fb0ed13eeebe55f8eda7bb3d898ff6eebba7..247784c89d5d68840638f40f77523e60 void nsGlobalWindowOuter::SetDocShell(nsDocShell* aDocShell) { diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h -index 0919dfe52ab1ced87c5483d0a60945f688f0eefe..c826b05d8599b7bf80415bdad1969a84a467a7ba 100644 +index 8a891ca19a56ff0cdecab26e1d6bb78f32b91abd..c05023ca6a88e0caef5b709a4f8c2846894d5c3c 100644 --- a/dom/base/nsGlobalWindowOuter.h +++ b/dom/base/nsGlobalWindowOuter.h -@@ -325,6 +325,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget, +@@ -314,6 +314,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget, // Outer windows only. void DispatchDOMWindowCreated(); @@ -1246,7 +1246,7 @@ index 0919dfe52ab1ced87c5483d0a60945f688f0eefe..c826b05d8599b7bf80415bdad1969a84 // Outer windows only. virtual void EnsureSizeAndPositionUpToDate() override; diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp -index f2b1afabd27c3652632074c1788c4320277ef89f..bc60ca7e4820f9db27a4296acd27e86684ce59eb 100644 +index 77016f314939bf6ac11b48db1f71d1d3a82d4e83..67440e2643eb3f098e8e790179634216da7f851f 100644 --- a/dom/base/nsINode.cpp +++ b/dom/base/nsINode.cpp @@ -1358,6 +1358,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions, @@ -1312,10 +1312,10 @@ index f2b1afabd27c3652632074c1788c4320277ef89f..bc60ca7e4820f9db27a4296acd27e866 DOMQuad& aQuad, const GeometryNode& aFrom, const ConvertCoordinateOptions& aOptions, CallerType aCallerType, diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h -index 3617a4a3e31592c1cde00170ecf7b86cf4ab4737..51db576475772b5b9e1e5f87bb690577151b724b 100644 +index 9554650de24d35077ad20d977b7d3b1f1aa1be36..7a7ab8f2d62605ee80501ef4c26a4f6c5ab7f4b3 100644 --- a/dom/base/nsINode.h +++ b/dom/base/nsINode.h -@@ -2193,6 +2193,10 @@ class nsINode : public mozilla::dom::EventTarget { +@@ -2201,6 +2201,10 @@ class nsINode : public mozilla::dom::EventTarget { nsTArray>& aResult, ErrorResult& aRv); @@ -1327,10 +1327,10 @@ index 3617a4a3e31592c1cde00170ecf7b86cf4ab4737..51db576475772b5b9e1e5f87bb690577 DOMQuad& aQuad, const TextOrElementOrDocument& aFrom, const ConvertCoordinateOptions& aOptions, CallerType aCallerType, diff --git a/dom/base/nsJSUtils.cpp b/dom/base/nsJSUtils.cpp -index 86fe04583c34bd84f7239c3515c9f335d84f48a2..b6705bc48f216e856b556349d206756a0cf91867 100644 +index 66b0a09dda9e57f41643da11abb079896b9634d9..eb1dacdce7c8426de3f3cd34d2c22d1d13f49b5a 100644 --- a/dom/base/nsJSUtils.cpp +++ b/dom/base/nsJSUtils.cpp -@@ -169,6 +169,11 @@ bool nsJSUtils::GetScopeChainForElement( +@@ -177,6 +177,11 @@ bool nsJSUtils::GetScopeChainForElement( return true; } @@ -1343,10 +1343,10 @@ index 86fe04583c34bd84f7239c3515c9f335d84f48a2..b6705bc48f216e856b556349d206756a void nsJSUtils::ResetTimeZone() { JS::ResetTimeZone(); } diff --git a/dom/base/nsJSUtils.h b/dom/base/nsJSUtils.h -index 67682173f45c6a83cbad176c2922263d4f7dece9..7dd97f27bdf07673289fce62aaebe3b96492a2eb 100644 +index 36e906061588aab50dee129cc46dd2e4d3e153f8..c3591f98d4df19b166fc5c99332e559b1d499049 100644 --- a/dom/base/nsJSUtils.h +++ b/dom/base/nsJSUtils.h -@@ -78,6 +78,7 @@ class nsJSUtils { +@@ -79,6 +79,7 @@ class nsJSUtils { JSContext* aCx, mozilla::dom::Element* aElement, JS::MutableHandleVector aScopeChain); @@ -1397,7 +1397,7 @@ index db60c475931caa32110d12ba63bb56980a2b36cc..5d1d8fdceec7a73541799cbac367b173 * 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 ff6fe276e3f5a19e3e22d98c4a38222880797d99..96157d17485534f97a4e39675ee77808ac495bfe 100644 +index 197146d71e9772af04e577663dbc0213c26a62cb..0e357893cdcf0d6b627bca803aa6041107079184 100644 --- a/dom/geolocation/Geolocation.cpp +++ b/dom/geolocation/Geolocation.cpp @@ -23,6 +23,7 @@ @@ -1405,10 +1405,10 @@ index ff6fe276e3f5a19e3e22d98c4a38222880797d99..96157d17485534f97a4e39675ee77808 #include "nsContentPermissionHelper.h" #include "nsContentUtils.h" +#include "nsDocShell.h" - #include "nsGlobalWindow.h" + #include "nsGlobalWindowInner.h" #include "mozilla/dom/Document.h" #include "nsINamed.h" -@@ -260,10 +261,8 @@ nsGeolocationRequest::Allow(JS::Handle aChoices) { +@@ -259,10 +260,8 @@ nsGeolocationRequest::Allow(JS::Handle aChoices) { return NS_OK; } @@ -1421,7 +1421,7 @@ index ff6fe276e3f5a19e3e22d98c4a38222880797d99..96157d17485534f97a4e39675ee77808 CachedPositionAndAccuracy lastPosition = gs->GetCachedPosition(); if (lastPosition.position) { EpochTimeStamp cachedPositionTime_ms; -@@ -441,8 +440,7 @@ void nsGeolocationRequest::Shutdown() { +@@ -440,8 +439,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) { @@ -1431,7 +1431,7 @@ index ff6fe276e3f5a19e3e22d98c4a38222880797d99..96157d17485534f97a4e39675ee77808 if (gs) { gs->UpdateAccuracy(); } -@@ -732,8 +730,14 @@ void nsGeolocationService::StopDevice() { +@@ -730,8 +728,14 @@ void nsGeolocationService::StopDevice() { StaticRefPtr nsGeolocationService::sService; already_AddRefed @@ -1447,7 +1447,7 @@ index ff6fe276e3f5a19e3e22d98c4a38222880797d99..96157d17485534f97a4e39675ee77808 if (nsGeolocationService::sService) { result = nsGeolocationService::sService; -@@ -825,7 +829,9 @@ nsresult Geolocation::Init(nsPIDOMWindowInner* aContentDom) { +@@ -823,7 +827,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. @@ -1496,10 +1496,10 @@ index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1 ~Geolocation(); diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp -index 4a3e5b2c935ad1cfb1bff706933fc2373f90a937..d8eac957b88ea2a5edbf1f0f4fde177edcb07600 100644 +index 75536c2488bdb82f429693506cc412243ab7a49a..4049dd79838cd70ce285d64fd338fdf537dc7e2e 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp -@@ -57,6 +57,7 @@ +@@ -58,6 +58,7 @@ #include "mozilla/dom/Document.h" #include "mozilla/dom/HTMLDataListElement.h" #include "mozilla/dom/HTMLOptionElement.h" @@ -1507,7 +1507,7 @@ index 4a3e5b2c935ad1cfb1bff706933fc2373f90a937..d8eac957b88ea2a5edbf1f0f4fde177e #include "nsIFormControlFrame.h" #include "nsITextControlFrame.h" #include "nsIFrame.h" -@@ -780,6 +781,12 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) { +@@ -782,6 +783,12 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) { return NS_ERROR_FAILURE; } @@ -1521,10 +1521,10 @@ index 4a3e5b2c935ad1cfb1bff706933fc2373f90a937..d8eac957b88ea2a5edbf1f0f4fde177e return NS_OK; } diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl -index 82f7d4d206c7274858a945d5db61aa02c366e472..a23386a5749c4af48b9bb86c8c48928da6aa3a9e 100644 +index 4170a79023a2503831d080a6e65d5e143f34f241..3af08d6ea5f1cfbdc373774764a0c45fe3aa0e27 100644 --- a/dom/interfaces/base/nsIDOMWindowUtils.idl +++ b/dom/interfaces/base/nsIDOMWindowUtils.idl -@@ -374,6 +374,26 @@ interface nsIDOMWindowUtils : nsISupports { +@@ -373,6 +373,26 @@ interface nsIDOMWindowUtils : nsISupports { [optional] in long aButtons, [optional] in unsigned long aIdentifier); @@ -1552,10 +1552,10 @@ index 82f7d4d206c7274858a945d5db61aa02c366e472..a23386a5749c4af48b9bb86c8c48928d * touchstart, touchend, touchmove, and touchcancel * diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp -index 084c717432a853b8f95a087463dcce93215ca6e8..2689ba865758ce6085f68d86a5d09a27551d229c 100644 +index 9b4096d7126c03bdc1fcc12785d3f05e65212747..13e86cea216314ea77135a397a3cad67247b84e0 100644 --- a/dom/ipc/BrowserChild.cpp +++ b/dom/ipc/BrowserChild.cpp -@@ -1672,6 +1672,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent, +@@ -1670,6 +1670,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent, if (postLayerization) { postLayerization->Register(); } @@ -1592,7 +1592,7 @@ 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 2274a21e8a287932342bb4fb58af728d13b89224..367466efc8457f99c87af1d285131f7b6c71c8ef 100644 +index 3f03789fa3948bbf2528975ce112efb7eb987c24..2194e4144de537edb9a765857cc37b0af42dd8fd 100644 --- a/dom/media/systemservices/video_engine/desktop_capture_impl.cc +++ b/dom/media/systemservices/video_engine/desktop_capture_impl.cc @@ -135,11 +135,12 @@ int32_t ScreenDeviceInfoImpl::GetOrientation(const char* aDeviceUniqueIdUTF8, @@ -1611,7 +1611,7 @@ index 2274a21e8a287932342bb4fb58af728d13b89224..367466efc8457f99c87af1d285131f7b } int32_t WindowDeviceInfoImpl::Init() { -@@ -408,7 +409,7 @@ static bool UsePipewire() { +@@ -405,7 +406,7 @@ static bool UsePipewire() { static std::unique_ptr CreateDesktopCapturerAndThread( CaptureDeviceType aDeviceType, DesktopCapturer::SourceId aSourceId, @@ -1620,7 +1620,7 @@ index 2274a21e8a287932342bb4fb58af728d13b89224..367466efc8457f99c87af1d285131f7b DesktopCaptureOptions options = CreateDesktopCaptureOptions(); std::unique_ptr capturer; -@@ -458,8 +459,10 @@ static std::unique_ptr CreateDesktopCapturerAndThread( +@@ -455,8 +456,10 @@ static std::unique_ptr CreateDesktopCapturerAndThread( capturer->SelectSource(aSourceId); @@ -1633,7 +1633,7 @@ index 2274a21e8a287932342bb4fb58af728d13b89224..367466efc8457f99c87af1d285131f7b } 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. -@@ -476,7 +479,8 @@ static std::unique_ptr CreateDesktopCapturerAndThread( +@@ -473,7 +476,8 @@ static std::unique_ptr CreateDesktopCapturerAndThread( } DesktopCaptureImpl::DesktopCaptureImpl(const int32_t aId, const char* aUniqueId, @@ -1643,7 +1643,7 @@ index 2274a21e8a287932342bb4fb58af728d13b89224..367466efc8457f99c87af1d285131f7b : mModuleId(aId), mTrackingId(mozilla::TrackingId(CaptureEngineToTrackingSourceStr([&] { switch (aType) { -@@ -493,6 +497,7 @@ DesktopCaptureImpl::DesktopCaptureImpl(const int32_t aId, const char* aUniqueId, +@@ -490,6 +494,7 @@ DesktopCaptureImpl::DesktopCaptureImpl(const int32_t aId, const char* aUniqueId, aId)), mDeviceUniqueId(aUniqueId), mDeviceType(aType), @@ -1651,7 +1651,7 @@ index 2274a21e8a287932342bb4fb58af728d13b89224..367466efc8457f99c87af1d285131f7b mControlThread(mozilla::GetCurrentSerialEventTarget()), mNextFrameMinimumTime(Timestamp::Zero()), mCallbacks("DesktopCaptureImpl::mCallbacks") {} -@@ -517,6 +522,19 @@ void DesktopCaptureImpl::DeRegisterCaptureDataCallback( +@@ -514,6 +519,19 @@ void DesktopCaptureImpl::DeRegisterCaptureDataCallback( } } @@ -1671,7 +1671,7 @@ index 2274a21e8a287932342bb4fb58af728d13b89224..367466efc8457f99c87af1d285131f7b int32_t DesktopCaptureImpl::StopCaptureIfAllClientsClose() { { auto callbacks = mCallbacks.Lock(); -@@ -549,7 +567,7 @@ int32_t DesktopCaptureImpl::StartCapture( +@@ -546,7 +564,7 @@ int32_t DesktopCaptureImpl::StartCapture( DesktopCapturer::SourceId sourceId = std::stoi(mDeviceUniqueId); std::unique_ptr capturer = CreateDesktopCapturerAndThread( @@ -1680,7 +1680,7 @@ index 2274a21e8a287932342bb4fb58af728d13b89224..367466efc8457f99c87af1d285131f7b MOZ_ASSERT(!capturer == !mCaptureThread); if (!capturer) { -@@ -650,6 +668,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result aResult, +@@ -647,6 +665,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result aResult, frameInfo.height = aFrame->size().height(); frameInfo.videoType = VideoType::kARGB; @@ -1830,7 +1830,7 @@ index 1f2d92bcb5d989bf9ecc044f8c51006f991b0007..9cf5dd885e658e0fe5e7ab75e7fc1f97 return aGlobalOrNull; diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp -index a7b02a55a73c0ab459278ce475459e43beeedc8f..b8f292420f1b563bf409e47e01972f23ac1e852f 100644 +index d1bd1d060d749de3ac16bd6e9fd3383383e4dd9a..e6262c210accf12c3d071d42031b432b2a6332b5 100644 --- a/dom/security/nsCSPUtils.cpp +++ b/dom/security/nsCSPUtils.cpp @@ -22,6 +22,7 @@ @@ -1877,10 +1877,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 f049e706028b59f05f20b1091c5706449f396f8b..b37a9b721cf86cf6f06a2d723ed019f3a46a1176 100644 +index 9c49ad97054ec46cfc52082202d36bb2b53482fc..46d22e51cfeaded274e63b9673e0c3c83b517e7a 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp -@@ -985,7 +985,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) { +@@ -986,7 +986,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) { AssertIsOnMainThread(); nsTArray languages; @@ -1889,7 +1889,7 @@ index f049e706028b59f05f20b1091c5706449f396f8b..b37a9b721cf86cf6f06a2d723ed019f3 RuntimeService* runtime = RuntimeService::GetService(); if (runtime) { -@@ -1187,8 +1187,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) { +@@ -1173,8 +1173,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) { } // The navigator overridden properties should have already been read. @@ -1899,7 +1899,7 @@ index f049e706028b59f05f20b1091c5706449f396f8b..b37a9b721cf86cf6f06a2d723ed019f3 mNavigatorPropertiesLoaded = true; } -@@ -1800,6 +1799,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted( +@@ -1778,6 +1777,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted( } } @@ -1913,7 +1913,7 @@ index f049e706028b59f05f20b1091c5706449f396f8b..b37a9b721cf86cf6f06a2d723ed019f3 template void RuntimeService::BroadcastAllWorkers(const Func& aFunc) { AssertIsOnMainThread(); -@@ -2322,6 +2328,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers( +@@ -2295,6 +2301,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers( } } @@ -1929,10 +1929,10 @@ index f049e706028b59f05f20b1091c5706449f396f8b..b37a9b721cf86cf6f06a2d723ed019f3 MOZ_ASSERT(!NS_IsMainThread()); MOZ_ASSERT(aCx); diff --git a/dom/workers/RuntimeService.h b/dom/workers/RuntimeService.h -index a770d7330edb2f99483ab0363211817ae40028b0..f677f14e2ac42c94483726bac8538b52129615cc 100644 +index e6deb81f357043a937d032bb4b6c38207203f4d9..ff16582af9fbf550dfb7b5639658c34199524c45 100644 --- a/dom/workers/RuntimeService.h +++ b/dom/workers/RuntimeService.h -@@ -110,6 +110,8 @@ class RuntimeService final : public nsIObserver { +@@ -108,6 +108,8 @@ class RuntimeService final : public nsIObserver { void PropagateStorageAccessPermissionGranted( const nsPIDOMWindowInner& aWindow); @@ -1955,7 +1955,7 @@ index d10dabb5c5ff8e17851edf2bd2efc08e74584d8e..53c4070c5fde43b27fb8fbfdcf4c23d8 bool IsWorkerGlobal(JSObject* global); diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp -index 3c6a2fa249f4b993a440563247a68435cd7820d8..c82dc3c4d740abb74735d909b48b600ead193c76 100644 +index 574fe73ea8cf29b64a507a390ec8d55a5f8ad498..85eb9e92b2f55f62f8bee797679917eff35963de 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -709,6 +709,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable { @@ -1994,7 +1994,7 @@ index 3c6a2fa249f4b993a440563247a68435cd7820d8..c82dc3c4d740abb74735d909b48b600e void WorkerPrivate::UpdateLanguages(const nsTArray& aLanguages) { AssertIsOnParentThread(); -@@ -5412,6 +5434,15 @@ void WorkerPrivate::UpdateContextOptionsInternal( +@@ -5409,6 +5431,15 @@ void WorkerPrivate::UpdateContextOptionsInternal( } } @@ -2011,7 +2011,7 @@ index 3c6a2fa249f4b993a440563247a68435cd7820d8..c82dc3c4d740abb74735d909b48b600e const nsTArray& aLanguages) { WorkerGlobalScope* globalScope = GlobalScope(); diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h -index e78423f757d81bebf6a82ad261348f15af30f063..ed1d5eca153a3eab9268fa5d6402d40c34281f2c 100644 +index 6eb840b8e64b5a4db3c621599780561ef2fdaef4..59e27e6949dfda389516d64a7b4ac0f0e5a60148 100644 --- a/dom/workers/WorkerPrivate.h +++ b/dom/workers/WorkerPrivate.h @@ -413,6 +413,8 @@ class WorkerPrivate final @@ -2085,10 +2085,10 @@ index dd82415624e1f05eaad818d68b8588ffb1b64ab1..c48ab77757aff777658fd4e37db6bdea inline ClippedTime TimeClip(double time); diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp -index 9c3a652b60e09013f77b9a7f7da03d376d21cb6a..091daaee4a3402a0c572a21142517e4f9e706257 100644 +index 49525b426a9f8656a471192ccf62f47f555a90a4..f6c832af063326a5e9e7166662bb21bc4e41cdca 100644 --- a/js/src/debugger/Object.cpp +++ b/js/src/debugger/Object.cpp -@@ -2426,7 +2426,11 @@ Maybe DebuggerObject::call(JSContext* cx, +@@ -2413,7 +2413,11 @@ Maybe DebuggerObject::call(JSContext* cx, invokeArgs[i].set(args2[i]); } @@ -2255,10 +2255,10 @@ index dac899f7558b26d6848da8b98ed8a93555c8751a..2a07d67fa1c2840b25085566e84dc3b2 // No boxes to return return; diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp -index bd8cfa12fa79306b8d41011f2abf4ed40c12c2c4..63c77656c2e7c6c9a4d713ca9561411f304e187e 100644 +index 60059ca8e6704f5d9031ced546694de08f63fe77..0f3a96f0c3c95480299a917a60ec5f9924a2f2eb 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp -@@ -10896,7 +10896,9 @@ auto PresShell::ComputeActiveness() const -> Activeness { +@@ -10913,7 +10913,9 @@ auto PresShell::ComputeActiveness() const -> Activeness { if (!browserChild->IsVisible()) { MOZ_LOG(gLog, LogLevel::Debug, (" > BrowserChild %p is not visible", browserChild)); @@ -2270,10 +2270,10 @@ index bd8cfa12fa79306b8d41011f2abf4ed40c12c2c4..63c77656c2e7c6c9a4d713ca9561411f // If the browser is visible but just due to be preserving layers diff --git a/layout/style/GeckoBindings.h b/layout/style/GeckoBindings.h -index 9e5ffc264bbbfa13b0cdb37a5c987074f2d8e8c9..9b7164b10703b48f538ee983b1ef82146876e2bb 100644 +index 1d5d60bb4e7cc0d93ff7e6662c9102bde59509c1..ee1436d6e06f13a4386314e8bb8e4e3998ae5a0c 100644 --- a/layout/style/GeckoBindings.h +++ b/layout/style/GeckoBindings.h -@@ -629,6 +629,7 @@ float Gecko_MediaFeatures_GetResolution(const mozilla::dom::Document*); +@@ -630,6 +630,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*); @@ -2282,10 +2282,10 @@ index 9e5ffc264bbbfa13b0cdb37a5c987074f2d8e8c9..9b7164b10703b48f538ee983b1ef8214 const mozilla::dom::Document*); mozilla::StylePrefersColorScheme Gecko_MediaFeatures_PrefersColorScheme( diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp -index 581b6da29ba6bc321c549802b8bd5e3364724460..33827a19b46bc4814a0554629cea41e3d566bf8e 100644 +index 5e4fe65abcc373e6c0fba40458677cebb085266b..9425984faca3579cb90e96ae46ed47e66c2dc664 100644 --- a/layout/style/nsMediaFeatures.cpp +++ b/layout/style/nsMediaFeatures.cpp -@@ -277,11 +277,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) { +@@ -261,11 +261,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) { } bool Gecko_MediaFeatures_PrefersReducedMotion(const Document* aDocument) { @@ -2303,10 +2303,10 @@ index 581b6da29ba6bc321c549802b8bd5e3364724460..33827a19b46bc4814a0554629cea41e3 bool Gecko_MediaFeatures_PrefersReducedTransparency(const Document* aDocument) { diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js -index a366fdaeb88daf820734508f7916ec68c70273fd..ebbbe8cee358517a851cfec085738b58c3791421 100644 +index a190b6caff8c21fb6bedaf37b9c25c812cd7114a..ac972936eedf5ea9a0f2e3d9d2dc899e848504d4 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js -@@ -3968,7 +3968,9 @@ pref("devtools.f12_enabled", true); +@@ -3939,7 +3939,9 @@ pref("devtools.f12_enabled", true); // doesn't provide a way to lock the pref pref("dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled", false); #else @@ -2318,10 +2318,10 @@ index a366fdaeb88daf820734508f7916ec68c70273fd..ebbbe8cee358517a851cfec085738b58 // Whether sites require the open-protocol-handler permission to open a diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp -index f7c5829c964217132bbd3b67b961a183df42fb77..cd1006e2234f50facc916f25e996a2b0bc444d0b 100644 +index 5f0543bbb117887b8c4438ebf24199ab20f514c2..5dde8690a1699fec0433a0c5a1f396653f00db2e 100644 --- a/netwerk/base/LoadInfo.cpp +++ b/netwerk/base/LoadInfo.cpp -@@ -645,7 +645,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs) +@@ -640,7 +640,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs) mUnstrippedURI(rhs.mUnstrippedURI), mInterceptionInfo(rhs.mInterceptionInfo), mHasInjectedCookieForCookieBannerHandling( @@ -2331,7 +2331,7 @@ index f7c5829c964217132bbd3b67b961a183df42fb77..cd1006e2234f50facc916f25e996a2b0 LoadInfo::LoadInfo( nsIPrincipal* aLoadingPrincipal, nsIPrincipal* aTriggeringPrincipal, -@@ -2298,4 +2299,16 @@ LoadInfo::SetHasInjectedCookieForCookieBannerHandling( +@@ -2320,4 +2321,16 @@ LoadInfo::SetHasInjectedCookieForCookieBannerHandling( return NS_OK; } @@ -2349,10 +2349,10 @@ index f7c5829c964217132bbd3b67b961a183df42fb77..cd1006e2234f50facc916f25e996a2b0 + } // namespace mozilla::net diff --git a/netwerk/base/LoadInfo.h b/netwerk/base/LoadInfo.h -index dace62e98dff10497c0271dac1c010afd3733a67..18e30006978a249ebdacdc8e07ce0b980e9c70ea 100644 +index f97d2389297ea1c4771ae2c7e55a0b3eade0743a..89c47840301480ffce5dd385bb5b0a34bfdd7390 100644 --- a/netwerk/base/LoadInfo.h +++ b/netwerk/base/LoadInfo.h -@@ -384,6 +384,8 @@ class LoadInfo final : public nsILoadInfo { +@@ -387,6 +387,8 @@ class LoadInfo final : public nsILoadInfo { nsCOMPtr mInterceptionInfo; bool mHasInjectedCookieForCookieBannerHandling = false; @@ -2362,10 +2362,10 @@ index dace62e98dff10497c0271dac1c010afd3733a67..18e30006978a249ebdacdc8e07ce0b98 // 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 2b9360cd23f1f2009ee2788470c4ff30a2e6e6c1..f6f7ca21ef0509a8751bfa9e08e24219b32a5c3e 100644 +index 37b0b7bfe516ca69441e4cdd58861de9d595c692..6d3bb900624b6ad9e9449ce6f462a87dacfd4cb9 100644 --- a/netwerk/base/TRRLoadInfo.cpp +++ b/netwerk/base/TRRLoadInfo.cpp -@@ -827,5 +827,16 @@ TRRLoadInfo::SetHasInjectedCookieForCookieBannerHandling( +@@ -845,5 +845,16 @@ TRRLoadInfo::SetHasInjectedCookieForCookieBannerHandling( return NS_ERROR_NOT_IMPLEMENTED; } @@ -2383,10 +2383,10 @@ index 2b9360cd23f1f2009ee2788470c4ff30a2e6e6c1..f6f7ca21ef0509a8751bfa9e08e24219 } // namespace net } // namespace mozilla diff --git a/netwerk/base/nsILoadInfo.idl b/netwerk/base/nsILoadInfo.idl -index f3f8304a1b88ba7b1b7465963a717997d812a2b4..06402586a95efdcc01397837d2cad06b4503f0b7 100644 +index 7c84f976ea52f06b2cc0dfb59bcfe598d98d10e0..6c60b34f78d98046298cb9b8b847da5b8cf779b4 100644 --- a/netwerk/base/nsILoadInfo.idl +++ b/netwerk/base/nsILoadInfo.idl -@@ -1488,4 +1488,6 @@ interface nsILoadInfo : nsISupports +@@ -1504,4 +1504,6 @@ interface nsILoadInfo : nsISupports * handle a cookie banner. This is only done for top-level requests. */ [infallible] attribute boolean hasInjectedCookieForCookieBannerHandling; @@ -2406,10 +2406,10 @@ index d72dc570dc82ff9d576942b9e7c23d8a74d68049..a5fcddc4b0e53a862e5a77120b4ccff8 /** * Set the status and reason for the forthcoming synthesized response. diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp -index 7ce1ef0a864bc5fa6a616170dab03974c62aa8ed..d514ea18fd18d03ddb898636ba34d724d41cfdc2 100644 +index cd363cacf1fe2222a320996df93b56f94611ed61..5ca0439d2a3e1e64078cfaed7ba87db173826d70 100644 --- a/netwerk/ipc/DocumentLoadListener.cpp +++ b/netwerk/ipc/DocumentLoadListener.cpp -@@ -163,6 +163,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext, +@@ -165,6 +165,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext, loadInfo->SetHasValidUserGestureActivation( aLoadState->HasValidUserGestureActivation()); loadInfo->SetIsMetaRefresh(aLoadState->IsMetaRefresh()); @@ -2418,7 +2418,7 @@ index 7ce1ef0a864bc5fa6a616170dab03974c62aa8ed..d514ea18fd18d03ddb898636ba34d724 return loadInfo.forget(); } diff --git a/netwerk/protocol/http/InterceptedHttpChannel.cpp b/netwerk/protocol/http/InterceptedHttpChannel.cpp -index c493259905d8b4e6b3a860cd6436c2606e8e8d29..7060deb04d3b3deb3e1cd90b75848229cf2252f2 100644 +index 6e733cc3601352ec600f69420148c96007cb3f78..c36ee059df0dc648beb074bf673b550a59fe2216 100644 --- a/netwerk/protocol/http/InterceptedHttpChannel.cpp +++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp @@ -729,6 +729,14 @@ NS_IMPL_ISUPPORTS(ResetInterceptionHeaderVisitor, nsIHttpHeaderVisitor) @@ -2436,7 +2436,7 @@ index c493259905d8b4e6b3a860cd6436c2606e8e8d29..7060deb04d3b3deb3e1cd90b75848229 NS_IMETHODIMP InterceptedHttpChannel::ResetInterception(bool aBypass) { INTERCEPTED_LOG(("InterceptedHttpChannel::ResetInterception [%p] bypass: %s", -@@ -1071,11 +1079,18 @@ InterceptedHttpChannel::OnStartRequest(nsIRequest* aRequest) { +@@ -1072,11 +1080,18 @@ InterceptedHttpChannel::OnStartRequest(nsIRequest* aRequest) { GetCallback(mProgressSink); } @@ -2456,10 +2456,10 @@ index c493259905d8b4e6b3a860cd6436c2606e8e8d29..7060deb04d3b3deb3e1cd90b75848229 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 0908642956b66e867be59c5777f26e4c9f95d5ec..3d7677c454c5a0d2169686c2abad7b332f2413ce 100644 +index 177fbd0a496bacd402f2a0594342e5c50e882b4b..82324fed89a80c17fd0160bb8d45e7a07c23c58a 100644 --- a/parser/html/nsHtml5TreeOpExecutor.cpp +++ b/parser/html/nsHtml5TreeOpExecutor.cpp -@@ -1372,6 +1372,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta( +@@ -1370,6 +1370,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta( void nsHtml5TreeOpExecutor::AddSpeculationCSP(const nsAString& aCSP) { NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); @@ -2544,7 +2544,7 @@ index 6dfd07d6b676a99993408921de8dea9d561f201d..e3c6794363cd6336effbeac83a179f37 readonly attribute boolean securityCheckDisabled; }; diff --git a/services/settings/Utils.sys.mjs b/services/settings/Utils.sys.mjs -index 697409ab07c5274696b51c5033cb07ca408d5332..4bb56c915535d3578525e82a3309435ad333fba2 100644 +index c2db005b686d2500398c41301613cacd3e44148c..093265e5871e5c9effdad3270015a05f63e2c844 100644 --- a/services/settings/Utils.sys.mjs +++ b/services/settings/Utils.sys.mjs @@ -95,7 +95,7 @@ function _isUndefined(value) { @@ -2557,7 +2557,7 @@ index 697409ab07c5274696b51c5033cb07ca408d5332..4bb56c915535d3578525e82a3309435a : AppConstants.REMOTE_SETTINGS_SERVER_URL; }, diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs -index 4ca746ea84d917b95dfb66953660ca0a4572e647..bafeb667f3dbc7fa66d4baf811bf5cd5eb728c60 100644 +index 3441dd3a3774231f0aa92486ad0b07dbf98cba8b..f3d8ee86ecea36b6464f3895f40cc537646ac5b7 100644 --- a/servo/components/style/gecko/media_features.rs +++ b/servo/components/style/gecko/media_features.rs @@ -291,10 +291,15 @@ pub enum ForcedColors { @@ -2594,10 +2594,10 @@ index 54de3abab5757dd706e3d909ccef6a0bed5deacc..f5c5480cd052ede0c76e5eec733dbb92 // ignored for Linux. const unsigned long CHROME_SUPPRESS_ANIMATION = 0x01000000; diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs -index acea04b6fd130ae60a9ddbd8d5e6ebfcec2d547a..74019bfce26447a8a900b0303f30db42c24325a9 100644 +index 61eda006f090e391b3c0f209e9400920f480c115..8fea8caf17913a2736884caca8f6087f1fb48d15 100644 --- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs +++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs -@@ -110,6 +110,12 @@ EnterprisePoliciesManager.prototype = { +@@ -108,6 +108,12 @@ EnterprisePoliciesManager.prototype = { Services.prefs.clearUserPref(PREF_POLICIES_APPLIED); } @@ -2639,10 +2639,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 72ee99c7341de54f2282e3f2a686d6a33b26ecaf..4a739e7cad294cf809a697da905253adee4e24b1 100644 +index 64e6db10f000a44d78ace878ec49c526cbbc007d..c0855bef1fda02643f8df5fa1111ab2bfd684c55 100644 --- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp +++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp -@@ -1875,7 +1875,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent( +@@ -1881,7 +1881,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent( // Open a minimal popup. *aIsPopupRequested = true; @@ -2656,10 +2656,10 @@ index 72ee99c7341de54f2282e3f2a686d6a33b26ecaf..4a739e7cad294cf809a697da905253ad /** diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs -index a0ba7fe61e0449a7302302429993091075950c21..15e89c7d8000e66bbbf97dd0bb00da3e710e5ec0 100644 +index 1043c4bc4e0df857f9e9a8bd83756dbe8b0053bd..964ce8b3ff04dda5856b5d1fa447022b0ddd0066 100644 --- a/toolkit/mozapps/update/UpdateService.sys.mjs +++ b/toolkit/mozapps/update/UpdateService.sys.mjs -@@ -3848,6 +3848,8 @@ UpdateService.prototype = { +@@ -3820,6 +3820,8 @@ UpdateService.prototype = { }, get disabledForTesting() { @@ -2681,23 +2681,22 @@ index d2ccd8748228b04c84754f9a6dce2ca3bf991e47..d3a8ea1d9994f724cd52cecd4d2cd285 ] diff --git a/toolkit/xre/nsWindowsWMain.cpp b/toolkit/xre/nsWindowsWMain.cpp -index ea14a59b80bbfbaa17d7569734b8409d9d21fcde..28cb052c3115f91e6a036ad8466385ff1d740cd0 100644 +index 7eb9e1104682d4eb47060654f43a1efa8b2a6bb2..a8315d6decf654b5302bea5beeea34140c300ded 100644 --- a/toolkit/xre/nsWindowsWMain.cpp +++ b/toolkit/xre/nsWindowsWMain.cpp -@@ -14,9 +14,11 @@ +@@ -14,8 +14,10 @@ #endif #include "mozilla/Char16.h" +#include "mozilla/CmdLineAndEnvUtils.h" #include "nsUTF8Utils.h" - #include "nsWindowsHelpers.h" +#include #include - #include - -@@ -130,6 +132,19 @@ int wmain(int argc, WCHAR** argv) { + #ifdef __MINGW32__ +@@ -114,6 +116,19 @@ static void FreeAllocStrings(int argc, char** argv) { + int wmain(int argc, WCHAR** argv) { SanitizeEnvironmentVariables(); SetDllDirectoryW(L""); + bool hasJugglerPipe = @@ -2717,10 +2716,10 @@ index ea14a59b80bbfbaa17d7569734b8409d9d21fcde..28cb052c3115f91e6a036ad8466385ff // 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 e1e46ccdceae595f95d100116ff480905047e82b..eaa0252e768140120158525723ad867b8cb020be 100644 +index 1215c0e32691e50605787a9af4a511e8958c64c3..3545cd1c7d65da2deffd761ed7abc77fd81a600f 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp -@@ -830,6 +830,13 @@ void nsDocLoader::DocLoaderIsEmpty(bool aFlushLayout, +@@ -828,6 +828,13 @@ void nsDocLoader::DocLoaderIsEmpty(bool aFlushLayout, ("DocLoader:%p: Firing load event for document.open\n", this)); @@ -2735,7 +2734,7 @@ index e1e46ccdceae595f95d100116ff480905047e82b..eaa0252e768140120158525723ad867b // 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 ee210396f0e7265180f07f6f034c9389a87a02ce..6c0997ecb153547558ad1a0c146b0ca4e8ffbc46 100644 +index 4573e28470c5112f5ac2c5dd53e7a9d1ceedb943..b53b86d8e39f1de4b0d0f1a8d5d7295ea050b878 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -112,6 +112,7 @@ @@ -2746,7 +2745,7 @@ index ee210396f0e7265180f07f6f034c9389a87a02ce..6c0997ecb153547558ad1a0c146b0ca4 #include "mozilla/Preferences.h" #include "mozilla/ipc/URIUtils.h" -@@ -836,6 +837,12 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension( +@@ -831,6 +832,12 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension( return NS_OK; } @@ -2759,7 +2758,7 @@ index ee210396f0e7265180f07f6f034c9389a87a02ce..6c0997ecb153547558ad1a0c146b0ca4 nsresult nsExternalHelperAppService::GetFileTokenForPath( const char16_t* aPlatformAppPath, nsIFile** aFile) { nsDependentString platformAppPath(aPlatformAppPath); -@@ -1446,7 +1453,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) { +@@ -1442,7 +1449,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) { // Strip off the ".part" from mTempLeafName mTempLeafName.Truncate(mTempLeafName.Length() - ArrayLength(".part") + 1); @@ -2772,7 +2771,7 @@ index ee210396f0e7265180f07f6f034c9389a87a02ce..6c0997ecb153547558ad1a0c146b0ca4 mSaver = do_CreateInstance(NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); -@@ -1635,7 +1647,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) { +@@ -1631,7 +1643,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) { return NS_OK; } @@ -2810,7 +2809,7 @@ index ee210396f0e7265180f07f6f034c9389a87a02ce..6c0997ecb153547558ad1a0c146b0ca4 if (NS_FAILED(rv)) { nsresult transferError = rv; -@@ -1687,6 +1728,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) { +@@ -1683,6 +1724,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) { bool alwaysAsk = true; mMimeInfo->GetAlwaysAskBeforeHandling(&alwaysAsk); @@ -2820,7 +2819,7 @@ index ee210396f0e7265180f07f6f034c9389a87a02ce..6c0997ecb153547558ad1a0c146b0ca4 if (alwaysAsk) { // But we *don't* ask if this mimeInfo didn't come from // our user configuration datastore and the user has said -@@ -2193,6 +2237,16 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver, +@@ -2199,6 +2243,16 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver, NotifyTransfer(aStatus); } @@ -2837,7 +2836,7 @@ index ee210396f0e7265180f07f6f034c9389a87a02ce..6c0997ecb153547558ad1a0c146b0ca4 return NS_OK; } -@@ -2674,6 +2728,15 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) { +@@ -2680,6 +2734,15 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) { } } @@ -2854,7 +2853,7 @@ index ee210396f0e7265180f07f6f034c9389a87a02ce..6c0997ecb153547558ad1a0c146b0ca4 // OnStartRequest) mDialog = nullptr; diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h -index 6c8cbc5871d3aa721a3f1a3ff6c0ef8b0044c63e..8e7c9af1a2cfe60c9c543af1ab55f6c229000bd4 100644 +index 205f73cfa127e15e171854165c92551fea957e84..6399525ea0abb55655c824b086a043d022392113 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.h +++ b/uriloader/exthandler/nsExternalHelperAppService.h @@ -257,6 +257,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService, @@ -2866,7 +2865,7 @@ index 6c8cbc5871d3aa721a3f1a3ff6c0ef8b0044c63e..8e7c9af1a2cfe60c9c543af1ab55f6c2 }; /** -@@ -456,6 +458,9 @@ class nsExternalAppHandler final : public nsIStreamListener, +@@ -462,6 +464,9 @@ class nsExternalAppHandler final : public nsIStreamListener, * Upon successful return, both mTempFile and mSaver will be valid. */ nsresult SetUpTempFile(nsIChannel* aChannel); @@ -2877,19 +2876,22 @@ index 6c8cbc5871d3aa721a3f1a3ff6c0ef8b0044c63e..8e7c9af1a2cfe60c9c543af1ab55f6c2 * When we download a helper app, we are going to retarget all load * notifications into our own docloader and load group instead of diff --git a/uriloader/exthandler/nsIExternalHelperAppService.idl b/uriloader/exthandler/nsIExternalHelperAppService.idl -index 307e6196a89df52d0bccc3ebd1359f58e32de75d..c3692d0f76178ac3aeb1c77a0e973bfa22359346 100644 +index 4a399acb72d4fd475c9ae43e9eadbc32f261e290..31e9490a7dfd7d7eff69ad23c9ce277f367d1524 100644 --- a/uriloader/exthandler/nsIExternalHelperAppService.idl +++ b/uriloader/exthandler/nsIExternalHelperAppService.idl -@@ -6,6 +6,8 @@ +@@ -6,8 +6,11 @@ #include "nsICancelable.idl" +webidl BrowsingContext; +interface nsIHelperAppLauncher; interface nsIURI; - interface nsIRequest; + interface nsIChannel; ++interface nsIRequest; interface nsIStreamListener; -@@ -15,6 +17,17 @@ interface nsIWebProgressListener2; + interface nsIFile; + interface nsIMIMEInfo; +@@ -15,6 +18,17 @@ interface nsIWebProgressListener2; interface nsIInterfaceRequestor; webidl BrowsingContext; @@ -2907,7 +2909,7 @@ index 307e6196a89df52d0bccc3ebd1359f58e32de75d..c3692d0f76178ac3aeb1c77a0e973bfa /** * The external helper app service is used for finding and launching * platform specific external applications for a given mime content type. -@@ -76,6 +89,7 @@ interface nsIExternalHelperAppService : nsISupports +@@ -76,6 +90,7 @@ interface nsIExternalHelperAppService : nsISupports boolean applyDecodingForExtension(in AUTF8String aExtension, in ACString aEncodingType); @@ -2944,10 +2946,10 @@ index 1c25e9d9a101233f71e92288a0f93125b81ac1c5..22cf67b0f6e3ddd2b3ed725a314ba6a9 } #endif diff --git a/widget/MouseEvents.h b/widget/MouseEvents.h -index 5a19cb4082674ede982a0c66c84bf7c4642abe2b..5fe6ae7b5bf605e5d9130aa164d7cbbb486e54e0 100644 +index dafdcf64661112df3bce1d56b4b7a2519aa49838..58916791b1b79093cd2db188116348dc1544ddaa 100644 --- a/widget/MouseEvents.h +++ b/widget/MouseEvents.h -@@ -203,6 +203,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, +@@ -204,6 +204,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, : mReason(eReal), mContextMenuTrigger(eNormal), mClickCount(0), @@ -2955,7 +2957,7 @@ index 5a19cb4082674ede982a0c66c84bf7c4642abe2b..5fe6ae7b5bf605e5d9130aa164d7cbbb mIgnoreRootScrollFrame(false), mUseLegacyNonPrimaryDispatch(false), mClickEventPrevented(false) {} -@@ -213,6 +214,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, +@@ -216,6 +217,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, mReason(aReason), mContextMenuTrigger(eNormal), mClickCount(0), @@ -2963,7 +2965,7 @@ index 5a19cb4082674ede982a0c66c84bf7c4642abe2b..5fe6ae7b5bf605e5d9130aa164d7cbbb mIgnoreRootScrollFrame(false), mUseLegacyNonPrimaryDispatch(false), mClickEventPrevented(false) {} -@@ -231,6 +233,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, +@@ -236,6 +238,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, mReason(aReason), mContextMenuTrigger(aContextMenuTrigger), mClickCount(0), @@ -2971,7 +2973,7 @@ index 5a19cb4082674ede982a0c66c84bf7c4642abe2b..5fe6ae7b5bf605e5d9130aa164d7cbbb mIgnoreRootScrollFrame(false), mUseLegacyNonPrimaryDispatch(false), mClickEventPrevented(false) { -@@ -280,6 +283,9 @@ class WidgetMouseEvent : public WidgetMouseEventBase, +@@ -285,6 +288,9 @@ class WidgetMouseEvent : public WidgetMouseEventBase, // Otherwise, this must be 0. uint32_t mClickCount; @@ -2981,7 +2983,7 @@ index 5a19cb4082674ede982a0c66c84bf7c4642abe2b..5fe6ae7b5bf605e5d9130aa164d7cbbb // Whether the event should ignore scroll frame bounds during dispatch. bool mIgnoreRootScrollFrame; -@@ -296,6 +302,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, +@@ -301,6 +307,7 @@ class WidgetMouseEvent : public WidgetMouseEventBase, mExitFrom = aEvent.mExitFrom; mClickCount = aEvent.mClickCount; @@ -3244,7 +3246,7 @@ index 9856991ef32f25f51942f8cd664a09bec2192c70..948947a421179e91c51005aeb83ed0d1 ~HeadlessWidget(); bool mEnabled; diff --git a/widget/nsGUIEventIPC.h b/widget/nsGUIEventIPC.h -index a4cd12a151e7a172389affb34adf0a4085e597a5..fb4c340644255b11a15cf5a3587d950ae4f091d7 100644 +index e8b831233338630c3106fd9debeba128228d3e0c..60422b1a1734e1bdeba7b6083727e29f0e5e9f35 100644 --- a/widget/nsGUIEventIPC.h +++ b/widget/nsGUIEventIPC.h @@ -234,6 +234,7 @@ struct ParamTraits { diff --git a/browser_patches/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.sh index d72c74d470..269f98f234 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="30884546903f1ba774adb0cbef1adc91c6c53c64" +BASE_REVISION="3facd67e2518ff15efe1b6cda0810e4c76e9c482" diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff index b3e9920535..15cb218a6c 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 be40cc1430aaa1d3a2cd5a1675e9180a81eddc37..e7b8a2677a349a6ba5c9f64bbc81bd7210c38900 100644 +index 4579f72f38f61e1b14f2e5fc13c7cdd3f5e1f6c8..6cdfdfa08cdb7c7193b33ac7400af5cf74d8b06a 100644 --- a/Source/JavaScriptCore/CMakeLists.txt +++ b/Source/JavaScriptCore/CMakeLists.txt -@@ -1417,22 +1417,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS +@@ -1418,22 +1418,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json ${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json @@ -199,7 +199,7 @@ index 14585eabd64a109573bed2336643f4c52e11f180..a1c34d3891405f1c8f6148a031f5045d return nullptr; inspectorObject->setValue(name.string(), inspectorValue.releaseNonNull()); diff --git a/Source/JavaScriptCore/inspector/InjectedScriptSource.js b/Source/JavaScriptCore/inspector/InjectedScriptSource.js -index a665049c589ad59f92b147ef2e9e058eb72bb67c..71f4db75938e830e5d8e201c291c17da3aaff6c9 100644 +index 25d86b6deecce7fb5f0b0d0a0031c0bf737531ae..f9a9a09d5659824697cb11eebf69192002bceacf 100644 --- a/Source/JavaScriptCore/inspector/InjectedScriptSource.js +++ b/Source/JavaScriptCore/inspector/InjectedScriptSource.js @@ -172,7 +172,7 @@ let InjectedScript = class InjectedScript extends PrototypelessObjectBase @@ -352,10 +352,10 @@ index 0cc2127c9c12c2d82dea9550bad73f4ffb99ba24..8ca65cc042d435cbc0e05dcc5c5dfc95 } diff --git a/Source/JavaScriptCore/inspector/InspectorTarget.h b/Source/JavaScriptCore/inspector/InspectorTarget.h -index 4b95964db4d902b4b7f4b0b4c40afea51654ff2f..653842a82ed7a7be8603c9ef88ff48d1cda421be 100644 +index 80559d39722b74e325d513ea22054b0d399a4e8f..24977f9dfcfcdb29a20d178be608aca855cca532 100644 --- a/Source/JavaScriptCore/inspector/InspectorTarget.h +++ b/Source/JavaScriptCore/inspector/InspectorTarget.h -@@ -56,8 +56,12 @@ public: +@@ -57,8 +57,12 @@ public: virtual void connect(FrontendChannel::ConnectionType) = 0; virtual void disconnect() = 0; virtual void sendMessageToTargetBackend(const String&) = 0; @@ -400,7 +400,7 @@ index 6e573c4dfd1f356b76ef9b46dcee4254e9a28f27..8855604064f5130211baab6caa89318c void warnUnimplemented(const String& method); void internalAddMessage(MessageType, MessageLevel, JSC::JSGlobalObject*, Ref&&); diff --git a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp -index aef96857b46e980a12f2c0a4d38d6035c024ac99..2eb163fe20cbbd975c7f49d9835485152057993d 100644 +index 8b8ca251a7fde9bfa0462f8316eb083f8a3a03dd..846d75708c33ff6aa478e03d722770cedd878d00 100644 --- a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp +++ b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp @@ -177,41 +177,43 @@ void InspectorRuntimeAgent::awaitPromise(const Protocol::Runtime::RemoteObjectId @@ -1016,7 +1016,7 @@ index 96af27ece2ac200e11c4311b3ca0d9d3b5a048da..3168f7806fcbdabec07acc5e304bae1e ], "events": [ diff --git a/Source/JavaScriptCore/inspector/protocol/Page.json b/Source/JavaScriptCore/inspector/protocol/Page.json -index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a936c10a8b 100644 +index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..5a7b2e4d3bd7cb99f182c543da756b394a9dfcd6 100644 --- a/Source/JavaScriptCore/inspector/protocol/Page.json +++ b/Source/JavaScriptCore/inspector/protocol/Page.json @@ -20,7 +20,14 @@ @@ -1048,7 +1048,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 { "id": "Frame", "type": "object", -@@ -125,6 +138,51 @@ +@@ -125,6 +138,50 @@ { "name": "secure", "type": "boolean", "description": "True if cookie is secure." }, { "name": "sameSite", "$ref": "CookieSameSitePolicy", "description": "Cookie Same-Site policy." } ] @@ -1069,7 +1069,6 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 + { "name": "expanded", "type": "boolean", "optional": true, "description": "Whether the node is expanded or collapsed."}, + { "name": "focused", "type": "boolean", "optional": true, "description": "Whether the node is focused."}, + { "name": "modal", "type": "boolean", "optional": true, "description": "Whether the node is modal."}, -+ { "name": "multiline", "type": "boolean", "optional": true, "description": "Whether the node text input supports multiline."}, + { "name": "multiselectable", "type": "boolean", "optional": true, "description": "Whether more than one child can be selected."}, + { "name": "readonly", "type": "boolean", "optional": true, "description": "Whether the node is read only."}, + { "name": "required", "type": "boolean", "optional": true, "description": "Whether the node is required."}, @@ -1100,7 +1099,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 } ], "commands": [ -@@ -144,6 +202,14 @@ +@@ -144,6 +201,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)." } ] }, @@ -1115,7 +1114,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 { "name": "navigate", "description": "Navigates current page to the given URL.", -@@ -160,6 +226,14 @@ +@@ -160,6 +225,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." } ] }, @@ -1130,7 +1129,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 { "name": "overrideSetting", "description": "Allows the frontend to override the inspected page's settings.", -@@ -226,7 +300,8 @@ +@@ -226,7 +299,8 @@ "name": "setBootstrapScript", "targetTypes": ["page"], "parameters": [ @@ -1140,7 +1139,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 ] }, { -@@ -283,6 +358,28 @@ +@@ -283,6 +357,28 @@ { "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." } ] }, @@ -1169,7 +1168,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 { "name": "snapshotNode", "description": "Capture a snapshot of the specified node that does not include unrelated layers.", -@@ -303,7 +400,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" }, @@ -1179,7 +1178,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 ], "returns": [ { "name": "dataURL", "type": "string", "description": "Base64-encoded image data (PNG)." } -@@ -321,12 +419,92 @@ +@@ -321,12 +418,92 @@ { "name": "setScreenSizeOverride", "description": "Overrides screen size exposed to DOM and used in media queries for testing with provided values.", @@ -1273,7 +1272,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 } ], "events": [ -@@ -334,14 +512,16 @@ +@@ -334,14 +511,16 @@ "name": "domContentEventFired", "targetTypes": ["page"], "parameters": [ @@ -1292,7 +1291,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 ] }, { -@@ -351,6 +531,14 @@ +@@ -351,6 +530,14 @@ { "name": "frame", "$ref": "Frame", "description": "Frame object." } ] }, @@ -1307,7 +1306,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 { "name": "frameDetached", "description": "Fired when frame has been detached from its parent.", -@@ -379,7 +567,8 @@ +@@ -379,7 +566,8 @@ "targetTypes": ["page"], "parameters": [ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has scheduled a navigation." }, @@ -1317,7 +1316,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 ] }, { -@@ -390,6 +579,22 @@ +@@ -390,6 +578,22 @@ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has cleared its scheduled navigation." } ] }, @@ -1340,7 +1339,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 { "name": "defaultUserPreferencesDidChange", "description": "Fired when the default value of a user preference changes at the system level.", -@@ -397,6 +602,42 @@ +@@ -397,6 +601,42 @@ "parameters": [ { "name": "preferences", "type": "array", "items": { "$ref": "UserPreference" }, "description": "List of user preferences that can be overriden and their new system (default) values." } ] @@ -1385,10 +1384,10 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..83ac8c3cbc4a57a27e99a48323fe61a9 } diff --git a/Source/JavaScriptCore/inspector/protocol/Playwright.json b/Source/JavaScriptCore/inspector/protocol/Playwright.json new file mode 100644 -index 0000000000000000000000000000000000000000..8434303f2aad60557f049d33e50245ddebb07599 +index 0000000000000000000000000000000000000000..978d6f92b18498633c982969299f068332eb2884 --- /dev/null +++ b/Source/JavaScriptCore/inspector/protocol/Playwright.json -@@ -0,0 +1,300 @@ +@@ -0,0 +1,307 @@ +{ + "domain": "Playwright", + "availability": ["web"], @@ -1479,6 +1478,12 @@ index 0000000000000000000000000000000000000000..8434303f2aad60557f049d33e50245dd + "name": "disable" + }, + { ++ "name": "getInfo", ++ "returns": [ ++ { "name": "os", "type": "string", "description": "Name of the operating system where the browser is running (macOS, Linux or Windows)." } ++ ] ++ }, ++ { + "name": "close", + "async": true, + "description": "Close browser." @@ -1536,6 +1541,7 @@ index 0000000000000000000000000000000000000000..8434303f2aad60557f049d33e50245dd + { + "name": "takePageScreenshot", + "description": "Capture a snapshot of the page.", ++ "async": true, + "parameters": [ + { "name": "pageProxyId", "$ref": "PageProxyID", "description": "Unique identifier of the page proxy." }, + { "name": "x", "type": "integer", "description": "X coordinate" }, @@ -1897,7 +1903,7 @@ index 72c81757450ad5ebacd5fd20d2a16095514802ec..b7d8ab1e04d3850180079870468b28ef private: enum ArgumentRequirement { ArgumentRequired, ArgumentNotRequired }; diff --git a/Source/ThirdParty/libwebrtc/CMakeLists.txt b/Source/ThirdParty/libwebrtc/CMakeLists.txt -index 133380fe13fcd59d324d5b1c53bfebf855a04750..5f3fad8408d75dc1b5fb6725569badca6617cf49 100644 +index 0c300bedc697024ca511e43d480f3b7205df3ed6..e54875b46c558903a6b6157833b82ec8ce0ac1f1 100644 --- a/Source/ThirdParty/libwebrtc/CMakeLists.txt +++ b/Source/ThirdParty/libwebrtc/CMakeLists.txt @@ -529,6 +529,11 @@ set(webrtc_SOURCES @@ -1912,7 +1918,7 @@ index 133380fe13fcd59d324d5b1c53bfebf855a04750..5f3fad8408d75dc1b5fb6725569badca Source/third_party/libyuv/source/compare.cc Source/third_party/libyuv/source/compare_common.cc Source/third_party/libyuv/source/compare_gcc.cc -@@ -2124,6 +2129,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE +@@ -2126,6 +2131,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE Source/third_party/libsrtp/config Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include @@ -1953,7 +1959,7 @@ index c3ba9e19caff72011010471c8c46c91b53a22498..d47a93e1f7fe9f4d52376dcc4dcc9242 +_vpx_codec_version_str +_vpx_codec_vp8_cx diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig -index 39ddbe721ba57835c45a4e590726c7a7c99022c4..4020e136c002c0b768f266d87f656585e748d498 100644 +index 4d9ece9ff41411d2f1812671ff210289f4b2da01..b5b3f73accea435a4d0434b06787a4d945417807 100644 --- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig +++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig @@ -37,7 +37,7 @@ DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_ = $(NORMAL_UMBRELLA_FRAMEWORK @@ -1987,11 +1993,11 @@ index bcd9e02bc019e17799fe812d7d9a4c7c316b3456..909bbac68574129ea60af831f30de59e rtt = CompactNtpRttToTimeDelta( receive_time_ntp - block.delay_since_last_sr() - block.last_sr()); diff --git a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj -index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350ae90615de 100644 +index c6fde0910102421de6c77e1d1dbc52ffe7ed7098..cb122ff5f30d68fc168fbf80367c85e091097e30 100644 --- a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj +++ b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj @@ -6,6 +6,20 @@ - objectVersion = 54; + objectVersion = 52; objects = { +/* Begin PBXAggregateTarget section */ @@ -2011,7 +2017,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a /* 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, ); }; }; -@@ -4947,6 +4961,9 @@ +@@ -4952,6 +4966,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 */; }; @@ -2021,7 +2027,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a /* End PBXBuildFile section */ /* Begin PBXBuildRule section */ -@@ -5211,6 +5228,13 @@ +@@ -5230,6 +5247,13 @@ remoteGlobalIDString = DDF30D0527C5C003006A526F; remoteInfo = absl; }; @@ -2035,7 +2041,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ -@@ -10562,6 +10586,9 @@ +@@ -10593,6 +10617,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 = ""; }; @@ -2045,7 +2051,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a FB39D0D11200F0E300088E69 /* libwebrtc.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwebrtc.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ -@@ -18854,6 +18881,7 @@ +@@ -18919,6 +18946,7 @@ isa = PBXGroup; children = ( CDFD2F9224C4B2F90048DAC3 /* common */, @@ -2053,7 +2059,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a CDEBB19224C0191800ADBD44 /* webm_parser */, ); path = libwebm; -@@ -19295,6 +19323,16 @@ +@@ -19360,6 +19388,16 @@ path = include; sourceTree = ""; }; @@ -2070,7 +2076,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a FB39D06E1200ED9200088E69 = { isa = PBXGroup; children = ( -@@ -22185,6 +22223,7 @@ +@@ -22287,6 +22325,7 @@ ); dependencies = ( 410B3827292B73E90003E515 /* PBXTargetDependency */, @@ -2078,15 +2084,15 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a DD2E76E827C6B69A00F2A74C /* PBXTargetDependency */, CDEBB4CC24C01AB400ADBD44 /* PBXTargetDependency */, 411ED040212E0811004320BA /* PBXTargetDependency */, -@@ -22244,6 +22283,7 @@ - CDEBB11824C0187400ADBD44 /* webm */, - DDEBB11824C0187400ADBD44 /* aom */, +@@ -22351,6 +22390,7 @@ DDF30D0527C5C003006A526F /* absl */, + 448D48332AB0BDB00065014C /* fuzz-libvpx-vp8 */, + 44C20E892AB39FA80046C6A8 /* fuzz-libvpx-vp9 */, + F31720AC27FE215900EEE407 /* Copy libvpx headers */, ); }; /* End PBXProject section */ -@@ -22326,6 +22366,23 @@ +@@ -22433,6 +22473,23 @@ shellPath = /bin/sh; shellScript = "\"${SRCROOT}/Scripts/create-symlink-to-altroot.sh\"\n"; }; @@ -2110,7 +2116,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ -@@ -24077,6 +24134,9 @@ +@@ -24200,6 +24257,9 @@ 5CDD865E1E43B8B500621E92 /* min_max_operations.c in Sources */, 4189395B242A71F5007FDC41 /* min_video_bitrate_experiment.cc in Sources */, 41B8D8FB28CB85CB00E5FA37 /* missing_mandatory_parameter_cause.cc in Sources */, @@ -2120,7 +2126,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a 4131C387234B957D0028A615 /* moving_average.cc in Sources */, 41FCBB1521B1F7AA00A5DF27 /* moving_average.cc in Sources */, 5CD286101E6A64C90094FDC8 /* moving_max.cc in Sources */, -@@ -24786,6 +24846,11 @@ +@@ -24919,6 +24979,11 @@ target = DDF30D0527C5C003006A526F /* absl */; targetProxy = DD2E76E727C6B69A00F2A74C /* PBXContainerItemProxy */; }; @@ -2132,7 +2138,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ -@@ -25013,6 +25078,27 @@ +@@ -25176,6 +25241,27 @@ }; name = Production; }; @@ -2160,7 +2166,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a FB39D0711200ED9200088E69 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */; -@@ -25145,6 +25231,16 @@ +@@ -25328,6 +25414,16 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Production; }; @@ -2178,7 +2184,7 @@ index 6550be991328f094d74b7c5aa709fe8c5d399f54..5810c4fd8a1257aaad612f67ab5a350a isa = XCConfigurationList; buildConfigurations = ( diff --git a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml -index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc596a64a950 100644 +index 96f1cf72103b3fd8d12a6fa1d46e22951364065c..1649bb242b75b7f794c93928803de14311725aa5 100644 --- a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml +++ b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml @@ -590,6 +590,7 @@ AspectRatioOfImgFromWidthAndHeightEnabled: @@ -2198,7 +2204,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 WebCore: default: false -@@ -1863,6 +1864,7 @@ CrossOriginEmbedderPolicyEnabled: +@@ -1953,6 +1954,7 @@ CrossOriginEmbedderPolicyEnabled: WebCore: default: false @@ -2206,7 +2212,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 CrossOriginOpenerPolicyEnabled: type: bool status: stable -@@ -1873,7 +1875,7 @@ CrossOriginOpenerPolicyEnabled: +@@ -1963,7 +1965,7 @@ CrossOriginOpenerPolicyEnabled: WebKitLegacy: default: false WebKit: @@ -2215,7 +2221,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 WebCore: default: false -@@ -1903,7 +1905,7 @@ CustomPasteboardDataEnabled: +@@ -1993,7 +1995,7 @@ CustomPasteboardDataEnabled: WebKitLegacy: default: false WebKit: @@ -2224,7 +2230,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 default: false DNSPrefetchingEnabled: -@@ -1948,6 +1950,7 @@ DOMAudioSessionFullEnabled: +@@ -2038,6 +2040,7 @@ DOMAudioSessionFullEnabled: WebCore: default: false @@ -2232,7 +2238,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 DOMPasteAccessRequestsEnabled: type: bool status: internal -@@ -1959,7 +1962,7 @@ DOMPasteAccessRequestsEnabled: +@@ -2049,7 +2052,7 @@ DOMPasteAccessRequestsEnabled: default: false WebKit: "PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(VISION)": true @@ -2241,7 +2247,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 WebCore: default: false -@@ -3380,6 +3383,7 @@ InspectorAttachmentSide: +@@ -3474,6 +3477,7 @@ InspectorAttachmentSide: WebKit: default: 0 @@ -2249,7 +2255,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 InspectorStartsAttached: type: bool status: embedder -@@ -3387,7 +3391,7 @@ InspectorStartsAttached: +@@ -3481,7 +3485,7 @@ InspectorStartsAttached: exposed: [ WebKit ] defaultValue: WebKit: @@ -2258,7 +2264,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 InspectorWindowFrame: type: String -@@ -3755,6 +3759,7 @@ LayoutViewportHeightExpansionFactor: +@@ -3849,6 +3853,7 @@ LayoutViewportHeightExpansionFactor: WebCore: default: 0 @@ -2266,7 +2272,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 LazyIframeLoadingEnabled: type: bool status: stable -@@ -3765,9 +3770,9 @@ LazyIframeLoadingEnabled: +@@ -3859,9 +3864,9 @@ LazyIframeLoadingEnabled: WebKitLegacy: default: true WebKit: @@ -2278,7 +2284,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 LazyImageLoadingEnabled: type: bool -@@ -5113,6 +5118,19 @@ PluginsEnabled: +@@ -5193,6 +5198,19 @@ PluginsEnabled: WebCore: default: false @@ -2298,7 +2304,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 PopoverAttributeEnabled: type: bool status: stable -@@ -6796,6 +6814,7 @@ UseCGDisplayListsForDOMRendering: +@@ -6877,6 +6895,7 @@ UseCGDisplayListsForDOMRendering: WebKit: default: true @@ -2306,7 +2312,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 UseGPUProcessForCanvasRenderingEnabled: type: bool status: stable -@@ -6808,7 +6827,7 @@ UseGPUProcessForCanvasRenderingEnabled: +@@ -6889,7 +6908,7 @@ UseGPUProcessForCanvasRenderingEnabled: defaultValue: WebKit: "ENABLE(GPU_PROCESS_BY_DEFAULT)": true @@ -2315,7 +2321,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 default: false UseGPUProcessForDOMRenderingEnabled: -@@ -6850,6 +6869,7 @@ UseGPUProcessForMediaEnabled: +@@ -6931,6 +6950,7 @@ UseGPUProcessForMediaEnabled: "ENABLE(GPU_PROCESS_BY_DEFAULT)": true default: false @@ -2323,7 +2329,7 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 UseGPUProcessForWebGLEnabled: type: bool status: internal -@@ -6861,7 +6881,7 @@ UseGPUProcessForWebGLEnabled: +@@ -6942,7 +6962,7 @@ UseGPUProcessForWebGLEnabled: default: false WebKit: "ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": true @@ -2333,10 +2339,10 @@ index b9d4024573d25cdd97c8e45e1cf7629cb3a643c7..706e0334ffd49735aa5473777228bc59 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 eea248ca9ab06ddbc55a1ed17bdd334e2ea848ec..f0686b9c4f0a489d78e63c35a612379cdfb01f8a 100644 +index 7dc33dacc7a295c7465857f8b0097d719c563eab..c7628dab1a62dad072ff79ccda1b8e0ae94a9598 100644 --- a/Source/WTF/wtf/PlatformEnable.h +++ b/Source/WTF/wtf/PlatformEnable.h -@@ -408,7 +408,7 @@ +@@ -467,7 +467,7 @@ // ORIENTATION_EVENTS should never get enabled on Desktop, only Mobile. #if !defined(ENABLE_ORIENTATION_EVENTS) @@ -2344,8 +2350,8 @@ index eea248ca9ab06ddbc55a1ed17bdd334e2ea848ec..f0686b9c4f0a489d78e63c35a612379c +#define ENABLE_ORIENTATION_EVENTS 1 #endif - #if OS(WINDOWS) -@@ -473,7 +473,7 @@ + #if !defined(ENABLE_OVERFLOW_SCROLLING_TOUCH) +@@ -584,7 +584,7 @@ #endif #if !defined(ENABLE_TOUCH_EVENTS) @@ -2355,10 +2361,10 @@ index eea248ca9ab06ddbc55a1ed17bdd334e2ea848ec..f0686b9c4f0a489d78e63c35a612379c #if !defined(ENABLE_TOUCH_ACTION_REGIONS) diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h -index e14052bc7205ea751e71044e0237c7fb44e92d05..ae8d883861e823aef73181f642e0eb0702c65702 100644 +index 78311045d08888229f8a7fe833eac18d95ac4a1c..bb872fce96aa326e02d7ec282d3bc748c3fe9b20 100644 --- a/Source/WTF/wtf/PlatformHave.h +++ b/Source/WTF/wtf/PlatformHave.h -@@ -411,7 +411,7 @@ +@@ -419,7 +419,7 @@ #define HAVE_FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT 1 #endif @@ -2367,7 +2373,7 @@ index e14052bc7205ea751e71044e0237c7fb44e92d05..ae8d883861e823aef73181f642e0eb07 #define HAVE_OS_DARK_MODE_SUPPORT 1 #endif -@@ -1238,7 +1238,8 @@ +@@ -1276,7 +1276,8 @@ #endif #if PLATFORM(MAC) @@ -2378,10 +2384,10 @@ index e14052bc7205ea751e71044e0237c7fb44e92d05..ae8d883861e823aef73181f642e0eb07 #if !defined(HAVE_LOCKDOWN_MODE_PDF_ADDITIONS) && \ diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make -index 8e7c95a1f4884ba9a13275df672c98dfc233705a..6bfa17b518b342e637a3569b20f01636ee7e18f3 100644 +index 7f92dbc826915e61c6bd3cd6b056cc0a3489f401..74a3bbf87faa9961e71b155a4997d742d967a535 100644 --- a/Source/WebCore/DerivedSources.make +++ b/Source/WebCore/DerivedSources.make -@@ -1104,6 +1104,10 @@ JS_BINDING_IDLS := \ +@@ -1117,6 +1117,10 @@ JS_BINDING_IDLS := \ $(WebCore)/dom/Slotable.idl \ $(WebCore)/dom/StaticRange.idl \ $(WebCore)/dom/StringCallback.idl \ @@ -2392,7 +2398,7 @@ index 8e7c95a1f4884ba9a13275df672c98dfc233705a..6bfa17b518b342e637a3569b20f01636 $(WebCore)/dom/Text.idl \ $(WebCore)/dom/TextDecoder.idl \ $(WebCore)/dom/TextDecoderStream.idl \ -@@ -1677,9 +1681,6 @@ ADDITIONAL_BINDING_IDLS = \ +@@ -1691,9 +1695,6 @@ ADDITIONAL_BINDING_IDLS = \ GestureEvent.idl \ Internals+Additions.idl \ InternalsAdditions.idl \ @@ -2466,10 +2472,10 @@ index 99db9b2a0693bddab0b783b47746460cd0b7ffd9..74cbf2811a6f8dbcf631c8a218ad4a13 set(CSS_VALUE_PLATFORM_DEFINES "HAVE_OS_DARK_MODE_SUPPORT=1") diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt -index 09bbf7edb87d2423485238eb265bb73076848e4f..3c0ff4658e612b4fca148937ff07d6337451f33b 100644 +index 0bec3d28a9ff13276abdd498c7e8ff210261d503..e1b90be0fed408da79c1a14432345d78fe4715a0 100644 --- a/Source/WebCore/SourcesCocoa.txt +++ b/Source/WebCore/SourcesCocoa.txt -@@ -688,3 +688,9 @@ platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify +@@ -694,3 +694,9 @@ platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify platform/graphics/cocoa/ANGLEUtilitiesCocoa.cpp @no-unify platform/graphics/cocoa/GraphicsContextGLCocoa.mm @no-unify platform/graphics/cv/GraphicsContextGLCVCocoa.cpp @no-unify @@ -2480,10 +2486,10 @@ index 09bbf7edb87d2423485238eb265bb73076848e4f..3c0ff4658e612b4fca148937ff07d633 +JSTouchList.cpp +// Playwright end diff --git a/Source/WebCore/SourcesGTK.txt b/Source/WebCore/SourcesGTK.txt -index e00e78af085a767842d2b08ca40e71fad7741569..1d7b32818538e08dd308a2b3f4967256a88cc9a2 100644 +index c18097a3a2747bcc5133467b7905779cbbab702e..3c28c6c2590e260f827464f6ce4dca4cc833dc2d 100644 --- a/Source/WebCore/SourcesGTK.txt +++ b/Source/WebCore/SourcesGTK.txt -@@ -124,3 +124,10 @@ platform/text/hyphen/HyphenationLibHyphen.cpp +@@ -123,3 +123,10 @@ platform/text/hyphen/HyphenationLibHyphen.cpp platform/unix/LoggingUnix.cpp platform/xdg/MIMETypeRegistryXdg.cpp @@ -2495,7 +2501,7 @@ index e00e78af085a767842d2b08ca40e71fad7741569..1d7b32818538e08dd308a2b3f4967256 +JSSpeechSynthesisEventInit.cpp +// Playwright: end. diff --git a/Source/WebCore/SourcesWPE.txt b/Source/WebCore/SourcesWPE.txt -index b22d8835c52f1f5584c96d68c70cd62164ee39d4..adcf594fc399b93772c1c962b283bef16d253186 100644 +index 06c923a3227befac7680faf2cdb44abd657d6e5f..adcf594fc399b93772c1c962b283bef16d253186 100644 --- a/Source/WebCore/SourcesWPE.txt +++ b/Source/WebCore/SourcesWPE.txt @@ -45,6 +45,8 @@ editing/libwpe/EditorLibWPE.cpp @@ -2507,17 +2513,6 @@ index b22d8835c52f1f5584c96d68c70cd62164ee39d4..adcf594fc399b93772c1c962b283bef1 page/linux/ResourceUsageOverlayLinux.cpp page/linux/ResourceUsageThreadLinux.cpp -@@ -70,8 +72,8 @@ platform/graphics/angle/PlatformDisplayANGLE.cpp @no-unify - - platform/graphics/wpe/SystemFontDatabaseWPE.cpp - --platform/graphics/egl/GLContext.cpp --platform/graphics/egl/GLContextLibWPE.cpp -+platform/graphics/egl/GLContext.cpp @no-unify -+platform/graphics/egl/GLContextLibWPE.cpp @no-unify - - platform/graphics/gbm/GBMBufferSwapchain.cpp - platform/graphics/gbm/GBMDevice.cpp @@ -91,6 +93,17 @@ platform/text/LocaleICU.cpp platform/unix/LoggingUnix.cpp @@ -2537,10 +2532,10 @@ index b22d8835c52f1f5584c96d68c70cd62164ee39d4..adcf594fc399b93772c1c962b283bef1 +JSSpeechSynthesisEventInit.cpp +// Playwright: end. diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj -index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22b403b697 100644 +index f69cbc9c58a85d6c4625b8297f4ca9a1df6246c4..517e26635f3653841c9471cadaea482b9afd85e3 100644 --- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj -@@ -6077,6 +6077,13 @@ +@@ -6104,6 +6104,13 @@ EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE3A4FF0C7A430600956A37 /* ColorMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; EDEC98030AED7E170059137F /* WebCorePrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = EDEC98020AED7E170059137F /* WebCorePrefix.h */; }; EFCC6C8F20FE914400A2321B /* CanvasActivityRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -2554,7 +2549,7 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 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, ); }; }; -@@ -19588,6 +19595,14 @@ +@@ -19701,6 +19708,14 @@ EDEC98020AED7E170059137F /* WebCorePrefix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCorePrefix.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; 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 = ""; }; @@ -2569,7 +2564,7 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 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 = ""; }; -@@ -27016,6 +27031,11 @@ +@@ -27198,6 +27213,11 @@ BC4A5324256055590028C592 /* TextDirectionSubmenuInclusionBehavior.h */, 2D4F96F11A1ECC240098BF88 /* TextIndicator.cpp */, 2D4F96F21A1ECC240098BF88 /* TextIndicator.h */, @@ -2581,7 +2576,7 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 F48570A42644C76D00C05F71 /* TranslationContextMenuInfo.h */, F4E1965F21F26E4E00285078 /* UndoItem.cpp */, 2ECDBAD521D8906300F00ECD /* UndoItem.h */, -@@ -33199,6 +33219,8 @@ +@@ -33398,6 +33418,8 @@ 29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */, 1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */, 1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */, @@ -2589,8 +2584,8 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 + F050E17623AD70C40011CE47 /* PlatformTouchPoint.h */, 0FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */, 935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */, - BCBB8AB513F1AFB000734DF0 /* PODInterval.h */, -@@ -35747,6 +35769,7 @@ + F491A66A2A9FEFA300F96146 /* PlatformWheelEvent.serialization.in */, +@@ -35987,6 +36009,7 @@ AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */, 6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */, 6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */, @@ -2598,7 +2593,7 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 7CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */, 7CE7FA591EF882300060C9D6 /* DocumentTouch.h */, A8185F3209765765005826D9 /* DocumentType.cpp */, -@@ -40349,6 +40372,8 @@ +@@ -40619,6 +40642,8 @@ 1AD8F81B11CAB9E900E93E54 /* PlatformStrategies.h in Headers */, 0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */, 074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */, @@ -2607,7 +2602,7 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 CDD08ABD277E542600EA3755 /* PlatformTrackConfiguration.h in Headers */, CD1F9B022700323D00617EB6 /* PlatformVideoColorPrimaries.h in Headers */, CD1F9B01270020B700617EB6 /* PlatformVideoColorSpace.h in Headers */, -@@ -41583,6 +41608,7 @@ +@@ -41863,6 +41888,7 @@ 0F54DD081881D5F5003EEDBB /* Touch.h in Headers */, 71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */, 0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */, @@ -2615,7 +2610,7 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 0F54DD0A1881D5F5003EEDBB /* TouchList.h in Headers */, 070334D71459FFD5008D8D45 /* TrackBase.h in Headers */, BE88E0C21715CE2600658D98 /* TrackListBase.h in Headers */, -@@ -42685,6 +42711,8 @@ +@@ -42976,6 +43002,8 @@ 2D22830323A8470700364B7E /* CursorMac.mm in Sources */, 5CBD59592280E926002B22AA /* CustomHeaderFields.cpp in Sources */, 07E4BDBF2A3A5FAB000D5509 /* DictationCaretAnimator.cpp in Sources */, @@ -2624,7 +2619,7 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */, 4667EA3E2968D9DA00BAB1E2 /* GameControllerHapticEffect.mm in Sources */, 46FE73D32968E52000B8064C /* GameControllerHapticEngines.mm in Sources */, -@@ -42764,6 +42792,9 @@ +@@ -43059,6 +43087,9 @@ CE88EE262414467B007F29C2 /* TextAlternativeWithRange.mm in Sources */, BE39137129B267F500FA5D4F /* TextTransformCocoa.cpp in Sources */, 51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */, @@ -2635,7 +2630,7 @@ index edaf3a605d842164841fd5f951b0536069e1d007..f2eb66689071b3918cc6dbb892e00f22 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 f42fb0d0074f63e81aebbd24f899cc71a94deb62..454de188434a84c87bdcd298b72970ef8565822c 100644 +index 7d0f55b409086d4bee10f9b18f91d4584d74748c..cdfac5546dc5cb4d2826bfc306cd4319d4915d6b 100644 --- a/Source/WebCore/accessibility/AccessibilityObject.cpp +++ b/Source/WebCore/accessibility/AccessibilityObject.cpp @@ -64,6 +64,7 @@ @@ -2646,7 +2641,7 @@ index f42fb0d0074f63e81aebbd24f899cc71a94deb62..454de188434a84c87bdcd298b72970ef #include "LocalFrame.h" #include "LocalizedStrings.h" #include "MathMLNames.h" -@@ -3950,9 +3951,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const +@@ -3946,9 +3947,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const if (roleValue() == AccessibilityRole::ApplicationDialog) return AccessibilityObjectInclusion::IncludeObject; @@ -2664,10 +2659,10 @@ index f42fb0d0074f63e81aebbd24f899cc71a94deb62..454de188434a84c87bdcd298b72970ef { AXComputedObjectAttributeCache* attributeCache = nullptr; diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h -index 6bdd79fc280b5c58f041e4a5cc9179cb2e2788d9..db4e4a028e3631b9230d69d8c5287db1143fb013 100644 +index c1132158c6c0fa9c5c94c5a5202d5a142709af19..6c4a0d436ddef50b382cfb926a4441b3c73c3886 100644 --- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h +++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h -@@ -175,6 +175,8 @@ namespace WebCore { +@@ -176,6 +176,8 @@ namespace WebCore { macro(DecompressionStreamTransform) \ macro(DelayNode) \ macro(DeprecationReportBody) \ @@ -2797,20 +2792,22 @@ index f27718c1e2b8cd0a8075e556d4cdba7d9ae8fc54..2b61721594e5435845f3151e0de345e9 ] partial interface Element { undefined requestPointerLock(); diff --git a/Source/WebCore/dom/PointerEvent.cpp b/Source/WebCore/dom/PointerEvent.cpp -index 37ef194cdc90fecbf8733161ff7b538fc566dece..835e442a762d570b48037c1c9190e6d296f4b266 100644 +index 69b66eae141ec206b8c51382e709230034d3bfb7..4a2ce3dd0b527e391de06635b083b4f69dc9722f 100644 --- a/Source/WebCore/dom/PointerEvent.cpp +++ b/Source/WebCore/dom/PointerEvent.cpp -@@ -27,7 +27,9 @@ +@@ -27,9 +27,11 @@ #include "PointerEvent.h" #include "EventNames.h" +#include "MouseEvent.h" #include "Node.h" + #include "PlatformMouseEvent.h" + #include "PointerEventTypeNames.h" +#include "PlatformTouchEvent.h" #include namespace WebCore { -@@ -116,4 +118,63 @@ EventInterface PointerEvent::eventInterface() const +@@ -124,4 +126,51 @@ EventInterface PointerEvent::eventInterface() const return PointerEventInterfaceType; } @@ -2836,18 +2833,6 @@ index 37ef194cdc90fecbf8733161ff7b538fc566dece..835e442a762d570b48037c1c9190e6d2 + return nullAtom(); +} + -+static short buttonForType(const AtomString& type) -+{ -+ return type == eventNames().pointermoveEvent ? -1 : 0; -+} -+ -+static unsigned short buttonsForType(const AtomString& type) -+{ -+ // We have contact with the touch surface for most events except when we've released the touch or canceled it. -+ auto& eventNames = WebCore::eventNames(); -+ return (type == eventNames.pointerupEvent || type == eventNames.pointeroutEvent || type == eventNames.pointerleaveEvent || type == eventNames.pointercancelEvent) ? 0 : 1; -+} -+ +Ref PointerEvent::create(const PlatformTouchEvent& event, unsigned index, bool isPrimary, Ref&& view, const IntPoint& touchDelta) +{ + const auto& type = pointerEventType(event.touchPoints().at(index).state()); @@ -2875,7 +2860,7 @@ index 37ef194cdc90fecbf8733161ff7b538fc566dece..835e442a762d570b48037c1c9190e6d2 + } // namespace WebCore diff --git a/Source/WebCore/dom/PointerEvent.h b/Source/WebCore/dom/PointerEvent.h -index 17784dfc482c3033ea0e3ce7fdcf75b2eb4fc9d7..956c05246b5c1368e2c5257b347848d1dab4b969 100644 +index e56223a885097ff60f8db1eef5cca4aa4ad0511d..60c5ad6b8795b2985249833a8d1143ebab64b700 100644 --- a/Source/WebCore/dom/PointerEvent.h +++ b/Source/WebCore/dom/PointerEvent.h @@ -33,6 +33,8 @@ @@ -2888,7 +2873,7 @@ index 17784dfc482c3033ea0e3ce7fdcf75b2eb4fc9d7..956c05246b5c1368e2c5257b347848d1 #if ENABLE(TOUCH_EVENTS) && PLATFORM(WPE) @@ -85,7 +87,7 @@ public: - static Ref create(const AtomString& type, short button, const MouseEvent&, PointerID, const String& pointerType); + static Ref create(const AtomString& type, MouseButton, const MouseEvent&, PointerID, const String& pointerType); static Ref create(const AtomString& type, PointerID, const String& pointerType, IsPrimary = IsPrimary::No); -#if ENABLE(TOUCH_EVENTS) && (PLATFORM(IOS_FAMILY) || PLATFORM(WPE)) @@ -2896,9 +2881,9 @@ index 17784dfc482c3033ea0e3ce7fdcf75b2eb4fc9d7..956c05246b5c1368e2c5257b347848d1 static Ref create(const PlatformTouchEvent&, unsigned touchIndex, bool isPrimary, Ref&&, const IntPoint& touchDelta = { }); static Ref create(const AtomString& type, const PlatformTouchEvent&, unsigned touchIndex, bool isPrimary, Ref&&, const IntPoint& touchDelta = { }); #endif -@@ -134,7 +136,7 @@ private: +@@ -140,7 +142,7 @@ private: PointerEvent(const AtomString&, Init&&); - PointerEvent(const AtomString& type, short button, const MouseEvent&, PointerID, const String& pointerType); + PointerEvent(const AtomString& type, MouseButton, const MouseEvent&, PointerID, const String& pointerType); PointerEvent(const AtomString& type, PointerID, const String& pointerType, IsPrimary); -#if ENABLE(TOUCH_EVENTS) && (PLATFORM(IOS_FAMILY) || PLATFORM(WPE)) +#if ENABLE(TOUCH_EVENTS) @@ -2906,7 +2891,7 @@ index 17784dfc482c3033ea0e3ce7fdcf75b2eb4fc9d7..956c05246b5c1368e2c5257b347848d1 #endif diff --git a/Source/WebCore/editing/libwpe/EditorLibWPE.cpp b/Source/WebCore/editing/libwpe/EditorLibWPE.cpp -index 52ee00ea5df1b7eabedc3e9c344bd6d715d462fa..e311d17d5f18c9bf239e9fab3c1090c3578fc96c 100644 +index 7813532cc52d582c42aebc979a1ecd1137765f08..125b3aa4cb35eff2b117a46c1e126de129b60c04 100644 --- a/Source/WebCore/editing/libwpe/EditorLibWPE.cpp +++ b/Source/WebCore/editing/libwpe/EditorLibWPE.cpp @@ -34,6 +34,7 @@ @@ -2923,7 +2908,7 @@ index 52ee00ea5df1b7eabedc3e9c344bd6d715d462fa..e311d17d5f18c9bf239e9fab3c1090c3 +RefPtr Editor::webContentFromPasteboard(Pasteboard& pasteboard, const SimpleRange& context, bool allowPlainText, bool& chosePlainText) +{ -+ WebContentReader reader(*m_document.frame(), context, allowPlainText); ++ WebContentReader reader(*document().frame(), context, allowPlainText); + pasteboard.read(reader); + chosePlainText = reader.madeFragmentFromPlainText; + return WTFMove(reader.fragment); @@ -2968,7 +2953,7 @@ index 161a668d55aa0d3de7d7acb9ea752119c06130de..80d9a99b4346cbbbc23d7647fe6ebef0 break; } diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp -index c2dabfbc86e46d14048134545031159757e7c2e4..d3833a407a9e47c8809620ef5cf97346891dd29c 100644 +index 284787f7db1051968ccaf7852bf0e71228ef2e99..d1977ec28b264e964264fe26155d84005e8099aa 100644 --- a/Source/WebCore/inspector/InspectorController.cpp +++ b/Source/WebCore/inspector/InspectorController.cpp @@ -288,6 +288,8 @@ void InspectorController::disconnectFrontend(FrontendChannel& frontendChannel) @@ -3049,10 +3034,10 @@ index 3a981b5bf5ca0bbf4d1c9f0b125564742cd8cad9..f8fc2ca6700461627933f149c5837075 } // namespace WebCore diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp -index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee707d074d93 100644 +index 51cc7097811a72232a9415e64efda2b103e392cf..c622d7e4baf7c0c30b667fdef6a3c05445e6e8ad 100644 --- a/Source/WebCore/inspector/InspectorInstrumentation.cpp +++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp -@@ -598,6 +598,12 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i +@@ -599,6 +599,12 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i pageAgent->applyUserAgentOverride(userAgent); } @@ -3065,7 +3050,7 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents& instrumentingAgents, AtomString& media) { if (auto* pageAgent = instrumentingAgents.enabledPageAgent()) -@@ -681,6 +687,12 @@ void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents& instrumen +@@ -682,6 +688,12 @@ void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents& instrumen consoleAgent->didFailLoading(identifier, error); // This should come AFTER resource notification, front-end relies on this. } @@ -3078,7 +3063,7 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 void InspectorInstrumentation::willLoadXHRSynchronouslyImpl(InstrumentingAgents& instrumentingAgents) { if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent()) -@@ -713,20 +725,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents& +@@ -714,20 +726,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents& void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame) { @@ -3102,7 +3087,7 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 } void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame) -@@ -809,12 +818,6 @@ void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& ins +@@ -810,12 +819,6 @@ void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& ins pageDOMDebuggerAgent->frameDocumentUpdated(frame); } @@ -3115,7 +3100,7 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 void InspectorInstrumentation::frameStartedLoadingImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame) { if (frame.isMainFrame()) { -@@ -845,10 +848,10 @@ void InspectorInstrumentation::frameStoppedLoadingImpl(InstrumentingAgents& inst +@@ -846,10 +849,10 @@ void InspectorInstrumentation::frameStoppedLoadingImpl(InstrumentingAgents& inst inspectorPageAgent->frameStoppedLoading(frame); } @@ -3128,7 +3113,7 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 } void InspectorInstrumentation::frameClearedScheduledNavigationImpl(InstrumentingAgents& instrumentingAgents, Frame& frame) -@@ -863,6 +866,12 @@ void InspectorInstrumentation::accessibilitySettingsDidChangeImpl(InstrumentingA +@@ -864,6 +867,12 @@ void InspectorInstrumentation::accessibilitySettingsDidChangeImpl(InstrumentingA inspectorPageAgent->accessibilitySettingsDidChange(); } @@ -3141,7 +3126,7 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 #if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT) void InspectorInstrumentation::defaultAppearanceDidChangeImpl(InstrumentingAgents& instrumentingAgents) { -@@ -1051,6 +1060,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent +@@ -1052,6 +1061,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent canvasAgent->consoleStopRecordingCanvas(context); } @@ -3154,7 +3139,7 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 void InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents& instrumentingAgents, Database& database) { if (auto* databaseAgent = instrumentingAgents.enabledDatabaseAgent()) -@@ -1351,6 +1366,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins +@@ -1358,6 +1373,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins layerTreeAgent->renderLayerDestroyed(renderLayer); } @@ -3191,7 +3176,7 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(WorkerOrWorkletGlobalScope& globalScope) { return globalScope.inspectorController().m_instrumentingAgents; -@@ -1362,6 +1407,13 @@ InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(Page& page) +@@ -1369,6 +1414,13 @@ InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(Page& page) return page.inspectorController().m_instrumentingAgents.get(); } @@ -3206,14 +3191,14 @@ index 55e1d3bbe88f38a730fae0ab6e4c513508b1c8a6..727f8143f1a07c6e7e605a2c0147ee70 { if (is(context)) diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h -index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c866956df9 100644 +index f032b90453a44b40c03786f660f105d94ccfab65..51aebd842948754785c25e99980594d45658df48 100644 --- a/Source/WebCore/inspector/InspectorInstrumentation.h +++ b/Source/WebCore/inspector/InspectorInstrumentation.h @@ -31,6 +31,7 @@ #pragma once -+#include "AccessibilityObjectInterface.h" ++#include "AXCoreObject.h" #include "CSSSelector.h" #include "CanvasBase.h" #include "CanvasRenderingContext.h" @@ -3273,7 +3258,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 static void performanceMark(ScriptExecutionContext&, const String&, std::optional, LocalFrame*); -@@ -325,6 +331,12 @@ public: +@@ -326,6 +332,12 @@ public: static void layerTreeDidChange(Page*); static void renderLayerDestroyed(Page*, const RenderLayer&); @@ -3286,7 +3271,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 static void frontendCreated(); static void frontendDeleted(); static bool hasFrontends() { return InspectorInstrumentationPublic::hasFrontends(); } -@@ -341,6 +353,8 @@ public: +@@ -342,6 +354,8 @@ public: static void registerInstrumentingAgents(InstrumentingAgents&); static void unregisterInstrumentingAgents(InstrumentingAgents&); @@ -3295,7 +3280,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 private: static void didClearWindowObjectInWorldImpl(InstrumentingAgents&, LocalFrame&, DOMWrapperWorld&); static bool isDebuggerPausedImpl(InstrumentingAgents&); -@@ -420,6 +434,7 @@ private: +@@ -421,6 +435,7 @@ private: static void didRecalculateStyleImpl(InstrumentingAgents&); static void didScheduleStyleRecalculationImpl(InstrumentingAgents&, Document&); static void applyUserAgentOverrideImpl(InstrumentingAgents&, String&); @@ -3303,7 +3288,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 static void applyEmulatedMediaImpl(InstrumentingAgents&, AtomString&); static void flexibleBoxRendererBeganLayoutImpl(InstrumentingAgents&, const RenderObject&); -@@ -434,6 +449,7 @@ private: +@@ -435,6 +450,7 @@ private: static void didReceiveDataImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const SharedBuffer*, int encodedDataLength); static void didFinishLoadingImpl(InstrumentingAgents&, ResourceLoaderIdentifier, DocumentLoader*, const NetworkLoadMetrics&, ResourceLoader*); static void didFailLoadingImpl(InstrumentingAgents&, ResourceLoaderIdentifier, DocumentLoader*, const ResourceError&); @@ -3311,7 +3296,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&); static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&); static void scriptImportedImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const String& sourceString); -@@ -444,13 +460,13 @@ private: +@@ -445,13 +461,13 @@ private: static void frameDetachedFromParentImpl(InstrumentingAgents&, LocalFrame&); static void didCommitLoadImpl(InstrumentingAgents&, LocalFrame&, DocumentLoader*); static void frameDocumentUpdatedImpl(InstrumentingAgents&, LocalFrame&); @@ -3327,7 +3312,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 #if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT) static void defaultAppearanceDidChangeImpl(InstrumentingAgents&); #endif -@@ -477,6 +493,7 @@ private: +@@ -478,6 +494,7 @@ private: static void stopProfilingImpl(InstrumentingAgents&, JSC::JSGlobalObject*, const String& title); static void consoleStartRecordingCanvasImpl(InstrumentingAgents&, CanvasRenderingContext&, JSC::JSGlobalObject&, JSC::JSObject* options); static void consoleStopRecordingCanvasImpl(InstrumentingAgents&, CanvasRenderingContext&); @@ -3335,7 +3320,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 static void performanceMarkImpl(InstrumentingAgents&, const String& label, std::optional, LocalFrame*); -@@ -534,6 +551,12 @@ private: +@@ -536,6 +553,12 @@ private: static void layerTreeDidChangeImpl(InstrumentingAgents&); static void renderLayerDestroyedImpl(InstrumentingAgents&, const RenderLayer&); @@ -3348,7 +3333,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 static InstrumentingAgents& instrumentingAgents(Page&); static InstrumentingAgents& instrumentingAgents(WorkerOrWorkletGlobalScope&); -@@ -1066,6 +1089,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(LocalFrame& frame, +@@ -1068,6 +1091,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(LocalFrame& frame, applyUserAgentOverrideImpl(*agents, userAgent); } @@ -3362,7 +3347,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 inline void InspectorInstrumentation::applyEmulatedMedia(LocalFrame& frame, AtomString& media) { FAST_RETURN_IF_NO_FRONTENDS(void()); -@@ -1168,6 +1198,13 @@ inline void InspectorInstrumentation::didFailLoading(WorkerOrWorkletGlobalScope& +@@ -1170,6 +1200,13 @@ inline void InspectorInstrumentation::didFailLoading(WorkerOrWorkletGlobalScope& didFailLoadingImpl(instrumentingAgents(globalScope), identifier, nullptr, error); } @@ -3376,7 +3361,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(LocalFrame& frame, ResourceLoaderIdentifier identifier, DocumentLoader& loader, const ResourceResponse& response) { // Treat the same as didReceiveResponse. -@@ -1258,13 +1295,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(LocalFrame& frame) +@@ -1260,13 +1297,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(LocalFrame& frame) frameDocumentUpdatedImpl(*agents, frame); } @@ -3390,7 +3375,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 inline void InspectorInstrumentation::frameStartedLoading(LocalFrame& frame) { FAST_RETURN_IF_NO_FRONTENDS(void()); -@@ -1286,11 +1316,11 @@ inline void InspectorInstrumentation::frameStoppedLoading(LocalFrame& frame) +@@ -1288,11 +1318,11 @@ inline void InspectorInstrumentation::frameStoppedLoading(LocalFrame& frame) frameStoppedLoadingImpl(*agents, frame); } @@ -3404,7 +3389,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 } inline void InspectorInstrumentation::frameClearedScheduledNavigation(Frame& frame) -@@ -1306,6 +1336,13 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page) +@@ -1308,6 +1338,13 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page) accessibilitySettingsDidChangeImpl(instrumentingAgents(page)); } @@ -3418,7 +3403,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 #if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT) inline void InspectorInstrumentation::defaultAppearanceDidChange(Page& page) { -@@ -1687,6 +1724,11 @@ inline void InspectorInstrumentation::performanceMark(ScriptExecutionContext& co +@@ -1696,6 +1733,11 @@ inline void InspectorInstrumentation::performanceMark(ScriptExecutionContext& co performanceMarkImpl(*agents, label, WTFMove(startTime), frame); } @@ -3430,7 +3415,7 @@ index e1c01081c9f6ad3683b1510bda02b9c27d8d0db3..fadc5a9f33aa1aeabe6fe88ad7bff7c8 inline void InspectorInstrumentation::didRequestAnimationFrame(Document& document, int callbackId) { FAST_RETURN_IF_NO_FRONTENDS(void()); -@@ -1743,6 +1785,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren +@@ -1752,6 +1794,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren renderLayerDestroyedImpl(*agents, renderLayer); } @@ -3908,7 +3893,7 @@ index 1a37f64d732d700f38a5d5b51c2ca2645ad30eeb..ab544156dc0d711074b86f51e3c7e63a void discardBindings(); diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp -index 8b5f6a837b71d877d5c6e0c0e128169859716c63..ef1d8212902787f8933ae8a8a34578521431e591 100644 +index 30e72aa5670d45e97332f647ebddc1677ffc6b9e..18986563d46d1261c2684ffac320f70276cc9d6b 100644 --- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp +++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp @@ -59,6 +59,7 @@ @@ -3997,7 +3982,7 @@ index 8b5f6a837b71d877d5c6e0c0e128169859716c63..ef1d8212902787f8933ae8a8a3457852 { return startsWithLettersIgnoringASCIICase(mimeType, "text/"_s) diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h -index c6ebcc9d7e399a35f71350c9374df0f2107c518b..3bfa03ae7f27d9128fe207c1de1bfea9dbf5e44f 100644 +index dc7e574ee6e9256a1f75ea838d20ca7f5e9190de..5dd4464256e0f5d652fa51fd611286ddc1da6f5c 100644 --- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h +++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h @@ -34,6 +34,8 @@ @@ -4018,7 +4003,7 @@ index c6ebcc9d7e399a35f71350c9374df0f2107c518b..3bfa03ae7f27d9128fe207c1de1bfea9 // InspectorInstrumentation void willRecalculateStyle(); diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp -index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e2814361393c 100644 +index cbf8e17e8faec3b6687483006d0a85b7341185a7..f734ba6ffed5cacc892ae027296cf76bef66caca 100644 --- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp +++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp @@ -32,19 +32,27 @@ @@ -4361,7 +4346,7 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 #if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT) void InspectorPageAgent::defaultAppearanceDidChange() { -@@ -1032,13 +1145,22 @@ void InspectorPageAgent::defaultAppearanceDidChange() +@@ -1032,13 +1145,25 @@ void InspectorPageAgent::defaultAppearanceDidChange() void InspectorPageAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapperWorld& world) { @@ -4381,13 +4366,16 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 + if (!m_worldNameToBootstrapScript.contains(worldName)) return; -- frame.script().evaluateIgnoringException(ScriptSourceCode(m_bootstrapScript, URL { "web-inspector://bootstrap.js"_str })); +- frame.script().evaluateIgnoringException(ScriptSourceCode(m_bootstrapScript, JSC::SourceTaintedOrigin::Untainted, URL { "web-inspector://bootstrap.js"_str })); ++ if (m_ignoreDidClearWindowObject) ++ return; ++ + String bootstrapScript = m_worldNameToBootstrapScript.get(worldName); -+ frame.script().evaluateInWorldIgnoringException(ScriptSourceCode(bootstrapScript, URL { "web-inspector://bootstrap.js"_str }), world); ++ frame.script().evaluateInWorldIgnoringException(ScriptSourceCode(bootstrapScript, JSC::SourceTaintedOrigin::Untainted, URL { "web-inspector://bootstrap.js"_str }), world); } void InspectorPageAgent::didPaint(RenderObject& renderer, const LayoutRect& rect) -@@ -1086,6 +1208,51 @@ void InspectorPageAgent::didRecalculateStyle() +@@ -1086,6 +1211,51 @@ void InspectorPageAgent::didRecalculateStyle() m_overlay->update(); } @@ -4439,7 +4427,7 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 Ref InspectorPageAgent::buildObjectForFrame(LocalFrame* frame) { ASSERT_ARG(frame, frame); -@@ -1183,6 +1350,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent) +@@ -1183,6 +1353,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent) userAgent = m_userAgentOverride; } @@ -4452,7 +4440,7 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 void InspectorPageAgent::applyEmulatedMedia(AtomString& media) { if (!m_emulatedMedia.isEmpty()) -@@ -1210,11 +1383,13 @@ Protocol::ErrorStringOr InspectorPageAgent::snapshotNode(Protocol::DOM:: +@@ -1210,11 +1386,13 @@ Protocol::ErrorStringOr InspectorPageAgent::snapshotNode(Protocol::DOM:: return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes); } @@ -4467,7 +4455,7 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 IntRect rectangle(x, y, width, height); auto* localMainFrame = dynamicDowncast(m_inspectedPage.mainFrame()); -@@ -1228,6 +1403,43 @@ Protocol::ErrorStringOr InspectorPageAgent::snapshotRect(int x, int y, i +@@ -1228,6 +1406,43 @@ Protocol::ErrorStringOr InspectorPageAgent::snapshotRect(int x, int y, i return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes); } @@ -4511,7 +4499,7 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 #if ENABLE(WEB_ARCHIVE) && USE(CF) Protocol::ErrorStringOr InspectorPageAgent::archive() { -@@ -1244,7 +1456,6 @@ Protocol::ErrorStringOr InspectorPageAgent::archive() +@@ -1244,7 +1459,6 @@ Protocol::ErrorStringOr InspectorPageAgent::archive() } #endif @@ -4519,7 +4507,7 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 Protocol::ErrorStringOr InspectorPageAgent::setScreenSizeOverride(std::optional&& width, std::optional&& height) { if (width.has_value() != height.has_value()) -@@ -1262,6 +1473,629 @@ Protocol::ErrorStringOr InspectorPageAgent::setScreenSizeOverride(std::opt +@@ -1262,6 +1476,626 @@ Protocol::ErrorStringOr InspectorPageAgent::setScreenSizeOverride(std::opt localMainFrame->setOverrideScreenSize(FloatSize(width.value_or(0), height.value_or(0))); return { }; } @@ -4902,9 +4890,6 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 + axNode->setFocused(axObject->isFocused()); + if (axObject->isModalNode()) + axNode->setModal(axObject->isModalNode()); -+ bool multiline = axObject->ariaIsMultiline() || axObject->roleValue() == AccessibilityRole::TextArea; -+ if (multiline) -+ axNode->setMultiline(multiline); + if (axObject->isMultiSelectable()) + axNode->setMultiselectable(axObject->isMultiSelectable()); + if (liveObject && liveObject->supportsReadOnly() && !axObject->canSetValueAttribute() && axObject->isEnabled()) @@ -5150,7 +5135,7 @@ index 0a015134788986e4b829b887377c976ee2673b6b..e2924cf0d8863281f2a5102e7998e281 } // namespace WebCore diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.h b/Source/WebCore/inspector/agents/InspectorPageAgent.h -index f270cb7c3bcc1b5d7d646d9c6e6bda7063cf82e3..5f80d34d6476250a2495ccd4871aed1c2ef13ccc 100644 +index f270cb7c3bcc1b5d7d646d9c6e6bda7063cf82e3..e85f09290c40f3c9a203e1ffd69dea3ef8fce289 100644 --- a/Source/WebCore/inspector/agents/InspectorPageAgent.h +++ b/Source/WebCore/inspector/agents/InspectorPageAgent.h @@ -32,8 +32,10 @@ @@ -5210,7 +5195,7 @@ index f270cb7c3bcc1b5d7d646d9c6e6bda7063cf82e3..5f80d34d6476250a2495ccd4871aed1c Inspector::Protocol::ErrorStringOr>> searchInResource(const Inspector::Protocol::Network::FrameId&, const String& url, const String& query, std::optional&& caseSensitive, std::optional&& isRegex, const Inspector::Protocol::Network::RequestId&); Inspector::Protocol::ErrorStringOr>> searchInResources(const String&, std::optional&& caseSensitive, std::optional&& isRegex); #if !PLATFORM(IOS_FAMILY) -@@ -115,37 +126,57 @@ public: +@@ -115,45 +126,68 @@ public: #endif Inspector::Protocol::ErrorStringOr setShowPaintRects(bool); Inspector::Protocol::ErrorStringOr setEmulatedMedia(const String&); @@ -5275,7 +5260,10 @@ index f270cb7c3bcc1b5d7d646d9c6e6bda7063cf82e3..5f80d34d6476250a2495ccd4871aed1c Frame* frameForId(const Inspector::Protocol::Network::FrameId&); WEBCORE_EXPORT String frameId(Frame*); -@@ -154,6 +185,7 @@ public: + String loaderId(DocumentLoader*); + LocalFrame* assertFrame(Inspector::Protocol::ErrorString&, const Inspector::Protocol::Network::FrameId&); ++ void setIgnoreDidClearWindowObject(bool ignore) { m_ignoreDidClearWindowObject = ignore; } ++ bool ignoreDidClearWindowObject() const { return m_ignoreDidClearWindowObject; } private: double timestamp(); @@ -5283,7 +5271,7 @@ index f270cb7c3bcc1b5d7d646d9c6e6bda7063cf82e3..5f80d34d6476250a2495ccd4871aed1c static bool mainResourceContent(LocalFrame*, bool withBase64Encode, String* result); static bool dataContent(const uint8_t* data, unsigned size, const String& textEncodingName, bool withBase64Encode, String* result); -@@ -169,17 +201,21 @@ private: +@@ -169,17 +203,22 @@ private: RefPtr m_backendDispatcher; Page& m_inspectedPage; @@ -5304,6 +5292,7 @@ index f270cb7c3bcc1b5d7d646d9c6e6bda7063cf82e3..5f80d34d6476250a2495ccd4871aed1c + bool m_interceptFileChooserDialog { false }; + bool m_bypassCSP { false }; + bool m_doingAccessibilitySnapshot { false }; ++ bool m_ignoreDidClearWindowObject { false }; }; } // namespace WebCore @@ -5358,7 +5347,7 @@ index 242aea89da38d22a2c2b314f337e6aa4f3becdb8..51f978caae1a6a76fb1833fbfef76837 } diff --git a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp -index 77b093ba149993094dc059d6cf8348095500bcb7..dc0a611a9da1ae4ffb54f1b57bba6ea290a57f48 100644 +index 77b093ba149993094dc059d6cf8348095500bcb7..fe0a9a641dfb497dcd95aa4c9fc962784157a964 100644 --- a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp +++ b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp @@ -34,6 +34,7 @@ @@ -5377,7 +5366,7 @@ index 77b093ba149993094dc059d6cf8348095500bcb7..dc0a611a9da1ae4ffb54f1b57bba6ea2 #include "SecurityOrigin.h" #include "UserGestureEmulationScope.h" #include -@@ -85,6 +87,8 @@ Protocol::ErrorStringOr PageRuntimeAgent::disable() +@@ -85,13 +87,73 @@ Protocol::ErrorStringOr PageRuntimeAgent::disable() { m_instrumentingAgents.setEnabledPageRuntimeAgent(nullptr); @@ -5386,10 +5375,17 @@ index 77b093ba149993094dc059d6cf8348095500bcb7..dc0a611a9da1ae4ffb54f1b57bba6ea2 return InspectorRuntimeAgent::disable(); } -@@ -94,8 +98,66 @@ void PageRuntimeAgent::frameNavigated(LocalFrame& frame) + void PageRuntimeAgent::frameNavigated(LocalFrame& frame) + { ++ auto* pageAgent = m_instrumentingAgents.enabledPageAgent(); ++ if (pageAgent) ++ pageAgent->setIgnoreDidClearWindowObject(true); + // Ensure execution context is created for the frame even if it doesn't have scripts. mainWorldGlobalObject(frame); - } - ++ if (pageAgent) ++ pageAgent->setIgnoreDidClearWindowObject(false); ++} ++ +static JSC_DECLARE_HOST_FUNCTION(bindingCallback); + +JSC_DEFINE_HOST_FUNCTION(bindingCallback, (JSC::JSGlobalObject * globalObject, JSC::CallFrame* callFrame)) @@ -5441,22 +5437,26 @@ index 77b093ba149993094dc059d6cf8348095500bcb7..dc0a611a9da1ae4ffb54f1b57bba6ea2 + if (injectedScript.hasNoValue()) + return; + m_frontendDispatcher->bindingCalled(injectedScriptManager().injectedScriptIdFor(globalObject), name, arg); -+} -+ + } + void PageRuntimeAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapperWorld& world) - { +@@ -100,7 +162,26 @@ void PageRuntimeAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapper + if (!pageAgent) + return; + ++ if (pageAgent->ignoreDidClearWindowObject()) ++ return; ++ + if (world.isNormal()) { + for (const auto& name : m_bindingNames) + addBindingToFrame(frame, name); + } + - auto* pageAgent = m_instrumentingAgents.enabledPageAgent(); - if (!pageAgent) - return; -@@ -103,6 +165,15 @@ void PageRuntimeAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapper ++ pageAgent->setIgnoreDidClearWindowObject(true); notifyContextCreated(pageAgent->frameId(&frame), frame.script().globalObject(world), world); - } - ++ pageAgent->setIgnoreDidClearWindowObject(false); ++} ++ +void PageRuntimeAgent::didReceiveMainResourceError(LocalFrame& frame) +{ + if (frame.loader().stateMachine().isDisplayingInitialEmptyDocument()) { @@ -5464,12 +5464,10 @@ index 77b093ba149993094dc059d6cf8348095500bcb7..dc0a611a9da1ae4ffb54f1b57bba6ea2 + // it usable in case loading failed. + mainWorldGlobalObject(frame); + } -+} -+ + } + InjectedScript PageRuntimeAgent::injectedScriptForEval(Protocol::ErrorString& errorString, std::optional&& executionContextId) - { - if (!executionContextId) { -@@ -139,9 +210,6 @@ void PageRuntimeAgent::reportExecutionContextCreation() +@@ -139,9 +220,6 @@ void PageRuntimeAgent::reportExecutionContextCreation() return; m_inspectedPage.forEachFrame([&](LocalFrame& frame) { @@ -5479,7 +5477,7 @@ index 77b093ba149993094dc059d6cf8348095500bcb7..dc0a611a9da1ae4ffb54f1b57bba6ea2 auto frameId = pageAgent->frameId(&frame); // Always send the main world first. -@@ -200,18 +268,24 @@ Protocol::ErrorStringOr, std::op +@@ -200,18 +278,24 @@ Protocol::ErrorStringOr, std::op if (injectedScript.hasNoValue()) return makeUnexpected(errorString); @@ -5585,10 +5583,10 @@ index 7efc7c39d4ea689063c3371c9d9f5d25e433b3ae..c18f0b38ef9a22b594b60287d6c205b1 protected: static SameSiteInfo sameSiteInfo(const Document&, IsForDOMCookieAccess = IsForDOMCookieAccess::No); diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp -index 5442846cef667a81cf7c08b1d653ee46d66812bb..d4390a1518dae85d067f7808ef0b06a54451c4c5 100644 +index c4cb8010b9f631f8d03f2251726c31b8d7eec2e5..fef684a8c4b63de4415db9ce156ee62acaefb303 100644 --- a/Source/WebCore/loader/DocumentLoader.cpp +++ b/Source/WebCore/loader/DocumentLoader.cpp -@@ -765,8 +765,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc +@@ -767,8 +767,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc if (!didReceiveRedirectResponse) return completionHandler(WTFMove(newRequest)); @@ -5599,7 +5597,7 @@ index 5442846cef667a81cf7c08b1d653ee46d66812bb..d4390a1518dae85d067f7808ef0b06a5 switch (navigationPolicyDecision) { case NavigationPolicyDecision::IgnoreLoad: case NavigationPolicyDecision::LoadWillContinueInAnotherProcess: -@@ -1549,8 +1551,6 @@ void DocumentLoader::detachFromFrame() +@@ -1551,8 +1553,6 @@ void DocumentLoader::detachFromFrame() if (!m_frame) return; @@ -5627,10 +5625,10 @@ index 4c9176db0a582a075fb3d68c921dcd960c271e86..3363380982c54cea74bd853e2682068b DocumentWriter& writer() const { return m_writer; } diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp -index e97907da3295916577044fc2d4503bc39e5359b3..22d43a8a2814486dea3e7ac3af4348d3d812bfe9 100644 +index 9328921ba26573b39baad48e2aa711a6319d2a67..380ffe9398057e8d0de5c700d8af6264a7f6a1df 100644 --- a/Source/WebCore/loader/FrameLoader.cpp +++ b/Source/WebCore/loader/FrameLoader.cpp -@@ -1219,6 +1219,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr stat +@@ -1210,6 +1210,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr stat } m_client->dispatchDidNavigateWithinPage(); @@ -5638,7 +5636,7 @@ index e97907da3295916577044fc2d4503bc39e5359b3..22d43a8a2814486dea3e7ac3af4348d3 m_frame.document()->statePopped(stateObject ? stateObject.releaseNonNull() : SerializedScriptValue::nullValue()); m_client->dispatchDidPopStateWithinPage(); -@@ -1675,6 +1676,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t +@@ -1666,6 +1667,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t const String& httpMethod = loader->request().httpMethod(); if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) { @@ -5647,7 +5645,7 @@ index e97907da3295916577044fc2d4503bc39e5359b3..22d43a8a2814486dea3e7ac3af4348d3 RefPtr oldDocumentLoader = m_documentLoader; NavigationAction action { *m_frame.document(), loader->request(), InitiatedByMainFrame::Unknown, policyChecker().loadType(), isFormSubmission }; action.setIsRequestFromClientOrUserInput(loader->isRequestFromClientOrUserInput()); -@@ -1707,7 +1710,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t +@@ -1698,7 +1701,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t } RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()) || history().provisionalItem()); @@ -5657,7 +5655,7 @@ index e97907da3295916577044fc2d4503bc39e5359b3..22d43a8a2814486dea3e7ac3af4348d3 continueLoadAfterNavigationPolicy(request, formState.get(), navigationPolicyDecision, allowNavigationToInvalidURL); completionHandler(); }, PolicyDecisionMode::Asynchronous); -@@ -2967,14 +2972,19 @@ String FrameLoader::userAgent(const URL& url) const +@@ -2951,14 +2956,19 @@ String FrameLoader::userAgent(const URL& url) const String FrameLoader::navigatorPlatform() const { @@ -5679,7 +5677,7 @@ index e97907da3295916577044fc2d4503bc39e5359b3..22d43a8a2814486dea3e7ac3af4348d3 } void FrameLoader::dispatchOnloadEvents() -@@ -3401,6 +3411,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error) +@@ -3386,6 +3396,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error) checkCompleted(); if (m_frame.page()) checkLoadComplete(); @@ -5688,7 +5686,7 @@ index e97907da3295916577044fc2d4503bc39e5359b3..22d43a8a2814486dea3e7ac3af4348d3 } void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, const SecurityOrigin* requesterOrigin, bool shouldContinue) -@@ -4236,9 +4248,6 @@ String FrameLoader::referrer() const +@@ -4221,9 +4233,6 @@ String FrameLoader::referrer() const void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() { @@ -5698,7 +5696,7 @@ index e97907da3295916577044fc2d4503bc39e5359b3..22d43a8a2814486dea3e7ac3af4348d3 Vector> worlds; ScriptController::getAllWorlds(worlds); for (auto& world : worlds) -@@ -4247,13 +4256,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() +@@ -4232,13 +4241,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world) { @@ -5808,7 +5806,7 @@ index cc2916050d7bff5290dd8079d5b77c68c6dd4649..94622e922f4624a4d07896a9983901e4 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 de70dc20b757150c82c5327fc151742331f1f305..e7eba51632049fe0264faf10837491873bd78286 100644 +index 33293f37310d019dbd755d067797a5bb4b3a56cf..c28b5ccb4bd4f179f850efc5c1a1eae18528da64 100644 --- a/Source/WebCore/page/ChromeClient.h +++ b/Source/WebCore/page/ChromeClient.h @@ -325,7 +325,7 @@ public: @@ -5821,10 +5819,10 @@ index de70dc20b757150c82c5327fc151742331f1f305..e7eba51632049fe0264faf1083749187 #if ENABLE(INPUT_TYPE_COLOR) diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp -index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff4777d44fb73 100644 +index 2428fc773b39011a7d642d4036a7e78386ebeb68..4af98fa0726d89e32135e7b99343897e3eb31d8f 100644 --- a/Source/WebCore/page/EventHandler.cpp +++ b/Source/WebCore/page/EventHandler.cpp -@@ -145,6 +145,7 @@ +@@ -147,6 +147,7 @@ #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS) #include "PlatformTouchEvent.h" @@ -5832,7 +5830,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 #endif #if ENABLE(MAC_GESTURE_EVENTS) -@@ -856,9 +857,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve +@@ -858,9 +859,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve m_mousePressNode = event.targetNode(); m_frame.document()->setFocusNavigationStartingNode(event.targetNode()); @@ -5842,7 +5840,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 m_mousePressed = true; m_selectionInitiationState = HaveNotStartedSelection; -@@ -898,8 +897,6 @@ VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const Vis +@@ -900,8 +899,6 @@ VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const Vis return adjustedTarget->renderer()->positionForPoint(LayoutPoint(selectionEndPoint), nullptr); } @@ -5851,7 +5849,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 #if !PLATFORM(IOS_FAMILY) bool EventHandler::supportsSelectionUpdatesOnMouseDrag() const -@@ -921,8 +918,10 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e +@@ -923,8 +920,10 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e Ref protectedFrame(m_frame); @@ -5861,8 +5859,8 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 +#endif RefPtr targetNode = event.targetNode(); - if (event.event().button() != LeftButton || !targetNode) -@@ -943,7 +942,9 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e + if (event.event().button() != MouseButton::Left || !targetNode) +@@ -945,7 +944,9 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e ASSERT(mouseDownMayStartSelect() || m_mouseDownMayStartAutoscroll); #endif @@ -5872,7 +5870,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 if (m_mouseDownMayStartAutoscroll && !panScrollInProgress()) { m_autoscrollController->startAutoscrollForSelection(renderer); -@@ -960,6 +961,8 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e +@@ -962,6 +963,8 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e return true; } @@ -5881,7 +5879,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const { // This is a pre-flight check of whether the event might lead to a drag being started. Be careful -@@ -991,6 +994,8 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const +@@ -993,6 +996,8 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const return targetElement && page->dragController().draggableElement(&m_frame, targetElement.get(), result.roundedPointInInnerNodeFrame(), state); } @@ -5890,7 +5888,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 void EventHandler::updateSelectionForMouseDrag() { if (!supportsSelectionUpdatesOnMouseDrag()) -@@ -1099,7 +1104,6 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul +@@ -1101,7 +1106,6 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul if (oldSelection != newSelection && ImageOverlay::isOverlayText(newSelection.start().containerNode()) && ImageOverlay::isOverlayText(newSelection.end().containerNode())) invalidateClick(); } @@ -5898,7 +5896,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 void EventHandler::lostMouseCapture() { -@@ -1147,9 +1151,7 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e +@@ -1149,9 +1153,7 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e // on the selection, the selection goes away. However, if we are // editing, place the caret. if (m_mouseDownWasSingleClickInSelection && m_selectionInitiationState != ExtendedSelection @@ -5906,9 +5904,9 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 && m_dragStartPosition == event.event().position() -#endif && m_frame.selection().isRange() - && event.event().button() != RightButton) { + && event.event().button() != MouseButton::Right) { VisibleSelection newSelection; -@@ -2148,10 +2150,8 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& platformMouseE +@@ -2168,10 +2170,8 @@ HandleMouseEventResult EventHandler::handleMouseMoveEvent(const PlatformMouseEve swallowEvent = !dispatchMouseEvent(eventNames().mousemoveEvent, mouseEvent.targetNode(), 0, platformMouseEvent, FireMouseOverOut::Yes); @@ -5919,7 +5917,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 return swallowEvent; } -@@ -4246,7 +4246,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr +@@ -4273,7 +4273,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr if (!m_frame.document()) return false; @@ -5935,7 +5933,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 auto hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No; if (dragState().shouldDispatchEvents) { -@@ -4931,11 +4938,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event) +@@ -4958,11 +4965,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event) document.page()->pointerCaptureController().dispatchEventForTouchAtIndex( *touchTarget, cancelEvent, index, !index, *document.windowProxy(), { 0, 0 }); } @@ -5947,7 +5945,7 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 #endif if (&m_frame != targetFrame) { -@@ -4977,6 +4979,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event) +@@ -5004,6 +5006,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event) changedTouches[pointState].m_touches->append(WTFMove(touch)); changedTouches[pointState].m_targets.add(touchTarget); } @@ -5958,10 +5956,10 @@ index f34a453825002e7e176ab07f83d38cee4fe312d9..5bf4e02dfe2f77593199615afb5ff477 m_touchPressed = touches->length() > 0; if (allTouchReleased) diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h -index 13dd8153250bb5c4a26fe8ed5411b6ff8b8694b2..46ae6da891196750275b2eff404117712a190903 100644 +index c42f7523be4fc59b3cee076b620735c8693fbc08..cc1ae3be93e72cea09e0a5795a6b18df301034ab 100644 --- a/Source/WebCore/page/EventHandler.h +++ b/Source/WebCore/page/EventHandler.h -@@ -138,9 +138,7 @@ public: +@@ -139,9 +139,7 @@ public: WEBCORE_EXPORT VisiblePosition selectionExtentRespectingEditingBoundary(const VisibleSelection&, const LayoutPoint&, Node*); @@ -5971,7 +5969,7 @@ index 13dd8153250bb5c4a26fe8ed5411b6ff8b8694b2..46ae6da891196750275b2eff40411771 #if ENABLE(PAN_SCROLLING) void didPanScrollStart(); -@@ -405,10 +403,8 @@ private: +@@ -406,10 +404,8 @@ private: bool startKeyboardScrollAnimationOnRenderBoxAndItsAncestors(ScrollDirection, ScrollGranularity, RenderBox*, bool isKeyRepeat); bool startKeyboardScrollAnimationOnEnclosingScrollableContainer(ScrollDirection, ScrollGranularity, Node*, bool isKeyRepeat); @@ -5982,7 +5980,7 @@ index 13dd8153250bb5c4a26fe8ed5411b6ff8b8694b2..46ae6da891196750275b2eff40411771 WEBCORE_EXPORT bool handleMouseReleaseEvent(const MouseEventWithHitTestResults&); -@@ -510,10 +506,8 @@ private: +@@ -511,10 +507,8 @@ private: void defaultTabEventHandler(KeyboardEvent&); void defaultArrowEventHandler(FocusDirection, KeyboardEvent&); @@ -5993,7 +5991,7 @@ index 13dd8153250bb5c4a26fe8ed5411b6ff8b8694b2..46ae6da891196750275b2eff40411771 // The following are called at the beginning of handleMouseUp and handleDrag. // If they return true it indicates that they have consumed the event. -@@ -521,9 +515,10 @@ private: +@@ -522,9 +516,10 @@ private: #if ENABLE(DRAG_SUPPORT) bool eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&); @@ -6005,7 +6003,7 @@ index 13dd8153250bb5c4a26fe8ed5411b6ff8b8694b2..46ae6da891196750275b2eff40411771 enum class SetOrClearLastScrollbar { Clear, Set }; void updateLastScrollbarUnderMouse(Scrollbar*, SetOrClearLastScrollbar); -@@ -616,8 +611,8 @@ private: +@@ -617,8 +612,8 @@ private: Timer m_autoHideCursorTimer; #endif @@ -6016,7 +6014,7 @@ index 13dd8153250bb5c4a26fe8ed5411b6ff8b8694b2..46ae6da891196750275b2eff40411771 RefPtr m_dragTarget; bool m_mouseDownMayStartDrag { false }; diff --git a/Source/WebCore/page/FrameSnapshotting.cpp b/Source/WebCore/page/FrameSnapshotting.cpp -index d62d41b79f148cee977447f740bd6a768b159b0c..2d16d7243788ef876487d741caddc4a71cb5425f 100644 +index 7ee2659df6aca0f84b61cb0de78ba9518b65b61e..0f09634cc4e679742b64a29506e2bd65e73c6fe9 100644 --- a/Source/WebCore/page/FrameSnapshotting.cpp +++ b/Source/WebCore/page/FrameSnapshotting.cpp @@ -109,7 +109,7 @@ RefPtr snapshotFrameRectWithClip(LocalFrame& frame, const IntRect& @@ -6096,7 +6094,7 @@ index a6537109eeecdeb6d541fff3469c3c8f3a061ca2..d8fa86589e6d0ddcb3f84f2d6afed722 if (stateObjectType == StateObjectType::Push) { frame->loader().history().pushState(WTFMove(data), title, fullURL.string()); diff --git a/Source/WebCore/page/LocalFrame.cpp b/Source/WebCore/page/LocalFrame.cpp -index 0efefdcb28dd9083c99b16e719ea100fb1352dcf..8400b6cf505342727cca716330f87807d5be9e30 100644 +index e5452be0cfa1e035befbca4d1d2595688220f700..ab0fe3458df4270681f69facf39fd33a5144c892 100644 --- a/Source/WebCore/page/LocalFrame.cpp +++ b/Source/WebCore/page/LocalFrame.cpp @@ -40,6 +40,7 @@ @@ -6504,7 +6502,7 @@ index 0efefdcb28dd9083c99b16e719ea100fb1352dcf..8400b6cf505342727cca716330f87807 #undef FRAME_RELEASE_LOG_ERROR diff --git a/Source/WebCore/page/LocalFrame.h b/Source/WebCore/page/LocalFrame.h -index 95458a16c7d0fd5e30ef8db0b84f8ff951a95e0b..292763c72ebf7f41b0447ba09117c28e54f621bc 100644 +index dec423046a398d9ff9581182339202ab234d1b86..1fa73649aa87c39dc2e113bc9e16e27507c6f910 100644 --- a/Source/WebCore/page/LocalFrame.h +++ b/Source/WebCore/page/LocalFrame.h @@ -28,8 +28,10 @@ @@ -6583,10 +6581,10 @@ index 95458a16c7d0fd5e30ef8db0b84f8ff951a95e0b..292763c72ebf7f41b0447ba09117c28e ViewportArguments m_viewportArguments; diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp -index 39ffd9497dc9ef93f770f3eb8d2a492b59f76af1..fce232374cc127be90a273563f4838a56f8e85c7 100644 +index eeca345e3f10fbe452408539a33264d5dce43ec5..23b03d2caae1eef9cd6594a26a78fac4f035956d 100644 --- a/Source/WebCore/page/Page.cpp +++ b/Source/WebCore/page/Page.cpp -@@ -526,6 +526,45 @@ void Page::setOverrideViewportArguments(const std::optional& +@@ -527,6 +527,45 @@ void Page::setOverrideViewportArguments(const std::optional& document->updateViewportArguments(); } @@ -6632,7 +6630,7 @@ index 39ffd9497dc9ef93f770f3eb8d2a492b59f76af1..fce232374cc127be90a273563f4838a5 ScrollingCoordinator* Page::scrollingCoordinator() { if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) { -@@ -3753,6 +3792,26 @@ void Page::setUseDarkAppearanceOverride(std::optional valueOverride) +@@ -3751,6 +3790,26 @@ void Page::setUseDarkAppearanceOverride(std::optional valueOverride) #endif } @@ -6660,10 +6658,10 @@ index 39ffd9497dc9ef93f770f3eb8d2a492b59f76af1..fce232374cc127be90a273563f4838a5 { if (insets == m_fullscreenInsets) diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h -index 0941d8324e74a84b140441863c13bcabdc411c0e..eb91d294bacdb9e9078f8c5d53ff76db6165e9d4 100644 +index 332905b95e257e19a1c4928da5d6b0598497a63b..7a09f36a9a52edbc89ed224c319333d9b7878525 100644 --- a/Source/WebCore/page/Page.h +++ b/Source/WebCore/page/Page.h -@@ -309,6 +309,9 @@ public: +@@ -310,6 +310,9 @@ public: const std::optional& overrideViewportArguments() const { return m_overrideViewportArguments; } WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional&); @@ -6673,7 +6671,7 @@ index 0941d8324e74a84b140441863c13bcabdc411c0e..eb91d294bacdb9e9078f8c5d53ff76db static void refreshPlugins(bool reload); WEBCORE_EXPORT PluginData& pluginData(); void clearPluginData(); -@@ -370,6 +373,10 @@ public: +@@ -371,6 +374,10 @@ public: #if ENABLE(DRAG_SUPPORT) DragController& dragController() { return m_dragController.get(); } const DragController& dragController() const { return m_dragController.get(); } @@ -6684,7 +6682,7 @@ index 0941d8324e74a84b140441863c13bcabdc411c0e..eb91d294bacdb9e9078f8c5d53ff76db #endif FocusController& focusController() const { return *m_focusController; } #if ENABLE(CONTEXT_MENUS) -@@ -539,6 +546,10 @@ public: +@@ -541,6 +548,10 @@ public: WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); bool defaultUseDarkAppearance() const { return m_useDarkAppearance; } void setUseDarkAppearanceOverride(std::optional); @@ -6695,7 +6693,7 @@ index 0941d8324e74a84b140441863c13bcabdc411c0e..eb91d294bacdb9e9078f8c5d53ff76db #if ENABLE(TEXT_AUTOSIZING) float textAutosizingWidth() const { return m_textAutosizingWidth; } -@@ -976,6 +987,11 @@ public: +@@ -978,6 +989,11 @@ public: WEBCORE_EXPORT void setInteractionRegionsEnabled(bool); #endif @@ -6707,7 +6705,7 @@ index 0941d8324e74a84b140441863c13bcabdc411c0e..eb91d294bacdb9e9078f8c5d53ff76db #if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY) DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); } #endif -@@ -1115,6 +1131,9 @@ private: +@@ -1126,6 +1142,9 @@ private: #if ENABLE(DRAG_SUPPORT) UniqueRef m_dragController; @@ -6717,7 +6715,7 @@ index 0941d8324e74a84b140441863c13bcabdc411c0e..eb91d294bacdb9e9078f8c5d53ff76db #endif std::unique_ptr m_focusController; #if ENABLE(CONTEXT_MENUS) -@@ -1195,6 +1214,8 @@ private: +@@ -1206,6 +1225,8 @@ private: bool m_useElevatedUserInterfaceLevel { false }; bool m_useDarkAppearance { false }; std::optional m_useDarkAppearanceOverride; @@ -6726,7 +6724,7 @@ index 0941d8324e74a84b140441863c13bcabdc411c0e..eb91d294bacdb9e9078f8c5d53ff76db #if ENABLE(TEXT_AUTOSIZING) float m_textAutosizingWidth { 0 }; -@@ -1370,6 +1391,11 @@ private: +@@ -1381,6 +1402,11 @@ private: #endif std::optional m_overrideViewportArguments; @@ -6766,7 +6764,7 @@ index 9a6549a792bf95f6d5671289bc58be259ec73732..03a6ceb14a18b3b74e8544a98fb85841 Page& m_page; }; diff --git a/Source/WebCore/page/PointerCaptureController.cpp b/Source/WebCore/page/PointerCaptureController.cpp -index bd147a1fee46d2f228c115230f8d071dc303756c..b06dce53e787d95c6b89c01511084f95175764b7 100644 +index 4fcf544270085cd95bbab81297e68fe6701f5f49..94cf0aecebe5abe95cf308e8696df170c5ddc8d9 100644 --- a/Source/WebCore/page/PointerCaptureController.cpp +++ b/Source/WebCore/page/PointerCaptureController.cpp @@ -195,7 +195,7 @@ bool PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier(Poi @@ -6778,7 +6776,7 @@ index bd147a1fee46d2f228c115230f8d071dc303756c..b06dce53e787d95c6b89c01511084f95 static bool hierarchyHasCapturingEventListeners(Element* target, const AtomString& eventName) { for (RefPtr currentNode = target; currentNode; currentNode = currentNode->parentInComposedTree()) { -@@ -474,7 +474,7 @@ void PointerCaptureController::cancelPointer(PointerID pointerId, const IntPoint +@@ -499,7 +499,7 @@ void PointerCaptureController::cancelPointer(PointerID pointerId, const IntPoint capturingData->pendingTargetOverride = nullptr; capturingData->state = CapturingData::State::Cancelled; @@ -6788,10 +6786,10 @@ index bd147a1fee46d2f228c115230f8d071dc303756c..b06dce53e787d95c6b89c01511084f95 #endif diff --git a/Source/WebCore/page/PointerCaptureController.h b/Source/WebCore/page/PointerCaptureController.h -index 9ec307bf796452e21c695116d1f678e1d9916709..b47ed65e85cf9cbb0d32d6199a9b1c1c0681dfcb 100644 +index 91a9847a4083393e225f42e71c2dd590a88c0289..b0838c84e4ba24378db42f40a68856afe95fb9a7 100644 --- a/Source/WebCore/page/PointerCaptureController.h +++ b/Source/WebCore/page/PointerCaptureController.h -@@ -57,7 +57,7 @@ public: +@@ -58,7 +58,7 @@ public: RefPtr pointerEventForMouseEvent(const MouseEvent&, PointerID, const String& pointerType); @@ -6800,7 +6798,7 @@ index 9ec307bf796452e21c695116d1f678e1d9916709..b47ed65e85cf9cbb0d32d6199a9b1c1c void dispatchEventForTouchAtIndex(EventTarget&, const PlatformTouchEvent&, unsigned, bool isPrimary, WindowProxy&, const IntPoint&); #endif -@@ -77,12 +77,12 @@ private: +@@ -78,12 +78,12 @@ private: RefPtr pendingTargetOverride; RefPtr targetOverride; @@ -6860,7 +6858,7 @@ index 11af362d3018851cb8258419f3e0d3e01ea369c0..9ec64d3c88bf37ad423aa613bae557d7 } diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp -index cce7a25b8c69999670a38a05a7ce4fbf94132634..0ad60e920e5bdb6c5de7518bfd4d3076d5a70e38 100644 +index 58012d74ce6972f3fd2c7e7d054cf36ad08f05ed..37e981adab6620b750bbf82a2e10d2a6058712e6 100644 --- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp +++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp @@ -336,6 +336,8 @@ bool ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtoc @@ -7022,10 +7020,10 @@ index c77ddd17643628a87c0245ee2ea3ba417d40bc23..c5179ff48e57cdcfbe709a10bae517ff bool m_disallowFileAccess { false }; }; diff --git a/Source/WebCore/platform/DragImage.cpp b/Source/WebCore/platform/DragImage.cpp -index 550600c6f370af1b71a896d4fa3ef5a871a48c19..35d125361b7fa892cf863352bf0bd7131325ff38 100644 +index 9b613ca69af779a1e52b6a66216b0905809262dc..cd48a3551ae8da7702154798fcc6ab4df00f7f7f 100644 --- a/Source/WebCore/platform/DragImage.cpp +++ b/Source/WebCore/platform/DragImage.cpp -@@ -279,7 +279,7 @@ DragImage::~DragImage() +@@ -280,7 +280,7 @@ DragImage::~DragImage() deleteDragImage(m_dragImageRef); } @@ -7129,7 +7127,7 @@ index 4aa768e1c2a8da63004f34ccbf0d347b2484c37b..515c99ed21cde6c157bb9a1378a78372 #endif diff --git a/Source/WebCore/platform/PlatformScreen.cpp b/Source/WebCore/platform/PlatformScreen.cpp -index 8c8bc5f6060e10b59cacc92765542c85407f3c1b..fad09775881af6d15e16256a90e3c89d2b968d16 100644 +index 39fbdb1be924da33344ac10293798b2abde2e468..caa6421a1c1b616e2eac7cc8645cffd9f27d54bb 100644 --- a/Source/WebCore/platform/PlatformScreen.cpp +++ b/Source/WebCore/platform/PlatformScreen.cpp @@ -25,6 +25,7 @@ @@ -7140,7 +7138,7 @@ index 8c8bc5f6060e10b59cacc92765542c85407f3c1b..fad09775881af6d15e16256a90e3c89d #if PLATFORM(COCOA) || PLATFORM(GTK) -@@ -72,3 +73,25 @@ const ScreenData* screenData(PlatformDisplayID screenDisplayID) +@@ -73,3 +74,25 @@ const ScreenData* screenData(PlatformDisplayID screenDisplayID) } // namespace WebCore #endif // PLATFORM(COCOA) || PLATFORM(GTK) @@ -7193,7 +7191,7 @@ index efa9c30953573d88c18e28110e5f86be339656fb..d6cc2afe8026ceebf80d2b0acac478cb + } // namespace WebCore diff --git a/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp b/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp -index 62df6fb981bd1543adff14632408979a804217f3..b78a9effdcf473d7af71684a2039ef3e7141b9b9 100644 +index a9d29336decf605282e17416699c4e89a8f9eb22..8d09cf5c3650db7574c20fbf64ba3530f982c32a 100644 --- a/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp +++ b/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp @@ -43,7 +43,7 @@ @@ -7326,7 +7324,7 @@ index b60f9a64bacc8282860da6de299b75aeb295b9b5..55bd017c03c6478ca334bd5ef164160f namespace WebCore { diff --git a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp b/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp -index b6849ae2de8f035240920a3575d79b03d23f5ea9..6b62177a2789bc0e9cdb0f8421e0fb28e17e9a6f 100644 +index 17ad42448d476fa7fa40c309a7e930454b6e21d2..b4888dc22db2b67e6e95dc0831e8b6103924bc95 100644 --- a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp +++ b/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp @@ -169,6 +169,33 @@ static Vector stringIndicesFromClusters(const Vector& clusters, @@ -8259,10 +8257,10 @@ index 35ade40b37f0c476815535541118f9246ed199cd..2bd1444f9a5e9a14ab3d6acbc020434e m_commonHeaders.append(CommonHeader { name, value }); } diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h -index ba0203910f4fa63f5424f121d5ed9b77d5788565..3d9fb4367c482f3d15e18dfb70c3f477bb2b9232 100644 +index 0aaa786af751fea1c46de73deab2ba09596191a1..a3a087e33bc70f2a83b996638225cb4bc4d94d68 100644 --- a/Source/WebCore/platform/network/NetworkStorageSession.h +++ b/Source/WebCore/platform/network/NetworkStorageSession.h -@@ -158,6 +158,8 @@ public: +@@ -159,6 +159,8 @@ public: NetworkingContext* context() const; #endif @@ -8272,7 +8270,7 @@ index ba0203910f4fa63f5424f121d5ed9b77d5788565..3d9fb4367c482f3d15e18dfb70c3f477 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 c5e76b6cbb06657e033af97f2d96cf80731bb499..564dd39db77cf22624996c46ea6ae96c67670e7f 100644 +index 226bf4b1c6b84bfe9e0e8632388798c0a7f4f5ab..104041824ca34790914a66b09135104280277bf5 100644 --- a/Source/WebCore/platform/network/ResourceResponseBase.cpp +++ b/Source/WebCore/platform/network/ResourceResponseBase.cpp @@ -74,6 +74,7 @@ ResourceResponseBase::ResourceResponseBase(std::optional m_networkLoadMetrics; short m_httpStatusCode; -@@ -320,6 +321,11 @@ protected: +@@ -279,6 +280,11 @@ protected: AtomString m_httpStatusText; AtomString m_httpVersion; HTTPHeaderMap m_httpHeaderFields; @@ -8315,7 +8313,7 @@ index a2a0e57218fc14c7ead18bfe93330e9ddc260f36..ecfbd8538223ad08e64bb99fe976d2a1 Box m_networkLoadMetrics; mutable std::optional m_certificateInfo; -@@ -368,6 +374,7 @@ void ResourceResponseBase::encode(Encoder& encoder) const +@@ -375,6 +381,7 @@ void ResourceResponseBase::encode(Encoder& encoder) const encoder << m_httpStatusText; encoder << m_httpVersion; encoder << m_httpHeaderFields; @@ -8323,7 +8321,7 @@ index a2a0e57218fc14c7ead18bfe93330e9ddc260f36..ecfbd8538223ad08e64bb99fe976d2a1 encoder << m_httpStatusCode; encoder << m_certificateInfo; -@@ -437,6 +444,12 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon +@@ -444,6 +451,12 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon return false; response.m_httpHeaderFields = WTFMove(*httpHeaderFields); @@ -8337,7 +8335,7 @@ index a2a0e57218fc14c7ead18bfe93330e9ddc260f36..ecfbd8538223ad08e64bb99fe976d2a1 decoder >> httpStatusCode; if (!httpStatusCode) diff --git a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm -index fa98150c2de166d8637a931dba34218ea40fe582..dcfc225a2b224ca873e2ee4fcf334c0b3dc59e2c 100644 +index 3aa7ce0dbf02a78ab3b7931101d72d283276cdaf..e9ffb44462271d793c0dcc460e15c308e54c4f9d 100644 --- a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm +++ b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm @@ -539,6 +539,22 @@ bool NetworkStorageSession::setCookieFromDOM(const URL& firstParty, const SameSi @@ -8599,7 +8597,7 @@ index f997a64f68deca632435450869c1abc9c3c35ac2..79da1d419799e359c60f2346e1d3ac8a OptionSet PlatformKeyboardEvent::currentStateOfModifierKeys() diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp -index 9cfe7fe6a51ab15834082822f523fb92204531a5..dd1c2153b865a9dd558df20462884422fe2ad84e 100644 +index eed85c96b3d8292856e030691ce9c29199dbd3f0..0c2642562d5fec67977b2896433bf75331796616 100644 --- a/Source/WebCore/platform/win/PasteboardWin.cpp +++ b/Source/WebCore/platform/win/PasteboardWin.cpp @@ -1129,7 +1129,21 @@ void Pasteboard::writeCustomData(const Vector& data) @@ -9070,7 +9068,7 @@ index 0000000000000000000000000000000000000000..cf2b51f6f02837a1106f4d999f2f130e + +} // namespace WebCore diff --git a/Source/WebCore/rendering/RenderTextControl.cpp b/Source/WebCore/rendering/RenderTextControl.cpp -index 9928b9733fb7152b3fdcb357b086950f15bd39e2..8a54795f463a9f3c746bcf5f2d7966f40f37f48f 100644 +index 4c511db8dda43552564e17b389bb438d9c44da12..530cc0b6c0bb26cc4f53614019dd6a02e4d73e6a 100644 --- a/Source/WebCore/rendering/RenderTextControl.cpp +++ b/Source/WebCore/rendering/RenderTextControl.cpp @@ -209,13 +209,13 @@ void RenderTextControl::layoutExcludedChildren(bool relayoutChildren) @@ -9089,7 +9087,7 @@ index 9928b9733fb7152b3fdcb357b086950f15bd39e2..8a54795f463a9f3c746bcf5f2d7966f4 { auto innerText = innerTextElement(); diff --git a/Source/WebCore/rendering/RenderTextControl.h b/Source/WebCore/rendering/RenderTextControl.h -index 1497fa9cf6222fe02f84b9b13ce60cc51f301206..a4095a4d6f0b49e0a3a105597d69184380df9e42 100644 +index e064a7a15a416e593b68de15133c5528b1ce2ae0..2860c13fad04ea32e28142848e0583701263f45d 100644 --- a/Source/WebCore/rendering/RenderTextControl.h +++ b/Source/WebCore/rendering/RenderTextControl.h @@ -36,9 +36,9 @@ public: @@ -9104,11 +9102,11 @@ index 1497fa9cf6222fe02f84b9b13ce60cc51f301206..a4095a4d6f0b49e0a3a105597d691843 int innerLineHeight() const override; #endif diff --git a/Source/WebCore/workers/WorkerConsoleClient.cpp b/Source/WebCore/workers/WorkerConsoleClient.cpp -index 7b429300affcb05189d4816059f405d6686c4f51..a2a160ea608c719ce2b714cd32510248ef404390 100644 +index 3a0f87d60e42971d841b9eb5c8f1b36b4cb9649e..f2da6be1c58b89adc458c9e2c86c9ab6d613ff2a 100644 --- a/Source/WebCore/workers/WorkerConsoleClient.cpp +++ b/Source/WebCore/workers/WorkerConsoleClient.cpp -@@ -99,4 +99,6 @@ void WorkerConsoleClient::recordEnd(JSC::JSGlobalObject*, Ref&& - +@@ -101,4 +101,6 @@ void WorkerConsoleClient::recordEnd(JSC::JSGlobalObject*, Ref&& + // FIXME: Web Inspector: support console screenshots in a Worker void WorkerConsoleClient::screenshot(JSC::JSGlobalObject*, Ref&&) { } +void WorkerConsoleClient::bindingCalled(JSC::JSGlobalObject*, const String&, const String&) { } @@ -9127,10 +9125,10 @@ index 1d8488e0d36288e09cd5662bd7f770ade95dfee3..dee07f87b47d62d4ef8ede45824bdb2f WorkerOrWorkletGlobalScope& m_globalScope; }; diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp -index 4206bd668f41c059cf20ec5513274418a573740b..cc6b604eff4c3b73b6b8ff9075014b8ca2fc6b30 100644 +index 824d31987aa0a64cf709d54bbe43ae3d7f1c532e..9b8617411bd90b566b4283b49ae7557d6ff3b205 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp -@@ -95,6 +95,8 @@ +@@ -97,6 +97,8 @@ #if PLATFORM(COCOA) #include @@ -9139,7 +9137,7 @@ index 4206bd668f41c059cf20ec5513274418a573740b..cc6b604eff4c3b73b6b8ff9075014b8c #endif #if ENABLE(APPLE_PAY_REMOTE_UI) -@@ -1076,6 +1078,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID) +@@ -1065,6 +1067,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID) #endif } @@ -9155,10 +9153,10 @@ index 4206bd668f41c059cf20ec5513274418a573740b..cc6b604eff4c3b73b6b8ff9075014b8c void NetworkConnectionToWebProcess::removeStorageAccessForFrame(FrameIdentifier frameID, PageIdentifier pageID) { diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h -index 2bf91f53c3775f8c961cf7f14e000681231cbe5e..2f5ed58455deda2d55a198eb7d7bc204c3857153 100644 +index 3772b447b4557cf3a5d1ed26adf36f93caaa83d6..c86332696a764efe91dbd47e33b6388c58504ce3 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h -@@ -328,6 +328,8 @@ private: +@@ -331,6 +331,8 @@ private: void clearPageSpecificData(WebCore::PageIdentifier); @@ -9168,7 +9166,7 @@ index 2bf91f53c3775f8c961cf7f14e000681231cbe5e..2f5ed58455deda2d55a198eb7d7bc204 void removeStorageAccessForFrame(WebCore::FrameIdentifier, WebCore::PageIdentifier); diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in -index 2367ada0de191766c89ef2855a4f30a66ebe328a..b0e7951d30cc087c3bfb307c707779a5bb550e32 100644 +index ace7031a520e2daeec7cb0ef328ba0514fec0108..687119f766a738e9477108d7e6de8ee925ab11ad 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in @@ -71,6 +71,8 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver { @@ -9181,7 +9179,7 @@ index 2367ada0de191766c89ef2855a4f30a66ebe328a..b0e7951d30cc087c3bfb307c707779a5 RemoveStorageAccessForFrame(WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID); LogUserInteraction(WebCore::RegistrableDomain domain) diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.cpp b/Source/WebKit/NetworkProcess/NetworkProcess.cpp -index 172177e7cd3749a446a9143c1566363f932b7a49..a632fc51d7e28e2f9bd8545f4e26f0a06eb8d035 100644 +index 85d30e6299b237fd3148210f4452b454aaae72e3..7dbc44bc31819244f1ae50e72e51d17ff9e9babb 100644 --- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp +++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp @@ -625,6 +625,12 @@ void NetworkProcess::registrableDomainsExemptFromWebsiteDataDeletion(PAL::Sessio @@ -9198,7 +9196,7 @@ index 172177e7cd3749a446a9143c1566363f932b7a49..a632fc51d7e28e2f9bd8545f4e26f0a0 void NetworkProcess::dumpResourceLoadStatistics(PAL::SessionID sessionID, CompletionHandler&& completionHandler) { diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.h b/Source/WebKit/NetworkProcess/NetworkProcess.h -index a072b511e5ce431d443a423a509497558ef26b18..bc5f4f3e9a5fff415ff89272907d4111205e9e0c 100644 +index 982ae2d8d112b351ca6ef47390e2a9abac9b40dc..740b62ad313335efe4a39a29626d6b3e079673be 100644 --- a/Source/WebKit/NetworkProcess/NetworkProcess.h +++ b/Source/WebKit/NetworkProcess/NetworkProcess.h @@ -33,6 +33,7 @@ @@ -9228,7 +9226,7 @@ index a072b511e5ce431d443a423a509497558ef26b18..bc5f4f3e9a5fff415ff89272907d4111 void clearPrevalentResource(PAL::SessionID, RegistrableDomain&&, CompletionHandler&&); void clearUserInteraction(PAL::SessionID, RegistrableDomain&&, CompletionHandler&&); diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in -index 20d7d32baf524e43a11a86ef208c404696d8ace7..2e6fa5ca2266d9868b6683540a5ba999819005ba 100644 +index 2e602dec7f870f03528023d26df86b47a7bb5a9c..319e65680c3615d9ee8c9fbefd5b56dba631c646 100644 --- a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in +++ b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in @@ -85,6 +85,8 @@ messages -> NetworkProcess LegacyReceiver { @@ -9241,7 +9239,7 @@ index 20d7d32baf524e43a11a86ef208c404696d8ace7..2e6fa5ca2266d9868b6683540a5ba999 ClearPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () ClearUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () diff --git a/Source/WebKit/NetworkProcess/NetworkSession.h b/Source/WebKit/NetworkProcess/NetworkSession.h -index 986309ce9567147c5b0b0d047de82d26ee230ba3..36f67b7bf663d7398de33d7e361b0dd4d4574cc4 100644 +index c8e0c534db8fee2a0f3c6b2b507bf7bdace88aa1..b75b615efdaea496190a8c88192701183630af83 100644 --- a/Source/WebKit/NetworkProcess/NetworkSession.h +++ b/Source/WebKit/NetworkProcess/NetworkSession.h @@ -205,6 +205,9 @@ public: @@ -9254,7 +9252,7 @@ index 986309ce9567147c5b0b0d047de82d26ee230ba3..36f67b7bf663d7398de33d7e361b0dd4 #if ENABLE(SERVICE_WORKER) void removeSoftUpdateLoader(ServiceWorkerSoftUpdateLoader* loader) { m_softUpdateLoaders.remove(loader); } void addNavigationPreloaderTask(ServiceWorkerFetchTask&); -@@ -327,6 +330,7 @@ protected: +@@ -326,6 +329,7 @@ protected: bool m_privateClickMeasurementDebugModeEnabled { false }; std::optional m_ephemeralMeasurement; bool m_isRunningEphemeralMeasurementTest { false }; @@ -9263,7 +9261,7 @@ index 986309ce9567147c5b0b0d047de82d26ee230ba3..36f67b7bf663d7398de33d7e361b0dd4 HashSet> m_keptAliveLoads; diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm -index 6fab2cc458410ed58d263c3162014fca9cb9501c..f51327e9691d4f716891848ca9f06314d8572b21 100644 +index 51f26de4a6aa90dc7406e3e4e4d2b461276f7cc9..da5dadd438075c8aceed417285c33d1b31737e69 100644 --- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm +++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm @@ -766,6 +766,8 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece @@ -9290,7 +9288,7 @@ index 6fab2cc458410ed58d263c3162014fca9cb9501c..f51327e9691d4f716891848ca9f06314 #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 8ef8c83a4b1cc6bca6167214c3a1ee9cec8fa235..e0b40605da9adb8b81240838189d9559fb882c3e 100644 +index 6307e164caa300d25db023b3b8ebcdebe8377df2..9d4f0a20d40e3fc0ca62c62d94796936972729b3 100644 --- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp +++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp @@ -82,10 +82,18 @@ NetworkDataTaskCurl::NetworkDataTaskCurl(NetworkSession& session, NetworkDataTas @@ -9302,7 +9300,7 @@ index 8ef8c83a4b1cc6bca6167214c3a1ee9cec8fa235..e0b40605da9adb8b81240838189d9559 - m_curlRequest->setUserPass(m_initialCredential.user(), m_initialCredential.password()); - m_curlRequest->setAuthenticationScheme(ProtectionSpace::AuthenticationScheme::HTTPBasic); + if (request.url().protocolIsData()) { -+ DataURLDecoder::decode(request.url(), { }, [this, protectedThis = Ref { *this }](auto decodeResult) mutable { ++ DataURLDecoder::decode(request.url(), { }, DataURLDecoder::ShouldValidatePadding::Yes, [this, protectedThis = Ref { *this }](auto decodeResult) mutable { + didReadDataURL(WTFMove(decodeResult)); + }); + } else { @@ -9552,10 +9550,10 @@ index 13e557214edc7f060dd01ef10c2ab97fe0e9c41e..6ec6ea5328eab0cc9f5247ee14e15c56 } diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake -index 229843e90a0d3e66762221e60c9e25b77ceccd6e..c39b8b8b5675cf03704ad88b9bc1c9fbc20fc4ad 100644 +index 2ba3f0bfd3e479df2b5c298b1bf83100ccc78c09..4445671e17bba56998300a746ec2e0735e3faaac 100644 --- a/Source/WebKit/PlatformGTK.cmake +++ b/Source/WebKit/PlatformGTK.cmake -@@ -306,6 +306,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES +@@ -308,6 +308,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES ${GSTREAMER_PBUTILS_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${LIBSOUP_INCLUDE_DIRS} @@ -9565,7 +9563,7 @@ index 229843e90a0d3e66762221e60c9e25b77ceccd6e..c39b8b8b5675cf03704ad88b9bc1c9fb ) list(APPEND WebKit_INTERFACE_INCLUDE_DIRECTORIES -@@ -352,6 +355,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" @@ -9575,7 +9573,7 @@ index 229843e90a0d3e66762221e60c9e25b77ceccd6e..c39b8b8b5675cf03704ad88b9bc1c9fb ) endif () -@@ -395,6 +401,12 @@ else () +@@ -406,6 +412,12 @@ else () set(WebKitGTK_ENUM_HEADER_TEMPLATE ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypesGtk3.h.in) endif () @@ -9589,10 +9587,10 @@ index 229843e90a0d3e66762221e60c9e25b77ceccd6e..c39b8b8b5675cf03704ad88b9bc1c9fb 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 9a80143b3e079290c646340b932b7029845a2e05..3b31af45d209851d568eab5868b6d80ef1cf9723 100644 +index 0c3e4b7cf41fe811fcc5117200b75a8beaec8590..d425d830c7f3d0e9a591d02ac8974b64a90f4221 100644 --- a/Source/WebKit/PlatformWPE.cmake +++ b/Source/WebKit/PlatformWPE.cmake -@@ -191,6 +191,7 @@ set(WPE_API_HEADER_TEMPLATES +@@ -193,6 +193,7 @@ set(WPE_API_HEADER_TEMPLATES ${WEBKIT_DIR}/UIProcess/API/glib/WebKitWindowProperties.h.in ${WEBKIT_DIR}/UIProcess/API/glib/WebKitWebsitePolicies.h.in ${WEBKIT_DIR}/UIProcess/API/glib/webkit.h.in @@ -9600,7 +9598,7 @@ index 9a80143b3e079290c646340b932b7029845a2e05..3b31af45d209851d568eab5868b6d80e ) if (ENABLE_2022_GLIB_API) -@@ -368,6 +369,7 @@ list(APPEND WebKit_PRIVATE_INCLUDE_DIRECTORIES +@@ -370,6 +371,7 @@ list(APPEND WebKit_PRIVATE_INCLUDE_DIRECTORIES "${WEBKIT_DIR}/UIProcess/Launcher/libwpe" "${WEBKIT_DIR}/UIProcess/Notifications/glib/" "${WEBKIT_DIR}/UIProcess/geoclue" @@ -9608,7 +9606,7 @@ index 9a80143b3e079290c646340b932b7029845a2e05..3b31af45d209851d568eab5868b6d80e "${WEBKIT_DIR}/UIProcess/gstreamer" "${WEBKIT_DIR}/UIProcess/linux" "${WEBKIT_DIR}/UIProcess/soup" -@@ -391,8 +393,17 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES +@@ -393,8 +395,17 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES ${GIO_UNIX_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${LIBSOUP_INCLUDE_DIRS} @@ -9797,10 +9795,18 @@ index 7164af8d347828ba80bcb52fd6ca814401157f2b..9ba0e32717d9b4cb01f3f43898aa402a #if USE(APPKIT) diff --git a/Source/WebKit/Shared/NativeWebMouseEvent.h b/Source/WebKit/Shared/NativeWebMouseEvent.h -index c586d2775021a9e164dc36b1732e1a2dadc986a0..ffb79428fe2de5af626bf3a9ad49545380a8e85d 100644 +index c586d2775021a9e164dc36b1732e1a2dadc986a0..189a9bec7af066fee5d84fa3ce1ed145de01080f 100644 --- a/Source/WebKit/Shared/NativeWebMouseEvent.h +++ b/Source/WebKit/Shared/NativeWebMouseEvent.h -@@ -79,6 +79,11 @@ public: +@@ -31,6 +31,7 @@ + #if USE(APPKIT) + #include + OBJC_CLASS NSView; ++OBJC_CLASS NSEvent; + #endif + + #if PLATFORM(GTK) +@@ -79,6 +80,11 @@ public: NativeWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool); #endif @@ -9840,10 +9846,10 @@ index 72ad2880160a374e8fa663e561d59becf9d2f36d..372ae6953199245fe4fc55a49813c7ca #endif }; diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp -index 33d83803d0284b3471cfe848aa8b0ae86735ce28..cf76a4b330469bba86fb2c72ee82c2ead0c34b77 100644 +index 8da28fdec08100d09523701e34a5259771d3a88b..6efd40a3d0ea091bc47f5f9b8838abb38abc8192 100644 --- a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp +++ b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp -@@ -193,6 +193,10 @@ +@@ -190,6 +190,10 @@ #include #endif @@ -9855,10 +9861,10 @@ index 33d83803d0284b3471cfe848aa8b0ae86735ce28..cf76a4b330469bba86fb2c72ee82c2ea namespace IPC { diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in -index b106303da85a8226327a6f9e986c4646d39b4bbc..56c69d19af821e0ebdfa77c6873ca0c5d165dc7f 100644 +index a6776eaf01794b6c3fdba691e1d8ef7019988906..e6a185b040a776cab3de6791978ad2743c1456ca 100644 --- a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in +++ b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in -@@ -2338,6 +2338,9 @@ class WebCore::AuthenticationChallenge { +@@ -2400,6 +2400,9 @@ class WebCore::AuthenticationChallenge { class WebCore::DragData { #if PLATFORM(COCOA) String pasteboardName(); @@ -9868,7 +9874,7 @@ index b106303da85a8226327a6f9e986c4646d39b4bbc..56c69d19af821e0ebdfa77c6873ca0c5 #endif WebCore::IntPoint clientPosition(); WebCore::IntPoint globalPosition(); -@@ -2860,6 +2863,7 @@ enum class WebCore::ResourceLoadPriority : uint8_t { +@@ -2927,6 +2930,7 @@ using WebCore::ResourceResponseBase::Source = WebCore::ResourceResponseBaseSourc AtomString m_httpStatusText; AtomString m_httpVersion; WebCore::HTTPHeaderMap m_httpHeaderFields; @@ -9877,18 +9883,10 @@ index b106303da85a8226327a6f9e986c4646d39b4bbc..56c69d19af821e0ebdfa77c6873ca0c5 short m_httpStatusCode; diff --git a/Source/WebKit/Shared/WebKeyboardEvent.cpp b/Source/WebKit/Shared/WebKeyboardEvent.cpp -index a80efd294086ea1bd3b1e9dc805491ff5230962f..17d9d5461ae47a122160f10b7fdcb662f06bea7a 100644 +index b80bcb39473ecec86be5671f38698130bd9acbf3..d886cbac5f4c073e14e12f257fa920419ea0cf39 100644 --- a/Source/WebKit/Shared/WebKeyboardEvent.cpp +++ b/Source/WebKit/Shared/WebKeyboardEvent.cpp -@@ -35,6 +35,7 @@ WebKeyboardEvent::WebKeyboardEvent() - { - } - -+ - #if USE(APPKIT) - - 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, const Vector& commands, bool isAutoRepeat, bool isKeypad, bool isSystemKey) -@@ -56,6 +57,24 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S +@@ -52,6 +52,24 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S ASSERT(isKeyboardEventType(type())); } @@ -9913,7 +9911,7 @@ index a80efd294086ea1bd3b1e9dc805491ff5230962f..17d9d5461ae47a122160f10b7fdcb662 #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) -@@ -79,6 +98,24 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S +@@ -75,6 +93,24 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S ASSERT(isKeyboardEventType(type())); } @@ -9938,7 +9936,7 @@ index a80efd294086ea1bd3b1e9dc805491ff5230962f..17d9d5461ae47a122160f10b7fdcb662 #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) -@@ -142,6 +179,27 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S +@@ -138,6 +174,27 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S #endif @@ -9967,10 +9965,10 @@ index a80efd294086ea1bd3b1e9dc805491ff5230962f..17d9d5461ae47a122160f10b7fdcb662 { } diff --git a/Source/WebKit/Shared/WebKeyboardEvent.h b/Source/WebKit/Shared/WebKeyboardEvent.h -index 7840e34e303873e771150f242f57e621ebbb78a3..c3cea2e0506bcf5c25815b06d35dbdb5dc58edb7 100644 +index 976edc95bef9fde10d1e875fce2e00d3732c0456..f2f49d9badd67317c5c1f9aa248e8a1cb6a2f66d 100644 --- a/Source/WebKit/Shared/WebKeyboardEvent.h +++ b/Source/WebKit/Shared/WebKeyboardEvent.h -@@ -43,14 +43,18 @@ public: +@@ -42,14 +42,18 @@ public: #if USE(APPKIT) WebKeyboardEvent(WebEvent&&, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, const Vector&, bool isAutoRepeat, bool isKeypad, bool isSystemKey); @@ -9990,17 +9988,17 @@ index 7840e34e303873e771150f242f57e621ebbb78a3..c3cea2e0506bcf5c25815b06d35dbdb5 const String& text() const { return m_text; } diff --git a/Source/WebKit/Shared/WebMouseEvent.h b/Source/WebKit/Shared/WebMouseEvent.h -index d5f411e74ca6db9cdd9fcb6712f9ef7294dfde0e..a002b61520e52afb88bc3d2340e2010196860406 100644 +index a38fc7fde1d5f1a1fd04ae1f84eb59c1501deec5..d3669c3d3bad91468fbbeeaa328c361082ecd408 100644 --- a/Source/WebKit/Shared/WebMouseEvent.h +++ b/Source/WebKit/Shared/WebMouseEvent.h -@@ -73,6 +73,7 @@ public: +@@ -70,6 +70,7 @@ public: - WebMouseEventButton button() const { return static_cast(m_button); } + WebMouseEventButton button() const { return m_button; } unsigned short buttons() const { return m_buttons; } + void playwrightSetButtons(unsigned short buttons) { m_buttons = buttons; } const WebCore::IntPoint& position() const { return m_position; } // Relative to the view. + void setPosition(const WebCore::IntPoint& position) { m_position = position; } const WebCore::IntPoint& globalPosition() const { return m_globalPosition; } - float deltaX() const { return m_deltaX; } diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h index 843ab2240d8d6718e9d542854f82e85eac528594..fed43c932c5d87ce60eb010f2498ba4d25fd4f8d 100644 --- a/Source/WebKit/Shared/WebPageCreationParameters.h @@ -10283,17 +10281,32 @@ index 0000000000000000000000000000000000000000..789a0d7cf69704c8f665a9ed79348fbc +}; + +} // namespace IPC +diff --git a/Source/WebKit/Shared/win/WebEventFactory.cpp b/Source/WebKit/Shared/win/WebEventFactory.cpp +index 665b9d6a9de903ee9ad6dc53e15ab421b6cb769f..2b129963074d2ceec1c05f3a637c5e1c9e652008 100644 +--- a/Source/WebKit/Shared/win/WebEventFactory.cpp ++++ b/Source/WebKit/Shared/win/WebEventFactory.cpp +@@ -476,7 +476,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message + #if ENABLE(TOUCH_EVENTS) + WebTouchEvent WebEventFactory::createWebTouchEvent() + { +- return WebTouchEvent(); ++ return WebTouchEvent({ WebEventType::TouchMove, OptionSet { }, WallTime::now()}, { }); + } + #endif // ENABLE(TOUCH_EVENTS) + diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt -index d38b9735d6f7730b4fc97863274805d44081516a..43f9cd8ceae182313451753507ad15c2ee7701ff 100644 +index 54ba22b9092ef5db4b89cab56ca7c23bff325b74..93f49bd8b4bd7f3f367433931eb923c6dd49bef4 100644 --- a/Source/WebKit/Sources.txt +++ b/Source/WebKit/Sources.txt -@@ -384,21 +384,26 @@ Shared/XR/XRDeviceProxy.cpp - +@@ -386,6 +386,7 @@ Shared/XR/XRDeviceProxy.cpp UIProcess/AuxiliaryProcessProxy.cpp UIProcess/BackgroundProcessResponsivenessTimer.cpp + UIProcess/BrowsingContextGroup.cpp +UIProcess/BrowserInspectorPipe.cpp UIProcess/DeviceIdHashSaltStorage.cpp - UIProcess/DrawingAreaProxy.cpp + UIProcess/DisplayLink.cpp + UIProcess/DisplayLinkProcessProxyClient.cpp +@@ -393,16 +394,20 @@ UIProcess/DrawingAreaProxy.cpp UIProcess/FrameLoadState.cpp UIProcess/GeolocationPermissionRequestManagerProxy.cpp UIProcess/GeolocationPermissionRequestProxy.cpp @@ -10314,7 +10327,7 @@ index d38b9735d6f7730b4fc97863274805d44081516a..43f9cd8ceae182313451753507ad15c2 UIProcess/RemotePageDrawingAreaProxy.cpp UIProcess/RemotePageProxy.cpp UIProcess/ResponsivenessTimer.cpp -@@ -442,6 +447,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp +@@ -446,6 +451,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp UIProcess/WebPageDiagnosticLoggingClient.cpp UIProcess/WebPageGroup.cpp UIProcess/WebPageInjectedBundleClient.cpp @@ -10323,7 +10336,7 @@ index d38b9735d6f7730b4fc97863274805d44081516a..43f9cd8ceae182313451753507ad15c2 UIProcess/WebPageProxy.cpp UIProcess/WebPageProxyMessageReceiverRegistration.cpp UIProcess/WebPasteboardProxy.cpp -@@ -573,7 +580,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp +@@ -577,7 +584,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp UIProcess/Inspector/WebPageDebuggable.cpp UIProcess/Inspector/WebPageInspectorController.cpp @@ -10336,7 +10349,7 @@ index d38b9735d6f7730b4fc97863274805d44081516a..43f9cd8ceae182313451753507ad15c2 UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp UIProcess/Media/MediaUsageManager.cpp diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt -index 58047624cd374a6e074e1e6bee1d891829d8ff43..f8670e9474dff752e03dab613b62c42f191262df 100644 +index 86462cd6ccdea1e2e0d880522c0b45c89a0ae95e..074368b88c78b253c800907a8a2c18fa3a1f60ba 100644 --- a/Source/WebKit/SourcesCocoa.txt +++ b/Source/WebKit/SourcesCocoa.txt @@ -258,6 +258,7 @@ UIProcess/API/Cocoa/_WKApplicationManifest.mm @@ -10356,10 +10369,10 @@ index 58047624cd374a6e074e1e6bee1d891829d8ff43..f8670e9474dff752e03dab613b62c42f UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm UIProcess/Inspector/mac/WKInspectorViewController.mm diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt -index 2a57e2ade1be21cc7603fd246702db002f5f1d9c..d552d6fc58a650ff17283ba2661b69a8ef7ddf93 100644 +index 9dbd29a59aecfbbf84d41117eccb3ee7d7b5f68d..e871cb46c70193613d91a8367acbf9e791f26eea 100644 --- a/Source/WebKit/SourcesGTK.txt +++ b/Source/WebKit/SourcesGTK.txt -@@ -137,6 +137,7 @@ UIProcess/API/glib/WebKitAutomationSession.cpp @no-unify +@@ -136,6 +136,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 @@ -10367,15 +10380,15 @@ index 2a57e2ade1be21cc7603fd246702db002f5f1d9c..d552d6fc58a650ff17283ba2661b69a8 UIProcess/API/glib/WebKitContextMenuClient.cpp @no-unify UIProcess/API/glib/WebKitCookieManager.cpp @no-unify UIProcess/API/glib/WebKitCredential.cpp @no-unify -@@ -260,6 +261,7 @@ UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp - - UIProcess/cairo/BackingStoreCairo.cpp @no-unify - +@@ -263,6 +264,7 @@ UIProcess/glib/DisplayLinkGLib.cpp + UIProcess/glib/DisplayVBlankMonitor.cpp + UIProcess/glib/DisplayVBlankMonitorDRM.cpp + UIProcess/glib/DisplayVBlankMonitorTimer.cpp +UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp UIProcess/glib/WebPageProxyGLib.cpp UIProcess/glib/WebProcessPoolGLib.cpp UIProcess/glib/WebProcessProxyGLib.cpp -@@ -276,6 +278,7 @@ UIProcess/gtk/ClipboardGtk4.cpp @no-unify +@@ -279,6 +281,7 @@ UIProcess/gtk/ClipboardGtk4.cpp @no-unify UIProcess/gtk/WebDateTimePickerGtk.cpp UIProcess/gtk/GtkSettingsManager.cpp UIProcess/gtk/HardwareAccelerationManager.cpp @@ -10383,7 +10396,7 @@ index 2a57e2ade1be21cc7603fd246702db002f5f1d9c..d552d6fc58a650ff17283ba2661b69a8 UIProcess/gtk/KeyBindingTranslator.cpp UIProcess/gtk/PointerLockManager.cpp @no-unify UIProcess/gtk/PointerLockManagerWayland.cpp @no-unify -@@ -288,6 +291,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cpp +@@ -291,6 +294,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cpp UIProcess/gtk/WebColorPickerGtk.cpp UIProcess/gtk/WebContextMenuProxyGtk.cpp UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp @@ -10517,7 +10530,7 @@ index f3e3b7ef340958b5a46c9252ff63a140afc24e2c..4b516ac0840608638209705250d8bf7e virtual void setStatusText(WebKit::WebPageProxy*, const WTF::String&) { } virtual void mouseDidMoveOverElement(WebKit::WebPageProxy&, const WebKit::WebHitTestResultData&, OptionSet, Object*) { } diff --git a/Source/WebKit/UIProcess/API/C/WKInspector.cpp b/Source/WebKit/UIProcess/API/C/WKInspector.cpp -index 988637e3347397ae751691f6356d090e1e5a9dbf..474c27a0849324c915e304d61b73ba4f98fdf365 100644 +index 990b0e5ebad19fdaf1b0036585be2ed88bc125d2..9f1931dbdd8c70d3637a2d71406b5968896037f2 100644 --- a/Source/WebKit/UIProcess/API/C/WKInspector.cpp +++ b/Source/WebKit/UIProcess/API/C/WKInspector.cpp @@ -28,6 +28,11 @@ @@ -10560,7 +10573,7 @@ index 026121d114c5fcad84c1396be8d692625beaa3bd..edd6e5cae033124c589959a42522fde0 } #endif diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp -index f008969cf4d83c58d2c2b94642dc7f5d7a08bc4a..ec827835cfdb8c9fb4b872c41d0b9e5d6197a363 100644 +index 6c6e8f0ae2d133056f40caf6253377f751b48283..379dd3bea9dec5bd2e15031cfa6d89a407974c6f 100644 --- a/Source/WebKit/UIProcess/API/C/WKPage.cpp +++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp @@ -1784,6 +1784,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient @@ -10647,10 +10660,10 @@ index 65d8ab73430840b02682ce879d1db18b9597d6b0..ea89752f4b90018ea1f008e0d89f9a2a // Version 15. WKPageDecidePolicyForSpeechRecognitionPermissionRequestCallback decidePolicyForSpeechRecognitionPermissionRequest; diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm -index fd1619cf0f9c3bea676e90ae81a84fa023f4b209..ad224273f275e697676ab4586da96dcda0807a68 100644 +index a3467a0ef399235b9f8e689b67887b38eba184df..c12f153c3b5d5a38674076a714503126566f3ede 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm +++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm -@@ -716,6 +716,16 @@ - (void)_setMediaCaptureRequiresSecureConnection:(BOOL)requiresSecureConnection +@@ -706,6 +706,16 @@ - (void)_setMediaCaptureRequiresSecureConnection:(BOOL)requiresSecureConnection _preferences->setMediaCaptureRequiresSecureConnection(requiresSecureConnection); } @@ -10668,10 +10681,10 @@ index fd1619cf0f9c3bea676e90ae81a84fa023f4b209..ad224273f275e697676ab4586da96dcd { return _preferences->inactiveMediaCaptureSteamRepromptIntervalInMinutes(); diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h -index 6b22ff70ebf73b69fb2ad02eed21d0dc016fb5e1..1df25b413da2e5b358597b8b500bc2ea921e9c6f 100644 +index 3b399415a391a7c32f822c6bc61f5ef5e8cae8ce..9940139edc9fc7425ca0e6c8907460ebbcc38b5d 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h +++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h -@@ -122,6 +122,7 @@ typedef NS_ENUM(NSInteger, _WKPitchCorrectionAlgorithm) { +@@ -121,6 +121,7 @@ typedef NS_ENUM(NSInteger, _WKPitchCorrectionAlgorithm) { @property (nonatomic, setter=_setMockCaptureDevicesEnabled:) BOOL _mockCaptureDevicesEnabled WK_API_AVAILABLE(macos(10.13), ios(11.0)); @property (nonatomic, setter=_setMockCaptureDevicesPromptEnabled:) BOOL _mockCaptureDevicesPromptEnabled WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); @property (nonatomic, setter=_setMediaCaptureRequiresSecureConnection:) BOOL _mediaCaptureRequiresSecureConnection WK_API_AVAILABLE(macos(10.13), ios(11.0)); @@ -10718,7 +10731,7 @@ index fe711453fd4ef346ff7d88bfec878642b6eb32d6..c3e4fcf0b51e827b6945c89613f22b17 NS_ASSUME_NONNULL_END diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm -index d19ba0dec9f449f10ca00d7aa86e4aef760c6044..19f6b7c82cc9fc5b3db708f428563ac5a888955d 100644 +index 830340886c8cd3d3699ad8f9daa1be7a03edf113..8aee71985c4924ff384b1491d81f874831c31044 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm +++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm @@ -50,6 +50,7 @@ @@ -10729,7 +10742,7 @@ index d19ba0dec9f449f10ca00d7aa86e4aef760c6044..19f6b7c82cc9fc5b3db708f428563ac5 #import #import #import -@@ -371,6 +372,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple +@@ -382,6 +383,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple }); } @@ -10902,7 +10915,7 @@ index 5dbdde074da5226c4a76ec5a4fcf54b3fb717849..f2aa93846c6d22c20e0584d90afc46e9 { _processPoolConfiguration->setIsAutomaticProcessWarmingEnabled(prewarms); diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm -index 96d3ce10e76c3d24a452d6d22c7c7dc5bc141958..38ef5226464059584db57f8497eb7a4f470ccea2 100644 +index e5209134d490c226db6a122f4f0f3f38d26e20eb..47a41b11999d7927fbfbe033e3630eac86d61e99 100644 --- a/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm +++ b/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm @@ -24,6 +24,7 @@ @@ -11224,7 +11237,7 @@ index e994309b097c1b140abfa4373fd2fafee46c05ec..6e0cc677a3bf33683ae8c89d12a48191 #endif +int webkitWebContextExistingCount(); diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp -index f7b6b9edc676320c8e557e20551411eaa07aad0f..1881ca72d1b6adf15d3c7e9148615c0fa47f6e4f 100644 +index 26dee4a6bedbbed1148b22d288fe115ed6ac3a59..da2f18fb5e0a9448a672cba7ea526dce5a748fdc 100644 --- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp +++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp @@ -34,6 +34,7 @@ @@ -11331,7 +11344,7 @@ index f7b6b9edc676320c8e557e20551411eaa07aad0f..1881ca72d1b6adf15d3c7e9148615c0f { if (!webView->priv->currentScriptDialog) diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h -index c2c3aaa89344742b3e53e2e7afc004828e02b46e..7863882532a6cf4cb592a475ff165a264c3c1913 100644 +index 8b5eb1ce720c9ad09b9de9e9f3d6b15564a86b54..89642048bad844aabdf1eec8486679bfc75e20c0 100644 --- a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h +++ b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h @@ -65,6 +65,7 @@ void webkitWebViewRunJavaScriptAlert(WebKitWebView*, const CString& message, Fun @@ -11355,7 +11368,7 @@ 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 8abaceabaa129b7d2ae369c8840bdfc41699f580..51f8e259b424a7416f1613f4d7e40a5f4cd8b8e8 100644 +index fe0d38ff507855bed8ac300e118812420b383e34..1e355db49a389b3b85d0a32d4b3110aae556eec8 100644 --- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp +++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp @@ -257,6 +257,8 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool @@ -11493,10 +11506,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 6eb11ae3ae2cd7667d10d165de33342713306cd7..41c420b6e395a67218b9942e7ef879c7958515fb 100644 +index 6147a00162bbbde87746db7ce16b474a77aaa343..96600573d75e0bdc779071632517c11d020a2b51 100644 --- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp +++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp -@@ -2823,6 +2823,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase) +@@ -2997,6 +2997,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase) #endif } @@ -11508,7 +11521,7 @@ index 6eb11ae3ae2cd7667d10d165de33342713306cd7..41c420b6e395a67218b9942e7ef879c7 void webkitWebViewBaseEnterAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase, const LayerTreeContext& layerTreeContext) { ASSERT(webkitWebViewBase->priv->acceleratedBackingStore); -@@ -2883,12 +2888,12 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase) +@@ -3053,12 +3058,12 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase) webkitWebViewBase->priv->acceleratedBackingStore->update({ }); } @@ -11524,7 +11537,7 @@ index 6eb11ae3ae2cd7667d10d165de33342713306cd7..41c420b6e395a67218b9942e7ef879c7 #if !USE(GTK4) diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h -index 1204b4342c1cf8d38d215c1c8628bd7eb1fbd415..43265c737ecaa3ee24513ad50ca3c3650ebeb698 100644 +index a003c198a6ec179454b010fda093a303250da7b0..125b1960ba73b1dd26daff90eb415e9735b13cfa 100644 --- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h +++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h @@ -27,6 +27,7 @@ @@ -11535,7 +11548,7 @@ index 1204b4342c1cf8d38d215c1c8628bd7eb1fbd415..43265c737ecaa3ee24513ad50ca3c365 #include "APIPageConfiguration.h" #include "InputMethodState.h" #include "SameDocumentNavigationType.h" -@@ -97,7 +98,7 @@ void webkitWebViewBaseStartDrag(WebKitWebViewBase*, WebCore::SelectionData&&, Op +@@ -100,7 +101,7 @@ void webkitWebViewBaseStartDrag(WebKitWebViewBase*, WebCore::SelectionData&&, Op void webkitWebViewBaseDidPerformDragControllerAction(WebKitWebViewBase*); #endif @@ -11544,7 +11557,7 @@ index 1204b4342c1cf8d38d215c1c8628bd7eb1fbd415..43265c737ecaa3ee24513ad50ca3c365 void webkitWebViewBaseSetEnableBackForwardNavigationGesture(WebKitWebViewBase*, bool enabled); WebKit::ViewGestureController* webkitWebViewBaseViewGestureController(WebKitWebViewBase*); -@@ -130,3 +131,5 @@ void webkitWebViewBaseSynthesizeWheelEvent(WebKitWebViewBase*, const GdkEvent*, +@@ -133,3 +134,5 @@ void webkitWebViewBaseSynthesizeWheelEvent(WebKitWebViewBase*, const GdkEvent*, void webkitWebViewBaseMakeBlank(WebKitWebViewBase*, bool); void webkitWebViewBasePageGrabbedTouch(WebKitWebViewBase*); void webkitWebViewBaseSetShouldNotifyFocusEvents(WebKitWebViewBase*, bool); @@ -11988,10 +12001,10 @@ index 8a8356b94e0632118a24bb9adf5a1fe72f10fb8d..f332ffe5e633dce8e8a7f0f2a411ca29 void didChangePageID(WKWPE::View&) override; void didReceiveUserMessage(WKWPE::View&, WebKit::UserMessage&&, CompletionHandler&&) override; diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp -index f297d86285bcc3f975638be9b7750ae7ce11f05f..85b07321c8b155bcf6433f0d7c7807224039e342 100644 +index b3f4ddba8d65cdb8f67f4f3370f5fa63da84c735..011446c18963da3fa3341f550ee58a09c8b59aa1 100644 --- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp +++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp -@@ -127,7 +127,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau +@@ -140,7 +140,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix); #endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) @@ -12004,10 +12017,10 @@ index f297d86285bcc3f975638be9b7750ae7ce11f05f..85b07321c8b155bcf6433f0d7c780722 platformGetLaunchOptions(launchOptions); } diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h -index 90e6a8f4292c8fbcbd0cc36fa3618f8b7d2d62cc..14ac561735f2de4ccd0b2ef74e7e7a1f41c1d983 100644 +index 9aff8c5be29dee4751dfd98615d4b6dfbba2c010..ab3841c8017dee65bdacdb0f9487a6955de2cba0 100644 --- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h +++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h -@@ -208,13 +208,16 @@ protected: +@@ -207,13 +207,16 @@ protected: static RefPtr fetchAudioComponentServerRegistrations(); #endif @@ -12190,7 +12203,7 @@ index 7b4841ee8a15252d24fa7378a2005efb2db96f6f..d3eb7886316c7c1b45fb4673df15b743 bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1; bool webViewRequestGeolocationPermissionForFrameDecisionHandler : 1; diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm -index 17e89992472d58c617b5c9c0bd0d478b7c1e9123..aea3be250928924fd68910e0309c835a0dac2446 100644 +index 2b48d6de50f8dd8831e4b368105c032902c23188..459588046d140d21544d9f8838e66c6d9e0f0bbb 100644 --- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm +++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm @@ -117,6 +117,7 @@ void UIDelegate::setDelegate(id delegate) @@ -12201,7 +12214,7 @@ index 17e89992472d58c617b5c9c0bd0d478b7c1e9123..aea3be250928924fd68910e0309c835a m_delegateMethods.webViewRequestStorageAccessPanelUnderFirstPartyCompletionHandler = [delegate respondsToSelector:@selector(_webView:requestStorageAccessPanelForDomain:underCurrentDomain:completionHandler:)]; m_delegateMethods.webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:)]; m_delegateMethods.webViewRequestGeolocationPermissionForOriginDecisionHandler = [delegate respondsToSelector:@selector(_webView:requestGeolocationPermissionForOrigin:initiatedByFrame:decisionHandler:)]; -@@ -427,6 +428,15 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy& page, const WTF::St +@@ -429,6 +430,15 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy& page, const WTF::St }).get()]; } @@ -12218,7 +12231,7 @@ index 17e89992472d58c617b5c9c0bd0d478b7c1e9123..aea3be250928924fd68910e0309c835a { if (!m_uiDelegate) diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm -index 361bf358f4a63482d7cc1a2358ce93e6965b5289..c9545d1937f5526741bba0d7558c8cde2dc083c0 100644 +index 3e2492348a0aa797686552bcd75ca3ed5a26295a..72222350d4019d07ea20f32ad7d92b8efff7e463 100644 --- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm +++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm @@ -37,6 +37,7 @@ @@ -12343,18 +12356,20 @@ index f064a1cfe684ce89caa2c45ccae4cd673b0d526d..65e866b3a6b9ab535c0cddcfef19c9db 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 bf1ede749837580db8c5e487e5bacaf916d9c270..c1d38acabec8c59bc460dab264088abc377976d0 100644 +index be4de15c34e3baa6d4a7db749c705c549f5dd207..39e78fae0c6481de28ef800dc621b268ac02b62b 100644 --- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp +++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -@@ -33,12 +33,15 @@ +@@ -33,14 +33,17 @@ #include "LayerTreeContext.h" #include "MessageSenderInlines.h" #include "UpdateInfo.h" +#include "WebPageInspectorController.h" #include "WebPageProxy.h" #include "WebPreferences.h" + #include "WebProcessPool.h" #include "WebProcessProxy.h" #include + #include +#include #if PLATFORM(GTK) @@ -12362,7 +12377,7 @@ index bf1ede749837580db8c5e487e5bacaf916d9c270..c1d38acabec8c59bc460dab264088abc #include #endif -@@ -46,6 +49,13 @@ +@@ -48,6 +51,13 @@ #include #endif @@ -12376,8 +12391,8 @@ index bf1ede749837580db8c5e487e5bacaf916d9c270..c1d38acabec8c59bc460dab264088abc namespace WebKit { using namespace WebCore; -@@ -149,6 +159,11 @@ void DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange() - m_webPageProxy.send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy.deviceScaleFactor()), m_identifier); +@@ -161,6 +171,11 @@ void DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange() + protectedWebPageProxy()->send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_identifier); } +void DrawingAreaProxyCoordinatedGraphics::waitForSizeUpdate(Function&& callback) @@ -12388,9 +12403,9 @@ index bf1ede749837580db8c5e487e5bacaf916d9c270..c1d38acabec8c59bc460dab264088abc void DrawingAreaProxyCoordinatedGraphics::setBackingStoreIsDiscardable(bool isBackingStoreDiscardable) { #if !PLATFORM(WPE) -@@ -215,6 +230,45 @@ void DrawingAreaProxyCoordinatedGraphics::targetRefreshRateDidChange(unsigned ra - m_webPageProxy.send(Messages::DrawingArea::TargetRefreshRateDidChange(rate), m_identifier); +@@ -229,6 +244,45 @@ void DrawingAreaProxyCoordinatedGraphics::targetRefreshRateDidChange(unsigned ra } + #endif +#if PLATFORM(WIN) +void DrawingAreaProxyCoordinatedGraphics::didChangeAcceleratedCompositingMode(bool enabled) @@ -12406,12 +12421,12 @@ index bf1ede749837580db8c5e487e5bacaf916d9c270..c1d38acabec8c59bc460dab264088abc +#if PLATFORM(WIN) + HWndDC dc; + if (m_isInAcceleratedCompositingMode) { -+ dc.setHWnd(reinterpret_cast(m_webPageProxy.viewWidget())); ++ dc.setHWnd(reinterpret_cast(protectedWebPageProxy()->viewWidget())); + surface = adoptRef(cairo_win32_surface_create(dc)); +#else + if (isInAcceleratedCompositingMode()) { +# if PLATFORM(GTK) -+ AcceleratedBackingStore* backingStore = webkitWebViewBaseGetAcceleratedBackingStore(WEBKIT_WEB_VIEW_BASE(m_webPageProxy.viewWidget())); ++ AcceleratedBackingStore* backingStore = webkitWebViewBaseGetAcceleratedBackingStore(WEBKIT_WEB_VIEW_BASE(protectedWebPageProxy()->viewWidget())); + if (!backingStore) + return; + @@ -12427,14 +12442,14 @@ index bf1ede749837580db8c5e487e5bacaf916d9c270..c1d38acabec8c59bc460dab264088abc + if (!surface) + return; + -+ m_webPageProxy.inspectorController().didPaint(surface.get()); ++ protectedWebPageProxy()->inspectorController().didPaint(surface.get()); +} +#endif + bool DrawingAreaProxyCoordinatedGraphics::alwaysUseCompositing() const { - return m_webPageProxy.preferences().acceleratedCompositingEnabled() && m_webPageProxy.preferences().forceCompositingMode(); -@@ -269,6 +323,11 @@ void DrawingAreaProxyCoordinatedGraphics::didUpdateGeometry() + return m_webPageProxy->preferences().acceleratedCompositingEnabled() && m_webPageProxy->preferences().forceCompositingMode(); +@@ -283,6 +337,11 @@ void DrawingAreaProxyCoordinatedGraphics::didUpdateGeometry() // we need to resend the new size here. if (m_lastSentSize != m_size) sendUpdateGeometry(); @@ -12447,7 +12462,7 @@ index bf1ede749837580db8c5e487e5bacaf916d9c270..c1d38acabec8c59bc460dab264088abc #if !PLATFORM(WPE) diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h -index 482795eb9d23e54d3e0dca1f7fb38aaab58818db..3c20d84970d6304392a760db1726baa3acf62e7f 100644 +index d5d61ca02c9acba5b359fcfcb7bbae3632ef8ce4..ca9b4cdb1276b4e53b3c256bc1459fa40d549de5 100644 --- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h +++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h @@ -30,6 +30,7 @@ @@ -12469,17 +12484,17 @@ index 482795eb9d23e54d3e0dca1f7fb38aaab58818db..3c20d84970d6304392a760db1726baa3 void dispatchAfterEnsuringDrawing(CompletionHandler&&); -@@ -69,6 +74,9 @@ private: - void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, UpdateInfo&&) override; - void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) override; +@@ -75,6 +80,9 @@ private: + #if !PLATFORM(GTK) void targetRefreshRateDidChange(unsigned) override; + #endif +#if PLATFORM(WIN) + void didChangeAcceleratedCompositingMode(bool enabled) override; +#endif bool shouldSendWheelEventsToEventDispatcher() const override { return true; } -@@ -118,6 +126,7 @@ private: +@@ -124,6 +132,7 @@ private: // The last size we sent to the web process. WebCore::IntSize m_lastSentSize; @@ -12487,7 +12502,7 @@ index 482795eb9d23e54d3e0dca1f7fb38aaab58818db..3c20d84970d6304392a760db1726baa3 #if !PLATFORM(WPE) bool m_isBackingStoreDiscardable { true }; -@@ -126,6 +135,10 @@ private: +@@ -132,6 +141,10 @@ private: RunLoop::Timer m_discardBackingStoreTimer; #endif std::unique_ptr m_drawingMonitor; @@ -12591,18 +12606,18 @@ index 9b69cad753b5b2e3844caac57b44c067507e68e7..1e898d7311a2cb8cb6d9a4042f91f41c } // namespace WebKit diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.h b/Source/WebKit/UIProcess/DrawingAreaProxy.h -index 6df5f84736de1e30958171ee39cbc91ff786798d..4c084b4c223580487a4f90f59e416a6c1c0f4854 100644 +index 3e9751ffb6e3069227dc0c92f0c9b9c18f7111f8..b66739b19aba8be7b69c8a7600d2b1b4c28844ff 100644 --- a/Source/WebKit/UIProcess/DrawingAreaProxy.h +++ b/Source/WebKit/UIProcess/DrawingAreaProxy.h -@@ -86,6 +86,7 @@ public: +@@ -87,6 +87,7 @@ public: const WebCore::IntSize& size() const { return m_size; } bool setSize(const WebCore::IntSize&, const WebCore::IntSize& scrollOffset = { }); + void waitForSizeUpdate(Function&&); - #if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER) + #if !PLATFORM(GTK) && (USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)) virtual void targetRefreshRateDidChange(unsigned) { } -@@ -163,6 +164,10 @@ private: +@@ -166,6 +167,10 @@ private: virtual void update(uint64_t /* backingStoreStateID */, UpdateInfo&&) { } virtual void exitAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, UpdateInfo&&) { } #endif @@ -13943,7 +13958,7 @@ index 0000000000000000000000000000000000000000..e2ce910f3fd7f587add552275b7e7176 + +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp -index 4a945dd8063cd7cd90174f6d4cd4197bcb98a101..16e73d6a724dd80487b7b140aaaccfec253eb7aa 100644 +index fedef553cec70feb6c6475a5f752fbc6833dbb38..16e73d6a724dd80487b7b140aaaccfec253eb7aa 100644 --- a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp +++ b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp @@ -28,11 +28,10 @@ @@ -13959,7 +13974,7 @@ index 4a945dd8063cd7cd90174f6d4cd4197bcb98a101..16e73d6a724dd80487b7b140aaaccfec namespace WebKit { -@@ -40,18 +39,17 @@ using namespace Inspector; +@@ -40,19 +39,17 @@ using namespace Inspector; std::unique_ptr InspectorTargetProxy::create(WebPageProxy& page, const String& targetId, Inspector::InspectorTargetType type) { @@ -13970,7 +13985,8 @@ index 4a945dd8063cd7cd90174f6d4cd4197bcb98a101..16e73d6a724dd80487b7b140aaaccfec -std::unique_ptr InspectorTargetProxy::create(ProvisionalPageProxy& provisionalPage, const String& targetId, Inspector::InspectorTargetType type) +std::unique_ptr InspectorTargetProxy::create(ProvisionalPageProxy& provisionalPage, const String& targetId) { -- auto target = InspectorTargetProxy::create(provisionalPage.page(), targetId, type); +- 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); @@ -13983,7 +13999,7 @@ index 4a945dd8063cd7cd90174f6d4cd4197bcb98a101..16e73d6a724dd80487b7b140aaaccfec , m_identifier(targetId) , m_type(type) { -@@ -98,6 +96,31 @@ void InspectorTargetProxy::didCommitProvisionalTarget() +@@ -99,6 +96,31 @@ void InspectorTargetProxy::didCommitProvisionalTarget() m_provisionalPage = nullptr; } @@ -14056,7 +14072,7 @@ index a2239cec8e18850f35f7f88a9c4ebadc62bf4023..79f3ff84327dc075ec96983e04db4b10 } // namespace WebKit diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp -index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01201a5dba 100644 +index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..77a7bacae6c09488b2c44dd1fd758679532c1a24 100644 --- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp +++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp @@ -26,13 +26,21 @@ @@ -14081,7 +14097,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 #include #include #include -@@ -49,27 +57,114 @@ static String getTargetID(const ProvisionalPageProxy& provisionalPage) +@@ -49,32 +57,119 @@ static String getTargetID(const ProvisionalPageProxy& provisionalPage) return WebPageInspectorTarget::toTargetID(provisionalPage.webPageID()); } @@ -14106,6 +14122,13 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 - m_agents.append(WTFMove(targetAgent)); } +-Ref WebPageInspectorController::protectedInspectedPage() ++CheckedRef WebPageInspectorController::protectedInspectedPage() + { +- return m_inspectedPage.get(); ++ return m_inspectedPage; + } + void WebPageInspectorController::init() { + auto targetAgent = makeUnique(m_frontendRouter.get(), m_backendDispatcher.get()); @@ -14125,15 +14148,15 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 + s_observer->didCreateInspectorController(m_inspectedPage); + + // window.open will create page with already running process. -+ if (!m_inspectedPage.hasRunningProcess()) ++ if (!m_inspectedPage->hasRunningProcess()) + return; - String pageTargetId = WebPageInspectorTarget::toTargetID(m_inspectedPage.webPageID()); + String pageTargetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID()); createInspectorTarget(pageTargetId, Inspector::InspectorTargetType::Page); } +void WebPageInspectorController::didFinishAttachingToWebProcess() +{ -+ String pageTargetID = WebPageInspectorTarget::toTargetID(m_inspectedPage.webPageID()); ++ String pageTargetID = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID()); + // Create target only after attaching to a Web Process first time. Before that + // we cannot event establish frontend connection. + if (m_targets.contains(pageTargetID)) @@ -14143,7 +14166,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 + void WebPageInspectorController::pageClosed() { -+ String pageTargetId = WebPageInspectorTarget::toTargetID(m_inspectedPage.webPageID()); ++ String pageTargetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID()); + destroyInspectorTarget(pageTargetId); + disconnectAllFrontends(); @@ -14158,7 +14181,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 +{ + if (reason != ProcessTerminationReason::Crash) + return false; -+ String targetId = WebPageInspectorTarget::toTargetID(m_inspectedPage.webPageID()); ++ String targetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID()); + auto it = m_targets.find(targetId); + if (it == m_targets.end()) + return false; @@ -14199,7 +14222,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 } bool WebPageInspectorController::hasLocalFrontend() const -@@ -83,6 +178,17 @@ void WebPageInspectorController::connectFrontend(Inspector::FrontendChannel& fro +@@ -88,6 +183,17 @@ void WebPageInspectorController::connectFrontend(Inspector::FrontendChannel& fro bool connectingFirstFrontend = !m_frontendRouter->hasFrontends(); @@ -14217,7 +14240,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 m_frontendRouter->connectFrontend(frontendChannel); if (connectingFirstFrontend) -@@ -101,8 +207,10 @@ void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendCha +@@ -107,8 +213,10 @@ void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendCha m_frontendRouter->disconnectFrontend(frontendChannel); bool disconnectingLastFrontend = !m_frontendRouter->hasFrontends(); @@ -14227,18 +14250,18 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 + m_pendingNavigations.clear(); + } - m_inspectedPage.didChangeInspectorFrontendCount(m_frontendRouter->frontendCount()); - -@@ -125,6 +233,8 @@ void WebPageInspectorController::disconnectAllFrontends() + auto inspectedPage = protectedInspectedPage(); + inspectedPage->didChangeInspectorFrontendCount(m_frontendRouter->frontendCount()); +@@ -132,6 +240,8 @@ void WebPageInspectorController::disconnectAllFrontends() // Disconnect any remaining remote frontends. m_frontendRouter->disconnectAllFrontends(); + m_pendingNavigations.clear(); + - m_inspectedPage.didChangeInspectorFrontendCount(m_frontendRouter->frontendCount()); + auto inspectedPage = protectedInspectedPage(); + inspectedPage->didChangeInspectorFrontendCount(m_frontendRouter->frontendCount()); - #if ENABLE(REMOTE_INSPECTOR) -@@ -151,6 +261,66 @@ void WebPageInspectorController::setIndicating(bool indicating) +@@ -160,6 +270,66 @@ void WebPageInspectorController::setIndicating(bool indicating) } #endif @@ -14255,7 +14278,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 + +void WebPageInspectorController::navigate(WebCore::ResourceRequest&& request, WebFrameProxy* frame, NavigationHandler&& completionHandler) +{ -+ auto navigation = m_inspectedPage.loadRequestForInspector(WTFMove(request), frame); ++ auto navigation = m_inspectedPage->loadRequestForInspector(WTFMove(request), frame); + if (!navigation) { + completionHandler("Failed to navigate"_s, 0); + return; @@ -14304,8 +14327,8 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 + void WebPageInspectorController::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type) { - addTarget(InspectorTargetProxy::create(m_inspectedPage, targetId, type)); -@@ -170,6 +340,32 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta + addTarget(InspectorTargetProxy::create(protectedInspectedPage(), targetId, type)); +@@ -179,6 +349,32 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta m_targetAgent->sendMessageFromTargetToFrontend(targetId, message); } @@ -14320,17 +14343,17 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 + if (!m_frontendRouter->hasFrontends()) + return false; + -+ if (!m_inspectedPage.isPageOpenedByDOMShowingInitialEmptyDocument()) ++ if (!m_inspectedPage->isPageOpenedByDOMShowingInitialEmptyDocument()) + return false; + -+ auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage.webPageID())); ++ auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID())); + ASSERT(target); + return target->isPaused(); +} + +void WebPageInspectorController::setContinueLoadingCallback(WTF::Function&& callback) +{ -+ auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage.webPageID())); ++ auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID())); + ASSERT(target); + target->setResumeCallback(WTFMove(callback)); +} @@ -14338,7 +14361,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 bool WebPageInspectorController::shouldPauseLoading(const ProvisionalPageProxy& provisionalPage) const { if (!m_frontendRouter->hasFrontends()) -@@ -189,7 +385,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag +@@ -198,7 +394,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag void WebPageInspectorController::didCreateProvisionalPage(ProvisionalPageProxy& provisionalPage) { @@ -14347,7 +14370,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 } void WebPageInspectorController::willDestroyProvisionalPage(const ProvisionalPageProxy& provisionalPage) -@@ -267,4 +463,27 @@ void WebPageInspectorController::browserExtensionsDisabled(HashSet&& ext +@@ -277,4 +473,27 @@ void WebPageInspectorController::browserExtensionsDisabled(HashSet&& ext m_enabledBrowserAgent->extensionsDisabled(WTFMove(extensionIDs)); } @@ -14356,30 +14379,30 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01 + // Set this to true as otherwise updating any preferences will override its + // value in the Web Process to false (and InspectorController sets it locally + // to true when frontend is connected). -+ m_inspectedPage.preferences().setDeveloperExtrasEnabled(true); ++ m_inspectedPage->preferences().setDeveloperExtrasEnabled(true); + + // Navigation to cached pages doesn't fire some of the events (e.g. execution context created) + // that inspector depends on. So we disable the cache when front-end connects. -+ m_inspectedPage.preferences().setUsesBackForwardCache(false); ++ m_inspectedPage->preferences().setUsesBackForwardCache(false); + + // Enable popup debugging. + // TODO: allow to set preferences over the inspector protocol or find a better place for this. -+ m_inspectedPage.preferences().setJavaScriptCanOpenWindowsAutomatically(true); ++ m_inspectedPage->preferences().setJavaScriptCanOpenWindowsAutomatically(true); + + // Enable media stream. -+ if (!m_inspectedPage.preferences().mediaStreamEnabled()) { -+ m_inspectedPage.preferences().setMediaDevicesEnabled(true); -+ m_inspectedPage.preferences().setMediaStreamEnabled(true); -+ m_inspectedPage.preferences().setPeerConnectionEnabled(true); ++ if (!m_inspectedPage->preferences().mediaStreamEnabled()) { ++ m_inspectedPage->preferences().setMediaDevicesEnabled(true); ++ m_inspectedPage->preferences().setMediaStreamEnabled(true); ++ m_inspectedPage->preferences().setPeerConnectionEnabled(true); + } +} + } // namespace WebKit diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h -index 90619b09c986a6791eec834668ac38ba1581ba93..5ef7f3e25ae95cfbe5564d3456953b9abcd23db4 100644 +index 0a44e45c3d208942ba1bbf0624ae241ca7bbd973..7e891a1fe3e2588e0aa286c4cbb2064967379fcb 100644 --- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h +++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h -@@ -26,17 +26,35 @@ +@@ -26,6 +26,7 @@ #pragma once #include "InspectorTargetProxy.h" @@ -14387,6 +14410,7 @@ index 90619b09c986a6791eec834668ac38ba1581ba93..5ef7f3e25ae95cfbe5564d3456953b9a #include #include #include +@@ -33,11 +34,28 @@ #include #include #include @@ -14415,7 +14439,7 @@ index 90619b09c986a6791eec834668ac38ba1581ba93..5ef7f3e25ae95cfbe5564d3456953b9a } namespace WebKit { -@@ -44,6 +62,23 @@ namespace WebKit { +@@ -45,6 +63,23 @@ namespace WebKit { class InspectorBrowserAgent; struct WebPageAgentContext; @@ -14439,7 +14463,7 @@ index 90619b09c986a6791eec834668ac38ba1581ba93..5ef7f3e25ae95cfbe5564d3456953b9a class WebPageInspectorController { WTF_MAKE_NONCOPYABLE(WebPageInspectorController); WTF_MAKE_FAST_ALLOCATED; -@@ -51,7 +86,21 @@ public: +@@ -52,7 +87,21 @@ public: WebPageInspectorController(WebPageProxy&); void init(); @@ -14461,7 +14485,7 @@ index 90619b09c986a6791eec834668ac38ba1581ba93..5ef7f3e25ae95cfbe5564d3456953b9a bool hasLocalFrontend() const; -@@ -64,11 +113,25 @@ public: +@@ -65,11 +114,25 @@ public: #if ENABLE(REMOTE_INSPECTOR) void setIndicating(bool); #endif @@ -14487,7 +14511,13 @@ index 90619b09c986a6791eec834668ac38ba1581ba93..5ef7f3e25ae95cfbe5564d3456953b9a bool shouldPauseLoading(const ProvisionalPageProxy&) const; void setContinueLoadingCallback(const ProvisionalPageProxy&, WTF::Function&&); -@@ -87,6 +150,7 @@ private: +@@ -84,11 +147,12 @@ public: + void browserExtensionsDisabled(HashSet&&); + + private: +- Ref protectedInspectedPage(); ++ CheckedRef protectedInspectedPage(); + WebPageAgentContext webPageAgentContext(); void createLazyAgents(); void addTarget(std::unique_ptr&&); @@ -14495,8 +14525,8 @@ index 90619b09c986a6791eec834668ac38ba1581ba93..5ef7f3e25ae95cfbe5564d3456953b9a Ref m_frontendRouter; Ref m_backendDispatcher; -@@ -95,11 +159,17 @@ private: - WebPageProxy& m_inspectedPage; +@@ -97,11 +161,17 @@ private: + CheckedRef m_inspectedPage; Inspector::InspectorTargetAgent* m_targetAgent { nullptr }; + WebPageInspectorEmulationAgent* m_emulationAgent { nullptr }; @@ -14746,10 +14776,10 @@ 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..5a3010759c8ed1934e105ebda0a7c9b508a3c824 +index 0000000000000000000000000000000000000000..24dd8c24c555475ae707cb2abb22f8ffd669846c --- /dev/null +++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp -@@ -0,0 +1,1003 @@ +@@ -0,0 +1,1019 @@ +/* + * Copyright (C) 2019 Microsoft Corporation. + * @@ -15269,6 +15299,19 @@ index 0000000000000000000000000000000000000000..5a3010759c8ed1934e105ebda0a7c9b5 + return { }; +} + ++Inspector::Protocol::ErrorStringOr InspectorPlaywrightAgent::getInfo() ++{ ++#if PLATFORM(MAC) ++ return { "macOS"_s }; ++#elif PLATFORM(GTK) || PLATFORM(WPE) ++ return { "Linux"_s }; ++#elif PLATFORM(WIN) ++ return { "Windows"_s }; ++#else ++#error "Unsupported platform." ++#endif ++} ++ +void InspectorPlaywrightAgent::close(Ref&& callback) +{ + closeImpl([callback = WTFMove(callback)] (String error) { @@ -15475,22 +15518,25 @@ index 0000000000000000000000000000000000000000..5a3010759c8ed1934e105ebda0a7c9b5 + return { }; +} + -+Inspector::Protocol::ErrorStringOr InspectorPlaywrightAgent::takePageScreenshot(const String& pageProxyID, int x, int y, int width, int height, std::optional&& omitDeviceScaleFactor) ++void InspectorPlaywrightAgent::takePageScreenshot(const String& pageProxyID, int x, int y, int width, int height, std::optional&& omitDeviceScaleFactor, Ref&& callback) +{ -+#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) ++#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WPE) + auto* pageProxyChannel = m_pageProxyChannels.get(pageProxyID); -+ if (!pageProxyChannel) -+ return makeUnexpected("Unknown pageProxyID"_s); ++ if (!pageProxyChannel) { ++ callback->sendFailure("Unknown pageProxyID"_s); ++ return; ++ } + + bool nominalResolution = omitDeviceScaleFactor.has_value() && *omitDeviceScaleFactor; + WebCore::IntRect clip(x, y, width, height); -+ String error; -+ String screenshot = m_client->takePageScreenshot(error, pageProxyChannel->page(), WTFMove(clip), nominalResolution); -+ if (!error.isEmpty()) -+ return makeUnexpected(error); -+ return screenshot; ++ m_client->takePageScreenshot(pageProxyChannel->page(), WTFMove(clip), nominalResolution, [callback = WTFMove(callback)](const String& error, const String& data) { ++ if (error.isEmpty()) ++ callback->sendSuccess(data); ++ else ++ callback->sendFailure(error); ++ }); +#else -+ return makeUnexpected("This method is only supported on macOS."_s); ++ return callback->sendFailure("This method is not supported on this platform."_s); +#endif +} + @@ -15755,10 +15801,10 @@ index 0000000000000000000000000000000000000000..5a3010759c8ed1934e105ebda0a7c9b5 +#endif // ENABLE(REMOTE_INSPECTOR) diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h new file mode 100644 -index 0000000000000000000000000000000000000000..5e370940b08031fb552bc8b419874deb1ce59233 +index 0000000000000000000000000000000000000000..36b7f12b5d9fce000715b42ee2980c20e0e91ef7 --- /dev/null +++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h -@@ -0,0 +1,129 @@ +@@ -0,0 +1,130 @@ +/* + * Copyright (C) 2019 Microsoft Corporation. + * @@ -15842,13 +15888,14 @@ index 0000000000000000000000000000000000000000..5e370940b08031fb552bc8b419874deb + // PlaywrightDispatcherHandler + Inspector::Protocol::ErrorStringOr enable() override; + Inspector::Protocol::ErrorStringOr disable() override; ++ Inspector::Protocol::ErrorStringOr getInfo() override; + void close(Ref&&) override; + Inspector::Protocol::ErrorStringOr createContext(const String& proxyServer, const String& proxyBypassList) override; + void deleteContext(const String& browserContextID, Ref&& callback) override; + Inspector::Protocol::ErrorStringOr createPage(const String& browserContextID) override; + void navigate(const String& url, const String& pageProxyID, const String& frameId, const String& referrer, Ref&&) override; + Inspector::Protocol::ErrorStringOr grantFileReadAccess(const String& pageProxyID, Ref&& paths) override; -+ Inspector::Protocol::ErrorStringOr takePageScreenshot(const String& pageProxyID, int x, int y, int width, int height, std::optional&& omitDeviceScaleFactor) override; ++ void takePageScreenshot(const String& pageProxyID, int x, int y, int width, int height, std::optional&& omitDeviceScaleFactor, Ref&&) override; + Inspector::Protocol::ErrorStringOr setIgnoreCertificateErrors(const String& browserContextID, bool ignore) override; + + void getAllCookies(const String& browserContextID, Ref&&) override; @@ -15890,7 +15937,7 @@ index 0000000000000000000000000000000000000000..5e370940b08031fb552bc8b419874deb +#endif // ENABLE(REMOTE_INSPECTOR) diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgentClient.h b/Source/WebKit/UIProcess/InspectorPlaywrightAgentClient.h new file mode 100644 -index 0000000000000000000000000000000000000000..6815001186506b5926ef089d03f6fce46b9f249d +index 0000000000000000000000000000000000000000..e7a3dcc533294bb6e12f65d79b5b716bd3c12236 --- /dev/null +++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgentClient.h @@ -0,0 +1,73 @@ @@ -15960,7 +16007,7 @@ index 0000000000000000000000000000000000000000..6815001186506b5926ef089d03f6fce4 + virtual std::unique_ptr createBrowserContext(WTF::String& error, const WTF::String& proxyServer, const WTF::String& proxyBypassList) = 0; + virtual void deleteBrowserContext(WTF::String& error, PAL::SessionID) = 0; +#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) -+ virtual String takePageScreenshot(WTF::String& error, WebPageProxy&, WebCore::IntRect&& clip, bool nominalResolution) = 0; ++ virtual void takePageScreenshot(WebPageProxy&, WebCore::IntRect&& clip, bool nominalResolution, CompletionHandler&& completionHandler) = 0; +#endif +}; + @@ -15997,10 +16044,10 @@ index 3fe0abcfe36bef7ca45bed5661a737ed2bfe56d0..510656948af01ec65d4543c805e9667a #include "RemoteMediaSessionCoordinatorProxyMessages.h" #include "WebPageProxy.h" diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h -index 290c016a047960d38fe60f78d4a0fc1c64ac5d38..82e01ed83f9159ba7f2af3f5bd5082f162a778b9 100644 +index ed7fea3c0ae4b0567f592226ca34a53f6a453c9a..6eed8f4a0f69f3d45e09f68a33d76d49908ab0d6 100644 --- a/Source/WebKit/UIProcess/PageClient.h +++ b/Source/WebKit/UIProcess/PageClient.h -@@ -84,6 +84,10 @@ OBJC_CLASS WKView; +@@ -85,6 +85,10 @@ OBJC_CLASS WKView; #endif #endif @@ -16011,7 +16058,7 @@ index 290c016a047960d38fe60f78d4a0fc1c64ac5d38..82e01ed83f9159ba7f2af3f5bd5082f1 namespace API { class Attachment; class HitTestResult; -@@ -332,7 +336,16 @@ public: +@@ -333,7 +337,16 @@ public: virtual void selectionDidChange() = 0; #endif @@ -16155,7 +16202,7 @@ index 0000000000000000000000000000000000000000..3c8fd0549f1847515d35092f0f49b060 + +#endif // ENABLE(FULLSCREEN_API) diff --git a/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp b/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp -index d37c0fdab3545ea166e1f062e7bd40107180c056..9e3f20f9f709786ff7093c746c0ae20022ee134c 100644 +index 529513b85bdad92abf0f72021545780b4c03f0d9..cacc725db7660d956222a85a164f88d477bbc659 100644 --- a/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp +++ b/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp @@ -25,6 +25,7 @@ @@ -16485,17 +16532,17 @@ index f8c06bc779b6be310018840147a044b7c34fed3c..0c35907c6d0e0d2c3bba1f40b2ef59fb namespace WebCore { class PlatformWheelEvent; diff --git a/Source/WebKit/UIProcess/RemotePageProxy.cpp b/Source/WebKit/UIProcess/RemotePageProxy.cpp -index 962ee6cae7dc76a19243f77f4c01b90163a2e8ba..2aebb41f50dcd87f738daafe0b5aa244844df227 100644 +index 6714d262e7db42fe3341e29c6d06150749117b9e..f6a74d735df19a3376c2f386489326bc4a3571c8 100644 --- a/Source/WebKit/UIProcess/RemotePageProxy.cpp +++ b/Source/WebKit/UIProcess/RemotePageProxy.cpp -@@ -39,6 +39,7 @@ +@@ -41,6 +41,7 @@ #include "WebPageProxyMessages.h" #include "WebProcessMessages.h" #include "WebProcessProxy.h" +#include "WebProcessMessages.h" + #include namespace WebKit { - diff --git a/Source/WebKit/UIProcess/WebContextMenuProxy.cpp b/Source/WebKit/UIProcess/WebContextMenuProxy.cpp index 2c36e80c79519b09f1969701dbd8c712b50089de..b6a2e3dd03496a57238e7381880ad2f78d8f4b72 100644 --- a/Source/WebKit/UIProcess/WebContextMenuProxy.cpp @@ -16521,7 +16568,7 @@ index 2071f653d6fd7413dd5336b85d02c6a92cab68b2..af9409c0adfc97a60d4ed789999310a7 WebPageProxy* page() const { return m_page.get(); } diff --git a/Source/WebKit/UIProcess/WebFrameProxy.cpp b/Source/WebKit/UIProcess/WebFrameProxy.cpp -index 0f2875d0465b3267f210e065a9e5ce0830353abb..837b65eeacd48b75fef7d3bb274eddb3a0393639 100644 +index e838f905d68e3a0450c8923a5ba0fcbd34e01cbf..a99b6e7f5b3fadf30229da3c740e1119fd1c53cf 100644 --- a/Source/WebKit/UIProcess/WebFrameProxy.cpp +++ b/Source/WebKit/UIProcess/WebFrameProxy.cpp @@ -30,6 +30,7 @@ @@ -16796,7 +16843,7 @@ index 0000000000000000000000000000000000000000..12657f8e7c4b2596707680d299dc8084 +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..0b33e978d46982cee8ed5b39c331502770694478 +index 0000000000000000000000000000000000000000..d21c7462293142fbc8b05fd17f030a20f3ab7bde --- /dev/null +++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp @@ -0,0 +1,334 @@ @@ -17018,7 +17065,7 @@ index 0000000000000000000000000000000000000000..0b33e978d46982cee8ed5b39c3315027 + +void WebPageInspectorInputAgent::dispatchMouseEvent(const String& type, int x, int y, std::optional&& modifiers, const String& button, std::optional&& buttons, std::optional&& clickCount, std::optional&& deltaX, std::optional&& deltaY, Ref&& callback) +{ -+ WebEventType eventType = WebEventType::NoType; ++ WebEventType eventType = WebEventType::MouseMove; + if (type == "down"_s) + eventType = WebEventType::MouseDown; + else if (type == "up"_s) @@ -17034,16 +17081,16 @@ index 0000000000000000000000000000000000000000..0b33e978d46982cee8ed5b39c3315027 + if (modifiers) + eventModifiers = eventModifiers.fromRaw(*modifiers); + -+ WebMouseEventButton eventButton = WebMouseEventButton::NoButton; ++ WebMouseEventButton eventButton = WebMouseEventButton::None; + if (!!button) { + if (button == "left"_s) -+ eventButton = WebMouseEventButton::LeftButton; ++ eventButton = WebMouseEventButton::Left; + else if (button == "middle"_s) -+ eventButton = WebMouseEventButton::MiddleButton; ++ eventButton = WebMouseEventButton::Middle; + else if (button == "right"_s) -+ eventButton = WebMouseEventButton::RightButton; ++ eventButton = WebMouseEventButton::Right; + else if (button == "none"_s) -+ eventButton = WebMouseEventButton::NoButton; ++ eventButton = WebMouseEventButton::None; + else { + callback->sendFailure("Unsupported eventButton"_s); + return; @@ -17227,12 +17274,12 @@ index 0000000000000000000000000000000000000000..3e87bf40ced2301f4fb145c6cb31f2cf + +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp -index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bbd24752a6 100644 +index 198ba50873059dc6dc9afb8d6bc97ed0538ed4ee..8ca9b6b657d70c1996c84c7b19aaf74323676418 100644 --- a/Source/WebKit/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit/UIProcess/WebPageProxy.cpp -@@ -171,12 +171,14 @@ - #include +@@ -174,12 +174,14 @@ #include + #include #include +#include #include @@ -17245,7 +17292,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb #include #include #include -@@ -195,16 +197,19 @@ +@@ -198,17 +200,20 @@ #include #include #include @@ -17257,6 +17304,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb #include #include +#include + #include #include #include #include @@ -17265,7 +17313,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb #include #include #include -@@ -272,6 +277,9 @@ +@@ -277,6 +282,9 @@ #if PLATFORM(GTK) #include "GtkSettingsManager.h" @@ -17275,7 +17323,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb #include #endif -@@ -381,6 +389,8 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms; +@@ -386,6 +394,8 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms; static constexpr Seconds audibleActivityClearDelay = 10_s; #endif @@ -17283,8 +17331,8 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb + DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageProxyCounter, ("WebPageProxy")); - class StorageRequests { -@@ -747,6 +757,10 @@ WebPageProxy::~WebPageProxy() + #if PLATFORM(COCOA) +@@ -759,6 +769,10 @@ WebPageProxy::~WebPageProxy() internals().remotePageProxyInOpenerProcess = nullptr; internals().openedRemotePageProxies.clear(); @@ -17295,7 +17343,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } void WebPageProxy::addAllMessageReceivers() -@@ -1204,6 +1218,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason) +@@ -1225,6 +1239,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason) pageClient().didRelaunchProcess(); internals().pageLoadState.didSwapWebProcesses(); @@ -17303,7 +17351,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } void WebPageProxy::didAttachToRunningProcess() -@@ -1212,7 +1227,7 @@ void WebPageProxy::didAttachToRunningProcess() +@@ -1233,7 +1248,7 @@ void WebPageProxy::didAttachToRunningProcess() #if ENABLE(FULLSCREEN_API) ASSERT(!m_fullScreenManager); @@ -17312,7 +17360,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb #endif #if ENABLE(VIDEO_PRESENTATION_MODE) ASSERT(!m_playbackSessionManager); -@@ -1600,6 +1615,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess() +@@ -1622,6 +1637,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess() return m_process; } @@ -17334,7 +17382,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb RefPtr WebPageProxy::loadRequest(ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, API::Object* userData) { if (m_isClosed) -@@ -2160,6 +2190,32 @@ void WebPageProxy::setControlledByAutomation(bool controlled) +@@ -2179,6 +2209,32 @@ void WebPageProxy::setControlledByAutomation(bool controlled) websiteDataStore().networkProcess().send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0); } @@ -17367,7 +17415,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb void WebPageProxy::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type) { MESSAGE_CHECK(m_process, !targetId.isEmpty()); -@@ -2402,6 +2458,25 @@ void WebPageProxy::updateActivityState(OptionSet flagsToUpdate) +@@ -2421,6 +2477,25 @@ void WebPageProxy::updateActivityState(OptionSet flagsToUpdate) { bool wasVisible = isViewVisible(); internals().activityState.remove(flagsToUpdate); @@ -17393,7 +17441,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb if (flagsToUpdate & ActivityState::IsFocused && pageClient().isViewFocused()) internals().activityState.add(ActivityState::IsFocused); if (flagsToUpdate & ActivityState::WindowIsActive && pageClient().isViewWindowActive()) -@@ -3087,6 +3162,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag +@@ -3106,6 +3181,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag { if (!hasRunningProcess()) return; @@ -17402,7 +17450,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb #if PLATFORM(GTK) UNUSED_PARAM(dragStorageName); UNUSED_PARAM(sandboxExtensionHandle); -@@ -3097,6 +3174,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag +@@ -3116,6 +3193,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag m_process->assumeReadAccessToBaseURL(*this, url); ASSERT(dragData.platformData()); @@ -17411,7 +17459,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags())); #else send(Messages::WebPage::PerformDragControllerAction(action, dragData, sandboxExtensionHandle, sandboxExtensionsForUpload)); -@@ -3112,18 +3191,41 @@ void WebPageProxy::didPerformDragControllerAction(std::optional dragOperationMask, ShareableBitmap::Handle&& dragImageHandle, IntPoint&& dragImageHotspot) + void WebPageProxy::startDrag(SelectionData&& selectionData, OptionSet dragOperationMask, std::optional&& dragImageHandle, IntPoint&& dragImageHotspot) { -- RefPtr dragImage = !dragImageHandle.isNull() ? ShareableBitmap::create(WTFMove(dragImageHandle)) : nullptr; +- RefPtr dragImage = dragImageHandle ? ShareableBitmap::create(WTFMove(*dragImageHandle)) : nullptr; - pageClient().startDrag(WTFMove(selectionData), dragOperationMask, WTFMove(dragImage), WTFMove(dragImageHotspot)); + if (m_interceptDrags) { + m_dragSelectionData = WTFMove(selectionData); + m_dragSourceOperationMask = dragOperationMask; + } else { +#if PLATFORM(GTK) -+ RefPtr dragImage = !dragImageHandle.isNull() ? ShareableBitmap::create(WTFMove(dragImageHandle)) : nullptr; ++ RefPtr dragImage = dragImageHandle ? ShareableBitmap::create(WTFMove(*dragImageHandle)) : nullptr; + pageClient().startDrag(WTFMove(selectionData), dragOperationMask, WTFMove(dragImage), WTFMove(dragImageHotspot)); +#endif + } @@ -17456,7 +17504,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet dragOperationMask) { if (!hasRunningProcess()) -@@ -3132,6 +3234,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo +@@ -3151,6 +3253,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo setDragCaretRect({ }); } @@ -17481,7 +17529,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb void WebPageProxy::didPerformDragOperation(bool handled) { pageClient().didPerformDragOperation(handled); -@@ -3144,6 +3264,16 @@ void WebPageProxy::didStartDrag() +@@ -3163,6 +3283,16 @@ void WebPageProxy::didStartDrag() discardQueuedMouseEvents(); send(Messages::WebPage::DidStartDrag()); @@ -17498,7 +17546,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } void WebPageProxy::dragCancelled() -@@ -3267,17 +3397,37 @@ void WebPageProxy::processNextQueuedMouseEvent() +@@ -3319,17 +3449,38 @@ void WebPageProxy::processNextQueuedMouseEvent() m_process->startResponsivenessTimer(); } @@ -17508,20 +17556,20 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb + std::optional> sandboxExtensions; #if PLATFORM(MAC) -- bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEventType::MouseMove && event.button() != WebMouseEventButton::NoButton; +- bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEventType::MouseMove && event.button() != WebMouseEventButton::None; - if (eventMayStartDrag) - sandboxExtensions = SandboxExtension::createHandlesForMachLookup({ "com.apple.iconservices"_s, "com.apple.iconservices.store"_s }, process().auditToken(), SandboxExtension::MachBootstrapOptions::EnableMachBootstrap); -+ bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEventType::MouseMove && event.button() != WebMouseEventButton::NoButton; ++ bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEventType::MouseMove && event.button() != WebMouseEventButton::None; + if (eventMayStartDrag) + sandboxExtensions = SandboxExtension::createHandlesForMachLookup({ "com.apple.iconservices"_s, "com.apple.iconservices.store"_s }, process().auditToken(), SandboxExtension::MachBootstrapOptions::EnableMachBootstrap); #endif -- + - LOG_WITH_STREAM(MouseHandling, stream << "UIProcess: sent mouse event " << eventType << " (queue size " << internals().mouseEventQueue.size() << ")"); - m_process->recordUserGestureAuthorizationToken(event.authorizationToken()); -- send(Messages::WebPage::MouseEvent(m_mainFrame->frameID(), event, sandboxExtensions)); +- sendMouseEvent(m_mainFrame->frameID(), event, WTFMove(sandboxExtensions)); + LOG_WITH_STREAM(MouseHandling, stream << "UIProcess: sent mouse event " << eventType << " (queue size " << internals().mouseEventQueue.size() << ")"); + m_process->recordUserGestureAuthorizationToken(event.authorizationToken()); -+ send(Messages::WebPage::MouseEvent(m_mainFrame->frameID(), event, sandboxExtensions)); ++ sendMouseEvent(m_mainFrame->frameID(), event, WTFMove(sandboxExtensions)); + } else { +#if PLATFORM(WIN) || PLATFORM(COCOA) + DragData dragData(*m_dragSelectionData, event.position(), event.globalPosition(), m_dragSourceOperationMask); @@ -17544,7 +17592,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function&& action) -@@ -3437,6 +3587,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled) +@@ -3489,6 +3640,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled) if (auto* automationSession = process().processPool().automationSession()) automationSession->wheelEventsFlushedForPage(*this); @@ -17553,7 +17601,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } void WebPageProxy::cacheWheelEventScrollingAccelerationCurve(const NativeWebWheelEvent& nativeWheelEvent) -@@ -3565,7 +3717,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b) +@@ -3643,7 +3796,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b) void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent) { @@ -17562,7 +17610,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb for (auto& touchPoint : touchStartEvent.touchPoints()) { auto location = touchPoint.location(); auto update = [this, location](TrackingType& trackingType, EventTrackingRegions::EventType eventType) { -@@ -3981,6 +4133,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(WebProcessProxy& processNavi +@@ -4071,6 +4224,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(WebProcessProxy& processNavi if (policyAction != PolicyAction::Use || (!preferences().siteIsolationEnabled() && !frame.isMainFrame()) || !navigation) { @@ -17571,7 +17619,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb auto previousPendingNavigationID = internals().pageLoadState.pendingAPIRequest().navigationID; receivedPolicyDecision(policyAction, navigation, navigation->websitePolicies(), WTFMove(navigationAction), WTFMove(sender), WillContinueLoadInNewProcess::No, std::nullopt); #if HAVE(APP_SSO) -@@ -4087,6 +4241,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(WebProcessProxy& processNavi +@@ -4178,6 +4333,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(WebProcessProxy& processNavi void WebPageProxy::receivedPolicyDecision(PolicyAction action, API::Navigation* navigation, RefPtr&& websitePolicies, std::variant, Ref>&& navigationActionOrResponse, Ref&& sender, WillContinueLoadInNewProcess willContinueLoadInNewProcess, std::optional sandboxExtensionHandle) { @@ -17579,7 +17627,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb if (!hasRunningProcess()) { sender->send(PolicyDecision { isNavigatingToAppBoundDomain() }); return; -@@ -4939,6 +5094,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor) +@@ -5031,6 +5187,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor) m_pageScaleFactor = scaleFactor; } @@ -17591,7 +17639,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb void WebPageProxy::pluginScaleFactorDidChange(double pluginScaleFactor) { MESSAGE_CHECK(m_process, scaleFactorIsValid(pluginScaleFactor)); -@@ -5419,6 +5579,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref&& process, ui +@@ -5548,6 +5709,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref&& process, ui PageClientProtector protector(pageClient()); m_navigationState->didDestroyNavigation(process->coreProcessIdentifier(), navigationID); @@ -17599,7 +17647,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData) -@@ -5665,6 +5826,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref&& p +@@ -5794,6 +5956,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref&& p m_failingProvisionalLoadURL = { }; @@ -17608,7 +17656,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb // 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; -@@ -6274,7 +6437,15 @@ void WebPageProxy::beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListen +@@ -6402,7 +6566,15 @@ void WebPageProxy::beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListen void WebPageProxy::decidePolicyForNavigationActionAsync(FrameInfoData&& frameInfo, uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& originatingFrameInfo, std::optional originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, CompletionHandler&& completionHandler) { @@ -17625,7 +17673,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref&& process, PageIdentifier webPageID, FrameInfoData&& frameInfo, uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& originatingFrameInfo, std::optional originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, CompletionHandler&& completionHandler) -@@ -6856,6 +7027,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa +@@ -6984,6 +7156,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa if (auto* page = originatingFrameInfo->page()) openerAppInitiatedState = page->lastNavigationWasAppInitiated(); @@ -17633,7 +17681,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb auto completionHandler = [this, protectedThis = Ref { *this }, mainFrameURL, request, reply = WTFMove(reply), privateClickMeasurement = navigationActionData.privateClickMeasurement, openerAppInitiatedState = WTFMove(openerAppInitiatedState), openerFrameID = originatingFrameInfoData.frameID] (RefPtr newPage) mutable { if (!newPage) { reply(std::nullopt, std::nullopt); -@@ -6903,6 +7075,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa +@@ -7031,6 +7204,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa void WebPageProxy::showPage() { m_uiClient->showPage(this); @@ -17641,7 +17689,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } bool WebPageProxy::hasOpenedPage() const -@@ -6982,6 +7155,10 @@ void WebPageProxy::closePage() +@@ -7110,6 +7284,10 @@ void WebPageProxy::closePage() if (isClosed()) return; @@ -17652,7 +17700,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:"); pageClient().clearAllEditCommands(); m_uiClient->close(this); -@@ -7018,6 +7195,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f +@@ -7146,6 +7324,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f } runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler&& completion) mutable { @@ -17661,7 +17709,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb page.m_uiClient->runJavaScriptAlert(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)]() mutable { reply(); completion(); -@@ -7039,6 +7218,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&& +@@ -7167,6 +7347,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&& if (auto* automationSession = process().processPool().automationSession()) automationSession->willShowJavaScriptDialog(*this); } @@ -17670,7 +17718,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb 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 { -@@ -7062,6 +7243,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&& +@@ -7190,6 +7372,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&& if (auto* automationSession = process().processPool().automationSession()) automationSession->willShowJavaScriptDialog(*this); } @@ -17679,7 +17727,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb 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 { -@@ -7176,6 +7359,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf +@@ -7304,6 +7488,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf return; } } @@ -17688,7 +17736,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb // Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer. m_process->stopResponsivenessTimer(); -@@ -7626,6 +7811,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo, +@@ -7754,6 +7940,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo, } #if ENABLE(FULLSCREEN_API) @@ -17700,7 +17748,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb WebFullScreenManagerProxy* WebPageProxy::fullScreenManager() { return m_fullScreenManager.get(); -@@ -8546,6 +8736,8 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled) +@@ -8671,6 +8862,8 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled) if (auto* automationSession = process().processPool().automationSession()) automationSession->mouseEventsFlushedForPage(*this); didFinishProcessingAllPendingMouseEvents(); @@ -17709,7 +17757,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } break; } -@@ -8584,7 +8776,6 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled) +@@ -8709,7 +8902,6 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled) // The call to doneWithKeyEvent may close this WebPage. // Protect against this being destroyed. Ref protect(*this); @@ -17717,7 +17765,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb pageClient().doneWithKeyEvent(event, handled); if (!handled) m_uiClient->didNotHandleKeyEvent(this, event); -@@ -8593,6 +8784,7 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled) +@@ -8718,6 +8910,7 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled) if (!canProcessMoreKeyEvents) { if (auto* automationSession = process().processPool().automationSession()) automationSession->keyboardEventsFlushedForPage(*this); @@ -17725,7 +17773,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb } break; } -@@ -8946,7 +9138,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason) +@@ -9072,7 +9265,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason) { WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%" PUBLIC_LOG_STRING, processTerminationReasonToString(reason)); @@ -17737,7 +17785,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb if (m_loaderClient) handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this); else -@@ -9319,6 +9514,7 @@ bool WebPageProxy::useGPUProcessForDOMRenderingEnabled() const +@@ -9445,6 +9641,7 @@ bool WebPageProxy::useGPUProcessForDOMRenderingEnabled() const WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea, RefPtr&& websitePolicies) { @@ -17745,7 +17793,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb WebPageCreationParameters parameters; parameters.processDisplayName = configuration().processDisplayName(); -@@ -9520,6 +9716,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc +@@ -9646,6 +9843,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc parameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false; @@ -17754,7 +17802,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb #if PLATFORM(IOS) || PLATFORM(VISION) // FIXME: This is also being passed over the to WebProcess via the PreferencesStore. parameters.allowsDeprecatedSynchronousXMLHttpRequestDuringUnload = allowsDeprecatedSynchronousXMLHttpRequestDuringUnload(); -@@ -9604,8 +9802,42 @@ void WebPageProxy::gamepadActivity(const Vector>& gam +@@ -9730,8 +9929,42 @@ void WebPageProxy::gamepadActivity(const Vector>& gam #endif @@ -17797,7 +17845,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) { m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = Ref { *this }, authenticationChallenge] (bool shouldAllowLegacyTLS) { if (shouldAllowLegacyTLS) -@@ -9709,6 +9941,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge +@@ -9835,6 +10068,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge request->deny(); }; @@ -17814,7 +17862,7 @@ index 279ab83cbd781b921d30055998baad70faa8156a..186553172243117291f9773dc8db54bb // and make it one UIClient call that calls the completionHandler with false // if there is no delegate instead of returning the completionHandler diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h -index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e476dad44 100644 +index 09dc8e03ab68b452cfae3b93f20565ff0d80f5a0..0a8f50078a2f7bc965ed34e067a6d5d4a2ba5b31 100644 --- a/Source/WebKit/UIProcess/WebPageProxy.h +++ b/Source/WebKit/UIProcess/WebPageProxy.h @@ -26,6 +26,7 @@ @@ -17825,10 +17873,10 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e #include "MessageReceiver.h" #include "MessageSender.h" #include -@@ -33,6 +34,24 @@ - #include +@@ -34,6 +35,24 @@ #include #include + #include +#include "InspectorDialogAgent.h" +#include "WebProtectionSpace.h" +#include @@ -17850,7 +17898,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e namespace API { class Attachment; -@@ -93,6 +112,7 @@ class DestinationColorSpace; +@@ -94,6 +113,7 @@ class DestinationColorSpace; class DragData; class FloatPoint; class FloatQuad; @@ -17858,7 +17906,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e class FloatRect; class FloatSize; class FontAttributeChanges; -@@ -381,6 +401,7 @@ class WebExtensionController; +@@ -385,6 +405,7 @@ class WebExtensionController; class WebFramePolicyListenerProxy; class WebFrameProxy; class WebFullScreenManagerProxy; @@ -17866,7 +17914,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e class WebInspectorUIProxy; class WebKeyboardEvent; class WebMouseEvent; -@@ -576,6 +597,8 @@ public: +@@ -580,6 +601,8 @@ public: void setControlledByAutomation(bool); WebPageInspectorController& inspectorController() { return *m_inspectorController; } @@ -17875,7 +17923,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e #if PLATFORM(IOS_FAMILY) void showInspectorIndication(); -@@ -606,6 +629,7 @@ public: +@@ -614,6 +637,7 @@ public: bool hasSleepDisabler() const; #if ENABLE(FULLSCREEN_API) @@ -17883,7 +17931,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e WebFullScreenManagerProxy* fullScreenManager(); API::FullscreenClient& fullscreenClient() const { return *m_fullscreenClient; } -@@ -694,6 +718,11 @@ public: +@@ -702,6 +726,11 @@ public: void setPageLoadStateObserver(std::unique_ptr&&); @@ -17895,7 +17943,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e void initializeWebPage(); void setDrawingArea(std::unique_ptr&&); -@@ -720,6 +749,7 @@ public: +@@ -728,6 +757,7 @@ public: void addPlatformLoadParameters(WebProcessProxy&, LoadParameters&); RefPtr loadRequest(WebCore::ResourceRequest&&); RefPtr loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object* userData = nullptr); @@ -17903,7 +17951,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e RefPtr loadFile(const String& fileURL, const String& resourceDirectoryURL, bool isAppInitiated = true, API::Object* userData = nullptr); RefPtr loadData(const IPC::DataReference&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr); RefPtr loadData(const IPC::DataReference&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, WebCore::ShouldOpenExternalURLsPolicy); -@@ -1288,6 +1318,7 @@ public: +@@ -1299,6 +1329,7 @@ public: #endif void pageScaleFactorDidChange(double); @@ -17911,7 +17959,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e void pluginScaleFactorDidChange(double); void pluginZoomFactorDidChange(double); -@@ -1377,14 +1408,20 @@ public: +@@ -1389,14 +1420,20 @@ public: void didStartDrag(); void dragCancelled(); void setDragCaretRect(const WebCore::IntRect&); @@ -17925,7 +17973,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e #endif -#if PLATFORM(GTK) +#if PLATFORM(GTK) || PLATFORM(WPE) - void startDrag(WebCore::SelectionData&&, OptionSet, ShareableBitmapHandle&& dragImage, WebCore::IntPoint&& dragImageHotspot); + void startDrag(WebCore::SelectionData&&, OptionSet, std::optional&& dragImage, WebCore::IntPoint&& dragImageHotspot); #endif +#if PLATFORM(WIN) + void startDrag(WebCore::DragDataMap&& dragDataMap); @@ -17933,7 +17981,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e #endif void processDidBecomeUnresponsive(); -@@ -1601,6 +1638,7 @@ public: +@@ -1614,6 +1651,7 @@ public: void setViewportSizeForCSSViewportUnits(const WebCore::FloatSize&); WebCore::FloatSize viewportSizeForCSSViewportUnits() const; @@ -17941,7 +17989,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e void didReceiveAuthenticationChallengeProxy(Ref&&, NegotiatedLegacyTLS); void negotiatedLegacyTLS(); void didNegotiateModernTLS(const URL&); -@@ -1635,6 +1673,8 @@ public: +@@ -1648,6 +1686,8 @@ public: #if PLATFORM(COCOA) || PLATFORM(GTK) RefPtr takeViewSnapshot(std::optional&&); @@ -17950,7 +17998,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e #endif #if ENABLE(WEB_CRYPTO) -@@ -2907,8 +2947,10 @@ private: +@@ -2923,8 +2963,10 @@ private: String m_overrideContentSecurityPolicy; RefPtr m_inspector; @@ -17961,7 +18009,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e std::unique_ptr m_fullScreenManager; std::unique_ptr m_fullscreenClient; #endif -@@ -3090,6 +3132,22 @@ private: +@@ -3106,6 +3148,22 @@ private: std::optional m_currentDragOperation; bool m_currentDragIsOverFileInput { false }; unsigned m_currentDragNumberOfFilesToBeAccepted { 0 }; @@ -17984,7 +18032,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e #endif bool m_mainFrameHasHorizontalScrollbar { false }; -@@ -3257,6 +3315,10 @@ private: +@@ -3273,6 +3331,10 @@ private: RefPtr messageBody; }; Vector m_pendingInjectedBundleMessages; @@ -17996,7 +18044,7 @@ index 41b18adc02933918be11cbff5569b13f9f8f8cc1..6769f624d2f67e1442722b759a10693e #if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION) std::unique_ptr m_webDeviceOrientationUpdateProviderProxy; diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in -index 3501a297012db004b25d91c8a92d149b47a5c98d..845a929a0aa4b1af1047a0c7234feedecdaf4403 100644 +index 2531bdf69d387b180de1e9e917e493c20ad64cbd..56042234d6c5a31792c4bf7b398f13345024bf99 100644 --- a/Source/WebKit/UIProcess/WebPageProxy.messages.in +++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in @@ -29,6 +29,7 @@ messages -> WebPageProxy { @@ -18006,7 +18054,7 @@ index 3501a297012db004b25d91c8a92d149b47a5c98d..845a929a0aa4b1af1047a0c7234feede + LogToStderr(String text) DidChangeViewportProperties(struct WebCore::ViewportAttributes attributes) - DidReceiveEvent(enum:int8_t WebKit::WebEventType eventType, bool handled) + DidReceiveEvent(enum:uint8_t WebKit::WebEventType eventType, bool handled) @@ -179,6 +180,7 @@ messages -> WebPageProxy { #endif @@ -18021,7 +18069,7 @@ index 3501a297012db004b25d91c8a92d149b47a5c98d..845a929a0aa4b1af1047a0c7234feede #endif -#if PLATFORM(GTK) && ENABLE(DRAG_SUPPORT) +#if (PLATFORM(GTK) || PLATFORM(WPE)) && ENABLE(DRAG_SUPPORT) - StartDrag(WebCore::SelectionData selectionData, OptionSet dragOperationMask, WebKit::ShareableBitmap::Handle dragImage, WebCore::IntPoint dragImageHotspot) + StartDrag(WebCore::SelectionData selectionData, OptionSet dragOperationMask, std::optional dragImage, WebCore::IntPoint dragImageHotspot) #endif - +#if PLATFORM(WIN) && ENABLE(DRAG_SUPPORT) @@ -18031,7 +18079,7 @@ index 3501a297012db004b25d91c8a92d149b47a5c98d..845a929a0aa4b1af1047a0c7234feede DidPerformDragOperation(bool handled) #endif diff --git a/Source/WebKit/UIProcess/WebProcessCache.cpp b/Source/WebKit/UIProcess/WebProcessCache.cpp -index 58e39fd6df029efb3801ad914dfc96f4e6a8d8dc..7b47e3f1e08d6f974889def778fcee35b3b8ee09 100644 +index b94b04e7b3558585f49927e1e3bd370e6619bad6..c0cf985d704368bc5c1d4b8e4d556671b3d386e7 100644 --- a/Source/WebKit/UIProcess/WebProcessCache.cpp +++ b/Source/WebKit/UIProcess/WebProcessCache.cpp @@ -81,6 +81,10 @@ bool WebProcessCache::canCacheProcess(WebProcessProxy& process) const @@ -18046,7 +18094,7 @@ index 58e39fd6df029efb3801ad914dfc96f4e6a8d8dc..7b47e3f1e08d6f974889def778fcee35 } diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp -index b5b404aeacee13c1d1f08cf2be9ccd19eeae8175..ba574e9613171e0591dd6ec70ee310965a33e2c5 100644 +index 278394445e636fc68adb47ae178274e2a5dced14..0de9f2a8fb4a3327a3b53b9cf01526c0eeef1c87 100644 --- a/Source/WebKit/UIProcess/WebProcessPool.cpp +++ b/Source/WebKit/UIProcess/WebProcessPool.cpp @@ -384,10 +384,10 @@ void WebProcessPool::setAutomationClient(std::unique_ptr& @@ -18074,7 +18122,7 @@ index b5b404aeacee13c1d1f08cf2be9ccd19eeae8175..ba574e9613171e0591dd6ec70ee31096 void WebProcessPool::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled) { -@@ -542,6 +543,14 @@ void WebProcessPool::establishRemoteWorkerContextConnectionToNetworkProcess(Remo +@@ -533,6 +534,14 @@ void WebProcessPool::establishRemoteWorkerContextConnectionToNetworkProcess(Remo RefPtr requestingProcess = requestingProcessIdentifier ? WebProcessProxy::processForIdentifier(*requestingProcessIdentifier) : nullptr; WebProcessPool* processPool = requestingProcess ? &requestingProcess->processPool() : processPools()[0]; @@ -18089,7 +18137,7 @@ index b5b404aeacee13c1d1f08cf2be9ccd19eeae8175..ba574e9613171e0591dd6ec70ee31096 ASSERT(processPool); WebProcessProxy* remoteWorkerProcessProxy { nullptr }; -@@ -850,7 +859,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa +@@ -841,7 +850,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa #endif parameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel(); @@ -18099,7 +18147,7 @@ index b5b404aeacee13c1d1f08cf2be9ccd19eeae8175..ba574e9613171e0591dd6ec70ee31096 parameters.urlSchemesRegisteredAsEmptyDocument = copyToVector(m_schemesToRegisterAsEmptyDocument); diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp -index e25e43bc48460a221afc2594dcda553942def734..05033d41747ea2def5b591e156c1d98e086e8d29 100644 +index e515c6978a3b9e1d408541afa4e8b82875c7f376..b36cab14e2989a692a3f7976b0bef9d5b621f0c9 100644 --- a/Source/WebKit/UIProcess/WebProcessProxy.cpp +++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp @@ -170,6 +170,11 @@ Vector> WebProcessProxy::allProcesses() @@ -18114,7 +18162,7 @@ index e25e43bc48460a221afc2594dcda553942def734..05033d41747ea2def5b591e156c1d98e RefPtr WebProcessProxy::processForIdentifier(ProcessIdentifier identifier) { return allProcessMap().get(identifier).get(); -@@ -502,6 +507,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt +@@ -486,6 +491,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt if (WebKit::isInspectorProcessPool(processPool())) launchOptions.extraInitializationData.add("inspector-process"_s, "1"_s); @@ -18142,10 +18190,10 @@ index e25e43bc48460a221afc2594dcda553942def734..05033d41747ea2def5b591e156c1d98e if (isPrewarmed()) diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h -index f88872f19589ef5c40b4b6c40937ff280a580503..949588f6f8cf7c7f010e1f8f811bbbf6cb6c1fea 100644 +index a80bc87a48f681e0a2ab3078839ac0cf8e3b9d85..e59c287057661d594862533bf97212f2120d9e65 100644 --- a/Source/WebKit/UIProcess/WebProcessProxy.h +++ b/Source/WebKit/UIProcess/WebProcessProxy.h -@@ -163,6 +163,7 @@ public: +@@ -164,6 +164,7 @@ public: static void forWebPagesWithOrigin(PAL::SessionID, const WebCore::SecurityOriginData&, const Function&); static Vector> allowedFirstPartiesForCookies(); @@ -18154,10 +18202,10 @@ index f88872f19589ef5c40b4b6c40937ff280a580503..949588f6f8cf7c7f010e1f8f811bbbf6 WebConnection* webConnection() const { return m_webConnection.get(); } diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp -index 3fc97e96b47acf364b0fcb17bf9150567cf4f1dc..2ab6808401a9b975d48f7bd30a5215ff2b0f0551 100644 +index ff22a4dd064d2eecd549e6c44ebd34ca15492ebc..4001117d975aeeeaed5536f0c5afa36077e72a75 100644 --- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp +++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp -@@ -293,7 +293,8 @@ SOAuthorizationCoordinator& WebsiteDataStore::soAuthorizationCoordinator(const W +@@ -294,7 +294,8 @@ SOAuthorizationCoordinator& WebsiteDataStore::soAuthorizationCoordinator(const W static Ref networkProcessForSession(PAL::SessionID sessionID) { @@ -18166,8 +18214,8 @@ index 3fc97e96b47acf364b0fcb17bf9150567cf4f1dc..2ab6808401a9b975d48f7bd30a5215ff +#if ((PLATFORM(GTK) || PLATFORM(WPE))) if (sessionID.isEphemeral()) { // Reuse a previous persistent session network process for ephemeral sessions. - for (auto* dataStore : allDataStores().values()) { -@@ -2211,6 +2212,12 @@ void WebsiteDataStore::originDirectoryForTesting(WebCore::ClientOrigin&& origin, + for (auto& dataStore : allDataStores().values()) { +@@ -2216,6 +2217,12 @@ void WebsiteDataStore::originDirectoryForTesting(WebCore::ClientOrigin&& origin, protectedNetworkProcess()->websiteDataOriginDirectoryForTesting(m_sessionID, WTFMove(origin), type, WTFMove(completionHandler)); } @@ -18181,10 +18229,10 @@ index 3fc97e96b47acf364b0fcb17bf9150567cf4f1dc..2ab6808401a9b975d48f7bd30a5215ff void WebsiteDataStore::hasAppBoundSession(CompletionHandler&& completionHandler) const { diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h -index 8b2b390229d48baaadf725b6e4cf3e1313e2d2d8..7bbb2d6ad89d8dfcef6fb48c03fb951dee98f8f6 100644 +index 9fb3ac0e6abcd6732b774c7adac72c91088c4f37..1bce09f386c5541e9932f6a26cbb374d8114567c 100644 --- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h +++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h -@@ -95,6 +95,7 @@ class DeviceIdHashSaltStorage; +@@ -96,6 +96,7 @@ class DeviceIdHashSaltStorage; class DownloadProxy; class NetworkProcessProxy; class SOAuthorizationCoordinator; @@ -18192,15 +18240,15 @@ index 8b2b390229d48baaadf725b6e4cf3e1313e2d2d8..7bbb2d6ad89d8dfcef6fb48c03fb951d class VirtualAuthenticatorManager; class WebPageProxy; class WebProcessPool; -@@ -106,6 +107,7 @@ enum class UnifiedOriginStorageLevel : uint8_t; +@@ -107,6 +108,7 @@ enum class UnifiedOriginStorageLevel : uint8_t; enum class WebsiteDataFetchOption : uint8_t; enum class WebsiteDataType : uint32_t; +struct FrameInfoData; struct NetworkProcessConnectionInfo; + struct WebPushMessage; struct WebsiteDataRecord; - struct WebsiteDataStoreParameters; -@@ -116,6 +118,14 @@ enum class StorageAccessStatus : uint8_t; +@@ -118,6 +120,14 @@ enum class StorageAccessStatus : uint8_t; enum class StorageAccessPromptStatus; #endif @@ -18212,10 +18260,10 @@ index 8b2b390229d48baaadf725b6e4cf3e1313e2d2d8..7bbb2d6ad89d8dfcef6fb48c03fb951d + virtual ~DownloadInstrumentation() = default; +}; + - class WebsiteDataStore : public API::ObjectImpl, public Identified, public CanMakeWeakPtr { + class WebsiteDataStore : public API::ObjectImpl, public Identified, public CanMakeWeakPtr, public CanMakeCheckedPtr { public: static Ref defaultDataStore(); -@@ -316,11 +326,13 @@ public: +@@ -318,11 +328,13 @@ public: const WebCore::CurlProxySettings& networkProxySettings() const { return m_proxySettings; } #endif @@ -18230,7 +18278,7 @@ index 8b2b390229d48baaadf725b6e4cf3e1313e2d2d8..7bbb2d6ad89d8dfcef6fb48c03fb951d void setNetworkProxySettings(WebCore::SoupNetworkProxySettings&&); const WebCore::SoupNetworkProxySettings& networkProxySettings() const { return m_networkProxySettings; } void setCookiePersistentStorage(const String&, SoupCookiePersistentStorageType); -@@ -405,6 +417,12 @@ public: +@@ -407,6 +419,12 @@ public: static const String& defaultBaseDataDirectory(); #endif @@ -18243,7 +18291,7 @@ index 8b2b390229d48baaadf725b6e4cf3e1313e2d2d8..7bbb2d6ad89d8dfcef6fb48c03fb951d void resetQuota(CompletionHandler&&); void resetStoragePersistedState(CompletionHandler&&); #if PLATFORM(IOS_FAMILY) -@@ -560,9 +578,11 @@ private: +@@ -566,9 +584,11 @@ private: WebCore::CurlProxySettings m_proxySettings; #endif @@ -18256,7 +18304,7 @@ index 8b2b390229d48baaadf725b6e4cf3e1313e2d2d8..7bbb2d6ad89d8dfcef6fb48c03fb951d WebCore::SoupNetworkProxySettings m_networkProxySettings; String m_cookiePersistentStoragePath; SoupCookiePersistentStorageType m_cookiePersistentStorageType { SoupCookiePersistentStorageType::SQLite }; -@@ -591,6 +611,10 @@ private: +@@ -597,6 +617,10 @@ private: RefPtr m_cookieStore; RefPtr m_networkProcess; @@ -18348,10 +18396,10 @@ index db15435ed4581388a631547cdc92c092362ff84a..de45cfe0b737a0450455bafbda91887d }; diff --git a/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..da579b964f8ff0c4b4f79283a6661d7a8672c4d9 +index 0000000000000000000000000000000000000000..93de9be341045a616b0219a965af2447ecbfc926 --- /dev/null +++ b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp -@@ -0,0 +1,181 @@ +@@ -0,0 +1,184 @@ +/* + * Copyright (C) 2019 Microsoft Corporation. + * @@ -18511,23 +18559,26 @@ index 0000000000000000000000000000000000000000..da579b964f8ff0c4b4f79283a6661d7a + m_idToContext.remove(sessionID); +} + -+String InspectorPlaywrightAgentClientGlib::takePageScreenshot(WTF::String& error, WebPageProxy& page, WebCore::IntRect&& clip, bool nominalResolution) ++void InspectorPlaywrightAgentClientGlib::takePageScreenshot(WebPageProxy& page, WebCore::IntRect&& clip, bool nominalResolution, CompletionHandler&& completionHandler) +{ -+ cairo_surface_t* surface = nullptr; ++ page.callAfterNextPresentationUpdate([protectedPage = Ref{ page }, clip = WTFMove(clip), nominalResolution, completionHandler = WTFMove(completionHandler)]() mutable { ++ cairo_surface_t* surface = nullptr; +#if PLATFORM(GTK) -+ RefPtr viewSnapshot = page.pageClient().takeViewSnapshot(WTFMove(clip), nominalResolution); -+ if (viewSnapshot) -+ surface = viewSnapshot->surface(); ++ RefPtr viewSnapshot = protectedPage->pageClient().takeViewSnapshot(WTFMove(clip), nominalResolution); ++ if (viewSnapshot) ++ surface = viewSnapshot->surface(); +#elif PLATFORM(WPE) -+ RefPtr protectPtr = page.pageClient().takeViewSnapshot(WTFMove(clip), nominalResolution); -+ surface = protectPtr.get(); ++ RefPtr protectPtr = protectedPage->pageClient().takeViewSnapshot(WTFMove(clip), nominalResolution); ++ surface = protectPtr.get(); +#endif -+ if (surface) { -+ Vector encodeData = WebCore::encodeData(surface, "image/png"_s, std::nullopt); -+ return makeString("data:image/png;base64,"_s, base64Encoded(encodeData)); -+ } -+ error = "Failed to take screenshot"_s; -+ return String(); ++ if (surface) { ++ Vector encodeData = WebCore::encodeData(surface, "image/png"_s, std::nullopt); ++ completionHandler(emptyString(), makeString("data:image/png;base64,"_s, base64Encoded(encodeData))); ++ return; ++ } ++ ++ completionHandler("Failed to take screenshot"_s, emptyString()); ++ }); +} + +} // namespace WebKit @@ -18535,7 +18586,7 @@ index 0000000000000000000000000000000000000000..da579b964f8ff0c4b4f79283a6661d7a +#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..7280da5ef80c76bb34fc0a905efe70bbe5dcc3c8 +index 0000000000000000000000000000000000000000..394f07e1754be52b7d503d5720cba5d3724c5f4d --- /dev/null +++ b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.h @@ -0,0 +1,61 @@ @@ -18588,7 +18639,7 @@ index 0000000000000000000000000000000000000000..7280da5ef80c76bb34fc0a905efe70bb + void closeBrowser() override; + std::unique_ptr createBrowserContext(WTF::String& error, const WTF::String& proxyServer, const WTF::String& proxyBypassList) override; + void deleteBrowserContext(WTF::String& error, PAL::SessionID) override; -+ String takePageScreenshot(WTF::String& error, WebPageProxy&, WebCore::IntRect&& clip, bool nominalResolution) override; ++ void takePageScreenshot(WebPageProxy&, WebCore::IntRect&& clip, bool nominalResolution, CompletionHandler&& completionHandler) override; + +private: + WebKitWebContext* findContext(WTF::String& error, PAL::SessionID); @@ -18601,7 +18652,7 @@ index 0000000000000000000000000000000000000000..7280da5ef80c76bb34fc0a905efe70bb + +#endif // ENABLE(REMOTE_INSPECTOR) diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h -index 39aeff71fe05354cf63d3b3701d363642d63aca4..32e96cdd0bdbd8c5dcde43fdf60052ac13a226f7 100644 +index 71fb4cbd4338bcbda3a61019cbf4a914bf74953e..6f56e4afb345c23b4d8b91ee77f1991c72e58383 100644 --- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h +++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h @@ -28,6 +28,7 @@ @@ -18620,16 +18671,16 @@ index 39aeff71fe05354cf63d3b3701d363642d63aca4..32e96cdd0bdbd8c5dcde43fdf60052ac + virtual void realize() { }; virtual void unrealize() { }; - virtual bool makeContextCurrent() { return false; } + virtual int renderHostFileDescriptor() { return -1; } diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp -index 63b699e8944ee87f8546496aca281cf4efd78869..a1ecfb5f4467555ad3a370d23f4005678fb2f443 100644 +index 9c0f5efdfb0e3ea188fdb48e9953a79c00671df6..8bf763775887898ff160dd42813735475cb7149d 100644 --- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp +++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp -@@ -386,6 +386,25 @@ void AcceleratedBackingStoreDMABuf::Surface::paint(GtkWidget*, cairo_t* cr, cons +@@ -358,6 +358,25 @@ void AcceleratedBackingStoreDMABuf::RendererCairo::paint(GtkWidget* widget, cair } #endif -+cairo_surface_t* AcceleratedBackingStoreDMABuf::Surface::surfaceForScreencast() ++cairo_surface_t* AcceleratedBackingStoreDMABuf::RendererCairo::surfaceForScreencast() +{ + if (!m_surface) + return nullptr; @@ -18648,67 +18699,64 @@ index 63b699e8944ee87f8546496aca281cf4efd78869..a1ecfb5f4467555ad3a370d23f400567 + return m_flippedSurface.get(); +} + - void AcceleratedBackingStoreDMABuf::configure(UnixFileDescriptor&& backFD, UnixFileDescriptor&& frontFD, UnixFileDescriptor&& displayFD, const WebCore::IntSize& size, uint32_t format, uint32_t offset, uint32_t stride, uint64_t modifier) + void AcceleratedBackingStoreDMABuf::didCreateBuffer(uint64_t id, WTF::UnixFileDescriptor&& fd, const WebCore::IntSize& size, uint32_t format, uint32_t offset, uint32_t stride, uint64_t modifier) { - m_isSoftwareRast = false; -@@ -571,4 +590,13 @@ bool AcceleratedBackingStoreDMABuf::paint(cairo_t* cr, const WebCore::IntRect& c + #if USE(GBM) +@@ -520,6 +539,15 @@ bool AcceleratedBackingStoreDMABuf::paint(cairo_t* cr, const WebCore::IntRect& c } #endif +cairo_surface_t* AcceleratedBackingStoreDMABuf::surface() +{ -+ if (m_committedSource) -+ return m_committedSource->surfaceForScreencast(); ++ if (!m_renderer) ++ return nullptr; + -+ return nullptr; ++ return m_renderer->surfaceForScreencast(); +} + + } // namespace WebKit + + #endif // USE(EGL) diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h -index 1bc769ada3135a19f13851c8099ad008fcac8a04..1604833f958746b993dea0b50f16758b867ed071 100644 +index 66f42a891c7672604c0163d0b3157cbc9af7fc44..bebaa3f0bd732fbba75a158ce2b02bbd3f6d9c77 100644 --- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h +++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h -@@ -82,6 +82,7 @@ private: +@@ -86,6 +86,7 @@ private: #else bool paint(cairo_t*, const WebCore::IntRect&) override; #endif + cairo_surface_t* surface() override; - void realize() override; void unrealize() override; - bool makeContextCurrent() override; -@@ -99,6 +100,7 @@ private: + void update(const LayerTreeContext&) override; + +@@ -175,6 +176,7 @@ private: #else virtual void paint(GtkWidget*, cairo_t*, const WebCore::IntRect&) const = 0; #endif + virtual cairo_surface_t* surfaceForScreencast() = 0; - const WebCore::IntSize size() const { return m_size; } + Buffer* buffer() const { return m_buffer.get(); } -@@ -125,6 +127,7 @@ private: +@@ -199,6 +201,7 @@ private: #else void paint(GtkWidget*, cairo_t*, const WebCore::IntRect&) const override; #endif + cairo_surface_t* surfaceForScreencast() override { return nullptr; } - GRefPtr m_context; unsigned m_textureID { 0 }; -@@ -156,6 +159,7 @@ private: + #if USE(GTK4) +@@ -220,8 +223,10 @@ private: #else void paint(GtkWidget*, cairo_t*, const WebCore::IntRect&) const override; #endif + cairo_surface_t* surfaceForScreencast() override; - #if USE(GBM) - RefPtr map(struct gbm_bo*) const; -@@ -173,6 +177,7 @@ private: RefPtr m_surface; - RefPtr m_backSurface; - RefPtr m_displaySurface; + RefPtr m_flippedSurface; }; - std::unique_ptr createSource(); + GRefPtr m_gdkGLContext; diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.h index 054e80bd900cf16d69801e8102ca989ff0563e1d..8245d7ed58008dbb6152e55e619e4331d30ae674 100644 --- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.h @@ -18971,7 +19019,7 @@ index 0000000000000000000000000000000000000000..6a204c5bba8fb95ddb2d1c14cae7a3a7 + +} // namespace WebKit diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm -index a5d22fb2ded1af0b22d3633e2c0f27390883679f..3a5672f959161ed6c8c6e159bb0373791d6963a2 100644 +index a36702e99ff8212d5a4154b0880e63ad457d231b..e5efeee83c835551ed034c480061416479f1ef5d 100644 --- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm +++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm @@ -465,6 +465,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect) @@ -18983,22 +19031,9 @@ index a5d22fb2ded1af0b22d3633e2c0f27390883679f..3a5672f959161ed6c8c6e159bb037379 [contentView() _didHandleKeyEvent:event.nativeEvent() eventWasHandled:eventWasHandled]; } -diff --git a/Source/WebKit/UIProcess/mac/DisplayCaptureSessionManager.mm b/Source/WebKit/UIProcess/mac/DisplayCaptureSessionManager.mm -index b966690dded104d2d3debd5a25fa4a7ba3e5539b..ec12c90073fc3498a1fe8d78e943c57441e1c607 100644 ---- a/Source/WebKit/UIProcess/mac/DisplayCaptureSessionManager.mm -+++ b/Source/WebKit/UIProcess/mac/DisplayCaptureSessionManager.mm -@@ -245,7 +245,7 @@ void DisplayCaptureSessionManager::promptForGetDisplayMedia(UserMediaPermissionR - #elif PLATFORM(MAC) - - // There is no picker on systems without ScreenCaptureKit, so share the main screen. -- completionHandler(CGDisplayStreamScreenCaptureSource::screenCaptureDeviceForMainDisplay()); -+ completionHandler(WebCore::CGDisplayStreamScreenCaptureSource::screenCaptureDeviceForMainDisplay()); - - #endif - } diff --git a/Source/WebKit/UIProcess/mac/InspectorPlaywrightAgentClientMac.h b/Source/WebKit/UIProcess/mac/InspectorPlaywrightAgentClientMac.h new file mode 100644 -index 0000000000000000000000000000000000000000..a56c14a89afef09890174e72895733a6499543a1 +index 0000000000000000000000000000000000000000..2aabc02a4b5432f68a6e85fd9689775608f05a67 --- /dev/null +++ b/Source/WebKit/UIProcess/mac/InspectorPlaywrightAgentClientMac.h @@ -0,0 +1,53 @@ @@ -19046,7 +19081,7 @@ index 0000000000000000000000000000000000000000..a56c14a89afef09890174e72895733a6 + void closeBrowser() override; + std::unique_ptr createBrowserContext(WTF::String& error, const WTF::String& proxyServer, const WTF::String& proxyBypassList) override; + void deleteBrowserContext(WTF::String& error, PAL::SessionID) override; -+ String takePageScreenshot(WTF::String& error, WebPageProxy&, WebCore::IntRect&& clip, bool nominalResolution) override; ++ void takePageScreenshot(WebPageProxy&, WebCore::IntRect&& clip, bool nominalResolution, CompletionHandler&& completionHandler) override; + +private: + _WKBrowserInspectorDelegate* delegate_; @@ -19057,10 +19092,10 @@ index 0000000000000000000000000000000000000000..a56c14a89afef09890174e72895733a6 +} // namespace API diff --git a/Source/WebKit/UIProcess/mac/InspectorPlaywrightAgentClientMac.mm b/Source/WebKit/UIProcess/mac/InspectorPlaywrightAgentClientMac.mm new file mode 100644 -index 0000000000000000000000000000000000000000..a30d408d97c383929036626691020923f9dbfbd7 +index 0000000000000000000000000000000000000000..0de68ad69c87f9d5b0a5f0d24fb358a50b59b4a2 --- /dev/null +++ b/Source/WebKit/UIProcess/mac/InspectorPlaywrightAgentClientMac.mm -@@ -0,0 +1,94 @@ +@@ -0,0 +1,96 @@ +/* + * Copyright (C) 2019 Microsoft Corporation. + * @@ -19140,18 +19175,20 @@ index 0000000000000000000000000000000000000000..a30d408d97c383929036626691020923 + [delegate_ deleteBrowserContext:sessionID.toUInt64()]; +} + -+String InspectorPlaywrightAgentClientMac::takePageScreenshot(WTF::String& error, WebPageProxy& page, WebCore::IntRect&& clipRect, bool) ++void InspectorPlaywrightAgentClientMac::takePageScreenshot(WebPageProxy& page, WebCore::IntRect&& clipRect, bool, CompletionHandler&& completionHandler) +{ -+ RetainPtr imageRef = page.pageClient().takeSnapshotForAutomation(); -+ if (!imageRef) { -+ error = "Could not take view snapshot"_s; -+ return String(); -+ } -+ + int toolbarHeight = headless_ ? 0 : 59; -+ clipRect.move(0, toolbarHeight); -+ RetainPtr transformedImageRef = adoptCF(CGImageCreateWithImageInRect(imageRef.get(), clipRect)); -+ return WebCore::dataURL(transformedImageRef.get(), "image/png"_s, std::nullopt); ++ page.callAfterNextPresentationUpdate([protectedPage = Ref { page }, toolbarHeight, clipRect = WTFMove(clipRect), completionHandler = WTFMove(completionHandler)]() mutable { ++ RetainPtr imageRef = protectedPage->pageClient().takeSnapshotForAutomation(); ++ if (!imageRef) { ++ completionHandler("Could not take view snapshot"_s, emptyString()); ++ return; ++ } ++ ++ clipRect.move(0, toolbarHeight); ++ RetainPtr transformedImageRef = adoptCF(CGImageCreateWithImageInRect(imageRef.get(), clipRect)); ++ completionHandler(emptyString(), WebCore::dataURL(transformedImageRef.get(), "image/png"_s, std::nullopt)); ++ }); +} + +} // namespace WebKit @@ -19358,18 +19395,6 @@ index f57fbfcb950259723f5d7672198ec811491003a2..30eb73f44f4b8d2dc8888f86128b2215 return m_impl->windowIsFrontWindowUnderMouse(event.nativeEvent()); } -diff --git a/Source/WebKit/UIProcess/mac/WKImmediateActionController.h b/Source/WebKit/UIProcess/mac/WKImmediateActionController.h -index 74db97569f5179f3065f0a48dbb228777ddc6925..853d6ed84648ccb60f63ed464dddfeedfe374178 100644 ---- a/Source/WebKit/UIProcess/mac/WKImmediateActionController.h -+++ b/Source/WebKit/UIProcess/mac/WKImmediateActionController.h -@@ -31,6 +31,7 @@ - #import "WKImmediateActionTypes.h" - #import "WebHitTestResultData.h" - #import -+#import - #import - #import - #import diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h index 46aaf12accb35a2e7685d61887e76f0fe14d76c5..37f418197dcc3f6c74fac258ba77d00df0effeb2 100644 --- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h @@ -19600,26 +19625,10 @@ index a8284990329d56c79fb17debafe17a39a6a60301..b8ce65526d3eb35816d9c3bae913983c void saveBackForwardSnapshotForCurrentItem(); void saveBackForwardSnapshotForItem(WebBackForwardListItem&); diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.mm b/Source/WebKit/UIProcess/mac/WebViewImpl.mm -index b2ae8d81e2f7a92ffb317614a31052a119888b22..b0fcdf6b5cb584c6746c40cc2733b6b70c6dcdcf 100644 +index bddd6c9c1fb39f22b6ff733135de4a2df425a4bd..7f7b2f825c67eb50666c913f9a45db12880928ca 100644 --- a/Source/WebKit/UIProcess/mac/WebViewImpl.mm +++ b/Source/WebKit/UIProcess/mac/WebViewImpl.mm -@@ -87,6 +87,7 @@ - #import - #import - #import -+#import - #import - #import - #import -@@ -104,6 +105,7 @@ - #import - #import - #import -+#import - #import - #import - #import -@@ -2340,6 +2342,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace() +@@ -2342,6 +2342,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace() if (!m_colorSpace) m_colorSpace = [NSColorSpace sRGBColorSpace]; } @@ -19631,7 +19640,7 @@ index b2ae8d81e2f7a92ffb317614a31052a119888b22..b0fcdf6b5cb584c6746c40cc2733b6b7 ASSERT(m_colorSpace); return WebCore::DestinationColorSpace { [m_colorSpace CGColorSpace] }; -@@ -4406,6 +4413,18 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN +@@ -4408,6 +4413,18 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN ALLOW_DEPRECATED_DECLARATIONS_END } @@ -19650,65 +19659,6 @@ index b2ae8d81e2f7a92ffb317614a31052a119888b22..b0fcdf6b5cb584c6746c40cc2733b6b7 RefPtr WebViewImpl::takeViewSnapshot() { NSWindow *window = [m_view window]; -@@ -5002,11 +5021,11 @@ static Vector compositionHighlights(NSAttributedS - Vector highlights; - [string enumerateAttributesInRange:NSMakeRange(0, string.length) options:0 usingBlock:[&highlights](NSDictionary *attributes, NSRange range, BOOL *) { - std::optional backgroundHighlightColor; -- if (CocoaColor *backgroundColor = attributes[NSBackgroundColorAttributeName]) -+ if (WebCore::CocoaColor *backgroundColor = attributes[NSBackgroundColorAttributeName]) - backgroundHighlightColor = WebCore::colorFromCocoaColor(backgroundColor); - - std::optional foregroundHighlightColor; -- if (CocoaColor *foregroundColor = attributes[NSForegroundColorAttributeName]) -+ if (WebCore::CocoaColor *foregroundColor = attributes[NSForegroundColorAttributeName]) - foregroundHighlightColor = WebCore::colorFromCocoaColor(foregroundColor); - - highlights.append({ static_cast(range.location), static_cast(NSMaxRange(range)), backgroundHighlightColor, foregroundHighlightColor }); -@@ -5098,7 +5117,7 @@ static Vector compositionUnderlines(NSAttributedS - return mergedUnderlines; - } - --static HashMap> compositionAnnotations(NSAttributedString *string) -+static HashMap> compositionAnnotations(NSAttributedString *string) - { - if (!string.length) - return { }; -@@ -5111,7 +5130,7 @@ static HashMap> compositionAnnotations(NSAttribut - }); - #endif - -- HashMap> annotations; -+ HashMap> annotations; - [string enumerateAttributesInRange:NSMakeRange(0, string.length) options:0 usingBlock:[&annotations](NSDictionary *attributes, NSRange range, BOOL *) { - [attributes enumerateKeysAndObjectsUsingBlock:[&annotations, &range](NSAttributedStringKey key, id value, BOOL *) { - -@@ -5120,7 +5139,7 @@ static HashMap> compositionAnnotations(NSAttribut - - auto it = annotations.find(key); - if (it == annotations.end()) -- it = annotations.add(key, Vector { }).iterator; -+ it = annotations.add(key, Vector { }).iterator; - auto& vector = it->value; - - // Coalesce this range into the previous one if possible -@@ -5147,7 +5166,7 @@ void WebViewImpl::setMarkedText(id string, NSRange selectedRange, NSRange replac - - Vector underlines; - Vector highlights; -- HashMap> annotations; -+ HashMap> annotations; - NSString *text; - - if (isAttributedString) { -@@ -6011,7 +6030,7 @@ void WebViewImpl::updateMediaPlaybackControlsManager() - [m_playbackControlsManager setCanTogglePictureInPicture:NO]; - } - -- if (PlatformPlaybackSessionInterface* interface = m_page->playbackSessionManager()->controlsManagerInterface()) { -+ if (WebCore::PlatformPlaybackSessionInterface* interface = m_page->playbackSessionManager()->controlsManagerInterface()) { - [m_playbackControlsManager setPlaybackSessionInterfaceMac:interface]; - interface->updatePlaybackControlsManagerCanTogglePictureInPicture(); - } diff --git a/Source/WebKit/UIProcess/win/InspectorPlaywrightAgentClientWin.cpp b/Source/WebKit/UIProcess/win/InspectorPlaywrightAgentClientWin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dd7fe0604188bb025f361f1c44685e38bbf935ca @@ -20469,10 +20419,10 @@ index 0000000000000000000000000000000000000000..a7d88f8c745f95af21db71dcfce368ba + +} // namespace WebKit diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj -index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852cf7f5457 100644 +index 3a3aaeb4f7cdef3eb62623c7c47442dfc0a01a73..bc1c7a054afa8db531f617c8db1a6ad170621743 100644 --- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj +++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj -@@ -1350,6 +1350,7 @@ +@@ -1384,6 +1384,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 */; }; @@ -20480,7 +20430,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 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 */; }; -@@ -2109,6 +2110,18 @@ +@@ -2162,6 +2163,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 */; }; @@ -20499,7 +20449,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 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, ); }; }; -@@ -2174,6 +2187,8 @@ +@@ -2227,6 +2240,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 */; }; @@ -20508,7 +20458,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 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 */; }; -@@ -2192,6 +2207,9 @@ +@@ -2245,6 +2260,9 @@ EBA8D3B627A5E33F00CB7900 /* MockPushServiceConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = EBA8D3B027A5E33F00CB7900 /* MockPushServiceConnection.mm */; }; EBA8D3B727A5E33F00CB7900 /* PushServiceConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = EBA8D3B127A5E33F00CB7900 /* PushServiceConnection.mm */; }; ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -20516,9 +20466,9 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 + F33C7AC7249AD79C0018BE41 /* libwebrtc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F33C7AC6249AD79C0018BE41 /* libwebrtc.dylib */; }; + 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, ); }; }; - F4299507270E234D0032298B /* StreamMessageReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = F4299506270E234C0032298B /* StreamMessageReceiver.h */; }; - F42D634122A0EFDF00D2FB3A /* WebAutocorrectionData.h in Headers */ = {isa = PBXBuildFile; fileRef = F42D633F22A0EFD300D2FB3A /* WebAutocorrectionData.h */; }; -@@ -5459,6 +5477,7 @@ + F40C3B712AB401C5007A3567 /* WKDatePickerPopoverController.h in Headers */ = {isa = PBXBuildFile; fileRef = F40C3B6F2AB40167007A3567 /* WKDatePickerPopoverController.h */; }; + F41795A62AC61B78007F5F12 /* CompactContextMenuPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = F41795A42AC619A2007F5F12 /* CompactContextMenuPresenter.h */; }; +@@ -5641,6 +5659,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 = ""; }; 5CADDE0D2151AA010067D309 /* AuthenticationChallengeDisposition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallengeDisposition.h; sourceTree = ""; }; @@ -20526,7 +20476,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 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 = ""; }; -@@ -7058,6 +7077,19 @@ +@@ -7255,6 +7274,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 = ""; }; @@ -20546,7 +20496,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 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 = ""; }; -@@ -7193,6 +7225,8 @@ +@@ -7390,6 +7422,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 = ""; }; @@ -20555,7 +20505,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 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 = ""; }; -@@ -7216,6 +7250,14 @@ +@@ -7412,6 +7446,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 = ""; }; @@ -20568,9 +20518,9 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 + F3867F0424607D2B008F0F31 /* InspectorScreencastAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorScreencastAgent.h; sourceTree = ""; }; + F3970344249BD4CE003E1A22 /* ScreencastEncoderMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScreencastEncoderMac.mm; sourceTree = ""; }; F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDragDestinationAction.h; sourceTree = ""; }; - F40D1B68220BDC0F00B49A01 /* WebAutocorrectionContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebAutocorrectionContext.h; path = ios/WebAutocorrectionContext.h; sourceTree = ""; }; - F41056612130699A0092281D /* APIAttachmentCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = APIAttachmentCocoa.mm; sourceTree = ""; }; -@@ -7390,6 +7432,7 @@ + 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 = ""; }; +@@ -7653,6 +7695,7 @@ 3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */, 3766F9F1189A1254003CF19B /* libicucore.dylib in Frameworks */, 7B9FC5BB28A5233B007570E7 /* libWebKitPlatform.a in Frameworks */, @@ -20578,7 +20528,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */, 37694525184FC6B600CDE21F /* Security.framework in Frameworks */, 37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */, -@@ -9911,6 +9954,7 @@ +@@ -10221,6 +10264,7 @@ 99788ACA1F421DCA00C08000 /* _WKAutomationSessionConfiguration.mm */, 990D28A81C6404B000986977 /* _WKAutomationSessionDelegate.h */, 990D28AF1C65203900986977 /* _WKAutomationSessionInternal.h */, @@ -20586,7 +20536,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 5C4609E222430E4C009943C2 /* _WKContentRuleListAction.h */, 5C4609E322430E4D009943C2 /* _WKContentRuleListAction.mm */, 5C4609E422430E4D009943C2 /* _WKContentRuleListActionInternal.h */, -@@ -11062,6 +11106,7 @@ +@@ -11382,6 +11426,7 @@ E34B110C27C46BC6006D2F2E /* libWebCoreTestShim.dylib */, E34B110F27C46D09006D2F2E /* libWebCoreTestSupport.dylib */, DDE992F4278D06D900F60D26 /* libWebKitAdditions.a */, @@ -20594,7 +20544,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 57A9FF15252C6AEF006A2040 /* libWTF.a */, 5750F32A2032D4E500389347 /* LocalAuthentication.framework */, 570DAAB0230273D200E8FC04 /* NearField.framework */, -@@ -11601,6 +11646,12 @@ +@@ -11941,6 +11986,12 @@ children = ( 9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */, 9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */, @@ -20607,7 +20557,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 ); path = Agents; sourceTree = ""; -@@ -11609,6 +11660,7 @@ +@@ -11949,6 +12000,7 @@ isa = PBXGroup; children = ( A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorUIProxyMac.mm */, @@ -20615,15 +20565,15 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 1CA8B935127C774E00576C2B /* WebInspectorUIProxyMac.mm */, 99A7ACE326012919006D57FD /* WKInspectorResourceURLSchemeHandler.h */, 99A7ACE42601291A006D57FD /* WKInspectorResourceURLSchemeHandler.mm */, -@@ -12214,6 +12266,7 @@ +@@ -12569,6 +12621,7 @@ E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */, 46A2B6061E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.cpp */, 46A2B6071E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.h */, + D71A944B237239FB002C4D9E /* BrowserInspectorPipe.h */, + 5C6D69352AC3935D0099BDAF /* BrowsingContextGroup.cpp */, + 5C6D69362AC3935D0099BDAF /* BrowsingContextGroup.h */, 07297F9C1C1711EA003F0735 /* DeviceIdHashSaltStorage.cpp */, - 07297F9D1C17BBEA223F0735 /* DeviceIdHashSaltStorage.h */, - BC2652121182608100243E12 /* DrawingAreaProxy.cpp */, -@@ -12229,6 +12282,8 @@ +@@ -12590,6 +12643,8 @@ 2DD5A72A1EBF09A7009BA597 /* HiddenPageThrottlingAutoIncreasesCounter.h */, 839A2F2F1E2067390039057E /* HighPerformanceGraphicsUsageSampler.cpp */, 839A2F301E2067390039057E /* HighPerformanceGraphicsUsageSampler.h */, @@ -20632,7 +20582,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 5CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */, 5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */, 31607F3819627002009B87DA /* LegacySessionStateCoding.h */, -@@ -12263,6 +12318,7 @@ +@@ -12624,6 +12679,7 @@ 1A0C227D2451130A00ED614D /* QuickLookThumbnailingSoftLink.mm */, 1AEE57232409F142002005D6 /* QuickLookThumbnailLoader.h */, 1AEE57242409F142002005D6 /* QuickLookThumbnailLoader.mm */, @@ -20640,7 +20590,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 5CCB54DC2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.cpp */, 5CCB54DB2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.h */, 5C907E9A294D507100B3402D /* RemotePageProxy.cpp */, -@@ -12368,6 +12424,8 @@ +@@ -12729,6 +12785,8 @@ BC7B6204129A0A6700D174A4 /* WebPageGroup.h */, 2D9EA3101A96D9EB002D2807 /* WebPageInjectedBundleClient.cpp */, 2D9EA30E1A96CBFF002D2807 /* WebPageInjectedBundleClient.h */, @@ -20649,7 +20599,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 BC111B0B112F5E4F00337BAB /* WebPageProxy.cpp */, BC032DCB10F4389F0058C15A /* WebPageProxy.h */, BCBD38FA125BAB9A00D2C29F /* WebPageProxy.messages.in */, -@@ -12530,6 +12588,7 @@ +@@ -12891,6 +12949,7 @@ BC646C1911DD399F006455B0 /* WKBackForwardListItemRef.h */, BC646C1611DD399F006455B0 /* WKBackForwardListRef.cpp */, BC646C1711DD399F006455B0 /* WKBackForwardListRef.h */, @@ -20657,8 +20607,8 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 BCB9E24A1120E15C00A137E0 /* WKContext.cpp */, BCB9E2491120E15C00A137E0 /* WKContext.h */, 1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */, -@@ -13109,6 +13168,9 @@ - 0F49294628FF0F4B00AF8509 /* DisplayLinkProcessProxyClient.h */, +@@ -13465,6 +13524,9 @@ + 7AFA6F682A9F57C50055322A /* DisplayLinkMac.cpp */, 31ABA79C215AF9E000C90E31 /* HighPerformanceGPUManager.h */, 31ABA79D215AF9E000C90E31 /* HighPerformanceGPUManager.mm */, + D71A94302370E025002C4D9E /* InspectorPlaywrightAgentClientMac.h */, @@ -20667,7 +20617,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 1AFDE65B1954E8D500C48FFA /* LegacySessionStateCoding.cpp */, 0FCB4E5818BBE3D9000FCFC9 /* PageClientImplMac.h */, 0FCB4E5918BBE3D9000FCFC9 /* PageClientImplMac.mm */, -@@ -13132,6 +13194,8 @@ +@@ -13488,6 +13550,8 @@ E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */, E55CD20124D09F1F0042DB9C /* WebDateTimePickerMac.h */, E55CD20224D09F1F0042DB9C /* WebDateTimePickerMac.mm */, @@ -20676,7 +20626,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */, BC5750951268F3C6006F0F12 /* WebPopupMenuProxyMac.h */, BC5750961268F3C6006F0F12 /* WebPopupMenuProxyMac.mm */, -@@ -14055,6 +14119,7 @@ +@@ -14431,6 +14495,7 @@ 99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */, 990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */, 990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */, @@ -20684,7 +20634,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 5C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */, 5C4609E8224317BB009943C2 /* _WKContentRuleListActionInternal.h in Headers */, 1A5704F81BE01FF400874AF1 /* _WKContextMenuElementInfo.h in Headers */, -@@ -14330,6 +14395,7 @@ +@@ -14711,6 +14776,7 @@ E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */, 4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */, 1A5705111BE410E600874AF1 /* BlockSPI.h in Headers */, @@ -20692,7 +20642,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 BC3065FA1259344E00E71278 /* CacheModel.h in Headers */, 935BF7FC2936BF1A00B41326 /* CacheStorageCache.h in Headers */, 934CF817294B884C00304F7D /* CacheStorageDiskStore.h in Headers */, -@@ -14465,7 +14531,11 @@ +@@ -14846,7 +14912,11 @@ BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */, CE550E152283752200D28791 /* InsertTextOptions.h in Headers */, 9197940523DBC4BB00257892 /* InspectorBrowserAgent.h in Headers */, @@ -20704,7 +20654,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 A5E391FD2183C1F800C8FB31 /* InspectorTargetProxy.h in Headers */, C5BCE5DF1C50766A00CDE3FA /* InteractionInformationAtPosition.h in Headers */, 2D4D2C811DF60BF3002EB10C /* InteractionInformationRequest.h in Headers */, -@@ -14693,6 +14763,7 @@ +@@ -15078,6 +15148,7 @@ CDAC20CA23FC2F750021DEE3 /* RemoteCDMInstanceSession.h in Headers */, CDAC20C923FC2F750021DEE3 /* RemoteCDMInstanceSessionIdentifier.h in Headers */, F451C0FE2703B263002BA03B /* RemoteDisplayListRecorderProxy.h in Headers */, @@ -20712,7 +20662,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */, 2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */, 1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */, -@@ -14744,6 +14815,7 @@ +@@ -15129,6 +15200,7 @@ E1E552C516AE065F004ED653 /* SandboxInitializationParameters.h in Headers */, E36FF00327F36FBD004BE21A /* SandboxStateVariables.h in Headers */, 7BAB111025DD02B3008FC479 /* ScopedActiveMessageReceiveQueue.h in Headers */, @@ -20720,7 +20670,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 E4D54D0421F1D72D007E3C36 /* ScrollingTreeFrameScrollingNodeRemoteIOS.h in Headers */, 0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */, 0F931C1C18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h in Headers */, -@@ -15041,6 +15113,8 @@ +@@ -15439,6 +15511,8 @@ 939EF87029D112EE00F23AEE /* WebPageInlines.h in Headers */, 9197940823DBC4CB00257892 /* WebPageInspectorAgentBase.h in Headers */, A513F5402154A5D700662841 /* WebPageInspectorController.h in Headers */, @@ -20729,7 +20679,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 A543E30C215C8A8D00279CD9 /* WebPageInspectorTarget.h in Headers */, A543E30D215C8A9000279CD9 /* WebPageInspectorTargetController.h in Headers */, A543E307215AD13700279CD9 /* WebPageInspectorTargetFrontendChannel.h in Headers */, -@@ -17095,6 +17169,8 @@ +@@ -17647,6 +17721,8 @@ 522F792928D50EBB0069B45B /* HidService.mm in Sources */, 2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */, 2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */, @@ -20738,7 +20688,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 1C2B4D4B2A819D0D00C528A1 /* JSWebExtensionAPIAlarms.mm in Sources */, B6114A7F29394A1600380B1B /* JSWebExtensionAPIEvent.mm in Sources */, 1C5DC471290B33A20061EC62 /* JSWebExtensionAPIExtension.mm in Sources */, -@@ -17473,6 +17549,8 @@ +@@ -18036,6 +18112,8 @@ E3816B3D27E2463A005EAFC0 /* WebMockContentFilterManager.cpp in Sources */, 31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */, 2DF6FE52212E110900469030 /* WebPage.cpp in Sources */, @@ -20748,7 +20698,7 @@ index 4d2b0f95ee9155c2609dde955b557a9ab470ff24..b577c3453e36f94e9b7919db453b7852 BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */, 7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */, diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp -index 96ca9aa77753f7ca5684185cfe0c6c61b4fa778d..93a415117af807fa7048a7a6e2e602839176af3b 100644 +index dead79df15381da7b12e6195b3617dc470bb6209..325fe0755e3cb1c31e6e4bfad54a4e2b3ee8daaa 100644 --- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp +++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp @@ -237,6 +237,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou @@ -20877,10 +20827,10 @@ index 96ca9aa77753f7ca5684185cfe0c6c61b4fa778d..93a415117af807fa7048a7a6e2e60283 { 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 3a3e596fa167fadaf36cfafdf8fd91dd0d7c8a8e..a6a305585706f9a407375fd2e365c52bcb1b8a43 100644 +index 9c7b0d517fe931f248039a6084b517c224823fd4..bb74ca5c7479a84aeb83ebfe9eefe65ddcfc81cb 100644 --- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h +++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h -@@ -41,6 +41,7 @@ struct FetchOptions; +@@ -42,6 +42,7 @@ struct FetchOptions; namespace WebKit { class NetworkProcessConnection; @@ -20888,7 +20838,7 @@ index 3a3e596fa167fadaf36cfafdf8fd91dd0d7c8a8e..a6a305585706f9a407375fd2e365c52b class WebFrame; class WebPage; class WebURLSchemeTaskProxy; -@@ -88,6 +89,9 @@ public: +@@ -89,6 +90,9 @@ public: bool isOnLine() const final; void addOnlineStateChangeListener(Function&&) final; void setOnLineState(bool); @@ -20898,7 +20848,7 @@ index 3a3e596fa167fadaf36cfafdf8fd91dd0d7c8a8e..a6a305585706f9a407375fd2e365c52b void setExistingNetworkResourceLoadIdentifierToResume(std::optional existingNetworkResourceLoadIdentifierToResume) { m_existingNetworkResourceLoadIdentifierToResume = existingNetworkResourceLoadIdentifierToResume; } -@@ -140,6 +144,7 @@ private: +@@ -141,6 +145,7 @@ private: Vector> m_onlineStateChangeListeners; std::optional m_existingNetworkResourceLoadIdentifierToResume; bool m_isOnLine { true }; @@ -20943,18 +20893,18 @@ index ee9c3c4f48c328daaa015e2122235e51349bd999..5b3a4d3e742147195e0ff9e88176759d auto permissionHandlers = m_requestsPerOrigin.take(securityOrigin); diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp -index 888dc9b6f2edb6347901611bc9cd4622b4b0a08a..3bf71068c4a17cf8fb165f32cb39b6b324a407b2 100644 +index 9514de26d42a2fe4935c392213db2eb13d11ea2b..0300f932059a1b574e60397f4e510de2414dc7fa 100644 --- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp +++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp -@@ -425,6 +425,8 @@ void WebChromeClient::setResizable(bool resizable) - - void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) +@@ -437,6 +437,8 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev { -+ if (level == MessageLevel::Error) -+ m_page.send(Messages::WebPageProxy::LogToStderr(message)); // Notify the bundle client. - m_page.injectedBundleUIClient().willAddMessageToConsole(&m_page, source, level, message, lineNumber, columnNumber, sourceID); + auto page = protectedPage(); ++ if (level == MessageLevel::Error) ++ page->send(Messages::WebPageProxy::LogToStderr(message)); + page->injectedBundleUIClient().willAddMessageToConsole(page.ptr(), source, level, message, lineNumber, columnNumber, sourceID); } + diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp index 87121e8b57e5ad7ef74857685f0db65e164a5bf8..580dca6ca0709a2d620d3999beb69856981a54e8 100644 --- a/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp @@ -20983,10 +20933,10 @@ index 87121e8b57e5ad7ef74857685f0db65e164a5bf8..580dca6ca0709a2d620d3999beb69856 { } diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp -index 38d6259743caae4f32be376a8f54194d80571885..8a221e35850842113070ebf8da570ba6cdcdea1b 100644 +index 9c27ea6ed43608c07cf17d8f76f10db802404ae0..a1cf6f75abd6f4dc05dbc0f0e3485c305809fd69 100644 --- a/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp +++ b/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp -@@ -1548,14 +1548,6 @@ void WebLocalFrameLoaderClient::transitionToCommittedForNewPage() +@@ -1540,14 +1540,6 @@ void WebLocalFrameLoaderClient::transitionToCommittedForNewPage() if (webPage->scrollPinningBehavior() != ScrollPinningBehavior::DoNotPin) view->setScrollPinningBehavior(webPage->scrollPinningBehavior()); @@ -21082,10 +21032,10 @@ index 0000000000000000000000000000000000000000..ba14bf43794ef03a4b090135631a8f7f +#endif // ENABLE(DRAG_SUPPORT) diff --git a/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cpp b/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cpp new file mode 100644 -index 0000000000000000000000000000000000000000..ddc4b5e736252135a63d5787065c20fa35a764a6 +index 0000000000000000000000000000000000000000..dd5a7c8d64fda2abb888cfad417f6325b7e7bf78 --- /dev/null +++ b/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cpp -@@ -0,0 +1,58 @@ +@@ -0,0 +1,59 @@ +/* + * Copyright (C) 2011 Igalia S.L. + * @@ -21118,6 +21068,7 @@ index 0000000000000000000000000000000000000000..ddc4b5e736252135a63d5787065c20fa + +#include "ArgumentCodersWPE.h" +#include "ShareableBitmap.h" ++#include "ShareableBitmapHandle.h" +#include "WebPage.h" +#include "WebPageProxyMessages.h" +#include @@ -21137,7 +21088,7 @@ index 0000000000000000000000000000000000000000..ddc4b5e736252135a63d5787065c20fa +{ + m_page->willStartDrag(); + -+ ShareableBitmapHandle handle; ++ std::optional handle; + m_page->send(Messages::WebPageProxy::StartDrag(dataTransfer.pasteboard().selectionData(), dataTransfer.sourceOperationMask(), WTFMove(handle), dataTransfer.dragLocation())); +} + @@ -21145,10 +21096,10 @@ index 0000000000000000000000000000000000000000..ddc4b5e736252135a63d5787065c20fa + +#endif // ENABLE(DRAG_SUPPORT) diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp -index 703e35bdff1dd1ac1c603fb17ba161b23f258225..eb04eff245fbfab332b6b720feb7e04e43ec53e2 100644 +index 600e8fe1ae52b0c5b1ee1826dc858b1666d9cc07..3b4583e76102070e19b114c8e48bd90cb8339f5a 100644 --- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp +++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp -@@ -39,6 +39,7 @@ +@@ -40,6 +40,7 @@ #include "WebPreferencesKeys.h" #include "WebProcess.h" #include @@ -21156,7 +21107,7 @@ index 703e35bdff1dd1ac1c603fb17ba161b23f258225..eb04eff245fbfab332b6b720feb7e04e #include #include #include -@@ -114,6 +115,16 @@ void DrawingAreaCoordinatedGraphics::scroll(const IntRect& scrollRect, const Int +@@ -109,6 +110,16 @@ void DrawingAreaCoordinatedGraphics::scroll(const IntRect& scrollRect, const Int ASSERT(m_scrollRect.isEmpty()); ASSERT(m_scrollOffset.isEmpty()); ASSERT(m_dirtyRegion.isEmpty()); @@ -21173,7 +21124,7 @@ index 703e35bdff1dd1ac1c603fb17ba161b23f258225..eb04eff245fbfab332b6b720feb7e04e m_layerTreeHost->scrollNonCompositedContents(scrollRect); return; } -@@ -241,6 +252,7 @@ void DrawingAreaCoordinatedGraphics::updatePreferences(const WebPreferencesStore +@@ -236,6 +247,7 @@ void DrawingAreaCoordinatedGraphics::updatePreferences(const WebPreferencesStore settings.setAcceleratedCompositingEnabled(false); } #endif @@ -21181,7 +21132,7 @@ index 703e35bdff1dd1ac1c603fb17ba161b23f258225..eb04eff245fbfab332b6b720feb7e04e settings.setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey())); // Fixed position elements need to be composited and create stacking contexts // in order to be scrolled by the ScrollingCoordinator. -@@ -618,6 +630,11 @@ void DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode(GraphicsLay +@@ -635,6 +647,11 @@ void DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode(GraphicsLay m_scrollOffset = IntSize(); m_displayTimer.stop(); m_isWaitingForDidUpdate = false; @@ -21193,7 +21144,7 @@ index 703e35bdff1dd1ac1c603fb17ba161b23f258225..eb04eff245fbfab332b6b720feb7e04e } void DrawingAreaCoordinatedGraphics::sendEnterAcceleratedCompositingModeIfNeeded() -@@ -677,6 +694,11 @@ void DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode() +@@ -696,6 +713,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))); } @@ -21206,10 +21157,10 @@ index 703e35bdff1dd1ac1c603fb17ba161b23f258225..eb04eff245fbfab332b6b720feb7e04e void DrawingAreaCoordinatedGraphics::scheduleDisplay() diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp -index 063deca3282a25c46dda53769673aeab501390e1..e6c462d6b21340bd7992e168e09f5fdbcea34c88 100644 +index 0b5c370117f2afbbd17132462c4a67738f9751ff..192a19e8d4da8f6b11135f06e147d2a6f5abcebc 100644 --- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp +++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp -@@ -187,8 +187,16 @@ void LayerTreeHost::setViewOverlayRootLayer(GraphicsLayer* viewOverlayRootLayer) +@@ -209,8 +209,16 @@ void LayerTreeHost::setViewOverlayRootLayer(GraphicsLayer* viewOverlayRootLayer) void LayerTreeHost::scrollNonCompositedContents(const IntRect& rect) { auto* frameView = m_webPage.localMainFrameView(); @@ -21226,7 +21177,7 @@ index 063deca3282a25c46dda53769673aeab501390e1..e6c462d6b21340bd7992e168e09f5fdb m_viewportController.didScroll(rect.location()); if (m_isDiscardable) -@@ -325,6 +333,10 @@ void LayerTreeHost::didChangeViewport() +@@ -349,6 +357,10 @@ void LayerTreeHost::didChangeViewport() if (!view->useFixedLayout()) view->notifyScrollPositionChanged(m_lastScrollPosition); @@ -21238,10 +21189,10 @@ index 063deca3282a25c46dda53769673aeab501390e1..e6c462d6b21340bd7992e168e09f5fdb if (m_lastPageScaleFactor != pageScale) { diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h -index 6749e66ac5f8cc7968595365beff19cfdee7861f..7a222444342eb1255bd2744d6647993ad3345e5c 100644 +index 507dd0fcac6cf81a355532cc37004d161f03e8a3..a2b2690120f6f8f01f8ce2cbc2a2d7e01b1637fe 100644 --- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h +++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h -@@ -103,6 +103,13 @@ public: +@@ -116,6 +116,13 @@ public: void adjustTransientZoom(double, WebCore::FloatPoint); void commitTransientZoom(double, WebCore::FloatPoint); #endif @@ -21282,12 +21233,12 @@ index 30c1f55828df6bf4e48543cc3347dde1ee41e10f..e71997ca8292530c5c01ce141443ad42 { if (m_hasRemovedMessageReceiver) diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.h b/Source/WebKit/WebProcess/WebPage/DrawingArea.h -index 0a7b4194c982a5ce21c1f3e7da2a6c174bbf2954..6c8dc22966ed0d457622698f1c2f4079f183025f 100644 +index 4f80d0ea4ad74216239024a49b1d7f94d7a03371..8f8e6094eba5c8742aa3d6733de56f8dfea53a3e 100644 --- a/Source/WebKit/WebProcess/WebPage/DrawingArea.h +++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.h -@@ -169,6 +169,9 @@ public: - virtual void didChangeViewportAttributes(WebCore::ViewportAttributes&&) = 0; +@@ -167,6 +167,9 @@ public: virtual void deviceOrPageScaleFactorChanged() = 0; + virtual bool enterAcceleratedCompositingModeIfNeeded() = 0; #endif +#if PLATFORM(WIN) + void didChangeAcceleratedCompositingMode(bool enabled); @@ -21296,10 +21247,10 @@ index 0a7b4194c982a5ce21c1f3e7da2a6c174bbf2954..6c8dc22966ed0d457622698f1c2f4079 virtual void adoptLayersFromDrawingArea(DrawingArea&) { } virtual void adoptDisplayRefreshMonitorsFromDrawingArea(DrawingArea&) { } diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp -index a920f9ced33557bc3aac077f7c81574f77ced97b..0badffab778609cf5636594caeac4c03e3a446d1 100644 +index 40b7ce31237d9de6a149c1d685c03634e44f8de6..85527188ef7b085d16a526fbed249a17d5c48230 100644 --- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp +++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp -@@ -41,6 +41,7 @@ +@@ -43,6 +43,7 @@ #include #include #include @@ -21307,7 +21258,7 @@ index a920f9ced33557bc3aac077f7c81574f77ced97b..0badffab778609cf5636594caeac4c03 #include #include #include -@@ -349,4 +350,10 @@ void WebCookieJar::removeChangeListener(const String& host, const WebCore::Cooki +@@ -353,4 +354,10 @@ void WebCookieJar::removeChangeListener(const String& host, const WebCore::Cooki } #endif @@ -21332,7 +21283,7 @@ index 2aebbbd13594712f8cb3cd1de16da6818bbf4706..125d77abfafe41c2a49568f02a7cde6e WebCookieJar(); diff --git a/Source/WebKit/WebProcess/WebPage/WebDocumentLoader.cpp b/Source/WebKit/WebProcess/WebPage/WebDocumentLoader.cpp -index 7fbf65c821f3c4fddea9ca7dc88f5968fdd7a744..ebd73ea59effe391210552c3d5e0e769043e9dc0 100644 +index 005edbd861f90edeb6188ad3a066472469f1d694..2a89e26092a08eaadec35b6ee640484fa989eef2 100644 --- a/Source/WebKit/WebProcess/WebPage/WebDocumentLoader.cpp +++ b/Source/WebKit/WebProcess/WebPage/WebDocumentLoader.cpp @@ -46,6 +46,14 @@ void WebDocumentLoader::detachFromFrame() @@ -21374,10 +21325,10 @@ index 04efd703491f1c32009c066a84647d7dda3d79ce..473fa1b3a7b7ccf375bfe26f528417d4 uint64_t m_navigationID { 0 }; }; diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp -index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a101d65ebc9 100644 +index c724f61d2449b195326cacf8119e9da8133d8772..567a4b06bf858e78a1ade2a17e76dce3b1af615c 100644 --- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp -@@ -1039,6 +1039,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) +@@ -1046,6 +1046,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) #endif #endif // HAVE(SANDBOX_STATE_FLAGS) @@ -21387,7 +21338,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 updateThrottleState(); #if ENABLE(ACCESSIBILITY_ANIMATION_CONTROL) updateImageAnimationEnabled(); -@@ -1884,6 +1887,22 @@ void WebPage::transitionFrameToLocal(LocalFrameCreationParameters&& creationPara +@@ -1896,6 +1899,22 @@ void WebPage::transitionFrameToLocal(LocalFrameCreationParameters&& creationPara frame->transitionToLocal(creationParameters.layerHostingContextIdentifier); } @@ -21410,7 +21361,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 void WebPage::loadRequest(LoadParameters&& loadParameters) { WEBPAGE_RELEASE_LOG(Loading, "loadRequest: navigationID=%" PRIu64 ", shouldTreatAsContinuingLoad=%u, lastNavigationWasAppInitiated=%d, existingNetworkResourceLoadIdentifierToResume=%" PRIu64, loadParameters.navigationID, static_cast(loadParameters.shouldTreatAsContinuingLoad), loadParameters.request.isAppInitiated(), valueOrDefault(loadParameters.existingNetworkResourceLoadIdentifierToResume).toUInt64()); -@@ -2168,17 +2187,14 @@ void WebPage::setSize(const WebCore::IntSize& viewSize) +@@ -2181,17 +2200,14 @@ void WebPage::setSize(const WebCore::IntSize& viewSize) view->resize(viewSize); m_drawingArea->setNeedsDisplay(); @@ -21428,7 +21379,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArguments) { RefPtr localMainFrame = dynamicDowncast(m_page->mainFrame()); -@@ -2203,20 +2219,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg +@@ -2216,20 +2232,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize); @@ -21456,7 +21407,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 #if USE(COORDINATED_GRAPHICS) m_drawingArea->didChangeViewportAttributes(WTFMove(attr)); -@@ -2224,7 +2238,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg +@@ -2237,7 +2251,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg send(Messages::WebPageProxy::DidChangeViewportProperties(attr)); #endif } @@ -21464,7 +21415,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 void WebPage::scrollMainFrameIfNotAtMaxScrollPosition(const IntSize& scrollOffset) { -@@ -2520,6 +2533,7 @@ void WebPage::scaleView(double scale) +@@ -2533,6 +2546,7 @@ void WebPage::scaleView(double scale) } m_page->setViewScaleFactor(scale); @@ -21472,7 +21423,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 scalePage(pageScale, scrollPositionAtNewScale); } -@@ -2699,18 +2713,14 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum +@@ -2712,18 +2726,14 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum viewportConfigurationChanged(); #endif @@ -21492,9 +21443,9 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 } #if !PLATFORM(IOS_FAMILY) -@@ -3671,6 +3681,97 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent) +@@ -3687,6 +3697,97 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent, CompletionHandler&& completionHandler) @@ -21554,7 +21505,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 + localMainFrame->eventHandler().mouseMoved(PlatformMouseEvent( + adjustedIntPoint, + adjustedIntPoint, -+ MouseButton::NoButton, ++ MouseButton::None, + PlatformEvent::Type::MouseMoved, + 0, + modifiers, @@ -21565,7 +21516,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 + localMainFrame->eventHandler().handleMousePressEvent(PlatformMouseEvent( + adjustedIntPoint, + adjustedIntPoint, -+ MouseButton::LeftButton, ++ MouseButton::Left, + PlatformEvent::Type::MousePressed, + 1, + modifiers, @@ -21576,7 +21527,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 + localMainFrame->eventHandler().handleMouseReleaseEvent(PlatformMouseEvent( + adjustedIntPoint, + adjustedIntPoint, -+ MouseButton::LeftButton, ++ MouseButton::Left, + PlatformEvent::Type::MouseReleased, + 1, + modifiers, @@ -21590,7 +21541,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 #endif void WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint) -@@ -3748,6 +3849,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m +@@ -3764,6 +3865,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m m_inspectorTargetController->sendMessageToTargetBackend(targetId, message); } @@ -21602,7 +21553,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 void WebPage::insertNewlineInQuotedContent() { Ref frame = CheckedRef(m_page->focusController())->focusedOrMainFrame(); -@@ -3959,6 +4065,7 @@ void WebPage::didCompletePageTransition() +@@ -3975,6 +4081,7 @@ void WebPage::didCompletePageTransition() void WebPage::show() { send(Messages::WebPageProxy::ShowPage()); @@ -21610,7 +21561,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 } void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension) -@@ -4964,7 +5071,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana +@@ -4999,7 +5106,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana #if ENABLE(DRAG_SUPPORT) @@ -21619,7 +21570,18 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 void WebPage::performDragControllerAction(DragControllerAction action, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet draggingSourceOperationMask, SelectionData&& selectionData, OptionSet flags) { if (!m_page) { -@@ -7449,6 +7556,9 @@ Ref WebPage::createDocumentLoader(LocalFrame& frame, const Resou +@@ -7254,6 +7361,10 @@ void WebPage::didCommitLoad(WebFrame* frame) + #endif + + flushDeferredDidReceiveMouseEvent(); ++// Playwright begin ++ if (frame->isMainFrame()) ++ send(Messages::WebPageProxy::ViewScaleFactorDidChange(viewScaleFactor())); ++// Playwright end + } + + void WebPage::didFinishDocumentLoad(WebFrame& frame) +@@ -7483,6 +7594,9 @@ Ref WebPage::createDocumentLoader(LocalFrame& frame, const Resou WebsitePoliciesData::applyToDocumentLoader(WTFMove(*m_pendingWebsitePolicies), documentLoader); m_pendingWebsitePolicies = std::nullopt; } @@ -21630,7 +21592,7 @@ index df07dd55ff15dfd26d47b6aa6bc768256cb01038..b9f174a31f93b938a34c13bb35f43a10 return documentLoader; diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h -index 8953b900362dba8d3e83c8a61a87bc33d47c4c84..4df44385d11d65778da2090807153577b6e51bc2 100644 +index cdc6e9622d72353a1ecfeaa96d4ae38bbd05ce4d..d3f29a5abe0df32e0903d7e642426716c10bdc52 100644 --- a/Source/WebKit/WebProcess/WebPage/WebPage.h +++ b/Source/WebKit/WebProcess/WebPage/WebPage.h @@ -69,6 +69,7 @@ @@ -21652,7 +21614,7 @@ index 8953b900362dba8d3e83c8a61a87bc33d47c4c84..4df44385d11d65778da2090807153577 #if PLATFORM(GTK) || PLATFORM(WPE) #include "InputMethodState.h" #endif -@@ -1085,11 +1090,11 @@ public: +@@ -1088,11 +1093,11 @@ public: void clearSelection(); void restoreSelectionInFocusedEditableElement(); @@ -21666,7 +21628,7 @@ index 8953b900362dba8d3e83c8a61a87bc33d47c4c84..4df44385d11d65778da2090807153577 void performDragControllerAction(DragControllerAction, WebCore::DragData&&, SandboxExtension::Handle&&, Vector&&); #endif -@@ -1103,6 +1108,9 @@ public: +@@ -1106,6 +1111,9 @@ public: void didStartDrag(); void dragCancelled(); OptionSet allowedDragSourceActions() const { return m_allowedDragSourceActions; } @@ -21676,7 +21638,7 @@ index 8953b900362dba8d3e83c8a61a87bc33d47c4c84..4df44385d11d65778da2090807153577 #endif void beginPrinting(WebCore::FrameIdentifier, const PrintInfo&); -@@ -1337,6 +1345,7 @@ public: +@@ -1333,6 +1341,7 @@ public: void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType); void disconnectInspector(const String& targetId); void sendMessageToTargetBackend(const String& targetId, const String& message); @@ -21684,7 +21646,7 @@ index 8953b900362dba8d3e83c8a61a87bc33d47c4c84..4df44385d11d65778da2090807153577 void insertNewlineInQuotedContent(); -@@ -1766,6 +1775,7 @@ private: +@@ -1763,6 +1772,7 @@ private: void tryClose(CompletionHandler&&); void platformDidReceiveLoadParameters(const LoadParameters&); void transitionFrameToLocal(LocalFrameCreationParameters&&, WebCore::FrameIdentifier); @@ -21692,15 +21654,15 @@ index 8953b900362dba8d3e83c8a61a87bc33d47c4c84..4df44385d11d65778da2090807153577 void loadRequest(LoadParameters&&); [[noreturn]] void loadRequestWaitingForProcessLaunch(LoadParameters&&, URL&&, WebPageProxyIdentifier, bool); void loadData(LoadParameters&&); -@@ -1804,6 +1814,7 @@ private: +@@ -1801,6 +1811,7 @@ private: void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled); #elif ENABLE(TOUCH_EVENTS) - void touchEvent(const WebTouchEvent&); + void touchEvent(const WebTouchEvent&, CompletionHandler, bool)>&&); + void fakeTouchTap(const WebCore::IntPoint& position, uint8_t modifiers, CompletionHandler&& completionHandler); #endif void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&); -@@ -1943,9 +1954,7 @@ private: +@@ -1941,9 +1952,7 @@ private: void addLayerForFindOverlay(CompletionHandler&&); void removeLayerForFindOverlay(CompletionHandler&&); @@ -21710,7 +21672,7 @@ index 8953b900362dba8d3e83c8a61a87bc33d47c4c84..4df44385d11d65778da2090807153577 void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex); void setTextForActivePopupMenu(int32_t index); -@@ -2493,6 +2502,7 @@ private: +@@ -2496,6 +2505,7 @@ private: UserActivity m_userActivity; uint64_t m_pendingNavigationID { 0 }; @@ -21719,10 +21681,10 @@ index 8953b900362dba8d3e83c8a61a87bc33d47c4c84..4df44385d11d65778da2090807153577 bool m_mainFrameProgressCompleted { false }; diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in -index a5e984aa25e5ba55138267c09d481f859ce0525f..97a548233aea66f34fcb57e4eaffde208383d7b3 100644 +index 315803b14bb755f44f187d8a1dab4b278cdfc4ba..703834ddc9b3a8b8861406fcda1a5b2aabe1db40 100644 --- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in +++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in -@@ -149,6 +149,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -150,6 +150,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType ConnectInspector(String targetId, Inspector::FrontendChannel::ConnectionType connectionType) DisconnectInspector(String targetId) SendMessageToTargetBackend(String targetId, String message) @@ -21730,15 +21692,15 @@ index a5e984aa25e5ba55138267c09d481f859ce0525f..97a548233aea66f34fcb57e4eaffde20 #if ENABLE(REMOTE_INSPECTOR) SetIndicating(bool indicating); -@@ -159,6 +160,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -160,6 +161,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType #endif #if !ENABLE(IOS_TOUCH_EVENTS) && ENABLE(TOUCH_EVENTS) - TouchEvent(WebKit::WebTouchEvent event) + TouchEvent(WebKit::WebTouchEvent event) -> (std::optional eventType, bool handled) + FakeTouchTap(WebCore::IntPoint position, uint8_t modifiers) -> () Async #endif CancelPointer(WebCore::PointerID pointerId, WebCore::IntPoint documentPoint) -@@ -190,6 +192,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -191,6 +193,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType LoadDataInFrame(IPC::DataReference data, String MIMEType, String encodingName, URL baseURL, WebCore::FrameIdentifier frameID) LoadRequest(struct WebKit::LoadParameters loadParameters) TransitionFrameToLocal(struct WebKit::LocalFrameCreationParameters creationParameters, WebCore::FrameIdentifier frameID) @@ -21746,7 +21708,7 @@ index a5e984aa25e5ba55138267c09d481f859ce0525f..97a548233aea66f34fcb57e4eaffde20 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) -@@ -351,10 +354,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -353,10 +356,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType AddMIMETypeWithCustomContentProvider(String mimeType) # Drag and drop. @@ -21759,7 +21721,7 @@ index a5e984aa25e5ba55138267c09d481f859ce0525f..97a548233aea66f34fcb57e4eaffde20 PerformDragControllerAction(enum:uint8_t WebKit::DragControllerAction action, WebCore::DragData dragData, WebKit::SandboxExtension::Handle sandboxExtensionHandle, Vector sandboxExtensionsForUpload) #endif #if ENABLE(DRAG_SUPPORT) -@@ -363,6 +366,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType +@@ -365,6 +368,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType DragCancelled() #endif @@ -21771,7 +21733,7 @@ index a5e984aa25e5ba55138267c09d481f859ce0525f..97a548233aea66f34fcb57e4eaffde20 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 c751d39c0abb0640be6428cb7d943b9a7441d430..ad8d59e8ab375e45116620c2499064481528c234 100644 +index b757269682383ff9d9cd423ce6309e3340bddc0d..4fc702660c715fec8f678cdada99f18586b5d4e8 100644 --- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm +++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm @@ -825,21 +825,37 @@ String WebPage::platformUserAgent(const URL&) const @@ -21863,7 +21825,7 @@ index f17f5d719d892309ed9c7093384945866b5117b9..1dba47bbf0dbd0362548423a74b38034 } diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp -index 63302a57fe4dbf666bbf79333df6f3a046ea2005..acdf07c37d6fd1d9641c6f9ee59ceb5ef646d8be 100644 +index ede84d5c3f81e53f51b81dc308212a9081193545..48ee261dec83ba8296cc86f7703286164f39339e 100644 --- a/Source/WebKit/WebProcess/WebProcess.cpp +++ b/Source/WebKit/WebProcess/WebProcess.cpp @@ -94,6 +94,7 @@ @@ -21884,10 +21846,10 @@ index 63302a57fe4dbf666bbf79333df6f3a046ea2005..acdf07c37d6fd1d9641c6f9ee59ceb5e void WebProcess::initializeConnection(IPC::Connection* connection) diff --git a/Source/WebKit/WebProcess/WebProcess.h b/Source/WebKit/WebProcess/WebProcess.h -index 4d1c197aaa4d77e763674d6b02f5e35f5613dc1e..54d8ed73743dfd46aff1efaf35302d4202c54f94 100644 +index 5dbd3733234f4ee42fcf6f6a0e6181ee0e1b8a22..5b44ea308dbff133e98dc889b1f9434ab30ad61d 100644 --- a/Source/WebKit/WebProcess/WebProcess.h +++ b/Source/WebKit/WebProcess/WebProcess.h -@@ -745,7 +745,7 @@ private: +@@ -753,7 +753,7 @@ private: WeakHashMap m_userGestureTokens; @@ -21912,7 +21874,7 @@ index 8987c3964a9308f2454759de7f8972215a3ae416..bcac0afeb94ed8123d1f9fb0b932c849 SetProcessDPIAware(); return true; diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm -index 22c698f09790446fb2c80400b55ba6b4ead49658..885104f89f84c7d82490c7c1ca646e74d55b4ee3 100644 +index 2a111c33c93e477538c5fca177bd1ae258322605..52e07e5a7ff9f0f6758bb613dd7e6057940540d4 100644 --- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm +++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm @@ -4210,7 +4210,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END @@ -21925,10 +21887,10 @@ index 22c698f09790446fb2c80400b55ba6b4ead49658..885104f89f84c7d82490c7c1ca646e74 - (void)touch:(WebEvent *)event { diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm -index b2da18013c630a85d5739361c7e2a946bd50d36c..65884693855ccb25e4e0ca191e3b43055202931a 100644 +index a4e615892112df50314ee59680000e5e322ccd5a..8f0050e522e0cb081460fc11a145f66a80a81476 100644 --- a/Source/WebKitLegacy/mac/WebView/WebView.mm +++ b/Source/WebKitLegacy/mac/WebView/WebView.mm -@@ -3962,7 +3962,7 @@ + (void)_doNotStartObservingNetworkReachability +@@ -3963,7 +3963,7 @@ + (void)_doNotStartObservingNetworkReachability } #endif // PLATFORM(IOS_FAMILY) @@ -21937,7 +21899,7 @@ index b2da18013c630a85d5739361c7e2a946bd50d36c..65884693855ccb25e4e0ca191e3b4305 - (NSArray *)_touchEventRegions { -@@ -4004,7 +4004,7 @@ - (NSArray *)_touchEventRegions +@@ -4005,7 +4005,7 @@ - (NSArray *)_touchEventRegions }).autorelease(); } @@ -21978,7 +21940,7 @@ index 0000000000000000000000000000000000000000..dd6a53e2d57318489b7e49dd7373706d + LIBVPX_LIBRARIES +) diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake -index ffd106fe4ad44ef1610c5341e7d16c18bdbd102e..73732f416b5f25a2c79816fb33e5526d9d6be976 100644 +index abad3a9cd4842a176e62225e06bbcf7d766f26f6..43d43416fb79848f2d629ca13248359414f6e54b 100644 --- a/Source/cmake/OptionsGTK.cmake +++ b/Source/cmake/OptionsGTK.cmake @@ -11,8 +11,13 @@ if (${CMAKE_VERSION} VERSION_LESS "3.20" AND NOT ${CMAKE_GENERATOR} STREQUAL "Ni @@ -22006,16 +21968,7 @@ index ffd106fe4ad44ef1610c5341e7d16c18bdbd102e..73732f416b5f25a2c79816fb33e5526d include(GStreamerDefinitions) SET_AND_EXPOSE_TO_BUILD(USE_CAIRO TRUE) -@@ -59,7 +68,7 @@ WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyph - WEBKIT_OPTION_DEFINE(USE_LIBSECRET "Whether to enable the persistent credential storage using libsecret." PUBLIC ON) - WEBKIT_OPTION_DEFINE(USE_OPENGL_OR_ES "Whether to use OpenGL or ES." PUBLIC ON) - WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON) --WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC OFF) -+WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC ON) - WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON) - - WEBKIT_OPTION_DEPEND(ENABLE_DOCUMENTATION ENABLE_INTROSPECTION) -@@ -97,15 +106,15 @@ endif () +@@ -98,15 +107,15 @@ endif () # without approval from a GTK reviewer. There must be strong reason to support # changing the value of the option. WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT PUBLIC ON) @@ -22034,7 +21987,7 @@ index ffd106fe4ad44ef1610c5341e7d16c18bdbd102e..73732f416b5f25a2c79816fb33e5526d WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_JPEGXL PUBLIC ON) # Private options shared with other WebKit ports. Add options here when -@@ -132,7 +141,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_TIME PRIVATE ON) +@@ -133,7 +142,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_TIME PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_WEEK PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TRACKING_PREVENTION PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LAYER_BASED_SVG_ENGINE PRIVATE ON) @@ -22043,7 +21996,7 @@ index ffd106fe4ad44ef1610c5341e7d16c18bdbd102e..73732f416b5f25a2c79816fb33e5526d WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION_PLAYLIST PRIVATE OFF) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON) -@@ -145,7 +154,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION P +@@ -146,7 +155,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION P WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS_IN_WORKERS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) @@ -22052,7 +22005,7 @@ index ffd106fe4ad44ef1610c5341e7d16c18bdbd102e..73732f416b5f25a2c79816fb33e5526d WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PERIODIC_MEMORY_MONITOR PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_POINTER_LOCK PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ON) -@@ -156,6 +165,15 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_API_STATISTICS PRIVATE ON) +@@ -157,6 +166,15 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_API_STATISTICS PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CODECS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) @@ -22068,7 +22021,7 @@ index ffd106fe4ad44ef1610c5341e7d16c18bdbd102e..73732f416b5f25a2c79816fb33e5526d include(GStreamerDependencies) # Finalize the value for all options. Do not attempt to use an option before -@@ -271,6 +289,7 @@ if (NOT EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py") +@@ -272,6 +290,7 @@ if (NOT EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py") endif () SET_AND_EXPOSE_TO_BUILD(USE_ATSPI ${ENABLE_ACCESSIBILITY}) @@ -22077,7 +22030,7 @@ index ffd106fe4ad44ef1610c5341e7d16c18bdbd102e..73732f416b5f25a2c79816fb33e5526d SET_AND_EXPOSE_TO_BUILD(HAVE_OS_DARK_MODE_SUPPORT 1) diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake -index 003934385b37e49bb34f5767f6cfd11d5a0abafb..e97930ad9eab516cb7ee06e51cff16969c72cb25 100644 +index db463c118d6e6006b9d8e324c6b215e006f9734e..45295ec365715a933dc40bb087e245ce21cd6330 100644 --- a/Source/cmake/OptionsWPE.cmake +++ b/Source/cmake/OptionsWPE.cmake @@ -9,8 +9,13 @@ if (${CMAKE_VERSION} VERSION_LESS "3.20" AND NOT ${CMAKE_GENERATOR} STREQUAL "Ni @@ -22127,7 +22080,7 @@ index 003934385b37e49bb34f5767f6cfd11d5a0abafb..e97930ad9eab516cb7ee06e51cff1696 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VARIATION_FONTS PRIVATE ON) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CODECS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) -@@ -88,19 +93,36 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90) +@@ -88,13 +93,30 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PUBLIC ON) endif () @@ -22159,13 +22112,6 @@ index 003934385b37e49bb34f5767f6cfd11d5a0abafb..e97930ad9eab516cb7ee06e51cff1696 WEBKIT_OPTION_DEFINE(ENABLE_WPE_1_1_API "Whether to build WPE 1.1 instead of WPE 2.0" PUBLIC OFF) WEBKIT_OPTION_DEFINE(USE_GBM "Whether to enable usage of GBM." PUBLIC ON) WEBKIT_OPTION_DEFINE(USE_LCMS "Whether to enable support for image color management using libcms2." PUBLIC ON) - WEBKIT_OPTION_DEFINE(USE_LIBDRM "Whether to enable usage of libdrm." PUBLIC ON) - WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON) --WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC OFF) -+WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC ON) - WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON) - - # Private options specific to the WPE port. diff --git a/Source/cmake/OptionsWin.cmake b/Source/cmake/OptionsWin.cmake index 1d358332016df580af0c125bdc6c909967acb11d..649afb06efc04b17c9333ced2308820b1f1ae2e7 100644 --- a/Source/cmake/OptionsWin.cmake @@ -22231,7 +22177,7 @@ index 1d358332016df580af0c125bdc6c909967acb11d..649afb06efc04b17c9333ced2308820b WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF) diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake -index 9b2fecf9a0d367baf910bd241eca9e010f09a0a1..eaa55cd39113ada3d4a7589dac0199797da89123 100644 +index 82d26ca244a46427f3fdc81ec418943c3d0c675f..15dcaf559b1a5ff1e447e92c8ec9aad4ef8e1915 100644 --- a/Source/cmake/WebKitCompilerFlags.cmake +++ b/Source/cmake/WebKitCompilerFlags.cmake @@ -87,7 +87,7 @@ macro(WEBKIT_ADD_TARGET_CXX_FLAGS _target) @@ -22243,6 +22189,20 @@ index 9b2fecf9a0d367baf910bd241eca9e010f09a0a1..eaa55cd39113ada3d4a7589dac019979 if (DEVELOPER_MODE AND DEVELOPER_MODE_FATAL_WARNINGS) if (MSVC) set(FATAL_WARNINGS_FLAG /WX) +diff --git a/Tools/DumpRenderTree/DerivedSources.make b/Tools/DumpRenderTree/DerivedSources.make +index 57aae19f1a16d08ba1579562eeff264c8768af4d..6ce36f40cc954bd02b86f84bd9a0bd2928459938 100644 +--- a/Tools/DumpRenderTree/DerivedSources.make ++++ b/Tools/DumpRenderTree/DerivedSources.make +@@ -73,8 +73,8 @@ $(IDL_FILE_NAMES_LIST) : $(UICONTEXT_INTERFACES:%=%.idl) + JS%.h JS%.cpp : %.idl $(SCRIPTS) $(IDL_ATTRIBUTES_FILE) $(IDL_FILE_NAMES_LIST) $(FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES) + @echo Generating bindings for $*... + $(PERL) -I $(WebCoreScripts) -I $(UISCRIPTCONTEXT_DIR) -I $(DumpRenderTree)/Bindings $(WebCoreScripts)/generate-bindings.pl --defines "$(FEATURE_AND_PLATFORM_DEFINES)" --idlFileNamesList $(IDL_FILE_NAMES_LIST) --outputDir . --generator DumpRenderTree --idlAttributesFile $(IDL_ATTRIBUTES_FILE) $< +-# + ++# + + WEB_PREFERENCES_GENERATED_FILES = \ + TestOptionsGeneratedWebKitLegacyKeyMapping.cpp \ diff --git a/Tools/MiniBrowser/gtk/BrowserTab.c b/Tools/MiniBrowser/gtk/BrowserTab.c index 61616b96e2f4e21aa6d098445e0f1a933e512a9c..33732da18013679a869ff8eb2b44543413f7cf0f 100644 --- a/Tools/MiniBrowser/gtk/BrowserTab.c @@ -22299,7 +22259,7 @@ index 61616b96e2f4e21aa6d098445e0f1a933e512a9c..33732da18013679a869ff8eb2b445434 } diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.c b/Tools/MiniBrowser/gtk/BrowserWindow.c -index 626ce2207e845c40439643d2494e9497b1222810..d741e74c463a59aed2d04acad8635edcfbea664e 100644 +index 58eb5ae39e2e042435c520553e7540388ba98dbc..61033c71963e61f8ccd7a22c9acf42451f9872ca 100644 --- a/Tools/MiniBrowser/gtk/BrowserWindow.c +++ b/Tools/MiniBrowser/gtk/BrowserWindow.c @@ -73,7 +73,7 @@ struct _BrowserWindowClass { @@ -22332,7 +22292,7 @@ index 626ce2207e845c40439643d2494e9497b1222810..d741e74c463a59aed2d04acad8635edc gtk_window_set_title(GTK_WINDOW(window), privateTitle ? privateTitle : title); g_free(privateTitle); } -@@ -508,8 +502,12 @@ static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision +@@ -522,8 +516,12 @@ static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision return FALSE; WebKitNavigationAction *navigationAction = webkit_navigation_policy_decision_get_navigation_action(WEBKIT_NAVIGATION_POLICY_DECISION(decision)); @@ -22347,7 +22307,7 @@ index 626ce2207e845c40439643d2494e9497b1222810..d741e74c463a59aed2d04acad8635edc return FALSE; /* Multiple tabs are not allowed in editor mode. */ -@@ -1491,6 +1489,12 @@ static gboolean browserWindowDeleteEvent(GtkWidget *widget, GdkEventAny* event) +@@ -1500,6 +1498,12 @@ static gboolean browserWindowDeleteEvent(GtkWidget *widget, GdkEventAny* event) } #endif @@ -22360,7 +22320,7 @@ index 626ce2207e845c40439643d2494e9497b1222810..d741e74c463a59aed2d04acad8635edc static void browser_window_class_init(BrowserWindowClass *klass) { GObjectClass *gobjectClass = G_OBJECT_CLASS(klass); -@@ -1504,6 +1508,14 @@ static void browser_window_class_init(BrowserWindowClass *klass) +@@ -1513,6 +1517,14 @@ static void browser_window_class_init(BrowserWindowClass *klass) GtkWidgetClass *widgetClass = GTK_WIDGET_CLASS(klass); widgetClass->delete_event = browserWindowDeleteEvent; #endif @@ -22376,7 +22336,7 @@ index 626ce2207e845c40439643d2494e9497b1222810..d741e74c463a59aed2d04acad8635edc /* Public API. */ diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.h b/Tools/MiniBrowser/gtk/BrowserWindow.h -index c58ebc2beec7e722e8b65b3358b278400e9a1232..526ab90cce49d94f263ab48bbb87e99710f220c9 100644 +index 1fd07efb828b85b6d8def6c6cd92a0c11debfe1b..da9fac7975d477857ead2adb1d67108d51716d15 100644 --- a/Tools/MiniBrowser/gtk/BrowserWindow.h +++ b/Tools/MiniBrowser/gtk/BrowserWindow.h @@ -42,7 +42,7 @@ G_BEGIN_DECLS @@ -22389,7 +22349,7 @@ index c58ebc2beec7e722e8b65b3358b278400e9a1232..526ab90cce49d94f263ab48bbb87e997 typedef struct _BrowserWindow BrowserWindow; diff --git a/Tools/MiniBrowser/gtk/main.c b/Tools/MiniBrowser/gtk/main.c -index 8be643a541511ba58255eaea7fd27dee12fbaa87..fd823c12ec853a7ae70cc343195546b47f08e0b2 100644 +index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4ee6c664754 100644 --- a/Tools/MiniBrowser/gtk/main.c +++ b/Tools/MiniBrowser/gtk/main.c @@ -75,7 +75,12 @@ static char* timeZone; @@ -22857,7 +22817,7 @@ index d9f1afca539b01fcd9e32e4a5182a9b8101e5a92..4c6022fcd7fde326000dade4788f8691 # 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/WebKitTestRunner/CMakeLists.txt b/Tools/WebKitTestRunner/CMakeLists.txt -index b8056910b6cde5610c3e8e4c2992723f8cf80cd0..44367cb186bff1fb85e76cf8f0530170c68fc1ed 100644 +index 9e53f459e444b9c10fc5248f0e8059df6c1e0041..c17c875a7dd3ca05c4489578ab32378bca45a7c9 100644 --- a/Tools/WebKitTestRunner/CMakeLists.txt +++ b/Tools/WebKitTestRunner/CMakeLists.txt @@ -95,6 +95,10 @@ set(TestRunnerInjectedBundle_PRIVATE_LIBRARIES @@ -22872,7 +22832,7 @@ index b8056910b6cde5610c3e8e4c2992723f8cf80cd0..44367cb186bff1fb85e76cf8f0530170 "${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 c59538891446072875ce019bbc95079227765a30..a943e94b2e8710aa8bab87170f14a0d58fe0bfc5 100644 +index 8b4371425fc78e7ddb34966186d5985575fa5cb7..2b0763a80853e93595bf813155a4aadece62c11e 100644 --- a/Tools/WebKitTestRunner/TestController.cpp +++ b/Tools/WebKitTestRunner/TestController.cpp @@ -962,6 +962,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options) @@ -22884,10 +22844,10 @@ index c59538891446072875ce019bbc95079227765a30..a943e94b2e8710aa8bab87170f14a0d5 decidePolicyForMediaKeySystemPermissionRequest, nullptr, // requestWebAuthenticationNoGesture diff --git a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm -index fd94bd470a356591a88212836717113864184127..2a04ca6026fd23222fdf00517e564576fb250f79 100644 +index 397cacf02ea61a9463050870216251f5a2ef7b06..6d1b612e25ecf4bf4a80878d265844f668aa2ca3 100644 --- a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm +++ b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm -@@ -906,4 +906,51 @@ void EventSenderProxy::scaleGestureEnd(double scale) +@@ -907,4 +907,51 @@ void EventSenderProxy::scaleGestureEnd(double scale) #endif // ENABLE(MAC_GESTURE_EVENTS) @@ -22940,7 +22900,7 @@ index fd94bd470a356591a88212836717113864184127..2a04ca6026fd23222fdf00517e564576 + } // namespace WTR diff --git a/Tools/glib/dependencies/apt b/Tools/glib/dependencies/apt -index 77b192427f149554081d94fa074cc19ee8768cc9..159ccf2836e56b512a221e7b9825f870995627f6 100644 +index ab8ce021ed0a2a07de9faaaa0766c39006e48887..3d8a0522dd6e4d76d673e26236dc459119b3517f 100644 --- a/Tools/glib/dependencies/apt +++ b/Tools/glib/dependencies/apt @@ -1,11 +1,11 @@ @@ -22957,7 +22917,15 @@ index 77b192427f149554081d94fa074cc19ee8768cc9..159ccf2836e56b512a221e7b9825f870 echo $2 fi } -@@ -69,10 +69,12 @@ PACKAGES=( +@@ -60,6 +60,7 @@ PACKAGES=( + libpng-dev + libseccomp-dev + $(aptIfExists libsoup-3.0-dev) ++ libnghttp2-dev + libsqlite3-dev + libsystemd-dev + libtasn1-6-dev +@@ -70,10 +71,12 @@ PACKAGES=( $(aptIfExists libwpe-1.0-dev) $(aptIfExists libwpebackend-fdo-1.0-dev) libxml2-utils @@ -22971,10 +22939,10 @@ index 77b192427f149554081d94fa074cc19ee8768cc9..159ccf2836e56b512a221e7b9825f870 # These are dependencies necessary for running tests. diff --git a/Tools/gtk/dependencies/apt b/Tools/gtk/dependencies/apt -index 6af7a5608ff76205702e659d1c2393897c56eaad..401436dddf714e2616b44f61ed1b333071459a79 100644 +index e86c94f00fa39b8186a20c6e696a3ad02f93bbba..f7c96a597faf538281aa637cf8b8e1379d72023f 100644 --- a/Tools/gtk/dependencies/apt +++ b/Tools/gtk/dependencies/apt -@@ -37,6 +37,9 @@ PACKAGES+=( +@@ -36,6 +36,9 @@ PACKAGES+=( nasm unifdef xfonts-utils @@ -22985,10 +22953,10 @@ index 6af7a5608ff76205702e659d1c2393897c56eaad..401436dddf714e2616b44f61ed1b3330 # These are dependencies necessary for running tests. cups-daemon diff --git a/Tools/jhbuild/jhbuild-minimal.modules b/Tools/jhbuild/jhbuild-minimal.modules -index 4e3ec374e700c3459bcec321f9711ae2b61a1412..f6eff2f5b667469d4abe574355360c5f8071b96c 100644 +index cf94e7a391a2af0bc6a2f59c5d6df0113b939d95..e762744314b5982c20e9626878d728d748b3cd2d 100644 --- a/Tools/jhbuild/jhbuild-minimal.modules +++ b/Tools/jhbuild/jhbuild-minimal.modules -@@ -26,7 +26,6 @@ +@@ -24,7 +24,6 @@ @@ -22996,7 +22964,7 @@ index 4e3ec374e700c3459bcec321f9711ae2b61a1412..f6eff2f5b667469d4abe574355360c5f -@@ -247,9 +246,9 @@ +@@ -241,9 +240,9 @@ -DJPEGXL_ENABLE_SKCMS=ON"> libjxl.pc diff --git a/WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme b/WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme -index 4e712c4128ced91a4f7b93c543e4b231ec23e348..853d3d2f6b311c0fe009bf3ef5ab4d1d3c1d331e 100644 +index ded307890926eaf0ca169aaef39ea08bd982a47a..2db0c0abdda702fdff9314ba341b63c5d09289bc 100644 --- a/WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme +++ b/WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme @@ -188,6 +188,20 @@ diff --git a/browser_patches/webkit/pw_run.sh b/browser_patches/webkit/pw_run.sh index 1d2d6e516b..904c702d70 100755 --- a/browser_patches/webkit/pw_run.sh +++ b/browser_patches/webkit/pw_run.sh @@ -1,11 +1,14 @@ #!/usr/bin/env bash +function getWebkitCheckoutPath() { + echo ${WK_CHECKOUT_PATH:-"$HOME/webkit"} +} + function runOSX() { # if script is run as-is - if [[ -f "${SCRIPT_PATH}/EXPECTED_BUILDS" && -n "$WK_CHECKOUT_PATH" && -d "$WK_CHECKOUT_PATH/WebKitBuild/Release/Playwright.app" ]]; then + WK_CHECKOUT_PATH=$(getWebkitCheckoutPath) + if [[ -f "${SCRIPT_PATH}/EXPECTED_BUILDS" && -d "$WK_CHECKOUT_PATH/WebKitBuild/Release/Playwright.app" ]]; then DYLIB_PATH="$WK_CHECKOUT_PATH/WebKitBuild/Release" - elif [[ -f "${SCRIPT_PATH}/EXPECTED_BUILDS" && -d "$HOME/webkit/WebKitBuild/Release/Playwright.app" ]]; then - DYLIB_PATH="$HOME/webkit/WebKitBuild/Release" elif [[ -d $SCRIPT_PATH/Playwright.app ]]; then DYLIB_PATH="$SCRIPT_PATH" elif [[ -d $SCRIPT_PATH/WebKitBuild/Release/Playwright.app ]]; then @@ -34,13 +37,14 @@ function runLinux() { # Setting extra environment variables like LD_LIBRARY_PATH or WEBKIT_INJECTED_BUNDLE_PATH # is only needed when calling MiniBrowser from the build folder. The MiniBrowser from # the zip bundle wrapper already sets itself the needed env variables. + WK_CHECKOUT_PATH=$(getWebkitCheckoutPath) if [[ -d $SCRIPT_PATH/$MINIBROWSER_FOLDER ]]; then MINIBROWSER="$SCRIPT_PATH/$MINIBROWSER_FOLDER/MiniBrowser" - elif [[ -d $HOME/webkit/$BUILD_FOLDER ]]; then - LD_PATH="$HOME/webkit/$BUILD_FOLDER/$DEPENDENCIES_FOLDER/Root/lib:$SCRIPT_PATH/checkout/$BUILD_FOLDER/Release/bin" - GIO_DIR="$HOME/webkit/$BUILD_FOLDER/$DEPENDENCIES_FOLDER/Root/lib/gio/modules" - BUNDLE_DIR="$HOME/webkit/$BUILD_FOLDER/Release/lib" - MINIBROWSER="$HOME/webkit/$BUILD_FOLDER/Release/bin/MiniBrowser" + elif [[ -d $WK_CHECKOUT_PATH/$BUILD_FOLDER ]]; then + LD_PATH="$WK_CHECKOUT_PATH/$BUILD_FOLDER/$DEPENDENCIES_FOLDER/Root/lib:$SCRIPT_PATH/checkout/$BUILD_FOLDER/Release/bin" + GIO_DIR="$WK_CHECKOUT_PATH/$BUILD_FOLDER/$DEPENDENCIES_FOLDER/Root/lib/gio/modules" + BUNDLE_DIR="$WK_CHECKOUT_PATH/$BUILD_FOLDER/Release/lib" + MINIBROWSER="$WK_CHECKOUT_PATH/$BUILD_FOLDER/Release/bin/MiniBrowser" elif [[ -f $SCRIPT_PATH/MiniBrowser ]]; then MINIBROWSER="$SCRIPT_PATH/MiniBrowser" elif [[ -d $SCRIPT_PATH/$BUILD_FOLDER ]]; then