Skip to content

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

chore: update browser patches as of July, 25th, 2024 (#32468)

Simon Knott895d017fb86c
diff --git a/browser_patches/firefox/UPSTREAM_CONFIG.sh b/browser_patches/firefox/UPSTREAM_CONFIG.sh
index aee7dca3d9..ff33363424 100644
--- a/browser_patches/firefox/UPSTREAM_CONFIG.sh
+++ b/browser_patches/firefox/UPSTREAM_CONFIG.sh
@@ -1,3 +1,3 @@
REMOTE_URL="https://github.com/mozilla/gecko-dev"
BASE_BRANCH="release"
-BASE_REVISION="4c9a3f8e2db68ae0a8fcf6bbf0574e3c0549ff49"
+BASE_REVISION="cf0397e3ba298868fdca53f894da5b0d239dc09e"
diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.js
index 8eb69d8133..aa6f866277 100644
--- a/browser_patches/firefox/juggler/NetworkObserver.js
+++ b/browser_patches/firefox/juggler/NetworkObserver.js
@@ -602,6 +602,8 @@ class NetworkObserver {
proxyFilter.onProxyFilterResult(defaultProxyInfo);
return;
}
+ if (this._targetRegistry.shouldBustHTTPAuthCacheForProxy(proxy))
+ Services.obs.notifyObservers(null, "net:clear-active-logins");
proxyFilter.onProxyFilterResult(protocolProxyService.newProxyInfo(
proxy.type,
proxy.host,
diff --git a/browser_patches/firefox/juggler/TargetRegistry.js b/browser_patches/firefox/juggler/TargetRegistry.js
index 8c23ff8c93..c40c831d01 100644
--- a/browser_patches/firefox/juggler/TargetRegistry.js
+++ b/browser_patches/firefox/juggler/TargetRegistry.js
@@ -116,6 +116,7 @@ class TargetRegistry {
this._browserToTarget = new Map();
this._browserIdToTarget = new Map();
+ this._proxiesWithClashingAuthCacheKeys = new Set();
this._browserProxy = null;
// Cleanup containers from previous runs (if any)
@@ -234,12 +235,50 @@ class TargetRegistry {
onOpenWindow(win);
}
+ // Firefox uses nsHttpAuthCache to cache authentication to the proxy.
+ // If we're provided with a single proxy with a multiple different authentications, then
+ // we should clear the nsHttpAuthCache on every request.
+ shouldBustHTTPAuthCacheForProxy(proxy) {
+ return this._proxiesWithClashingAuthCacheKeys.has(proxy);
+ }
+
+ _updateProxiesWithSameAuthCacheAndDifferentCredentials() {
+ const proxyIdToCredentials = new Map();
+ const allProxies = [...this._browserContextIdToBrowserContext.values()].map(bc => bc._proxy).filter(Boolean);
+ if (this._browserProxy)
+ allProxies.push(this._browserProxy);
+ const proxyAuthCacheKeyAndProxy = allProxies.map(proxy => [
+ JSON.stringify({
+ type: proxy.type,
+ host: proxy.host,
+ port: proxy.port,
+ }),
+ proxy,
+ ]);
+ this._proxiesWithClashingAuthCacheKeys.clear();
+
+ proxyAuthCacheKeyAndProxy.sort(([cacheKey1], [cacheKey2]) => cacheKey1 < cacheKey2 ? -1 : 1);
+ for (let i = 0; i < proxyAuthCacheKeyAndProxy.length - 1; ++i) {
+ const [cacheKey1, proxy1] = proxyAuthCacheKeyAndProxy[i];
+ const [cacheKey2, proxy2] = proxyAuthCacheKeyAndProxy[i + 1];
+ if (cacheKey1 !== cacheKey2)
+ continue;
+ if (proxy1.username === proxy2.username && proxy1.password === proxy2.password)
+ continue;
+ // `proxy1` and `proxy2` have the same caching key, but serve different credentials.
+ // We have to bust HTTP Auth Cache everytime there's a request that will use either of the proxies.
+ this._proxiesWithClashingAuthCacheKeys.add(proxy1);
+ this._proxiesWithClashingAuthCacheKeys.add(proxy2);
+ }
+ }
+
async cancelDownload(options) {
this._downloadInterceptor.cancelDownload(options.uuid);
}
setBrowserProxy(proxy) {
this._browserProxy = proxy;
+ this._updateProxiesWithSameAuthCacheAndDifferentCredentials();
}
getProxyInfo(channel) {
@@ -906,12 +945,14 @@ class BrowserContext {
}
this._registry._browserContextIdToBrowserContext.delete(this.browserContextId);
this._registry._userContextIdToBrowserContext.delete(this.userContextId);
+ this._registry._updateProxiesWithSameAuthCacheAndDifferentCredentials();
}
setProxy(proxy) {
// Clear AuthCache.
Services.obs.notifyObservers(null, "net:clear-active-logins");
this._proxy = proxy;
+ this._registry._updateProxiesWithSameAuthCacheAndDifferentCredentials();
}
setIgnoreHTTPSErrors(ignoreHTTPSErrors) {
diff --git a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm
index 47fcabbd81..05d91473d3 100644
--- a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm
+++ b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm
@@ -70,7 +70,7 @@ class JugglerFrameChild extends JSWindowActorChild {
const agents = topBrowingContextToAgents.get(this.browsingContext);
// The agents are already re-bound to a new actor.
- if (agents.actor !== this)
+ if (agents?.actor !== this)
return;
topBrowingContextToAgents.delete(this.browsingContext);
diff --git a/browser_patches/firefox/juggler/screencast/nsScreencastService.cpp b/browser_patches/firefox/juggler/screencast/nsScreencastService.cpp
index 25f6171801..062a851429 100644
--- a/browser_patches/firefox/juggler/screencast/nsScreencastService.cpp
+++ b/browser_patches/firefox/juggler/screencast/nsScreencastService.cpp
@@ -129,7 +129,7 @@ class nsScreencastService::Session : public rtc::VideoSinkInterface<webrtc::Vide
capability.height = 960;
capability.maxFPS = ScreencastEncoder::fps;
capability.videoType = webrtc::VideoType::kI420;
- int error = mCaptureModule->StartCapture(capability);
+ int error = mCaptureModule->StartCaptureCounted(capability);
if (error) {
fprintf(stderr, "StartCapture error %d\n", error);
return false;
@@ -152,7 +152,7 @@ class nsScreencastService::Session : public rtc::VideoSinkInterface<webrtc::Vide
mCaptureModule->DeRegisterCaptureDataCallback(this);
else
mCaptureModule->DeRegisterRawFrameCallback(this);
- mCaptureModule->StopCapture();
+ mCaptureModule->StopCaptureCounted();
if (mEncoder) {
mEncoder->finish([this, protect = RefPtr{this}] {
NS_DispatchToMainThread(NS_NewRunnableFunction(
diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diff
index be98b14c2f..4344455a66 100644
--- a/browser_patches/firefox/patches/bootstrap.diff
+++ b/browser_patches/firefox/patches/bootstrap.diff
@@ -106,7 +106,7 @@ index f6d425f36a965f03ac82dbe3ab6cde06f12751ac..d60999ab2658b1e1e5f07a8aee530451
browser/chrome/browser/search-extensions/amazon/favicon.ico
browser/chrome/browser/search-extensions/amazondotcn/favicon.ico
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
-index 725a63981ccb58c5e47c096f39fa686a5ba5a9e8..5fe548a9b6652c4407dad6364bf20833b7fa7f3e 100644
+index 3bf9d511555510414f39db7f99a6b5a2a743f178..bb0f71dd602193536c23f7b865ec5dce3ee02242 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -189,6 +189,9 @@
@@ -167,7 +167,7 @@ index d49c6fbf1bf83b832795fa674f6b41f223eef812..7ea3540947ff5f61b15f27fbf4b95564
const transportProvider = {
setListener(upgradeListener) {
diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp
-index 6e1a1b689398fa6c3c73f2f243ae02c67a4476c8..9dcf71ce753cf11f295d83eb7653e940065c8e2c 100644
+index db5b5b990727aefcbaa47f89e0f53f4048e60038..bcd2321f46d9bca719fc530054984a2163c21f86 100644
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -106,8 +106,15 @@ struct ParamTraits<mozilla::dom::DisplayMode>
@@ -188,7 +188,7 @@ index 6e1a1b689398fa6c3c73f2f243ae02c67a4476c8..9dcf71ce753cf11f295d83eb7653e940
template <>
struct ParamTraits<mozilla::dom::ExplicitActiveStatus>
-@@ -2804,6 +2811,40 @@ void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
+@@ -2807,6 +2814,40 @@ void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
PresContextAffectingFieldChanged();
}
@@ -230,10 +230,10 @@ index 6e1a1b689398fa6c3c73f2f243ae02c67a4476c8..9dcf71ce753cf11f295d83eb7653e940
nsString&& aOldValue) {
MOZ_ASSERT(IsTop());
diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h
-index 5ec95a61e4d3af265cbe7dd9d83f6535da1d103e..f8acafe6d58c429af27a38363e06ad546dfbfddd 100644
+index 61135ab0d7894c500c3c5d80d107e283c01b6830..cc8eb043f1f78214843ec7b335dd9932587d9bbd 100644
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
-@@ -199,10 +199,10 @@ struct EmbedderColorSchemes {
+@@ -203,10 +203,10 @@ struct EmbedderColorSchemes {
FIELD(GVInaudibleAutoplayRequestStatus, GVAutoplayRequestStatus) \
/* ScreenOrientation-related APIs */ \
FIELD(CurrentOrientationAngle, float) \
@@ -246,7 +246,7 @@ index 5ec95a61e4d3af265cbe7dd9d83f6535da1d103e..f8acafe6d58c429af27a38363e06ad54
FIELD(EmbedderElementType, Maybe<nsString>) \
FIELD(MessageManagerGroup, nsString) \
FIELD(MaxTouchPointsOverride, uint8_t) \
-@@ -240,6 +240,10 @@ struct EmbedderColorSchemes {
+@@ -244,6 +244,10 @@ struct EmbedderColorSchemes {
* <browser> embedder element. */ \
FIELD(EmbedderColorSchemes, EmbedderColorSchemes) \
FIELD(DisplayMode, dom::DisplayMode) \
@@ -257,7 +257,7 @@ index 5ec95a61e4d3af265cbe7dd9d83f6535da1d103e..f8acafe6d58c429af27a38363e06ad54
/* The number of entries added to the session history because of this \
* browsing context. */ \
FIELD(HistoryEntryCount, uint32_t) \
-@@ -926,6 +930,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+@@ -937,6 +941,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
return GetPrefersColorSchemeOverride();
}
@@ -272,7 +272,7 @@ index 5ec95a61e4d3af265cbe7dd9d83f6535da1d103e..f8acafe6d58c429af27a38363e06ad54
bool IsInBFCache() const;
bool AllowJavascript() const { return GetAllowJavascript(); }
-@@ -1090,6 +1102,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+@@ -1101,6 +1113,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
void WalkPresContexts(Callback&&);
void PresContextAffectingFieldChanged();
@@ -297,10 +297,19 @@ index 5ec95a61e4d3af265cbe7dd9d83f6535da1d103e..f8acafe6d58c429af27a38363e06ad54
bool CanSet(FieldIndex<IDX_SuspendMediaWhenInactive>, bool, ContentParent*) {
diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp
-index 4c92988c9b90503c95cbec63e4dc85b5f789c488..cd6eb741a432ef761bb07d8d8e97441ed111cb6e 100644
+index b59a70321b6c5801e4a4f916ee303c999747570b..1eded29480eb4b401327da9ed33a63a18e3297b9 100644
--- a/docshell/base/CanonicalBrowsingContext.cpp
+++ b/docshell/base/CanonicalBrowsingContext.cpp
-@@ -1593,6 +1593,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI,
+@@ -324,6 +324,8 @@ void CanonicalBrowsingContext::ReplacedBy(
+ txn.SetHasRestoreData(GetHasRestoreData());
+ txn.SetShouldDelayMediaFromStart(GetShouldDelayMediaFromStart());
+ txn.SetForceOffline(GetForceOffline());
++ txn.SetPrefersReducedMotionOverride(GetPrefersReducedMotionOverride());
++ txn.SetForcedColorsOverride(GetForcedColorsOverride());
+
+ // Propagate some settings on BrowsingContext replacement so they're not lost
+ // on bfcached navigations. These are important for GeckoView (see bug
+@@ -1594,6 +1596,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI,
return;
}
@@ -314,7 +323,7 @@ index 4c92988c9b90503c95cbec63e4dc85b5f789c488..cd6eb741a432ef761bb07d8d8e97441e
}
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
-index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161be28fee3c 100644
+index 354b2c0d66976fd7fd431902bfc7816131602496..7948aa03c8fd865bf7953faaeea2bda84ade04c8 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -15,6 +15,12 @@
@@ -330,15 +339,15 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
#include "mozilla/ArrayUtils.h"
#include "mozilla/Attributes.h"
#include "mozilla/AutoRestore.h"
-@@ -64,6 +70,7 @@
- #include "mozilla/dom/ContentFrameMessageManager.h"
+@@ -66,6 +72,7 @@
#include "mozilla/dom/DocGroup.h"
#include "mozilla/dom/Element.h"
+ #include "mozilla/dom/FragmentDirective.h"
+#include "mozilla/dom/Geolocation.h"
#include "mozilla/dom/HTMLAnchorElement.h"
#include "mozilla/dom/HTMLIFrameElement.h"
#include "mozilla/dom/PerformanceNavigation.h"
-@@ -88,6 +95,7 @@
+@@ -90,6 +97,7 @@
#include "mozilla/dom/JSWindowActorChild.h"
#include "mozilla/dom/DocumentBinding.h"
#include "mozilla/ipc/ProtocolUtils.h"
@@ -346,7 +355,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
#include "mozilla/net/DocumentChannel.h"
#include "mozilla/net/DocumentChannelChild.h"
#include "mozilla/net/ParentChannelWrapper.h"
-@@ -111,6 +119,7 @@
+@@ -113,6 +121,7 @@
#include "nsIDocumentViewer.h"
#include "mozilla/dom/Document.h"
#include "nsHTMLDocument.h"
@@ -362,7 +371,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsObjectLoadingContent.h"
-@@ -346,6 +356,13 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
+@@ -347,6 +357,13 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
mAllowDNSPrefetch(true),
mAllowWindowControl(true),
mCSSErrorReportingEnabled(false),
@@ -376,7 +385,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
mAllowAuth(mItemType == typeContent),
mAllowKeywordFixup(false),
mDisableMetaRefreshWhenInactive(false),
-@@ -3066,6 +3083,214 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
+@@ -3046,6 +3063,214 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
return NS_OK;
}
@@ -591,7 +600,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
NS_IMETHODIMP
nsDocShell::GetIsNavigating(bool* aOut) {
*aOut = mIsNavigating;
-@@ -4754,7 +4979,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
+@@ -4734,7 +4959,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
}
void nsDocShell::ActivenessMaybeChanged() {
@@ -600,7 +609,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
if (RefPtr<PresShell> presShell = GetPresShell()) {
presShell->ActivenessMaybeChanged();
}
-@@ -6676,6 +6901,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
+@@ -6672,6 +6897,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
return false; // no entry to save into
}
@@ -611,7 +620,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
MOZ_ASSERT(!mozilla::SessionHistoryInParent(),
"mOSHE cannot be non-null with SHIP");
nsCOMPtr<nsIDocumentViewer> viewer = mOSHE->GetDocumentViewer();
-@@ -8408,6 +8637,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
+@@ -8401,6 +8630,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
true, // aForceNoOpener
getter_AddRefs(newBC));
MOZ_ASSERT(!newBC);
@@ -624,7 +633,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
return rv;
}
-@@ -9528,6 +9763,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
+@@ -9533,6 +9768,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
nsINetworkPredictor::PREDICT_LOAD, attrs, nullptr);
nsCOMPtr<nsIRequest> req;
@@ -641,7 +650,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
rv = DoURILoad(aLoadState, aCacheKey, getter_AddRefs(req));
if (NS_SUCCEEDED(rv)) {
-@@ -12691,6 +12936,9 @@ class OnLinkClickEvent : public Runnable {
+@@ -12710,6 +12955,9 @@ class OnLinkClickEvent : public Runnable {
mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied,
mTriggeringPrincipal);
}
@@ -651,7 +660,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
return NS_OK;
}
-@@ -12775,6 +13023,8 @@ nsresult nsDocShell::OnLinkClick(
+@@ -12792,6 +13040,8 @@ nsresult nsDocShell::OnLinkClick(
nsCOMPtr<nsIRunnable> ev =
new OnLinkClickEvent(this, aContent, loadState, noOpenerImplied,
aIsTrusted, aTriggeringPrincipal);
@@ -661,7 +670,7 @@ index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161b
}
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
-index f01e3426c4bc3a2145629be1bc7cf1d9cfd4c8bf..d4d76e391034203a67d4f2def714ba6efb1bea7b 100644
+index 0ea84df4dde885fd8e7f7e6045db56a0fa6b2691..b00bc444a5a25e63f98e583959d5f6812caf1815 100644
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -15,6 +15,7 @@
@@ -723,7 +732,7 @@ index f01e3426c4bc3a2145629be1bc7cf1d9cfd4c8bf..d4d76e391034203a67d4f2def714ba6e
bool mAllowKeywordFixup : 1;
bool mDisableMetaRefreshWhenInactive : 1;
diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl
-index 024c0f544c54b7cfb0eeb64e5dc39a0b5d2a5950..63adaf24fd6dfd75f559323ae3c07e265f9f8241 100644
+index fdc04f16c6f547077ad8c872f9357d85d4513c50..199f8fdb0670265c715f99f5cac1a2b2f22c963d 100644
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -44,6 +44,7 @@ interface nsIURI;
@@ -734,7 +743,7 @@ index 024c0f544c54b7cfb0eeb64e5dc39a0b5d2a5950..63adaf24fd6dfd75f559323ae3c07e26
interface nsIEditor;
interface nsIEditingSession;
interface nsIInputStream;
-@@ -729,6 +730,36 @@ interface nsIDocShell : nsIDocShellTreeItem
+@@ -719,6 +720,36 @@ interface nsIDocShell : nsIDocShellTreeItem
*/
void synchronizeLayoutHistoryState();
@@ -772,10 +781,10 @@ index 024c0f544c54b7cfb0eeb64e5dc39a0b5d2a5950..63adaf24fd6dfd75f559323ae3c07e26
* 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 8cbf8b8075488fe1edc33b558f90224bd992117c..72198d51ca3c74eb855c928319551505422d6ebd 100644
+index c6cb09e1955d371cd19f563b30b486bcc2318304..d836946872b8e32360a925be5084472191e04f05 100644
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
-@@ -3680,6 +3680,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
+@@ -3674,6 +3674,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
}
void Document::ApplySettingsFromCSP(bool aSpeculative) {
@@ -785,7 +794,7 @@ index 8cbf8b8075488fe1edc33b558f90224bd992117c..72198d51ca3c74eb855c928319551505
nsresult rv = NS_OK;
if (!aSpeculative) {
// 1) apply settings from regular CSP
-@@ -3737,6 +3740,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
+@@ -3731,6 +3734,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
MOZ_ASSERT(!mScriptGlobalObject,
"CSP must be initialized before mScriptGlobalObject is set!");
@@ -797,7 +806,7 @@ index 8cbf8b8075488fe1edc33b558f90224bd992117c..72198d51ca3c74eb855c928319551505
// If this is a data document - no need to set CSP.
if (mLoadedAsData) {
return NS_OK;
-@@ -4522,6 +4530,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
+@@ -4501,6 +4509,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
return false;
}
@@ -808,7 +817,7 @@ index 8cbf8b8075488fe1edc33b558f90224bd992117c..72198d51ca3c74eb855c928319551505
if (!fm->IsInActiveWindow(bc)) {
return false;
}
-@@ -18892,6 +18904,66 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
+@@ -18878,6 +18890,66 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
return PreferenceSheet::PrefsFor(*this).mColorScheme;
}
@@ -876,7 +885,7 @@ index 8cbf8b8075488fe1edc33b558f90224bd992117c..72198d51ca3c74eb855c928319551505
if (!sLoadingForegroundTopLevelContentDocument) {
return false;
diff --git a/dom/base/Document.h b/dom/base/Document.h
-index 0b0d0ca3d0fdb1d5c2b88b77e78cd164230e040a..82d340aba7e4f37fde2dae09bd831ccb24302a12 100644
+index 7eea29947d91f6b99363d7bf4c69f4e7b3276636..227314db13631b825b9b0701e8f9e5e630f78a72 100644
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
@@ -4035,6 +4035,9 @@ class Document : public nsINode,
@@ -890,10 +899,10 @@ index 0b0d0ca3d0fdb1d5c2b88b77e78cd164230e040a..82d340aba7e4f37fde2dae09bd831ccb
static bool AutomaticStorageAccessPermissionCanBeGranted(
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
-index 14a00b8ed85f69312a89990acbb5e0f9755bd832..c97bb6cdd125e755333254a954777b06815352c7 100644
+index a7229fe412644212747646bee5e111cb427bab52..4fdefb186804ed39d4670cca32e495d95f3546d6 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
-@@ -338,14 +338,18 @@ void Navigator::GetAppName(nsAString& aAppName) const {
+@@ -344,14 +344,18 @@ void Navigator::GetAppName(nsAString& aAppName) const {
* for more detail.
*/
/* static */
@@ -914,7 +923,7 @@ index 14a00b8ed85f69312a89990acbb5e0f9755bd832..c97bb6cdd125e755333254a954777b06
// Split values on commas.
for (nsDependentSubstring lang :
-@@ -397,7 +401,13 @@ void Navigator::GetLanguage(nsAString& aLanguage) {
+@@ -403,7 +407,13 @@ void Navigator::GetLanguage(nsAString& aLanguage) {
}
void Navigator::GetLanguages(nsTArray<nsString>& aLanguages) {
@@ -929,7 +938,7 @@ index 14a00b8ed85f69312a89990acbb5e0f9755bd832..c97bb6cdd125e755333254a954777b06
// The returned value is cached by the binding code. The window listens to the
// accept languages change and will clear the cache when needed. It has to
-@@ -2281,7 +2291,8 @@ bool Navigator::Webdriver() {
+@@ -2308,7 +2318,8 @@ bool Navigator::Webdriver() {
}
#endif
@@ -940,10 +949,10 @@ index 14a00b8ed85f69312a89990acbb5e0f9755bd832..c97bb6cdd125e755333254a954777b06
AutoplayPolicy Navigator::GetAutoplayPolicy(AutoplayPolicyMediaType aType) {
diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h
-index e559dc4d6aef61b7012a27f3d6c3186a12a15319..9798a50789ce972c4d9e94419e20a5cde4cd552a 100644
+index 4c400554f9b129f4482b513b46b90b780f2b8796..6efdca2363d83327562751757753abd602c80ddd 100644
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
-@@ -215,7 +215,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
+@@ -218,7 +218,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
StorageManager* Storage();
@@ -953,10 +962,10 @@ index e559dc4d6aef61b7012a27f3d6c3186a12a15319..9798a50789ce972c4d9e94419e20a5cd
dom::MediaCapabilities* MediaCapabilities();
dom::MediaSession* MediaSession();
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
-index d2c863bd6549a7e2fbbc09deb99c93cdde6a7199..2639a0e3160250d3cd3c8a8074147039405931a8 100644
+index 1edbffd5353a77fd84bc9abecb0628557512fa67..33376c1d44dbc0561c210e48401d6b173924067d 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
-@@ -8731,7 +8731,8 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8796,7 +8796,8 @@ nsresult nsContentUtils::SendMouseEvent(
bool aIgnoreRootScrollFrame, float aPressure,
unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,
PreventDefaultResult* aPreventDefault, bool aIsDOMEventSynthesized,
@@ -966,7 +975,7 @@ index d2c863bd6549a7e2fbbc09deb99c93cdde6a7199..2639a0e3160250d3cd3c8a8074147039
nsPoint offset;
nsCOMPtr<nsIWidget> widget = GetWidget(aPresShell, &offset);
if (!widget) return NS_ERROR_FAILURE;
-@@ -8739,6 +8740,7 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8804,6 +8805,7 @@ nsresult nsContentUtils::SendMouseEvent(
EventMessage msg;
Maybe<WidgetMouseEvent::ExitFrom> exitFrom;
bool contextMenuKey = false;
@@ -974,7 +983,7 @@ index d2c863bd6549a7e2fbbc09deb99c93cdde6a7199..2639a0e3160250d3cd3c8a8074147039
if (aType.EqualsLiteral("mousedown")) {
msg = eMouseDown;
} else if (aType.EqualsLiteral("mouseup")) {
-@@ -8763,6 +8765,12 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8828,6 +8830,12 @@ nsresult nsContentUtils::SendMouseEvent(
msg = eMouseHitTest;
} else if (aType.EqualsLiteral("MozMouseExploreByTouch")) {
msg = eMouseExploreByTouch;
@@ -987,7 +996,7 @@ index d2c863bd6549a7e2fbbc09deb99c93cdde6a7199..2639a0e3160250d3cd3c8a8074147039
} else {
return NS_ERROR_FAILURE;
}
-@@ -8771,12 +8779,21 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8836,12 +8844,21 @@ nsresult nsContentUtils::SendMouseEvent(
aInputSourceArg = MouseEvent_Binding::MOZ_SOURCE_MOUSE;
}
@@ -1011,7 +1020,7 @@ index d2c863bd6549a7e2fbbc09deb99c93cdde6a7199..2639a0e3160250d3cd3c8a8074147039
event.pointerId = aIdentifier;
event.mModifiers = GetWidgetModifiers(aModifiers);
event.mButton = aButton;
-@@ -8787,8 +8804,10 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8852,8 +8869,10 @@ nsresult nsContentUtils::SendMouseEvent(
event.mPressure = aPressure;
event.mInputSource = aInputSourceArg;
event.mClickCount = aClickCount;
@@ -1023,10 +1032,10 @@ index d2c863bd6549a7e2fbbc09deb99c93cdde6a7199..2639a0e3160250d3cd3c8a8074147039
nsPresContext* presContext = aPresShell->GetPresContext();
if (!presContext) return NS_ERROR_FAILURE;
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
-index 4291d2c5d1e17b75b2a0f3f26c84b0fbea03b027..18b311c64f825977e2c01ccc9dbfd6cd97ed8778 100644
+index ef3c1fd7cbb3a6c457ec7d70a50fd412077f4279..bd4e6e5db6273f024684169439fd31e0095b45f4 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
-@@ -3065,7 +3065,8 @@ class nsContentUtils {
+@@ -3078,7 +3078,8 @@ class nsContentUtils {
int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure,
unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,
mozilla::PreventDefaultResult* aPreventDefault,
@@ -1037,10 +1046,10 @@ index 4291d2c5d1e17b75b2a0f3f26c84b0fbea03b027..18b311c64f825977e2c01ccc9dbfd6cd
static void FirePageShowEventForFrameLoaderSwap(
nsIDocShellTreeItem* aItem,
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp
-index 9bc8340b9009717e0feecd5c14ff02be07a03daf..70ea04c7f11e6ccfadf72a82ec1741fac10ef5fd 100644
+index 6d611b4a8485325435267c89c88b5511bb37d2f2..13640d6bd8fc34797f5f0088bf12ff016b4b3ae7 100644
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
-@@ -685,6 +685,26 @@ nsDOMWindowUtils::GetPresShellId(uint32_t* aPresShellId) {
+@@ -684,6 +684,26 @@ nsDOMWindowUtils::GetPresShellId(uint32_t* aPresShellId) {
return NS_ERROR_FAILURE;
}
@@ -1067,7 +1076,7 @@ index 9bc8340b9009717e0feecd5c14ff02be07a03daf..70ea04c7f11e6ccfadf72a82ec1741fa
NS_IMETHODIMP
nsDOMWindowUtils::SendMouseEvent(
const nsAString& aType, float aX, float aY, int32_t aButton,
-@@ -699,7 +719,7 @@ nsDOMWindowUtils::SendMouseEvent(
+@@ -698,7 +718,7 @@ nsDOMWindowUtils::SendMouseEvent(
aOptionalArgCount >= 7 ? aIdentifier : DEFAULT_MOUSE_POINTER_ID, false,
aPreventDefault, aOptionalArgCount >= 4 ? aIsDOMEventSynthesized : true,
aOptionalArgCount >= 5 ? aIsWidgetEventSynthesized : false,
@@ -1076,7 +1085,7 @@ index 9bc8340b9009717e0feecd5c14ff02be07a03daf..70ea04c7f11e6ccfadf72a82ec1741fa
}
NS_IMETHODIMP
-@@ -717,7 +737,7 @@ nsDOMWindowUtils::SendMouseEventToWindow(
+@@ -716,7 +736,7 @@ nsDOMWindowUtils::SendMouseEventToWindow(
aOptionalArgCount >= 7 ? aIdentifier : DEFAULT_MOUSE_POINTER_ID, true,
nullptr, aOptionalArgCount >= 4 ? aIsDOMEventSynthesized : true,
aOptionalArgCount >= 5 ? aIsWidgetEventSynthesized : false,
@@ -1085,7 +1094,7 @@ index 9bc8340b9009717e0feecd5c14ff02be07a03daf..70ea04c7f11e6ccfadf72a82ec1741fa
}
NS_IMETHODIMP
-@@ -726,13 +746,13 @@ nsDOMWindowUtils::SendMouseEventCommon(
+@@ -725,13 +745,13 @@ nsDOMWindowUtils::SendMouseEventCommon(
int32_t aClickCount, int32_t aModifiers, bool aIgnoreRootScrollFrame,
float aPressure, unsigned short aInputSourceArg, uint32_t aPointerId,
bool aToWindow, bool* aPreventDefault, bool aIsDOMEventSynthesized,
@@ -1115,10 +1124,10 @@ index 63968c9b7a4e418e4c0de6e7a75fa215a36a9105..decf3ea3833ccdffd49a7aded2d600f9
MOZ_CAN_RUN_SCRIPT
nsresult SendTouchEventCommon(
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
-index 4e2d60469346772d6dad49b38b06a37c9f819a79..5123a1b40a951f2aa10b1b018c4e72abf18d0d27 100644
+index 587f03849d72d72020e89f4456dec481c9ede9f6..d0a910d3ae25fd4f6545f6d9130c8be04a06ed0e 100644
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
-@@ -1678,6 +1678,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,
+@@ -1684,6 +1684,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,
(GetActiveBrowsingContext() == newRootBrowsingContext);
}
@@ -1129,7 +1138,7 @@ index 4e2d60469346772d6dad49b38b06a37c9f819a79..5123a1b40a951f2aa10b1b018c4e72ab
// Exit fullscreen if a website focuses another window
if (StaticPrefs::full_screen_api_exit_on_windowRaise() &&
!isElementInActiveWindow && (aFlags & FLAG_RAISE)) {
-@@ -2263,6 +2267,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
+@@ -2269,6 +2273,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
bool aIsLeavingDocument, bool aAdjustWidget,
bool aRemainActive, Element* aElementToFocus,
uint64_t aActionId) {
@@ -1137,7 +1146,7 @@ index 4e2d60469346772d6dad49b38b06a37c9f819a79..5123a1b40a951f2aa10b1b018c4e72ab
LOGFOCUS(("<<Blur begin actionid: %" PRIu64 ">>", aActionId));
// hold a reference to the focused content, which may be null
-@@ -2309,6 +2314,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
+@@ -2315,6 +2320,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
return true;
}
@@ -1149,7 +1158,7 @@ index 4e2d60469346772d6dad49b38b06a37c9f819a79..5123a1b40a951f2aa10b1b018c4e72ab
// Keep a ref to presShell since dispatching the DOM event may cause
// the document to be destroyed.
RefPtr<PresShell> presShell = docShell->GetPresShell();
-@@ -2986,7 +2996,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
+@@ -2992,7 +3002,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
}
}
@@ -1161,7 +1170,7 @@ index 4e2d60469346772d6dad49b38b06a37c9f819a79..5123a1b40a951f2aa10b1b018c4e72ab
// 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 c678a0a94150e73c6f5cd086c91a9848d4d0cfb8..0b362540bab495bffcf8a336351650f5897e0af5 100644
+index 460ccc17f2cd34f172215aaf5616badaa44f8ca5..d294373ca9b8987dd8bf056f4dae72c27903dcd7 100644
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -2514,10 +2514,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
@@ -1206,7 +1215,7 @@ index c678a0a94150e73c6f5cd086c91a9848d4d0cfb8..0b362540bab495bffcf8a336351650f5
void nsGlobalWindowOuter::SetDocShell(nsDocShell* aDocShell) {
diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h
-index 3c26344c3d45c57606d498008946fc480cd2eb96..b02909587341860ad805072755761474029f6eec 100644
+index 0039d6d91b23953afbd6aec2b4d1f064db3c3b1c..7a6c5da16651d34ea60c69331365d94886da1993 100644
--- a/dom/base/nsGlobalWindowOuter.h
+++ b/dom/base/nsGlobalWindowOuter.h
@@ -314,6 +314,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,
@@ -1218,10 +1227,10 @@ index 3c26344c3d45c57606d498008946fc480cd2eb96..b02909587341860ad805072755761474
// Outer windows only.
virtual void EnsureSizeAndPositionUpToDate() override;
diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
-index 6c77574df7973f12a5afd28bd9eb2bf5c4ae91ff..76feda136c7e39b0ebe3333714b41347ecc6aef2 100644
+index 600fce143a0e1e35a18b980211686436be08533f..ec6f7c60d0a3756dcf8892e4690281e1a65f9b6a 100644
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
-@@ -1388,6 +1388,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
+@@ -1387,6 +1387,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
mozilla::GetBoxQuadsFromWindowOrigin(this, aOptions, aResult, aRv);
}
@@ -1284,10 +1293,10 @@ index 6c77574df7973f12a5afd28bd9eb2bf5c4ae91ff..76feda136c7e39b0ebe3333714b41347
DOMQuad& aQuad, const GeometryNode& aFrom,
const ConvertCoordinateOptions& aOptions, CallerType aCallerType,
diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h
-index d2a2fd008d15b5aa4534df1d7298108980bff41d..df86f5d534b4718bf1912da305fa2548a04637dc 100644
+index 2906bbb56c86cd287620b4bd067366f6703299d7..06697f07c7544c816181fa9849ce178bf38303aa 100644
--- a/dom/base/nsINode.h
+++ b/dom/base/nsINode.h
-@@ -2265,6 +2265,10 @@ class nsINode : public mozilla::dom::EventTarget {
+@@ -2282,6 +2282,10 @@ class nsINode : public mozilla::dom::EventTarget {
nsTArray<RefPtr<DOMQuad>>& aResult,
ErrorResult& aRv);
@@ -1468,7 +1477,7 @@ index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1
~Geolocation();
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
-index 958601616b8f5749ae704b0cdd8a0c5a397dc021..87fa7c434f852b4203beec320d7b27bbcfc108ef 100644
+index 30093e5d408caa054a04adddf63ce2bec384eed6..2852746b6f5b50981dba29a65ce25c1fd55390e3 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -57,6 +57,7 @@
@@ -1494,7 +1503,7 @@ index 958601616b8f5749ae704b0cdd8a0c5a397dc021..87fa7c434f852b4203beec320d7b27bb
return NS_OK;
}
diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl
-index 27b9ff5acf8b1100a3b55d55cc390a15b2a3e3a4..7e8e2264dd4bb814cca5b00de80fcd5ce5c4be4d 100644
+index 9d185e8e7edcde63f0d2e0c05a32dfddaf71609c..9d48d2e33575c7f214152c6f8140f9a3a3313b44 100644
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
@@ -373,6 +373,26 @@ interface nsIDOMWindowUtils : nsISupports {
@@ -1525,10 +1534,10 @@ index 27b9ff5acf8b1100a3b55d55cc390a15b2a3e3a4..7e8e2264dd4bb814cca5b00de80fcd5c
* touchstart, touchend, touchmove, and touchcancel
*
diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp
-index 3d1f399edb4feb0793c214917464be2599739e6e..1d4a176b1a111a9415710f1bf1db1323620e4ee0 100644
+index 27fb1239dbd2a635688d022602d4a49dfff0560a..39f9dd48eef038503a50632c5e1395fecea6cae3 100644
--- a/dom/ipc/BrowserChild.cpp
+++ b/dom/ipc/BrowserChild.cpp
-@@ -1652,6 +1652,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent,
+@@ -1639,6 +1639,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent,
if (postLayerization) {
postLayerization->Register();
}
@@ -1565,15 +1574,12 @@ index 5aa445d2e0a6169e57c44569974d557b3baf7064..671f71979b407f0ca17c66f13805e851
}
diff --git a/dom/media/systemservices/video_engine/desktop_capture_impl.cc b/dom/media/systemservices/video_engine/desktop_capture_impl.cc
-index a966ff06d4a52e2ff70ce71df3a6a607a67e3eda..eb6bb16413df43217ddd85048c02d41d15e8431f 100644
+index d4b40fda96ea759eb92e1351e1046a9e0b85689b..b2123a3be05b2622a5e07d5ee32752d0feaaa57f 100644
--- a/dom/media/systemservices/video_engine/desktop_capture_impl.cc
+++ b/dom/media/systemservices/video_engine/desktop_capture_impl.cc
-@@ -135,11 +135,12 @@ int32_t ScreenDeviceInfoImpl::GetOrientation(const char* aDeviceUniqueIdUTF8,
- return 0;
- }
+@@ -137,9 +137,10 @@ int32_t ScreenDeviceInfoImpl::GetOrientation(const char* aDeviceUniqueIdUTF8,
--VideoCaptureModule* DesktopCaptureImpl::Create(const int32_t aModuleId,
-+VideoCaptureModuleEx* DesktopCaptureImpl::Create(const int32_t aModuleId,
+ DesktopCaptureImpl* DesktopCaptureImpl::Create(const int32_t aModuleId,
const char* aUniqueId,
- const CaptureDeviceType aType) {
+ const CaptureDeviceType aType,
@@ -1653,7 +1659,7 @@ index a966ff06d4a52e2ff70ce71df3a6a607a67e3eda..eb6bb16413df43217ddd85048c02d41d
MOZ_ASSERT(!capturer == !mCaptureThread);
if (!capturer) {
-@@ -654,6 +672,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result aResult,
+@@ -663,6 +681,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result aResult,
frameInfo.height = aFrame->size().height();
frameInfo.videoType = VideoType::kARGB;
@@ -1670,18 +1676,18 @@ index a966ff06d4a52e2ff70ce71df3a6a607a67e3eda..eb6bb16413df43217ddd85048c02d41d
frameInfo.width * frameInfo.height * DesktopFrame::kBytesPerPixel;
diff --git a/dom/media/systemservices/video_engine/desktop_capture_impl.h b/dom/media/systemservices/video_engine/desktop_capture_impl.h
-index 7292f6c8a70298d4bf103080804843fa9bba1d15..7a50fee0d2fcaad475302d010892800a6e3c4e75 100644
+index 9aebaa39321839eb3beb503fc4ed33e303bb0deb..1dd75f3cdb8078b01c4d43a0ac3d8a6ea3ec47ab 100644
--- a/dom/media/systemservices/video_engine/desktop_capture_impl.h
+++ b/dom/media/systemservices/video_engine/desktop_capture_impl.h
-@@ -24,6 +24,7 @@
- #include "api/video/video_sink_interface.h"
+@@ -25,6 +25,7 @@
#include "modules/desktop_capture/desktop_capturer.h"
#include "modules/video_capture/video_capture.h"
+ #include "rtc_base/synchronization/mutex.h"
+#include "rtc_base/deprecated/recursive_critical_section.h"
#include "desktop_device_info.h"
- #include "mozilla/DataMutex.h"
-@@ -43,6 +44,21 @@ namespace webrtc {
+ #include "MediaEngineSource.h"
+@@ -45,6 +46,33 @@ namespace webrtc {
class VideoCaptureEncodeInterface;
@@ -1698,12 +1704,24 @@ index 7292f6c8a70298d4bf103080804843fa9bba1d15..7a50fee0d2fcaad475302d010892800a
+
+ virtual void RegisterRawFrameCallback(RawFrameCallback* rawFrameCallback) = 0;
+ virtual void DeRegisterRawFrameCallback(RawFrameCallback* rawFrameCallback) = 0;
++ int32_t StartCaptureCounted(const VideoCaptureCapability& aCapability) {
++ ++capture_counter_;
++ return capture_counter_ == 1 ? StartCapture(aCapability) : 0;
++ }
++
++ int32_t StopCaptureCounted() {
++ --capture_counter_;
++ return capture_counter_ == 0 ? StopCapture() : 0;
++ }
++
++ private:
++ int32_t capture_counter_ = 0;
+};
+
// simulate deviceInfo interface for video engine, bridge screen/application and
// real screen/application device info
-@@ -158,13 +174,13 @@ class BrowserDeviceInfoImpl : public VideoCaptureModule::DeviceInfo {
+@@ -160,13 +188,13 @@ class BrowserDeviceInfoImpl : public VideoCaptureModule::DeviceInfo {
// As with video, DesktopCaptureImpl is a proxy for screen sharing
// and follows the video pipeline design
class DesktopCaptureImpl : public DesktopCapturer::Callback,
@@ -1712,15 +1730,14 @@ index 7292f6c8a70298d4bf103080804843fa9bba1d15..7a50fee0d2fcaad475302d010892800a
public:
/* Create a screen capture modules object
*/
-- static VideoCaptureModule* Create(
-+ static VideoCaptureModuleEx* Create(
+ static DesktopCaptureImpl* Create(
const int32_t aModuleId, const char* aUniqueId,
- const mozilla::camera::CaptureDeviceType aType);
+ const mozilla::camera::CaptureDeviceType aType, bool aCaptureCursor = true);
[[nodiscard]] static std::shared_ptr<VideoCaptureModule::DeviceInfo>
CreateDeviceInfo(const int32_t aId,
-@@ -178,6 +194,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -180,6 +208,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
void DeRegisterCaptureDataCallback(
rtc::VideoSinkInterface<VideoFrame>* aCallback) override;
int32_t StopCaptureIfAllClientsClose() override;
@@ -1729,7 +1746,7 @@ index 7292f6c8a70298d4bf103080804843fa9bba1d15..7a50fee0d2fcaad475302d010892800a
int32_t SetCaptureRotation(VideoRotation aRotation) override;
bool SetApplyRotation(bool aEnable) override;
-@@ -200,7 +218,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -203,7 +233,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
protected:
DesktopCaptureImpl(const int32_t aId, const char* aUniqueId,
@@ -1739,7 +1756,7 @@ index 7292f6c8a70298d4bf103080804843fa9bba1d15..7a50fee0d2fcaad475302d010892800a
virtual ~DesktopCaptureImpl();
private:
-@@ -208,6 +227,9 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -211,6 +242,9 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
static constexpr uint32_t kMaxDesktopCaptureCpuUsage = 50;
void InitOnThread(std::unique_ptr<DesktopCapturer> aCapturer, int aFramerate);
void ShutdownOnThread();
@@ -1749,7 +1766,7 @@ index 7292f6c8a70298d4bf103080804843fa9bba1d15..7a50fee0d2fcaad475302d010892800a
// DesktopCapturer::Callback interface.
void OnCaptureResult(DesktopCapturer::Result aResult,
std::unique_ptr<DesktopFrame> aFrame) override;
-@@ -215,6 +237,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -218,6 +252,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
// Notifies all mCallbacks of OnFrame(). mCaptureThread only.
void NotifyOnFrame(const VideoFrame& aFrame);
@@ -1803,7 +1820,7 @@ index 3b39538e51840cd9b1685b2efd2ff2e9ec83608a..c7bf4f2d53b58bbacb22b3ebebf6f3fc
return aGlobalOrNull;
diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp
-index 11d09909f73fee425fd0f50b384c396a52e02a36..b0e668881bcd3b850de709ebf2557ae8391b8fe8 100644
+index f4aecfaf44d40d651f816c56db4b46c605754132..ef017504972454c12de7d6a7ff38a76a8253a62d 100644
--- a/dom/security/nsCSPUtils.cpp
+++ b/dom/security/nsCSPUtils.cpp
@@ -22,6 +22,7 @@
@@ -1812,9 +1829,9 @@ index 11d09909f73fee425fd0f50b384c396a52e02a36..b0e668881bcd3b850de709ebf2557ae8
#include "nsWhitespaceTokenizer.h"
+#include "nsDocShell.h"
+ #include "mozilla/Assertions.h"
#include "mozilla/Components.h"
- #include "mozilla/dom/CSPDictionariesBinding.h"
-@@ -132,6 +133,11 @@ void CSP_ApplyMetaCSPToDoc(mozilla::dom::Document& aDoc,
+@@ -133,6 +134,11 @@ void CSP_ApplyMetaCSPToDoc(mozilla::dom::Document& aDoc,
return;
}
@@ -1850,10 +1867,10 @@ index 2f71b284ee5f7e11f117c447834b48355784448c..2640bd57123c2b03bf4b06a2419cd020
* returned quads are further translated relative to the window
* origin -- which is not the layout origin. Further translation
diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp
-index 321895e700a3129febba908fd7f35664c56ff637..375596973393158c7ff4586105451c336f63b5a0 100644
+index 4a7ebb25233ce685e73d53085e22337e9ad8bc59..0b7b24a4da5511ff2fa6695eb55f5533b2e574ab 100644
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
-@@ -1001,7 +1001,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {
+@@ -998,7 +998,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {
AssertIsOnMainThread();
nsTArray<nsString> languages;
@@ -1862,7 +1879,7 @@ index 321895e700a3129febba908fd7f35664c56ff637..375596973393158c7ff4586105451c33
RuntimeService* runtime = RuntimeService::GetService();
if (runtime) {
-@@ -1188,8 +1188,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
+@@ -1185,8 +1185,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
}
// The navigator overridden properties should have already been read.
@@ -1886,7 +1903,7 @@ index 321895e700a3129febba908fd7f35664c56ff637..375596973393158c7ff4586105451c33
template <typename Func>
void RuntimeService::BroadcastAllWorkers(const Func& aFunc) {
AssertIsOnMainThread();
-@@ -2310,6 +2316,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(
+@@ -2314,6 +2320,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(
}
}
@@ -1928,7 +1945,7 @@ index d10dabb5c5ff8e17851edf2bd2efc08e74584d8e..53c4070c5fde43b27fb8fbfdcf4c23d8
bool IsWorkerGlobal(JSObject* global);
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
-index df248acda417ae2f304a7f5fa5d067912e402431..5a5b07409c6bca2c8cd80f4595c4e524b56566ef 100644
+index 7fbfdb0eeed2fc9d9a6ba12192150d5bdeed40b3..c31ae2724d09036ec2ba0b71cd94f648e9b90868 100644
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -682,6 +682,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable {
@@ -1938,7 +1955,7 @@ index df248acda417ae2f304a7f5fa5d067912e402431..5a5b07409c6bca2c8cd80f4595c4e524
+class ResetDefaultLocaleRunnable final : public WorkerControlRunnable {
+ public:
+ explicit ResetDefaultLocaleRunnable(WorkerPrivate* aWorkerPrivate)
-+ : WorkerControlRunnable(aWorkerPrivate, "ResetDefaultLocaleRunnable", WorkerThread) {}
++ : WorkerControlRunnable("ResetDefaultLocaleRunnable") {}
+
+ virtual bool WorkerRun(JSContext* aCx,
+ WorkerPrivate* aWorkerPrivate) override {
@@ -1947,10 +1964,10 @@ index df248acda417ae2f304a7f5fa5d067912e402431..5a5b07409c6bca2c8cd80f4595c4e524
+ }
+};
+
- class UpdateLanguagesRunnable final : public WorkerRunnable {
+ class UpdateLanguagesRunnable final : public WorkerThreadRunnable {
nsTArray<nsString> mLanguages;
-@@ -1992,6 +2004,16 @@ void WorkerPrivate::UpdateContextOptions(
+@@ -2091,6 +2103,16 @@ void WorkerPrivate::UpdateContextOptions(
}
}
@@ -1959,7 +1976,7 @@ index df248acda417ae2f304a7f5fa5d067912e402431..5a5b07409c6bca2c8cd80f4595c4e524
+
+ RefPtr<ResetDefaultLocaleRunnable> runnable =
+ new ResetDefaultLocaleRunnable(this);
-+ if (!runnable->Dispatch()) {
++ if (!runnable->Dispatch(this)) {
+ NS_WARNING("Failed to reset default locale in worker!");
+ }
+}
@@ -1967,7 +1984,7 @@ index df248acda417ae2f304a7f5fa5d067912e402431..5a5b07409c6bca2c8cd80f4595c4e524
void WorkerPrivate::UpdateLanguages(const nsTArray<nsString>& aLanguages) {
AssertIsOnParentThread();
-@@ -5509,6 +5531,15 @@ void WorkerPrivate::UpdateContextOptionsInternal(
+@@ -5667,6 +5689,15 @@ void WorkerPrivate::UpdateContextOptionsInternal(
}
}
@@ -1984,10 +2001,10 @@ index df248acda417ae2f304a7f5fa5d067912e402431..5a5b07409c6bca2c8cd80f4595c4e524
const nsTArray<nsString>& aLanguages) {
WorkerGlobalScope* globalScope = GlobalScope();
diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h
-index ce754ba9f6c23544f9c4b0393e3a3d1f9dcd24c1..caa917248fdd6594792d17c23e75329f35ae1e75 100644
+index 57212e01fb75da52187195acfbe052b19464286a..bc75882ee661d5c987187cd11b388443227d59bc 100644
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
-@@ -417,6 +417,8 @@ class WorkerPrivate final
+@@ -418,6 +418,8 @@ class WorkerPrivate final
void UpdateContextOptionsInternal(JSContext* aCx,
const JS::ContextOptions& aContextOptions);
@@ -1996,7 +2013,7 @@ index ce754ba9f6c23544f9c4b0393e3a3d1f9dcd24c1..caa917248fdd6594792d17c23e75329f
void UpdateLanguagesInternal(const nsTArray<nsString>& aLanguages);
void UpdateJSWorkerMemoryParameterInternal(JSContext* aCx, JSGCParamKey key,
-@@ -1034,6 +1036,8 @@ class WorkerPrivate final
+@@ -1045,6 +1047,8 @@ class WorkerPrivate final
void UpdateContextOptions(const JS::ContextOptions& aContextOptions);
@@ -2058,7 +2075,7 @@ index 523e84c8c93f4221701f90f2e8ee146ec8e1adbd..98d5b1176e5378431b859a2dbd4d4e77
inline ClippedTime TimeClip(double time);
diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp
-index 17528b0fd99ce8274e702746ff5674de4c3d4f2d..37fa52ae07381bec3504136b9bec0aa1ca110d6b 100644
+index 6ca6c31830066f9677988daca8566e93a8335c26..3f963dbf6127c997810e380802e56b023b5db4c8 100644
--- a/js/src/debugger/Object.cpp
+++ b/js/src/debugger/Object.cpp
@@ -2468,7 +2468,11 @@ Maybe<Completion> DebuggerObject::call(JSContext* cx,
@@ -2074,7 +2091,7 @@ index 17528b0fd99ce8274e702746ff5674de4c3d4f2d..37fa52ae07381bec3504136b9bec0aa1
}
diff --git a/js/src/vm/DateTime.cpp b/js/src/vm/DateTime.cpp
-index 21ecc2e9f50a16357ace3320335d31a4929fc146..c4b1444ce53b20a700d2ff9f18521bd67623e7d2 100644
+index 623a6863a54fb0d653ebe55fd83356f1a8c8be15..1c0ef7b0d3ee2f61de728a68dd704a5d09757b38 100644
--- a/js/src/vm/DateTime.cpp
+++ b/js/src/vm/DateTime.cpp
@@ -186,6 +186,11 @@ void js::DateTimeInfo::internalResetTimeZone(ResetTimeZoneMode mode) {
@@ -2089,7 +2106,7 @@ index 21ecc2e9f50a16357ace3320335d31a4929fc146..c4b1444ce53b20a700d2ff9f18521bd6
void js::DateTimeInfo::updateTimeZone() {
MOZ_ASSERT(timeZoneStatus_ != TimeZoneStatus::Valid);
-@@ -527,10 +532,24 @@ void js::ResetTimeZoneInternal(ResetTimeZoneMode mode) {
+@@ -529,10 +534,24 @@ void js::ResetTimeZoneInternal(ResetTimeZoneMode mode) {
js::DateTimeInfo::resetTimeZone(mode);
}
@@ -2114,7 +2131,7 @@ index 21ecc2e9f50a16357ace3320335d31a4929fc146..c4b1444ce53b20a700d2ff9f18521bd6
#if JS_HAS_INTL_API
# if defined(XP_WIN)
static bool IsOlsonCompatibleWindowsTimeZoneId(std::string_view tz) {
-@@ -748,6 +767,15 @@ static bool ReadTimeZoneLink(std::string_view tz,
+@@ -750,6 +769,15 @@ static bool ReadTimeZoneLink(std::string_view tz,
void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
#if JS_HAS_INTL_API
@@ -2130,7 +2147,7 @@ index 21ecc2e9f50a16357ace3320335d31a4929fc146..c4b1444ce53b20a700d2ff9f18521bd6
// In the future we should not be setting a default ICU time zone at all,
// instead all accesses should go through the appropriate DateTimeInfo
// instance depending on the resist fingerprinting status. For now we return
-@@ -759,7 +787,6 @@ void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
+@@ -761,7 +789,6 @@ void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
if (const char* tzenv = std::getenv("TZ")) {
std::string_view tz(tzenv);
@@ -2178,7 +2195,7 @@ index fd6d7ae078b8f6b3cc46a4a993a1e044a7128c90..4743094e489122dd9ee8ab9a7a175dd7
void internalResyncICUDefaultTimeZone();
diff --git a/layout/base/GeometryUtils.cpp b/layout/base/GeometryUtils.cpp
-index dac899f7558b26d6848da8b98ed8a93555c8751a..2a07d67fa1c2840b25085566e84dc3b2d9b789cf 100644
+index 0ec6ee3eb37c6493d8a25352fd0e54e1927bceab..885dba71bc5815e5f6f3ec2700c376aa119b30d0 100644
--- a/layout/base/GeometryUtils.cpp
+++ b/layout/base/GeometryUtils.cpp
@@ -23,6 +23,7 @@
@@ -2228,10 +2245,10 @@ index dac899f7558b26d6848da8b98ed8a93555c8751a..2a07d67fa1c2840b25085566e84dc3b2
// No boxes to return
return;
diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
-index 7674abb3d07fb1958eed38e730be83a2b56f75f2..f88a1a3bd6f1df7ebbdd836d82c677de043c5f41 100644
+index 6e588cff05c8d6fdaec53a980fce1bc8d2141953..a173b1154e171d7fa5454b27baf85f72a09501a6 100644
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
-@@ -11205,7 +11205,9 @@ bool PresShell::ComputeActiveness() const {
+@@ -11063,7 +11063,9 @@ bool PresShell::ComputeActiveness() const {
if (!browserChild->IsVisible()) {
MOZ_LOG(gLog, LogLevel::Debug,
(" > BrowserChild %p is not visible", browserChild));
@@ -2243,10 +2260,10 @@ index 7674abb3d07fb1958eed38e730be83a2b56f75f2..f88a1a3bd6f1df7ebbdd836d82c677de
// 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 429ad335cc148353b4a094f8fb6eff0dfe48012a..8b45056e6f055aa00bb4e43f0f24e6cbf00d1335 100644
+index 2ed62888d70663f3560fcaa9bc29ff98cb44c323..f5540c38df6a064094e013c841d943c63049dd75 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
-@@ -713,6 +713,10 @@ bool nsLayoutUtils::AllowZoomingForDocument(
+@@ -698,6 +698,10 @@ bool nsLayoutUtils::AllowZoomingForDocument(
!aDocument->GetPresShell()->AsyncPanZoomEnabled()) {
return false;
}
@@ -2257,7 +2274,7 @@ index 429ad335cc148353b4a094f8fb6eff0dfe48012a..8b45056e6f055aa00bb4e43f0f24e6cb
// True if we allow zooming for all documents on this platform, or if we are
// in RDM.
BrowsingContext* bc = aDocument->GetBrowsingContext();
-@@ -9764,6 +9768,9 @@ void nsLayoutUtils::ComputeSystemFont(nsFont* aSystemFont,
+@@ -9794,6 +9798,9 @@ void nsLayoutUtils::ComputeSystemFont(nsFont* aSystemFont,
/* static */
bool nsLayoutUtils::ShouldHandleMetaViewport(const Document* aDocument) {
@@ -2268,10 +2285,10 @@ index 429ad335cc148353b4a094f8fb6eff0dfe48012a..8b45056e6f055aa00bb4e43f0f24e6cb
return StaticPrefs::dom_meta_viewport_enabled() || (bc && bc->InRDMPane());
}
diff --git a/layout/style/GeckoBindings.h b/layout/style/GeckoBindings.h
-index 7bb839ae18835d128dc9285b7f9dc5b5e06335af..09e3979d07447522ace740daf2b818a6c551ceba 100644
+index d273793fc8d92b5c19ec0562730eab249cc41eb8..46b4078c6031318265a8338e01f52ab60bd9c0e8 100644
--- a/layout/style/GeckoBindings.h
+++ b/layout/style/GeckoBindings.h
-@@ -625,6 +625,7 @@ float Gecko_MediaFeatures_GetResolution(const mozilla::dom::Document*);
+@@ -596,6 +596,7 @@ float Gecko_MediaFeatures_GetResolution(const mozilla::dom::Document*);
bool Gecko_MediaFeatures_PrefersReducedMotion(const mozilla::dom::Document*);
bool Gecko_MediaFeatures_PrefersReducedTransparency(
const mozilla::dom::Document*);
@@ -2280,7 +2297,7 @@ index 7bb839ae18835d128dc9285b7f9dc5b5e06335af..09e3979d07447522ace740daf2b818a6
const mozilla::dom::Document*);
mozilla::StylePrefersColorScheme Gecko_MediaFeatures_PrefersColorScheme(
diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
-index fbdde4102dd7872d460760580e93657a6aeb07bd..d51a927f8d5c4788f10ae94543b1630e9dd4420a 100644
+index cc86d1abf6ccfe48530607c41cd675612cbe5582..8cce20c719fee8a0480ae6ea1fd53c6639d0bd7b 100644
--- a/layout/style/nsMediaFeatures.cpp
+++ b/layout/style/nsMediaFeatures.cpp
@@ -260,11 +260,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) {
@@ -2301,10 +2318,10 @@ index fbdde4102dd7872d460760580e93657a6aeb07bd..d51a927f8d5c4788f10ae94543b1630e
bool Gecko_MediaFeatures_PrefersReducedTransparency(const Document* aDocument) {
diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp
-index 6be031113fb1197aa6eecbf6fc109147ca6ee5b1..f836dde97895d4b1177bfcebcaab6420abd855b8 100644
+index 5ff1c5ad8b265f25ab5a18a639e4e5b420d93443..a788218d4f281daee274d14b7dd15f4c19eeddce 100644
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
-@@ -657,7 +657,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
+@@ -691,7 +691,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
mInterceptionInfo(rhs.mInterceptionInfo),
mHasInjectedCookieForCookieBannerHandling(
rhs.mHasInjectedCookieForCookieBannerHandling),
@@ -2314,7 +2331,7 @@ index 6be031113fb1197aa6eecbf6fc109147ca6ee5b1..f836dde97895d4b1177bfcebcaab6420
}
LoadInfo::LoadInfo(
-@@ -2373,4 +2374,16 @@ LoadInfo::SetWasSchemelessInput(bool aWasSchemelessInput) {
+@@ -2416,4 +2417,16 @@ LoadInfo::SetWasSchemelessInput(bool aWasSchemelessInput) {
return NS_OK;
}
@@ -2332,10 +2349,10 @@ index 6be031113fb1197aa6eecbf6fc109147ca6ee5b1..f836dde97895d4b1177bfcebcaab6420
+
} // namespace mozilla::net
diff --git a/netwerk/base/LoadInfo.h b/netwerk/base/LoadInfo.h
-index a8631b09b26708ca10f683f1a9dd6b8467d3fe8e..a0bd72113e3539d815d32382946581ee62f39b6c 100644
+index e6badeeee816bc74af22fb9ef5f88b58f13ac5b7..994216ee9b26e7cbc85b948165051d5d2bc7efb1 100644
--- a/netwerk/base/LoadInfo.h
+++ b/netwerk/base/LoadInfo.h
-@@ -401,6 +401,8 @@ class LoadInfo final : public nsILoadInfo {
+@@ -408,6 +408,8 @@ class LoadInfo final : public nsILoadInfo {
bool mHasInjectedCookieForCookieBannerHandling = false;
bool mWasSchemelessInput = false;
@@ -2345,10 +2362,10 @@ index a8631b09b26708ca10f683f1a9dd6b8467d3fe8e..a0bd72113e3539d815d32382946581ee
// This is exposed solely for testing purposes and should not be used outside of
diff --git a/netwerk/base/TRRLoadInfo.cpp b/netwerk/base/TRRLoadInfo.cpp
-index 920e7623a7f912296fc23361f66ab35a30c35f1e..dfea0d0f7a72da9699615d7ff778e429e7ae40fb 100644
+index 48560a8b3be4ace3aab241373ff1eab0e5bb2187..b2114472b04b4e837b1c7b080ce8718f5f67f43b 100644
--- a/netwerk/base/TRRLoadInfo.cpp
+++ b/netwerk/base/TRRLoadInfo.cpp
-@@ -861,5 +861,15 @@ TRRLoadInfo::SetWasSchemelessInput(bool aWasSchemelessInput) {
+@@ -870,5 +870,15 @@ TRRLoadInfo::SetWasSchemelessInput(bool aWasSchemelessInput) {
return NS_ERROR_NOT_IMPLEMENTED;
}
@@ -2365,10 +2382,10 @@ index 920e7623a7f912296fc23361f66ab35a30c35f1e..dfea0d0f7a72da9699615d7ff778e429
} // namespace net
} // namespace mozilla
diff --git a/netwerk/base/nsILoadInfo.idl b/netwerk/base/nsILoadInfo.idl
-index ddfcb223e6126c943b58e9d198f0e2fa767c3de1..4280b836c55e5778ad4c94226ea537facb19c436 100644
+index 8ff5e556c98689542297517a7bdf57e0a2ccf400..b1429dbe180cbc84cf467991bb24124f5857d62b 100644
--- a/netwerk/base/nsILoadInfo.idl
+++ b/netwerk/base/nsILoadInfo.idl
-@@ -1532,4 +1532,6 @@ interface nsILoadInfo : nsISupports
+@@ -1544,4 +1544,6 @@ interface nsILoadInfo : nsISupports
* Whether the load has gone through the URL bar, where the fixup had to add * the protocol scheme.
*/
[infallible] attribute boolean wasSchemelessInput;
@@ -2376,7 +2393,7 @@ index ddfcb223e6126c943b58e9d198f0e2fa767c3de1..4280b836c55e5778ad4c94226ea537fa
+ [infallible] attribute unsigned long long jugglerLoadIdentifier;
};
diff --git a/netwerk/base/nsINetworkInterceptController.idl b/netwerk/base/nsINetworkInterceptController.idl
-index 946cc95a8806644f88d38a7b1c7b9c0614e3cbff..a7b92019c5bbf356d1bbacfbff8fca9a041cf62a 100644
+index 7f91d2df6f8bb4020c75c132dc8f6bf26625fa1e..ba6569f4be8fc54ec96ee44d5de45a0904c077ba 100644
--- a/netwerk/base/nsINetworkInterceptController.idl
+++ b/netwerk/base/nsINetworkInterceptController.idl
@@ -59,6 +59,7 @@ interface nsIInterceptedChannel : nsISupports
@@ -2388,10 +2405,10 @@ index 946cc95a8806644f88d38a7b1c7b9c0614e3cbff..a7b92019c5bbf356d1bbacfbff8fca9a
/**
* Set the status and reason for the forthcoming synthesized response.
diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp
-index 32d7036ff18828ec8938a8dc0a98ad3297132706..65585e719dda8f62319a5fc34baf69c59e51162c 100644
+index dfd80e8867ec46464ddcfc30316236c824950cb1..a702bbe63cf56984519000854e9f487dcac3cee4 100644
--- a/netwerk/ipc/DocumentLoadListener.cpp
+++ b/netwerk/ipc/DocumentLoadListener.cpp
-@@ -167,6 +167,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext,
+@@ -168,6 +168,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext,
loadInfo->SetHasValidUserGestureActivation(
aLoadState->HasValidUserGestureActivation());
loadInfo->SetIsMetaRefresh(aLoadState->IsMetaRefresh());
@@ -2400,7 +2417,7 @@ index 32d7036ff18828ec8938a8dc0a98ad3297132706..65585e719dda8f62319a5fc34baf69c5
return loadInfo.forget();
}
diff --git a/netwerk/protocol/http/InterceptedHttpChannel.cpp b/netwerk/protocol/http/InterceptedHttpChannel.cpp
-index c58fbc96391f8dcb585bd00b5ae8cba9088abd82..c121c891b61c9d60df770020c4ad09521d2bbfe6 100644
+index 5695d46f924abe6b765f3645d746cc4248051c1c..d28ead55f6a8458f70ca43c693e7396c5dc53858 100644
--- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
+++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
@@ -727,6 +727,14 @@ NS_IMPL_ISUPPORTS(ResetInterceptionHeaderVisitor, nsIHttpHeaderVisitor)
@@ -2438,10 +2455,10 @@ index c58fbc96391f8dcb585bd00b5ae8cba9088abd82..c121c891b61c9d60df770020c4ad0952
if (mPump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) {
mPump->PeekStream(CallTypeSniffers, static_cast<nsIChannel*>(this));
diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp
-index f2c47c42a6b6448ede3a6fef1510a3982336d5af..9e35df57102c93238de2e4d548bbe1205d227f3b 100644
+index f25949e6cc907ff18a76d68fc2e8005bd40146ea..9be4cb34517b06b94c6e145aef8a8ea5d2687d97 100644
--- a/parser/html/nsHtml5TreeOpExecutor.cpp
+++ b/parser/html/nsHtml5TreeOpExecutor.cpp
-@@ -1382,6 +1382,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
+@@ -1389,6 +1389,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
void nsHtml5TreeOpExecutor::AddSpeculationCSP(const nsAString& aCSP) {
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
@@ -2453,10 +2470,10 @@ index f2c47c42a6b6448ede3a6fef1510a3982336d5af..9e35df57102c93238de2e4d548bbe120
nsCOMPtr<nsIContentSecurityPolicy> preloadCsp = mDocument->GetPreloadCsp();
if (!preloadCsp) {
diff --git a/security/manager/ssl/nsCertOverrideService.cpp b/security/manager/ssl/nsCertOverrideService.cpp
-index b8d0bbc3a12f74c19284b26eadada361abeb7946..a50379c57158748684e2ea5065550af81c1e9b86 100644
+index fcc2a45e6de8eaeb1af2404a69bd3df58cf2aec8..d4c1df007bf5993cf9e0dadbe91aa2c38afc42ec 100644
--- a/security/manager/ssl/nsCertOverrideService.cpp
+++ b/security/manager/ssl/nsCertOverrideService.cpp
-@@ -438,7 +438,12 @@ nsCertOverrideService::HasMatchingOverride(
+@@ -437,7 +437,12 @@ nsCertOverrideService::HasMatchingOverride(
bool disableAllSecurityCheck = false;
{
MutexAutoLock lock(mMutex);
@@ -2470,7 +2487,7 @@ index b8d0bbc3a12f74c19284b26eadada361abeb7946..a50379c57158748684e2ea5065550af8
}
if (disableAllSecurityCheck) {
*aIsTemporary = false;
-@@ -650,14 +655,24 @@ static bool IsDebugger() {
+@@ -649,14 +654,24 @@ static bool IsDebugger() {
NS_IMETHODIMP
nsCertOverrideService::
@@ -2573,7 +2590,7 @@ index df1c5e464b845b6a8bfedadb86d0e7aab7fd3ffc..34451e791bb59f635134de702d9e5f64
}
diff --git a/toolkit/components/browser/nsIWebBrowserChrome.idl b/toolkit/components/browser/nsIWebBrowserChrome.idl
-index 517c87a285dd93220cb2654d6ba7bb05c66cdeb7..e3010421d8dbe5ed5ed72feedb9f15805b32503e 100644
+index 217beda78edf31bab4c37209964d7a5bf5425195..7ba723410eb93328a8f078c58a96eefc2599feea 100644
--- a/toolkit/components/browser/nsIWebBrowserChrome.idl
+++ b/toolkit/components/browser/nsIWebBrowserChrome.idl
@@ -74,6 +74,9 @@ interface nsIWebBrowserChrome : nsISupports
@@ -2603,6 +2620,19 @@ index 00a5381133f8cec0de452c31c7151801a1acc0b9..5d3e3d6f566dc724f257beaeb994ceda
let provider = this._chooseProvider();
if (provider.failed) {
+diff --git a/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp b/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp
+index 32b1ac481382dd6aa3dda5572f013c2447a1a004..808031fbeb9b99b67c13c99c66b1aa1aff41f48a 100644
+--- a/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp
++++ b/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp
+@@ -525,7 +525,7 @@ void PopulateLanguages() {
+ // sufficient to only collect this information as the other properties are
+ // just reformats of Navigator::GetAcceptLanguages.
+ nsTArray<nsString> languages;
+- dom::Navigator::GetAcceptLanguages(languages);
++ dom::Navigator::GetAcceptLanguages(nullptr, languages);
+ nsCString output = "["_ns;
+
+ for (const auto& language : languages) {
diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp
index 3314cb813f6ceb67096eeda0864ad3b16c0616cb..5aac63649e186d624a9905a5d16513f8353f5515 100644
--- a/toolkit/components/startup/nsAppStartup.cpp
@@ -2632,10 +2662,10 @@ index 654903fadb709be976b72f36f155e23bc0622152..815b3dc24c9fda6b1db6c4666ac68904
int32_t aMaxSelfProgress,
int32_t aCurTotalProgress,
diff --git a/toolkit/components/windowwatcher/nsWindowWatcher.cpp b/toolkit/components/windowwatcher/nsWindowWatcher.cpp
-index b482214d31fe2a50ad075b424bc3f97edbc5148b..bd93fd73f165ef1da6422c6b8f141f0a82d77f0f 100644
+index 0767cb1539f940e5f634b58de44d876606903a09..dc0d72b4ff36d5ba7808528aefecb33f05b6672c 100644
--- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp
+++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp
-@@ -1853,7 +1853,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(
+@@ -1861,7 +1861,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(
// Open a minimal popup.
*aIsPopupRequested = true;
@@ -2649,20 +2679,20 @@ index b482214d31fe2a50ad075b424bc3f97edbc5148b..bd93fd73f165ef1da6422c6b8f141f0a
/**
diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs
-index 34bf1b9e19ae54f78d134b023af96820bc13a905..b85793edcd1996833420a026cb08706d648ece14 100644
+index deaed885c759d8e53ebf0beb53c5b7c4d4bd82f0..8e01e16490ab063361220d363494dfdf00442342 100644
--- a/toolkit/mozapps/update/UpdateService.sys.mjs
+++ b/toolkit/mozapps/update/UpdateService.sys.mjs
-@@ -3852,6 +3852,8 @@ UpdateService.prototype = {
- },
+@@ -3875,6 +3875,8 @@ export class UpdateService {
+ }
get disabledForTesting() {
+ /* playwright */
+ return true;
- return (
- (Cu.isInAutomation ||
- lazy.Marionette.running ||
+ return lazy.UpdateServiceStub.updateDisabledForTesting;
+ }
+
diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild
-index b697eb1e3b02b0ffcc95a6e492dc23eb888488cc..0f4059341dbb3c2ecb2c46be0850e0d56e2a7453 100644
+index 8c2b2bf996bd889651dc7fac1dc351b4c47b567e..07d237eb17a657ce051fd0aa5e53449c0c3159f6 100644
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -155,6 +155,7 @@ if CONFIG["ENABLE_WEBDRIVER"]:
@@ -2726,7 +2756,7 @@ index fe72a2715da8846146377e719559c16e6ef1f7ff..a5959143bac8f62ee359fa3883a844f3
// nsDocumentViewer::LoadComplete that doesn't do various things
// that are not relevant here because this wasn't an actual
diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp
-index 4573e28470c5112f5ac2c5dd53e7a9d1ceedb943..b53b86d8e39f1de4b0d0f1a8d5d7295ea050b878 100644
+index b9120ededd25707c90f33f65d3cead26433efdac..4d5728a73786d804d6b32da4d42934da2864eda1 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -112,6 +112,7 @@
@@ -2750,7 +2780,7 @@ index 4573e28470c5112f5ac2c5dd53e7a9d1ceedb943..b53b86d8e39f1de4b0d0f1a8d5d7295e
nsresult nsExternalHelperAppService::GetFileTokenForPath(
const char16_t* aPlatformAppPath, nsIFile** aFile) {
nsDependentString platformAppPath(aPlatformAppPath);
-@@ -1442,7 +1449,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) {
+@@ -1441,7 +1448,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) {
// Strip off the ".part" from mTempLeafName
mTempLeafName.Truncate(mTempLeafName.Length() - ArrayLength(".part") + 1);
@@ -2763,7 +2793,7 @@ index 4573e28470c5112f5ac2c5dd53e7a9d1ceedb943..b53b86d8e39f1de4b0d0f1a8d5d7295e
mSaver =
do_CreateInstance(NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
-@@ -1631,7 +1643,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
+@@ -1630,7 +1642,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
return NS_OK;
}
@@ -2801,7 +2831,7 @@ index 4573e28470c5112f5ac2c5dd53e7a9d1ceedb943..b53b86d8e39f1de4b0d0f1a8d5d7295e
if (NS_FAILED(rv)) {
nsresult transferError = rv;
-@@ -1683,6 +1724,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
+@@ -1682,6 +1723,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
bool alwaysAsk = true;
mMimeInfo->GetAlwaysAskBeforeHandling(&alwaysAsk);
@@ -2811,7 +2841,7 @@ index 4573e28470c5112f5ac2c5dd53e7a9d1ceedb943..b53b86d8e39f1de4b0d0f1a8d5d7295e
if (alwaysAsk) {
// But we *don't* ask if this mimeInfo didn't come from
// our user configuration datastore and the user has said
-@@ -2199,6 +2243,16 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver,
+@@ -2198,6 +2242,16 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver,
NotifyTransfer(aStatus);
}
@@ -2828,7 +2858,7 @@ index 4573e28470c5112f5ac2c5dd53e7a9d1ceedb943..b53b86d8e39f1de4b0d0f1a8d5d7295e
return NS_OK;
}
-@@ -2680,6 +2734,15 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) {
+@@ -2679,6 +2733,15 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) {
}
}
@@ -2987,7 +3017,7 @@ diff --git a/widget/cocoa/NativeKeyBindings.mm b/widget/cocoa/NativeKeyBindings.
index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce8050630a1aa 100644
--- a/widget/cocoa/NativeKeyBindings.mm
+++ b/widget/cocoa/NativeKeyBindings.mm
-@@ -528,6 +528,13 @@ void NativeKeyBindings::GetEditCommandsForTests(
+@@ -528,6 +528,13 @@
break;
case KEY_NAME_INDEX_ArrowLeft:
if (aEvent.IsAlt()) {
@@ -3001,7 +3031,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805
break;
}
if (aEvent.IsMeta() || (aEvent.IsControl() && aEvent.IsShift())) {
-@@ -550,6 +557,13 @@ void NativeKeyBindings::GetEditCommandsForTests(
+@@ -550,6 +557,13 @@
break;
case KEY_NAME_INDEX_ArrowRight:
if (aEvent.IsAlt()) {
@@ -3015,7 +3045,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805
break;
}
if (aEvent.IsMeta() || (aEvent.IsControl() && aEvent.IsShift())) {
-@@ -572,6 +586,10 @@ void NativeKeyBindings::GetEditCommandsForTests(
+@@ -572,6 +586,10 @@
break;
case KEY_NAME_INDEX_ArrowUp:
if (aEvent.IsControl()) {
@@ -3026,7 +3056,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805
break;
}
if (aEvent.IsMeta()) {
-@@ -582,7 +600,7 @@ void NativeKeyBindings::GetEditCommandsForTests(
+@@ -582,7 +600,7 @@
!aEvent.IsShift()
? ToObjcSelectorPtr(@selector(moveToBeginningOfDocument:))
: ToObjcSelectorPtr(
@@ -3035,7 +3065,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805
aCommands);
break;
}
-@@ -609,6 +627,10 @@ void NativeKeyBindings::GetEditCommandsForTests(
+@@ -609,6 +627,10 @@
break;
case KEY_NAME_INDEX_ArrowDown:
if (aEvent.IsControl()) {
@@ -3258,10 +3288,10 @@ index 8ba46829357fc4acc47bf20842fd869902efa000..a1b5b2c5230d90981bd563d4df2d2bf1
}
};
diff --git a/xpcom/reflect/xptinfo/xptinfo.h b/xpcom/reflect/xptinfo/xptinfo.h
-index 2456c2c2b58b27cd595880b547ed20fb687a1835..e967c089b2331c7cd36d34e511543fbc84320b7d 100644
+index 787d30d881adedd57d2025ca57bff4bc6c57e803..ae1a0172c960ab16919133485722d2ae0cdbcbd4 100644
--- a/xpcom/reflect/xptinfo/xptinfo.h
+++ b/xpcom/reflect/xptinfo/xptinfo.h
-@@ -514,7 +514,7 @@ static_assert(sizeof(nsXPTMethodInfo) == 8, "wrong size");
+@@ -505,7 +505,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/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.sh
index 8127a24878..c90cb30712 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="a47deb713746fa2f228e8450a52ed0ecafc5309d"
+BASE_REVISION="f371dbc2bb4292037ed394e2162150a16ef977fc"
diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff
index 84061248f1..9b8aa596c4 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 3c0295bc0b5f5d417beee189e208f3582b54fdb9..65176f0a49628933887a06690217bfcc5d34f395 100644
+index 3a1013bab702f71303ee800f6b3e9a65a08f4de6..9448f06498ea591e51516d5ef7b543f63655b6ae 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
-@@ -1389,22 +1389,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
+@@ -1392,22 +1392,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
@@ -62,7 +62,7 @@ index b26ef7b2b8f732160ddee36697a61ca7776fc2c3..9a442a4cda7efd7f2bd4e225d8bcbfed
$(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 15d6e32cd525905b116f25a5bdd50bd1ef390cee..74b1415d21dcddc49e842e077e87e06724af8365 100644
+index 3033ef7fc7e1db0e4b6fb85236997ce92b1946a5..87fc65714ad2caa21ac19aabf0a7d93badb4c848 100644
--- a/Source/JavaScriptCore/DerivedSources.make
+++ b/Source/JavaScriptCore/DerivedSources.make
@@ -298,22 +298,27 @@ INSPECTOR_DOMAINS := \
@@ -94,7 +94,7 @@ index 15d6e32cd525905b116f25a5bdd50bd1ef390cee..74b1415d21dcddc49e842e077e87e067
$(JavaScriptCore)/inspector/protocol/ServiceWorker.json \
$(JavaScriptCore)/inspector/protocol/Target.json \
diff --git a/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp b/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp
-index 528cceee66a1b1c91a0d0e59d5f1a1770a050c17..1e12d22fd2ce5363068ce7f5725f6e76ef7e8ad8 100644
+index 9bc5d1fd8e2a7e576be046b3c6ae1266696cf552..610f810db1dd6865c500c0796386a8284f4178e9 100644
--- a/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp
+++ b/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp
@@ -32,14 +32,21 @@
@@ -133,10 +133,10 @@ index eb25aedee4cd9ebe007e06c2515b37ee095b06f4..badf6559595c8377db1089ca3c25008e
static String requestId(unsigned long identifier);
};
diff --git a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp
-index b9296c03d37fa75ec9b6349dca0dd1862df5d348..96e14d95cd24c80a40e9ce4a528db6fe1cfcc534 100644
+index 143135027999755614d5fae2b897d8dd5e62d611..a357963f3350d29ea0fd90a20ac2393ff6a0efa9 100644
--- a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp
+++ b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp
-@@ -84,7 +84,10 @@ static RefPtr<JSON::Value> jsToInspectorValue(JSC::JSGlobalObject* globalObject,
+@@ -85,7 +85,10 @@ static RefPtr<JSON::Value> jsToInspectorValue(JSC::JSGlobalObject* globalObject,
JSC::PropertyNameArray propertyNames(vm, JSC::PropertyNameMode::Strings, JSC::PrivateSymbolMode::Exclude);
object.methodTable()->getOwnPropertyNames(&object, globalObject, propertyNames, JSC::DontEnumPropertiesMode::Exclude);
for (auto& name : propertyNames) {
@@ -149,10 +149,10 @@ index b9296c03d37fa75ec9b6349dca0dd1862df5d348..96e14d95cd24c80a40e9ce4a528db6fe
return nullptr;
inspectorObject->setValue(name.string(), inspectorValue.releaseNonNull());
diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
-index 80f5a61e477022fae12df0ba4f727e7076012fe3..7e513ea23a9a9ca0800ea21a11e51fad3417f1d2 100644
+index 3b2056bf5a71301383e0895d77cc6f16842235a9..eaf73171ce70ac43abbe404122a263ce708bb41f 100644
--- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
+++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
-@@ -99,7 +99,7 @@ void BackendDispatcher::registerDispatcherForDomain(const String& domain, Supple
+@@ -100,7 +100,7 @@ void BackendDispatcher::registerDispatcherForDomain(const String& domain, Supple
m_dispatchers.set(domain, dispatcher);
}
@@ -161,7 +161,7 @@ index 80f5a61e477022fae12df0ba4f727e7076012fe3..7e513ea23a9a9ca0800ea21a11e51fad
{
Ref<BackendDispatcher> protect(*this);
-@@ -144,6 +144,9 @@ void BackendDispatcher::dispatch(const String& message)
+@@ -145,6 +145,9 @@ void BackendDispatcher::dispatch(const String& message)
requestId = *requestIdInt;
}
@@ -239,10 +239,10 @@ index 082dd93cb0505c5bc7a2d5a7cf78fa0306809082..3f50f49ef9e691b3dc57dafd66c1e7d3
bool m_isPaused { false };
};
diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp b/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp
-index 15d2592d36b402bf2210dc4970ff40957022e84a..99ac14dc75ff5296e1f6c42bdbf8c128f2d82254 100644
+index c33e236f5228e21c6d5e0ea9bd97d07cdcb70640..7f160aec0f13e8c936aa7dea769d4e160d716452 100644
--- a/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp
+++ b/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp
-@@ -221,6 +221,14 @@ void JSGlobalObjectConsoleClient::screenshot(JSGlobalObject*, Ref<ScriptArgument
+@@ -222,6 +222,14 @@ void JSGlobalObjectConsoleClient::screenshot(JSGlobalObject*, Ref<ScriptArgument
warnUnimplemented("console.screenshot"_s);
}
@@ -256,7 +256,7 @@ index 15d2592d36b402bf2210dc4970ff40957022e84a..99ac14dc75ff5296e1f6c42bdbf8c128
+
void JSGlobalObjectConsoleClient::warnUnimplemented(const String& method)
{
- String message = method + " is currently ignored in JavaScript context inspection."_s;
+ auto message = makeString(method, " is currently ignored in JavaScript context inspection."_s);
diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h b/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h
index 6bbd0729a65b4a901e7da4dc50cc47c669bd9897..452b25d0e8eba3df1d5f6623dc222048bef120cd 100644
--- a/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h
@@ -270,7 +270,7 @@ index 6bbd0729a65b4a901e7da4dc50cc47c669bd9897..452b25d0e8eba3df1d5f6623dc222048
void warnUnimplemented(const String& method);
void internalAddMessage(MessageType, MessageLevel, JSC::JSGlobalObject*, Ref<ScriptArguments>&&);
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
-index 594584db96a3de67b92910f472f1403bc9b26ce2..8ba453f9ae8726ccfb26c55180371c20bed6962e 100644
+index 0cb6efeef2430faa5dbd812f71d4abfd5f6eb9df..787ec6a5f8413c0a9dc133cb0e51ccdab58d40d0 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
+++ b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
@@ -194,9 +194,8 @@ void InspectorRuntimeAgent::callFunctionOn(const Protocol::Runtime::RemoteObject
@@ -598,10 +598,10 @@ index 0000000000000000000000000000000000000000..8377901cb3ad75c29532a1f0f547efb5
+}
diff --git a/Source/JavaScriptCore/inspector/protocol/Input.json b/Source/JavaScriptCore/inspector/protocol/Input.json
new file mode 100644
-index 0000000000000000000000000000000000000000..b9ab57a2b5739ed997231399b4bd4042a0cb0935
+index 0000000000000000000000000000000000000000..1c43b476603325fa412bcfded9163e7a00aebbfa
--- /dev/null
+++ b/Source/JavaScriptCore/inspector/protocol/Input.json
-@@ -0,0 +1,223 @@
+@@ -0,0 +1,264 @@
+{
+ "domain": "Input",
+ "availability": ["web"],
@@ -610,6 +610,16 @@ index 0000000000000000000000000000000000000000..b9ab57a2b5739ed997231399b4bd4042
+ "id": "TimeSinceEpoch",
+ "description": "UTC time in seconds, counted from January 1, 1970.",
+ "type": "number"
++ },
++ {
++ "id": "TouchPoint",
++ "type": "object",
++ "description": "Touch point.",
++ "properties": [
++ { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels." },
++ { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels." },
++ { "name": "id", "type": "integer", "description": "Identifier used to track touch sources between events, must be unique within an event." }
++ ]
+ }
+ ],
+ "commands": [
@@ -822,6 +832,37 @@ index 0000000000000000000000000000000000000000..b9ab57a2b5739ed997231399b4bd4042
+ "type": "integer"
+ }
+ ]
++ },
++ {
++ "name": "dispatchTouchEvent",
++ "description": "Dispatches a touch event to the page.",
++ "async": true,
++ "parameters": [
++ {
++ "name": "type",
++ "description": "Type of the touch event.",
++ "type": "string",
++ "enum": [
++ "touchStart",
++ "touchMove",
++ "touchEnd",
++ "touchCancel"
++ ]
++ },
++ {
++ "name": "modifiers",
++ "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).",
++ "optional": true,
++ "type": "integer"
++ },
++ {
++ "name": "touchPoints",
++ "description": "List of touch points",
++ "type": "array",
++ "optional": true,
++ "items": { "$ref": "TouchPoint" }
++ }
++ ]
+ }
+ ]
+}
@@ -1660,18 +1701,10 @@ index 24891ad836086fd23024fcb4d08ca63f6974c812..29f4b6b1923383fec7a99d28a4e815dc
private:
enum ArgumentRequirement { ArgumentRequired, ArgumentNotRequired };
diff --git a/Source/ThirdParty/libwebrtc/CMakeLists.txt b/Source/ThirdParty/libwebrtc/CMakeLists.txt
-index edfc7022920e6fd9300b5b1a58a1c161096c0aa5..7f68528deb95c970c030c9effd0bdea843c67624 100644
+index a17275db76e30bf2f42bc8faa6dea14383b2ab27..f630ddaddfa5a5b048e028c233e84e8bec1e0370 100644
--- a/Source/ThirdParty/libwebrtc/CMakeLists.txt
+++ b/Source/ThirdParty/libwebrtc/CMakeLists.txt
-@@ -60,7 +60,6 @@ set(webrtc_SOURCES
- Source/third_party/abseil-cpp/absl/debugging/stacktrace.cc
- Source/third_party/abseil-cpp/absl/debugging/symbolize.cc
- Source/third_party/abseil-cpp/absl/flags/commandlineflag.cc
-- Source/third_party/abseil-cpp/absl/flags/flag.cc
- Source/third_party/abseil-cpp/absl/flags/flag_test_defs.cc
- Source/third_party/abseil-cpp/absl/flags/internal/commandlineflag.cc
- Source/third_party/abseil-cpp/absl/flags/internal/flag.cc
-@@ -455,6 +454,7 @@ set(webrtc_SOURCES
+@@ -453,6 +453,7 @@ set(webrtc_SOURCES
Source/third_party/boringssl/src/crypto/x509/x_val.c
Source/third_party/boringssl/src/crypto/x509/x_x509a.c
Source/third_party/boringssl/src/crypto/x509/x_x509.c
@@ -1679,7 +1712,7 @@ index edfc7022920e6fd9300b5b1a58a1c161096c0aa5..7f68528deb95c970c030c9effd0bdea8
Source/third_party/boringssl/src/decrepit/bio/base64_bio.c
Source/third_party/boringssl/src/decrepit/blowfish/blowfish.c
Source/third_party/boringssl/src/decrepit/cast/cast.c
-@@ -533,6 +533,11 @@ set(webrtc_SOURCES
+@@ -532,6 +533,11 @@ set(webrtc_SOURCES
Source/third_party/crc32c/src/src/crc32c.cc
Source/third_party/crc32c/src/src/crc32c_portable.cc
Source/third_party/crc32c/src/src/crc32c_sse42.cc
@@ -1691,7 +1724,7 @@ index edfc7022920e6fd9300b5b1a58a1c161096c0aa5..7f68528deb95c970c030c9effd0bdea8
Source/third_party/libyuv/source/compare.cc
Source/third_party/libyuv/source/compare_common.cc
Source/third_party/libyuv/source/compare_gcc.cc
-@@ -2404,6 +2409,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE
+@@ -2402,6 +2408,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE
Source/third_party/libsrtp/config
Source/third_party/libsrtp/crypto/include
Source/third_party/libsrtp/include
@@ -1703,26 +1736,25 @@ index edfc7022920e6fd9300b5b1a58a1c161096c0aa5..7f68528deb95c970c030c9effd0bdea8
Source/third_party/opus/src/celt
Source/third_party/opus/src/include
diff --git a/Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig b/Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig
-index 5155536dddb0d3627a021a28e6d733fde5ffbf1b..02c8aad77cd735d7e3cc5f072d62cc50c5b9aace 100644
+index 6b20d97d3d46359b2b2f9b4e8454a65c2ddbe9e3..80883fe3659389a3c385fd46ecd905bc0923d3ef 100644
--- a/Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig
+++ b/Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig
-@@ -21,7 +21,7 @@
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+@@ -22,6 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--HEADER_SEARCH_PATHS = Source Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include Source/third_party/boringssl/src/include Source/third_party/libyuv/include Source/webrtc/sdk/objc/Framework/Headers Source/webrtc/common_audio/signal_processing/include Source/webrtc/modules/audio_coding/codecs/isac/main/include Source/third_party/opus/src/celt Source/third_party/opus/src/include Source/third_party/opus/src/src Source/webrtc/modules/audio_device/mac Source/webrtc/modules/audio_device/ios Source/webrtc Source/webrtc/sdk/objc Source/webrtc/sdk/objc/base Source/webrtc/sdk/objc/Framework/Classes Source/third_party/libsrtp/config Source/webrtc/sdk/objc/Framework/Classes/Common Source/webrtc/sdk/objc/Framework/Classes/Video Source/webrtc/sdk/objc/Framework/Classes/PeerConnection Source/third_party/abseil-cpp Source/third_party/libvpx/source/libvpx Source/third_party/libwebm/webm_parser/include Source/third_party/crc32c/config Source/third_party/crc32c/include Source/third_party/crc32c/src/include Source/third_party/libaom/source/libaom;
-+HEADER_SEARCH_PATHS = Source Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include Source/third_party/boringssl/src/include Source/third_party/libyuv/include Source/webrtc/sdk/objc/Framework/Headers Source/webrtc/common_audio/signal_processing/include Source/webrtc/modules/audio_coding/codecs/isac/main/include Source/third_party/opus/src/celt Source/third_party/opus/src/include Source/third_party/opus/src/src Source/webrtc/modules/audio_device/mac Source/webrtc/modules/audio_device/ios Source/webrtc Source/webrtc/sdk/objc Source/webrtc/sdk/objc/base Source/webrtc/sdk/objc/Framework/Classes Source/third_party/libsrtp/config Source/webrtc/sdk/objc/Framework/Classes/Common Source/webrtc/sdk/objc/Framework/Classes/Video Source/webrtc/sdk/objc/Framework/Classes/PeerConnection Source/third_party/abseil-cpp Source/third_party/libvpx/source/libvpx Source/third_party/libwebm/webm_parser/include Source/third_party/crc32c/config Source/third_party/crc32c/include Source/third_party/crc32c/src/include Source/third_party/libaom/source/libaom Source/third_party/libwebm/mkvmuxer Source/third_party/libvpx/source/libvpx/third_party/libwebm;
+ HEADER_SEARCH_PATHS = Source Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include Source/third_party/boringssl/src/include Source/third_party/libyuv/include Source/webrtc/sdk/objc/Framework/Headers Source/webrtc/common_audio/signal_processing/include Source/webrtc/modules/audio_coding/codecs/isac/main/include Source/third_party/opus/src/celt Source/third_party/opus/src/include Source/third_party/opus/src/src Source/webrtc/modules/audio_device/mac Source/webrtc/modules/audio_device/ios Source/webrtc Source/webrtc/sdk/objc Source/webrtc/sdk/objc/base Source/webrtc/sdk/objc/Framework/Classes Source/third_party/libsrtp/config Source/webrtc/sdk/objc/Framework/Classes/Common Source/webrtc/sdk/objc/Framework/Classes/Video Source/webrtc/sdk/objc/Framework/Classes/PeerConnection Source/third_party/abseil-cpp Source/third_party/libvpx/source/libvpx Source/third_party/libwebm/webm_parser/include Source/third_party/crc32c/config Source/third_party/crc32c/include Source/third_party/crc32c/src/include Source/third_party/libaom/source/libaom Source/third_party/protobuf/src;
++HEADER_SEARCH_PATHS = ${HEADER_SEARCH_PATHS} Source/third_party/libwebm/mkvmuxer Source/third_party/libvpx/source/libvpx/third_party/libwebm;
USE_HEADERMAP = NO;
WARNING_CFLAGS = -Wno-deprecated-declarations $(inherited);
diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp
-index a01284369bedab3d44e7a3c2671590b3ca2b18fc..6a75fd2d366386e12dc612bdcfb914613c636478 100644
+index fca61ffe9f0563d87b364e0fa681ceab1d7bb26f..5c0d72f6c0bab0bc0011a123302c5654ec5664ba 100644
--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp
+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp
-@@ -402,3 +402,24 @@ __ZN3rtc7LogSink12OnLogMessageENSt3__117basic_string_viewIcNS1_11char_traitsIcEE
- __ZN3rtc7LogSink12OnLogMessageERKNS_10LogLineRefE
- __ZN3rtc7LogSink12OnLogMessageERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_15LoggingSeverityEPKc
- __ZTVN3rtc7LogSinkE
+@@ -403,3 +403,24 @@ __ZN3rtc17AsyncPacketSocket20NotifyPacketReceivedERKNS_14ReceivedPacketE
+ __ZN3rtc17AsyncPacketSocket30RegisterReceivedPacketCallbackEN4absl12AnyInvocableIFvPS0_RKNS_14ReceivedPacketEEEE
+ __ZN3rtc17AsyncPacketSocket32DeregisterReceivedPacketCallbackEv
+ __ZN3rtc18NetworkManagerBaseC2Ev
+__ZN8mkvmuxer11SegmentInfo15set_writing_appEPKc
+__ZN8mkvmuxer11SegmentInfo4InitEv
+__ZN8mkvmuxer7Segment10OutputCuesEb
@@ -1769,7 +1801,7 @@ index f95c3b6c6b73a01974f26d88bcc533e5032ddb66..6a9368c60824cd32649c93286522d779
#include "api/array_view.h"
diff --git a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
-index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6a981a2a0 100644
+index 5e185d2c3aae7eb99b72dbbb1a04af638a6dfc63..d2fbb40ee5d8349d617b287368ae1a47a131e4ee 100644
--- a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
+++ b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
@@ -35,6 +35,20 @@
@@ -1793,7 +1825,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
/* Begin PBXBuildFile section */
2D6BFF60280A93DF00A1A74F /* video_coding.h in Headers */ = {isa = PBXBuildFile; fileRef = 4131C45B234C81710028A615 /* video_coding.h */; settings = {ATTRIBUTES = (Public, ); }; };
2D6BFF61280A93EC00A1A74F /* video_codec_initializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4131C45E234C81720028A615 /* video_codec_initializer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-@@ -5135,6 +5149,9 @@
+@@ -5193,6 +5207,9 @@
DDF30D9127C5C725006A526F /* receive_side_congestion_controller.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF30D9027C5C725006A526F /* receive_side_congestion_controller.h */; };
DDF30D9527C5C756006A526F /* bwe_defines.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF30D9327C5C756006A526F /* bwe_defines.h */; };
DDF30D9627C5C756006A526F /* remote_bitrate_estimator.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF30D9427C5C756006A526F /* remote_bitrate_estimator.h */; };
@@ -1803,7 +1835,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
-@@ -5623,6 +5640,13 @@
+@@ -5681,6 +5698,13 @@
remoteGlobalIDString = DDF30D0527C5C003006A526F;
remoteInfo = absl;
};
@@ -1817,7 +1849,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
-@@ -11200,6 +11224,9 @@
+@@ -11465,6 +11489,9 @@
DDF30D9027C5C725006A526F /* receive_side_congestion_controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = receive_side_congestion_controller.h; sourceTree = "<group>"; };
DDF30D9327C5C756006A526F /* bwe_defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bwe_defines.h; sourceTree = "<group>"; };
DDF30D9427C5C756006A526F /* remote_bitrate_estimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = remote_bitrate_estimator.h; sourceTree = "<group>"; };
@@ -1827,7 +1859,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
FB39D0D11200F0E300088E69 /* libwebrtc.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwebrtc.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
-@@ -20044,6 +20071,7 @@
+@@ -20596,6 +20623,7 @@
isa = PBXGroup;
children = (
CDFD2F9224C4B2F90048DAC3 /* common */,
@@ -1835,7 +1867,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
CDEBB19224C0191800ADBD44 /* webm_parser */,
);
path = libwebm;
-@@ -20471,6 +20499,16 @@
+@@ -21007,6 +21035,16 @@
path = include;
sourceTree = "<group>";
};
@@ -1852,7 +1884,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
FB39D06E1200ED9200088E69 = {
isa = PBXGroup;
children = (
-@@ -23761,6 +23799,7 @@
+@@ -24293,6 +24331,7 @@
);
dependencies = (
410B3827292B73E90003E515 /* PBXTargetDependency */,
@@ -1860,7 +1892,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
DD2E76E827C6B69A00F2A74C /* PBXTargetDependency */,
CDEBB4CC24C01AB400ADBD44 /* PBXTargetDependency */,
411ED040212E0811004320BA /* PBXTargetDependency */,
-@@ -23843,6 +23882,7 @@
+@@ -24375,6 +24414,7 @@
4460B8B92B155B6A00392062 /* vp9_qp_parser_fuzzer */,
444A6EF02AEADFC9005FE121 /* vp9_replay_fuzzer */,
44945C512B9BA1C300447FFD /* webm_fuzzer */,
@@ -1868,7 +1900,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
);
};
/* End PBXProject section */
-@@ -23926,6 +23966,23 @@
+@@ -24458,6 +24498,23 @@
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Scripts/create-symlink-to-altroot.sh\"\n";
};
@@ -1892,7 +1924,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
-@@ -25901,6 +25958,9 @@
+@@ -26471,6 +26528,9 @@
5CDD865E1E43B8B500621E92 /* min_max_operations.c in Sources */,
4189395B242A71F5007FDC41 /* min_video_bitrate_experiment.cc in Sources */,
41B8D8FB28CB85CB00E5FA37 /* missing_mandatory_parameter_cause.cc in Sources */,
@@ -1902,7 +1934,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
4131C387234B957D0028A615 /* moving_average.cc in Sources */,
41FCBB1521B1F7AA00A5DF27 /* moving_average.cc in Sources */,
5CD286101E6A64C90094FDC8 /* moving_max.cc in Sources */,
-@@ -26778,6 +26838,11 @@
+@@ -27372,6 +27432,11 @@
target = DDF30D0527C5C003006A526F /* absl */;
targetProxy = DD2E76E727C6B69A00F2A74C /* PBXContainerItemProxy */;
};
@@ -1914,7 +1946,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
-@@ -27353,6 +27418,27 @@
+@@ -27947,6 +28012,27 @@
};
name = Production;
};
@@ -1942,7 +1974,7 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
FB39D0711200ED9200088E69 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */;
-@@ -27655,6 +27741,16 @@
+@@ -28249,6 +28335,16 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Production;
};
@@ -1960,10 +1992,10 @@ index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
-index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfba0791949 100644
+index 4d6f1829d52f1a0ea19c1a0de58e86304360c177..59a7410430ecc8db82f5b0bfcc11ba045b1f4aec 100644
--- a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
+++ b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
-@@ -562,6 +562,7 @@ ApplePayEnabled:
+@@ -563,6 +563,7 @@ ApplePayEnabled:
default: false
# FIXME: This is on by default in WebKit2 PLATFORM(COCOA). Perhaps we should consider turning it on for WebKitLegacy as well.
@@ -1971,7 +2003,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
AsyncClipboardAPIEnabled:
type: bool
status: mature
-@@ -572,7 +573,7 @@ AsyncClipboardAPIEnabled:
+@@ -573,7 +574,7 @@ AsyncClipboardAPIEnabled:
default: false
WebKit:
"PLATFORM(COCOA) || PLATFORM(GTK)" : true
@@ -1980,28 +2012,15 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
WebCore:
default: false
-@@ -1781,9 +1782,10 @@ CrossOriginEmbedderPolicyEnabled:
+@@ -1810,6 +1811,7 @@ CrossOriginEmbedderPolicyEnabled:
WebCore:
default: false
+# Playwright: disable setting.
CrossOriginOpenerPolicyEnabled:
type: bool
-- status: stable
-+ status: preview
- category: security
- humanReadableName: "Cross-Origin-Opener-Policy (COOP) header"
- humanReadableDescription: "Support for Cross-Origin-Opener-Policy (COOP) header"
-@@ -1791,7 +1793,7 @@ CrossOriginOpenerPolicyEnabled:
- WebKitLegacy:
- default: false
- WebKit:
-- default: true
-+ default: false
- WebCore:
- default: false
-
-@@ -1835,7 +1837,7 @@ CustomPasteboardDataEnabled:
+ status: stable
+@@ -1864,7 +1866,7 @@ CustomPasteboardDataEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -2010,7 +2029,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
default: false
CustomStateSetEnabled:
-@@ -1894,6 +1896,7 @@ DOMAudioSessionFullEnabled:
+@@ -1923,6 +1925,7 @@ DOMAudioSessionFullEnabled:
WebCore:
default: false
@@ -2018,7 +2037,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
DOMPasteAccessRequestsEnabled:
type: bool
status: internal
-@@ -1905,7 +1908,7 @@ DOMPasteAccessRequestsEnabled:
+@@ -1934,7 +1937,7 @@ DOMPasteAccessRequestsEnabled:
default: false
WebKit:
"PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(VISION)": true
@@ -2027,7 +2046,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
WebCore:
default: false
-@@ -2249,7 +2252,7 @@ DirectoryUploadEnabled:
+@@ -2278,7 +2281,7 @@ DirectoryUploadEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -2036,7 +2055,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
default: false
WebCore:
default: false
-@@ -3261,6 +3264,7 @@ InspectorAttachmentSide:
+@@ -3304,6 +3307,7 @@ InspectorAttachmentSide:
WebKit:
default: 0
@@ -2044,7 +2063,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
InspectorStartsAttached:
type: bool
status: embedder
-@@ -3268,7 +3272,7 @@ InspectorStartsAttached:
+@@ -3311,7 +3315,7 @@ InspectorStartsAttached:
exposed: [ WebKit ]
defaultValue:
WebKit:
@@ -2053,7 +2072,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
InspectorWindowFrame:
type: String
-@@ -3622,9 +3626,10 @@ LayoutViewportHeightExpansionFactor:
+@@ -3650,9 +3654,10 @@ LayoutViewportHeightExpansionFactor:
WebCore:
default: 0
@@ -2065,7 +2084,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
category: html
humanReadableName: "Lazy iframe loading"
humanReadableDescription: "Enable lazy iframe loading support"
-@@ -3632,9 +3637,9 @@ LazyIframeLoadingEnabled:
+@@ -3660,9 +3665,9 @@ LazyIframeLoadingEnabled:
WebKitLegacy:
default: true
WebKit:
@@ -2077,7 +2096,16 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
LazyImageLoadingEnabled:
type: bool
-@@ -5084,6 +5089,19 @@ PitchCorrectionAlgorithm:
+@@ -5084,7 +5089,7 @@ PermissionsAPIEnabled:
+ WebKitLegacy:
+ default: false
+ WebKit:
+- "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)" : true
++ "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)" : true
+ default: false
+ WebCore:
+ default: false
+@@ -5143,6 +5148,19 @@ PitchCorrectionAlgorithm:
WebCore:
default: MediaPlayerEnums::PitchCorrectionAlgorithm::BestAllAround
@@ -2097,7 +2125,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
PointerLockOptionsEnabled:
type: bool
status: testable
-@@ -5622,7 +5640,7 @@ ScreenOrientationAPIEnabled:
+@@ -5697,7 +5715,7 @@ ScreenOrientationAPIEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -2106,7 +2134,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
WebCore:
default: false
-@@ -6854,6 +6872,7 @@ UseCGDisplayListsForDOMRendering:
+@@ -6946,6 +6964,7 @@ UseCGDisplayListsForDOMRendering:
WebKit:
default: true
@@ -2114,7 +2142,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
UseGPUProcessForCanvasRenderingEnabled:
type: bool
status: stable
-@@ -6866,7 +6885,7 @@ UseGPUProcessForCanvasRenderingEnabled:
+@@ -6958,7 +6977,7 @@ UseGPUProcessForCanvasRenderingEnabled:
defaultValue:
WebKit:
"ENABLE(GPU_PROCESS_BY_DEFAULT)": true
@@ -2123,7 +2151,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
default: false
UseGPUProcessForDOMRenderingEnabled:
-@@ -6876,7 +6895,7 @@ UseGPUProcessForDOMRenderingEnabled:
+@@ -6968,7 +6987,7 @@ UseGPUProcessForDOMRenderingEnabled:
humanReadableName: "GPU Process: DOM Rendering"
humanReadableDescription: "Enable DOM rendering in GPU Process"
webcoreBinding: none
@@ -2132,7 +2160,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
exposed: [ WebKit ]
defaultValue:
WebKit:
-@@ -6908,6 +6927,7 @@ UseGPUProcessForMediaEnabled:
+@@ -7000,6 +7019,7 @@ UseGPUProcessForMediaEnabled:
"ENABLE(GPU_PROCESS_BY_DEFAULT)": true
default: false
@@ -2140,7 +2168,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
UseGPUProcessForWebGLEnabled:
type: bool
status: internal
-@@ -6919,7 +6939,7 @@ UseGPUProcessForWebGLEnabled:
+@@ -7011,7 +7031,7 @@ UseGPUProcessForWebGLEnabled:
default: false
WebKit:
"ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": true
@@ -2150,7 +2178,7 @@ index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfb
WebCore:
"ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": true
diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
-index ad8e407924f61aec230fea626efc6fb01f21f9f7..65b4a862906752f53e9d95d3238271846290329f 100644
+index 48c40a6bfa8ae0a275bbd8f3ae62f4701916fa48..a32e26e01d83999c575649a9fc0d96c71b655259 100644
--- a/Source/WTF/wtf/PlatformEnable.h
+++ b/Source/WTF/wtf/PlatformEnable.h
@@ -401,7 +401,7 @@
@@ -2172,10 +2200,10 @@ index ad8e407924f61aec230fea626efc6fb01f21f9f7..65b4a862906752f53e9d95d323827184
#if !defined(ENABLE_TOUCH_ACTION_REGIONS)
diff --git a/Source/WTF/wtf/PlatformEnableCocoa.h b/Source/WTF/wtf/PlatformEnableCocoa.h
-index 119cfbc1e518ca18fd7fe925e433054fc071f4d6..e4111b7f6ed0c0245e8ca1f7d1a4b3f674312615 100644
+index 5fef3978fdfb0dc92609688fdf282ea26a0859ef..70190e180003951e48c4084a1788f504730171ca 100644
--- a/Source/WTF/wtf/PlatformEnableCocoa.h
+++ b/Source/WTF/wtf/PlatformEnableCocoa.h
-@@ -780,7 +780,7 @@
+@@ -781,7 +781,7 @@
#endif
#if !defined(ENABLE_SEC_ITEM_SHIM)
@@ -2185,10 +2213,10 @@ index 119cfbc1e518ca18fd7fe925e433054fc071f4d6..e4111b7f6ed0c0245e8ca1f7d1a4b3f6
#if !defined(ENABLE_SERVER_PRECONNECT)
diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h
-index 770c60d0bfdb4219917347d24e06f6076f447ebd..153e93b0ad35f4f3182c619fc25ecc1bd236a3e6 100644
+index 33d00e530b23f32e279214a88379041ec2a7c3b7..0d7b3f08bef8f010d96d85df5d1672dac87054ec 100644
--- a/Source/WTF/wtf/PlatformHave.h
+++ b/Source/WTF/wtf/PlatformHave.h
-@@ -418,7 +418,7 @@
+@@ -425,7 +425,7 @@
#define HAVE_FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT 1
#endif
@@ -2197,7 +2225,7 @@ index 770c60d0bfdb4219917347d24e06f6076f447ebd..153e93b0ad35f4f3182c619fc25ecc1b
#define HAVE_OS_DARK_MODE_SUPPORT 1
#endif
-@@ -1262,7 +1262,8 @@
+@@ -1248,7 +1248,8 @@
#endif
#if PLATFORM(MAC)
@@ -2223,13 +2251,13 @@ index 007b8fe3292f326504013be8198ae020f7aacf35..4439f901b4a9a92d881c7cee24ad9cd2
namespace Unicode {
diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make
-index bad5e65c0f8eb201e0865430156c19501a6f357d..daa60c7b289870a77f3af4bbb24fa8c2632ccaa1 100644
+index 3c93bf646040ac804afc9c98b855829e98b87269..366b9c6714aa4f378a156577bd932a31ee5737a6 100644
--- a/Source/WebCore/DerivedSources.make
+++ b/Source/WebCore/DerivedSources.make
-@@ -1150,6 +1150,10 @@ JS_BINDING_IDLS := \
- $(WebCore)/dom/Slotable.idl \
- $(WebCore)/dom/StaticRange.idl \
- $(WebCore)/dom/StringCallback.idl \
+@@ -1156,6 +1156,10 @@ JS_BINDING_IDLS := \
+ $(WebCore)/dom/SubscriberCallback.idl \
+ $(WebCore)/dom/SubscriptionObserver.idl \
+ $(WebCore)/dom/SubscriptionObserverCallback.idl \
+ $(WebCore)/dom/Document+Touch.idl \
+ $(WebCore)/dom/Touch.idl \
+ $(WebCore)/dom/TouchEvent.idl \
@@ -2237,7 +2265,7 @@ index bad5e65c0f8eb201e0865430156c19501a6f357d..daa60c7b289870a77f3af4bbb24fa8c2
$(WebCore)/dom/Text.idl \
$(WebCore)/dom/TextDecoder.idl \
$(WebCore)/dom/TextDecoderStream.idl \
-@@ -1737,9 +1741,6 @@ JS_BINDING_IDLS := \
+@@ -1745,9 +1749,6 @@ JS_BINDING_IDLS := \
ADDITIONAL_BINDING_IDLS = \
DocumentTouch.idl \
GestureEvent.idl \
@@ -2248,10 +2276,10 @@ index bad5e65c0f8eb201e0865430156c19501a6f357d..daa60c7b289870a77f3af4bbb24fa8c2
vpath %.in $(WEBKITADDITIONS_HEADER_SEARCH_PATHS)
diff --git a/Source/WebCore/Modules/geolocation/Geolocation.cpp b/Source/WebCore/Modules/geolocation/Geolocation.cpp
-index 6cfaedf99ffdc456d0d0cc631636d1719981c598..682b822d464f084be76a5272f44b23adcd20ed21 100644
+index be20114bdebd713c5224893ac73078b03b22e392..4174bdf02631d421a0f1fdadfde21c308e4c7735 100644
--- a/Source/WebCore/Modules/geolocation/Geolocation.cpp
+++ b/Source/WebCore/Modules/geolocation/Geolocation.cpp
-@@ -359,8 +359,9 @@ bool Geolocation::shouldBlockGeolocationRequests()
+@@ -360,8 +360,9 @@ bool Geolocation::shouldBlockGeolocationRequests()
bool isSecure = SecurityOrigin::isSecure(document->url()) || document->isSecureContext();
bool hasMixedContent = !document->foundMixedContent().isEmpty();
bool isLocalOrigin = securityOrigin()->isLocal();
@@ -2311,10 +2339,10 @@ index c6a03b56d8358316c9ce422c1a11438bd216f80f..69fbd319b7cd084ca125a8db1b5d92ef
set(CSS_VALUE_PLATFORM_DEFINES "HAVE_OS_DARK_MODE_SUPPORT=1")
diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt
-index 9b508a64017aaba7038419d75b2026326c6b3408..79060874c56510b59c874b8969c816bfb0214b3a 100644
+index 8ca60190e2f9110b74e37350ae12de7ff324de0e..0ad2e7621561b0a0eb67dc39555a2b99169df9c2 100644
--- a/Source/WebCore/SourcesCocoa.txt
+++ b/Source/WebCore/SourcesCocoa.txt
-@@ -715,3 +715,9 @@ testing/cocoa/WebViewVisualIdentificationOverlay.mm
+@@ -716,3 +716,9 @@ testing/cocoa/WebViewVisualIdentificationOverlay.mm
platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify
platform/graphics/cocoa/GraphicsContextGLCocoa.mm @no-unify
platform/graphics/cv/GraphicsContextGLCVCocoa.cpp @no-unify
@@ -2371,10 +2399,10 @@ index 92f1879df295fc63a9194dc54d3f7499c5fe3041..67c40d056aee6a8149ed1ff16ce4c835
+JSSpeechSynthesisEventInit.cpp
+// Playwright: end.
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb552e10cb91 100644
+index 2dd82a349b4c111364b9032a5e5a3d81e238798e..f18701e5aa5a6dd0bd2619a0cfb92316aee41ffd 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-@@ -6220,6 +6220,13 @@
+@@ -6198,6 +6198,13 @@
EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE3A4FF0C7A430600956A37 /* ColorMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
EDEC98030AED7E170059137F /* WebCorePrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = EDEC98020AED7E170059137F /* WebCorePrefix.h */; };
EFCC6C8F20FE914400A2321B /* CanvasActivityRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2388,7 +2416,7 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
F12171F616A8CF0B000053CA /* WebVTTElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F12171F416A8BC63000053CA /* WebVTTElement.h */; };
F32BDCD92363AACA0073B6AE /* UserGestureEmulationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = F32BDCD72363AACA0073B6AE /* UserGestureEmulationScope.h */; };
F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
-@@ -20217,6 +20224,14 @@
+@@ -20153,6 +20160,14 @@
EDEC98020AED7E170059137F /* WebCorePrefix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCorePrefix.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
EFB7287B2124C73D005C2558 /* CanvasActivityRecord.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasActivityRecord.cpp; sourceTree = "<group>"; };
EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasActivityRecord.h; sourceTree = "<group>"; };
@@ -2403,7 +2431,7 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
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>"; };
F32BDCD52363AAC90073B6AE /* UserGestureEmulationScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserGestureEmulationScope.cpp; sourceTree = "<group>"; };
-@@ -27846,6 +27861,11 @@
+@@ -27805,6 +27820,11 @@
BC4A5324256055590028C592 /* TextDirectionSubmenuInclusionBehavior.h */,
2D4F96F11A1ECC240098BF88 /* TextIndicator.cpp */,
2D4F96F21A1ECC240098BF88 /* TextIndicator.h */,
@@ -2415,7 +2443,7 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
F48570A42644C76D00C05F71 /* TranslationContextMenuInfo.h */,
F4E1965F21F26E4E00285078 /* UndoItem.cpp */,
2ECDBAD521D8906300F00ECD /* UndoItem.h */,
-@@ -34246,6 +34266,8 @@
+@@ -34147,6 +34167,8 @@
29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */,
1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */,
1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */,
@@ -2424,7 +2452,7 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
0FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */,
935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,
F491A66A2A9FEFA300F96146 /* PlatformWheelEvent.serialization.in */,
-@@ -36916,6 +36938,7 @@
+@@ -36817,6 +36839,7 @@
AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */,
6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */,
6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */,
@@ -2432,7 +2460,7 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
7CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */,
7CE7FA591EF882300060C9D6 /* DocumentTouch.h */,
A8185F3209765765005826D9 /* DocumentType.cpp */,
-@@ -41657,6 +41680,8 @@
+@@ -41547,6 +41570,8 @@
F4E90A3C2B52038E002DA469 /* PlatformTextAlternatives.h in Headers */,
0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */,
074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */,
@@ -2441,7 +2469,7 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
CDD08ABD277E542600EA3755 /* PlatformTrackConfiguration.h in Headers */,
CD1F9B022700323D00617EB6 /* PlatformVideoColorPrimaries.h in Headers */,
CD1F9B01270020B700617EB6 /* PlatformVideoColorSpace.h in Headers */,
-@@ -42939,6 +42964,7 @@
+@@ -42826,6 +42851,7 @@
0F54DD081881D5F5003EEDBB /* Touch.h in Headers */,
71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */,
0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */,
@@ -2449,7 +2477,7 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
0F54DD0A1881D5F5003EEDBB /* TouchList.h in Headers */,
070334D71459FFD5008D8D45 /* TrackBase.h in Headers */,
BE88E0C21715CE2600658D98 /* TrackListBase.h in Headers */,
-@@ -44089,6 +44115,8 @@
+@@ -43980,6 +44006,8 @@
2D22830323A8470700364B7E /* CursorMac.mm in Sources */,
5CBD59592280E926002B22AA /* CustomHeaderFields.cpp in Sources */,
07E4BDBF2A3A5FAB000D5509 /* DictationCaretAnimator.cpp in Sources */,
@@ -2458,7 +2486,7 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */,
4667EA3E2968D9DA00BAB1E2 /* GameControllerHapticEffect.mm in Sources */,
46FE73D32968E52000B8064C /* GameControllerHapticEngines.mm in Sources */,
-@@ -44176,6 +44204,9 @@
+@@ -44068,6 +44096,9 @@
CE88EE262414467B007F29C2 /* TextAlternativeWithRange.mm in Sources */,
BE39137129B267F500FA5D4F /* TextTransformCocoa.cpp in Sources */,
51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
@@ -2469,10 +2497,10 @@ index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb55
538EC8021F96AF81004D22A8 /* UnifiedSource1.cpp in Sources */,
538EC8051F96AF81004D22A8 /* UnifiedSource2-mm.mm in Sources */,
diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp
-index a54b85c9d3a0fbd0e24c2b0398eafe44830d2cbc..e23ae4813a861b7c6fdfad06951f02bee76201db 100644
+index a934d32a2b01e6273e1d97a7b8fd7e0999495dc5..379eee720dda27b29b32f26ab5a10d83ce78f4b9 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp
-@@ -66,6 +66,7 @@
+@@ -67,6 +67,7 @@
#include "HTMLSlotElement.h"
#include "HTMLTextAreaElement.h"
#include "HitTestResult.h"
@@ -2480,7 +2508,7 @@ index a54b85c9d3a0fbd0e24c2b0398eafe44830d2cbc..e23ae4813a861b7c6fdfad06951f02be
#include "LocalFrame.h"
#include "LocalizedStrings.h"
#include "MathMLNames.h"
-@@ -3992,9 +3993,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const
+@@ -3968,9 +3969,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const
if (roleValue() == AccessibilityRole::ApplicationDialog)
return AccessibilityObjectInclusion::IncludeObject;
@@ -2497,8 +2525,30 @@ index a54b85c9d3a0fbd0e24c2b0398eafe44830d2cbc..e23ae4813a861b7c6fdfad06951f02be
bool AccessibilityObject::accessibilityIsIgnored() const
{
AXComputedObjectAttributeCache* attributeCache = nullptr;
+diff --git a/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp b/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp
+index 7641906564fb1e480f56923343a8ee6149f60820..ed530124becb719e66b211f468c24376887c4cc4 100644
+--- a/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp
++++ b/Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp
+@@ -289,7 +289,7 @@ String AccessibilityObjectAtspi::text() const
+ if (!value.isNull())
+ return value;
+
+- auto text = m_coreObject->textUnderElement(TextUnderElementMode(TextUnderElementMode::Children::IncludeAllChildren));
++ auto text = m_coreObject->textUnderElement({ TextUnderElementMode::Children::IncludeAllChildren });
+ if (auto* renderer = m_coreObject->renderer()) {
+ if (is<RenderListItem>(*renderer) && downcast<RenderListItem>(*renderer).markerRenderer()) {
+ if (renderer->style().direction() == TextDirection::LTR) {
+@@ -315,7 +315,7 @@ unsigned AccessibilityObject::getLengthForTextRange() const
+ textLength = downcast<RenderText>(*renderer).text().length();
+
+ if (!textLength && allowsTextRanges())
+- textLength = textUnderElement(TextUnderElementMode(TextUnderElementMode::Children::IncludeAllChildren)).length();
++ textLength = textUnderElement({ TextUnderElementMode::Children::IncludeAllChildren }).length();
+
+ return textLength;
+ }
diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
-index a5a6d8a0c426db0b465d3c932de52f0678d5f5e8..75bb28488a3790ff0bfda8af3f3b641d9b519bd5 100644
+index bec74918c24d17a88bb1583504d00e2a11a5e6c6..8c86fc1552c091e6751e87c60af728b4ce37f2a1 100644
--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
@@ -183,6 +183,8 @@ namespace WebCore {
@@ -2511,10 +2561,10 @@ index a5a6d8a0c426db0b465d3c932de52f0678d5f5e8..75bb28488a3790ff0bfda8af3f3b641d
macro(DynamicsCompressorNode) \
macro(ElementInternals) \
diff --git a/Source/WebCore/css/query/MediaQueryFeatures.cpp b/Source/WebCore/css/query/MediaQueryFeatures.cpp
-index 9892fda4291cae0e0d338fac8b0f98cd0126807d..7ecfd659809ab30e82a9c00ec7710292a1bd5611 100644
+index 450c429a76a97ba079087eaecc0deca236f3a419..726765635432192654ee218874813a1d09a83af4 100644
--- a/Source/WebCore/css/query/MediaQueryFeatures.cpp
+++ b/Source/WebCore/css/query/MediaQueryFeatures.cpp
-@@ -368,7 +368,11 @@ const FeatureSchema& forcedColors()
+@@ -364,7 +364,11 @@ const FeatureSchema& forcedColors()
static MainThreadNeverDestroyed<IdentifierSchema> schema {
"forced-colors"_s,
FixedVector { CSSValueNone, CSSValueActive },
@@ -2527,7 +2577,7 @@ index 9892fda4291cae0e0d338fac8b0f98cd0126807d..7ecfd659809ab30e82a9c00ec7710292
return MatchingIdentifiers { CSSValueNone };
}
};
-@@ -547,6 +551,9 @@ const FeatureSchema& prefersReducedMotion()
+@@ -546,6 +550,9 @@ const FeatureSchema& prefersReducedMotion()
[](auto& context) {
bool userPrefersReducedMotion = [&] {
Ref frame = *context.document->frame();
@@ -2631,7 +2681,7 @@ index 9b344003de17b96d8b9ca8c7f32143a27543b1ea..2208a3f2b7d930bcd291e65b474d4c30
] partial interface Element {
// Returns Promise<undefined> if PointerLockOptionsEnabled Runtime Flag is set, otherwise returns undefined.
diff --git a/Source/WebCore/dom/PointerEvent.cpp b/Source/WebCore/dom/PointerEvent.cpp
-index c35c7851f168954a0c5265ea218a2173b7b079a8..500b267351d2e4ac9864129650b6c00627a8ea6f 100644
+index 204b5f08ba950ead5f7d853d3c7fc9274ce46a26..e2f117a2a3e221fc4ca14b02c82cda952f0cd63b 100644
--- a/Source/WebCore/dom/PointerEvent.cpp
+++ b/Source/WebCore/dom/PointerEvent.cpp
@@ -27,9 +27,11 @@
@@ -2646,9 +2696,9 @@ index c35c7851f168954a0c5265ea218a2173b7b079a8..500b267351d2e4ac9864129650b6c006
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
-@@ -122,4 +124,51 @@ PointerEvent::PointerEvent(const AtomString& type, PointerID pointerId, const St
-
- PointerEvent::~PointerEvent() = default;
+@@ -133,4 +135,51 @@ Vector<Ref<PointerEvent>> PointerEvent::getCoalescedEvents()
+ return m_coalescedEvents;
+ }
+#if ENABLE(TOUCH_EVENTS) && !PLATFORM(IOS_FAMILY) && !PLATFORM(WPE)
+
@@ -2699,7 +2749,7 @@ index c35c7851f168954a0c5265ea218a2173b7b079a8..500b267351d2e4ac9864129650b6c006
+
} // namespace WebCore
diff --git a/Source/WebCore/dom/PointerEvent.h b/Source/WebCore/dom/PointerEvent.h
-index 261a8c7e8946cac87b9ebc5fc5e3b697f326b7f4..02645d3bdce44f40a648e720e99a6b296f371fb2 100644
+index c54bbf8060253b9000f3da9be8ff327a2625ff86..6b05fc5f61444ea9dc7775491801c585ae44045e 100644
--- a/Source/WebCore/dom/PointerEvent.h
+++ b/Source/WebCore/dom/PointerEvent.h
@@ -34,6 +34,8 @@
@@ -2711,8 +2761,8 @@ index 261a8c7e8946cac87b9ebc5fc5e3b697f326b7f4..02645d3bdce44f40a648e720e99a6b29
#endif
#if ENABLE(TOUCH_EVENTS) && PLATFORM(WPE)
-@@ -86,7 +88,7 @@ public:
- static Ref<PointerEvent> create(const AtomString& type, MouseButton, const MouseEvent&, PointerID, const String& pointerType);
+@@ -88,7 +90,7 @@ public:
+ static Ref<PointerEvent> create(const AtomString& type, MouseButton, const MouseEvent&, PointerID, const String& pointerType, CanBubble, IsCancelable);
static Ref<PointerEvent> create(const AtomString& type, PointerID, const String& pointerType, IsPrimary = IsPrimary::No);
-#if ENABLE(TOUCH_EVENTS) && (PLATFORM(IOS_FAMILY) || PLATFORM(WPE))
@@ -2720,9 +2770,9 @@ index 261a8c7e8946cac87b9ebc5fc5e3b697f326b7f4..02645d3bdce44f40a648e720e99a6b29
static Ref<PointerEvent> create(const PlatformTouchEvent&, unsigned touchIndex, bool isPrimary, Ref<WindowProxy>&&, const IntPoint& touchDelta = { });
static Ref<PointerEvent> create(const AtomString& type, const PlatformTouchEvent&, unsigned touchIndex, bool isPrimary, Ref<WindowProxy>&&, const IntPoint& touchDelta = { });
#endif
-@@ -140,7 +142,7 @@ private:
+@@ -144,7 +146,7 @@ private:
PointerEvent(const AtomString&, Init&&);
- PointerEvent(const AtomString& type, MouseButton, const MouseEvent&, PointerID, const String& pointerType);
+ PointerEvent(const AtomString& type, MouseButton, const MouseEvent&, PointerID, const String& pointerType, CanBubble, IsCancelable);
PointerEvent(const AtomString& type, PointerID, const String& pointerType, IsPrimary);
-#if ENABLE(TOUCH_EVENTS) && (PLATFORM(IOS_FAMILY) || PLATFORM(WPE))
+#if ENABLE(TOUCH_EVENTS)
@@ -2757,7 +2807,7 @@ index 7813532cc52d582c42aebc979a1ecd1137765f08..c01cbd53ad2430a6ffab9a80fc73e74a
#endif // USE(LIBWPE)
diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp
-index 67feb6c9b89bbbbffd343d535d990c682be6e737..c60ffff41ace3b711920d867ab4f8dde9446b487 100644
+index 7a26cfbbaf3d9583064a5eb30a049b5ac04847f0..1377da39ae4cc134b87358871fdb39431161244b 100644
--- a/Source/WebCore/html/FileInputType.cpp
+++ b/Source/WebCore/html/FileInputType.cpp
@@ -37,6 +37,7 @@
@@ -2768,7 +2818,7 @@ index 67feb6c9b89bbbbffd343d535d990c682be6e737..c60ffff41ace3b711920d867ab4f8dde
#include "LocalFrame.h"
#include "LocalizedStrings.h"
#include "MIMETypeRegistry.h"
-@@ -157,6 +158,11 @@ void FileInputType::handleDOMActivateEvent(Event& event)
+@@ -158,6 +159,11 @@ void FileInputType::handleDOMActivateEvent(Event& event)
if (input.isDisabledFormControl())
return;
@@ -2780,7 +2830,7 @@ index 67feb6c9b89bbbbffd343d535d990c682be6e737..c60ffff41ace3b711920d867ab4f8dde
if (!UserGestureIndicator::processingUserGesture())
return;
-@@ -345,7 +351,9 @@ void FileInputType::setFiles(RefPtr<FileList>&& files, RequestIcon shouldRequest
+@@ -346,7 +352,9 @@ void FileInputType::setFiles(RefPtr<FileList>&& files, RequestIcon shouldRequest
pathsChanged = true;
else {
for (unsigned i = 0; i < length; ++i) {
@@ -2873,7 +2923,7 @@ index 3a981b5bf5ca0bbf4d1c9f0b125564742cd8cad9..f8fc2ca6700461627933f149c5837075
} // namespace WebCore
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
-index 79e5f20d096d724bcee0866175c0ceee1fb2ea12..94fbc44587f6a1c58cf81cf4a75cb42ca1e87161 100644
+index da310c6df500f80d2ae762c890ce9733d892ebd1..50db06b983b2eb4ac89942df94838e009bc82175 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -598,6 +598,12 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i
@@ -2965,7 +3015,20 @@ index 79e5f20d096d724bcee0866175c0ceee1fb2ea12..94fbc44587f6a1c58cf81cf4a75cb42c
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
void InspectorInstrumentation::defaultAppearanceDidChangeImpl(InstrumentingAgents& instrumentingAgents)
{
-@@ -1051,6 +1060,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent
+@@ -915,6 +924,12 @@ void InspectorInstrumentation::interceptResponseImpl(InstrumentingAgents& instru
+ networkAgent->interceptResponse(response, identifier, WTFMove(handler));
+ }
+
++void InspectorInstrumentation::setStoppingLoadingDueToProcessSwapImpl(InstrumentingAgents& instrumentingAgents, bool value)
++{
++ if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent())
++ networkAgent->setStoppingLoadingDueToProcessSwap(value);
++}
++
+ // JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
+ static bool isConsoleAssertMessage(MessageSource source, MessageType type)
+ {
+@@ -1051,6 +1066,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent
canvasAgent->consoleStopRecordingCanvas(context);
}
@@ -2978,7 +3041,7 @@ index 79e5f20d096d724bcee0866175c0ceee1fb2ea12..94fbc44587f6a1c58cf81cf4a75cb42c
void InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents& instrumentingAgents, Database& database)
{
if (auto* databaseAgent = instrumentingAgents.enabledDatabaseAgent())
-@@ -1357,6 +1372,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins
+@@ -1357,6 +1378,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins
layerTreeAgent->renderLayerDestroyed(renderLayer);
}
@@ -3015,7 +3078,7 @@ index 79e5f20d096d724bcee0866175c0ceee1fb2ea12..94fbc44587f6a1c58cf81cf4a75cb42c
InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(WorkerOrWorkletGlobalScope& globalScope)
{
return globalScope.inspectorController().m_instrumentingAgents;
-@@ -1373,6 +1418,13 @@ InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(Page& page)
+@@ -1373,6 +1424,13 @@ InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(Page& page)
return page.inspectorController().m_instrumentingAgents.get();
}
@@ -3030,7 +3093,7 @@ index 79e5f20d096d724bcee0866175c0ceee1fb2ea12..94fbc44587f6a1c58cf81cf4a75cb42c
{
// Using RefPtr makes us hit the m_inRemovedLastRefFunction assert.
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
-index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f6873a81c 100644
+index 156e222e4383bee7448347d84cb052b0d9b9ae70..9bce3a168c314fc34043578c248d69cb89b48426 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
@@ -31,6 +31,7 @@
@@ -3080,7 +3143,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
- static void loaderDetachedFromFrame(LocalFrame&, DocumentLoader&);
static void frameStartedLoading(LocalFrame&);
static void frameStoppedLoading(LocalFrame&);
- static void didCompleteRenderingFrame(LocalFrame&);
+ static void didCompleteRenderingFrame(Frame&);
- static void frameScheduledNavigation(Frame&, Seconds delay);
+ static void frameScheduledNavigation(Frame&, Seconds delay, bool targetIsCurrentFrame);
static void frameClearedScheduledNavigation(Frame&);
@@ -3089,7 +3152,15 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
static void defaultAppearanceDidChange(Page&);
#endif
-@@ -269,6 +274,7 @@ public:
+@@ -248,6 +253,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>)>&&);
++ static void setStoppingLoadingDueToProcessSwap(Page*, bool);
+
+ static void addMessageToConsole(Page&, std::unique_ptr<Inspector::ConsoleMessage>);
+ static void addMessageToConsole(WorkerOrWorkletGlobalScope&, std::unique_ptr<Inspector::ConsoleMessage>);
+@@ -269,6 +275,7 @@ public:
static void stopProfiling(Page&, JSC::JSGlobalObject*, const String& title);
static void consoleStartRecordingCanvas(CanvasRenderingContext&, JSC::JSGlobalObject&, JSC::JSObject* options);
static void consoleStopRecordingCanvas(CanvasRenderingContext&);
@@ -3097,7 +3168,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
static void performanceMark(ScriptExecutionContext&, const String&, std::optional<MonotonicTime>, LocalFrame*);
-@@ -327,6 +333,12 @@ public:
+@@ -327,6 +334,12 @@ public:
static void layerTreeDidChange(Page*);
static void renderLayerDestroyed(Page*, const RenderLayer&);
@@ -3110,7 +3181,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
static void frontendCreated();
static void frontendDeleted();
static bool hasFrontends() { return InspectorInstrumentationPublic::hasFrontends(); }
-@@ -343,6 +355,8 @@ public:
+@@ -343,6 +356,8 @@ public:
static void registerInstrumentingAgents(InstrumentingAgents&);
static void unregisterInstrumentingAgents(InstrumentingAgents&);
@@ -3119,7 +3190,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
private:
static void didClearWindowObjectInWorldImpl(InstrumentingAgents&, LocalFrame&, DOMWrapperWorld&);
static bool isDebuggerPausedImpl(InstrumentingAgents&);
-@@ -422,6 +436,7 @@ private:
+@@ -422,6 +437,7 @@ private:
static void didRecalculateStyleImpl(InstrumentingAgents&);
static void didScheduleStyleRecalculationImpl(InstrumentingAgents&, Document&);
static void applyUserAgentOverrideImpl(InstrumentingAgents&, String&);
@@ -3127,7 +3198,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
static void applyEmulatedMediaImpl(InstrumentingAgents&, AtomString&);
static void flexibleBoxRendererBeganLayoutImpl(InstrumentingAgents&, const RenderObject&);
-@@ -436,6 +451,7 @@ private:
+@@ -436,6 +452,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&);
@@ -3135,7 +3206,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void scriptImportedImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const String& sourceString);
-@@ -446,13 +462,13 @@ private:
+@@ -446,13 +463,13 @@ private:
static void frameDetachedFromParentImpl(InstrumentingAgents&, LocalFrame&);
static void didCommitLoadImpl(InstrumentingAgents&, LocalFrame&, DocumentLoader*);
static void frameDocumentUpdatedImpl(InstrumentingAgents&, LocalFrame&);
@@ -3151,7 +3222,15 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
static void defaultAppearanceDidChangeImpl(InstrumentingAgents&);
#endif
-@@ -479,6 +495,7 @@ private:
+@@ -463,6 +480,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>)>&&);
++ static void setStoppingLoadingDueToProcessSwapImpl(InstrumentingAgents&, bool);
+
+ static void addMessageToConsoleImpl(InstrumentingAgents&, std::unique_ptr<Inspector::ConsoleMessage>);
+
+@@ -479,6 +497,7 @@ private:
static void stopProfilingImpl(InstrumentingAgents&, JSC::JSGlobalObject*, const String& title);
static void consoleStartRecordingCanvasImpl(InstrumentingAgents&, CanvasRenderingContext&, JSC::JSGlobalObject&, JSC::JSObject* options);
static void consoleStopRecordingCanvasImpl(InstrumentingAgents&, CanvasRenderingContext&);
@@ -3159,7 +3238,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
static void performanceMarkImpl(InstrumentingAgents&, const String& label, std::optional<MonotonicTime>, LocalFrame*);
-@@ -537,6 +554,12 @@ private:
+@@ -537,6 +556,12 @@ private:
static void layerTreeDidChangeImpl(InstrumentingAgents&);
static void renderLayerDestroyedImpl(InstrumentingAgents&, const RenderLayer&);
@@ -3172,7 +3251,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
static InstrumentingAgents& instrumentingAgents(Page&);
static InstrumentingAgents& instrumentingAgents(WorkerOrWorkletGlobalScope&);
static InstrumentingAgents& instrumentingAgents(ServiceWorkerGlobalScope&);
-@@ -1070,6 +1093,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(LocalFrame& frame,
+@@ -1070,6 +1095,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(LocalFrame& frame,
applyUserAgentOverrideImpl(*agents, userAgent);
}
@@ -3186,7 +3265,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
inline void InspectorInstrumentation::applyEmulatedMedia(LocalFrame& frame, AtomString& media)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1172,6 +1202,13 @@ inline void InspectorInstrumentation::didFailLoading(ServiceWorkerGlobalScope& g
+@@ -1172,6 +1204,13 @@ inline void InspectorInstrumentation::didFailLoading(ServiceWorkerGlobalScope& g
didFailLoadingImpl(instrumentingAgents(globalScope), identifier, nullptr, error);
}
@@ -3200,7 +3279,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(LocalFrame& frame, ResourceLoaderIdentifier identifier, DocumentLoader& loader, const ResourceResponse& response)
{
// Treat the same as didReceiveResponse.
-@@ -1262,13 +1299,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(LocalFrame& frame)
+@@ -1262,13 +1301,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(LocalFrame& frame)
frameDocumentUpdatedImpl(*agents, frame);
}
@@ -3214,7 +3293,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
inline void InspectorInstrumentation::frameStartedLoading(LocalFrame& frame)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1290,11 +1320,11 @@ inline void InspectorInstrumentation::frameStoppedLoading(LocalFrame& frame)
+@@ -1290,11 +1322,11 @@ inline void InspectorInstrumentation::frameStoppedLoading(LocalFrame& frame)
frameStoppedLoadingImpl(*agents, frame);
}
@@ -3228,7 +3307,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
}
inline void InspectorInstrumentation::frameClearedScheduledNavigation(Frame& frame)
-@@ -1310,6 +1340,13 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page)
+@@ -1310,6 +1342,13 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page)
accessibilitySettingsDidChangeImpl(instrumentingAgents(page));
}
@@ -3242,7 +3321,21 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
inline void InspectorInstrumentation::defaultAppearanceDidChange(Page& page)
{
-@@ -1698,6 +1735,11 @@ inline void InspectorInstrumentation::performanceMark(ScriptExecutionContext& co
+@@ -1362,6 +1401,13 @@ inline void InspectorInstrumentation::interceptResponse(const LocalFrame& frame,
+ interceptResponseImpl(*agents, response, identifier, WTFMove(handler));
+ }
+
++inline void InspectorInstrumentation::setStoppingLoadingDueToProcessSwap(Page* page, bool value)
++{
++ ASSERT(InspectorInstrumentationPublic::hasFrontends());
++ if (auto* agents = instrumentingAgents(page))
++ setStoppingLoadingDueToProcessSwapImpl(*agents, value);
++}
++
+ inline void InspectorInstrumentation::didOpenDatabase(Database& database)
+ {
+ FAST_RETURN_IF_NO_FRONTENDS(void());
+@@ -1698,6 +1744,11 @@ inline void InspectorInstrumentation::performanceMark(ScriptExecutionContext& co
performanceMarkImpl(*agents, label, WTFMove(startTime), frame);
}
@@ -3254,7 +3347,7 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
inline void InspectorInstrumentation::didRequestAnimationFrame(Document& document, int callbackId)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1754,6 +1796,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren
+@@ -1754,6 +1805,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren
renderLayerDestroyedImpl(*agents, renderLayer);
}
@@ -3297,8 +3390,60 @@ index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f
inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgents(ScriptExecutionContext* context)
{
return context ? instrumentingAgents(*context) : nullptr;
+diff --git a/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp b/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp
+index a67a1244fa526ad5759068e97e0d220f59565d6e..0048589109fccb9472fe35a410337771b1063d72 100644
+--- a/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp
++++ b/Source/WebCore/inspector/InspectorInstrumentationWebKit.cpp
+@@ -50,4 +50,9 @@ void InspectorInstrumentationWebKit::interceptResponseInternal(const LocalFrame&
+ InspectorInstrumentation::interceptResponse(frame, response, identifier, WTFMove(handler));
+ }
+
++void InspectorInstrumentationWebKit::setStoppingLoadingDueToProcessSwapInternal(Page* page, bool value)
++{
++ InspectorInstrumentation::setStoppingLoadingDueToProcessSwap(page, value);
++}
++
+ } // namespace WebCore
+diff --git a/Source/WebCore/inspector/InspectorInstrumentationWebKit.h b/Source/WebCore/inspector/InspectorInstrumentationWebKit.h
+index c028341e84e59a6b1b16107fd74feb21f70b12ab..d385418ac34e8f315f201801a2c65226c8f6fee2 100644
+--- a/Source/WebCore/inspector/InspectorInstrumentationWebKit.h
++++ b/Source/WebCore/inspector/InspectorInstrumentationWebKit.h
+@@ -33,6 +33,7 @@
+ namespace WebCore {
+
+ class LocalFrame;
++class Page;
+ class ResourceLoader;
+ class ResourceRequest;
+ class ResourceResponse;
+@@ -44,12 +45,14 @@ 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>)>&&);
++ static void setStoppingLoadingDueToProcessSwap(Page*, bool);
+
+ private:
+ static bool shouldInterceptRequestInternal(const ResourceLoader&);
+ static bool shouldInterceptResponseInternal(const LocalFrame&, const ResourceResponse&);
+ static void interceptRequestInternal(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
+ static void interceptResponseInternal(const LocalFrame&, const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<FragmentedSharedBuffer>)>&&);
++ static void setStoppingLoadingDueToProcessSwapInternal(Page*, bool);
+ };
+
+ inline bool InspectorInstrumentationWebKit::shouldInterceptRequest(const ResourceLoader& loader)
+@@ -79,4 +82,10 @@ inline void InspectorInstrumentationWebKit::interceptResponse(const LocalFrame*
+ interceptResponseInternal(*frame, response, identifier, WTFMove(handler));
+ }
+
++inline void InspectorInstrumentationWebKit::setStoppingLoadingDueToProcessSwap(Page* page, bool value)
++{
++ FAST_RETURN_IF_NO_FRONTENDS(void());
++ setStoppingLoadingDueToProcessSwapInternal(page, value);
++}
++
+ }
diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
-index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69db64f9720 100644
+index ec5000cb553f244224ac2dc5be229c11c42e5d7f..cf6bc9545f04ad7fdba7c2dfaf46ac45e158f15e 100644
--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
@@ -55,6 +55,7 @@
@@ -3340,7 +3485,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
#include "StaticNodeList.h"
#include "StyleProperties.h"
#include "StyleResolver.h"
-@@ -145,7 +153,8 @@ using namespace HTMLNames;
+@@ -146,7 +154,8 @@ using namespace HTMLNames;
static const size_t maxTextSize = 10000;
static const UChar horizontalEllipsisUChar[] = { horizontalEllipsis, 0 };
@@ -3350,7 +3495,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
{
if (!colorObject)
return std::nullopt;
-@@ -164,7 +173,7 @@ static std::optional<Color> parseColor(RefPtr<JSON::Object>&& colorObject)
+@@ -165,7 +174,7 @@ static std::optional<Color> parseColor(RefPtr<JSON::Object>&& colorObject)
static std::optional<Color> parseRequiredConfigColor(const String& fieldName, JSON::Object& configObject)
{
@@ -3359,7 +3504,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
}
static Color parseOptionalConfigColor(const String& fieldName, JSON::Object& configObject)
-@@ -192,6 +201,20 @@ static bool parseQuad(Ref<JSON::Array>&& quadArray, FloatQuad* quad)
+@@ -193,6 +202,20 @@ static bool parseQuad(Ref<JSON::Array>&& quadArray, FloatQuad* quad)
return true;
}
@@ -3380,7 +3525,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
class RevalidateStyleAttributeTask {
WTF_MAKE_FAST_ALLOCATED;
public:
-@@ -466,6 +489,20 @@ Node* InspectorDOMAgent::assertNode(Inspector::Protocol::ErrorString& errorStrin
+@@ -467,6 +490,20 @@ Node* InspectorDOMAgent::assertNode(Inspector::Protocol::ErrorString& errorStrin
return node.get();
}
@@ -3401,7 +3546,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
Document* InspectorDOMAgent::assertDocument(Inspector::Protocol::ErrorString& errorString, Inspector::Protocol::DOM::NodeId nodeId)
{
RefPtr node = assertNode(errorString, nodeId);
-@@ -1540,16 +1577,7 @@ Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightNode(std::o
+@@ -1541,16 +1578,7 @@ Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightNode(std::o
Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightNode(std::optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const Inspector::Protocol::Runtime::RemoteObjectId& objectId, Ref<JSON::Object>&& highlightInspectorObject, RefPtr<JSON::Object>&& gridOverlayInspectorObject, RefPtr<JSON::Object>&& flexOverlayInspectorObject, std::optional<bool>&& showRulers)
{
Inspector::Protocol::ErrorString errorString;
@@ -3419,7 +3564,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
if (!node)
return makeUnexpected(errorString);
-@@ -1804,15 +1832,155 @@ Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::setInspectedNode(Ins
+@@ -1805,15 +1833,155 @@ Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::setInspectedNode(Ins
return { };
}
@@ -3578,7 +3723,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
if (!object)
return makeUnexpected("Missing injected script for given nodeId"_s);
-@@ -3078,7 +3246,7 @@ Inspector::Protocol::ErrorStringOr<Inspector::Protocol::DOM::NodeId> InspectorDO
+@@ -3079,7 +3247,7 @@ Inspector::Protocol::ErrorStringOr<Inspector::Protocol::DOM::NodeId> InspectorDO
return makeUnexpected("Missing node for given path"_s);
}
@@ -3587,7 +3732,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
{
Document* document = &node->document();
if (auto* templateHost = document->templateDocumentHost())
-@@ -3087,12 +3255,18 @@ RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNod
+@@ -3088,12 +3256,18 @@ RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNod
if (!frame)
return nullptr;
@@ -3609,7 +3754,7 @@ index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69d
}
Node* InspectorDOMAgent::scriptValueAsNode(JSC::JSValue value)
-@@ -3200,4 +3374,89 @@ Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::DOM::MediaStats>> In
+@@ -3201,4 +3375,89 @@ Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::DOM::MediaStats>> In
#endif
}
@@ -3773,7 +3918,7 @@ index 5f1dba2bc4d5c2f113a88dcc9ba479679cb79233..73e49d699919b68cffff41f612e461e2
void discardBindings();
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
-index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf72cdbbf8 100644
+index f8a58175bdaa13ae7d2bb722df119e140ec7618f..b601fdd3d16a3fc016ce3af50d416a0880990d7b 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
@@ -59,6 +59,7 @@
@@ -3784,7 +3929,7 @@ index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf
#include "Page.h"
#include "PlatformStrategies.h"
#include "ProgressTracker.h"
-@@ -339,8 +340,8 @@ static Ref<Inspector::Protocol::Network::Request> buildObjectForResourceRequest(
+@@ -340,8 +341,8 @@ static Ref<Inspector::Protocol::Network::Request> buildObjectForResourceRequest(
.release();
if (request.httpBody() && !request.httpBody()->isEmpty()) {
@@ -3795,7 +3940,7 @@ index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf
}
if (resourceLoader) {
-@@ -393,6 +394,8 @@ RefPtr<Inspector::Protocol::Network::Response> InspectorNetworkAgent::buildObjec
+@@ -394,6 +395,8 @@ RefPtr<Inspector::Protocol::Network::Response> InspectorNetworkAgent::buildObjec
.setSource(responseSource(response.source()))
.release();
@@ -3804,7 +3949,25 @@ index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf
if (resourceLoader) {
auto* metrics = response.deprecatedNetworkLoadMetricsOrNull();
responseObject->setTiming(buildObjectForTiming(metrics ? *metrics : NetworkLoadMetrics::emptyMetrics(), *resourceLoader));
-@@ -960,6 +963,7 @@ void InspectorNetworkAgent::continuePendingResponses()
+@@ -680,6 +683,9 @@ void InspectorNetworkAgent::didFailLoading(ResourceLoaderIdentifier identifier,
+ String requestId = IdentifiersFactory::requestId(identifier.toUInt64());
+
+ if (loader && m_resourcesData->resourceType(requestId) == InspectorPageAgent::DocumentResource) {
++ if (m_stoppingLoadingDueToProcessSwap)
++ return;
++
+ auto* frame = loader->frame();
+ if (frame && frame->loader().documentLoader() && frame->document()) {
+ m_resourcesData->addResourceSharedBuffer(requestId,
+@@ -909,6 +915,7 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::disable()
+ m_instrumentingAgents.setEnabledNetworkAgent(nullptr);
+ m_resourcesData->clear();
+ m_extraRequestHeaders.clear();
++ m_stoppingLoadingDueToProcessSwap = false;
+
+ continuePendingRequests();
+ continuePendingResponses();
+@@ -961,6 +968,7 @@ void InspectorNetworkAgent::continuePendingResponses()
Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::setExtraHTTPHeaders(Ref<JSON::Object>&& headers)
{
@@ -3812,7 +3975,19 @@ index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf
for (auto& entry : headers.get()) {
auto stringValue = entry.value->asString();
if (!!stringValue)
-@@ -1238,6 +1242,9 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithReq
+@@ -1210,6 +1218,11 @@ void InspectorNetworkAgent::interceptResponse(const ResourceResponse& response,
+ m_frontendDispatcher->responseIntercepted(requestId, resourceResponse.releaseNonNull());
+ }
+
++void InspectorNetworkAgent::setStoppingLoadingDueToProcessSwap(bool stopping)
++{
++ m_stoppingLoadingDueToProcessSwap = stopping;
++}
++
+ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptContinue(const Inspector::Protocol::Network::RequestId& requestId, Inspector::Protocol::Network::NetworkStage networkStage)
+ {
+ switch (networkStage) {
+@@ -1239,6 +1252,9 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithReq
return makeUnexpected("Missing pending intercept request for given requestId"_s);
auto& loader = *pendingRequest->m_loader;
@@ -3822,7 +3997,7 @@ index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf
ResourceRequest request = loader.request();
if (!!url)
request.setURL(URL({ }, url));
-@@ -1333,14 +1340,23 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequest
+@@ -1334,14 +1350,23 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequest
response.setHTTPStatusCode(status);
response.setHTTPStatusText(String { statusText });
HTTPHeaderMap explicitHeaders;
@@ -3848,7 +4023,7 @@ index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf
if (loader->reachedTerminalState())
return;
-@@ -1403,6 +1419,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::setEmulatedCondi
+@@ -1404,6 +1429,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorNetworkAgent::setEmulatedCondi
#endif // ENABLE(INSPECTOR_NETWORK_THROTTLING)
@@ -3862,7 +4037,7 @@ index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf
{
return startsWithLettersIgnoringASCIICase(mimeType, "text/"_s)
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
-index dc7e574ee6e9256a1f75ea838d20ca7f5e9190de..5dd4464256e0f5d652fa51fd611286ddc1da6f5c 100644
+index dc7e574ee6e9256a1f75ea838d20ca7f5e9190de..03a28b599df29e82392b70cf6b83a700134c53a3 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.h
@@ -34,6 +34,8 @@
@@ -3882,8 +4057,24 @@ index dc7e574ee6e9256a1f75ea838d20ca7f5e9190de..5dd4464256e0f5d652fa51fd611286dd
// InspectorInstrumentation
void willRecalculateStyle();
+@@ -132,6 +135,7 @@ public:
+ bool shouldInterceptResponse(const ResourceResponse&);
+ void interceptResponse(const ResourceResponse&, ResourceLoaderIdentifier, CompletionHandler<void(const ResourceResponse&, RefPtr<FragmentedSharedBuffer>)>&&);
+ void interceptRequest(ResourceLoader&, Function<void(const ResourceRequest&)>&&);
++ void setStoppingLoadingDueToProcessSwap(bool);
+
+ 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>>&);
+@@ -258,6 +262,7 @@ private:
+ bool m_enabled { false };
+ bool m_loadingXHRSynchronously { false };
+ bool m_interceptionEnabled { false };
++ bool m_stoppingLoadingDueToProcessSwap { false };
+ };
+
+ } // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
-index 84eb4dc2127420db005063e0f60d5ad950081719..5f85bc7ba23b9488d03bf7dfa5da645fb2717734 100644
+index 97fa6f1ae18db5b4a1fc8f8f99ce0605fb76a793..fd761459048e7e976b7351eb8714acc63f42bf2d 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
@@ -32,19 +32,26 @@
@@ -3928,7 +4119,7 @@ index 84eb4dc2127420db005063e0f60d5ad950081719..5f85bc7ba23b9488d03bf7dfa5da645f
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "SecurityOrigin.h"
-@@ -66,11 +76,18 @@
+@@ -66,14 +76,21 @@
#include "StyleScope.h"
#include "Theme.h"
#include <pal/text/TextEncoding.h>
@@ -3946,7 +4137,11 @@ index 84eb4dc2127420db005063e0f60d5ad950081719..5f85bc7ba23b9488d03bf7dfa5da645f
+#include <wtf/RefPtr.h>
#include <wtf/Stopwatch.h>
#include <wtf/text/Base64.h>
- #include <wtf/text/StringBuilder.h>
+-#include <wtf/text/StringBuilder.h>
++#include <wtf/text/MakeString.h>
+
+ #if ENABLE(APPLICATION_MANIFEST)
+ #include "CachedApplicationManifest.h"
@@ -92,6 +109,11 @@ namespace WebCore {
using namespace Inspector;
@@ -4286,7 +4481,7 @@ index 84eb4dc2127420db005063e0f60d5ad950081719..5f85bc7ba23b9488d03bf7dfa5da645f
-Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, int width, int height, Inspector::Protocol::Page::CoordinateSystem coordinateSystem)
+Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, int width, int height, Inspector::Protocol::Page::CoordinateSystem coordinateSystem, std::optional<bool>&& omitDeviceScaleFactor)
{
- SnapshotOptions options { { }, PixelFormat::BGRA8, DestinationColorSpace::SRGB() };
+ SnapshotOptions options { { }, ImageBufferPixelFormat::BGRA8, DestinationColorSpace::SRGB() };
if (coordinateSystem == Inspector::Protocol::Page::CoordinateSystem::Viewport)
options.flags.add(SnapshotFlags::InViewCoordinates);
+ if (omitDeviceScaleFactor.has_value() && *omitDeviceScaleFactor)
@@ -4322,7 +4517,7 @@ index 84eb4dc2127420db005063e0f60d5ad950081719..5f85bc7ba23b9488d03bf7dfa5da645f
+{
+ bool success = WTF::setTimeZoneOverride(timeZone);
+ if (!success)
-+ return makeUnexpected("Invalid time zone "_s + timeZone);
++ return makeUnexpected(makeString("Invalid time zone "_s, timeZone));
+
+ return { };
+}
@@ -5193,10 +5388,10 @@ index 2ca6ee01a341eefead66a92e2af77875263a9df3..131bbd8c268a748b43cac105370d7b73
protected:
static SameSiteInfo sameSiteInfo(const Document&, IsForDOMCookieAccess = IsForDOMCookieAccess::No);
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
-index fa516b91382c4c784d30f38a6782e7a29007e7d4..89c56c793e97771f75b109a2fd04a0e671425aa1 100644
+index 22b83991d32085991eb502728333dc7648ab883f..6bd27284c1799448f387338738c7a7fbc8cc3690 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
-@@ -765,8 +765,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc
+@@ -766,8 +766,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc
if (!didReceiveRedirectResponse)
return completionHandler(WTFMove(newRequest));
@@ -5228,7 +5423,7 @@ index fa516b91382c4c784d30f38a6782e7a29007e7d4..89c56c793e97771f75b109a2fd04a0e6
{
ASSERT(navigationID);
diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h
-index 05c8c4a42b9273c15889c0ab11199b67954dfe15..6947545eef196ef105c6292c8734b5b86d7dc8f2 100644
+index 3f7d86c6ba98d5d5a6ad716bd3d78885bb9411e0..94dbc77f454b70733d7f15db8fac00ac72fb8657 100644
--- a/Source/WebCore/loader/DocumentLoader.h
+++ b/Source/WebCore/loader/DocumentLoader.h
@@ -207,6 +207,8 @@ public:
@@ -5241,10 +5436,10 @@ index 05c8c4a42b9273c15889c0ab11199b67954dfe15..6947545eef196ef105c6292c8734b5b8
CheckedPtr<FrameLoader> checkedFrameLoader() const;
WEBCORE_EXPORT SubresourceLoader* mainResourceLoader() const;
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
-index 213b18eed87af84e1f36ccda4008e3d2ea24721f..b8d3567ef231c363a5b40caef6427657d4cdb73f 100644
+index 231a764c5b88f9986e324587e62f94abd119fff8..260b5368d67f75616e7aeba7c3170fb52af5f054 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
-@@ -1290,6 +1290,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat
+@@ -1322,6 +1322,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat
}
m_client->dispatchDidNavigateWithinPage();
@@ -5252,16 +5447,15 @@ index 213b18eed87af84e1f36ccda4008e3d2ea24721f..b8d3567ef231c363a5b40caef6427657
document->statePopped(stateObject ? stateObject.releaseNonNull() : SerializedScriptValue::nullValue());
m_client->dispatchDidPopStateWithinPage();
-@@ -1781,6 +1782,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
- if (!dispatchNavigateEvent(newURL, type, loader->triggeringAction(), NavigationHistoryBehavior::Auto, true))
- return;
+@@ -1821,6 +1822,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+ const String& httpMethod = loader->request().httpMethod();
+ if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {
+ loader->replacedByFragmentNavigation(m_frame);
-+
+
RefPtr oldDocumentLoader = m_documentLoader;
NavigationAction action { frame->protectedDocument().releaseNonNull(), loader->request(), InitiatedByMainFrame::Unknown, loader->isRequestFromClientOrUserInput(), policyChecker().loadType(), isFormSubmission };
- oldDocumentLoader->setTriggeringAction(WTFMove(action));
-@@ -1814,7 +1817,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+@@ -1857,7 +1859,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
}
RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()) || frame->history().provisionalItem());
@@ -5271,21 +5465,17 @@ index 213b18eed87af84e1f36ccda4008e3d2ea24721f..b8d3567ef231c363a5b40caef6427657
continueLoadAfterNavigationPolicy(request, RefPtr { weakFormState.get() }.get(), navigationPolicyDecision, allowNavigationToInvalidURL);
completionHandler();
}, PolicyDecisionMode::Asynchronous);
-@@ -3079,14 +3084,19 @@ String FrameLoader::userAgent(const URL& url) const
+@@ -3126,10 +3130,15 @@ String FrameLoader::userAgent(const URL& url) const
String FrameLoader::navigatorPlatform() const
{
+ String platform;
+
- if (RefPtr localFrame = dynamicDowncast<LocalFrame>(m_frame->mainFrame())) {
- if (RefPtr documentLoader = localFrame->loader().activeDocumentLoader()) {
- auto& customNavigatorPlatform = documentLoader->customNavigatorPlatform();
- if (!customNavigatorPlatform.isEmpty())
-- return customNavigatorPlatform;
-+ platform = customNavigatorPlatform;
- }
- }
+ auto customNavigatorPlatform = m_frame->mainFrame().customNavigatorPlatform();
+ if (!customNavigatorPlatform.isEmpty())
+- return customNavigatorPlatform;
- return String();
++ platform = customNavigatorPlatform;
+
+ InspectorInstrumentation::applyPlatformOverride(m_frame, platform);
+
@@ -5293,7 +5483,7 @@ index 213b18eed87af84e1f36ccda4008e3d2ea24721f..b8d3567ef231c363a5b40caef6427657
}
void FrameLoader::dispatchOnloadEvents()
-@@ -3544,6 +3554,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error, LoadWill
+@@ -3594,6 +3603,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error, LoadWill
checkCompleted();
if (frame->page())
checkLoadComplete(loadWillContinueInAnotherProcess);
@@ -5302,7 +5492,7 @@ index 213b18eed87af84e1f36ccda4008e3d2ea24721f..b8d3567ef231c363a5b40caef6427657
}
void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, const SecurityOrigin* requesterOrigin, bool shouldContinue, NavigationHistoryBehavior historyHandling)
-@@ -4422,9 +4434,6 @@ String FrameLoader::referrer() const
+@@ -4476,9 +4487,6 @@ String FrameLoader::referrer() const
void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
{
@@ -5312,7 +5502,7 @@ index 213b18eed87af84e1f36ccda4008e3d2ea24721f..b8d3567ef231c363a5b40caef6427657
Vector<Ref<DOMWrapperWorld>> worlds;
ScriptController::getAllWorlds(worlds);
for (auto& world : worlds)
-@@ -4434,13 +4443,12 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
+@@ -4488,13 +4496,12 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
{
Ref frame = m_frame.get();
@@ -5345,10 +5535,10 @@ index 91340dc21042f545592b442bc42dbceed06219b2..f3591fe333761b10a25ddaf4a4f8d721
virtual bool shouldPerformSecurityChecks() const { return false; }
virtual bool havePerformedSecurityChecks(const ResourceResponse&) const { return false; }
diff --git a/Source/WebCore/loader/NavigationScheduler.cpp b/Source/WebCore/loader/NavigationScheduler.cpp
-index 16e15b0565a75933a4f10828cca190f4b055a05b..0189a5b49bc593b63413abb16524027f24daacc6 100644
+index 9af8f29088f6ac3841fe68cd8629ef18a6ca5675..f28e41daee51b3d4fd6c185532c6acf941dd30ad 100644
--- a/Source/WebCore/loader/NavigationScheduler.cpp
+++ b/Source/WebCore/loader/NavigationScheduler.cpp
-@@ -695,7 +695,7 @@ void NavigationScheduler::startTimer()
+@@ -703,7 +703,7 @@ void NavigationScheduler::startTimer()
Seconds delay = 1_s * m_redirect->delay();
m_timer.startOneShot(delay);
@@ -5392,10 +5582,10 @@ index b74c5258454b0df9f74aa8a5297674b733925685..b6c3999745368c7f7e2e6176bfca6dc0
void ProgressTracker::incrementProgress(ResourceLoaderIdentifier identifier, const ResourceResponse& response)
diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
-index bf685913e33c7d5959c158b7735321682d5e7208..8c184ff01799f5172c9a774a115014c5f6f18270 100644
+index 0838ffc91ef3b9b3990bb05bb0c52dec1128f92e..6f536869db9c2aa0264d2e800bc9f3e7adb9a379 100644
--- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
-@@ -1068,8 +1068,11 @@ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::requ
+@@ -1089,8 +1089,11 @@ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::requ
request.updateReferrerPolicy(document() ? document()->referrerPolicy() : ReferrerPolicy::Default);
@@ -5409,7 +5599,7 @@ index bf685913e33c7d5959c158b7735321682d5e7208..8c184ff01799f5172c9a774a115014c5
Ref page = *frame->page();
-@@ -1682,8 +1685,9 @@ Vector<Ref<SVGImage>> CachedResourceLoader::allCachedSVGImages() const
+@@ -1703,8 +1706,9 @@ Vector<Ref<SVGImage>> CachedResourceLoader::allCachedSVGImages() const
ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequest&& request)
{
@@ -5422,10 +5612,10 @@ index bf685913e33c7d5959c158b7735321682d5e7208..8c184ff01799f5172c9a774a115014c5
ASSERT(m_document);
if (request.charset().isEmpty() && m_document && (type == CachedResource::Type::Script || type == CachedResource::Type::CSSStyleSheet))
diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h
-index 9225486c5aaf841df1d5de85c40928307b4d72dc..93bc7be141be1043a057b6ad6c297397a5c6cfa8 100644
+index 1712a19473ab6db4db50a1d746846a091dce7417..ed27724b92ba34e0f2a543f398701f31a6764bc3 100644
--- a/Source/WebCore/page/ChromeClient.h
+++ b/Source/WebCore/page/ChromeClient.h
-@@ -335,7 +335,7 @@ public:
+@@ -339,7 +339,7 @@ public:
#endif
#if ENABLE(ORIENTATION_EVENTS)
@@ -5435,10 +5625,10 @@ index 9225486c5aaf841df1d5de85c40928307b4d72dc..93bc7be141be1043a057b6ad6c297397
#if ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp
-index ff5f86a7c24bdb06a7ae0d6015de450a323cdae0..1760ac36123b4543279d7278fd9d328637da9ca3 100644
+index 82f9dab5460c78f49a48adfb8c1fcaf19b0a0b9e..b3c8a054f7c6e0b9db2cdc50fd077c687ccdd62b 100644
--- a/Source/WebCore/page/EventHandler.cpp
+++ b/Source/WebCore/page/EventHandler.cpp
-@@ -4326,6 +4326,12 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
+@@ -4346,6 +4346,12 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
if (!document)
return false;
@@ -5451,7 +5641,7 @@ index ff5f86a7c24bdb06a7ae0d6015de450a323cdae0..1760ac36123b4543279d7278fd9d3286
dragState().dataTransfer = DataTransfer::createForDrag(*document);
auto hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No;
-@@ -4952,7 +4958,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve
+@@ -4972,7 +4978,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve
// Increment the platform touch id by 1 to avoid storing a key of 0 in the hashmap.
unsigned touchPointTargetKey = point.id() + 1;
@@ -5460,7 +5650,7 @@ index ff5f86a7c24bdb06a7ae0d6015de450a323cdae0..1760ac36123b4543279d7278fd9d3286
bool pointerCancelled = false;
#endif
RefPtr<EventTarget> touchTarget;
-@@ -4999,7 +5005,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve
+@@ -5019,7 +5025,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve
// we also remove it from the map.
touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey);
@@ -5469,7 +5659,7 @@ index ff5f86a7c24bdb06a7ae0d6015de450a323cdae0..1760ac36123b4543279d7278fd9d3286
HitTestResult result = hitTestResultAtPoint(pagePoint, hitType | HitTestRequest::Type::AllowChildFrameContent);
pointerTarget = result.targetElement();
pointerCancelled = (pointerTarget != touchTarget);
-@@ -5022,7 +5028,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve
+@@ -5042,7 +5048,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve
if (!targetFrame)
continue;
@@ -5518,7 +5708,7 @@ index 084db825e36bd46126fea95fc7183bf2e931be7e..dac3caef67600f8c7c945fd857a91140
}
diff --git a/Source/WebCore/page/FrameSnapshotting.h b/Source/WebCore/page/FrameSnapshotting.h
-index 055e3d8b2821c366b403fcc6ea0f2c9b1bd8029b..0e1bb019ba0ad1f76ef62abb164b80ccf26755be 100644
+index 5b365008debe6b8d5a95a572a4c2725b0a7a519d..2c6ad49a45a1759f446aced179c0c5a7bfb4b07a 100644
--- a/Source/WebCore/page/FrameSnapshotting.h
+++ b/Source/WebCore/page/FrameSnapshotting.h
@@ -55,6 +55,7 @@ enum class SnapshotFlags : uint16_t {
@@ -5530,7 +5720,7 @@ index 055e3d8b2821c366b403fcc6ea0f2c9b1bd8029b..0e1bb019ba0ad1f76ef62abb164b80cc
struct SnapshotOptions {
diff --git a/Source/WebCore/page/History.cpp b/Source/WebCore/page/History.cpp
-index 2b5e1e58bad69cba3d4c6de1e0d35f01ad9bb5f2..098355b3f71ebc2ec51862671a860d2964850c88 100644
+index 097302d7502b8a28db7c7ab8d778d17365b03533..4ab5ee0e71b2010ea5297e8d1d4ec03b9fd27097 100644
--- a/Source/WebCore/page/History.cpp
+++ b/Source/WebCore/page/History.cpp
@@ -32,6 +32,7 @@
@@ -5541,16 +5731,17 @@ index 2b5e1e58bad69cba3d4c6de1e0d35f01ad9bb5f2..098355b3f71ebc2ec51862671a860d29
#include "LocalFrame.h"
#include "LocalFrameLoaderClient.h"
#include "Logging.h"
-@@ -304,6 +305,7 @@ ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& data
+@@ -304,6 +305,8 @@ ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& data
- if (!urlString.isEmpty())
- frame->protectedDocument()->updateURLForPushOrReplaceState(fullURL);
+ auto historyBehavior = stateObjectType == StateObjectType::Replace ? NavigationHistoryBehavior::Replace : NavigationHistoryBehavior::Push;
+ frame->loader().updateURLAndHistory(fullURL, WTFMove(data), historyBehavior);
+ InspectorInstrumentation::didNavigateWithinPage(*frame);
++
+ return { };
+ }
- if (stateObjectType == StateObjectType::Push) {
- frame->checkedHistory()->pushState(WTFMove(data), fullURL.string());
diff --git a/Source/WebCore/page/LocalFrame.cpp b/Source/WebCore/page/LocalFrame.cpp
-index 114dbb1c6838198c7240af78726dd58073051704..26a2eebe64e0d34710ddd02b3dbb350ddef53f3a 100644
+index 119ae91c675f4bf1d03b9fc4878c9449416583b8..f0a10738508ca82499b474b8f221fdaf18ec3efc 100644
--- a/Source/WebCore/page/LocalFrame.cpp
+++ b/Source/WebCore/page/LocalFrame.cpp
@@ -40,6 +40,7 @@
@@ -5594,7 +5785,7 @@ index 114dbb1c6838198c7240af78726dd58073051704..26a2eebe64e0d34710ddd02b3dbb350d
return 0;
}
#endif // ENABLE(ORIENTATION_EVENTS)
-@@ -1340,6 +1344,362 @@ String LocalFrame::customUserAgentAsSiteSpecificQuirks() const
+@@ -1350,6 +1354,362 @@ OptionSet<AdvancedPrivacyProtections> LocalFrame::advancedPrivacyProtections() c
return { };
}
@@ -5958,7 +6149,7 @@ index 114dbb1c6838198c7240af78726dd58073051704..26a2eebe64e0d34710ddd02b3dbb350d
#undef FRAME_RELEASE_LOG_ERROR
diff --git a/Source/WebCore/page/LocalFrame.h b/Source/WebCore/page/LocalFrame.h
-index aef60e6fe0be63ec1aca391fde6a1bc961a9e768..fd43db619f60121d4a2dbadb08c4c8e1d4092226 100644
+index c2fc366ed759fb9e1d83821c4fff4b05a6b8fe35..d3eec8aa3129ae6567b1402968374015f11efaa2 100644
--- a/Source/WebCore/page/LocalFrame.h
+++ b/Source/WebCore/page/LocalFrame.h
@@ -28,8 +28,10 @@
@@ -6020,7 +6211,7 @@ index aef60e6fe0be63ec1aca391fde6a1bc961a9e768..fd43db619f60121d4a2dbadb08c4c8e1
void selfOnlyRef();
void selfOnlyDeref();
-@@ -353,7 +355,6 @@ private:
+@@ -355,7 +357,6 @@ private:
#if ENABLE(DATA_DETECTION)
std::unique_ptr<DataDetectionResultsStorage> m_dataDetectionResults;
#endif
@@ -6028,7 +6219,7 @@ index aef60e6fe0be63ec1aca391fde6a1bc961a9e768..fd43db619f60121d4a2dbadb08c4c8e1
void betterApproximateNode(const IntPoint& testPoint, const NodeQualifier&, Node*& best, Node* failedNode, IntPoint& bestPoint, IntRect& bestRect, const IntRect& testRect);
bool hitTestResultAtViewportLocation(const FloatPoint& viewportLocation, HitTestResult&, IntPoint& center);
-@@ -361,6 +362,7 @@ private:
+@@ -363,6 +364,7 @@ private:
enum class ShouldFindRootEditableElement : bool { No, Yes };
Node* qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, const NodeQualifier&, ShouldApproximate, ShouldFindRootEditableElement = ShouldFindRootEditableElement::Yes);
@@ -6037,10 +6228,10 @@ index aef60e6fe0be63ec1aca391fde6a1bc961a9e768..fd43db619f60121d4a2dbadb08c4c8e1
ViewportArguments m_viewportArguments;
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp
-index 34c1e3039b5db70d15493524c96e507c2ce95199..2eb25218240da0a7878d9db2be1e9d3301e5d990 100644
+index 72ffbbfd28edb23a93c8c8fba76ab25a7f7b0f72..8d787339e6b570e210765bb1cddec6c4705c2a25 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
-@@ -579,6 +579,45 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
+@@ -592,6 +592,45 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
document->updateViewportArguments();
}
@@ -6086,7 +6277,7 @@ index 34c1e3039b5db70d15493524c96e507c2ce95199..2eb25218240da0a7878d9db2be1e9d33
ScrollingCoordinator* Page::scrollingCoordinator()
{
if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) {
-@@ -3868,6 +3907,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
+@@ -3873,6 +3912,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
#endif
}
@@ -6114,10 +6305,10 @@ index 34c1e3039b5db70d15493524c96e507c2ce95199..2eb25218240da0a7878d9db2be1e9d33
{
if (insets == m_fullscreenInsets)
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
-index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd8a083b9d 100644
+index 67a128b27cdd46115158ec20e7ce38dd56fde3d6..8ec6a45348412257db2b027f6f15027a21725466 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
-@@ -321,6 +321,9 @@ public:
+@@ -341,6 +341,9 @@ public:
const std::optional<ViewportArguments>& overrideViewportArguments() const { return m_overrideViewportArguments; }
WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional<ViewportArguments>&);
@@ -6127,7 +6318,7 @@ index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd
static void refreshPlugins(bool reload);
WEBCORE_EXPORT PluginData& pluginData();
void clearPluginData();
-@@ -385,6 +388,10 @@ public:
+@@ -405,6 +408,10 @@ public:
#if ENABLE(DRAG_SUPPORT)
DragController& dragController() { return m_dragController.get(); }
const DragController& dragController() const { return m_dragController.get(); }
@@ -6138,7 +6329,7 @@ index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd
#endif
FocusController& focusController() const { return *m_focusController; }
WEBCORE_EXPORT CheckedRef<FocusController> checkedFocusController() const;
-@@ -568,6 +575,10 @@ public:
+@@ -588,6 +595,10 @@ public:
WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel);
bool defaultUseDarkAppearance() const { return m_useDarkAppearance; }
void setUseDarkAppearanceOverride(std::optional<bool>);
@@ -6149,7 +6340,7 @@ index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd
#if ENABLE(TEXT_AUTOSIZING)
float textAutosizingWidth() const { return m_textAutosizingWidth; }
-@@ -1015,6 +1026,11 @@ public:
+@@ -1035,6 +1046,11 @@ public:
WEBCORE_EXPORT void setInteractionRegionsEnabled(bool);
#endif
@@ -6161,7 +6352,7 @@ index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); }
#endif
-@@ -1197,6 +1213,9 @@ private:
+@@ -1248,6 +1264,9 @@ private:
#if ENABLE(DRAG_SUPPORT)
UniqueRef<DragController> m_dragController;
@@ -6171,7 +6362,7 @@ index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd
#endif
std::unique_ptr<FocusController> m_focusController;
#if ENABLE(CONTEXT_MENUS)
-@@ -1275,6 +1294,8 @@ private:
+@@ -1327,6 +1346,8 @@ private:
bool m_useElevatedUserInterfaceLevel { false };
bool m_useDarkAppearance { false };
std::optional<bool> m_useDarkAppearanceOverride;
@@ -6180,7 +6371,7 @@ index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd
#if ENABLE(TEXT_AUTOSIZING)
float m_textAutosizingWidth { 0 };
-@@ -1454,6 +1475,11 @@ private:
+@@ -1506,6 +1527,11 @@ private:
#endif
std::optional<ViewportArguments> m_overrideViewportArguments;
@@ -6193,10 +6384,10 @@ index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
RefPtr<DeviceOrientationUpdateProvider> m_deviceOrientationUpdateProvider;
diff --git a/Source/WebCore/page/PageConsoleClient.cpp b/Source/WebCore/page/PageConsoleClient.cpp
-index 18e3cde7b9ae368de4b87c88c2f8324b77cbd7c8..1ebc51b6d81fc6ae17124e7be7da039609df03d0 100644
+index 8fcc6f546882998be87d52c296c4637c6fd5af0f..73e3adc185923ba249f39f070a0b9fbb20418b0b 100644
--- a/Source/WebCore/page/PageConsoleClient.cpp
+++ b/Source/WebCore/page/PageConsoleClient.cpp
-@@ -439,4 +439,9 @@ Ref<Page> PageConsoleClient::protectedPage() const
+@@ -434,4 +434,9 @@ Ref<Page> PageConsoleClient::protectedPage() const
return m_page.get();
}
@@ -6269,10 +6460,10 @@ index 91a9847a4083393e225f42e71c2dd590a88c0289..b0838c84e4ba24378db42f40a68856af
#endif
;
diff --git a/Source/WebCore/page/Screen.cpp b/Source/WebCore/page/Screen.cpp
-index 4e4dfdebe954bf3f047d3a86a758dfd0913f732e..da2bcd0256cdfc2ba28fb07094abd0b6f9c5f754 100644
+index 706f67ca9d5b98f519080fad94d424a130b18a0e..c98147603680bd21c83a0b2b1593fa84a733f22f 100644
--- a/Source/WebCore/page/Screen.cpp
+++ b/Source/WebCore/page/Screen.cpp
-@@ -111,6 +111,9 @@ int Screen::availLeft() const
+@@ -102,6 +102,9 @@ int Screen::availLeft() const
if (fingerprintingProtectionsEnabled(*frame))
return 0;
@@ -6282,7 +6473,7 @@ index 4e4dfdebe954bf3f047d3a86a758dfd0913f732e..da2bcd0256cdfc2ba28fb07094abd0b6
return static_cast<int>(screenAvailableRect(frame->protectedView().get()).x());
}
-@@ -126,6 +129,9 @@ int Screen::availTop() const
+@@ -117,6 +120,9 @@ int Screen::availTop() const
if (fingerprintingProtectionsEnabled(*frame))
return 0;
@@ -6292,7 +6483,7 @@ index 4e4dfdebe954bf3f047d3a86a758dfd0913f732e..da2bcd0256cdfc2ba28fb07094abd0b6
return static_cast<int>(screenAvailableRect(frame->protectedView().get()).y());
}
-@@ -141,6 +147,9 @@ int Screen::availHeight() const
+@@ -132,6 +138,9 @@ int Screen::availHeight() const
if (fingerprintingProtectionsEnabled(*frame))
return static_cast<int>(frame->screenSize().height());
@@ -6302,7 +6493,7 @@ index 4e4dfdebe954bf3f047d3a86a758dfd0913f732e..da2bcd0256cdfc2ba28fb07094abd0b6
return static_cast<int>(screenAvailableRect(frame->protectedView().get()).height());
}
-@@ -156,6 +165,9 @@ int Screen::availWidth() const
+@@ -147,6 +156,9 @@ int Screen::availWidth() const
if (fingerprintingProtectionsEnabled(*frame))
return static_cast<int>(frame->screenSize().width());
@@ -6313,10 +6504,10 @@ index 4e4dfdebe954bf3f047d3a86a758dfd0913f732e..da2bcd0256cdfc2ba28fb07094abd0b6
}
diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
-index 2b3cffe02206bf456a7c39ef66b3176f89a33b86..64bffe692552e7fbbbabd71e11de9c40c6ec3951 100644
+index 50cf04e63a7de97d508448f181429f5b7fa438a3..6c2a5c085436eac669bce5f1d9094764ba0c6250 100644
--- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
+++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
-@@ -343,6 +343,8 @@ bool ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtoc
+@@ -344,6 +344,8 @@ bool ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtoc
template<typename Predicate, typename... Args>
typename std::enable_if<!std::is_convertible<Predicate, ContentSecurityPolicy::ViolatedDirectiveCallback>::value, bool>::type ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposition, Predicate&& predicate, Args&&... args) const
{
@@ -6325,7 +6516,7 @@ index 2b3cffe02206bf456a7c39ef66b3176f89a33b86..64bffe692552e7fbbbabd71e11de9c40
bool isReportOnly = disposition == ContentSecurityPolicy::Disposition::ReportOnly;
for (auto& policy : m_policies) {
if (policy->isReportOnly() != isReportOnly)
-@@ -356,6 +358,8 @@ typename std::enable_if<!std::is_convertible<Predicate, ContentSecurityPolicy::V
+@@ -357,6 +359,8 @@ typename std::enable_if<!std::is_convertible<Predicate, ContentSecurityPolicy::V
template<typename Predicate, typename... Args>
bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposition, ViolatedDirectiveCallback&& callback, Predicate&& predicate, Args&&... args) const
{
@@ -6334,7 +6525,7 @@ index 2b3cffe02206bf456a7c39ef66b3176f89a33b86..64bffe692552e7fbbbabd71e11de9c40
bool isReportOnly = disposition == ContentSecurityPolicy::Disposition::ReportOnly;
bool isAllowed = true;
for (auto& policy : m_policies) {
-@@ -372,6 +376,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit
+@@ -373,6 +377,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit
template<typename Predicate, typename... Args>
bool ContentSecurityPolicy::allPoliciesAllow(ViolatedDirectiveCallback&& callback, Predicate&& predicate, Args&&... args) const
{
@@ -6475,7 +6666,7 @@ index 34f49853b1d5ac8d8409bbd36d203bf7dfbb08e8..6d2808d510413e89ae9851733437d15b
bool m_disallowFileAccess { false };
};
diff --git a/Source/WebCore/platform/DragImage.cpp b/Source/WebCore/platform/DragImage.cpp
-index dc894343a5d9ce0e45a370a83bebf97fdcbeccc5..00003bd9bada8f134b6cc49f47c8c5cb459d1ebd 100644
+index c359242a7967dab94b8dc3c276a6df5473527145..64b0c6a0bfdf27a0305c25e8b8e0cda637450aa4 100644
--- a/Source/WebCore/platform/DragImage.cpp
+++ b/Source/WebCore/platform/DragImage.cpp
@@ -280,7 +280,7 @@ DragImage::~DragImage()
@@ -6488,10 +6679,10 @@ index dc894343a5d9ce0e45a370a83bebf97fdcbeccc5..00003bd9bada8f134b6cc49f47c8c5cb
IntSize dragImageSize(DragImageRef)
{
diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp
-index a4e3064903c7bfb3d64244804828fe1c6d76c222..2dfa62b08f83ff5e576fcb29962fe885fdffec86 100644
+index 092649a26549e8fc7c5683ad47585b4d7b1a0eab..7944352d9218b6237cfb4baceb686fcfa056c0ef 100644
--- a/Source/WebCore/platform/MIMETypeRegistry.cpp
+++ b/Source/WebCore/platform/MIMETypeRegistry.cpp
-@@ -666,6 +666,9 @@ bool MIMETypeRegistry::canShowMIMEType(const String& mimeType)
+@@ -663,6 +663,9 @@ bool MIMETypeRegistry::canShowMIMEType(const String& mimeType)
if (startsWithLettersIgnoringASCIICase(mimeType, "text/"_s))
return !isUnsupportedTextMIMEType(mimeType);
@@ -6634,7 +6825,7 @@ index ae46341ba71c7f6df7c607bd852338cdb7f83fe1..b318c0771192344a6891c1f097cb0b93
+} // namespace WebCore
+#endif
diff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h
-index 9db6f2d77f14bd77f075a4c826dea1768452fcb9..7a7d48b016037d3865603619b2c4ca67e737bc42 100644
+index 6c64c7040eb190c3d67380070e884a8230029c26..d0f8341c538cbc2323ac0074a5ef3226d00a5fd6 100644
--- a/Source/WebCore/platform/PlatformScreen.h
+++ b/Source/WebCore/platform/PlatformScreen.h
@@ -151,13 +151,18 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);
@@ -6806,10 +6997,10 @@ index d137ffd1a8ed0b788bd28197c6d7e9f7d14e852f..dcf8bf3f7ee6b037a370712e2ac36b6e
if (!image || !encodeImage(image, mimeType, &encodedImage))
return { };
diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.h b/Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.h
-index a82b748682f984fcdd4f5413d0254e0f5573f043..2c3d4bba92c63235c124a400d89455499aa3a189 100644
+index 5b659c763b9754b025a63f89522954cc39915b9a..448b50a2b131361a75d3f816cdcbb6a102551280 100644
--- a/Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.h
+++ b/Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.h
-@@ -38,7 +38,7 @@ WEBCORE_EXPORT uint8_t verifyImageBufferIsBigEnough(const void* buffer, size_t b
+@@ -38,7 +38,7 @@ WEBCORE_EXPORT uint8_t verifyImageBufferIsBigEnough(std::span<const uint8_t> buf
RetainPtr<CFStringRef> utiFromImageBufferMIMEType(const String& mimeType);
CFStringRef jpegUTI();
@@ -6830,8 +7021,21 @@ index 6f43c048cd8354c97097c8365b772b92a429b670..7bccf4f7921fb3b0848781252cd69b4b
namespace WebCore {
+diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
+index 6f4b01b50a2278bfd0d0a072f5d1b6b367128706..f258f5f3e769c8c3a78a7801ebde09234c0298f7 100644
+--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
++++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
+@@ -860,7 +860,7 @@ MediaPlayerEnums::SupportsType GStreamerRegistryScanner::isContentTypeSupported(
+ return SupportsType::IsNotSupported;
+ }
+ #else
+- if (!factories.hasElementForMediaType(ElementFactories::Type::Decryptor, "application/x-webm-enc"))
++ if (!factories.hasElementForMediaType(ElementFactories::Type::Decryptor, "application/x-webm-enc"_s))
+ return SupportsType::IsNotSupported;
+ #endif // GST_CHECK_VERSION(1, 22, 0)
+ }
diff --git a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp b/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp
-index f6d2e39b6a9f454067734b3cb5a03ed243450dfa..fd78c6b39e35b57677ff6da0f66e5a76998efa47 100644
+index eb9710f7d61121f2414c8aa6734dc27653e292bb..9c0c7b350a6140681242ce36a180d6866e3e0fc2 100644
--- a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp
+++ b/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp
@@ -169,6 +169,33 @@ static Vector<unsigned> stringIndicesFromClusters(const Vector<WORD>& clusters,
@@ -6849,7 +7053,7 @@ index f6d2e39b6a9f454067734b3cb5a03ed243450dfa..fd78c6b39e35b57677ff6da0f66e5a76
+ if (!numItems)
+ return numItems;
+
-+ if (font->platformData().isSystemFont() || font->platformData().hasVariations())
++ if (font->platformData().hasVariations())
+ return numItems;
+
+ bool allGoodCharacters = true;
@@ -6878,20 +7082,21 @@ index f6d2e39b6a9f454067734b3cb5a03ed243450dfa..fd78c6b39e35b57677ff6da0f66e5a76
// Determine the string for this item.
const UChar* str = cp.data() + items[i].iCharPos;
diff --git a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
-index 8185125ac6aa07d4ee99d676d82c79932c2d84fd..0b2a8da1463c905d1e6f1448cdc0c0f63228b30f 100644
+index 979ec06ecd698b60066dc6775bf1b647624baa56..14d06fdd5b7b7df2a1942ed975cebf117beb4d1f 100644
--- a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
+++ b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
-@@ -37,7 +37,9 @@
+@@ -37,8 +37,10 @@
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <pal/text/TextEncoding.h>
+#include <wtf/HashMap.h>
#include <wtf/HexNumber.h>
+ #include <wtf/text/MakeString.h>
+#include <mutex>
namespace WebCore {
-@@ -1301,6 +1303,246 @@ int PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode(unsigned keycode)
+@@ -1302,6 +1304,246 @@ int PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode(unsigned keycode)
}
@@ -7368,21 +7573,22 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..4cf29eda13d1f2dc2f03750c0ef8985b
#endif // USE(LIBWPE)
diff --git a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
-index 76f1c37bb02952511a95331d2cc778eabc2375f5..c36cc0ca55e8797264100da69081dace30654393 100644
+index a8674916429908cabb86bd95dc5b3da217e1556b..75cbb518708ebd459b1ed8e3206cdb02e502067d 100644
--- a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
+++ b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
-@@ -30,8 +30,10 @@
+@@ -30,9 +30,11 @@
#include "WindowsKeyboardCodes.h"
#include <wpe/wpe.h>
+#include <wtf/HashMap.h>
#include <wtf/HexNumber.h>
+ #include <wtf/text/MakeString.h>
#include <wtf/text/StringBuilder.h>
+#include <mutex>
namespace WebCore {
-@@ -1302,6 +1304,246 @@ int PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode(unsigned keycode)
+@@ -1303,6 +1305,246 @@ int PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode(unsigned keycode)
return 0;
}
@@ -7746,23 +7952,11 @@ index 0552842dbe3f3a2c12a504178f5a8ca977e1c4db..2ef3b1b459d8a9b4e86b4556feeb4f07
namespace WebCore {
class WEBCORE_EXPORT LibWebRTCProviderGStreamer : public LibWebRTCProvider {
-diff --git a/Source/WebCore/platform/network/DNS.cpp b/Source/WebCore/platform/network/DNS.cpp
-index 3d9581954d0d01ccbe66c8c45d1ff36e5a978e04..a4c95274cf97237cc0dbb25d0641c944aa684538 100644
---- a/Source/WebCore/platform/network/DNS.cpp
-+++ b/Source/WebCore/platform/network/DNS.cpp
-@@ -30,6 +30,7 @@
- #include "DNSResolveQueue.h"
- #include <wtf/CompletionHandler.h>
- #include <wtf/MainThread.h>
-+#include <wtf/URL.h>
-
- #if OS(UNIX)
- #include <arpa/inet.h>
diff --git a/Source/WebCore/platform/network/HTTPHeaderMap.cpp b/Source/WebCore/platform/network/HTTPHeaderMap.cpp
-index 80b35d678bb9f3cd3f34af6258785b0c8a088347..b72058db305a8e6228893c5a8ce3f578861dae89 100644
+index 65679251a5c66afcf60ed4d4267169eefed745f5..2cb9dc1f0e777fd172e52f5a6c8f4d6910c08c47 100644
--- a/Source/WebCore/platform/network/HTTPHeaderMap.cpp
+++ b/Source/WebCore/platform/network/HTTPHeaderMap.cpp
-@@ -235,8 +235,11 @@ void HTTPHeaderMap::add(HTTPHeaderName name, const String& value)
+@@ -236,8 +236,11 @@ void HTTPHeaderMap::add(HTTPHeaderName name, const String& value)
auto index = m_commonHeaders.findIf([&](auto& header) {
return header.key == name;
});
@@ -7789,10 +7983,10 @@ index cf43da22a5f7674a1b24c4d39b492e0b8c318f3a..524e671cf6959fc48aefe4ec5a0611cb
WEBCORE_EXPORT void setCookie(const Cookie&);
WEBCORE_EXPORT void setCookies(const Vector<Cookie>&, const URL&, const URL& mainDocumentURL);
diff --git a/Source/WebCore/platform/network/ResourceResponseBase.cpp b/Source/WebCore/platform/network/ResourceResponseBase.cpp
-index e1bf41ea3b643d3841167abca8a6bd55f5f161f1..d7df4847f04fe832196f269d32c1ce1fc54cc650 100644
+index 97e5f6f38b9c036e8fc2fe6f4d4108f458113816..1391de13e58d82fd0ab9bf66bbc922d5bffa0627 100644
--- a/Source/WebCore/platform/network/ResourceResponseBase.cpp
+++ b/Source/WebCore/platform/network/ResourceResponseBase.cpp
-@@ -74,6 +74,7 @@ ResourceResponseBase::ResourceResponseBase(std::optional<ResourceResponseData> d
+@@ -75,6 +75,7 @@ ResourceResponseBase::ResourceResponseBase(std::optional<ResourceResponseData> d
, m_httpStatusText(data ? data->httpStatusText : String { })
, m_httpVersion(data ? data->httpVersion : String { })
, m_httpHeaderFields(data ? data->httpHeaderFields : HTTPHeaderMap { })
@@ -7800,7 +7994,7 @@ index e1bf41ea3b643d3841167abca8a6bd55f5f161f1..d7df4847f04fe832196f269d32c1ce1f
, m_networkLoadMetrics(data && data->networkLoadMetrics ? Box<NetworkLoadMetrics>::create(*data->networkLoadMetrics) : Box<NetworkLoadMetrics> { })
, m_certificateInfo(data ? data->certificateInfo : std::nullopt)
, m_httpStatusCode(data ? data->httpStatusCode : 0)
-@@ -892,6 +893,7 @@ std::optional<ResourceResponseData> ResourceResponseBase::getResponseData() cons
+@@ -893,6 +894,7 @@ std::optional<ResourceResponseData> ResourceResponseBase::getResponseData() cons
String { m_httpStatusText },
String { m_httpVersion },
HTTPHeaderMap { m_httpHeaderFields },
@@ -7808,7 +8002,7 @@ index e1bf41ea3b643d3841167abca8a6bd55f5f161f1..d7df4847f04fe832196f269d32c1ce1f
m_networkLoadMetrics ? std::optional(*m_networkLoadMetrics) : std::nullopt,
m_source,
m_type,
-@@ -965,6 +967,11 @@ std::optional<WebCore::ResourceResponseData> Coder<WebCore::ResourceResponseData
+@@ -966,6 +968,11 @@ std::optional<WebCore::ResourceResponseData> Coder<WebCore::ResourceResponseData
if (!httpHeaderFields)
return std::nullopt;
@@ -7820,7 +8014,7 @@ index e1bf41ea3b643d3841167abca8a6bd55f5f161f1..d7df4847f04fe832196f269d32c1ce1f
std::optional<short> httpStatusCode;
decoder >> httpStatusCode;
if (!httpStatusCode)
-@@ -1019,6 +1026,7 @@ std::optional<WebCore::ResourceResponseData> Coder<WebCore::ResourceResponseData
+@@ -1020,6 +1027,7 @@ std::optional<WebCore::ResourceResponseData> Coder<WebCore::ResourceResponseData
WTFMove(*httpStatusText),
WTFMove(*httpVersion),
WTFMove(*httpHeaderFields),
@@ -7870,10 +8064,10 @@ index 20b1437401c9560e22fd9e218d8193f09ac2aaaa..ff32706566fefa61030a9e7a1523987d
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 55ebb19af79c92f79061995085538d8913ae180f..3ddb412af7c7587d43b4ddfc12cb49265cb17f95 100644
+index eeea738bc83ef0bf7d7791286915cc65ed662925..fa4c9b8209a6d080c978efcab92d005aaf8bd0b3 100644
--- a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
+++ b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
-@@ -518,6 +518,22 @@ bool NetworkStorageSession::setCookieFromDOM(const URL& firstParty, const SameSi
+@@ -519,6 +519,22 @@ bool NetworkStorageSession::setCookieFromDOM(const URL& firstParty, const SameSi
return false;
}
@@ -7990,10 +8184,10 @@ index 41af70e9bddcb507bf7e57841e4051bc99a78410..87899280f985ca5f0cb135fb9ba53cde
WEBCORE_EXPORT void send(CurlStreamID, UniqueArray<uint8_t>&&, size_t);
diff --git a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
-index 798c95d09029dd354980a227bf906c43d9b75ee3..83461976697da56c2c5e51f56fd3e6fe1a9e28c0 100644
+index 7567442a6bdccbe755b2cf5e3fa42265a065a9e1..4886cf0b5a6bc0b8a270d763ad481f5bc6f0d1c2 100644
--- a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
+++ b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
-@@ -134,6 +134,12 @@ void NetworkStorageSession::setCookieAcceptPolicy(CookieAcceptPolicy policy) con
+@@ -135,6 +135,12 @@ void NetworkStorageSession::setCookieAcceptPolicy(CookieAcceptPolicy policy) con
cookieDatabase().setAcceptPolicy(policy);
}
@@ -8038,10 +8232,10 @@ index 09ab1320beacc41ae92399f3320aaf805d9d81d1..e1caf6e7ebd61151439a9c86350e5712
{
GUniquePtr<SoupCookie> targetCookie(cookie.toSoupCookie());
diff --git a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
-index 602348fdd5c5d7aec9cb00fcc0512be0d791ba68..ded04cb4ac56cf906f4e6e62a2bc50d016363cf5 100644
+index 71c773f4532b6670c4f29496cc8c4bd3093304b1..5876dfa98bb9cdb78d0de807d4408ae661c3f288 100644
--- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
+++ b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
-@@ -39,6 +39,7 @@
+@@ -40,6 +40,7 @@
#include <wtf/text/StringBuilder.h>
#include <wtf/text/win/WCharStringExtras.h>
#include <wtf/unicode/CharacterNames.h>
@@ -8049,7 +8243,7 @@ index 602348fdd5c5d7aec9cb00fcc0512be0d791ba68..ded04cb4ac56cf906f4e6e62a2bc50d0
namespace WebCore {
-@@ -689,7 +690,10 @@ template<typename T> void getStringData(IDataObject* data, FORMATETC* format, Ve
+@@ -690,7 +691,10 @@ template<typename T> void getStringData(IDataObject* data, FORMATETC* format, Ve
STGMEDIUM store;
if (FAILED(data->GetData(format, &store)))
return;
@@ -8104,10 +8298,10 @@ index 0379437d84807e4a8d3846afac5ec8a70e743e70..1ae19e2b755e99c9f4c3e6d5dc0e4f8b
if (!m_dragDataMap.isEmpty() || !m_platformDragData)
return m_dragDataMap;
diff --git a/Source/WebCore/platform/win/KeyEventWin.cpp b/Source/WebCore/platform/win/KeyEventWin.cpp
-index d948c806e68a05a9899a67c00048435c4dc93134..9a5a045f8642ca403b1da59a0ac7e838c86fc4d7 100644
+index d450bf9d0fd1f0bf8f28db483ac9d3d60fa9d114..72a59403a0b5493aea4a8e28eb15eac24b652b09 100644
--- a/Source/WebCore/platform/win/KeyEventWin.cpp
+++ b/Source/WebCore/platform/win/KeyEventWin.cpp
-@@ -242,10 +242,16 @@ PlatformKeyboardEvent::PlatformKeyboardEvent(HWND, WPARAM code, LPARAM keyData,
+@@ -243,10 +243,16 @@ PlatformKeyboardEvent::PlatformKeyboardEvent(HWND, WPARAM code, LPARAM keyData,
{
}
@@ -8128,10 +8322,10 @@ index d948c806e68a05a9899a67c00048435c4dc93134..9a5a045f8642ca403b1da59a0ac7e838
OptionSet<PlatformEvent::Modifier> PlatformKeyboardEvent::currentStateOfModifierKeys()
diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp
-index 6ead5f4dea594fac7fad10fe97ad5a1ce605804f..a0cd7169ee36a3bec67b6a224444078fab61b699 100644
+index 03e5dc0b6ff099c281c61f05b29cf155b96922af..9b4694bc816e0e62a37c57e64729f183baca9080 100644
--- a/Source/WebCore/platform/win/PasteboardWin.cpp
+++ b/Source/WebCore/platform/win/PasteboardWin.cpp
-@@ -1136,7 +1136,21 @@ void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>& data)
+@@ -1137,7 +1137,21 @@ void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>& data)
}
clear();
@@ -8153,7 +8347,7 @@ index 6ead5f4dea594fac7fad10fe97ad5a1ce605804f..a0cd7169ee36a3bec67b6a224444078f
if (::OpenClipboard(m_owner)) {
const auto& customData = data.first();
customData.forEachPlatformStringOrBuffer([](auto& type, auto& stringOrBuffer) {
-@@ -1175,4 +1189,25 @@ void Pasteboard::write(const Color&)
+@@ -1176,4 +1190,25 @@ void Pasteboard::write(const Color&)
{
}
@@ -8623,11 +8817,24 @@ index 0000000000000000000000000000000000000000..a76b583a1e65cd6999fab4784c22dd9c
+};
+
+} // namespace WebCore
+diff --git a/Source/WebCore/rendering/AncestorSubgridIterator.cpp b/Source/WebCore/rendering/AncestorSubgridIterator.cpp
+index 9e7a774c2e0e591e491e0cda3657ae02f4543453..3161944e8f455d4dd33f6bbfd81ae2bb54d0787a 100644
+--- a/Source/WebCore/rendering/AncestorSubgridIterator.cpp
++++ b/Source/WebCore/rendering/AncestorSubgridIterator.cpp
+@@ -30,7 +30,7 @@
+
+ namespace WebCore {
+
+-AncestorSubgridIterator::AncestorSubgridIterator() = default;
++AncestorSubgridIterator::AncestorSubgridIterator() { };
+
+ AncestorSubgridIterator::AncestorSubgridIterator(SingleThreadWeakPtr<RenderGrid> firstAncestorSubgrid, GridTrackSizingDirection direction)
+ : m_firstAncestorSubgrid(firstAncestorSubgrid)
diff --git a/Source/WebCore/rendering/RenderTextControl.cpp b/Source/WebCore/rendering/RenderTextControl.cpp
-index 58574b4d9fb503918e2cac0993ffe778f256a953..23de6aecb4ea7f7a1a36af6a93611559f19cfc11 100644
+index 5d81c5942027e02222430036013e2a066a6bae06..0246502c570719cc9c9362726b9bc03ded002a0b 100644
--- a/Source/WebCore/rendering/RenderTextControl.cpp
+++ b/Source/WebCore/rendering/RenderTextControl.cpp
-@@ -222,13 +222,13 @@ void RenderTextControl::layoutExcludedChildren(bool relayoutChildren)
+@@ -225,13 +225,13 @@ void RenderTextControl::layoutExcludedChildren(bool relayoutChildren)
}
}
@@ -8681,7 +8888,7 @@ index 1d8488e0d36288e09cd5662bd7f770ade95dfee3..dee07f87b47d62d4ef8ede45824bdb2f
WorkerOrWorkletGlobalScope& m_globalScope;
};
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
-index 53209e9de68b0da9c7251d2575fa17195488ae60..5629471032b6a26186e8abff73c6f80e99e13a65 100644
+index 5f283341f89b3bc3be0c7508a0d995144764bb45..dc618d18fcfe7ef819f3724847f3d4e4c6771fc2 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
@@ -96,6 +96,8 @@
@@ -8693,7 +8900,7 @@ index 53209e9de68b0da9c7251d2575fa17195488ae60..5629471032b6a26186e8abff73c6f80e
#endif
#if ENABLE(APPLE_PAY_REMOTE_UI)
-@@ -1098,6 +1100,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)
+@@ -1090,6 +1092,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)
storageSession->clearPageSpecificDataForResourceLoadStatistics(pageID);
}
@@ -8709,10 +8916,10 @@ index 53209e9de68b0da9c7251d2575fa17195488ae60..5629471032b6a26186e8abff73c6f80e
{
if (auto* storageSession = networkProcess().storageSession(m_sessionID))
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-index 12fe210ef04c92edf4b44b70f9bb35d00cc8a7d1..1196d7e9192dc01cac4914ac10998613f48c231c 100644
+index 0b2641927c4f8b17381b8e8c5bfa5e666506e229..22073e29d1104d928e5ca2fa56ffe830ede1f8a8 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-@@ -345,6 +345,8 @@ private:
+@@ -343,6 +343,8 @@ private:
void clearPageSpecificData(WebCore::PageIdentifier);
@@ -8722,7 +8929,7 @@ index 12fe210ef04c92edf4b44b70f9bb35d00cc8a7d1..1196d7e9192dc01cac4914ac10998613
void logUserInteraction(RegistrableDomain&&);
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
-index eb27201d553e64146b8d36d21a49e3981d6f05c1..d49ea6c810dfd4f460b24d94681d6b9ca088b020 100644
+index 1edf0f0137dcf67dd425ce92180cdd5a1811475b..0af045974298fee7227b0cfa8b2b9e6c54779ec0 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
@@ -74,6 +74,8 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver {
@@ -8735,10 +8942,10 @@ index eb27201d553e64146b8d36d21a49e3981d6f05c1..d49ea6c810dfd4f460b24d94681d6b9c
LogUserInteraction(WebCore::RegistrableDomain domain)
ResourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics> statistics) -> ()
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.cpp b/Source/WebKit/NetworkProcess/NetworkProcess.cpp
-index f9b765f8732de5d51b093fc776920e55b760cba3..621ee3d381f62e2ae6d2c4a71e8a5803a4729d67 100644
+index 5d7274e691dbe4a9c4763b349abca7d94e878554..d58697dd16691e1caa53a5548eb68cff1309f163 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp
-@@ -658,6 +658,12 @@ void NetworkProcess::registrableDomainsExemptFromWebsiteDataDeletion(PAL::Sessio
+@@ -659,6 +659,12 @@ void NetworkProcess::registrableDomainsExemptFromWebsiteDataDeletion(PAL::Sessio
completionHandler({ });
}
@@ -8752,7 +8959,7 @@ index f9b765f8732de5d51b093fc776920e55b760cba3..621ee3d381f62e2ae6d2c4a71e8a5803
{
if (auto* session = networkSession(sessionID)) {
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.h b/Source/WebKit/NetworkProcess/NetworkProcess.h
-index 6d41842684f3e0e8b1190359f87105b747cf9da9..279d5c033397afb120a082953c0112f34bf2878a 100644
+index 95572ae0054657f1f8f2840291d49f8d23340990..38f6df007d51c53792d270f3d50fa2f1b77b4ca1 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.h
@@ -33,6 +33,7 @@
@@ -8782,10 +8989,10 @@ index 6d41842684f3e0e8b1190359f87105b747cf9da9..279d5c033397afb120a082953c0112f3
void clearUserInteraction(PAL::SessionID, RegistrableDomain&&, CompletionHandler<void()>&&);
void deleteAndRestrictWebsiteDataForRegistrableDomains(PAL::SessionID, OptionSet<WebsiteDataType>, RegistrableDomainsToDeleteOrRestrictWebsiteDataFor&&, bool shouldNotifyPage, CompletionHandler<void(HashSet<RegistrableDomain>&&)>&&);
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
-index 5e590b5a09f8bd5d040e2e68d54c545c52d4b179..c58bb6270ab75026187fdda6c94822f6aa47a35a 100644
+index 9679dc2ceea7b085638c19c00ba9fd04e71507da..130f12138c427a90dfffb96d7e219a258e819d10 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
-@@ -79,6 +79,8 @@ messages -> NetworkProcess LegacyReceiver {
+@@ -82,6 +82,8 @@ messages -> NetworkProcess LegacyReceiver {
SetInspectionForServiceWorkersAllowed(PAL::SessionID sessionID, bool inspectable)
@@ -8795,7 +9002,7 @@ index 5e590b5a09f8bd5d040e2e68d54c545c52d4b179..c58bb6270ab75026187fdda6c94822f6
ClearUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> ()
DumpResourceLoadStatistics(PAL::SessionID sessionID) -> (String dumpedStatistics)
diff --git a/Source/WebKit/NetworkProcess/NetworkSession.h b/Source/WebKit/NetworkProcess/NetworkSession.h
-index e086cbe963b9965c9203c0023a67250302a0d9c4..b9a10a505a48e0708b048a7af71fb69e5df5d6a4 100644
+index f5a62296667657a7f094627e0792cb4284c04ec4..93c34c61f1cb29f3ed4c1c787da6f3efe994cfb2 100644
--- a/Source/WebKit/NetworkProcess/NetworkSession.h
+++ b/Source/WebKit/NetworkProcess/NetworkSession.h
@@ -200,6 +200,9 @@ public:
@@ -8817,10 +9024,10 @@ index e086cbe963b9965c9203c0023a67250302a0d9c4..b9a10a505a48e0708b048a7af71fb69e
HashSet<Ref<NetworkResourceLoader>> m_keptAliveLoads;
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-index dc841a54751eb8ffa12f62a0817174aaca29eea7..ab6e9cb48c00e4ede2b53322cca8693c02e69a44 100644
+index 6c4c0e37a75426d90667c9ec595f8fa1b19ca502..45d1e5916c8cc5ec0136cf3b3596e9efb5e4a1ec 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-@@ -767,6 +767,8 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece
+@@ -769,6 +769,8 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
sessionCocoa->setClientAuditToken(challenge);
@@ -8829,7 +9036,7 @@ index dc841a54751eb8ffa12f62a0817174aaca29eea7..ab6e9cb48c00e4ede2b53322cca8693c
NSURLSessionTaskTransactionMetrics *metrics = task._incompleteTaskMetrics.transactionMetrics.lastObject;
auto tlsVersion = (tls_protocol_version_t)metrics.negotiatedTLSProtocolVersion.unsignedShortValue;
-@@ -1108,6 +1110,13 @@ ALLOW_DEPRECATED_DECLARATIONS_END
+@@ -1113,6 +1115,13 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)data
resourceResponse.setDeprecatedNetworkLoadMetrics(WebCore::copyTimingData(taskMetrics, networkDataTask->networkLoadMetrics()));
@@ -8988,10 +9195,10 @@ index 486849ef6f550a0f3caab311abf5743c6d38e5af..afeaac63a18d9e71d3afead23b7da4fe
void NetworkSessionCurl::didReceiveChallenge(WebSocketTask& webSocketTask, WebCore::AuthenticationChallenge&& challenge, CompletionHandler<void(WebKit::AuthenticationChallengeDisposition, const WebCore::Credential&)>&& challengeCompletionHandler)
diff --git a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp
-index 60106d6125f85d0cf848e828fd4ed7a50005f105..021d7b6d12baf4671a2968753969ca4675044313 100644
+index a5198bfa752746dd83dc2617606a27194afcd86f..3ca6b32e93bdaff2baae22170c84efe9bfe875d3 100644
--- a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp
+++ b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp
-@@ -36,11 +36,12 @@
+@@ -37,11 +37,12 @@
namespace WebKit {
@@ -9005,7 +9212,7 @@ index 60106d6125f85d0cf848e828fd4ed7a50005f105..021d7b6d12baf4671a2968753969ca46
, m_scheduler(WebCore::CurlContext::singleton().streamScheduler())
{
// We use topOrigin in case of service worker websocket connections, for which pageID does not link to a real page.
-@@ -52,7 +53,7 @@ WebSocketTask::WebSocketTask(NetworkSocketChannel& channel, WebPageProxyIdentifi
+@@ -53,7 +54,7 @@ WebSocketTask::WebSocketTask(NetworkSocketChannel& channel, WebPageProxyIdentifi
if (networkSession() && networkSession()->networkProcess().localhostAliasesForTesting().contains<StringViewHashTranslator>(m_request.url().host()))
localhostAlias = WebCore::CurlStream::LocalhostAlias::Enable;
@@ -9014,7 +9221,7 @@ index 60106d6125f85d0cf848e828fd4ed7a50005f105..021d7b6d12baf4671a2968753969ca46
m_channel.didSendHandshakeRequest(WebCore::ResourceRequest(m_request));
}
-@@ -257,7 +258,7 @@ void WebSocketTask::tryServerTrustEvaluation(WebCore::AuthenticationChallenge&&
+@@ -258,7 +259,7 @@ void WebSocketTask::tryServerTrustEvaluation(WebCore::AuthenticationChallenge&&
if (networkSession() && networkSession()->networkProcess().localhostAliasesForTesting().contains<StringViewHashTranslator>(m_request.url().host()))
localhostAlias = WebCore::CurlStream::LocalhostAlias::Enable;
@@ -9064,10 +9271,10 @@ index 51f3fb7ae9a4e208bc11ac583b72e772eac5e4dc..386ec972eba86763b83407c322a971a3
;; Except deny access to new-style iOS Keychain folders which are UUIDs.
(deny file-read* file-write*
diff --git a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
-index 15fb15b528ae9177e69fd4b6b43b81b7216232ff..075499ebbc20845a80830cdce105fb590f0772f8 100644
+index 61d9c1d41fdc490faf800fb30d66eb4603950cbf..3dffffe74cd04b22e40ce0d94326760404fbbc6c 100644
--- a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
+++ b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
-@@ -460,6 +460,8 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)
+@@ -461,6 +461,8 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)
m_networkLoadMetrics.responseStart = MonotonicTime::now();
#endif
@@ -9076,7 +9283,7 @@ index 15fb15b528ae9177e69fd4b6b43b81b7216232ff..075499ebbc20845a80830cdce105fb59
dispatchDidReceiveResponse();
}
-@@ -562,6 +564,8 @@ bool NetworkDataTaskSoup::acceptCertificate(GTlsCertificate* certificate, GTlsCe
+@@ -563,6 +565,8 @@ bool NetworkDataTaskSoup::acceptCertificate(GTlsCertificate* certificate, GTlsCe
{
ASSERT(m_soupMessage);
URL url = soupURIToURL(soup_message_get_uri(m_soupMessage.get()));
@@ -9125,10 +9332,10 @@ index 60e79ff683e280591d686468c42decf1ac109ed2..99707bc16644b88ff24a192029f3866e
}
diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake
-index b33c07849a629c7c5d4ea4b5cbb6788af3dd3023..aedd95cea9e6388cab32274967513224890287a5 100644
+index a509f56343f94f1bc30658ec9928ec1796a5a9b8..e2fcf6d35053f6982975d238f17b76f49e1bacdc 100644
--- a/Source/WebKit/PlatformGTK.cmake
+++ b/Source/WebKit/PlatformGTK.cmake
-@@ -323,6 +323,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+@@ -324,6 +324,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
${GSTREAMER_PBUTILS_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
@@ -9138,7 +9345,7 @@ index b33c07849a629c7c5d4ea4b5cbb6788af3dd3023..aedd95cea9e6388cab32274967513224
)
list(APPEND WebKit_INTERFACE_INCLUDE_DIRECTORIES
-@@ -353,6 +356,9 @@ if (USE_LIBWEBRTC)
+@@ -354,6 +357,9 @@ if (USE_LIBWEBRTC)
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
"${THIRDPARTY_DIR}/libwebrtc/Source/"
"${THIRDPARTY_DIR}/libwebrtc/Source/webrtc"
@@ -9148,7 +9355,7 @@ index b33c07849a629c7c5d4ea4b5cbb6788af3dd3023..aedd95cea9e6388cab32274967513224
)
endif ()
-@@ -404,6 +410,12 @@ else ()
+@@ -405,6 +411,12 @@ else ()
set(WebKitGTK_ENUM_HEADER_TEMPLATE ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypesGtk3.h.in)
endif ()
@@ -9162,7 +9369,7 @@ index b33c07849a629c7c5d4ea4b5cbb6788af3dd3023..aedd95cea9e6388cab32274967513224
set(WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_INSTALLED_HEADERS})
list(REMOVE_ITEM WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.h)
diff --git a/Source/WebKit/PlatformWPE.cmake b/Source/WebKit/PlatformWPE.cmake
-index 43d58da592e9b0f0bd6ca5cef5cbca0c4ba39b31..1fd4a732ca871704bbb915e93cf62d206c9db46e 100644
+index aa5c183a4c0946270713840071cf0167533158f6..637365fbb7d91f99ba1478188291bedff9b1cc2b 100644
--- a/Source/WebKit/PlatformWPE.cmake
+++ b/Source/WebKit/PlatformWPE.cmake
@@ -111,6 +111,8 @@ list(APPEND WebKit_SERIALIZATION_IN_FILES
@@ -9182,7 +9389,7 @@ index 43d58da592e9b0f0bd6ca5cef5cbca0c4ba39b31..1fd4a732ca871704bbb915e93cf62d20
)
if (ENABLE_2022_GLIB_API)
-@@ -425,7 +428,16 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+@@ -426,7 +429,16 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
${GIO_UNIX_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
@@ -9200,7 +9407,7 @@ index 43d58da592e9b0f0bd6ca5cef5cbca0c4ba39b31..1fd4a732ca871704bbb915e93cf62d20
list(APPEND WebKit_LIBRARIES
WPE::libwpe
diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmake
-index 06a86d0cfd1ca90f383af2b079f60ce220f8eb02..9e21935463bf964ecb090be48e68b50ef29c049b 100644
+index 7da9a409b65a577566f143a26a9717d4ba687a3c..711b5e1c4c82dfdf9ac6139a6de0785d29c1cc20 100644
--- a/Source/WebKit/PlatformWin.cmake
+++ b/Source/WebKit/PlatformWin.cmake
@@ -56,8 +56,13 @@ list(APPEND WebKit_SOURCES
@@ -9306,7 +9513,7 @@ index 06a86d0cfd1ca90f383af2b079f60ce220f8eb02..9e21935463bf964ecb090be48e68b50e
+
list(APPEND WebProcess_SOURCES
WebProcess/EntryPoint/win/WebProcessMain.cpp
- )
+
diff --git a/Source/WebKit/Shared/API/c/wpe/WebKit.h b/Source/WebKit/Shared/API/c/wpe/WebKit.h
index a9aa21f5589dec453db1713c8846e0d2e687f552..9b94469d078d92e4b9e0c8149122b19a4d3b5307 100644
--- a/Source/WebKit/Shared/API/c/wpe/WebKit.h
@@ -9319,6 +9526,22 @@ index a9aa21f5589dec453db1713c8846e0d2e687f552..9b94469d078d92e4b9e0c8149122b19a
#include <WebKit/WKContext.h>
#include <WebKit/WKContextConfigurationRef.h>
#include <WebKit/WKCredential.h>
+diff --git a/Source/WebKit/Shared/AuxiliaryProcess.h b/Source/WebKit/Shared/AuxiliaryProcess.h
+index bc4f258d0970d21655a311ba72932296440111f8..21bf2a8dc680ead511ddb17a9a7ae891c835ee30 100644
+--- a/Source/WebKit/Shared/AuxiliaryProcess.h
++++ b/Source/WebKit/Shared/AuxiliaryProcess.h
+@@ -210,6 +210,11 @@ struct AuxiliaryProcessInitializationParameters {
+ #if PLATFORM(COCOA)
+ SDKAlignedBehaviors clientSDKAlignedBehaviors;
+ #endif
++// Playwright begin
++#if !PLATFORM(COCOA)
++ bool shouldEnableSharedArrayBuffer { false };
++#endif
++// Playwright end
+ };
+
+ } // namespace WebKit
diff --git a/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.h b/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.h
index b09b17a5bff38e3ba8d6bb53da9ef09d229bdb61..46aa1caa93402711a08f5980387a957f783038e5 100644
--- a/Source/WebKit/Shared/Cocoa/CompletionHandlerCallChecker.h
@@ -9407,10 +9630,10 @@ index e33858caab024b20217304209d7bf428e3335653..4026f6244889e5a0ee85edb72696d0be
NSEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(GTK)
diff --git a/Source/WebKit/Shared/NativeWebWheelEvent.h b/Source/WebKit/Shared/NativeWebWheelEvent.h
-index dfdebf37842c22c2d27f5cb39b22fa8aa09f5511..76b76a53abfe9f43c044fc29d0f16ac9969b7252 100644
+index f8e96218fd2671d1c0aca5e549efe0d8b94ef0f9..6cebd61bceb39c08e916fe991e4c3fc6f34b4704 100644
--- a/Source/WebKit/Shared/NativeWebWheelEvent.h
+++ b/Source/WebKit/Shared/NativeWebWheelEvent.h
-@@ -73,7 +73,8 @@ public:
+@@ -74,7 +74,8 @@ public:
#elif PLATFORM(WIN)
NativeWebWheelEvent(HWND, UINT message, WPARAM, LPARAM, float deviceScaleFactor);
#endif
@@ -9434,10 +9657,10 @@ index ea1eb9f00feaaecf73bdddc37c904e88f43bfa85..8a631e5293a11abd650958baad4e9678
#endif
};
diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
-index 4be677ef8090d21da5dedbc275ef58f2b7c41654..b538f2e810668aa1039601ccff94960fb2d00525 100644
+index 54bfa4555c6dd11f8ee8e3a75df6ba97c1032e84..c795925b062886a3eee42ef3b37e2f084ae55f7d 100644
--- a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
-@@ -2683,6 +2683,9 @@ class WebCore::AuthenticationChallenge {
+@@ -2691,6 +2691,9 @@ class WebCore::AuthenticationChallenge {
class WebCore::DragData {
#if PLATFORM(COCOA)
String pasteboardName();
@@ -9447,7 +9670,7 @@ index 4be677ef8090d21da5dedbc275ef58f2b7c41654..b538f2e810668aa1039601ccff94960f
#endif
WebCore::IntPoint clientPosition();
WebCore::IntPoint globalPosition();
-@@ -3246,6 +3249,7 @@ enum class WebCore::WasPrivateRelayed : bool;
+@@ -3254,6 +3257,7 @@ enum class WebCore::WasPrivateRelayed : bool;
String httpStatusText;
String httpVersion;
WebCore::HTTPHeaderMap httpHeaderFields;
@@ -9668,11 +9891,57 @@ index 0000000000000000000000000000000000000000..f4f09d171ebf9774b3f8744751d220d3
+ RefPtr<WebCore::SharedBuffer> customData()
+ bool canSmartReplace()
+}
+diff --git a/Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp b/Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp
+index 5bae771f7b19ebeaea42edca80198a598f1b49e4..82fa8826f7bd505f596fd7f0d378d62ba1ac3f2f 100644
+--- a/Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp
++++ b/Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp
+@@ -38,6 +38,15 @@
+
+ namespace WebKit {
+
++static bool hasArgument(const char* argument, int argc, char** argv)
++{
++ for (int i = 0; i < argc; ++i) {
++ if (!strcmp(argument, argv[i]))
++ return true;
++ }
++ return false;
++}
++
+ AuxiliaryProcessMainCommon::AuxiliaryProcessMainCommon()
+ {
+ #if ENABLE(BREAKPAD)
+@@ -57,6 +66,10 @@ bool AuxiliaryProcessMainCommon::parseCommandLine(int argc, char** argv)
+ if (argc > 3 && argv[3] && !strcmp(argv[3], "--configure-jsc-for-testing"))
+ JSC::Config::configureForTesting();
+ #endif
++// Playwright begin
++ if (hasArgument("--enable-shared-array-buffer", argc, argv))
++ m_parameters.shouldEnableSharedArrayBuffer = true;
++// Playwright end
+ return true;
+ }
+
+diff --git a/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp b/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp
+index 9edb5fbcd103cd8d1b224dfd60ac88aabe9626d2..9ed392ae3809f8bda92a2765ffadc643f23fe856 100644
+--- a/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp
++++ b/Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp
+@@ -41,6 +41,10 @@ bool AuxiliaryProcessMainCommon::parseCommandLine(int argc, char** argv)
+ m_parameters.connectionIdentifier = IPC::Connection::Identifier { reinterpret_cast<HANDLE>(parseIntegerAllowingTrailingJunk<uint64_t>(StringView::fromLatin1(argv[++i])).value_or(0)) };
+ else if (!strcmp(argv[i], "-processIdentifier") && i + 1 < argc)
+ m_parameters.processIdentifier = ObjectIdentifier<WebCore::ProcessIdentifierType>(parseIntegerAllowingTrailingJunk<uint64_t>(StringView::fromLatin1(argv[++i])).value_or(0));
++// Playwright begin
++ else if (!strcmp(argv[i], "-enable-shared-array-buffer"))
++ m_parameters.shouldEnableSharedArrayBuffer = true;
++// Playwright end
+ else if (!strcmp(argv[i], "-configure-jsc-for-testing"))
+ JSC::Config::configureForTesting();
+ else if (!strcmp(argv[i], "-disable-jit"))
diff --git a/Source/WebKit/Shared/win/WebEventFactory.cpp b/Source/WebKit/Shared/win/WebEventFactory.cpp
-index 76e3fa1aa685906adfff43aed55c9902084be0af..0cf48a92e368005e843f08c4f4096fdeaff0b1a8 100644
+index 4d418e2bd7f970bc5bfebceb88adb172e5eb8540..e988f9011fa194224f7376e134d50fc553725289 100644
--- a/Source/WebKit/Shared/win/WebEventFactory.cpp
+++ b/Source/WebKit/Shared/win/WebEventFactory.cpp
-@@ -483,7 +483,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message
+@@ -484,7 +484,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message
#if ENABLE(TOUCH_EVENTS)
WebTouchEvent WebEventFactory::createWebTouchEvent()
{
@@ -9682,7 +9951,7 @@ index 76e3fa1aa685906adfff43aed55c9902084be0af..0cf48a92e368005e843f08c4f4096fde
#endif // ENABLE(TOUCH_EVENTS)
diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt
-index 5a8ce0964def0adf03f875b70bfeebd0d7a3df6e..2a6a24d1247d9e18a0b978cbd4a700f2af485d6c 100644
+index 3844b4e93816ad5e4a1ac4156516bc29c0203eb2..922a99ed0e62d66e39eb20b05f757870da8be85e 100644
--- a/Source/WebKit/Sources.txt
+++ b/Source/WebKit/Sources.txt
@@ -377,6 +377,7 @@ Shared/XR/XRDeviceProxy.cpp
@@ -9722,8 +9991,8 @@ index 5a8ce0964def0adf03f875b70bfeebd0d7a3df6e..2a6a24d1247d9e18a0b978cbd4a700f2
+UIProcess/WebPageInspectorInputAgent.cpp
UIProcess/WebPageProxy.cpp
UIProcess/WebPageProxyMessageReceiverRegistration.cpp
- UIProcess/WebPasteboardProxy.cpp
-@@ -573,7 +580,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp
+ UIProcess/WebPageProxyTesting.cpp
+@@ -574,7 +581,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp
UIProcess/Inspector/WebPageDebuggable.cpp
UIProcess/Inspector/WebPageInspectorController.cpp
@@ -9736,10 +10005,10 @@ index 5a8ce0964def0adf03f875b70bfeebd0d7a3df6e..2a6a24d1247d9e18a0b978cbd4a700f2
UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp
UIProcess/Media/MediaUsageManager.cpp
diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt
-index ff2daa513c7fd2791b3f28e47b521a8ad4ade968..d75ff772fd46b53c5734203ae4e617ffffde5657 100644
+index fe64c9af8d7f79b86941404d5aed66424a675bf7..0f1e5aa7a24ddc03c7462226312b4ffb354de632 100644
--- a/Source/WebKit/SourcesCocoa.txt
+++ b/Source/WebKit/SourcesCocoa.txt
-@@ -271,6 +271,7 @@ UIProcess/API/Cocoa/_WKArchiveExclusionRule.mm
+@@ -270,6 +270,7 @@ UIProcess/API/Cocoa/_WKArchiveExclusionRule.mm
UIProcess/API/Cocoa/_WKAttachment.mm
UIProcess/API/Cocoa/_WKAutomationSession.mm
UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.mm
@@ -9756,7 +10025,7 @@ index ff2daa513c7fd2791b3f28e47b521a8ad4ade968..d75ff772fd46b53c5734203ae4e617ff
UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm
UIProcess/Inspector/mac/WKInspectorViewController.mm
diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt
-index 4ccf24056472cbaca8f61ed82ab6447f8bb45db7..4d283f3cb33cee9756252c929a8551b0d8595295 100644
+index 94d0f078de20208836e4a1a63f6dd0ce4e7ab556..fce80ee80cb3f2079b7405d49b5646af060c10be 100644
--- a/Source/WebKit/SourcesGTK.txt
+++ b/Source/WebKit/SourcesGTK.txt
@@ -130,6 +130,7 @@ UIProcess/API/glib/WebKitAutomationSession.cpp @no-unify
@@ -9793,7 +10062,7 @@ index 4ccf24056472cbaca8f61ed82ab6447f8bb45db7..4d283f3cb33cee9756252c929a8551b0
UIProcess/gtk/WebPasteboardProxyGtk.cpp
UIProcess/gtk/WebPopupMenuProxyGtk.cpp
diff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt
-index 3dfcab5bbd7918b57c5dcaf8c0548bb0c4da52f2..82d274947520fe70f91da62bf1e39f728a65a003 100644
+index e6c9ee4c1e8ee1ad95ae6595e061378b377a3501..71882922bff1ad74a96b0bca2ea5522f81ef70ed 100644
--- a/Source/WebKit/SourcesWPE.txt
+++ b/Source/WebKit/SourcesWPE.txt
@@ -132,6 +132,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify
@@ -9820,7 +10089,7 @@ index 3dfcab5bbd7918b57c5dcaf8c0548bb0c4da52f2..82d274947520fe70f91da62bf1e39f72
UIProcess/API/wpe/WebKitInputMethodContextWPE.cpp @no-unify
UIProcess/API/wpe/WebKitInputMethodContextImplWPE.cpp @no-unify
UIProcess/API/wpe/WebKitPopupMenu.cpp @no-unify
-@@ -225,6 +228,7 @@ UIProcess/glib/DisplayLinkGLib.cpp
+@@ -227,6 +230,7 @@ UIProcess/glib/DisplayLinkGLib.cpp
UIProcess/glib/DisplayVBlankMonitor.cpp
UIProcess/glib/DisplayVBlankMonitorDRM.cpp
UIProcess/glib/DisplayVBlankMonitorTimer.cpp
@@ -9828,7 +10097,7 @@ index 3dfcab5bbd7918b57c5dcaf8c0548bb0c4da52f2..82d274947520fe70f91da62bf1e39f72
UIProcess/glib/ScreenManager.cpp
UIProcess/glib/WebPageProxyGLib.cpp
UIProcess/glib/WebProcessPoolGLib.cpp
-@@ -255,7 +259,12 @@ UIProcess/linux/MemoryPressureMonitor.cpp
+@@ -259,7 +263,12 @@ UIProcess/linux/MemoryPressureMonitor.cpp
UIProcess/soup/WebProcessPoolSoup.cpp
UIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp
@@ -9841,7 +10110,7 @@ index 3dfcab5bbd7918b57c5dcaf8c0548bb0c4da52f2..82d274947520fe70f91da62bf1e39f72
UIProcess/wpe/WebPageProxyWPE.cpp
UIProcess/wpe/WebPreferencesWPE.cpp
-@@ -279,6 +288,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp
+@@ -286,6 +295,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp
WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
@@ -9923,7 +10192,7 @@ index 9ecfb4e61a015c97e3adaeccfcf52ce24735eeed..decae9b739c9692921305b87449f6557
virtual void setStatusText(WebKit::WebPageProxy*, const WTF::String&) { }
virtual void mouseDidMoveOverElement(WebKit::WebPageProxy&, const WebKit::WebHitTestResultData&, OptionSet<WebKit::WebEventModifier>, Object*) { }
diff --git a/Source/WebKit/UIProcess/API/C/WKInspector.cpp b/Source/WebKit/UIProcess/API/C/WKInspector.cpp
-index 990b0e5ebad19fdaf1b0036585be2ed88bc125d2..9f1931dbdd8c70d3637a2d71406b5968896037f2 100644
+index 16229e649d69b812be84b487ec87941cb0986250..88a5fa4bd77136a2370175696d078c20e1d58edd 100644
--- a/Source/WebKit/UIProcess/API/C/WKInspector.cpp
+++ b/Source/WebKit/UIProcess/API/C/WKInspector.cpp
@@ -28,6 +28,11 @@
@@ -9966,10 +10235,10 @@ index 026121d114c5fcad84c1396be8d692625beaa3bd..edd6e5cae033124c589959a42522fde0
}
#endif
diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp
-index 47abb7de04be89f82e90f0a2197ef129b2d2f1cd..fb71b452a27d62af68165a778647c4b2e0236443 100644
+index 4abc7ac9b65c92e1f8ac122b97abf32c69631eb7..93e67e9e60ffa2536be7da1b70a7704d6eb3313f 100644
--- a/Source/WebKit/UIProcess/API/C/WKPage.cpp
+++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp
-@@ -1780,6 +1780,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
+@@ -1781,6 +1781,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
completionHandler(String());
}
@@ -9983,7 +10252,7 @@ index 47abb7de04be89f82e90f0a2197ef129b2d2f1cd..fb71b452a27d62af68165a778647c4b2
void setStatusText(WebPageProxy* page, const String& text) final
{
if (!m_client.setStatusText)
-@@ -1809,6 +1816,8 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
+@@ -1810,6 +1817,8 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
{
if (!m_client.didNotHandleKeyEvent)
return;
@@ -10074,7 +10343,7 @@ index 857afb1b892c2ee7327808f3dab0cff441c92c52..332bb2e687d6b97fd11f1366ade5b178
{
return _preferences->inactiveMediaCaptureSteamRepromptIntervalInMinutes();
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
-index 3ff86aaf450aaa15ebd57e6703927f1234c35f3f..e3914dc048bcd7fc595a21ef11d648a70c8c84d4 100644
+index 950a5587c9ed75292e6ad8b4f898b73de3dabc25..f315b1023c6910e23e88d18022a18b6710308a55 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
@@ -119,6 +119,7 @@ typedef NS_ENUM(NSInteger, _WKPitchCorrectionAlgorithm) {
@@ -10124,7 +10393,7 @@ index eff4cf557033561ab20762d93a58c2d71f5505f0..2fd5a2515c54d9edcab48fa3d993298f
NS_ASSUME_NONNULL_END
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
-index 350914dd5352683024925bb820148ba2582cd0c7..ac9767ff4920e066b11da4556b2df77debd18a1f 100644
+index 2432da7fa381ba09f73f2126b978e4b454e42e4b..d3f1ce3d339b6ebd6d61100eb8d4c71d86258f00 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
@@ -51,6 +51,7 @@
@@ -10135,7 +10404,7 @@ index 350914dd5352683024925bb820148ba2582cd0c7..ac9767ff4920e066b11da4556b2df77d
#import <WebCore/Credential.h>
#import <WebCore/RegistrableDomain.h>
#import <WebCore/ResourceResponse.h>
-@@ -446,6 +447,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple
+@@ -450,6 +451,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple
});
}
@@ -10332,7 +10601,7 @@ index 4974e14214e2bb3e982325b885bab33e54f83998..cacdf8c71fab248d38d2faf03f7affdc
typedef NS_ENUM(NSInteger, _WKUserStyleLevel) {
_WKUserStyleUserLevel,
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm
-index 383bd33cc0b53ea049d2e6fb1bf338d584caeb18..e29ba10dceced9d115b09e014cc086c5453e33fe 100644
+index 8f7d300c449fd3323f3a47630a5b87835e7b2350..8b2b098f0bc8d9ad27654c33f616c0b73330573c 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm
@@ -35,6 +35,7 @@
@@ -10546,7 +10815,7 @@ index 0000000000000000000000000000000000000000..e0b1da48465c850f541532ed961d1b77
+WebKit::WebPageProxy* webkitBrowserInspectorCreateNewPageInContext(WebKitWebContext*);
+void webkitBrowserInspectorQuitApplication();
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
-index e0a36ef8b438626b97ca791c250868c15fd663ea..1af633927046fd388d7a7a9a4b4e503e31df2e65 100644
+index 13452bf008a5a5b8cce2367296c20df5b05ced59..2055a9f371e8b60d7702988bfd7ffd1ad0bd55c2 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
@@ -94,6 +94,10 @@ private:
@@ -10561,10 +10830,10 @@ index e0a36ef8b438626b97ca791c250868c15fd663ea..1af633927046fd388d7a7a9a4b4e503e
bool canRunBeforeUnloadConfirmPanel() const final { return true; }
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
-index f2df10c56663a21420eafc06ace0d204eaae1747..dc2b805b52c202d4910633bf9c6db6edf07f3b5f 100644
+index 47eca6bcf0048acad8e4d213cae94edc03efbffc..b5b1e526b988be8c6ab5830d933c7becb52344f3 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
-@@ -417,10 +417,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa
+@@ -421,10 +421,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa
}
}
@@ -10584,7 +10853,7 @@ index f2df10c56663a21420eafc06ace0d204eaae1747..dc2b805b52c202d4910633bf9c6db6ed
GUniquePtr<char> bundleFilename(g_build_filename(injectedBundleDirectory(), INJECTED_BUNDLE_FILENAME, nullptr));
WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(object);
-@@ -477,6 +486,8 @@ static void webkitWebContextConstructed(GObject* object)
+@@ -481,6 +490,8 @@ static void webkitWebContextConstructed(GObject* object)
static void webkitWebContextDispose(GObject* object)
{
@@ -10593,7 +10862,7 @@ index f2df10c56663a21420eafc06ace0d204eaae1747..dc2b805b52c202d4910633bf9c6db6ed
WebKitWebContextPrivate* priv = WEBKIT_WEB_CONTEXT(object)->priv;
if (!priv->clientsDetached) {
priv->clientsDetached = true;
-@@ -938,6 +949,11 @@ WebKitNetworkSession* webkit_web_context_get_network_session_for_automation(WebK
+@@ -942,6 +953,11 @@ WebKitNetworkSession* webkit_web_context_get_network_session_for_automation(WebK
return nullptr;
#endif
}
@@ -10630,7 +10899,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 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d1abcd895 100644
+index 061a05bdd19eea75552cad40e78794dfd26f6668..d96b4efdb43131cfccff3ace107b3959eb6a4a1c 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
@@ -34,6 +34,7 @@
@@ -10657,7 +10926,7 @@ index 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d
#include "WebKitPrintOperationPrivate.h"
#include "WebKitWebInspectorPrivate.h"
#include "WebKitWebViewBasePrivate.h"
-@@ -145,6 +146,7 @@ enum {
+@@ -146,6 +147,7 @@ enum {
CLOSE,
SCRIPT_DIALOG,
@@ -10665,7 +10934,7 @@ index 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d
DECIDE_POLICY,
PERMISSION_REQUEST,
-@@ -497,6 +499,16 @@ GRefPtr<WebKitOptionMenu> WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& p
+@@ -506,6 +508,16 @@ GRefPtr<WebKitOptionMenu> WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& p
void WebKitWebViewClient::frameDisplayed(WKWPE::View&)
{
@@ -10682,7 +10951,7 @@ index 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d
{
SetForScope inFrameDisplayedGuard(m_webView->priv->inFrameDisplayed, true);
for (const auto& callback : m_webView->priv->frameDisplayedCallbacks) {
-@@ -513,6 +525,18 @@ void WebKitWebViewClient::frameDisplayed(WKWPE::View&)
+@@ -522,6 +534,18 @@ void WebKitWebViewClient::frameDisplayed(WKWPE::View&)
}
}
@@ -10701,7 +10970,7 @@ index 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d
void WebKitWebViewClient::willStartLoad(WKWPE::View&)
{
webkitWebViewWillStartLoad(m_webView);
-@@ -599,7 +623,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*
+@@ -608,7 +632,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*
static gboolean webkitWebViewPermissionRequest(WebKitWebView*, WebKitPermissionRequest* request)
{
@@ -10710,7 +10979,7 @@ index 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d
if (WEBKIT_IS_POINTER_LOCK_PERMISSION_REQUEST(request)) {
webkit_permission_request_allow(request);
return TRUE;
-@@ -913,6 +937,10 @@ static void webkitWebViewConstructed(GObject* object)
+@@ -927,6 +951,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);
@@ -10721,7 +10990,7 @@ index 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d
webkitWebViewCreatePage(webView, WTFMove(configuration));
webkitWebContextWebViewCreated(priv->context.get(), webView);
-@@ -1942,6 +1970,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
+@@ -1956,6 +1984,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_TYPE_BOOLEAN, 1,
WEBKIT_TYPE_SCRIPT_DIALOG);
@@ -10737,7 +11006,7 @@ index 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d
/**
* WebKitWebView::decide-policy:
* @web_view: the #WebKitWebView on which the signal is emitted
-@@ -2734,6 +2771,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const
+@@ -2748,6 +2785,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const
webkit_script_dialog_unref(webView->priv->currentScriptDialog);
}
@@ -10786,7 +11055,7 @@ index 805f9f638c1630b5e9310494ae2970262de001cc..add3e80896c2e82bdd12cee15c8014bf
#include <@API_INCLUDE_PREFIX@/WebKitClipboardPermissionRequest.h>
#include <@API_INCLUDE_PREFIX@/WebKitColorChooserRequest.h>
diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
-index cea5882f6c455898e1b5a231e1213e6b71ff21b6..d82b93d3c759b1184869b3504e1c3c07f53cc8ce 100644
+index 36a0e39f8b13dcaa57ac1221d24e06a35eabe9b0..6a51f9653ccfb26c52405e44390f4aa3dd5f23f6 100644
--- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
@@ -269,6 +269,8 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool
@@ -10811,7 +11080,7 @@ index cea5882f6c455898e1b5a231e1213e6b71ff21b6..d82b93d3c759b1184869b3504e1c3c07
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 adf00c390a0bc584955be83d15baae5898a928eb..2a70aba8ef2d8d5882f6520425e1b9d06796b477 100644
+index 8b747ca183ddd04160b29cd9b89e5e40ad8161ab..6c99ff9824ea2db3719b84ee3f5766011213d998 100644
--- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
+++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
@@ -105,7 +105,7 @@ private:
@@ -10924,10 +11193,10 @@ index 496079da90993ac37689b060b69ecd4a67c2b6a8..af30181ca922f16c0f6e245c70e5ce7d
G_BEGIN_DECLS
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
-index 44ca7ff8b13bf0b1d4b16d90b8488f596175f2a1..58371f574003fba1d280ad0464b7688cd99b5ebe 100644
+index f6690c7780dff32a043c51f7afaba00119a92c44..f48f5b67505176bac3406212e266a6addd6e226a 100644
--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
-@@ -2946,6 +2946,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
+@@ -2930,6 +2930,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
#endif
}
@@ -10939,7 +11208,7 @@ index 44ca7ff8b13bf0b1d4b16d90b8488f596175f2a1..58371f574003fba1d280ad0464b7688c
void webkitWebViewBaseEnterAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase, const LayerTreeContext& layerTreeContext)
{
ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);
-@@ -3002,12 +3007,12 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase)
+@@ -2986,12 +2991,12 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase)
webkitWebViewBase->priv->acceleratedBackingStore->update({ });
}
@@ -11013,13 +11282,13 @@ index 26d1790017e528f26ae04dac635678d5494bfd04..b9832e9221edaa14af485d34ac6216ff
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 f498562d70a4652f6831ac6bc12ef86e537d3930..73b11a5904d32e28c469622f98f0d90659c40a40 100644
+index b9b6b379136653e9dc13313715e0d281a2c8cb01..7cb887f31dc381739b079be0ab2548075fbc0690 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
-@@ -33,9 +33,13 @@
- #include "NativeWebWheelEvent.h"
+@@ -34,9 +34,13 @@
#include "TouchGestureController.h"
- #include "WPEWebView.h"
+ #include "WPEWebViewLegacy.h"
+ #include "WPEWebViewPlatform.h"
+#include "WebColorPickerWPE.h"
+#include "WebDateTimePickerWPE.h"
#include "WebContextMenuProxy.h"
@@ -11030,8 +11299,8 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..73b11a5904d32e28c469622f98f0d906
#include <WebCore/ActivityState.h>
#include <WebCore/Cursor.h>
#include <WebCore/DOMPasteAccess.h>
-@@ -45,6 +49,12 @@
- #include <atk/atk.h>
+@@ -50,6 +54,12 @@
+ #include <wpe/wpe-platform.h>
#endif
+#if USE(SKIA)
@@ -11043,7 +11312,7 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..73b11a5904d32e28c469622f98f0d906
namespace WebKit {
PageClientImpl::PageClientImpl(WKWPE::View& view)
-@@ -203,7 +213,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I
+@@ -208,7 +218,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I
WebCore::IntRect PageClientImpl::rootViewToAccessibilityScreen(const WebCore::IntRect& rect)
{
@@ -11052,7 +11321,7 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..73b11a5904d32e28c469622f98f0d906
}
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&, bool)
-@@ -465,6 +475,64 @@ void PageClientImpl::selectionDidChange()
+@@ -487,6 +497,64 @@ void PageClientImpl::selectionDidChange()
m_view.selectionDidChange();
}
@@ -11117,7 +11386,7 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..73b11a5904d32e28c469622f98f0d906
WebKitWebResourceLoadManager* PageClientImpl::webResourceLoadManager()
{
return m_view.webResourceLoadManager();
-@@ -475,4 +543,23 @@ void PageClientImpl::callAfterNextPresentationUpdate(CompletionHandler<void()>&&
+@@ -497,4 +565,23 @@ void PageClientImpl::callAfterNextPresentationUpdate(CompletionHandler<void()>&&
m_view.callAfterNextPresentationUpdate(WTFMove(callback));
}
@@ -11142,10 +11411,10 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..73b11a5904d32e28c469622f98f0d906
+
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
-index 6c113e0349dea1d7457874a948d6e55ba2625730..0fcffc23a58401ac54cd6864011a3dd86fa0683b 100644
+index dc56a4f5af6ddf3ff3d557493482b5b25efcd24d..f1f69fb9341fa8bfff6e1ae045db5465a1b85eed 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
-@@ -166,10 +166,25 @@ private:
+@@ -166,9 +166,24 @@ private:
void didChangeWebPageID() const override;
void selectionDidChange() override;
@@ -11156,7 +11425,6 @@ index 6c113e0349dea1d7457874a948d6e55ba2625730..0fcffc23a58401ac54cd6864011a3dd8
+ RefPtr<cairo_surface_t> takeViewSnapshot(std::optional<WebCore::IntRect>&&, bool nominalResolution) override;
+#endif
WebKitWebResourceLoadManager* webResourceLoadManager() override;
- void didClearEditorStateAfterPageTransition() final { }
+#if ENABLE(DATALIST_ELEMENT)
+ RefPtr<WebKit::WebDataListSuggestionsDropdown> createDataListSuggestionsDropdown(WebKit::WebPageProxy& page) override;
@@ -11172,21 +11440,6 @@ index 6c113e0349dea1d7457874a948d6e55ba2625730..0fcffc23a58401ac54cd6864011a3dd8
WKWPE::View& m_view;
};
-diff --git a/Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp b/Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp
-index 8c1b77dd3c2c5dab2943647a845767e4c6086f9f..c9ae70281bab0404a525d82db9054b0db3d9eb78 100644
---- a/Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp
-+++ b/Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp
-@@ -98,7 +98,9 @@ View::View(struct wpe_view_backend* backend, WPEDisplay* display, const API::Pag
- auto& preferences = configuration->preferences();
- preferences.setAcceleratedCompositingEnabled(true);
- preferences.setForceCompositingMode(true);
-- preferences.setThreadedScrollingEnabled(true);
-+ // Playwright override begin
-+ preferences.setThreadedScrollingEnabled(false);
-+ // Playwright override end
-
- auto& pool = configuration->processPool();
- m_pageProxy = pool.createWebPage(*m_pageClient, WTFMove(configuration));
diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitBrowserInspector.h b/Source/WebKit/UIProcess/API/wpe/WebKitBrowserInspector.h
new file mode 100644
index 0000000000000000000000000000000000000000..273c5105cdf1638955cea01128c9bbab3e64436c
@@ -11514,10 +11767,10 @@ index 65bf3b71e451aad11039130d2d23a68f5fce499f..99a1402270bcd210107bcc4f02983789
// 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 15a56d77cdd54d17a38e71b4adf31c981e6407ee..6bc36ee8b7b762699283ab6cbb12b11cf243836a 100644
+index a889806fbc7d1329a6bd7a6d179d31318cc2f010..197f2fdc887eef0a25f82a5d4702e6d34a3a126e 100644
--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
-@@ -168,7 +168,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau
+@@ -165,7 +165,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau
launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix);
#endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE))
@@ -11530,7 +11783,7 @@ index 15a56d77cdd54d17a38e71b4adf31c981e6407ee..6bc36ee8b7b762699283ab6cbb12b11c
platformGetLaunchOptions(launchOptions);
}
diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
-index f203c2ea1a77939b1acaf5352e4cf67a58817ab2..08db3dba0ab5c4e22207c1dced9530ddad67e976 100644
+index e792deb624dc217fd9502461c0f7cabf789d812c..43b2912a05eaea0911662934305e94a6cc1477d1 100644
--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
@@ -277,13 +277,16 @@ protected:
@@ -11550,7 +11803,7 @@ index f203c2ea1a77939b1acaf5352e4cf67a58817ab2..08db3dba0ab5c4e22207c1dced9530dd
- Vector<String> platformOverrideLanguages() const;
void platformStartConnectionTerminationWatchdog();
- ResponsivenessTimer m_responsivenessTimer;
+ // Connection::Client
diff --git a/Source/WebKit/UIProcess/BackingStore.h b/Source/WebKit/UIProcess/BackingStore.h
index e1d579d6d428c3575ddf83b9d78dae045beb218d..9a2830e50ec8ab965e4a5a2b5faa9285c99bcc99 100644
--- a/Source/WebKit/UIProcess/BackingStore.h
@@ -11744,7 +11997,7 @@ index 3ac9df925437afb3b4d37107fc6c02dc9ee41fa6..eb0dc8703860ef5006d6df26a6ca6115
{
if (!m_uiDelegate)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
-index 58b550ade47802818b3d5ed8027f757ec7b282ec..31cbc0362a1d991de69ebd040ea70700716e097f 100644
+index 4e64905585de45ffa75c2d5b2ff2c3748fa15d15..342549d7c38432d9304ebd0bc1b55e4154f54948 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
@@ -38,6 +38,7 @@
@@ -11755,7 +12008,7 @@ index 58b550ade47802818b3d5ed8027f757ec7b282ec..31cbc0362a1d991de69ebd040ea70700
#import "PlaybackSessionManagerProxy.h"
#import "QuickLookThumbnailLoader.h"
#import "RemoteLayerTreeTransaction.h"
-@@ -293,10 +294,84 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
+@@ -298,10 +299,84 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
void WebPageProxy::startDrag(const DragItem& dragItem, ShareableBitmap::Handle&& dragImageHandle)
{
@@ -11811,9 +12064,9 @@ index 58b550ade47802818b3d5ed8027f757ec7b282ec..31cbc0362a1d991de69ebd040ea70700
+ NSPasteboard *pasteboard = [NSPasteboard pasteboardWithUniqueName];
+ m_overrideDragPasteboardName = String([pasteboard name]);
+ }
-+ send(Messages::WebPage::SetDragPasteboardName(m_overrideDragPasteboardName));
++ legacyMainFrameProcess().send(Messages::WebPage::SetDragPasteboardName(m_overrideDragPasteboardName), webPageIDInMainFrameProcess());
+ } else {
-+ send(Messages::WebPage::SetDragPasteboardName(""_s));
++ legacyMainFrameProcess().send(Messages::WebPage::SetDragPasteboardName(""_s), webPageIDInMainFrameProcess());
+ }
+}
+
@@ -11842,7 +12095,7 @@ index 58b550ade47802818b3d5ed8027f757ec7b282ec..31cbc0362a1d991de69ebd040ea70700
#if ENABLE(ATTACHMENT_ELEMENT)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-index ddef8d1c1f33c435baa3c5f3faa80dca2b01401b..9ec578895ed986ae786b45b2fe755a5848703567 100644
+index 36b1489cbe2de1698e6baebef5dc8f8e6d1f3acd..bdffd070443436f026b987aa86d1c22e61463dbf 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
@@ -434,7 +434,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
@@ -11854,7 +12107,7 @@ index ddef8d1c1f33c435baa3c5f3faa80dca2b01401b..9ec578895ed986ae786b45b2fe755a58
#endif
#if (PLATFORM(IOS) || PLATFORM(VISION)) && HAVE(AGX_COMPILER_SERVICE)
-@@ -840,8 +840,8 @@ void WebProcessPool::registerNotificationObservers()
+@@ -790,8 +790,8 @@ void WebProcessPool::registerNotificationObservers()
}];
m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
@@ -12025,7 +12278,7 @@ index 555814f9771f8f16d3572cd7007817ba4296d6d3..8850e4adb182e7f0b23e5cde45f14ad8
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
-index f9123661bf8e84307bfe55a78999d4e35c70f165..897c488a2cef712613e53cd0c502f5e48b201341 100644
+index cc5e0d803a2069c6a5539fe1bccb67c5c9b1b3aa..7841be001cb5bc6db99b3d71f881c6e9b298e5fd 100644
--- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
+++ b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
@@ -40,8 +40,10 @@
@@ -12064,7 +12317,7 @@ index f9123661bf8e84307bfe55a78999d4e35c70f165..897c488a2cef712613e53cd0c502f5e4
m_downloadProxyMap.downloadFinished(*this);
});
} else
-@@ -168,6 +176,21 @@ void DownloadProxy::decideDestinationWithSuggestedFilename(const WebCore::Resour
+@@ -153,6 +161,21 @@ void DownloadProxy::decideDestinationWithSuggestedFilename(const WebCore::Resour
suggestedFilename = m_suggestedFilename;
suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(suggestedFilename, response.mimeType());
@@ -12086,7 +12339,7 @@ index f9123661bf8e84307bfe55a78999d4e35c70f165..897c488a2cef712613e53cd0c502f5e4
m_client->decideDestinationWithSuggestedFilename(*this, response, ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler)] (AllowOverwrite allowOverwrite, String destination) mutable {
SandboxExtension::Handle sandboxExtensionHandle;
if (!destination.isNull()) {
-@@ -216,6 +239,8 @@ void DownloadProxy::didFinish()
+@@ -201,6 +224,8 @@ void DownloadProxy::didFinish()
updateQuarantinePropertiesIfPossible();
#endif
m_client->didFinish(*this);
@@ -12095,7 +12348,7 @@ index f9123661bf8e84307bfe55a78999d4e35c70f165..897c488a2cef712613e53cd0c502f5e4
// This can cause the DownloadProxy object to be deleted.
m_downloadProxyMap.downloadFinished(*this);
-@@ -226,6 +251,8 @@ void DownloadProxy::didFail(const ResourceError& error, std::span<const uint8_t>
+@@ -211,6 +236,8 @@ void DownloadProxy::didFail(const ResourceError& error, std::span<const uint8_t>
m_legacyResumeData = createData(resumeData);
m_client->didFail(*this, error, m_legacyResumeData.get());
@@ -12117,7 +12370,7 @@ index 6f0d076b1b1cb0ec3e1c7fdc5f3a6dfffe9ee63d..656d4259dbf9ab97a8b0408c061c0fd2
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.h b/Source/WebKit/UIProcess/DrawingAreaProxy.h
-index a11762ba4969c3b5a38b01ba3eb831940e48c9ab..e4df189df7b5246dd39a485f735743f81cdc3041 100644
+index 77d47a91327391c2b8bc3a3fc12f512c25160649..3173e2545ae0a79b90342234b008fd26a0ad72a7 100644
--- a/Source/WebKit/UIProcess/DrawingAreaProxy.h
+++ b/Source/WebKit/UIProcess/DrawingAreaProxy.h
@@ -98,6 +98,7 @@ public:
@@ -12128,7 +12381,7 @@ index a11762ba4969c3b5a38b01ba3eb831940e48c9ab..e4df189df7b5246dd39a485f735743f8
virtual void minimumSizeForAutoLayoutDidChange() { }
virtual void sizeToContentAutoSizeMaximumSizeDidChange() { }
-@@ -181,6 +182,10 @@ private:
+@@ -184,6 +185,10 @@ private:
virtual void update(uint64_t /* backingStoreStateID */, UpdateInfo&&) { }
virtual void exitAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, UpdateInfo&&) { }
#endif
@@ -12153,7 +12406,7 @@ index fc5c53f18ad2dee2c2f40cdbb86ca7f24b262d8d..d93d804d3a8ebaa30856710df544f3db
}
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/CairoJpegEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/CairoJpegEncoder.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..f9af359a8b81babaf855132ec168feb22ef5799b
+index 0000000000000000000000000000000000000000..8d20e2aa36ba0f7996c20a6a02792c7f151bbed5
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/CairoJpegEncoder.cpp
@@ -0,0 +1,246 @@
@@ -12200,7 +12453,7 @@ index 0000000000000000000000000000000000000000..f9af359a8b81babaf855132ec168feb2
+
+#include "config.h"
+
-+#if USE(CAIRO)
++#if USE(CAIRO) || PLATFORM(GTK)
+
+#include "CairoJpegEncoder.h"
+
@@ -12441,10 +12694,10 @@ index 0000000000000000000000000000000000000000..4ec8b96bbbddf8a7b042f53a8068754a
+cairo_status_t cairo_image_surface_write_to_jpeg_mem(cairo_surface_t *sfc, unsigned char **data, size_t *len, int quality);
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab85677745577f9a7
+index 0000000000000000000000000000000000000000..b0527d43bf28c7b6f25a5dc3f2b9ff42e0a96190
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
-@@ -0,0 +1,393 @@
+@@ -0,0 +1,387 @@
+/*
+ * Copyright (C) 2020 Microsoft Corporation.
+ *
@@ -12497,7 +12750,7 @@ index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab8567774
+#include <skia/encode/SkJpegEncoder.h>
+#endif
+
-+#if USE(CAIRO)
++#if USE(CAIRO) || PLATFORM(GTK)
+#include "CairoJpegEncoder.h"
+#include "DrawingAreaProxyCoordinatedGraphics.h"
+#include "DrawingAreaProxy.h"
@@ -12543,7 +12796,7 @@ index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab8567774
+ m_encoder = nullptr;
+}
+
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+void InspectorScreencastAgent::didPaint(sk_sp<SkImage>&& surface)
+{
+ sk_sp<SkImage> image(surface);
@@ -12564,16 +12817,15 @@ index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab8567774
+ m_encoder->encodeFrame(sk_sp<SkImage>(image), displaySize);
+ if (m_screencast) {
+ {
-+ SkBitmap bitmap;
-+ bitmap.setInfo(SkImageInfo::Make(image->width(), image->height(), kRGBA_8888_SkColorType, kPremul_SkAlphaType));
-+ if (!bitmap.tryAllocPixels() || !image->readPixels(bitmap.pixmap(), 0, 0)) {
-+ fprintf(stderr, "Failed to read pixels from SkImage\n");
++ SkPixmap pixmap;
++ if (!image->peekPixels(&pixmap)) {
++ fprintf(stderr, "Failed to peek pixels from SkImage to compute hash\n");
+ return;
+ }
+ // Do not send the same frame over and over.
-+ size_t len = bitmap.computeByteSize();
++ size_t len = pixmap.computeByteSize();
+ auto cryptoDigest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_1);
-+ cryptoDigest->addBytes(std::span(reinterpret_cast<unsigned char*>(bitmap.getPixels()), len));
++ cryptoDigest->addBytes(std::span(reinterpret_cast<const unsigned char*>(pixmap.addr()), len));
+ auto digest = cryptoDigest->computeHash();
+ if (m_lastFrameDigest == digest)
+ return;
@@ -12585,13 +12837,8 @@ index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab8567774
+ // Scale image to fit width / height
+ double scale = std::min(m_screencastWidth / displaySize.width(), m_screencastHeight / displaySize.height());
+ if (scale < 1) {
-+ // Create a destination bitmap with the desired size
-+ SkImageInfo dstInfo = SkImageInfo::MakeN32Premul(displaySize.width() * scale, displaySize.height() * scale);
+ SkBitmap dstBitmap;
-+ if (!dstBitmap.allocPixels(dstInfo)) {
-+ fprintf(stderr, "Failed to allocate dstBitmap\n");
-+ return;
-+ }
++ dstBitmap.allocPixels(SkImageInfo::MakeN32Premul(displaySize.width() * scale, displaySize.height() * scale));
+ SkCanvas canvas(dstBitmap);
+ canvas.scale(scale, scale);
+ canvas.drawImage(image, 0, 0);
@@ -12600,7 +12847,7 @@ index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab8567774
+
+ SkPixmap pixmap;
+ if (!image->peekPixels(&pixmap)) {
-+ fprintf(stderr, "Failed to peek pixels from SkImage\n");
++ fprintf(stderr, "Failed to peek pixels from SkImage for JPEG encoding\n");
+ return;
+ }
+
@@ -12619,7 +12866,7 @@ index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab8567774
+}
+#endif
+
-+#if USE(CAIRO)
++#if USE(CAIRO) || PLATFORM(GTK)
+void InspectorScreencastAgent::didPaint(cairo_surface_t* surface)
+{
+#if PLATFORM(WPE)
@@ -12826,7 +13073,7 @@ index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab8567774
+}
+#endif
+
-+#if USE(CAIRO) && !PLATFORM(WPE)
++#if (USE(CAIRO) && !PLATFORM(WPE)) || PLATFORM(GTK)
+void InspectorScreencastAgent::encodeFrame()
+{
+ if (!m_encoder && !m_screencast)
@@ -12840,7 +13087,7 @@ index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab8567774
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..72399da38336232f93776e8c6e8b342ad51711ba
+index 0000000000000000000000000000000000000000..f1322caa318ca408731697b2eb6349e0dc9c8537
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h
@@ -0,0 +1,109 @@
@@ -12914,10 +13161,10 @@ index 0000000000000000000000000000000000000000..72399da38336232f93776e8c6e8b342a
+ void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
+
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+ void didPaint(sk_sp<SkImage>&& surface);
+#endif
-+#if USE(CAIRO)
++#if USE(CAIRO) || PLATFORM(GTK)
+ void didPaint(cairo_surface_t*);
+#endif
+
@@ -12955,7 +13202,7 @@ index 0000000000000000000000000000000000000000..72399da38336232f93776e8c6e8b342a
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3f2fe93e6
+index 0000000000000000000000000000000000000000..8690b1a245d463cd29c0196ab609ab69c80cc0a9
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
@@ -0,0 +1,437 @@
@@ -13000,14 +13247,14 @@ index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3
+#include <wtf/WorkQueue.h>
+#include <wtf/text/StringConcatenateNumbers.h>
+
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+#include <skia/core/SkBitmap.h>
+#include <skia/core/SkCanvas.h>
+#include <skia/core/SkData.h>
+#include <skia/core/SkImage.h>
+#endif
+
-+#if USE(CAIRO)
++#if USE(CAIRO) || PLATFORM(GTK)
+#include <WebCore/RefPtrCairo.h>
+#endif
+
@@ -13095,11 +13342,11 @@ index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3
+ WTF_MAKE_NONCOPYABLE(VPXFrame);
+ WTF_MAKE_FAST_ALLOCATED;
+public:
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+ explicit VPXFrame(sk_sp<SkImage>&& surface)
+ : m_surface(WTFMove(surface))
+ { }
-+#elif USE(CAIRO)
++#elif USE(CAIRO) || PLATFORM(GTK)
+ explicit VPXFrame(RefPtr<cairo_surface_t>&& surface)
+ : m_surface(WTFMove(surface))
+ { }
@@ -13115,7 +13362,7 @@ index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3
+
+ void convertToVpxImage(vpx_image_t* image)
+ {
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+ // Convert the updated region to YUV ready for encoding.
+ SkImageInfo info = SkImageInfo::Make(m_surface->width(), m_surface->height(), kN32_SkColorType, kPremul_SkAlphaType);
+ int argb_stride = info.minRowBytes();
@@ -13124,7 +13371,7 @@ index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3
+ uint8_t* argb_data = buffer.get();
+ if (!m_surface->readPixels(info, argb_data, argb_stride, 0, 0))
+ fprintf(stderr, "Read SkImage to ARGB buffer\n");
-+#elif USE(CAIRO)
++#elif USE(CAIRO) || PLATFORM(GTK)
+ // Convert the updated region to YUV ready for encoding.
+ const uint8_t* argb_data = cairo_image_surface_get_data(m_surface.get());
+ int argb_stride = cairo_image_surface_get_stride(m_surface.get());
@@ -13150,9 +13397,9 @@ index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3
+ }
+
+private:
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+ sk_sp<SkImage> m_surface;
-+#elif USE(CAIRO)
++#elif USE(CAIRO) || PLATFORM(GTK)
+ RefPtr<cairo_surface_t> m_surface;
+#elif PLATFORM(MAC)
+ RetainPtr<CGImageRef> m_windowImage;
@@ -13315,7 +13562,7 @@ index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3
+ m_lastFrameTimestamp = now;
+}
+
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+void ScreencastEncoder::encodeFrame(sk_sp<SkImage>&& image, IntSize size)
+{
+ flushLastFrame();
@@ -13339,7 +13586,7 @@ index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3
+ canvas.drawImage(image, 0, 0);
+ m_lastFrame = makeUnique<VPXFrame>(surface.asImage());
+}
-+#elif USE(CAIRO)
++#elif USE(CAIRO) || PLATFORM(GTK)
+void ScreencastEncoder::encodeFrame(cairo_surface_t* drawingAreaSurface, IntSize size)
+{
+ flushLastFrame();
@@ -13398,7 +13645,7 @@ index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h
new file mode 100644
-index 0000000000000000000000000000000000000000..987577f5d9c2bb21eec25bc0839cc3af7b84ce1e
+index 0000000000000000000000000000000000000000..f8701329f574bfad15f0e5456360a3ee3bd21b48
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h
@@ -0,0 +1,82 @@
@@ -13456,9 +13703,9 @@ index 0000000000000000000000000000000000000000..987577f5d9c2bb21eec25bc0839cc3af
+ ScreencastEncoder(std::unique_ptr<VPXCodec>&&, WebCore::IntSize);
+ ~ScreencastEncoder();
+
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+ void encodeFrame(sk_sp<SkImage>&&, WebCore::IntSize);
-+#elif USE(CAIRO)
++#elif USE(CAIRO) || PLATFORM(GTK)
+ void encodeFrame(cairo_surface_t*, WebCore::IntSize);
+#elif PLATFORM(MAC)
+ void encodeFrame(RetainPtr<CGImageRef>&&);
@@ -13619,10 +13866,10 @@ index 0000000000000000000000000000000000000000..e2ce910f3fd7f587add552275b7e7176
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp
-index fedef553cec70feb6c6475a5f752fbc6833dbb38..16e73d6a724dd80487b7b140aaaccfec253eb7aa 100644
+index 5cd89b25d3d87ec952d9a1a55351c9a7d76b9125..f43f2b64bcb6fffc672406f9eea9f7bda96918d6 100644
--- a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp
+++ b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp
-@@ -28,11 +28,10 @@
+@@ -28,7 +28,7 @@
#include "MessageSenderInlines.h"
#include "ProvisionalPageProxy.h"
@@ -13631,11 +13878,7 @@ index fedef553cec70feb6c6475a5f752fbc6833dbb38..16e73d6a724dd80487b7b140aaaccfec
#include "WebPageInspectorTarget.h"
#include "WebPageMessages.h"
#include "WebPageProxy.h"
--#include "WebProcessProxy.h"
-
- namespace WebKit {
-
-@@ -40,19 +39,17 @@ using namespace Inspector;
+@@ -40,19 +40,17 @@ using namespace Inspector;
std::unique_ptr<InspectorTargetProxy> InspectorTargetProxy::create(WebPageProxy& page, const String& targetId, Inspector::InspectorTargetType type)
{
@@ -13660,14 +13903,14 @@ index fedef553cec70feb6c6475a5f752fbc6833dbb38..16e73d6a724dd80487b7b140aaaccfec
, m_identifier(targetId)
, m_type(type)
{
-@@ -99,6 +96,31 @@ void InspectorTargetProxy::didCommitProvisionalTarget()
+@@ -99,6 +97,31 @@ void InspectorTargetProxy::didCommitProvisionalTarget()
m_provisionalPage = nullptr;
}
+void InspectorTargetProxy::willResume()
+{
+ if (m_page.hasRunningProcess())
-+ m_page.send(Messages::WebPage::ResumeInspectorIfPausedInNewWindow());
++ m_page.legacyMainFrameProcess().send(Messages::WebPage::ResumeInspectorIfPausedInNewWindow(), m_page.webPageIDInMainFrameProcess());
+}
+
+void InspectorTargetProxy::activate(String& error)
@@ -13733,7 +13976,7 @@ index a2239cec8e18850f35f7f88a9c4ebadc62bf4023..79f3ff84327dc075ec96983e04db4b10
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
-index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0654b9679 100644
+index 96cfb0cbc8749708d263a79270746a0185bff348..c6a71685084ca322925c848a404e5d80db0b727e 100644
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
@@ -26,13 +26,21 @@
@@ -13811,13 +14054,13 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0
+ // window.open will create page with already running process.
+ if (!m_inspectedPage->hasRunningProcess())
+ return;
- String pageTargetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID());
+ String pageTargetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageIDInMainFrameProcess());
createInspectorTarget(pageTargetId, Inspector::InspectorTargetType::Page);
}
+void WebPageInspectorController::didFinishAttachingToWebProcess()
+{
-+ String pageTargetID = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID());
++ String pageTargetID = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageIDInMainFrameProcess());
+ // Create target only after attaching to a Web Process first time. Before that
+ // we cannot event establish frontend connection.
+ if (m_targets.contains(pageTargetID))
@@ -13827,7 +14070,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0
+
void WebPageInspectorController::pageClosed()
{
-+ String pageTargetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID());
++ String pageTargetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageIDInMainFrameProcess());
+ destroyInspectorTarget(pageTargetId);
+
disconnectAllFrontends();
@@ -13842,7 +14085,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0
+{
+ if (reason != ProcessTerminationReason::Crash)
+ return false;
-+ String targetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID());
++ String targetId = WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageIDInMainFrameProcess());
+ auto it = m_targets.find(targetId);
+ if (it == m_targets.end())
+ return false;
@@ -13926,7 +14169,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0
}
#endif
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+void WebPageInspectorController::didPaint(sk_sp<SkImage>&& surface)
+{
+ if (!m_frontendRouter->hasFrontends())
@@ -13935,7 +14178,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0
+ m_screecastAgent->didPaint(WTFMove(surface));
+}
+#endif
-+#if USE(CAIRO)
++#if USE(CAIRO) || PLATFORM(GTK)
+void WebPageInspectorController::didPaint(cairo_surface_t* surface)
+{
+ if (!m_frontendRouter->hasFrontends())
@@ -14016,14 +14259,14 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0
+ if (!m_inspectedPage->isPageOpenedByDOMShowingInitialEmptyDocument())
+ return false;
+
-+ auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID()));
++ auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageIDInMainFrameProcess()));
+ ASSERT(target);
+ return target->isPaused();
+}
+
+void WebPageInspectorController::setContinueLoadingCallback(WTF::Function<void()>&& callback)
+{
-+ auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageID()));
++ auto* target = m_targets.get(WebPageInspectorTarget::toTargetID(m_inspectedPage->webPageIDInMainFrameProcess()));
+ ASSERT(target);
+ target->setResumeCallback(WTFMove(callback));
+}
@@ -14069,7 +14312,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0
+
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
-index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..964fd0b69738771ec24e8da54bbe1aea583dfd90 100644
+index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..00b4ae5f9a7ac36f1fceab1c3ab39b20086302ae 100644
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
@@ -26,6 +26,7 @@
@@ -14164,10 +14407,10 @@ index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..964fd0b69738771ec24e8da54bbe1aea
#if ENABLE(REMOTE_INSPECTOR)
void setIndicating(bool);
#endif
-+#if USE(SKIA)
++#if USE(SKIA) && !PLATFORM(GTK)
+ void didPaint(sk_sp<SkImage>&&);
+#endif
-+#if USE(CAIRO)
++#if USE(CAIRO) || PLATFORM(GTK)
+ void didPaint(cairo_surface_t*);
+#endif
+ using NavigationHandler = Function<void(const String&, uint64_t)>;
@@ -14454,10 +14697,10 @@ index 0000000000000000000000000000000000000000..d0e11ed81a6257c011df23d5870da740
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..bb5dcfc6234db1b5100e4aa98d678370a4dad12d
+index 0000000000000000000000000000000000000000..f0675fcaf55625bce9b23a378d556030c27997f8
--- /dev/null
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
-@@ -0,0 +1,1025 @@
+@@ -0,0 +1,1026 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -14529,6 +14772,7 @@ index 0000000000000000000000000000000000000000..bb5dcfc6234db1b5100e4aa98d678370
+#include <wtf/HashSet.h>
+#include <wtf/HexNumber.h>
+#include <wtf/URL.h>
++#include <wtf/text/MakeString.h>
+
+using namespace Inspector;
+
@@ -14640,13 +14884,13 @@ index 0000000000000000000000000000000000000000..bb5dcfc6234db1b5100e4aa98d678370
+static Ref<JSON::ArrayOf<String>> getEnabledWindowFeatures(const WebCore::WindowFeatures& features) {
+ auto result = JSON::ArrayOf<String>::create();
+ if (features.x)
-+ result->addItem("left="_s + String::number(*features.x));
++ result->addItem(makeString("left="_s, String::number(*features.x)));
+ if (features.y)
-+ result->addItem("top="_s + String::number(*features.y));
++ result->addItem(makeString("top="_s, String::number(*features.y)));
+ if (features.width)
-+ result->addItem("width="_s + String::number(*features.width));
++ result->addItem(makeString("width="_s, String::number(*features.width)));
+ if (features.height)
-+ result->addItem("height="_s + String::number(*features.height));
++ result->addItem(makeString("height="_s, String::number(*features.height)));
+ if (features.menuBarVisible)
+ result->addItem("menubar"_s);
+ if (features.toolBarVisible)
@@ -15191,7 +15435,7 @@ index 0000000000000000000000000000000000000000..bb5dcfc6234db1b5100e4aa98d678370
+ }
+
+ auto sandboxExtensionHandles = SandboxExtension::createReadOnlyHandlesForFiles("InspectorPlaywrightAgent::grantFileReadAccess"_s, files);
-+ pageProxyChannel->page().send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(WTFMove(sandboxExtensionHandles)));
++ pageProxyChannel->page().legacyMainFrameProcess().send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(WTFMove(sandboxExtensionHandles)), pageProxyChannel->page().webPageIDInMainFrameProcess());
+#endif
+ return { };
+}
@@ -15707,11 +15951,50 @@ index 0000000000000000000000000000000000000000..e7a3dcc533294bb6e12f65d79b5b716b
+} // namespace WebKit
+
+#endif // ENABLE(REMOTE_INSPECTOR)
+diff --git a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
+index c5df687a8093a3ee9bdddbecb69629584c197012..f09af9804e7a587a3c1a444317ba1a16ca52fb7f 100644
+--- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
++++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
+@@ -188,6 +188,13 @@ void ProcessLauncher::launchProcess()
+ nargs++;
+ }
+ #endif
++// Playwright begin
++ bool enableSharedArrayBuffer = false;
++ if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web && m_client && m_client->shouldEnableSharedArrayBuffer()) {
++ enableSharedArrayBuffer = true;
++ nargs++;
++ }
++// Playwright end
+
+ char** argv = g_newa(char*, nargs);
+ unsigned i = 0;
+@@ -203,6 +210,10 @@ void ProcessLauncher::launchProcess()
+ if (configureJSCForTesting)
+ argv[i++] = const_cast<char*>("--configure-jsc-for-testing");
+ #endif
++// Playwright begin
++ if (enableSharedArrayBuffer)
++ argv[i++] = const_cast<char*>("--enable-shared-array-buffer");
++// Playwright end
+ argv[i++] = nullptr;
+
+ // Warning: we want GIO to be able to spawn with posix_spawn() rather than fork()/exec(), in
diff --git a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
-index fac881d7c3d44758591d7a9f392a3992ce9f9a72..ad56113497f21d2916664ffe605489e939c736f4 100644
+index fac881d7c3d44758591d7a9f392a3992ce9f9a72..35eba5a0b31fc6e2d6e5c05c9f866c03d2e1c7d0 100644
--- a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
+++ b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
-@@ -97,8 +97,11 @@ void ProcessLauncher::launchProcess()
+@@ -91,14 +91,21 @@ void ProcessLauncher::launchProcess()
+ commandLineBuilder.append(" -configure-jsc-for-testing"_s);
+ if (!m_client->isJITEnabled())
+ commandLineBuilder.append(" -disable-jit"_s);
++// Playwright begin
++ if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web && m_client->shouldEnableSharedArrayBuffer())
++ commandLineBuilder.append(" -enable-shared-array-buffer"_s);
++// Playwright end
+ commandLineBuilder.append('\0');
+
+ auto commandLine = commandLineBuilder.toString().wideCharacters();
STARTUPINFO startupInfo { };
startupInfo.cb = sizeof(startupInfo);
@@ -15725,7 +16008,7 @@ index fac881d7c3d44758591d7a9f392a3992ce9f9a72..ad56113497f21d2916664ffe605489e9
BOOL result = ::CreateProcess(0, commandLine.data(), 0, 0, true, 0, 0, 0, &startupInfo, &processInformation);
diff --git a/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp b/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp
-index 4dbbd6c6206b214541217f6b49f4ba441855f8f9..6b4b3d7448a64e9b0519f37ce75e364deba62b6f 100644
+index 919dede3e9653f6e16d6772a90a023223c0845a9..8e0a214d02468c900dedc803204d4704b4aa6d12 100644
--- a/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp
+++ b/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp
@@ -30,6 +30,7 @@
@@ -15737,7 +16020,7 @@ index 4dbbd6c6206b214541217f6b49f4ba441855f8f9..6b4b3d7448a64e9b0519f37ce75e364d
#include "RemoteMediaSessionCoordinatorProxyMessages.h"
#include "WebPageProxy.h"
diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h
-index b368e79479e84e95eebbaaea5e3d0e0dd4c70d62..1ad4b36568d33e7fd52dbabfa1ef6e5bbe6a8433 100644
+index cc9598fc619fb1bf3f4070d52a7587e209d4a147..58d92b530a60ce327cad1b47566bbb57450e955e 100644
--- a/Source/WebKit/UIProcess/PageClient.h
+++ b/Source/WebKit/UIProcess/PageClient.h
@@ -72,6 +72,11 @@
@@ -15765,7 +16048,7 @@ index b368e79479e84e95eebbaaea5e3d0e0dd4c70d62..1ad4b36568d33e7fd52dbabfa1ef6e5b
namespace WebKit {
class PageClient;
}
-@@ -357,7 +368,20 @@ public:
+@@ -373,7 +384,20 @@ public:
virtual void selectionDidChange() = 0;
#endif
@@ -16251,7 +16534,7 @@ index d499ee31f32b9dcdb456ba0b476d211fba115673..43b349887d18e21162b59fa8174df32c
namespace WebCore {
class PlatformWheelEvent;
diff --git a/Source/WebKit/UIProcess/RemotePageProxy.cpp b/Source/WebKit/UIProcess/RemotePageProxy.cpp
-index b89ab7f35c6a3bfda89f1575b65d192f8237d1eb..d2bba95b349634674240c964511606e49cb11912 100644
+index f08f1ae907d39f75ec5043921c44dfeb1c581511..a892f5050b0f7a37c1231c9ca41dfb6030249aba 100644
--- a/Source/WebKit/UIProcess/RemotePageProxy.cpp
+++ b/Source/WebKit/UIProcess/RemotePageProxy.cpp
@@ -43,6 +43,7 @@
@@ -16263,7 +16546,7 @@ index b89ab7f35c6a3bfda89f1575b65d192f8237d1eb..d2bba95b349634674240c964511606e4
namespace WebKit {
diff --git a/Source/WebKit/UIProcess/RemotePageProxy.h b/Source/WebKit/UIProcess/RemotePageProxy.h
-index 34cd273d199470e42f3bfe152642d565b0d53485..53241e02fdbfb33d128ea4c7942a501b843c20fd 100644
+index b2019b6e792c58c9aa258d571f24dbe35c5eb926..bac988e367c158292f6e5dab957bdafcd23d91de 100644
--- a/Source/WebKit/UIProcess/RemotePageProxy.h
+++ b/Source/WebKit/UIProcess/RemotePageProxy.h
@@ -73,7 +73,6 @@ class WebProcessProxy;
@@ -16275,13 +16558,13 @@ index 34cd273d199470e42f3bfe152642d565b0d53485..53241e02fdbfb33d128ea4c7942a501b
class RemotePageProxy : public IPC::MessageReceiver {
WTF_MAKE_FAST_ALLOCATED;
diff --git a/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp b/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp
-index 777ab704b262e00208193dee7738e14d853b102a..12a66a3ff48565d6a5682207b94f39572545f786 100644
+index 40531b866fda1c35dbddb90f2ac1027688b2a09c..82003f78d7d2c9fbf2d393187636cf8b0bcf228f 100644
--- a/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp
+++ b/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp
@@ -37,6 +37,7 @@
#include <WebCore/U2fResponseConverter.h>
#include <wtf/text/Base64.h>
- #include <wtf/text/StringConcatenateNumbers.h>
+ #include <wtf/text/MakeString.h>
+#include <wtf/text/Base64.h>
#define U2F_RELEASE_LOG(fmt, ...) RELEASE_LOG(WebAuthn, "%p [transport=%s] - U2fAuthenticator::" fmt, this, transportForDebugging().utf8().data(), ##__VA_ARGS__)
@@ -16311,7 +16594,7 @@ index e2ded3c65b9680346be2534a3e970e2f425a83a8..b0c006c1dcbfae4b33530f8eae04f986
WebPageProxy* page() const { return m_page.get(); }
diff --git a/Source/WebKit/UIProcess/WebFrameProxy.cpp b/Source/WebKit/UIProcess/WebFrameProxy.cpp
-index 992ebbfcd3094576076084ef394dd4802c5dcc8e..2a1e09b4da5e67ba524f769e3de239b77043cf16 100644
+index 21a9f2d213db48f58881d0873cfd17ce962080b8..7932e3de12dc1af7f3aad4a9cdbb8bf0004a67ba 100644
--- a/Source/WebKit/UIProcess/WebFrameProxy.cpp
+++ b/Source/WebKit/UIProcess/WebFrameProxy.cpp
@@ -31,6 +31,7 @@
@@ -16599,10 +16882,10 @@ index 0000000000000000000000000000000000000000..b70bfe0411571f4d181a7fae3186aaae
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..8e48dfabe2a520deec08b771cf6699b22e27c9da
+index 0000000000000000000000000000000000000000..247c1817e85e5935eacef5e5ecdc07737dbf4a85
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
-@@ -0,0 +1,334 @@
+@@ -0,0 +1,394 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -16635,8 +16918,9 @@ index 0000000000000000000000000000000000000000..8e48dfabe2a520deec08b771cf6699b2
+#include "NativeWebKeyboardEvent.h"
+#include "NativeWebMouseEvent.h"
+#include "NativeWebWheelEvent.h"
-+#include "WebWheelEvent.h"
+#include "WebPageProxy.h"
++#include "WebTouchEvent.h"
++#include "WebWheelEvent.h"
+#include <wtf/MathExtras.h>
+#include <wtf/HexNumber.h>
+#include <WebCore/Scrollbar.h>
@@ -16902,10 +17186,69 @@ index 0000000000000000000000000000000000000000..8e48dfabe2a520deec08b771cf6699b2
+#endif
+}
+
-+void WebPageInspectorInputAgent::dispatchTapEvent(int x, int y, std::optional<int>&& modifiers, Ref<DispatchTapEventCallback>&& callback) {
-+ m_page.sendWithAsyncReply(Messages::WebPage::FakeTouchTap(WebCore::IntPoint(x, y), modifiers ? *modifiers : 0), [callback]() {
++void WebPageInspectorInputAgent::dispatchTapEvent(int x, int y, std::optional<int>&& modifiers, Ref<DispatchTapEventCallback>&& callback)
++{
++ m_page.legacyMainFrameProcess().sendWithAsyncReply(Messages::WebPage::FakeTouchTap(WebCore::IntPoint(x, y), modifiers ? *modifiers : 0), [callback]() {
+ callback->sendSuccess();
-+ });
++ }, m_page.webPageIDInMainFrameProcess());
++}
++
++void WebPageInspectorInputAgent::dispatchTouchEvent(const String& type, std::optional<int>&& modifiers, RefPtr<JSON::Array>&& in_touchPoints, Ref<DispatchTouchEventCallback>&& callback)
++{
++ float rotationAngle = 0.0;
++ float force = 1.0;
++ const WebCore::IntSize radius(1, 1);
++
++ uint8_t unsignedModifiers = modifiers ? static_cast<uint8_t>(*modifiers) : 0;
++ OptionSet<WebEventModifier> eventModifiers;
++ eventModifiers = eventModifiers.fromRaw(unsignedModifiers);
++
++ WebPlatformTouchPoint::State state;
++ if (type == "touchStart"_s)
++ state = WebPlatformTouchPoint::State::Pressed;
++ else if (type == "touchMove"_s)
++ state = WebPlatformTouchPoint::State::Moved;
++ else if (type == "touchEnd"_s)
++ state = WebPlatformTouchPoint::State::Released;
++ else if (type == "touchCancel"_s)
++ state = WebPlatformTouchPoint::State::Cancelled;
++ else {
++ callback->sendFailure("Unsupported event type"_s);
++ return;
++ }
++
++ Vector<WebPlatformTouchPoint> touchPoints;
++ for (unsigned i = 0; i < in_touchPoints->length(); ++i) {
++ RefPtr<JSON::Value> item = in_touchPoints->get(i);
++ RefPtr<JSON::Object> obj = item->asObject();
++ if (!obj) {
++ callback->sendFailure("Invalid TouchPoint format"_s);
++ return;
++ }
++ std::optional<int> x = obj->getInteger("x"_s);
++ if (!x) {
++ callback->sendFailure("TouchPoint does not have x"_s);
++ return;
++ }
++ std::optional<int> y = obj->getInteger("y"_s);
++ if (!y) {
++ callback->sendFailure("TouchPoint does not have y"_s);
++ return;
++ }
++ std::optional<int> optionalId = obj->getInteger("id"_s);
++ int id = optionalId ? *optionalId : 0;
++ const WebCore::IntPoint position(*x, *y);
++ touchPoints.append(WebPlatformTouchPoint(id, state, position, position, radius, rotationAngle, force));
++ }
++
++ WebTouchEvent touchEvent({WebEventType::TouchStart, eventModifiers, WallTime::now()}, WTFMove(touchPoints));
++ m_page.legacyMainFrameProcess().sendWithAsyncReply(Messages::WebPage::TouchEvent(touchEvent), [callback] (std::optional<WebEventType> eventType, bool) {
++ if (!eventType) {
++ callback->sendFailure("Failed to dispatch touch event."_s);
++ return;
++ }
++ callback->sendSuccess();
++ }, m_page.webPageIDInMainFrameProcess());
+}
+
+void WebPageInspectorInputAgent::dispatchWheelEvent(int x, int y, std::optional<int>&& modifiers, std::optional<int>&& deltaX, std::optional<int>&& deltaY, Ref<DispatchWheelEventCallback>&& callback)
@@ -16939,10 +17282,10 @@ index 0000000000000000000000000000000000000000..8e48dfabe2a520deec08b771cf6699b2
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..3e87bf40ced2301f4fb145c6cb31f2cf7fa15dd6
+index 0000000000000000000000000000000000000000..26a2a3c0791c334f811ec99a630314f8e8521d02
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h
-@@ -0,0 +1,86 @@
+@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -17007,6 +17350,7 @@ index 0000000000000000000000000000000000000000..3e87bf40ced2301f4fb145c6cb31f2cf
+ void dispatchKeyEvent(const String& type, std::optional<int>&& modifiers, const String& text, const String& unmodifiedText, const String& code, const String& key, std::optional<int>&& windowsVirtualKeyCode, std::optional<int>&& nativeVirtualKeyCode, std::optional<bool>&& autoRepeat, std::optional<bool>&& isKeypad, std::optional<bool>&& isSystemKey, RefPtr<JSON::Array>&&, Ref<DispatchKeyEventCallback>&& callback) override;
+ void dispatchMouseEvent(const String& type, int x, int y, std::optional<int>&& modifiers, const String& button, std::optional<int>&& buttons, std::optional<int>&& clickCount, std::optional<int>&& deltaX, std::optional<int>&& deltaY, Ref<DispatchMouseEventCallback>&& callback) override;
+ void dispatchTapEvent(int x, int y, std::optional<int>&& modifiers, Ref<DispatchTapEventCallback>&& callback) override;
++ void dispatchTouchEvent(const String& type, std::optional<int>&& modifiers, RefPtr<JSON::Array>&& touchPoints, Ref<DispatchTouchEventCallback>&& callback) override;
+ void dispatchWheelEvent(int x, int y, std::optional<int>&& modifiers, std::optional<int>&& deltaX, std::optional<int>&& deltaY, Ref<DispatchWheelEventCallback>&& callback) override;
+
+private:
@@ -17030,10 +17374,10 @@ index 0000000000000000000000000000000000000000..3e87bf40ced2301f4fb145c6cb31f2cf
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
-index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a4de493a3 100644
+index f96981fa78e5d08faeaa261cf4ccb64e1c9241f8..a112a30315ed7708ea140c876d10ce14e4716584 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
-@@ -186,12 +186,14 @@
+@@ -190,12 +190,14 @@
#include <WebCore/AppHighlight.h>
#include <WebCore/ArchiveError.h>
#include <WebCore/BitmapImage.h>
@@ -17048,7 +17392,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
#include <WebCore/DragController.h>
#include <WebCore/DragData.h>
#include <WebCore/ElementContext.h>
-@@ -212,6 +214,7 @@
+@@ -216,6 +218,7 @@
#include <WebCore/ModalContainerTypes.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/OrganizationStorageAccessPromptQuirk.h>
@@ -17056,7 +17400,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
#include <WebCore/PerformanceLoggingClient.h>
#include <WebCore/PermissionDescriptor.h>
#include <WebCore/PermissionState.h>
-@@ -219,12 +222,15 @@
+@@ -223,12 +226,15 @@
#include <WebCore/PublicSuffixStore.h>
#include <WebCore/Quirks.h>
#include <WebCore/RealtimeMediaSourceCenter.h>
@@ -17072,7 +17416,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
#include <WebCore/ShareData.h>
#include <WebCore/SharedBuffer.h>
#include <WebCore/ShouldTreatAsContinuingLoad.h>
-@@ -299,6 +305,9 @@
+@@ -310,6 +316,9 @@
#include "AcceleratedBackingStoreDMABuf.h"
#endif
#include "GtkSettingsManager.h"
@@ -17082,7 +17426,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
#include <WebCore/SelectionData.h>
#endif
-@@ -421,6 +430,8 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms;
+@@ -432,6 +441,8 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms;
static constexpr Seconds audibleActivityClearDelay = 10_s;
#endif
@@ -17091,7 +17435,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageProxyCounter, ("WebPageProxy"));
#if PLATFORM(COCOA)
-@@ -826,6 +837,10 @@ WebPageProxy::~WebPageProxy()
+@@ -846,6 +857,10 @@ WebPageProxy::~WebPageProxy()
if (preferences->mediaSessionCoordinatorEnabled())
GroupActivitiesSessionNotifier::sharedNotifier().removeWebPage(*this);
#endif
@@ -17102,7 +17446,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
void WebPageProxy::addAllMessageReceivers()
-@@ -1364,6 +1379,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)
+@@ -1414,6 +1429,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)
protectedPageClient()->didRelaunchProcess();
internals().pageLoadState.didSwapWebProcesses();
@@ -17110,7 +17454,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
void WebPageProxy::didAttachToRunningProcess()
-@@ -1372,7 +1388,7 @@ void WebPageProxy::didAttachToRunningProcess()
+@@ -1422,7 +1438,7 @@ void WebPageProxy::didAttachToRunningProcess()
#if ENABLE(FULLSCREEN_API)
ASSERT(!m_fullScreenManager);
@@ -17119,7 +17463,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
#endif
#if ENABLE(VIDEO_PRESENTATION_MODE)
ASSERT(!m_playbackSessionManager);
-@@ -1767,6 +1783,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
+@@ -1823,6 +1839,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
return m_legacyMainFrameProcess;
}
@@ -17134,14 +17478,14 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
+ loadParameters.request = WTFMove(request);
+ loadParameters.shouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow;
+ loadParameters.shouldTreatAsContinuingLoad = ShouldTreatAsContinuingLoad::No;
-+ legacyMainFrameProcess().send(Messages::WebPage::LoadRequestInFrameForInspector(WTFMove(loadParameters), frame->frameID()), internals().webPageID);
++ m_legacyMainFrameProcess->send(Messages::WebPage::LoadRequestInFrameForInspector(WTFMove(loadParameters), frame->frameID()), internals().webPageID);
+ return navigation;
+}
+
RefPtr<API::Navigation> WebPageProxy::loadRequest(ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, API::Object* userData)
{
if (m_isClosed)
-@@ -2365,6 +2396,61 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
+@@ -2422,6 +2453,61 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
websiteDataStore().protectedNetworkProcess()->send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0);
}
@@ -17172,7 +17516,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
+ auto deviceOrientation = toScreenOrientationType(angle.value_or(0));
+ if (m_screenOrientationManager)
+ m_screenOrientationManager->setCurrentOrientation(deviceOrientation);
-+ legacyMainFrameProcess().send(Messages::WebPage::SetDeviceOrientation(angle.value_or(0)), webPageID());
++ m_legacyMainFrameProcess->send(Messages::WebPage::SetDeviceOrientation(angle.value_or(0)), webPageIDInMainFrameProcess());
+}
+
+std::optional<bool> WebPageProxy::permissionForAutomation(const String& origin, const String& permission) const
@@ -17200,10 +17544,10 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
+ fprintf(stderr, "RENDERER: %s\n", str.utf8().data());
+}
+
- void WebPageProxy::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type)
+ void WebPageProxy::createInspectorTarget(IPC::Connection& connection, const String& targetId, Inspector::InspectorTargetType type)
{
- MESSAGE_CHECK(m_legacyMainFrameProcess, !targetId.isEmpty());
-@@ -2606,6 +2692,24 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState> flagsToUpdate)
+ MESSAGE_CHECK_BASE(!targetId.isEmpty(), &connection);
+@@ -2663,6 +2749,24 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState> flagsToUpdate)
bool wasVisible = isViewVisible();
Ref pageClient = this->pageClient();
internals().activityState.remove(flagsToUpdate);
@@ -17228,7 +17572,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
if (flagsToUpdate & ActivityState::IsFocused && pageClient->isViewFocused())
internals().activityState.add(ActivityState::IsFocused);
if (flagsToUpdate & ActivityState::WindowIsActive && pageClient->isViewWindowActive())
-@@ -3348,7 +3452,7 @@ void WebPageProxy::performDragOperation(DragData& dragData, const String& dragSt
+@@ -3401,7 +3505,7 @@ void WebPageProxy::performDragOperation(DragData& dragData, const String& dragSt
grantAccessToCurrentPasteboardData(dragStorageName);
#endif
@@ -17237,7 +17581,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
performDragControllerAction(DragControllerAction::PerformDragOperation, dragData);
#else
if (!hasRunningProcess())
-@@ -3365,6 +3469,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -3418,6 +3522,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
if (!hasRunningProcess())
return;
@@ -17246,16 +17590,16 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
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 (!remoteUserInputEventData) {
didPerformDragControllerAction(dragOperation, dragHandlingMethod, mouseIsOverFileInput, numberOfItemsToBeAccepted, insertionRect, editableElementRect);
-@@ -3381,6 +3487,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
- protectedLegacyMainFrameProcess()->assumeReadAccessToBaseURL(*this, url);
+@@ -3427,7 +3533,7 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+ performDragControllerAction(action, dragData, remoteUserInputEventData->targetFrameID);
+ };
- ASSERT(dragData.platformData());
-+#endif
+-#if PLATFORM(GTK)
+#if PLATFORM(GTK) || PLATFORM(WPE)
- sendWithAsyncReply(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags()), WTFMove(completionHandler));
- #else
- sendToProcessContainingFrame(frameID, Messages::WebPage::PerformDragControllerAction(frameID, action, dragData), WTFMove(completionHandler));
-@@ -3396,14 +3504,34 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
+ UNUSED_PARAM(frameID);
+ String url = dragData.asURL();
+ if (!url.isEmpty())
+@@ -3449,14 +3555,34 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
internals().currentDragCaretEditableElementRect = editableElementRect;
setDragCaretRect(insertionRect);
protectedPageClient()->didPerformDragControllerAction();
@@ -17293,7 +17637,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
didStartDrag();
}
#endif
-@@ -3424,6 +3552,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
+@@ -3477,6 +3603,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
setDragCaretRect({ });
}
@@ -17318,7 +17662,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
void WebPageProxy::didStartDrag()
{
if (!hasRunningProcess())
-@@ -3431,6 +3577,16 @@ void WebPageProxy::didStartDrag()
+@@ -3484,6 +3628,16 @@ void WebPageProxy::didStartDrag()
discardQueuedMouseEvents();
send(Messages::WebPage::DidStartDrag());
@@ -17335,7 +17679,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
void WebPageProxy::dragCancelled()
-@@ -3590,16 +3746,37 @@ void WebPageProxy::processNextQueuedMouseEvent()
+@@ -3622,16 +3776,37 @@ void WebPageProxy::processNextQueuedMouseEvent()
process->startResponsivenessTimer();
}
@@ -17374,12 +17718,12 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
+ m_dragSelectionData = std::nullopt;
+ dragEnded(event.position(), event.globalPosition(), m_dragSourceOperationMask);
+ }
-+ didReceiveEvent(eventType, true);
++ didReceiveEvent(eventType, true, std::nullopt);
+ }
}
void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function<void ()>&& action)
-@@ -3770,6 +3947,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled)
+@@ -3802,6 +3977,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled)
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->wheelEventsFlushedForPage(*this);
@@ -17388,7 +17732,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
void WebPageProxy::cacheWheelEventScrollingAccelerationCurve(const NativeWebWheelEvent& nativeWheelEvent)
-@@ -3919,7 +4098,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
+@@ -3940,7 +4117,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent)
{
@@ -17397,7 +17741,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
for (auto& touchPoint : touchStartEvent.touchPoints()) {
auto location = touchPoint.location();
auto update = [this, location](TrackingType& trackingType, EventTrackingRegions::EventType eventType) {
-@@ -4529,6 +4708,7 @@ void WebPageProxy::receivedNavigationActionPolicyDecision(WebProcessProxy& proce
+@@ -4547,6 +4724,7 @@ void WebPageProxy::receivedNavigationActionPolicyDecision(WebProcessProxy& proce
void WebPageProxy::receivedPolicyDecision(PolicyAction action, API::Navigation* navigation, RefPtr<API::WebsitePolicies>&& websitePolicies, Ref<API::NavigationAction>&& navigationAction, WillContinueLoadInNewProcess willContinueLoadInNewProcess, std::optional<SandboxExtension::Handle> sandboxExtensionHandle, std::optional<PolicyDecisionConsoleMessage>&& consoleMessage, CompletionHandler<void(PolicyDecision&&)>&& completionHandler)
{
@@ -17405,19 +17749,20 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
if (!hasRunningProcess())
return completionHandler(PolicyDecision { });
-@@ -5460,6 +5640,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
+@@ -5478,6 +5656,12 @@ void WebPageProxy::pageScaleFactorDidChange(IPC::Connection& connection, double
m_pageScaleFactor = scaleFactor;
}
-+void WebPageProxy::viewScaleFactorDidChange(double scaleFactor)
++void WebPageProxy::viewScaleFactorDidChange(IPC::Connection& connection, double scaleFactor)
+{
++ MESSAGE_CHECK_BASE(scaleFactorIsValid(scaleFactor), &connection);
+ m_viewScaleFactor = scaleFactor;
+}
+
- void WebPageProxy::pluginScaleFactorDidChange(double pluginScaleFactor)
+ void WebPageProxy::pluginScaleFactorDidChange(IPC::Connection& connection, double pluginScaleFactor)
{
- MESSAGE_CHECK(m_legacyMainFrameProcess, scaleFactorIsValid(pluginScaleFactor));
-@@ -6015,6 +6200,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref<WebProcessProxy>&& process, ui
+ MESSAGE_CHECK_BASE(scaleFactorIsValid(pluginScaleFactor), &connection);
+@@ -6033,6 +6217,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref<WebProcessProxy>&& process, ui
Ref protectedPageClient { pageClient() };
m_navigationState->didDestroyNavigation(process->coreProcessIdentifier(), navigationID);
@@ -17425,7 +17770,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)
-@@ -6282,6 +6468,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
+@@ -6300,6 +6485,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
m_failingProvisionalLoadURL = { };
@@ -17434,7 +17779,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
// 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;
-@@ -6942,7 +7130,14 @@ void WebPageProxy::beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListen
+@@ -6967,7 +7154,14 @@ void WebPageProxy::beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListen
void WebPageProxy::decidePolicyForNavigationActionAsync(NavigationActionData&& data, CompletionHandler<void(PolicyDecision&&)>&& completionHandler)
{
@@ -17450,7 +17795,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&& process, NavigationActionData&& data, CompletionHandler<void(PolicyDecision&&)>&& completionHandler)
-@@ -7618,6 +7813,7 @@ void WebPageProxy::createNewPage(WindowFeatures&& windowFeatures, NavigationActi
+@@ -7631,6 +7825,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w
if (RefPtr page = originatingFrameInfo->page())
openerAppInitiatedState = page->lastNavigationWasAppInitiated();
@@ -17458,7 +17803,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
auto completionHandler = [
this,
protectedThis = Ref { *this },
-@@ -7690,6 +7886,7 @@ void WebPageProxy::createNewPage(WindowFeatures&& windowFeatures, NavigationActi
+@@ -7703,6 +7898,7 @@ void WebPageProxy::createNewPage(IPC::Connection& connection, WindowFeatures&& w
void WebPageProxy::showPage()
{
m_uiClient->showPage(this);
@@ -17466,7 +17811,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
bool WebPageProxy::hasOpenedPage() const
-@@ -7776,6 +7973,10 @@ void WebPageProxy::closePage()
+@@ -7813,6 +8009,10 @@ void WebPageProxy::closePage()
if (isClosed())
return;
@@ -17477,7 +17822,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:");
protectedPageClient()->clearAllEditCommands();
m_uiClient->close(this);
-@@ -7812,6 +8013,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f
+@@ -7849,6 +8049,8 @@ void WebPageProxy::runJavaScriptAlert(IPC::Connection& connection, FrameIdentifi
}
runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {
@@ -17486,7 +17831,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
page.m_uiClient->runJavaScriptAlert(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)]() mutable {
reply();
completion();
-@@ -7833,6 +8036,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
+@@ -7870,6 +8072,8 @@ void WebPageProxy::runJavaScriptConfirm(IPC::Connection& connection, FrameIdenti
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -17495,7 +17840,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {
page.m_uiClient->runJavaScriptConfirm(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)](bool result) mutable {
-@@ -7856,6 +8061,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
+@@ -7893,6 +8097,8 @@ void WebPageProxy::runJavaScriptPrompt(IPC::Connection& connection, FrameIdentif
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -17504,7 +17849,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply), defaultValue](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {
page.m_uiClient->runJavaScriptPrompt(page, message, defaultValue, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)](auto& result) mutable {
-@@ -7972,6 +8179,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
+@@ -8009,6 +8215,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(IPC::Connection& connection, Fram
return;
}
}
@@ -17513,7 +17858,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
// Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer.
protectedLegacyMainFrameProcess()->stopResponsivenessTimer();
-@@ -8464,6 +8673,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo,
+@@ -8501,6 +8709,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo,
}
#if ENABLE(FULLSCREEN_API)
@@ -17525,7 +17870,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
WebFullScreenManagerProxy* WebPageProxy::fullScreenManager()
{
return m_fullScreenManager.get();
-@@ -8564,6 +8778,17 @@ void WebPageProxy::requestDOMPasteAccess(DOMPasteAccessCategory pasteAccessCateg
+@@ -8606,6 +8819,17 @@ void WebPageProxy::requestDOMPasteAccess(DOMPasteAccessCategory pasteAccessCateg
}
}
@@ -17540,10 +17885,10 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
+ return;
+ }
+
- m_pageClient->requestDOMPasteAccess(pasteAccessCategory, elementRect, originIdentifier, WTFMove(completionHandler));
+ m_pageClient->requestDOMPasteAccess(pasteAccessCategory, requiresInteraction, elementRect, originIdentifier, WTFMove(completionHandler));
}
-@@ -9424,6 +9649,8 @@ void WebPageProxy::mouseEventHandlingCompleted(std::optional<WebEventType> event
+@@ -9461,6 +9685,8 @@ void WebPageProxy::mouseEventHandlingCompleted(std::optional<WebEventType> event
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->mouseEventsFlushedForPage(*this);
didFinishProcessingAllPendingMouseEvents();
@@ -17552,7 +17897,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
}
-@@ -9458,6 +9685,7 @@ void WebPageProxy::keyEventHandlingCompleted(std::optional<WebEventType> eventTy
+@@ -9495,6 +9721,7 @@ void WebPageProxy::keyEventHandlingCompleted(std::optional<WebEventType> eventTy
if (!canProcessMoreKeyEvents) {
if (RefPtr automationSession = configuration().processPool().automationSession())
automationSession->keyboardEventsFlushedForPage(*this);
@@ -17560,7 +17905,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
}
}
-@@ -9863,7 +10091,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
+@@ -9906,7 +10133,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
{
WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%" PUBLIC_LOG_STRING, processTerminationReasonToString(reason).characters());
@@ -17572,7 +17917,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
if (m_loaderClient)
handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this);
else
-@@ -10237,6 +10468,7 @@ bool WebPageProxy::useGPUProcessForDOMRenderingEnabled() const
+@@ -10292,6 +10522,7 @@ bool WebPageProxy::useGPUProcessForDOMRenderingEnabled() const
WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea, std::optional<RemotePageParameters>&& remotePageParameters, bool isProcessSwap, RefPtr<API::WebsitePolicies>&& websitePolicies, std::optional<WebCore::FrameIdentifier>&& mainFrameIdentifier)
{
@@ -17580,7 +17925,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
WebPageCreationParameters parameters;
parameters.processDisplayName = configuration().processDisplayName();
-@@ -10461,6 +10693,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
+@@ -10516,6 +10747,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
parameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false;
@@ -17589,7 +17934,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
#if PLATFORM(IOS) || PLATFORM(VISION)
// FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.allowsDeprecatedSynchronousXMLHttpRequestDuringUnload = allowsDeprecatedSynchronousXMLHttpRequestDuringUnload();
-@@ -10590,8 +10824,42 @@ void WebPageProxy::gamepadsRecentlyAccessed()
+@@ -10648,8 +10881,42 @@ void WebPageProxy::gamepadsRecentlyAccessed()
#endif // ENABLE(GAMEPAD)
@@ -17632,7 +17977,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) {
m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = Ref { *this }, authenticationChallenge] (bool shouldAllowLegacyTLS) {
if (shouldAllowLegacyTLS)
-@@ -10686,6 +10954,12 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
+@@ -10744,6 +11011,12 @@ void WebPageProxy::requestGeolocationPermissionForFrame(IPC::Connection& connect
request->deny();
};
@@ -17645,7 +17990,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
// 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
-@@ -10748,6 +11022,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi
+@@ -10806,6 +11079,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi
shouldChangeDeniedToPrompt = false;
if (sessionID().isEphemeral()) {
@@ -17658,7 +18003,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
completionHandler(shouldChangeDeniedToPrompt ? PermissionState::Prompt : PermissionState::Denied);
return;
}
-@@ -10762,6 +11042,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi
+@@ -10820,6 +11099,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi
return;
}
@@ -17672,7 +18017,7 @@ index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a
completionHandler(shouldChangeDeniedToPrompt ? PermissionState::Prompt : PermissionState::Denied);
return;
diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h
-index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb870731bbb871 100644
+index 1c4d43a5025741a37708e99c398f03836de80182..df2e31590e9936525cb5037ea4456237a938de91 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.h
+++ b/Source/WebKit/UIProcess/WebPageProxy.h
@@ -26,6 +26,7 @@
@@ -17680,10 +18025,10 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
#include "APIObject.h"
+#include "APIWebsitePolicies.h"
- #include "IdentifierTypes.h"
#include "MessageReceiver.h"
- #include "MessageSender.h"
-@@ -39,6 +40,20 @@
+ #include <WebCore/FrameIdentifier.h>
+ #include <WebCore/NowPlayingMetadataObserver.h>
+@@ -37,6 +38,20 @@
#include <wtf/ProcessID.h>
#include <wtf/UniqueRef.h>
#include <wtf/WeakHashSet.h>
@@ -17704,7 +18049,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
#if USE(DICTATION_ALTERNATIVES)
#include <WebCore/PlatformTextAlternatives.h>
-@@ -110,6 +125,7 @@ class DestinationColorSpace;
+@@ -112,6 +127,7 @@ class DestinationColorSpace;
class DragData;
class FloatPoint;
class FloatQuad;
@@ -17712,7 +18057,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
class FloatRect;
class FloatSize;
class FontAttributeChanges;
-@@ -426,6 +442,7 @@ class WebExtensionController;
+@@ -446,6 +462,7 @@ class WebExtensionController;
class WebFramePolicyListenerProxy;
class WebFrameProxy;
class WebFullScreenManagerProxy;
@@ -17720,7 +18065,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
class WebInspectorUIProxy;
class WebKeyboardEvent;
class WebMouseEvent;
-@@ -661,6 +678,8 @@ public:
+@@ -674,6 +691,8 @@ public:
void setControlledByAutomation(bool);
WebPageInspectorController& inspectorController() { return *m_inspectorController; }
@@ -17729,7 +18074,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
#if PLATFORM(IOS_FAMILY)
void showInspectorIndication();
-@@ -694,6 +713,7 @@ public:
+@@ -707,6 +726,7 @@ public:
bool hasSleepDisabler() const;
#if ENABLE(FULLSCREEN_API)
@@ -17737,7 +18082,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
WebFullScreenManagerProxy* fullScreenManager();
API::FullscreenClient& fullscreenClient() const { return *m_fullscreenClient; }
-@@ -782,6 +802,12 @@ public:
+@@ -795,6 +815,12 @@ public:
void setPageLoadStateObserver(std::unique_ptr<PageLoadStateObserverBase>&&);
@@ -17750,7 +18095,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
void initializeWebPage();
void setDrawingArea(std::unique_ptr<DrawingAreaProxy>&&);
-@@ -808,6 +834,7 @@ public:
+@@ -821,6 +847,7 @@ public:
void addPlatformLoadParameters(WebProcessProxy&, LoadParameters&);
RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&);
RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object* userData = nullptr);
@@ -17758,23 +18103,23 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, bool isAppInitiated = true, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadData(std::span<const uint8_t>, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadData(std::span<const uint8_t>, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, WebCore::ShouldOpenExternalURLsPolicy);
-@@ -874,6 +901,7 @@ public:
-
+@@ -888,6 +915,7 @@ public:
PageClient& pageClient() const;
Ref<PageClient> protectedPageClient() const;
+ RefPtr<PageClient> optionalProtectedPageClient() const;
+ bool hasPageClient() const { return !!m_pageClient; }
void setViewNeedsDisplay(const WebCore::Region&);
void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, WebCore::ScrollIsAnimated);
-@@ -1400,6 +1428,7 @@ public:
+@@ -1414,6 +1442,7 @@ public:
#endif
- void pageScaleFactorDidChange(double);
-+ void viewScaleFactorDidChange(double);
- void pluginScaleFactorDidChange(double);
- void pluginZoomFactorDidChange(double);
+ void pageScaleFactorDidChange(IPC::Connection&, double);
++ void viewScaleFactorDidChange(IPC::Connection&, double);
+ void pluginScaleFactorDidChange(IPC::Connection&, double);
+ void pluginZoomFactorDidChange(IPC::Connection&, double);
-@@ -1484,14 +1513,20 @@ public:
+@@ -1498,14 +1527,20 @@ public:
void didStartDrag();
void dragCancelled();
void setDragCaretRect(const WebCore::IntRect&);
@@ -17782,7 +18127,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
+ bool cancelDragIfNeeded();
#if PLATFORM(COCOA)
void startDrag(const WebCore::DragItem&, WebCore::ShareableBitmapHandle&& dragImageHandle);
- void setPromisedDataForImage(const String& pasteboardName, WebCore::SharedMemoryHandle&& imageHandle, const String& filename, const String& extension,
+ void setPromisedDataForImage(IPC::Connection&, const String& pasteboardName, WebCore::SharedMemoryHandle&& imageHandle, const String& filename, const String& extension,
const String& title, const String& url, const String& visibleURL, WebCore::SharedMemoryHandle&& archiveHandle, const String& originIdentifier);
+ void releaseInspectorDragPasteboard();
#endif
@@ -17796,7 +18141,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
#endif
void processDidBecomeUnresponsive();
-@@ -1724,6 +1759,7 @@ public:
+@@ -1739,6 +1774,7 @@ public:
void setViewportSizeForCSSViewportUnits(const WebCore::FloatSize&);
WebCore::FloatSize viewportSizeForCSSViewportUnits() const;
@@ -17804,7 +18149,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
void didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&&, NegotiatedLegacyTLS);
void negotiatedLegacyTLS();
void didNegotiateModernTLS(const URL&);
-@@ -1758,6 +1794,8 @@ public:
+@@ -1771,6 +1807,8 @@ public:
#if PLATFORM(COCOA) || PLATFORM(GTK)
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&);
@@ -17812,8 +18157,8 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
+ RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) { return nullptr; }
#endif
- void wrapCryptoKey(const Vector<uint8_t>&, CompletionHandler<void(std::optional<Vector<uint8_t>>&&)>&&);
-@@ -2666,6 +2704,7 @@ private:
+ void wrapCryptoKey(Vector<uint8_t>&&, CompletionHandler<void(std::optional<Vector<uint8_t>>&&)>&&);
+@@ -2672,6 +2710,7 @@ private:
RefPtr<API::Navigation> launchProcessForReload();
void requestNotificationPermission(const String& originString, CompletionHandler<void(bool allowed)>&&);
@@ -17821,7 +18166,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
void didChangeContentSize(const WebCore::IntSize&);
void didChangeIntrinsicContentSize(const WebCore::IntSize&);
-@@ -3178,8 +3217,10 @@ private:
+@@ -3191,8 +3230,10 @@ private:
String m_overrideContentSecurityPolicy;
RefPtr<WebInspectorUIProxy> m_inspector;
@@ -17832,7 +18177,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
std::unique_ptr<WebFullScreenManagerProxy> m_fullScreenManager;
std::unique_ptr<API::FullscreenClient> m_fullscreenClient;
#endif
-@@ -3371,6 +3412,22 @@ private:
+@@ -3384,6 +3425,22 @@ private:
std::optional<WebCore::DragOperation> m_currentDragOperation;
bool m_currentDragIsOverFileInput { false };
unsigned m_currentDragNumberOfFilesToBeAccepted { 0 };
@@ -17855,7 +18200,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
#endif
bool m_mainFrameHasHorizontalScrollbar { false };
-@@ -3542,6 +3599,10 @@ private:
+@@ -3555,6 +3612,10 @@ private:
RefPtr<API::Object> messageBody;
};
Vector<InjectedBundleMessage> m_pendingInjectedBundleMessages;
@@ -17867,7 +18212,7 @@ index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb8707
#if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION)
std::unique_ptr<WebDeviceOrientationUpdateProviderProxy> m_webDeviceOrientationUpdateProviderProxy;
diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in
-index cf1a795016100a37361cad1902723c11c571fdba..2462eb77a81b5a904e1ed9bf06927f839bc6f391 100644
+index 488af1f4066de0b8adaa595cb2f4028fbce4b177..529a1b8d2f2b0dd9face3ce38cf68758ce381d2f 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in
@@ -29,6 +29,7 @@ messages -> WebPageProxy {
@@ -17877,7 +18222,7 @@ index cf1a795016100a37361cad1902723c11c571fdba..2462eb77a81b5a904e1ed9bf06927f83
+ LogToStderr(String text)
DidChangeViewportProperties(struct WebCore::ViewportAttributes attributes)
- DidReceiveEvent(enum:uint8_t WebKit::WebEventType eventType, bool handled)
+ DidReceiveEvent(enum:uint8_t WebKit::WebEventType eventType, bool handled, struct std::optional<WebCore::RemoteUserInputEventData> remoteUserInputEventData)
@@ -182,6 +183,7 @@ messages -> WebPageProxy {
#endif
@@ -17886,7 +18231,7 @@ index cf1a795016100a37361cad1902723c11c571fdba..2462eb77a81b5a904e1ed9bf06927f83
PluginScaleFactorDidChange(double zoomFactor)
PluginZoomFactorDidChange(double zoomFactor)
-@@ -310,10 +312,14 @@ messages -> WebPageProxy {
+@@ -305,10 +307,14 @@ messages -> WebPageProxy {
StartDrag(struct WebCore::DragItem dragItem, WebCore::ShareableBitmapHandle dragImage)
SetPromisedDataForImage(String pasteboardName, WebCore::SharedMemory::Handle imageHandle, String filename, String extension, String title, String url, String visibleURL, WebCore::SharedMemory::Handle archiveHandle, String originIdentifier)
#endif
@@ -17918,7 +18263,7 @@ index c909cd634d6acd72695de8372866691269ad6a04..ff5b37e3b4a17eab4bd3f8e9a2a6ef84
}
diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp
-index 3a3655d43728126604dc246de49ba7c9210038b2..6d2552c13caadb09a5c8fed13e6034a087465ddb 100644
+index c3ff67230baf4dec44f5d7232a8351ec1f77b79c..3fed70aa8f568cd9a3a4fa460ed565658405f63f 100644
--- a/Source/WebKit/UIProcess/WebProcessPool.cpp
+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp
@@ -426,10 +426,10 @@ void WebProcessPool::setAutomationClient(std::unique_ptr<API::AutomationClient>&
@@ -17956,10 +18301,10 @@ index 3a3655d43728126604dc246de49ba7c9210038b2..6d2552c13caadb09a5c8fed13e6034a0
parameters.urlSchemesRegisteredAsEmptyDocument = copyToVector(m_schemesToRegisterAsEmptyDocument);
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp
-index bec37fb35fb6e2077f6ad3a73d06b1b7d105ffc4..a5764d995f015b7f343303b4896c44abd38e024d 100644
+index 9411228a77d83f24384a0b9cf57f44351b48d75e..3510caa0b246b9794977f4fc99efddc9de1aceee 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp
-@@ -188,6 +188,11 @@ Vector<Ref<WebProcessProxy>> WebProcessProxy::allProcesses()
+@@ -189,6 +189,11 @@ Vector<Ref<WebProcessProxy>> WebProcessProxy::allProcesses()
});
}
@@ -17971,7 +18316,7 @@ index bec37fb35fb6e2077f6ad3a73d06b1b7d105ffc4..a5764d995f015b7f343303b4896c44ab
RefPtr<WebProcessProxy> WebProcessProxy::processForIdentifier(ProcessIdentifier identifier)
{
return allProcessMap().get(identifier);
-@@ -561,6 +566,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt
+@@ -562,6 +567,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt
if (WebKit::isInspectorProcessPool(processPool()))
launchOptions.extraInitializationData.add<HashTranslatorASCIILiteral>("inspector-process"_s, "1"_s);
@@ -17999,10 +18344,10 @@ index bec37fb35fb6e2077f6ad3a73d06b1b7d105ffc4..a5764d995f015b7f343303b4896c44ab
if (isPrewarmed())
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h
-index d154105bcabd3fe11657b484712aee58deb2d450..111e6b272fc3b1700b82bf3df98c5e501126daeb 100644
+index 7ac34410441b471cfe9bc3d9a96a7f082283813d..7a39d5f45d7b422330b8cd444ebe78cfa145c692 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.h
+++ b/Source/WebKit/UIProcess/WebProcessProxy.h
-@@ -175,6 +175,7 @@ public:
+@@ -178,6 +178,7 @@ public:
static void forWebPagesWithOrigin(PAL::SessionID, const WebCore::SecurityOriginData&, const Function<void(WebPageProxy&)>&);
static Vector<std::pair<WebCore::ProcessIdentifier, WebCore::RegistrableDomain>> allowedFirstPartiesForCookies();
@@ -18011,10 +18356,10 @@ index d154105bcabd3fe11657b484712aee58deb2d450..111e6b272fc3b1700b82bf3df98c5e50
void initializeWebProcess(WebProcessCreationParameters&&);
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-index f3b3f0101a88eefff3b3dde49017d0d918758bfa..09f4b3d331d6f44bdce4ba4895da2e600183e6b8 100644
+index 3311783c3e193b7b3e6f4b1aeddc40560308859a..ceb002bdce785ac39ed86c4f809813c32148bfc8 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-@@ -305,7 +305,8 @@ SOAuthorizationCoordinator& WebsiteDataStore::soAuthorizationCoordinator(const W
+@@ -306,7 +306,8 @@ SOAuthorizationCoordinator& WebsiteDataStore::soAuthorizationCoordinator(const W
static Ref<NetworkProcessProxy> networkProcessForSession(PAL::SessionID sessionID)
{
@@ -18024,7 +18369,7 @@ index f3b3f0101a88eefff3b3dde49017d0d918758bfa..09f4b3d331d6f44bdce4ba4895da2e60
if (sessionID.isEphemeral()) {
// Reuse a previous persistent session network process for ephemeral sessions.
for (auto& dataStore : allDataStores().values()) {
-@@ -2278,6 +2279,12 @@ void WebsiteDataStore::originDirectoryForTesting(WebCore::ClientOrigin&& origin,
+@@ -2279,6 +2280,12 @@ void WebsiteDataStore::originDirectoryForTesting(WebCore::ClientOrigin&& origin,
protectedNetworkProcess()->websiteDataOriginDirectoryForTesting(m_sessionID, WTFMove(origin), type, WTFMove(completionHandler));
}
@@ -18124,10 +18469,10 @@ index 165885137ca032390c6b55baacc30a8c4c423eb5..930ceeca56587636993f9a0c0e0a21d0
std::unique_ptr<SOAuthorizationCoordinator> m_soAuthorizationCoordinator;
#endif
diff --git a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp
-index cfb4be2f7b34d1ecc97989d4bfefa6e8c1a3c864..f250d43ad30903ffa93cce52e1d3843f7c428ecf 100644
+index 7c6139c6b0d8c7c3cddd08164317794a519a7b53..027d05bdd0e4bf94d70797ab195e656f81541300 100644
--- a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp
+++ b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp
-@@ -101,6 +101,14 @@ void GeoclueGeolocationProvider::stop()
+@@ -102,6 +102,14 @@ void GeoclueGeolocationProvider::stop()
}
m_sourceType = LocationProviderSource::Unknown;
@@ -18142,7 +18487,7 @@ index cfb4be2f7b34d1ecc97989d4bfefa6e8c1a3c864..f250d43ad30903ffa93cce52e1d3843f
}
void GeoclueGeolocationProvider::setEnableHighAccuracy(bool enabled)
-@@ -373,6 +381,8 @@ void GeoclueGeolocationProvider::createGeoclueClient(const char* clientPath)
+@@ -374,6 +382,8 @@ void GeoclueGeolocationProvider::createGeoclueClient(const char* clientPath)
return;
}
@@ -18461,10 +18806,10 @@ index b02c70d85fe1a93899640a8b909b0cf734d28b18..b1dc8e89eb265be81e083bf337109561
virtual void unrealize() { };
virtual int renderHostFileDescriptor() { return -1; }
diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
-index b71fb0a8ac0605edc6466ac1a5b12607fb8f211b..bcbfd33dfe367e1b04426f8162dd1552b4dbbcc1 100644
+index 66329bbc7f97ca577842dd93e28d4143b16e69dc..cd10bd6a29e64a1356e5a14a3a6339c4ca43327e 100644
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
-@@ -662,4 +662,30 @@ RendererBufferFormat AcceleratedBackingStoreDMABuf::bufferFormat() const
+@@ -675,4 +675,30 @@ RendererBufferFormat AcceleratedBackingStoreDMABuf::bufferFormat() const
return buffer ? buffer->format() : RendererBufferFormat { };
}
@@ -18496,10 +18841,10 @@ index b71fb0a8ac0605edc6466ac1a5b12607fb8f211b..bcbfd33dfe367e1b04426f8162dd1552
+
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
-index cd95ceb063fc776b5d68ff45262c4d84e572c509..041c562551cd467c320b8f566264885d00d1434b 100644
+index 68d4bb329c2e116fe720c98d3e38b6672c88e389..a4a36dd35ee9330f8b9edfb09f607a12dbac7c0b 100644
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
-@@ -88,6 +88,7 @@ private:
+@@ -90,6 +90,7 @@ private:
#else
bool paint(cairo_t*, const WebCore::IntRect&) override;
#endif
@@ -18507,9 +18852,9 @@ index cd95ceb063fc776b5d68ff45262c4d84e572c509..041c562551cd467c320b8f566264885d
void unrealize() override;
void update(const LayerTreeContext&) override;
RendererBufferFormat bufferFormat() const override;
-@@ -243,6 +244,9 @@ private:
- RefPtr<Buffer> m_pendingBuffer;
+@@ -246,6 +247,9 @@ private:
RefPtr<Buffer> m_committedBuffer;
+ std::optional<WebCore::Region> m_pendingDamageRegion;
HashMap<uint64_t, RefPtr<Buffer>> m_buffers;
+// Playwright begin
+ RefPtr<cairo_surface_t> m_flippedSurface;
@@ -18572,12 +18917,12 @@ index 0000000000000000000000000000000000000000..5a255b0389470c4fd1baaff5e8e4882e
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp b/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp
-index 6029857cfcd6c4fea14de28243f1955138a62844..8a1bda8f2637670cf88baca998cbff09157d2a6f 100644
+index 97191083e1c5b5283599e394e56553fc5e5cd6a1..e8c7cbb6cd9431b1720aafb8dfd0abdc97f17a39 100644
--- a/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp
+++ b/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp
-@@ -34,6 +34,8 @@
- #include <wtf/SetForScope.h>
+@@ -35,6 +35,8 @@
#include <wtf/glib/GRefPtr.h>
+ #include <wtf/text/MakeString.h>
+using namespace WebCore;
+
@@ -18586,10 +18931,10 @@ index 6029857cfcd6c4fea14de28243f1955138a62844..8a1bda8f2637670cf88baca998cbff09
Ref<WebDateTimePickerGtk> WebDateTimePickerGtk::create(WebPageProxy& page)
diff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..a75642f1d3765efa6fcc7c07cc51beb2ddf450d2
+index 0000000000000000000000000000000000000000..7d9672b0f831b5b7f6acf14ede26e1e8e9a65389
--- /dev/null
+++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp
-@@ -0,0 +1,115 @@
+@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -18687,6 +19032,8 @@ index 0000000000000000000000000000000000000000..a75642f1d3765efa6fcc7c07cc51beb2
+ }
+ callback("Failed to resize window"_s);
+#else
++ UNUSED_PARAM(this);
++ UNUSED_PARAM(didNotHaveInitialAllocation);
+ UNUSED_PARAM(drawingArea);
+ callback(String());
+#endif
@@ -18788,10 +19135,10 @@ index 0000000000000000000000000000000000000000..36ab6e9aec9f8d79fb13a8a49beadaaf
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/gtk/WebPasteboardProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPasteboardProxyGtk.cpp
-index d18b3e777203ef5d0f33884f909bc598d3526831..aef80b47359d7a2e4805a006dc59cd60d499a60e 100644
+index 2a17b59c9be6ecc76b0ec0a16d9f4866dffa0bf4..0d5c58a88b0e5197254d0eb5bd6eee045d99d299 100644
--- a/Source/WebKit/UIProcess/gtk/WebPasteboardProxyGtk.cpp
+++ b/Source/WebKit/UIProcess/gtk/WebPasteboardProxyGtk.cpp
-@@ -77,8 +77,10 @@ void WebPasteboardProxy::setPrimarySelectionOwner(WebFrameProxy* frame)
+@@ -78,8 +78,10 @@ void WebPasteboardProxy::setPrimarySelectionOwner(WebFrameProxy* frame)
if (m_primarySelectionOwner == frame)
return;
@@ -18805,7 +19152,7 @@ index d18b3e777203ef5d0f33884f909bc598d3526831..aef80b47359d7a2e4805a006dc59cd60
m_primarySelectionOwner = frame;
}
diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
-index d45b06876bac4046a05a03fbaf734af33071191d..8c136ce12155bda85cc31d2422a0bd5ff7dfdea9 100644
+index f5290e15ec912a36766509dd2414444a8c97e06d..2563926ff72e0b8bcb35e250141549a69578a52f 100644
--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
@@ -503,6 +503,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
@@ -19027,7 +19374,7 @@ index 0000000000000000000000000000000000000000..721826c8c98fc85b68a4f45deaee69c1
+
+#endif
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.h b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
-index 708c5d11dec4797db15b51293a94089869024e8a..ee05508c06f739c27df3d5e6c6b5234bad8a82bf 100644
+index 4c99b44dbdd37e73c349ea8d5a3422075d2eff65..7c6dc33bf047706f13332c726a7e2364d834f7ae 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.h
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
@@ -54,6 +54,8 @@ class PageClientImpl final : public PageClientImplCocoa
@@ -19039,7 +19386,7 @@ index 708c5d11dec4797db15b51293a94089869024e8a..ee05508c06f739c27df3d5e6c6b5234b
PageClientImpl(NSView *, WKWebView *);
virtual ~PageClientImpl();
-@@ -171,6 +173,9 @@ private:
+@@ -170,6 +172,9 @@ private:
void updateAcceleratedCompositingMode(const LayerTreeContext&) override;
void didFirstLayerFlush(const LayerTreeContext&) override;
@@ -19049,7 +19396,7 @@ index 708c5d11dec4797db15b51293a94089869024e8a..ee05508c06f739c27df3d5e6c6b5234b
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) override;
void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
#if ENABLE(MAC_GESTURE_EVENTS)
-@@ -225,6 +230,10 @@ private:
+@@ -224,6 +229,10 @@ private:
void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
#endif
@@ -19061,18 +19408,10 @@ index 708c5d11dec4797db15b51293a94089869024e8a..ee05508c06f739c27df3d5e6c6b5234b
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 c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f3050926a9f 100644
+index 0116071f4359eac661cc6de71eee2d43ce2d56e0..c93c40e2064e15ccecf08a147f4189e98810a6d3 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
-@@ -79,6 +79,7 @@
- #import <WebCore/TextUndoInsertionMarkupMac.h>
- #import <WebCore/ValidationBubble.h>
- #import <WebCore/WebCoreCALayerExtras.h>
-+#import <WebCore/NotImplemented.h>
- #import <pal/spi/mac/NSApplicationSPI.h>
- #import <wtf/ProcessPrivilege.h>
- #import <wtf/RetainPtr.h>
-@@ -105,6 +106,13 @@ namespace WebKit {
+@@ -110,6 +110,13 @@ namespace WebKit {
using namespace WebCore;
@@ -19086,7 +19425,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
PageClientImpl::PageClientImpl(NSView *view, WKWebView *webView)
: PageClientImplCocoa(webView)
, m_view(view)
-@@ -158,6 +166,9 @@ NSWindow *PageClientImpl::activeWindow() const
+@@ -163,6 +170,9 @@ NSWindow *PageClientImpl::activeWindow() const
bool PageClientImpl::isViewWindowActive()
{
@@ -19096,7 +19435,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
NSWindow *activeViewWindow = activeWindow();
return activeViewWindow.isKeyWindow || (activeViewWindow && [NSApp keyWindow] == activeViewWindow);
-@@ -165,6 +176,9 @@ bool PageClientImpl::isViewWindowActive()
+@@ -170,6 +180,9 @@ bool PageClientImpl::isViewWindowActive()
bool PageClientImpl::isViewFocused()
{
@@ -19106,7 +19445,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
// 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 (!m_impl)
-@@ -188,6 +202,9 @@ void PageClientImpl::makeFirstResponder()
+@@ -193,6 +206,9 @@ void PageClientImpl::makeFirstResponder()
bool PageClientImpl::isViewVisible()
{
@@ -19116,7 +19455,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
NSView *activeView = this->activeView();
NSWindow *activeViewWindow = activeWindow();
-@@ -271,7 +288,8 @@ void PageClientImpl::didRelaunchProcess()
+@@ -276,7 +292,8 @@ void PageClientImpl::didRelaunchProcess()
void PageClientImpl::preferencesDidChange()
{
@@ -19126,7 +19465,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
}
void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip)
-@@ -474,6 +492,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
+@@ -479,6 +496,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled)
{
@@ -19135,7 +19474,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
m_impl->doneWithKeyEvent(event.nativeEvent(), eventWasHandled);
}
-@@ -493,6 +513,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl
+@@ -498,6 +517,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl
RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page)
{
@@ -19144,7 +19483,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
return WebPopupMenuProxyMac::create(m_view, page.popupMenuClient());
}
-@@ -634,6 +656,12 @@ CALayer *PageClientImpl::footerBannerLayer() const
+@@ -639,6 +660,12 @@ CALayer *PageClientImpl::footerBannerLayer() const
return m_impl->footerBannerLayer();
}
@@ -19157,7 +19496,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
RefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(std::optional<WebCore::IntRect>&&)
{
return m_impl->takeViewSnapshot();
-@@ -824,6 +852,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
+@@ -829,6 +856,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
#endif // ENABLE(FULLSCREEN_API)
@@ -19171,7 +19510,7 @@ index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f30
void PageClientImpl::navigationGestureDidBegin()
{
m_impl->dismissContentRelativeChildWindowsWithAnimation(true);
-@@ -1011,6 +1046,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c
+@@ -1017,6 +1051,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c
bool PageClientImpl::windowIsFrontWindowUnderMouse(const NativeWebMouseEvent& event)
{
@@ -19199,11 +19538,23 @@ index 21c925bafb662dbe961baaad7f25bf4296236d76..5496a33c558a00a5ba96d10223e600aa
}
+#endif
+diff --git a/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm b/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm
+index 63c423a74cf983ab7a0be49f0376d227c49724e1..5818c786d5fb0fb4a60c549b68ec989656223e5c 100644
+--- a/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm
++++ b/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm
+@@ -31,6 +31,7 @@
+ #import "APIHitTestResult.h"
+ #import "MessageSenderInlines.h"
+ #import "WKNSURLExtras.h"
++#import "WebFrameProxy.h"
+ #import "WebPageMessages.h"
+ #import "WebPageProxy.h"
+ #import "WebPageProxyMessages.h"
diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h
-index 6ab7aacaebfda818e3010bb06db72c8552ac598a..3e19cba50d73084392f62f176ad4c3153803e579 100644
+index e34faa8ae2933154efdbf0492a2f17af7a46f83b..54b509837bb767ac3ab28d1d7059462ca7a1170b 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.h
-@@ -68,6 +68,7 @@ private:
+@@ -78,6 +78,7 @@ private:
void show() override;
void showContextMenuWithItems(Vector<Ref<WebContextMenuItem>>&&) override;
void useContextMenuItems(Vector<Ref<WebContextMenuItem>>&&) override;
@@ -19212,10 +19563,10 @@ index 6ab7aacaebfda818e3010bb06db72c8552ac598a..3e19cba50d73084392f62f176ad4c315
bool showAfterPostProcessingContextData();
diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
-index 26db4b48e75b3e65febc8cbfb314a4c22e9bdfb3..138ea13ab34b83ed190436afea7d994cb4dfa70e 100644
+index bb4822a1ca6c0b209baed338f267f366424f61c6..aaffc9579deda3a1f5c8fe71747833a5d0e2e8bf 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
-@@ -478,6 +478,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem
+@@ -504,6 +504,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem
}
#endif
@@ -19415,10 +19766,10 @@ index 0000000000000000000000000000000000000000..4ec25daff6a0c75e378eb25b2f2638e2
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.h b/Source/WebKit/UIProcess/mac/WebViewImpl.h
-index 4e6b8f5f0b70f8a98fc86ce3042690fbc24b4cfa..a81f385cb14a98e94c44c645ef922873cc8cc9b1 100644
+index 91ae400e51861e82b75baa27b7206984c4d9bd7e..1661bf45ac3c038fb4b78b5f2adc8c9866904bf7 100644
--- a/Source/WebKit/UIProcess/mac/WebViewImpl.h
+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.h
-@@ -536,6 +536,9 @@ public:
+@@ -534,6 +534,9 @@ public:
void provideDataForPasteboard(NSPasteboard *, NSString *type);
NSArray *namesOfPromisedFilesDroppedAtDestination(NSURL *dropDestination);
@@ -19429,10 +19780,10 @@ index 4e6b8f5f0b70f8a98fc86ce3042690fbc24b4cfa..a81f385cb14a98e94c44c645ef922873
void saveBackForwardSnapshotForCurrentItem();
void saveBackForwardSnapshotForItem(WebBackForwardListItem&);
diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.mm b/Source/WebKit/UIProcess/mac/WebViewImpl.mm
-index c387818c8a3970d062c57f65d7e0cae0487564db..a6b109c3e4e392f29c1411fd702a776602f432bc 100644
+index 03e696c423afe8eb7bc69e8e4214213ba564644c..01d886dfc4d6c4902ff9f77fe946792ab33abf00 100644
--- a/Source/WebKit/UIProcess/mac/WebViewImpl.mm
+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.mm
-@@ -2409,6 +2409,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
+@@ -2407,6 +2407,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
if (!m_colorSpace)
m_colorSpace = [NSColorSpace sRGBColorSpace];
}
@@ -19444,7 +19795,7 @@ index c387818c8a3970d062c57f65d7e0cae0487564db..a6b109c3e4e392f29c1411fd702a7766
ASSERT(m_colorSpace);
return WebCore::DestinationColorSpace { [m_colorSpace CGColorSpace] };
-@@ -4525,6 +4530,18 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+@@ -4524,6 +4529,18 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
ALLOW_DEPRECATED_DECLARATIONS_END
}
@@ -19820,6 +20171,22 @@ index 0000000000000000000000000000000000000000..8b474c730139b44a13c9d5b2d13ee204
+}
+
+} // namespace WebKit
+diff --git a/Source/WebKit/UIProcess/win/WebView.cpp b/Source/WebKit/UIProcess/win/WebView.cpp
+index 00961624b18e46877bbcaff5a4b7b07f616768d0..20a411eb20685f4b4c9fda3f0883b58681bb02ce 100644
+--- a/Source/WebKit/UIProcess/win/WebView.cpp
++++ b/Source/WebKit/UIProcess/win/WebView.cpp
+@@ -552,9 +552,8 @@ LRESULT WebView::onSizeEvent(HWND hwnd, UINT, WPARAM, LPARAM lParam, bool& handl
+ {
+ if (m_page)
+ m_page->setIntrinsicDeviceScaleFactor(deviceScaleFactorForWindow(hwnd));
+- // If there are no m_page, use intrinsic device scale factor.
+- float deviceScaleFactor = m_page ? m_page->deviceScaleFactor() : deviceScaleFactorForWindow(hwnd);
+- m_viewSize = expandedIntSize(FloatSize(LOWORD(lParam), HIWORD(lParam)) / deviceScaleFactor);
++
++ m_viewSize = expandedIntSize(FloatSize(LOWORD(lParam), HIWORD(lParam)));
+
+ if (m_page && m_page->drawingArea()) {
+ // FIXME specify correctly layerPosition.
diff --git a/Source/WebKit/UIProcess/wpe/InspectorTargetProxyWPE.cpp b/Source/WebKit/UIProcess/wpe/InspectorTargetProxyWPE.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7453194ca6f032ba86a4c67f5bf12688ab6ec1be
@@ -20223,22 +20590,37 @@ index 0000000000000000000000000000000000000000..a7d88f8c745f95af21db71dcfce368ba
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp b/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp
-index b6536b74452c26a4d661bcf6039af54824f258d0..ade7c4ad1cef7bc69c452bef404eb38437c93088 100644
+index ff2377628995b6095d7cd75f447d904847da0dc0..345aebe075a5b710303eeb8d46f94cf9dc901706 100644
--- a/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp
+++ b/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp
-@@ -29,6 +29,7 @@
- #include "EditorState.h"
+@@ -30,6 +30,7 @@
#include "InputMethodState.h"
#include "PageClientImpl.h"
+ #include "WebProcessProxy.h"
+#include <wpe/wpe-platform.h>
#include <WebCore/PlatformEvent.h>
#if USE(ATK)
+diff --git a/Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp b/Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp
+index 41307f5fe61b92785a493f68aeca475521708d55..f02e9d93c96ac6c0abedba9ced97b02f9250ac82 100644
+--- a/Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp
++++ b/Source/WebKit/UIProcess/wpe/WebPreferencesWPE.cpp
+@@ -34,6 +34,10 @@ void WebPreferences::platformInitializeStore()
+ setForceCompositingMode(true);
+ setThreadedScrollingEnabled(true);
+
++ // Playwright override begin
++ setThreadedScrollingEnabled(false);
++ // Playwright override end
++
+ #if USE(SKIA)
+ // FIXME: Expose this as a setting when we switch to Skia.
+ static const char* disableAccelerated2DCanvas = getenv("WEBKIT_DISABLE_ACCELERATED_2D_CANVAS");
diff --git a/Source/WebKit/WPEPlatform/CMakeLists.txt b/Source/WebKit/WPEPlatform/CMakeLists.txt
-index 74f395b50b2d4668c521a8d72a5581113cf16698..75496b3c36a58c8da1bd8382cecddc8f81c62119 100644
+index 2b64d1b5b013d53b18b7757fe3b3f3d9a0501571..e8f28808f5ef0532319a4462fd285c0770d7ce52 100644
--- a/Source/WebKit/WPEPlatform/CMakeLists.txt
+++ b/Source/WebKit/WPEPlatform/CMakeLists.txt
-@@ -89,6 +89,7 @@ set(WPEPlatform_SYSTEM_INCLUDE_DIRECTORIES
+@@ -96,6 +96,7 @@ set(WPEPlatform_SYSTEM_INCLUDE_DIRECTORIES
set(WPEPlatform_LIBRARIES
Epoxy::Epoxy
@@ -20247,10 +20629,10 @@ index 74f395b50b2d4668c521a8d72a5581113cf16698..75496b3c36a58c8da1bd8382cecddc8f
${GLIB_GIO_LIBRARIES}
${GLIB_GOBJECT_LIBRARIES}
diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce659aeb8a 100644
+index 3cf46d518a1920a5c6c8e9537f71b1b0b25b00a0..3c7e8c09640d82630864f41569f3229076088a93 100644
--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-@@ -1540,6 +1540,7 @@
+@@ -1547,6 +1547,7 @@
5CABDC8722C40FED001EDE8E /* APIMessageListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CABDC8322C40FA7001EDE8E /* APIMessageListener.h */; };
5CADDE05215046BD0067D309 /* WKWebProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C74300E21500492004BFA17 /* WKWebProcess.h */; settings = {ATTRIBUTES = (Private, ); }; };
5CAECB6627465AE400AB78D0 /* UnifiedSource115.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CAECB5E27465AE300AB78D0 /* UnifiedSource115.cpp */; };
@@ -20258,7 +20640,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
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 */; };
-@@ -2370,6 +2371,18 @@
+@@ -2379,6 +2380,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 */; };
@@ -20277,7 +20659,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
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, ); }; };
-@@ -2458,6 +2471,8 @@
+@@ -2467,6 +2480,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 */; };
@@ -20286,7 +20668,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
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 */; };
-@@ -2478,6 +2493,9 @@
+@@ -2487,6 +2502,9 @@
EBA8D3B627A5E33F00CB7900 /* MockPushServiceConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = EBA8D3B027A5E33F00CB7900 /* MockPushServiceConnection.mm */; };
EBA8D3B727A5E33F00CB7900 /* PushServiceConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = EBA8D3B127A5E33F00CB7900 /* PushServiceConnection.mm */; };
ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -20296,7 +20678,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
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 */; };
F41795A62AC61B78007F5F12 /* CompactContextMenuPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = F41795A42AC619A2007F5F12 /* CompactContextMenuPresenter.h */; };
-@@ -6210,6 +6228,7 @@
+@@ -6230,6 +6248,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>"; };
@@ -20304,7 +20686,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
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>"; };
-@@ -7908,6 +7927,19 @@
+@@ -7930,6 +7949,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>"; };
@@ -20324,7 +20706,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
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>"; };
-@@ -8061,6 +8093,8 @@
+@@ -8082,6 +8114,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>"; };
@@ -20333,7 +20715,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
E5DEFA6726F8F42600AB68DB /* PhotosUISPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotosUISPI.h; sourceTree = "<group>"; };
EB0D312D275AE13300863D8F /* com.apple.webkit.webpushd.mac.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.webkit.webpushd.mac.plist; sourceTree = "<group>"; };
EB0D312E275AE13300863D8F /* com.apple.webkit.webpushd.ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.webkit.webpushd.ios.plist; sourceTree = "<group>"; };
-@@ -8085,6 +8119,14 @@
+@@ -8111,6 +8145,14 @@
ECA680D31E6904B500731D20 /* ExtraPrivateSymbolsForTAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtraPrivateSymbolsForTAPI.h; sourceTree = "<group>"; };
ECBFC1DB1E6A4D66000300C7 /* ExtraPublicSymbolsForTAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtraPublicSymbolsForTAPI.h; sourceTree = "<group>"; };
F036978715F4BF0500C3A80E /* WebColorPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPicker.cpp; sourceTree = "<group>"; };
@@ -20348,7 +20730,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
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; name = WKDatePickerPopoverController.h; path = ios/forms/WKDatePickerPopoverController.h; sourceTree = "<group>"; };
F40C3B702AB40167007A3567 /* WKDatePickerPopoverController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKDatePickerPopoverController.mm; path = ios/forms/WKDatePickerPopoverController.mm; sourceTree = "<group>"; };
-@@ -8389,6 +8431,7 @@
+@@ -8415,6 +8457,7 @@
3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */,
3766F9F1189A1254003CF19B /* libicucore.dylib in Frameworks */,
7B9FC5BB28A5233B007570E7 /* libWebKitPlatform.a in Frameworks */,
@@ -20356,7 +20738,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */,
37694525184FC6B600CDE21F /* Security.framework in Frameworks */,
37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */,
-@@ -11262,6 +11305,7 @@
+@@ -11296,6 +11339,7 @@
99788ACA1F421DCA00C08000 /* _WKAutomationSessionConfiguration.mm */,
990D28A81C6404B000986977 /* _WKAutomationSessionDelegate.h */,
990D28AF1C65203900986977 /* _WKAutomationSessionInternal.h */,
@@ -20364,7 +20746,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
5C4609E222430E4C009943C2 /* _WKContentRuleListAction.h */,
5C4609E322430E4D009943C2 /* _WKContentRuleListAction.mm */,
5C4609E422430E4D009943C2 /* _WKContentRuleListActionInternal.h */,
-@@ -12572,6 +12616,7 @@
+@@ -12603,6 +12647,7 @@
E34B110C27C46BC6006D2F2E /* libWebCoreTestShim.dylib */,
E34B110F27C46D09006D2F2E /* libWebCoreTestSupport.dylib */,
DDE992F4278D06D900F60D26 /* libWebKitAdditions.a */,
@@ -20372,7 +20754,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
57A9FF15252C6AEF006A2040 /* libWTF.a */,
5750F32A2032D4E500389347 /* LocalAuthentication.framework */,
570DAAB0230273D200E8FC04 /* NearField.framework */,
-@@ -13142,6 +13187,12 @@
+@@ -13173,6 +13218,12 @@
children = (
9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */,
9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */,
@@ -20385,7 +20767,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
);
path = Agents;
sourceTree = "<group>";
-@@ -13150,6 +13201,7 @@
+@@ -13181,6 +13232,7 @@
isa = PBXGroup;
children = (
A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorUIProxyMac.mm */,
@@ -20393,7 +20775,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
1CA8B935127C774E00576C2B /* WebInspectorUIProxyMac.mm */,
99A7ACE326012919006D57FD /* WKInspectorResourceURLSchemeHandler.h */,
99A7ACE42601291A006D57FD /* WKInspectorResourceURLSchemeHandler.mm */,
-@@ -13866,6 +13918,7 @@
+@@ -13898,6 +13950,7 @@
E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */,
46A2B6061E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.cpp */,
46A2B6071E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.h */,
@@ -20401,7 +20783,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
5C6D69352AC3935D0099BDAF /* BrowsingContextGroup.cpp */,
5C6D69362AC3935D0099BDAF /* BrowsingContextGroup.h */,
07297F9C1C1711EA003F0735 /* DeviceIdHashSaltStorage.cpp */,
-@@ -13889,6 +13942,8 @@
+@@ -13921,6 +13974,8 @@
BC06F43912DBCCFB002D78DE /* GeolocationPermissionRequestProxy.cpp */,
BC06F43812DBCCFB002D78DE /* GeolocationPermissionRequestProxy.h */,
2DD5A72A1EBF09A7009BA597 /* HiddenPageThrottlingAutoIncreasesCounter.h */,
@@ -20410,7 +20792,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
5CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */,
5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */,
31607F3819627002009B87DA /* LegacySessionStateCoding.h */,
-@@ -13922,6 +13977,7 @@
+@@ -13954,6 +14009,7 @@
1A0C227D2451130A00ED614D /* QuickLookThumbnailingSoftLink.mm */,
1AEE57232409F142002005D6 /* QuickLookThumbnailLoader.h */,
1AEE57242409F142002005D6 /* QuickLookThumbnailLoader.mm */,
@@ -20418,7 +20800,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
5CCB54DC2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.cpp */,
5CCB54DB2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.h */,
5C907E9A294D507100B3402D /* RemotePageProxy.cpp */,
-@@ -14024,6 +14080,8 @@
+@@ -14056,6 +14112,8 @@
BC7B6204129A0A6700D174A4 /* WebPageGroup.h */,
2D9EA3101A96D9EB002D2807 /* WebPageInjectedBundleClient.cpp */,
2D9EA30E1A96CBFF002D2807 /* WebPageInjectedBundleClient.h */,
@@ -20427,7 +20809,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
BC111B0B112F5E4F00337BAB /* WebPageProxy.cpp */,
BC032DCB10F4389F0058C15A /* WebPageProxy.h */,
BCBD38FA125BAB9A00D2C29F /* WebPageProxy.messages.in */,
-@@ -14190,6 +14248,7 @@
+@@ -14224,6 +14282,7 @@
BC646C1911DD399F006455B0 /* WKBackForwardListItemRef.h */,
BC646C1611DD399F006455B0 /* WKBackForwardListRef.cpp */,
BC646C1711DD399F006455B0 /* WKBackForwardListRef.h */,
@@ -20435,17 +20817,17 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
BCB9E24A1120E15C00A137E0 /* WKContext.cpp */,
BCB9E2491120E15C00A137E0 /* WKContext.h */,
1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */,
-@@ -14771,6 +14830,9 @@
- 7AFA6F682A9F57C50055322A /* DisplayLinkMac.mm */,
+@@ -14805,6 +14864,9 @@
+ 7AFA6F682A9F57C50055322A /* DisplayLinkMac.cpp */,
31ABA79C215AF9E000C90E31 /* HighPerformanceGPUManager.h */,
31ABA79D215AF9E000C90E31 /* HighPerformanceGPUManager.mm */,
+ D71A94302370E025002C4D9E /* InspectorPlaywrightAgentClientMac.h */,
+ D7EB04E62372A73B00F744CE /* InspectorPlaywrightAgentClientMac.mm */,
+ D79902AF236E9404005D6F7E /* InspectorTargetProxyMac.mm */,
- 7139CA3F2BF670BC00CA613A /* LegacyDisplayLinkMac.cpp */,
1AFDE65B1954E8D500C48FFA /* LegacySessionStateCoding.cpp */,
0FCB4E5818BBE3D9000FCFC9 /* PageClientImplMac.h */,
-@@ -14795,6 +14857,8 @@
+ 0FCB4E5918BBE3D9000FCFC9 /* PageClientImplMac.mm */,
+@@ -14828,6 +14890,8 @@
E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */,
E55CD20124D09F1F0042DB9C /* WebDateTimePickerMac.h */,
E55CD20224D09F1F0042DB9C /* WebDateTimePickerMac.mm */,
@@ -20454,7 +20836,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */,
BC5750951268F3C6006F0F12 /* WebPopupMenuProxyMac.h */,
BC5750961268F3C6006F0F12 /* WebPopupMenuProxyMac.mm */,
-@@ -15797,6 +15861,7 @@
+@@ -15857,6 +15921,7 @@
99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */,
990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */,
990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */,
@@ -20462,7 +20844,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
5C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */,
5C4609E8224317BB009943C2 /* _WKContentRuleListActionInternal.h in Headers */,
1A5704F81BE01FF400874AF1 /* _WKContextMenuElementInfo.h in Headers */,
-@@ -16108,6 +16173,7 @@
+@@ -16168,6 +16233,7 @@
E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */,
4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */,
1A5705111BE410E600874AF1 /* BlockSPI.h in Headers */,
@@ -20470,7 +20852,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
A7E69BCC2B2117A100D43D3F /* BufferAndBackendInfo.h in Headers */,
BC3065FA1259344E00E71278 /* CacheModel.h in Headers */,
935BF7FC2936BF1A00B41326 /* CacheStorageCache.h in Headers */,
-@@ -16288,7 +16354,11 @@
+@@ -16348,7 +16414,11 @@
BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */,
CE550E152283752200D28791 /* InsertTextOptions.h in Headers */,
9197940523DBC4BB00257892 /* InspectorBrowserAgent.h in Headers */,
@@ -20482,7 +20864,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
A5E391FD2183C1F800C8FB31 /* InspectorTargetProxy.h in Headers */,
C5BCE5DF1C50766A00CDE3FA /* InteractionInformationAtPosition.h in Headers */,
2D4D2C811DF60BF3002EB10C /* InteractionInformationRequest.h in Headers */,
-@@ -16547,6 +16617,7 @@
+@@ -16610,6 +16680,7 @@
CDAC20C923FC2F750021DEE3 /* RemoteCDMInstanceSessionIdentifier.h in Headers */,
F451C0FE2703B263002BA03B /* RemoteDisplayListRecorderProxy.h in Headers */,
A78A5FE42B0EB39E005036D3 /* RemoteImageBufferSetIdentifier.h in Headers */,
@@ -20490,7 +20872,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */,
2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */,
1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */,
-@@ -16601,6 +16672,7 @@
+@@ -16664,6 +16735,7 @@
E1E552C516AE065F004ED653 /* SandboxInitializationParameters.h in Headers */,
E36FF00327F36FBD004BE21A /* SandboxStateVariables.h in Headers */,
7BAB111025DD02B3008FC479 /* ScopedActiveMessageReceiveQueue.h in Headers */,
@@ -20498,7 +20880,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
463BB93A2B9D08D80098C5C3 /* ScriptMessageHandlerIdentifier.h in Headers */,
E4D54D0421F1D72D007E3C36 /* ScrollingTreeFrameScrollingNodeRemoteIOS.h in Headers */,
0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */,
-@@ -16947,6 +17019,8 @@
+@@ -17011,6 +17083,8 @@
939EF87029D112EE00F23AEE /* WebPageInlines.h in Headers */,
9197940823DBC4CB00257892 /* WebPageInspectorAgentBase.h in Headers */,
A513F5402154A5D700662841 /* WebPageInspectorController.h in Headers */,
@@ -20507,7 +20889,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
A543E30C215C8A8D00279CD9 /* WebPageInspectorTarget.h in Headers */,
A543E30D215C8A9000279CD9 /* WebPageInspectorTargetController.h in Headers */,
A543E307215AD13700279CD9 /* WebPageInspectorTargetFrontendChannel.h in Headers */,
-@@ -19338,6 +19412,8 @@
+@@ -19422,6 +19496,8 @@
522F792928D50EBB0069B45B /* HidService.mm in Sources */,
2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */,
2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */,
@@ -20516,7 +20898,7 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
1CC94E532AC92F190045F269 /* JSWebExtensionAPIAction.mm in Sources */,
1C2B4D4B2A819D0D00C528A1 /* JSWebExtensionAPIAlarms.mm in Sources */,
1C8ECFEA2AFC7DCB007BAA62 /* JSWebExtensionAPICommands.mm in Sources */,
-@@ -19777,6 +19853,8 @@
+@@ -19864,6 +19940,8 @@
E3816B3D27E2463A005EAFC0 /* WebMockContentFilterManager.cpp in Sources */,
31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,
2DF6FE52212E110900469030 /* WebPage.cpp in Sources */,
@@ -20524,9 +20906,9 @@ index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce
+ D79902B3236E9404005D6F7E /* WebPageInspectorInputAgentMac.mm in Sources */,
C0CE72A01247E71D00BC0EC4 /* WebPageMessageReceiver.cpp in Sources */,
BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */,
- 7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */,
+ C0CE72A01B47E71D00BC0EC4 /* WebPageTestingMessageReceiver.cpp in Sources */,
diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
-index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748b64ce144 100644
+index a3444c240790680684a09a929f5ba07d6e68e793..6167b8d1fb42bef261aed6bb3e9581447decb1a9 100644
--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
@@ -233,6 +233,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
@@ -20541,7 +20923,30 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
#if ENABLE(PDFJS)
if (tryLoadingUsingPDFJSHandler(resourceLoader, trackingParameters))
return;
-@@ -366,7 +371,8 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadPara
+@@ -242,12 +247,16 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
+ return;
+
+ if (InspectorInstrumentationWebKit::shouldInterceptRequest(resourceLoader)) {
+- InspectorInstrumentationWebKit::interceptRequest(resourceLoader, [this, protectedResourceLoader = Ref { resourceLoader }, trackingParameters, shouldClearReferrerOnHTTPSToHTTPRedirect, resource](const ResourceRequest& request) {
+- auto& resourceLoader = protectedResourceLoader.get();
+- WEBLOADERSTRATEGY_RELEASE_LOG("scheduleLoad: intercepted URL will be scheduled with the NetworkProcess");
+- scheduleLoadFromNetworkProcess(resourceLoader, request, trackingParameters, shouldClearReferrerOnHTTPSToHTTPRedirect, maximumBufferingTime(resource));
+- });
+- return;
++ bool isMainFrameNavigation = resourceLoader.frame() && resourceLoader.frame()->isMainFrame() && resourceLoader.options().mode == FetchOptions::Mode::Navigate;
++ // Do not intercept navigation request which could already have been intercepted and resumed.
++ if (!(isMainFrameNavigation && m_existingNetworkResourceLoadIdentifierToResume)) {
++ InspectorInstrumentationWebKit::interceptRequest(resourceLoader, [this, protectedResourceLoader = Ref { resourceLoader }, trackingParameters, shouldClearReferrerOnHTTPSToHTTPRedirect, resource](const ResourceRequest& request) {
++ auto& resourceLoader = protectedResourceLoader.get();
++ WEBLOADERSTRATEGY_RELEASE_LOG("scheduleLoad: intercepted URL will be scheduled with the NetworkProcess");
++ scheduleLoadFromNetworkProcess(resourceLoader, request, trackingParameters, shouldClearReferrerOnHTTPSToHTTPRedirect, maximumBufferingTime(resource));
++ });
++ return;
++ }
+ }
+
+ WEBLOADERSTRATEGY_RELEASE_LOG("scheduleLoad: URL will be scheduled with the NetworkProcess");
+@@ -366,7 +375,8 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadPara
parameters.linkPreconnectEarlyHintsEnabled = mainFrame->settings().linkPreconnectEarlyHintsEnabled();
}
@@ -20551,7 +20956,7 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
{
auto identifier = resourceLoader.identifier();
ASSERT(identifier);
-@@ -382,7 +388,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -382,7 +392,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
RunLoop::main().dispatch([resourceLoader = Ref { resourceLoader }, error = blockedError(request)] {
resourceLoader->didFail(error);
});
@@ -20560,7 +20965,7 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
}
}
-@@ -392,7 +398,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -392,7 +402,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);
@@ -20568,7 +20973,7 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
loadParameters.identifier = identifier;
loadParameters.webPageProxyID = trackingParameters.webPageProxyID;
loadParameters.webPageID = trackingParameters.pageID;
-@@ -482,14 +487,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -482,14 +491,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
if (loadParameters.options.mode != FetchOptions::Mode::Navigate) {
ASSERT(loadParameters.sourceOrigin);
@@ -20586,7 +20991,7 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
loadParameters.isMainFrameNavigation = isMainFrameNavigation;
if (loadParameters.isMainFrameNavigation && document)
-@@ -529,6 +531,17 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -529,6 +535,17 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
}
ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials);
@@ -20604,7 +21009,7 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
std::optional<NetworkResourceLoadIdentifier> existingNetworkResourceLoadIdentifierToResume;
if (loadParameters.isMainFrameNavigation)
-@@ -544,7 +557,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -544,7 +561,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
}
auto loader = WebResourceLoader::create(resourceLoader, trackingParameters);
@@ -20613,7 +21018,7 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
}
void WebLoaderStrategy::scheduleInternallyFailedLoad(WebCore::ResourceLoader& resourceLoader)
-@@ -954,7 +967,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier
+@@ -954,7 +971,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier
bool WebLoaderStrategy::isOnLine() const
{
@@ -20622,7 +21027,7 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
}
void WebLoaderStrategy::addOnlineStateChangeListener(Function<void(bool)>&& listener)
-@@ -981,6 +994,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet
+@@ -981,6 +998,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet
void WebLoaderStrategy::setOnLineState(bool isOnLine)
{
@@ -20634,7 +21039,7 @@ index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748
if (m_isOnLine == isOnLine)
return;
-@@ -989,6 +1007,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)
+@@ -989,6 +1011,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)
listener(isOnLine);
}
@@ -20678,10 +21083,10 @@ index 3ef86cc236b8acee2fbe5d0b9c3fd755fcc9f06f..75951fc0fc5e4ef566582c0a49482793
} // namespace WebKit
diff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
-index 1707b38220552075313bac33a735756abad53ced..f7bd60794a52bb64c37a51ac34af379dfab0e976 100644
+index 17a0fe5d7a30883febe90e9984d36d8ea222872a..c3804fd499bdd3663e32318012f507af6b434aa7 100644
--- a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
+++ b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
-@@ -189,9 +189,6 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR
+@@ -190,9 +190,6 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR
}
m_coreLoader->didReceiveResponse(inspectorResponse, [this, protectedThis = WTFMove(protectedThis), interceptedRequestIdentifier, policyDecisionCompletionHandler = WTFMove(policyDecisionCompletionHandler), overrideData = WTFMove(overrideData)]() mutable {
@@ -20691,7 +21096,7 @@ index 1707b38220552075313bac33a735756abad53ced..f7bd60794a52bb64c37a51ac34af379d
if (!m_coreLoader || !m_coreLoader->identifier()) {
m_interceptController.continueResponse(interceptedRequestIdentifier);
return;
-@@ -209,6 +206,8 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR
+@@ -210,6 +207,8 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR
}
});
});
@@ -20701,7 +21106,7 @@ index 1707b38220552075313bac33a735756abad53ced..f7bd60794a52bb64c37a51ac34af379d
}
diff --git a/Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp b/Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp
-index ee9c3c4f48c328daaa015e2122235e51349bd999..5b3a4d3e742147195e0ff9e88176759df1b799db 100644
+index e314c2987e348a0abee8b655caff3a1c3b3c4564..882746d581bd8db6f2fad5944f09ee9fe9e0e55b 100644
--- a/Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp
+++ b/Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp
@@ -85,7 +85,7 @@ void NotificationPermissionRequestManager::startRequest(const SecurityOriginData
@@ -20714,10 +21119,10 @@ index ee9c3c4f48c328daaa015e2122235e51349bd999..5b3a4d3e742147195e0ff9e88176759d
auto permissionHandlers = m_requestsPerOrigin.take(securityOrigin);
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-index d07821c8847c094bbce9e742f7dd4048b9d4d319..ab301c87d8ec84580e3e502427037440092aece4 100644
+index e22824697734a6fc65de8bdcf37afee5d5b1d508..1385b96bef6ab891d359e022974c77fc734ff18d 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-@@ -471,6 +471,8 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev
+@@ -472,6 +472,8 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev
{
// Notify the bundle client.
auto page = protectedPage();
@@ -20750,13 +21155,13 @@ index 2eb0886f13ed035a53b8eaa60605de4dfe53fbe3..c3a216415ab588cde1f1e524e0a232ef
{
}
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
-index 2c6c166b8f287a66e914722fe46e5f6400a4c1e2..980a5a9fb54c355d1766e8b7d4f944bb6792bb53 100644
+index 1fbb60e23b8d338f05ff0daa284724afafe29282..a15410b5b492254634e1aa300af405ba12ae8e80 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
-@@ -1586,14 +1586,6 @@ void WebLocalFrameLoaderClient::transitionToCommittedForNewPage(InitializingIfra
+@@ -1588,14 +1588,6 @@ void WebLocalFrameLoaderClient::transitionToCommittedForNewPage(InitializingIfra
if (initializingIframe == InitializingIframe::No)
- webPage->clearEditorStateAfterPageTransition();
+ webPage->scheduleFullEditorStateUpdate();
-
-#if USE(COORDINATED_GRAPHICS)
- if (shouldUseFixedLayout) {
@@ -20962,12 +21367,12 @@ index c0dd11d1a720907b1e2d863302a483eea1d39765..a4ad1b5acc545d98aea99c58fc5a5ca3
void DrawingAreaCoordinatedGraphics::scheduleDisplay()
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
-index 9792a2310ecae603e83eefd602beab20c47d696c..2744b289afd8341f05d72a6c205d347fbdff4dd1 100644
+index d81997b98996b258f43ce13496ec06c6dc06d467..16e191b5ed4cf0e3b223fb9547699a05ede2f6d6 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
-@@ -193,8 +193,16 @@ void LayerTreeHost::setViewOverlayRootLayer(GraphicsLayer* viewOverlayRootLayer)
- void LayerTreeHost::scrollNonCompositedContents(const IntRect& rect)
- {
+@@ -204,8 +204,16 @@ void LayerTreeHost::scrollNonCompositedContents(const IntRect& rect)
+ m_scrolledSinceLastFrame = true;
+
auto* frameView = m_webPage.localMainFrameView();
+
+// Playwright begin
@@ -20982,7 +21387,7 @@ index 9792a2310ecae603e83eefd602beab20c47d696c..2744b289afd8341f05d72a6c205d347f
m_viewportController.didScroll(rect.location());
didChangeViewport();
-@@ -313,6 +321,10 @@ void LayerTreeHost::didChangeViewport()
+@@ -325,6 +333,10 @@ void LayerTreeHost::didChangeViewport()
if (!view->useFixedLayout())
view->notifyScrollPositionChanged(m_lastScrollPosition);
@@ -20994,10 +21399,10 @@ index 9792a2310ecae603e83eefd602beab20c47d696c..2744b289afd8341f05d72a6c205d347f
if (m_lastPageScaleFactor != pageScale) {
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
-index d2630055562da015318b5863de64693161bb1b58..a537e2d6db6a49698c5646ca7f9d2c20c6872692 100644
+index 468d6f8c574ea3298e502ce5776b624e295d863d..7039d3b26db1586e8c2a693b8cf5daa36088dd33 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
-@@ -115,6 +115,13 @@ public:
+@@ -116,6 +116,13 @@ public:
#if PLATFORM(WPE) && USE(GBM) && ENABLE(WPE_PLATFORM)
void preferredBufferFormatsDidChange();
#endif
@@ -21090,10 +21495,18 @@ index b6e5283f51db82b60091320df44ef0bbf20c33c6..0d82fbb98b93e760cecf5fa7a41327d0
WebCookieJar();
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f079f3489 100644
+index 8ed6c5c3f4bb342435f1ac6bb40020ba0fdd9364..2bbf3db029ab95cfda418fa39f2654db966dc2af 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-@@ -1047,6 +1047,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
+@@ -233,6 +233,7 @@
+ #include <WebCore/ImageAnalysisQueue.h>
+ #include <WebCore/ImageOverlay.h>
+ #include <WebCore/InspectorController.h>
++#include <WebCore/InspectorInstrumentationWebKit.h>
+ #include <WebCore/JSDOMExceptionHandling.h>
+ #include <WebCore/KeyboardEvent.h>
+ #include <WebCore/LegacySchemeRegistry.h>
+@@ -1053,6 +1054,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
#endif
#endif // HAVE(SANDBOX_STATE_FLAGS)
@@ -21103,7 +21516,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
updateThrottleState();
#if ENABLE(ACCESSIBILITY_ANIMATION_CONTROL)
updateImageAnimationEnabled();
-@@ -2027,6 +2030,22 @@ void WebPage::loadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, st
+@@ -2018,6 +2022,22 @@ void WebPage::loadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, st
frame->loadDidCommitInAnotherProcess(layerHostingContextIdentifier);
}
@@ -21126,7 +21539,17 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
void WebPage::loadRequest(LoadParameters&& loadParameters)
{
WEBPAGE_RELEASE_LOG(Loading, "loadRequest: navigationID=%" PRIu64 ", shouldTreatAsContinuingLoad=%u, lastNavigationWasAppInitiated=%d, existingNetworkResourceLoadIdentifierToResume=%" PRIu64, loadParameters.navigationID, static_cast<unsigned>(loadParameters.shouldTreatAsContinuingLoad), loadParameters.request.isAppInitiated(), valueOrDefault(loadParameters.existingNetworkResourceLoadIdentifierToResume).toUInt64());
-@@ -2312,17 +2331,14 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
+@@ -2200,7 +2220,9 @@ void WebPage::stopLoading()
+ void WebPage::stopLoadingDueToProcessSwap()
+ {
+ SetForScope isStoppingLoadingDueToProcessSwap(m_isStoppingLoadingDueToProcessSwap, true);
++ InspectorInstrumentationWebKit::setStoppingLoadingDueToProcessSwap(m_page.get(), true);
+ stopLoading();
++ InspectorInstrumentationWebKit::setStoppingLoadingDueToProcessSwap(m_page.get(), false);
+ }
+
+ bool WebPage::defersLoading() const
+@@ -2301,17 +2323,14 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
view->resize(viewSize);
m_drawingArea->setNeedsDisplay();
@@ -21144,7 +21567,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArguments)
{
RefPtr localMainFrame = dynamicDowncast<LocalFrame>(m_page->mainFrame());
-@@ -2347,20 +2363,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -2336,20 +2355,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
@@ -21172,7 +21595,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
#if USE(COORDINATED_GRAPHICS)
m_drawingArea->didChangeViewportAttributes(WTFMove(attr));
-@@ -2368,7 +2382,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -2357,7 +2374,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
send(Messages::WebPageProxy::DidChangeViewportProperties(attr));
#endif
}
@@ -21180,7 +21603,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
void WebPage::scrollMainFrameIfNotAtMaxScrollPosition(const IntSize& scrollOffset)
{
-@@ -2670,6 +2683,7 @@ void WebPage::scaleView(double scale)
+@@ -2659,6 +2675,7 @@ void WebPage::scaleView(double scale)
}
m_page->setViewScaleFactor(scale);
@@ -21188,7 +21611,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
scalePage(pageScale, scrollPositionAtNewScale);
}
-@@ -2849,18 +2863,14 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
+@@ -2838,18 +2855,14 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
viewportConfigurationChanged();
#endif
@@ -21208,7 +21631,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
}
#if !PLATFORM(IOS_FAMILY)
-@@ -3578,6 +3588,13 @@ void WebPage::setLastKnownMousePosition(WebCore::FrameIdentifier frameID, IntPoi
+@@ -3571,6 +3584,13 @@ void WebPage::setLastKnownMousePosition(WebCore::FrameIdentifier frameID, IntPoi
frame->coreLocalFrame()->eventHandler().setLastKnownMousePosition(eventPoint, globalPoint);
}
@@ -21221,8 +21644,8 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
+
void WebPage::flushDeferredDidReceiveMouseEvent()
{
- if (auto info = std::exchange(m_deferredMouseEventCompletionHandler, std::nullopt))
-@@ -3862,6 +3879,97 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent, CompletionHandler<void
+ if (auto info = std::exchange(m_deferredDidReceiveMouseEvent, std::nullopt))
+@@ -3855,6 +3875,97 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent, CompletionHandler<void
completionHandler(touchEvent.type(), handled);
}
@@ -21320,7 +21743,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
#endif
void WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint)
-@@ -3950,6 +4058,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
+@@ -3943,6 +4054,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
m_inspectorTargetController->sendMessageToTargetBackend(targetId, message);
}
@@ -21332,7 +21755,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
void WebPage::insertNewlineInQuotedContent()
{
RefPtr frame = m_page->checkedFocusController()->focusedOrMainFrame();
-@@ -4185,6 +4298,7 @@ void WebPage::didCompletePageTransition()
+@@ -4178,6 +4294,7 @@ void WebPage::didCompletePageTransition()
void WebPage::show()
{
send(Messages::WebPageProxy::ShowPage());
@@ -21340,7 +21763,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
}
void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension)
-@@ -5296,7 +5410,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
+@@ -5378,7 +5495,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
#if ENABLE(DRAG_SUPPORT)
@@ -21349,7 +21772,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
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)
-@@ -7646,6 +7760,10 @@ void WebPage::didCommitLoad(WebFrame* frame)
+@@ -7748,6 +7865,10 @@ void WebPage::didCommitLoad(WebFrame* frame)
#endif
flushDeferredDidReceiveMouseEvent();
@@ -21360,7 +21783,7 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
}
void WebPage::didFinishDocumentLoad(WebFrame& frame)
-@@ -7915,6 +8033,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(LocalFrame& frame, const Resou
+@@ -8028,6 +8149,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(LocalFrame& frame, const Resou
WebsitePoliciesData::applyToDocumentLoader(WTFMove(*m_pendingWebsitePolicies), documentLoader);
m_pendingWebsitePolicies = std::nullopt;
}
@@ -21371,18 +21794,18 @@ index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f
return documentLoader;
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h
-index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57c664d616 100644
+index dade474046440584b2579c3c0e72d7daf9aafc68..35be816bd0ba41b6f6c31e4dec1906fbfe0533ee 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h
-@@ -70,6 +70,7 @@
- #include <WebCore/MediaControlsContextMenuItem.h>
+@@ -71,6 +71,7 @@
#include <WebCore/MediaKeySystemRequest.h>
#include <WebCore/NowPlayingMetadataObserver.h>
+ #include <WebCore/OwnerPermissionsPolicyData.h>
+#include <WebCore/Page.h>
#include <WebCore/PageIdentifier.h>
#include <WebCore/PageOverlay.h>
#include <WebCore/PlatformLayerIdentifier.h>
-@@ -1155,11 +1156,11 @@ public:
+@@ -1173,11 +1174,11 @@ public:
void clearSelection();
void restoreSelectionInFocusedEditableElement();
@@ -21396,7 +21819,7 @@ index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57
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(WebCore::DragData&&, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&, CompletionHandler<void(bool)>&&);
#endif
-@@ -1174,6 +1175,9 @@ public:
+@@ -1192,6 +1193,9 @@ public:
void didStartDrag();
void dragCancelled();
OptionSet<WebCore::DragSourceAction> allowedDragSourceActions() const { return m_allowedDragSourceActions; }
@@ -21406,7 +21829,7 @@ index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57
#endif
void beginPrinting(WebCore::FrameIdentifier, const PrintInfo&);
-@@ -1249,8 +1253,11 @@ public:
+@@ -1267,8 +1271,11 @@ public:
void gestureEvent(WebCore::FrameIdentifier, const WebGestureEvent&, CompletionHandler<void(std::optional<WebEventType>, bool, std::optional<WebCore::RemoteUserInputEventData>)>&&);
#endif
@@ -21419,7 +21842,7 @@ index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57
void dynamicViewportSizeUpdate(const DynamicViewportSizeUpdate&);
bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
void willStartUserTriggeredZooming();
-@@ -1397,6 +1404,7 @@ public:
+@@ -1415,6 +1422,7 @@ public:
void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType);
void disconnectInspector(const String& targetId);
void sendMessageToTargetBackend(const String& targetId, const String& message);
@@ -21427,7 +21850,7 @@ index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57
void insertNewlineInQuotedContent();
-@@ -1883,6 +1891,7 @@ private:
+@@ -1921,6 +1929,7 @@ private:
void createProvisionalFrame(ProvisionalFrameCreationParameters&&, WebCore::FrameIdentifier);
void destroyProvisionalFrame(WebCore::FrameIdentifier);
void loadDidCommitInAnotherProcess(WebCore::FrameIdentifier, std::optional<WebCore::LayerHostingContextIdentifier>);
@@ -21435,7 +21858,7 @@ index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57
void loadRequest(LoadParameters&&);
[[noreturn]] void loadRequestWaitingForProcessLaunch(LoadParameters&&, URL&&, WebPageProxyIdentifier, bool);
void loadData(LoadParameters&&);
-@@ -1924,6 +1933,7 @@ private:
+@@ -1962,6 +1971,7 @@ private:
void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);
#elif ENABLE(TOUCH_EVENTS)
void touchEvent(const WebTouchEvent&, CompletionHandler<void(std::optional<WebEventType>, bool)>&&);
@@ -21443,7 +21866,7 @@ index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57
#endif
void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);
-@@ -2070,9 +2080,7 @@ private:
+@@ -2108,9 +2118,7 @@ private:
void addLayerForFindOverlay(CompletionHandler<void(WebCore::PlatformLayerIdentifier)>&&);
void removeLayerForFindOverlay(CompletionHandler<void()>&&);
@@ -21453,7 +21876,7 @@ index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57
void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
void setTextForActivePopupMenu(int32_t index);
-@@ -2676,6 +2684,7 @@ private:
+@@ -2713,6 +2721,7 @@ private:
UserActivity m_userActivity;
uint64_t m_pendingNavigationID { 0 };
@@ -21462,12 +21885,12 @@ index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57
bool m_mainFrameProgressCompleted { false };
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-index e1925f00bdbcabf1d9509a4dac169490000ef48d..75c54167747fc391179449ba22dda0ddb1f9b0a8 100644
+index 148cbc222395ba878b51a233331e45e0e2d1604f..0bb93d61e68587cbd27e24fbef0eb875783ff8ff 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-@@ -55,10 +55,13 @@ messages -> WebPage LegacyReceiver {
- ClearNotificationPermissionState()
- #endif
+@@ -51,10 +51,13 @@ messages -> WebPage LegacyReceiver {
+ MouseEvent(WebCore::FrameIdentifier frameID, WebKit::WebMouseEvent event, std::optional<Vector<WebKit::SandboxExtensionHandle>> sandboxExtensions)
+ SetLastKnownMousePosition(WebCore::FrameIdentifier frameID, WebCore::IntPoint eventPoint, WebCore::IntPoint globalPoint);
+#if ENABLE(ORIENTATION_EVENTS)
+ SetDeviceOrientation(WebCore::IntDegrees deviceOrientation)
@@ -21480,7 +21903,7 @@ index e1925f00bdbcabf1d9509a4dac169490000ef48d..75c54167747fc391179449ba22dda0dd
SetOverrideViewportArguments(std::optional<WebCore::ViewportArguments> arguments)
DynamicViewportSizeUpdate(struct WebKit::DynamicViewportSizeUpdate target)
-@@ -148,6 +151,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -144,6 +147,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
ConnectInspector(String targetId, Inspector::FrontendChannel::ConnectionType connectionType)
DisconnectInspector(String targetId)
SendMessageToTargetBackend(String targetId, String message)
@@ -21488,7 +21911,7 @@ index e1925f00bdbcabf1d9509a4dac169490000ef48d..75c54167747fc391179449ba22dda0dd
#if ENABLE(REMOTE_INSPECTOR)
SetIndicating(bool indicating);
-@@ -158,6 +162,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -154,6 +158,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
#endif
#if !ENABLE(IOS_TOUCH_EVENTS) && ENABLE(TOUCH_EVENTS)
TouchEvent(WebKit::WebTouchEvent event) -> (std::optional<WebKit::WebEventType> eventType, bool handled)
@@ -21496,7 +21919,7 @@ index e1925f00bdbcabf1d9509a4dac169490000ef48d..75c54167747fc391179449ba22dda0dd
#endif
CancelPointer(WebCore::PointerID pointerId, WebCore::IntPoint documentPoint)
-@@ -191,6 +196,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -187,6 +192,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
CreateProvisionalFrame(struct WebKit::ProvisionalFrameCreationParameters creationParameters, WebCore::FrameIdentifier frameID)
DestroyProvisionalFrame(WebCore::FrameIdentifier frameID);
LoadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, std::optional<WebCore::LayerHostingContextIdentifier> layerHostingContextIdentifier)
@@ -21504,7 +21927,7 @@ index e1925f00bdbcabf1d9509a4dac169490000ef48d..75c54167747fc391179449ba22dda0dd
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)
-@@ -355,10 +361,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -351,10 +357,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
RemoveLayerForFindOverlay() -> ()
# Drag and drop.
@@ -21517,7 +21940,7 @@ index e1925f00bdbcabf1d9509a4dac169490000ef48d..75c54167747fc391179449ba22dda0dd
PerformDragControllerAction(std::optional<WebCore::FrameIdentifier> frameID, enum:uint8_t WebKit::DragControllerAction action, WebCore::DragData dragData) -> (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(WebCore::DragData dragData, WebKit::SandboxExtensionHandle sandboxExtensionHandle, Vector<WebKit::SandboxExtensionHandle> sandboxExtensionsForUpload) -> (bool handled)
#endif
-@@ -368,6 +374,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -364,6 +370,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
DragCancelled()
#endif
@@ -21529,7 +21952,7 @@ index e1925f00bdbcabf1d9509a4dac169490000ef48d..75c54167747fc391179449ba22dda0dd
RequestDragStart(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragSourceAction> allowedActionsMask)
RequestAdditionalItemsForDragSession(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragSourceAction> allowedActionsMask)
diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
-index a95a86568072d78053ccd8cf758aad9ba3f1bcc4..661923b01c15d9b3ec4b351d657c2e650642762d 100644
+index 678294ec1a7b6a05ed91730a723210a66af2f918..aafa6cfaff690bcbf6a69870576844f8894b8613 100644
--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
@@ -802,21 +802,37 @@ String WebPage::platformUserAgent(const URL&) const
@@ -21621,7 +22044,7 @@ index f17f5d719d892309ed9c7093384945866b5117b9..1dba47bbf0dbd0362548423a74b38034
}
diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp
-index fb283adec78aec2bc00f4db13f243bb814b84d5a..5e13f718081dc6da8c9105bcde23408c21bbed14 100644
+index df3c9d0ebbc3665c3ec4fcac259bee402ef19f45..9ff1d77c609c6b483eb3b9c620ef5742f5477069 100644
--- a/Source/WebKit/WebProcess/WebProcess.cpp
+++ b/Source/WebKit/WebProcess/WebProcess.cpp
@@ -88,6 +88,7 @@
@@ -21632,7 +22055,22 @@ index fb283adec78aec2bc00f4db13f243bb814b84d5a..5e13f718081dc6da8c9105bcde23408c
#include <JavaScriptCore/JSLock.h>
#include <JavaScriptCore/MemoryStatistics.h>
#include <JavaScriptCore/WasmFaultSignalHandler.h>
-@@ -371,6 +372,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter
+@@ -364,6 +365,14 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter
+ {
+ JSC::Options::AllowUnfinalizedAccessScope scope;
+ JSC::Options::allowNonSPTagging() = false;
++ // Playwright begin
++ // SharedBufferArray is enabled only on Mac via XPC sercvice "enable-shared-array-buffer" option.
++ // For other platforms, enable it here.
++#if !PLATFORM(COCOA)
++ if (parameters.shouldEnableSharedArrayBuffer)
++ JSC::Options::useSharedArrayBuffer() = true;
++#endif
++ // Playwright end
+ JSC::Options::notifyOptionsChanged();
+ }
+
+@@ -371,6 +380,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter
platformInitializeProcess(parameters);
updateCPULimit();
@@ -21657,10 +22095,10 @@ index 8987c3964a9308f2454759de7f8972215a3ae416..bcac0afeb94ed8123d1f9fb0b932c849
SetProcessDPIAware();
return true;
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-index 7c01c6e5509f448a3ebdf10376ef2974403e37c0..7a9c9e3a197dc723e7a94dce5ddbddf05ba5111b 100644
+index d694170887445e2eed73340666bc4847aef4f9a6..6ced22d0953a39582285201e0946d68f954644ad 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-@@ -4214,7 +4214,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
+@@ -4223,7 +4223,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END
_private->handlingMouseDownEvent = NO;
}
@@ -21723,7 +22161,7 @@ index 0000000000000000000000000000000000000000..dd6a53e2d57318489b7e49dd7373706d
+ LIBVPX_LIBRARIES
+)
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
-index fa9c8766ea53612b9651e03375eb8b6bf4f15e76..621fb9f05c620f486feed36c4f23f66188a7ee88 100644
+index 7528273e7832716ef8cb900f89728d4003130d92..32826feac62d3d4132df79febd01b8a8b9ce16ff 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -11,8 +11,13 @@ if (${CMAKE_VERSION} VERSION_LESS "3.20" AND NOT ${CMAKE_GENERATOR} STREQUAL "Ni
@@ -21780,14 +22218,14 @@ index fa9c8766ea53612b9651e03375eb8b6bf4f15e76..621fb9f05c620f486feed36c4f23f661
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON)
@@ -131,7 +140,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION P
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE PRIVATE ON)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS_IN_WORKERS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS_IN_WORKERS PRIVATE ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_THUNDER PRIVATE ${ENABLE_DEVELOPER_MODE})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_THUNDER PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PERIODIC_MEMORY_MONITOR PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_POINTER_LOCK PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHAREABLE_RESOURCE PRIVATE ON)
-@@ -147,6 +156,14 @@ else ()
+@@ -149,6 +158,14 @@ else ()
WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SKIA PRIVATE OFF)
endif ()
@@ -21803,7 +22241,7 @@ index fa9c8766ea53612b9651e03375eb8b6bf4f15e76..621fb9f05c620f486feed36c4f23f661
# Finalize the value for all options. Do not attempt to use an option before
diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake
-index 8d5c7b97d0b717e4da818baaef1a681629332edb..df125a4c00c79daa73e9959a6b8b8fe0e3929e99 100644
+index a70706b67e0313e084eed2d1682ef85b296c80a6..21a610a7c0ddd838ed152bc1de4440ae4e6ff7ea 100644
--- a/Source/cmake/OptionsWPE.cmake
+++ b/Source/cmake/OptionsWPE.cmake
@@ -9,6 +9,8 @@ if (${CMAKE_VERSION} VERSION_LESS "3.20" AND NOT ${CMAKE_GENERATOR} STREQUAL "Ni
@@ -21848,7 +22286,7 @@ index 8d5c7b97d0b717e4da818baaef1a681629332edb..df125a4c00c79daa73e9959a6b8b8fe0
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION_PLAYLIST PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON)
-@@ -72,7 +77,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS_IN_WORKERS PRIVATE ${EN
+@@ -72,7 +77,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS_IN_WORKERS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PERIODIC_MEMORY_MONITOR PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHAREABLE_RESOURCE PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPEECH_SYNTHESIS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
@@ -21857,7 +22295,7 @@ index 8d5c7b97d0b717e4da818baaef1a681629332edb..df125a4c00c79daa73e9959a6b8b8fe0
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VARIATION_FONTS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CODECS PRIVATE ON)
-@@ -89,6 +94,23 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90)
+@@ -91,6 +96,23 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PUBLIC ON)
endif ()
@@ -21881,7 +22319,7 @@ index 8d5c7b97d0b717e4da818baaef1a681629332edb..df125a4c00c79daa73e9959a6b8b8fe0
# 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.
-@@ -98,7 +120,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_JOURNALD_LOG "Whether to enable journald logging" PU
+@@ -100,7 +122,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_JOURNALD_LOG "Whether to enable journald logging" PU
WEBKIT_OPTION_DEFINE(ENABLE_WPE_PLATFORM_DRM "Whether to enable support for DRM platform" PUBLIC ON)
WEBKIT_OPTION_DEFINE(ENABLE_WPE_PLATFORM_HEADLESS "Whether to enable support for headless platform" PUBLIC ON)
WEBKIT_OPTION_DEFINE(ENABLE_WPE_PLATFORM_WAYLAND "Whether to enable support for Wayland platform" PUBLIC ON)
@@ -21891,10 +22329,10 @@ index 8d5c7b97d0b717e4da818baaef1a681629332edb..df125a4c00c79daa73e9959a6b8b8fe0
WEBKIT_OPTION_DEFINE(USE_ATK "Whether to enable usage of ATK." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_GBM "Whether to enable usage of GBM." PUBLIC ON)
diff --git a/Source/cmake/OptionsWin.cmake b/Source/cmake/OptionsWin.cmake
-index 92171930d24d199ebe5e7ff13252a6561ce57379..4d0b67710fa8a68dd604fb5c41ae16dd1a29e797 100644
+index 75b07257a0f116511fafc947e64f3f98f9086a82..5e65d3e455c9fb1f03551c4561e74247952a68e4 100644
--- a/Source/cmake/OptionsWin.cmake
+++ b/Source/cmake/OptionsWin.cmake
-@@ -86,6 +86,29 @@ find_package(ZLIB 1.2.11 REQUIRED)
+@@ -67,6 +67,29 @@ find_package(ZLIB 1.2.11 REQUIRED)
find_package(LibPSL 0.20.2 REQUIRED)
find_package(WebP REQUIRED COMPONENTS demux)
@@ -21924,7 +22362,7 @@ index 92171930d24d199ebe5e7ff13252a6561ce57379..4d0b67710fa8a68dd604fb5c41ae16dd
WEBKIT_OPTION_BEGIN()
# FIXME: Most of these options should not be public.
-@@ -156,6 +179,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
+@@ -133,6 +156,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS ON)
SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS ON)
@@ -21940,7 +22378,7 @@ index 92171930d24d199ebe5e7ff13252a6561ce57379..4d0b67710fa8a68dd604fb5c41ae16dd
set(USE_ANGLE_EGL ON)
diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake
-index 4db77baa1f6f1b66a6c84e7577ee4169797b474b..cc57a3a95dcf7863aeeda489b25554f4172ca10b 100644
+index edac4df57e4da23a7cdf234eefc3879c35c607c2..df575fa5d0c8574a8b248362167e160704bab41c 100644
--- a/Source/cmake/WebKitCompilerFlags.cmake
+++ b/Source/cmake/WebKitCompilerFlags.cmake
@@ -122,7 +122,7 @@ macro(WEBKIT_ADD_TARGET_CXX_FLAGS _target)
@@ -21953,7 +22391,7 @@ index 4db77baa1f6f1b66a6c84e7577ee4169797b474b..cc57a3a95dcf7863aeeda489b25554f4
if (MSVC)
set(FATAL_WARNINGS_FLAG /WX)
diff --git a/Tools/DumpRenderTree/DerivedSources.make b/Tools/DumpRenderTree/DerivedSources.make
-index 57aae19f1a16d08ba1579562eeff264c8768af4d..6ce36f40cc954bd02b86f84bd9a0bd2928459938 100644
+index 576835410df6deac60f0158f1d2d1ef1e5f4c78d..9b492cfe5fef8de340a80f2af70a7d68672ef2e4 100644
--- a/Tools/DumpRenderTree/DerivedSources.make
+++ b/Tools/DumpRenderTree/DerivedSources.make
@@ -73,8 +73,8 @@ $(IDL_FILE_NAMES_LIST) : $(UICONTEXT_INTERFACES:%=%.idl)
@@ -22022,7 +22460,7 @@ index 61616b96e2f4e21aa6d098445e0f1a933e512a9c..33732da18013679a869ff8eb2b445434
}
diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.c b/Tools/MiniBrowser/gtk/BrowserWindow.c
-index f8f78a9b2e711d8250e770d73f0f7af6dc1520ed..101313a9ba3c1ddcfa10561d582ce485f0212765 100644
+index d39b809a879babcdbbf4b5f7687204df5ccc43f3..2862876cb515da09db653e71659d64215a636758 100644
--- a/Tools/MiniBrowser/gtk/BrowserWindow.c
+++ b/Tools/MiniBrowser/gtk/BrowserWindow.c
@@ -73,7 +73,7 @@ struct _BrowserWindowClass {
@@ -22055,7 +22493,7 @@ index f8f78a9b2e711d8250e770d73f0f7af6dc1520ed..101313a9ba3c1ddcfa10561d582ce485
gtk_window_set_title(GTK_WINDOW(window), privateTitle ? privateTitle : title);
g_free(privateTitle);
}
-@@ -520,8 +514,12 @@ static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision
+@@ -524,8 +518,12 @@ static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision
return FALSE;
WebKitNavigationAction *navigationAction = webkit_navigation_policy_decision_get_navigation_action(WEBKIT_NAVIGATION_POLICY_DECISION(decision));
@@ -22070,7 +22508,7 @@ index f8f78a9b2e711d8250e770d73f0f7af6dc1520ed..101313a9ba3c1ddcfa10561d582ce485
return FALSE;
/* Multiple tabs are not allowed in editor mode. */
-@@ -1498,6 +1496,28 @@ static gboolean browserWindowDeleteEvent(GtkWidget *widget, GdkEventAny* event)
+@@ -1502,6 +1500,28 @@ static gboolean browserWindowDeleteEvent(GtkWidget *widget, GdkEventAny* event)
}
#endif
@@ -22099,7 +22537,7 @@ index f8f78a9b2e711d8250e770d73f0f7af6dc1520ed..101313a9ba3c1ddcfa10561d582ce485
static void browser_window_class_init(BrowserWindowClass *klass)
{
GObjectClass *gobjectClass = G_OBJECT_CLASS(klass);
-@@ -1511,6 +1531,19 @@ static void browser_window_class_init(BrowserWindowClass *klass)
+@@ -1515,6 +1535,19 @@ static void browser_window_class_init(BrowserWindowClass *klass)
GtkWidgetClass *widgetClass = GTK_WIDGET_CLASS(klass);
widgetClass->delete_event = browserWindowDeleteEvent;
#endif
@@ -22333,10 +22771,10 @@ index 0dd4a639e69f52e674c6bbe257e35daabd25d077..1c0af52edd19d19d30136158f25ede26
g_clear_object(&interfaceSettings);
diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp
-index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1f03a8746 100644
+index d340d90d8d6650b8499cf5593df481e06a3178a3..8534bc30f863e4eafdb1cc7b205034d35bd3c0ff 100644
--- a/Tools/MiniBrowser/wpe/main.cpp
+++ b/Tools/MiniBrowser/wpe/main.cpp
-@@ -45,6 +45,9 @@ static gboolean headlessMode;
+@@ -49,6 +49,9 @@ static gboolean headlessMode;
static gboolean privateMode;
static gboolean automationMode;
static gboolean ignoreTLSErrors;
@@ -22346,9 +22784,9 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
static const char* contentFilter;
static const char* cookiesFile;
static const char* cookiesPolicy;
-@@ -78,6 +81,9 @@ static const GOptionEntry commandLineOptions[] =
- { "use-wpe-platform-api", 0, 0, G_OPTION_ARG_NONE, &useWPEPlatformAPI, "Use the WPE platform API", nullptr },
+@@ -125,6 +128,9 @@ static const GOptionEntry commandLineOptions[] =
#endif
+ { "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 },
+ { "inspector-pipe", 'v', 0, G_OPTION_ARG_NONE, &inspectorPipe, "Expose remote debugging protocol over pipe", nullptr },
+ { "user-data-dir", 0, 0, G_OPTION_ARG_STRING, &userDataDir, "Default profile persistence folder location", "FILE" },
@@ -22356,7 +22794,7 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, nullptr, "[URL]" },
{ nullptr, 0, 0, G_OPTION_ARG_NONE, nullptr, nullptr, nullptr }
};
-@@ -220,15 +226,38 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
+@@ -276,15 +282,38 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
g_main_loop_quit(data->mainLoop);
}
@@ -22395,9 +22833,9 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
+
+static WebKitWebView* createWebViewImpl(WebKitWebView* webView, WebKitWebContext *webContext, gpointer user_data)
{
-
- auto backend = createViewBackend(1280, 720);
-@@ -244,18 +273,37 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
+ auto backend = createViewBackend(defaultWindowWidthLegacyAPI, defaultWindowHeightLegacyAPI);
+ WebKitWebViewBackend* viewBackend = nullptr;
+@@ -299,12 +328,27 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
}, backend.release());
}
@@ -22429,8 +22867,9 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
+ nullptr));
+ }
- g_signal_connect(newWebView, "create", G_CALLBACK(createWebView), user_data);
- g_signal_connect(newWebView, "close", G_CALLBACK(webViewClose), user_data);
+ #if ENABLE_WPE_PLATFORM
+ if (auto* wpeView = webkit_web_view_get_wpe_view(newWebView)) {
+@@ -319,6 +363,10 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
g_hash_table_add(openViews, newWebView);
@@ -22441,7 +22880,7 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
return newWebView;
}
-@@ -269,13 +317,89 @@ static WebKitFeature* findFeature(WebKitFeatureList* featureList, const char* id
+@@ -376,13 +424,89 @@ static WebKitFeature* findFeature(WebKitFeatureList* featureList, const char* id
return nullptr;
}
@@ -22532,7 +22971,7 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
webkit_network_session_set_itp_enabled(networkSession, enableITP);
if (proxy) {
-@@ -302,10 +426,18 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
+@@ -409,10 +533,18 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
webkit_cookie_manager_set_persistent_storage(cookieManager, cookiesFile, storageType);
}
}
@@ -22553,7 +22992,7 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
webkit_website_data_manager_set_itp_enabled(manager, enableITP);
if (proxy) {
-@@ -336,6 +468,7 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
+@@ -443,6 +575,7 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
}
#endif
@@ -22561,7 +23000,7 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
WebKitUserContentManager* userContentManager = nullptr;
if (contentFilter) {
GFile* contentFilterFile = g_file_new_for_commandline_arg(contentFilter);
-@@ -408,6 +541,15 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
+@@ -521,6 +654,15 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
"autoplay", WEBKIT_AUTOPLAY_ALLOW,
nullptr);
@@ -22577,16 +23016,16 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
auto* webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
"backend", viewBackend,
"web-context", webContext,
-@@ -436,8 +578,6 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
- g_signal_connect(wpeView, "event", G_CALLBACK(wpeViewEventCallback), webView);
+@@ -565,8 +707,6 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
+ }
#endif
- openViews = g_hash_table_new_full(nullptr, nullptr, g_object_unref, nullptr);
-
- webkit_web_context_set_automation_allowed(webContext, automationMode);
g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), webView);
g_signal_connect(webView, "permission-request", G_CALLBACK(decidePermissionRequest), nullptr);
-@@ -450,16 +590,9 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
+ g_signal_connect(webView, "create", G_CALLBACK(createWebView), application);
+@@ -578,16 +718,11 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
webkit_web_view_set_background_color(webView, &color);
if (uriArguments) {
@@ -22599,14 +23038,16 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1
- g_object_unref(file);
- webkit_web_view_load_uri(webView, url);
- g_free(url);
-- } else if (automationMode)
+- } 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)
- webkit_web_view_load_uri(webView, "about:blank");
- else
++ webkit_web_view_load_uri(webView, "about:blank");
++ else
webkit_web_view_load_uri(webView, "https://wpewebkit.org");
-@@ -533,8 +666,14 @@ int main(int argc, char *argv[])
+
+ g_object_unref(webContext);
+@@ -683,8 +818,14 @@ int main(int argc, char *argv[])
}
}
@@ -22634,7 +23075,7 @@ index 1067b31bc989748dfcc5502209d36d001b9b239e..7629263fb8bc93dca6dfc01c75eed8d2
+ add_subdirectory(Playwright/win)
+endif ()
diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit
-index 39c351abbdd7b1b7f7016c5fd071ec2ae59b4a42..dc804e1d5284b15da6fa0679932d6cca8ece499a 100755
+index 39f91de9501cf38331ce567d30c9cefa25b28510..af2eeec87bb43f9ddfc6d583c35a8e7a87d5127c 100755
--- a/Tools/Scripts/build-webkit
+++ b/Tools/Scripts/build-webkit
@@ -273,7 +273,7 @@ if (isAppleCocoaWebKit()) {
@@ -22662,7 +23103,7 @@ index 9e53f459e444b9c10fc5248f0e8059df6c1e0041..c17c875a7dd3ca05c4489578ab32378b
"${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityController.idl"
"${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityTextMarker.idl"
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
-index 02656db352f2d52dd24e7886e9119edb562be1c1..21366de86e0c2caeb9c040cd9f9f5b966b29438b 100644
+index 076ad1f7005f732f8529955cfe3b6a8dd5212949..dee6f57eb5fff12de9cdaad230e894b0b9b15b88 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -964,6 +964,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options)