Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: roll browser_patches (#42557)

Yury Semikhatsky1e9d2b1ff186
diff --git a/browser_patches/firefox/UPSTREAM_CONFIG.sh b/browser_patches/firefox/UPSTREAM_CONFIG.sh
index 98c9002b25..ab997865af 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-firefox/firefox"
BASE_BRANCH="release"
-BASE_REVISION="d065a04bc5610f496762935dee56604a78b91b51"
+BASE_REVISION="f1b6c0f86b96b7e0688c26f65803576f27cdaf88"
diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.js
index 2b4b3c5463..464bfdd8ee 100644
--- a/browser_patches/firefox/juggler/NetworkObserver.js
+++ b/browser_patches/firefox/juggler/NetworkObserver.js
@@ -542,9 +542,6 @@ class NetworkRequest {
try {
remoteIPAddress = this.httpChannel.remoteAddress;
remotePort = this.httpChannel.remotePort;
- // Gecko reports bare IPv6 addresses, bracket them to match Chromium.
- if (remoteIPAddress && remoteIPAddress.includes(':'))
- remoteIPAddress = `[${remoteIPAddress}]`;
} catch (e) {
// remoteAddress is not defined for cached requests.
}
@@ -909,12 +906,7 @@ class ResponseStorage {
// Note: fulfilled request comes with decoded body right away.
if ((request.httpChannel instanceof Ci.nsIEncodedChannel) && request.httpChannel.contentEncodings && !request.httpChannel.applyConversion && !request._fulfilled) {
const encodingHeader = request.httpChannel.getResponseHeader("Content-Encoding");
- // Firefox itself skips "identity" and empty encodings when applying content
- // conversions, and there is no stream converter registered for them.
- encodings = encodingHeader.split(/\s*\t*,\s*\t*/).filter(encoding => {
- const normalized = encoding.trim().toLowerCase();
- return normalized && normalized !== 'identity' && normalized !== 'x-identity';
- });
+ encodings = encodingHeader.split(/\s*\t*,\s*\t*/);
}
this._responses.set(request.requestId, {
body,
diff --git a/browser_patches/firefox/juggler/TargetRegistry.js b/browser_patches/firefox/juggler/TargetRegistry.js
index 582f4e62f1..0511315cf2 100644
--- a/browser_patches/firefox/juggler/TargetRegistry.js
+++ b/browser_patches/firefox/juggler/TargetRegistry.js
@@ -4,7 +4,7 @@
const {Helper} = ChromeUtils.importESModule('chrome://juggler/content/Helper.js');
const {Preferences} = ChromeUtils.importESModule("resource://gre/modules/Preferences.sys.mjs");
-const {ContextualIdentityService} = ChromeUtils.importESModule("moz-src:///toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs");
+const {ContextualIdentityService} = ChromeUtils.importESModule("resource://gre/modules/ContextualIdentityService.sys.mjs");
const {NetUtil} = ChromeUtils.importESModule('resource://gre/modules/NetUtil.sys.mjs');
const {AppConstants} = ChromeUtils.importESModule("resource://gre/modules/AppConstants.sys.mjs");
diff --git a/browser_patches/firefox/juggler/components/Juggler.js b/browser_patches/firefox/juggler/components/Juggler.js
index ac9e6c26b7..7595958619 100644
--- a/browser_patches/firefox/juggler/components/Juggler.js
+++ b/browser_patches/firefox/juggler/components/Juggler.js
@@ -40,7 +40,6 @@ ActorManagerParent.addJSWindowActors({
},
},
allFrames: true,
- safeForUntrustedWebProcess: true,
},
});
@@ -159,3 +158,4 @@ const jugglerInstance = new Juggler();
export var JugglerFactory = function() {
return jugglerInstance;
};
+
diff --git a/browser_patches/firefox/juggler/content/Runtime.js b/browser_patches/firefox/juggler/content/Runtime.js
index 78c05de7ac..a29af41b20 100644
--- a/browser_patches/firefox/juggler/content/Runtime.js
+++ b/browser_patches/firefox/juggler/content/Runtime.js
@@ -56,10 +56,6 @@ const disallowedMessageCategories = new Set([
class Runtime {
constructor(isWorker = false) {
this._debugger = new Debugger();
- // A debuggee global with these flags unset is pinned to the debuggable wasm/asm.js
- // baseline tier, with the optimizing compiler disabled entirely.
- this._debugger.allowUnobservedWasm = true;
- this._debugger.allowUnobservedAsmJS = true;
this._pendingPromises = new Map();
this._executionContexts = new Map();
this._windowToExecutionContext = new Map();
@@ -261,37 +257,29 @@ class Runtime {
resolve = a;
reject = b;
});
- this._pendingPromises.set(obj.promiseID, {resolve, reject, executionContext, exceptionDetails, promiseObj: obj});
- // Debugger.onPromiseSettled hook was removed in Bug 2044167. Instead, attach
- // reactions inside the debuggee that run a `debugger;` statement upon settling,
- // and sweep pending promises from the onDebuggerStatement hook. Unlike
- // dereferencing the promise and adding reactions from the privileged
- // compartment, this also works in workers where there are no Xrays.
+ this._pendingPromises.set(obj.promiseID, {resolve, reject, executionContext, exceptionDetails});
if (this._pendingPromises.size === 1)
- this._debugger.onDebuggerStatement = this._onDebuggerStatement.bind(this);
- executionContext._debuggee.executeInGlobalWithBindings(
- 'p.then(() => { debugger; }, () => { debugger; })', {p: obj}, {useInnerBindings: true});
+ this._debugger.onPromiseSettled = this._onPromiseSettled.bind(this);
return await promise;
}
- _onDebuggerStatement() {
- for (const [promiseID, pendingPromise] of this._pendingPromises) {
- const obj = pendingPromise.promiseObj;
- if (obj.promiseState === 'pending')
- continue;
- this._pendingPromises.delete(promiseID);
- if (obj.promiseState === 'fulfilled') {
- pendingPromise.resolve({success: true, obj: obj.promiseValue});
- continue;
- }
- const debuggee = pendingPromise.executionContext._debuggee;
- const errorInfo = debuggee.executeInGlobalWithBindings('({m: e?.message, s: e?.stack})', {e: obj.promiseReason}, {useInnerBindings: true}).return;
- pendingPromise.exceptionDetails.text = errorInfo.getOwnPropertyDescriptor('m').value;
- pendingPromise.exceptionDetails.stack = errorInfo.getOwnPropertyDescriptor('s').value;
- pendingPromise.resolve({success: false, obj: null});
- }
+ _onPromiseSettled(obj) {
+ const pendingPromise = this._pendingPromises.get(obj.promiseID);
+ if (!pendingPromise)
+ return;
+ this._pendingPromises.delete(obj.promiseID);
if (!this._pendingPromises.size)
- this._debugger.onDebuggerStatement = undefined;
+ this._debugger.onPromiseSettled = undefined;
+
+ if (obj.promiseState === 'fulfilled') {
+ pendingPromise.resolve({success: true, obj: obj.promiseValue});
+ return;
+ };
+ const debuggee = pendingPromise.executionContext._debuggee;
+ const errorInfo = debuggee.executeInGlobalWithBindings('({m: e?.message, s: e?.stack})', {e: obj.promiseReason}, {useInnerBindings: true}).return;
+ pendingPromise.exceptionDetails.text = errorInfo.getOwnPropertyDescriptor('m').value;
+ pendingPromise.exceptionDetails.stack = errorInfo.getOwnPropertyDescriptor('s').value;
+ pendingPromise.resolve({success: false, obj: null});
}
createExecutionContext(domWindow, contextGlobal, auxData) {
@@ -319,7 +307,7 @@ class Runtime {
}
}
if (!this._pendingPromises.size)
- this._debugger.onDebuggerStatement = undefined;
+ this._debugger.onPromiseSettled = undefined;
this._debugger.removeDebuggee(destroyedContext._contextGlobal);
this._executionContexts.delete(destroyedContext._id);
if (destroyedContext._domWindow)
diff --git a/browser_patches/firefox/juggler/content/WorkerMain.js b/browser_patches/firefox/juggler/content/WorkerMain.js
index 555a97a874..99a6623e76 100644
--- a/browser_patches/firefox/juggler/content/WorkerMain.js
+++ b/browser_patches/firefox/juggler/content/WorkerMain.js
@@ -22,10 +22,6 @@ const runtime = new Runtime(true /* isWorker */);
// Create execution context in the runtime only when the script
// source was actually evaluated in it.
const dbg = new Debugger(global);
- // A debuggee global with these flags unset is pinned to the debuggable wasm/asm.js
- // baseline tier, with the optimizing compiler disabled entirely.
- dbg.allowUnobservedWasm = true;
- dbg.allowUnobservedAsmJS = true;
if (dbg.findScripts({global}).length) {
runtime.createExecutionContext(null /* domWindow */, global, {});
} else {
diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diff
index daaca1705e..bf56dc51a6 100644
--- a/browser_patches/firefox/patches/bootstrap.diff
+++ b/browser_patches/firefox/patches/bootstrap.diff
@@ -31,7 +31,7 @@ index 8337336dc894b44ea696bb780e448dfbdd8b6357..9eb83f33bb0415f28d1bcf66507d33d0
DWORD creationFlags = CREATE_SUSPENDED | CREATE_UNICODE_ENVIRONMENT;
diff --git a/browser/installer/allowed-dupes.mn b/browser/installer/allowed-dupes.mn
-index 3bc36691ce4b754fb80fa7d81d47dba786669dac..dbd3d465f66801e167e6e26d6eb6c474b4b1532c 100644
+index 96706c155f4dd317d93d7e5bf18f67598cce66a4..8f61011841cf06689a59210fb021d23f81db4fa1 100644
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
@@ -66,6 +66,12 @@ browser/chrome/browser/builtin-addons/webcompat/shims/empty-shim.txt
@@ -48,10 +48,10 @@ index 3bc36691ce4b754fb80fa7d81d47dba786669dac..dbd3d465f66801e167e6e26d6eb6c474
browser/chrome/browser/content/activity-stream/data/content/tippytop/favicons/allegro-pl.ico
browser/defaults/settings/main/search-config-icons/96327a73-c433-5eb4-a16d-b090cadfb80b
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
-index 9944fbec40229fe327cd311eb74be04f1d0f8b92..b3b60437eeb7ee729a3be040b8af7f0f738fa6c8 100644
+index 203811a0fb980b47f113729cb1a16f56f376bfe5..83ac2cc8cdae99006fbc34319ed854c8ef88fcc4 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
-@@ -195,6 +195,9 @@
+@@ -204,6 +204,9 @@
@RESPATH@/chrome/remote.manifest
#endif
@@ -109,10 +109,10 @@ index 257e87fe0c618684eb4216c8028ac886ef2d5562..8c13f020100dad9bc4e093d50bd3a1f9
const transportProvider = {
setListener(upgradeListener) {
diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp
-index 6662d0e720008838d4130ce6201ddac5f8390c98..40d41d987b6d59fddaac238cff86affe720bc9ed 100644
+index d7155e79364de64fbf90c7fa37ac1713ed00bfa3..b38aece7733011cad0eac055c560e42b85ad467b 100644
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
-@@ -119,8 +119,11 @@ struct ParamTraits<mozilla::dom::DisplayMode>
+@@ -118,8 +118,11 @@ struct ParamTraits<mozilla::dom::DisplayMode>
template <>
struct ParamTraits<mozilla::dom::PrefersColorSchemeOverride>
@@ -126,7 +126,7 @@ index 6662d0e720008838d4130ce6201ddac5f8390c98..40d41d987b6d59fddaac238cff86affe
template <>
struct ParamTraits<mozilla::dom::ForcedColorsOverride>
-@@ -484,7 +487,11 @@ already_AddRefed<BrowsingContext> BrowsingContext::CreateDetached(
+@@ -489,7 +492,11 @@ already_AddRefed<BrowsingContext> BrowsingContext::CreateDetached(
fields.Get<IDX_UseErrorPages>() = true;
@@ -139,7 +139,7 @@ index 6662d0e720008838d4130ce6201ddac5f8390c98..40d41d987b6d59fddaac238cff86affe
fields.Get<IDX_AllowJavascript>() =
inherit ? inherit->GetAllowJavascript() : true;
-@@ -3558,6 +3565,15 @@ void BrowsingContext::DidSet(FieldIndex<IDX_LanguageOverride>,
+@@ -3544,6 +3551,15 @@ void BrowsingContext::DidSet(FieldIndex<IDX_LanguageOverride>,
});
}
@@ -155,17 +155,17 @@ index 6662d0e720008838d4130ce6201ddac5f8390c98..40d41d987b6d59fddaac238cff86affe
void BrowsingContext::DidSet(FieldIndex<IDX_MediumOverride>,
nsString&& aOldValue) {
MOZ_ASSERT(IsTop());
-@@ -3838,7 +3854,7 @@ void BrowsingContext::SetGeolocationServiceOverride(
+@@ -3824,7 +3840,7 @@ void BrowsingContext::SetGeolocationServiceOverride(
if (aGeolocationOverride.WasPassed()) {
if (!mGeolocationServiceOverride) {
- mGeolocationServiceOverride = MakeRefPtr<GeolocationService>();
+ mGeolocationServiceOverride = MakeRefPtr<nsGeolocationService>();
- mGeolocationServiceOverride->Init();
+ mGeolocationServiceOverride->Init(true /* isOverride */);
}
mGeolocationServiceOverride->Update(aGeolocationOverride.Value());
- } else if (RefPtr<GeolocationService> serviceOverride =
+ } else if (RefPtr<nsGeolocationService> serviceOverride =
diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h
-index aba8b50b04a5f8abe6670cddf16313a0f3156dbd..c9054e883de27f45796d644286f49e79210c2bf1 100644
+index 6f7f58bba3be6f08b3b27e81f30864c61d683351..ac0d2dc75f3f9e99e97100958108f4504292283f 100644
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
@@ -211,11 +211,11 @@ struct EmbedderColorSchemes {
@@ -225,10 +225,10 @@ index aba8b50b04a5f8abe6670cddf16313a0f3156dbd..c9054e883de27f45796d644286f49e79
void WalkPresContexts(Callback&&);
void PresContextAffectingFieldChanged();
diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp
-index 4a2127ed9b7e8b16a496b56e3382d910750b7a0e..c310686b8dc17da8def684df49fc0fbfa2a13afd 100644
+index 00c69a2310f1056e8ef1199156cb593140af8a63..c6f5181e71b952fe36d83640eb776aa55c31eb2c 100644
--- a/docshell/base/CanonicalBrowsingContext.cpp
+++ b/docshell/base/CanonicalBrowsingContext.cpp
-@@ -316,6 +316,11 @@ void CanonicalBrowsingContext::ReplacedBy(
+@@ -303,6 +303,11 @@ void CanonicalBrowsingContext::ReplacedBy(
txn.SetInnerSizeSpoofedForRFP(GetInnerSizeSpoofedForRFP());
txn.SetIPAddressSpace(GetIPAddressSpace());
txn.SetParentalControlsEnabled(GetParentalControlsEnabled());
@@ -240,7 +240,7 @@ index 4a2127ed9b7e8b16a496b56e3382d910750b7a0e..c310686b8dc17da8def684df49fc0fbf
if (!GetLanguageOverride().IsEmpty()) {
// Reapply language override to update the corresponding realm.
-@@ -1976,6 +1981,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI,
+@@ -1946,6 +1951,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI,
(void)SetIsCaptivePortalTab(true);
}
@@ -254,7 +254,7 @@ index 4a2127ed9b7e8b16a496b56e3382d910750b7a0e..c310686b8dc17da8def684df49fc0fbf
}
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
-index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8da9eee652 100644
+index 275d0ce1d33e7aa887eebeadac786aac44e0ba10..bff2b58d2169bbd40aa4ac48c656d7f9a0519489 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -16,6 +16,12 @@
@@ -270,15 +270,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
#include "mozilla/Attributes.h"
#include "mozilla/AutoRestore.h"
#include "mozilla/BasePrincipal.h"
-@@ -51,6 +57,7 @@
- #include "mozilla/Telemetry.h"
-
- #include "mozilla/WidgetUtils.h"
-+#include "mozilla/GeolocationService.h"
-
- #include "mozilla/dom/AutoEntryScript.h"
- #include "mozilla/dom/ChildProcessChannelListener.h"
-@@ -64,6 +71,7 @@
+@@ -64,6 +70,7 @@
#include "mozilla/dom/DocGroup.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/FragmentDirective.h"
@@ -286,7 +278,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
#include "mozilla/dom/HTMLAnchorElement.h"
#include "mozilla/dom/HTMLIFrameElement.h"
#include "mozilla/dom/Navigation.h"
-@@ -96,6 +104,7 @@
+@@ -96,6 +103,7 @@
#include "mozilla/dom/DocumentBinding.h"
#include "mozilla/glean/DocshellMetrics.h"
#include "mozilla/ipc/ProtocolUtils.h"
@@ -294,7 +286,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
#include "mozilla/net/DocumentChannel.h"
#include "mozilla/net/DocumentChannelChild.h"
#include "mozilla/net/ParentChannelWrapper.h"
-@@ -120,6 +129,7 @@
+@@ -120,6 +128,7 @@
#include "nsIDocumentViewer.h"
#include "mozilla/dom/Document.h"
#include "nsHTMLDocument.h"
@@ -302,7 +294,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
#include "nsIDocumentLoaderFactory.h"
#include "nsIDOMWindow.h"
#include "nsIEditingSession.h"
-@@ -216,6 +226,7 @@
+@@ -215,6 +224,7 @@
#include "nsGlobalWindowInner.h"
#include "nsGlobalWindowOuter.h"
#include "nsJSEnvironment.h"
@@ -310,7 +302,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsObjectLoadingContent.h"
-@@ -356,6 +367,14 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
+@@ -355,6 +365,14 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
mAllowDNSPrefetch(true),
mAllowWindowControl(true),
mCSSErrorReportingEnabled(false),
@@ -325,7 +317,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
mAllowAuth(mItemType == typeContent),
mAllowKeywordFixup(false),
mDisableMetaRefreshWhenInactive(false),
-@@ -2978,6 +2997,174 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
+@@ -2976,6 +2994,174 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
return NS_OK;
}
@@ -423,7 +415,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
+ ToSupports(element), "juggler-file-picker-shown", nullptr);
+}
+
-+RefPtr<GeolocationService> nsDocShell::GetGeolocationServiceOverride() {
++RefPtr<nsGeolocationService> nsDocShell::GetGeolocationServiceOverride() {
+ return GetRootDocShell()->mGeolocationServiceOverride;
+}
+
@@ -431,8 +423,8 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
+nsDocShell::SetGeolocationOverride(nsIDOMGeoPosition* aGeolocationOverride) {
+ if (aGeolocationOverride) {
+ if (!mGeolocationServiceOverride) {
-+ mGeolocationServiceOverride = new GeolocationService();
-+ mGeolocationServiceOverride->Init(true /* isOverride */);
++ mGeolocationServiceOverride = new nsGeolocationService();
++ mGeolocationServiceOverride->Init();
+ }
+ mGeolocationServiceOverride->Update(aGeolocationOverride);
+ } else {
@@ -500,7 +492,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
NS_IMETHODIMP
nsDocShell::GetIsNavigating(bool* aOut) {
*aOut = mIsNavigating;
-@@ -4671,7 +4858,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
+@@ -4655,7 +4841,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
}
void nsDocShell::ActivenessMaybeChanged() {
@@ -509,7 +501,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
if (RefPtr<PresShell> presShell = GetPresShell()) {
presShell->ActivenessMaybeChanged();
}
-@@ -7686,6 +7873,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
+@@ -7651,6 +7837,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
true, // aForceNoOpener
getter_AddRefs(newBC));
MOZ_ASSERT(!newBC);
@@ -522,7 +514,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
return rv;
}
-@@ -8926,6 +9119,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
+@@ -8883,6 +9075,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
attrs.SetFirstPartyDomain(isTopLevelDoc, aLoadState->URI());
nsCOMPtr<nsIRequest> req;
@@ -539,7 +531,7 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
rv = DoURILoad(aLoadState, aCacheKey, getter_AddRefs(req));
if (NS_SUCCEEDED(rv)) {
-@@ -12036,6 +12239,9 @@ class OnLinkClickEvent : public CancelableRunnable, public SupportsWeakPtr {
+@@ -12019,6 +12221,9 @@ class OnLinkClickEvent : public Runnable {
mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied,
mTriggeringPrincipal);
}
@@ -549,32 +541,20 @@ index 5a6d13023782c1b4f677b9a8cc88491d0ea5f533..312899d39bf4d9fe2515bc32b8fa8c8d
return NS_OK;
}
-@@ -12107,6 +12313,11 @@ nsresult nsDocShell::OnFormSubmit(HTMLFormElement* aForm,
- return OnLinkClickSync(aForm, aLoadState, false, aForm->NodePrincipal());
- }
-
-+ nsCOMPtr<nsIObserverService> observerService =
-+ mozilla::services::GetObserverService();
-+ observerService->NotifyObservers(ToSupports(aForm), "juggler-link-click",
-+ nullptr);
-+
- auto result = OnLinkClickWithLoadState(aForm, aLoadState, false,
- aForm->NodePrincipal());
- if (result.isErr()) {
-@@ -12245,6 +12456,8 @@ nsresult nsDocShell::OnLinkClick(
- ownerDoc->GetScriptTrackingFlags());
- loadState->SetHistoryBehavior(NavigationHistoryBehavior::Auto);
+@@ -12136,6 +12341,8 @@ nsresult nsDocShell::OnLinkClick(
+ RefPtr ev = MakeRefPtr<OnLinkClickEvent>(
+ this, aContent, loadState, noOpenerImplied, aTriggeringPrincipal);
+ nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
+ observerService->NotifyObservers(ToSupports(aContent), "juggler-link-click", nullptr);
- auto result = OnLinkClickWithLoadState(aContent, loadState, noOpenerImplied,
- aTriggeringPrincipal);
- return result.isErr() ? result.unwrapErr() : NS_OK;
+ return Dispatch(ev.forget());
+ }
+
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
-index 5b17b1b5a7b61f6032ad05fbc65fb6672a64c09c..008d49bd6d6f1a8e7290ca1b59a8babe988dfd9f 100644
+index aa834b35a1fb2ff6fe3cdd6de9582e48da510be5..ee2f86ddd28a9e18ee33cf509438b5f28cc8c952 100644
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
-@@ -16,6 +16,7 @@
+@@ -15,6 +15,7 @@
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/NavigationBinding.h"
#include "mozilla/dom/SessionHistoryEntry.h"
@@ -582,15 +562,15 @@ index 5b17b1b5a7b61f6032ad05fbc65fb6672a64c09c..008d49bd6d6f1a8e7290ca1b59a8babe
#include "mozilla/dom/WindowProxyHolder.h"
#include "nsCOMPtr.h"
#include "nsCharsetSource.h"
-@@ -42,6 +43,7 @@
-
- namespace mozilla {
- class Encoding;
-+class GeolocationService;
- class HTMLEditor;
- class ObservedDocShell;
- class ScrollContainerFrame;
-@@ -383,6 +385,15 @@ class nsDocShell final : public nsDocLoader,
+@@ -84,6 +85,7 @@ class nsCommandManager;
+ class nsDocShellEditorData;
+ class nsDOMNavigationTiming;
+ class nsDSURIContentListener;
++class nsGeolocationService;
+ class nsGlobalWindowOuter;
+
+ class FramingChecker;
+@@ -397,6 +399,15 @@ class nsDocShell final : public nsDocLoader,
void SetWillChangeProcess() { mWillChangeProcess = true; }
bool WillChangeProcess() { return mWillChangeProcess; }
@@ -601,12 +581,12 @@ index 5b17b1b5a7b61f6032ad05fbc65fb6672a64c09c..008d49bd6d6f1a8e7290ca1b59a8babe
+
+ bool IsBypassCSPEnabled();
+
-+ RefPtr<mozilla::GeolocationService> GetGeolocationServiceOverride();
++ RefPtr<nsGeolocationService> GetGeolocationServiceOverride();
+
// Creates a real network channel (not a DocumentChannel) using the specified
// parameters.
// Used by nsDocShell when not using DocumentChannel, by DocumentLoadListener
-@@ -1000,6 +1011,8 @@ class nsDocShell final : public nsDocLoader,
+@@ -988,6 +999,8 @@ class nsDocShell final : public nsDocLoader,
bool CSSErrorReportingEnabled() const { return mCSSErrorReportingEnabled; }
@@ -615,7 +595,7 @@ index 5b17b1b5a7b61f6032ad05fbc65fb6672a64c09c..008d49bd6d6f1a8e7290ca1b59a8babe
// 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,16 @@ class nsDocShell final : public nsDocLoader,
+@@ -1299,6 +1312,16 @@ class nsDocShell final : public nsDocLoader,
bool mAllowDNSPrefetch : 1;
bool mAllowWindowControl : 1;
bool mCSSErrorReportingEnabled : 1;
@@ -624,7 +604,7 @@ index 5b17b1b5a7b61f6032ad05fbc65fb6672a64c09c..008d49bd6d6f1a8e7290ca1b59a8babe
+ bool mBypassCSPEnabled : 1;
+ bool mForceActiveState : 1;
+ bool mDisallowBFCache : 1;
-+ RefPtr<mozilla::GeolocationService> mGeolocationServiceOverride;
++ RefPtr<nsGeolocationService> mGeolocationServiceOverride;
+ ReducedMotionOverride mReducedMotionOverride;
+ ForcedColorsOverride mForcedColorsOverride;
+ ContrastOverride mContrastOverride;
@@ -633,7 +613,7 @@ index 5b17b1b5a7b61f6032ad05fbc65fb6672a64c09c..008d49bd6d6f1a8e7290ca1b59a8babe
bool mAllowKeywordFixup : 1;
bool mDisableMetaRefreshWhenInactive : 1;
diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl
-index db0721841de3732d297b1ca31ae009e9e6a5356b..2c95a3ebbc437d31d393b5243b923f4f6a1f3483 100644
+index 4aa56b4ce16915d334f32c18953604765699e05a..ef80a46511d870c909dda6182e332c155a8e250c 100644
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -43,6 +43,7 @@ interface nsIURI;
@@ -687,10 +667,10 @@ index db0721841de3732d297b1ca31ae009e9e6a5356b..2c95a3ebbc437d31d393b5243b923f4f
* 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 9602541b0cb109fdfb0051ac0419f1a2b3d9527e..50e4b92b62e557880d6e75dfeda5a3f1e5528838 100644
+index 1081a150609c6068cde605228da6e95f84f06d6b..f51d5f53ea1d8985e7f75e4aba2a6996ac594d21 100644
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
-@@ -3845,6 +3845,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
+@@ -3655,6 +3655,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
}
void Document::ApplySettingsFromCSP(bool aSpeculative) {
@@ -700,7 +680,7 @@ index 9602541b0cb109fdfb0051ac0419f1a2b3d9527e..50e4b92b62e557880d6e75dfeda5a3f1
nsresult rv = NS_OK;
if (!aSpeculative) {
nsIContentSecurityPolicy* csp = PolicyContainer::GetCSP(mPolicyContainer);
-@@ -3942,6 +3945,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
+@@ -3752,6 +3755,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
MOZ_ASSERT(mPolicyContainer,
"Policy container must be initialized before CSP!");
@@ -712,7 +692,7 @@ index 9602541b0cb109fdfb0051ac0419f1a2b3d9527e..50e4b92b62e557880d6e75dfeda5a3f1
// If this is a data document - no need to set CSP.
if (mLoadedAsData) {
return NS_OK;
-@@ -4923,6 +4931,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
+@@ -4722,6 +4730,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
return false;
}
@@ -724,10 +704,10 @@ index 9602541b0cb109fdfb0051ac0419f1a2b3d9527e..50e4b92b62e557880d6e75dfeda5a3f1
return false;
}
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
-index 818005d2cf111f84d891d7f4f925fbaa193ad873..ccf2153d03a77e322d9d771cbce2ec4758718ac4 100644
+index 079746f77996ca03464c8f30b00cd34817b8430d..770a58853159c5d4972aab6002ab68254ee22360 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
-@@ -2371,7 +2371,8 @@ bool Navigator::Webdriver() {
+@@ -2381,7 +2381,8 @@ bool Navigator::Webdriver() {
}
#endif
@@ -738,10 +718,10 @@ index 818005d2cf111f84d891d7f4f925fbaa193ad873..ccf2153d03a77e322d9d771cbce2ec47
AutoplayPolicy Navigator::GetAutoplayPolicy(AutoplayPolicyMediaType aType) {
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
-index d5c7b398dfb967c4cf283264857c3037fa47f16f..9e1a463705fe962c4266463df1aebb18b914fbfc 100644
+index 55a786dd5bb66d2bb51568407bc942c8ac2e5fe4..c73e34868b03a11b44d195f419fb3fb2e7869965 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
-@@ -10380,6 +10380,7 @@ Result<bool, nsresult> nsContentUtils::SynthesizeMouseEvent(
+@@ -9873,6 +9873,7 @@ Result<bool, nsresult> nsContentUtils::SynthesizeMouseEvent(
EventMessage msg;
Maybe<WidgetMouseEvent::ExitFrom> exitFrom;
bool contextMenuKey = false;
@@ -749,7 +729,7 @@ index d5c7b398dfb967c4cf283264857c3037fa47f16f..9e1a463705fe962c4266463df1aebb18
if (aType.EqualsLiteral("mousedown")) {
msg = eMouseDown;
} else if (aType.EqualsLiteral("mouseup")) {
-@@ -10406,13 +10407,26 @@ Result<bool, nsresult> nsContentUtils::SynthesizeMouseEvent(
+@@ -9899,13 +9900,26 @@ Result<bool, nsresult> nsContentUtils::SynthesizeMouseEvent(
msg = eMouseHitTest;
} else if (aType.EqualsLiteral("MozMouseExploreByTouch")) {
msg = eMouseExploreByTouch;
@@ -777,7 +757,7 @@ index d5c7b398dfb967c4cf283264857c3037fa47f16f..9e1a463705fe962c4266463df1aebb18
if (MOZ_UNLIKELY(aOptions.mIsWidgetEventSynthesized)) {
MOZ_ASSERT_UNREACHABLE(
"The event shouldn't be dispatched as a synthesized event");
-@@ -10440,6 +10454,7 @@ Result<bool, nsresult> nsContentUtils::SynthesizeMouseEvent(
+@@ -9933,6 +9947,7 @@ Result<bool, nsresult> nsContentUtils::SynthesizeMouseEvent(
mozilla::widget::AutoSynthesizedEventCallbackNotifier notifier(callback);
WidgetMouseEvent& mouseOrPointerEvent =
@@ -785,7 +765,7 @@ index d5c7b398dfb967c4cf283264857c3037fa47f16f..9e1a463705fe962c4266463df1aebb18
pointerEvent.isSome() ? pointerEvent.ref() : mouseEvent.ref();
mouseOrPointerEvent.pointerId = aMouseEventData.mIdentifier;
mouseOrPointerEvent.mModifiers =
-@@ -10465,6 +10480,7 @@ Result<bool, nsresult> nsContentUtils::SynthesizeMouseEvent(
+@@ -9958,6 +9973,7 @@ Result<bool, nsresult> nsContentUtils::SynthesizeMouseEvent(
aOptions.mIsDOMEventSynthesized;
mouseOrPointerEvent.mExitFrom = std::move(exitFrom);
mouseOrPointerEvent.mCallbackId = notifier.SaveCallback();
@@ -794,10 +774,10 @@ index d5c7b398dfb967c4cf283264857c3037fa47f16f..9e1a463705fe962c4266463df1aebb18
nsPresContext* presContext = aPresShell->GetPresContext();
if (!presContext) {
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
-index c9a6ee9c507129ab6fdd1deca98b368eb48170d5..a312a2d1bfdc1d6551d78242b1ddf03975249408 100644
+index ed255ae7f0f3c3465f4d38a8af2a7899e0dbf3b9..aa60b5bdc059121ac7a9163a40f0d9d23afa5195 100644
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
-@@ -1867,6 +1867,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,
+@@ -1875,6 +1875,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,
(GetActiveBrowsingContext() == newRootBrowsingContext);
}
@@ -808,7 +788,7 @@ index c9a6ee9c507129ab6fdd1deca98b368eb48170d5..a312a2d1bfdc1d6551d78242b1ddf039
// Exit fullscreen if a website focuses another window
if (StaticPrefs::full_screen_api_exit_on_windowRaise() &&
!isElementInActiveWindow && (aFlags & FLAG_RAISE)) {
-@@ -2428,6 +2432,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
+@@ -2436,6 +2440,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
bool aIsLeavingDocument, bool aAdjustWidget,
bool aRemainActive, Element* aElementToFocus,
uint64_t aActionId) {
@@ -816,7 +796,7 @@ index c9a6ee9c507129ab6fdd1deca98b368eb48170d5..a312a2d1bfdc1d6551d78242b1ddf039
LOGFOCUS(("<<Blur begin actionid: %" PRIu64 ">>", aActionId));
// hold a reference to the focused content, which may be null
-@@ -2471,6 +2476,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
+@@ -2479,6 +2484,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
return true;
}
@@ -828,7 +808,7 @@ index c9a6ee9c507129ab6fdd1deca98b368eb48170d5..a312a2d1bfdc1d6551d78242b1ddf039
// Keep a ref to presShell since dispatching the DOM event may cause
// the document to be destroyed.
RefPtr<PresShell> presShell = docShell->GetPresShell();
-@@ -3180,7 +3190,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
+@@ -3181,7 +3191,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
}
}
@@ -840,10 +820,10 @@ index c9a6ee9c507129ab6fdd1deca98b368eb48170d5..a312a2d1bfdc1d6551d78242b1ddf039
// 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 b9caf10ddbecb6c3ac5d5483403a09243befcde1..7a3d9923405cee8eb4936d028c2df2c933d3293e 100644
+index 0fbb9d9e11c72f862d5777a0554a142336f8f17f..80ce0fc7a1b42722eb55a4a2e03af4022126a374 100644
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
-@@ -2534,10 +2534,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
+@@ -2535,10 +2535,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
}();
if (!isAboutBlankInChromeDocshell) {
@@ -864,7 +844,7 @@ index b9caf10ddbecb6c3ac5d5483403a09243befcde1..7a3d9923405cee8eb4936d028c2df2c9
}
}
-@@ -2657,6 +2663,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {
+@@ -2658,6 +2664,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {
}
}
@@ -897,10 +877,10 @@ index fa95821e51984beb7e4672bb82038adb0f8e97d2..08b765dfee64001bde59f99704046246
// Outer windows only.
virtual void EnsureSizeAndPositionUpToDate() override;
diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
-index d1564d960952c0c2b4caf9c485309f7ddfb52257..eff181a2fd215bd3e9d3d5703012e9fa3fdf4a4d 100644
+index 5b21525de8dc0cc86bd14e2b36fcd9f0059a030a..65c6027e614bb8566a7a24bac6a7b75aa93d4032 100644
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
-@@ -1980,6 +1980,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
+@@ -1803,6 +1803,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
mozilla::GetBoxQuadsFromWindowOrigin(this, aOptions, aResult, aRv);
}
@@ -963,10 +943,10 @@ index d1564d960952c0c2b4caf9c485309f7ddfb52257..eff181a2fd215bd3e9d3d5703012e9fa
DOMQuad& aQuad, const GeometryNode& aFrom,
const ConvertCoordinateOptions& aOptions, CallerType aCallerType,
diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h
-index 271c98870e2ed923dfde62635de9557eda90864c..16c69324c83735792894130bf1a8728e16d8d0b0 100644
+index 4c882db32fb458c4e88dc35cdf6ea4c2ce6675f0..0b5ad5cb09b36bde91ddf5390e2e520c76bf6f49 100644
--- a/dom/base/nsINode.h
+++ b/dom/base/nsINode.h
-@@ -3057,6 +3057,10 @@ class nsINode : public mozilla::dom::EventTarget {
+@@ -2551,6 +2551,10 @@ class nsINode : public mozilla::dom::EventTarget {
nsTArray<RefPtr<DOMQuad>>& aResult,
ErrorResult& aRv);
@@ -978,7 +958,7 @@ index 271c98870e2ed923dfde62635de9557eda90864c..16c69324c83735792894130bf1a8728e
DOMQuad& aQuad, const TextOrElementOrDocument& aFrom,
const ConvertCoordinateOptions& aOptions, CallerType aCallerType,
diff --git a/dom/chrome-webidl/BrowsingContext.webidl b/dom/chrome-webidl/BrowsingContext.webidl
-index 91b2d3ccaad070d887b609ef5a92147cc16a4d12..35c581dd07c3f6defc4ad87f27456189d057b4ff 100644
+index d0508a8c29e5bd008213f781beb8eb1fcb458fb8..518580aa7a2eb355f690d904d091e80c34a98912 100644
--- a/dom/chrome-webidl/BrowsingContext.webidl
+++ b/dom/chrome-webidl/BrowsingContext.webidl
@@ -72,6 +72,17 @@ enum PrefersReducedMotionOverride {
@@ -1010,10 +990,10 @@ index 91b2d3ccaad070d887b609ef5a92147cc16a4d12..35c581dd07c3f6defc4ad87f27456189
* 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/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp
-index c1f865f86435f58b29c582005f60eab739548de5..552e5358951786d6d446cc5b0b0b7d39445409cd 100644
+index f95ba91a36f5b4ac906a2d37a814d6eb42b31151..8e373d2e6eee50f60aa12c2651bf8c3fc7c35b8a 100644
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
-@@ -2110,6 +2110,25 @@ static BrowserParent* GetBrowserParentAncestor(BrowserParent* aBrowserParent) {
+@@ -2104,6 +2104,25 @@ static BrowserParent* GetBrowserParentAncestor(BrowserParent* aBrowserParent) {
return bbp->Manager();
}
@@ -1039,7 +1019,7 @@ index c1f865f86435f58b29c582005f60eab739548de5..552e5358951786d6d446cc5b0b0b7d39
static void DispatchCrossProcessMouseExitEvents(WidgetMouseEvent* aMouseEvent,
BrowserParent* aRemoteTarget,
BrowserParent* aStopAncestor,
-@@ -2233,7 +2252,7 @@ void EventStateManager::DispatchCrossProcessEvent(WidgetEvent* aEvent,
+@@ -2227,7 +2246,7 @@ void EventStateManager::DispatchCrossProcessEvent(WidgetEvent* aEvent,
if (mouseEvent->mReason == WidgetMouseEvent::eReal &&
remote != oldRemote) {
MOZ_ASSERT(mouseEvent->mMessage != eMouseExitFromWidget);
@@ -1068,15 +1048,15 @@ index 180065668131acf3738117c84b6a11117fcb6979..a4a77ca8e006fb298769270bb3342ff4
auto& args = mArgs.as<WorkerFetchArgs>();
mFetchDriver->SetWorkerScript(args.mWorkerScript);
diff --git a/dom/geolocation/Geolocation.cpp b/dom/geolocation/Geolocation.cpp
-index 51efcf97c062e106575b88232a14f1702470fddf..1c68b997e4efd8896ec182e962c9e085ab24e7c7 100644
+index 87b78f8d13a1a118eedb032d8feaf7d371e13844..f768f0549659263bc714b6339f9df859a1e33f9b 100644
--- a/dom/geolocation/Geolocation.cpp
+++ b/dom/geolocation/Geolocation.cpp
-@@ -103,8 +103,12 @@ class nsGeolocationRequest final : public ContentPermissionRequestBase,
+@@ -120,8 +120,12 @@ class nsGeolocationRequest final : public ContentPermissionRequestBase,
NS_IMETHOD GetIgnoreAllowSitePermission(
bool* aIgnoreAllowSitePermission) override {
-+ RefPtr<GeolocationService> gs =
-+ GeolocationService::GetGeolocationService(
++ RefPtr<nsGeolocationService> gs =
++ nsGeolocationService::GetGeolocationService(
+ mLocator->GetBrowsingContext());
*aIgnoreAllowSitePermission =
- mBehavior != geolocation::SystemGeolocationPermissionBehavior::NoPrompt;
@@ -1085,30 +1065,99 @@ index 51efcf97c062e106575b88232a14f1702470fddf..1c68b997e4efd8896ec182e962c9e085
return NS_OK;
}
-@@ -393,7 +397,11 @@ nsGeolocationRequest::Allow(JS::Handle<JS::Value> aChoices) {
+@@ -410,7 +414,9 @@ nsGeolocationRequest::Allow(JS::Handle<JS::Value> aChoices) {
self->Cancel();
};
- if (mBehavior != SystemGeolocationPermissionBehavior::NoPrompt) {
-+ RefPtr<GeolocationService> gs =
-+ GeolocationService::GetGeolocationService(
-+ mLocator->GetBrowsingContext());
-+ if (mBehavior != SystemGeolocationPermissionBehavior::NoPrompt &&
-+ !gs->IsOverride()) {
++ RefPtr<nsGeolocationService> gs = nsGeolocationService::GetGeolocationService(
++ mLocator->GetBrowsingContext());
++ if (mBehavior != SystemGeolocationPermissionBehavior::NoPrompt && !gs->IsOverride()) {
// Asynchronously present the system dialog or open system preferences
// (RequestGeolocationPermissionFromUser will know which to do), and wait
// for the permission to change or the request to be canceled. If the
-@@ -417,8 +425,6 @@ nsGeolocationRequest::Allow(JS::Handle<JS::Value> aChoices) {
+@@ -434,8 +440,6 @@ nsGeolocationRequest::Allow(JS::Handle<JS::Value> aChoices) {
return NS_OK;
}
-- RefPtr<GeolocationService> gs =
-- GeolocationService::GetGeolocationService(mLocator->GetBrowsingContext());
+- RefPtr<nsGeolocationService> gs = nsGeolocationService::GetGeolocationService(
+- mLocator->GetBrowsingContext());
bool canUseCache = false;
CachedPositionAndAccuracy lastPosition = gs->GetCachedPosition();
if (lastPosition.position) {
+@@ -722,11 +726,16 @@ NS_INTERFACE_MAP_END
+ NS_IMPL_ADDREF(nsGeolocationService)
+ NS_IMPL_RELEASE(nsGeolocationService)
+
+-nsresult nsGeolocationService::Init() {
++nsresult nsGeolocationService::Init(bool isOverride) {
+ if (!StaticPrefs::geo_enabled()) {
+ return NS_ERROR_FAILURE;
+ }
+
++ if (isOverride) {
++ mIsOverride = true;
++ mHigherAccuracy = true;
++ }
++
+ if (XRE_IsContentProcess()) {
+ return NS_OK;
+ }
+@@ -805,6 +814,10 @@ nsresult nsGeolocationService::Init() {
+ return NS_OK;
+ }
+
++bool nsGeolocationService::IsOverride() {
++ return mIsOverride;
++}
++
+ nsGeolocationService::~nsGeolocationService() = default;
+
+ NS_IMETHODIMP
+@@ -948,6 +961,10 @@ bool nsGeolocationService::HighAccuracyRequested() {
+ }
+
+ void nsGeolocationService::UpdateAccuracy(bool aForceHigh) {
++ if (mIsOverride) {
++ return;
++ }
++
+ bool highRequired = aForceHigh || HighAccuracyRequested();
+
+ if (XRE_IsContentProcess()) {
+diff --git a/dom/geolocation/Geolocation.h b/dom/geolocation/Geolocation.h
+index 0e1d90608d55db6a3d39c730d40efa2e708a4c4a..5d49528d5925b4f9ab55531efd694f355bf5a42d 100644
+--- a/dom/geolocation/Geolocation.h
++++ b/dom/geolocation/Geolocation.h
+@@ -63,7 +63,7 @@ class nsGeolocationService final : public nsIGeolocationUpdate,
+
+ nsGeolocationService() = default;
+
+- nsresult Init();
++ nsresult Init(bool isOverride = false);
+
+ // Management of the Geolocation objects
+ void AddLocator(mozilla::dom::Geolocation* aLocator);
+@@ -88,6 +88,8 @@ class nsGeolocationService final : public nsIGeolocationUpdate,
+ void UpdateAccuracy(bool aForceHigh = false);
+ bool HighAccuracyRequested();
+
++ bool IsOverride();
++
+ private:
+ ~nsGeolocationService();
+
+@@ -114,6 +116,8 @@ class nsGeolocationService final : public nsIGeolocationUpdate,
+ // Nothing() if not being started, or a boolean reflecting the requested
+ // accuracy.
+ mozilla::Maybe<bool> mStarting;
++
++ bool mIsOverride = false;
+ };
+
+ namespace mozilla::dom {
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
-index 1e697e9ced01c1ac64348fcf375821b405ad3e2a..a23d9ac19eabe70affbf79835d3612cdcfdb6727 100644
+index 45fa91a01ee24014c33396b4e057a797c72377b2..5e44eea99d06d2688e196ba1eb62eb1766b3cb70 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -60,6 +60,7 @@
@@ -1428,10 +1477,10 @@ index 584d39da5f04f6d8fc6a87547557b0eeeb35d168..65eb7014356a90aa01ab517c9937ed65
* returned quads are further translated relative to the window
* origin -- which is not the layout origin. Further translation
diff --git a/dom/webidl/Window.webidl b/dom/webidl/Window.webidl
-index 87efe769a8e2d2f8d3502957127de50aed1e9971..b8545e4c788bbee7b1d53efff081289831abd1cf 100644
+index ae2d14e105bc70dc4a5c7f1fa3481c550a74dd4d..83f090b0512dbf2fde42e152838d4bd8315e6616 100644
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
-@@ -444,6 +444,8 @@ dictionary SynthesizeMouseEventOptions : SynthesizeEventOptions {
+@@ -442,6 +442,8 @@ dictionary SynthesizeMouseEventOptions : SynthesizeEventOptions {
boolean ignoreRootScrollFrame = false;
// Controls WidgetMouseEvent.mReason value.
boolean isWidgetEventSynthesized = false;
@@ -1441,10 +1490,10 @@ index 87efe769a8e2d2f8d3502957127de50aed1e9971..b8545e4c788bbee7b1d53efff0812898
// Mozilla-specific stuff
diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp
-index 29e128ec723f557292f8ed0a2fc338503002f238..270ee326e169889ef5bb42dff4c3ac6eda6f0f01 100644
+index 57cd28a445025fb9f3a18ce7083ee683069015f0..398b82832bbf373d443b846b7b5cd4d10888d2a3 100644
--- a/js/src/debugger/Object.cpp
+++ b/js/src/debugger/Object.cpp
-@@ -2623,7 +2623,11 @@ Maybe<Completion> DebuggerObject::call(JSContext* cx,
+@@ -2510,7 +2510,11 @@ Maybe<Completion> DebuggerObject::call(JSContext* cx,
invokeArgs[i].set(args2[i]);
}
@@ -1457,10 +1506,10 @@ index 29e128ec723f557292f8ed0a2fc338503002f238..270ee326e169889ef5bb42dff4c3ac6e
}
diff --git a/js/src/vm/DateTime.cpp b/js/src/vm/DateTime.cpp
-index 51d1d54ee7ed08739242913a607eac8d20655213..f5f9642ef3b4fe5c7c9b01ed88bb2666a1e20605 100644
+index 50657afb4aaf2305b01b581ee09eb9ea712b2614..38384eea6216358b40e8440fa2a78a17fca83592 100644
--- a/js/src/vm/DateTime.cpp
+++ b/js/src/vm/DateTime.cpp
-@@ -809,7 +809,6 @@ void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
+@@ -810,7 +810,6 @@ void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
#if JS_HAS_INTL_API
if (const char* tzenv = std::getenv("TZ")) {
std::string_view tz(tzenv);
@@ -1520,10 +1569,10 @@ index eaaf69687f669a4859a37f3f97b99e6ca519c420..6f965a110db3a1c86466d72f09ead23b
// No boxes to return
return;
diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
-index 0be20c4ea8b91424a98659d991038b1e5c7f1e4a..5f497118bf3c2e4e7405d82732b49acadce45a8a 100644
+index 5b52c35994ce5167fc07b31ed9adb9b2ecc1df32..906f8c6e7a7736eed6ba149fd4a142b53522dbc9 100644
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
-@@ -11948,7 +11948,9 @@ bool PresShell::ComputeActiveness() const {
+@@ -11835,7 +11835,9 @@ bool PresShell::ComputeActiveness() const {
if (!browserChild->IsVisible()) {
MOZ_LOG(gLog, LogLevel::Debug,
(" > BrowserChild %p is not visible", browserChild));
@@ -1535,10 +1584,10 @@ index 0be20c4ea8b91424a98659d991038b1e5c7f1e4a..5f497118bf3c2e4e7405d82732b49aca
// If the browser is visible but just due to be preserving layers
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
-index 22f2b63b9dc1a59bb6ca23f152faf42aa164f79c..17b22da2cce054b793780096fbfa10bb65b8afe8 100644
+index aa6ef4435df02bad54e195607c5da02bd7ed315a..c7a3f02bf30704c53a3c6a619b2dfbee02edb0c2 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
-@@ -701,6 +701,7 @@ bool nsLayoutUtils::AllowZoomingForDocument(const Document* aDocument) {
+@@ -702,6 +702,7 @@ bool nsLayoutUtils::AllowZoomingForDocument(
!aDocument->GetPresShell()->AsyncPanZoomEnabled()) {
return false;
}
@@ -1547,10 +1596,10 @@ index 22f2b63b9dc1a59bb6ca23f152faf42aa164f79c..17b22da2cce054b793780096fbfa10bb
// in RDM.
BrowsingContext* bc = aDocument->GetBrowsingContext();
diff --git a/layout/style/GeckoBindings.h b/layout/style/GeckoBindings.h
-index 574c2683cadf77b468ca9a4250bc7bc1fbb5c8f3..30c7a89a6ed08f526089a8ab40124a980fac3089 100644
+index b8317e006298c1345a6f13d26ca20980875e5bd1..001fd4dbe5612588857924b902cf7ccb359885e5 100644
--- a/layout/style/GeckoBindings.h
+++ b/layout/style/GeckoBindings.h
-@@ -607,6 +607,7 @@ bool Gecko_MediaFeatures_PrefersReducedMotion(const mozilla::dom::Document*);
+@@ -623,6 +623,7 @@ bool Gecko_MediaFeatures_PrefersReducedMotion(const mozilla::dom::Document*);
bool Gecko_MediaFeatures_PrefersReducedTransparency(
const mozilla::dom::Document*);
bool Gecko_MediaFeatures_MacRTL(const mozilla::dom::Document*);
@@ -1584,10 +1633,10 @@ index 1f9613b8cd936fa9d884be010a8dd6167251faa6..0346bccc1c469446376c5bee3250e3dc
return StylePrefersContrast::NoPreference;
}
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
-index 1e0f2266c6ae3b00b44499031325a6689479069e..3e7e870cbc1884eedb41c776a9b46ab55f9a3f07 100644
+index 3d33f9916a240af4ef5b0028b23e139dc50e9851..358b8365235dad23c08ad26d7d30cde3fd9b2bc8 100644
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
-@@ -13496,18 +13496,20 @@
+@@ -13315,18 +13315,20 @@
# Use the libwebrtc ScreenCaptureKit desktop capture backend on Mac by default.
# When disabled, or on a host where not supported (< macOS 14), the older
# CoreGraphics backend is used instead.
@@ -1611,10 +1660,10 @@ index 1e0f2266c6ae3b00b44499031325a6689479069e..3e7e870cbc1884eedb41c776a9b46ab5
# Use the libwebrtc ScreenCaptureKit desktop capture backend on Mac for screen
diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp
-index b37ab1f707c00065f4c7a688c3bf590bbfcd815b..cb888c7663a603744610a02e3e8cd4d680623c12 100644
+index a468108e7147e98f1037e751cb25bc5743a276c3..6b9fab4b6a07cdb9a54719bd7007e32368c485f6 100644
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
-@@ -753,7 +753,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
+@@ -752,7 +752,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
mInterceptionInfo(rhs.mInterceptionInfo),
mSchemelessInput(rhs.mSchemelessInput),
mUserNavigationInvolvement(rhs.mUserNavigationInvolvement),
@@ -1624,7 +1673,7 @@ index b37ab1f707c00065f4c7a688c3bf590bbfcd815b..cb888c7663a603744610a02e3e8cd4d6
}
LoadInfo::LoadInfo(
-@@ -2117,4 +2118,16 @@ void LoadInfo::UpdateParentAddressSpaceInfo() {
+@@ -2116,4 +2117,16 @@ void LoadInfo::UpdateParentAddressSpaceInfo() {
}
}
@@ -1642,10 +1691,10 @@ index b37ab1f707c00065f4c7a688c3bf590bbfcd815b..cb888c7663a603744610a02e3e8cd4d6
+
} // namespace mozilla::net
diff --git a/netwerk/base/LoadInfo.h b/netwerk/base/LoadInfo.h
-index 837efb44f66e2cbe39e563a44a2807e55bab9312..97bd9e9be52510192e260580a6b5638af97a8d5b 100644
+index 797517e695981ddddfef253cd5eb227fd08e686d..93927bb84e4a81068b1772a913c4b405605cc063 100644
--- a/netwerk/base/LoadInfo.h
+++ b/netwerk/base/LoadInfo.h
-@@ -542,6 +542,8 @@ class LoadInfo final : public nsILoadInfo {
+@@ -550,6 +550,8 @@ class LoadInfo final : public nsILoadInfo {
dom::UserNavigationInvolvement::None;
bool mSkipHTTPSUpgrade = false;
@@ -1655,10 +1704,10 @@ index 837efb44f66e2cbe39e563a44a2807e55bab9312..97bd9e9be52510192e260580a6b5638a
// This is exposed solely for testing purposes and should not be used outside of
// LoadInfo
diff --git a/netwerk/base/TRRLoadInfo.cpp b/netwerk/base/TRRLoadInfo.cpp
-index 9a4cf0648708633b6b826312b262df9d3b6c163f..574aceb5700b47325ef9ceafeab647b2d166a609 100644
+index 8acc7468ae67a75c53569c8d9498b0b27d6bcaa2..5cf23f8a3906f923c0368e8cf5b8fc99df4858f5 100644
--- a/netwerk/base/TRRLoadInfo.cpp
+++ b/netwerk/base/TRRLoadInfo.cpp
-@@ -556,5 +556,15 @@ TRRLoadInfo::GetFetchDestination(nsACString& aDestination) {
+@@ -555,5 +555,15 @@ TRRLoadInfo::GetFetchDestination(nsACString& aDestination) {
return NS_ERROR_NOT_IMPLEMENTED;
}
@@ -1675,10 +1724,10 @@ index 9a4cf0648708633b6b826312b262df9d3b6c163f..574aceb5700b47325ef9ceafeab647b2
} // namespace net
} // namespace mozilla
diff --git a/netwerk/base/nsILoadInfo.idl b/netwerk/base/nsILoadInfo.idl
-index f5e892979d77d608fb499f963872076f7d122f76..f48a0d48d880453bb882d97114482dba2bf6bdbf 100644
+index f6a22a498d99ee75c7c9985e278b4331ec3eddc4..cbc8f92fabc7272a2f04b0e37214e7a51a9a0dda 100644
--- a/netwerk/base/nsILoadInfo.idl
+++ b/netwerk/base/nsILoadInfo.idl
-@@ -1704,4 +1704,6 @@ interface nsILoadInfo : nsISupports
+@@ -1720,4 +1720,6 @@ interface nsILoadInfo : nsISupports
return static_cast<mozilla::dom::UserNavigationInvolvement>(userNavigationInvolvement);
}
%}
@@ -1707,10 +1756,10 @@ index 3654f3ed20f6b22d36c4238be40417e77e8f6867..f685e7668ad3310cac8bc8425124a6fe
* Set the status and reason for the forthcoming synthesized response.
* Multiple calls overwrite existing values.
diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp
-index 090ea90b4dbfcb47b3029142ceb9aaae04df3374..f0d161f4519841a85b38a34bb2c4c6fce893f4cc 100644
+index 1df2115be38c8e4c71635581f486c0efb0a48d2d..6a8e39d7b3504b05b463ba218b038455ff52bf2a 100644
--- a/netwerk/ipc/DocumentLoadListener.cpp
+++ b/netwerk/ipc/DocumentLoadListener.cpp
-@@ -205,6 +205,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext,
+@@ -196,6 +196,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext,
aLoadState->GetTextDirectiveUserActivation() ||
aLoadState->HasLoadFlags(nsIWebNavigation::LOAD_FLAGS_FROM_EXTERNAL));
loadInfo->SetIsMetaRefresh(aLoadState->IsMetaRefresh());
@@ -1719,10 +1768,10 @@ index 090ea90b4dbfcb47b3029142ceb9aaae04df3374..f0d161f4519841a85b38a34bb2c4c6fc
return loadInfo.forget();
}
diff --git a/netwerk/protocol/http/InterceptedHttpChannel.cpp b/netwerk/protocol/http/InterceptedHttpChannel.cpp
-index f094d87b789e0a9e1984aaf30718bff64f24ef94..d1f7fdaff06e62a7e96bd5c9dc6ea39d2ea593a5 100644
+index 60626cc9b3f7495b3f0ffc13346d1319ffd86dab..99c85a483d9e325bc3f7fd86bf772968ece31724 100644
--- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
+++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
-@@ -727,10 +727,33 @@ NS_IMPL_ISUPPORTS(ResetInterceptionHeaderVisitor, nsIHttpHeaderVisitor)
+@@ -726,10 +726,33 @@ NS_IMPL_ISUPPORTS(ResetInterceptionHeaderVisitor, nsIHttpHeaderVisitor)
} // anonymous namespace
@@ -1756,7 +1805,7 @@ index f094d87b789e0a9e1984aaf30718bff64f24ef94..d1f7fdaff06e62a7e96bd5c9dc6ea39d
if (mCanceled) {
return mStatus;
}
-@@ -1148,11 +1171,18 @@ InterceptedHttpChannel::OnStartRequest(nsIRequest* aRequest) {
+@@ -1143,11 +1166,18 @@ InterceptedHttpChannel::OnStartRequest(nsIRequest* aRequest) {
GetCallback(mProgressSink);
}
@@ -1776,7 +1825,7 @@ index f094d87b789e0a9e1984aaf30718bff64f24ef94..d1f7fdaff06e62a7e96bd5c9dc6ea39d
if (mPump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) {
RefPtr<nsInputStreamPump> pump(mPump);
diff --git a/netwerk/protocol/http/InterceptedHttpChannel.h b/netwerk/protocol/http/InterceptedHttpChannel.h
-index ab440756a6745ce3c4785f211db32173c6bd27c5..2ba8db70059b5143e72063ffb588c55dd2734c62 100644
+index 430646881b927d2dddda1e0bcf5fd3427580224f..6b5bbb2a411794e9275d1ab83ea02d4cfca88e0e 100644
--- a/netwerk/protocol/http/InterceptedHttpChannel.h
+++ b/netwerk/protocol/http/InterceptedHttpChannel.h
@@ -89,6 +89,11 @@ class InterceptedHttpChannel final
@@ -1792,7 +1841,7 @@ index ab440756a6745ce3c4785f211db32173c6bd27c5..2ba8db70059b5143e72063ffb588c55d
* InterceptionTimeStamps is used to record the time stamps of the
* interception.
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
-index 0941cf9dc3933cd0c0e85647fd9531e18a3bcffb..10298f22fe713638b1c96f587b7d7be844f276e4 100644
+index c6d926448e399e0cb3032180efad3cddaf785fc0..7148ba816bf0dab3224323736001237a99d3b2ba 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -942,11 +942,9 @@ nsresult nsHttpChannel::OnBeforeConnect() {
@@ -1819,7 +1868,7 @@ index 0941cf9dc3933cd0c0e85647fd9531e18a3bcffb..10298f22fe713638b1c96f587b7d7be8
if (mURI->SchemeIs("https") || aShouldUpgrade || !LoadUseHTTPSSVC() ||
forceOffline) {
-@@ -1541,15 +1537,14 @@ nsresult nsHttpChannel::ContinueConnect() {
+@@ -1531,15 +1527,14 @@ nsresult nsHttpChannel::ContinueConnect() {
"CORS preflight must have been finished by the time we "
"do the rest of ContinueConnect");
@@ -1837,7 +1886,7 @@ index 0941cf9dc3933cd0c0e85647fd9531e18a3bcffb..10298f22fe713638b1c96f587b7d7be8
BYPASS_LOCAL_CACHE(mLoadFlags, LoadPreferCacheLoadOverBypass())) {
return NS_ERROR_OFFLINE;
}
-@@ -1591,7 +1586,7 @@ nsresult nsHttpChannel::ContinueConnect() {
+@@ -1581,7 +1576,7 @@ nsresult nsHttpChannel::ContinueConnect() {
}
// We're about to hit the network. Don't if we're forced offline.
@@ -1846,7 +1895,7 @@ index 0941cf9dc3933cd0c0e85647fd9531e18a3bcffb..10298f22fe713638b1c96f587b7d7be8
return NS_ERROR_OFFLINE;
}
-@@ -1699,12 +1694,9 @@ void nsHttpChannel::SpeculativeConnect() {
+@@ -1689,12 +1684,9 @@ void nsHttpChannel::SpeculativeConnect() {
// don't speculate if we are offline, when doing http upgrade (i.e.
// websockets bootstrap), or if we can't do keep-alive (because then we
// couldn't reuse the speculative connection anyhow).
@@ -1860,7 +1909,7 @@ index 0941cf9dc3933cd0c0e85647fd9531e18a3bcffb..10298f22fe713638b1c96f587b7d7be8
return;
}
-@@ -5060,7 +5052,7 @@ nsresult nsHttpChannel::OpenCacheEntryInternal(bool isHttps) {
+@@ -5007,7 +4999,7 @@ nsresult nsHttpChannel::OpenCacheEntryInternal(bool isHttps) {
return NS_OK;
}
@@ -1869,7 +1918,7 @@ index 0941cf9dc3933cd0c0e85647fd9531e18a3bcffb..10298f22fe713638b1c96f587b7d7be8
if (offline || (mLoadFlags & INHIBIT_CACHING) || forceOffline) {
if (BYPASS_LOCAL_CACHE(mLoadFlags, LoadPreferCacheLoadOverBypass()) &&
!offline && !forceOffline) {
-@@ -8534,6 +8526,20 @@ void nsHttpChannel::MaybeStartDNSPrefetch() {
+@@ -8306,6 +8298,20 @@ void nsHttpChannel::MaybeStartDNSPrefetch() {
}
}
@@ -1891,10 +1940,10 @@ index 0941cf9dc3933cd0c0e85647fd9531e18a3bcffb..10298f22fe713638b1c96f587b7d7be8
nsHttpChannel::GetEncodedBodySize(uint64_t* aEncodedBodySize) {
if (mCacheEntry && !LoadCacheEntryIsWriteOnly()) {
diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h
-index cb5da1a630eb49624078262917d34146c6367444..b826374a2d0dc2814b2fd85efaed941ec63edb54 100644
+index 602a3def6eab873986afc17ec92073eb476a43fb..4b267ff4859ebc3eecb169b7f793e60ac8ba1728 100644
--- a/netwerk/protocol/http/nsHttpChannel.h
+++ b/netwerk/protocol/http/nsHttpChannel.h
-@@ -317,6 +317,10 @@ class nsHttpChannel final : public HttpBaseChannel,
+@@ -306,6 +306,10 @@ class nsHttpChannel final : public HttpBaseChannel,
void MaybeResolveProxyAndBeginConnect();
void MaybeStartDNSPrefetch();
@@ -1906,10 +1955,10 @@ index cb5da1a630eb49624078262917d34146c6367444..b826374a2d0dc2814b2fd85efaed941e
// end server host name.
nsIHttpChannelInternal::ProxyDNSStrategy ComputeProxyDNSStrategy();
diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp
-index 8c376eb269cc152bebf4ddb24fee9bda26d4bac8..e52a4768d92c254f07196c903ee9355f464c91b1 100644
+index ed63fe936c1c0fa38329c19c7adada56fd756f2d..b492aa20dd7ded36472b3816ea181d9a991b8d6f 100644
--- a/parser/html/nsHtml5TreeOpExecutor.cpp
+++ b/parser/html/nsHtml5TreeOpExecutor.cpp
-@@ -1450,6 +1450,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
+@@ -1449,6 +1449,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
void nsHtml5TreeOpExecutor::AddSpeculationCSP(const nsAString& aCSP) {
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
@@ -1921,10 +1970,10 @@ index 8c376eb269cc152bebf4ddb24fee9bda26d4bac8..e52a4768d92c254f07196c903ee9355f
nsCOMPtr<nsIContentSecurityPolicy> preloadCsp = mDocument->GetPreloadCsp();
if (!preloadCsp) {
diff --git a/security/manager/ssl/nsCertOverrideService.cpp b/security/manager/ssl/nsCertOverrideService.cpp
-index 79a5989f6949505878cfbee21e6609cf2cdbaf37..fb2c56c9bb8047468773c421d3ccca37b873c035 100644
+index 068d9702fd015c974d698d2c8c741b5d2b0d8316..9ff49d6de9d712b7e5ab9711da7f22269dc2fe49 100644
--- a/security/manager/ssl/nsCertOverrideService.cpp
+++ b/security/manager/ssl/nsCertOverrideService.cpp
-@@ -615,6 +615,8 @@ void nsCertOverrideService::CountPermanentOverrideTelemetry(
+@@ -624,6 +624,8 @@ void nsCertOverrideService::CountPermanentOverrideTelemetry(
}
static bool IsDebugger() {
@@ -1934,10 +1983,10 @@ index 79a5989f6949505878cfbee21e6609cf2cdbaf37..fb2c56c9bb8047468773c421d3ccca37
nsCOMPtr<nsIMarionette> marionette = do_GetService(NS_MARIONETTE_CONTRACTID);
if (marionette) {
diff --git a/services/settings/Utils.sys.mjs b/services/settings/Utils.sys.mjs
-index 40e919a997a5e112ec9a83aa72680451d4739367..e0d91833af2392adc236f069a60808615ffb8287 100644
+index 76f69ab74eba9f704b95a7e3c7b27c39a887bf5a..cf0b9223baed50bff6a08497fe571ca153efaeb0 100644
--- a/services/settings/Utils.sys.mjs
+++ b/services/settings/Utils.sys.mjs
-@@ -105,7 +105,7 @@ function _isUndefined(value) {
+@@ -99,7 +99,7 @@ const _cdnURLs = {};
export var Utils = {
get SERVER_URL() {
@@ -1946,7 +1995,7 @@ index 40e919a997a5e112ec9a83aa72680451d4739367..e0d91833af2392adc236f069a6080861
? // eslint-disable-next-line mozilla/valid-lazy
lazy.gServerURL
: AppConstants.REMOTE_SETTINGS_SERVER_URLS[0];
-@@ -119,6 +119,9 @@ export var Utils = {
+@@ -113,6 +113,9 @@ export var Utils = {
log,
get shouldSkipRemoteActivity() {
@@ -1957,37 +2006,35 @@ index 40e919a997a5e112ec9a83aa72680451d4739367..e0d91833af2392adc236f069a6080861
(lazy.isRunningTests || Cu.isInAutomation) &&
this.SERVER_URL == "data:,#remote-settings-dummy/v1"
diff --git a/toolkit/components/browser/nsIWebBrowserChrome.idl b/toolkit/components/browser/nsIWebBrowserChrome.idl
-index 11f7f8a614bd9dc99ec23dec1d7b45527331bec0..e222d1be610db5e00ca7380c4f35259caaced091 100644
+index a665bd039d49aeeb6896e224080a7cc00b0eacbc..099c3b08d7de697cc8edcd5bb1d8000fc28aeefb 100644
--- a/toolkit/components/browser/nsIWebBrowserChrome.idl
+++ b/toolkit/components/browser/nsIWebBrowserChrome.idl
-@@ -99,7 +99,10 @@ interface nsIWebBrowserChrome : nsISupports
- // ignored for Linux.
- const unsigned long CHROME_SUPPRESS_ANIMATION = 1 << 24;
+@@ -87,6 +87,9 @@ interface nsIWebBrowserChrome : nsISupports
+ // Whether this is a Document Picture-in-Picture window
+ const unsigned long CHROME_DOCUMENT_PIP = 1 << 22;
-- // Two bits are free here.
+ // Whether this window has "width" or "height" defined in features
-+ const unsigned long JUGGLER_WINDOW_EXPLICIT_SIZE = 1 << 26;
++ const unsigned long JUGGLER_WINDOW_EXPLICIT_SIZE = 1 << 23;
+
-+ // One bit is free here.
-
- const unsigned long CHROME_CENTER_SCREEN = 1 << 27;
-
+ // Prevents new window animations on MacOS and Windows. Currently
+ // ignored for Linux.
+ const unsigned long CHROME_SUPPRESS_ANIMATION = 1 << 24;
diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
-index 7c5bde49c469a6645e4694bc523dab24302694ba..812311051343beb44883e48d8670545c5beb8d71 100644
+index 217d51f4c765e0aac2107246f7142099d21d984e..1b623f956c178904945cddeceec9f737a01c053f 100644
--- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
+++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
-@@ -113,7 +113,9 @@ EnterprisePoliciesManager.prototype = {
+@@ -115,7 +115,9 @@ EnterprisePoliciesManager.prototype = {
Services.prefs.clearUserPref(PREF_POLICIES_APPLIED);
}
-- let provider = this._buildProvider();
+- let provider = this._chooseProvider();
+ // --- Playwright begin ---
+ let provider = new PlaywrightPoliciesProvider();
+ // --- Playwright end ---
if (provider.failed) {
this.status = Ci.nsIEnterprisePolicies.FAILED;
-@@ -760,6 +762,19 @@ class JSONPoliciesProvider extends PoliciesProvider {
+@@ -736,6 +738,19 @@ class JSONPoliciesProvider {
}
}
@@ -2004,74 +2051,11 @@ index 7c5bde49c469a6645e4694bc523dab24302694ba..812311051343beb44883e48d8670545c
+ }
+}
+
- class WindowsGPOPoliciesProvider extends PoliciesProvider {
+ class WindowsGPOPoliciesProvider {
constructor() {
- super();
-diff --git a/toolkit/components/geolocation/GeolocationService.cpp b/toolkit/components/geolocation/GeolocationService.cpp
-index 70af7ec0c23833766fdee173c1bcf35448e3af85..1e587ebb60f4591402566f6749426d296d0992b9 100644
---- a/toolkit/components/geolocation/GeolocationService.cpp
-+++ b/toolkit/components/geolocation/GeolocationService.cpp
-@@ -52,11 +52,16 @@ NS_INTERFACE_MAP_END
- NS_IMPL_ADDREF(GeolocationService)
- NS_IMPL_RELEASE(GeolocationService)
-
--nsresult GeolocationService::Init() {
-+nsresult GeolocationService::Init(bool aIsOverride) {
- if (!StaticPrefs::geo_enabled()) {
- return NS_ERROR_FAILURE;
- }
-
-+ if (aIsOverride) {
-+ mIsOverride = true;
-+ mHigherAccuracy = true;
-+ }
-+
- if (XRE_IsContentProcess()) {
- return NS_OK;
- }
-@@ -277,6 +282,10 @@ bool GeolocationService::HighAccuracyRequested() {
- }
-
- void GeolocationService::UpdateAccuracy(bool aForceHigh) {
-+ if (mIsOverride) {
-+ return;
-+ }
-+
- bool highRequired = aForceHigh || HighAccuracyRequested();
-
- if (XRE_IsContentProcess()) {
-diff --git a/toolkit/components/geolocation/GeolocationService.h b/toolkit/components/geolocation/GeolocationService.h
-index ab90326ccabc727b72ac3b2b43ee354ef18e20a2..17ff228f0037687cf68c3c55ab56ab2b3d686d0c 100644
---- a/toolkit/components/geolocation/GeolocationService.h
-+++ b/toolkit/components/geolocation/GeolocationService.h
-@@ -42,7 +42,7 @@ class GeolocationService final : public nsIGeolocationService,
-
- GeolocationService() = default;
-
-- nsresult Init();
-+ nsresult Init(bool aIsOverride = false);
-
- // Management of the Geolocation objects
- void AddLocator(mozilla::dom::Geolocation* aLocator);
-@@ -66,6 +66,7 @@ class GeolocationService final : public nsIGeolocationService,
- // Update the accuracy and notify the provider if changed
- void UpdateAccuracy(bool aForceHigh = false);
- bool HighAccuracyRequested();
-+ bool IsOverride() const { return mIsOverride; }
-
- private:
- ~GeolocationService();
-@@ -93,6 +94,8 @@ class GeolocationService final : public nsIGeolocationService,
- // Nothing() if not being started, or a boolean reflecting the requested
- // accuracy.
- mozilla::Maybe<bool> mStarting;
-+
-+ bool mIsOverride = false;
- };
-
- } // namespace mozilla
+ this._policies = null;
diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp
-index b0f1e285ad6b89cf72c8a98fb564d474f5601c4e..52a080d8c16c8531aadf8714b30a31ef60537c46 100644
+index d0f9c88dcdaca07c6e10139b50b092bf80fc8c3e..f6d1a5ff8f241abdd931f47508d0fffaadce0391 100644
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -377,7 +377,7 @@ nsAppStartup::Quit(uint32_t aMode, int aExitCode, bool* aUserAllowedQuit) {
@@ -2099,28 +2083,24 @@ index efe8ff5541915c0fc632e75572d1e3968c60139d..e0157515ded811e47d21705f13f475d6
int32_t aMaxSelfProgress,
int32_t aCurTotalProgress,
diff --git a/toolkit/components/windowwatcher/nsWindowWatcher.cpp b/toolkit/components/windowwatcher/nsWindowWatcher.cpp
-index d493fc20e19390e94e5609556f1c6878ee3f66d5..1df133fa362d6d1eb3cb35780403150138626aed 100644
+index d5ebdf4413568c89e93d89279510ae910bcdf9fd..a1dbe7916e39fd6bc0292d6262787d39a5c8015d 100644
--- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp
+++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp
-@@ -1902,8 +1902,14 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(
- return nsIWebBrowserChrome::CHROME_DOCUMENT_PICTURE_IN_PICTURE_FLAGS;
- }
- *aIsPopupRequested = ShouldOpenPopup(aFeatures);
-- return *aIsPopupRequested ? nsIWebBrowserChrome::CHROME_MINIMAL_POPUP
-- : nsIWebBrowserChrome::CHROME_ALL;
-+ if (!*aIsPopupRequested) {
-+ return nsIWebBrowserChrome::CHROME_ALL;
-+ }
-+ uint32_t chromeFlags = nsIWebBrowserChrome::CHROME_MINIMAL_POPUP;
+@@ -1917,7 +1917,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(
+ // behavior of other browsers and avoids breaking sites like Gmail that
+ // open a Compose popout via Shift+click.
+ *aIsPopupRequested = true;
+- return nsIWebBrowserChrome::CHROME_MINIMAL_POPUP;
++ uint32_t chromeFlags = 0;
+ if (aFeatures.Exists("width") || aFeatures.Exists("height")) {
+ chromeFlags |= nsIWebBrowserChrome::JUGGLER_WINDOW_EXPLICIT_SIZE;
+ }
-+ return chromeFlags;
++ return chromeFlags | nsIWebBrowserChrome::CHROME_MINIMAL_POPUP;
}
/**
diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs
-index 266f3ea153d578c20a8d96b3e0a0a319baab7468..9a2e98c5deb895fcacdd68bb1eaba39da22c4303 100644
+index db167b74f040cdb477f68c87c4dfe50ef1173c32..78690b35f701df5a683ea3e392b2f7757f66c73e 100644
--- a/toolkit/mozapps/update/UpdateService.sys.mjs
+++ b/toolkit/mozapps/update/UpdateService.sys.mjs
@@ -4024,6 +4024,8 @@ export class UpdateService {
@@ -2197,10 +2177,10 @@ index 524451a83e03f8a9a83103b1f3d87850ad411515..a44b3c5da20f6a0bf9c892d4289a07ac
// 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 566509f9ef17ac0a1d9830a5315b751266db6aee..fc659b901334b0ff63ad244bcbff779415bd3813 100644
+index 1eab401455890aafc73f1da9080415fc035f1c30..d7ce1bccb117cac5d95181f6ab0ca7c3e7e62808 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
-@@ -115,6 +115,7 @@
+@@ -111,6 +111,7 @@
#include "mozilla/Components.h"
#include "mozilla/ClearOnShutdown.h"
@@ -2208,7 +2188,7 @@ index 566509f9ef17ac0a1d9830a5315b751266db6aee..fc659b901334b0ff63ad244bcbff7794
#include "mozilla/Preferences.h"
#include "mozilla/ipc/URIUtils.h"
-@@ -890,6 +891,12 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension(
+@@ -879,6 +880,12 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension(
return NS_OK;
}
@@ -2221,7 +2201,7 @@ index 566509f9ef17ac0a1d9830a5315b751266db6aee..fc659b901334b0ff63ad244bcbff7794
nsresult nsExternalHelperAppService::GetFileTokenForPath(
const char16_t* aPlatformAppPath, nsIFile** aFile) {
nsDependentString platformAppPath(aPlatformAppPath);
-@@ -1568,7 +1575,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) {
+@@ -1514,7 +1521,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) {
// Strip off the ".part" from mTempLeafName
mTempLeafName.Truncate(mTempLeafName.Length() - std::size(".part") + 1);
@@ -2234,7 +2214,7 @@ index 566509f9ef17ac0a1d9830a5315b751266db6aee..fc659b901334b0ff63ad244bcbff7794
mSaver =
do_CreateInstance(NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
-@@ -1752,7 +1764,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
+@@ -1698,7 +1710,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
return NS_OK;
}
@@ -2272,7 +2252,7 @@ index 566509f9ef17ac0a1d9830a5315b751266db6aee..fc659b901334b0ff63ad244bcbff7794
if (NS_FAILED(rv)) {
nsresult transferError = rv;
-@@ -1814,6 +1855,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
+@@ -1760,6 +1801,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
bool alwaysAsk = true;
mMimeInfo->GetAlwaysAskBeforeHandling(&alwaysAsk);
@@ -2282,7 +2262,7 @@ index 566509f9ef17ac0a1d9830a5315b751266db6aee..fc659b901334b0ff63ad244bcbff7794
if (alwaysAsk) {
// But we *don't* ask if this mimeInfo didn't come from
// our user configuration datastore and the user has said
-@@ -2330,6 +2374,15 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver,
+@@ -2276,6 +2320,15 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver,
NotifyTransfer(aStatus);
}
@@ -2298,7 +2278,7 @@ index 566509f9ef17ac0a1d9830a5315b751266db6aee..fc659b901334b0ff63ad244bcbff7794
return NS_OK;
}
-@@ -2815,6 +2868,14 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) {
+@@ -2761,6 +2814,14 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) {
}
}
@@ -2314,10 +2294,10 @@ index 566509f9ef17ac0a1d9830a5315b751266db6aee..fc659b901334b0ff63ad244bcbff7794
// OnStartRequest)
mDialog = nullptr;
diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h
-index 477afd0a414b35af6b4acc13fa0321d826ae7d65..f2941eff522c0a06bb99759da375637c1196dfec 100644
+index 3f8586ed7ee54af197a82b7a69651b4be2f84dad..929fe5b2b58ceef4055415cfc36a6698b73cba4c 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.h
+++ b/uriloader/exthandler/nsExternalHelperAppService.h
-@@ -302,6 +302,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService,
+@@ -269,6 +269,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService,
mozilla::dom::BrowsingContext* aContentContext, bool aForceSave,
nsIInterfaceRequestor* aWindowContext,
nsIStreamListener** aStreamListener);
@@ -2326,7 +2306,7 @@ index 477afd0a414b35af6b4acc13fa0321d826ae7d65..f2941eff522c0a06bb99759da375637c
};
/**
-@@ -500,6 +502,9 @@ class nsExternalAppHandler final : public nsIStreamListener,
+@@ -467,6 +469,9 @@ class nsExternalAppHandler final : public nsIStreamListener,
* Upon successful return, both mTempFile and mSaver will be valid.
*/
nsresult SetUpTempFile(nsIChannel* aChannel);
@@ -2410,10 +2390,10 @@ index 777157e17e0db442262b1a9522b0b1b39058789a..54c4dde2ee4847e79b07fffe3ec57a34
}
#endif
diff --git a/widget/cocoa/NativeKeyBindings.mm b/widget/cocoa/NativeKeyBindings.mm
-index 4246b5ab669ecad8d2c24777c67470d1ece91d50..9b173d81b571d4aa25a57ca424e0ec6396ab5441 100644
+index 9711cfaf4e3e2974567ea7f7d4074b3541b0248f..34292be04676193f1b8efce45d4fa370c15e970f 100644
--- a/widget/cocoa/NativeKeyBindings.mm
+++ b/widget/cocoa/NativeKeyBindings.mm
-@@ -635,6 +635,10 @@
+@@ -618,6 +618,10 @@
break;
case KEY_NAME_INDEX_ArrowUp:
if (aEvent.IsControl()) {
@@ -2424,7 +2404,7 @@ index 4246b5ab669ecad8d2c24777c67470d1ece91d50..9b173d81b571d4aa25a57ca424e0ec63
break;
}
if (aEvent.IsMeta()) {
-@@ -672,6 +676,10 @@
+@@ -655,6 +659,10 @@
break;
case KEY_NAME_INDEX_ArrowDown:
if (aEvent.IsControl()) {
@@ -2436,7 +2416,7 @@ index 4246b5ab669ecad8d2c24777c67470d1ece91d50..9b173d81b571d4aa25a57ca424e0ec63
}
if (aEvent.IsMeta()) {
diff --git a/widget/headless/HeadlessCompositorWidget.cpp b/widget/headless/HeadlessCompositorWidget.cpp
-index 8484851f674aa21d09e5a3ed77b9df4edaa89e12..2804831ec785a64c771946f095f855d9408851fe 100644
+index cbaa021c9d31cd57e253afd984c5076acab1941e..6cf72e6006e33eac7720958f7d0cd91983f2d782 100644
--- a/widget/headless/HeadlessCompositorWidget.cpp
+++ b/widget/headless/HeadlessCompositorWidget.cpp
@@ -2,6 +2,8 @@
@@ -2445,10 +2425,10 @@ index 8484851f674aa21d09e5a3ed77b9df4edaa89e12..2804831ec785a64c771946f095f855d9
+#include "mozilla/gfx/2D.h"
+#include "mozilla/layers/CompositorThread.h"
+ #include "mozilla/widget/PlatformWidgetTypes.h"
#include "HeadlessCompositorWidget.h"
-
#include "VsyncDispatcher.h"
-@@ -15,9 +17,30 @@ HeadlessCompositorWidget::HeadlessCompositorWidget(
+@@ -14,9 +16,30 @@ HeadlessCompositorWidget::HeadlessCompositorWidget(
const layers::CompositorOptions& aOptions, HeadlessWidget* aWindow)
: CompositorWidget(aOptions),
mWidget(aWindow),
@@ -2479,7 +2459,7 @@ index 8484851f674aa21d09e5a3ed77b9df4edaa89e12..2804831ec785a64c771946f095f855d9
void HeadlessCompositorWidget::ObserveVsync(VsyncObserver* aObserver) {
if (RefPtr<CompositorVsyncDispatcher> cvd =
mWidget->GetCompositorVsyncDispatcher()) {
-@@ -31,6 +54,59 @@ void HeadlessCompositorWidget::NotifyClientSizeChanged(
+@@ -30,6 +53,59 @@ void HeadlessCompositorWidget::NotifyClientSizeChanged(
const LayoutDeviceIntSize& aClientSize) {
auto size = mClientSize.Lock();
*size = aClientSize;
@@ -2540,7 +2520,7 @@ index 8484851f674aa21d09e5a3ed77b9df4edaa89e12..2804831ec785a64c771946f095f855d9
LayoutDeviceIntSize HeadlessCompositorWidget::GetClientSize() {
diff --git a/widget/headless/HeadlessCompositorWidget.h b/widget/headless/HeadlessCompositorWidget.h
-index f9454a79f3e3ff4d9013db99cf9bb98413633330..68e7b94c3a9c75dc9fceae0d5881971497e4fc7c 100644
+index 8374cd00944eddad27563624cd33bb046b6cf143..0345d19d1da862ccd31afa49b123e9f16755c886 100644
--- a/widget/headless/HeadlessCompositorWidget.h
+++ b/widget/headless/HeadlessCompositorWidget.h
@@ -5,6 +5,7 @@
@@ -2548,10 +2528,10 @@ index f9454a79f3e3ff4d9013db99cf9bb98413633330..68e7b94c3a9c75dc9fceae0d58819714
#define widget_headless_HeadlessCompositorWidget_h
+#include "mozilla/ReentrantMonitor.h"
- #include "HeadlessWidget.h"
#include "mozilla/widget/CompositorWidget.h"
-@@ -21,8 +22,11 @@ class HeadlessCompositorWidget final : public CompositorWidget,
+ #include "HeadlessWidget.h"
+@@ -22,8 +23,11 @@ class HeadlessCompositorWidget final : public CompositorWidget,
HeadlessWidget* aWindow);
void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize);
@@ -2563,7 +2543,7 @@ index f9454a79f3e3ff4d9013db99cf9bb98413633330..68e7b94c3a9c75dc9fceae0d58819714
uintptr_t GetWidgetKey() override;
-@@ -40,10 +44,18 @@ class HeadlessCompositorWidget final : public CompositorWidget,
+@@ -41,10 +45,18 @@ class HeadlessCompositorWidget final : public CompositorWidget,
}
private:
@@ -2583,7 +2563,7 @@ index f9454a79f3e3ff4d9013db99cf9bb98413633330..68e7b94c3a9c75dc9fceae0d58819714
} // namespace widget
diff --git a/widget/headless/HeadlessLookAndFeelGTK.cpp b/widget/headless/HeadlessLookAndFeelGTK.cpp
-index d6e94f053c22d9ed5df36b1c20cd408c2605bdc5..31fdf23775544cf1ee9e89e8dd09bcc2166b067b 100644
+index 34ef4bf32bc4c348bd226f1c3ea5a4f03ad4fac1..394e892cdf35c351b9d8536dcb82c1a130cb2095 100644
--- a/widget/headless/HeadlessLookAndFeelGTK.cpp
+++ b/widget/headless/HeadlessLookAndFeelGTK.cpp
@@ -3,6 +3,7 @@
@@ -2608,10 +2588,10 @@ index d6e94f053c22d9ed5df36b1c20cd408c2605bdc5..31fdf23775544cf1ee9e89e8dd09bcc2
default:
aResult = 0;
diff --git a/widget/headless/HeadlessWidget.cpp b/widget/headless/HeadlessWidget.cpp
-index 0c28540ee6aca7f888ab505f6aeb80e61b9981d6..23458a37b6993996e43138bd0e547e9fc7df6614 100644
+index 0841e299ea23692310db27acfa78f7e2050bb002..3285e16397b14400127c81c0d1a13711e536b073 100644
--- a/widget/headless/HeadlessWidget.cpp
+++ b/widget/headless/HeadlessWidget.cpp
-@@ -113,6 +113,8 @@ void HeadlessWidget::Destroy() {
+@@ -112,6 +112,8 @@ void HeadlessWidget::Destroy() {
}
}
@@ -2620,7 +2600,7 @@ index 0c28540ee6aca7f888ab505f6aeb80e61b9981d6..23458a37b6993996e43138bd0e547e9f
nsIWidget::OnDestroy();
nsIWidget::Destroy();
-@@ -574,5 +576,14 @@ nsresult HeadlessWidget::SynthesizeNativeTouchpadPan(
+@@ -573,5 +575,14 @@ nsresult HeadlessWidget::SynthesizeNativeTouchpadPan(
return NS_OK;
}
@@ -2636,7 +2616,7 @@ index 0c28540ee6aca7f888ab505f6aeb80e61b9981d6..23458a37b6993996e43138bd0e547e9f
} // namespace widget
} // namespace mozilla
diff --git a/widget/headless/HeadlessWidget.h b/widget/headless/HeadlessWidget.h
-index 05ae8d02e81e65ec22729173995968367fb026e7..236d2991b75fb613af90d699b5a8f7dcca99a7aa 100644
+index 9daa3334e7ec6aee433ee7a28e6b86a8548f6226..0aa21a1b0a3b07548d832bfb41f73fe37a174fdc 100644
--- a/widget/headless/HeadlessWidget.h
+++ b/widget/headless/HeadlessWidget.h
@@ -127,6 +127,9 @@ class HeadlessWidget final : public nsIWidget {
@@ -2650,10 +2630,10 @@ index 05ae8d02e81e65ec22729173995968367fb026e7..236d2991b75fb613af90d699b5a8f7dc
~HeadlessWidget();
bool mEnabled;
diff --git a/xpcom/reflect/xptinfo/xptinfo.h b/xpcom/reflect/xptinfo/xptinfo.h
-index 7b1d918e86af55b5f961d839ca5009335b56d88b..3d2bc9339173a7358137fc28f0441932061d82bc 100644
+index 2888ffaf432e16d67d348ff008372fbb96c06991..cd4cce73f69bee86d4fb7cb510cd60de0cbcd0b8 100644
--- a/xpcom/reflect/xptinfo/xptinfo.h
+++ b/xpcom/reflect/xptinfo/xptinfo.h
-@@ -504,7 +504,7 @@ static_assert(sizeof(nsXPTMethodInfo) == 8, "wrong size");
+@@ -503,7 +503,7 @@ static_assert(sizeof(nsXPTMethodInfo) == 8, "wrong size");
#if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
# define PARAM_BUFFER_COUNT 18
#else
diff --git a/browser_patches/firefox/preferences/playwright.cfg b/browser_patches/firefox/preferences/playwright.cfg
index f635ae6c8f..f6a3cd845c 100644
--- a/browser_patches/firefox/preferences/playwright.cfg
+++ b/browser_patches/firefox/preferences/playwright.cfg
@@ -20,11 +20,6 @@ pref("dom.security.https_first", false);
pref("datareporting.policy.dataSubmissionEnabled", false);
pref("datareporting.policy.dataSubmissionPolicyAccepted", false);
pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
-// Do not show the "Terms of Use" first-run notification (Firefox 154+).
-pref("termsofuse.bypassNotification", true);
-// Do not show the pre-onboarding splash modal in the first window; it waits
-// for Nimbus experiments to load and blocks all mouse input (Firefox 154+).
-pref("browser.preonboarding.enabled", false);
// Force pdfs into downloads.
pref("pdfjs.disabled", true);
@@ -153,7 +148,7 @@ pref("ui.use_standins_for_native_colors", true);
// Turn off the Push service.
pref("dom.push.serverURL", "");
// Prevent Remote Settings (firefox.settings.services.mozilla.com) to issue non local connections.
-pref("services.settings.server", "data:,#remote-settings-dummy/v1");
+pref("services.settings.server", "");
// Prevent location.services.mozilla.com to issue non local connections.
pref("browser.region.network.url", "");
pref("browser.pocket.enabled", false);
diff --git a/browser_patches/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.sh
index 1b73874e1b..5b92483d98 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="4d05d732e5a84f32675bef4cc135a2e7a9269a87"
+BASE_REVISION="56453fdfe0b0ca6258c23e6453b34f70b885d13f"
diff --git a/browser_patches/webkit/embedder/Playwright/win/PlaywrightLib.rc b/browser_patches/webkit/embedder/Playwright/win/PlaywrightLib.rc
index ddd837e49f..07e4e0d072 100644
--- a/browser_patches/webkit/embedder/Playwright/win/PlaywrightLib.rc
+++ b/browser_patches/webkit/embedder/Playwright/win/PlaywrightLib.rc
@@ -39,7 +39,7 @@ IDC_PLAYWRIGHT MENU
BEGIN
POPUP "&File"
BEGIN
- MENUITEM "New Window\tCtrl-N" IDM_NEW_WINDOW
+ MENUITEM "New Window\tCtrl-N", IDM_NEW_WINDOW
MENUITEM "Close\tCtrl-W", IDM_CLOSE_WINDOW
END
POPUP "&View"
diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff
index c6fb0a9e5f..57610ffc47 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 161c7b52986e742e8a503a1055defc973f1b4a5c..66a6a9e43c39f4098f4dcf0aaa06dc131d1ec775 100644
+index 1d2c0b6e19b19f8efb9db3d2e82d0d1439622459..5261698b09b1fb17bc6f00d56afd106bfc75324b 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
-@@ -1687,21 +1687,26 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
+@@ -1703,21 +1703,26 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
@@ -28,12 +28,12 @@ index 161c7b52986e742e8a503a1055defc973f1b4a5c..66a6a9e43c39f4098f4dcf0aaa06dc13
+ ${JAVASCRIPTCORE_DIR}/inspector/protocol/Screencast.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Security.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/ServiceWorker.json
- ${JAVASCRIPTCORE_DIR}/inspector/protocol/Target.json
+ ${JAVASCRIPTCORE_DIR}/inspector/protocol/Storage.json
diff --git a/Source/JavaScriptCore/DerivedSources-input.xcfilelist b/Source/JavaScriptCore/DerivedSources-input.xcfilelist
-index 726fff0b42d9c68f6bc2264e80ffaba5ecdc9c19..e0467722a0a84a7bd97ee1cf83792e3b21dc21e1 100644
+index 742f12c0f4e3247fac9c48500bdf23c21d2cc7c9..0a43918bfad11b59647cd586e8727d240baef31d 100644
--- a/Source/JavaScriptCore/DerivedSources-input.xcfilelist
+++ b/Source/JavaScriptCore/DerivedSources-input.xcfilelist
-@@ -100,20 +100,25 @@ $(PROJECT_DIR)/inspector/protocol/CPUProfiler.json
+@@ -96,20 +96,25 @@ $(PROJECT_DIR)/inspector/protocol/CPUProfiler.json
$(PROJECT_DIR)/inspector/protocol/CSS.json
$(PROJECT_DIR)/inspector/protocol/Canvas.json
$(PROJECT_DIR)/inspector/protocol/Console.json
@@ -60,10 +60,10 @@ index 726fff0b42d9c68f6bc2264e80ffaba5ecdc9c19..e0467722a0a84a7bd97ee1cf83792e3b
$(PROJECT_DIR)/inspector/protocol/Security.json
$(PROJECT_DIR)/inspector/protocol/ServiceWorker.json
diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make
-index f578bae225764bc744094224bbb26135b65fbe95..6aa5de1e3e410dbd261c4eefd7d1b6939ede60bd 100644
+index 49802c7c4d5f37fe293e121cb556b48e508bc29b..3b40df8dea961f0f26ab4706601e8fca6ed0dedd 100644
--- a/Source/JavaScriptCore/DerivedSources.make
+++ b/Source/JavaScriptCore/DerivedSources.make
-@@ -294,21 +294,26 @@ INSPECTOR_DOMAINS := \
+@@ -290,21 +290,26 @@ INSPECTOR_DOMAINS := \
$(JavaScriptCore)/inspector/protocol/CSS.json \
$(JavaScriptCore)/inspector/protocol/Canvas.json \
$(JavaScriptCore)/inspector/protocol/Console.json \
@@ -89,7 +89,7 @@ index f578bae225764bc744094224bbb26135b65fbe95..6aa5de1e3e410dbd261c4eefd7d1b693
+ $(JavaScriptCore)/inspector/protocol/Screencast.json \
$(JavaScriptCore)/inspector/protocol/Security.json \
$(JavaScriptCore)/inspector/protocol/ServiceWorker.json \
- $(JavaScriptCore)/inspector/protocol/Target.json \
+ $(JavaScriptCore)/inspector/protocol/Storage.json \
diff --git a/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp b/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp
index 9bc5d1fd8e2a7e576be046b3c6ae1266696cf552..610f810db1dd6865c500c0796386a8284f4178e9 100644
--- a/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp
@@ -220,15 +220,14 @@ index b68a7eb5e8d26ea7631b451f629734c886896684..92dba414b7e9c3587ae40c4cb7bb6e4f
}
diff --git a/Source/JavaScriptCore/inspector/InspectorTarget.h b/Source/JavaScriptCore/inspector/InspectorTarget.h
-index 421d62c0071a43b7fb111a4e2b120e28c5ba96af..de764f8519c3df6a9325d3eb87e7fe907c5b5b6a 100644
+index 421d62c0071a43b7fb111a4e2b120e28c5ba96af..11971ecdb69c7af1e05e909e5897f04900469047 100644
--- a/Source/JavaScriptCore/inspector/InspectorTarget.h
+++ b/Source/JavaScriptCore/inspector/InspectorTarget.h
-@@ -61,8 +61,12 @@ public:
+@@ -61,8 +61,11 @@ public:
virtual void connect(FrontendChannel::ConnectionType) = 0;
virtual void disconnect() = 0;
virtual void sendMessageToTargetBackend(const String&) = 0;
+ virtual void activate(String& error) { error = "Target cannot be activated"_s; }
-+ virtual void close(String& error, bool /* runBeforeUnload */) { error = "Target cannot be closed"_s; }
private:
+ virtual void willResume() { }
@@ -296,10 +295,10 @@ index f7ed41f0b3aaa9bb0eb388c4edbef2645e9b1dd4..511ff1799f7480c85fb46beda36fb52f
Protocol::ErrorStringOr<Ref<Protocol::Runtime::ObjectPreview>> getPreview(const Protocol::Runtime::RemoteObjectId&) final;
Protocol::ErrorStringOr<std::tuple<Ref<JSON::ArrayOf<Protocol::Runtime::PropertyDescriptor>>, RefPtr<JSON::ArrayOf<Protocol::Runtime::InternalPropertyDescriptor>>>> getProperties(const Protocol::Runtime::RemoteObjectId&, std::optional<bool>&& ownProperties, std::optional<int>&& fetchStart, std::optional<int>&& fetchCount, std::optional<bool>&& generatePreview) final;
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
-index 38d8aa7a256deab40470631c8f2231d9d34613e1..6c7f776c0b7f2ab7a1a3870ebaa42a3da5ad794c 100644
+index 38d8aa7a256deab40470631c8f2231d9d34613e1..d139716c42eac4ca2233d592dac5267499fb2c91 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
+++ b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
-@@ -90,6 +90,34 @@ Protocol::ErrorStringOr<void> InspectorTargetAgent::sendMessageToTarget(const St
+@@ -90,6 +90,20 @@ Protocol::ErrorStringOr<void> InspectorTargetAgent::sendMessageToTarget(const St
return { };
}
@@ -316,25 +315,11 @@ index 38d8aa7a256deab40470631c8f2231d9d34613e1..6c7f776c0b7f2ab7a1a3870ebaa42a3d
+
+ return { };
+}
-+
-+Protocol::ErrorStringOr<void> InspectorTargetAgent::close(const String& targetId, std::optional<bool>&& runBeforeUnload)
-+{
-+ InspectorTarget* target = m_targets.get(targetId);
-+ if (!target)
-+ return makeUnexpected("Missing target for given targetId"_s);
-+
-+ String errorString;
-+ target->close(errorString, runBeforeUnload && *runBeforeUnload);
-+ if (!errorString.isEmpty())
-+ return makeUnexpected(errorString);
-+
-+ return { };
-+}
+
void InspectorTargetAgent::sendMessageFromTargetToFrontend(const String& targetId, const String& message)
{
m_frontendDispatcher->dispatchMessageFromTarget(targetId, message);
-@@ -147,7 +175,17 @@ void InspectorTargetAgent::targetDestroyed(InspectorTarget& target)
+@@ -147,7 +161,17 @@ void InspectorTargetAgent::targetDestroyed(InspectorTarget& target)
if (!m_isConnected)
return;
@@ -354,22 +339,21 @@ index 38d8aa7a256deab40470631c8f2231d9d34613e1..6c7f776c0b7f2ab7a1a3870ebaa42a3d
void InspectorTargetAgent::didCommitProvisionalTarget(const String& oldTargetID, const String& committedTargetID)
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h
-index 0b7d732f036fce96b01bd06f4c47f5d471a0ab38..a9efea4bec66aa68966c99d9e77f8a36f7f7205a 100644
+index 0b7d732f036fce96b01bd06f4c47f5d471a0ab38..9f33772e175ac35eb6662d127dc51e1f57a96a4b 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h
+++ b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.h
-@@ -53,8 +53,11 @@ public:
+@@ -53,8 +53,10 @@ public:
Protocol::ErrorStringOr<void> setPauseOnStart(bool) final;
Protocol::ErrorStringOr<void> resume(const String& targetId) final;
Protocol::ErrorStringOr<void> sendMessageToTarget(const String& targetId, const String& message) final;
+ Protocol::ErrorStringOr<void> activate(const String& targetId) override;
-+ Protocol::ErrorStringOr<void> close(const String& targetId, std::optional<bool>&& runBeforeUnload) override;
// Target lifecycle.
+ void targetCrashed(InspectorTarget&);
void targetCreated(InspectorTarget&);
void targetDestroyed(InspectorTarget&);
void didCommitProvisionalTarget(const String& oldTargetID, const String& committedTargetID);
-@@ -62,6 +65,9 @@ public:
+@@ -62,6 +64,9 @@ public:
// Target messages.
void sendMessageFromTargetToFrontend(const String& targetId, const String& message);
@@ -380,7 +364,7 @@ index 0b7d732f036fce96b01bd06f4c47f5d471a0ab38..a9efea4bec66aa68966c99d9e77f8a36
// FrontendChannel
FrontendChannel::ConnectionType connectionType() const;
diff --git a/Source/JavaScriptCore/inspector/protocol/DOM.json b/Source/JavaScriptCore/inspector/protocol/DOM.json
-index 6e8fdd27aca49bfc534ea3c3f960b419dbb0dc9f..eca174d4507a70ef4066babaa83c992009a00a88 100644
+index e5da964502fbc1dad22c59fd178d7cc6e64b185e..241c18989deb8bbc4608b6190afe4aacbbd11c74 100644
--- a/Source/JavaScriptCore/inspector/protocol/DOM.json
+++ b/Source/JavaScriptCore/inspector/protocol/DOM.json
@@ -80,6 +80,16 @@
@@ -400,9 +384,9 @@ index 6e8fdd27aca49bfc534ea3c3f960b419dbb0dc9f..eca174d4507a70ef4066babaa83c9920
{
"id": "EventListener",
"type": "object",
-@@ -740,7 +750,10 @@
+@@ -749,7 +759,10 @@
"description": "Resolves JavaScript node object for given node id.",
- "targetTypes": ["page"],
+ "targetTypes": ["frame", "page"],
"parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to resolve." },
+ { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Id of the node to resolve." },
@@ -412,7 +396,7 @@ index 6e8fdd27aca49bfc534ea3c3f960b419dbb0dc9f..eca174d4507a70ef4066babaa83c9920
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
],
"returns": [
-@@ -817,6 +830,46 @@
+@@ -827,6 +840,46 @@
"returns": [
{ "name": "mediaStats", "$ref": "MediaStats", "description": "An interleaved array of node attribute names and values." }
]
@@ -503,13 +487,25 @@ index 0000000000000000000000000000000000000000..79edea03fed4e9be5da96e1275e182a4
+}
diff --git a/Source/JavaScriptCore/inspector/protocol/Emulation.json b/Source/JavaScriptCore/inspector/protocol/Emulation.json
new file mode 100644
-index 0000000000000000000000000000000000000000..8377901cb3ad75c29532a1f0f547efb53558a327
+index 0000000000000000000000000000000000000000..3271f8aacbd1d4489332565252cdfe8bbddd3cf6
--- /dev/null
+++ b/Source/JavaScriptCore/inspector/protocol/Emulation.json
-@@ -0,0 +1,59 @@
+@@ -0,0 +1,69 @@
+{
+ "domain": "Emulation",
+ "availability": ["web"],
++ "types": [
++ {
++ "id": "AuthCredentials",
++ "type": "object",
++ "description": "Credentials for HTTP authentication.",
++ "properties": [
++ { "name": "username", "type": "string" },
++ { "name": "password", "type": "string" },
++ { "name": "origin", "type": "string", "optional": true, "description": "When specified, the credentials are only used for challenges from the matching origin." }
++ ]
++ }
++ ],
+ "commands": [
+ {
+ "name": "setDeviceMetricsOverride",
@@ -531,11 +527,9 @@ index 0000000000000000000000000000000000000000..8377901cb3ad75c29532a1f0f547efb5
+ },
+ {
+ "name": "setAuthCredentials",
-+ "description": "Credentials to use during HTTP authentication.",
++ "description": "Credentials to use during HTTP authentication. The first credentials with matching origin are used. When missing, automation handling of authentication challenges is disabled.",
+ "parameters": [
-+ { "name": "username", "type": "string", "optional": true },
-+ { "name": "password", "type": "string", "optional": true },
-+ { "name": "origin", "type": "string", "optional": true }
++ { "name": "credentials", "type": "array", "items": { "$ref": "AuthCredentials" }, "optional": true }
+ ]
+ },
+ {
@@ -837,7 +831,7 @@ index 0000000000000000000000000000000000000000..1c43b476603325fa412bcfded9163e7a
+ ]
+}
diff --git a/Source/JavaScriptCore/inspector/protocol/Network.json b/Source/JavaScriptCore/inspector/protocol/Network.json
-index a535818daee8ec8bea89658d12a04109f2841567..26f19ac2846b72dd71b5defe877b93c47f72b23a 100644
+index 9b26b53e22fd5ddbb6aaf3b4cfaf7180b665e357..22e85b3c2b79606ca2da401f6e93f4e7a10975bc 100644
--- a/Source/JavaScriptCore/inspector/protocol/Network.json
+++ b/Source/JavaScriptCore/inspector/protocol/Network.json
@@ -361,6 +361,13 @@
@@ -855,27 +849,21 @@ index a535818daee8ec8bea89658d12a04109f2841567..26f19ac2846b72dd71b5defe877b93c4
],
"events": [
diff --git a/Source/JavaScriptCore/inspector/protocol/Page.json b/Source/JavaScriptCore/inspector/protocol/Page.json
-index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1435403e7 100644
+index 992301813442154b80c1feffa63ca86389130154..439318d8a9465279cc1722c45e36e0f64c907d30 100644
--- a/Source/JavaScriptCore/inspector/protocol/Page.json
+++ b/Source/JavaScriptCore/inspector/protocol/Page.json
-@@ -20,7 +20,15 @@
+@@ -27,7 +27,9 @@
"ScriptEnabled",
"ShowDebugBorders",
"ShowRepaintCounter",
- "WebSecurityEnabled"
+ "WebSecurityEnabled",
+ "DeviceOrientationEventEnabled",
-+ "SpeechRecognitionEnabled",
-+ "PointerLockEnabled",
-+ "NotificationsEnabled",
-+ "FullScreenEnabled",
-+ "InputTypeMonthEnabled",
-+ "InputTypeWeekEnabled",
-+ "FixedBackgroundsPaintRelativeToDocument"
++ "SpeechRecognitionEnabled"
]
},
{
-@@ -56,12 +64,24 @@
+@@ -63,12 +65,24 @@
"enum": ["Viewport", "Page"],
"description": "Coordinate system used by supplied coordinates."
},
@@ -900,7 +888,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
{
"id": "Frame",
"type": "object",
-@@ -126,6 +146,16 @@
+@@ -133,6 +147,16 @@
{ "name": "sameSite", "$ref": "CookieSameSitePolicy", "description": "Cookie Same-Site policy." },
{ "name": "partitionKey", "type": "string", "optional": true, "description": "Cookie partition key. If null and partitioned property is true, then key must be computed." }
]
@@ -917,7 +905,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
}
],
"commands": [
-@@ -145,6 +175,14 @@
+@@ -152,6 +176,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)." }
]
},
@@ -932,7 +920,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
{
"name": "overrideUserAgent",
"description": "Override's the user agent of the inspected page",
-@@ -153,6 +191,14 @@
+@@ -160,6 +192,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." }
]
},
@@ -947,7 +935,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
{
"name": "overrideSetting",
"description": "Allows the frontend to override the inspected page's settings.",
-@@ -277,6 +323,28 @@
+@@ -287,6 +327,28 @@
{ "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." }
]
},
@@ -976,7 +964,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
{
"name": "snapshotNode",
"description": "Capture a snapshot of the specified node that does not include unrelated layers.",
-@@ -297,10 +365,13 @@
+@@ -307,10 +369,13 @@
{ "name": "y", "type": "integer", "description": "Y coordinate" },
{ "name": "width", "type": "integer", "description": "Rectangle width" },
{ "name": "height", "type": "integer", "description": "Rectangle height" },
@@ -984,7 +972,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
+ { "name": "coordinateSystem", "$ref": "CoordinateSystem", "description": "Indicates the coordinate system of the supplied rectangle." },
+ { "name": "omitDeviceScaleFactor", "type": "boolean", "optional": true, "description": "By default, screenshot is inflated by device scale factor to avoid blurry image. This flag disables it." },
+ { "name": "format", "$ref": "ImageFormat", "optional": true, "description": "Image format of the resulting snapshot. Defaults to \"png\"." },
-+ { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from 0 to 100 (ignored for the \"png\" format). Defaults to 80." }
++ { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from 0 to 100 (ignored for the \"png\" format). For \"jpeg\" it defaults to 80. For \"webp\", omitting the quality or setting it to 100 produces a lossless image; any other value uses lossy compression at that quality." }
],
"returns": [
- { "name": "dataURL", "type": "string", "description": "Base64-encoded image data (PNG)." }
@@ -992,7 +980,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
]
},
{
-@@ -315,12 +386,54 @@
+@@ -325,12 +390,54 @@
{
"name": "setScreenSizeOverride",
"description": "Overrides screen size exposed to DOM and used in media queries for testing with provided values.",
@@ -1048,7 +1036,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
}
],
"events": [
-@@ -328,14 +441,16 @@
+@@ -338,14 +445,16 @@
"name": "domContentEventFired",
"targetTypes": ["page"],
"parameters": [
@@ -1067,7 +1055,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
]
},
{
-@@ -345,6 +460,14 @@
+@@ -355,6 +464,14 @@
{ "name": "frame", "$ref": "Frame", "description": "Frame object." }
]
},
@@ -1082,7 +1070,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
{
"name": "frameDetached",
"description": "Fired when frame has been detached from its parent.",
-@@ -353,6 +476,22 @@
+@@ -362,6 +479,22 @@
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has been detached." }
]
},
@@ -1105,7 +1093,7 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
{
"name": "defaultUserPreferencesDidChange",
"description": "Fired when the default value of a user preference changes at the system level.",
-@@ -360,6 +499,42 @@
+@@ -369,6 +502,42 @@
"parameters": [
{ "name": "preferences", "type": "array", "items": { "$ref": "UserPreference" }, "description": "List of user preferences that can be overriden and their new system (default) values." }
]
@@ -1150,10 +1138,10 @@ index 8113d39cf01d78e6d5ba1e0c8bcbdea9b7ff667f..1cec5a9de917834f2671ed0000129bb1
}
diff --git a/Source/JavaScriptCore/inspector/protocol/Playwright.json b/Source/JavaScriptCore/inspector/protocol/Playwright.json
new file mode 100644
-index 0000000000000000000000000000000000000000..ade3e257b614f210ba5dcc024df81642425f8d51
+index 0000000000000000000000000000000000000000..9eb1da1d598cdf0bfba38758562aeab5cf3840ac
--- /dev/null
+++ b/Source/JavaScriptCore/inspector/protocol/Playwright.json
-@@ -0,0 +1,310 @@
+@@ -0,0 +1,320 @@
+{
+ "domain": "Playwright",
+ "availability": ["web"],
@@ -1187,7 +1175,8 @@ index 0000000000000000000000000000000000000000..ade3e257b614f210ba5dcc024df81642
+ { "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." },
+ { "name": "secure", "type": "boolean", "description": "True if cookie is secure." },
+ { "name": "session", "type": "boolean", "description": "True if cookie is session cookie." },
-+ { "name": "sameSite", "$ref": "CookieSameSitePolicy", "description": "Cookie Same-Site policy." }
++ { "name": "sameSite", "$ref": "CookieSameSitePolicy", "description": "Cookie Same-Site policy." },
++ { "name": "partitionKey", "type": "string", "optional": true, "description": "Cookie partition key for partitioned (CHIPS) cookies." }
+ ]
+ },
+ {
@@ -1203,7 +1192,8 @@ index 0000000000000000000000000000000000000000..ade3e257b614f210ba5dcc024df81642
+ { "name": "httpOnly", "type": "boolean", "optional": true, "description": "True if cookie is http-only." },
+ { "name": "secure", "type": "boolean", "optional": true, "description": "True if cookie is secure." },
+ { "name": "session", "type": "boolean", "optional": true, "description": "True if cookie is session cookie." },
-+ { "name": "sameSite", "$ref": "CookieSameSitePolicy", "optional": true, "description": "Cookie Same-Site policy." }
++ { "name": "sameSite", "$ref": "CookieSameSitePolicy", "optional": true, "description": "Cookie Same-Site policy." },
++ { "name": "partitionKey", "type": "string", "optional": true, "description": "Cookie partition key for partitioned (CHIPS) cookies." }
+ ]
+ },
+ {
@@ -1338,6 +1328,14 @@ index 0000000000000000000000000000000000000000..ade3e257b614f210ba5dcc024df81642
+ ]
+ },
+ {
++ "name": "closePage",
++ "description": "Closes the page, destroying the page proxy. Works for both live and crashed pages.",
++ "parameters": [
++ { "name": "pageProxyId", "$ref": "PageProxyID", "description": "Unique identifier of the page proxy." },
++ { "name": "runBeforeUnload", "type": "boolean", "optional": true, "description": "Whether to run the beforeunload page handlers." }
++ ]
++ },
++ {
+ "name": "getAllCookies",
+ "description": "Returns all cookies in the given browser context.",
+ "async": true,
@@ -1553,7 +1551,7 @@ index 0000000000000000000000000000000000000000..8546676698ddb1e0606068dd99f66cc8
+ ]
+}
diff --git a/Source/JavaScriptCore/inspector/protocol/Target.json b/Source/JavaScriptCore/inspector/protocol/Target.json
-index a861a83b87e4e7752e547b7070ec1ef26e1cc3e5..16d6ec26034758e127dcb599f5cb170823182470 100644
+index a861a83b87e4e7752e547b7070ec1ef26e1cc3e5..9003128bf07db44103604b522499433bc7a9b98b 100644
--- a/Source/JavaScriptCore/inspector/protocol/Target.json
+++ b/Source/JavaScriptCore/inspector/protocol/Target.json
@@ -10,7 +10,7 @@
@@ -1565,7 +1563,7 @@ index a861a83b87e4e7752e547b7070ec1ef26e1cc3e5..16d6ec26034758e127dcb599f5cb1708
{ "name": "isPaused", "type": "boolean", "optional": true, "description": "Whether the target is paused on start and has to be explicitely resumed by inspector." }
]
}
-@@ -37,6 +37,21 @@
+@@ -37,6 +37,13 @@
{ "name": "targetId", "type": "string" },
{ "name": "message", "type": "string", "description": "JSON Inspector Protocol message (command) to be dispatched on the backend." }
]
@@ -1575,19 +1573,11 @@ index a861a83b87e4e7752e547b7070ec1ef26e1cc3e5..16d6ec26034758e127dcb599f5cb1708
+ "description": "Reveals the target on screen.",
+ "parameters": [
+ { "name": "targetId", "type": "string" }
-+ ]
-+ },
-+ {
-+ "name": "close",
-+ "description": "Closes the target.",
-+ "parameters": [
-+ { "name": "targetId", "type": "string" },
-+ { "name": "runBeforeUnload", "type": "boolean", "optional": true }
+ ]
}
],
"events": [
-@@ -49,7 +64,8 @@
+@@ -49,7 +56,8 @@
{
"name": "targetDestroyed",
"parameters": [
@@ -1610,7 +1600,7 @@ index 6af957ee69490bad4443e90161adc2230c329105..1270e77b913578ba8965fdd30c4bd446
private:
enum class ArgumentRequirement { No, Yes };
diff --git a/Source/ThirdParty/skia/CMakeLists.txt b/Source/ThirdParty/skia/CMakeLists.txt
-index 607a4b0f761b0aadd3ca8b83e080519ad6f97715..609f5b23e6ebd2629a1313673d9d8ea5d6fc57b7 100644
+index 93b6d8992c6efd5fc5046c5f2954cd3179f29579..81814c2241012aedb0c785ce972aa5fa5a627791 100644
--- a/Source/ThirdParty/skia/CMakeLists.txt
+++ b/Source/ThirdParty/skia/CMakeLists.txt
@@ -10,6 +10,8 @@ if (USE_SKIA_ENCODERS)
@@ -1631,10 +1621,27 @@ index 607a4b0f761b0aadd3ca8b83e080519ad6f97715..609f5b23e6ebd2629a1313673d9d8ea5
WEBKIT_ADD_TARGET_CXX_FLAGS(Skia
diff --git a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
-index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c179422f42 100644
+index e589b9153e24c0b6ba8bead6596e5cf9122f3e60..b925c490c0e7c01c2b7a3bb6a99c5eb11435655e 100644
--- a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
+++ b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
-@@ -619,6 +619,7 @@ ApplePayEnabled:
+@@ -185,6 +185,7 @@ AccentColorEnabled:
+ "PLATFORM(COCOA) || USE(THEME_ADWAITA)": true
+ default: false
+
++# Playwright: enable on all platforms to align with Safari.
+ AccessHandleEnabled:
+ type: bool
+ status: mature
+@@ -196,7 +197,7 @@ AccessHandleEnabled:
+ default: false
+ WebKit:
+ "PLATFORM(COCOA)" : true
+- default: false
++ default: true
+ WebCore:
+ "PLATFORM(COCOA)" : true
+ default: false
+@@ -653,6 +654,7 @@ ApplePayEnabled:
richJavaScript: true
# FIXME: This is on by default in WebKit2 PLATFORM(COCOA). Perhaps we should consider turning it on for WebKitLegacy as well.
@@ -1642,7 +1649,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
AsyncClipboardAPIEnabled:
type: bool
status: mature
-@@ -629,7 +630,7 @@ AsyncClipboardAPIEnabled:
+@@ -663,7 +665,7 @@ AsyncClipboardAPIEnabled:
default: false
WebKit:
"PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)" : true
@@ -1651,7 +1658,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
WebCore:
default: false
-@@ -885,13 +886,10 @@ BlobFileAccessEnforcementEnabled:
+@@ -960,13 +962,10 @@ BlobFileAccessEnforcementEnabled:
sharedPreferenceForWebProcess: true
defaultValue:
WebKitLegacy:
@@ -1665,7 +1672,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
default: false
BlockMediaLayerRehostingInWebContentProcess:
-@@ -2116,6 +2114,7 @@ CrossOriginEmbedderPolicyEnabled:
+@@ -2306,6 +2305,7 @@ CrossOriginEmbedderPolicyEnabled:
WebCore:
default: false
@@ -1673,7 +1680,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
CrossOriginOpenerPolicyEnabled:
type: bool
status: stable
-@@ -2189,6 +2188,7 @@ DOMAudioSessionFullEnabled:
+@@ -2379,6 +2379,7 @@ DOMAudioSessionFullEnabled:
WebCore:
default: false
@@ -1681,7 +1688,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
DOMPasteAccessRequestsEnabled:
type: bool
status: internal
-@@ -2200,7 +2200,7 @@ DOMPasteAccessRequestsEnabled:
+@@ -2390,7 +2391,7 @@ DOMPasteAccessRequestsEnabled:
default: false
WebKit:
"PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(VISION)": true
@@ -1690,7 +1697,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
WebCore:
default: false
-@@ -2281,10 +2281,10 @@ DataListElementEnabled:
+@@ -2471,10 +2472,10 @@ DataListElementEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -1703,25 +1710,65 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
default: false
sharedPreferenceForWebProcess: true
-@@ -2297,7 +2297,7 @@ DataTransferItemsEnabled:
+@@ -2716,7 +2717,7 @@ DirectoryUploadEnabled:
WebKitLegacy:
- default: true
+ default: false
WebKit:
- "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)": true
+ "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)": true
default: false
WebCore:
default: false
-@@ -2540,7 +2540,7 @@ DirectoryUploadEnabled:
- WebKitLegacy:
+@@ -3232,6 +3233,7 @@ FileReaderAPIEnabled:
+ default: true
+ disableInLockdownMode: true
+
++# Playwright: enable on all platforms to align with Safari.
+ FileSystemEnabled:
+ type: bool
+ status: mature
+@@ -3243,13 +3245,14 @@ FileSystemEnabled:
default: false
WebKit:
-- "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)": true
-+ "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)": true
+ "PLATFORM(COCOA)" : true
+- default: false
++ default: true
+ WebCore:
+ "PLATFORM(COCOA)" : true
default: false
+ disableInLockdownMode: true
+ sharedPreferenceForWebProcess: true
+
++# Playwright: enable on all platforms to align with Safari.
+ FileSystemHandleSerializationEnabled:
+ type: bool
+ status: stable
+@@ -3261,13 +3264,14 @@ FileSystemHandleSerializationEnabled:
+ default: false
+ WebKit:
+ "PLATFORM(COCOA)" : true
+- default: false
++ default: true
+ WebCore:
+ "PLATFORM(COCOA)" : true
+ default: false
+ disableInLockdownMode: true
+ sharedPreferenceForWebProcess: true
+
++# Playwright: enable on all platforms to align with Safari.
+ FileSystemWritableStreamEnabled:
+ type: bool
+ status: stable
+@@ -3279,7 +3283,7 @@ FileSystemWritableStreamEnabled:
+ default: false
+ WebKit:
+ "PLATFORM(COCOA)" : true
+- default: false
++ default: true
WebCore:
+ "PLATFORM(COCOA)" : true
default: false
-@@ -3262,10 +3262,10 @@ FullScreenEnabled:
+@@ -3446,10 +3450,10 @@ FullScreenEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -1734,7 +1781,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
default: false
sharedPreferenceForWebProcess: true
-@@ -3606,7 +3606,7 @@ HardwareAccelerationEnabled:
+@@ -3790,7 +3794,7 @@ HardwareAccelerationEnabled:
status: internal
humanReadableName: "Hardware acceleration"
humanReadableDescription: "Enable hardware acceleration"
@@ -1743,7 +1790,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
defaultValue:
WebKitLegacy:
default: true
-@@ -4044,7 +4044,7 @@ InputTypeColorEnabled:
+@@ -4255,7 +4259,7 @@ InputTypeColorEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -1752,7 +1799,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
default: false
WebCore:
default: false
-@@ -4077,7 +4077,7 @@ InputTypeDateEnabled:
+@@ -4288,7 +4292,7 @@ InputTypeDateEnabled:
"PLATFORM(IOS_FAMILY)": true
default: false
WebKit:
@@ -1761,7 +1808,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
default: false
WebCore:
default: false
-@@ -4093,7 +4093,7 @@ InputTypeDateTimeLocalEnabled:
+@@ -4304,7 +4308,7 @@ InputTypeDateTimeLocalEnabled:
"PLATFORM(IOS_FAMILY)": true
default: false
WebKit:
@@ -1770,7 +1817,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
default: false
WebCore:
default: false
-@@ -4125,7 +4125,7 @@ InputTypeTimeEnabled:
+@@ -4337,7 +4341,7 @@ InputTypeTimeEnabled:
"PLATFORM(IOS_FAMILY)": true
default: false
WebKit:
@@ -1779,7 +1826,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
default: false
WebCore:
default: false
-@@ -4186,6 +4186,7 @@ InspectorMaximumResourcesContentSize:
+@@ -4399,6 +4403,7 @@ InspectorMaximumResourcesContentSize:
"PLATFORM(WPE)": 50
default: 200
@@ -1787,7 +1834,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
InspectorStartsAttached:
type: bool
status: embedder
-@@ -4193,7 +4194,7 @@ InspectorStartsAttached:
+@@ -4406,7 +4411,7 @@ InspectorStartsAttached:
exposed: [ WebKit ]
defaultValue:
WebKit:
@@ -1796,7 +1843,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
InspectorSupportsShowingCertificate:
type: bool
-@@ -5830,6 +5831,7 @@ MuteCameraOnMicrophoneInterruptionEnabled:
+@@ -6144,6 +6149,7 @@ MuteCameraOnMicrophoneInterruptionEnabled:
WebCore:
default: false
@@ -1804,7 +1851,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
NavigationAPIEnabled:
type: bool
status: stable
-@@ -5840,10 +5842,10 @@ NavigationAPIEnabled:
+@@ -6154,10 +6160,10 @@ NavigationAPIEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -1817,7 +1864,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
default: false
NavigatorUserAgentDataJavaScriptAPIEnabled:
-@@ -6428,7 +6430,7 @@ PointerLockEnabled:
+@@ -6753,7 +6759,7 @@ PointerLockEnabled:
"PLATFORM(IOS_FAMILY)": false
default: true
WebCore:
@@ -1826,7 +1873,7 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
PopoverAttributeEnabled:
type: bool
-@@ -7058,7 +7060,7 @@ ScreenOrientationAPIEnabled:
+@@ -7430,7 +7436,7 @@ ScreenOrientationAPIEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -1835,11 +1882,42 @@ index aa2cc398647a1ded38c509a379922ce6ed6017cc..106efd19dfcbcabe1c702afe3b5bb8c1
WebCore:
default: false
sharedPreferenceForWebProcess: true
+@@ -8432,6 +8438,7 @@ StandardFontFamily:
+ WebCore:
+ default: '""_str'
+
++# Playwright: enable on all platforms to align with Safari.
+ StorageAPIEnabled:
+ type: bool
+ status: stable
+@@ -8443,11 +8450,12 @@ StorageAPIEnabled:
+ default: false
+ WebKit:
+ "PLATFORM(COCOA)" : true
+- default: false
++ default: true
+ WebCore:
+ "PLATFORM(COCOA)" : true
+ default: false
+
++# Playwright: enable on all platforms to align with Safari.
+ StorageAPIEstimateEnabled:
+ type: bool
+ status: stable
+@@ -8459,7 +8467,7 @@ StorageAPIEstimateEnabled:
+ default: false
+ WebKit:
+ "PLATFORM(COCOA)" : true
+- default: false
++ default: true
+ WebCore:
+ "PLATFORM(COCOA)" : true
+ default: false
diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
-index e6257d7388b973f803175cac7fd1dfa8aa4a8951..20a65d120f0c2f78b3580bc4b6709e992a9da615 100644
+index 08d8ea5a09bb3bf0f644b7563bea9e3e4b7ec25f..55ebb869c2412cfd4820c3b87fc79f514223462c 100644
--- a/Source/WTF/wtf/PlatformEnable.h
+++ b/Source/WTF/wtf/PlatformEnable.h
-@@ -467,7 +467,7 @@
+@@ -455,7 +455,7 @@
// ORIENTATION_EVENTS should never get enabled on Desktop, only Mobile.
#if !defined(ENABLE_ORIENTATION_EVENTS)
@@ -1848,7 +1926,7 @@ index e6257d7388b973f803175cac7fd1dfa8aa4a8951..20a65d120f0c2f78b3580bc4b6709e99
#endif
#if OS(WINDOWS)
-@@ -580,7 +580,7 @@
+@@ -572,7 +572,7 @@
#endif
#if !defined(ENABLE_TOUCH_EVENTS)
@@ -1858,10 +1936,10 @@ index e6257d7388b973f803175cac7fd1dfa8aa4a8951..20a65d120f0c2f78b3580bc4b6709e99
#if !defined(ENABLE_CSS_TAP_HIGHLIGHT_COLOR) && ENABLE(TOUCH_EVENTS)
diff --git a/Source/WTF/wtf/PlatformEnableCocoa.h b/Source/WTF/wtf/PlatformEnableCocoa.h
-index 80a068153aa38fb686ea117fe13d2e32f460cc0b..643c12615ced8ab7f97f893428d95806b6b457d7 100644
+index a0fcba3553385614729d64ea37817795fb9e121d..d18617518fcb7a8c3cd8ec8be93ba1d46aa04b6c 100644
--- a/Source/WTF/wtf/PlatformEnableCocoa.h
+++ b/Source/WTF/wtf/PlatformEnableCocoa.h
-@@ -832,7 +832,7 @@
+@@ -843,7 +843,7 @@
#endif
#if !defined(ENABLE_SEC_ITEM_SHIM)
@@ -1871,10 +1949,10 @@ index 80a068153aa38fb686ea117fe13d2e32f460cc0b..643c12615ced8ab7f97f893428d95806
#if !defined(ENABLE_SERVER_PRECONNECT)
diff --git a/Source/WTF/wtf/StdLibExtras.h b/Source/WTF/wtf/StdLibExtras.h
-index 0b20a1ae6f61a574689e77b606dabb2589b99ad4..cbd4a349a20e27a590323f458a7ce39c0c688c80 100644
+index 97424bd2608e685e1508f54bcb339f43ddcd187b..3728400291efc5462c46d7b92b9734e0b18fc493 100644
--- a/Source/WTF/wtf/StdLibExtras.h
+++ b/Source/WTF/wtf/StdLibExtras.h
-@@ -1621,6 +1621,39 @@ template<typename T, typename U> constexpr auto forward_like(U&& value) -> detai
+@@ -1625,6 +1625,39 @@ template<typename T, typename U> constexpr auto forward_like(U&& value) -> detai
template<typename T, typename U> constexpr auto forward_like_preserving_const(U&& value) -> detail::forward_like_preserving_const_impl<T, U> { return static_cast<detail::forward_like_preserving_const_impl<T, U>>(value); }
} // namespace WTF
@@ -1914,27 +1992,11 @@ index 0b20a1ae6f61a574689e77b606dabb2589b99ad4..cbd4a349a20e27a590323f458a7ce39c
using WTF::GB;
using WTF::KB;
using WTF::MB;
-diff --git a/Source/WTF/wtf/unicode/UTF8Conversion.h b/Source/WTF/wtf/unicode/UTF8Conversion.h
-index 8f551b2abcca06a623c432ac52db75de16849e8e..92bbd90bd032b9a9290ec741e7b38f9e9438f97e 100644
---- a/Source/WTF/wtf/unicode/UTF8Conversion.h
-+++ b/Source/WTF/wtf/unicode/UTF8Conversion.h
-@@ -30,6 +30,11 @@
- #include <wtf/ExportMacros.h>
- #include <wtf/text/Latin1Character.h>
-
-+// Can be probably removed when we drop Debian 11.
-+#ifdef Success
-+#undef Success
-+#endif
-+
- namespace WTF {
- namespace Unicode {
-
diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make
-index ceaf5b2c47117bfcaa93cf247af87c17de6f81cc..5e59987eb86ba02ad3089ca96274ed325d3d2433 100644
+index 6f2ea0fe530e94a3372c8ab699aacbc7820e73df..1d68b0907b26431b4639e4d5d4f7d2588ba38cb0 100644
--- a/Source/WebCore/DerivedSources.make
+++ b/Source/WebCore/DerivedSources.make
-@@ -1260,6 +1260,10 @@ JS_BINDING_IDLS := \
+@@ -1259,6 +1259,10 @@ JS_BINDING_IDLS := \
$(WebCore)/dom/SubscriberCallback.idl \
$(WebCore)/dom/SubscriptionObserver.idl \
$(WebCore)/dom/SubscriptionObserverCallback.idl \
@@ -1945,7 +2007,7 @@ index ceaf5b2c47117bfcaa93cf247af87c17de6f81cc..5e59987eb86ba02ad3089ca96274ed32
$(WebCore)/dom/Text.idl \
$(WebCore)/dom/TextDecoder.idl \
$(WebCore)/dom/TextDecoderStream.idl \
-@@ -1886,9 +1890,6 @@ JS_BINDING_IDLS := \
+@@ -1885,9 +1889,6 @@ JS_BINDING_IDLS := \
ADDITIONAL_BINDING_IDLS = \
DocumentTouch.idl \
GestureEvent.idl \
@@ -1970,42 +2032,6 @@ index f468a12c6cae3ecc22fd9d7eacccb55c199f4dab..7fdb15208f24e4c91267c7d9fb776b77
return false;
}
-diff --git a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm b/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
-index de8ce576a7e7156460680e5ea11f10a84cda83ec..3b502fa4663dc528cb892d28e5217c4ec8bb7ea4 100644
---- a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
-+++ b/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
-@@ -198,6 +198,7 @@ - (void)sendEndIfNeeded
-
- - (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidChange:(BOOL)available
- {
-+ UNUSED_PARAM(speechRecognizer);
- ASSERT(isMainThread());
-
- if (available || !_task)
-@@ -211,6 +212,7 @@ - (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidC
-
- - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTranscription:(SFTranscription *)transcription
- {
-+ UNUSED_PARAM(task);
- ASSERT(isMainThread());
-
- [self sendSpeechStartIfNeeded];
-@@ -219,6 +221,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTran
-
- - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecognition:(SFSpeechRecognitionResult *)recognitionResult
- {
-+ UNUSED_PARAM(task);
- ASSERT(isMainThread());
-
- if (task.state == SFSpeechRecognitionTaskStateCanceling || (!_doMultipleRecognitions && task.state == SFSpeechRecognitionTaskStateCompleted))
-@@ -232,6 +235,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecogniti
-
- - (void)speechRecognitionTaskWasCancelled:(SFSpeechRecognitionTask *)task
- {
-+ UNUSED_PARAM(task);
- ASSERT(isMainThread());
-
- [self sendSpeechEndIfNeeded];
diff --git a/Source/WebCore/PlatformWin.cmake b/Source/WebCore/PlatformWin.cmake
index f86ea769e299e1f892a777282ac863f4d37769c7..45c5ec2270555eea7b025c318945225f95ac8883 100644
--- a/Source/WebCore/PlatformWin.cmake
@@ -2019,10 +2045,10 @@ index f86ea769e299e1f892a777282ac863f4d37769c7..45c5ec2270555eea7b025c318945225f
elseif (USE_SKIA)
list(APPEND WebCore_SOURCES
diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt
-index e368c8b033bcf2d8c897d39a4f9d7af45309dbab..5aefd845f429f9a864e0470a3b443a2afdda8c85 100644
+index ea53c6dc3e609b275d81c3156eb770778f644589..1d61331cef78986be26890b44bf7896acef2977b 100644
--- a/Source/WebCore/SourcesCocoa.txt
+++ b/Source/WebCore/SourcesCocoa.txt
-@@ -748,3 +748,9 @@ testing/cocoa/WebViewVisualIdentificationOverlay.mm @nonARC
+@@ -749,3 +749,9 @@ testing/cocoa/WebViewVisualIdentificationOverlay.mm @nonARC
platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify // ANGLE headers redefine GL types/macros that collide with system OpenGL.
platform/graphics/cocoa/GraphicsContextGLCocoa.mm @nonARC @no-unify // ANGLE headers redefine GL types/macros that collide with system OpenGL.
platform/graphics/cv/GraphicsContextGLCVCocoa.mm @nonARC @no-unify // ANGLE headers redefine GL types/macros that collide with system OpenGL.
@@ -2061,12 +2087,12 @@ index 39f5f71efa4e15ee6a07709bb21aa18c1a9c8389..16ec8acbdaf6d1a465280f592c7fb43e
+JSSpeechSynthesisErrorEventInit.cpp
+JSSpeechSynthesisEventInit.cpp
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e26283825585f97 100644
+index 84ed8bf7f5ca2a46f0e34d0f6e9fdac956143153..39963d9c37f5afe4c52be2fa003c144b5edad84c 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-@@ -7076,6 +7076,13 @@
- E5F06AF724D4BB5600BBC4F8 /* DateTimeEditElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E5F06AF524D4BB5600BBC4F8 /* DateTimeEditElement.h */; };
+@@ -7098,6 +7098,13 @@
E5F67D962B65CDBE00CC30DE /* AttachmentAssociatedElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E5F67D932B65CC2400CC30DE /* AttachmentAssociatedElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ E6F93CF6265A334D32D41777 /* FrameCSSAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C0F6A57EB56935552649019 /* FrameCSSAgent.h */; };
E71467B324ABAEF200FB2F50 /* AudioNodeOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = E71467B124ABAEF100FB2F50 /* AudioNodeOptions.h */; };
+ F050E16823AC9C080011CE47 /* PlatformTouchEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F050E16623AC9C070011CE47 /* PlatformTouchEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ F050E16A23AD660C0011CE47 /* Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F050E16923AD660C0011CE47 /* Touch.cpp */; };
@@ -2078,8 +2104,8 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
E71467B624ABAF1D00FB2F50 /* PannerOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = E71467B524ABAF1D00FB2F50 /* PannerOptions.h */; };
E755E89224C7434B009F7C23 /* PeriodicWaveConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = E755E88F24C7434B009F7C23 /* PeriodicWaveConstraints.h */; };
E755E89924C7461D009F7C23 /* PeriodicWaveOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = E755E89624C7461D009F7C23 /* PeriodicWaveOptions.h */; };
-@@ -23189,6 +23196,14 @@
- EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasActivityRecord.h; sourceTree = "<group>"; };
+@@ -23256,6 +23263,14 @@
+ F00DCAFE000000000000A002 /* StyleWhiteSpaceTrim.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = StyleWhiteSpaceTrim.cpp; sourceTree = "<group>"; };
F088343F2E721B29001B2348 /* AXLocalFrame.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AXLocalFrame.h; sourceTree = "<group>"; };
F08834402E721B33001B2348 /* AXLocalFrame.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AXLocalFrame.cpp; sourceTree = "<group>"; };
+ F050E16623AC9C070011CE47 /* PlatformTouchEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformTouchEvent.h; sourceTree = "<group>"; };
@@ -2093,7 +2119,7 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
F12171F316A8BC63000053CA /* WebVTTElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTElement.cpp; sourceTree = "<group>"; };
F12171F416A8BC63000053CA /* WebVTTElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTElement.h; sourceTree = "<group>"; };
F2462F05A319D5DE971FCFBC /* UnifiedSource60-header-RenderStyleGetters.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = "UnifiedSource60-header-RenderStyleGetters.cpp"; sourceTree = "<group>"; };
-@@ -31328,6 +31343,11 @@
+@@ -31398,6 +31413,11 @@
BC4A5324256055590028C592 /* TextDirectionSubmenuInclusionBehavior.h */,
2D4F96F11A1ECC240098BF88 /* TextIndicator.cpp */,
2D4F96F21A1ECC240098BF88 /* TextIndicator.h */,
@@ -2105,7 +2131,7 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
F48570A42644C76D00C05F71 /* TranslationContextMenuInfo.h */,
D640B24C2E3058C800EB6C49 /* UADataValues.h */,
D640B24E2E3058C800EB6C49 /* UADataValues.idl */,
-@@ -39532,6 +39552,8 @@
+@@ -39643,6 +39663,8 @@
29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */,
1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */,
1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */,
@@ -2114,7 +2140,7 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
FE3DC9932D0C063C0021B6FC /* PlatformTZoneImpls.cpp */,
0FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */,
935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,
-@@ -42549,6 +42571,7 @@
+@@ -42673,6 +42695,7 @@
AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */,
6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */,
6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */,
@@ -2122,7 +2148,7 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
7CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */,
7CE7FA591EF882300060C9D6 /* DocumentTouch.h */,
A8185F3209765765005826D9 /* DocumentType.cpp */,
-@@ -47774,6 +47797,8 @@
+@@ -47915,6 +47938,8 @@
F4E90A3C2B52038E002DA469 /* PlatformTextAlternatives.h in Headers */,
0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */,
074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */,
@@ -2131,7 +2157,7 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
CDD08ABD277E542600EA3755 /* PlatformTrackConfiguration.h in Headers */,
CD1F9B022700323D00617EB6 /* PlatformVideoColorPrimaries.h in Headers */,
CD1F9B01270020B700617EB6 /* PlatformVideoColorSpace.h in Headers */,
-@@ -49450,6 +49475,7 @@
+@@ -49596,6 +49621,7 @@
0F54DD081881D5F5003EEDBB /* Touch.h in Headers */,
71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */,
0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */,
@@ -2139,7 +2165,7 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
0F54DD0A1881D5F5003EEDBB /* TouchList.h in Headers */,
070334D71459FFD5008D8D45 /* TrackBase.h in Headers */,
513C7B6E2E7C2E7A00079881 /* TrackInfo.h in Headers */,
-@@ -50724,7 +50750,9 @@
+@@ -50874,7 +50900,9 @@
2D22830323A8470700364B7E /* CursorMac.mm in Sources */,
5CBD59592280E926002B22AA /* CustomHeaderFields.cpp in Sources */,
07E4BDBF2A3A5FAB000D5509 /* DictationCaretAnimator.cpp in Sources */,
@@ -2149,7 +2175,7 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */,
4667EA3E2968D9DA00BAB1E2 /* GameControllerHapticEffect.mm in Sources */,
46FE73D32968E52000B8064C /* GameControllerHapticEngines.mm in Sources */,
-@@ -50821,6 +50849,9 @@
+@@ -50972,6 +51000,9 @@
072F696F2E755BFA00281FC5 /* TextListParser.cpp in Sources */,
BE39137129B267F500FA5D4F /* TextTransformCocoa.cpp in Sources */,
51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
@@ -2160,7 +2186,7 @@ index 073d4bbe83549ad1ed3f9e5056c66d4a3da15396..2a16a55fe8feefc28fe397946e262838
0B2AA9B7DC40569673FC9868 /* UnifiedSource1-header-RenderStyleGetters.cpp in Sources */,
538EC8031F96AF81004D22A8 /* UnifiedSource1-nonARC.mm in Sources */,
diff --git a/Source/WebCore/css/query/MediaQueryFeatures.cpp b/Source/WebCore/css/query/MediaQueryFeatures.cpp
-index e3d2c06a8c561c7489d7315d80976c8f6feff8c4..349e0486dfe266c8edadc9073d4ed37f5f75c461 100644
+index dd3d322ac58e6bf566d4ad8064dbbb06b18c06c4..bd61c5cdb72a1c340000b454f510e521684a6f2c 100644
--- a/Source/WebCore/css/query/MediaQueryFeatures.cpp
+++ b/Source/WebCore/css/query/MediaQueryFeatures.cpp
@@ -404,7 +404,11 @@ static const IdentifierSchema& forcedColorsFeatureSchema()
@@ -2176,7 +2202,7 @@ index e3d2c06a8c561c7489d7315d80976c8f6feff8c4..349e0486dfe266c8edadc9073d4ed37f
return MatchingIdentifiers { CSSValueNone };
}
};
-@@ -592,6 +596,9 @@ static const IdentifierSchema& prefersReducedMotionFeatureSchema()
+@@ -600,6 +604,9 @@ static const IdentifierSchema& prefersReducedMotionFeatureSchema()
[](auto& context) {
bool userPrefersReducedMotion = [&] {
Ref frame = *context.document->frame();
@@ -2187,7 +2213,7 @@ index e3d2c06a8c561c7489d7315d80976c8f6feff8c4..349e0486dfe266c8edadc9073d4ed37f
case ForcedAccessibilityValue::On:
return true;
diff --git a/Source/WebCore/dom/DataTransfer.cpp b/Source/WebCore/dom/DataTransfer.cpp
-index 6fac2c209afa640cf7a305c9c322791c0cce2435..a609e0272959a42dec0e44cfd943ab6a8d78865a 100644
+index 18549ec7ba7a8fd63ffc895aa3f61e38e2f8a27f..df73e3ba571cf096600d0a042883220a6711ec16 100644
--- a/Source/WebCore/dom/DataTransfer.cpp
+++ b/Source/WebCore/dom/DataTransfer.cpp
@@ -531,6 +531,14 @@ Ref<DataTransfer> DataTransfer::createForDrag(const Document& document)
@@ -2219,37 +2245,6 @@ index 64a53ff58bf7bcd9e56ccc8b74cea8c9c75bf89e..10d52432373f02622328f32d3f665ed0
static Ref<DataTransfer> createForDragStartEvent(const Document&);
static Ref<DataTransfer> createForDrop(const Document&, std::unique_ptr<Pasteboard>&&, OptionSet<DragOperation>, bool draggingFiles);
static Ref<DataTransfer> createForUpdatingDropTarget(const Document&, std::unique_ptr<Pasteboard>&&, OptionSet<DragOperation>, bool draggingFiles);
-diff --git a/Source/WebCore/dom/DeviceMotionEvent.idl b/Source/WebCore/dom/DeviceMotionEvent.idl
-index a2e91e304c473d6c2de246e51539fac8e265e216..eb3f2a61f74a7d533fcdc5aedecb723be75ba105 100644
---- a/Source/WebCore/dom/DeviceMotionEvent.idl
-+++ b/Source/WebCore/dom/DeviceMotionEvent.idl
-@@ -20,12 +20,13 @@
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- // https://w3c.github.io/deviceorientation/#devicemotionevent
- [
- Conditional=DEVICE_ORIENTATION,
-+ EnabledBySetting=DeviceOrientationEventEnabled,
- Exposed=Window,
- SecureContext
- ] interface DeviceMotionEvent : Event {
-diff --git a/Source/WebCore/dom/DeviceOrientationEvent.idl b/Source/WebCore/dom/DeviceOrientationEvent.idl
-index 2feeeac677ee3f36cb13c2bac1afbc57fbe70e12..6ed92e45b7659c48b3bb1e24f7f0075117178332 100644
---- a/Source/WebCore/dom/DeviceOrientationEvent.idl
-+++ b/Source/WebCore/dom/DeviceOrientationEvent.idl
-@@ -25,6 +25,7 @@
-
- [
- Conditional=DEVICE_ORIENTATION,
-+ EnabledBySetting=DeviceOrientationEventEnabled,
- Exposed=Window,
- SecureContext
- ] interface DeviceOrientationEvent : Event {
diff --git a/Source/WebCore/dom/PointerEvent.cpp b/Source/WebCore/dom/PointerEvent.cpp
index dd8c59fe17c70a72f03df3c884b5a92f8f655e61..97dc2a0d19f856090041cc3b1b23218c35fbcca4 100644
--- a/Source/WebCore/dom/PointerEvent.cpp
@@ -2393,35 +2388,8 @@ index 25546b5bdf24a88141f2a968c07e9d424d61f7e1..980a173d056b6dd4f89ae394dee01b51
#include <wtf/FixedVector.h>
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
-diff --git a/Source/WebCore/editing/libwpe/EditorLibWPE.cpp b/Source/WebCore/editing/libwpe/EditorLibWPE.cpp
-index d0a3d5c048647b07772e1581c76c4eb60ecf41b0..bec324636991079264e620c0dfdaf9842ff585cd 100644
---- a/Source/WebCore/editing/libwpe/EditorLibWPE.cpp
-+++ b/Source/WebCore/editing/libwpe/EditorLibWPE.cpp
-@@ -35,6 +35,7 @@
- #include "Pasteboard.h"
- #include "Settings.h"
- #include "SimpleRange.h"
-+#include "WebContentReader.h"
- #include "markup.h"
-
- namespace WebCore {
-@@ -100,6 +101,14 @@ void Editor::platformPasteFont()
- {
- }
-
-+RefPtr<DocumentFragment> Editor::webContentFromPasteboard(Pasteboard& pasteboard, const SimpleRange& context, bool allowPlainText, bool& chosePlainText)
-+{
-+ WebContentReader reader(*document().frame(), context, allowPlainText);
-+ pasteboard.read(reader);
-+ chosePlainText = reader.madeFragmentFromPlainText();
-+ return reader.takeFragment();
-+}
-+
- } // namespace WebCore
-
- #endif // USE(LIBWPE)
diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp
-index ac3447184b6d42244da543184702f5d500bb1a63..e23c649494d88d4610a7c9ac9f142a0f5757c7f3 100644
+index 54cd554f3fcd7af0cf684cb595322f7bdefd6c38..f52ce822432fe2f91173085605f208a2bdc78a52 100644
--- a/Source/WebCore/html/FileInputType.cpp
+++ b/Source/WebCore/html/FileInputType.cpp
@@ -39,6 +39,7 @@
@@ -2445,10 +2413,10 @@ index ac3447184b6d42244da543184702f5d500bb1a63..e23c649494d88d4610a7c9ac9f142a0f
return;
diff --git a/Source/WebCore/inspector/FrameInspectorController.cpp b/Source/WebCore/inspector/FrameInspectorController.cpp
-index 2af3d6bb16c29ed5f2f09c34fdf8ebf2a173e768..7a36bf7ac7e93f16e9505c3b6df15446bab84a6d 100644
+index 45372483e32f88363809c77b4a2523c4d992867e..1154cce160d8ab8e4e948960799a7e1a9e012752 100644
--- a/Source/WebCore/inspector/FrameInspectorController.cpp
+++ b/Source/WebCore/inspector/FrameInspectorController.cpp
-@@ -161,6 +161,12 @@ void FrameInspectorController::connectFrontend(Inspector::FrontendChannel& front
+@@ -163,6 +163,12 @@ void FrameInspectorController::connectFrontend(Inspector::FrontendChannel& front
UNUSED_PARAM(isAutomaticInspection);
UNUSED_PARAM(immediatelyPause);
@@ -2461,7 +2429,7 @@ index 2af3d6bb16c29ed5f2f09c34fdf8ebf2a173e768..7a36bf7ac7e93f16e9505c3b6df15446
if (auto* page = m_frame->page())
page->settings().setDeveloperExtrasEnabled(true);
-@@ -175,6 +181,19 @@ void FrameInspectorController::connectFrontend(Inspector::FrontendChannel& front
+@@ -177,6 +183,19 @@ void FrameInspectorController::connectFrontend(Inspector::FrontendChannel& front
m_injectedScriptManager->addClient();
m_agents.didCreateFrontendAndBackend();
}
@@ -2482,10 +2450,10 @@ index 2af3d6bb16c29ed5f2f09c34fdf8ebf2a173e768..7a36bf7ac7e93f16e9505c3b6df15446
void FrameInspectorController::disconnectFrontend(Inspector::FrontendChannel& frontendChannel)
diff --git a/Source/WebCore/inspector/InspectorIdentifierRegistry.cpp b/Source/WebCore/inspector/InspectorIdentifierRegistry.cpp
-index 5e93584ff771f47495036f43d1c40eb052d1db6d..4ace85cb400111278cc4bdd3ce7d04c7df9e89ca 100644
+index 769ff5f40ad82e729dc15144a96e8f2197813b2f..d5cd6c2948129fcc5ffeb001090d20fa8f56e4e5 100644
--- a/Source/WebCore/inspector/InspectorIdentifierRegistry.cpp
+++ b/Source/WebCore/inspector/InspectorIdentifierRegistry.cpp
-@@ -50,20 +50,22 @@ Protocol::Network::FrameId LegacyIdentifierRegistry::frameId(const WebCore::Fram
+@@ -64,20 +64,22 @@ Protocol::Network::FrameId LegacyIdentifierRegistry::frameId(const WebCore::Fram
{
if (!frame)
return emptyString();
@@ -2516,7 +2484,7 @@ index 5e93584ff771f47495036f43d1c40eb052d1db6d..4ace85cb400111278cc4bdd3ce7d04c7
}
WebCore::LocalFrame* LegacyIdentifierRegistry::assertFrame(Protocol::ErrorString& errorString, const Protocol::Network::FrameId& frameId)
-@@ -76,15 +78,19 @@ WebCore::LocalFrame* LegacyIdentifierRegistry::assertFrame(Protocol::ErrorString
+@@ -90,15 +92,19 @@ WebCore::LocalFrame* LegacyIdentifierRegistry::assertFrame(Protocol::ErrorString
Protocol::Network::FrameId LegacyIdentifierRegistry::takeFrame(const WebCore::Frame& frame)
{
@@ -2541,10 +2509,10 @@ index 5e93584ff771f47495036f43d1c40eb052d1db6d..4ace85cb400111278cc4bdd3ce7d04c7
// --- BackendIdentifierRegistry ---
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
-index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa4608d921 100644
+index 04a4d2d337145cdb0cc3e0f6e24f6106caeac71e..95c7b1e417e2a8578f7bd9708b727591480efca3 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
-@@ -667,6 +667,12 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i
+@@ -686,6 +686,12 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i
pageAgent->applyUserAgentOverride(userAgent);
}
@@ -2557,7 +2525,7 @@ index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa
void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents& instrumentingAgents, AtomString& media)
{
if (CheckedPtr pageAgent = instrumentingAgents.enabledPageAgent())
-@@ -764,6 +770,12 @@ void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents& instrumen
+@@ -783,6 +789,12 @@ void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents& instrumen
consoleAgent->didFailLoading(identifier, error); // This should come AFTER resource notification, front-end relies on this.
}
@@ -2570,7 +2538,7 @@ index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa
void InspectorInstrumentation::willLoadXHRSynchronouslyImpl(InstrumentingAgents& instrumentingAgents)
{
if (CheckedPtr networkAgent = instrumentingAgents.enabledNetworkAgent())
-@@ -796,20 +808,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&
+@@ -815,20 +827,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&
void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame)
{
@@ -2594,7 +2562,7 @@ index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa
}
void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame)
-@@ -895,12 +904,6 @@ void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& ins
+@@ -924,12 +933,6 @@ void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& ins
pageDOMDebuggerAgent->frameDocumentUpdated(frame);
}
@@ -2607,7 +2575,7 @@ index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa
void InspectorInstrumentation::frameStartedLoadingImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame)
{
if (frame.isMainFrame()) {
-@@ -931,6 +934,12 @@ void InspectorInstrumentation::accessibilitySettingsDidChangeImpl(InstrumentingA
+@@ -960,6 +963,12 @@ void InspectorInstrumentation::accessibilitySettingsDidChangeImpl(InstrumentingA
inspectorPageAgent->accessibilitySettingsDidChange();
}
@@ -2620,7 +2588,7 @@ index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa
#if ENABLE(DARK_MODE_CSS)
void InspectorInstrumentation::defaultAppearanceDidChangeImpl(InstrumentingAgents& instrumentingAgents)
{
-@@ -983,6 +992,12 @@ void InspectorInstrumentation::interceptResponseImpl(InstrumentingAgents& instru
+@@ -1009,6 +1018,12 @@ void InspectorInstrumentation::interceptResponseImpl(InstrumentingAgents& instru
networkAgent->interceptResponse(response, identifier, WTF::move(handler));
}
@@ -2633,7 +2601,7 @@ index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa
// JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
static bool NODELETE isConsoleAssertMessage(MessageSource source, MessageType type)
{
-@@ -1120,6 +1135,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent
+@@ -1146,6 +1161,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent
canvasAgent->consoleStopRecordingCanvas(context);
}
@@ -2646,7 +2614,7 @@ index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa
void InspectorInstrumentation::didDispatchDOMStorageEventImpl(InstrumentingAgents& instrumentingAgents, const String& key, const String& oldValue, const String& newValue, StorageType storageType, const SecurityOrigin& securityOrigin)
{
if (auto* domStorageAgent = instrumentingAgents.enabledDOMStorageAgent())
-@@ -1417,6 +1438,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins
+@@ -1439,6 +1460,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins
layerTreeAgent->renderLayerDestroyed(renderLayer);
}
@@ -2684,18 +2652,18 @@ index 2a83aecdbc7a799517ea311a26407e72c82443f9..8d36e185ae04ba5c0f79462bbed57baa
{
return globalScope.inspectorController().m_instrumentingAgents;
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
-index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cbe8a43f4b 100644
+index a34d1717de7dda3c71191019ff2c3fb90a4f6e0c..ad62c71e239a1414b4bfc96e170f037b31b0f5d1 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
-@@ -45,6 +45,7 @@
- #include "LocalFrame.h"
- #include "NodeDocument.h"
+@@ -47,6 +47,7 @@
#include "Page.h"
+ #include "RenderElement.h"
+ #include "RenderObjectDocument.h"
+#include "ResourceError.h"
#include "ResourceLoader.h"
#include "ResourceLoaderIdentifier.h"
- #include "StorageArea.h"
-@@ -80,6 +81,7 @@ class Document;
+ #include "ScriptExecutionContext.h"
+@@ -83,6 +84,7 @@ class Document;
class DocumentLoader;
class DocumentThreadableLoader;
class EventListener;
@@ -2703,7 +2671,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
class HTTPHeaderMap;
class InspectorTimelineAgent;
class InstrumentingAgents;
-@@ -204,6 +206,7 @@ public:
+@@ -208,6 +210,7 @@ public:
static void didRecalculateStyle(Document&);
static void didScheduleStyleRecalculation(Document&);
static void applyUserAgentOverride(LocalFrame&, String&);
@@ -2711,7 +2679,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void applyEmulatedMedia(LocalFrame&, AtomString&);
static void flexibleBoxRendererBeganLayout(const RenderObject&);
-@@ -216,6 +219,7 @@ public:
+@@ -220,6 +223,7 @@ public:
static void didReceiveData(LocalFrame*, ResourceLoaderIdentifier, const SharedBuffer*, int encodedDataLength);
static void didFinishLoading(LocalFrame*, DocumentLoader*, ResourceLoaderIdentifier, const NetworkLoadMetrics&, ResourceLoader*);
static void didFailLoading(LocalFrame*, DocumentLoader*, ResourceLoaderIdentifier, const ResourceError&);
@@ -2719,7 +2687,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void willSendRequest(ServiceWorkerGlobalScope&, ResourceLoaderIdentifier, ResourceRequest&);
static void didReceiveResourceResponse(ServiceWorkerGlobalScope&, ResourceLoaderIdentifier, const ResourceResponse&);
-@@ -241,11 +245,11 @@ public:
+@@ -245,11 +249,11 @@ public:
static void frameDetachedFromParent(LocalFrame&);
static void didCommitLoad(LocalFrame&, DocumentLoader*);
static void frameDocumentUpdated(LocalFrame&);
@@ -2732,7 +2700,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
#if ENABLE(DARK_MODE_CSS)
static void defaultAppearanceDidChange(Page&);
#endif
-@@ -256,6 +260,7 @@ public:
+@@ -260,6 +264,7 @@ public:
static bool shouldInterceptResponse(const LocalFrame&, const ResourceResponse&);
static void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
static void interceptResponse(const LocalFrame&, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<FragmentedSharedBuffer>)>&&);
@@ -2740,7 +2708,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void addMessageToConsole(LocalFrame&, std::unique_ptr<Inspector::ConsoleMessage>);
static void addMessageToConsole(WorkerOrWorkletGlobalScope&, std::unique_ptr<Inspector::ConsoleMessage>);
-@@ -281,6 +286,7 @@ public:
+@@ -285,6 +290,7 @@ public:
static void stopProfiling(WorkerOrWorkletGlobalScope&, const String& title);
static void consoleStartRecordingCanvas(CanvasRenderingContext&, JSC::JSGlobalObject&, JSC::JSObject* options);
static void consoleStopRecordingCanvas(CanvasRenderingContext&);
@@ -2748,7 +2716,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void performanceMark(ScriptExecutionContext&, const String&, std::optional<MonotonicTime>);
-@@ -337,6 +343,12 @@ public:
+@@ -342,6 +348,12 @@ public:
static void layerTreeDidChange(Page*);
static void renderLayerDestroyed(Page*, const RenderLayer&);
@@ -2761,7 +2729,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void frontendCreated();
static void frontendDeleted();
static bool hasFrontends() { return InspectorInstrumentationPublic::hasFrontends(); }
-@@ -434,6 +446,7 @@ private:
+@@ -440,6 +452,7 @@ private:
static void didRecalculateStyleImpl(InstrumentingAgents&, Document&);
static void didScheduleStyleRecalculationImpl(InstrumentingAgents&, Document&);
static void applyUserAgentOverrideImpl(InstrumentingAgents&, String&);
@@ -2769,7 +2737,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void applyEmulatedMediaImpl(InstrumentingAgents&, AtomString&);
static void flexibleBoxRendererBeganLayoutImpl(InstrumentingAgents&, const RenderObject&);
-@@ -448,6 +461,7 @@ private:
+@@ -454,6 +467,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&);
@@ -2777,7 +2745,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void scriptImportedImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const String& sourceString);
-@@ -458,11 +472,11 @@ private:
+@@ -464,11 +478,11 @@ private:
static void frameDetachedFromParentImpl(InstrumentingAgents&, LocalFrame&);
static void didCommitLoadImpl(InstrumentingAgents&, LocalFrame&, DocumentLoader*);
static void frameDocumentUpdatedImpl(InstrumentingAgents&, LocalFrame&);
@@ -2790,7 +2758,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
#if ENABLE(DARK_MODE_CSS)
static void defaultAppearanceDidChangeImpl(InstrumentingAgents&);
#endif
-@@ -473,6 +487,7 @@ private:
+@@ -479,6 +493,7 @@ private:
static bool shouldInterceptResponseImpl(InstrumentingAgents&, const ResourceResponse&);
static void interceptRequestImpl(InstrumentingAgents&, ResourceLoader&, Function<void(const ResourceRequest&)>&&);
static void interceptResponseImpl(InstrumentingAgents&, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<FragmentedSharedBuffer>)>&&);
@@ -2798,7 +2766,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void addMessageToConsoleImpl(InstrumentingAgents&, std::unique_ptr<Inspector::ConsoleMessage>);
-@@ -487,6 +502,7 @@ private:
+@@ -493,6 +508,7 @@ private:
static void stopProfilingImpl(InstrumentingAgents&, const String& title);
static void consoleStartRecordingCanvasImpl(InstrumentingAgents&, CanvasRenderingContext&, JSC::JSGlobalObject&, JSC::JSObject* options);
static void consoleStopRecordingCanvasImpl(InstrumentingAgents&, CanvasRenderingContext&);
@@ -2806,7 +2774,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static void performanceMarkImpl(InstrumentingAgents&, const String& label, std::optional<MonotonicTime>);
static void didEnqueueFirstContentfulPaintImpl(InstrumentingAgents&);
-@@ -542,6 +558,12 @@ private:
+@@ -549,6 +565,12 @@ private:
static void layerTreeDidChangeImpl(InstrumentingAgents&);
static void renderLayerDestroyedImpl(InstrumentingAgents&, const RenderLayer&);
@@ -2819,8 +2787,8 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
static InstrumentingAgents& NODELETE instrumentingAgents(Page&);
static InstrumentingAgents& NODELETE instrumentingAgents(const LocalFrame&);
static InstrumentingAgents& NODELETE instrumentingAgents(const LocalFrameView&);
-@@ -1078,6 +1100,12 @@ inline void InspectorInstrumentation::applyUserAgentOverride(LocalFrame& frame,
- applyUserAgentOverrideImpl(instrumentingAgents(frame), userAgent);
+@@ -1091,6 +1113,12 @@ inline void InspectorInstrumentation::applyUserAgentOverride(LocalFrame& frame,
+ applyUserAgentOverrideImpl(protect(instrumentingAgents(frame)), userAgent);
}
+inline void InspectorInstrumentation::applyPlatformOverride(LocalFrame& frame, String& platform)
@@ -2832,8 +2800,8 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
inline void InspectorInstrumentation::applyEmulatedMedia(LocalFrame& frame, AtomString& media)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1176,6 +1204,12 @@ inline void InspectorInstrumentation::didFailLoading(ServiceWorkerGlobalScope& g
- didFailLoadingImpl(instrumentingAgents(globalScope), identifier, nullptr, error);
+@@ -1189,6 +1217,12 @@ inline void InspectorInstrumentation::didFailLoading(ServiceWorkerGlobalScope& g
+ didFailLoadingImpl(protect(instrumentingAgents(globalScope)), identifier, nullptr, error);
}
+inline void InspectorInstrumentation::didReceiveMainResourceError(LocalFrame& frame, const ResourceError& error)
@@ -2845,21 +2813,21 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(LocalFrame& frame, ResourceLoaderIdentifier identifier, DocumentLoader& loader, const ResourceResponse& response)
{
// Treat the same as didReceiveResponse.
-@@ -1259,12 +1293,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(LocalFrame& frame)
- frameDocumentUpdatedImpl(instrumentingAgents(frame), frame);
+@@ -1272,12 +1306,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(LocalFrame& frame)
+ frameDocumentUpdatedImpl(protect(instrumentingAgents(frame)), frame);
}
-inline void InspectorInstrumentation::loaderDetachedFromFrame(LocalFrame& frame, DocumentLoader& loader)
-{
- FAST_RETURN_IF_NO_FRONTENDS(void());
-- loaderDetachedFromFrameImpl(instrumentingAgents(frame), loader);
+- loaderDetachedFromFrameImpl(protect(instrumentingAgents(frame)), loader);
-}
-
inline void InspectorInstrumentation::frameStartedLoading(LocalFrame& frame)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1289,6 +1317,12 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page)
- accessibilitySettingsDidChangeImpl(instrumentingAgents(page));
+@@ -1302,6 +1330,12 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page)
+ accessibilitySettingsDidChangeImpl(protect(instrumentingAgents(page)));
}
+inline void InspectorInstrumentation::didNavigateWithinPage(LocalFrame& frame)
@@ -2871,8 +2839,8 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
#if ENABLE(DARK_MODE_CSS)
inline void InspectorInstrumentation::defaultAppearanceDidChange(Page& page)
{
-@@ -1338,6 +1372,13 @@ inline void InspectorInstrumentation::interceptResponse(const LocalFrame& frame,
- interceptResponseImpl(instrumentingAgents(frame), response, identifier, WTF::move(handler));
+@@ -1351,6 +1385,13 @@ inline void InspectorInstrumentation::interceptResponse(const LocalFrame& frame,
+ interceptResponseImpl(protect(instrumentingAgents(frame)), response, identifier, WTF::move(handler));
}
+inline void InspectorInstrumentation::setStoppingLoadingDueToProcessSwap(Page* page, bool value)
@@ -2885,7 +2853,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
inline void InspectorInstrumentation::didDispatchDOMStorageEvent(Page& page, const String& key, const String& oldValue, const String& newValue, StorageType storageType, const SecurityOrigin& securityOrigin)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1681,6 +1722,11 @@ inline void InspectorInstrumentation::didEnqueueLargestContentfulPaint(ScriptExe
+@@ -1701,6 +1742,11 @@ inline void InspectorInstrumentation::didEnqueueLargestContentfulPaint(ScriptExe
didEnqueueLargestContentfulPaintImpl(*agents, entry);
}
@@ -2897,7 +2865,7 @@ index 3eb556054eb2ff2e5c4c484ce35aae1d82ea117a..0d387908225a54788fd2587bc9fde0cb
inline void InspectorInstrumentation::didRequestAnimationFrame(ScriptExecutionContext& scriptExecutionContext, int callbackId)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1737,6 +1783,39 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren
+@@ -1757,6 +1803,39 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren
renderLayerDestroyedImpl(*agents, renderLayer);
}
@@ -3091,7 +3059,7 @@ index ebe3fd57747f494efcbe4d62211850ab4e18220b..c864facba5ceec1402b250385d0ec5d5
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
-index ae136036740e893a6d3755f66af4bf82ce2980fb..85e8afab72349ba6a66a94ae0d42968ac6e8564f 100644
+index 72c7abce7355b2be8e89bab4ee883253e3d6e392..6e239e94bf76e5a292f58dc81d5623e01e2ff9c3 100644
--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
@@ -54,6 +54,7 @@
@@ -3381,7 +3349,7 @@ index ae136036740e893a6d3755f66af4bf82ce2980fb..85e8afab72349ba6a66a94ae0d42968a
+RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup, std::optional<int>&& contextId)
{
RefPtr document = &node->document();
- if (auto* templateHost = document->templateDocumentHost())
+ if (RefPtr templateHost = document->templateDocumentHost())
@@ -3142,12 +3315,18 @@ RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNod
if (!frame)
return nullptr;
@@ -3532,7 +3500,7 @@ index 8f83cc5eaca550bbcea167c98b944f704d9a9cb1..2f655b6534f1428a23907e1cada99c24
void discardBindings();
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
-index 51f9c0efda1011e93a2c85bd44b85e4e0db5e8f3..991231e85c4ceb3a8f62a6c2fc3529472d66087f 100644
+index ee4e3193ac1f14a3985cb1e9c01bb97abb2800c7..57e3ad2d0b21c9f4a0565b733b75f91b9732f1b2 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
@@ -62,6 +62,7 @@
@@ -3543,13 +3511,11 @@ index 51f9c0efda1011e93a2c85bd44b85e4e0db5e8f3..991231e85c4ceb3a8f62a6c2fc352947
#include "Page.h"
#include "PlatformStrategies.h"
#include "ProgressTracker.h"
-@@ -276,8 +277,8 @@ static Ref<Inspector::Protocol::Network::Request> buildObjectForResourceRequest(
- .release();
+@@ -277,7 +278,7 @@ static Ref<Inspector::Protocol::Network::Request> buildObjectForResourceRequest(
if (request.httpBody() && !request.httpBody()->isEmpty()) {
-- auto bytes = request.httpBody()->flatten();
+ auto bytes = protect(request.httpBody())->flatten();
- requestObject->setPostData(String::fromUTF8WithLatin1Fallback(bytes.span()));
-+ Vector<uint8_t> bytes = request.httpBody()->flatten();
+ requestObject->setPostData(base64EncodeToString(bytes));
}
@@ -3595,10 +3561,10 @@ index 51f9c0efda1011e93a2c85bd44b85e4e0db5e8f3..991231e85c4ceb3a8f62a6c2fc352947
+ if (m_stoppingLoadingDueToProcessSwap)
+ return;
+
- auto* frame = loader->frame();
+ RefPtr frame = loader->frame();
if (frame && frame->loader().documentLoader() && frame->document()) {
m_resourcesData->addResourceSharedBuffer(requestId,
-@@ -847,6 +853,7 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::disable()
+@@ -853,6 +859,7 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::disable()
Ref { m_instrumentingAgents.get() }->setEnabledNetworkAgent(nullptr);
m_resourcesData->clear();
m_extraRequestHeaders.clear();
@@ -3606,15 +3572,7 @@ index 51f9c0efda1011e93a2c85bd44b85e4e0db5e8f3..991231e85c4ceb3a8f62a6c2fc352947
continuePendingRequests();
continuePendingResponses();
-@@ -905,6 +912,7 @@ void InspectorNetworkAgent::continuePendingResponses()
-
- Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::setExtraHTTPHeaders(Ref<JSON::Object>&& headers)
- {
-+ m_extraRequestHeaders.clear();
- for (auto& entry : headers.get()) {
- auto stringValue = entry.value->asString();
- if (!!stringValue)
-@@ -1169,6 +1177,11 @@ void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response,
+@@ -1177,6 +1184,11 @@ void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response,
m_frontendDispatcher->responseIntercepted(requestId, resourceResponse.releaseNonNull());
}
@@ -3626,17 +3584,7 @@ index 51f9c0efda1011e93a2c85bd44b85e4e0db5e8f3..991231e85c4ceb3a8f62a6c2fc352947
Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptContinue(const Inspector::Protocol::Network::RequestId& requestId, Inspector::Protocol::Network::NetworkStage networkStage)
{
switch (networkStage) {
-@@ -1198,6 +1211,9 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithReq
- return makeUnexpected("Missing pending intercept request for given requestId"_s);
-
- auto& loader = *pendingRequest->m_loader;
-+ if (loader.reachedTerminalState())
-+ return makeUnexpected("Unable to intercept request, it has already been processed"_s);
-+
- ResourceRequest request = loader.request();
- if (!!url)
- request.setURL(URL({ }, url));
-@@ -1293,13 +1309,22 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequest
+@@ -1304,13 +1316,22 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequest
response.setHTTPStatusCode(status);
response.setHTTPStatusText(String { statusText });
HTTPHeaderMap explicitHeaders;
@@ -3660,7 +3608,7 @@ index 51f9c0efda1011e93a2c85bd44b85e4e0db5e8f3..991231e85c4ceb3a8f62a6c2fc352947
loader->didReceiveResponse(WTF::move(response), [loader, buffer = data.releaseNonNull()]() {
if (loader->reachedTerminalState())
return;
-@@ -1363,6 +1388,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::setEmulatedCondi
+@@ -1374,6 +1395,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::setEmulatedCondi
#endif // ENABLE(INSPECTOR_NETWORK_THROTTLING)
@@ -3674,7 +3622,7 @@ index 51f9c0efda1011e93a2c85bd44b85e4e0db5e8f3..991231e85c4ceb3a8f62a6c2fc352947
{
auto searchResult = Inspector::Protocol::Page::SearchResult::create()
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
-index 306305d101151c4e1e1ac710add6e95dc237d935..848177b164a308d6916df22e022e14c1752a5f14 100644
+index 2bc20b47670897ae8148949ca5353a183da3f0e2..ac8373e781f13ba7b89e8ed7d681de1204d424fc 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
@@ -36,6 +36,8 @@
@@ -3694,7 +3642,7 @@ index 306305d101151c4e1e1ac710add6e95dc237d935..848177b164a308d6916df22e022e14c1
// InspectorInstrumentation
void NODELETE willRecalculateStyle();
-@@ -137,6 +140,7 @@ public:
+@@ -138,6 +141,7 @@ public:
bool shouldInterceptResponse(const ResourceResponse&);
void interceptResponse(const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<FragmentedSharedBuffer>)>&&);
void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
@@ -3702,7 +3650,7 @@ index 306305d101151c4e1e1ac710add6e95dc237d935..848177b164a308d6916df22e022e14c1
void searchOtherRequests(const JSC::Yarr::RegularExpression&, Ref<JSON::ArrayOf<Inspector::Protocol::Page::SearchResult>>&);
void searchInRequest(Inspector::Protocol::ErrorString&, const Inspector::Protocol::Network::RequestId&, const String& query, bool caseSensitive, bool isRegex, RefPtr<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>&);
-@@ -193,6 +197,7 @@ private:
+@@ -194,6 +198,7 @@ private:
bool m_loadingXHRSynchronously { false };
bool m_interceptionEnabled { false };
bool m_clearResourceDataOnNavigate { true };
@@ -3711,7 +3659,7 @@ index 306305d101151c4e1e1ac710add6e95dc237d935..848177b164a308d6916df22e022e14c1
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
-index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8a7494827 100644
+index 1f9af03c8e6b5cbaf8ddd95c1bcc6f70d305ddde..db268018b4a6d671365d5bf9faf701d63f5d2028 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
@@ -32,6 +32,7 @@
@@ -3747,9 +3695,9 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
#include "LocalFrame.h"
#include "LocalFrameView.h"
#include "MIMETypeRegistry.h"
-@@ -63,24 +68,32 @@
- #include "Page.h"
+@@ -64,24 +69,33 @@
#include "PageInspectorController.h"
+ #include "PageRuntimeAgent.h"
#include "RemoteFrame.h"
+#include "PlatformScreen.h"
#include "RenderObjectInlines.h"
@@ -3775,12 +3723,13 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
+#include <wtf/NeverDestroyed.h>
#include <wtf/Stopwatch.h>
#include <wtf/TZoneMallocInlines.h>
++#include <wtf/TimeZone.h>
#include <wtf/text/Base64.h>
+#include <wtf/text/MakeString.h>
#include <wtf/text/StringBuilder.h>
#if ENABLE(APPLICATION_MANIFEST)
-@@ -102,6 +115,11 @@ using namespace Inspector;
+@@ -103,6 +117,11 @@ using namespace Inspector;
WTF_MAKE_TZONE_ALLOCATED_IMPL(InspectorPageAgent);
@@ -3792,15 +3741,15 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
InspectorOverlay& InspectorPageAgent::overlay() const
{
return m_overlay.get();
-@@ -112,6 +130,7 @@ InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorBacke
+@@ -113,6 +132,7 @@ InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorBacke
, m_frontendDispatcher(makeUniqueRef<Inspector::PageFrontendDispatcher>(context.frontendRouter))
- , m_backendDispatcher(Inspector::PageBackendDispatcher::create(context.backendDispatcher, this))
+ , m_backendDispatcher(Inspector::PageBackendDispatcher::create(protect(context.backendDispatcher), this))
, m_inspectedPage(context.inspectedPage)
+ , m_injectedScriptManager(context.injectedScriptManager)
, m_client(client)
, m_overlay(overlay)
{
-@@ -142,12 +161,20 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::enable()
+@@ -143,12 +163,20 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::enable()
defaultUserPreferencesDidChange();
@@ -3821,7 +3770,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
std::ignore = setShowPaintRects(false);
#if !PLATFORM(IOS_FAMILY)
-@@ -200,6 +227,22 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optiona
+@@ -216,6 +244,22 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optiona
return { };
}
@@ -3844,8 +3793,8 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideUserAgent(const String& value)
{
m_userAgentOverride = value;
-@@ -207,6 +250,13 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideUserAgent(c
- return { };
+@@ -236,6 +280,13 @@ void InspectorPageAgent::overrideSettingByModifyingValue(std::optional<bool>& sa
+ }
}
+Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overridePlatform(const String& value)
@@ -3858,7 +3807,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Inspector::Protocol::Page::Setting setting, std::optional<bool>&& value)
{
auto& inspectedPageSettings = m_inspectedPage->settings();
-@@ -220,6 +270,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Ins
+@@ -249,6 +300,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Ins
inspectedPageSettings.setAuthorAndUserStylesEnabledInspectorOverride(value);
return { };
@@ -3868,50 +3817,10 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
+ return { };
+#endif
+
- case Inspector::Protocol::Page::Setting::ICECandidateFilteringEnabled:
- inspectedPageSettings.setICECandidateFilteringEnabledInspectorOverride(value);
- return { };
-@@ -246,6 +302,39 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Ins
- m_client->setDeveloperPreferenceOverride(InspectorBackendClient::DeveloperPreference::NeedsSiteSpecificQuirks, value);
- return { };
-
-+#if ENABLE(NOTIFICATIONS)
-+ case Inspector::Protocol::Page::Setting::NotificationsEnabled:
-+ inspectedPageSettings.setNotificationsEnabled(value.value_or(false));
-+ return { };
-+#endif
-+
-+#if ENABLE(FULLSCREEN_API)
-+ case Inspector::Protocol::Page::Setting::FullScreenEnabled:
-+ inspectedPageSettings.setFullScreenEnabled(value.value_or(false));
-+ return { };
-+#endif
-+
-+ case Inspector::Protocol::Page::Setting::InputTypeMonthEnabled:
-+ inspectedPageSettings.setInputTypeMonthEnabled(value.value_or(false));
-+ return { };
-+
-+ case Inspector::Protocol::Page::Setting::InputTypeWeekEnabled:
-+ inspectedPageSettings.setInputTypeWeekEnabled(value.value_or(false));
-+ return { };
-+
-+ case Inspector::Protocol::Page::Setting::FixedBackgroundsPaintRelativeToDocument:
-+ // Enable this setting similar to iOS to ensure scrolling works with
-+ // `background-attachment: fixed`.
-+ // See https://github.com/microsoft/playwright/issues/31551.
-+ inspectedPageSettings.setFixedBackgroundsPaintRelativeToDocument(value.value_or(false));
-+ return { };
-+
-+#if ENABLE(POINTER_LOCK)
-+ case Inspector::Protocol::Page::Setting::PointerLockEnabled:
-+ inspectedPageSettings.setPointerLockEnabled(value.value_or(false));
-+ return { };
-+#endif
-+
- case Inspector::Protocol::Page::Setting::ScriptEnabled:
- inspectedPageSettings.setScriptEnabledInspectorOverride(value);
+ case Inspector::Protocol::Page::Setting::FixedBackgroundsPaintRelativeToDocument:
+ inspectedPageSettings.setFixedBackgroundsPaintRelativeToDocumentInspectorOverride(value);
return { };
-@@ -258,6 +347,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Ins
+@@ -321,6 +378,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Ins
inspectedPageSettings.setShowRepaintCounterInspectorOverride(value);
return { };
@@ -3924,7 +3833,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
case Inspector::Protocol::Page::Setting::WebSecurityEnabled:
inspectedPageSettings.setWebSecurityEnabledInspectorOverride(value);
return { };
-@@ -670,15 +765,16 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setShowPaintRects(b
+@@ -744,15 +807,16 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setShowPaintRects(b
return { };
}
@@ -3946,7 +3855,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
}
void InspectorPageAgent::frameNavigated(LocalFrame& frame)
-@@ -686,6 +782,22 @@ void InspectorPageAgent::frameNavigated(LocalFrame& frame)
+@@ -760,6 +824,22 @@ void InspectorPageAgent::frameNavigated(LocalFrame& frame)
m_frontendDispatcher->frameNavigated(buildObjectForFrame(&frame));
}
@@ -3969,7 +3878,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
void InspectorPageAgent::frameDetached(LocalFrame& frame)
{
auto identifier = m_inspectedPage->inspectorController().identifierRegistry().takeFrame(frame);
-@@ -758,6 +870,12 @@ void InspectorPageAgent::defaultUserPreferencesDidChange()
+@@ -832,6 +912,12 @@ void InspectorPageAgent::defaultUserPreferencesDidChange()
m_frontendDispatcher->defaultUserPreferencesDidChange(WTF::move(defaultUserPreferences));
}
@@ -3982,7 +3891,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
#if ENABLE(DARK_MODE_CSS)
void InspectorPageAgent::defaultAppearanceDidChange()
{
-@@ -771,6 +889,9 @@ void InspectorPageAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapp
+@@ -845,6 +931,9 @@ void InspectorPageAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapp
return;
if (m_bootstrapScript.isEmpty())
@@ -3991,8 +3900,8 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
+ if (m_ignoreDidClearWindowObject)
return;
- frame.script().evaluateIgnoringException(ScriptSourceCode(m_bootstrapScript, JSC::SourceTaintedOrigin::Untainted, URL { "web-inspector://bootstrap.js"_str }));
-@@ -818,6 +939,51 @@ void InspectorPageAgent::didRecalculateStyle()
+ if (auto* pageRuntimeAgent = Ref { m_instrumentingAgents.get() }->enabledPageRuntimeAgent()) {
+@@ -897,6 +986,51 @@ void InspectorPageAgent::didRecalculateStyle()
protect(overlay())->update();
}
@@ -4044,7 +3953,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
Ref<Inspector::Protocol::Page::Frame> InspectorPageAgent::buildObjectForFrame(LocalFrame* frame)
{
ASSERT_ARG(frame, frame);
-@@ -933,6 +1099,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent)
+@@ -1007,6 +1141,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent)
userAgent = m_userAgentOverride;
}
@@ -4057,7 +3966,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
void InspectorPageAgent::applyEmulatedMedia(AtomString& media)
{
if (!m_emulatedMedia.isEmpty())
-@@ -948,7 +1120,7 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Insp
+@@ -1022,7 +1162,7 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Insp
RefPtr node = domAgent->assertNode(errorString, nodeId);
if (!node)
return makeUnexpected(errorString);
@@ -4066,7 +3975,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
RefPtr localMainFrame = m_inspectedPage->localMainFrame();
if (!localMainFrame)
return makeUnexpected("Main frame isn't local"_s);
-@@ -959,11 +1131,16 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Insp
+@@ -1033,11 +1173,16 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Insp
return encodeDataURL(WTF::move(snapshot), "image/png"_s);
}
@@ -4084,7 +3993,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
IntRect rectangle(x, y, width, height);
RefPtr localMainFrame = m_inspectedPage->localMainFrame();
-@@ -973,9 +1150,68 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int
+@@ -1047,9 +1192,67 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int
if (!snapshot)
return makeUnexpected("Could not capture snapshot"_s);
@@ -4102,12 +4011,13 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
+ break;
+ case Inspector::Protocol::Page::ImageFormat::Webp:
+ mimeType = "image/webp"_s;
-+ encodingQuality = quality.value_or(80) / 100.0;
++ // A quality of 1.0 (100) selects lossless WebP; default to it when omitted.
++ encodingQuality = quality.value_or(100) / 100.0;
+ break;
+ }
+ return encodeDataURL(WTF::move(snapshot), mimeType, encodingQuality);
-+}
-+
+ }
+
+Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setForcedColors(std::optional<Inspector::Protocol::Page::ForcedColors>&& forcedColors)
+{
+ if (!forcedColors) {
@@ -4134,15 +4044,13 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
+ if (!success)
+ return makeUnexpected(makeString("Invalid time zone "_s, timeZone));
+
-+#if PLATFORM(COCOA)
-+ // JSC caches time zone information process-wide using lastTimeZoneID as the cache
-+ // key. The cache is normally invalidated only by the system time zone change
-+ // notification, so bump the counter explicitly to force re-reading the override.
-+ ++JSC::lastTimeZoneID;
-+#endif
++ // JSC caches time zone information process-wide, keyed on WTF::lastTimeZoneID().
++ // The cache is normally invalidated only by a system time zone change notification,
++ // so signal the change explicitly to force re-reading the override.
++ WTF::timeZoneDidChange();
+ return { };
- }
-
++}
++
+Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setTouchEmulationEnabled(bool enabled)
+{
+ setScreenHasTouchDeviceOverride(enabled);
@@ -4154,7 +4062,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
#if ENABLE(WEB_ARCHIVE) && USE(CF)
Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
{
-@@ -992,7 +1228,6 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
+@@ -1066,7 +1269,6 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
}
#endif
@@ -4162,7 +4070,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::optional<int>&& width, std::optional<int>&& height)
{
if (width.has_value() != height.has_value())
-@@ -1010,6 +1245,86 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverri
+@@ -1084,6 +1286,86 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverri
localMainFrame->setOverrideScreenSize(FloatSize(width.value_or(0), height.value_or(0)));
return { };
}
@@ -4251,7 +4159,7 @@ index 3f9caf323ad1fb608aab868e20dce4cdb0ef1749..b79f19f291d2546fc517529168e1ecf8
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.h b/Source/WebCore/inspector/agents/InspectorPageAgent.h
-index 0af80809258326e52818831166b3ff901e4b9663..ed85e4d92b1c2a5aa56fd390d8711322575e8050 100644
+index 61b8642bfa281e8c2eff276ef8a28571a689625e..fdcc34eb08456b03dfe816ea77563c672186ceac 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.h
@@ -43,10 +43,12 @@
@@ -4275,7 +4183,7 @@ index 0af80809258326e52818831166b3ff901e4b9663..ed85e4d92b1c2a5aa56fd390d8711322
class InspectorOverlay;
class LocalFrame;
class Page;
-@@ -69,6 +72,9 @@ public:
+@@ -70,6 +73,9 @@ public:
InspectorPageAgent(PageAgentContext&, InspectorBackendClient*, InspectorOverlay&);
~InspectorPageAgent();
@@ -4285,7 +4193,7 @@ index 0af80809258326e52818831166b3ff901e4b9663..ed85e4d92b1c2a5aa56fd390d8711322
// InspectorAgentBase
void didCreateFrontendAndBackend();
void willDestroyFrontendAndBackend(Inspector::DisconnectReason);
-@@ -77,7 +83,10 @@ public:
+@@ -78,7 +84,10 @@ public:
Inspector::Protocol::ErrorStringOr<void> enable();
Inspector::Protocol::ErrorStringOr<void> disable();
Inspector::Protocol::ErrorStringOr<void> reload(std::optional<bool>&& ignoreCache, std::optional<bool>&& revalidateAllResources);
@@ -4296,7 +4204,7 @@ index 0af80809258326e52818831166b3ff901e4b9663..ed85e4d92b1c2a5aa56fd390d8711322
Inspector::Protocol::ErrorStringOr<void> overrideSetting(Inspector::Protocol::Page::Setting, std::optional<bool>&& value);
Inspector::Protocol::ErrorStringOr<void> overrideUserPreference(Inspector::Protocol::Page::UserPreferenceName, std::optional<Inspector::Protocol::Page::UserPreferenceValue>&&);
Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::Page::Cookie>>> getCookies();
-@@ -93,41 +102,60 @@ public:
+@@ -94,41 +103,60 @@ public:
#endif
Inspector::Protocol::ErrorStringOr<void> setShowPaintRects(bool);
Inspector::Protocol::ErrorStringOr<void> setEmulatedMedia(const String&);
@@ -4362,7 +4270,7 @@ index 0af80809258326e52818831166b3ff901e4b9663..ed85e4d92b1c2a5aa56fd390d8711322
InspectorOverlay& NODELETE overlay() const;
-@@ -142,14 +170,19 @@ private:
+@@ -145,10 +173,12 @@ private:
const Ref<Inspector::PageBackendDispatcher> m_backendDispatcher;
WeakRef<Page> m_inspectedPage;
@@ -4375,18 +4283,82 @@ index 0af80809258326e52818831166b3ff901e4b9663..ed85e4d92b1c2a5aa56fd390d8711322
AtomString m_emulatedMedia;
String m_bootstrapScript;
bool m_isFirstLayoutAfterOnLoad { false };
- bool m_showPaintRects { false };
+@@ -158,6 +188,10 @@ private:
+ std::optional<bool> m_notificationsEnabledBeforeOverride;
+ std::optional<bool> m_pointerLockEnabledBeforeOverride;
+ std::optional<bool> m_pushAPIEnabledBeforeOverride;
++
+ bool m_interceptFileChooserDialog { false };
+ bool m_bypassCSP { false };
+ bool m_ignoreDidClearWindowObject { false };
};
} // namespace WebCore
+diff --git a/Source/WebCore/inspector/agents/frame/FrameDOMAgent.cpp b/Source/WebCore/inspector/agents/frame/FrameDOMAgent.cpp
+index 93eeca52f4c0d3a16f2154fba62bb55cb7f6380d..887e53e65c226190ce57725ab99a32541413402f 100644
+--- a/Source/WebCore/inspector/agents/frame/FrameDOMAgent.cpp
++++ b/Source/WebCore/inspector/agents/frame/FrameDOMAgent.cpp
+@@ -1488,7 +1488,7 @@ private:
+
+ } // namespace
+
+-RefPtr<Inspector::Protocol::Runtime::RemoteObject> FrameDOMAgent::resolveNodeInternal(Node* node, const String& objectGroup)
++RefPtr<Inspector::Protocol::Runtime::RemoteObject> FrameDOMAgent::resolveNodeInternal(Node* node, const String& objectGroup, std::optional<int>&& contextId)
+ {
+ if (!node)
+ return nullptr;
+@@ -1500,12 +1500,17 @@ RefPtr<Inspector::Protocol::Runtime::RemoteObject> FrameDOMAgent::resolveNodeInt
+ if (!frame)
+ return nullptr;
+
+- auto& globalObject = mainWorldGlobalObject(*frame);
+- auto injectedScript = m_injectedScriptManager->injectedScriptFor(&globalObject);
++ InjectedScript injectedScript;
++ if (contextId)
++ injectedScript = m_injectedScriptManager->injectedScriptForId(*contextId);
++ else {
++ auto& globalObject = mainWorldGlobalObject(*frame);
++ injectedScript = m_injectedScriptManager->injectedScriptFor(&globalObject);
++ }
+ if (injectedScript.hasNoValue())
+ return nullptr;
+
+- return injectedScript.wrapObject(InspectorDOMAgent::nodeAsScriptValue(globalObject, node), objectGroup);
++ return injectedScript.wrapObject(InspectorDOMAgent::nodeAsScriptValue(*injectedScript.globalObject(), node), objectGroup);
+ }
+
+ RefPtr<Node> FrameDOMAgent::nodeForObjectId(const Inspector::Protocol::Runtime::RemoteObjectId& objectId)
+@@ -1517,15 +1522,21 @@ RefPtr<Node> FrameDOMAgent::nodeForObjectId(const Inspector::Protocol::Runtime::
+ return InspectorDOMAgent::scriptValueAsNode(injectedScript.findObjectById(objectId));
+ }
+
+-Inspector::CommandResult<Ref<Inspector::Protocol::Runtime::RemoteObject>> FrameDOMAgent::resolveNode(int nodeId, const String& objectGroup)
++Inspector::CommandResult<Ref<Inspector::Protocol::Runtime::RemoteObject>> FrameDOMAgent::resolveNode(std::optional<int>&& nodeId, const String& objectId, const String&, std::optional<int>&& executionContextId, const String& objectGroup)
+ {
+ Inspector::Protocol::ErrorString errorString;
+
+- RefPtr node = assertNode(errorString, nodeId);
++ RefPtr<Node> node;
++ if (!objectId.isEmpty())
++ node = nodeForObjectId(objectId);
++ else if (nodeId)
++ node = assertNode(errorString, *nodeId);
++ else
++ return makeUnexpected("Either nodeId or objectId must be specified"_s);
+ if (!node)
+- return makeUnexpected(errorString);
++ return makeUnexpected(errorString.isEmpty() ? "Missing node for given objectId"_s : errorString);
+
+- auto object = resolveNodeInternal(node.get(), objectGroup);
++ auto object = resolveNodeInternal(node.get(), objectGroup, WTF::move(executionContextId));
+ if (!object)
+ return makeUnexpected("Missing injected script for given nodeId"_s);
+
diff --git a/Source/WebCore/inspector/agents/frame/FrameDOMAgent.h b/Source/WebCore/inspector/agents/frame/FrameDOMAgent.h
-index 5f424acadd1ed82e70947aec894134feedfc36b7..cb3e406cf2893c998d10d80a56b21752f0fabec1 100644
+index c09056bb49e97805c0d0ade55acde87d28928cbd..73bf9a1f5d72dc68d872fc1697b69a98706bea35 100644
--- a/Source/WebCore/inspector/agents/frame/FrameDOMAgent.h
+++ b/Source/WebCore/inspector/agents/frame/FrameDOMAgent.h
-@@ -115,7 +115,7 @@ public:
+@@ -121,7 +121,7 @@ public:
Inspector::CommandResult<void> showFlexOverlay(int nodeId, Ref<JSON::Object>&& flexOverlayConfig) override;
Inspector::CommandResult<void> hideFlexOverlay(std::optional<int>&& nodeId) override;
Inspector::CommandResult<int> pushNodeByPathToFrontend(const String& path) override;
@@ -4395,7 +4367,7 @@ index 5f424acadd1ed82e70947aec894134feedfc36b7..cb3e406cf2893c998d10d80a56b21752
Inspector::CommandResult<int> moveTo(int nodeId, int targetNodeId, std::optional<int>&& insertBeforeNodeId) override;
Inspector::CommandResult<void> undo() override;
Inspector::CommandResult<void> redo() override;
-@@ -124,6 +124,10 @@ public:
+@@ -130,6 +130,10 @@ public:
Inspector::CommandResult<void> setInspectedNode(int nodeId) override;
Inspector::CommandResult<void> setAllowEditingUserAgentShadowTrees(bool) override;
Inspector::CommandResult<Ref<Inspector::Protocol::DOM::MediaStats>> getMediaStats(int nodeId) override;
@@ -4406,20 +4378,20 @@ index 5f424acadd1ed82e70947aec894134feedfc36b7..cb3e406cf2893c998d10d80a56b21752
// InspectorInstrumentation hooks
void didInsertDOMNode(Node&);
+@@ -165,7 +169,7 @@ private:
+ RefPtr<Element> assertEditableElement(Inspector::Protocol::ErrorString&, Inspector::Protocol::DOM::NodeId);
+
+ RefPtr<Node> nodeForObjectId(const Inspector::Protocol::Runtime::RemoteObjectId&);
+- RefPtr<Inspector::Protocol::Runtime::RemoteObject> resolveNodeInternal(Node*, const String& objectGroup);
++ RefPtr<Inspector::Protocol::Runtime::RemoteObject> resolveNodeInternal(Node*, const String& objectGroup, std::optional<int>&& contextId);
+
+ Ref<Inspector::Protocol::DOM::AccessibilityProperties> buildObjectForAccessibilityProperties(Node&);
+ void processAccessibilityChildren(AXCoreObject&, JSON::ArrayOf<Inspector::Protocol::DOM::NodeId>&);
diff --git a/Source/WebCore/inspector/agents/frame/FrameDOMAgentStubs.cpp b/Source/WebCore/inspector/agents/frame/FrameDOMAgentStubs.cpp
-index fbf7088fd151b7744e2e6f424b65b0bd513fb4f6..386232b2c6ad0e1bb7f894d91dae2547670b3e79 100644
+index 69c41e907c49b2ba7ac5008d2493f22ea9323783..c4b1401a1e20440170e4724a053dd81a93912611 100644
--- a/Source/WebCore/inspector/agents/frame/FrameDOMAgentStubs.cpp
+++ b/Source/WebCore/inspector/agents/frame/FrameDOMAgentStubs.cpp
-@@ -196,7 +196,7 @@ Inspector::CommandResult<void> FrameDOMAgent::hideFlexOverlay(std::optional<int>
- return makeUnexpected("Not supported for frame targets"_s);
- }
-
--Inspector::CommandResult<Ref<Inspector::Protocol::Runtime::RemoteObject>> FrameDOMAgent::resolveNode(int, const String&)
-+Inspector::CommandResult<Ref<Inspector::Protocol::Runtime::RemoteObject>> FrameDOMAgent::resolveNode(std::optional<int>&&, const String&, const String&, std::optional<int>&&, const String&)
- {
- return makeUnexpected("Not yet implemented for frame targets"_s);
- }
-@@ -241,4 +241,23 @@ Inspector::CommandResult<Ref<Inspector::Protocol::DOM::MediaStats>> FrameDOMAgen
+@@ -146,4 +146,23 @@ Inspector::CommandResult<Ref<Inspector::Protocol::DOM::MediaStats>> FrameDOMAgen
return makeUnexpected("Not supported for frame targets"_s);
}
@@ -4444,7 +4416,7 @@ index fbf7088fd151b7744e2e6f424b65b0bd513fb4f6..386232b2c6ad0e1bb7f894d91dae2547
+
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
-index d0c409f4832ea16ace7ee6c9f35ee06b0348c764..6d47d17cc4508d84bc3e4c5fa0885b8275732ca3 100644
+index cd734061483002b18332f6a3764b953ddd77b9d2..2bdb1d1b8408e036a5d8ac5f621241a36bc347ff 100644
--- a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
+++ b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
@@ -35,7 +35,9 @@
@@ -4465,7 +4437,7 @@ index d0c409f4832ea16ace7ee6c9f35ee06b0348c764..6d47d17cc4508d84bc3e4c5fa0885b82
#include "SecurityOrigin.h"
#include "UserGestureEmulationScope.h"
#include <JavaScriptCore/InjectedScript.h>
-@@ -91,13 +94,74 @@ Inspector::Protocol::ErrorStringOr<void> PageRuntimeAgent::disable()
+@@ -92,6 +95,8 @@ Inspector::Protocol::ErrorStringOr<void> PageRuntimeAgent::disable()
{
Ref { m_instrumentingAgents.get() }->setEnabledPageRuntimeAgent(nullptr);
@@ -4474,17 +4446,10 @@ index d0c409f4832ea16ace7ee6c9f35ee06b0348c764..6d47d17cc4508d84bc3e4c5fa0885b82
return InspectorRuntimeAgent::disable();
}
- void PageRuntimeAgent::frameNavigated(LocalFrame& frame)
- {
-+ auto* pageAgent = Ref { m_instrumentingAgents.get() }->enabledPageAgent();
-+ if (pageAgent)
-+ pageAgent->setIgnoreDidClearWindowObject(true);
- // Ensure execution context is created for the frame even if it doesn't have scripts.
+@@ -102,6 +107,60 @@ void PageRuntimeAgent::frameNavigated(LocalFrame& frame)
mainWorldGlobalObject(frame);
-+ if (pageAgent)
-+ pageAgent->setIgnoreDidClearWindowObject(false);
-+}
-+
+ }
+
+static JSC_DECLARE_HOST_FUNCTION(bindingCallback);
+
+JSC_DEFINE_HOST_FUNCTION(bindingCallback, (JSC::JSGlobalObject * globalObject, JSC::CallFrame* callFrame))
@@ -4537,29 +4502,24 @@ index d0c409f4832ea16ace7ee6c9f35ee06b0348c764..6d47d17cc4508d84bc3e4c5fa0885b82
+ if (injectedScript.hasNoValue())
+ return;
+ m_frontendDispatcher->bindingCalled(injectedScriptManager().injectedScriptIdFor(globalObject), name, arg);
- }
-
++}
++
void PageRuntimeAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapperWorld& world)
-@@ -106,7 +170,29 @@ void PageRuntimeAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapper
- if (frameId.isEmpty())
+ {
+ if (m_ignoreDidClearWindowObject)
+@@ -112,9 +171,24 @@ void PageRuntimeAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapper
return;
-+ auto* pageAgent = Ref { m_instrumentingAgents.get() }->enabledPageAgent();
-+ if (pageAgent && pageAgent->ignoreDidClearWindowObject())
-+ return;
+ SetForScope ignoreDidClearWindowObject(m_ignoreDidClearWindowObject, true);
+
+ if (world.isNormal()) {
+ for (const auto& name : m_bindingNames)
+ addBindingToFrame(frame, name);
+ }
+
-+ if (pageAgent)
-+ pageAgent->setIgnoreDidClearWindowObject(true);
notifyContextCreated(frameId, frame.script().globalObject(world), world);
-+ if (pageAgent)
-+ pageAgent->setIgnoreDidClearWindowObject(false);
-+}
-+
+ }
+
+void PageRuntimeAgent::didReceiveMainResourceError(LocalFrame& frame)
+{
+ if (frame.loader().stateMachine().isDisplayingInitialEmptyDocument()) {
@@ -4567,13 +4527,15 @@ index d0c409f4832ea16ace7ee6c9f35ee06b0348c764..6d47d17cc4508d84bc3e4c5fa0885b82
+ // it usable in case loading failed.
+ mainWorldGlobalObject(frame);
+ }
- }
-
++}
++
InjectedScript PageRuntimeAgent::injectedScriptForEval(Inspector::Protocol::ErrorString& errorString, std::optional<Inspector::Protocol::Runtime::ExecutionContextId>&& executionContextId)
-@@ -143,9 +229,6 @@ void PageRuntimeAgent::reportExecutionContextCreation()
+ {
+ if (!executionContextId) {
+@@ -149,9 +223,6 @@ void PageRuntimeAgent::reportExecutionContextCreation()
Ref identifierRegistry = m_inspectedPage->inspectorController().identifierRegistry();
- m_inspectedPage->forEachLocalFrame([&](LocalFrame& frame) {
+ protect(m_inspectedPage)->forEachLocalFrame([&](LocalFrame& frame) {
- if (!frame.script().canExecuteScripts(ReasonForCallingCanExecuteScripts::NotAboutToExecuteScript))
- return;
-
@@ -4581,7 +4543,7 @@ index d0c409f4832ea16ace7ee6c9f35ee06b0348c764..6d47d17cc4508d84bc3e4c5fa0885b82
// Always send the main world first.
diff --git a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.h b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.h
-index db4e1b7cd5ba1c46f962c07fa6e23cb13092832c..f7fb1503fc42b4b5fd21f76a893c84030e8af8c2 100644
+index bf342183297cc32124acad4e05b15f70f4647840..03cab23eeb3f831514c0c5ff2b87ec2596f88838 100644
--- a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.h
+++ b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.h
@@ -39,6 +39,7 @@
@@ -4604,12 +4566,13 @@ index db4e1b7cd5ba1c46f962c07fa6e23cb13092832c..f7fb1503fc42b4b5fd21f76a893c8403
+ void didReceiveMainResourceError(LocalFrame&);
+ void bindingCalled(JSC::JSGlobalObject* globalObject, const String& name, const String& arg);
- private:
- Inspector::InjectedScript injectedScriptForEval(Inspector::Protocol::ErrorString&, std::optional<Inspector::Protocol::Runtime::ExecutionContextId>&&);
-@@ -78,6 +82,7 @@ private:
- WeakRef<InstrumentingAgents> m_instrumentingAgents;
+ bool ignoreDidClearWindowObject() const { return m_ignoreDidClearWindowObject; }
+@@ -82,6 +86,8 @@ private:
WeakRef<Page> m_inspectedPage;
+
+ bool m_ignoreDidClearWindowObject { false };
++
+ HashSet<String> m_bindingNames;
};
@@ -4637,10 +4600,10 @@ index c2f9d5d90ff590154ef39132453194c162be0cc5..ff36e34f9e5963f1deaa41341174a7fd
protected:
static SameSiteInfo sameSiteInfo(const Document&, IsForDOMCookieAccess = IsForDOMCookieAccess::No);
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
-index bd624699105ee090f2fbe6143a80f9682ee355a3..528d8f7c93dfe0a5b0c8603d4e538061f1f0d349 100644
+index 41badde9eb6da258e02d68b710faf1bb437b8e5d..df3de6c52bbe0d870a2d3e5cab37b57bb2874ef7 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
-@@ -775,8 +775,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc
+@@ -784,8 +784,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc
if (!didReceiveRedirectResponse)
return completionHandler(WTF::move(newRequest));
@@ -4651,7 +4614,7 @@ index bd624699105ee090f2fbe6143a80f9682ee355a3..528d8f7c93dfe0a5b0c8603d4e538061
switch (navigationPolicyDecision) {
case NavigationPolicyDecision::IgnoreLoad:
case NavigationPolicyDecision::LoadWillContinueInAnotherProcess:
-@@ -1586,11 +1588,17 @@ void DocumentLoader::detachFromFrame(LoadWillContinueInAnotherProcess loadWillCo
+@@ -1599,11 +1601,17 @@ void DocumentLoader::detachFromFrame(LoadWillContinueInAnotherProcess loadWillCo
if (auto navigationID = std::exchange(m_navigationID, { }))
frame->loader().client().documentLoaderDetached(*navigationID, loadWillContinueInAnotherProcess);
@@ -4672,7 +4635,7 @@ index bd624699105ee090f2fbe6143a80f9682ee355a3..528d8f7c93dfe0a5b0c8603d4e538061
{
m_navigationID = navigationID;
diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h
-index df3efd07ebcadc1eb790d1e909031407152902d1..33fd4709e5b3b3d9453d951e72c7907b273b8c76 100644
+index cab81d56267ee64dcc52d3c01f85b9688c36beb4..994364140be2e668a035aaf6fc303b427f4d932f 100644
--- a/Source/WebCore/loader/DocumentLoader.h
+++ b/Source/WebCore/loader/DocumentLoader.h
@@ -210,6 +210,8 @@ public:
@@ -4685,10 +4648,10 @@ index df3efd07ebcadc1eb790d1e909031407152902d1..33fd4709e5b3b3d9453d951e72c7907b
WEBCORE_EXPORT SubresourceLoader* NODELETE mainResourceLoader() const;
WEBCORE_EXPORT RefPtr<FragmentedSharedBuffer> mainResourceData() const;
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
-index d09aaee884faad69924de5db1e5515f8d21bb6d2..afa48d41bb19b9b3eeccaddbf3f1f88ee15e4bb0 100644
+index a31d6a5c190128118d53a53278813456fc1ce072..521530c5986b61c013fdd0cf38352454dc8c5fa2 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
-@@ -1409,6 +1409,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat
+@@ -1424,6 +1424,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat
}
m_client->dispatchDidNavigateWithinPage();
@@ -4696,7 +4659,7 @@ index d09aaee884faad69924de5db1e5515f8d21bb6d2..afa48d41bb19b9b3eeccaddbf3f1f88e
document->statePopped(stateObject ? stateObject.releaseNonNull() : SerializedScriptValue::nullValue());
m_client->dispatchDidPopStateWithinPage();
-@@ -1967,6 +1968,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+@@ -1982,6 +1983,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
const String& httpMethod = loader->request().httpMethod();
if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL) && !loader->substituteData().isValid()) {
@@ -4704,7 +4667,7 @@ index d09aaee884faad69924de5db1e5515f8d21bb6d2..afa48d41bb19b9b3eeccaddbf3f1f88e
RefPtr oldDocumentLoader = m_documentLoader;
NavigationAction action { protect(frame->document()).releaseNonNull(), loader->request(), InitiatedByMainFrame::Unknown, loader->isRequestFromClientOrUserInput(), policyChecker().loadType(), isFormSubmission };
-@@ -2008,7 +2010,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+@@ -2023,7 +2025,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
auto policyDecisionMode = loader->triggeringAction().isFromNavigationAPI() ? PolicyDecisionMode::Synchronous : PolicyDecisionMode::Asynchronous;
RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()) || history().provisionalItem());
@@ -4713,8 +4676,8 @@ index d09aaee884faad69924de5db1e5515f8d21bb6d2..afa48d41bb19b9b3eeccaddbf3f1f88e
+ InspectorInstrumentation::didCheckNavigationPolicy(m_frame, navigationPolicyDecision != NavigationPolicyDecision::ContinueLoad);
continueLoadAfterNavigationPolicy(request, RefPtr { weakFormSubmission.get() }.get(), navigationPolicyDecision, allowNavigationToInvalidURL, shouldRestoreFromBackForwardCache);
completionHandler();
- }, policyDecisionMode, determineNavigationType(type, NavigationHistoryBehavior::Auto));
-@@ -3383,10 +3387,15 @@ String FrameLoader::userAgent(const URL& url) const
+ }, IsSameDocumentNavigation::No, policyDecisionMode, determineNavigationType(type, NavigationHistoryBehavior::Auto));
+@@ -3399,10 +3403,15 @@ String FrameLoader::userAgent(const URL& url) const
String FrameLoader::navigatorPlatform() const
{
@@ -4732,7 +4695,7 @@ index d09aaee884faad69924de5db1e5515f8d21bb6d2..afa48d41bb19b9b3eeccaddbf3f1f88e
}
void FrameLoader::dispatchOnloadEvents()
-@@ -3844,6 +3853,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error, LoadWill
+@@ -3861,6 +3870,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error, LoadWill
}
if (frame->page())
checkLoadComplete(loadWillContinueInAnotherProcess);
@@ -4741,7 +4704,7 @@ index d09aaee884faad69924de5db1e5515f8d21bb6d2..afa48d41bb19b9b3eeccaddbf3f1f88e
}
void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, const SecurityOrigin* requesterOrigin, bool shouldContinue, NavigationHistoryBehavior historyHandling)
-@@ -4853,9 +4864,6 @@ String FrameLoader::referrer() const
+@@ -4890,9 +4901,6 @@ String FrameLoader::referrer() const
void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
{
@@ -4751,7 +4714,7 @@ index d09aaee884faad69924de5db1e5515f8d21bb6d2..afa48d41bb19b9b3eeccaddbf3f1f88e
Vector<Ref<DOMWrapperWorld>> worlds;
ScriptController::getAllWorlds(worlds);
for (auto& world : worlds)
-@@ -4865,13 +4873,12 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
+@@ -4902,13 +4910,12 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
{
Ref frame = m_frame.get();
@@ -4772,7 +4735,7 @@ index d09aaee884faad69924de5db1e5515f8d21bb6d2..afa48d41bb19b9b3eeccaddbf3f1f88e
InspectorInstrumentation::didClearWindowObjectInWorld(frame, world);
}
diff --git a/Source/WebCore/loader/LoaderStrategy.h b/Source/WebCore/loader/LoaderStrategy.h
-index 9a5561ea2fa43baab02c7f8d43d29cf4a5543411..4b1c8dfd6be705aa3560685bb2453dd4e309372f 100644
+index 19abf74e5f1dfcda3317377f97c5c7d468d96a8e..ac9db5e0ee3b75f68fb77adc8662f86b0e7fff05 100644
--- a/Source/WebCore/loader/LoaderStrategy.h
+++ b/Source/WebCore/loader/LoaderStrategy.h
@@ -89,6 +89,7 @@ public:
@@ -4806,10 +4769,10 @@ index 3acb026789c46395be3f8cd6b837ebf207e215f7..a4e3c1e69fbbb108badd23f32e879423
}
diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
-index 7be02354989d0b0d52732318c676313d01ca83a4..c568730f75b62fdeff861a443c8a9cc5557ac9c4 100644
+index 468e3e21901869f2329f7817be6544bf363402f1..eab156b13b22ae63d4d29352797120a14a5255ef 100644
--- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
-@@ -1172,8 +1172,11 @@ ResourceErrorOr<Ref<CachedResource>> CachedResourceLoader::requestResource(Cache
+@@ -1177,8 +1177,11 @@ ResourceErrorOr<Ref<CachedResource>> CachedResourceLoader::requestResource(Cache
request.updateReferrerPolicy(document ? document->referrerPolicy() : ReferrerPolicy::Default);
@@ -4823,7 +4786,7 @@ index 7be02354989d0b0d52732318c676313d01ca83a4..c568730f75b62fdeff861a443c8a9cc5
if (RefPtr documentLoader = m_documentLoader) {
bool madeHTTPS { request.resourceRequest().wasSchemeOptimisticallyUpgraded() };
-@@ -1830,8 +1833,9 @@ Vector<Ref<SVGImage>> CachedResourceLoader::allCachedSVGImages() const
+@@ -1837,8 +1840,9 @@ Vector<Ref<SVGImage>> CachedResourceLoader::allCachedSVGImages() const
ResourceErrorOr<Ref<CachedResource>> CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequest&& request)
{
@@ -4836,10 +4799,10 @@ index 7be02354989d0b0d52732318c676313d01ca83a4..c568730f75b62fdeff861a443c8a9cc5
RefPtr document = m_document;
ASSERT(document);
diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h
-index 86a65aa2b510255e130013985c3c1de48c4ddf8e..8868f815f521424b47b349b2d65856b58ed9aabc 100644
+index 8bd12ba1ab6a74fed98b2cbb26b98703eb2f23c7..dfa8975427020e0a88ab54068b2934f35c8b5976 100644
--- a/Source/WebCore/page/ChromeClient.h
+++ b/Source/WebCore/page/ChromeClient.h
-@@ -409,7 +409,7 @@ public:
+@@ -406,7 +406,7 @@ public:
#endif
#if ENABLE(ORIENTATION_EVENTS)
@@ -4849,10 +4812,10 @@ index 86a65aa2b510255e130013985c3c1de48c4ddf8e..8868f815f521424b47b349b2d65856b5
virtual RefPtr<ColorChooser> createColorChooser(ColorChooserClient&, const Color&) = 0;
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp
-index 91ce2cf2c5d4da9b816d73a5132c80536946a9d2..8966fd4fda62a813c79d31231d8a7963aca05cde 100644
+index bc433bf1b86799119d8b9c0bd27f57e71d74de5f..c6899c71012f0bb7756d0ed98be30cc2fea89c12 100644
--- a/Source/WebCore/page/EventHandler.cpp
+++ b/Source/WebCore/page/EventHandler.cpp
-@@ -4832,6 +4832,12 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
+@@ -4839,6 +4839,12 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
if (!document)
return false;
@@ -4865,7 +4828,7 @@ index 91ce2cf2c5d4da9b816d73a5132c80536946a9d2..8966fd4fda62a813c79d31231d8a7963
dragState().dataTransfer = DataTransfer::createForDrag(*document);
auto hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No;
-@@ -5436,6 +5442,7 @@ static HitTestResult hitTestResultInFrame(LocalFrame* frame, const LayoutPoint&
+@@ -5442,6 +5448,7 @@ static HitTestResult hitTestResultInFrame(LocalFrame* frame, const LayoutPoint&
return result;
}
@@ -4873,7 +4836,7 @@ index 91ce2cf2c5d4da9b816d73a5132c80536946a9d2..8966fd4fda62a813c79d31231d8a7963
Expected<bool, RemoteFrameGeometryTransformer> EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
{
Ref frame = m_frame.get();
-@@ -5567,7 +5574,7 @@ Expected<bool, RemoteFrameGeometryTransformer> EventHandler::handleTouchEvent(co
+@@ -5573,7 +5580,7 @@ Expected<bool, RemoteFrameGeometryTransformer> EventHandler::handleTouchEvent(co
if (!targetFrame)
continue;
@@ -4882,7 +4845,7 @@ index 91ce2cf2c5d4da9b816d73a5132c80536946a9d2..8966fd4fda62a813c79d31231d8a7963
RefPtr<EventTarget> pointerTarget = touchTarget;
if (pointState != PlatformTouchPoint::TouchPressed) {
-@@ -5663,6 +5670,7 @@ Expected<bool, RemoteFrameGeometryTransformer> EventHandler::handleTouchEvent(co
+@@ -5669,6 +5676,7 @@ Expected<bool, RemoteFrameGeometryTransformer> EventHandler::handleTouchEvent(co
return swallowedEvent;
}
@@ -4891,10 +4854,10 @@ index 91ce2cf2c5d4da9b816d73a5132c80536946a9d2..8966fd4fda62a813c79d31231d8a7963
#if ENABLE(TOUCH_EVENTS)
diff --git a/Source/WebCore/page/FocusController.cpp b/Source/WebCore/page/FocusController.cpp
-index 2afe4760de2da985bb31273ef3deb6d927093b80..54539f5b9779e3cffa6d7737c4649b88cb874d8c 100644
+index a6b68958cf92e510c32a5f8f5109bd043c8d39cd..62785de429c7025a7c022d991eaf82cdd5942911 100644
--- a/Source/WebCore/page/FocusController.cpp
+++ b/Source/WebCore/page/FocusController.cpp
-@@ -707,13 +707,14 @@ bool FocusController::relinquishFocusToChrome(FocusDirection direction)
+@@ -705,13 +705,14 @@ bool FocusController::relinquishFocusToChrome(FocusDirection direction)
return false;
Ref page = m_page.get();
@@ -4941,10 +4904,10 @@ index 7a6671ff0da0bbec833318a1c37e6280ad9f4255..5a16fa04c515f0c3842d1187eeacc487
WeakRef<LocalFrame> m_frame;
};
diff --git a/Source/WebCore/page/FrameSnapshotting.cpp b/Source/WebCore/page/FrameSnapshotting.cpp
-index 2ab269da2d54786965489c0a07596be3e8784f3c..f0a2cb19308288cec3178a265c7da8cb12b73ace 100644
+index 87412fed69d613ce6c761eff02a43b23275a4f1d..91a0fbcb4c661f8a399dfe1c32e60f7951809120 100644
--- a/Source/WebCore/page/FrameSnapshotting.cpp
+++ b/Source/WebCore/page/FrameSnapshotting.cpp
-@@ -123,7 +123,7 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&
+@@ -119,7 +119,7 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&
// Other paint behaviors are set by paintContentsForSnapshot.
frame.view()->setPaintBehavior(paintBehavior);
@@ -4953,7 +4916,7 @@ index 2ab269da2d54786965489c0a07596be3e8784f3c..f0a2cb19308288cec3178a265c7da8cb
if (options.flags.contains(SnapshotFlags::PaintWith3xBaseScale))
scaleFactor = 3;
-@@ -142,6 +142,8 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&
+@@ -138,6 +138,8 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&
return nullptr;
buffer->context().translate(-imageRect.location());
@@ -4962,20 +4925,20 @@ index 2ab269da2d54786965489c0a07596be3e8784f3c..f0a2cb19308288cec3178a265c7da8cb
if (!clipRects.isEmpty()) {
Path clipPath;
-@@ -150,7 +152,10 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&
+@@ -146,7 +148,10 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&
buffer->context().clipPath(clipPath);
}
-- frame.view()->paintContentsForSnapshot(buffer->context(), imageRect, shouldIncludeSelection, coordinateSpace);
+- protect(frame.view())->paintContentsForSnapshot(buffer->context(), imageRect, nodeToDraw, shouldIncludeSelection, coordinateSpace);
+ FloatRect fr = imageRect;
+ if (coordinateSpace != LocalFrameView::ViewCoordinates)
+ fr.scale(frame.page()->pageScaleFactor());
-+ frame.view()->paintContentsForSnapshot(buffer->context(), enclosingIntRect(fr), shouldIncludeSelection, coordinateSpace);
++ protect(frame.view())->paintContentsForSnapshot(buffer->context(), enclosingIntRect(fr), nodeToDraw, shouldIncludeSelection, coordinateSpace);
return buffer;
}
diff --git a/Source/WebCore/page/FrameSnapshotting.h b/Source/WebCore/page/FrameSnapshotting.h
-index 5126a48555a951dd4c705850f619fb6730166eb6..c043cf360a488ad41db6b457baaa5634712fff35 100644
+index c2b2414ff79ee801b45257e5cca5bcc7586b69e6..5b08ef32ee9bc9be05639a0a50634db6daa20b4e 100644
--- a/Source/WebCore/page/FrameSnapshotting.h
+++ b/Source/WebCore/page/FrameSnapshotting.h
@@ -44,7 +44,7 @@ class ImageBuffer;
@@ -5026,7 +4989,7 @@ index 4e43a48341c52ac028f48dfdf8620fa75f9eb0d1..bb23998151b69451ff749e0c39c739bc
}
diff --git a/Source/WebCore/page/LocalFrame.cpp b/Source/WebCore/page/LocalFrame.cpp
-index 80ca45ad29bef4523c42bcc66d4f06083a58b53b..28af933cf7af65579046979b19e19f157dc09d21 100644
+index aec99afaf767a4346d2929133c202b78b71d2e8c..10f1d3496234e40cb46a584d1db0266d9e564f0e 100644
--- a/Source/WebCore/page/LocalFrame.cpp
+++ b/Source/WebCore/page/LocalFrame.cpp
@@ -93,6 +93,7 @@
@@ -5054,7 +5017,7 @@ index 80ca45ad29bef4523c42bcc66d4f06083a58b53b..28af933cf7af65579046979b19e19f15
return 0;
}
#endif // ENABLE(ORIENTATION_EVENTS)
-@@ -1679,7 +1681,6 @@ String LocalFrame::frameURLProtocol() const
+@@ -1683,7 +1685,6 @@ String LocalFrame::frameURLProtocol() const
return ""_s;
}
@@ -5062,16 +5025,7 @@ index 80ca45ad29bef4523c42bcc66d4f06083a58b53b..28af933cf7af65579046979b19e19f15
static bool nodeIsMouseFocusable(Node& node)
{
-@@ -1915,7 +1916,7 @@ RefPtr<Node> LocalFrame::nodeRespondingToDoubleClickEvent(const FloatPoint& view
- for (; node && node != terminationNode; node = node->parentInComposedTree()) {
- if (!node->hasEventListeners(eventNames().dblclickEvent))
- continue;
--#if ENABLE(TOUCH_EVENTS)
-+#if ENABLE(TWO_PHASE_CLICKS)
- if (!node->allowsDoubleTapGesture())
- continue;
- #endif
-@@ -1929,7 +1930,6 @@ RefPtr<Node> LocalFrame::nodeRespondingToDoubleClickEvent(const FloatPoint& view
+@@ -1933,7 +1934,6 @@ RefPtr<Node> LocalFrame::nodeRespondingToDoubleClickEvent(const FloatPoint& view
return qualifyingNodeAtViewportLocation(viewportLocation, adjustedViewportLocation, WTF::move(ancestorRespondingToDoubleClickEvent), ShouldApproximate::Yes);
}
@@ -5126,7 +5080,7 @@ index 04ba5a1ede9495bad18c532676b2121c09c407d9..614217e465ff12a26f35b69f3f82e8b6
void NODELETE selfOnlyRef();
void selfOnlyDeref();
diff --git a/Source/WebCore/page/Navigation.cpp b/Source/WebCore/page/Navigation.cpp
-index 11edcb95f3bab26b3e1f6ab14a38f058098eac49..2d80fdee2e0df781271c56a7ed8d96f9c0d1532f 100644
+index 7f2902f5c6c462780638e8e70c885af71eea0e51..181ed5b30713e868a32c3c721edad72ce05c0507 100644
--- a/Source/WebCore/page/Navigation.cpp
+++ b/Source/WebCore/page/Navigation.cpp
@@ -47,6 +47,7 @@
@@ -5137,7 +5091,7 @@ index 11edcb95f3bab26b3e1f6ab14a38f058098eac49..2d80fdee2e0df781271c56a7ed8d96f9
#include "JSDOMConvertAny.h"
#include "JSDOMConvertInterface.h"
#include "JSDOMGlobalObject.h"
-@@ -1147,6 +1148,8 @@ void Navigation::setupInterceptionState(NavigateEvent& event, NavigationNavigati
+@@ -1195,6 +1196,8 @@ void Navigation::setupInterceptionState(NavigateEvent& event, NavigationNavigati
// Only notify committed now if there are no handlers to wait for
auto shouldNotifyCommited = event.handlers().isEmpty() ? ShouldNotifyCommitted::Yes : ShouldNotifyCommitted::No;
updateForNavigation(entry->associatedHistoryItem(), navigationType, ShouldCopyStateObjectFromCurrentEntry::No, shouldNotifyCommited);
@@ -5146,7 +5100,7 @@ index 11edcb95f3bab26b3e1f6ab14a38f058098eac49..2d80fdee2e0df781271c56a7ed8d96f9
}
}
} else if (navigationType == NavigationNavigationType::Reload) {
-@@ -1155,6 +1158,8 @@ void Navigation::setupInterceptionState(NavigateEvent& event, NavigationNavigati
+@@ -1203,6 +1206,8 @@ void Navigation::setupInterceptionState(NavigateEvent& event, NavigationNavigati
} else if (navigationType == NavigationNavigationType::Push || navigationType == NavigationNavigationType::Replace) {
auto historyHandling = navigationType == NavigationNavigationType::Replace ? NavigationHistoryBehavior::Replace : NavigationHistoryBehavior::Push;
frame()->loader().updateURLAndHistory(destination.url(), classicHistoryAPIState, historyHandling);
@@ -5156,7 +5110,7 @@ index 11edcb95f3bab26b3e1f6ab14a38f058098eac49..2d80fdee2e0df781271c56a7ed8d96f9
}
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp
-index a523afe99c8dc4fc5925f2151500bab5eea67dfd..0a8ad0c18660bf9f41a04f662132221e06f634d5 100644
+index 0d836d72a7a6aff23e492c8949ca74e28590161e..9c6bab0e0d5e0a0df35b05409632b1f6d5800a05 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
@@ -699,6 +699,44 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
@@ -5204,7 +5158,7 @@ index a523afe99c8dc4fc5925f2151500bab5eea67dfd..0a8ad0c18660bf9f41a04f662132221e
ScrollingCoordinator* Page::scrollingCoordinator()
{
if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) {
-@@ -4397,6 +4435,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
+@@ -4403,6 +4441,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
appearanceDidChange();
}
@@ -5232,7 +5186,7 @@ index a523afe99c8dc4fc5925f2151500bab5eea67dfd..0a8ad0c18660bf9f41a04f662132221e
{
if (insets == m_fullscreenInsets)
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
-index f3d16a786093631e5eabe981478aeb66e14f2d32..ce7a7cae69455f79057bb0fd671c901939152c8f 100644
+index b89dc96b0a6cc8ea7558bbd6a3ff1c1745df1134..f20e292c6ee83df54db0a92d7566fd68c0e8265e 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
@@ -410,6 +410,9 @@ public:
@@ -5256,7 +5210,7 @@ index f3d16a786093631e5eabe981478aeb66e14f2d32..ce7a7cae69455f79057bb0fd671c9019
#endif
FocusController& focusController() const { return m_focusController; }
#if ENABLE(CONTEXT_MENUS)
-@@ -685,6 +692,10 @@ public:
+@@ -689,6 +696,10 @@ public:
WEBCORE_EXPORT void setUseColorAppearance(bool useDarkAppearance, bool useElevatedUserInterfaceLevel);
bool defaultUseDarkAppearance() const { return m_useDarkAppearance; }
void setUseDarkAppearanceOverride(std::optional<bool>);
@@ -5311,7 +5265,7 @@ index f3d16a786093631e5eabe981478aeb66e14f2d32..ce7a7cae69455f79057bb0fd671c9019
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
RefPtr<DeviceOrientationUpdateProvider> m_deviceOrientationUpdateProvider;
diff --git a/Source/WebCore/page/PointerCaptureController.cpp b/Source/WebCore/page/PointerCaptureController.cpp
-index ca28b7db28b39b711fa9c0a537fa8bb0e22187b0..3f36bd4c2e9c4e860be6cf1717161456df821057 100644
+index a06664896454c5a28e90ff2fa27232318c76e2ed..eafd15047ca9258440d07d0c92af85994974a187 100644
--- a/Source/WebCore/page/PointerCaptureController.cpp
+++ b/Source/WebCore/page/PointerCaptureController.cpp
@@ -213,7 +213,7 @@ bool PointerCaptureController::preventsCompatibilityMouseEventsForIdentifier(Poi
@@ -5405,10 +5359,10 @@ index cd1f3ce09ba0ab6e414bfcb12f38918404946700..f78cd1f89fb32ce4b9109c80f1f7c303
}
diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
-index d79832247cdbc228c21513ee2d76bec47f5d8ff8..cea351e8b6b8016697702967f3bdab8e17ea7f2d 100644
+index 2be24319b0c5549f9f6b392cffb8f218c7e8d55a..f8bd4b8be38b9c33d875d5ff6f75957f30d50532 100644
--- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
+++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
-@@ -360,6 +360,8 @@ template<typename Predicate, typename... Args>
+@@ -367,6 +367,8 @@ template<typename Predicate, typename... Args>
bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposition, Predicate&& predicate, Args&&... args) const
requires (!std::is_convertible_v<Predicate, ContentSecurityPolicy::ViolatedDirectiveCallback>)
{
@@ -5417,7 +5371,7 @@ index d79832247cdbc228c21513ee2d76bec47f5d8ff8..cea351e8b6b8016697702967f3bdab8e
bool isReportOnly = disposition == ContentSecurityPolicy::Disposition::ReportOnly;
for (auto& policy : m_policies) {
if (policy->isReportOnly() != isReportOnly)
-@@ -373,6 +375,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit
+@@ -380,6 +382,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit
template<typename Predicate, typename... Args>
bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposition, ViolatedDirectiveCallback&& callback, Predicate&& predicate, Args&&... args) const
{
@@ -5426,7 +5380,7 @@ index d79832247cdbc228c21513ee2d76bec47f5d8ff8..cea351e8b6b8016697702967f3bdab8e
bool isReportOnly = disposition == ContentSecurityPolicy::Disposition::ReportOnly;
bool isAllowed = true;
for (auto& policy : m_policies) {
-@@ -389,6 +393,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit
+@@ -396,6 +400,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit
template<typename Predicate, typename... Args>
bool ContentSecurityPolicy::allPoliciesAllow(NOESCAPE const ViolatedDirectiveCallback& callback, Predicate&& predicate, Args&&... args) const
{
@@ -5548,7 +5502,7 @@ index 9e2964b6e5f27f3a9c9f39e95b37de574cd52b1b..20e211ebc0217e6f4e66118fd98a7eb4
bool m_disallowFileAccess { false };
};
diff --git a/Source/WebCore/platform/Pasteboard.h b/Source/WebCore/platform/Pasteboard.h
-index d9385d5b78da7bc44fca6de52ff68f73726cd80b..81e810655b1b5e1ee1218e5606cc58ba34a57ed3 100644
+index de2f5bf37b1e7b3b31156cc21d96536ab2eff154..052463df3476fc9f929db9275345459067b07115 100644
--- a/Source/WebCore/platform/Pasteboard.h
+++ b/Source/WebCore/platform/Pasteboard.h
@@ -322,6 +322,7 @@ public:
@@ -5579,11 +5533,25 @@ index 071f9fa0e6cfaa84d9b077e39a64bec9361ead9a..fdd0ec667cc7e2f59bd2d21c5c381ae5
static String singleCharacterString(unsigned);
#endif
+diff --git a/Source/WebCore/platform/PlatformPasteboard.h b/Source/WebCore/platform/PlatformPasteboard.h
+index be45b4c0967f2805a4b44e014f053a68c4ed900a..bb8771678618125f5f9f5e818e888bb5d9823d87 100644
+--- a/Source/WebCore/platform/PlatformPasteboard.h
++++ b/Source/WebCore/platform/PlatformPasteboard.h
+@@ -64,6 +64,9 @@ enum class PasteboardDataLifetime : bool { Persistent, Ephemeral };
+ class PlatformPasteboard {
+ public:
+ WEBCORE_EXPORT explicit PlatformPasteboard(const String& pasteboardName);
++#if PLATFORM(MAC)
++ WEBCORE_EXPORT static void setIsolated(bool);
++#endif
+ #if PLATFORM(IOS_FAMILY) || USE(LIBWPE)
+ WEBCORE_EXPORT PlatformPasteboard();
+ WEBCORE_EXPORT void updateSupportedTypeIdentifiers(const Vector<String>& types);
diff --git a/Source/WebCore/platform/PlatformScreen.cpp b/Source/WebCore/platform/PlatformScreen.cpp
-index 2f0f8a0c34ee8af144ef7b8787cae5f7eac9cf45..454f2a08ebddb21c4980a684697836b21f1f098f 100644
+index 154251118cd47168a9c058e89b5f9823ea83747d..7f914c97cf9cc5c843df07c3663018b1a918131b 100644
--- a/Source/WebCore/platform/PlatformScreen.cpp
+++ b/Source/WebCore/platform/PlatformScreen.cpp
-@@ -128,3 +128,24 @@ void PlatformScreen::updateSingletonContentsFormatsForTesting(OptionSet<Contents
+@@ -127,3 +127,24 @@ void PlatformScreen::updateSingletonContentsFormatsForTesting(OptionSet<Contents
} // namespace WebCore
#endif // PLATFORM(COCOA) || PLATFORM(GTK) || (PLATFORM(WPE) && ENABLE(WPE_PLATFORM))
@@ -5653,6 +5621,19 @@ index 8de9b7ed5c5c92eb9700105e5ae186755b13423a..91a007843f7539a2c61121217d393048
// FIXME: since WPE currently does not send touch stationary events, we need to be able to set
// TouchCancelled touchPoints subsequently
void setTouchPoints(Vector<PlatformTouchPoint>& touchPoints) { m_touchPoints = touchPoints; }
+diff --git a/Source/WebCore/platform/PlatformTouchPoint.h b/Source/WebCore/platform/PlatformTouchPoint.h
+index 2c16bb535045e0f0658bb9f407ce1022e05fdc83..51df761fd09917fbf14a58c06a4016cf908f403b 100644
+--- a/Source/WebCore/platform/PlatformTouchPoint.h
++++ b/Source/WebCore/platform/PlatformTouchPoint.h
+@@ -20,7 +20,7 @@
+ #ifndef PlatformTouchPoint_h
+ #define PlatformTouchPoint_h
+
+-#include "DoublePoint.h"
++#include <WebCore/DoublePoint.h>
+
+ #if ENABLE(TOUCH_EVENTS)
+
diff --git a/Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.h b/Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.h
index 6bf01bfe47a8802f53435afc946d5208c7d55533..ebc7558fdb9db1046f5d9f52b4cecc6e5057828e 100644
--- a/Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.h
@@ -5691,6 +5672,28 @@ index 515ddea3cd42796efa9f41ad74be07a7447c337e..36db42e2a0822d5609b39046191f05a1
#include <wtf/TZoneMalloc.h>
namespace WebCore {
+diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
+index 3b2f98484435fa2ca3d25bd157f7e6ab334986ec..385b7808e97fada2a7e26a56172004da71b87c1c 100644
+--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
++++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
+@@ -95,12 +95,12 @@ public:
+ return !m_currentFilters.isEmpty();
+ }
+
+- void setShowDebugBorder(bool);
+- void setDebugBorderColor(Color);
+- void setDebugBorderWidth(float);
++ WEBCORE_EXPORT void setShowDebugBorder(bool);
++ WEBCORE_EXPORT void setDebugBorderColor(Color);
++ WEBCORE_EXPORT void setDebugBorderWidth(float);
+
+- void setShowRepaintCounter(bool);
+- void setRepaintCount(int);
++ WEBCORE_EXPORT void setShowRepaintCounter(bool);
++ WEBCORE_EXPORT void setRepaintCount(int);
+
+ WEBCORE_EXPORT void setContentsLayer(TextureMapperPlatformLayer*);
+ void setAnimations(const TextureMapperAnimations&);
diff --git a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp b/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp
index 775df102268b397e6c96e8b93296a7dbe6afcd26..cdbb7b79bde8ba30bc2b0f6bb579b44de72d7fc7 100644
--- a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp
@@ -6122,11 +6125,51 @@ index e47f5bade7c0a27e8a27f8dc95b51174f025b4a6..016efe9bc0898bb648a33973e771b49e
}
Vector<String> PlatformPasteboard::typesSafeForDOMToReadAndWrite(const String&) const
+diff --git a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm b/Source/WebCore/platform/mac/PlatformPasteboardMac.mm
+index 3f9d8eedeae2668ae3fdca0d0cb3bea1e2b958e2..ddc9911b07f2f1115f452c70cf917ecfb0b6f1f6 100644
+--- a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm
++++ b/Source/WebCore/platform/mac/PlatformPasteboardMac.mm
+@@ -79,8 +79,25 @@ void PlatformPasteboard::performAsDataOwner(DataOwnerType, NOESCAPE Function<voi
+ actions();
+ }
+
++static bool s_isolated = false;
++
++void PlatformPasteboard::setIsolated(bool isolated)
++{
++ s_isolated = isolated;
++}
++
++static RetainPtr<NSPasteboard> getNSPasteboard(const String& pasteboardName)
++{
++ RetainPtr name = pasteboardName.createNSString();
++ if (s_isolated && [name isEqualToString:NSPasteboardNameGeneral]) {
++ static NeverDestroyed<RetainPtr<NSPasteboard>> isolatedPasteboard = [NSPasteboard pasteboardWithUniqueName];
++ return isolatedPasteboard.get();
++ }
++ return [NSPasteboard pasteboardWithName:name.get()];
++}
++
+ PlatformPasteboard::PlatformPasteboard(const String& pasteboardName)
+- : m_pasteboard([NSPasteboard pasteboardWithName:pasteboardName.createNSString().get()])
++ : m_pasteboard(getNSPasteboard(pasteboardName))
+ {
+ ASSERT(pasteboardName);
+ }
+@@ -365,7 +382,7 @@ URL PlatformPasteboard::url()
+
+ int64_t PlatformPasteboard::copy(const String& fromPasteboard)
+ {
+- RetainPtr pasteboard = [NSPasteboard pasteboardWithName:fromPasteboard.createNSString().get()];
++ RetainPtr pasteboard = getNSPasteboard(fromPasteboard);
+ RetainPtr<NSArray> types = [pasteboard types];
+
+ [m_pasteboard addTypes:types.get() owner:nil];
diff --git a/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp b/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp
-index 6a5b3325d2aae3c4769332fa7488e2ca7dd55ef5..3065482616cb5fbc61913f71822262bcbbbd43cf 100644
+index 7012d324acf8c79e6c36694c798044d9783dc56e..c5e17eabb7cedde3da7db80001e02a9f88541446 100644
--- a/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp
+++ b/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp
-@@ -35,6 +35,7 @@
+@@ -36,6 +36,7 @@
#include <gst/video/video.h>
#include <wtf/TZoneMallocInlines.h>
#include <wtf/glib/GUniquePtr.h>
@@ -6152,10 +6195,10 @@ index df27a094a0b2239892c96b4f5835826bcf8d7540..3bbea5c96110c0ae70d944b7f6fb018e
m_commonHeaders.append(CommonHeader { name, value });
}
diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h
-index 0640345cf5f133b7f84d3e32b272871d9beff519..320dce768def18327ee25e889109cd6d75ba4cac 100644
+index 9d66f1a7d0e19a92f19c932725dfddc64c22e13b..76cad8774303333062a9687621884e8ef2f111ce 100644
--- a/Source/WebCore/platform/network/NetworkStorageSession.h
+++ b/Source/WebCore/platform/network/NetworkStorageSession.h
-@@ -201,6 +201,7 @@ public:
+@@ -200,6 +200,7 @@ public:
NetworkingContext* context() const;
#endif
@@ -6164,7 +6207,7 @@ index 0640345cf5f133b7f84d3e32b272871d9beff519..320dce768def18327ee25e889109cd6d
WEBCORE_EXPORT HTTPCookieAcceptPolicy cookieAcceptPolicy() const;
WEBCORE_EXPORT void setCookie(const Cookie&);
diff --git a/Source/WebCore/platform/network/ResourceResponseBase.cpp b/Source/WebCore/platform/network/ResourceResponseBase.cpp
-index 8c5d3ca76595bdac8127b85901c1417b45e11210..77230ddedeb32d90edf610ac4479d24c41e6d1bd 100644
+index 6e637dae2c780dec6068b3c18a1d1d685d548315..4d05da21e9b3f3a65d080158f2c5d545cbb47266 100644
--- a/Source/WebCore/platform/network/ResourceResponseBase.cpp
+++ b/Source/WebCore/platform/network/ResourceResponseBase.cpp
@@ -21,7 +21,7 @@
@@ -6273,7 +6316,7 @@ index 8c5d3ca76595bdac8127b85901c1417b45e11210..77230ddedeb32d90edf610ac4479d24c
bool ResourceResponseBase::cacheControlContainsNoCache() const
{
if (!m_haveParsedCacheControlHeader)
-@@ -707,7 +708,7 @@ bool ResourceResponseBase::cacheControlContainsMustRevalidate() const
+@@ -714,7 +715,7 @@ bool ResourceResponseBase::cacheControlContainsMustRevalidate() const
parseCacheControlDirectives();
return m_cacheControlDirectives.mustRevalidate;
}
@@ -6282,7 +6325,7 @@ index 8c5d3ca76595bdac8127b85901c1417b45e11210..77230ddedeb32d90edf610ac4479d24c
bool ResourceResponseBase::cacheControlContainsImmutable() const
{
if (!m_haveParsedCacheControlHeader)
-@@ -862,7 +863,7 @@ void ResourceResponseBase::lazyInit(InitLevel initLevel) const
+@@ -869,7 +870,7 @@ void ResourceResponseBase::lazyInit(InitLevel initLevel) const
bool ResourceResponseBase::equalForWebKitLegacyChallengeComparison(const ResourceResponse& a, const ResourceResponse& b)
{
if (a.isNull() != b.isNull())
@@ -6291,7 +6334,7 @@ index 8c5d3ca76595bdac8127b85901c1417b45e11210..77230ddedeb32d90edf610ac4479d24c
if (a.url() != b.url())
return false;
if (a.mimeType() != b.mimeType())
-@@ -896,7 +897,7 @@ std::optional<ResourceResponseData> ResourceResponseBase::getResponseData() cons
+@@ -903,7 +904,7 @@ std::optional<ResourceResponseData> ResourceResponseBase::getResponseData() cons
if (m_isNull)
return std::nullopt;
lazyInit(AllFields);
@@ -6300,7 +6343,7 @@ index 8c5d3ca76595bdac8127b85901c1417b45e11210..77230ddedeb32d90edf610ac4479d24c
return { ResourceResponseData {
URL { m_url },
String { m_mimeType },
-@@ -906,6 +907,7 @@ std::optional<ResourceResponseData> ResourceResponseBase::getResponseData() cons
+@@ -913,6 +914,7 @@ std::optional<ResourceResponseData> ResourceResponseBase::getResponseData() cons
String { m_httpStatusText },
String { m_httpVersion },
HTTPHeaderMap { m_httpHeaderFields },
@@ -6308,7 +6351,15 @@ index 8c5d3ca76595bdac8127b85901c1417b45e11210..77230ddedeb32d90edf610ac4479d24c
m_networkLoadMetrics ? std::optional(*m_networkLoadMetrics) : std::nullopt,
m_source,
m_type,
-@@ -982,6 +984,11 @@ std::optional<WebCore::ResourceResponseData> Coder<WebCore::ResourceResponseData
+@@ -940,6 +942,7 @@ void Coder<WebCore::ResourceResponseData>::encodeForPersistence(Encoder& encoder
+ encoder << data.httpStatusText;
+ encoder << data.httpVersion;
+ encoder << data.httpHeaderFields;
++ encoder << data.httpRequestHeaderFields;
+ encoder << data.httpStatusCode;
+ encoder << data.certificateInfo;
+ encoder << data.source;
+@@ -989,6 +992,11 @@ std::optional<WebCore::ResourceResponseData> Coder<WebCore::ResourceResponseData
if (!httpHeaderFields)
return std::nullopt;
@@ -6320,7 +6371,7 @@ index 8c5d3ca76595bdac8127b85901c1417b45e11210..77230ddedeb32d90edf610ac4479d24c
std::optional<short> httpStatusCode;
decoder >> httpStatusCode;
if (!httpStatusCode)
-@@ -1041,6 +1048,7 @@ std::optional<WebCore::ResourceResponseData> Coder<WebCore::ResourceResponseData
+@@ -1048,6 +1056,7 @@ std::optional<WebCore::ResourceResponseData> Coder<WebCore::ResourceResponseData
WTF::move(*httpStatusText),
WTF::move(*httpVersion),
WTF::move(*httpHeaderFields),
@@ -6329,7 +6380,7 @@ index 8c5d3ca76595bdac8127b85901c1417b45e11210..77230ddedeb32d90edf610ac4479d24c
*source,
*type,
diff --git a/Source/WebCore/platform/network/ResourceResponseBase.h b/Source/WebCore/platform/network/ResourceResponseBase.h
-index a1e2bc02c8b9803f29c9896067b5a36ffef74970..05476499c284130c65aff44691ffa8f11365ab6a 100644
+index bbf59c72869b76e3a38ebbad5857dffcbb558a2d..39f1e7d3b4d8267cdd6b96b421328ec8d7483cd2 100644
--- a/Source/WebCore/platform/network/ResourceResponseBase.h
+++ b/Source/WebCore/platform/network/ResourceResponseBase.h
@@ -21,7 +21,7 @@
@@ -6341,7 +6392,7 @@ index a1e2bc02c8b9803f29c9896067b5a36ffef74970..05476499c284130c65aff44691ffa8f1
*/
#pragma once
-@@ -226,9 +226,9 @@ public:
+@@ -227,9 +227,9 @@ public:
WEBCORE_EXPORT bool containsInvalidHTTPHeaders() const;
WEBCORE_EXPORT static ResourceResponse dataURLResponse(const URL&, const DataURLDecoder::Result&);
@@ -6353,7 +6404,7 @@ index a1e2bc02c8b9803f29c9896067b5a36ffef74970..05476499c284130c65aff44691ffa8f1
WEBCORE_EXPORT std::optional<ResourceResponseData> getResponseData() const;
protected:
-@@ -263,6 +263,11 @@ protected:
+@@ -264,6 +264,11 @@ protected:
String m_httpStatusText;
String m_httpVersion;
HTTPHeaderMap m_httpHeaderFields;
@@ -6365,7 +6416,7 @@ index a1e2bc02c8b9803f29c9896067b5a36ffef74970..05476499c284130c65aff44691ffa8f1
Box<NetworkLoadMetrics> m_networkLoadMetrics;
mutable std::optional<CertificateInfo> m_certificateInfo;
-@@ -306,7 +311,7 @@ struct ResourceResponseData {
+@@ -307,7 +312,7 @@ struct ResourceResponseData {
ResourceResponseData() = default;
ResourceResponseData(ResourceResponseData&&) = default;
ResourceResponseData& operator=(ResourceResponseData&&) = default;
@@ -6374,7 +6425,7 @@ index a1e2bc02c8b9803f29c9896067b5a36ffef74970..05476499c284130c65aff44691ffa8f1
: url(WTF::move(url))
, mimeType(WTF::move(mimeType))
, expectedContentLength(expectedContentLength)
-@@ -315,6 +320,7 @@ struct ResourceResponseData {
+@@ -316,6 +321,7 @@ struct ResourceResponseData {
, httpStatusText(WTF::move(httpStatusText))
, httpVersion(WTF::move(httpVersion))
, httpHeaderFields(WTF::move(httpHeaderFields))
@@ -6382,7 +6433,7 @@ index a1e2bc02c8b9803f29c9896067b5a36ffef74970..05476499c284130c65aff44691ffa8f1
, networkLoadMetrics(WTF::move(networkLoadMetrics))
, source(source)
, type(type)
-@@ -339,6 +345,7 @@ struct ResourceResponseData {
+@@ -340,6 +346,7 @@ struct ResourceResponseData {
String httpStatusText;
String httpVersion;
HTTPHeaderMap httpHeaderFields;
@@ -6391,7 +6442,7 @@ index a1e2bc02c8b9803f29c9896067b5a36ffef74970..05476499c284130c65aff44691ffa8f1
ResourceResponseBase::Source source;
ResourceResponseBase::Type type;
diff --git a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
-index 7b992ba6167f49f41841d907bce45f70c99417f9..f3c7f7fc3db242a6b18f52ab9a16c845be9a11da 100644
+index 3f913649ece7775986317538a7fd516cb2d65df5..2a1813af2d60b12f1778542201fdf1c056ee41c6 100644
--- a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
+++ b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
@@ -582,6 +582,27 @@ bool NetworkStorageSession::setCookieFromDOM(const URL& firstParty, const SameSi
@@ -6436,7 +6487,7 @@ index 96e0a63b347c170c963bc7e851f383b91665c5c8..2f0afc26bcc87e9440e201728778892b
bool m_detectedDatabaseCorruption { false };
diff --git a/Source/WebCore/platform/network/curl/CurlContext.cpp b/Source/WebCore/platform/network/curl/CurlContext.cpp
-index 145c3e2b04c8120d80d07159bcc2db91de328352..2f8eae1a79cca273ec1e5abe9333813a66edc774 100644
+index b9c680d9909a2974929c671c6efd63bffc509c98..c9803a8093e6f39ed5e92cf977b5bd3abf6754d0 100644
--- a/Source/WebCore/platform/network/curl/CurlContext.cpp
+++ b/Source/WebCore/platform/network/curl/CurlContext.cpp
@@ -437,6 +437,11 @@ void CurlHandle::appendRequestHeaders(const HTTPHeaderMap& headers)
@@ -6464,8 +6515,7 @@ index 145c3e2b04c8120d80d07159bcc2db91de328352..2f8eae1a79cca273ec1e5abe9333813a
void CurlHandle::removeRequestHeader(const String& name)
{
-- // Add a header with no content, the internally used header will get disabled.
-+ // Add a header with no content, the internally used header will get disabled.
+ // Add a header with no content, the internally used header will get disabled.
auto header = makeString(name, ':');
- appendRequestHeader(WTF::move(header));
+ if (isProxyHeader(name))
@@ -6475,7 +6525,7 @@ index 145c3e2b04c8120d80d07159bcc2db91de328352..2f8eae1a79cca273ec1e5abe9333813a
}
void CurlHandle::appendRequestHeader(const String& header)
-@@ -477,6 +488,25 @@ void CurlHandle::enableRequestHeaders()
+@@ -487,6 +498,16 @@ void CurlHandle::enableRequestHeaders()
curl_easy_setopt(m_handle, CURLOPT_HTTPHEADER, headers);
}
@@ -6489,39 +6539,21 @@ index 145c3e2b04c8120d80d07159bcc2db91de328352..2f8eae1a79cca273ec1e5abe9333813a
+ enableProxyRequestHeaders();
+}
+
-+void CurlHandle::enableProxyRequestHeaders()
-+{
-+ if (m_proxyRequestHeaders.isEmpty())
-+ return;
-+
-+ const struct curl_slist* headers = m_proxyRequestHeaders.head();
-+ curl_easy_setopt(m_handle, CURLOPT_PROXYHEADER, headers);
-+}
-+
- void CurlHandle::enableHttp()
+ void CurlHandle::enableProxyRequestHeaders()
{
- auto isHttp2Enabled = CurlContext::singleton().isHttp2Enabled();
+ if (m_proxyRequestHeaders.isEmpty())
diff --git a/Source/WebCore/platform/network/curl/CurlContext.h b/Source/WebCore/platform/network/curl/CurlContext.h
-index 807138b0202ea76b5b505e47ac4dd0064364f129..4f39f0f5105d7c807dc67f70fbe6100c94d6968d 100644
+index 7cc418aecda678c62d6e0873e87c1f19425113fa..4f39f0f5105d7c807dc67f70fbe6100c94d6968d 100644
--- a/Source/WebCore/platform/network/curl/CurlContext.h
+++ b/Source/WebCore/platform/network/curl/CurlContext.h
-@@ -328,6 +328,8 @@ private:
+@@ -328,6 +328,7 @@ private:
};
void enableRequestHeaders();
+ void appendProxyRequestHeader(String&&);
-+ void enableProxyRequestHeaders();
+ void enableProxyRequestHeaders();
static CURLcode willSetupSslCtxCallback(CURL*, void* sslCtx, void* userData);
- CURLcode willSetupSslCtx(void* sslCtx);
-@@ -340,6 +342,7 @@ private:
- URL m_url;
- CurlSList m_localhostAlias;
- CurlSList m_requestHeaders;
-+ CurlSList m_proxyRequestHeaders;
-
- std::unique_ptr<CurlSSLVerifier> m_sslVerifier;
- std::unique_ptr<TLSConnectionInfo> m_tlsConnectionInfo;
diff --git a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
index 5a78d6c775542cd62d3b192dc60972fdbea92270..5dab0edfef83cc1672012d94bcb4d6390b91bc97 100644
--- a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
@@ -6540,7 +6572,7 @@ index 5a78d6c775542cd62d3b192dc60972fdbea92270..5dab0edfef83cc1672012d94bcb4d639
{
switch (cookieDatabase().acceptPolicy()) {
diff --git a/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp b/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
-index f3c07eb9e056bf031d37b1d2d30a2ebcbe4ba42e..c6b732f75b4e3e823d8c3ebc0b825e389e1d175a 100644
+index 304d5114057ce554a398bc74f17b4f07dd5a8c84..42dce19894aac53c0fbf83c9ea12c8e13ee3c0e8 100644
--- a/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
+++ b/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
@@ -531,6 +531,26 @@ void NetworkStorageSession::replaceCookies(const Vector<Cookie>& cookies)
@@ -6723,7 +6755,7 @@ index d079788986aedd2800a9870e9d4325a1d6fe98fe..24c1e2d4493c8afd95bfdfb7a0883334
+
} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp
-index e55914e2ddd81f0c5cde874a25fb3677bfe5e518..9644bc8d9242598b3bdd2251ec0927ea20b06d87 100644
+index 0a0539b6186c74c0b51c5c6f747ce501b65b09db..a369e4f1751d00938e8253d9769b9dcb8b289935 100644
--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp
@@ -1067,8 +1067,10 @@ bool RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
@@ -6738,10 +6770,10 @@ index e55914e2ddd81f0c5cde874a25fb3677bfe5e518..9644bc8d9242598b3bdd2251ec0927ea
bool isPageScroll = !updateRootArg || updateRootArg == &rootRenderLayer();
CheckedPtr updateRoot = &rootRenderLayer();
diff --git a/Source/WebCore/rendering/RenderTextControl.cpp b/Source/WebCore/rendering/RenderTextControl.cpp
-index 6b4d0d81a5f64b78e8a628fa9a8323f465539a1f..9076eec04a892f371cc12d2a59b3c64d48b5755c 100644
+index 803d0ca2a31978a0dff80bd8fce59fa835cb9b68..4e533b9ab9016dd503a15a352c7dc7311e5cfaf8 100644
--- a/Source/WebCore/rendering/RenderTextControl.cpp
+++ b/Source/WebCore/rendering/RenderTextControl.cpp
-@@ -258,13 +258,13 @@ void RenderTextControl::layoutExcludedChildren(RelayoutChildren relayoutChildren
+@@ -260,13 +260,13 @@ void RenderTextControl::layoutExcludedChildren(RelayoutChildren relayoutChildren
}
}
@@ -6794,7 +6826,7 @@ index 60e744703647b7593426c59814975bf12dc4ebaa..d5156a30396fb2ad7e73c5c5429a07d5
WorkerOrWorkletGlobalScope& globalScope() { return m_globalScope; }
diff --git a/Source/WebGPU/WGSL/UniformityAnalysis.cpp b/Source/WebGPU/WGSL/UniformityAnalysis.cpp
-index e8032692ff9b48bfe6994c4202b7c67993aee5da..3da1878782599d7dca9dcac47b023f674913c365 100644
+index a96118e5fbb7d0259867379dc9d3dfb0640b8ff1..98204c53faf0019cd5211b70ecfac55955130093 100644
--- a/Source/WebGPU/WGSL/UniformityAnalysis.cpp
+++ b/Source/WebGPU/WGSL/UniformityAnalysis.cpp
@@ -118,8 +118,10 @@ struct FunctionInfo {
@@ -6808,7 +6840,7 @@ index e8032692ff9b48bfe6994c4202b7c67993aee5da..3da1878782599d7dca9dcac47b023f67
case SeverityControl::Off: return nullptr;
}
RELEASE_ASSERT_NOT_REACHED();
-@@ -311,8 +313,10 @@ std::optional<Error> UniformityGraph::processFunction(AST::Function& function)
+@@ -360,8 +362,10 @@ std::optional<Error> UniformityGraph::processFunction(AST::Function& function)
m_currentFunction = &info;
info.requiredToBeUniform[0] = info.createNode();
@@ -6820,10 +6852,10 @@ index e8032692ff9b48bfe6994c4202b7c67993aee5da..3da1878782599d7dca9dcac47b023f67
info.cfStart = info.createNode();
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
-index 3c29eca336f76ad99a2680552f8fef67331493af..550bbd001147a0468ae3a22426a29104867d6ea3 100644
+index e1ca4d80a092ce2fa88e816ab173b8f2eb8dbe28..18e1a0d1e87a2c86b5a2d1358d62f66455b15fb5 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
-@@ -99,6 +99,8 @@
+@@ -100,6 +100,8 @@
#if PLATFORM(COCOA)
#include <wtf/FileSystem.h>
@@ -6832,7 +6864,7 @@ index 3c29eca336f76ad99a2680552f8fef67331493af..550bbd001147a0468ae3a22426a29104
#include <wtf/OSObjectPtr.h>
#include <wtf/spi/darwin/SandboxSPI.h>
#endif
-@@ -1332,6 +1334,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)
+@@ -1367,6 +1369,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)
storageSession->clearPageSpecificDataForResourceLoadStatistics(pageID);
}
@@ -6848,10 +6880,10 @@ index 3c29eca336f76ad99a2680552f8fef67331493af..550bbd001147a0468ae3a22426a29104
{
if (CheckedPtr storageSession = m_networkProcess->storageSession(m_sessionID))
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-index d367a92d9859dcc686f1fa020471d04821a5f4fe..3ccd6bfd43cd735c48cff2df68feb2db4900ba23 100644
+index a9c081afbf41b3600f903008f31e4952c61e6e9f..4eed3ec4aa2b840be80d0dde54a9fa03bcd6034a 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-@@ -399,6 +399,8 @@ private:
+@@ -404,6 +404,8 @@ private:
void clearPageSpecificData(WebCore::PageIdentifier);
@@ -6861,10 +6893,10 @@ index d367a92d9859dcc686f1fa020471d04821a5f4fe..3ccd6bfd43cd735c48cff2df68feb2db
void logUserInteraction(RegistrableDomain&&);
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
-index 7881aacfe9a52a3375173727e061000bd75a0fcc..3740b503f84992c48f175a6354d27242af9a3d52 100644
+index 00fe84f0441ae843c3f572129e0476df5335e4cb..3d001b7f77249b78d240be01e1e23ea6a42f47b4 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
-@@ -85,6 +85,8 @@ messages -> NetworkConnectionToWebProcess WantsDispatchMessage {
+@@ -86,6 +86,8 @@ messages -> NetworkConnectionToWebProcess WantsDispatchMessage {
ClearPageSpecificData(WebCore::PageIdentifier pageID);
@@ -6874,10 +6906,10 @@ index 7881aacfe9a52a3375173727e061000bd75a0fcc..3740b503f84992c48f175a6354d27242
LogUserInteraction(WebCore::RegistrableDomain domain)
ResourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics> statistics) -> ()
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-index 9dd97c0cb8685f61f9a6d8a5dcb5748716a1037e..3588f4911b7d9151e5bcf4f166b4e9879ccb81f5 100644
+index e9ab1470b2e7bdb7a4fbf4933e1f27874771574a..df6aae4861d5aca146ca14addb02d9c9386e7b9e 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-@@ -896,6 +896,14 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)data
+@@ -901,6 +901,14 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)data
resourceResponse.setDeprecatedNetworkLoadMetrics(WebCore::copyTimingData(taskMetrics.get(), networkDataTask->networkLoadMetrics()));
resourceResponse.setProxyName(WTF::move(proxyName));
@@ -6905,7 +6937,7 @@ index 0a2c25f815f594b2de6168ffd8b083c625e42e1f..682c4584f34d6fab8b576b331561102d
handleCookieHeaders(request.resourceRequest(), receivedResponse);
diff --git a/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in b/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
-index 9185d134cdc35b19517b5ad22a84bb1152550dc9..5ae9654b1e051d0e562c48d134ec810438ca18e4 100644
+index 16e3d81551f1d0c04bfa6032c110dc9c0bf056f7..0f20224133c0dd0d24d96c98a4d1a4e5ee55aafe 100644
--- a/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
+++ b/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
@@ -446,9 +446,11 @@
@@ -6936,18 +6968,6 @@ index a9221bc3fb2964776efd2861b906d681f3e90946..9ea9cbaf290b4e74b558959c3af82cff
dispatchDidReceiveResponse();
}
-diff --git a/Source/WebKit/PlatformWPE.cmake b/Source/WebKit/PlatformWPE.cmake
-index 581e3978a8a66c5b7fd28c877f4b311fbb8381a9..407888510c73788102c3c8e46ab64a9b87c68f88 100644
---- a/Source/WebKit/PlatformWPE.cmake
-+++ b/Source/WebKit/PlatformWPE.cmake
-@@ -227,6 +227,7 @@ set(WPE_API_HEADER_TEMPLATES
- ${WEBKIT_DIR}/UIProcess/API/glib/WebKitWebsitePolicies.h.in
- ${WEBKIT_DIR}/UIProcess/API/glib/WebKitXRPermissionRequest.h.in
- ${WEBKIT_DIR}/UIProcess/API/glib/webkit.h.in
-+ ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitPointerLockPermissionRequest.h.in
- )
-
- if (ENABLE_2022_GLIB_API)
diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmake
index 1003cc3cc60a91e27166ba0891fa63c2d0c27d4c..5d2e09bf814902341a72f4a1cad70a43d0a9b60a 100644
--- a/Source/WebKit/PlatformWin.cmake
@@ -6975,7 +6995,7 @@ index 1003cc3cc60a91e27166ba0891fa63c2d0c27d4c..5d2e09bf814902341a72f4a1cad70a43
WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
diff --git a/Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h b/Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h
-index 5c7a6999176357ad21ca673db75363f27cf33790..faa9a55d561a185a659519bcaa5a1026fa3b1921 100644
+index 0e5d61c47ecacf219296054edea76a254b8583d6..a728605603fd6f13af0166b6680c1b17817b8c30 100644
--- a/Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h
+++ b/Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h
@@ -45,6 +45,7 @@
@@ -6987,10 +7007,10 @@ index 5c7a6999176357ad21ca673db75363f27cf33790..faa9a55d561a185a659519bcaa5a1026
#import <WebKit/_WKContentWorldConfiguration.h>
#import <WebKit/_WKElementAction.h>
diff --git a/Source/WebKit/Shared/AuxiliaryProcess.h b/Source/WebKit/Shared/AuxiliaryProcess.h
-index 664988a9998acec84a7b2b767b0c6d66a638322c..fb97365201c36db3a1e0da58a93e4e3a64d4f7f9 100644
+index 637e3d973c5576b4f5df7f2b6b1b42e7a17b1870..b942a2f657c6571369ea05fa018589e096d8ebf6 100644
--- a/Source/WebKit/Shared/AuxiliaryProcess.h
+++ b/Source/WebKit/Shared/AuxiliaryProcess.h
-@@ -215,6 +215,11 @@ struct AuxiliaryProcessInitializationParameters {
+@@ -220,6 +220,11 @@ struct AuxiliaryProcessInitializationParameters {
IPC::Connection::Identifier connectionIdentifier;
HashMap<String, String> extraInitializationData;
WTF::AuxiliaryProcessType processType;
@@ -7089,10 +7109,10 @@ index b5361fedd7d921f512956d20819c49d425221080..3628908eeaba9dda7c19ded41b6da6e5
NSEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(GTK)
diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
-index 9322ebc1c7d35e2c17375ee674af6c9d421c5b03..17e37b130d0538461ce86f9e1ce20aa339560e55 100644
+index 82c7216af6265bcd1c0d2e833b90d0e53206249e..83b7ec9bed2b654c7122865981eaf1c0431d8111 100644
--- a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
-@@ -2743,6 +2743,9 @@ class WebCore::AuthenticationChallenge {
+@@ -1779,6 +1779,9 @@ class WebCore::AuthenticationChallenge {
class WebCore::DragData {
#if PLATFORM(COCOA)
String pasteboardName();
@@ -7102,7 +7122,11 @@ index 9322ebc1c7d35e2c17375ee674af6c9d421c5b03..17e37b130d0538461ce86f9e1ce20aa3
#endif
WebCore::IntPoint clientPosition();
WebCore::IntPoint globalPosition();
-@@ -3175,6 +3178,7 @@ enum class WebCore::WasPrivateRelayed : bool;
+diff --git a/Source/WebKit/Shared/WebCoreArgumentCodersNetwork.serialization.in b/Source/WebKit/Shared/WebCoreArgumentCodersNetwork.serialization.in
+index 219204814dae3776eaa86c1e91724afc8e57f886..e321bc79e283bb7429375e3e1a6d0e675a8a7fce 100644
+--- a/Source/WebKit/Shared/WebCoreArgumentCodersNetwork.serialization.in
++++ b/Source/WebKit/Shared/WebCoreArgumentCodersNetwork.serialization.in
+@@ -214,6 +214,7 @@ class WebCore::ResourceResponse : WebCore::ResourceResponseBase {
String httpStatusText;
String httpVersion;
WebCore::HTTPHeaderMap httpHeaderFields;
@@ -7224,10 +7248,10 @@ index 8915f44919a131e5e12344362907396b3821e13e..62846c5c837a584c4180d6c5d069fc39
#endif
diff --git a/Source/WebKit/Shared/WebMouseEvent.h b/Source/WebKit/Shared/WebMouseEvent.h
-index 3accf5c66062f746029665e4a9ef970418784df2..e16205860562432eedeb017d354cd0c948b0e036 100644
+index 10729b775bcafe757febb7bc6d9cbfb3ebebff0d..d2633c721c9bf25fd63ac003501b6b6927f585a5 100644
--- a/Source/WebKit/Shared/WebMouseEvent.h
+++ b/Source/WebKit/Shared/WebMouseEvent.h
-@@ -72,6 +72,7 @@ public:
+@@ -74,6 +74,7 @@ public:
WebMouseEventButton button() const { return m_button; }
unsigned short buttons() const { return m_buttons; }
@@ -7236,7 +7260,7 @@ index 3accf5c66062f746029665e4a9ef970418784df2..e16205860562432eedeb017d354cd0c9
void setPosition(const WebCore::DoublePoint& position) { m_position = position; }
const WebCore::DoublePoint& globalPosition() const LIFETIME_BOUND { return m_globalPosition; }
diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h
-index 523c1617004315196f6bad9135e0ce19870c4173..4c68eb42fd03a2f3f399818e3398cfb78a837698 100644
+index f912f9204579a2236579e5b18fab58d2cb99c050..4cdaf27988c3949b292e6a238f42cdb9f47aeaf1 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.h
+++ b/Source/WebKit/Shared/WebPageCreationParameters.h
@@ -319,6 +319,9 @@ struct WebPageCreationParameters {
@@ -7250,7 +7274,7 @@ index 523c1617004315196f6bad9135e0ce19870c4173..4c68eb42fd03a2f3f399818e3398cfb7
#if ENABLE(APP_HIGHLIGHTS)
WebCore::HighlightVisibility appHighlightsVisible { WebCore::HighlightVisibility::Hidden };
diff --git a/Source/WebKit/Shared/WebPageCreationParameters.serialization.in b/Source/WebKit/Shared/WebPageCreationParameters.serialization.in
-index 578b3ac57d759663efc094a30d29f57d7fd72507..84a3fd354acd057098dae4243835628b2cede1a7 100644
+index 8db5473446e6c9f107106b05e3dc21f1952e5655..0736e79e6a4157ba163eebbee7395839d441735b 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.serialization.in
+++ b/Source/WebKit/Shared/WebPageCreationParameters.serialization.in
@@ -234,6 +234,9 @@ enum class WebCore::UserInterfaceLayoutDirection : bool;
@@ -7594,10 +7618,10 @@ index b321d93d23d0d1862385b022569dc65323e8691c..ba3bcc9bc20b9512b9288cb2d7e5a3d8
JSC::Config::configureForTesting();
else if (!strcmp(argv[i], "-disable-jit"))
diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt
-index 1d107e47fea02bdf78144460df5a4e94d629f262..285027ccfba22952b023eb8a137e3ae87730feff 100644
+index 945dbf6d9acae38895d123da3f690f5c4bd8c8d5..ae7919a223276249fa4dd2499b4aa075e3b93c05 100644
--- a/Source/WebKit/Sources.txt
+++ b/Source/WebKit/Sources.txt
-@@ -403,6 +403,7 @@ UIProcess/AboutSchemeHandler.cpp
+@@ -402,6 +402,7 @@ UIProcess/AboutSchemeHandler.cpp
UIProcess/AuxiliaryProcessProxy.cpp @cost:4
UIProcess/BackgroundProcessResponsivenessTimer.cpp
UIProcess/BrowsingContextGroup.cpp
@@ -7605,7 +7629,7 @@ index 1d107e47fea02bdf78144460df5a4e94d629f262..285027ccfba22952b023eb8a137e3ae8
UIProcess/DeviceIdHashSaltStorage.cpp
UIProcess/DisplayLink.cpp
UIProcess/DisplayLinkProcessProxyClient.cpp
-@@ -414,17 +415,21 @@ UIProcess/FrameLoadState.cpp
+@@ -413,17 +414,21 @@ UIProcess/FrameLoadState.cpp
UIProcess/FrameProcess.cpp
UIProcess/GeolocationPermissionRequestManagerProxy.cpp @cost:3
UIProcess/GeolocationPermissionRequestProxy.cpp
@@ -7626,7 +7650,7 @@ index 1d107e47fea02bdf78144460df5a4e94d629f262..285027ccfba22952b023eb8a137e3ae8
+UIProcess/RemoteInspectorPipe.cpp
UIProcess/RemotePageDrawingAreaProxy.cpp
UIProcess/RemotePageFullscreenManagerProxy.cpp
- UIProcess/RemotePageMediaSessionManagerProxy.cpp
+ UIProcess/RemotePagePlaybackSessionManagerProxy.cpp
@@ -474,6 +479,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp
UIProcess/WebPageDiagnosticLoggingClient.cpp
UIProcess/WebPageGroup.cpp
@@ -7641,14 +7665,14 @@ index 1d107e47fea02bdf78144460df5a4e94d629f262..285027ccfba22952b023eb8a137e3ae8
UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp
+UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
+ UIProcess/Inspector/Agents/InspectorStorageAgent.cpp
UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp
UIProcess/Inspector/Agents/ProxyingPageAgent.cpp
-
diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt
-index 97950c298c16becd2958bdb966efe9748af3c5e4..9bd63968ceb756a9a1f89f4d6091eb10e1774ea2 100644
+index ebe43f94956aeebb732958d0bc5d15d8bbee0212..ab1028667711086223bd0d3fb76337724c589ca1 100644
--- a/Source/WebKit/SourcesCocoa.txt
+++ b/Source/WebKit/SourcesCocoa.txt
-@@ -287,6 +287,7 @@ UIProcess/API/Cocoa/_WKAttachment.mm @nonARC
+@@ -288,6 +288,7 @@ UIProcess/API/Cocoa/_WKAttachment.mm @nonARC
UIProcess/API/Cocoa/_WKAutomationSession.mm @nonARC
UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.mm @nonARC
UIProcess/API/Cocoa/_WKAutomationSessionTesting.mm @nonARC
@@ -7657,7 +7681,7 @@ index 97950c298c16becd2958bdb966efe9748af3c5e4..9bd63968ceb756a9a1f89f4d6091eb10
UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm @nonARC
UIProcess/API/Cocoa/_WKCustomHeaderFields.mm @nonARC @no-unify-when(bundle<=8)
diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt
-index f05f1323f3516a4a0e18759c5776cac4778575fb..304d7783165bc9e7f03344d5375c3e83301f3317 100644
+index 284881144aff05f7001566644e1d252fb2d49ab7..1e3ea6d6f7e6233d158362784f79f56742ff711c 100644
--- a/Source/WebKit/SourcesGTK.txt
+++ b/Source/WebKit/SourcesGTK.txt
@@ -134,6 +134,7 @@ UIProcess/API/glib/WebKitAutomationSession.cpp @no-unify
@@ -7706,7 +7730,7 @@ index f05f1323f3516a4a0e18759c5776cac4778575fb..304d7783165bc9e7f03344d5375c3e83
UIProcess/gtk/WebPasteboardProxyGtk.cpp
UIProcess/gtk/WebPopupMenuProxyGtk.cpp
diff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt
-index 2b1d3588fcbbbd9a8a72f259e58aadc282009749..b5a51b3c0339322d8827a9816460ac789635bb70 100644
+index cf0a97b4368aebdffe29726bdca39bf88cd68a6b..2a42f9fe8fe92916f818d5f370c1753f5eb1c8bc 100644
--- a/Source/WebKit/SourcesWPE.txt
+++ b/Source/WebKit/SourcesWPE.txt
@@ -138,6 +138,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify
@@ -7717,15 +7741,7 @@ index 2b1d3588fcbbbd9a8a72f259e58aadc282009749..b5a51b3c0339322d8827a9816460ac78
UIProcess/API/glib/WebKitContextMenuClient.cpp @no-unify
UIProcess/API/glib/WebKitCookieManager.cpp @no-unify
UIProcess/API/glib/WebKitCredential.cpp @no-unify
-@@ -174,6 +175,7 @@ UIProcess/API/glib/WebKitOptionMenu.cpp @no-unify
- UIProcess/API/glib/WebKitOptionMenuItem.cpp @no-unify
- UIProcess/API/glib/WebKitPermissionRequest.cpp @no-unify
- UIProcess/API/glib/WebKitPermissionStateQuery.cpp @no-unify
-+UIProcess/API/glib/WebKitPointerLockPermissionRequest.cpp @no-unify
- UIProcess/API/glib/WebKitPolicyDecision.cpp @no-unify
- UIProcess/API/glib/WebKitPrivate.cpp @no-unify
- UIProcess/API/glib/WebKitProtocolHandler.cpp @no-unify
-@@ -242,6 +244,7 @@ UIProcess/Gamepad/wpe/PlatformGamepadWPE.cpp
+@@ -243,6 +244,7 @@ UIProcess/Gamepad/wpe/PlatformGamepadWPE.cpp
UIProcess/geoclue/GeoclueGeolocationProvider.cpp
@@ -7733,7 +7749,7 @@ index 2b1d3588fcbbbd9a8a72f259e58aadc282009749..b5a51b3c0339322d8827a9816460ac78
UIProcess/glib/DRMMainDevice.cpp @no-unify
UIProcess/glib/DisplayLinkGLib.cpp
UIProcess/glib/DisplayVBlankMonitor.cpp
-@@ -249,6 +252,7 @@ UIProcess/glib/DisplayVBlankMonitorDRM.cpp
+@@ -250,6 +252,7 @@ UIProcess/glib/DisplayVBlankMonitorDRM.cpp
UIProcess/glib/DisplayVBlankMonitorThreaded.cpp
UIProcess/glib/DisplayVBlankMonitorTimer.cpp
UIProcess/glib/FenceMonitor.cpp
@@ -7741,7 +7757,7 @@ index 2b1d3588fcbbbd9a8a72f259e58aadc282009749..b5a51b3c0339322d8827a9816460ac78
UIProcess/glib/ScreenManager.cpp
UIProcess/glib/SystemSettingsManagerProxy.cpp
UIProcess/glib/TextCheckerGLib.cpp
-@@ -287,9 +291,15 @@ UIProcess/soup/WebProcessPoolSoup.cpp
+@@ -288,9 +291,15 @@ UIProcess/soup/WebProcessPoolSoup.cpp
UIProcess/wpe/AcceleratedBackingStore.cpp
UIProcess/wpe/DisplayVBlankMonitorWPE.cpp
@@ -7774,7 +7790,7 @@ index 6e54a7c1711b9b6d56be2ad286524273c9d7f3b4..23806cf7a4d1d084fb5f49e369e416fa
{
return m_data.pageToCloneSessionStorageFrom.get();
diff --git a/Source/WebKit/UIProcess/API/APIPageConfiguration.h b/Source/WebKit/UIProcess/API/APIPageConfiguration.h
-index 65ad1efa0c4ab2931879fe3109561a5d4a211821..f860fafcf233b8a80ac80379154c9d652d61f98d 100644
+index 42bec20a2accfd2ce75298ae13329a38c04a01aa..cb7b7d7e336cc3321d13f6a83df66ee9fe994d14 100644
--- a/Source/WebKit/UIProcess/API/APIPageConfiguration.h
+++ b/Source/WebKit/UIProcess/API/APIPageConfiguration.h
@@ -174,6 +174,10 @@ public:
@@ -7788,7 +7804,7 @@ index 65ad1efa0c4ab2931879fe3109561a5d4a211821..f860fafcf233b8a80ac80379154c9d65
WebKit::WebPageProxy* NODELETE pageToCloneSessionStorageFrom() const;
void NODELETE setPageToCloneSessionStorageFrom(WeakPtr<WebKit::WebPageProxy>&&);
-@@ -542,6 +546,7 @@ private:
+@@ -539,6 +543,7 @@ private:
#endif
RefPtr<WebKit::WebPageGroup> pageGroup;
WeakPtr<WebKit::WebPageProxy> relatedPage;
@@ -7914,10 +7930,10 @@ index 026121d114c5fcad84c1396be8d692625beaa3bd..edd6e5cae033124c589959a42522fde0
}
#endif
diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp
-index 2a30fd22991944ac82a1fa61886d1b0bd55a616c..1e0ab703701bd3550e3929bb8728f83f49671afb 100644
+index d379e8975e50445f6a000be63ffc270f2aa43968..7c9a65925f22f6eae2823d7eff7d0084a5d40191 100644
--- a/Source/WebKit/UIProcess/API/C/WKPage.cpp
+++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp
-@@ -1918,6 +1918,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
+@@ -1917,6 +1917,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
m_client.addMessageToConsole(toAPI(&page), toAPI(message.impl()), m_client.base.clientInfo);
}
@@ -7931,7 +7947,7 @@ index 2a30fd22991944ac82a1fa61886d1b0bd55a616c..1e0ab703701bd3550e3929bb8728f83f
void setStatusText(WebPageProxy* page, const String& text) final
{
if (!m_client.setStatusText)
-@@ -1955,6 +1962,8 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
+@@ -1954,6 +1961,8 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
{
if (!m_client.didNotHandleKeyEvent)
return;
@@ -7940,6 +7956,25 @@ index 2a30fd22991944ac82a1fa61886d1b0bd55a616c..1e0ab703701bd3550e3929bb8728f83f
m_client.didNotHandleKeyEvent(toAPI(page), event.nativeEvent(), m_client.base.clientInfo);
}
+diff --git a/Source/WebKit/UIProcess/API/C/WKPagePrivate.h b/Source/WebKit/UIProcess/API/C/WKPagePrivate.h
+index f1153a90658a2db4acad6d24e7ce5d7413d1095c..f425cbefbc21bbb37342d6072721dcef4a767360 100644
+--- a/Source/WebKit/UIProcess/API/C/WKPagePrivate.h
++++ b/Source/WebKit/UIProcess/API/C/WKPagePrivate.h
+@@ -247,13 +247,13 @@ WK_EXPORT void WKPageDoAfterProcessingAllPendingMouseEvents(WKPageRef page, void
+ #if !defined(__APPLE__)
+ typedef void (*WKPageDoAfterProcessingAllPendingKeyEventsFunction)(void* functionContext);
+ WK_EXPORT void WKPageDoAfterProcessingAllPendingKeyEvents(WKPageRef page, void* context, WKPageDoAfterProcessingAllPendingKeyEventsFunction function);
++#endif
+
+ typedef void (*WKPageDoAfterProcessingAllPendingWheelEventsFunction)(void* functionContext);
+ WK_EXPORT void WKPageDoAfterProcessingAllPendingWheelEvents(WKPageRef page, void* context, WKPageDoAfterProcessingAllPendingWheelEventsFunction function);
+
+ typedef void (*WKPageDoAfterProcessingAllPendingTouchEventsFunction)(void* functionContext);
+ WK_EXPORT void WKPageDoAfterProcessingAllPendingTouchEvents(WKPageRef page, void* context, WKPageDoAfterProcessingAllPendingTouchEventsFunction function);
+-#endif
+
+ typedef void (*WKPageCursorDidChangeCallbackForTesting)(WKStringRef cursorInfo, const void* clientInfo);
+ WK_EXPORT void WKPageSetCursorDidChangeCallbackForTesting(WKPageRef page, WKPageCursorDidChangeCallbackForTesting callback, const void* clientInfo);
diff --git a/Source/WebKit/UIProcess/API/C/WKPageUIClient.h b/Source/WebKit/UIProcess/API/C/WKPageUIClient.h
index aa395e66a7dee2a08085fcf0041748d062400181..bcfdd3e9a3f469d4c18186d9bcc711afe0d52838 100644
--- a/Source/WebKit/UIProcess/API/C/WKPageUIClient.h
@@ -8001,7 +8036,7 @@ index aa395e66a7dee2a08085fcf0041748d062400181..bcfdd3e9a3f469d4c18186d9bcc711af
// Version 15.
void* unused8; // Used to be decidePolicyForSpeechRecognitionPermissionRequest.
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h
-index acaeaef1be6d64f16d56d966db12cf9bb1f0507e..bb81783b20e33f69ceef2d00785a2e9c811dabe8 100644
+index 91f1dffd78e7db175fc4f28ac81df6db410bddd8..150b8cb323b60e7eaa16bdf9abfb32be87d7cc2a 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h
@@ -153,6 +153,12 @@ WK_SWIFT_UI_ACTOR
@@ -8031,7 +8066,7 @@ index dcab0400bfdd58f9d16726aba6ce66492f7be34b..a1337cc7ab9f04fea3f51a3003fdb946
NS_ASSUME_NONNULL_END
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
-index 74bb3649a58725889cdb8d61988b2e9159fdb7fb..512804cde9c46d4eb9193bc402166638e10fdf31 100644
+index 3e6d8606f048a82d9908340d5939c7fad69a7d33..f94bc4bbdb27bebb0b7b887d4a7a80f6e88decbb 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
@@ -57,6 +57,7 @@
@@ -8773,7 +8808,7 @@ index c1945fbe717a42afc1f51d64a80c7de3fa9009ba..ab63fe19b00ecbd64c9421e6eecad3e2
#endif
+int webkitWebContextExistingCount();
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
-index d4dadc3f50368a2768fbd2b453bf0b63d2b79e28..0abc5f9bcaee216e61307383afcaa0f5c9c88610 100644
+index e06955b344812da71dd5f2a23ef4a2bba34697c6..b72eeb03f69451ae32eee0abafd5c0e426a8967f 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
@@ -40,6 +40,7 @@
@@ -8784,7 +8819,7 @@ index d4dadc3f50368a2768fbd2b453bf0b63d2b79e28..0abc5f9bcaee216e61307383afcaa0f5
#include "WebKitAuthenticationRequestPrivate.h"
#include "WebKitBackForwardListPrivate.h"
#include "WebKitContextMenuClient.h"
-@@ -160,6 +161,7 @@ enum {
+@@ -165,6 +166,7 @@ enum {
CLOSE,
SCRIPT_DIALOG,
@@ -8792,7 +8827,7 @@ index d4dadc3f50368a2768fbd2b453bf0b63d2b79e28..0abc5f9bcaee216e61307383afcaa0f5
DECIDE_POLICY,
PERMISSION_REQUEST,
-@@ -546,6 +548,13 @@ GRefPtr<WebKitOptionMenu> WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& p
+@@ -551,6 +553,13 @@ GRefPtr<WebKitOptionMenu> WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& p
void WebKitWebViewClient::frameDisplayed(WKWPE::View&)
{
@@ -8806,7 +8841,7 @@ index d4dadc3f50368a2768fbd2b453bf0b63d2b79e28..0abc5f9bcaee216e61307383afcaa0f5
{
SetForScope inFrameDisplayedGuard(m_webView->priv->inFrameDisplayed, true);
for (const auto& callback : m_webView->priv->frameDisplayedCallbacks) {
-@@ -653,7 +662,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*
+@@ -658,7 +667,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*
static gboolean webkitWebViewPermissionRequest(WebKitWebView*, WebKitPermissionRequest* request)
{
@@ -8815,7 +8850,7 @@ index d4dadc3f50368a2768fbd2b453bf0b63d2b79e28..0abc5f9bcaee216e61307383afcaa0f5
if (WEBKIT_IS_POINTER_LOCK_PERMISSION_REQUEST(request)) {
webkit_permission_request_allow(request);
return TRUE;
-@@ -1001,6 +1010,10 @@ static void webkitWebViewConstructed(GObject* object)
+@@ -1006,6 +1015,10 @@ static void webkitWebViewConstructed(GObject* object)
priv->websitePolicies = adoptGRef(webkit_website_policies_new());
Ref configuration = priv->relatedView && priv->relatedView->priv->configurationForNextRelatedView ? priv->relatedView->priv->configurationForNextRelatedView.releaseNonNull() : webkitWebViewCreatePageConfiguration(webView);
@@ -8826,7 +8861,7 @@ index d4dadc3f50368a2768fbd2b453bf0b63d2b79e28..0abc5f9bcaee216e61307383afcaa0f5
webkitWebViewCreatePage(webView, WTF::move(configuration));
webkitWebContextWebViewCreated(priv->context.get(), webView);
-@@ -2114,6 +2127,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
+@@ -2119,6 +2132,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_TYPE_BOOLEAN, 1,
WEBKIT_TYPE_SCRIPT_DIALOG);
@@ -8842,7 +8877,7 @@ index d4dadc3f50368a2768fbd2b453bf0b63d2b79e28..0abc5f9bcaee216e61307383afcaa0f5
/**
* WebKitWebView::decide-policy:
* @web_view: the #WebKitWebView on which the signal is emitted
-@@ -2948,6 +2970,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const
+@@ -2953,6 +2975,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const
webkit_script_dialog_unref(webView->priv->currentScriptDialog);
}
@@ -8879,7 +8914,7 @@ index 8bff6235bb227ed9e53017f45ce6469dede379fb..34a4c07514c1661ea7e333de5ea67412
bool webkitWebViewIsScriptDialogRunning(WebKitWebView*, WebKitScriptDialog*);
String webkitWebViewGetCurrentScriptDialogMessage(WebKitWebView*);
diff --git a/Source/WebKit/UIProcess/API/glib/webkit.h.in b/Source/WebKit/UIProcess/API/glib/webkit.h.in
-index d48845217e514f1fb9dc84917cd8ba7b26046dee..0402761230371a6f9e9e78caaaf2f207fa3c760c 100644
+index 18ced4d6462b2e63ec32556eee8d8a88a205cb8f..b19d962dbf55603bd0a6ad658200b1b6dc95e234 100644
--- a/Source/WebKit/UIProcess/API/glib/webkit.h.in
+++ b/Source/WebKit/UIProcess/API/glib/webkit.h.in
@@ -45,6 +45,7 @@
@@ -8891,7 +8926,7 @@ index d48845217e514f1fb9dc84917cd8ba7b26046dee..0402761230371a6f9e9e78caaaf2f207
#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 a33310d9ef8795338756c5d38da9fdc18fd65d6d..363988712345502a202f9feea21f2ca365ed41c0 100644
+index 9d7dabca16d734fa1223f9deacc6bbb6894f00c4..fa72a696be81e2f23e4ca5dac4221c0bf5eb67a9 100644
--- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
@@ -246,7 +246,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I
@@ -8925,7 +8960,7 @@ index a33310d9ef8795338756c5d38da9fdc18fd65d6d..363988712345502a202f9feea21f2ca3
void PageClientImpl::didChangeContentSize(const IntSize& size)
diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
-index 0dae577227eaac423bdc97d9c859fe5afc2d06c1..8edbe1cb3e7d0f818290122861635c063595c632 100644
+index c3cc3b4489067a03653036a4f9b436667727f2dc..d3c029ff566473be8b47d5c10ce9dc5455f25d69 100644
--- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
+++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
@@ -104,7 +104,7 @@ private:
@@ -9029,19 +9064,6 @@ index 0000000000000000000000000000000000000000..1d6c987019e69d2e1ab97266d0118054
+G_END_DECLS
+
+#endif
-diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitPointerLockPermissionRequest.h.in b/Source/WebKit/UIProcess/API/gtk/WebKitPointerLockPermissionRequest.h.in
-index 496079da90993ac37689b060b69ecd4a67c2b6a8..af30181ca922f16c0f6e245c70e5ce7d8999341f 100644
---- a/Source/WebKit/UIProcess/API/gtk/WebKitPointerLockPermissionRequest.h.in
-+++ b/Source/WebKit/UIProcess/API/gtk/WebKitPointerLockPermissionRequest.h.in
-@@ -23,7 +23,7 @@
- #define WebKitPointerLockPermissionRequest_h
-
- #include <glib-object.h>
--#include <webkit/WebKitDefines.h>
-+#include <@API_INCLUDE_PREFIX@/WebKitDefines.h>
-
- G_BEGIN_DECLS
-
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
index 12d114c4823bd64b2b836fa76157c44fe8291a07..521db62435bc244e28bd861ce560ff1416d99279 100644
--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
@@ -9127,7 +9149,7 @@ index 9091ae5198e765c2cfe0584d121afe4f88df3c0e..b0efedec419673ef2bfd0fd79406774e
virtual void didChangePageID(WKWPE::View&) { }
virtual void didReceiveUserMessage(WKWPE::View&, WebKit::UserMessage&&, CompletionHandler<void(WebKit::UserMessage&&)>&& completionHandler) { completionHandler(WebKit::UserMessage()); }
diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
-index 44bec4dfe534281e791339bc6eebc3795d65b2c9..4d7cd002b8420382e3628886a7fc4c6229db2702 100644
+index 0f14ad703cc8fe790cd3a13f25caf25aaf10db82..a191cd0c5dd1b05b9bc6bda9c0ca971e0cacb278 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
@@ -36,9 +36,12 @@
@@ -9156,7 +9178,7 @@ index 44bec4dfe534281e791339bc6eebc3795d65b2c9..4d7cd002b8420382e3628886a7fc4c62
namespace WebKit {
WTF_MAKE_TZONE_ALLOCATED_IMPL(PageClientImpl);
-@@ -230,7 +239,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I
+@@ -237,7 +246,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I
WebCore::IntRect PageClientImpl::rootViewToAccessibilityScreen(const WebCore::IntRect& rect)
{
@@ -9165,7 +9187,7 @@ index 44bec4dfe534281e791339bc6eebc3795d65b2c9..4d7cd002b8420382e3628886a7fc4c62
}
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&, bool)
-@@ -318,14 +327,14 @@ Ref<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy& pa
+@@ -325,14 +334,14 @@ Ref<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy& pa
}
#endif
@@ -9184,7 +9206,7 @@ index 44bec4dfe534281e791339bc6eebc3795d65b2c9..4d7cd002b8420382e3628886a7fc4c62
}
RefPtr<WebDateTimePicker> PageClientImpl::createDateTimePicker(WebPageProxy& page)
-@@ -585,11 +594,11 @@ void PageClientImpl::callAfterNextPresentationUpdate(CompletionHandler<void()>&&
+@@ -592,11 +601,11 @@ void PageClientImpl::callAfterNextPresentationUpdate(CompletionHandler<void()>&&
m_view.callAfterNextPresentationUpdate(WTF::move(callback));
}
@@ -9198,7 +9220,7 @@ index 44bec4dfe534281e791339bc6eebc3795d65b2c9..4d7cd002b8420382e3628886a7fc4c62
// FIXME Forward the Expected in https://webkit.org/b/300271
if (snapshot)
return WTF::move(snapshot.value());
-@@ -600,4 +609,11 @@ RefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(std::optional<WebCore::Int
+@@ -607,4 +616,11 @@ RefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(std::optional<WebCore::Int
return nullptr;
}
@@ -9211,10 +9233,10 @@ index 44bec4dfe534281e791339bc6eebc3795d65b2c9..4d7cd002b8420382e3628886a7fc4c62
+
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
-index a1f18769eb2398cb467067f7f2d6ad864d1ed0ee..842bc438edd93ad09ddc1012898856e4ac686f00 100644
+index 8a02b69c2a1f49bcf12bc7e1684e5b643c6a6417..84780a2f44362a204af8289644d0c287006c82bb 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
-@@ -193,7 +193,11 @@ private:
+@@ -196,7 +196,11 @@ private:
WebKitWebResourceLoadManager* webResourceLoadManager() override;
@@ -9228,10 +9250,10 @@ index a1f18769eb2398cb467067f7f2d6ad864d1ed0ee..842bc438edd93ad09ddc1012898856e4
WKWPE::View& m_view;
DefaultUndoController m_undoController;
diff --git a/Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp b/Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp
-index 32b91bcbf205dfbd36c9275a6167877cf561a172..ce45bcc6e7fdd92efa31d974a8230253fbf3294e 100644
+index b6a956287581840046b69366178254976f41d175..1bc1efbffe212f7f2ab7fcf71c9b164d6a787198 100644
--- a/Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp
+++ b/Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp
-@@ -645,9 +645,9 @@ void ViewPlatform::callAfterNextPresentationUpdate(CompletionHandler<void()>&& c
+@@ -651,9 +651,9 @@ void ViewPlatform::callAfterNextPresentationUpdate(CompletionHandler<void()>&& c
}
}
@@ -9441,10 +9463,10 @@ index b7596a4c384d5cc0c21cc1bef1bc695c2c5275af..4fdb0cdb0c761aa48373e1eae0d132c0
// Save base64-encoded file contents to a local file path and return the path.
// This reuses the basename of the remote file path so that the filename exposed to DOM API remains the same.
diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
-index 696ac95f824b3aaf97394dae5969d901c3e75797..02fc887d85625ec56fc7b4c82c9b878958265e82 100644
+index 4128fa8680361ffa99db7984cfa306f9fb8ffdd3..48a0f29f82a76a3785e7b6a8889ae461ff925187 100644
--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
-@@ -177,7 +177,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau
+@@ -200,7 +200,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau
launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix);
#endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE))
@@ -9457,10 +9479,10 @@ index 696ac95f824b3aaf97394dae5969d901c3e75797..02fc887d85625ec56fc7b4c82c9b8789
platformGetLaunchOptions(launchOptions);
}
diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
-index 290a382e8c22691772d36041c116d048229898be..1173ad74843de165ba46812a39e1cc515519a72a 100644
+index e09764985ea23e5e1f26a3cf1718fb39353b08ce..faacac0f785bb4adf9b1ced275489c63bef0633b 100644
--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
-@@ -304,13 +304,16 @@ protected:
+@@ -305,13 +305,16 @@ protected:
InitializationActivityAndGrant initializationActivityAndGrant();
@@ -9479,7 +9501,7 @@ index 290a382e8c22691772d36041c116d048229898be..1173ad74843de165ba46812a39e1cc51
// Connection::Client
diff --git a/Source/WebKit/UIProcess/BackingStore.h b/Source/WebKit/UIProcess/BackingStore.h
-index 15f1d5ff3973e173c1a3ee3eeb3bdf5e1ec4cd87..6516a47bc4aa788b1b1c09d21254ea9482190f6c 100644
+index d873d36fdefab6f2c8ce0639d0ff8911037dbdda..6de04d19e75642d64456eeafe804bd23140bfe0b 100644
--- a/Source/WebKit/UIProcess/BackingStore.h
+++ b/Source/WebKit/UIProcess/BackingStore.h
@@ -67,6 +67,11 @@ public:
@@ -9650,7 +9672,7 @@ index 1c037ebba6c9cf3713e0936d4f2327d0d46a626e..e0f463694dea3aae9d8d01376ac62e75
bool webViewRequestStorageAccessPanelForDomainUnderCurrentDomainForQuirkDomainsCompletionHandler : 1;
bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
-index c660d8204b89997bb25637ed24198acf5028e280..6d7c9102b1bc57fd179ba742cf703b1bf3eaf5af 100644
+index 4bbca9a3e6b05ea9282808bd0da0d31a9b1356a3..208535f6e28966176d393f502e5a918ca16062ac 100644
--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
@@ -136,6 +136,7 @@ void UIDelegate::setDelegate(id<WKUIDelegate> delegate)
@@ -9678,7 +9700,7 @@ index c660d8204b89997bb25637ed24198acf5028e280..6d7c9102b1bc57fd179ba742cf703b1b
{
RefPtr uiDelegate = m_uiDelegate.get();
diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
-index 2c860d013e41a4233c45ffa1e3c941c4e03c30af..c871f13b90c0389c0af55497eb900942c333806a 100644
+index 95cc92bda5a98c782b0f2fd237ad04fc24a6eb2a..ba72ab1745bf641d9f50e38692e1ff1fb2424aff 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
@@ -45,7 +45,9 @@
@@ -9691,7 +9713,7 @@ index 2c860d013e41a4233c45ffa1e3c941c4e03c30af..c871f13b90c0389c0af55497eb900942
#import "PlatformXRSystem.h"
#import "PlaybackSessionManagerProxy.h"
#import "RemoteLayerTreeCommitBundle.h"
-@@ -493,11 +495,85 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
+@@ -498,11 +500,85 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
void WebPageProxy::startDrag(const DragItem& dragItem, ShareableBitmap::Handle&& dragImageHandle, const std::optional<NodeIdentifier>& nodeID, const std::optional<FrameIdentifier>& frameID)
{
@@ -9779,7 +9801,7 @@ index 2c860d013e41a4233c45ffa1e3c941c4e03c30af..c871f13b90c0389c0af55497eb900942
#if ENABLE(ATTACHMENT_ELEMENT)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-index 6a07ad8cf130407f7a59f28a58e4478452de6f40..dd11957f65b3cdbc655a3d124b8e18cf8edb962b 100644
+index c76b60616bf92b9bf89522d29addd9b4c32d733f..7df4cb16b6b7a4449d1a8f1b6aef26c971c0575d 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
@@ -461,7 +461,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
@@ -9791,7 +9813,7 @@ index 6a07ad8cf130407f7a59f28a58e4478452de6f40..dd11957f65b3cdbc655a3d124b8e18cf
#endif
#if PLATFORM(VISION)
-@@ -880,8 +880,8 @@ void WebProcessPool::registerNotificationObservers()
+@@ -879,8 +879,8 @@ void WebProcessPool::registerNotificationObservers()
}];
m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
@@ -10448,10 +10470,10 @@ index 0000000000000000000000000000000000000000..afadd2371dffab9d4b92e4245f562282
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp
-index 7d547b7eee13523e7b8f311a49e9670664c4959e..61e7716b45dc1d7ac28e4cb5f1490d123895ca6a 100644
+index 10e9e5e244c8c215efcc378aea79efc31a75337e..8b1e9b6a0907e7c41d518cd389edb4ee4ea09e77 100644
--- a/Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp
-@@ -399,6 +399,12 @@ CommandResult<void> ProxyingNetworkAgent::interceptRequestWithError(const Protoc
+@@ -441,6 +441,12 @@ CommandResult<void> ProxyingNetworkAgent::interceptRequestWithError(const Protoc
return { };
}
@@ -10463,12 +10485,12 @@ index 7d547b7eee13523e7b8f311a49e9670664c4959e..61e7716b45dc1d7ac28e4cb5f1490d12
+
#if ENABLE(INSPECTOR_NETWORK_THROTTLING)
- CommandResult<void> ProxyingNetworkAgent::setEmulatedConditions(std::optional<int>&&)
+ CommandResult<void> ProxyingNetworkAgent::setEmulatedConditions(std::optional<int>&& bytesPerSecondLimit)
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.h b/Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.h
-index 408a8108556cdd384564091457a28e49976a9402..90de5101b8e2049038ca991754827243c8beb6b8 100644
+index bbc609f7bc0b137174094728a1118b2ecec7c9e7..176e24ce76cbe0ebaa0532bf1bee0a1951ab8ee5 100644
--- a/Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.h
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.h
-@@ -92,6 +92,7 @@ public:
+@@ -93,6 +93,7 @@ public:
CommandResult<void> interceptWithResponse(const Protocol::Network::RequestId&, const String& content, bool base64Encoded, const String& mimeType, std::optional<int>&& status, const String& statusText, RefPtr<JSON::Object>&& headers) final;
CommandResult<void> interceptRequestWithResponse(const Protocol::Network::RequestId&, const String& content, bool base64Encoded, const String& mimeType, int status, const String& statusText, Ref<JSON::Object>&& headers) final;
CommandResult<void> interceptRequestWithError(const Protocol::Network::RequestId&, Protocol::Network::ResourceErrorType) final;
@@ -10477,10 +10499,10 @@ index 408a8108556cdd384564091457a28e49976a9402..90de5101b8e2049038ca991754827243
CommandResult<void> setEmulatedConditions(std::optional<int>&& bytesPerSecondLimit) final;
#endif
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ProxyingPageAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ProxyingPageAgent.cpp
-index 0cef1a19215fba7f477b8ae1f7f16e9091ebd4ee..8306beaa340e2d038dfb76a63ec79237788bf131 100644
+index 6273e8d7ad6e5e1c0f9add34821f3c3d36449982..98da2baf085451cff18a9871258c2cff559b7084 100644
--- a/Source/WebKit/UIProcess/Inspector/Agents/ProxyingPageAgent.cpp
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ProxyingPageAgent.cpp
-@@ -98,12 +98,14 @@ void ProxyingPageAgent::frameNavigated(FrameIdentifier frameID, const URL& url,
+@@ -128,12 +128,14 @@ void ProxyingPageAgent::frameNavigated(FrameIdentifier frameID, const URL& url,
void ProxyingPageAgent::domContentEventFired(double timestamp)
{
@@ -10496,8 +10518,8 @@ index 0cef1a19215fba7f477b8ae1f7f16e9091ebd4ee..8306beaa340e2d038dfb76a63ec79237
+ m_frontendDispatcher->loadEventFired(timestamp, { });
}
- void ProxyingPageAgent::frameDetached(FrameIdentifier frameID)
-@@ -346,17 +348,82 @@ CommandResult<void> ProxyingPageAgent::setShowPaintRects(bool)
+ void ProxyingPageAgent::frameDetached(FrameIdentifier)
+@@ -634,17 +636,82 @@ CommandResult<void> ProxyingPageAgent::setShowPaintRects(bool)
return { };
}
@@ -10581,7 +10603,7 @@ index 0cef1a19215fba7f477b8ae1f7f16e9091ebd4ee..8306beaa340e2d038dfb76a63ec79237
{
return makeUnexpected("Not yet implemented under Site Isolation"_s);
}
-@@ -368,11 +435,9 @@ CommandResult<String> ProxyingPageAgent::archive()
+@@ -656,11 +723,9 @@ CommandResult<String> ProxyingPageAgent::archive()
}
#endif
@@ -10594,10 +10616,10 @@ index 0cef1a19215fba7f477b8ae1f7f16e9091ebd4ee..8306beaa340e2d038dfb76a63ec79237
} // namespace Inspector
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ProxyingPageAgent.h b/Source/WebKit/UIProcess/Inspector/Agents/ProxyingPageAgent.h
-index 5391fbc1d384bd9be7c5f497567caef046fd2a9e..b23b30e28270eb2d615c01659299fe6ca5e6aeec 100644
+index 38e4309adedda3ff6533d36a1ea56aa8f597d802..ebbbacb068f9e936d61f494fd736f384c3093d85 100644
--- a/Source/WebKit/UIProcess/Inspector/Agents/ProxyingPageAgent.h
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ProxyingPageAgent.h
-@@ -86,15 +86,26 @@ public:
+@@ -93,15 +93,26 @@ public:
CommandResult<void> setShowRulers(bool) final;
#endif
CommandResult<void> setShowPaintRects(bool) final;
@@ -10628,7 +10650,7 @@ index 5391fbc1d384bd9be7c5f497567caef046fd2a9e..b23b30e28270eb2d615c01659299fe6c
private:
// IPC::MessageReceiver
diff --git a/Source/WebKit/UIProcess/Inspector/PageInspectorTargetProxy.cpp b/Source/WebKit/UIProcess/Inspector/PageInspectorTargetProxy.cpp
-index 66e1ddd0ad468d7e9d262442ad0efdbcf7989ea1..28c0a0f7b7edaaf7f30c677594365a436344512d 100644
+index 66e1ddd0ad468d7e9d262442ad0efdbcf7989ea1..a60a6f4e795cda240f20d211fd8ddc8986e3ef08 100644
--- a/Source/WebKit/UIProcess/Inspector/PageInspectorTargetProxy.cpp
+++ b/Source/WebKit/UIProcess/Inspector/PageInspectorTargetProxy.cpp
@@ -59,6 +59,11 @@ std::unique_ptr<PageInspectorTargetProxy> PageInspectorTargetProxy::create(Provi
@@ -10643,7 +10665,7 @@ index 66e1ddd0ad468d7e9d262442ad0efdbcf7989ea1..28c0a0f7b7edaaf7f30c677594365a43
PageInspectorTargetProxy::PageInspectorTargetProxy(WebPageProxy& page, const String& targetId, Inspector::InspectorTargetType type)
: InspectorTargetProxy(targetId, type)
, m_page(page)
-@@ -109,6 +114,31 @@ void PageInspectorTargetProxy::didCommitProvisionalTarget()
+@@ -109,6 +114,20 @@ void PageInspectorTargetProxy::didCommitProvisionalTarget()
m_provisionalPage = nullptr;
}
@@ -10660,23 +10682,12 @@ index 66e1ddd0ad468d7e9d262442ad0efdbcf7989ea1..28c0a0f7b7edaaf7f30c677594365a43
+
+ platformActivate(error);
+}
-+
-+void PageInspectorTargetProxy::close(String& error, bool runBeforeUnload)
-+{
-+ if (type() != Inspector::InspectorTargetType::Page)
-+ return InspectorTarget::close(error, runBeforeUnload);
-+
-+ if (runBeforeUnload)
-+ m_page->tryClose();
-+ else
-+ m_page->closePage();
-+}
+
bool PageInspectorTargetProxy::isProvisional() const
{
return !!m_provisionalPage;
diff --git a/Source/WebKit/UIProcess/Inspector/PageInspectorTargetProxy.h b/Source/WebKit/UIProcess/Inspector/PageInspectorTargetProxy.h
-index 88fe6b2104c5e26cee4a975a552e8a2c78f44129..96631d61f1a043d09769098849c4d91ad2cf6b21 100644
+index 88fe6b2104c5e26cee4a975a552e8a2c78f44129..6e185a255c83f8e311911bee4a673f3338f5b647 100644
--- a/Source/WebKit/UIProcess/Inspector/PageInspectorTargetProxy.h
+++ b/Source/WebKit/UIProcess/Inspector/PageInspectorTargetProxy.h
@@ -44,6 +44,7 @@ class PageInspectorTargetProxy final : public InspectorTargetProxy {
@@ -10687,12 +10698,11 @@ index 88fe6b2104c5e26cee4a975a552e8a2c78f44129..96631d61f1a043d09769098849c4d91a
PageInspectorTargetProxy(WebPageProxy&, const String& targetId, Inspector::InspectorTargetType);
void didCommitProvisionalTarget() override;
-@@ -52,8 +53,13 @@ public:
+@@ -52,8 +53,12 @@ public:
void connect(Inspector::FrontendChannel::ConnectionType) override;
void disconnect() override;
void sendMessageToTargetBackend(const String&) override;
+ void activate(String& error) override;
-+ void close(String& error, bool runBeforeUnload) override;
private:
+ void willResume() override;
@@ -10701,20 +10711,8 @@ index 88fe6b2104c5e26cee4a975a552e8a2c78f44129..96631d61f1a043d09769098849c4d91a
WeakRef<WebPageProxy> m_page;
WeakPtr<ProvisionalPageProxy> m_provisionalPage;
};
-diff --git a/Source/WebKit/UIProcess/Inspector/WasmDebuggerDebuggable.cpp b/Source/WebKit/UIProcess/Inspector/WasmDebuggerDebuggable.cpp
-index 232b5dc1c574e4d4231307fee144aff59b519758..651fc7fe63d80cf093192e4eec1576c7621201e1 100644
---- a/Source/WebKit/UIProcess/Inspector/WasmDebuggerDebuggable.cpp
-+++ b/Source/WebKit/UIProcess/Inspector/WasmDebuggerDebuggable.cpp
-@@ -28,6 +28,7 @@
-
- #if ENABLE(WEBASSEMBLY_DEBUGGER) && ENABLE(REMOTE_INSPECTOR)
-
-+#include "WebPageProxy.h"
- #include "WebProcessProxy.h"
- #include "WebProcessProxyMessages.h"
- #include <JavaScriptCore/InspectorFrontendChannel.h>
diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
-index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2ac4a621d9 100644
+index d7279a951aba2b48fcc37be72952eddc7124747f..01cecbce3e15e325450abb0ff15c9e9fd00b6654 100644
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
@@ -26,10 +26,14 @@
@@ -10729,10 +10727,10 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
#include "InspectorBrowserAgent.h"
+#include "InspectorDialogAgent.h"
+#include "InspectorScreencastAgent.h"
+ #include "InspectorStorageAgent.h"
#include "PageInspectorTarget.h"
#include "PageInspectorTargetProxy.h"
- #include "ProvisionalFrameProxy.h"
-@@ -38,9 +42,13 @@
+@@ -39,9 +43,13 @@
#include "ProxyingPageAgent.h"
#include "WebFrameProxy.h"
#include "WebPageInspectorAgentBase.h"
@@ -10746,7 +10744,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
#include <JavaScriptCore/InspectorAgentBase.h>
#include <JavaScriptCore/InspectorBackendDispatcher.h>
#include <JavaScriptCore/InspectorBackendDispatchers.h>
-@@ -77,6 +85,17 @@ static String getTargetID(const ProvisionalFrameProxy& provisionalFrame)
+@@ -78,6 +86,17 @@ static String getTargetID(const ProvisionalFrameProxy& provisionalFrame)
WTF_MAKE_TZONE_ALLOCATED_IMPL(WebPageInspectorController);
@@ -10764,7 +10762,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
WebPageInspectorController::WebPageInspectorController(WebPageProxy& inspectedPage)
: m_frontendRouter(FrontendRouter::create())
, m_backendDispatcher(BackendDispatcher::create(m_frontendRouter.copyRef()))
-@@ -90,16 +109,92 @@ WebPageInspectorController::WebPageInspectorController(WebPageProxy& inspectedPa
+@@ -91,16 +110,92 @@ WebPageInspectorController::WebPageInspectorController(WebPageProxy& inspectedPa
WebPageInspectorController::~WebPageInspectorController() = default;
void WebPageInspectorController::init()
@@ -10857,7 +10855,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
}
bool WebPageInspectorController::hasLocalFrontend() const
-@@ -113,6 +208,14 @@ void WebPageInspectorController::connectFrontend(Inspector::FrontendChannel& fro
+@@ -114,6 +209,14 @@ void WebPageInspectorController::connectFrontend(Inspector::FrontendChannel& fro
bool connectingFirstFrontend = !m_frontendRouter->hasFrontends();
@@ -10872,7 +10870,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
m_frontendRouter->connectFrontend(frontendChannel);
if (connectingFirstFrontend) {
-@@ -143,6 +246,7 @@ void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendCha
+@@ -144,6 +247,7 @@ void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendCha
networkAgent->willDestroyFrontendAndBackend(DisconnectReason::InspectorDestroyed);
if (RefPtr pageAgent = m_pageAgent)
pageAgent->willDestroyFrontendAndBackend(DisconnectReason::InspectorDestroyed);
@@ -10880,7 +10878,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
}
Ref inspectedPage = m_inspectedPage.get();
-@@ -171,6 +275,8 @@ void WebPageInspectorController::disconnectAllFrontends()
+@@ -172,6 +276,8 @@ void WebPageInspectorController::disconnectAllFrontends()
// Disconnect any remaining remote frontends.
m_frontendRouter->disconnectAllFrontends();
@@ -10889,7 +10887,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
Ref inspectedPage = m_inspectedPage.get();
inspectedPage->didChangeInspectorFrontendCount(m_frontendRouter->frontendCount());
-@@ -199,6 +305,66 @@ void WebPageInspectorController::setIndicating(bool indicating)
+@@ -200,6 +306,66 @@ void WebPageInspectorController::setIndicating(bool indicating)
}
#endif
@@ -10956,7 +10954,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
void WebPageInspectorController::sendMessageToInspectorFrontend(const String& targetId, const String& message)
{
if (!m_targets.contains(targetId)) {
-@@ -213,6 +379,52 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta
+@@ -214,6 +380,52 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta
protect(m_targetAgent)->sendMessageFromTargetToFrontend(targetId, message);
}
@@ -11009,7 +11007,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
bool WebPageInspectorController::shouldPauseLoadingForPage(const ProvisionalPageProxy& provisionalPage) const
{
if (!m_frontendRouter->hasFrontends())
-@@ -267,7 +479,7 @@ void WebPageInspectorController::setContinueLoadingCallbackForFrame(const Provis
+@@ -268,7 +480,7 @@ void WebPageInspectorController::setContinueLoadingCallbackForFrame(const Provis
void WebPageInspectorController::didCreateProvisionalPage(ProvisionalPageProxy& provisionalPage, WebCore::FrameIdentifier mainFrameID, WebProcessProxy& mainFrameProcess)
{
@@ -11019,7 +11017,7 @@ index 05d99a1b1c4348dc30f72f0c107b61aec9894678..f51d1ad17b748377a8232a3ef3346f2a
if (shouldManageFrameTargets()) {
constexpr bool isProvisional = true;
diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
-index d335f13ded0edda8144f158f0944b8bae3b009a7..18c710fe57a85ffe738f0e1fd425f090d91a29e9 100644
+index 00580efa59c6c92b4a2afb2bab93f8df6364e494..e2bf34f44dc82f64cb9b4370ff61c53c004c27dd 100644
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
@@ -28,9 +28,11 @@
@@ -11137,7 +11135,7 @@ index d335f13ded0edda8144f158f0944b8bae3b009a7..18c710fe57a85ffe738f0e1fd425f090
bool shouldPauseLoadingForPage(const ProvisionalPageProxy&) const;
void setContinueLoadingCallbackForPage(const ProvisionalPageProxy&, WTF::Function<void()>&&);
bool shouldPauseLoadingForFrame(const ProvisionalFrameProxy&) const;
-@@ -117,11 +183,18 @@ private:
+@@ -118,11 +184,18 @@ private:
CheckedPtr<Inspector::InspectorTargetAgent> m_targetAgent;
HashMap<String, std::unique_ptr<InspectorTargetProxy>> m_targets;
@@ -11330,10 +11328,10 @@ index 0000000000000000000000000000000000000000..26775d9cfe30d220b14c1b2355a9baf9
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02c4b3ab46
+index 0000000000000000000000000000000000000000..959714af03c68d499811078794d7ed315eef1fa9
--- /dev/null
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
-@@ -0,0 +1,1033 @@
+@@ -0,0 +1,1061 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -11567,7 +11565,7 @@ index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02
+
+Ref<Inspector::Protocol::Playwright::Cookie> buildObjectForCookie(const WebCore::Cookie& cookie)
+{
-+ return Inspector::Protocol::Playwright::Cookie::create()
++ auto result = Inspector::Protocol::Playwright::Cookie::create()
+ .setName(cookie.name)
+ .setValue(cookie.value)
+ .setDomain(cookie.domain)
@@ -11578,6 +11576,9 @@ index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02
+ .setSession(cookie.session)
+ .setSameSite(cookieSameSitePolicy(cookie.sameSite))
+ .release();
++ if (!cookie.partitionKey.isEmpty())
++ result->setPartitionKey(cookie.partitionKey);
++ return result;
+}
+
+void adjustInspectedPagePreferences(WebPreferences& preferences, std::optional<bool> enableStoragePartitioning)
@@ -11601,6 +11602,11 @@ index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02
+ preferences.setPeerConnectionEnabled(true);
+ }
+
++ // Enable mock capture devices so that getUserMedia() works headlessly with
++ // deterministic fake camera/microphone streams. Capture is still gated on the
++ // camera/microphone permissions granted through Emulation.grantPermissions.
++ preferences.setMockCaptureDevicesEnabled(true);
++
+ if (!enableStoragePartitioning || !*enableStoragePartitioning) {
+ // Disable local storage partitioning. See https://github.com/microsoft/playwright/issues/32230
+ preferences.setStorageBlockingPolicy(static_cast<uint32_t>(WebCore::StorageBlockingPolicy::AllowAll));
@@ -12056,7 +12062,6 @@ index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02
+
+Inspector::Protocol::ErrorStringOr<void> InspectorPlaywrightAgent::grantFileReadAccess(const String& pageProxyID, Ref<JSON::Array>&& paths)
+{
-+#if ENABLE(SANDBOX_EXTENSIONS)
+ auto* pageProxyChannel = m_pageProxyChannels.get(pageProxyID);
+ if (!pageProxyChannel)
+ return makeUnexpected("Unknown pageProxyID"_s);
@@ -12065,11 +12070,15 @@ index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02
+ for (const auto& value : paths.get()) {
+ String path;
+ if (!value->asString(path))
-+ return makeUnexpected("Filr path must be a string"_s);
++ return makeUnexpected("File path must be a string"_s);
+
+ files.append(path);
+ }
+
++ for (const auto& file : files)
++ pageProxyChannel->page().legacyMainFrameProcess().addPreviouslyApprovedFileURL(URL::fileURLWithFileSystemPath(file));
++
++#if ENABLE(SANDBOX_EXTENSIONS)
+ auto sandboxExtensionHandles = SandboxExtension::createReadOnlyHandlesForFiles("InspectorPlaywrightAgent::grantFileReadAccess"_s, files);
+ pageProxyChannel->page().legacyMainFrameProcess().send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(WTF::move(sandboxExtensionHandles)), pageProxyChannel->page().webPageIDInMainFrameProcess());
+#endif
@@ -12120,6 +12129,19 @@ index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02
+ return { };
+}
+
++Inspector::Protocol::ErrorStringOr<void> InspectorPlaywrightAgent::closePage(const String& pageProxyID, std::optional<bool>&& runBeforeUnload)
++{
++ auto* pageProxyChannel = m_pageProxyChannels.get(pageProxyID);
++ if (!pageProxyChannel)
++ return makeUnexpected("Unknown pageProxyID"_s);
++
++ if (runBeforeUnload && *runBeforeUnload)
++ pageProxyChannel->page().tryClose();
++ else
++ pageProxyChannel->page().closePage();
++ return { };
++}
++
+void InspectorPlaywrightAgent::getAllCookies(const String& browserContextID, Ref<GetAllCookiesCallback>&& callback) {
+ String errorString;
+ BrowserContext* browserContext = lookupBrowserContext(errorString, browserContextID);
@@ -12167,6 +12189,10 @@ index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02
+ return;
+ }
+
++ String partitionKey;
++ if (obj->getString("partitionKey"_s, partitionKey))
++ cookie.partitionKey = partitionKey;
++
+ std::optional<double> expires = obj->getDouble("expires"_s);
+ if (expires && *expires != -1)
+ cookie.expires = *expires;
@@ -12369,10 +12395,10 @@ index 0000000000000000000000000000000000000000..635da5eda9d9bbe21c5fa35936656b02
+#endif // ENABLE(REMOTE_INSPECTOR)
diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..1e31698788ab79bc3807b9f29fa2ebc026374909
+index 0000000000000000000000000000000000000000..53f1cd53cc1afc758cf5f17bc5641329e7bd52bb
--- /dev/null
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h
-@@ -0,0 +1,140 @@
+@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -12475,6 +12501,7 @@ index 0000000000000000000000000000000000000000..1e31698788ab79bc3807b9f29fa2ebc0
+ void takePageScreenshot(const String& pageProxyID, int x, int y, int width, int height, std::optional<bool>&& omitDeviceScaleFactor, Ref<TakePageScreenshotCallback>&&) override;
+ Inspector::Protocol::ErrorStringOr<void> setIgnoreCertificateErrors(const String& browserContextID, bool ignore) override;
+ Inspector::Protocol::ErrorStringOr<void> setPageZoomFactor(const String& pageProxyID, double zoomFactor) override;
++ Inspector::Protocol::ErrorStringOr<void> closePage(const String& pageProxyID, std::optional<bool>&& runBeforeUnload) override;
+
+ void getAllCookies(const String& browserContextID, Ref<GetAllCookiesCallback>&&) override;
+ void setCookies(const String& browserContextID, Ref<JSON::Array>&& in_cookies, Ref<SetCookiesCallback>&&) override;
@@ -12650,7 +12677,7 @@ index 6723ee0d9943be07bc8ad09d2b678838aca968df..0d7fb3c7b1a4c877a2ff2f2189d12c7d
BOOL result = ::CreateProcess(0, commandLine.mutableSpan().data(), 0, 0, true, 0, 0, 0, &startupInfo, &processInformation);
diff --git a/Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.cpp b/Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.cpp
-index f82f809cf2552bc1a64920efaf8cdbfbfad680da..a9f787163555d265d5209bd9f9f0cda40f9203ce 100644
+index 4aaaaf20111ba60e4d10bb148db80bc0108bdd16..8a679c00c818bcab3338a9cbe4c8e785106aba11 100644
--- a/Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.cpp
+++ b/Source/WebKit/UIProcess/Media/RemoteMediaSessionManagerProxy.cpp
@@ -30,6 +30,7 @@
@@ -12662,7 +12689,7 @@ index f82f809cf2552bc1a64920efaf8cdbfbfad680da..a9f787163555d265d5209bd9f9f0cda4
#include "RemoteMediaSessionProxy.h"
#include "RemoteMediaSessionState.h"
diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h
-index ed60169d3da046ea7e98e402b2af032476c87ac9..d8aa7edba575a3c6e596e6535ec1cebe38da7e87 100644
+index 82120c2989f467abc747f72f955bd69c170dbb31..6358a3ba3b20b32fbfa0f2f6b4e1707eebf2f8ec 100644
--- a/Source/WebKit/UIProcess/PageClient.h
+++ b/Source/WebKit/UIProcess/PageClient.h
@@ -78,6 +78,11 @@
@@ -12677,7 +12704,7 @@ index ed60169d3da046ea7e98e402b2af032476c87ac9..d8aa7edba575a3c6e596e6535ec1cebe
OBJC_CLASS AVPlayerViewController;
OBJC_CLASS CALayer;
OBJC_CLASS NSFileWrapper;
-@@ -405,7 +410,15 @@ public:
+@@ -406,7 +411,15 @@ public:
virtual void selectionDidChange() = 0;
#endif
@@ -12837,7 +12864,7 @@ index 0e8f21982c6499e6886f5db6c193afc43663f29c..43ed4c8837479744a98ef76ceb2911c0
#include "FrameProcess.h"
#include "ProvisionalFrameCreationParameters.h"
diff --git a/Source/WebKit/UIProcess/ProvisionalPageProxy.h b/Source/WebKit/UIProcess/ProvisionalPageProxy.h
-index 619f6cfac2e777136b4cb91773e996c57708e776..2655dfacb8262c80fe23db5a9d4fd43c8e0c10d0 100644
+index a4f5aa34b3e128a428dcae16796e316f8a08ef92..95940123f11637263a82597d20718e594e5cca17 100644
--- a/Source/WebKit/UIProcess/ProvisionalPageProxy.h
+++ b/Source/WebKit/UIProcess/ProvisionalPageProxy.h
@@ -32,8 +32,10 @@
@@ -12848,10 +12875,10 @@ index 619f6cfac2e777136b4cb91773e996c57708e776..2655dfacb8262c80fe23db5a9d4fd43c
#include "WebPageProxyIdentifier.h"
#include "WebPageProxyMessageReceiverRegistration.h"
+#include "WebsiteDataStore.h"
- #include <WebCore/DiagnosticLoggingClient.h>
#include <WebCore/FrameIdentifier.h>
#include <WebCore/FrameLoaderClient.h>
-@@ -76,7 +78,6 @@ class WebBackForwardListItem;
+ #include <WebCore/NavigationIdentifier.h>
+@@ -77,7 +79,6 @@ class WebBackForwardListItem;
class WebFrameProxy;
class WebPageProxy;
class WebProcessProxy;
@@ -13178,10 +13205,10 @@ index 7ef986965d3fda34b4f09279c62bdad40712ab12..5e0bc508f72bbbd0bcb4bb1254782028
namespace WebKit {
diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm b/Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm
-index 103523006c9f2b5771591082939a14069e12c9b6..0ee29c2c2d14e43c857ec17eec4b312f83b6c2ed 100644
+index 7005db624f133224e79ad460bae4a0b74ce1988d..753f0e06e85e1f9ba3c06172ae36b2b553ef79f8 100644
--- a/Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm
+++ b/Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm
-@@ -46,6 +46,7 @@
+@@ -48,6 +48,7 @@
#import <pal/spi/cocoa/QuartzCoreSPI.h>
#import <wtf/SetForScope.h>
#import <wtf/TZoneMallocInlines.h>
@@ -13207,18 +13234,18 @@ index 3f6cd845733e2e8f5e25c318e7ab54f77032d4cf..e4399bfd734a28ef5df5ec855b7c78b4
class RemotePagePlaybackSessionManagerProxy : public IPC::MessageReceiver, public RefCounted<RemotePagePlaybackSessionManagerProxy> {
diff --git a/Source/WebKit/UIProcess/RemotePageProxy.cpp b/Source/WebKit/UIProcess/RemotePageProxy.cpp
-index 7590c1860cf7a13dd5100d2868e7ad2bc3d68679..c09c1ba1993913a31418fec10fb2ba17394e2508 100644
+index 5ddeafec1d5c22b33874527b94f009cdbfb79ba5..96b738507e648dcd1d16d07968109c88287ebdd8 100644
--- a/Source/WebKit/UIProcess/RemotePageProxy.cpp
+++ b/Source/WebKit/UIProcess/RemotePageProxy.cpp
-@@ -39,6 +39,7 @@
+@@ -38,6 +38,7 @@
+ #include "RemoteMediaSessionManagerProxy.h"
#include "RemotePageDrawingAreaProxy.h"
#include "RemotePageFullscreenManagerProxy.h"
- #include "RemotePageMediaSessionManagerProxy.h"
+#include "RemotePagePlaybackSessionManagerProxy.h"
#include "RemotePageScreenOrientationManagerProxy.h"
#include "RemotePageVisitedLinkStoreRegistration.h"
#include "RemotePageWebAuthenticatorCoordinatorProxy.h"
-@@ -60,6 +61,7 @@
+@@ -59,6 +60,7 @@
#include <WebCore/RemoteUserInputEventData.h>
#include <wtf/TZoneMallocInlines.h>
@@ -13226,8 +13253,30 @@ index 7590c1860cf7a13dd5100d2868e7ad2bc3d68679..c09c1ba1993913a31418fec10fb2ba17
#if ENABLE(FULLSCREEN_API)
#include "WebFullScreenManagerProxy.h"
#endif
+diff --git a/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp b/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
+index c9c17f1ea054d727887cb1f6159a7bb86e2cfa3c..ea5125e44a22aba9009c1377aa9ca75e5dfa5163 100644
+--- a/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
++++ b/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
+@@ -737,6 +737,17 @@ void UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequ
+ currentUserMediaRequest->setEligibleVideoDevices(WTF::move(videoDevices));
+ currentUserMediaRequest->setEligibleAudioDevices(WTF::move(audioDevices));
+
++ if (RefPtr page = m_page.get(); page && page->isControlledByAutomation() && !currentUserMediaRequest->requiresDisplayCapture()) {
++ auto origin = currentUserMediaRequest->topLevelDocumentSecurityOrigin().toString();
++ bool videoAllowed = !currentUserMediaRequest->hasVideoDevice() || page->permissionForAutomation(origin, "camera"_s).value_or(false);
++ bool audioAllowed = !currentUserMediaRequest->hasAudioDevice() || page->permissionForAutomation(origin, "microphone"_s).value_or(false);
++ if (videoAllowed && audioAllowed)
++ grantRequest(*currentUserMediaRequest);
++ else
++ denyRequest(*currentUserMediaRequest, UserMediaPermissionRequestProxy::UserMediaAccessDenialReason::PermissionDenied);
++ return;
++ }
++
+ auto action = getRequestAction(*currentUserMediaRequest);
+ ALWAYS_LOG(LOGIDENTIFIER, currentUserMediaRequest->userMediaID() ? currentUserMediaRequest->userMediaID()->toUInt64() : 0, ", action: ", action);
+
diff --git a/Source/WebKit/UIProcess/WebContextMenuProxy.h b/Source/WebKit/UIProcess/WebContextMenuProxy.h
-index 364666d82ffd69aef6cb4f8d63b61ae13e163d87..a491699c43502e6feae3b3df73b3558a79bb73e3 100644
+index ff828014f7da9ef7a9f482f11550510fcba2a343..6fbe942c3a24b2cc9110e344ee4cebe12e1cc855 100644
--- a/Source/WebKit/UIProcess/WebContextMenuProxy.h
+++ b/Source/WebKit/UIProcess/WebContextMenuProxy.h
@@ -51,6 +51,7 @@ public:
@@ -13240,10 +13289,10 @@ index 364666d82ffd69aef6cb4f8d63b61ae13e163d87..a491699c43502e6feae3b3df73b3558a
const FrameInfoData& frameInfo() const LIFETIME_BOUND { return m_frameInfo; }
diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..cc495bff7d10aeb071ba30002d292b82e26d51b7
+index 0000000000000000000000000000000000000000..eebc878fbf78ce1fe22d274541dfce8c177d731d
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
-@@ -0,0 +1,161 @@
+@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -13348,12 +13397,34 @@ index 0000000000000000000000000000000000000000..cc495bff7d10aeb071ba30002d292b82
+ return { };
+}
+
-+Inspector::Protocol::ErrorStringOr<void> WebPageInspectorEmulationAgent::setAuthCredentials(const String& username, const String& password, const String& origin)
++Inspector::Protocol::ErrorStringOr<void> WebPageInspectorEmulationAgent::setAuthCredentials(RefPtr<JSON::Array>&& credentials)
+{
-+ if (username.isNull() && password.isNull())
-+ m_page.setAuthCredentialsForAutomation(std::nullopt, std::nullopt);
-+ else
-+ m_page.setAuthCredentialsForAutomation(WebCore::Credential(username, password, WebCore::CredentialPersistence::Permanent), URL(origin));
++ if (!credentials) {
++ m_page.setAuthCredentialsForAutomation(std::nullopt);
++ return { };
++ }
++
++ Vector<std::pair<WebCore::Credential, std::optional<URL>>> parsedCredentials;
++ for (unsigned i = 0; i < credentials->length(); ++i) {
++ RefPtr<JSON::Object> object = credentials->get(i)->asObject();
++ if (!object)
++ return makeUnexpected("Credentials must be an object"_s);
++
++ String username;
++ if (!object->getString("username"_s, username))
++ return makeUnexpected("Credentials must contain username"_s);
++
++ String password;
++ if (!object->getString("password"_s, password))
++ return makeUnexpected("Credentials must contain password"_s);
++
++ String origin = object->getString("origin"_s);
++ std::optional<URL> originURL;
++ if (!origin.isEmpty())
++ originURL = URL(origin);
++ parsedCredentials.append({ WebCore::Credential(username, password, WebCore::CredentialPersistence::Permanent), WTF::move(originURL) });
++ }
++ m_page.setAuthCredentialsForAutomation(WTF::move(parsedCredentials));
+ return { };
+}
+
@@ -13407,7 +13478,7 @@ index 0000000000000000000000000000000000000000..cc495bff7d10aeb071ba30002d292b82
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..8c772fb1b67ec7d83cbe2394d8ab04787a4412a8
+index 0000000000000000000000000000000000000000..ffe535012cb7d21a84b2da328fdf66437ed21afd
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h
@@ -0,0 +1,76 @@
@@ -13468,7 +13539,7 @@ index 0000000000000000000000000000000000000000..8c772fb1b67ec7d83cbe2394d8ab0478
+
+ void setDeviceMetricsOverride(int width, int height, bool fixedlayout, std::optional<double>&& deviceScaleFactor, Ref<SetDeviceMetricsOverrideCallback>&&) override;
+ Inspector::Protocol::ErrorStringOr<void> setJavaScriptEnabled(bool enabled) override;
-+ Inspector::Protocol::ErrorStringOr<void> setAuthCredentials(const String&, const String&, const String&) override;
++ Inspector::Protocol::ErrorStringOr<void> setAuthCredentials(RefPtr<JSON::Array>&&) override;
+ Inspector::Protocol::ErrorStringOr<void> setActiveAndFocused(std::optional<bool>&&) override;
+ Inspector::Protocol::ErrorStringOr<void> grantPermissions(const String& origin, Ref<JSON::Array>&& permissions) override;
+ Inspector::Protocol::ErrorStringOr<void> resetPermissions() override;
@@ -13489,10 +13560,10 @@ index 0000000000000000000000000000000000000000..8c772fb1b67ec7d83cbe2394d8ab0478
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..a7de88ca37063e44c74348cdeeb2b7d28692df3d
+index 0000000000000000000000000000000000000000..22c3623af08b8050e974380981bcf166d8a74447
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
-@@ -0,0 +1,397 @@
+@@ -0,0 +1,399 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -13597,6 +13668,7 @@ index 0000000000000000000000000000000000000000..a7de88ca37063e44c74348cdeeb2b7d2
+void WebPageInspectorInputAgent::didProcessAllPendingMouseEvents()
+{
+ m_page.setInterceptDrags(false);
++ m_page.setSimulatingUserInput(false);
+ m_mouseCallbacks->sendSuccess();
+}
+
@@ -13773,6 +13845,7 @@ index 0000000000000000000000000000000000000000..a7de88ca37063e44c74348cdeeb2b7d2
+ // to prevent them from creating actual drags in the host
+ // operating system. This is turned off in the callback.
+ m_page.setInterceptDrags(true);
++ m_page.setSimulatingUserInput(true);
+ MonotonicTime timestamp = MonotonicTime::now();
+#if PLATFORM(MAC)
+ UNUSED_VARIABLE(eventType);
@@ -13984,10 +14057,10 @@ index 0000000000000000000000000000000000000000..d57c86a11d49efb8105a871a4b420e2b
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
-index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a4109414c22c 100644
+index d4381103cc6ab004242e01cfe024fc8a9358503f..2e7ded80837501f890fc041af4ae1c802ebb4ac0 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
-@@ -220,6 +220,7 @@
+@@ -222,6 +222,7 @@
#include <WebCore/CaptureDeviceManager.h>
#include <WebCore/CaptureDeviceWithCapabilities.h>
#include <WebCore/ChromeClient.h>
@@ -13995,7 +14068,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
#include <WebCore/CompositionHighlight.h>
#include <WebCore/CrossSiteNavigationDataTransfer.h>
#include <WebCore/CryptoKey.h>
-@@ -233,6 +234,7 @@
+@@ -235,6 +236,7 @@
#include <WebCore/DigitalCredentialsProtocols.h>
#include <WebCore/DigitalCredentialsRequestData.h>
#include <WebCore/DigitalCredentialsResponseData.h>
@@ -14003,7 +14076,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
#include <WebCore/DocumentSyncData.h>
#include <WebCore/DragController.h>
#include <WebCore/DragData.h>
-@@ -263,6 +265,7 @@
+@@ -268,6 +270,7 @@
#include <WebCore/NotImplemented.h>
#include <WebCore/OrganizationStorageAccessPromptQuirk.h>
#include <WebCore/OriginAgentClusterPolicy.h>
@@ -14011,7 +14084,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
#include <WebCore/PerformanceLoggingClient.h>
#include <WebCore/PermissionDescriptor.h>
#include <WebCore/PermissionState.h>
-@@ -273,11 +276,13 @@
+@@ -278,11 +281,13 @@
#include <WebCore/Quirks.h>
#include <WebCore/RealtimeMediaSourceCenter.h>
#include <WebCore/ReferrerPolicy.h>
@@ -14025,16 +14098,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
#include <WebCore/SecurityOrigin.h>
#include <WebCore/SecurityOriginData.h>
#include <WebCore/SerializedCryptoKeyWrap.h>
-@@ -371,7 +376,7 @@
- #include "ViewSnapshotStore.h"
- #endif
-
--#if PLATFORM(GTK)
-+#if PLATFORM(GTK) || PLATFORM(WPE)
- #include <WebCore/SelectionData.h>
- #endif
-
-@@ -509,6 +514,17 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms;
+@@ -524,6 +529,17 @@ static bool shouldUseEnhancedSecurityHeuristics(const Ref<WebPreferences>& prefe
static constexpr Seconds audibleActivityClearDelay = 10_s;
#endif
@@ -14052,7 +14116,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
#if PLATFORM(COCOA)
static WorkQueue& sharedFileQueueSingleton()
{
-@@ -1104,6 +1120,10 @@ WebPageProxy::~WebPageProxy()
+@@ -1120,6 +1136,10 @@ WebPageProxy::~WebPageProxy()
ASSERT(webPageProxyMap().get(m_identifier) == this);
webPageProxyMap().remove(m_identifier);
@@ -14063,16 +14127,16 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
}
void WebPageProxy::addAllMessageReceivers()
-@@ -1680,7 +1700,7 @@ void WebPageProxy::didAttachToRunningProcess()
-
+@@ -1697,7 +1717,7 @@ void WebPageProxy::didAttachToRunningProcess()
#if ENABLE(FULLSCREEN_API)
ASSERT(!m_fullScreenManager);
-- m_fullScreenManager = WebFullScreenManagerProxy::create(*this, protect(protect(pageClient())->fullScreenManagerProxyClient()).get());
-+ m_fullScreenManager = WebFullScreenManagerProxy::create(*this, m_fullScreenManagerClientOverride ? *m_fullScreenManagerClientOverride : protect(protect(pageClient())->fullScreenManagerProxyClient()).get());
+ if (RefPtr pageClient = this->pageClient())
+- m_fullScreenManager = WebFullScreenManagerProxy::create(*this, protect(pageClient->fullScreenManagerProxyClient()).get());
++ m_fullScreenManager = WebFullScreenManagerProxy::create(*this, m_fullScreenManagerClientOverride ? *m_fullScreenManagerClientOverride : protect(pageClient->fullScreenManagerProxyClient()).get());
#endif
#if ENABLE(VIDEO_PRESENTATION_MODE)
ASSERT(!m_playbackSessionManager);
-@@ -1719,7 +1739,7 @@ void WebPageProxy::didAttachToRunningProcess()
+@@ -1729,7 +1749,7 @@ void WebPageProxy::didAttachToRunningProcess()
#endif
#if !PLATFORM(IOS_FAMILY)
@@ -14081,7 +14145,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
#else
auto currentOrientation = toScreenOrientationType(m_deviceOrientation);
#endif
-@@ -1861,6 +1881,7 @@ void WebPageProxy::initializeWebPage(const Site& site, WebCore::SandboxFlags eff
+@@ -1871,6 +1891,7 @@ void WebPageProxy::initializeWebPage(const Site& site, WebCore::SandboxFlags eff
if (preferences->siteIsolationEnabled())
browsingContextGroup->addPage(*this);
process->send(Messages::WebProcess::CreateWebPage(m_webPageID, creationParameters(process, *protect(drawingArea()), m_mainFrame->frameID(), std::nullopt)), 0);
@@ -14089,7 +14153,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
process->addVisitedLinkStoreUser(m_visitedLinkStore, identifier());
-@@ -2177,6 +2198,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
+@@ -2198,6 +2219,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
return m_legacyMainFrameProcess;
}
@@ -14111,7 +14175,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
RefPtr<API::Navigation> WebPageProxy::loadRequest(WebCore::ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, NavigationUpgradeToHTTPSBehavior navigationUpgradeToHTTPSBehavior, std::unique_ptr<NavigationActionData>&& lastNavigationAction, API::Object* userData, bool isRequestFromClientOrUserInput)
{
if (m_isClosed)
-@@ -2306,11 +2342,29 @@ void WebPageProxy::loadRequestWithNavigationShared(Ref<WebProcessProxy>&& proces
+@@ -2330,11 +2366,29 @@ void WebPageProxy::loadRequestWithNavigationShared(Ref<WebProcessProxy>&& proces
navigation->setIsLoadedWithNavigationShared(true);
protectedProcess->markProcessAsRecentlyUsed();
@@ -14145,14 +14209,13 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
});
}
-@@ -3019,6 +3073,53 @@ RefPtr<WebAutomationSession> WebPageProxy::activeAutomationSession() const
+@@ -3157,6 +3211,52 @@ RefPtr<WebAutomationSession> WebPageProxy::activeAutomationSession() const
return m_configuration->processPool().automationSession();
}
-+void WebPageProxy::setAuthCredentialsForAutomation(std::optional<WebCore::Credential>&& credentials, std::optional<URL>&& origin)
++void WebPageProxy::setAuthCredentialsForAutomation(std::optional<Vector<std::pair<WebCore::Credential, std::optional<URL>>>>&& credentials)
+{
+ m_credentialsForAutomation = WTF::move(credentials);
-+ m_authOriginForAutomation = WTF::move(origin);
+}
+
+void WebPageProxy::setPermissionsForAutomation(const UncheckedKeyHashMap<String, HashSet<String>>& permissions)
@@ -14199,7 +14262,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
void WebPageProxy::sendMessageToInspectorFrontend(const String& targetId, const String& message)
{
m_inspectorController->sendMessageToInspectorFrontend(targetId, message);
-@@ -3324,6 +3425,24 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState> flagsToUpdate)
+@@ -3462,6 +3562,24 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState> flagsToUpdate)
if (!pageClient)
return;
internals().activityState.remove(flagsToUpdate);
@@ -14224,16 +14287,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
if (flagsToUpdate & ActivityState::IsFocused && pageClient->isViewFocused())
internals().activityState.add(ActivityState::IsFocused);
if (flagsToUpdate & ActivityState::WindowIsActive && pageClient->isViewWindowActive())
-@@ -4157,7 +4276,7 @@ void WebPageProxy::performDragOperation(DragData& dragData, const String& dragSt
- if (!hasRunningProcess())
- return;
-
--#if PLATFORM(GTK)
-+#if PLATFORM(GTK) || PLATFORM(WPE)
- URL url { dragData.asURL() };
- if (url.protocolIsFile())
- protect(legacyMainFrameProcess())->assumeReadAccessToBaseURL(*this, url.string(), [] { });
-@@ -4200,6 +4319,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -4349,6 +4467,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
if (!hasRunningProcess())
return;
@@ -14242,16 +14296,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
auto completionHandler = [this, protectedThis = Ref { *this }, action, dragData] (std::optional<WebCore::DragOperation> dragOperation, WebCore::DragHandlingMethod dragHandlingMethod, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const IntRect& insertionRect, const IntRect& editableElementRect, std::optional<WebCore::RemoteUserInputEventData> remoteUserInputEventData) mutable {
if (!m_pageClient)
return;
-@@ -4211,7 +4332,7 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
- dragData.setClientPosition(roundedIntPoint(remoteUserInputEventData->transformedPoint));
- performDragControllerAction(action, dragData, remoteUserInputEventData->targetFrameID);
- };
--#if PLATFORM(GTK)
-+#if PLATFORM(GTK) || PLATFORM(WPE)
- ASSERT(dragData.platformData());
- sendWithAsyncReplyToProcessContainingFrame(frameID, Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags()), WTF::move(completionHandler));
- #else
-@@ -4246,17 +4367,36 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
+@@ -4395,17 +4515,36 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
setDragCaretRect(insertionRect);
if (RefPtr pageClient = this->pageClient())
pageClient->didPerformDragControllerAction();
@@ -14267,7 +14312,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
+ m_dragSelectionData = WTF::move(selectionData);
+ m_dragSourceOperationMask = dragOperationMask;
+ } else {
- #if PLATFORM(GTK)
+ #if PLATFORM(GTK) || PLATFORM(WPE)
- if (RefPtr pageClient = this->pageClient()) {
- RefPtr dragImage = dragImageHandle ? ShareableBitmap::create(WTF::move(*dragImageHandle)) : nullptr;
- pageClient->startDrag(WTF::move(selectionData), dragOperationMask, WTF::move(dragImage), WTF::move(dragImageHotspot));
@@ -14291,7 +14336,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
didStartDrag();
}
#endif
-@@ -4277,6 +4417,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
+@@ -4426,6 +4565,29 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
setDragCaretRect({ });
}
@@ -14312,11 +14357,16 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
+ m_interceptDrags = shouldIntercept;
+}
+#endif
++
++void WebPageProxy::setSimulatingUserInput(bool simulating)
++{
++ m_simulatingUserInput = simulating;
++}
+
void WebPageProxy::didStartDrag(const std::optional<FrameIdentifier>& targetFrameID)
{
if (!hasRunningProcess())
-@@ -4285,6 +4443,25 @@ void WebPageProxy::didStartDrag(const std::optional<FrameIdentifier>& targetFram
+@@ -4434,6 +4596,25 @@ void WebPageProxy::didStartDrag(const std::optional<FrameIdentifier>& targetFram
discardQueuedMouseEvents();
sendToProcessContainingFrame(targetFrameID, Messages::WebPage::DidStartDrag(targetFrameID));
@@ -14342,7 +14392,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
}
void WebPageProxy::dragCancelled()
-@@ -4469,26 +4646,47 @@ void WebPageProxy::processNextQueuedMouseEvent()
+@@ -4632,26 +4813,47 @@ void WebPageProxy::processNextQueuedMouseEvent()
auto eventType = event->type();
startResponsivenessTimerForMouseEvent(*targetFrame, eventType);
@@ -14397,21 +14447,21 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
+ m_dragSelectionData = std::nullopt;
+ dragEnded(roundedIntPoint(event->position()), roundedIntPoint(event->globalPosition()), m_dragSourceOperationMask);
+ }
-+ didReceiveEventIPC(process->connection(), eventType, true, std::nullopt);
++ mouseEventHandlingCompleted(true, std::nullopt);
+ }
}
#if ENABLE(MAC_GESTURE_EVENTS)
-@@ -4751,6 +4949,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled)
-
- if (RefPtr automationSession = m_configuration->processPool().automationSession())
- automationSession->wheelEventsFlushedForPage(*this);
+@@ -4973,6 +5175,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled)
+ #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
+ didFinishProcessingAllPendingWheelEvents();
+ #endif
+
+ m_inspectorController->didProcessAllPendingWheelEvents();
}
void WebPageProxy::cacheWheelEventScrollingAccelerationCurve(const NativeWebWheelEvent& nativeWheelEvent)
-@@ -4894,7 +5094,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
+@@ -5126,7 +5330,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent)
{
@@ -14420,7 +14470,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
for (auto& touchPoint : touchStartEvent.touchPoints()) {
auto location = touchPoint.locationInRootView();
auto update = [this, location](TrackingType& trackingType, EventTrackingRegions::EventType eventType) {
-@@ -5759,6 +5959,7 @@ Ref<WebPageProxy> WebPageProxy::navigationOriginatingPage(const FrameInfoData& f
+@@ -6014,6 +6218,7 @@ Ref<WebPageProxy> WebPageProxy::navigationOriginatingPage(const FrameInfoData& f
void WebPageProxy::receivedPolicyDecision(PolicyAction action, API::Navigation* navigation, std::optional<std::pair<Ref<API::WebsitePolicies>, Ref<WebProcessProxy>>>&& websitePoliciesAndProcess, Ref<API::NavigationAction>&& navigationAction, WillContinueLoadInNewProcess willContinueLoadInNewProcess, std::optional<SandboxExtension::Handle> sandboxExtensionHandle, std::optional<PolicyDecisionConsoleMessage>&& consoleMessage, CompletionHandler<void(PolicyDecision&&)>&& completionHandler)
{
@@ -14428,7 +14478,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
if (!hasRunningProcess())
return completionHandler(PolicyDecision { });
-@@ -7816,6 +8017,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref<WebProcessProxy>&& process, We
+@@ -8093,6 +8298,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref<WebProcessProxy>&& process, We
RefPtr protectedPageClient { pageClient() };
m_navigationState->didDestroyNavigation(process->coreProcessIdentifier(), navigationID);
@@ -14436,7 +14486,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
}
void WebPageProxy::didStartProvisionalLoadForFrame(IPC::Connection& connection, FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, std::optional<WebCore::NavigationIdentifier> navigationID, URL&& url, URL&& unreachableURL, const UserData& userData, WallTime timestamp)
-@@ -8209,6 +8411,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
+@@ -8490,6 +8696,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
m_failingProvisionalLoadURL = { };
m_allowsLoadingAlternateHTMLForFailingProvisionalLoadURL = true;
@@ -14445,7 +14495,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
// 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;
-@@ -10212,6 +10416,8 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w
+@@ -10615,6 +10823,8 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w
if (RefPtr page = originatingFrameInfo->page())
openerAppInitiatedState = page->lastNavigationWasAppInitiated();
@@ -14454,15 +14504,15 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
auto completionHandler = [
this,
protectedThis = Ref { *this },
-@@ -10305,6 +10511,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w
+@@ -10708,6 +10918,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w
configuration->setInitialReferrerPolicy(effectiveReferrerPolicy);
configuration->setWindowFeatures(WTF::move(windowFeatures));
configuration->setOpenedMainFrameName(openedMainFrameName);
+ configuration->setOpenerPageForInspector(*this);
- if (RefPtr openerFrame = WebFrameProxy::webFrame(originatingFrameInfoData.frameID); navigationActionData.hasOpener && openerFrame) {
+ if (RefPtr openerFrame = originatingFrame; navigationActionData.hasOpener && openerFrame) {
configuration->setRelatedPage(*this);
-@@ -10340,6 +10547,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w
+@@ -10743,6 +10954,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w
void WebPageProxy::showPage()
{
m_uiClient->showPage(this);
@@ -14470,7 +14520,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
}
bool WebPageProxy::hasOpenedPage() const
-@@ -10483,6 +10691,10 @@ void WebPageProxy::closePage()
+@@ -10886,6 +11098,10 @@ void WebPageProxy::closePage()
if (isClosed())
return;
@@ -14481,7 +14531,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:");
if (RefPtr pageClient = this->pageClient())
pageClient->clearAllEditCommands();
-@@ -10522,6 +10734,8 @@ void WebPageProxy::runJavaScriptAlert(IPC::Connection& connection, FrameIdentifi
+@@ -10927,6 +11143,8 @@ void WebPageProxy::runJavaScriptAlert(IPC::Connection& connection, FrameIdentifi
auto showModal = [protectedThis = Ref { *this }](RefPtr<WebFrameProxy>&& frame, FrameInfoData&& frameInfo, String&& message, CompletionHandler<void()>&& reply) mutable {
protectedThis->runModalJavaScriptDialog(WTF::move(frame), WTF::move(frameInfo), WTF::move(message), [reply = WTF::move(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, String&& message, CompletionHandler<void()>&& completion) mutable {
@@ -14490,7 +14540,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
page.m_uiClient->runJavaScriptAlert(page, WTF::move(message), frame, WTF::move(frameInfo), [reply = WTF::move(reply), completion = WTF::move(completion)]() mutable {
reply();
completion();
-@@ -10555,6 +10769,8 @@ void WebPageProxy::runJavaScriptConfirm(IPC::Connection& connection, FrameIdenti
+@@ -10962,6 +11180,8 @@ void WebPageProxy::runJavaScriptConfirm(IPC::Connection& connection, FrameIdenti
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this, message, std::nullopt);
}
@@ -14499,7 +14549,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
auto showModal = [protectedThis = Ref { *this }](RefPtr<WebFrameProxy>&& frame, FrameInfoData&& frameInfo, String&& message, CompletionHandler<void(bool)>&& reply) mutable {
protectedThis->runModalJavaScriptDialog(WTF::move(frame), WTF::move(frameInfo), WTF::move(message), [reply = WTF::move(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, String&& message, CompletionHandler<void()>&& completion) mutable {
-@@ -10591,6 +10807,8 @@ void WebPageProxy::runJavaScriptPrompt(IPC::Connection& connection, FrameIdentif
+@@ -11000,6 +11220,8 @@ void WebPageProxy::runJavaScriptPrompt(IPC::Connection& connection, FrameIdentif
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this, message, defaultValue);
}
@@ -14508,7 +14558,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
auto showModal = [protectedThis = Ref { *this }](RefPtr<WebFrameProxy>&& frame, FrameInfoData&& frameInfo, String&& message, String&& defaultValue, CompletionHandler<void(const String&)>&& reply) mutable {
protectedThis->runModalJavaScriptDialog(WTF::move(frame), WTF::move(frameInfo), WTF::move(message), [reply = WTF::move(reply), defaultValue = WTF::move(defaultValue)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, String&& message, CompletionHandler<void()>&& completion) mutable {
-@@ -10805,6 +11023,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(IPC::Connection& connection, Fram
+@@ -11227,6 +11449,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(IPC::Connection& connection, Fram
return;
}
}
@@ -14517,7 +14567,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
// Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer.
webProcess->stopResponsivenessTimer();
-@@ -11494,6 +11714,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo,
+@@ -12057,6 +12281,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo,
}
#if ENABLE(FULLSCREEN_API)
@@ -14529,7 +14579,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
WebFullScreenManagerProxy* WebPageProxy::fullScreenManager()
{
return m_fullScreenManager.get();
-@@ -11606,6 +11831,17 @@ void WebPageProxy::requestDOMPasteAccess(IPC::Connection& connection, DOMPasteAc
+@@ -12173,6 +12402,17 @@ void WebPageProxy::requestDOMPasteAccess(IPC::Connection& connection, DOMPasteAc
}
}
@@ -14544,10 +14594,26 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
+ return;
+ }
+
- protect(pageClient())->requestDOMPasteAccess(pasteAccessCategory, requiresInteraction, elementRect, originIdentifier, WTF::move(completionHandler));
- }
+ auto rootFrameID = frame->rootFrame()->frameID();
+ convertRectToMainFrameCoordinates(elementRect, rootFrameID, [weakThis = WeakPtr { *this }, pasteAccessCategory, requiresInteraction, frameID, originIdentifier, completionHandler = WTF::move(completionHandler)](std::optional<FloatRect> convertedRect) mutable {
+ RefPtr protectedThis = weakThis.get();
+@@ -12557,6 +12797,15 @@ void WebPageProxy::showContextMenu(FrameInfoData&& frameInfo, ContextMenuContext
+ return;
+ }
-@@ -12595,6 +12831,8 @@ void WebPageProxy::mouseEventHandlingCompleted(std::optional<WebEventType> event
++ // Playwright sets controlledByAutomation via WKPageSetControlledByAutomation but does not create a
++ // WebAutomationSession, so the check above never fires for it. While the inspector input agent is
++ // dispatching synthetic mouse input, suppress the native context menu: on Windows/Mac it runs a nested
++ // modal runloop that swallows the following synthetic click (e.g. a left click after a right click).
++ // The DOM 'contextmenu' event has already been dispatched in the WebProcess, so only the native UI is
++ // skipped. See https://github.com/microsoft/playwright/issues/39246.
++ if (m_controlledByAutomation && m_simulatingUserInput)
++ return;
++
+ #if ENABLE(CONTEXT_MENUS)
+ m_waitingForContextMenuToShow = true;
+ #endif
+@@ -13189,6 +13438,8 @@ void WebPageProxy::mouseEventHandlingCompleted(bool handled, std::optional<Remot
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->mouseEventsFlushedForPage(*this);
didFinishProcessingAllPendingMouseEvents();
@@ -14556,7 +14622,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
}
}
-@@ -12653,6 +12891,7 @@ void WebPageProxy::keyEventHandlingCompleted(std::optional<WebEventType> eventTy
+@@ -13243,6 +13494,7 @@ void WebPageProxy::keyEventHandlingCompleted(bool handled)
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->keyboardEventsFlushedForPage(*this);
didFinishProcessingAllPendingKeyEvents();
@@ -14564,7 +14630,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
}
}
-@@ -13104,7 +13343,10 @@ void WebPageProxy::dispatchProcessDidTerminate(WebProcessProxy& process, Process
+@@ -13603,7 +13855,10 @@ void WebPageProxy::dispatchProcessDidTerminate(WebProcessProxy& process, Process
protect(browsingContextGroup())->processDidTerminate(*this, process);
}
@@ -14576,7 +14642,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
if (m_loaderClient)
handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this);
else
-@@ -13785,6 +14027,9 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
+@@ -14287,6 +14542,9 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
parameters.allowPostingLegacySynchronousMessages = m_configuration->allowPostingLegacySynchronousMessages();
parameters.backgroundTextExtractionEnabled = m_configuration->backgroundTextExtractionEnabled();
@@ -14586,34 +14652,44 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
#if ENABLE(APP_HIGHLIGHTS)
parameters.appHighlightsVisible = appHighlightsVisibility() ? HighlightVisibility::Visible : HighlightVisibility::Hidden;
#endif
-@@ -13964,8 +14209,47 @@ void WebPageProxy::allowGamepadAccess()
+@@ -14497,8 +14755,59 @@ void WebPageProxy::allowGamepadAccess()
#endif // ENABLE(GAMEPAD)
-+bool WebPageProxy::shouldSendAutomationCredentialsForProtectionSpace(const WebProtectionSpace& protectionSpace)
++static bool originMatchesProtectionSpace(const URL& origin, const WebProtectionSpace& protectionSpace)
+{
-+ if (m_authOriginForAutomation.has_value() && !m_authOriginForAutomation.value().isEmpty()) {
-+ switch (protectionSpace.serverType()) {
-+ case WebCore::ProtectionSpace::ServerType::HTTP:
-+ if (m_authOriginForAutomation.value().protocol() != "http"_s)
-+ return false;
-+ break;
-+ case WebCore::ProtectionSpace::ServerType::HTTPS:
-+ if (m_authOriginForAutomation.value().protocol() != "https"_s)
-+ return false;
-+ break;
-+ default:
++ switch (protectionSpace.serverType()) {
++ case WebCore::ProtectionSpace::ServerType::HTTP:
++ if (origin.protocol() != "http"_s)
+ return false;
-+ }
-+
-+ if (protectionSpace.host() != m_authOriginForAutomation.value().host())
-+ return false;
-+
-+ if (protectionSpace.port() != m_authOriginForAutomation.value().port().value_or(0))
++ break;
++ case WebCore::ProtectionSpace::ServerType::HTTPS:
++ if (origin.protocol() != "https"_s)
++ return false;
++ break;
++ default:
+ return false;
+ }
++
++ if (protectionSpace.host() != origin.host())
++ return false;
++
++ if (protectionSpace.port() != origin.port().value_or(0))
++ return false;
++
+ return true;
+}
++
++std::optional<WebCore::Credential> WebPageProxy::automationCredentialsForProtectionSpace(const WebProtectionSpace& protectionSpace)
++{
++ if (!m_credentialsForAutomation.has_value())
++ return std::nullopt;
++ for (const auto& [credential, origin] : m_credentialsForAutomation.value()) {
++ if (!origin.has_value() || origin.value().isEmpty() || originMatchesProtectionSpace(origin.value(), protectionSpace))
++ return credential;
++ }
++ return std::nullopt;
++}
+
void WebPageProxy::didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&& authenticationChallenge, NegotiatedLegacyTLS negotiatedLegacyTLS)
{
@@ -14623,18 +14699,20 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
+ }
+
+ if (m_credentialsForAutomation.has_value()) {
-+ if (m_credentialsForAutomation->isEmpty() || authenticationChallenge->core().previousFailureCount() ||
-+ !shouldSendAutomationCredentialsForProtectionSpace(*authenticationChallenge->protectionSpace())) {
++ std::optional<WebCore::Credential> credential;
++ if (!authenticationChallenge->core().previousFailureCount())
++ credential = automationCredentialsForProtectionSpace(*authenticationChallenge->protectionSpace());
++ if (!credential || credential->isEmpty()) {
+ authenticationChallenge->listener().completeChallenge(AuthenticationChallengeDisposition::PerformDefaultHandling);
+ return;
+ }
-+ authenticationChallenge->listener().completeChallenge(AuthenticationChallengeDisposition::UseCredential, *m_credentialsForAutomation);
++ authenticationChallenge->listener().completeChallenge(AuthenticationChallengeDisposition::UseCredential, *credential);
+ return;
+ }
if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) {
m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = Ref { *this }, authenticationChallenge] (bool shouldAllowLegacyTLS) {
if (shouldAllowLegacyTLS)
-@@ -14061,6 +14345,12 @@ void WebPageProxy::requestGeolocationPermissionForFrame(IPC::Connection& connect
+@@ -14609,6 +14918,12 @@ void WebPageProxy::requestGeolocationPermissionForFrame(IPC::Connection& connect
request->deny();
};
@@ -14647,7 +14725,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
// FIXME: Once iOS migrates to the new WKUIDelegate SPI, clean this up
// and make it one UIClient call that calls the completionHandler with false
// if there is no delegate instead of returning the completionHandler
-@@ -14169,6 +14459,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi
+@@ -14717,6 +15032,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi
shouldChangeDeniedToPrompt = false;
if (sessionID().isEphemeral()) {
@@ -14660,7 +14738,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
completionHandler(shouldChangeDeniedToPrompt ? PermissionState::Prompt : PermissionState::Denied);
return;
}
-@@ -14183,6 +14479,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi
+@@ -14731,6 +15052,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi
return;
}
@@ -14674,7 +14752,7 @@ index 5828bd882da8056e3d5dd97b07416ae2f5c0b4e0..96668f979953d797ab8391a0eb89a410
completionHandler(shouldChangeDeniedToPrompt ? PermissionState::Prompt : PermissionState::Denied);
return;
diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h
-index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e879970c05 100644
+index b600786b6ca3b60021d6b184d1f08709482101c0..ecd4da408df578cd6c693d524cbecf73cd472320 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.h
+++ b/Source/WebKit/UIProcess/WebPageProxy.h
@@ -28,6 +28,7 @@
@@ -14684,8 +14762,8 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
+#include "APIWebsitePolicies.h"
#include "MessageReceiver.h"
#include "TextExtractionAssertionScope.h"
- #include <wtf/ApproximateTime.h>
-@@ -41,6 +42,20 @@
+ #include <WebCore/UserGestureTokenIdentifier.h>
+@@ -43,6 +44,20 @@
#include <wtf/SwiftBridging.h>
#include <wtf/UniqueRef.h>
#include <wtf/WeakHashSet.h>
@@ -14706,7 +14784,7 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
#if USE(COORDINATED_GRAPHICS) && HAVE(DISPLAY_LINK)
#include "DisplayLinkObserverID.h"
-@@ -132,6 +147,7 @@ class DragData;
+@@ -134,6 +149,7 @@ class DragData;
class Exception;
class FloatPoint;
class FloatQuad;
@@ -14714,7 +14792,7 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
class FloatRect;
class FloatSize;
class FontAttributeChanges;
-@@ -847,6 +863,8 @@ public:
+@@ -853,6 +869,8 @@ public:
RefPtr<WebAutomationSession> activeAutomationSession() const;
@@ -14723,7 +14801,7 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
WebPageInspectorController& inspectorController() LIFETIME_BOUND { return m_inspectorController.get(); }
#if PLATFORM(IOS_FAMILY)
-@@ -881,6 +899,7 @@ public:
+@@ -887,6 +905,7 @@ public:
bool NODELETE hasSleepDisabler() const;
#if ENABLE(FULLSCREEN_API)
@@ -14731,12 +14809,13 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
WebFullScreenManagerProxy* NODELETE fullScreenManager();
void setFullScreenClientForTesting(std::unique_ptr<WebKit::WebFullScreenManagerProxyClient>&&);
-@@ -944,6 +963,12 @@ public:
+@@ -950,6 +969,13 @@ public:
void setPageLoadStateObserver(RefPtr<PageLoadStateObserverBase>&&);
-+ void setAuthCredentialsForAutomation(std::optional<WebCore::Credential>&&, std::optional<URL>&&);
++ void setAuthCredentialsForAutomation(std::optional<Vector<std::pair<WebCore::Credential, std::optional<URL>>>>&&);
+ void setPermissionsForAutomation(const UncheckedKeyHashMap<String, HashSet<String>>&);
++ std::optional<bool> permissionForAutomation(const String& origin, const String& permission) const;
+ void setOrientationOverride(std::optional<int>&& angle);
+ void setActiveForAutomation(std::optional<bool> active);
+ void logToStderr(const String& str);
@@ -14744,7 +14823,7 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
void initializeWebPage(const WebCore::Site&, WebCore::SandboxFlags, WebCore::ReferrerPolicy);
void setDrawingArea(RefPtr<DrawingAreaProxy>&&);
-@@ -975,6 +1000,8 @@ public:
+@@ -981,6 +1007,8 @@ public:
RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, WebCore::NavigationUpgradeToHTTPSBehavior);
RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, WebCore::NavigationUpgradeToHTTPSBehavior, std::unique_ptr<NavigationActionData>&&, API::Object* userData = nullptr, bool isRequestFromClientOrUserInput = true);
@@ -14753,7 +14832,7 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, bool isAppInitiated = true, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadData(Ref<WebCore::SharedBuffer>&&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadData(Ref<WebCore::SharedBuffer>&&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, WebCore::ShouldOpenExternalURLsPolicy);
-@@ -1076,6 +1103,7 @@ public:
+@@ -1095,6 +1123,7 @@ public:
void restoreSelectionInFocusedEditableElement();
PageClient* NODELETE pageClient() const;
@@ -14761,7 +14840,17 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
void setViewNeedsDisplay(const WebCore::Region&);
void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, WebCore::ScrollIsAnimated, WebCore::InterruptScrollAnimation);
-@@ -1761,11 +1789,14 @@ public:
+@@ -1786,6 +1815,9 @@ public:
+
+ void backForwardRemovedItem(WebCore::BackForwardFrameItemIdentifier);
+
++ // Playwright: true while the inspector input agent is dispatching synthetic mouse input.
++ void setSimulatingUserInput(bool);
++
+ #if ENABLE(DRAG_SUPPORT)
+ // Drag and drop support.
+ void dragEntered(WebCore::DragData&, const String& dragStorageName = String());
+@@ -1798,11 +1830,14 @@ public:
void didStartDrag(const std::optional<WebCore::FrameIdentifier>& = std::nullopt);
void dragCancelled();
void setDragCaretRect(const WebCore::IntRect&);
@@ -14776,7 +14865,7 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
#endif
#if PLATFORM(GTK) || PLATFORM(WPE)
void startDrag(WebCore::SelectionData&&, OptionSet<WebCore::DragOperation>, std::optional<WebCore::ShareableBitmapHandle>&& dragImage, WebCore::IntPoint&& dragImageHotspot);
-@@ -1773,6 +1804,9 @@ public:
+@@ -1810,6 +1845,9 @@ public:
#if ENABLE(MODEL_PROCESS)
void modelDragEnded(const WebCore::NodeIdentifier);
#endif
@@ -14786,15 +14875,15 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
#endif
void processDidBecomeUnresponsive(WebProcessProxy&);
-@@ -2036,6 +2070,7 @@ public:
+@@ -2073,6 +2111,7 @@ public:
void setViewportSizeForCSSViewportUnits(const WebCore::FloatSize&);
WebCore::FloatSize NODELETE viewportSizeForCSSViewportUnits() const;
-+ bool shouldSendAutomationCredentialsForProtectionSpace(const WebProtectionSpace&);
++ std::optional<WebCore::Credential> automationCredentialsForProtectionSpace(const WebProtectionSpace&);
void didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&&, NegotiatedLegacyTLS);
void negotiatedLegacyTLS();
void didNegotiateModernTLS(const URL&);
-@@ -2069,6 +2104,8 @@ public:
+@@ -2106,6 +2145,8 @@ public:
// TODO Replace RefPtr with Expected for error reporting https://webkit.org/b/300271
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&);
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&, ForceSoftwareCapturingViewportSnapshot);
@@ -14803,15 +14892,7 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
#endif
void serializeAndWrapCryptoKey(IPC::Connection&, WebCore::CryptoKeyData&&, CompletionHandler<void(std::optional<Vector<uint8_t>>&&)>&&);
-@@ -3226,6 +3263,7 @@ private:
- RefPtr<API::Navigation> launchProcessForReload();
-
- void requestNotificationPermission(const String& originString, CompletionHandler<void(bool allowed)>&&);
-+ std::optional<bool> permissionForAutomation(const String& origin, const String& permission) const;
-
- #if ENABLE(WEB_ARCHIVE)
- bool NODELETE shouldAlwaysPromptForPermission(WebCore::PermissionName) const;
-@@ -3789,11 +3827,13 @@ private:
+@@ -3834,11 +3875,13 @@ private:
String m_openedMainFrameName;
RefPtr<WebInspectorUIProxy> m_inspector;
@@ -14825,7 +14906,16 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
std::unique_ptr<API::FullscreenClient> m_fullscreenClient;
#endif
-@@ -4000,6 +4040,22 @@ private:
+@@ -4053,12 +4096,31 @@ private:
+
+ bool m_mainFrameHasCustomContentProvider { false };
+
++ // Playwright: true while the inspector input agent is dispatching synthetic mouse input.
++ bool m_simulatingUserInput { false };
++
+ #if ENABLE(DRAG_SUPPORT)
+ // Current drag destination details are delivered as an asynchronous response,
+ // so we preserve them to be used when the next dragging delegate call is made.
std::optional<WebCore::DragOperation> m_currentDragOperation;
bool m_currentDragIsOverFileInput { false };
unsigned m_currentDragNumberOfFilesToBeAccepted { 0 };
@@ -14848,12 +14938,11 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
#endif
bool m_mainFrameHasHorizontalScrollbar { false };
-@@ -4167,6 +4223,11 @@ private:
+@@ -4226,6 +4288,10 @@ private:
RefPtr<API::Object> messageBody;
};
Vector<InjectedBundleMessage> m_pendingInjectedBundleMessages;
-+ std::optional<WebCore::Credential> m_credentialsForAutomation;
-+ std::optional<URL> m_authOriginForAutomation;
++ std::optional<Vector<std::pair<WebCore::Credential, std::optional<URL>>>> m_credentialsForAutomation;
+ UncheckedKeyHashMap<String, HashSet<String>> m_permissionsForAutomation;
+ std::optional<int> m_deviceOrientationOverride;
+ std::optional<bool> m_activeForAutomation;
@@ -14861,7 +14950,7 @@ index fc916a39ed7e220e7dc715609ce30d8c0d0ce729..747653a1589a83cbf0aaa4c2b2c912e8
#if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION)
RefPtr<WebDeviceOrientationUpdateProviderProxy> m_webDeviceOrientationUpdateProviderProxy;
diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in
-index 98ac446552a0ba482be6f18ea8c5d1d4cab62d24..52ea072824d6b97bfe58e311b93a0237d03cf566 100644
+index ca384b5fa1733bf2fa53cf0c5bf2c966ad6a1ccf..65f90ba82dc6aa18a4230053afbb6ac0cfbc3977 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in
@@ -35,6 +35,7 @@ messages -> WebPageProxy {
@@ -14870,9 +14959,9 @@ index 98ac446552a0ba482be6f18ea8c5d1d4cab62d24..52ea072824d6b97bfe58e311b93a0237
MouseDidMoveOverElement(struct WebKit::WebHitTestResultData hitTestResultData, OptionSet<WebKit::WebEventModifier> modifiers)
+ LogToStderr(String text)
- DidReceiveEventIPC(enum:uint32_t WebKit::WebEventType eventType, bool handled, struct std::optional<WebCore::RemoteUserInputEventData> remoteUserInputEventData)
SetCursor(WebCore::Cursor cursor)
-@@ -365,6 +366,10 @@ messages -> WebPageProxy {
+ SetCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
+@@ -363,6 +364,10 @@ messages -> WebPageProxy {
StartDrag(WebCore::SelectionData selectionData, OptionSet<WebCore::DragOperation> dragOperationMask, std::optional<WebCore::ShareableBitmapHandle> dragImage, WebCore::IntPoint dragImageHotspot)
#endif
@@ -14899,10 +14988,10 @@ index 81a690dd2023557c4b2f26a367c0dd8c86a795bd..c18c6cba370f510a44a2bee0876188f7
}
diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp
-index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131be23095a 100644
+index 6fae21fdb83d05bd3555e37a5705ed87b4bfa157..4929a99ce4e0d5768c5eea9653c30056d6bf33bd 100644
--- a/Source/WebKit/UIProcess/WebProcessPool.cpp
+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp
-@@ -428,10 +428,10 @@ void WebProcessPool::setAutomationClient(std::unique_ptr<API::AutomationClient>&
+@@ -427,10 +427,10 @@ void WebProcessPool::setAutomationClient(std::unique_ptr<API::AutomationClient>&
void WebProcessPool::setOverrideLanguages(Vector<String>&& languages)
{
@@ -14915,7 +15004,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
#if ENABLE(GPU_PROCESS)
if (RefPtr gpuProcess = GPUProcessProxy::singletonIfCreated())
-@@ -439,9 +439,10 @@ void WebProcessPool::setOverrideLanguages(Vector<String>&& languages)
+@@ -438,9 +438,10 @@ void WebProcessPool::setOverrideLanguages(Vector<String>&& languages)
#endif
#if USE(SOUP)
for (Ref networkProcess : NetworkProcessProxy::allNetworkProcesses())
@@ -14927,7 +15016,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
void WebProcessPool::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
{
-@@ -987,7 +988,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
+@@ -996,7 +997,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
#endif
parameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel();
@@ -14936,7 +15025,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
LOG_WITH_STREAM(Language, stream << "WebProcessPool is initializing a new web process with overrideLanguages: " << parameters.overrideLanguages);
parameters.urlSchemesRegisteredAsSecure = copyToVector(LegacyGlobalSettings::singleton().schemesToRegisterAsSecure());
-@@ -1069,7 +1070,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
+@@ -1079,7 +1080,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
if (!injectedBundleInitializationUserData)
injectedBundleInitializationUserData = m_injectedBundleInitializationUserData;
parameters.initializationUserData = UserData(process.transformObjectsToHandles(injectedBundleInitializationUserData.get()));
@@ -14945,7 +15034,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
if (websiteDataStore)
parameters.websiteDataStoreParameters = webProcessDataStoreParameters(process, *websiteDataStore);
-@@ -1163,14 +1164,14 @@ void WebProcessPool::processDidFinishLaunching(WebProcessProxy& process)
+@@ -1173,14 +1174,14 @@ void WebProcessPool::processDidFinishLaunching(WebProcessProxy& process)
// Sometimes the memorySampler gets initialized after process initialization has happened but before the process has finished launching
// so check if it needs to be started here
if (m_memorySamplerEnabled) {
@@ -14962,7 +15051,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
process.send(Messages::WebProcess::StartMemorySampler(WTF::move(sampleLogSandboxHandle), sampleLogFilePath, m_memorySamplerInterval), 0);
}
-@@ -1342,6 +1343,12 @@ Ref<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, Ref<API:
+@@ -1352,6 +1353,12 @@ Ref<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, Ref<API:
auto enhancedSecurity = (protect(pageConfiguration->preferences())->forceEnhancedSecurity() || pageConfiguration->isEnhancedSecurityEnabled() || useEnhancedSecurityFallback) ? EnhancedSecurity::EnabledPolicy : EnhancedSecurity::Disabled;
RefPtr relatedPage = pageConfiguration->relatedPage();
@@ -14975,7 +15064,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
bool siteIsolationEnabled = protect(pageConfiguration->preferences())->siteIsolationEnabled();
if (siteIsolationEnabled) {
Ref<WebPreferences> preferences = pageConfiguration->preferences();
-@@ -1379,9 +1386,9 @@ Ref<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, Ref<API:
+@@ -1389,9 +1396,9 @@ Ref<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, Ref<API:
}
Ref userContentController = pageConfiguration->userContentController();
@@ -14987,7 +15076,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
process->setAllowTestOnlyIPC(pageConfiguration->allowTestOnlyIPC());
auto page = process->createWebPage(pageClient, WTF::move(pageConfiguration));
-@@ -1762,18 +1769,18 @@ void WebProcessPool::setEnhancedAccessibility(bool flag)
+@@ -1772,18 +1779,18 @@ void WebProcessPool::setEnhancedAccessibility(bool flag)
{
sendToAllProcesses(Messages::WebProcess::SetEnhancedAccessibility(flag));
}
@@ -15010,7 +15099,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
for (auto& process : m_processes) {
if (!process->canSendMessage())
continue;
-@@ -1792,10 +1799,10 @@ void WebProcessPool::startMemorySampler(const double interval)
+@@ -1802,10 +1809,10 @@ void WebProcessPool::startMemorySampler(const double interval)
}
void WebProcessPool::stopMemorySampler()
@@ -15023,7 +15112,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
// For UIProcess
#if ENABLE(MEMORY_SAMPLER)
WebMemorySampler::singleton()->stop();
-@@ -1847,7 +1854,7 @@ void WebProcessPool::setAutomationSession(RefPtr<WebAutomationSession>&& automat
+@@ -1857,7 +1864,7 @@ void WebProcessPool::setAutomationSession(RefPtr<WebAutomationSession>&& automat
{
if (RefPtr previousSession = m_automationSession)
previousSession->setProcessPool(nullptr);
@@ -15032,7 +15121,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
m_automationSession = WTF::move(automationSession);
#if ENABLE(REMOTE_INSPECTOR)
-@@ -2438,7 +2445,7 @@ std::tuple<Ref<WebProcessProxy>, RefPtr<SuspendedPageProxy>, ASCIILiteral> WebPr
+@@ -2458,7 +2465,7 @@ std::tuple<Ref<WebProcessProxy>, RefPtr<SuspendedPageProxy>, ASCIILiteral> WebPr
}
auto reason = "Navigation is cross-site"_s;
@@ -15041,7 +15130,7 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
if (m_configuration->alwaysKeepAndReuseSwappedProcesses()) {
LOG(ProcessSwapping, "(ProcessSwapping) Considering re-use of a previously cached process for domain %s", targetSite.domain().string().utf8().data());
-@@ -2543,7 +2550,7 @@ void WebProcessPool::setDomainsWithUserInteraction(HashSet<WebCore::RegistrableD
+@@ -2563,7 +2570,7 @@ void WebProcessPool::setDomainsWithUserInteraction(HashSet<WebCore::RegistrableD
}
void WebProcessPool::setDomainsWithCrossPageStorageAccess(HashMap<TopFrameDomain, Vector<SubResourceDomain>>&& domains, CompletionHandler<void()>&& completionHandler)
@@ -15051,10 +15140,10 @@ index 7eb5a50ca22231a40f554b4ed88b063e18777654..18eaefd6ae145dd3918e9cc00c1b8131
for (Ref process : borrow(this->processes()).get())
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp
-index 4cb137d51b39aeb46c2b61218f5df9d73f920dac..237b21ea3cb10b0f36898080439a374dc4f0256b 100644
+index 89f2dd04761e114c918a8b09325c1535d8176008..8330f97a31acc5f3c397a0bee20067fdeb8a80f1 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp
-@@ -216,6 +216,11 @@ Vector<Ref<WebProcessProxy>> WebProcessProxy::allProcesses()
+@@ -224,6 +224,11 @@ Vector<Ref<WebProcessProxy>> WebProcessProxy::allProcesses()
});
}
@@ -15066,7 +15155,7 @@ index 4cb137d51b39aeb46c2b61218f5df9d73f920dac..237b21ea3cb10b0f36898080439a374d
RefPtr<WebProcessProxy> WebProcessProxy::processForIdentifier(ProcessIdentifier identifier)
{
return allProcessMap().get(identifier);
-@@ -595,6 +600,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt
+@@ -603,6 +608,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt
if (WebKit::isInspectorProcessPool(processPool()))
launchOptions.extraInitializationData.add<HashTranslatorASCIILiteral>("inspector-process"_s, "1"_s);
@@ -15094,10 +15183,10 @@ index 4cb137d51b39aeb46c2b61218f5df9d73f920dac..237b21ea3cb10b0f36898080439a374d
if (isPrewarmed())
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h
-index df560e2b0fd58e4a58d709d9bbc77b3240c3a10e..8cc41f2747d229fffc6c1d566b0086e294c73735 100644
+index 6f18fdbd312a5664b69d4c074732402ef5d5c20e..12a00ca9644249d5aa567eeacdcd4d37801b9ca2 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.h
+++ b/Source/WebKit/UIProcess/WebProcessProxy.h
-@@ -212,6 +212,8 @@ public:
+@@ -213,6 +213,8 @@ public:
void addAllowedFirstPartyForCookies(const WebCore::RegistrableDomain&, LoadedWebArchive);
const std::pair<LoadedWebArchive, HashSet<WebCore::RegistrableDomain>>& allowedFirstPartiesForCookiesData() const { return m_allowedFirstPartiesForCookies; }
@@ -15107,7 +15196,7 @@ index df560e2b0fd58e4a58d709d9bbc77b3240c3a10e..8cc41f2747d229fffc6c1d566b0086e2
unsigned suspendedPageCount() const;
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-index 4cbf31a5842ab9fdda6c95d9eb929153c6d49dc7..ec8d77c5306a079bd30b51d538f154b25e73e4a2 100644
+index 1263f3a601eb3624c186039bc614da5354f87391..16fbc50bb2c03f18112c7fc613223257e4e88836 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
@@ -316,15 +316,10 @@ SOAuthorizationCoordinator& WebsiteDataStore::soAuthorizationCoordinator(const W
@@ -15129,7 +15218,7 @@ index 4cbf31a5842ab9fdda6c95d9eb929153c6d49dc7..ec8d77c5306a079bd30b51d538f154b2
#else
UNUSED_PARAM(sessionID);
return NetworkProcessProxy::ensureDefaultNetworkProcess();
-@@ -2119,6 +2114,15 @@ void WebsiteDataStore::setCacheModelSynchronouslyForTesting(CacheModel cacheMode
+@@ -2123,6 +2118,15 @@ void WebsiteDataStore::setCacheModelSynchronouslyForTesting(CacheModel cacheMode
processPool->setCacheModelSynchronouslyForTesting(cacheModel);
}
@@ -15145,7 +15234,7 @@ index 4cbf31a5842ab9fdda6c95d9eb929153c6d49dc7..ec8d77c5306a079bd30b51d538f154b2
Vector<WebsiteDataStoreParameters> WebsiteDataStore::parametersFromEachWebsiteDataStore()
{
return WTF::map(allDataStores(), [](auto& entry) {
-@@ -2550,6 +2554,12 @@ void WebsiteDataStore::lastPageLoadNetworkActivityCompletionCodeForTesting(WebCo
+@@ -2553,6 +2557,12 @@ void WebsiteDataStore::lastPageLoadNetworkActivityCompletionCodeForTesting(WebCo
protect(networkProcess())->lastPageLoadNetworkActivityCompletionCodeForTesting(m_sessionID, pageID, WTF::move(completionHandler));
}
@@ -15159,7 +15248,7 @@ index 4cbf31a5842ab9fdda6c95d9eb929153c6d49dc7..ec8d77c5306a079bd30b51d538f154b2
void WebsiteDataStore::hasAppBoundSession(CompletionHandler<void(bool)>&& completionHandler) const
{
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
-index 948c89fc30236146c2faea29f2ea8b2842963406..bc667cd080b1ba3f6710a7d40d0bbc497fdd02c4 100644
+index bd81bd628ec7c6b91229c32d69ab568ac6f63ab2..47f98a84830e3649c4cff14e869b6f9f881b6347 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
@@ -103,6 +103,7 @@ class DeviceIdHashSaltStorage;
@@ -15517,10 +15606,10 @@ index 0000000000000000000000000000000000000000..bd30f58d2d4afe85060eabf3bb178c20
+
diff --git a/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..e5a8e68580d8ba7ad968d1736220793711214988
+index 0000000000000000000000000000000000000000..506a63c735b23f9a149093908a24ad23f5ee41d9
--- /dev/null
+++ b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp
-@@ -0,0 +1,165 @@
+@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -15562,6 +15651,7 @@ index 0000000000000000000000000000000000000000..e5a8e68580d8ba7ad968d17362207937
+#include "WebPageProxy.h"
+#include <wtf/HashMap.h>
+#include <wtf/RefPtr.h>
++#include <wtf/glib/GSpanExtras.h>
+#include <wtf/text/Base64.h>
+#include <wtf/text/StringView.h>
+#include <wtf/text/WTFString.h>
@@ -15576,7 +15666,8 @@ index 0000000000000000000000000000000000000000..e5a8e68580d8ba7ad968d17362207937
+
+ settings.mode = WebCore::SoupNetworkProxySettings::Mode::Custom;
+ settings.defaultProxyURL = proxyServer.utf8();
-+ settings.ignoreHosts.reset(g_strdupv(const_cast<char**>(ignoreHosts)));
++ for (auto* host : span(ignoreHosts))
++ settings.ignoreHosts.append(CString(host));
+ return settings;
+}
+
@@ -15879,10 +15970,10 @@ index 0000000000000000000000000000000000000000..4412881043189ba16e7803eeab98bce5
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/gtk/SystemSettingsManagerProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/SystemSettingsManagerProxyGtk.cpp
-index ed7f7adafd75f27ce458324b50144b28fb225565..3864cd324b918f97283a7d99dad753c84e3cb748 100644
+index 727bbc4bf31a2180cad3aa7a7db404ab1cc6d3ac..10ac5a93084e2a196829dedccb5178ac080f509b 100644
--- a/Source/WebKit/UIProcess/gtk/SystemSettingsManagerProxyGtk.cpp
+++ b/Source/WebKit/UIProcess/gtk/SystemSettingsManagerProxyGtk.cpp
-@@ -128,6 +128,8 @@ int SystemSettingsManagerProxy::xftDPI() const
+@@ -143,6 +143,8 @@ int SystemSettingsManagerProxy::xftDPI() const
bool SystemSettingsManagerProxy::followFontSystemSettings() const
{
@@ -16331,7 +16422,7 @@ index 0000000000000000000000000000000000000000..8adbd51bfecad2a273117588bf50f8f7
+
+#endif
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.h b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
-index 8470a55dcac2775b9218e118fa11df2bdbfbf682..6a85bdc22713dc724d92f2ae901e04d12f151e46 100644
+index aad13ea61f394de88a82af1fedebe19ae573b5a5..cf92e824116eebc5d92a53a868648265296ba2fd 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.h
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
@@ -31,9 +31,11 @@
@@ -16365,8 +16456,8 @@ index 8470a55dcac2775b9218e118fa11df2bdbfbf682..6a85bdc22713dc724d92f2ae901e04d1
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) override;
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&, ForceSoftwareCapturingViewportSnapshot) override;
void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
-@@ -233,6 +240,10 @@ private:
- void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame, CompletionHandler<void()>&&) override;
+@@ -234,6 +241,10 @@ private:
+ WebCore::IntRect convertMainFrameCoordinatesInFullscreenPlaceholderViewToScreen(WebPageProxy&, WebCore::IntRect) const override;
#endif
+#if ENABLE(TOUCH_EVENTS)
@@ -16377,10 +16468,18 @@ index 8470a55dcac2775b9218e118fa11df2bdbfbf682..6a85bdc22713dc724d92f2ae901e04d1
void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&) override;
void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&) override;
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
-index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054b0fd416e 100644
+index ff04e3aeea13318efffc575992447a6330ab37aa..0fd99f3bf907393489c2109dd7993aa4aac83c8d 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
-@@ -115,6 +115,13 @@ using namespace WebCore;
+@@ -79,6 +79,7 @@
+ #import <WebCore/Image.h>
+ #import <WebCore/KeyboardEvent.h>
+ #import <WebCore/NotImplemented.h>
++#import <WebCore/PlatformPasteboard.h>
+ #import <WebCore/PlatformScreen.h>
+ #import <WebCore/PromisedAttachmentInfo.h>
+ #import <WebCore/SharedBuffer.h>
+@@ -116,6 +117,14 @@ using namespace WebCore;
WTF_MAKE_TZONE_ALLOCATED_IMPL(PageClientImpl);
@@ -16389,12 +16488,13 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
+// static
+void PageClientImpl::setHeadless(bool headless) {
+ _headless = headless;
++ WebCore::PlatformPasteboard::setIsolated(headless);
+}
+
PageClientImpl::PageClientImpl(NSView *view, WKWebView *webView)
: PageClientImplCocoa(webView)
, m_view(view)
-@@ -174,6 +181,9 @@ NSWindow *PageClientImpl::activeWindow() const
+@@ -175,6 +184,9 @@ NSWindow *PageClientImpl::activeWindow() const
bool PageClientImpl::isViewWindowActive()
{
@@ -16404,7 +16504,7 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
RetainPtr activeViewWindow = activeWindow();
return activeViewWindow.get().isKeyWindow || (activeViewWindow && [NSApp keyWindow] == activeViewWindow.get());
-@@ -181,6 +191,9 @@ bool PageClientImpl::isViewWindowActive()
+@@ -182,6 +194,9 @@ bool PageClientImpl::isViewWindowActive()
bool PageClientImpl::isViewFocused()
{
@@ -16414,7 +16514,7 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
// FIXME: This is called from the WebPageProxy constructor before we have a WebViewImpl.
// Once WebViewImpl and PageClient merge, this won't be a problem.
if (CheckedPtr impl = m_impl.get())
-@@ -204,6 +217,9 @@ void PageClientImpl::makeFirstResponder()
+@@ -205,6 +220,9 @@ void PageClientImpl::makeFirstResponder()
bool PageClientImpl::isViewVisible(NSView *view, NSWindow *viewWindow) const
{
@@ -16424,7 +16524,7 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
auto windowIsOccluded = [&]()->bool {
return m_impl && m_impl->windowOcclusionDetectionEnabled() && (viewWindow.occlusionState & NSWindowOcclusionStateVisible) != NSWindowOcclusionStateVisible;
};
-@@ -302,7 +318,8 @@ void PageClientImpl::didRelaunchProcess()
+@@ -303,7 +321,8 @@ void PageClientImpl::didRelaunchProcess()
void PageClientImpl::preferencesDidChange()
{
@@ -16434,7 +16534,7 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
}
void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip)
-@@ -547,6 +564,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
+@@ -548,6 +567,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled)
{
@@ -16443,7 +16543,7 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
protect(m_impl)->doneWithKeyEvent(RetainPtr { event.nativeEvent() }.get(), eventWasHandled);
}
-@@ -566,6 +585,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl
+@@ -567,6 +588,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl
RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page)
{
@@ -16452,7 +16552,7 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
return WebPopupMenuProxyMac::create(m_view.get().get(), protect(page.popupMenuClient()));
}
-@@ -691,6 +712,12 @@ CALayer *PageClientImpl::footerBannerLayer() const
+@@ -692,6 +715,12 @@ CALayer *PageClientImpl::footerBannerLayer() const
return m_impl->footerBannerLayer();
}
@@ -16465,7 +16565,7 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
RefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(std::optional<WebCore::IntRect>&&)
{
return protect(m_impl)->takeViewSnapshot();
-@@ -912,6 +939,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
+@@ -922,6 +951,13 @@ WebCore::IntRect PageClientImpl::convertMainFrameCoordinatesInFullscreenPlacehol
#endif // ENABLE(FULLSCREEN_API)
@@ -16479,7 +16579,7 @@ index 27838ea2c98739c73f4f87057e45d33eee6704fe..95a7b9edbfc95f075600abc32b7ae054
void PageClientImpl::navigationGestureDidBegin()
{
protect(m_impl)->dismissContentRelativeChildWindowsWithAnimation(true);
-@@ -1099,6 +1133,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c
+@@ -1109,6 +1145,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c
bool PageClientImpl::windowIsFrontWindowUnderMouse(const NativeWebMouseEvent& event)
{
@@ -16573,7 +16673,7 @@ index 6cfc616d5492bd12f7516ff2d6a67e77705f42b0..fd2e2a98b1db2c469a7f18fb2b7cbfbd
@interface WKTextAnimationTypeEffectData : NSObject
diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h
-index d063c571127353548110ca306fabf076cae2c966..015f0932a0b9da6888365eb072f7c6d5d048b9bb 100644
+index ab8819cf32865706378b1436982f500b4f9d8c36..36534f655d281de18ce2ddf9d95d7e61995e4a21 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h
@@ -87,6 +87,7 @@ private:
@@ -16585,7 +16685,7 @@ index d063c571127353548110ca306fabf076cae2c966..015f0932a0b9da6888365eb072f7c6d5
bool showAfterPostProcessingContextData();
diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
-index b80415eadff1728127f4d2a97efb45b1f845649d..0ad28207442c018b740f0ded3f72c8620b33e2db 100644
+index a32612f0dc8a0025b4b916840ca9cee3b1ee1553..909739fba159745be448642405256ea27b526772 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
@@ -544,6 +544,12 @@ RetainPtr<NSMenuItem> WebContextMenuProxyMac::createShareMenuItem(ShareMenuItemT
@@ -16802,10 +16902,10 @@ index 0000000000000000000000000000000000000000..c0dbaec1d6a595896498239c0cdd7dcb
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.h b/Source/WebKit/UIProcess/mac/WebViewImpl.h
-index 745b88f688d8901a7a140d8414469e12df69e041..b28ceb988248a4528213c972ded84567480e1e16 100644
+index 510b41441c1c4fba70c461e5ce8662b97b250f38..53b932b1872910082dcdfd683612908791e8bd95 100644
--- a/Source/WebKit/UIProcess/mac/WebViewImpl.h
+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.h
-@@ -40,6 +40,7 @@
+@@ -41,6 +41,7 @@
#include "WKLayoutMode.h"
#include "WebMouseEvent.h"
#include <WebCore/DOMPasteAccess.h>
@@ -16813,7 +16913,7 @@ index 745b88f688d8901a7a140d8414469e12df69e041..b28ceb988248a4528213c972ded84567
#include <WebCore/DigitalCredentialsRequestData.h>
#include <WebCore/FocusDirection.h>
#include <WebCore/HTMLMediaElementIdentifier.h>
-@@ -617,6 +618,9 @@ public:
+@@ -634,6 +635,9 @@ public:
void provideDataForPasteboard(NSPasteboard *, NSString *type);
NSArray *namesOfPromisedFilesDroppedAtDestination(NSURL *dropDestination);
@@ -16824,10 +16924,10 @@ index 745b88f688d8901a7a140d8414469e12df69e041..b28ceb988248a4528213c972ded84567
RefPtr<ViewSnapshot> takeViewSnapshot(ForceSoftwareCapturingViewportSnapshot);
void saveBackForwardSnapshotForCurrentItem();
diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.mm b/Source/WebKit/UIProcess/mac/WebViewImpl.mm
-index 0d8681f20caeee8027af28e5f69ed361601f26a4..a2e410e256779120ba09438dac9065e26c85f765 100644
+index 1da595e5d3869d55fc1cfc8c5045b01cf4516da2..4e225fbda040c04113d06f0e610494592d9acd85 100644
--- a/Source/WebKit/UIProcess/mac/WebViewImpl.mm
+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.mm
-@@ -2649,6 +2649,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
+@@ -2708,6 +2708,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
if (!m_colorSpace)
m_colorSpace = [NSColorSpace sRGBColorSpace];
}
@@ -16839,7 +16939,7 @@ index 0d8681f20caeee8027af28e5f69ed361601f26a4..a2e410e256779120ba09438dac9065e2
ASSERT(m_colorSpace);
return WebCore::DestinationColorSpace { [m_colorSpace CGColorSpace] };
-@@ -5158,6 +5163,17 @@ static RetainPtr<CGImageRef> takeWindowSnapshot(CGSWindowID windowID, bool captu
+@@ -5300,6 +5305,17 @@ static RetainPtr<CGImageRef> takeWindowSnapshot(CGSWindowID windowID, bool captu
return WebCore::cgWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, windowID, imageOptions);
}
@@ -17314,10 +17414,10 @@ index f3beb2f8390b050913bcb8111c50ced57194c98f..7011eae4d384e0d459bef82bf92099bc
if (m_page && m_page->drawingArea()) {
// FIXME specify correctly layerPosition.
diff --git a/Source/WebKit/UIProcess/wpe/AcceleratedBackingStore.cpp b/Source/WebKit/UIProcess/wpe/AcceleratedBackingStore.cpp
-index 9c642983d668120d8ac35ff9961848c05b6c7d04..0963431a137e83040b42b7aa1cf7d677614bfd1b 100644
+index 22c44ab7d823a4ae8458ff5265fc935361e25e1f..1ffc82a4597eb151b100f91b12e1bdc2913b41c0 100644
--- a/Source/WebKit/UIProcess/wpe/AcceleratedBackingStore.cpp
+++ b/Source/WebKit/UIProcess/wpe/AcceleratedBackingStore.cpp
-@@ -231,7 +231,7 @@ static Expected<SkImageInfo, String> getImageInfoFromBuffer(const GRefPtr<WPEBu
+@@ -229,7 +229,7 @@ static Expected<SkImageInfo, String> getImageInfoFromBuffer(const GRefPtr<WPEBu
return makeUnexpected("Failed to extract snapshot pixel information"_s);
}
@@ -17326,7 +17426,7 @@ index 9c642983d668120d8ac35ff9961848c05b6c7d04..0963431a137e83040b42b7aa1cf7d677
{
GUniqueOutPtr<GError> error;
GBytes* pixels = wpe_buffer_import_to_pixels(buffer.get(), &error.outPtr());
-@@ -249,33 +249,39 @@ static Expected<Ref<ViewSnapshot>, String> saveBufferSnapshot(const GRefPtr<WPEB
+@@ -247,33 +247,39 @@ static Expected<Ref<ViewSnapshot>, String> saveBufferSnapshot(const GRefPtr<WPEB
if (!info)
return makeUnexpected(info.error());
@@ -17938,7 +18038,7 @@ index 9b688ad328317fea4fd96ce66e9714bad8f0f937..402a36a9c565e13ec298aa7f014f0d92
} // namespace WebKit
diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546b1902948 100644
+index 096c342935ff2c88254cc80d5e5f3ff3e8c3cc59..b1d264ecd70d2640e5689c5a9b415dc16f82a3a3 100644
--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -1581,6 +1581,7 @@
@@ -17949,7 +18049,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
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 */; };
-@@ -2416,6 +2417,18 @@
+@@ -2426,6 +2427,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 */; };
@@ -17968,7 +18068,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
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, ); }; };
-@@ -2523,6 +2536,8 @@
+@@ -2532,6 +2545,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 */; };
@@ -17977,7 +18077,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
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 */; };
-@@ -2571,6 +2586,8 @@
+@@ -2577,6 +2592,8 @@
F3EEEE592DB318270038CC1D /* BidiBrowserAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F3EEEE572DB318270038CC1D /* BidiBrowserAgent.h */; };
F3EEEE5A2DB318270038CC1D /* BidiBrowserAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3EEEE582DB318270038CC1D /* BidiBrowserAgent.cpp */; };
F404455C2D5CFB56000E587E /* AppKitSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = F404455A2D5CFB56000E587E /* AppKitSoftLink.h */; };
@@ -17986,7 +18086,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
F40C3B712AB401C5007A3567 /* WKDatePickerPopoverController.h in Headers */ = {isa = PBXBuildFile; fileRef = F40C3B6F2AB40167007A3567 /* WKDatePickerPopoverController.h */; };
F41145682CD939E0004CDBD1 /* _WKTouchEventGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = F41145652CD939E0004CDBD1 /* _WKTouchEventGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
-@@ -6773,6 +6790,7 @@
+@@ -6762,6 +6779,7 @@
5CABDC8522C40FCC001EDE8E /* WKMessageListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMessageListener.h; sourceTree = "<group>"; };
5CABE07A28F60E8A00D83FD9 /* WebPushMessage.serialization.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebPushMessage.serialization.in; sourceTree = "<group>"; };
5CADDE0D2151AA010067D309 /* AuthenticationChallengeDisposition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallengeDisposition.h; sourceTree = "<group>"; };
@@ -17994,7 +18094,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
5CAECB5E27465AE300AB78D0 /* UnifiedSource115.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource115.cpp; sourceTree = "<group>"; };
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 = "<group>"; };
-@@ -8631,6 +8649,19 @@
+@@ -8628,6 +8646,19 @@
DF0C5F24252ECB8D00D921DB /* WKDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownload.h; sourceTree = "<group>"; };
DF0C5F25252ECB8E00D921DB /* WKDownloadInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownloadInternal.h; sourceTree = "<group>"; };
DF0C5F26252ECB8E00D921DB /* WKDownloadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDownloadDelegate.h; sourceTree = "<group>"; };
@@ -18014,7 +18114,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
DF462E0E23F22F5300EFF35F /* WKHTTPCookieStorePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHTTPCookieStorePrivate.h; sourceTree = "<group>"; };
DF462E1123F338AD00EFF35F /* WKContentWorldPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentWorldPrivate.h; sourceTree = "<group>"; };
DF58C6311371AC5800F9A37C /* NativeWebWheelEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebWheelEvent.h; sourceTree = "<group>"; };
-@@ -8828,6 +8859,8 @@
+@@ -8831,6 +8862,8 @@
E5CBA76127A3187900DF7858 /* UnifiedSource118.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource118.cpp; sourceTree = "<group>"; };
E5CBA76227A3187900DF7858 /* UnifiedSource117.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource117.cpp; sourceTree = "<group>"; };
E5CBA76327A3187B00DF7858 /* UnifiedSource116.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource116.cpp; sourceTree = "<group>"; };
@@ -18023,7 +18123,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
E5DEFA6726F8F42600AB68DB /* PhotosUISPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotosUISPI.h; sourceTree = "<group>"; };
E838FCAF2DE90BF800703353 /* ISO18013MobileDocumentRequest+Extras.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ISO18013MobileDocumentRequest+Extras.swift"; sourceTree = "<group>"; };
E88885662DC914C400C572B8 /* WKISO18013Request.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKISO18013Request.h; sourceTree = "<group>"; };
-@@ -8894,6 +8927,9 @@
+@@ -8896,6 +8929,9 @@
F404455A2D5CFB56000E587E /* AppKitSoftLink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitSoftLink.h; sourceTree = "<group>"; };
F404455B2D5CFB56000E587E /* AppKitSoftLink.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppKitSoftLink.mm; sourceTree = "<group>"; };
F4063DDE2D71481E00F3FE6E /* LLVMProfiling.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LLVMProfiling.h; sourceTree = "<group>"; };
@@ -18033,7 +18133,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDragDestinationAction.h; sourceTree = "<group>"; };
F40C3B6F2AB40167007A3567 /* WKDatePickerPopoverController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKDatePickerPopoverController.h; sourceTree = "<group>"; };
F40C3B702AB40167007A3567 /* WKDatePickerPopoverController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WKDatePickerPopoverController.mm; sourceTree = "<group>"; };
-@@ -9431,6 +9467,7 @@
+@@ -9433,6 +9469,7 @@
3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */,
3766F9F1189A1254003CF19B /* libicucore.dylib in Frameworks */,
7B9FC5BB28A5233B007570E7 /* libWebKitPlatform.a in Frameworks */,
@@ -18041,7 +18141,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */,
37694525184FC6B600CDE21F /* Security.framework in Frameworks */,
37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */,
-@@ -12806,6 +12843,7 @@
+@@ -12795,6 +12832,7 @@
990D28AF1C65203900986977 /* _WKAutomationSessionInternal.h */,
BC35BB81026B48A6A3BDAA80 /* _WKAutomationSessionPrivateForTesting.h */,
A197A4B2903C423281A84E16 /* _WKAutomationSessionTesting.mm */,
@@ -18049,7 +18149,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
5C4609E222430E4C009943C2 /* _WKContentRuleListAction.h */,
5C4609E322430E4D009943C2 /* _WKContentRuleListAction.mm */,
5C4609E422430E4D009943C2 /* _WKContentRuleListActionInternal.h */,
-@@ -14316,6 +14354,7 @@
+@@ -14632,6 +14670,7 @@
E34B110C27C46BC6006D2F2E /* libWebCoreTestShim.dylib */,
E34B110F27C46D09006D2F2E /* libWebCoreTestSupport.dylib */,
DDE992F4278D06D900F60D26 /* libWebKitAdditions.a */,
@@ -18057,8 +18157,8 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
57A9FF15252C6AEF006A2040 /* libWTF.a */,
5750F32A2032D4E500389347 /* LocalAuthentication.framework */,
570DAAB0230273D200E8FC04 /* NearField.framework */,
-@@ -14918,6 +14957,8 @@
- children = (
+@@ -15237,6 +15276,8 @@
+ AA10570002 /* InspectorStorageAgent.h */,
9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */,
9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */,
+ F3867F0324607D2B008F0F31 /* InspectorScreencastAgent.cpp */,
@@ -18066,7 +18166,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
D2CB01DAB4428B76CDA8AECC /* ProxyingNetworkAgent.cpp */,
EB43329193327F9D842EE004 /* ProxyingNetworkAgent.h */,
35541583DC2A3C24CD8C2D87 /* ProxyingNetworkAgent.messages.in */,
-@@ -15745,6 +15786,7 @@
+@@ -16066,6 +16107,7 @@
E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */,
46A2B6061E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.cpp */,
46A2B6071E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.h */,
@@ -18074,7 +18174,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
5C6D69352AC3935D0099BDAF /* BrowsingContextGroup.cpp */,
5C6D69362AC3935D0099BDAF /* BrowsingContextGroup.h */,
5CA98549210BEB5A0057EB6B /* BrowsingWarning.h */,
-@@ -15775,6 +15817,8 @@
+@@ -16096,6 +16138,8 @@
BC06F43912DBCCFB002D78DE /* GeolocationPermissionRequestProxy.cpp */,
BC06F43812DBCCFB002D78DE /* GeolocationPermissionRequestProxy.h */,
2DD5A72A1EBF09A7009BA597 /* HiddenPageThrottlingAutoIncreasesCounter.h */,
@@ -18083,7 +18183,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
5CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */,
5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */,
31607F3819627002009B87DA /* LegacySessionStateCoding.h */,
-@@ -15805,6 +15849,7 @@
+@@ -16126,6 +16170,7 @@
4683569B21E81CC7006E27A3 /* ProvisionalPageProxy.cpp */,
4683569A21E81CC7006E27A3 /* ProvisionalPageProxy.h */,
411B89CB27B2B89600F9EBD3 /* QueryPermissionResultCallback.h */,
@@ -18091,7 +18191,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
5CCB54DC2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.cpp */,
5CCB54DB2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.h */,
FABBBC802D35AC6800820017 /* RemotePageFullscreenManagerProxy.cpp */,
-@@ -15930,6 +15975,8 @@
+@@ -16253,6 +16298,8 @@
BC7B6204129A0A6700D174A4 /* WebPageGroup.h */,
2D9EA3101A96D9EB002D2807 /* WebPageInjectedBundleClient.cpp */,
2D9EA30E1A96CBFF002D2807 /* WebPageInjectedBundleClient.h */,
@@ -18100,7 +18200,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
9B7F8A502C785725000057F3 /* WebPageLoadTiming.h */,
BC111B0B112F5E4F00337BAB /* WebPageProxy.cpp */,
BC032DCB10F4389F0058C15A /* WebPageProxy.h */,
-@@ -16124,6 +16171,7 @@
+@@ -16445,6 +16492,7 @@
BC646C1911DD399F006455B0 /* WKBackForwardListItemRef.h */,
BC646C1611DD399F006455B0 /* WKBackForwardListRef.cpp */,
BC646C1711DD399F006455B0 /* WKBackForwardListRef.h */,
@@ -18108,7 +18208,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
BCB9E24A1120E15C00A137E0 /* WKContext.cpp */,
BCB9E2491120E15C00A137E0 /* WKContext.h */,
1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */,
-@@ -16707,8 +16755,11 @@
+@@ -17026,8 +17074,11 @@
B878B613133428DC006888E9 /* CorrectionPanel.h */,
B878B614133428DC006888E9 /* CorrectionPanel.mm */,
7AFA6F682A9F57C50055322A /* DisplayLinkMac.cpp */,
@@ -18117,10 +18217,10 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
0FCB4E5818BBE3D9000FCFC9 /* PageClientImplMac.h */,
0FCB4E5918BBE3D9000FCFC9 /* PageClientImplMac.mm */,
+ D79902AF236E9404005D6F7E /* PageInspectorTargetProxyMac.mm */,
+ 33F1A0112FEFB66B00BD5D70 /* PositionInformationManager.cpp */,
+ 33F1A0102FEFB66B00BD5D70 /* PositionInformationManager.h */,
E18E6909169B563F009B6670 /* SecItemShimProxy.cpp */,
- E18E690A169B563F009B6670 /* SecItemShimProxy.h */,
- E18E690D169B57DF009B6670 /* SecItemShimProxy.messages.in */,
-@@ -16728,6 +16779,8 @@
+@@ -17049,6 +17100,8 @@
E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */,
E55CD20124D09F1F0042DB9C /* WebDateTimePickerMac.h */,
E55CD20224D09F1F0042DB9C /* WebDateTimePickerMac.mm */,
@@ -18129,7 +18229,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */,
BC5750951268F3C6006F0F12 /* WebPopupMenuProxyMac.h */,
BC5750961268F3C6006F0F12 /* WebPopupMenuProxyMac.mm */,
-@@ -17890,6 +17943,7 @@
+@@ -17891,6 +17944,7 @@
990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */,
990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */,
C4450D54570C4383A25745E6 /* _WKAutomationSessionPrivateForTesting.h in Headers */,
@@ -18137,7 +18237,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
CD89ACBD2EA696A300C76423 /* _WKCaptionStyleMenuController.h in Headers */,
97C476282ECD33A6004D1492 /* _WKCaptionStyleMenuControllerInternal.h in Headers */,
5C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */,
-@@ -18208,6 +18262,7 @@
+@@ -18207,6 +18261,7 @@
E164A2F2191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h in Headers */,
E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */,
1A5705111BE410E600874AF1 /* BlockSPI.h in Headers */,
@@ -18145,7 +18245,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
5CA9854A210BEB640057EB6B /* BrowsingWarning.h in Headers */,
A7E69BCC2B2117A100D43D3F /* BufferAndBackendInfo.h in Headers */,
BC3065FA1259344E00E71278 /* CacheModel.h in Headers */,
-@@ -18416,8 +18471,12 @@
+@@ -18415,8 +18470,12 @@
BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */,
CE550E152283752200D28791 /* InsertTextOptions.h in Headers */,
9197940523DBC4BB00257892 /* InspectorBrowserAgent.h in Headers */,
@@ -18166,7 +18266,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */,
2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */,
5F4D67D682584880B7E5A569 /* RemoteLayerTreeCommitBundle.h in Headers */,
-@@ -19157,6 +19217,8 @@
+@@ -19155,6 +19215,8 @@
939EF87029D112EE00F23AEE /* WebPageInlines.h in Headers */,
9197940823DBC4CB00257892 /* WebPageInspectorAgentBase.h in Headers */,
A513F5402154A5D700662841 /* WebPageInspectorController.h in Headers */,
@@ -18175,7 +18275,7 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
C0CE72A11247E71D00BC0EC4 /* WebPageMessages.h in Headers */,
2D5C9D0619C81D8F00B3C5C1 /* WebPageOverlay.h in Headers */,
939EF86F29D0C17300F23AEE /* WebPageProxy.h in Headers */,
-@@ -22132,6 +22194,7 @@
+@@ -22134,6 +22196,7 @@
2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */,
2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */,
48E4FD912C91486DA934D031 /* InspectorPassthroughChannel.cpp in Sources */,
@@ -18183,15 +18283,15 @@ index 0d0713ef2e8f97fdb2f64c24cc5e8b88cd8999cc..ce6f1d4c2edc3d992f74c4626b072546
074D6A652F385435006089F6 /* IntRectCG.swift in Sources */,
5CF250AF2EE06491006A7172 /* IPCTesterReceiver.swift in Sources */,
5C448C662EE06E11008931C7 /* IPCTesterReceiverMessageReceiver.swift in Sources */,
-@@ -22151,6 +22214,7 @@
+@@ -22153,6 +22216,7 @@
+ 41E242E026E0C908009A8C64 /* NetworkRTCUtilitiesCocoa.mm in Sources */,
FA5AAE9C2E6A217A00FE693D /* NetworkSoftLink.mm in Sources */,
- EEEEBCBD2EE35A8B000FF6AG /* NSGlassEffectView+Extras.swift in Sources */,
DD4BDE7B2CA38213001A3339 /* ObjectiveCBlockConversions.swift in Sources */,
+ D79902B2236E9404005D6F7E /* PageInspectorTargetProxyMac.mm in Sources */,
1CB9138F2E8C6D500002BCB7 /* PlatformUnifiedSource1-ARC.mm in Sources */,
1CB913932E8C71920002BCB7 /* PlatformUnifiedSource2-ARC.mm in Sources */,
A1B849382F3D9F02004256A1 /* PlaybackSessionInterfaceAVKit.mm in Sources */,
-@@ -22495,6 +22559,8 @@
+@@ -22497,6 +22561,8 @@
078B04A02CF18EAB00B453A6 /* WebPage+NavigationPreferences.swift in Sources */,
071467782DFE84E500F77867 /* WebPage+Transferable.swift in Sources */,
07CB79962CE9435700199C49 /* WebPage.swift in Sources */,
@@ -18232,10 +18332,10 @@ index cc107b48bb95ab2321a32ff37b2e62781113418a..715f3b89f6b7ca255f35093b44afb6bd
WeakRef<WebFrame> m_frame;
std::unique_ptr<UIProcessForwardingFrontendChannel> m_channel;
diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
-index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bbc466d4c0 100644
+index 006dfb944fd18c0b6632cf52589b9c15c9df2ac7..35c69d9d9d562750942f1eaa7ef5218420663b7d 100644
--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
-@@ -273,6 +273,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
+@@ -274,6 +274,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
}
#endif
@@ -18247,7 +18347,7 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
#if ENABLE(PDFJS)
if (tryLoadingUsingPDFJSHandler(resourceLoader, trackingParameters))
return;
-@@ -294,12 +299,16 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
+@@ -295,12 +300,16 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
}
if (InspectorInstrumentationWebKit::shouldInterceptRequest(resourceLoader)) {
@@ -18270,7 +18370,16 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
}
WEBLOADERSTRATEGY_RELEASE_LOG_FORWARDABLE(WebLoaderStrategyScheduleLoad);
-@@ -439,7 +448,7 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadPara
+@@ -380,6 +389,8 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadPara
+ parameters.crossOriginAccessControlCheckEnabled = CrossOriginAccessControlCheckDisabler::singleton().crossOriginAccessControlCheckEnabled();
+ parameters.hadMainFrameMainResourcePrivateRelayed = WebProcess::singleton().hadMainFrameMainResourcePrivateRelayed();
+
++ WebProcess::singleton().applyOverrideLanguagesToRequest(parameters.request);
++
+ if (!frame)
+ return;
+
+@@ -439,7 +450,7 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadPara
parameters.linkPreconnectEarlyHintsEnabled = mainFrame->settings().linkPreconnectEarlyHintsEnabled();
}
@@ -18279,7 +18388,7 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
{
auto identifier = *resourceLoader.identifier();
-@@ -451,10 +460,10 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -451,10 +462,10 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
&& resourceLoader.frameLoader()->notifier().isInitialRequestIdentifier(identifier)
? MainFrameMainResource::Yes : MainFrameMainResource::No;
if (!page->allowsLoadFromURL(request.url(), mainFrameMainResource)) {
@@ -18292,7 +18401,7 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
}
}
-@@ -464,19 +473,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -464,14 +475,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be scheduled with the NetworkProcess with priority %d, storedCredentialsPolicy %i", resourceLoader.url().string().latin1().data(), static_cast<int>(resourceLoader.request().priority()), (int)storedCredentialsPolicy);
@@ -18302,17 +18411,12 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
- trackingParameters.frameID,
- request
- };
-- if (!loadParameters.createSandboxExtensionHandlesIfNecessary()) {
-- RunLoop::mainSingleton().dispatch([resourceLoader = Ref { resourceLoader }, error = blockedError(request)] {
-- resourceLoader->didFail(error);
-- });
-- return;
-- }
+- loadParameters.createSandboxExtensionHandlesIfNecessary();
-
loadParameters.identifier = identifier;
loadParameters.parentPID = legacyPresentingApplicationPID();
loadParameters.contentSniffingPolicy = contentSniffingPolicy;
-@@ -571,14 +567,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -566,11 +569,8 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
if (loadParameters.options.mode != FetchOptions::Mode::Navigate) {
ASSERT(loadParameters.sourceOrigin);
@@ -18325,12 +18429,8 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
+ return false;
}
-- loadParameters.shouldRestrictHTTPResponseAccess = shouldPerformSecurityChecks();
-+ loadParameters.shouldRestrictHTTPResponseAccess = true;
-
loadParameters.isMainFrameNavigation = isMainFrameNavigation;
- if (loadParameters.isMainFrameNavigation && document) {
-@@ -651,6 +644,30 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -644,10 +644,29 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
if (RefPtr handle = resourceLoader.cachedResource())
loadParameters.isInitiatorPrefetch = handle->type() == CachedResource::Type::LinkPrefetch;
@@ -18345,12 +18445,7 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
+ trackingParameters.frameID,
+ request
+ };
-+ if (!loadParameters.createSandboxExtensionHandlesIfNecessary()) {
-+ RunLoop::mainSingleton().dispatch([resourceLoader = Ref { resourceLoader }, error = blockedError(request)] {
-+ resourceLoader->didFail(error);
-+ });
-+ return;
-+ }
++ loadParameters.createSandboxExtensionHandlesIfNecessary();
+
+ if (!fillParametersForNetworkProcessLoad(resourceLoader, request, trackingParameters, shouldClearReferrerOnHTTPSToHTTPRedirect, maximumBufferingTime, loadParameters)) {
+ WEBLOADERSTRATEGY_RELEASE_LOG_ERROR("scheduleLoad: no sourceOrigin (priority=%d)", static_cast<int>(resourceLoader.request().priority()));
@@ -18359,9 +18454,14 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
+ }
+
std::optional<NetworkResourceLoadIdentifier> existingNetworkResourceLoadIdentifierToResume;
- if (loadParameters.isMainFrameNavigation)
+ if (loadParameters.isMainFrameNavigation) {
existingNetworkResourceLoadIdentifierToResume = std::exchange(m_existingNetworkResourceLoadIdentifierToResume, std::nullopt);
-@@ -666,7 +683,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+- if (RefPtr webFrame = WebFrame::webFrame(frame->frameID()))
++ if (RefPtr webFrame = WebFrame::webFrame(trackingParameters.frameID))
+ loadParameters.shouldConsiderEnhancedSecurityForInsecureResponse = webFrame->page() ? webFrame->page()->takeShouldConsiderEnhancedSecurityForInsecureResponseForCurrentNavigation() : false;
+ }
+ WEBLOADERSTRATEGY_RELEASE_LOG_FORWARDABLE(WebLoaderStrategyScheduleLoadResourceScheduledWithNetworkProcess, static_cast<int>(resourceLoader.request().priority()), existingNetworkResourceLoadIdentifierToResume ? existingNetworkResourceLoadIdentifierToResume->toUInt64() : 0);
+@@ -662,7 +681,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
}
auto loader = WebResourceLoader::create(resourceLoader, trackingParameters);
@@ -18370,7 +18470,7 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
}
void WebLoaderStrategy::scheduleInternallyFailedLoad(WebCore::ResourceLoader& resourceLoader)
-@@ -1086,7 +1103,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier
+@@ -1086,7 +1105,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier
bool WebLoaderStrategy::isOnLine() const
{
@@ -18379,7 +18479,7 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
}
void WebLoaderStrategy::addOnlineStateChangeListener(Function<void(bool)>&& listener)
-@@ -1112,6 +1129,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet
+@@ -1112,6 +1131,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet
void WebLoaderStrategy::setOnLineState(bool isOnLine)
{
@@ -18391,7 +18491,7 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
if (m_isOnLine == isOnLine)
return;
-@@ -1120,6 +1142,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)
+@@ -1120,6 +1144,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)
listener(isOnLine);
}
@@ -18405,7 +18505,7 @@ index f9e0b62dc43d4de454a3eaa517a18577883aeb42..4d1c184367fa8e97e1a67b8afe4470bb
{
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 ab7f322fc4e1b340bb0acdc84d4f7ba39a6e0df0..d79aea95dc4e2ead71a161b24c0e1f081fad4404 100644
+index a317b77e961391faba0a3745e560d2285941a20b..1a198ba07e77e19434a0fcfb0b81f94e1b1e1f49 100644
--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h
+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h
@@ -26,6 +26,7 @@
@@ -18426,7 +18526,7 @@ index ab7f322fc4e1b340bb0acdc84d4f7ba39a6e0df0..d79aea95dc4e2ead71a161b24c0e1f08
void setExistingNetworkResourceLoadIdentifierToResume(std::optional<NetworkResourceLoadIdentifier> existingNetworkResourceLoadIdentifierToResume) { m_existingNetworkResourceLoadIdentifierToResume = existingNetworkResourceLoadIdentifierToResume; }
-@@ -166,6 +170,7 @@ private:
+@@ -168,6 +172,7 @@ private:
Vector<Function<void(bool)>> m_onlineStateChangeListeners;
std::optional<NetworkResourceLoadIdentifier> m_existingNetworkResourceLoadIdentifierToResume;
bool m_isOnLine { true };
@@ -18457,11 +18557,23 @@ index 92c407cd8349da4fa94d46a31c39b3935240af61..86e7de852319d854cb3f63b26e90fbcb
return;
}
+diff --git a/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp b/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp
+index d4372e7ad2b4a92660799d2168bda178217cbc6d..ee8fd95b8ab175a3cc68f77f397d8c39a782282f 100644
+--- a/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp
++++ b/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp
+@@ -166,6 +166,7 @@ WebSocketChannel::ConnectStatus WebSocketChannel::connect(const URL& url, const
+ m_inspector.didCreateWebSocket(url);
+ m_url = request->url();
+ m_inspector.willSendWebSocketHandshakeRequest(*request);
++ WebProcess::singleton().applyOverrideLanguagesToRequest(*request);
+ Ref mainFrame = frame->mainFrame();
+
+ Ref policySourceFrame = [&] -> Ref<Frame> {
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-index 2007a79dda001fd64c35715e4f1e7bf125d68679..3ca9f5a101b13fd85ce4a77bde92caf4ef0c1bf8 100644
+index d160f422bd7b97480305149e41348006908f273b..fc0bb66eded4eee92c2a6997409d2340f7212095 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-@@ -504,6 +504,9 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev
+@@ -506,6 +506,9 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev
if (!page)
return;
@@ -18625,7 +18737,7 @@ index a7ad18fc1201e5de2cc1528539a765599ecfc41e..ebea233bc54ab6e56fb7093ff63e2368
WebCookieJar();
diff --git a/Source/WebKit/WebProcess/WebPage/WebFrame.cpp b/Source/WebKit/WebProcess/WebPage/WebFrame.cpp
-index c0fec67356b0c5c39b6c3c81a693029b0ef75723..220a2eaa4a8574a0dbb3d7166bd3cd318b0f50f6 100644
+index 6359126c554e0a49f0a8ea23bdbf2759fc5d57e8..9a0cbc22ceb96d60b32ec04ab4bf8fe3898c2b45 100644
--- a/Source/WebKit/WebProcess/WebPage/WebFrame.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebFrame.cpp
@@ -184,6 +184,9 @@ Ref<WebFrame> WebFrame::createSubframe(WebPage& page, WebFrame& parent, const At
@@ -18639,7 +18751,7 @@ index c0fec67356b0c5c39b6c3c81a693029b0ef75723..220a2eaa4a8574a0dbb3d7166bd3cd31
}
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca1d94ad82 100644
+index c0256ed7d8ee83b928b9d92e0b1e3cb436af758e..170167f2caf76b494fd94b5f38c8af2f0b95dca1 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
@@ -267,6 +267,7 @@
@@ -18650,7 +18762,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
#include <WebCore/JSDOMExceptionHandling.h>
#include <WebCore/JSNode.h>
#include <WebCore/KeyboardEvent.h>
-@@ -1261,6 +1262,14 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
+@@ -1275,6 +1276,14 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
setLinkDecorationFilteringData(WTF::move(parameters.linkDecorationFilteringData));
setAllowedQueryParametersForAdvancedPrivacyProtections(WTF::move(parameters.allowedQueryParametersForAdvancedPrivacyProtections));
#endif
@@ -18665,7 +18777,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
if (parameters.windowFeatures) {
page->applyWindowFeatures(*parameters.windowFeatures);
page->chrome().show();
-@@ -2384,6 +2393,22 @@ void WebPage::loadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, st
+@@ -2420,6 +2429,22 @@ void WebPage::loadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, We
}
}
@@ -18688,7 +18800,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
void WebPage::loadRequest(LoadParameters&& loadParameters)
{
WEBPAGE_RELEASE_LOG_FORWARDABLE(Loading, WebPageLoadRequest, loadParameters.navigationID ? loadParameters.navigationID->toUInt64() : 0, static_cast<unsigned>(loadParameters.shouldTreatAsContinuingLoad), loadParameters.request.isAppInitiated(), loadParameters.existingNetworkResourceLoadIdentifierToResume ? loadParameters.existingNetworkResourceLoadIdentifierToResume->toUInt64() : 0);
-@@ -2578,7 +2603,9 @@ void WebPage::stopLoading()
+@@ -2616,7 +2641,9 @@ void WebPage::stopLoading()
void WebPage::stopLoadingDueToProcessSwap()
{
SetForScope isStoppingLoadingDueToProcessSwap(m_isStoppingLoadingDueToProcessSwap, true);
@@ -18698,7 +18810,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
}
void WebPage::keepBlobURLAliveForNewWindowNavigation(URL&& blobURL, std::optional<SecurityOriginData>&& topOrigin)
-@@ -3180,7 +3207,7 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
+@@ -3217,7 +3244,7 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
#if PLATFORM(IOS_FAMILY)
if (m_viewportConfiguration.setViewportArguments(viewportArguments))
viewportConfigurationChanged();
@@ -18707,7 +18819,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
// Adjust view dimensions when using fixed layout.
RefPtr localMainFrame = this->localMainFrame();
RefPtr view = localMainFrame ? localMainFrame->view() : nullptr;
-@@ -4041,6 +4068,13 @@ void WebPage::flushDeferredIntersectionObservations()
+@@ -4075,6 +4102,13 @@ void WebPage::flushDeferredIntersectionObservations()
protect(corePage())->flushDeferredIntersectionObservations();
}
@@ -18721,7 +18833,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
void WebPage::flushDeferredDidReceiveMouseEvent()
{
if (auto info = std::exchange(m_deferredDidReceiveMouseEvent, std::nullopt))
-@@ -4312,6 +4346,100 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent, CompletionHandler<void
+@@ -4358,6 +4392,100 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent, CompletionHandler<void
completionHandler(touchEvent.type(), handled);
}
@@ -18822,7 +18934,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
#endif
void WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint)
-@@ -4412,6 +4540,16 @@ void WebPage::sendMessageToTargetBackend(const String& message)
+@@ -4458,6 +4586,16 @@ void WebPage::sendMessageToTargetBackend(const String& message)
ensureInspectorTarget()->sendMessageToTargetBackend(message);
}
@@ -18839,7 +18951,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
void WebPage::insertNewlineInQuotedContent()
{
RefPtr frame = corePage()->focusController().focusedOrMainFrame();
-@@ -4654,6 +4792,7 @@ void WebPage::setMainFrameDocumentVisualUpdatesAllowed(bool allowed)
+@@ -4700,6 +4838,7 @@ void WebPage::setMainFrameDocumentVisualUpdatesAllowed(bool allowed)
void WebPage::show()
{
send(Messages::WebPageProxy::ShowPage());
@@ -18847,16 +18959,19 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
}
void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension)
-@@ -5761,7 +5900,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
-
- #if ENABLE(DRAG_SUPPORT)
-
--#if PLATFORM(GTK)
-+#if PLATFORM(GTK) || PLATFORM(WPE)
- void WebPage::performDragControllerAction(DragControllerAction action, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> draggingSourceOperationMask, SelectionData&& selectionData, OptionSet<DragApplicationFlags> flags, CompletionHandler<void(std::optional<DragOperation>, DragHandlingMethod, bool, unsigned, IntRect, IntRect, std::optional<RemoteUserInputEventData>)>&& completionHandler)
- {
- if (!m_page)
-@@ -8150,6 +8289,10 @@ void WebPage::didCommitLoad(WebFrame* frame)
+@@ -6524,7 +6663,10 @@ void WebPage::failedToShowPopupMenu()
+ auto activePopupMenu = std::exchange(m_activePopupMenu, nullptr);
+ if (auto* popupClient = activePopupMenu->client()) {
+ #if PLATFORM(WPE)
+- popupClient->showFallbackPopupMenu();
++ if (isControlledByAutomation())
++ popupClient->popupDidHide();
++ else
++ popupClient->showFallbackPopupMenu();
+ #else
+ popupClient->popupDidHide();
+ #endif
+@@ -8292,6 +8434,10 @@ void WebPage::didCommitLoad(WebFrame* frame)
if (frame && frame->isMainFrame())
m_networkResourceRequestIdentifiersForPageLoadTiming.clear();
@@ -18867,7 +18982,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
}
void WebPage::didFinishDocumentLoad(WebFrame& frame)
-@@ -8453,6 +8596,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(LocalFrame& frame, ResourceReq
+@@ -8587,6 +8733,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(LocalFrame& frame, ResourceReq
m_allowsContentJavaScriptFromMostRecentNavigation = m_internals->pendingWebsitePolicies->allowsContentJavaScript;
WebsitePoliciesData::applyToDocumentLoader(*std::exchange(m_internals->pendingWebsitePolicies, std::nullopt), documentLoader);
}
@@ -18878,7 +18993,7 @@ index 5a600c0a20459f0b90bc5235d81958927ab635f2..5f4da25bd0cd308c0952ff19b55ae0ca
return documentLoader;
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h
-index 28cfe18e24fd74cf652b7fcc417d46ec13017c49..abdb3f70b0cde7217a398b58eb29494571290ff2 100644
+index 40b2ec39ca38624e1ab6364e132cfbec8f69d3a2..318c67107b5c48fecfcc8e8a626b38b7409501dc 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h
@@ -49,6 +49,7 @@
@@ -18889,21 +19004,7 @@ index 28cfe18e24fd74cf652b7fcc417d46ec13017c49..abdb3f70b0cde7217a398b58eb294945
#include <WebCore/PageIdentifier.h>
#include <WebCore/PageOverlay.h>
#include <WebCore/PlatformLayerIdentifier.h>
-@@ -1414,11 +1415,11 @@ public:
- void clearSelection();
- void restoreSelectionInFocusedEditableElement();
-
--#if ENABLE(DRAG_SUPPORT) && PLATFORM(GTK)
-+#if ENABLE(DRAG_SUPPORT) && (PLATFORM(GTK) || PLATFORM(WPE))
- void performDragControllerAction(DragControllerAction, const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, OptionSet<WebCore::DragOperation> draggingSourceOperationMask, WebCore::SelectionData&&, OptionSet<WebCore::DragApplicationFlags>, CompletionHandler<void(std::optional<WebCore::DragOperation>, WebCore::DragHandlingMethod, bool, unsigned, WebCore::IntRect, WebCore::IntRect, std::optional<WebCore::RemoteUserInputEventData>)>&&);
- #endif
-
--#if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK)
-+#if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK) && !PLATFORM(WPE)
- void performDragControllerAction(std::optional<WebCore::FrameIdentifier>, DragControllerAction, WebCore::DragData&&, CompletionHandler<void(std::optional<WebCore::DragOperation>, WebCore::DragHandlingMethod, bool, unsigned, WebCore::IntRect, WebCore::IntRect, std::optional<WebCore::RemoteUserInputEventData>)>&&);
- void performDragOperation(std::optional<WebCore::FrameIdentifier>, WebCore::DragData&&, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&, CompletionHandler<void(DragOperationResult dragOperationResult)>&&);
- #endif
-@@ -1436,6 +1437,9 @@ public:
+@@ -1449,6 +1450,9 @@ public:
#if ENABLE(MODEL_PROCESS)
void modelDragEnded(WebCore::NodeIdentifier);
#endif
@@ -18913,7 +19014,7 @@ index 28cfe18e24fd74cf652b7fcc417d46ec13017c49..abdb3f70b0cde7217a398b58eb294945
#endif
#if ENABLE(MODEL_PROCESS)
-@@ -1538,8 +1542,11 @@ public:
+@@ -1551,8 +1555,11 @@ public:
void gestureEvent(WebCore::FrameIdentifier, const WebGestureEvent&, CompletionHandler<void(std::optional<WebEventType>, bool, std::optional<WebCore::RemoteUserInputEventData>)>&&);
#endif
@@ -18926,7 +19027,7 @@ index 28cfe18e24fd74cf652b7fcc417d46ec13017c49..abdb3f70b0cde7217a398b58eb294945
void dynamicViewportSizeUpdate(const DynamicViewportSizeUpdate&);
bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
void willStartUserTriggeredZooming();
-@@ -1700,6 +1707,8 @@ public:
+@@ -1714,6 +1721,8 @@ public:
void connectInspector(Inspector::FrontendChannel::ConnectionType);
void disconnectInspector();
void sendMessageToTargetBackend(const String& message);
@@ -18935,7 +19036,7 @@ index 28cfe18e24fd74cf652b7fcc417d46ec13017c49..abdb3f70b0cde7217a398b58eb294945
void insertNewlineInQuotedContent();
-@@ -2141,6 +2150,7 @@ public:
+@@ -2158,6 +2167,7 @@ public:
void showContextMenuFromFrame(const FrameInfoData&, const ContextMenuContextData&, const UserData&);
#endif
void loadRequest(LoadParameters&&);
@@ -18943,7 +19044,7 @@ index 28cfe18e24fd74cf652b7fcc417d46ec13017c49..abdb3f70b0cde7217a398b58eb294945
void setObscuredContentInsets(const WebCore::FloatBoxExtent&);
-@@ -2365,6 +2375,7 @@ private:
+@@ -2386,6 +2396,7 @@ private:
void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);
#elif ENABLE(TOUCH_EVENTS)
void touchEvent(const WebTouchEvent&, CompletionHandler<void(std::optional<WebEventType>, bool)>&&);
@@ -18951,20 +19052,20 @@ index 28cfe18e24fd74cf652b7fcc417d46ec13017c49..abdb3f70b0cde7217a398b58eb294945
#endif
void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);
-@@ -3201,6 +3212,7 @@ private:
+@@ -3245,6 +3256,7 @@ private:
bool m_isAppNapEnabled { true };
Markable<WebCore::NavigationIdentifier> m_pendingNavigationID;
+ Markable<WebCore::NavigationIdentifier> m_pendingFrameNavigationID;
+ bool m_shouldConsiderEnhancedSecurityForInsecureResponseForCurrentNavigation { false };
bool m_mainFrameProgressCompleted { false };
- bool m_shouldDispatchFakeMouseMoveEvents { true };
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-index 0803df95c4b72349235f0f1acdba5f2eda6fa164..20a6e43ecdfa1246f47edc1edd2cf1ef07265d25 100644
+index bffa81d317e549152e9afa7fd7c3a1b99df24f81..fa927fd8a1be3075e1bb0ad92df667df43be2ca0 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-@@ -84,10 +84,13 @@ messages -> WebPage WantsAsyncDispatchMessage {
- CancelPotentialTap()
+@@ -85,10 +85,13 @@ messages -> WebPage WantsAsyncDispatchMessage {
+ HandleDoubleTapForDoubleClickAtPoint(WebCore::IntPoint point, OptionSet<WebKit::WebEventModifier> modifiers, WebKit::TransactionID lastLayerTreeTransactionId, enum:uint8_t WebKit::WebEventInputSource inputSource, enum:uint8_t WebKit::WebMouseEventSyntheticClickType syntheticClickType)
#endif
+#if ENABLE(ORIENTATION_EVENTS)
@@ -18978,7 +19079,7 @@ index 0803df95c4b72349235f0f1acdba5f2eda6fa164..20a6e43ecdfa1246f47edc1edd2cf1ef
SetOverrideViewportArguments(struct std::optional<WebCore::ViewportArguments> arguments)
DynamicViewportSizeUpdate(struct WebKit::DynamicViewportSizeUpdate target)
-@@ -174,6 +177,7 @@ messages -> WebPage WantsAsyncDispatchMessage {
+@@ -177,6 +180,7 @@ messages -> WebPage WantsAsyncDispatchMessage {
ConnectInspector(Inspector::FrontendChannel::ConnectionType connectionType)
DisconnectInspector()
SendMessageToTargetBackend(String message)
@@ -18986,7 +19087,7 @@ index 0803df95c4b72349235f0f1acdba5f2eda6fa164..20a6e43ecdfa1246f47edc1edd2cf1ef
#if ENABLE(REMOTE_INSPECTOR)
SetIndicating(bool indicating);
-@@ -184,6 +188,7 @@ messages -> WebPage WantsAsyncDispatchMessage {
+@@ -187,6 +191,7 @@ messages -> WebPage WantsAsyncDispatchMessage {
#endif
#if !ENABLE(IOS_TOUCH_EVENTS) && ENABLE(TOUCH_EVENTS)
TouchEvent(WebKit::WebTouchEvent event) -> (enum:uint32_t std::optional<WebKit::WebEventType> eventType, bool handled)
@@ -18994,28 +19095,15 @@ index 0803df95c4b72349235f0f1acdba5f2eda6fa164..20a6e43ecdfa1246f47edc1edd2cf1ef
#endif
CancelPointer(WebCore::PointerID pointerId, WebCore::IntPoint documentPoint)
-@@ -213,6 +218,7 @@ messages -> WebPage WantsAsyncDispatchMessage {
+@@ -216,6 +221,7 @@ messages -> WebPage WantsAsyncDispatchMessage {
LoadRequest(struct WebKit::LoadParameters loadParameters)
- LoadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, std::optional<WebCore::LayerHostingContextIdentifier> layerHostingContextIdentifier, RefPtr<WebCore::DocumentSyncData> topDocumentSyncData)
+ LoadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, WebCore::ProcessIdentifier hostingProcessID, std::optional<WebCore::LayerHostingContextIdentifier> layerHostingContextIdentifier, RefPtr<WebCore::DocumentSyncData> topDocumentSyncData)
+ LoadRequestInFrameForInspector(struct WebKit::LoadParameters loadParameters, WebCore::FrameIdentifier frameID)
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)
-@@ -391,10 +397,10 @@ messages -> WebPage WantsAsyncDispatchMessage {
- RemoveLayerForFindOverlay() -> ()
-
- # Drag and drop.
--#if PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
-+#if (PLATFORM(GTK) || PLATFORM(WPE)) && ENABLE(DRAG_SUPPORT)
- PerformDragControllerAction(enum:uint8_t WebKit::DragControllerAction action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragOperation> draggingSourceOperationMask, WebCore::SelectionData selection, OptionSet<WebCore::DragApplicationFlags> flags) -> (enum:uint8_t std::optional<WebCore::DragOperation> dragOperation, enum:uint8_t WebCore::DragHandlingMethod dragHandlingMethod, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, WebCore::IntRect insertionRect, WebCore::IntRect editableElementRect, struct std::optional<WebCore::RemoteUserInputEventData> remoteUserInputEventData)
- #endif
--#if !PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
-+#if !PLATFORM(GTK) && !PLATFORM(WPE) && ENABLE(DRAG_SUPPORT)
- PerformDragControllerAction(std::optional<WebCore::FrameIdentifier> frameID, enum:uint8_t WebKit::DragControllerAction action, WebCore::DragData dragData) -> (enum:uint8_t std::optional<WebCore::DragOperation> dragOperation, enum:uint8_t WebCore::DragHandlingMethod dragHandlingMethod, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, WebCore::IntRect insertionRect, WebCore::IntRect editableElementRect, struct std::optional<WebCore::RemoteUserInputEventData> remoteUserInputEventData)
- PerformDragOperation(std::optional<WebCore::FrameIdentifier> frameID, WebCore::DragData dragData, WebKit::SandboxExtensionHandle sandboxExtensionHandle, Vector<WebKit::SandboxExtensionHandle> sandboxExtensionsForUpload) -> (WebKit::DragOperationResult dragOperationResult)
- #endif
-@@ -414,6 +420,10 @@ messages -> WebPage WantsAsyncDispatchMessage {
+@@ -418,6 +424,10 @@ messages -> WebPage WantsAsyncDispatchMessage {
ModelDragEnded(WebCore::NodeIdentifier nodeID)
#endif
@@ -19027,10 +19115,10 @@ index 0803df95c4b72349235f0f1acdba5f2eda6fa164..20a6e43ecdfa1246f47edc1edd2cf1ef
RequestDragStart(std::optional<WebCore::FrameIdentifier> remoteFrameID, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragSourceAction> allowedActionsMask) -> (struct WebKit::DragInitiationResult result)
RequestAdditionalItemsForDragSession(std::optional<WebCore::FrameIdentifier> rootFrameID, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragSourceAction> allowedActionsMask) -> (struct WebKit::DragInitiationResult result)
diff --git a/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp b/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp
-index 081c8dd9bc9402d909fba5359f90c686deb9987a..b9e548e8886861fa8013f5d8af1c893f5f4a3b99 100644
+index 56f754ce23543fd1b2c5d2d72b33d07124bf43d0..c344e47680376018dcf43c497629fa3026f7819b 100644
--- a/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp
+++ b/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp
-@@ -224,16 +224,23 @@ String WebPage::platformUserAgent(const URL& url) const
+@@ -228,16 +228,23 @@ String WebPage::platformUserAgent(const URL& url) const
bool WebPage::hoverSupportedByPrimaryPointingDevice() const
{
@@ -19054,7 +19142,7 @@ index 081c8dd9bc9402d909fba5359f90c686deb9987a..b9e548e8886861fa8013f5d8af1c893f
const auto& primaryPointingDevice = WebProcess::singleton().primaryPointingDevice();
if (primaryPointingDevice == AvailableInputDevices::Mouse)
return PointerCharacteristics::Fine;
-@@ -244,6 +251,9 @@ std::optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPo
+@@ -248,6 +255,9 @@ std::optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPo
OptionSet<PointerCharacteristics> WebPage::pointerCharacteristicsOfAllAvailablePointingDevices() const
{
@@ -19065,10 +19153,10 @@ index 081c8dd9bc9402d909fba5359f90c686deb9987a..b9e548e8886861fa8013f5d8af1c893f
const auto& availableInputs = WebProcess::singleton().availableInputDevices();
if (availableInputs.contains(AvailableInputDevices::Mouse))
diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
-index da7ee3f33f1f158f1c7d57647be27aacf66c0941..f6b4252e20fcfac11aa22a74d5e4bb2156e80c01 100644
+index 2b10d8d5684099f5eca94b32d1fc74c164365a05..2b91a71f06c4d0b95de7f76984b839da950cce2f 100644
--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
-@@ -755,21 +755,37 @@ String WebPage::platformUserAgent(const URL&) const
+@@ -761,21 +761,37 @@ String WebPage::platformUserAgent(const URL&) const
bool WebPage::hoverSupportedByPrimaryPointingDevice() const
{
@@ -19157,7 +19245,7 @@ index 506ae38c6c54a2866ce44271575d8731ba1fea2c..52791bcd240e5eeb68c739de361fb62b
}
diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp
-index fb4336ddab5501feecd6f5e555f5fbe23e3db309..77b6e8e0cad2d610fb39c40f50c355ccdb898773 100644
+index b2d75d3df51f17a5d8bcb8c873bf1a1b6cbb1875..71ac2d6230507cf1d17886b84a970de240914aec 100644
--- a/Source/WebKit/WebProcess/WebProcess.cpp
+++ b/Source/WebKit/WebProcess/WebProcess.cpp
@@ -96,6 +96,7 @@
@@ -19192,7 +19280,38 @@ index fb4336ddab5501feecd6f5e555f5fbe23e3db309..77b6e8e0cad2d610fb39c40f50c355cc
}
void WebProcess::initializeConnection(IPC::Connection* connection)
-@@ -1067,6 +1078,7 @@ void WebProcess::createWebPage(PageIdentifier pageID, WebPageCreationParameters&
+@@ -621,7 +632,8 @@ void WebProcess::initializeWebProcess(WebProcessCreationParameters&& parameters,
+
+ if (!parameters.overrideLanguages.isEmpty()) {
+ LOG_WITH_STREAM(Language, stream << "Web Process initialization is setting overrideLanguages: " << parameters.overrideLanguages);
+- overrideUserPreferredLanguages(parameters.overrideLanguages);
++ m_overrideLanguages = parameters.overrideLanguages;
++ overrideUserPreferredLanguages(m_overrideLanguages);
+ } else
+ LOG(Language, "Web process initialization is not setting overrideLanguages");
+
+@@ -999,10 +1011,18 @@ void WebProcess::setDisableFontSubpixelAntialiasingForTesting(bool disable)
+ WebCore::FontCascade::setDisableFontSubpixelAntialiasingForTesting(disable);
+ }
+
+-void WebProcess::userPreferredLanguagesChanged(const Vector<String>& languages) const
++void WebProcess::userPreferredLanguagesChanged(const Vector<String>& languages)
+ {
+ LOG_WITH_STREAM(Language, stream << "The web process's userPreferredLanguagesChanged: " << languages);
+- overrideUserPreferredLanguages(languages);
++ m_overrideLanguages = languages;
++ overrideUserPreferredLanguages(m_overrideLanguages);
++}
++
++void WebProcess::applyOverrideLanguagesToRequest(ResourceRequest& request) const
++{
++ if (m_overrideLanguages.isEmpty() || request.hasHTTPHeaderField(HTTPHeaderName::AcceptLanguage))
++ return;
++ request.setHTTPHeaderField(HTTPHeaderName::AcceptLanguage, makeStringByJoining(m_overrideLanguages.span(), ", "_s));
+ }
+
+ void WebProcess::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
+@@ -1084,6 +1104,7 @@ void WebProcess::createWebPage(PageIdentifier pageID, WebPageCreationParameters&
m_hasPendingAccessibilityUnsuspension = false;
accessibilityRelayProcessSuspended(false);
}
@@ -19200,11 +19319,49 @@ index fb4336ddab5501feecd6f5e555f5fbe23e3db309..77b6e8e0cad2d610fb39c40f50c355cc
}
Awaitable<unsigned> WebProcess::countWebPagesForTesting()
+diff --git a/Source/WebKit/WebProcess/WebProcess.h b/Source/WebKit/WebProcess/WebProcess.h
+index b496b181d2a6132bafcef9bbb516e8e95c1f90c4..4ebede8bf209c9bcd4e7e1c5435329e84bac47b8 100644
+--- a/Source/WebKit/WebProcess/WebProcess.h
++++ b/Source/WebKit/WebProcess/WebProcess.h
+@@ -106,6 +106,7 @@ namespace WebCore {
+ class CPUMonitor;
+ class Frame;
+ class PageGroup;
++class ResourceRequest;
+ class SecurityOriginData;
+ class Site;
+ class UserGestureToken;
+@@ -259,6 +260,8 @@ public:
+
+ bool fullKeyboardAccessEnabled() const { return m_fullKeyboardAccessEnabled; }
+
++ void applyOverrideLanguagesToRequest(WebCore::ResourceRequest&) const;
++
+ void contentWorldDestroyed(ContentWorldIdentifier);
+
+ #if HAVE(MOUSE_DEVICE_OBSERVATION)
+@@ -610,7 +613,7 @@ private:
+ void clearResourceLoadStatistics();
+ void flushResourceLoadStatistics();
+ void seedResourceLoadStatisticsForTesting(const WebCore::RegistrableDomain& firstPartyDomain, const WebCore::RegistrableDomain& thirdPartyDomain, bool shouldScheduleNotification, CompletionHandler<void()>&&);
+- void userPreferredLanguagesChanged(const Vector<String>&) const;
++ void userPreferredLanguagesChanged(const Vector<String>&);
+ void NODELETE fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled);
+ #if ENABLE(OPT_IN_PARTITIONED_COOKIES)
+ void setOptInCookiePartitioningEnabled(bool);
+@@ -801,6 +804,7 @@ private:
+ CacheModel m_cacheModel { CacheModel::DocumentViewer };
+
+ bool m_fullKeyboardAccessEnabled { false };
++ Vector<String> m_overrideLanguages;
+
+ #if HAVE(MOUSE_DEVICE_OBSERVATION)
+ bool m_hasMouseDevice { false };
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-index 18cb263c7e49a6ad8735ac0318692f15e3548bf3..84bb31229c2baf7c34b7ccbf43ac974ef32e5736 100644
+index 497c5b01ff2e98fb722878dadfe8c5c0924f3982..bbc544cddeaa061c2e87d9860ff8613b915645a2 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-@@ -4207,7 +4207,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
+@@ -4206,7 +4206,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
_private->handlingMouseDownEvent = NO;
}
@@ -19214,10 +19371,10 @@ index 18cb263c7e49a6ad8735ac0318692f15e3548bf3..84bb31229c2baf7c34b7ccbf43ac974e
- (void)touch:(WebEvent *)event
{
diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm
-index d78a0df60635c236f5f58c9166551230af89c6ca..b1c01c4a741f53b4870a5cf36faf441c12d1771e 100644
+index 436f7c1ea55f5446fc20f5e2c4c03e89b64301ed..21a2ad87518910b4a264a5a57e611151c6342d7d 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
-@@ -3974,7 +3974,7 @@ + (void)_doNotStartObservingNetworkReachability
+@@ -3981,7 +3981,7 @@ + (void)_doNotStartObservingNetworkReachability
}
#endif // PLATFORM(IOS_FAMILY)
@@ -19226,7 +19383,7 @@ index d78a0df60635c236f5f58c9166551230af89c6ca..b1c01c4a741f53b4870a5cf36faf441c
- (NSArray *)_touchEventRegions
{
-@@ -4016,7 +4016,7 @@ - (NSArray *)_touchEventRegions
+@@ -4023,7 +4023,7 @@ - (NSArray *)_touchEventRegions
}).autorelease();
}
@@ -19236,7 +19393,7 @@ index d78a0df60635c236f5f58c9166551230af89c6ca..b1c01c4a741f53b4870a5cf36faf441c
// For backwards compatibility with the WebBackForwardList API, we honor both
// a per-WebView and a per-preferences setting for whether to use the back/forward cache.
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
-index 98b94f2d211c6546087f8aff57798ff6caadde56..5d32fffbdce8568e320dc4a864b81808f3ec6638 100644
+index 1db95887eeda425cf0b402f50f16f00ace4acb1f..e3e1a07d3fe15d46862e66c1d2a90d27063adea2 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -12,6 +12,10 @@ list(APPEND WEBKIT_UNSAFE_BUFFER_WARNING_FLAGS -Wno-unsafe-buffer-usage-in-forma
@@ -19261,7 +19418,7 @@ index 98b94f2d211c6546087f8aff57798ff6caadde56..5d32fffbdce8568e320dc4a864b81808
SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
if (DEVELOPER_MODE)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS PRIVATE ON)
-@@ -154,6 +162,21 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SKIA PRIVATE ON)
+@@ -153,6 +161,21 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SKIA PRIVATE ON)
WEBKIT_OPTION_DEPEND(ENABLE_GPU_PROCESS USE_GBM)
@@ -19284,7 +19441,7 @@ index 98b94f2d211c6546087f8aff57798ff6caadde56..5d32fffbdce8568e320dc4a864b81808
WEBKIT_OPTION_DEPEND(ENABLE_WEBXR ENABLE_GAMEPAD)
diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake
-index 6300268001d84bd43fb337d6aeabc4a2dba837ca..0afd7bfcbb4016cd4b544294d9e9c42858301836 100644
+index 122452a958dc58ba42e2e9931b3d6e37fd935333..e4f71ce45b4850d080e65702c54ce0745092cddf 100644
--- a/Source/cmake/OptionsWPE.cmake
+++ b/Source/cmake/OptionsWPE.cmake
@@ -40,6 +40,9 @@ else ()
@@ -19297,7 +19454,7 @@ index 6300268001d84bd43fb337d6aeabc4a2dba837ca..0afd7bfcbb4016cd4b544294d9e9c428
WEBKIT_OPTION_BEGIN()
SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
-@@ -98,6 +101,22 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBXR PRIVATE ${ENABLE_EXPERIMENTAL_FEAT
+@@ -97,6 +100,22 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBXR PRIVATE ${ENABLE_EXPERIMENTAL_FEAT
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBXR_HIT_TEST PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBXR_LAYERS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
@@ -19320,7 +19477,7 @@ index 6300268001d84bd43fb337d6aeabc4a2dba837ca..0afd7bfcbb4016cd4b544294d9e9c428
# Public options specific to the WPE port. Do not add any options here unless
# there is a strong reason we should support changing the value of the option,
# and the option is not relevant to other WebKit ports.
-@@ -136,6 +155,11 @@ WEBKIT_OPTION_DEPEND(ENABLE_DOCUMENTATION ENABLE_INTROSPECTION)
+@@ -135,6 +154,11 @@ WEBKIT_OPTION_DEPEND(ENABLE_DOCUMENTATION ENABLE_INTROSPECTION)
WEBKIT_OPTION_DEPEND(ENABLE_WPE_QT_API ENABLE_WPE_PLATFORM)
WEBKIT_OPTION_DEPEND(USE_SYSTEM_SYSPROF_CAPTURE USE_SYSPROF_CAPTURE)
@@ -19333,10 +19490,10 @@ index 6300268001d84bd43fb337d6aeabc4a2dba837ca..0afd7bfcbb4016cd4b544294d9e9c428
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BUBBLEWRAP_SANDBOX PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE ON)
diff --git a/Source/cmake/OptionsWin.cmake b/Source/cmake/OptionsWin.cmake
-index 49734f2d6e59d7410951f9aa2eaa2684fb88c849..2194af76de8cc2cfcb0f3d8fffa9acc5660ffccd 100644
+index 24ee1217f1b015dfe7a22815585748e974c05cc2..299f38f6bda7c6421b89b1804796e8b9a24ad2fd 100644
--- a/Source/cmake/OptionsWin.cmake
+++ b/Source/cmake/OptionsWin.cmake
-@@ -115,6 +115,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
+@@ -114,6 +114,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBDRIVER PRIVATE ON)
SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS ON)
SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS ON)
@@ -19352,7 +19509,7 @@ index 49734f2d6e59d7410951f9aa2eaa2684fb88c849..2194af76de8cc2cfcb0f3d8fffa9acc5
set(USE_ANGLE_EGL ON)
diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake
-index 6c0a4215df55df968e78769b425de7163c08b735..23d83d88fee4fa14bf710c0f6720ad7d1b32cb3f 100644
+index 0793c78950bab49578abb6cac4e5823c7cd322c2..69d307f2f9a4a3183e0c69de1ea5747dfd53619c 100644
--- a/Source/cmake/WebKitCompilerFlags.cmake
+++ b/Source/cmake/WebKitCompilerFlags.cmake
@@ -161,7 +161,7 @@ set(WEBKIT_UNSAFE_BUFFER_WARNING_FLAGS
@@ -19749,10 +19906,10 @@ index 8722194f5a3007d7eeb90e5517c129afcfbef45e..068d50bdd954578b9cd7dc091059976d
g_clear_object(&interfaceSettings);
diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp
-index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f3857c92cac 100644
+index 4446005792f94b8bc8d3cff6bf7d243e1970baf8..549fc8424b7030a927c54b3f4d7fdd2592b1f089 100644
--- a/Tools/MiniBrowser/wpe/main.cpp
+++ b/Tools/MiniBrowser/wpe/main.cpp
-@@ -56,6 +56,10 @@ static gboolean privateMode;
+@@ -57,6 +57,10 @@ static gboolean privateMode;
static const char* profileDirectory;
static gboolean automationMode;
static gboolean ignoreTLSErrors;
@@ -19763,7 +19920,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
static const char* contentFilter;
static const char* cookiesFile;
static const char* cookiesPolicy;
-@@ -141,6 +145,10 @@ static const GOptionEntry commandLineOptions[] =
+@@ -142,6 +146,10 @@ static const GOptionEntry commandLineOptions[] =
{ "config-file", 0, 0, G_OPTION_ARG_FILENAME, &configFile, "Config file to load for settings", "FILE" },
{ "size", 's', 0, G_OPTION_ARG_CALLBACK, reinterpret_cast<gpointer>(parseWindowSize), "Specify the window size to use, e.g. --size=\"800x600\"", nullptr },
{ "version", 'v', 0, G_OPTION_ARG_NONE, &printVersion, "Print the WPE version", nullptr },
@@ -19774,7 +19931,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, nullptr, "[URL]" },
{ nullptr, 0, 0, G_OPTION_ARG_NONE, nullptr, nullptr, nullptr }
};
-@@ -331,15 +339,38 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
+@@ -332,15 +340,38 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
g_main_loop_quit(data->mainLoop);
}
@@ -19795,14 +19952,14 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
-static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationAction*, gpointer user_data)
+static gboolean scriptDialog(WebKitWebView*, WebKitScriptDialog* dialog, gpointer)
+{
-+ if (inspectorPipe)
++ if (inspectorPipe || remoteDebuggingPort != -1)
+ webkit_script_dialog_ref(dialog);
+ return TRUE;
+}
+
+static gboolean scriptDialogHandled(WebKitWebView*, WebKitScriptDialog* dialog, gpointer)
+{
-+ if (inspectorPipe)
++ if (inspectorPipe || remoteDebuggingPort != -1)
+ webkit_script_dialog_unref(dialog);
+ return TRUE;
+}
@@ -19815,7 +19972,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
{
#if defined(USE_LIBWPE) && USE_LIBWPE
auto backend = createViewBackend(defaultWindowWidthLegacyAPI, defaultWindowHeightLegacyAPI);
-@@ -356,14 +387,31 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
+@@ -357,14 +388,31 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
}
#endif
@@ -19853,7 +20010,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
#if ENABLE_WPE_PLATFORM
if (auto* wpeView = webkit_web_view_get_wpe_view(newWebView)) {
-@@ -375,9 +423,13 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
+@@ -376,9 +424,13 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
g_signal_connect(newWebView, "create", G_CALLBACK(createWebView), user_data);
g_signal_connect(newWebView, "close", G_CALLBACK(webViewClose), user_data);
@@ -19869,7 +20026,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
return newWebView;
}
-@@ -468,24 +520,120 @@ static void loadConfigFile(WebKitSettings* webkitSettings
+@@ -469,24 +521,120 @@ static void loadConfigFile(WebKitSettings* webkitSettings
}
#if defined(USE_LIBWPE) && USE_LIBWPE
@@ -19994,7 +20151,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
webkit_network_session_set_itp_enabled(networkSession, enableITP);
if (proxy) {
-@@ -512,19 +660,22 @@ static void activate(GApplication* application, gpointer)
+@@ -513,19 +661,22 @@ static void activate(GApplication* application, gpointer)
webkit_cookie_manager_set_persistent_storage(cookieManager, cookiesFile, storageType);
}
}
@@ -20024,7 +20181,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
webkit_website_data_manager_set_itp_enabled(manager, enableITP);
if (proxy) {
-@@ -555,6 +706,7 @@ static void activate(GApplication* application, gpointer)
+@@ -556,6 +707,7 @@ static void activate(GApplication* application, gpointer)
}
#endif
@@ -20032,7 +20189,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
g_autoptr(WebKitUserContentManager) userContentManager = nullptr;
if (contentFilter) {
g_autoptr(GFile) contentFilterFile = g_file_new_for_commandline_arg(contentFilter);
-@@ -637,6 +789,15 @@ static void activate(GApplication* application, gpointer)
+@@ -638,6 +790,15 @@ static void activate(GApplication* application, gpointer)
"autoplay", WEBKIT_AUTOPLAY_ALLOW,
nullptr);
@@ -20048,7 +20205,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
auto* webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
#if defined(USE_LIBWPE) && USE_LIBWPE
"backend", viewBackend,
-@@ -699,12 +860,16 @@ static void activate(GApplication* application, gpointer)
+@@ -700,12 +861,16 @@ static void activate(GApplication* application, gpointer)
#endif
}
@@ -20067,7 +20224,7 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
g_hash_table_add(openViews, webView);
WebKitColor color;
-@@ -712,16 +877,11 @@ static void activate(GApplication* application, gpointer)
+@@ -713,16 +878,11 @@ static void activate(GApplication* application, gpointer)
webkit_web_view_set_background_color(webView, &color);
if (uriArguments) {
@@ -20083,13 +20240,13 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
- } else if (!automationMode)
+ // Playwright: avoid weird url transformation like http://trac.webkit.org/r240840
+ webkit_web_view_load_uri(webView, uriArguments[0]);
-+ } else if (automationMode || inspectorPipe)
++ } else if (automationMode || inspectorPipe || remoteDebuggingPort != -1)
+ webkit_web_view_load_uri(webView, "about:blank");
+ else
webkit_web_view_load_uri(webView, "https://wpewebkit.org");
g_object_unref(webContext);
-@@ -816,12 +976,20 @@ int main(int argc, char *argv[])
+@@ -817,6 +977,8 @@ int main(int argc, char *argv[])
}
#endif
@@ -20098,9 +20255,10 @@ index c8cd8719368bc3be7b97b315c64162ced5b7c351..69d25479b7a0a1afcffcdad6a62f4f38
GApplication* application = g_application_new("org.wpewebkit.MiniBrowser", G_APPLICATION_NON_UNIQUE);
#if defined(USE_LIBWPE) && USE_LIBWPE
g_signal_connect(application, "activate", G_CALLBACK(activate), backend.release());
- #else
- g_signal_connect(application, "activate", G_CALLBACK(activate), nullptr);
- #endif
+@@ -829,6 +991,12 @@ int main(int argc, char *argv[])
+ };
+ g_unix_signal_add(SIGINT, quitOnSignal, application);
+ g_unix_signal_add(SIGTERM, quitOnSignal, application);
+
+ if (inspectorPipe)
+ configureBrowserInspector(application);
@@ -20123,10 +20281,10 @@ index 1067b31bc989748dfcc5502209d36d001b9b239e..7629263fb8bc93dca6dfc01c75eed8d2
+ add_subdirectory(Playwright/win)
+endif ()
diff --git a/Tools/WebKitTestRunner/CMakeLists.txt b/Tools/WebKitTestRunner/CMakeLists.txt
-index a2c72d2d46f90d1851dfd64b718b55580321adaf..4877227f61591a1bc437cacaa5e792ebdb014af8 100644
+index 25d5ca51d94ce47cacfa2485d9d971dd35a6ac4f..6af69810ca2c022a2128bc9a96c42d409b8a87e7 100644
--- a/Tools/WebKitTestRunner/CMakeLists.txt
+++ b/Tools/WebKitTestRunner/CMakeLists.txt
-@@ -99,6 +99,10 @@ set(TestRunnerInjectedBundle_PRIVATE_LIBRARIES
+@@ -102,6 +102,10 @@ set(TestRunnerInjectedBundle_PRIVATE_LIBRARIES
)
set(TestRunnerInjectedBundle_FRAMEWORKS ${WebKitTestRunner_FRAMEWORKS})
@@ -20138,10 +20296,10 @@ index a2c72d2d46f90d1851dfd64b718b55580321adaf..4877227f61591a1bc437cacaa5e792eb
"${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 a77f218b68b637c92571a1b5c5b39cbb0631f5a1..db2ebbf139c827855c215144e18fef3d222047c7 100644
+index c5ac77c675da81f6aa2686aedae39f8cf0c779e6..2037f08c6c2f068b46f09232ea810ae564294084 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
-@@ -810,6 +810,7 @@ PlatformWebView* TestController::createOtherPlatformWebView(PlatformWebView* par
+@@ -837,6 +837,7 @@ PlatformWebView* TestController::createOtherPlatformWebView(PlatformWebView* par
nullptr, // requestStorageAccessConfirm
nullptr, // shouldAllowDeviceOrientationAndMotionAccess
nullptr, // runWebAuthenticationPanel
@@ -20149,7 +20307,7 @@ index a77f218b68b637c92571a1b5c5b39cbb0631f5a1..db2ebbf139c827855c215144e18fef3d
nullptr, // decidePolicyForSpeechRecognitionPermissionRequest
nullptr, // decidePolicyForMediaKeySystemPermissionRequest
nullptr, // queryPermission
-@@ -1298,6 +1299,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options)
+@@ -1325,6 +1326,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options)
nullptr, // requestStorageAccessConfirm
shouldAllowDeviceOrientationAndMotionAccess,
runWebAuthenticationPanel,
@@ -20158,10 +20316,10 @@ index a77f218b68b637c92571a1b5c5b39cbb0631f5a1..db2ebbf139c827855c215144e18fef3d
decidePolicyForMediaKeySystemPermissionRequest,
queryPermission,
diff --git a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
-index 13a94ad7d71f65b38408e0cf52558fbc4610a649..e2a69c365de4cd4aaabfdd19fb3893317b8d7269 100644
+index 13a94ad7d71f65b38408e0cf52558fbc4610a649..7cebd2e49f7214d61ea541d124f4b46ff664f21c 100644
--- a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
+++ b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
-@@ -1031,4 +1031,51 @@ void EventSenderProxy::scaleGestureEnd(double scale)
+@@ -1031,4 +1031,59 @@ void EventSenderProxy::scaleGestureEnd(double scale)
#endif // ENABLE(MAC_GESTURE_EVENTS)
@@ -20174,20 +20332,28 @@ index 13a94ad7d71f65b38408e0cf52558fbc4610a649..e2a69c365de4cd4aaabfdd19fb389331
+{
+}
+
-+void EventSenderProxy::touchStart()
++void EventSenderProxy::touchStart(CompletionHandler<void()>&& completionHandler)
+{
++ if (completionHandler)
++ completionHandler();
+}
+
-+void EventSenderProxy::touchMove()
++void EventSenderProxy::touchMove(CompletionHandler<void()>&& completionHandler)
+{
++ if (completionHandler)
++ completionHandler();
+}
+
-+void EventSenderProxy::touchEnd()
++void EventSenderProxy::touchEnd(CompletionHandler<void()>&& completionHandler)
+{
++ if (completionHandler)
++ completionHandler();
+}
+
-+void EventSenderProxy::touchCancel()
++void EventSenderProxy::touchCancel(CompletionHandler<void()>&& completionHandler)
+{
++ if (completionHandler)
++ completionHandler();
+}
+
+void EventSenderProxy::clearTouchPoints()
@@ -20214,31 +20380,9 @@ index 13a94ad7d71f65b38408e0cf52558fbc4610a649..e2a69c365de4cd4aaabfdd19fb389331
+
} // namespace WTR
diff --git a/Tools/jhbuild/jhbuild-minimal.modules b/Tools/jhbuild/jhbuild-minimal.modules
-index 8e1df1545699ccf902471cd7e35c0945da9144d7..519fdf07d9c55ed4c2b940e392d1f559cc5c01b2 100644
+index 394952b034ef7ac376396499c5c42635d7dfa8a3..519fdf07d9c55ed4c2b940e392d1f559cc5c01b2 100644
--- a/Tools/jhbuild/jhbuild-minimal.modules
+++ b/Tools/jhbuild/jhbuild-minimal.modules
-@@ -69,8 +69,8 @@
- <cmake id="libwpe" cmakeargs="-DCMAKE_POLICY_VERSION_MINIMUM=3.5">
- <branch repo="github-tarball"
- module="WebPlatformForEmbedded/libwpe/releases/download/${version}/libwpe-${version}.tar.xz"
-- version="1.14.1"
-- hash="sha256:b1d0cdcf0f8dbb494e65b0f7913e357106da9a0d57f4fbb7b9d1238a6dbe9ade"/>
-+ version="1.16.0"
-+ hash="sha256:c7f3a3c6b3d006790d486dc7cceda2b6d2e329de07f33bc47dfc53f00f334b2a"/>
- </cmake>
-
- <meson id="wpebackend-fdo">
-@@ -79,8 +79,8 @@
- </dependencies>
- <branch repo="github-tarball"
- module="Igalia/WPEBackend-fdo/releases/download/${version}/wpebackend-fdo-${version}.tar.xz"
-- version="1.14.2"
-- hash="sha256:93c9766ae9864eeaeaee2b0a74f22cbca08df42c1a1bdb55b086f2528e380d38">
-+ version="1.14.3"
-+ hash="sha256:10121842595a850291db3e82f3db0b9984df079022d386ce42c2b8508159dc6c">
- </branch>
- </meson>
-
@@ -188,7 +188,6 @@
</meson>
@@ -20247,17 +20391,6 @@ index 8e1df1545699ccf902471cd7e35c0945da9144d7..519fdf07d9c55ed4c2b940e392d1f559
<dependencies>
<dep package="glib"/>
<dep package="glib-networking"/>
-@@ -196,8 +195,8 @@
- </dependencies>
- <branch module="GNOME/libsoup.git"
- repo="github.com"
-- tag="3.6.0"
-- version="3.6.0"
-+ tag="3.6.5"
-+ version="3.6.5"
- checkoutdir="libsoup-${version}"/>
- </meson>
-
diff --git a/Tools/wpe/backends/fdo/HeadlessViewBackendFdo.cpp b/Tools/wpe/backends/fdo/HeadlessViewBackendFdo.cpp
index 6186d81869dbbb346ec5a62f2bbba88e2320d5e7..25b5615339b74cd56042b89f723993023cbb58ca 100644
--- a/Tools/wpe/backends/fdo/HeadlessViewBackendFdo.cpp