Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: update browser patches as of Jun, 12, 2024 (#31888)
Max Schmittacf5ea0904b3
diff --git a/browser_patches/firefox/UPSTREAM_CONFIG.sh b/browser_patches/firefox/UPSTREAM_CONFIG.shindex 10889141a7..aee7dca3d9 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="bd7e0ac24a6fb1cddde3e45ea191b7abcc90cf56"+BASE_REVISION="4c9a3f8e2db68ae0a8fcf6bbf0574e3c0549ff49"diff --git a/browser_patches/firefox/juggler/TargetRegistry.js b/browser_patches/firefox/juggler/TargetRegistry.jsindex ea7b2afa4d..8c23ff8c93 100644--- a/browser_patches/firefox/juggler/TargetRegistry.js+++ b/browser_patches/firefox/juggler/TargetRegistry.js@@ -368,7 +368,7 @@ class PageTarget {onLocationChange: (aWebProgress, aRequest, aLocation) => this._onNavigated(aLocation),};this._eventListeners = [- helper.addObserver(this._updateModalDialogs.bind(this), 'tabmodal-dialog-loaded'),+ helper.addObserver(this._updateModalDialogs.bind(this), 'common-dialog-loaded'),helper.addProgressListener(tab.linkedBrowser, navigationListener, Ci.nsIWebProgress.NOTIFY_LOCATION),helper.addEventListener(this._linkedBrowser, 'DOMModalDialogClosed', event => this._updateModalDialogs()),helper.addEventListener(this._linkedBrowser, 'WillChangeBrowserRemoteness', event => this._willChangeBrowserRemoteness()),@@ -499,7 +499,7 @@ class PageTarget {}_updateModalDialogs() {- const prompts = new Set(this._linkedBrowser.tabModalPromptBox ? this._linkedBrowser.tabModalPromptBox.listPrompts() : []);+ const prompts = new Set(this._linkedBrowser.tabDialogBox.getContentDialogManager().dialogs.map(dialog => dialog.frameContentWindow.Dialog));for (const dialog of this._dialogs.values()) {if (!prompts.has(dialog.prompt())) {this._dialogs.delete(dialog.id());diff --git a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsmindex 529f6d3b58..47fcabbd81 100644--- a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm+++ b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm@@ -8,6 +8,8 @@ const helper = new Helper();let sameProcessInstanceNumber = 0;+const topBrowingContextToAgents = new Map();+class JugglerFrameChild extends JSWindowActorChild {constructor() {super();@@ -16,46 +18,66 @@ class JugglerFrameChild extends JSWindowActorChild {}handleEvent(aEvent) {- if (this._agents && aEvent.type === 'DOMWillOpenModalDialog') {- this._agents.channel.pause();+ const agents = this._agents();+ if (!agents)+ return;+ if (aEvent.type === 'DOMWillOpenModalDialog') {+ agents.channel.pause();return;}- if (this._agents && aEvent.type === 'DOMModalDialogClosed') {- this._agents.channel.resumeSoon();+ if (aEvent.type === 'DOMModalDialogClosed') {+ agents.channel.resumeSoon();return;}- if (this._agents && aEvent.target === this.document)- this._agents.pageAgent.onWindowEvent(aEvent);- if (this._agents && aEvent.target === this.document)- this._agents.frameTree.onWindowEvent(aEvent);+ if (aEvent.target === this.document) {+ agents.pageAgent.onWindowEvent(aEvent);+ agents.frameTree.onWindowEvent(aEvent);+ }+ }++ _agents() {+ return topBrowingContextToAgents.get(this.browsingContext.top);}actorCreated() {this.actorName = `content::${this.browsingContext.browserId}/${this.browsingContext.id}/${++sameProcessInstanceNumber}`;this._eventListeners.push(helper.addEventListener(this.contentWindow, 'load', event => {- this._agents?.pageAgent.onWindowEvent(event);+ this._agents()?.pageAgent.onWindowEvent(event);}));if (this.document.documentURI.startsWith('moz-extension://'))return;- this._agents = initialize(this.browsingContext, this.docShell, this);- }- _dispose() {- helper.removeListeners(this._eventListeners);- // We do not cleanup since agents are shared for all frames in the process.-- // TODO: restore the cleanup.- // Reset transport so that all messages will be pending and will not throw any errors.- // this._channel.resetTransport();- // this._agents.pageAgent.dispose();- // this._agents.frameTree.dispose();- // this._agents = undefined;+ // Child frame events will be forwarded to related top-level agents.+ if (this.browsingContext.parent)+ return;++ let agents = topBrowingContextToAgents.get(this.browsingContext);+ if (!agents) {+ agents = initialize(this.browsingContext, this.docShell);+ topBrowingContextToAgents.set(this.browsingContext, agents);+ }+ agents.channel.bindToActor(this);+ agents.actor = this;}didDestroy() {- this._dispose();+ helper.removeListeners(this._eventListeners);++ if (this.browsingContext.parent)+ return;++ const agents = topBrowingContextToAgents.get(this.browsingContext);+ // The agents are already re-bound to a new actor.+ if (agents.actor !== this)+ return;++ topBrowingContextToAgents.delete(this.browsingContext);++ agents.channel.resetTransport();+ agents.pageAgent.dispose();+ agents.frameTree.dispose();}receiveMessage() { }diff --git a/browser_patches/firefox/juggler/content/PageAgent.js b/browser_patches/firefox/juggler/content/PageAgent.jsindex 6aee921e87..70dcf04921 100644--- a/browser_patches/firefox/juggler/content/PageAgent.js+++ b/browser_patches/firefox/juggler/content/PageAgent.js@@ -370,7 +370,12 @@ class PageAgent {const unsafeObject = frame.unsafeObject(objectId);if (!unsafeObject)throw new Error('Object is not input!');- const nsFiles = await Promise.all(files.map(filePath => File.createFromFileName(filePath)));+ let nsFiles;+ if (unsafeObject.webkitdirectory) {+ nsFiles = await new Directory(files[0]).getFiles(true);+ } else {+ nsFiles = await Promise.all(files.map(filePath => File.createFromFileName(filePath)));+ }unsafeObject.mozSetFileArray(nsFiles);const events = [new (frame.domWindow().Event)('input', { bubbles: true, cancelable: true, composed: true }),diff --git a/browser_patches/firefox/juggler/content/main.js b/browser_patches/firefox/juggler/content/main.jsindex 022b1e3a5e..15986bbed9 100644--- a/browser_patches/firefox/juggler/content/main.js+++ b/browser_patches/firefox/juggler/content/main.js@@ -7,24 +7,10 @@ const {FrameTree} = ChromeUtils.import('chrome://juggler/content/content/FrameTrconst {SimpleChannel} = ChromeUtils.import('chrome://juggler/content/SimpleChannel.js');const {PageAgent} = ChromeUtils.import('chrome://juggler/content/content/PageAgent.js');-const browsingContextToAgents = new Map();const helper = new Helper();-function initialize(browsingContext, docShell, actor) {- if (browsingContext.parent) {- // For child frames, return agents from the main frame.- return browsingContextToAgents.get(browsingContext.top);- }-- let data = browsingContextToAgents.get(browsingContext);- if (data) {- // Rebind from one main frame actor to another one.- data.channel.bindToActor(actor);- return data;- }-- data = { channel: undefined, pageAgent: undefined, frameTree: undefined, failedToOverrideTimezone: false };- browsingContextToAgents.set(browsingContext, data);+function initialize(browsingContext, docShell) {+ const data = { channel: undefined, pageAgent: undefined, frameTree: undefined, failedToOverrideTimezone: false };const applySetting = {geolocation: (geolocation) => {@@ -84,7 +70,6 @@ function initialize(browsingContext, docShell, actor) {data.frameTree.addBinding(worldName, name, script);data.frameTree.setInitScripts([...contextCrossProcessCookie.initScripts, ...pageCrossProcessCookie.initScripts]);data.channel = new SimpleChannel('', 'process-' + Services.appinfo.processID);- data.channel.bindToActor(actor);data.pageAgent = new PageAgent(data.channel, data.frameTree);docShell.fileInputInterceptionEnabled = !!pageCrossProcessCookie.interceptFileChooserDialog;diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diffindex 6291e775e6..be98b14c2f 100644--- a/browser_patches/firefox/patches/bootstrap.diff+++ b/browser_patches/firefox/patches/bootstrap.diff@@ -57,7 +57,7 @@ index 8e9bf2b413585b5a3db9370eee5d57fb6c6716ed..5a3b194b54e3813c89989f13a214c989* Return XPCOM wrapper for the internal accessible.*/diff --git a/browser/app/winlauncher/LauncherProcessWin.cpp b/browser/app/winlauncher/LauncherProcessWin.cpp-index 81d4ee91e9383693d794dbf68184a80b49b582c6..1a07e3511f73199fe0b248412d01d7b8a3744a66 100644+index b40e0fceb567c0d217adf284e13f434e49cc8467..2c4e6d5fbf8da40954ad6a5b15e412493e43b14e 100644--- a/browser/app/winlauncher/LauncherProcessWin.cpp+++ b/browser/app/winlauncher/LauncherProcessWin.cpp@@ -22,6 +22,7 @@@@ -68,7 +68,7 @@ index 81d4ee91e9383693d794dbf68184a80b49b582c6..1a07e3511f73199fe0b248412d01d7b8#include <windows.h>#include <processthreadsapi.h>-@@ -425,8 +426,18 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],+@@ -421,8 +422,18 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],HANDLE stdHandles[] = {::GetStdHandle(STD_INPUT_HANDLE),::GetStdHandle(STD_OUTPUT_HANDLE),::GetStdHandle(STD_ERROR_HANDLE)};@@ -106,10 +106,10 @@ index f6d425f36a965f03ac82dbe3ab6cde06f12751ac..d60999ab2658b1e1e5f07a8aee530451browser/chrome/browser/search-extensions/amazon/favicon.icobrowser/chrome/browser/search-extensions/amazondotcn/favicon.icodiff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in-index 1b87a9ab4aec939acac1da54a2b6670cc581fe86..a638dbe8e2f260d8be550fa8eb5bf6f6c2c31080 100644+index 725a63981ccb58c5e47c096f39fa686a5ba5a9e8..5fe548a9b6652c4407dad6364bf20833b7fa7f3e 100644--- a/browser/installer/package-manifest.in+++ b/browser/installer/package-manifest.in-@@ -185,6 +185,9 @@+@@ -189,6 +189,9 @@@RESPATH@/chrome/remote.manifest#endif@@ -297,10 +297,10 @@ index 5ec95a61e4d3af265cbe7dd9d83f6535da1d103e..f8acafe6d58c429af27a38363e06ad54bool CanSet(FieldIndex<IDX_SuspendMediaWhenInactive>, bool, ContentParent*) {diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp-index 84f2d2960a3fa642754e0c909f92d96865e39984..e91fc85fc7a7966d2d536839fab823ae88d1b4bd 100644+index 4c92988c9b90503c95cbec63e4dc85b5f789c488..cd6eb741a432ef761bb07d8d8e97441ed111cb6e 100644--- a/docshell/base/CanonicalBrowsingContext.cpp+++ b/docshell/base/CanonicalBrowsingContext.cpp-@@ -1477,6 +1477,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI,+@@ -1593,6 +1593,12 @@ void CanonicalBrowsingContext::LoadURI(nsIURI* aURI,return;}@@ -314,7 +314,7 @@ index 84f2d2960a3fa642754e0c909f92d96865e39984..e91fc85fc7a7966d2d536839fab823ae}diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp-index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d878d33643d 100644+index 87a34cf5b2f29bb3a7287327cc329974201856b6..014152f79069ee4196e2cda9374d161be28fee3c 100644--- a/docshell/base/nsDocShell.cpp+++ b/docshell/base/nsDocShell.cpp@@ -15,6 +15,12 @@@@ -354,7 +354,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87#include "nsIDocumentLoaderFactory.h"#include "nsIDOMWindow.h"#include "nsIEditingSession.h"-@@ -206,6 +215,7 @@+@@ -207,6 +216,7 @@#include "nsGlobalWindowInner.h"#include "nsGlobalWindowOuter.h"#include "nsJSEnvironment.h"@@ -376,7 +376,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87mAllowAuth(mItemType == typeContent),mAllowKeywordFixup(false),mDisableMetaRefreshWhenInactive(false),-@@ -3101,6 +3118,214 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {+@@ -3066,6 +3083,214 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {return NS_OK;}@@ -591,7 +591,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87NS_IMETHODIMPnsDocShell::GetIsNavigating(bool* aOut) {*aOut = mIsNavigating;-@@ -4789,7 +5014,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {+@@ -4754,7 +4979,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {}void nsDocShell::ActivenessMaybeChanged() {@@ -600,7 +600,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87if (RefPtr<PresShell> presShell = GetPresShell()) {presShell->ActivenessMaybeChanged();}-@@ -6711,6 +6936,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,+@@ -6676,6 +6901,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,return false; // no entry to save into}@@ -611,7 +611,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87MOZ_ASSERT(!mozilla::SessionHistoryInParent(),"mOSHE cannot be non-null with SHIP");nsCOMPtr<nsIDocumentViewer> viewer = mOSHE->GetDocumentViewer();-@@ -8443,6 +8672,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {+@@ -8408,6 +8637,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {true, // aForceNoOpenergetter_AddRefs(newBC));MOZ_ASSERT(!newBC);@@ -624,7 +624,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87return rv;}-@@ -9569,6 +9804,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,+@@ -9528,6 +9763,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,nsINetworkPredictor::PREDICT_LOAD, attrs, nullptr);nsCOMPtr<nsIRequest> req;@@ -641,7 +641,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87rv = DoURILoad(aLoadState, aCacheKey, getter_AddRefs(req));if (NS_SUCCEEDED(rv)) {-@@ -12732,6 +12977,9 @@ class OnLinkClickEvent : public Runnable {+@@ -12691,6 +12936,9 @@ class OnLinkClickEvent : public Runnable {mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied,mTriggeringPrincipal);}@@ -651,7 +651,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87return NS_OK;}-@@ -12816,6 +13064,8 @@ nsresult nsDocShell::OnLinkClick(+@@ -12775,6 +13023,8 @@ nsresult nsDocShell::OnLinkClick(nsCOMPtr<nsIRunnable> ev =new OnLinkClickEvent(this, aContent, loadState, noOpenerImplied,aIsTrusted, aTriggeringPrincipal);@@ -661,7 +661,7 @@ index 3404597343e0d21c42c5adc2f2849888869cf75a..558f03f30672b9f0fdb68ba8d23a0d87}diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h-index 82ac6c9ab9dbc102a429ab0fe6cb24b8fcdf477f..f6328c25349cf39fcce973adcf908782e8721447 100644+index f01e3426c4bc3a2145629be1bc7cf1d9cfd4c8bf..d4d76e391034203a67d4f2def714ba6efb1bea7b 100644--- a/docshell/base/nsDocShell.h+++ b/docshell/base/nsDocShell.h@@ -15,6 +15,7 @@@@ -705,7 +705,7 @@ index 82ac6c9ab9dbc102a429ab0fe6cb24b8fcdf477f..f6328c25349cf39fcce973adcf908782// Handles retrieval of subframe session history for nsDocShell::LoadURI. If a// load is requested in a subframe of the current DocShell, the subframe// loadType may need to reflect the loadType of the parent document, or in-@@ -1295,6 +1308,16 @@ class nsDocShell final : public nsDocLoader,+@@ -1291,6 +1304,16 @@ class nsDocShell final : public nsDocLoader,bool mAllowDNSPrefetch : 1;bool mAllowWindowControl : 1;bool mCSSErrorReportingEnabled : 1;@@ -723,7 +723,7 @@ index 82ac6c9ab9dbc102a429ab0fe6cb24b8fcdf477f..f6328c25349cf39fcce973adcf908782bool mAllowKeywordFixup : 1;bool mDisableMetaRefreshWhenInactive : 1;diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl-index 21f09a517e91644f81f5bb823f556c15cd06e51f..a68d30e0a60f03a0942ac1cd8a1f83804fdfd3e0 100644+index 024c0f544c54b7cfb0eeb64e5dc39a0b5d2a5950..63adaf24fd6dfd75f559323ae3c07e265f9f8241 100644--- a/docshell/base/nsIDocShell.idl+++ b/docshell/base/nsIDocShell.idl@@ -44,6 +44,7 @@ interface nsIURI;@@ -734,7 +734,7 @@ index 21f09a517e91644f81f5bb823f556c15cd06e51f..a68d30e0a60f03a0942ac1cd8a1f8380interface nsIEditor;interface nsIEditingSession;interface nsIInputStream;-@@ -754,6 +755,36 @@ interface nsIDocShell : nsIDocShellTreeItem+@@ -729,6 +730,36 @@ interface nsIDocShell : nsIDocShellTreeItem*/void synchronizeLayoutHistoryState();@@ -772,10 +772,10 @@ index 21f09a517e91644f81f5bb823f556c15cd06e51f..a68d30e0a60f03a0942ac1cd8a1f8380* This attempts to save any applicable layout history state (like* scroll position) in the nsISHEntry. This is normally donediff --git a/dom/base/Document.cpp b/dom/base/Document.cpp-index 4e9286a91e3b0f1114aa0a7aa6ff81dde615a73d..941a0c3dac71008ca760024a1e828f75f6af5182 100644+index 8cbf8b8075488fe1edc33b558f90224bd992117c..72198d51ca3c74eb855c928319551505422d6ebd 100644--- a/dom/base/Document.cpp+++ b/dom/base/Document.cpp-@@ -3676,6 +3676,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {+@@ -3680,6 +3680,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {}void Document::ApplySettingsFromCSP(bool aSpeculative) {@@ -785,7 +785,7 @@ index 4e9286a91e3b0f1114aa0a7aa6ff81dde615a73d..941a0c3dac71008ca760024a1e828f75nsresult rv = NS_OK;if (!aSpeculative) {// 1) apply settings from regular CSP-@@ -3733,6 +3736,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {+@@ -3737,6 +3740,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {MOZ_ASSERT(!mScriptGlobalObject,"CSP must be initialized before mScriptGlobalObject is set!");@@ -797,7 +797,7 @@ index 4e9286a91e3b0f1114aa0a7aa6ff81dde615a73d..941a0c3dac71008ca760024a1e828f75// If this is a data document - no need to set CSP.if (mLoadedAsData) {return NS_OK;-@@ -4500,6 +4508,10 @@ bool Document::HasFocus(ErrorResult& rv) const {+@@ -4522,6 +4530,10 @@ bool Document::HasFocus(ErrorResult& rv) const {return false;}@@ -808,7 +808,7 @@ index 4e9286a91e3b0f1114aa0a7aa6ff81dde615a73d..941a0c3dac71008ca760024a1e828f75if (!fm->IsInActiveWindow(bc)) {return false;}-@@ -18849,6 +18861,66 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {+@@ -18892,6 +18904,66 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {return PreferenceSheet::PrefsFor(*this).mColorScheme;}@@ -876,10 +876,10 @@ index 4e9286a91e3b0f1114aa0a7aa6ff81dde615a73d..941a0c3dac71008ca760024a1e828f75if (!sLoadingForegroundTopLevelContentDocument) {return false;diff --git a/dom/base/Document.h b/dom/base/Document.h-index a52c61addffc4a2344fa06cb0bceebe6a7ca9075..b0f8d65e5341bf277e48bef3b88cb4cc384fbc49 100644+index 0b0d0ca3d0fdb1d5c2b88b77e78cd164230e040a..82d340aba7e4f37fde2dae09bd831ccb24302a12 100644--- a/dom/base/Document.h+++ b/dom/base/Document.h-@@ -4044,6 +4044,9 @@ class Document : public nsINode,+@@ -4035,6 +4035,9 @@ class Document : public nsINode,// color-scheme meta tag.ColorScheme DefaultColorScheme() const;@@ -890,7 +890,7 @@ index a52c61addffc4a2344fa06cb0bceebe6a7ca9075..b0f8d65e5341bf277e48bef3b88cb4ccstatic bool AutomaticStorageAccessPermissionCanBeGranted(diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp-index 14a00b8ed85f69312a89990acbb5e0f9755bd832..4b07c28615920a95a2ba59247f8575515cac4235 100644+index 14a00b8ed85f69312a89990acbb5e0f9755bd832..c97bb6cdd125e755333254a954777b06815352c7 100644--- a/dom/base/Navigator.cpp+++ b/dom/base/Navigator.cpp@@ -338,14 +338,18 @@ void Navigator::GetAppName(nsAString& aAppName) const {@@ -929,6 +929,16 @@ index 14a00b8ed85f69312a89990acbb5e0f9755bd832..4b07c28615920a95a2ba59247f857551// 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() {+ }+ #endif++- return false;++ // Playwright is automating the browser, so we should pretend to be a webdriver++ return true;+ }++ AutoplayPolicy Navigator::GetAutoplayPolicy(AutoplayPolicyMediaType aType) {diff --git a/dom/base/Navigator.h b/dom/base/Navigator.hindex e559dc4d6aef61b7012a27f3d6c3186a12a15319..9798a50789ce972c4d9e94419e20a5cde4cd552a 100644--- a/dom/base/Navigator.h@@ -943,10 +953,10 @@ index e559dc4d6aef61b7012a27f3d6c3186a12a15319..9798a50789ce972c4d9e94419e20a5cddom::MediaCapabilities* MediaCapabilities();dom::MediaSession* MediaSession();diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp-index c6f1687f73df6b1849a191ff8722dc9fc26fc3eb..9fdface27d5c9bd0c61b8af229a31be2356c46b5 100644+index d2c863bd6549a7e2fbbc09deb99c93cdde6a7199..2639a0e3160250d3cd3c8a8074147039405931a8 100644--- a/dom/base/nsContentUtils.cpp+++ b/dom/base/nsContentUtils.cpp-@@ -8711,7 +8711,8 @@ nsresult nsContentUtils::SendMouseEvent(+@@ -8731,7 +8731,8 @@ nsresult nsContentUtils::SendMouseEvent(bool aIgnoreRootScrollFrame, float aPressure,unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,PreventDefaultResult* aPreventDefault, bool aIsDOMEventSynthesized,@@ -956,7 +966,7 @@ index c6f1687f73df6b1849a191ff8722dc9fc26fc3eb..9fdface27d5c9bd0c61b8af229a31be2nsPoint offset;nsCOMPtr<nsIWidget> widget = GetWidget(aPresShell, &offset);if (!widget) return NS_ERROR_FAILURE;-@@ -8719,6 +8720,7 @@ nsresult nsContentUtils::SendMouseEvent(+@@ -8739,6 +8740,7 @@ nsresult nsContentUtils::SendMouseEvent(EventMessage msg;Maybe<WidgetMouseEvent::ExitFrom> exitFrom;bool contextMenuKey = false;@@ -964,7 +974,7 @@ index c6f1687f73df6b1849a191ff8722dc9fc26fc3eb..9fdface27d5c9bd0c61b8af229a31be2if (aType.EqualsLiteral("mousedown")) {msg = eMouseDown;} else if (aType.EqualsLiteral("mouseup")) {-@@ -8743,6 +8745,12 @@ nsresult nsContentUtils::SendMouseEvent(+@@ -8763,6 +8765,12 @@ nsresult nsContentUtils::SendMouseEvent(msg = eMouseHitTest;} else if (aType.EqualsLiteral("MozMouseExploreByTouch")) {msg = eMouseExploreByTouch;@@ -977,7 +987,7 @@ index c6f1687f73df6b1849a191ff8722dc9fc26fc3eb..9fdface27d5c9bd0c61b8af229a31be2} else {return NS_ERROR_FAILURE;}-@@ -8751,12 +8759,21 @@ nsresult nsContentUtils::SendMouseEvent(+@@ -8771,12 +8779,21 @@ nsresult nsContentUtils::SendMouseEvent(aInputSourceArg = MouseEvent_Binding::MOZ_SOURCE_MOUSE;}@@ -1001,7 +1011,7 @@ index c6f1687f73df6b1849a191ff8722dc9fc26fc3eb..9fdface27d5c9bd0c61b8af229a31be2event.pointerId = aIdentifier;event.mModifiers = GetWidgetModifiers(aModifiers);event.mButton = aButton;-@@ -8767,8 +8784,10 @@ nsresult nsContentUtils::SendMouseEvent(+@@ -8787,8 +8804,10 @@ nsresult nsContentUtils::SendMouseEvent(event.mPressure = aPressure;event.mInputSource = aInputSourceArg;event.mClickCount = aClickCount;@@ -1013,10 +1023,10 @@ index c6f1687f73df6b1849a191ff8722dc9fc26fc3eb..9fdface27d5c9bd0c61b8af229a31be2nsPresContext* presContext = aPresShell->GetPresContext();if (!presContext) return NS_ERROR_FAILURE;diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h-index 338fc097dede02a538f240ba4cc66307086c7f56..8345e47237bc40490bd17019a053cce4c3d74a91 100644+index 4291d2c5d1e17b75b2a0f3f26c84b0fbea03b027..18b311c64f825977e2c01ccc9dbfd6cd97ed8778 100644--- a/dom/base/nsContentUtils.h+++ b/dom/base/nsContentUtils.h-@@ -3055,7 +3055,8 @@ class nsContentUtils {+@@ -3065,7 +3065,8 @@ class nsContentUtils {int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure,unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,mozilla::PreventDefaultResult* aPreventDefault,@@ -1105,10 +1115,10 @@ index 63968c9b7a4e418e4c0de6e7a75fa215a36a9105..decf3ea3833ccdffd49a7aded2d600f9MOZ_CAN_RUN_SCRIPTnsresult SendTouchEventCommon(diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp-index 5a4cf78d65eee0adcbeca33787706113eca19de7..7c8016e422ccc9e86563eaa83c9acc1dad0e5967 100644+index 4e2d60469346772d6dad49b38b06a37c9f819a79..5123a1b40a951f2aa10b1b018c4e72abf18d0d27 100644--- a/dom/base/nsFocusManager.cpp+++ b/dom/base/nsFocusManager.cpp-@@ -1675,6 +1675,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,+@@ -1678,6 +1678,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,(GetActiveBrowsingContext() == newRootBrowsingContext);}@@ -1119,7 +1129,7 @@ index 5a4cf78d65eee0adcbeca33787706113eca19de7..7c8016e422ccc9e86563eaa83c9acc1d// Exit fullscreen if a website focuses another windowif (StaticPrefs::full_screen_api_exit_on_windowRaise() &&!isElementInActiveWindow && (aFlags & FLAG_RAISE)) {-@@ -2242,6 +2246,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,+@@ -2263,6 +2267,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,bool aIsLeavingDocument, bool aAdjustWidget,bool aRemainActive, Element* aElementToFocus,uint64_t aActionId) {@@ -1127,7 +1137,7 @@ index 5a4cf78d65eee0adcbeca33787706113eca19de7..7c8016e422ccc9e86563eaa83c9acc1dLOGFOCUS(("<<Blur begin actionid: %" PRIu64 ">>", aActionId));// hold a reference to the focused content, which may be null-@@ -2288,6 +2293,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,+@@ -2309,6 +2314,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,return true;}@@ -1139,7 +1149,7 @@ index 5a4cf78d65eee0adcbeca33787706113eca19de7..7c8016e422ccc9e86563eaa83c9acc1d// Keep a ref to presShell since dispatching the DOM event may cause// the document to be destroyed.RefPtr<PresShell> presShell = docShell->GetPresShell();-@@ -2947,7 +2957,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,+@@ -2986,7 +2996,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,}}@@ -1151,10 +1161,10 @@ index 5a4cf78d65eee0adcbeca33787706113eca19de7..7c8016e422ccc9e86563eaa83c9acc1d// care of lowering the present active window. This happens in// a separate runnable to avoid touching multiple windows indiff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp-index e28dcdb092b23558702377af32eece5d273d4cf3..a37ae9d6ccd978d5e84562450e7039d6a75d517b 100644+index c678a0a94150e73c6f5cd086c91a9848d4d0cfb8..0b362540bab495bffcf8a336351650f5897e0af5 100644--- a/dom/base/nsGlobalWindowOuter.cpp+++ b/dom/base/nsGlobalWindowOuter.cpp-@@ -2509,10 +2509,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,+@@ -2514,10 +2514,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,}();if (!isContentAboutBlankInChromeDocshell) {@@ -1175,7 +1185,7 @@ index e28dcdb092b23558702377af32eece5d273d4cf3..a37ae9d6ccd978d5e84562450e7039d6}}-@@ -2632,6 +2638,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {+@@ -2637,6 +2643,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {}}@@ -1196,10 +1206,10 @@ index e28dcdb092b23558702377af32eece5d273d4cf3..a37ae9d6ccd978d5e84562450e7039d6void nsGlobalWindowOuter::SetDocShell(nsDocShell* aDocShell) {diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h-index 8337a7353fb8e97372f0b57bd0fd867506a9129f..e7dedd6d26125e481e1145337a0be6ab864c1e1b 100644+index 3c26344c3d45c57606d498008946fc480cd2eb96..b02909587341860ad805072755761474029f6eec 100644--- a/dom/base/nsGlobalWindowOuter.h+++ b/dom/base/nsGlobalWindowOuter.h-@@ -315,6 +315,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,+@@ -314,6 +314,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,// Outer windows only.void DispatchDOMWindowCreated();@@ -1208,10 +1218,10 @@ index 8337a7353fb8e97372f0b57bd0fd867506a9129f..e7dedd6d26125e481e1145337a0be6ab// Outer windows only.virtual void EnsureSizeAndPositionUpToDate() override;diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp-index d5455e559639aee9328905b50f02c52e94db950b..3fbd1e0459e5391066fc6b3a4e30a841594b31bf 100644+index 6c77574df7973f12a5afd28bd9eb2bf5c4ae91ff..76feda136c7e39b0ebe3333714b41347ecc6aef2 100644--- a/dom/base/nsINode.cpp+++ b/dom/base/nsINode.cpp-@@ -1365,6 +1365,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,+@@ -1388,6 +1388,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,mozilla::GetBoxQuadsFromWindowOrigin(this, aOptions, aResult, aRv);}@@ -1274,10 +1284,10 @@ index d5455e559639aee9328905b50f02c52e94db950b..3fbd1e0459e5391066fc6b3a4e30a841DOMQuad& aQuad, const GeometryNode& aFrom,const ConvertCoordinateOptions& aOptions, CallerType aCallerType,diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h-index 3a47992cc89176fe9500f7b1d5b74e4422cb9625..27e6da8498af5e4a3c37407a3a8ab592e28dc372 100644+index d2a2fd008d15b5aa4534df1d7298108980bff41d..df86f5d534b4718bf1912da305fa2548a04637dc 100644--- a/dom/base/nsINode.h+++ b/dom/base/nsINode.h-@@ -2248,6 +2248,10 @@ class nsINode : public mozilla::dom::EventTarget {+@@ -2265,6 +2265,10 @@ class nsINode : public mozilla::dom::EventTarget {nsTArray<RefPtr<DOMQuad>>& aResult,ErrorResult& aRv);@@ -1458,7 +1468,7 @@ index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1~Geolocation();diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp-index d5a65a17555b7764611803f7fb298712b2c60fd7..fdee7deaf0b14e01702b902f8b73256c281e76b8 100644+index 958601616b8f5749ae704b0cdd8a0c5a397dc021..87fa7c434f852b4203beec320d7b27bbcfc108ef 100644--- a/dom/html/HTMLInputElement.cpp+++ b/dom/html/HTMLInputElement.cpp@@ -57,6 +57,7 @@@@ -1484,7 +1494,7 @@ index d5a65a17555b7764611803f7fb298712b2c60fd7..fdee7deaf0b14e01702b902f8b73256creturn NS_OK;}diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl-index 6a0df1b435cee9cea3b7d7ca30d0aff0e31f8ac0..c17b24823dd873c025e407fcc635b7c678dfd8ed 100644+index 27b9ff5acf8b1100a3b55d55cc390a15b2a3e3a4..7e8e2264dd4bb814cca5b00de80fcd5ce5c4be4d 100644--- a/dom/interfaces/base/nsIDOMWindowUtils.idl+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl@@ -373,6 +373,26 @@ interface nsIDOMWindowUtils : nsISupports {@@ -1515,7 +1525,7 @@ index 6a0df1b435cee9cea3b7d7ca30d0aff0e31f8ac0..c17b24823dd873c025e407fcc635b7c6* touchstart, touchend, touchmove, and touchcancel*diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp-index bdd10fdcb285e43778b55907ac05bfa973207e5e..d98808918ff8eccd6c51b4fbce1cce5e3745206a 100644+index 3d1f399edb4feb0793c214917464be2599739e6e..1d4a176b1a111a9415710f1bf1db1323620e4ee0 100644--- a/dom/ipc/BrowserChild.cpp+++ b/dom/ipc/BrowserChild.cpp@@ -1652,6 +1652,21 @@ void BrowserChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent,@@ -1840,10 +1850,10 @@ index 2f71b284ee5f7e11f117c447834b48355784448c..2640bd57123c2b03bf4b06a2419cd020* returned quads are further translated relative to the window* origin -- which is not the layout origin. Further translationdiff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp-index 02efb1205382850b41c38d5f6ee47092adcdc63e..28c8d05d0b5cc415f3d13a4588248f3844faf4f2 100644+index 321895e700a3129febba908fd7f35664c56ff637..375596973393158c7ff4586105451c336f63b5a0 100644--- a/dom/workers/RuntimeService.cpp+++ b/dom/workers/RuntimeService.cpp-@@ -995,7 +995,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {+@@ -1001,7 +1001,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {AssertIsOnMainThread();nsTArray<nsString> languages;@@ -1852,7 +1862,7 @@ index 02efb1205382850b41c38d5f6ee47092adcdc63e..28c8d05d0b5cc415f3d13a4588248f38RuntimeService* runtime = RuntimeService::GetService();if (runtime) {-@@ -1182,8 +1182,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {+@@ -1188,8 +1188,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {}// The navigator overridden properties should have already been read.@@ -1862,7 +1872,7 @@ index 02efb1205382850b41c38d5f6ee47092adcdc63e..28c8d05d0b5cc415f3d13a4588248f38mNavigatorPropertiesLoaded = true;}-@@ -1789,6 +1788,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted(+@@ -1795,6 +1794,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted(}}@@ -1876,7 +1886,7 @@ index 02efb1205382850b41c38d5f6ee47092adcdc63e..28c8d05d0b5cc415f3d13a4588248f38template <typename Func>void RuntimeService::BroadcastAllWorkers(const Func& aFunc) {AssertIsOnMainThread();-@@ -2304,6 +2310,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(+@@ -2310,6 +2316,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(}}@@ -1918,7 +1928,7 @@ index d10dabb5c5ff8e17851edf2bd2efc08e74584d8e..53c4070c5fde43b27fb8fbfdcf4c23d8bool IsWorkerGlobal(JSObject* global);diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp-index a8643981aa966e9324a5dbdb09b4fe57210dc581..5120df2607584a7cd50ea03aa997ef5ade5c8ee2 100644+index df248acda417ae2f304a7f5fa5d067912e402431..5a5b07409c6bca2c8cd80f4595c4e524b56566ef 100644--- a/dom/workers/WorkerPrivate.cpp+++ b/dom/workers/WorkerPrivate.cpp@@ -682,6 +682,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable {@@ -1940,7 +1950,7 @@ index a8643981aa966e9324a5dbdb09b4fe57210dc581..5120df2607584a7cd50ea03aa997ef5aclass UpdateLanguagesRunnable final : public WorkerRunnable {nsTArray<nsString> mLanguages;-@@ -1993,6 +2005,16 @@ void WorkerPrivate::UpdateContextOptions(+@@ -1992,6 +2004,16 @@ void WorkerPrivate::UpdateContextOptions(}}@@ -1957,7 +1967,7 @@ index a8643981aa966e9324a5dbdb09b4fe57210dc581..5120df2607584a7cd50ea03aa997ef5avoid WorkerPrivate::UpdateLanguages(const nsTArray<nsString>& aLanguages) {AssertIsOnParentThread();-@@ -5489,6 +5511,15 @@ void WorkerPrivate::UpdateContextOptionsInternal(+@@ -5509,6 +5531,15 @@ void WorkerPrivate::UpdateContextOptionsInternal(}}@@ -1974,7 +1984,7 @@ index a8643981aa966e9324a5dbdb09b4fe57210dc581..5120df2607584a7cd50ea03aa997ef5aconst nsTArray<nsString>& aLanguages) {WorkerGlobalScope* globalScope = GlobalScope();diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h-index a670d009759d101cf9574cde3c2481b8aa2737f6..ac87b7f27dfcc060adb52387b146c45eed996fa7 100644+index ce754ba9f6c23544f9c4b0393e3a3d1f9dcd24c1..caa917248fdd6594792d17c23e75329f35ae1e75 100644--- a/dom/workers/WorkerPrivate.h+++ b/dom/workers/WorkerPrivate.h@@ -417,6 +417,8 @@ class WorkerPrivate final@@ -1986,7 +1996,7 @@ index a670d009759d101cf9574cde3c2481b8aa2737f6..ac87b7f27dfcc060adb52387b146c45evoid UpdateLanguagesInternal(const nsTArray<nsString>& aLanguages);void UpdateJSWorkerMemoryParameterInternal(JSContext* aCx, JSGCParamKey key,-@@ -1036,6 +1038,8 @@ class WorkerPrivate final+@@ -1034,6 +1036,8 @@ class WorkerPrivate finalvoid UpdateContextOptions(const JS::ContextOptions& aContextOptions);@@ -2022,10 +2032,10 @@ index 7a069ef0c59895cf1f8dc35d612f1494c9c9f1ef..5b09dfdcc5323def65c35b0696141b44Span<const char> aTimeZone) {#if MOZ_INTL_USE_ICU_CPP_TIMEZONEdiff --git a/intl/components/src/TimeZone.h b/intl/components/src/TimeZone.h-index 9d0423ef13958d5c443cc3531269603c4801c338..f0c4ba7c528d2be466e0f7669a1e37e876f9091e 100644+index 89770839ae108b5f3462a7f20684fdb72c4ab2fb..a7e40d6b7c33c234b41e586eac573ba4ce3a7d18 100644--- a/intl/components/src/TimeZone.h+++ b/intl/components/src/TimeZone.h-@@ -190,6 +190,8 @@ class TimeZone final {+@@ -191,6 +191,8 @@ class TimeZone final {return FillBufferWithICUCall(aBuffer, ucal_getHostTimeZone);}@@ -2218,10 +2228,10 @@ index dac899f7558b26d6848da8b98ed8a93555c8751a..2a07d67fa1c2840b25085566e84dc3b2// No boxes to returnreturn;diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp-index 31c21c337786b76306029149a925293a44c45c28..7aa4eb0b4980bb8ecdc4e10c91b1cd70e5d0ad08 100644+index 7674abb3d07fb1958eed38e730be83a2b56f75f2..f88a1a3bd6f1df7ebbdd836d82c677de043c5f41 100644--- a/layout/base/PresShell.cpp+++ b/layout/base/PresShell.cpp-@@ -11127,7 +11127,9 @@ bool PresShell::ComputeActiveness() const {+@@ -11205,7 +11205,9 @@ bool PresShell::ComputeActiveness() const {if (!browserChild->IsVisible()) {MOZ_LOG(gLog, LogLevel::Debug,(" > BrowserChild %p is not visible", browserChild));@@ -2232,6 +2242,31 @@ index 31c21c337786b76306029149a925293a44c45c28..7aa4eb0b4980bb8ecdc4e10c91b1cd70}// 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+--- a/layout/base/nsLayoutUtils.cpp++++ b/layout/base/nsLayoutUtils.cpp+@@ -713,6 +713,10 @@ bool nsLayoutUtils::AllowZoomingForDocument(+ !aDocument->GetPresShell()->AsyncPanZoomEnabled()) {+ return false;+ }++++ /* Playwright: disable zooming as we don't support meta viewport tag */++ if (1 == 1) return false;+++ // 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,++ /* static */+ bool nsLayoutUtils::ShouldHandleMetaViewport(const Document* aDocument) {++ /* Playwright: disable meta viewport handling since we don't require one */++ if (1 == 1) return false;+++ BrowsingContext* bc = aDocument->GetBrowsingContext();+ return StaticPrefs::dom_meta_viewport_enabled() || (bc && bc->InRDMPane());+ }diff --git a/layout/style/GeckoBindings.h b/layout/style/GeckoBindings.hindex 7bb839ae18835d128dc9285b7f9dc5b5e06335af..09e3979d07447522ace740daf2b818a6c551ceba 100644--- a/layout/style/GeckoBindings.h@@ -2245,7 +2280,7 @@ index 7bb839ae18835d128dc9285b7f9dc5b5e06335af..09e3979d07447522ace740daf2b818a6const mozilla::dom::Document*);mozilla::StylePrefersColorScheme Gecko_MediaFeatures_PrefersColorScheme(diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp-index f888c127d4423336a8f51e2011fc42eaf6c33f11..51d6e069f4a81c42b4bf270ba44ae4f82b8df592 100644+index fbdde4102dd7872d460760580e93657a6aeb07bd..d51a927f8d5c4788f10ae94543b1630e9dd4420a 100644--- a/layout/style/nsMediaFeatures.cpp+++ b/layout/style/nsMediaFeatures.cpp@@ -260,11 +260,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) {@@ -2266,10 +2301,10 @@ index f888c127d4423336a8f51e2011fc42eaf6c33f11..51d6e069f4a81c42b4bf270ba44ae4f8bool Gecko_MediaFeatures_PrefersReducedTransparency(const Document* aDocument) {diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp-index eb90324c37ce515e5a0fcf75412605ae57ead9ee..6733dd6c99d77399529945386caa3926960e4176 100644+index 6be031113fb1197aa6eecbf6fc109147ca6ee5b1..f836dde97895d4b1177bfcebcaab6420abd855b8 100644--- a/netwerk/base/LoadInfo.cpp+++ b/netwerk/base/LoadInfo.cpp-@@ -653,7 +653,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)+@@ -657,7 +657,8 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)mInterceptionInfo(rhs.mInterceptionInfo),mHasInjectedCookieForCookieBannerHandling(rhs.mHasInjectedCookieForCookieBannerHandling),@@ -2279,7 +2314,7 @@ index eb90324c37ce515e5a0fcf75412605ae57ead9ee..6733dd6c99d77399529945386caa3926}LoadInfo::LoadInfo(-@@ -2369,4 +2370,16 @@ LoadInfo::SetWasSchemelessInput(bool aWasSchemelessInput) {+@@ -2373,4 +2374,16 @@ LoadInfo::SetWasSchemelessInput(bool aWasSchemelessInput) {return NS_OK;}@@ -2341,7 +2376,7 @@ index ddfcb223e6126c943b58e9d198f0e2fa767c3de1..4280b836c55e5778ad4c94226ea537fa+ [infallible] attribute unsigned long long jugglerLoadIdentifier;};diff --git a/netwerk/base/nsINetworkInterceptController.idl b/netwerk/base/nsINetworkInterceptController.idl-index 155daa5cd52c4e93e1cc4559875868f4faf2c37e..02e8a2614a27a4cc9e1de760d4c48617eba25d4d 100644+index 946cc95a8806644f88d38a7b1c7b9c0614e3cbff..a7b92019c5bbf356d1bbacfbff8fca9a041cf62a 100644--- a/netwerk/base/nsINetworkInterceptController.idl+++ b/netwerk/base/nsINetworkInterceptController.idl@@ -59,6 +59,7 @@ interface nsIInterceptedChannel : nsISupports@@ -2353,7 +2388,7 @@ index 155daa5cd52c4e93e1cc4559875868f4faf2c37e..02e8a2614a27a4cc9e1de760d4c48617/*** Set the status and reason for the forthcoming synthesized response.diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp-index d849eab7507f0665a8a79a1b11759afa3481f1ad..3a95d5201a1c1f2161a95e15beae86f2833a875f 100644+index 32d7036ff18828ec8938a8dc0a98ad3297132706..65585e719dda8f62319a5fc34baf69c59e51162c 100644--- a/netwerk/ipc/DocumentLoadListener.cpp+++ b/netwerk/ipc/DocumentLoadListener.cpp@@ -167,6 +167,7 @@ static auto CreateDocumentLoadInfo(CanonicalBrowsingContext* aBrowsingContext,@@ -2514,14 +2549,14 @@ index 73c83e526be1a3a252f995d0718e3975d50bffa7..db5977c54221e19e107a8325a0834302(lazy.isRunningTests || Cu.isInAutomation) &&this.SERVER_URL == "data:,#remote-settings-dummy/v1"diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs-index 8de45d95c2b942f069c898c93702bc7db2219369..be72e9678c3de31b1eaa72cfcb2c8be886f4a80f 100644+index df1c5e464b845b6a8bfedadb86d0e7aab7fd3ffc..34451e791bb59f635134de702d9e5f641fe8df79 100644--- a/servo/components/style/gecko/media_features.rs+++ b/servo/components/style/gecko/media_features.rs-@@ -292,10 +292,15 @@ pub enum ForcedColors {+@@ -303,10 +303,16 @@ impl ForcedColors {/// https://drafts.csswg.org/mediaqueries-5/#forced-colorsfn eval_forced_colors(context: &Context, query_value: Option<ForcedColors>) -> bool {-- let forced = !context.device().use_document_colors();+- let forced = context.device().forced_colors();+ let prefers_forced_colors =+ unsafe { bindings::Gecko_MediaFeatures_ForcedColors(context.device().document()) };+ let query_value = match query_value {@@ -2529,9 +2564,10 @@ index 8de45d95c2b942f069c898c93702bc7db2219369..be72e9678c3de31b1eaa72cfcb2c8be8+ None => return prefers_forced_colors,+ };match query_value {-- Some(query_value) => forced == (query_value == ForcedColors::Active),-- None => forced,+- Some(query_value) => query_value == forced,+- None => forced != ForcedColors::None,+ ForcedColors::Active => prefers_forced_colors,++ ForcedColors::Requested => prefers_forced_colors,+ ForcedColors::None => !prefers_forced_colors,}}@@ -2551,7 +2587,7 @@ index 517c87a285dd93220cb2654d6ba7bb05c66cdeb7..e3010421d8dbe5ed5ed72feedb9f1580// ignored for Linux.const unsigned long CHROME_SUPPRESS_ANIMATION = 1 << 24;diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs-index 15fa2193c6116b5bd0cf2ee608eb5971f3d24370..aa92eb63b8f907e0df9ef8df60fd076aa3d6a472 100644+index 00a5381133f8cec0de452c31c7151801a1acc0b9..5d3e3d6f566dc724f257beaeb994cedaa7e71139 100644--- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs+++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs@@ -108,6 +108,12 @@ EnterprisePoliciesManager.prototype = {@@ -2596,7 +2632,7 @@ index 654903fadb709be976b72f36f155e23bc0622152..815b3dc24c9fda6b1db6c4666ac68904int32_t aMaxSelfProgress,int32_t aCurTotalProgress,diff --git a/toolkit/components/windowwatcher/nsWindowWatcher.cpp b/toolkit/components/windowwatcher/nsWindowWatcher.cpp-index 209af157a35cf9c4586424421ee19b3f680796b6..1feb61e2f18e9a13631addc935f00da07739291e 100644+index b482214d31fe2a50ad075b424bc3f97edbc5148b..bd93fd73f165ef1da6422c6b8f141f0a82d77f0f 100644--- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp+++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp@@ -1853,7 +1853,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(@@ -2638,7 +2674,7 @@ index b697eb1e3b02b0ffcc95a6e492dc23eb888488cc..0f4059341dbb3c2ecb2c46be0850e0d5]diff --git a/toolkit/xre/nsWindowsWMain.cpp b/toolkit/xre/nsWindowsWMain.cpp-index 2a91deec5c10f87ed09f99b659baab77b2b638f2..78f4f30a0efe314563c6405f7b0848d2c3ca0551 100644+index 7eb9e1104682d4eb47060654f43a1efa8b2a6bb2..a8315d6decf654b5302bea5beeea34140c300ded 100644--- a/toolkit/xre/nsWindowsWMain.cpp+++ b/toolkit/xre/nsWindowsWMain.cpp@@ -14,8 +14,10 @@@@ -2652,10 +2688,10 @@ index 2a91deec5c10f87ed09f99b659baab77b2b638f2..78f4f30a0efe314563c6405f7b0848d2#include <windows.h>#ifdef __MINGW32__-@@ -137,6 +139,19 @@ int wmain(int argc, WCHAR** argv) {+@@ -114,6 +116,19 @@ static void FreeAllocStrings(int argc, char** argv) {+ int wmain(int argc, WCHAR** argv) {SanitizeEnvironmentVariables();SetDllDirectoryW(L"");- RemovePrefetchArguments(argc, argv);+ bool hasJugglerPipe =+ mozilla::CheckArg(argc, argv, "juggler-pipe", nullptr,+ mozilla::CheckArgFlag::None) == mozilla::ARG_FOUND;@@ -2832,7 +2868,7 @@ index 1f77e095dbfa3acc046779114007d83fc1cfa087..2354abbab7af6f6bdc3bd628722f03ea* When we download a helper app, we are going to retarget all load* notifications into our own docloader and load group instead ofdiff --git a/uriloader/exthandler/nsIExternalHelperAppService.idl b/uriloader/exthandler/nsIExternalHelperAppService.idl-index 4a399acb72d4fd475c9ae43e9eadbc32f261e290..31e9490a7dfd7d7eff69ad23c9ce277f367d1524 100644+index 4a399acb72d4fd475c9ae43e9eadbc32f261e290..97ace81c82b16a9a993166dd4b0ddb3a721c9872 100644--- a/uriloader/exthandler/nsIExternalHelperAppService.idl+++ b/uriloader/exthandler/nsIExternalHelperAppService.idl@@ -6,8 +6,11 @@@@ -2857,7 +2893,7 @@ index 4a399acb72d4fd475c9ae43e9eadbc32f261e290..31e9490a7dfd7d7eff69ad23c9ce277f+[scriptable, uuid(9a20e9b0-75d0-11ea-bc55-0242ac130003)]+interface nsIDownloadInterceptor : nsISupports+{-+ bool interceptDownloadRequest(in nsIHelperAppLauncher aHandler, in nsIRequest aRequest, in BrowsingContext aBrowsingContext, out nsIFile file);++ boolean interceptDownloadRequest(in nsIHelperAppLauncher aHandler, in nsIRequest aRequest, in BrowsingContext aBrowsingContext, out nsIFile file);++ void onDownloadComplete(in nsIHelperAppLauncher aHandler, in ACString aErrorName);+};@@ -2951,7 +2987,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 @@+@@ -528,6 +528,13 @@ void NativeKeyBindings::GetEditCommandsForTests(break;case KEY_NAME_INDEX_ArrowLeft:if (aEvent.IsAlt()) {@@ -2965,7 +3001,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805break;}if (aEvent.IsMeta() || (aEvent.IsControl() && aEvent.IsShift())) {-@@ -550,6 +557,13 @@+@@ -550,6 +557,13 @@ void NativeKeyBindings::GetEditCommandsForTests(break;case KEY_NAME_INDEX_ArrowRight:if (aEvent.IsAlt()) {@@ -2979,7 +3015,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805break;}if (aEvent.IsMeta() || (aEvent.IsControl() && aEvent.IsShift())) {-@@ -572,6 +586,10 @@+@@ -572,6 +586,10 @@ void NativeKeyBindings::GetEditCommandsForTests(break;case KEY_NAME_INDEX_ArrowUp:if (aEvent.IsControl()) {@@ -2990,7 +3026,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805break;}if (aEvent.IsMeta()) {-@@ -582,7 +600,7 @@+@@ -582,7 +600,7 @@ void NativeKeyBindings::GetEditCommandsForTests(!aEvent.IsShift()? ToObjcSelectorPtr(@selector(moveToBeginningOfDocument:)): ToObjcSelectorPtr(@@ -2999,7 +3035,7 @@ index e4bdf715e2fb899e97a5bfeb2e147127460d6047..3554f919480278b7353617481c7ce805aCommands);break;}-@@ -609,6 +627,10 @@+@@ -609,6 +627,10 @@ void NativeKeyBindings::GetEditCommandsForTests(break;case KEY_NAME_INDEX_ArrowDown:if (aEvent.IsControl()) {@@ -3160,7 +3196,7 @@ index facd2bc65afab8ec1aa322faa20a67464964dfb9..d6dea95472bec6006411753c3dfdab2e} // namespace widgetdiff --git a/widget/headless/HeadlessWidget.cpp b/widget/headless/HeadlessWidget.cpp-index 083d026d3c019cb76fff2b8f605f3d6ef8dd578f..84c049709ead92c980b86230513a634bf6337085 100644+index 419b3bf94011e6874588b042fa520e75522ed2c3..07dc3954986d8257dc4fce1aa810623bb5d90bbd 100644--- a/widget/headless/HeadlessWidget.cpp+++ b/widget/headless/HeadlessWidget.cpp@@ -111,6 +111,8 @@ void HeadlessWidget::Destroy() {@@ -3172,7 +3208,7 @@ index 083d026d3c019cb76fff2b8f605f3d6ef8dd578f..84c049709ead92c980b86230513a634bnsBaseWidget::OnDestroy();nsBaseWidget::Destroy();-@@ -621,5 +623,14 @@ nsresult HeadlessWidget::SynthesizeNativeTouchpadPan(+@@ -620,5 +622,14 @@ nsresult HeadlessWidget::SynthesizeNativeTouchpadPan(return NS_OK;}diff --git a/browser_patches/firefox/preferences/playwright.cfg b/browser_patches/firefox/preferences/playwright.cfgindex 99fbf39420..1921f19c38 100644--- a/browser_patches/firefox/preferences/playwright.cfg+++ b/browser_patches/firefox/preferences/playwright.cfg@@ -47,6 +47,9 @@ pref("permissions.isolateBy.userContext", true);// |Page.setFileInputFiles| protocol method.pref("dom.file.createInChild", true);+// Allow uploading directorys in content process.+pref("dom.filesystem.pathcheck.disabled", true);+// Do not warn when closing all open tabspref("browser.tabs.warnOnClose", false);diff --git a/browser_patches/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.shindex 069f24571c..8127a24878 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="b2ca06dc3d84b356d01cdf09a82049f80515fbfe"+BASE_REVISION="a47deb713746fa2f228e8450a52ed0ecafc5309d"diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diffindex 5df5d455da..84061248f1 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 dcd4c26b1cd99333e9498a483ff4139a8d42d14b..f041439eff7f2649b1560faf18661165b1fd7771 100644+index 3c0295bc0b5f5d417beee189e208f3582b54fdb9..65176f0a49628933887a06690217bfcc5d34f395 100644--- a/Source/JavaScriptCore/CMakeLists.txt+++ b/Source/JavaScriptCore/CMakeLists.txt-@@ -1400,22 +1400,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS+@@ -1389,22 +1389,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json@@ -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..0f3a341056f429ff282abcab22be4843c60f546c 100644+index 528cceee66a1b1c91a0d0e59d5f1a1770a050c17..1e12d22fd2ce5363068ce7f5725f6e76ef7e8ad8 100644--- a/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp+++ b/Source/JavaScriptCore/inspector/IdentifiersFactory.cpp@@ -32,14 +32,21 @@@@ -108,7 +108,7 @@ index 528cceee66a1b1c91a0d0e59d5f1a1770a050c17..0f3a341056f429ff282abcab22be4843static String addPrefixToIdentifier(unsigned long identifier){- return makeString("0."_s, identifier);-+ return makeString(s_processID, ".", identifier);++ return makeString(s_processID, '.', identifier);}+void IdentifiersFactory::initializeWithProcessID(uint64_t processID) {@@ -133,7 +133,7 @@ index eb25aedee4cd9ebe007e06c2515b37ee095b06f4..badf6559595c8377db1089ca3c25008estatic String requestId(unsigned long identifier);};diff --git a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp-index 731a91727561c1507d074ad27f592d274dfeb324..9320b24579466bb1baa8b68430fe9cbb6c152770 100644+index b9296c03d37fa75ec9b6349dca0dd1862df5d348..96e14d95cd24c80a40e9ce4a528db6fe1cfcc534 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,@@ -149,10 +149,10 @@ index 731a91727561c1507d074ad27f592d274dfeb324..9320b24579466bb1baa8b68430fe9cbbreturn nullptr;inspectorObject->setValue(name.string(), inspectorValue.releaseNonNull());diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp-index 820a08fc660633e09675d0e647bd0c50d2fa905a..5ca5ee5a6897b7ef332d906018b457122096df98 100644+index 80f5a61e477022fae12df0ba4f727e7076012fe3..7e513ea23a9a9ca0800ea21a11e51fad3417f1d2 100644--- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp+++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp-@@ -101,7 +101,7 @@ void BackendDispatcher::registerDispatcherForDomain(const String& domain, Supple+@@ -99,7 +99,7 @@ void BackendDispatcher::registerDispatcherForDomain(const String& domain, Supplem_dispatchers.set(domain, dispatcher);}@@ -161,7 +161,7 @@ index 820a08fc660633e09675d0e647bd0c50d2fa905a..5ca5ee5a6897b7ef332d906018b45712{Ref<BackendDispatcher> protect(*this);-@@ -146,6 +146,9 @@ void BackendDispatcher::dispatch(const String& message)+@@ -144,6 +144,9 @@ void BackendDispatcher::dispatch(const String& message)requestId = *requestIdInt;}@@ -172,10 +172,10 @@ index 820a08fc660633e09675d0e647bd0c50d2fa905a..5ca5ee5a6897b7ef332d906018b45712// We could be called re-entrantly from a nested run loop, so restore the previous id.SetForScope scopedRequestId(m_currentRequestId, requestId);diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h-index 31957be19b946aa90d316dc978a301f80956dd9c..d1a01e7546996535eb3884524c251c50a998eb33 100644+index 0c83a1c3baa3bdbb30e53c11aaafd8bda34309cd..127616bbdb65b0867266e5bd6a63bd5a58212870 100644--- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h+++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h-@@ -83,7 +83,10 @@ public:+@@ -84,7 +84,10 @@ public:};void registerDispatcherForDomain(const String& domain, SupplementalBackendDispatcher*);@@ -222,10 +222,10 @@ index 0cc2127c9c12c2d82dea9550bad73f4ffb99ba24..8ca65cc042d435cbc0e05dcc5c5dfc95}diff --git a/Source/JavaScriptCore/inspector/InspectorTarget.h b/Source/JavaScriptCore/inspector/InspectorTarget.h-index 88b72e94c4e8636de88419733b0a63ad4e0b9a73..153ee84f2c7ef86c548c62a65d6ad99214090230 100644+index 082dd93cb0505c5bc7a2d5a7cf78fa0306809082..3f50f49ef9e691b3dc57dafd66c1e7d323736f40 100644--- a/Source/JavaScriptCore/inspector/InspectorTarget.h+++ b/Source/JavaScriptCore/inspector/InspectorTarget.h-@@ -57,8 +57,12 @@ public:+@@ -66,8 +66,12 @@ public:virtual void connect(FrontendChannel::ConnectionType) = 0;virtual void disconnect() = 0;virtual void sendMessageToTargetBackend(const String&) = 0;@@ -392,7 +392,7 @@ index 4edcbf5f4aee2eb8e5675a23b9db67e9d640ef7f..a32b0f3a5de49e58b8a35cec9202b788// FrontendChannelFrontendChannel::ConnectionType connectionType() const;diff --git a/Source/JavaScriptCore/inspector/protocol/DOM.json b/Source/JavaScriptCore/inspector/protocol/DOM.json-index fc7612613d09e03f481c567a8a4a121884e2cb6c..b0a7b284684bccaa7dfb0892a64d4a803357ccc1 100644+index 27c65fbda226f1cd5bfd68944fe87fb9b2a688a6..b036f050859ee88004a7bf6daa4bb73835360615 100644--- a/Source/JavaScriptCore/inspector/protocol/DOM.json+++ b/Source/JavaScriptCore/inspector/protocol/DOM.json@@ -80,6 +80,16 @@@@ -412,7 +412,7 @@ index fc7612613d09e03f481c567a8a4a121884e2cb6c..b0a7b284684bccaa7dfb0892a64d4a80{"id": "EventListener","type": "object",-@@ -267,6 +277,16 @@+@@ -268,6 +278,16 @@{ "name": "width", "type": "number" },{ "name": "height", "type": "number" }]@@ -429,7 +429,7 @@ index fc7612613d09e03f481c567a8a4a121884e2cb6c..b0a7b284684bccaa7dfb0892a64d4a80}],"commands": [-@@ -696,7 +716,10 @@+@@ -697,7 +717,10 @@"description": "Resolves JavaScript node object for given node id.","targetTypes": ["page"],"parameters": [@@ -441,7 +441,7 @@ index fc7612613d09e03f481c567a8a4a121884e2cb6c..b0a7b284684bccaa7dfb0892a64d4a80{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }],"returns": [-@@ -773,6 +796,46 @@+@@ -774,6 +797,47 @@"returns": [{ "name": "mediaStats", "$ref": "MediaStats", "description": "An interleaved array of node attribute names and values." }]@@ -484,7 +484,8 @@ index fc7612613d09e03f481c567a8a4a121884e2cb6c..b0a7b284684bccaa7dfb0892a64d4a80+ { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Input element handle." },+ { "name": "files", "type": "array", "items": { "$ref": "FilePayload" }, "optional": true, "description": "Files to set" },+ { "name": "paths", "type": "array", "items": { "type": "string" }, "optional": true, "description": "File paths to set" }-+ ]++ ],++ "async": true}],"events": [@@ -532,10 +533,10 @@ index 0000000000000000000000000000000000000000..79edea03fed4e9be5da96e1275e182a4+}diff --git a/Source/JavaScriptCore/inspector/protocol/Emulation.json b/Source/JavaScriptCore/inspector/protocol/Emulation.jsonnew file mode 100644-index 0000000000000000000000000000000000000000..2a49dd417360da37c83c4d375de468f949dce5db+index 0000000000000000000000000000000000000000..8377901cb3ad75c29532a1f0f547efb53558a327--- /dev/null+++ b/Source/JavaScriptCore/inspector/protocol/Emulation.json-@@ -0,0 +1,52 @@+@@ -0,0 +1,59 @@+{+ "domain": "Emulation",+ "availability": ["web"],@@ -585,6 +586,13 @@ index 0000000000000000000000000000000000000000..2a49dd417360da37c83c4d375de468f9+ {+ "name": "resetPermissions",+ "description": "Clears permission overrides."++ },++ {++ "name": "setOrientationOverride",++ "description": "Overrides window.orientation with provided value.",++ "parameters": [++ { "name": "angle", "type": "integer", "optional": true }++ ]+ }+ ]+}@@ -836,7 +844,7 @@ index 96af27ece2ac200e11c4311b3ca0d9d3b5a048da..3168f7806fcbdabec07acc5e304bae1e],"events": [diff --git a/Source/JavaScriptCore/inspector/protocol/Page.json b/Source/JavaScriptCore/inspector/protocol/Page.json-index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..7e6c8b8954ed3d5d4ac77dfe51d0e08c56a7a5fc 100644+index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..829bd459b62568e73fadd806adc14c6462bbff82 100644--- a/Source/JavaScriptCore/inspector/protocol/Page.json+++ b/Source/JavaScriptCore/inspector/protocol/Page.json@@ -20,7 +20,14 @@@@ -988,7 +996,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..7e6c8b8954ed3d5d4ac77dfe51d0e08c],"returns": [{ "name": "dataURL", "type": "string", "description": "Base64-encoded image data (PNG)." }-@@ -321,12 +417,71 @@+@@ -321,12 +417,64 @@{"name": "setScreenSizeOverride","description": "Overrides screen size exposed to DOM and used in media queries for testing with provided values.",@@ -1049,19 +1057,12 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..7e6c8b8954ed3d5d4ac77dfe51d0e08c+ "description": "Crashes the page process"+ },+ {-+ "name": "setOrientationOverride",-+ "description": "Overrides window.orientation with provided value.",-+ "parameters": [-+ { "name": "angle", "type": "integer", "optional": true }-+ ]-+ },-+ {+ "name": "updateScrollingState",+ "description": "Ensures that the scroll regions are up to date."}],"events": [-@@ -334,14 +489,16 @@+@@ -334,14 +482,16 @@"name": "domContentEventFired","targetTypes": ["page"],"parameters": [@@ -1080,7 +1081,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..7e6c8b8954ed3d5d4ac77dfe51d0e08c]},{-@@ -351,6 +508,14 @@+@@ -351,6 +501,14 @@{ "name": "frame", "$ref": "Frame", "description": "Frame object." }]},@@ -1095,7 +1096,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..7e6c8b8954ed3d5d4ac77dfe51d0e08c{"name": "frameDetached","description": "Fired when frame has been detached from its parent.",-@@ -379,7 +544,8 @@+@@ -379,7 +537,8 @@"targetTypes": ["page"],"parameters": [{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has scheduled a navigation." },@@ -1105,7 +1106,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..7e6c8b8954ed3d5d4ac77dfe51d0e08c]},{-@@ -390,6 +556,22 @@+@@ -390,6 +549,22 @@{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has cleared its scheduled navigation." }]},@@ -1128,7 +1129,7 @@ index b5e2bb2eb58765ec20392b36bf5ef1ac35857a69..7e6c8b8954ed3d5d4ac77dfe51d0e08c{"name": "defaultUserPreferencesDidChange","description": "Fired when the default value of a user preference changes at the system level.",-@@ -397,6 +579,42 @@+@@ -397,6 +572,42 @@"parameters": [{ "name": "preferences", "type": "array", "items": { "$ref": "UserPreference" }, "description": "List of user preferences that can be overriden and their new system (default) values." }]@@ -1635,7 +1636,7 @@ index 52920cded24a9c6b0ef6fb4e518664955db4f9fa..bbbabc4e7259088b9404e8cc07eecd6f},{diff --git a/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp b/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp-index dd1286cec6e77895f519911c89719b6064db6949..b732e0eab0fd29e1a1c9a2179cc86a951768c062 100644+index 56a8f09aa0f4985f1af99f31f000b03dcb0c3901..f6f577b897d0b37df5d193df07702a190b8ed6a4 100644--- a/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp+++ b/Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp@@ -28,7 +28,6 @@@@ -1647,10 +1648,10 @@ index dd1286cec6e77895f519911c89719b6064db6949..b732e0eab0fd29e1a1c9a2179cc86a95namespace JSC { namespace Profiler {diff --git a/Source/JavaScriptCore/runtime/ConsoleClient.h b/Source/JavaScriptCore/runtime/ConsoleClient.h-index 72c81757450ad5ebacd5fd20d2a16095514802ec..b7d8ab1e04d3850180079870468b28eff504626a 100644+index 24891ad836086fd23024fcb4d08ca63f6974c812..29f4b6b1923383fec7a99d28a4e815dc4536d160 100644--- a/Source/JavaScriptCore/runtime/ConsoleClient.h+++ b/Source/JavaScriptCore/runtime/ConsoleClient.h-@@ -69,6 +69,7 @@ public:+@@ -78,6 +78,7 @@ public:virtual void record(JSGlobalObject*, Ref<Inspector::ScriptArguments>&&) = 0;virtual void recordEnd(JSGlobalObject*, Ref<Inspector::ScriptArguments>&&) = 0;virtual void screenshot(JSGlobalObject*, Ref<Inspector::ScriptArguments>&&) = 0;@@ -1659,10 +1660,18 @@ index 72c81757450ad5ebacd5fd20d2a16095514802ec..b7d8ab1e04d3850180079870468b28efprivate:enum ArgumentRequirement { ArgumentRequired, ArgumentNotRequired };diff --git a/Source/ThirdParty/libwebrtc/CMakeLists.txt b/Source/ThirdParty/libwebrtc/CMakeLists.txt-index d6b1e73b1268a1224c2d77b936ce46347be62dac..acd1950327608988059a7e972fb4d40f9efc0c68 100644+index edfc7022920e6fd9300b5b1a58a1c161096c0aa5..7f68528deb95c970c030c9effd0bdea843c67624 100644--- a/Source/ThirdParty/libwebrtc/CMakeLists.txt+++ b/Source/ThirdParty/libwebrtc/CMakeLists.txt-@@ -452,6 +452,7 @@ set(webrtc_SOURCES+@@ -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_SOURCESSource/third_party/boringssl/src/crypto/x509/x_val.cSource/third_party/boringssl/src/crypto/x509/x_x509a.cSource/third_party/boringssl/src/crypto/x509/x_x509.c@@ -1670,7 +1679,7 @@ index d6b1e73b1268a1224c2d77b936ce46347be62dac..acd1950327608988059a7e972fb4d40fSource/third_party/boringssl/src/decrepit/bio/base64_bio.cSource/third_party/boringssl/src/decrepit/blowfish/blowfish.cSource/third_party/boringssl/src/decrepit/cast/cast.c-@@ -530,6 +531,11 @@ set(webrtc_SOURCES+@@ -533,6 +533,11 @@ set(webrtc_SOURCESSource/third_party/crc32c/src/src/crc32c.ccSource/third_party/crc32c/src/src/crc32c_portable.ccSource/third_party/crc32c/src/src/crc32c_sse42.cc@@ -1682,7 +1691,7 @@ index d6b1e73b1268a1224c2d77b936ce46347be62dac..acd1950327608988059a7e972fb4d40fSource/third_party/libyuv/source/compare.ccSource/third_party/libyuv/source/compare_common.ccSource/third_party/libyuv/source/compare_gcc.cc-@@ -2270,6 +2276,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE+@@ -2404,6 +2409,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATESource/third_party/libsrtp/configSource/third_party/libsrtp/crypto/includeSource/third_party/libsrtp/include@@ -1694,7 +1703,7 @@ index d6b1e73b1268a1224c2d77b936ce46347be62dac..acd1950327608988059a7e972fb4d40fSource/third_party/opus/src/celtSource/third_party/opus/src/includediff --git a/Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig b/Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig-index 94f6675a8b7ca64e12aaf1c3b01848f0a6b737a8..20660f511914ebb7877e050bb5bc232c3df2daa5 100644+index 5155536dddb0d3627a021a28e6d733fde5ffbf1b..02c8aad77cd735d7e3cc5f072d62cc50c5b9aace 100644--- a/Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig+++ b/Source/ThirdParty/libwebrtc/Configurations/Base-libwebrtc.xcconfig@@ -21,7 +21,7 @@@@ -1760,7 +1769,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 f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e143329e31ee0 100644+index c25fd16f75eacc283d613509f3232b8de6ddde40..01ec8f8556149cf22a5304771a0b61b6a981a2a0 100644--- a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj+++ b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj@@ -35,6 +35,20 @@@@ -1784,7 +1793,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433/* 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, ); }; };-@@ -5118,6 +5132,9 @@+@@ -5135,6 +5149,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 */; };@@ -1794,7 +1803,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433/* End PBXBuildFile section *//* Begin PBXBuildRule section */-@@ -5606,6 +5623,13 @@+@@ -5623,6 +5640,13 @@remoteGlobalIDString = DDF30D0527C5C003006A526F;remoteInfo = absl;};@@ -1808,7 +1817,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433/* End PBXContainerItemProxy section *//* Begin PBXCopyFilesBuildPhase section */-@@ -11165,6 +11189,9 @@+@@ -11200,6 +11224,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>"; };@@ -1818,7 +1827,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433FB39D0D11200F0E300088E69 /* libwebrtc.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwebrtc.dylib; sourceTree = BUILT_PRODUCTS_DIR; };/* End PBXFileReference section */-@@ -19991,6 +20018,7 @@+@@ -20044,6 +20071,7 @@isa = PBXGroup;children = (CDFD2F9224C4B2F90048DAC3 /* common */,@@ -1826,7 +1835,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433CDEBB19224C0191800ADBD44 /* webm_parser */,);path = libwebm;-@@ -20418,6 +20446,16 @@+@@ -20471,6 +20499,16 @@path = include;sourceTree = "<group>";};@@ -1843,7 +1852,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433FB39D06E1200ED9200088E69 = {isa = PBXGroup;children = (-@@ -23693,6 +23731,7 @@+@@ -23761,6 +23799,7 @@);dependencies = (410B3827292B73E90003E515 /* PBXTargetDependency */,@@ -1851,7 +1860,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433DD2E76E827C6B69A00F2A74C /* PBXTargetDependency */,CDEBB4CC24C01AB400ADBD44 /* PBXTargetDependency */,411ED040212E0811004320BA /* PBXTargetDependency */,-@@ -23775,6 +23814,7 @@+@@ -23843,6 +23882,7 @@4460B8B92B155B6A00392062 /* vp9_qp_parser_fuzzer */,444A6EF02AEADFC9005FE121 /* vp9_replay_fuzzer */,44945C512B9BA1C300447FFD /* webm_fuzzer */,@@ -1859,7 +1868,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433);};/* End PBXProject section */-@@ -23858,6 +23898,23 @@+@@ -23926,6 +23966,23 @@shellPath = /bin/sh;shellScript = "\"${SRCROOT}/Scripts/create-symlink-to-altroot.sh\"\n";};@@ -1883,7 +1892,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433/* End PBXShellScriptBuildPhase section *//* Begin PBXSourcesBuildPhase section */-@@ -25831,6 +25888,9 @@+@@ -25901,6 +25958,9 @@5CDD865E1E43B8B500621E92 /* min_max_operations.c in Sources */,4189395B242A71F5007FDC41 /* min_video_bitrate_experiment.cc in Sources */,41B8D8FB28CB85CB00E5FA37 /* missing_mandatory_parameter_cause.cc in Sources */,@@ -1893,7 +1902,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e14334131C387234B957D0028A615 /* moving_average.cc in Sources */,41FCBB1521B1F7AA00A5DF27 /* moving_average.cc in Sources */,5CD286101E6A64C90094FDC8 /* moving_max.cc in Sources */,-@@ -26708,6 +26768,11 @@+@@ -26778,6 +26838,11 @@target = DDF30D0527C5C003006A526F /* absl */;targetProxy = DD2E76E727C6B69A00F2A74C /* PBXContainerItemProxy */;};@@ -1905,7 +1914,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433/* End PBXTargetDependency section *//* Begin XCBuildConfiguration section */-@@ -27283,6 +27348,27 @@+@@ -27353,6 +27418,27 @@};name = Production;};@@ -1933,7 +1942,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433FB39D0711200ED9200088E69 /* Debug */ = {isa = XCBuildConfiguration;baseConfigurationReference = 5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */;-@@ -27585,6 +27671,16 @@+@@ -27655,6 +27741,16 @@defaultConfigurationIsVisible = 0;defaultConfigurationName = Production;};@@ -1951,7 +1960,7 @@ index f5f1d0ef71f7fcf175b016ddaefd99f18d96c1c3..5632dcb4919eb22133a62810b91e1433isa = XCConfigurationList;buildConfigurations = (diff --git a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml-index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f3709867ab8f 100644+index 7dc92bd115c44d969d31491db7ce123587f4a7fe..c0628987487ee41f927fc1bb4aa73dfba0791949 100644--- a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml+++ b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml@@ -562,6 +562,7 @@ ApplePayEnabled:@@ -1971,7 +1980,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370WebCore:default: false-@@ -1739,9 +1740,10 @@ CrossOriginEmbedderPolicyEnabled:+@@ -1781,9 +1782,10 @@ CrossOriginEmbedderPolicyEnabled:WebCore:default: false@@ -1983,7 +1992,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370category: securityhumanReadableName: "Cross-Origin-Opener-Policy (COOP) header"humanReadableDescription: "Support for Cross-Origin-Opener-Policy (COOP) header"-@@ -1749,7 +1751,7 @@ CrossOriginOpenerPolicyEnabled:+@@ -1791,7 +1793,7 @@ CrossOriginOpenerPolicyEnabled:WebKitLegacy:default: falseWebKit:@@ -1992,7 +2001,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370WebCore:default: false-@@ -1793,7 +1795,7 @@ CustomPasteboardDataEnabled:+@@ -1835,7 +1837,7 @@ CustomPasteboardDataEnabled:WebKitLegacy:default: falseWebKit:@@ -2001,7 +2010,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370default: falseCustomStateSetEnabled:-@@ -1852,6 +1854,7 @@ DOMAudioSessionFullEnabled:+@@ -1894,6 +1896,7 @@ DOMAudioSessionFullEnabled:WebCore:default: false@@ -2009,7 +2018,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370DOMPasteAccessRequestsEnabled:type: boolstatus: internal-@@ -1863,7 +1866,7 @@ DOMPasteAccessRequestsEnabled:+@@ -1905,7 +1908,7 @@ DOMPasteAccessRequestsEnabled:default: falseWebKit:"PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(VISION)": true@@ -2018,7 +2027,16 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370WebCore:default: false-@@ -3232,6 +3235,7 @@ InspectorAttachmentSide:+@@ -2249,7 +2252,7 @@ DirectoryUploadEnabled:+ 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+@@ -3261,6 +3264,7 @@ InspectorAttachmentSide:WebKit:default: 0@@ -2026,7 +2044,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370InspectorStartsAttached:type: boolstatus: embedder-@@ -3239,7 +3243,7 @@ InspectorStartsAttached:+@@ -3268,7 +3272,7 @@ InspectorStartsAttached:exposed: [ WebKit ]defaultValue:WebKit:@@ -2035,7 +2053,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370InspectorWindowFrame:type: String-@@ -3593,9 +3597,10 @@ LayoutViewportHeightExpansionFactor:+@@ -3622,9 +3626,10 @@ LayoutViewportHeightExpansionFactor:WebCore:default: 0@@ -2047,7 +2065,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370category: htmlhumanReadableName: "Lazy iframe loading"humanReadableDescription: "Enable lazy iframe loading support"-@@ -3603,9 +3608,9 @@ LazyIframeLoadingEnabled:+@@ -3632,9 +3637,9 @@ LazyIframeLoadingEnabled:WebKitLegacy:default: trueWebKit:@@ -2059,7 +2077,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370LazyImageLoadingEnabled:type: bool-@@ -5028,6 +5033,19 @@ PitchCorrectionAlgorithm:+@@ -5084,6 +5089,19 @@ PitchCorrectionAlgorithm:WebCore:default: MediaPlayerEnums::PitchCorrectionAlgorithm::BestAllAround@@ -2079,7 +2097,16 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370PointerLockOptionsEnabled:type: boolstatus: testable-@@ -6778,6 +6796,7 @@ UseCGDisplayListsForDOMRendering:+@@ -5622,7 +5640,7 @@ ScreenOrientationAPIEnabled:+ WebKitLegacy:+ default: false+ WebKit:+- default: WebKit::defaultShouldEnableScreenOrientationAPI()++ default: true+ WebCore:+ default: false++@@ -6854,6 +6872,7 @@ UseCGDisplayListsForDOMRendering:WebKit:default: true@@ -2087,7 +2114,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370UseGPUProcessForCanvasRenderingEnabled:type: boolstatus: stable-@@ -6790,7 +6809,7 @@ UseGPUProcessForCanvasRenderingEnabled:+@@ -6866,7 +6885,7 @@ UseGPUProcessForCanvasRenderingEnabled:defaultValue:WebKit:"ENABLE(GPU_PROCESS_BY_DEFAULT)": true@@ -2096,7 +2123,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370default: falseUseGPUProcessForDOMRenderingEnabled:-@@ -6800,7 +6819,7 @@ UseGPUProcessForDOMRenderingEnabled:+@@ -6876,7 +6895,7 @@ UseGPUProcessForDOMRenderingEnabled:humanReadableName: "GPU Process: DOM Rendering"humanReadableDescription: "Enable DOM rendering in GPU Process"webcoreBinding: none@@ -2105,7 +2132,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370exposed: [ WebKit ]defaultValue:WebKit:-@@ -6832,6 +6851,7 @@ UseGPUProcessForMediaEnabled:+@@ -6908,6 +6927,7 @@ UseGPUProcessForMediaEnabled:"ENABLE(GPU_PROCESS_BY_DEFAULT)": truedefault: false@@ -2113,7 +2140,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370UseGPUProcessForWebGLEnabled:type: boolstatus: internal-@@ -6843,7 +6863,7 @@ UseGPUProcessForWebGLEnabled:+@@ -6919,7 +6939,7 @@ UseGPUProcessForWebGLEnabled:default: falseWebKit:"ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": true@@ -2123,7 +2150,7 @@ index 110e762586d9dc98b3a11a5cf5d1501334b2463f..870e1950740d745588cbfdc8abd3f370WebCore:"ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": truediff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h-index 6f547f01a22d1aba86b813fc77679124a643ef72..34fbae99c2e64f2a34a83d878da76f9c75d0bea5 100644+index ad8e407924f61aec230fea626efc6fb01f21f9f7..65b4a862906752f53e9d95d3238271846290329f 100644--- a/Source/WTF/wtf/PlatformEnable.h+++ b/Source/WTF/wtf/PlatformEnable.h@@ -401,7 +401,7 @@@@ -2145,10 +2172,10 @@ index 6f547f01a22d1aba86b813fc77679124a643ef72..34fbae99c2e64f2a34a83d878da76f9c#if !defined(ENABLE_TOUCH_ACTION_REGIONS)diff --git a/Source/WTF/wtf/PlatformEnableCocoa.h b/Source/WTF/wtf/PlatformEnableCocoa.h-index d797c28eccac0578c7c504fa0c7b34d517746b17..32e815241e2513c979d1af01ef88b494851a2409 100644+index 119cfbc1e518ca18fd7fe925e433054fc071f4d6..e4111b7f6ed0c0245e8ca1f7d1a4b3f674312615 100644--- a/Source/WTF/wtf/PlatformEnableCocoa.h+++ b/Source/WTF/wtf/PlatformEnableCocoa.h-@@ -775,7 +775,7 @@+@@ -780,7 +780,7 @@#endif#if !defined(ENABLE_SEC_ITEM_SHIM)@@ -2158,19 +2185,19 @@ index d797c28eccac0578c7c504fa0c7b34d517746b17..32e815241e2513c979d1af01ef88b494#if !defined(ENABLE_SERVER_PRECONNECT)diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h-index cb5e806040f4e6e2bf94a4c27b05892af7e4301d..81fd915ce2643522b225139661da9f7dedf32469 100644+index 770c60d0bfdb4219917347d24e06f6076f447ebd..153e93b0ad35f4f3182c619fc25ecc1bd236a3e6 100644--- a/Source/WTF/wtf/PlatformHave.h+++ b/Source/WTF/wtf/PlatformHave.h-@@ -419,7 +419,7 @@+@@ -418,7 +418,7 @@#define HAVE_FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT 1#endif--#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST) || PLATFORM(VISION) || PLATFORM(GTK) || PLATFORM(WPE)-+#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST) || PLATFORM(VISION) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)+-#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)++#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)#define HAVE_OS_DARK_MODE_SUPPORT 1#endif-@@ -1274,7 +1274,8 @@+@@ -1262,7 +1262,8 @@#endif#if PLATFORM(MAC)@@ -2181,11 +2208,11 @@ index cb5e806040f4e6e2bf94a4c27b05892af7e4301d..81fd915ce2643522b225139661da9f7d#if !defined(HAVE_LOCKDOWN_MODE_PDF_ADDITIONS) && \diff --git a/Source/WTF/wtf/unicode/UTF8Conversion.h b/Source/WTF/wtf/unicode/UTF8Conversion.h-index f45ef73d81bd02c0b542e98ff01f59d88f57b8a0..0fb91174b8e6641d20b4ee084ec48910cdf7b836 100644+index 007b8fe3292f326504013be8198ae020f7aacf35..4439f901b4a9a92d881c7cee24ad9cd28149d276 100644--- a/Source/WTF/wtf/unicode/UTF8Conversion.h+++ b/Source/WTF/wtf/unicode/UTF8Conversion.h-@@ -28,6 +28,10 @@- #include <unicode/utypes.h>+@@ -27,6 +27,10 @@+#include <wtf/text/LChar.h>+#ifdef Success@@ -2196,10 +2223,10 @@ index f45ef73d81bd02c0b542e98ff01f59d88f57b8a0..0fb91174b8e6641d20b4ee084ec48910namespace Unicode {diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make-index 9dd05dd4e7ad824cae7c47d61117a2bbde10c3e5..015b2ce422f594860a77b0382e9a3857f2db4ff6 100644+index bad5e65c0f8eb201e0865430156c19501a6f357d..daa60c7b289870a77f3af4bbb24fa8c2632ccaa1 100644--- a/Source/WebCore/DerivedSources.make+++ b/Source/WebCore/DerivedSources.make-@@ -1149,6 +1149,10 @@ JS_BINDING_IDLS := \+@@ -1150,6 +1150,10 @@ JS_BINDING_IDLS := \$(WebCore)/dom/Slotable.idl \$(WebCore)/dom/StaticRange.idl \$(WebCore)/dom/StringCallback.idl \@@ -2210,7 +2237,7 @@ index 9dd05dd4e7ad824cae7c47d61117a2bbde10c3e5..015b2ce422f594860a77b0382e9a3857$(WebCore)/dom/Text.idl \$(WebCore)/dom/TextDecoder.idl \$(WebCore)/dom/TextDecoderStream.idl \-@@ -1735,9 +1739,6 @@ JS_BINDING_IDLS := \+@@ -1737,9 +1741,6 @@ JS_BINDING_IDLS := \ADDITIONAL_BINDING_IDLS = \DocumentTouch.idl \GestureEvent.idl \@@ -2221,17 +2248,17 @@ index 9dd05dd4e7ad824cae7c47d61117a2bbde10c3e5..015b2ce422f594860a77b0382e9a3857vpath %.in $(WEBKITADDITIONS_HEADER_SEARCH_PATHS)diff --git a/Source/WebCore/Modules/geolocation/Geolocation.cpp b/Source/WebCore/Modules/geolocation/Geolocation.cpp-index 32fde85425cbb82eb30bcc7aef58155026d2b7b7..a35495d97fcf0346e4696e26df80cf4a8fb890d6 100644+index 6cfaedf99ffdc456d0d0cc631636d1719981c598..682b822d464f084be76a5272f44b23adcd20ed21 100644--- a/Source/WebCore/Modules/geolocation/Geolocation.cpp+++ b/Source/WebCore/Modules/geolocation/Geolocation.cpp-@@ -357,8 +357,9 @@ bool Geolocation::shouldBlockGeolocationRequests()- bool isSecure = SecurityOrigin::isSecure(document()->url()) || document()->isSecureContext();- bool hasMixedContent = !document()->foundMixedContent().isEmpty();+@@ -359,8 +359,9 @@ bool Geolocation::shouldBlockGeolocationRequests()+ bool isSecure = SecurityOrigin::isSecure(document->url()) || document->isSecureContext();+ bool hasMixedContent = !document->foundMixedContent().isEmpty();bool isLocalOrigin = securityOrigin()->isLocal();+ bool isPotentiallyTrustworthy = securityOrigin()->isPotentiallyTrustworthy();- if (document()->canAccessResource(ScriptExecutionContext::ResourceType::Geolocation) != ScriptExecutionContext::HasResourceAccess::No) {+ if (document->canAccessResource(ScriptExecutionContext::ResourceType::Geolocation) != ScriptExecutionContext::HasResourceAccess::No) {- if (isLocalOrigin || (isSecure && !hasMixedContent))-+ if (isLocalOrigin || isPotentiallyTrustworthy || (isSecure && !hasMixedContent))++ if (isLocalOrigin || (isSecure && !hasMixedContent) || isPotentiallyTrustworthy)return false;}@@ -2284,10 +2311,10 @@ index c6a03b56d8358316c9ce422c1a11438bd216f80f..69fbd319b7cd084ca125a8db1b5d92efset(CSS_VALUE_PLATFORM_DEFINES "HAVE_OS_DARK_MODE_SUPPORT=1")diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt-index eece14fded1942140af81dede0861fb5f79fb532..cd3c5ebaccd268695d9e7bc0b96f30522c42e43e 100644+index 9b508a64017aaba7038419d75b2026326c6b3408..79060874c56510b59c874b8969c816bfb0214b3a 100644--- a/Source/WebCore/SourcesCocoa.txt+++ b/Source/WebCore/SourcesCocoa.txt-@@ -713,3 +713,9 @@ testing/cocoa/WebViewVisualIdentificationOverlay.mm+@@ -715,3 +715,9 @@ testing/cocoa/WebViewVisualIdentificationOverlay.mmplatform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unifyplatform/graphics/cocoa/GraphicsContextGLCocoa.mm @no-unifyplatform/graphics/cv/GraphicsContextGLCVCocoa.cpp @no-unify@@ -2344,10 +2371,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 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf284999d5d763 100644+index d6bd3e93dbaf2ccf6171d38aadc56fd9bc0841d1..38a9c62b6b1106e6ccb705012d93eb552e10cb91 100644--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj-@@ -6216,6 +6216,13 @@+@@ -6220,6 +6220,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, ); }; };@@ -2361,7 +2388,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf2849F12171F616A8CF0B000053CA /* 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, ); }; };-@@ -20126,6 +20133,14 @@+@@ -20217,6 +20224,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>"; };@@ -2376,7 +2403,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf2849F12171F316A8BC63000053CA /* 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>"; };-@@ -27745,6 +27760,11 @@+@@ -27846,6 +27861,11 @@BC4A5324256055590028C592 /* TextDirectionSubmenuInclusionBehavior.h */,2D4F96F11A1ECC240098BF88 /* TextIndicator.cpp */,2D4F96F21A1ECC240098BF88 /* TextIndicator.h */,@@ -2388,7 +2415,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf2849F48570A42644C76D00C05F71 /* TranslationContextMenuInfo.h */,F4E1965F21F26E4E00285078 /* UndoItem.cpp */,2ECDBAD521D8906300F00ECD /* UndoItem.h */,-@@ -34075,6 +34095,8 @@+@@ -34246,6 +34266,8 @@29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */,1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */,1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */,@@ -2397,7 +2424,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf28490FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */,935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,F491A66A2A9FEFA300F96146 /* PlatformWheelEvent.serialization.in */,-@@ -36745,6 +36767,7 @@+@@ -36916,6 +36938,7 @@AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */,6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */,6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */,@@ -2405,7 +2432,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf28497CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */,7CE7FA591EF882300060C9D6 /* DocumentTouch.h */,A8185F3209765765005826D9 /* DocumentType.cpp */,-@@ -41482,6 +41505,8 @@+@@ -41657,6 +41680,8 @@F4E90A3C2B52038E002DA469 /* PlatformTextAlternatives.h in Headers */,0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */,074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */,@@ -2414,7 +2441,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf2849CDD08ABD277E542600EA3755 /* PlatformTrackConfiguration.h in Headers */,CD1F9B022700323D00617EB6 /* PlatformVideoColorPrimaries.h in Headers */,CD1F9B01270020B700617EB6 /* PlatformVideoColorSpace.h in Headers */,-@@ -42762,6 +42787,7 @@+@@ -42939,6 +42964,7 @@0F54DD081881D5F5003EEDBB /* Touch.h in Headers */,71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */,0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */,@@ -2422,7 +2449,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf28490F54DD0A1881D5F5003EEDBB /* TouchList.h in Headers */,070334D71459FFD5008D8D45 /* TrackBase.h in Headers */,BE88E0C21715CE2600658D98 /* TrackListBase.h in Headers */,-@@ -43910,6 +43936,8 @@+@@ -44089,6 +44115,8 @@2D22830323A8470700364B7E /* CursorMac.mm in Sources */,5CBD59592280E926002B22AA /* CustomHeaderFields.cpp in Sources */,07E4BDBF2A3A5FAB000D5509 /* DictationCaretAnimator.cpp in Sources */,@@ -2431,7 +2458,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf28497CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */,4667EA3E2968D9DA00BAB1E2 /* GameControllerHapticEffect.mm in Sources */,46FE73D32968E52000B8064C /* GameControllerHapticEngines.mm in Sources */,-@@ -43997,6 +44025,9 @@+@@ -44176,6 +44204,9 @@CE88EE262414467B007F29C2 /* TextAlternativeWithRange.mm in Sources */,BE39137129B267F500FA5D4F /* TextTransformCocoa.cpp in Sources */,51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,@@ -2442,7 +2469,7 @@ index 8807578bc8e503fce83e9acc30029cef75b7f071..7fffb6499c200dca0c3ee777feaf2849538EC8021F96AF81004D22A8 /* 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 9253fbb9de00b2768dd67c6efa20a2242e2e6621..c758a4e9b6f779458a611b6458ba89de1c17e4c8 100644+index a54b85c9d3a0fbd0e24c2b0398eafe44830d2cbc..e23ae4813a861b7c6fdfad06951f02bee76201db 100644--- a/Source/WebCore/accessibility/AccessibilityObject.cpp+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp@@ -66,6 +66,7 @@@@ -2453,7 +2480,7 @@ index 9253fbb9de00b2768dd67c6efa20a2242e2e6621..c758a4e9b6f779458a611b6458ba89de#include "LocalFrame.h"#include "LocalizedStrings.h"#include "MathMLNames.h"-@@ -4075,9 +4076,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const+@@ -3992,9 +3993,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() constif (roleValue() == AccessibilityRole::ApplicationDialog)return AccessibilityObjectInclusion::IncludeObject;@@ -2471,7 +2498,7 @@ index 9253fbb9de00b2768dd67c6efa20a2242e2e6621..c758a4e9b6f779458a611b6458ba89de{AXComputedObjectAttributeCache* attributeCache = nullptr;diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h-index f20ac9d4d61a6f396e9ed796c8e6c5b8a7ea0577..3151b5e54ea17c0d979d22a0cc43c5ce0688c183 100644+index a5a6d8a0c426db0b465d3c932de52f0678d5f5e8..75bb28488a3790ff0bfda8af3f3b641d9b519bd5 100644--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h@@ -183,6 +183,8 @@ namespace WebCore {@@ -2544,7 +2571,7 @@ index 6ca2550bf509381165e5da22cc894ccf6378f45c..535bd1b05e8d90b291235cfc3cb42508static Ref<DataTransfer> createForDrop(const Document&, std::unique_ptr<Pasteboard>&&, OptionSet<DragOperation>, bool draggingFiles);static Ref<DataTransfer> createForUpdatingDropTarget(const Document&, std::unique_ptr<Pasteboard>&&, OptionSet<DragOperation>, bool draggingFiles);diff --git a/Source/WebCore/dom/DeviceMotionEvent.idl b/Source/WebCore/dom/DeviceMotionEvent.idl-index ea39a33a6250b4d10b20802f98aa9a5d57e63a7b..300a763508d311fd7b34cb3df3cc93080bb52930 100644+index d59cba0b1c3e1876614476cd887fa1b2a9619d0c..565987a3f9ef7dc29edf8315cebe51b00953dc84 100644--- a/Source/WebCore/dom/DeviceMotionEvent.idl+++ b/Source/WebCore/dom/DeviceMotionEvent.idl@@ -25,6 +25,7 @@@@ -2730,7 +2757,7 @@ index 7813532cc52d582c42aebc979a1ecd1137765f08..c01cbd53ad2430a6ffab9a80fc73e74a#endif // USE(LIBWPE)diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp-index dde92a4942d3f6679b6ef2455fa15d023544dfbc..c6ed18b40209195d1cf5c7785091d37fd40dad80 100644+index 67feb6c9b89bbbbffd343d535d990c682be6e737..c60ffff41ace3b711920d867ab4f8dde9446b487 100644--- a/Source/WebCore/html/FileInputType.cpp+++ b/Source/WebCore/html/FileInputType.cpp@@ -37,6 +37,7 @@@@ -2765,7 +2792,7 @@ index dde92a4942d3f6679b6ef2455fa15d023544dfbc..c6ed18b40209195d1cf5c7785091d37fbreak;}diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp-index 3844ae7bab48f46b77cfd85530e4ab19392a71dd..8d705215457f89711e78e3bee9c983d131b08245 100644+index 79af2f2040520b6b1bba55c7fbf656828b95d885..1b41cedfe4fd49c1f5073a513df5a80fb492b973 100644--- a/Source/WebCore/inspector/InspectorController.cpp+++ b/Source/WebCore/inspector/InspectorController.cpp@@ -287,6 +287,8 @@ void InspectorController::disconnectFrontend(FrontendChannel& frontendChannel)@@ -2846,10 +2873,10 @@ index 3a981b5bf5ca0bbf4d1c9f0b125564742cd8cad9..f8fc2ca6700461627933f149c5837075} // namespace WebCorediff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp-index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3ca973aaea 100644+index 79e5f20d096d724bcee0866175c0ceee1fb2ea12..94fbc44587f6a1c58cf81cf4a75cb42ca1e87161 100644--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp-@@ -597,6 +597,12 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i+@@ -598,6 +598,12 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& ipageAgent->applyUserAgentOverride(userAgent);}@@ -2862,7 +2889,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3cvoid InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents& instrumentingAgents, AtomString& media){if (auto* pageAgent = instrumentingAgents.enabledPageAgent())-@@ -680,6 +686,12 @@ void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents& instrumen+@@ -681,6 +687,12 @@ void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents& instrumenconsoleAgent->didFailLoading(identifier, error); // This should come AFTER resource notification, front-end relies on this.}@@ -2875,7 +2902,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3cvoid InspectorInstrumentation::willLoadXHRSynchronouslyImpl(InstrumentingAgents& instrumentingAgents){if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent())-@@ -712,20 +724,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&+@@ -713,20 +725,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame){@@ -2899,7 +2926,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3c}void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame)-@@ -808,12 +817,6 @@ void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& ins+@@ -809,12 +818,6 @@ void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& inspageDOMDebuggerAgent->frameDocumentUpdated(frame);}@@ -2912,7 +2939,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3cvoid InspectorInstrumentation::frameStartedLoadingImpl(InstrumentingAgents& instrumentingAgents, LocalFrame& frame){if (frame.isMainFrame()) {-@@ -844,10 +847,10 @@ void InspectorInstrumentation::frameStoppedLoadingImpl(InstrumentingAgents& inst+@@ -845,10 +848,10 @@ void InspectorInstrumentation::frameStoppedLoadingImpl(InstrumentingAgents& instinspectorPageAgent->frameStoppedLoading(frame);}@@ -2925,7 +2952,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3c}void InspectorInstrumentation::frameClearedScheduledNavigationImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)-@@ -862,6 +865,12 @@ void InspectorInstrumentation::accessibilitySettingsDidChangeImpl(InstrumentingA+@@ -863,6 +866,12 @@ void InspectorInstrumentation::accessibilitySettingsDidChangeImpl(InstrumentingAinspectorPageAgent->accessibilitySettingsDidChange();}@@ -2938,7 +2965,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3c#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)void InspectorInstrumentation::defaultAppearanceDidChangeImpl(InstrumentingAgents& instrumentingAgents){-@@ -1050,6 +1059,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent+@@ -1051,6 +1060,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgentcanvasAgent->consoleStopRecordingCanvas(context);}@@ -2951,7 +2978,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3cvoid InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents& instrumentingAgents, Database& database){if (auto* databaseAgent = instrumentingAgents.enabledDatabaseAgent())-@@ -1356,6 +1371,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins+@@ -1357,6 +1372,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& inslayerTreeAgent->renderLayerDestroyed(renderLayer);}@@ -2988,7 +3015,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3cInstrumentingAgents& InspectorInstrumentation::instrumentingAgents(WorkerOrWorkletGlobalScope& globalScope){return globalScope.inspectorController().m_instrumentingAgents;-@@ -1367,6 +1412,13 @@ InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(Page& page)+@@ -1373,6 +1418,13 @@ InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(Page& page)return page.inspectorController().m_instrumentingAgents.get();}@@ -3003,7 +3030,7 @@ index 8c7b186092793bf301511be969030c92674ce211..bcad9353cd568ed435b42d5b9d505b3c{// Using RefPtr makes us hit the m_inRemovedLastRefFunction assert.diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h-index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114fca4d82a 100644+index bc7a4a0839df63c54a2651feb02baa8aa554e886..3d137bfd99bdbbebbbf1cf983be6356f6873a81c 100644--- a/Source/WebCore/inspector/InspectorInstrumentation.h+++ b/Source/WebCore/inspector/InspectorInstrumentation.h@@ -31,6 +31,7 @@@@ -3030,7 +3057,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114class HTTPHeaderMap;class InspectorTimelineAgent;class InstrumentingAgents;-@@ -192,6 +195,7 @@ public:+@@ -193,6 +196,7 @@ public:static void didRecalculateStyle(Document&);static void didScheduleStyleRecalculation(Document&);static void applyUserAgentOverride(LocalFrame&, String&);@@ -3038,15 +3065,15 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114static void applyEmulatedMedia(LocalFrame&, AtomString&);static void flexibleBoxRendererBeganLayout(const RenderObject&);-@@ -204,6 +208,7 @@ public:+@@ -205,6 +209,7 @@ public:static void didReceiveData(LocalFrame*, ResourceLoaderIdentifier, const SharedBuffer*, int encodedDataLength);static void didFinishLoading(LocalFrame*, DocumentLoader*, ResourceLoaderIdentifier, const NetworkLoadMetrics&, ResourceLoader*);static void didFailLoading(LocalFrame*, DocumentLoader*, ResourceLoaderIdentifier, const ResourceError&);+ static void didReceiveMainResourceError(LocalFrame&, const ResourceError&);- static void willSendRequest(WorkerOrWorkletGlobalScope&, ResourceLoaderIdentifier, ResourceRequest&);- static void didReceiveResourceResponse(WorkerOrWorkletGlobalScope&, ResourceLoaderIdentifier, const ResourceResponse&);-@@ -230,13 +235,13 @@ public:+ static void willSendRequest(ServiceWorkerGlobalScope&, ResourceLoaderIdentifier, ResourceRequest&);+ static void didReceiveResourceResponse(ServiceWorkerGlobalScope&, ResourceLoaderIdentifier, const ResourceResponse&);+@@ -231,13 +236,13 @@ public:static void frameDetachedFromParent(LocalFrame&);static void didCommitLoad(LocalFrame&, DocumentLoader*);static void frameDocumentUpdated(LocalFrame&);@@ -3062,7 +3089,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)static void defaultAppearanceDidChange(Page&);#endif-@@ -268,6 +273,7 @@ public:+@@ -269,6 +274,7 @@ public:static void stopProfiling(Page&, JSC::JSGlobalObject*, const String& title);static void consoleStartRecordingCanvas(CanvasRenderingContext&, JSC::JSGlobalObject&, JSC::JSObject* options);static void consoleStopRecordingCanvas(CanvasRenderingContext&);@@ -3070,7 +3097,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114static void performanceMark(ScriptExecutionContext&, const String&, std::optional<MonotonicTime>, LocalFrame*);-@@ -326,6 +332,12 @@ public:+@@ -327,6 +333,12 @@ public:static void layerTreeDidChange(Page*);static void renderLayerDestroyed(Page*, const RenderLayer&);@@ -3083,7 +3110,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114static void frontendCreated();static void frontendDeleted();static bool hasFrontends() { return InspectorInstrumentationPublic::hasFrontends(); }-@@ -342,6 +354,8 @@ public:+@@ -343,6 +355,8 @@ public:static void registerInstrumentingAgents(InstrumentingAgents&);static void unregisterInstrumentingAgents(InstrumentingAgents&);@@ -3092,7 +3119,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114private:static void didClearWindowObjectInWorldImpl(InstrumentingAgents&, LocalFrame&, DOMWrapperWorld&);static bool isDebuggerPausedImpl(InstrumentingAgents&);-@@ -421,6 +435,7 @@ private:+@@ -422,6 +436,7 @@ private:static void didRecalculateStyleImpl(InstrumentingAgents&);static void didScheduleStyleRecalculationImpl(InstrumentingAgents&, Document&);static void applyUserAgentOverrideImpl(InstrumentingAgents&, String&);@@ -3100,7 +3127,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114static void applyEmulatedMediaImpl(InstrumentingAgents&, AtomString&);static void flexibleBoxRendererBeganLayoutImpl(InstrumentingAgents&, const RenderObject&);-@@ -435,6 +450,7 @@ private:+@@ -436,6 +451,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&);@@ -3108,7 +3135,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&);static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&);static void scriptImportedImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const String& sourceString);-@@ -445,13 +461,13 @@ private:+@@ -446,13 +462,13 @@ private:static void frameDetachedFromParentImpl(InstrumentingAgents&, LocalFrame&);static void didCommitLoadImpl(InstrumentingAgents&, LocalFrame&, DocumentLoader*);static void frameDocumentUpdatedImpl(InstrumentingAgents&, LocalFrame&);@@ -3124,7 +3151,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)static void defaultAppearanceDidChangeImpl(InstrumentingAgents&);#endif-@@ -478,6 +494,7 @@ private:+@@ -479,6 +495,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&);@@ -3132,7 +3159,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114static void performanceMarkImpl(InstrumentingAgents&, const String& label, std::optional<MonotonicTime>, LocalFrame*);-@@ -536,6 +553,12 @@ private:+@@ -537,6 +554,12 @@ private:static void layerTreeDidChangeImpl(InstrumentingAgents&);static void renderLayerDestroyedImpl(InstrumentingAgents&, const RenderLayer&);@@ -3144,8 +3171,8 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114+static InstrumentingAgents& instrumentingAgents(Page&);static InstrumentingAgents& instrumentingAgents(WorkerOrWorkletGlobalScope&);--@@ -1068,6 +1091,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(LocalFrame& frame,+ static InstrumentingAgents& instrumentingAgents(ServiceWorkerGlobalScope&);+@@ -1070,6 +1093,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(LocalFrame& frame,applyUserAgentOverrideImpl(*agents, userAgent);}@@ -3159,7 +3186,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114inline void InspectorInstrumentation::applyEmulatedMedia(LocalFrame& frame, AtomString& media){FAST_RETURN_IF_NO_FRONTENDS(void());-@@ -1170,6 +1200,13 @@ inline void InspectorInstrumentation::didFailLoading(WorkerOrWorkletGlobalScope&+@@ -1172,6 +1202,13 @@ inline void InspectorInstrumentation::didFailLoading(ServiceWorkerGlobalScope& gdidFailLoadingImpl(instrumentingAgents(globalScope), identifier, nullptr, error);}@@ -3173,7 +3200,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(LocalFrame& frame, ResourceLoaderIdentifier identifier, DocumentLoader& loader, const ResourceResponse& response){// Treat the same as didReceiveResponse.-@@ -1260,13 +1297,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(LocalFrame& frame)+@@ -1262,13 +1299,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(LocalFrame& frame)frameDocumentUpdatedImpl(*agents, frame);}@@ -3187,7 +3214,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114inline void InspectorInstrumentation::frameStartedLoading(LocalFrame& frame){FAST_RETURN_IF_NO_FRONTENDS(void());-@@ -1288,11 +1318,11 @@ inline void InspectorInstrumentation::frameStoppedLoading(LocalFrame& frame)+@@ -1290,11 +1320,11 @@ inline void InspectorInstrumentation::frameStoppedLoading(LocalFrame& frame)frameStoppedLoadingImpl(*agents, frame);}@@ -3201,7 +3228,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114}inline void InspectorInstrumentation::frameClearedScheduledNavigation(Frame& frame)-@@ -1308,6 +1338,13 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page)+@@ -1310,6 +1340,13 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page)accessibilitySettingsDidChangeImpl(instrumentingAgents(page));}@@ -3215,7 +3242,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)inline void InspectorInstrumentation::defaultAppearanceDidChange(Page& page){-@@ -1696,6 +1733,11 @@ inline void InspectorInstrumentation::performanceMark(ScriptExecutionContext& co+@@ -1698,6 +1735,11 @@ inline void InspectorInstrumentation::performanceMark(ScriptExecutionContext& coperformanceMarkImpl(*agents, label, WTFMove(startTime), frame);}@@ -3227,7 +3254,7 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114inline void InspectorInstrumentation::didRequestAnimationFrame(Document& document, int callbackId){FAST_RETURN_IF_NO_FRONTENDS(void());-@@ -1752,6 +1794,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren+@@ -1754,6 +1796,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const RenrenderLayerDestroyedImpl(*agents, renderLayer);}@@ -3271,14 +3298,23 @@ index 7aa2d9e599359d9302cbdde8a7a0b9399e37d313..7b4ec6ee9adb5687e16eb0fe746a3114{return context ? instrumentingAgents(*context) : nullptr;diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp-index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140efd1d31b 100644+index 129c6f01b48eaf4fb39914721a0909e25d6d9a97..d8636860918f3f8c24ae91897840f69db64f9720 100644--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp-@@ -65,10 +65,14 @@+@@ -55,6 +55,7 @@+ #include "ContainerNode.h"+ #include "Cookie.h"+ #include "CookieJar.h"++#include "DirectoryFileListCreator.h"+ #include "DOMEditor.h"+ #include "DOMException.h"+ #include "DOMPatchSupport.h"+@@ -65,10 +66,15 @@#include "Event.h"#include "EventListener.h"#include "EventNames.h"+#include "File.h"++#include <FileChooser.h>+#include "FileList.h"#include "FrameTree.h"#include "FullscreenManager.h"@@ -3289,7 +3325,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140#include "HTMLMediaElement.h"#include "HTMLNames.h"#include "HTMLScriptElement.h"-@@ -102,12 +106,14 @@+@@ -102,12 +108,14 @@#include "Pasteboard.h"#include "PseudoElement.h"#include "RenderGrid.h"@@ -3304,7 +3340,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140#include "StaticNodeList.h"#include "StyleProperties.h"#include "StyleResolver.h"-@@ -145,7 +151,8 @@ using namespace HTMLNames;+@@ -145,7 +153,8 @@ using namespace HTMLNames;static const size_t maxTextSize = 10000;static const UChar horizontalEllipsisUChar[] = { horizontalEllipsis, 0 };@@ -3314,7 +3350,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140{if (!colorObject)return std::nullopt;-@@ -164,7 +171,7 @@ static std::optional<Color> parseColor(RefPtr<JSON::Object>&& colorObject)+@@ -164,7 +173,7 @@ static std::optional<Color> parseColor(RefPtr<JSON::Object>&& colorObject)static std::optional<Color> parseRequiredConfigColor(const String& fieldName, JSON::Object& configObject){@@ -3323,7 +3359,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140}static Color parseOptionalConfigColor(const String& fieldName, JSON::Object& configObject)-@@ -192,6 +199,20 @@ static bool parseQuad(Ref<JSON::Array>&& quadArray, FloatQuad* quad)+@@ -192,6 +201,20 @@ static bool parseQuad(Ref<JSON::Array>&& quadArray, FloatQuad* quad)return true;}@@ -3344,7 +3380,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140class RevalidateStyleAttributeTask {WTF_MAKE_FAST_ALLOCATED;public:-@@ -466,6 +487,20 @@ Node* InspectorDOMAgent::assertNode(Inspector::Protocol::ErrorString& errorStrin+@@ -466,6 +489,20 @@ Node* InspectorDOMAgent::assertNode(Inspector::Protocol::ErrorString& errorStrinreturn node.get();}@@ -3365,7 +3401,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140Document* InspectorDOMAgent::assertDocument(Inspector::Protocol::ErrorString& errorString, Inspector::Protocol::DOM::NodeId nodeId){RefPtr node = assertNode(errorString, nodeId);-@@ -1540,16 +1575,7 @@ Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightNode(std::o+@@ -1540,16 +1577,7 @@ Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightNode(std::oInspector::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;@@ -3383,7 +3419,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140if (!node)return makeUnexpected(errorString);-@@ -1804,15 +1830,155 @@ Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::setInspectedNode(Ins+@@ -1804,15 +1832,155 @@ Inspector::Protocol::ErrorStringOr<void> InspectorDOMAgent::setInspectedNode(Insreturn { };}@@ -3542,7 +3578,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140if (!object)return makeUnexpected("Missing injected script for given nodeId"_s);-@@ -3061,7 +3227,7 @@ Inspector::Protocol::ErrorStringOr<Inspector::Protocol::DOM::NodeId> InspectorDO+@@ -3078,7 +3246,7 @@ Inspector::Protocol::ErrorStringOr<Inspector::Protocol::DOM::NodeId> InspectorDOreturn makeUnexpected("Missing node for given path"_s);}@@ -3551,7 +3587,7 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140{Document* document = &node->document();if (auto* templateHost = document->templateDocumentHost())-@@ -3070,12 +3236,18 @@ RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNod+@@ -3087,12 +3255,18 @@ RefPtr<Inspector::Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNodif (!frame)return nullptr;@@ -3573,24 +3609,32 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140}Node* InspectorDOMAgent::scriptValueAsNode(JSC::JSValue value)-@@ -3183,4 +3355,57 @@ Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::DOM::MediaStats>> In+@@ -3200,4 +3374,89 @@ Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::DOM::MediaStats>> In#endif}-+Protocol::ErrorStringOr<void> InspectorDOMAgent::setInputFiles(const String& objectId, RefPtr<JSON::Array>&& files, RefPtr<JSON::Array>&& paths) {++void InspectorDOMAgent::setInputFiles(const String& objectId, RefPtr<JSON::Array>&& files, RefPtr<JSON::Array>&& paths, Ref<SetInputFilesCallback>&& callback) {+ InjectedScript injectedScript = m_injectedScriptManager.injectedScriptForObjectId(objectId);-+ if (injectedScript.hasNoValue())-+ return makeUnexpected("Can not find element's context for given id"_s);++ if (injectedScript.hasNoValue()) {++ callback->sendFailure("Can not find element's context for given id"_s);++ return;++ }++ Node* node = scriptValueAsNode(injectedScript.findObjectById(objectId));-+ if (!node)-+ return makeUnexpected("Can not find element for given id"_s);++ if (!node) {++ callback->sendFailure("Can not find element for given id"_s);++ return;++ }+-+ if (node->nodeType() != Node::ELEMENT_NODE || node->nodeName() != "INPUT"_s)-+ return makeUnexpected("Not an input node"_s);++ if (node->nodeType() != Node::ELEMENT_NODE || node->nodeName() != "INPUT"_s) {++ callback->sendFailure("Not an input node"_s);++ return;++ }+-+ if (!(bool(files) ^ bool(paths)))-+ return makeUnexpected("Exactly one of files and paths should be specified"_s);++ if (!(bool(files) ^ bool(paths))) {++ callback->sendFailure("Exactly one of files and paths should be specified"_s);++ return;++ }++ HTMLInputElement* element = static_cast<HTMLInputElement*>(node);+ Vector<Ref<File>> fileObjects;@@ -3598,41 +3642,65 @@ index a5167242b6b1ee9d6ccfcd81ef86a5729882d3a4..d64c560f86db46786ba47fe55654c140+ for (unsigned i = 0; i < files->length(); ++i) {+ RefPtr<JSON::Value> item = files->get(i);+ RefPtr<JSON::Object> obj = item->asObject();-+ if (!obj)-+ return makeUnexpected("Invalid file payload format"_s);++ if (!obj) {++ callback->sendFailure("Invalid file payload format"_s);++ return;++ }++ String name;+ String type;+ String data;-+ if (!obj->getString("name"_s, name) || !obj->getString("type"_s, type) || !obj->getString("data"_s, data))-+ return makeUnexpected("Invalid file payload format"_s);++ if (!obj->getString("name"_s, name) || !obj->getString("type"_s, type) || !obj->getString("data"_s, data)) {++ callback->sendFailure("Invalid file payload format"_s);++ return;++ }++ std::optional<Vector<uint8_t>> buffer = base64Decode(data);-+ if (!buffer)-+ return makeUnexpected("Unable to decode given content"_s);++ if (!buffer) {++ callback->sendFailure("Unable to decode given content"_s);++ return;++ }++ ScriptExecutionContext* context = element->scriptExecutionContext();+ fileObjects.append(File::create(context, Blob::create(context, WTFMove(*buffer), type), name));+ }++ RefPtr<FileList> fileList = FileList::create(WTFMove(fileObjects));++ element->setFiles(WTFMove(fileList));++ callback->sendSuccess();+ } else {-+ for (unsigned i = 0; i < paths->length(); ++i) {-+ RefPtr<JSON::Value> item = paths->get(i);-+ String path = item->asString();-+ if (path.isEmpty())-+ return makeUnexpected("Invalid file path"_s);++ if (element->hasAttributeWithoutSynchronization(webkitdirectoryAttr)) {++ auto directoryFileListCreator = DirectoryFileListCreator::create([element = RefPtr { element }, callback = WTFMove(callback)](Ref<FileList>&& fileList) mutable {++ ASSERT(isMainThread());++ element->setFiles(WTFMove(fileList));++ callback->sendSuccess();++ });++ Vector<FileChooserFileInfo> fileChooserFiles;++ for (size_t i = 0; i < paths->length(); ++i) {++ fileChooserFiles.append(FileChooserFileInfo { paths->get(i)->asString(), nullString(), { } });++ }++ directoryFileListCreator->start(m_document.get(), fileChooserFiles);++ } else {++ for (unsigned i = 0; i < paths->length(); ++i) {++ RefPtr<JSON::Value> item = paths->get(i);++ String path = item->asString();++ if (path.isEmpty()) {++ callback->sendFailure("Invalid file path"_s);++ return;++ }+-+ ScriptExecutionContext* context = element->scriptExecutionContext();-+ fileObjects.append(File::create(context, path));++ ScriptExecutionContext* context = element->scriptExecutionContext();++ fileObjects.append(File::create(context, path));++ }++ RefPtr<FileList> fileList = FileList::create(WTFMove(fileObjects));++ element->setFiles(WTFMove(fileList));++ callback->sendSuccess();+ }+ }-+ RefPtr<FileList> fileList = FileList::create(WTFMove(fileObjects));-+ element->setFiles(WTFMove(fileList));-+ return { };+}+} // namespace WebCorediff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.h b/Source/WebCore/inspector/agents/InspectorDOMAgent.h-index 5f1dba2bc4d5c2f113a88dcc9ba479679cb79233..5616c853a99b5fdb38306a804cc0e91799ac12b1 100644+index 5f1dba2bc4d5c2f113a88dcc9ba479679cb79233..73e49d699919b68cffff41f612e461e25235155b 100644--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.h+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.h@@ -57,6 +57,7 @@ namespace WebCore {@@ -3667,7 +3735,7 @@ index 5f1dba2bc4d5c2f113a88dcc9ba479679cb79233..5616c853a99b5fdb38306a804cc0e917+ Inspector::Protocol::ErrorStringOr<std::tuple<String /* contentFrameId */, String /* ownerFrameId */>> describeNode(const String& objectId);+ Inspector::Protocol::ErrorStringOr<void> scrollIntoViewIfNeeded(const String& objectId, RefPtr<JSON::Object>&& rect);+ Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::DOM::Quad>>> getContentQuads(const String& objectId);-+ Inspector::Protocol::ErrorStringOr<void> setInputFiles(const String& objectId, RefPtr<JSON::Array>&& files, RefPtr<JSON::Array>&& paths);++ void setInputFiles(const String& objectId, RefPtr<JSON::Array>&& files, RefPtr<JSON::Array>&& paths, Ref<SetInputFilesCallback>&& callback);// InspectorInstrumentationInspector::Protocol::DOM::NodeId identifierForNode(Node&);@@ -3705,7 +3773,7 @@ index 5f1dba2bc4d5c2f113a88dcc9ba479679cb79233..5616c853a99b5fdb38306a804cc0e917void discardBindings();diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp-index 00dba5735f2f682d00f7e17ef2abddf85a4c7f90..4c2ca023d6ad04a3ccda68d5f707df8065d50419 100644+index f481bcb61f039dc5608e0c03ee6eb14e8cb19762..92cf076baeff2db243cf035cad036ccf72cdbbf8 100644--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp@@ -59,6 +59,7 @@@@ -3815,7 +3883,7 @@ index dc7e574ee6e9256a1f75ea838d20ca7f5e9190de..5dd4464256e0f5d652fa51fd611286dd// InspectorInstrumentationvoid willRecalculateStyle();diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp-index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8dea87401 100644+index 84eb4dc2127420db005063e0f60d5ad950081719..5f85bc7ba23b9488d03bf7dfa5da645fb2717734 100644--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp@@ -32,19 +32,26 @@@@ -3879,12 +3947,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8#include <wtf/Stopwatch.h>#include <wtf/text/Base64.h>#include <wtf/text/StringBuilder.h>-@@ -83,11 +100,15 @@- #include "LegacyWebArchive.h"- #endif---- namespace WebCore {+@@ -92,6 +109,11 @@ namespace WebCore {using namespace Inspector;@@ -3896,7 +3959,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8static bool decodeBuffer(std::span<const uint8_t> buffer, const String& textEncodingName, String* result){if (buffer.data()) {-@@ -334,6 +355,7 @@ InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorClien+@@ -338,6 +360,7 @@ InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorClien, m_frontendDispatcher(makeUnique<Inspector::PageFrontendDispatcher>(context.frontendRouter)), m_backendDispatcher(Inspector::PageBackendDispatcher::create(context.backendDispatcher, this)), m_inspectedPage(context.inspectedPage)@@ -3904,7 +3967,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8, m_client(client), m_overlay(overlay){-@@ -363,12 +385,20 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::enable()+@@ -367,12 +390,20 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::enable()defaultUserPreferencesDidChange();@@ -3925,7 +3988,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8setShowPaintRects(false);#if !PLATFORM(IOS_FAMILY)-@@ -420,6 +450,22 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optiona+@@ -424,6 +455,22 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optionareturn { };}@@ -3948,7 +4011,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::navigate(const String& url){auto* localMainFrame = dynamicDowncast<LocalFrame>(m_inspectedPage.mainFrame());-@@ -443,6 +489,13 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideUserAgent(c+@@ -447,6 +494,13 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideUserAgent(creturn { };}@@ -3962,7 +4025,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Inspector::Protocol::Page::Setting setting, std::optional<bool>&& value){auto& inspectedPageSettings = m_inspectedPage.settings();-@@ -456,6 +509,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Ins+@@ -460,6 +514,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(InsinspectedPageSettings.setAuthorAndUserStylesEnabledInspectorOverride(value);return { };@@ -3975,7 +4038,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8case Inspector::Protocol::Page::Setting::ICECandidateFilteringEnabled:inspectedPageSettings.setICECandidateFilteringEnabledInspectorOverride(value);return { };-@@ -481,6 +540,38 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Ins+@@ -485,6 +545,38 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(InsinspectedPageSettings.setNeedsSiteSpecificQuirksInspectorOverride(value);return { };@@ -4014,7 +4077,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8case Inspector::Protocol::Page::Setting::ScriptEnabled:inspectedPageSettings.setScriptEnabledInspectorOverride(value);return { };-@@ -493,6 +584,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Ins+@@ -497,6 +589,12 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(InsinspectedPageSettings.setShowRepaintCounterInspectorOverride(value);return { };@@ -4027,7 +4090,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8case Inspector::Protocol::Page::Setting::WebSecurityEnabled:inspectedPageSettings.setWebSecurityEnabledInspectorOverride(value);return { };-@@ -893,15 +990,16 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setShowPaintRects(b+@@ -897,15 +995,16 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setShowPaintRects(breturn { };}@@ -4049,13 +4112,13 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8}void InspectorPageAgent::frameNavigated(LocalFrame& frame)-@@ -909,13 +1007,25 @@ void InspectorPageAgent::frameNavigated(LocalFrame& frame)+@@ -913,13 +1012,25 @@ void InspectorPageAgent::frameNavigated(LocalFrame& frame)m_frontendDispatcher->frameNavigated(buildObjectForFrame(&frame));}+String InspectorPageAgent::makeFrameID(ProcessIdentifier processID, FrameIdentifier frameID)+{-+ return makeString(processID.toUInt64(), ".", frameID.object().toUInt64());++ return makeString(processID.toUInt64(), '.', frameID.object().toUInt64());+}++static String globalIDForFrame(Frame& frame)@@ -4078,7 +4141,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8}Frame* InspectorPageAgent::frameForId(const Inspector::Protocol::Network::FrameId& frameId)-@@ -927,20 +1037,17 @@ String InspectorPageAgent::frameId(Frame* frame)+@@ -931,20 +1042,17 @@ String InspectorPageAgent::frameId(Frame* frame){if (!frame)return emptyString();@@ -4104,7 +4167,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8}LocalFrame* InspectorPageAgent::assertFrame(Inspector::Protocol::ErrorString& errorString, const Inspector::Protocol::Network::FrameId& frameId)-@@ -951,11 +1058,6 @@ LocalFrame* InspectorPageAgent::assertFrame(Inspector::Protocol::ErrorString& er+@@ -955,11 +1063,6 @@ LocalFrame* InspectorPageAgent::assertFrame(Inspector::Protocol::ErrorString& erreturn frame;}@@ -4116,7 +4179,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8void InspectorPageAgent::frameStartedLoading(LocalFrame& frame){m_frontendDispatcher->frameStartedLoading(frameId(&frame));-@@ -966,9 +1068,9 @@ void InspectorPageAgent::frameStoppedLoading(LocalFrame& frame)+@@ -970,9 +1073,9 @@ void InspectorPageAgent::frameStoppedLoading(LocalFrame& frame)m_frontendDispatcher->frameStoppedLoading(frameId(&frame));}@@ -4128,7 +4191,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8}void InspectorPageAgent::frameClearedScheduledNavigation(Frame& frame)-@@ -1015,6 +1117,12 @@ void InspectorPageAgent::defaultUserPreferencesDidChange()+@@ -1019,6 +1122,12 @@ void InspectorPageAgent::defaultUserPreferencesDidChange()m_frontendDispatcher->defaultUserPreferencesDidChange(WTFMove(defaultUserPreferences));}@@ -4141,7 +4204,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)void InspectorPageAgent::defaultAppearanceDidChange(){-@@ -1028,6 +1136,9 @@ void InspectorPageAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrapp+@@ -1032,6 +1141,9 @@ void InspectorPageAgent::didClearWindowObjectInWorld(LocalFrame& frame, DOMWrappreturn;if (m_bootstrapScript.isEmpty())@@ -4151,7 +4214,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8return;frame.script().evaluateIgnoringException(ScriptSourceCode(m_bootstrapScript, JSC::SourceTaintedOrigin::Untainted, URL { "web-inspector://bootstrap.js"_str }));-@@ -1075,6 +1186,51 @@ void InspectorPageAgent::didRecalculateStyle()+@@ -1079,6 +1191,51 @@ void InspectorPageAgent::didRecalculateStyle()m_overlay->update();}@@ -4203,7 +4266,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8Ref<Inspector::Protocol::Page::Frame> InspectorPageAgent::buildObjectForFrame(LocalFrame* frame){ASSERT_ARG(frame, frame);-@@ -1172,6 +1328,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent)+@@ -1176,6 +1333,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent)userAgent = m_userAgentOverride;}@@ -4216,7 +4279,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8void InspectorPageAgent::applyEmulatedMedia(AtomString& media){if (!m_emulatedMedia.isEmpty())-@@ -1199,11 +1361,13 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Insp+@@ -1203,11 +1366,13 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Inspreturn snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes);}@@ -4231,7 +4294,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8IntRect rectangle(x, y, width, height);auto* localMainFrame = dynamicDowncast<LocalFrame>(m_inspectedPage.mainFrame());-@@ -1217,6 +1381,43 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int+@@ -1221,6 +1386,43 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(intreturn snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes);}@@ -4259,7 +4322,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8+{+ bool success = WTF::setTimeZoneOverride(timeZone);+ if (!success)-+ return makeUnexpected("Invalid time zone " + timeZone);++ return makeUnexpected("Invalid time zone "_s + timeZone);++ return { };+}@@ -4275,7 +4338,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8#if ENABLE(WEB_ARCHIVE) && USE(CF)Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::archive(){-@@ -1233,7 +1434,6 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::archive()+@@ -1237,7 +1439,6 @@ Inspector::Protocol::ErrorStringOr<String> InspectorPageAgent::archive()}#endif@@ -4283,10 +4346,11 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::optional<int>&& width, std::optional<int>&& height){if (width.has_value() != height.has_value())-@@ -1251,6 +1451,519 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverri+@@ -1255,6 +1456,508 @@ Inspector::Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverrilocalMainFrame->setOverrideScreenSize(FloatSize(width.value_or(0), height.value_or(0)));return { };}+-#endif++Protocol::ErrorStringOr<void> InspectorPageAgent::insertText(const String& text)+{@@ -4782,17 +4846,6 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8+ return { };+}+-+Protocol::ErrorStringOr<void> InspectorPageAgent::setOrientationOverride(std::optional<int>&& angle)-+{-+#if ENABLE(ORIENTATION_EVENTS)-+ m_inspectedPage.setOverrideOrientation(WTFMove(angle));-+ return { };-+#else-+ UNUSED_PARAM(angle);-+ return makeUnexpected("Orientation events are disabled in this build");- #endif-+}-++Protocol::ErrorStringOr<void> InspectorPageAgent::updateScrollingState()+{+ auto* scrollingCoordinator = m_inspectedPage.scrollingCoordinator();@@ -4804,7 +4857,7 @@ index 5329fd0a2c24031a74d05d7c6c342a5f8398eaae..a64e486220e4fc8e37c34856fce8c3d8} // namespace WebCorediff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.h b/Source/WebCore/inspector/agents/InspectorPageAgent.h-index 371bcfcf1d0ae17471f8e69706d2f12356793418..6bc660d683a639f1d6f6a0dca8db5e058d32cd21 100644+index 371bcfcf1d0ae17471f8e69706d2f12356793418..3e1d5a03edf17f42b566b6d0ec062fdd6d32f1c3 100644--- a/Source/WebCore/inspector/agents/InspectorPageAgent.h+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.h@@ -32,8 +32,10 @@@@ -4855,7 +4908,7 @@ index 371bcfcf1d0ae17471f8e69706d2f12356793418..6bc660d683a639f1d6f6a0dca8db5e05Inspector::Protocol::ErrorStringOr<void> overrideSetting(Inspector::Protocol::Page::Setting, std::optional<bool>&& value);Inspector::Protocol::ErrorStringOr<void> overrideUserPreference(Inspector::Protocol::Page::UserPreferenceName, std::optional<Inspector::Protocol::Page::UserPreferenceValue>&&);Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::Page::Cookie>>> getCookies();-@@ -115,45 +126,66 @@ public:+@@ -115,45 +126,65 @@ public:#endifInspector::Protocol::ErrorStringOr<void> setShowPaintRects(bool);Inspector::Protocol::ErrorStringOr<void> setEmulatedMedia(const String&);@@ -4879,7 +4932,6 @@ index 371bcfcf1d0ae17471f8e69706d2f12356793418..6bc660d683a639f1d6f6a0dca8db5e05+ Inspector::Protocol::ErrorStringOr<void> createUserWorld(const String&);+ Inspector::Protocol::ErrorStringOr<void> setBypassCSP(bool);+ Inspector::Protocol::ErrorStringOr<void> crash();-+ Inspector::Protocol::ErrorStringOr<void> setOrientationOverride(std::optional<int>&& angle);+ Inspector::Protocol::ErrorStringOr<void> updateScrollingState();// InspectorInstrumentation@@ -4929,7 +4981,7 @@ index 371bcfcf1d0ae17471f8e69706d2f12356793418..6bc660d683a639f1d6f6a0dca8db5e05static bool mainResourceContent(LocalFrame*, bool withBase64Encode, String* result);static bool dataContent(std::span<const uint8_t> data, const String& textEncodingName, bool withBase64Encode, String* result);-@@ -169,17 +201,21 @@ private:+@@ -169,17 +200,21 @@ private:RefPtr<Inspector::PageBackendDispatcher> m_backendDispatcher;Page& m_inspectedPage;@@ -5119,7 +5171,7 @@ index 9501fc840e35f3badc701e7622555dba394cae9b..1391c73d9b3ba250ad3a831bfe7c92c9} // namespace WebCorediff --git a/Source/WebCore/loader/CookieJar.h b/Source/WebCore/loader/CookieJar.h-index edfc601a36f006122f26946de5b3a60573a07968..794a6c389be8af23989a54696d57312340ddcd37 100644+index 2ca6ee01a341eefead66a92e2af77875263a9df3..131bbd8c268a748b43cac105370d7b73753e47a8 100644--- a/Source/WebCore/loader/CookieJar.h+++ b/Source/WebCore/loader/CookieJar.h@@ -46,6 +46,7 @@ struct CookieStoreGetOptions;@@ -5141,10 +5193,10 @@ index edfc601a36f006122f26946de5b3a60573a07968..794a6c389be8af23989a54696d573123protected:static SameSiteInfo sameSiteInfo(const Document&, IsForDOMCookieAccess = IsForDOMCookieAccess::No);diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp-index 90023ca4ebad0d8608b74434ca5d870ffeb00871..7360ea6857f98e60bdfa74ad4a0d595958cfc11f 100644+index fa516b91382c4c784d30f38a6782e7a29007e7d4..89c56c793e97771f75b109a2fd04a0e671425aa1 100644--- a/Source/WebCore/loader/DocumentLoader.cpp+++ b/Source/WebCore/loader/DocumentLoader.cpp-@@ -763,8 +763,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc+@@ -765,8 +765,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourcif (!didReceiveRedirectResponse)return completionHandler(WTFMove(newRequest));@@ -5155,7 +5207,7 @@ index 90023ca4ebad0d8608b74434ca5d870ffeb00871..7360ea6857f98e60bdfa74ad4a0d5959switch (navigationPolicyDecision) {case NavigationPolicyDecision::IgnoreLoad:case NavigationPolicyDecision::LoadWillContinueInAnotherProcess:-@@ -1532,11 +1534,17 @@ void DocumentLoader::detachFromFrame(LoadWillContinueInAnotherProcess loadWillCo+@@ -1533,11 +1535,17 @@ void DocumentLoader::detachFromFrame(LoadWillContinueInAnotherProcess loadWillCoif (auto navigationID = std::exchange(m_navigationID, 0))m_frame->loader().client().documentLoaderDetached(navigationID, loadWillContinueInAnotherProcess);@@ -5176,10 +5228,10 @@ index 90023ca4ebad0d8608b74434ca5d870ffeb00871..7360ea6857f98e60bdfa74ad4a0d5959{ASSERT(navigationID);diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h-index aa98ba7e3eb896b65a156fe8f75ae3c0bc99f246..00531c35e1d5041d3bcc13c54308eb7eff387baf 100644+index 05c8c4a42b9273c15889c0ab11199b67954dfe15..6947545eef196ef105c6292c8734b5b86d7dc8f2 100644--- a/Source/WebCore/loader/DocumentLoader.h+++ b/Source/WebCore/loader/DocumentLoader.h-@@ -191,6 +191,8 @@ public:+@@ -207,6 +207,8 @@ public:WEBCORE_EXPORT virtual void detachFromFrame(LoadWillContinueInAnotherProcess);@@ -5189,10 +5241,10 @@ index aa98ba7e3eb896b65a156fe8f75ae3c0bc99f246..00531c35e1d5041d3bcc13c54308eb7eCheckedPtr<FrameLoader> checkedFrameLoader() const;WEBCORE_EXPORT SubresourceLoader* mainResourceLoader() const;diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp-index 4882d1ded68a2e88595c1ce7e2a6891f066b3457..e630a3cd7022449e6eec9516f7bb5e63f3085b0e 100644+index 213b18eed87af84e1f36ccda4008e3d2ea24721f..b8d3567ef231c363a5b40caef6427657d4cdb73f 100644--- a/Source/WebCore/loader/FrameLoader.cpp+++ b/Source/WebCore/loader/FrameLoader.cpp-@@ -1355,6 +1355,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat+@@ -1290,6 +1290,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat}m_client->dispatchDidNavigateWithinPage();@@ -5200,26 +5252,26 @@ index 4882d1ded68a2e88595c1ce7e2a6891f066b3457..e630a3cd7022449e6eec9516f7bb5e63document->statePopped(stateObject ? stateObject.releaseNonNull() : SerializedScriptValue::nullValue());m_client->dispatchDidPopStateWithinPage();-@@ -1820,6 +1821,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t- const String& httpMethod = loader->request().httpMethod();+@@ -1781,6 +1782,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t+ if (!dispatchNavigateEvent(newURL, type, loader->triggeringAction(), NavigationHistoryBehavior::Auto, true))+ return;- 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));-@@ -1853,7 +1856,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t+@@ -1814,7 +1817,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t}- RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()) || history().provisionalItem());+ RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()) || frame->history().provisionalItem());+ InspectorInstrumentation::willCheckNavigationPolicy(m_frame);policyChecker().checkNavigationPolicy(ResourceRequest(loader->request()), ResourceResponse { } /* redirectResponse */, loader, WTFMove(formState), [this, frame, allowNavigationToInvalidURL, completionHandler = completionHandlerCaller.release()] (const ResourceRequest& request, WeakPtr<FormState>&& weakFormState, NavigationPolicyDecision navigationPolicyDecision) mutable {+ InspectorInstrumentation::didCheckNavigationPolicy(m_frame, navigationPolicyDecision != NavigationPolicyDecision::ContinueLoad);continueLoadAfterNavigationPolicy(request, RefPtr { weakFormState.get() }.get(), navigationPolicyDecision, allowNavigationToInvalidURL);completionHandler();}, PolicyDecisionMode::Asynchronous);-@@ -3115,14 +3120,19 @@ String FrameLoader::userAgent(const URL& url) const+@@ -3079,14 +3084,19 @@ String FrameLoader::userAgent(const URL& url) constString FrameLoader::navigatorPlatform() const{@@ -5241,16 +5293,16 @@ index 4882d1ded68a2e88595c1ce7e2a6891f066b3457..e630a3cd7022449e6eec9516f7bb5e63}void FrameLoader::dispatchOnloadEvents()-@@ -3572,6 +3582,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)+@@ -3544,6 +3554,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error, LoadWillcheckCompleted();if (frame->page())- checkLoadComplete();+ checkLoadComplete(loadWillContinueInAnotherProcess);++ InspectorInstrumentation::didReceiveMainResourceError(m_frame, error);}- void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, const SecurityOrigin* requesterOrigin, bool shouldContinue)-@@ -4425,9 +4437,6 @@ String FrameLoader::referrer() const+ void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, const SecurityOrigin* requesterOrigin, bool shouldContinue, NavigationHistoryBehavior historyHandling)+@@ -4422,9 +4434,6 @@ String FrameLoader::referrer() constvoid FrameLoader::dispatchDidClearWindowObjectsInAllWorlds(){@@ -5260,7 +5312,7 @@ index 4882d1ded68a2e88595c1ce7e2a6891f066b3457..e630a3cd7022449e6eec9516f7bb5e63Vector<Ref<DOMWrapperWorld>> worlds;ScriptController::getAllWorlds(worlds);for (auto& world : worlds)-@@ -4437,13 +4446,12 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()+@@ -4434,13 +4443,12 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world){Ref frame = m_frame.get();@@ -5293,10 +5345,10 @@ index 91340dc21042f545592b442bc42dbceed06219b2..f3591fe333761b10a25ddaf4a4f8d721virtual 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 a6270e0e1ceb02fee0a3c91a0cc755351908c5e5..f5e7330fa741eff7917adf227760161c5ba1e5f8 100644+index 16e15b0565a75933a4f10828cca190f4b055a05b..0189a5b49bc593b63413abb16524027f24daacc6 100644--- a/Source/WebCore/loader/NavigationScheduler.cpp+++ b/Source/WebCore/loader/NavigationScheduler.cpp-@@ -690,7 +690,7 @@ void NavigationScheduler::startTimer()+@@ -695,7 +695,7 @@ void NavigationScheduler::startTimer()Seconds delay = 1_s * m_redirect->delay();m_timer.startOneShot(delay);@@ -5306,7 +5358,7 @@ index a6270e0e1ceb02fee0a3c91a0cc755351908c5e5..f5e7330fa741eff7917adf227760161c}diff --git a/Source/WebCore/loader/PolicyChecker.cpp b/Source/WebCore/loader/PolicyChecker.cpp-index ca3dc2575f3c9cb87ac902d79610f0738b09fdff..2ddbbfed658961e8231f641a889508aa4869070d 100644+index 15ce6dd0ee3c412bcaf33063e8610c5936677c9c..344172ad41a7915982aaef12b175a0f9dffdc388 100644--- a/Source/WebCore/loader/PolicyChecker.cpp+++ b/Source/WebCore/loader/PolicyChecker.cpp@@ -46,6 +46,7 @@@@ -5340,10 +5392,10 @@ index b74c5258454b0df9f74aa8a5297674b733925685..b6c3999745368c7f7e2e6176bfca6dc0void ProgressTracker::incrementProgress(ResourceLoaderIdentifier identifier, const ResourceResponse& response)diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp-index f0d0aeb93ca42f7178a9dc07beeba911a38c32fe..1f82595cbbbc4f32b5cc4330b4d71e05d51b27a0 100644+index bf685913e33c7d5959c158b7735321682d5e7208..8c184ff01799f5172c9a774a115014c5f6f18270 100644--- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp+++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp-@@ -1054,8 +1054,11 @@ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::requ+@@ -1068,8 +1068,11 @@ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::requrequest.updateReferrerPolicy(document() ? document()->referrerPolicy() : ReferrerPolicy::Default);@@ -5357,7 +5409,7 @@ index f0d0aeb93ca42f7178a9dc07beeba911a38c32fe..1f82595cbbbc4f32b5cc4330b4d71e05Ref page = *frame->page();-@@ -1663,8 +1666,9 @@ Vector<Ref<SVGImage>> CachedResourceLoader::allCachedSVGImages() const+@@ -1682,8 +1685,9 @@ Vector<Ref<SVGImage>> CachedResourceLoader::allCachedSVGImages() constResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequest&& request){@@ -5370,7 +5422,7 @@ index f0d0aeb93ca42f7178a9dc07beeba911a38c32fe..1f82595cbbbc4f32b5cc4330b4d71e05ASSERT(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 20666cc080e04b0fa12e654ac357531f18c7c1df..3cf1823363aacdc014326957f98f3435cf505beb 100644+index 9225486c5aaf841df1d5de85c40928307b4d72dc..93bc7be141be1043a057b6ad6c297397a5c6cfa8 100644--- a/Source/WebCore/page/ChromeClient.h+++ b/Source/WebCore/page/ChromeClient.h@@ -335,7 +335,7 @@ public:@@ -5383,10 +5435,10 @@ index 20666cc080e04b0fa12e654ac357531f18c7c1df..3cf1823363aacdc014326957f98f3435#if ENABLE(INPUT_TYPE_COLOR)diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp-index 1171407b2f308431ba948ec477a56c90e66911e8..a96feb7fe5a299adaeb950a11512bdf26b1f2836 100644+index ff5f86a7c24bdb06a7ae0d6015de450a323cdae0..1760ac36123b4543279d7278fd9d328637da9ca3 100644--- a/Source/WebCore/page/EventHandler.cpp+++ b/Source/WebCore/page/EventHandler.cpp-@@ -4325,6 +4325,12 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr+@@ -4326,6 +4326,12 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDrif (!document)return false;@@ -5399,7 +5451,7 @@ index 1171407b2f308431ba948ec477a56c90e66911e8..a96feb7fe5a299adaeb950a11512bdf2dragState().dataTransfer = DataTransfer::createForDrag(*document);auto hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No;-@@ -4951,7 +4957,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve+@@ -4952,7 +4958,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;@@ -5408,7 +5460,7 @@ index 1171407b2f308431ba948ec477a56c90e66911e8..a96feb7fe5a299adaeb950a11512bdf2bool pointerCancelled = false;#endifRefPtr<EventTarget> touchTarget;-@@ -4998,7 +5004,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve+@@ -4999,7 +5005,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve// we also remove it from the map.touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey);@@ -5417,7 +5469,7 @@ index 1171407b2f308431ba948ec477a56c90e66911e8..a96feb7fe5a299adaeb950a11512bdf2HitTestResult result = hitTestResultAtPoint(pagePoint, hitType | HitTestRequest::Type::AllowChildFrameContent);pointerTarget = result.targetElement();pointerCancelled = (pointerTarget != touchTarget);-@@ -5021,7 +5027,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEve+@@ -5022,7 +5028,7 @@ HandleUserInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEveif (!targetFrame)continue;@@ -5427,10 +5479,10 @@ index 1171407b2f308431ba948ec477a56c90e66911e8..a96feb7fe5a299adaeb950a11512bdf2// on release if the hit test result changed since the previous TouchPressed or TouchMovedif (pointState == PlatformTouchPoint::TouchReleased && pointerCancelled) {diff --git a/Source/WebCore/page/FrameSnapshotting.cpp b/Source/WebCore/page/FrameSnapshotting.cpp-index 36ff7673bffcfea97e705d03f31459c36dc46164..1a65fcc874877b8b54e4e6aebb56b66294ef1ceb 100644+index 084db825e36bd46126fea95fc7183bf2e931be7e..dac3caef67600f8c7c945fd857a91140a23d0303 100644--- a/Source/WebCore/page/FrameSnapshotting.cpp+++ b/Source/WebCore/page/FrameSnapshotting.cpp-@@ -113,7 +113,7 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&+@@ -115,7 +115,7 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&// Other paint behaviors are set by paintContentsForSnapshot.frame.view()->setPaintBehavior(paintBehavior);@@ -5439,7 +5491,7 @@ index 36ff7673bffcfea97e705d03f31459c36dc46164..1a65fcc874877b8b54e4e6aebb56b662if (frame.page()->delegatesScaling())scaleFactor *= frame.page()->pageScaleFactor();-@@ -128,7 +128,13 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&+@@ -130,7 +130,13 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&if (!buffer)return nullptr;@@ -5453,7 +5505,7 @@ index 36ff7673bffcfea97e705d03f31459c36dc46164..1a65fcc874877b8b54e4e6aebb56b662if (!clipRects.isEmpty()) {Path clipPath;-@@ -137,7 +143,10 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&+@@ -139,7 +145,10 @@ RefPtr<ImageBuffer> snapshotFrameRectWithClip(LocalFrame& frame, const IntRect&buffer->context().clipPath(clipPath);}@@ -5466,19 +5518,19 @@ index 36ff7673bffcfea97e705d03f31459c36dc46164..1a65fcc874877b8b54e4e6aebb56b662}diff --git a/Source/WebCore/page/FrameSnapshotting.h b/Source/WebCore/page/FrameSnapshotting.h-index e4f52ca1cb3228868bc77a5498c87e1f2af59ce4..9ce6b102570cdcd2775ebf5adcd1650db837f311 100644+index 055e3d8b2821c366b403fcc6ea0f2c9b1bd8029b..0e1bb019ba0ad1f76ef62abb164b80ccf26755be 100644--- a/Source/WebCore/page/FrameSnapshotting.h+++ b/Source/WebCore/page/FrameSnapshotting.h-@@ -54,6 +54,7 @@ enum class SnapshotFlags : uint16_t {- PaintWithIntegralScaleFactor = 1 << 6,+@@ -55,6 +55,7 @@ enum class SnapshotFlags : uint16_t {Shareable = 1 << 7,Accelerated = 1 << 8,-+ OmitDeviceScaleFactor = 1 << 9,+ ExcludeReplacedContent = 1 << 9,++ OmitDeviceScaleFactor = 1 << 10,};struct SnapshotOptions {diff --git a/Source/WebCore/page/History.cpp b/Source/WebCore/page/History.cpp-index 28dacedeebc77b2da6428cdbe166581c96348dfa..9c5bfaf9c81c2e5904f69071ee674363ee9decf8 100644+index 2b5e1e58bad69cba3d4c6de1e0d35f01ad9bb5f2..098355b3f71ebc2ec51862671a860d2964850c88 100644--- a/Source/WebCore/page/History.cpp+++ b/Source/WebCore/page/History.cpp@@ -32,6 +32,7 @@@@ -5489,16 +5541,16 @@ index 28dacedeebc77b2da6428cdbe166581c96348dfa..9c5bfaf9c81c2e5904f69071ee674363#include "LocalFrame.h"#include "LocalFrameLoaderClient.h"#include "Logging.h"-@@ -298,6 +299,7 @@ ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& data+@@ -304,6 +305,7 @@ ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& dataif (!urlString.isEmpty())frame->protectedDocument()->updateURLForPushOrReplaceState(fullURL);+ InspectorInstrumentation::didNavigateWithinPage(*frame);if (stateObjectType == StateObjectType::Push) {- frame->loader().history().pushState(WTFMove(data), fullURL.string());+ frame->checkedHistory()->pushState(WTFMove(data), fullURL.string());diff --git a/Source/WebCore/page/LocalFrame.cpp b/Source/WebCore/page/LocalFrame.cpp-index 9f480cb9a6000333711f0e9630522ddc77534015..f2d62e42e926b0d1d53f3a9feb3ce4ea93507ca3 100644+index 114dbb1c6838198c7240af78726dd58073051704..26a2eebe64e0d34710ddd02b3dbb350ddef53f3a 100644--- a/Source/WebCore/page/LocalFrame.cpp+++ b/Source/WebCore/page/LocalFrame.cpp@@ -40,6 +40,7 @@@@ -5525,7 +5577,7 @@ index 9f480cb9a6000333711f0e9630522ddc77534015..f2d62e42e926b0d1d53f3a9feb3ce4ea#include "NodeTraversal.h"#include "Page.h"#include "ProcessWarming.h"-@@ -187,6 +190,7 @@ LocalFrame::LocalFrame(Page& page, UniqueRef<LocalFrameLoaderClient>&& frameLoad+@@ -188,6 +191,7 @@ LocalFrame::LocalFrame(Page& page, ClientCreator&& clientCreator, FrameIdentifievoid LocalFrame::init(){@@ -5533,7 +5585,7 @@ index 9f480cb9a6000333711f0e9630522ddc77534015..f2d62e42e926b0d1d53f3a9feb3ce4eacheckedLoader()->init();}-@@ -411,7 +415,7 @@ void LocalFrame::orientationChanged()+@@ -404,7 +408,7 @@ void LocalFrame::orientationChanged()IntDegrees LocalFrame::orientation() const{if (RefPtr page = this->page())@@ -5906,7 +5958,7 @@ index 9f480cb9a6000333711f0e9630522ddc77534015..f2d62e42e926b0d1d53f3a9feb3ce4ea#undef FRAME_RELEASE_LOG_ERRORdiff --git a/Source/WebCore/page/LocalFrame.h b/Source/WebCore/page/LocalFrame.h-index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d576941a50a 100644+index aef60e6fe0be63ec1aca391fde6a1bc961a9e768..fd43db619f60121d4a2dbadb08c4c8e1d4092226 100644--- a/Source/WebCore/page/LocalFrame.h+++ b/Source/WebCore/page/LocalFrame.h@@ -28,8 +28,10 @@@@ -5920,7 +5972,7 @@ index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d57#include "ScrollTypes.h"#include "UserScriptTypes.h"#include <wtf/CheckedRef.h>-@@ -70,7 +72,6 @@ namespace WebCore {+@@ -71,7 +73,6 @@ namespace WebCore {class Color;class LocalDOMWindow;class DataDetectionResultsStorage;@@ -5928,7 +5980,7 @@ index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d57class Editor;class Element;class EventHandler;-@@ -111,8 +112,8 @@ enum {+@@ -112,8 +113,8 @@ enum {};enum OverflowScrollAction { DoNotPerformOverflowScroll, PerformOverflowScroll };@@ -5938,7 +5990,7 @@ index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d57class LocalFrame final : public Frame {public:-@@ -219,10 +220,6 @@ public:+@@ -222,10 +223,6 @@ public:WEBCORE_EXPORT DataDetectionResultsStorage& dataDetectionResults();#endif@@ -5949,7 +6001,7 @@ index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d57WEBCORE_EXPORT Node* deepestNodeAtLocation(const FloatPoint& viewportLocation);WEBCORE_EXPORT Node* nodeRespondingToClickEvents(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, SecurityOrigin* = nullptr);WEBCORE_EXPORT Node* nodeRespondingToDoubleClickEvent(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation);-@@ -230,6 +227,10 @@ public:+@@ -233,6 +230,10 @@ public:WEBCORE_EXPORT Node* nodeRespondingToScrollWheelEvents(const FloatPoint& viewportLocation);WEBCORE_EXPORT Node* approximateNodeAtViewportLocationLegacy(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation);@@ -5960,7 +6012,7 @@ index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d57WEBCORE_EXPORT NSArray *wordsInCurrentParagraph() const;WEBCORE_EXPORT CGRect renderRectForPoint(CGPoint, bool* isReplaced, float* fontSize) const;-@@ -297,6 +298,7 @@ public:+@@ -300,6 +301,7 @@ public:WEBCORE_EXPORT FloatSize screenSize() const;void setOverrideScreenSize(FloatSize&&);@@ -5968,7 +6020,7 @@ index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d57void selfOnlyRef();void selfOnlyDeref();-@@ -352,7 +354,6 @@ private:+@@ -353,7 +355,6 @@ private:#if ENABLE(DATA_DETECTION)std::unique_ptr<DataDetectionResultsStorage> m_dataDetectionResults;#endif@@ -5976,7 +6028,7 @@ index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d57void 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);-@@ -360,6 +361,7 @@ private:+@@ -361,6 +362,7 @@ private:enum class ShouldFindRootEditableElement : bool { No, Yes };Node* qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, const NodeQualifier&, ShouldApproximate, ShouldFindRootEditableElement = ShouldFindRootEditableElement::Yes);@@ -5985,10 +6037,10 @@ index 976a7e01a1a83902d2eddcdbe044c1ec1cd9a7b8..d548c31e6beffe704b8093669ee07d57ViewportArguments m_viewportArguments;diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp-index 2da22620311314dc67bec3563c7f1b6525bd7b28..e7c530d193fe0c318dfa89f5ae72e3598bdf44bd 100644+index 34c1e3039b5db70d15493524c96e507c2ce95199..2eb25218240da0a7878d9db2be1e9d3301e5d990 100644--- a/Source/WebCore/page/Page.cpp+++ b/Source/WebCore/page/Page.cpp-@@ -569,6 +569,45 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&+@@ -579,6 +579,45 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&document->updateViewportArguments();}@@ -6034,7 +6086,7 @@ index 2da22620311314dc67bec3563c7f1b6525bd7b28..e7c530d193fe0c318dfa89f5ae72e359ScrollingCoordinator* Page::scrollingCoordinator(){if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) {-@@ -3870,6 +3909,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)+@@ -3868,6 +3907,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)#endif}@@ -6062,10 +6114,10 @@ index 2da22620311314dc67bec3563c7f1b6525bd7b28..e7c530d193fe0c318dfa89f5ae72e359{if (insets == m_fullscreenInsets)diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h-index 551ffa245a63f05cd7d58a86048ed22c1feb6205..cd1ce84ec63f5ed8ae75178f79c35b9fd91b37f7 100644+index 39c4f65e563afee7e7bb770a7b174eb64432f04c..2aae08e7fd481aeae907d0acaae595fd8a083b9d 100644--- a/Source/WebCore/page/Page.h+++ b/Source/WebCore/page/Page.h-@@ -316,6 +316,9 @@ public:+@@ -321,6 +321,9 @@ public:const std::optional<ViewportArguments>& overrideViewportArguments() const { return m_overrideViewportArguments; }WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional<ViewportArguments>&);@@ -6075,7 +6127,7 @@ index 551ffa245a63f05cd7d58a86048ed22c1feb6205..cd1ce84ec63f5ed8ae75178f79c35b9fstatic void refreshPlugins(bool reload);WEBCORE_EXPORT PluginData& pluginData();void clearPluginData();-@@ -380,6 +383,10 @@ public:+@@ -385,6 +388,10 @@ public:#if ENABLE(DRAG_SUPPORT)DragController& dragController() { return m_dragController.get(); }const DragController& dragController() const { return m_dragController.get(); }@@ -6086,7 +6138,7 @@ index 551ffa245a63f05cd7d58a86048ed22c1feb6205..cd1ce84ec63f5ed8ae75178f79c35b9f#endifFocusController& focusController() const { return *m_focusController; }WEBCORE_EXPORT CheckedRef<FocusController> checkedFocusController() const;-@@ -563,6 +570,10 @@ public:+@@ -568,6 +575,10 @@ public:WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel);bool defaultUseDarkAppearance() const { return m_useDarkAppearance; }void setUseDarkAppearanceOverride(std::optional<bool>);@@ -6097,19 +6149,19 @@ index 551ffa245a63f05cd7d58a86048ed22c1feb6205..cd1ce84ec63f5ed8ae75178f79c35b9f#if ENABLE(TEXT_AUTOSIZING)float textAutosizingWidth() const { return m_textAutosizingWidth; }-@@ -1011,6 +1022,11 @@ public:+@@ -1015,6 +1026,11 @@ public:WEBCORE_EXPORT void setInteractionRegionsEnabled(bool);#endif+#if ENABLE(ORIENTATION_EVENTS)+ int orientation() const;-+ void setOverrideOrientation(std::optional<int>);++ WEBCORE_EXPORT void setOverrideOrientation(std::optional<int>);+#endif+#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); }#endif-@@ -1181,6 +1197,9 @@ private:+@@ -1197,6 +1213,9 @@ private:#if ENABLE(DRAG_SUPPORT)UniqueRef<DragController> m_dragController;@@ -6119,7 +6171,7 @@ index 551ffa245a63f05cd7d58a86048ed22c1feb6205..cd1ce84ec63f5ed8ae75178f79c35b9f#endifstd::unique_ptr<FocusController> m_focusController;#if ENABLE(CONTEXT_MENUS)-@@ -1259,6 +1278,8 @@ private:+@@ -1275,6 +1294,8 @@ private:bool m_useElevatedUserInterfaceLevel { false };bool m_useDarkAppearance { false };std::optional<bool> m_useDarkAppearanceOverride;@@ -6128,7 +6180,7 @@ index 551ffa245a63f05cd7d58a86048ed22c1feb6205..cd1ce84ec63f5ed8ae75178f79c35b9f#if ENABLE(TEXT_AUTOSIZING)float m_textAutosizingWidth { 0 };-@@ -1437,6 +1458,11 @@ private:+@@ -1454,6 +1475,11 @@ private:#endifstd::optional<ViewportArguments> m_overrideViewportArguments;@@ -6261,10 +6313,10 @@ index 4e4dfdebe954bf3f047d3a86a758dfd0913f732e..da2bcd0256cdfc2ba28fb07094abd0b6}diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp-index a35951b3150fe859450c5f781e44032078ca5f74..7fd0c71777a3fb451f3bd97b16911c01e5aa2203 100644+index 2b3cffe02206bf456a7c39ef66b3176f89a33b86..64bffe692552e7fbbbabd71e11de9c40c6ec3951 100644--- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp+++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp-@@ -336,6 +336,8 @@ bool ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtoc+@@ -343,6 +343,8 @@ bool ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtoctemplate<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{@@ -6273,7 +6325,7 @@ index a35951b3150fe859450c5f781e44032078ca5f74..7fd0c71777a3fb451f3bd97b16911c01bool isReportOnly = disposition == ContentSecurityPolicy::Disposition::ReportOnly;for (auto& policy : m_policies) {if (policy->isReportOnly() != isReportOnly)-@@ -349,6 +351,8 @@ typename std::enable_if<!std::is_convertible<Predicate, ContentSecurityPolicy::V+@@ -356,6 +358,8 @@ typename std::enable_if<!std::is_convertible<Predicate, ContentSecurityPolicy::Vtemplate<typename Predicate, typename... Args>bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposition, ViolatedDirectiveCallback&& callback, Predicate&& predicate, Args&&... args) const{@@ -6282,7 +6334,7 @@ index a35951b3150fe859450c5f781e44032078ca5f74..7fd0c71777a3fb451f3bd97b16911c01bool isReportOnly = disposition == ContentSecurityPolicy::Disposition::ReportOnly;bool isAllowed = true;for (auto& policy : m_policies) {-@@ -365,6 +369,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit+@@ -372,6 +376,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposittemplate<typename Predicate, typename... Args>bool ContentSecurityPolicy::allPoliciesAllow(ViolatedDirectiveCallback&& callback, Predicate&& predicate, Args&&... args) const{@@ -6390,7 +6442,7 @@ index 29492dd39b08db28aad2bf2439eb3e2bbcf25ad7..2b603cb8440b1b5057c87fcbd6909c61)diff --git a/Source/WebCore/platform/DragData.h b/Source/WebCore/platform/DragData.h-index 35cce31f0f77478754a7859c16f42b6a7ec6edda..03660bd492fad8863aeb21d73a54e7b914147f09 100644+index 34f49853b1d5ac8d8409bbd36d203bf7dfbb08e8..6d2808d510413e89ae9851733437d15b7660cd4a 100644--- a/Source/WebCore/platform/DragData.h+++ b/Source/WebCore/platform/DragData.h@@ -47,7 +47,7 @@ typedef void* DragDataRef;@@ -6413,7 +6465,7 @@ index 35cce31f0f77478754a7859c16f42b6a7ec6edda..03660bd492fad8863aeb21d73a54e7b9void getDragFileDescriptorData(int& size, String& pathname);void getDragFileContentData(int size, void* dataBlob);#endif-@@ -141,7 +141,7 @@ private:+@@ -143,7 +143,7 @@ private:String m_pasteboardName;#endif#if PLATFORM(WIN)@@ -6435,8 +6487,22 @@ index dc894343a5d9ce0e45a370a83bebf97fdcbeccc5..00003bd9bada8f134b6cc49f47c8c5cbIntSize dragImageSize(DragImageRef){+diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp+index a4e3064903c7bfb3d64244804828fe1c6d76c222..2dfa62b08f83ff5e576fcb29962fe885fdffec86 100644+--- a/Source/WebCore/platform/MIMETypeRegistry.cpp++++ b/Source/WebCore/platform/MIMETypeRegistry.cpp+@@ -666,6 +666,9 @@ bool MIMETypeRegistry::canShowMIMEType(const String& mimeType)+ if (startsWithLettersIgnoringASCIICase(mimeType, "text/"_s))+ return !isUnsupportedTextMIMEType(mimeType);+++ if (equalLettersIgnoringASCIICase(mimeType, "application/x-zerosize"_s))++ return true;+++ return false;+ }+diff --git a/Source/WebCore/platform/Pasteboard.h b/Source/WebCore/platform/Pasteboard.h-index 2203effb3a0a745170680a23d0ff07f3a1a1cd1b..11c0fe944d603349087c942caff9081d819c40da 100644+index 86205341336734eebfb9f1c98bb4b8ac4e81c3aa..1fd303a89a0431806f91ac072037806e7d6a2fe7 100644--- a/Source/WebCore/platform/Pasteboard.h+++ b/Source/WebCore/platform/Pasteboard.h@@ -45,7 +45,7 @@ OBJC_CLASS NSString;@@ -6448,7 +6514,7 @@ index 2203effb3a0a745170680a23d0ff07f3a1a1cd1b..11c0fe944d603349087c942caff9081d#include "SelectionData.h"#endif-@@ -108,7 +108,7 @@ struct PasteboardURL {+@@ -107,7 +107,7 @@ struct PasteboardURL {#if PLATFORM(MAC)String userVisibleForm;#endif@@ -6457,7 +6523,7 @@ index 2203effb3a0a745170680a23d0ff07f3a1a1cd1b..11c0fe944d603349087c942caff9081dString markup;#endif};-@@ -197,6 +197,11 @@ public:+@@ -195,6 +195,11 @@ public:#endif#endif@@ -6469,7 +6535,7 @@ index 2203effb3a0a745170680a23d0ff07f3a1a1cd1b..11c0fe944d603349087c942caff9081d#if PLATFORM(WIN)explicit Pasteboard(std::unique_ptr<PasteboardContext>&&, IDataObject*);explicit Pasteboard(std::unique_ptr<PasteboardContext>&&, WCDataObject*);-@@ -264,6 +269,12 @@ public:+@@ -262,6 +267,12 @@ public:int64_t changeCount() const;#endif@@ -6482,7 +6548,7 @@ index 2203effb3a0a745170680a23d0ff07f3a1a1cd1b..11c0fe944d603349087c942caff9081d#if PLATFORM(IOS_FAMILY)explicit Pasteboard(std::unique_ptr<PasteboardContext>&&, int64_t changeCount);explicit Pasteboard(std::unique_ptr<PasteboardContext>&&, const String& pasteboardName);-@@ -306,6 +317,7 @@ public:+@@ -304,6 +315,7 @@ public:COMPtr<IDataObject> dataObject() const { return m_dataObject; }WEBCORE_EXPORT void setExternalDataObject(IDataObject*);const DragDataMap& dragDataMap() const { return m_dragDataMap; }@@ -6490,7 +6556,7 @@ index 2203effb3a0a745170680a23d0ff07f3a1a1cd1b..11c0fe944d603349087c942caff9081dvoid writeURLToWritableDataObject(const URL&, const String&);COMPtr<WCDataObject> writableDataObject() const { return m_writableDataObject; }void writeImageToDataObject(Element&, const URL&); // FIXME: Layering violation.-@@ -358,6 +370,10 @@ private:+@@ -356,6 +368,10 @@ private:int64_t m_changeCount { 0 };#endif@@ -6501,7 +6567,7 @@ index 2203effb3a0a745170680a23d0ff07f3a1a1cd1b..11c0fe944d603349087c942caff9081d#if PLATFORM(COCOA)String m_pasteboardName;int64_t m_changeCount;-@@ -373,6 +389,7 @@ private:+@@ -371,6 +387,7 @@ private:COMPtr<IDataObject> m_dataObject;COMPtr<WCDataObject> m_writableDataObject;DragDataMap m_dragDataMap;@@ -6568,7 +6634,7 @@ index ae46341ba71c7f6df7c607bd852338cdb7f83fe1..b318c0771192344a6891c1f097cb0b93+} // namespace WebCore+#endifdiff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h-index 6c64c7040eb190c3d67380070e884a8230029c26..d0f8341c538cbc2323ac0074a5ef3226d00a5fd6 100644+index 9db6f2d77f14bd77f075a4c826dea1768452fcb9..7a7d48b016037d3865603619b2c4ca67e737bc42 100644--- a/Source/WebCore/platform/PlatformScreen.h+++ b/Source/WebCore/platform/PlatformScreen.h@@ -151,13 +151,18 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);@@ -6619,6 +6685,18 @@ index 34715d27b529750fc866db87cd330b5184286771..3eefa218af075f76d98012cdeae7e4b3// FIXME: since WPE currently does not send touch stationary events, we need to be able to// create a PlatformTouchPoint of type TouchCancelled artificiallyPlatformTouchPoint(unsigned id, State state, IntPoint screenPos, IntPoint pos)+diff --git a/Source/WebCore/platform/Skia.cmake b/Source/WebCore/platform/Skia.cmake+index c14a1b2e20cfc1dd15e483bd662ef40484da8c26..74b06820837d68b23e7a0eb5540b18688534ef09 100644+--- a/Source/WebCore/platform/Skia.cmake++++ b/Source/WebCore/platform/Skia.cmake+@@ -13,6 +13,7 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS++ platform/graphics/skia/GraphicsContextSkia.h+ platform/graphics/skia/ImageBufferSkiaBackend.h++ platform/graphics/skia/ImageBufferUtilitiesSkia.h+ platform/graphics/skia/SkiaAcceleratedBufferPool.h+ platform/graphics/skia/SkiaHarfBuzzFont.h+ platform/graphics/skia/SkiaHarfBuzzFontCache.hdiff --git a/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp b/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cppindex e280025043b3c03c3974289e62ef7cc88ebfa2c7..077a4ab4aa5b688937ed4d5018745aa6f6af7442 100644--- a/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp@@ -6741,7 +6819,7 @@ index a82b748682f984fcdd4f5413d0254e0f5573f043..2c3d4bba92c63235c124a400d8945549Vector<uint8_t> encodeData(std::span<const uint8_t>, const String& mimeType, std::optional<double> quality);diff --git a/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h b/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h-index b60f9a64bacc8282860da6de299b75aeb295b9b5..55bd017c03c6478ca334bd5ef164160fef5d5302 100644+index 6f43c048cd8354c97097c8365b772b92a429b670..7bccf4f7921fb3b0848781252cd69b4bd6959287 100644--- a/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h+++ b/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h@@ -23,6 +23,7 @@@@ -6753,14 +6831,14 @@ index b60f9a64bacc8282860da6de299b75aeb295b9b5..55bd017c03c6478ca334bd5ef164160fnamespace WebCore {diff --git a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp b/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp-index 3f96ccee98a29188e4af376484ab6514b319ddf8..20d9ba661aa10adada5ef5688854b4bc3c0f0702 100644+index f6d2e39b6a9f454067734b3cb5a03ed243450dfa..fd78c6b39e35b57677ff6da0f66e5a76998efa47 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,return stringIndices;}-+static int compactScriptItemsIfNeeded(const UChar* cp, unsigned stringLength, Vector<SCRIPT_ITEM>& items, int numItems, const Font* font)++static int compactScriptItemsIfNeeded(std::span<const UChar> cp, Vector<SCRIPT_ITEM>& items, int numItems, const Font* font)+{+ // https://bugs.webkit.org/show_bug.cgi?id=201214+ // Uniscribe is overly aggressive in separating the runs. It'll split "3d_rotation" into "3", "d", "_" and "rotation" and we@@ -6775,7 +6853,7 @@ index 3f96ccee98a29188e4af376484ab6514b319ddf8..20d9ba661aa10adada5ef5688854b4bc+ return numItems;++ bool allGoodCharacters = true;-+ for (unsigned i = 0; allGoodCharacters && i < stringLength; ++i) {++ for (unsigned i = 0; allGoodCharacters && i < cp.size(); ++i) {+ const UChar c = cp[i];+ allGoodCharacters = (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_';+ }@@ -6787,20 +6865,20 @@ index 3f96ccee98a29188e4af376484ab6514b319ddf8..20d9ba661aa10adada5ef5688854b4bc+ return 1;+}+- void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, unsigned stringLength, unsigned stringLocation, const Font* font)+ void ComplexTextController::collectComplexTextRunsForCharacters(std::span<const UChar> cp, unsigned stringLocation, const Font* font){if (!font) {-@@ -198,6 +225,8 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,+@@ -198,6 +225,8 @@ void ComplexTextController::collectComplexTextRunsForCharacters(std::span<const}items.resize(numItems + 1);-+ numItems = compactScriptItemsIfNeeded(cp, stringLength, items, numItems, font);++ numItems = compactScriptItemsIfNeeded(cp, items, numItems, font);+for (int i = 0; i < numItems; i++) {// Determine the string for this item.- const UChar* str = cp + items[i].iCharPos;+ 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 58f2ac6c28396289c55493c7a78b2b4709e5f129..cf9687900fdeeebe9d829907d121da2495722bae 100644+index 8185125ac6aa07d4ee99d676d82c79932c2d84fd..0b2a8da1463c905d1e6f1448cdc0c0f63228b30f 100644--- a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp+++ b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp@@ -37,7 +37,9 @@@@ -7061,10 +7139,10 @@ index 58f2ac6c28396289c55493c7a78b2b4709e5f129..cf9687900fdeeebe9d829907d121da24{switch (val) {diff --git a/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp b/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp-index ae1da37330aa06a8f660876ba415ff2821f59813..c358a925347187181fbe1b381428c7bd0018455c 100644+index a8fdb7d39e145778b27fdde0d407b7c01b61e12a..da36507b9d77bafd68a342affb4dc20512c6d7a2 100644--- a/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp+++ b/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp-@@ -124,7 +124,7 @@ bool screenSupportsExtendedColor(Widget*)+@@ -134,7 +134,7 @@ bool screenSupportsExtendedColor(Widget*)}#if ENABLE(TOUCH_EVENTS)@@ -7073,7 +7151,7 @@ index ae1da37330aa06a8f660876ba415ff2821f59813..c358a925347187181fbe1b381428c7bd{auto* display = gdk_display_get_default();if (!display)-@@ -134,7 +134,7 @@ bool screenHasTouchDevice()+@@ -144,7 +144,7 @@ bool screenHasTouchDevice()return seat ? gdk_seat_get_capabilities(seat) & GDK_SEAT_CAPABILITY_TOUCH : true;}@@ -7083,7 +7161,7 @@ index ae1da37330aa06a8f660876ba415ff2821f59813..c358a925347187181fbe1b381428c7bdauto* display = gdk_display_get_default();if (!display)diff --git a/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp b/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp-index ae439e30f1fb239d18e1164e8896dfb272c75673..eddcb9bda783fcdcbf9f924d4eaa6cc78dd54395 100644+index ae439e30f1fb239d18e1164e8896dfb272c75673..4cf29eda13d1f2dc2f03750c0ef8985b17de7f50 100644--- a/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp+++ b/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp@@ -32,6 +32,10 @@@@ -7107,7 +7185,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..eddcb9bda783fcdcbf9f924d4eaa6cc7- notImplemented();+ if (m_selectionData) {+ ListHashSet<String> types;-+ if (auto* buffer = m_selectionData->customData()) {++ if (auto& buffer = m_selectionData->customData()) {+ auto customData = PasteboardCustomData::fromSharedBuffer(*buffer);+ if (customData.origin() == origin) {+ for (auto& type : customData.orderedTypes())@@ -7134,7 +7212,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..eddcb9bda783fcdcbf9f924d4eaa6cc7{- notImplemented(); // webkit.org/b/177633: [GTK] Move to new Pasteboard API+ if (m_selectionData) {-+ if (auto* buffer = m_selectionData->customData())++ if (auto& buffer = m_selectionData->customData())+ return PasteboardCustomData::fromSharedBuffer(*buffer).origin();++ return { };@@ -7162,7 +7240,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..eddcb9bda783fcdcbf9f924d4eaa6cc7+String Pasteboard::readStringInCustomData(const String& type){+ if (m_selectionData) {-+ if (auto* buffer = m_selectionData->customData())++ if (auto& buffer = m_selectionData->customData())+ return PasteboardCustomData::fromSharedBuffer(*buffer).readStringInCustomData(type);++ return { };@@ -7290,7 +7368,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..eddcb9bda783fcdcbf9f924d4eaa6cc7#endif // USE(LIBWPE)diff --git a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp-index e187936cbef017c080d1dfa14de439b3f5bc2cf8..270c237c8db2f6809719ecfd54a95306728676bc 100644+index 76f1c37bb02952511a95331d2cc778eabc2375f5..c36cc0ca55e8797264100da69081dace30654393 100644--- a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp+++ b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp@@ -30,8 +30,10 @@@@ -7668,8 +7746,20 @@ index 0552842dbe3f3a2c12a504178f5a8ca977e1c4db..2ef3b1b459d8a9b4e86b4556feeb4f07namespace 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 34caadc74c1ad6b411e9043289fece53b9757f17..1e8ec2fe9f16ddd0a33e261172689a9d35ec5194 100644+index 80b35d678bb9f3cd3f34af6258785b0c8a088347..b72058db305a8e6228893c5a8ce3f578861dae89 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)@@ -7678,18 +7768,18 @@ index 34caadc74c1ad6b411e9043289fece53b9757f17..1e8ec2fe9f16ddd0a33e261172689a9d});+ // Align with Chromium and Firefox, but just for SetCookies where it is critical:+ // https://bit.ly/2HCa0iq-+ String separator = name == HTTPHeaderName::SetCookie ? "\n "_s : ", "_s;++ String separator = name == HTTPHeaderName::SetCookie ? "playwright-set-cookie-separator"_s : ", "_s;if (index != notFound)-- m_commonHeaders[index].value = makeString(m_commonHeaders[index].value, ", ", value);+- m_commonHeaders[index].value = makeString(m_commonHeaders[index].value, ", "_s, value);+ m_commonHeaders[index].value = makeString(m_commonHeaders[index].value, separator, value);elsem_commonHeaders.append(CommonHeader { name, value });}diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h-index e745131ddc12d23cd5e2429f565f910ad3520e82..dd23b06a3ceab1675e7e59d8642abc589c360d2a 100644+index cf43da22a5f7674a1b24c4d39b492e0b8c318f3a..524e671cf6959fc48aefe4ec5a0611cb0cadf02b 100644--- a/Source/WebCore/platform/network/NetworkStorageSession.h+++ b/Source/WebCore/platform/network/NetworkStorageSession.h-@@ -167,6 +167,8 @@ public:+@@ -184,6 +184,8 @@ public:NetworkingContext* context() const;#endif@@ -7699,7 +7789,7 @@ index e745131ddc12d23cd5e2429f565f910ad3520e82..dd23b06a3ceab1675e7e59d8642abc58WEBCORE_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 d47b089014717dc98928aa597ff881f3909559e1..3ab3262fd35c1ae740b6b8c01b6ce950fee0c224 100644+index e1bf41ea3b643d3841167abca8a6bd55f5f161f1..d7df4847f04fe832196f269d32c1ce1fc54cc650 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@@ -7739,7 +7829,7 @@ index d47b089014717dc98928aa597ff881f3909559e1..3ab3262fd35c1ae740b6b8c01b6ce950*source,*type,diff --git a/Source/WebCore/platform/network/ResourceResponseBase.h b/Source/WebCore/platform/network/ResourceResponseBase.h-index 203c591edc985e99ec7dc7a2bfaf69c92d3de99c..461b774d446528b7259ffc6ea3982d172a4c9f9f 100644+index 20b1437401c9560e22fd9e218d8193f09ac2aaaa..ff32706566fefa61030a9e7a1523987df1244c97 100644--- a/Source/WebCore/platform/network/ResourceResponseBase.h+++ b/Source/WebCore/platform/network/ResourceResponseBase.h@@ -251,6 +251,11 @@ protected:@@ -7780,7 +7870,7 @@ index 203c591edc985e99ec7dc7a2bfaf69c92d3de99c..461b774d446528b7259ffc6ea3982d17ResourceResponseBase::Source source;ResourceResponseBase::Type type;diff --git a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm-index 305080a5c298eaa1ef4644bdc6d90e243bcd061d..e3cbec55b164a49b9ed92b66ff70134618ab53f5 100644+index 55ebb19af79c92f79061995085538d8913ae180f..3ddb412af7c7587d43b4ddfc12cb49265cb17f95 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@@ -7900,10 +7990,10 @@ index 41af70e9bddcb507bf7e57841e4051bc99a78410..87899280f985ca5f0cb135fb9ba53cdeWEBCORE_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 f46f26a553e0634fd6a4d383c0821aadd504a399..738327163771952be91bc024e92070c015de2dd3 100644+index 798c95d09029dd354980a227bf906c43d9b75ee3..83461976697da56c2c5e51f56fd3e6fe1a9e28c0 100644--- a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp+++ b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp-@@ -136,6 +136,12 @@ void NetworkStorageSession::setCookieAcceptPolicy(CookieAcceptPolicy policy) con+@@ -134,6 +134,12 @@ void NetworkStorageSession::setCookieAcceptPolicy(CookieAcceptPolicy policy) concookieDatabase().setAcceptPolicy(policy);}@@ -7917,10 +8007,10 @@ index f46f26a553e0634fd6a4d383c0821aadd504a399..738327163771952be91bc024e92070c0{switch (cookieDatabase().acceptPolicy()) {diff --git a/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp b/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp-index 09ab1320beacc41ae92399f3320aaf805d9d81d1..4c63cb2a3f6fbf277227a88b92f206402bc12cd7 100644+index 09ab1320beacc41ae92399f3320aaf805d9d81d1..e1caf6e7ebd61151439a9c86350e57122784af0b 100644--- a/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp+++ b/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp-@@ -424,6 +424,30 @@ void NetworkStorageSession::replaceCookies(const Vector<Cookie>& cookies)+@@ -424,6 +424,26 @@ void NetworkStorageSession::replaceCookies(const Vector<Cookie>& cookies)g_signal_emit(jar, signalId, 0);}@@ -7940,11 +8030,7 @@ index 09ab1320beacc41ae92399f3320aaf805d9d81d1..4c63cb2a3f6fbf277227a88b92f20640+ if (!cookie)+ continue;+-+#if SOUP_CHECK_VERSION(2, 67, 1)+ soup_cookie_jar_add_cookie_full(cookieStorage(), cookie.release(), origin.get(), firstPartyURI.get());-+#else-+ soup_cookie_jar_add_cookie_with_first_party(cookieStorage(), firstPartyURI.get(), cookie.release());-+#endif+ }+}+@@ -7952,7 +8038,7 @@ index 09ab1320beacc41ae92399f3320aaf805d9d81d1..4c63cb2a3f6fbf277227a88b92f20640{GUniquePtr<SoupCookie> targetCookie(cookie.toSoupCookie());diff --git a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp-index 15f47d0d2a99bcb1a7b9dd9764a9766a20e97692..f623d165826485f58cef60c4b3551055f4352de6 100644+index 602348fdd5c5d7aec9cb00fcc0512be0d791ba68..ded04cb4ac56cf906f4e6e62a2bc50d016363cf5 100644--- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp+++ b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp@@ -39,6 +39,7 @@@@ -7988,7 +8074,7 @@ index c3ffc7392c0b7fa099a7dd4e4be977cdee1c803c..9570dbb0f2c42ca38598a8898183c9b3HGLOBAL createGlobalData(const String&);HGLOBAL createGlobalData(const Vector<char>&);diff --git a/Source/WebCore/platform/win/DragDataWin.cpp b/Source/WebCore/platform/win/DragDataWin.cpp-index 7bdb180c89bf3fe9d48098318d3b7503b8fd6279..296a3b2b82733b27272acb51ab4f883decfbaf14 100644+index 0379437d84807e4a8d3846afac5ec8a70e743e70..1ae19e2b755e99c9f4c3e6d5dc0e4f8b6ebe8ab3 100644--- a/Source/WebCore/platform/win/DragDataWin.cpp+++ b/Source/WebCore/platform/win/DragDataWin.cpp@@ -40,7 +40,7 @@@@ -8018,7 +8104,7 @@ index 7bdb180c89bf3fe9d48098318d3b7503b8fd6279..296a3b2b82733b27272acb51ab4f883dif (!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 b9f728911d34163c1ca14d359741d44cc05ab755..1609197044eaa8e9036e6dae23d1c5270b53e08b 100644+index d948c806e68a05a9899a67c00048435c4dc93134..9a5a045f8642ca403b1da59a0ac7e838c86fc4d7 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,@@ -8042,10 +8128,10 @@ index b9f728911d34163c1ca14d359741d44cc05ab755..1609197044eaa8e9036e6dae23d1c527OptionSet<PlatformEvent::Modifier> PlatformKeyboardEvent::currentStateOfModifierKeys()diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp-index 5728033e25919cef5b81d08516964aa5445c5d6e..0e588ebd34299d56ace86806bdec6e9ce337b053 100644+index 6ead5f4dea594fac7fad10fe97ad5a1ce605804f..a0cd7169ee36a3bec67b6a224444078fab61b699 100644--- a/Source/WebCore/platform/win/PasteboardWin.cpp+++ b/Source/WebCore/platform/win/PasteboardWin.cpp-@@ -1130,7 +1130,21 @@ void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>& data)+@@ -1136,7 +1136,21 @@ void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>& data)}clear();@@ -8067,7 +8153,7 @@ index 5728033e25919cef5b81d08516964aa5445c5d6e..0e588ebd34299d56ace86806bdec6e9cif (::OpenClipboard(m_owner)) {const auto& customData = data.first();customData.forEachPlatformStringOrBuffer([](auto& type, auto& stringOrBuffer) {-@@ -1169,4 +1183,25 @@ void Pasteboard::write(const Color&)+@@ -1175,4 +1189,25 @@ void Pasteboard::write(const Color&){}@@ -8095,10 +8181,10 @@ index 5728033e25919cef5b81d08516964aa5445c5d6e..0e588ebd34299d56ace86806bdec6e9c} // namespace WebCorediff --git a/Source/WebCore/platform/wpe/DragDataWPE.cpp b/Source/WebCore/platform/wpe/DragDataWPE.cppnew file mode 100644-index 0000000000000000000000000000000000000000..f8fc3fa43bfe62a1c066689f48ddabaaa357a437+index 0000000000000000000000000000000000000000..fbd32d390129129fd5b213f7f9c3e96bdca9355b--- /dev/null+++ b/Source/WebCore/platform/wpe/DragDataWPE.cpp-@@ -0,0 +1,87 @@+@@ -0,0 +1,92 @@+/*+ * This library is free software; you can redistribute it and/or+ * modify it under the terms of the GNU Lesser General Public@@ -8185,6 +8271,11 @@ index 0000000000000000000000000000000000000000..f8fc3fa43bfe62a1c066689f48ddabaa+ return m_platformDragData->url().string();+}+++bool DragData::shouldMatchStyleOnDrop() const++{++ return false;++}+++}diff --git a/Source/WebCore/platform/wpe/DragImageWPE.cpp b/Source/WebCore/platform/wpe/DragImageWPE.cppnew file mode 100644@@ -8286,10 +8377,10 @@ index 77bdff686770e56f5445fa12216c6bff93bb5cfb..e16583ea6298864df9c8b82cb0686b2a}diff --git a/Source/WebCore/platform/wpe/SelectionData.cpp b/Source/WebCore/platform/wpe/SelectionData.cppnew file mode 100644-index 0000000000000000000000000000000000000000..39756417d475f3aae77c2f3d7772a71a6e1bec57+index 0000000000000000000000000000000000000000..947bfe6576780038ecb87ea9bda116adb19dfd71--- /dev/null+++ b/Source/WebCore/platform/wpe/SelectionData.cpp-@@ -0,0 +1,134 @@+@@ -0,0 +1,151 @@+/*+ * Copyright (C) 2009, Martin Robinson+ *@@ -8317,6 +8408,23 @@ index 0000000000000000000000000000000000000000..39756417d475f3aae77c2f3d7772a71a++namespace WebCore {+++SelectionData::SelectionData(const String& text, const String& markup, const URL& url, const String& uriList, RefPtr<WebCore::Image>&& image, RefPtr<WebCore::SharedBuffer>&& buffer, bool canSmartReplace)++{++ if (!text.isEmpty())++ setText(text);++ if (!markup.isEmpty())++ setMarkup(markup);++ if (!url.isEmpty())++ setURL(url, String());++ if (!uriList.isEmpty())++ setURIList(uriList);++ if (image)++ setImage(WTFMove(image));++ if (buffer)++ setCustomData(buffer.releaseNonNull());++ setCanSmartReplace(canSmartReplace);++}+++static void replaceNonBreakingSpaceWithSpace(String& str)+{+ static const UChar NonBreakingSpaceCharacter = 0xA0;@@ -8385,12 +8493,12 @@ index 0000000000000000000000000000000000000000..39756417d475f3aae77c2f3d7772a71a+ actualLabel = url.string();++ StringBuilder markup;-+ markup.append("<a href=\"");++ markup.append("<a href=\""_s);+ markup.append(url.string());-+ markup.append("\">");++ markup.append("\">"_s);+ GUniquePtr<gchar> escaped(g_markup_escape_text(actualLabel.utf8().data(), -1));+ markup.append(String::fromUTF8(escaped.get()));-+ markup.append("</a>");++ markup.append("</a>"_s);+ setMarkup(markup.toString());+}+@@ -8426,10 +8534,10 @@ index 0000000000000000000000000000000000000000..39756417d475f3aae77c2f3d7772a71a+} // namespace WebCorediff --git a/Source/WebCore/platform/wpe/SelectionData.h b/Source/WebCore/platform/wpe/SelectionData.hnew file mode 100644-index 0000000000000000000000000000000000000000..cf2b51f6f02837a1106f4d999f2f130e2580986a+index 0000000000000000000000000000000000000000..a76b583a1e65cd6999fab4784c22dd9cb48d6aeb--- /dev/null+++ b/Source/WebCore/platform/wpe/SelectionData.h-@@ -0,0 +1,82 @@+@@ -0,0 +1,85 @@+/*+ * Copyright (C) 2009, Martin Robinson+ *@@ -8484,8 +8592,8 @@ index 0000000000000000000000000000000000000000..cf2b51f6f02837a1106f4d999f2f130e+ bool hasFilenames() const { return !m_filenames.isEmpty(); }+ void clearURIList() { m_uriList = emptyString(); }+-+ void setImage(Image* newImage) { m_image = newImage; }-+ Image* image() const { return m_image.get(); }++ void setImage(RefPtr<Image>&& newImage) { m_image = WTFMove(newImage); }++ const RefPtr<Image>& image() const { return m_image; }+ bool hasImage() const { return m_image; }+ void clearImage() { m_image = nullptr; }+@@ -8493,13 +8601,16 @@ index 0000000000000000000000000000000000000000..cf2b51f6f02837a1106f4d999f2f130e+ bool canSmartReplace() const { return m_canSmartReplace; }++ void setCustomData(Ref<SharedBuffer>&& buffer) { m_customData = WTFMove(buffer); }-+ SharedBuffer* customData() const { return m_customData.get(); }++ const RefPtr<SharedBuffer>& customData() const { return m_customData; }+ bool hasCustomData() const { return !!m_customData; }+ void clearCustomData() { m_customData = nullptr; }++ void clearAll();+ void clearAllExceptFilenames();+++ SelectionData(const String& text, const String& markup, const URL&, const String& uriList, RefPtr<WebCore::Image>&&, RefPtr<WebCore::SharedBuffer>&&, bool);++ SelectionData() = default;+++private:+ String m_text;+ String m_markup;@@ -8570,7 +8681,7 @@ index 1d8488e0d36288e09cd5662bd7f770ade95dfee3..dee07f87b47d62d4ef8ede45824bdb2fWorkerOrWorkletGlobalScope& m_globalScope;};diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp-index caf9b8fe4c94e56154fa70b4b09391dc1db5b4b6..e9c038a464ac0e30bce7c1e162911d12086c1082 100644+index 53209e9de68b0da9c7251d2575fa17195488ae60..5629471032b6a26186e8abff73c6f80e99e13a65 100644--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp@@ -96,6 +96,8 @@@@ -8582,7 +8693,7 @@ index caf9b8fe4c94e56154fa70b4b09391dc1db5b4b6..e9c038a464ac0e30bce7c1e162911d12#endif#if ENABLE(APPLE_PAY_REMOTE_UI)-@@ -1093,6 +1095,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)+@@ -1098,6 +1100,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)storageSession->clearPageSpecificDataForResourceLoadStatistics(pageID);}@@ -8598,10 +8709,10 @@ index caf9b8fe4c94e56154fa70b4b09391dc1db5b4b6..e9c038a464ac0e30bce7c1e162911d12{if (auto* storageSession = networkProcess().storageSession(m_sessionID))diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h-index a9fd7f7625ca67043c8ed0dcd7979df49cd65266..8e7903e0c5acefb8c5381f8297b52d610b8e4a29 100644+index 12fe210ef04c92edf4b44b70f9bb35d00cc8a7d1..1196d7e9192dc01cac4914ac10998613f48c231c 100644--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h-@@ -343,6 +343,8 @@ private:+@@ -345,6 +345,8 @@ private:void clearPageSpecificData(WebCore::PageIdentifier);@@ -8611,7 +8722,7 @@ index a9fd7f7625ca67043c8ed0dcd7979df49cd65266..8e7903e0c5acefb8c5381f8297b52d61void logUserInteraction(RegistrableDomain&&);diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in-index b90021dcc3e4d70cb7b42b538050c5a37653b3cd..acc42255c8d3fb08971f62e6771f022f544199b7 100644+index eb27201d553e64146b8d36d21a49e3981d6f05c1..d49ea6c810dfd4f460b24d94681d6b9ca088b020 100644--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in@@ -74,6 +74,8 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver {@@ -8624,7 +8735,7 @@ index b90021dcc3e4d70cb7b42b538050c5a37653b3cd..acc42255c8d3fb08971f62e6771f022fLogUserInteraction(WebCore::RegistrableDomain domain)ResourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics> statistics) -> ()diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.cpp b/Source/WebKit/NetworkProcess/NetworkProcess.cpp-index cd174626a10faea7348b568bcfc384d9aaa86f5a..72e66509f540301cedc64ac9ea69f50fb1044245 100644+index f9b765f8732de5d51b093fc776920e55b760cba3..621ee3d381f62e2ae6d2c4a71e8a5803a4729d67 100644--- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp+++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp@@ -658,6 +658,12 @@ void NetworkProcess::registrableDomainsExemptFromWebsiteDataDeletion(PAL::Sessio@@ -8684,7 +8795,7 @@ index 5e590b5a09f8bd5d040e2e68d54c545c52d4b179..c58bb6270ab75026187fdda6c94822f6ClearUserInteraction(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 b22ff912dba5b116a979119af6721bcfcc72ec5d..deb9a0b67adb51b190833354e7ea5d8e46aea56c 100644+index e086cbe963b9965c9203c0023a67250302a0d9c4..b9a10a505a48e0708b048a7af71fb69e5df5d6a4 100644--- a/Source/WebKit/NetworkProcess/NetworkSession.h+++ b/Source/WebKit/NetworkProcess/NetworkSession.h@@ -200,6 +200,9 @@ public:@@ -8706,10 +8817,10 @@ index b22ff912dba5b116a979119af6721bcfcc72ec5d..deb9a0b67adb51b190833354e7ea5d8eHashSet<Ref<NetworkResourceLoader>> m_keptAliveLoads;diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm-index 95d84783fe56cc381e67113924780bf1e2d9320e..129e7ada7fa90665a80ccf79641d7fcaf9f085a0 100644+index dc841a54751eb8ffa12f62a0817174aaca29eea7..ab6e9cb48c00e4ede2b53322cca8693c02e69a44 100644--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm-@@ -761,6 +761,8 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece+@@ -767,6 +767,8 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceif ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {sessionCocoa->setClientAuditToken(challenge);@@ -8718,7 +8829,7 @@ index 95d84783fe56cc381e67113924780bf1e2d9320e..129e7ada7fa90665a80ccf79641d7fcaNSURLSessionTaskTransactionMetrics *metrics = task._incompleteTaskMetrics.transactionMetrics.lastObject;auto tlsVersion = (tls_protocol_version_t)metrics.negotiatedTLSProtocolVersion.unsignedShortValue;-@@ -1100,6 +1102,13 @@ ALLOW_DEPRECATED_DECLARATIONS_END+@@ -1108,6 +1110,13 @@ ALLOW_DEPRECATED_DECLARATIONS_ENDresourceResponse.setDeprecatedNetworkLoadMetrics(WebCore::copyTimingData(taskMetrics, networkDataTask->networkLoadMetrics()));@@ -8733,7 +8844,7 @@ index 95d84783fe56cc381e67113924780bf1e2d9320e..129e7ada7fa90665a80ccf79641d7fca#if !LOG_DISABLEDLOG(NetworkSession, "%llu didReceiveResponse completionHandler (%d)", taskIdentifier, policyAction);diff --git a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp-index 383b0c08feda5c59455407093f656311c0a0c3fc..4522f3a562e67f41f29ee699ab9ed9dad999d90e 100644+index 7fea007b41d750e14b6807f894b3167d0e0963e1..fbcf34cc6d8291eab7768f5f33117e3dc5e9289e 100644--- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp+++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp@@ -80,10 +80,18 @@ NetworkDataTaskCurl::NetworkDataTaskCurl(NetworkSession& session, NetworkDataTas@@ -8789,7 +8900,7 @@ index 383b0c08feda5c59455407093f656311c0a0c3fc..4522f3a562e67f41f29ee699ab9ed9da+ return;+ }+-+ if (-1 == FileSystem::writeToFile(m_downloadDestinationFile, static_cast<void*>(m_dataURLResult.value().data.data()), m_dataURLResult.value().data.size())) {++ if (-1 == FileSystem::writeToFile(m_downloadDestinationFile, std::span<const uint8_t>(m_dataURLResult.value().data.data(), m_dataURLResult.value().data.size()))) {+ deleteDownloadFile();+ download.didFail(ResourceError(CURLE_WRITE_ERROR, m_response.url()), std::span<const uint8_t>());+ return;@@ -8803,7 +8914,7 @@ index 383b0c08feda5c59455407093f656311c0a0c3fc..4522f3a562e67f41f29ee699ab9ed9da+void NetworkDataTaskCurl::invokeDidReceiveResponse(){- didReceiveResponse(ResourceResponse(m_response), NegotiatedLegacyTLS::No, PrivateRelayed::No, [this, protectedThis = Ref { *this }](PolicyAction policyAction) {+ didReceiveResponse(ResourceResponse(m_response), NegotiatedLegacyTLS::No, PrivateRelayed::No, std::nullopt, [this, protectedThis = Ref { *this }](PolicyAction policyAction) {@@ -320,6 +359,8 @@ void NetworkDataTaskCurl::invokeDidReceiveResponse()downloadPtr->didCreateDestination(m_pendingDownloadLocation);if (m_curlRequest)@@ -8823,7 +8934,7 @@ index 383b0c08feda5c59455407093f656311c0a0c3fc..4522f3a562e67f41f29ee699ab9ed9daif (m_state != State::Suspended) {m_state = State::Suspended;diff --git a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h-index bfff08efb10d4d6cd1a27755403ed53ed58ce919..1a59755f684229bd47fd70369e4a9d4282950ef7 100644+index ce5e9ea8c6cf1966f0705732b6b37d1639847a3c..7a7a38947a8f3f20b0439bb84d00dcef6391f4a5 100644--- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h+++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h@@ -28,6 +28,7 @@@@ -8843,7 +8954,7 @@ index bfff08efb10d4d6cd1a27755403ed53ed58ce919..1a59755f684229bd47fd70369e4a9d42class NetworkDataTaskCurl final : public NetworkDataTask, public WebCore::CurlRequestClient {public:static Ref<NetworkDataTask> create(NetworkSession& session, NetworkDataTaskClient& client, const NetworkLoadParameters& parameters)-@@ -75,6 +78,9 @@ private:+@@ -76,6 +79,9 @@ private:void curlDidComplete(WebCore::CurlRequest&, WebCore::NetworkLoadMetrics&&) override;void curlDidFailWithError(WebCore::CurlRequest&, WebCore::ResourceError&&, WebCore::CertificateInfo&&) override;@@ -8853,7 +8964,7 @@ index bfff08efb10d4d6cd1a27755403ed53ed58ce919..1a59755f684229bd47fd70369e4a9d42void invokeDidReceiveResponse();bool shouldStartHTTPRedirection();-@@ -113,6 +119,9 @@ private:+@@ -114,6 +120,9 @@ private:unsigned m_authFailureCount { 0 };bool m_allowOverwriteDownload { false };@@ -8913,10 +9024,10 @@ index 60106d6125f85d0cf848e828fd4ed7a50005f105..021d7b6d12baf4671a2968753969ca46didFail(WTFMove(errorReason));});diff --git a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.h b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.h-index 5023a9be6554abc9ffe8fb37968978cb28c5b9a1..9cfdedd0411bf32843c2c9a7d7d722c5ee4f6e46 100644+index 41c99c4796ab2b624dffe35d34f9ea1bcf54f966..d83977c09adf271ddf7243a51300882e4f2bd0d9 100644--- a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.h+++ b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.h-@@ -49,7 +49,7 @@ struct SessionSet;+@@ -58,7 +58,7 @@ struct SessionSet;class WebSocketTask : public CanMakeWeakPtr<WebSocketTask>, public WebCore::CurlStream::Client {WTF_MAKE_FAST_ALLOCATED;public:@@ -8925,7 +9036,7 @@ index 5023a9be6554abc9ffe8fb37968978cb28c5b9a1..9cfdedd0411bf32843c2c9a7d7d722c5virtual ~WebSocketTask();void sendString(std::span<const uint8_t>, CompletionHandler<void()>&&);-@@ -102,6 +102,7 @@ private:+@@ -111,6 +111,7 @@ private:WebPageProxyIdentifier m_webProxyPageID;WebCore::ResourceRequest m_request;String m_protocol;@@ -8953,19 +9064,19 @@ 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 4295b59484942084404ff7b03669aba249667e97..73dea05ac933938a19bbd6ec5bbcbd6139f98c25 100644+index 15fb15b528ae9177e69fd4b6b43b81b7216232ff..075499ebbc20845a80830cdce105fb590f0772f8 100644--- a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp+++ b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp-@@ -466,6 +466,8 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)- m_networkLoadMetrics.failsTAOCheck = !passesTimingAllowOriginCheck(m_response, *origin);- }+@@ -460,6 +460,8 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)+ m_networkLoadMetrics.responseStart = MonotonicTime::now();+ #endif+ auto& additionalMetrics = additionalNetworkLoadMetricsForWebInspector();+ m_response.m_httpRequestHeaderFields = additionalMetrics.requestHeaders;dispatchDidReceiveResponse();}-@@ -563,6 +565,8 @@ bool NetworkDataTaskSoup::acceptCertificate(GTlsCertificate* certificate, GTlsCe+@@ -562,6 +564,8 @@ bool NetworkDataTaskSoup::acceptCertificate(GTlsCertificate* certificate, GTlsCe{ASSERT(m_soupMessage);URL url = soupURIToURL(soup_message_get_uri(m_soupMessage.get()));@@ -8975,7 +9086,7 @@ index 4295b59484942084404ff7b03669aba249667e97..73dea05ac933938a19bbd6ec5bbcbd61if (!error)return true;diff --git a/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp-index 60e79ff683e280591d686468c42decf1ac109ed2..ef74cb09e75c3e6f57d180487fa266b7a0f09af5 100644+index 60e79ff683e280591d686468c42decf1ac109ed2..99707bc16644b88ff24a192029f3866e0a80e827 100644--- a/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp+++ b/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp@@ -97,6 +97,11 @@ void NetworkSessionSoup::clearCredentials(WallTime)@@ -8990,31 +9101,9 @@ index 60e79ff683e280591d686468c42decf1ac109ed2..ef74cb09e75c3e6f57d180487fa266b7#if USE(SOUP2)static gboolean webSocketAcceptCertificateCallback(GTlsConnection* connection, GTlsCertificate* certificate, GTlsCertificateFlags errors, NetworkSessionSoup* session){-@@ -117,6 +122,15 @@ static void webSocketMessageNetworkEventCallback(SoupMessage* soupMessage, GSock- }- #endif--+static void webSocketMessageNetworkEventCallbackIgnoreTLSErrors(SoupMessage* soupMessage, GSocketClientEvent event, GIOStream* connection)-+{-+ if (event != G_SOCKET_CLIENT_TLS_HANDSHAKING)-+ return;-+-+ g_object_set_data(G_OBJECT(connection), "wk-soup-message", soupMessage);-+ g_signal_connect(connection, "accept-certificate", G_CALLBACK(webSocketAcceptCertificateCallbackIgnoreTLSErrors), soupMessage);-+}-+- std::unique_ptr<WebSocketTask> NetworkSessionSoup::createWebSocketTask(WebPageProxyIdentifier, std::optional<FrameIdentifier> frameID, std::optional<PageIdentifier> pageID, NetworkSocketChannel& channel, const ResourceRequest& request, const String& protocol, const ClientOrigin&, bool, bool, OptionSet<WebCore::AdvancedPrivacyProtections>, ShouldRelaxThirdPartyCookieBlocking shouldRelaxThirdPartyCookieBlocking, StoredCredentialsPolicy)- {- GRefPtr<SoupMessage> soupMessage = request.createSoupMessage(blobRegistry());-@@ -125,14 +139,21 @@ std::unique_ptr<WebSocketTask> NetworkSessionSoup::createWebSocketTask(WebPagePr-- if (request.url().protocolIs("wss"_s)) {+@@ -127,12 +132,16 @@ std::unique_ptr<WebSocketTask> NetworkSessionSoup::createWebSocketTask(WebPagePr#if USE(SOUP2)-- g_signal_connect(soupMessage.get(), "network-event", G_CALLBACK(webSocketMessageNetworkEventCallback), this);-+ if (ignoreCertificateErrors())-+ g_signal_connect(soupMessage.get(), "network-event", G_CALLBACK(webSocketMessageNetworkEventCallbackIgnoreTLSErrors), this);-+ else-+ g_signal_connect(soupMessage.get(), "network-event", G_CALLBACK(webSocketMessageNetworkEventCallback), this);+ g_signal_connect(soupMessage.get(), "network-event", G_CALLBACK(webSocketMessageNetworkEventCallback), this);#else- g_signal_connect(soupMessage.get(), "accept-certificate", G_CALLBACK(+[](SoupMessage* message, GTlsCertificate* certificate, GTlsCertificateFlags errors, NetworkSessionSoup* session) -> gboolean {- if (DeprecatedGlobalSettings::allowsAnySSLCertificate())@@ -9036,10 +9125,10 @@ index 60e79ff683e280591d686468c42decf1ac109ed2..ef74cb09e75c3e6f57d180487fa266b7}diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake-index bd8dab990c4c034059d21588921784f047bb6d6a..46a61dcef89e94a9a1a25e6ae352ec88f0aec5e7 100644+index b33c07849a629c7c5d4ea4b5cbb6788af3dd3023..aedd95cea9e6388cab32274967513224890287a5 100644--- a/Source/WebKit/PlatformGTK.cmake+++ b/Source/WebKit/PlatformGTK.cmake-@@ -321,6 +321,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES+@@ -323,6 +323,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES${GSTREAMER_PBUTILS_INCLUDE_DIRS}${GTK_INCLUDE_DIRS}${LIBSOUP_INCLUDE_DIRS}@@ -9049,7 +9138,7 @@ index bd8dab990c4c034059d21588921784f047bb6d6a..46a61dcef89e94a9a1a25e6ae352ec88)list(APPEND WebKit_INTERFACE_INCLUDE_DIRECTORIES-@@ -351,6 +354,9 @@ if (USE_LIBWEBRTC)+@@ -353,6 +356,9 @@ if (USE_LIBWEBRTC)list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES"${THIRDPARTY_DIR}/libwebrtc/Source/""${THIRDPARTY_DIR}/libwebrtc/Source/webrtc"@@ -9059,7 +9148,7 @@ index bd8dab990c4c034059d21588921784f047bb6d6a..46a61dcef89e94a9a1a25e6ae352ec88)endif ()-@@ -402,6 +408,12 @@ else ()+@@ -404,6 +410,12 @@ else ()set(WebKitGTK_ENUM_HEADER_TEMPLATE ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypesGtk3.h.in)endif ()@@ -9073,10 +9162,19 @@ index bd8dab990c4c034059d21588921784f047bb6d6a..46a61dcef89e94a9a1a25e6ae352ec88set(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 8f27536b690e863fcaf086c04d1b0fb21356a622..a0207624821b4179d7adc646adf06aae65f0ca33 100644+index 43d58da592e9b0f0bd6ca5cef5cbca0c4ba39b31..1fd4a732ca871704bbb915e93cf62d206c9db46e 100644--- a/Source/WebKit/PlatformWPE.cmake+++ b/Source/WebKit/PlatformWPE.cmake-@@ -212,6 +212,7 @@ set(WPE_API_HEADER_TEMPLATES+@@ -111,6 +111,8 @@ list(APPEND WebKit_SERIALIZATION_IN_FILES+ Shared/glib/UserMessage.serialization.in++ Shared/soup/WebCoreArgumentCodersSoup.serialization.in++++ Shared/libwpe/ArgumentCodersWPE.serialization.in+ )++ list(APPEND WebKit_DERIVED_SOURCES+@@ -215,6 +217,7 @@ set(WPE_API_HEADER_TEMPLATES${WEBKIT_DIR}/UIProcess/API/glib/WebKitWindowProperties.h.in${WEBKIT_DIR}/UIProcess/API/glib/WebKitWebsitePolicies.h.in${WEBKIT_DIR}/UIProcess/API/glib/webkit.h.in@@ -9084,24 +9182,23 @@ index 8f27536b690e863fcaf086c04d1b0fb21356a622..a0207624821b4179d7adc646adf06aae)if (ENABLE_2022_GLIB_API)-@@ -423,8 +424,17 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES+@@ -425,7 +428,16 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES${GIO_UNIX_INCLUDE_DIRS}${GLIB_INCLUDE_DIRS}${LIBSOUP_INCLUDE_DIRS}+# Playwright begin+ "${THIRDPARTY_DIR}/libwebrtc/Source/third_party/libyuv/include"+# Playwright end- )-++)+++# Playwright begin+list(APPEND WebKit_PRIVATE_INCLUDE_DIRECTORIES+ "${THIRDPARTY_DIR}/libwebrtc/Source/third_party/libwebm"-+)+ )+# Playwright end-++list(APPEND WebKit_LIBRARIESWPE::libwpe- ${GLIB_LIBRARIES}diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmakeindex 06a86d0cfd1ca90f383af2b079f60ce220f8eb02..9e21935463bf964ecb090be48e68b50ef29c049b 100644--- a/Source/WebKit/PlatformWin.cmake@@ -9286,7 +9383,7 @@ index 17cb42104f3fe7e78388cdb1acd78efb34022f8d..c824a8c7ab5c4717773bff23c03156e7#if USE(APPKIT)diff --git a/Source/WebKit/Shared/NativeWebMouseEvent.h b/Source/WebKit/Shared/NativeWebMouseEvent.h-index d51a12fba25ccd4b8bdd2e4a37bf9f1268034617..e36921913825f18522551c7847efae89d0679cc6 100644+index e33858caab024b20217304209d7bf428e3335653..4026f6244889e5a0ee85edb72696d0be20ba531d 100644--- a/Source/WebKit/Shared/NativeWebMouseEvent.h+++ b/Source/WebKit/Shared/NativeWebMouseEvent.h@@ -31,6 +31,7 @@@@ -9298,7 +9395,7 @@ index d51a12fba25ccd4b8bdd2e4a37bf9f1268034617..e36921913825f18522551c7847efae89#if PLATFORM(GTK)@@ -86,6 +87,11 @@ public:- NativeWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool);+ NativeWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool, float deviceScaleFactor);#endif+#if PLATFORM(GTK) || USE(LIBWPE) || PLATFORM(WIN)@@ -9310,12 +9407,12 @@ index d51a12fba25ccd4b8bdd2e4a37bf9f1268034617..e36921913825f18522551c7847efae89NSEvent* nativeEvent() const { return m_nativeEvent.get(); }#elif PLATFORM(GTK)diff --git a/Source/WebKit/Shared/NativeWebWheelEvent.h b/Source/WebKit/Shared/NativeWebWheelEvent.h-index bd941fd1cc5ddbae5d9fbe59976defd8fac3550b..b707e8e1739d95573270848d4e7f7719f4663c41 100644+index dfdebf37842c22c2d27f5cb39b22fa8aa09f5511..76b76a53abfe9f43c044fc29d0f16ac9969b7252 100644--- a/Source/WebKit/Shared/NativeWebWheelEvent.h+++ b/Source/WebKit/Shared/NativeWebWheelEvent.h@@ -73,7 +73,8 @@ public:#elif PLATFORM(WIN)- NativeWebWheelEvent(HWND, UINT message, WPARAM, LPARAM);+ NativeWebWheelEvent(HWND, UINT message, WPARAM, LPARAM, float deviceScaleFactor);#endif-+ NativeWebWheelEvent(const WebWheelEvent & webWheelEvent)@@ -9324,10 +9421,10 @@ index bd941fd1cc5ddbae5d9fbe59976defd8fac3550b..b707e8e1739d95573270848d4e7f7719NSEvent* nativeEvent() const { return m_nativeEvent.get(); }#elif PLATFORM(GTK)diff --git a/Source/WebKit/Shared/Pasteboard.serialization.in b/Source/WebKit/Shared/Pasteboard.serialization.in-index 72ad2880160a374e8fa663e561d59becf9d2f36d..372ae6953199245fe4fc55a49813c7cae868f8b3 100644+index ea1eb9f00feaaecf73bdddc37c904e88f43bfa85..8a631e5293a11abd650958baad4e967840a9a526 100644--- a/Source/WebKit/Shared/Pasteboard.serialization.in+++ b/Source/WebKit/Shared/Pasteboard.serialization.in-@@ -75,7 +75,7 @@ header: <WebCore/Pasteboard.h>+@@ -73,7 +73,7 @@ header: <WebCore/Pasteboard.h>#if PLATFORM(MAC)String userVisibleForm#endif@@ -9337,10 +9434,10 @@ index 72ad2880160a374e8fa663e561d59becf9d2f36d..372ae6953199245fe4fc55a49813c7ca#endif};diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in-index 2a11967151ca0bebd14b6a64482a793e2a536333..f4fc1b8eab49eba96badf4151358325a0bb7072c 100644+index 4be677ef8090d21da5dedbc275ef58f2b7c41654..b538f2e810668aa1039601ccff94960fb2d00525 100644--- a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in-@@ -2658,6 +2658,9 @@ class WebCore::AuthenticationChallenge {+@@ -2683,6 +2683,9 @@ class WebCore::AuthenticationChallenge {class WebCore::DragData {#if PLATFORM(COCOA)String pasteboardName();@@ -9350,7 +9447,7 @@ index 2a11967151ca0bebd14b6a64482a793e2a536333..f4fc1b8eab49eba96badf4151358325a#endifWebCore::IntPoint clientPosition();WebCore::IntPoint globalPosition();-@@ -3221,6 +3224,7 @@ enum class WebCore::WasPrivateRelayed : bool;+@@ -3246,6 +3249,7 @@ enum class WebCore::WasPrivateRelayed : bool;String httpStatusText;String httpVersion;WebCore::HTTPHeaderMap httpHeaderFields;@@ -9476,10 +9573,10 @@ index 5da1ed78e5a55bf63e9e52e33dfa9e704922589a..6630725885bbfe6123537ea799bf5b68void setPosition(const WebCore::IntPoint& position) { m_position = position; }const WebCore::IntPoint& globalPosition() const { return m_globalPosition; }diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h-index e0f2fcf54bf77b41619a9b76a3f42cc17303029f..4f79a4a9e081bfbb6a05c2c8afcbdaae060f2229 100644+index 61fc6649bc99de246c5f0cb6171b717e89d69425..c2c998d337c0f399d8f35daa804c995fae66d50c 100644--- a/Source/WebKit/Shared/WebPageCreationParameters.h+++ b/Source/WebKit/Shared/WebPageCreationParameters.h-@@ -300,6 +300,8 @@ struct WebPageCreationParameters {+@@ -299,6 +299,8 @@ struct WebPageCreationParameters {bool httpsUpgradeEnabled { true };@@ -9489,10 +9586,10 @@ index e0f2fcf54bf77b41619a9b76a3f42cc17303029f..4f79a4a9e081bfbb6a05c2c8afcbdaaebool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload { false };#endifdiff --git a/Source/WebKit/Shared/WebPageCreationParameters.serialization.in b/Source/WebKit/Shared/WebPageCreationParameters.serialization.in-index c7c3aac107d2b528d63a31645d84573ba4115a89..4e6932d22e24e2df15e045c0cbb177e8e0a8e880 100644+index 96619aedf71cb8527e6c3da65b055f2c9a242c8e..34e23875c78420e3ef93beb67f14eac609d8d9d3 100644--- a/Source/WebKit/Shared/WebPageCreationParameters.serialization.in+++ b/Source/WebKit/Shared/WebPageCreationParameters.serialization.in-@@ -228,6 +228,8 @@ enum class WebCore::UserInterfaceLayoutDirection : bool;+@@ -227,6 +227,8 @@ enum class WebCore::UserInterfaceLayoutDirection : bool;bool httpsUpgradeEnabled;@@ -9533,234 +9630,49 @@ index 9a1c3f09c756ea368ac2d68e183a13e2eb47ead7..01c738376230f83376d80d6d225543a3, m_nativeEvent(event.nativeEvent() ? constructNativeEvent(const_cast<GdkEvent*>(event.nativeEvent())) : nullptr){}-diff --git a/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp+diff --git a/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.serialization.in b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.serialization.innew file mode 100644-index 0000000000000000000000000000000000000000..c837e53b425d8f647a96398962f23a37fb2cfde5+index 0000000000000000000000000000000000000000..f4f09d171ebf9774b3f8744751d220d35941fcb5--- /dev/null-+++ b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp-@@ -0,0 +1,170 @@-+/*-+ * Copyright (C) 2011 Igalia S.L.-+ *-+ * Redistribution and use in source and binary forms, with or without-+ * modification, are permitted provided that the following conditions-+ * are met:-+ * 1. Redistributions of source code must retain the above copyright-+ * notice, this list of conditions and the following disclaimer.-+ * 2. Redistributions in binary form must reproduce the above copyright-+ * notice, this list of conditions and the following disclaimer in the-+ * documentation and/or other materials provided with the distribution.-+ *-+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''-+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,-+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR-+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS-+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR-+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF-+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS-+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN-+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF-+ * THE POSSIBILITY OF SUCH DAMAGE.-+ */-+-+#include "config.h"-+#include "ArgumentCodersWPE.h"-+-+#include "WebCoreArgumentCoders.h"-+#include <WebCore/GraphicsContext.h>-+#include <WebCore/Image.h>-+#include <WebCore/SelectionData.h>-+#include <WebCore/ShareableBitmap.h>-+-+namespace IPC {-+using namespace WebCore;-+using namespace WebKit;-+-+static void encodeImage(Encoder& encoder, Image& image)-+{-+ RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create({ IntSize(image.size()) });-+ bitmap->createGraphicsContext()->drawImage(image, IntPoint());-+-+ encoder << bitmap->createHandle();-+}-+-+static WARN_UNUSED_RETURN bool decodeImage(Decoder& decoder, RefPtr<Image>& image)-+{-+ std::optional<std::optional<ShareableBitmapHandle>> handle;-+ decoder >> handle;-+ if (!handle || !*handle)-+ return false;-+-+ RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(WTFMove(**handle));-+ if (!bitmap)-+ return false;-+ image = bitmap->createImage();-+ if (!image)-+ return false;-+ return true;-+}-+-+void ArgumentCoder<SelectionData>::encode(Encoder& encoder, const SelectionData& selection)-+{-+ bool hasText = selection.hasText();-+ encoder << hasText;-+ if (hasText)-+ encoder << selection.text();-+ bool hasMarkup = selection.hasMarkup();-+ encoder << hasMarkup;-+ if (hasMarkup)-+ encoder << selection.markup();-+-+ bool hasURL = selection.hasURL();-+ encoder << hasURL;-+ if (hasURL)-+ encoder << selection.url().string();-+-+ bool hasURIList = selection.hasURIList();-+ encoder << hasURIList;-+ if (hasURIList)-+ encoder << selection.uriList();-+-+ bool hasImage = selection.hasImage();-+ encoder << hasImage;-+ if (hasImage)-+ encodeImage(encoder, *selection.image());-+-+ bool hasCustomData = selection.hasCustomData();-+ encoder << hasCustomData;-+ if (hasCustomData)-+ encoder << RefPtr<SharedBuffer>(selection.customData());-+-+ bool canSmartReplace = selection.canSmartReplace();-+ encoder << canSmartReplace;-+}-+-+std::optional<SelectionData> ArgumentCoder<SelectionData>::decode(Decoder& decoder)-+{-+ SelectionData selection;-+-+ bool hasText;-+ if (!decoder.decode(hasText))-+ return std::nullopt;-+ if (hasText) {-+ String text;-+ if (!decoder.decode(text))-+ return std::nullopt;-+ selection.setText(text);-+ }-+-+ bool hasMarkup;-+ if (!decoder.decode(hasMarkup))-+ return std::nullopt;-+ if (hasMarkup) {-+ String markup;-+ if (!decoder.decode(markup))-+ return std::nullopt;-+ selection.setMarkup(markup);-+ }-+-+ bool hasURL;-+ if (!decoder.decode(hasURL))-+ return std::nullopt;-+ if (hasURL) {-+ String url;-+ if (!decoder.decode(url))-+ return std::nullopt;-+ selection.setURL(URL(URL(), url), String());-+ }-+-+ bool hasURIList;-+ if (!decoder.decode(hasURIList))-+ return std::nullopt;-+ if (hasURIList) {-+ String uriList;-+ if (!decoder.decode(uriList))-+ return std::nullopt;-+ selection.setURIList(uriList);-+ }-+-+ bool hasImage;-+ if (!decoder.decode(hasImage))-+ return std::nullopt;-+ if (hasImage) {-+ RefPtr<Image> image;-+ if (!decodeImage(decoder, image))-+ return std::nullopt;-+ selection.setImage(image.get());-+ }-+-+ bool hasCustomData;-+ if (!decoder.decode(hasCustomData))-+ return std::nullopt;-+ if (hasCustomData) {-+ RefPtr<SharedBuffer> buffer;-+ if (!decoder.decode(buffer))-+ return std::nullopt;-+ selection.setCustomData(Ref<SharedBuffer>(*buffer));-+ }-+-+ bool canSmartReplace;-+ if (!decoder.decode(canSmartReplace))-+ return std::nullopt;-+ selection.setCanSmartReplace(canSmartReplace);-+-+ return selection;-+}-+-+}-diff --git a/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.h b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.h-new file mode 100644-index 0000000000000000000000000000000000000000..789a0d7cf69704c8f665a9ed79348fbcbc1301c4---- /dev/null-+++ b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.h-@@ -0,0 +1,41 @@-+/*-+ * Copyright (C) 2011 Igalia S.L.-+ *-+ * Redistribution and use in source and binary forms, with or without-+ * modification, are permitted provided that the following conditions-+ * are met:-+ * 1. Redistributions of source code must retain the above copyright-+ * notice, this list of conditions and the following disclaimer.-+ * 2. Redistributions in binary form must reproduce the above copyright-+ * notice, this list of conditions and the following disclaimer in the-+ * documentation and/or other materials provided with the distribution.-+ *-+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''-+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,-+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR-+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS-+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR-+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF-+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS-+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN-+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF-+ * THE POSSIBILITY OF SUCH DAMAGE.-+ */-+-+#pragma once-+-+#include "ArgumentCoders.h"-+-+namespace WebCore {-+class SelectionData;++++ b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.serialization.in+@@ -0,0 +1,32 @@++# Copyright (C) 2024 Igalia, S.L. All rights reserved.++#++# Redistribution and use in source and binary forms, with or without++# modification, are permitted provided that the following conditions++# are met:++# 1. Redistributions of source code must retain the above copyright++# notice, this list of conditions and the following disclaimer.++# 2. Redistributions in binary form must reproduce the above copyright++# notice, this list of conditions and the following disclaimer in the++# documentation and/or other materials provided with the distribution.++#++# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND++# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED++# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE++# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR++# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL++# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR++# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER++# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,++# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE++# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.++++header: <WebCore/SelectionData.h>++class WebCore::SelectionData {++ String text()++ String markup()++ URL url()++ String uriList()++ RefPtr<WebCore::Image> image()++ RefPtr<WebCore::SharedBuffer> customData()++ bool canSmartReplace()+}-+-+namespace IPC {-+-+template<> struct ArgumentCoder<WebCore::SelectionData> {-+ static void encode(Encoder&, const WebCore::SelectionData&);-+ static std::optional<WebCore::SelectionData> decode(Decoder&);-+};-+-+} // namespace IPCdiff --git a/Source/WebKit/Shared/win/WebEventFactory.cpp b/Source/WebKit/Shared/win/WebEventFactory.cpp-index eae9e21a437c04cec91d1a4848038e11f4ee3e07..4fe63a9042d875555d9d1b934a9f53ea352e47aa 100644+index 76e3fa1aa685906adfff43aed55c9902084be0af..0cf48a92e368005e843f08c4f4096fdeaff0b1a8 100644--- a/Source/WebKit/Shared/win/WebEventFactory.cpp+++ b/Source/WebKit/Shared/win/WebEventFactory.cpp-@@ -476,7 +476,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message+@@ -483,7 +483,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message#if ENABLE(TOUCH_EVENTS)WebTouchEvent WebEventFactory::createWebTouchEvent(){@@ -9770,10 +9682,10 @@ index eae9e21a437c04cec91d1a4848038e11f4ee3e07..4fe63a9042d875555d9d1b934a9f53ea#endif // ENABLE(TOUCH_EVENTS)diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt-index d3b9afee939c3ec362f48851865da60251a5700f..fe0c3cc89c0823ed145eb1c374edd13239f48ee7 100644+index 5a8ce0964def0adf03f875b70bfeebd0d7a3df6e..2a6a24d1247d9e18a0b978cbd4a700f2af485d6c 100644--- a/Source/WebKit/Sources.txt+++ b/Source/WebKit/Sources.txt-@@ -379,6 +379,7 @@ Shared/XR/XRDeviceProxy.cpp+@@ -377,6 +377,7 @@ Shared/XR/XRDeviceProxy.cppUIProcess/AuxiliaryProcessProxy.cppUIProcess/BackgroundProcessResponsivenessTimer.cppUIProcess/BrowsingContextGroup.cpp@@ -9781,7 +9693,7 @@ index d3b9afee939c3ec362f48851865da60251a5700f..fe0c3cc89c0823ed145eb1c374edd132UIProcess/DeviceIdHashSaltStorage.cppUIProcess/DisplayLink.cppUIProcess/DisplayLinkProcessProxyClient.cpp-@@ -388,16 +389,20 @@ UIProcess/FrameLoadState.cpp+@@ -386,16 +387,20 @@ UIProcess/FrameLoadState.cppUIProcess/FrameProcess.cppUIProcess/GeolocationPermissionRequestManagerProxy.cppUIProcess/GeolocationPermissionRequestProxy.cpp@@ -9802,7 +9714,7 @@ index d3b9afee939c3ec362f48851865da60251a5700f..fe0c3cc89c0823ed145eb1c374edd132UIProcess/RemotePageDrawingAreaProxy.cppUIProcess/RemotePageProxy.cppUIProcess/ResponsivenessTimer.cpp-@@ -441,6 +446,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp+@@ -437,6 +442,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cppUIProcess/WebPageDiagnosticLoggingClient.cppUIProcess/WebPageGroup.cppUIProcess/WebPageInjectedBundleClient.cpp@@ -9811,7 +9723,7 @@ index d3b9afee939c3ec362f48851865da60251a5700f..fe0c3cc89c0823ed145eb1c374edd132UIProcess/WebPageProxy.cppUIProcess/WebPageProxyMessageReceiverRegistration.cppUIProcess/WebPasteboardProxy.cpp-@@ -576,7 +583,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp+@@ -573,7 +580,11 @@ UIProcess/Inspector/WebInspectorUtilities.cppUIProcess/Inspector/WebPageDebuggable.cppUIProcess/Inspector/WebPageInspectorController.cpp@@ -9824,7 +9736,7 @@ index d3b9afee939c3ec362f48851865da60251a5700f..fe0c3cc89c0823ed145eb1c374edd132UIProcess/Media/AudioSessionRoutingArbitratorProxy.cppUIProcess/Media/MediaUsageManager.cppdiff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt-index 8dc390feda97fbe8e80e0bdfd62b682be36c81e5..9dee9867202c5e63e81dec992fa348fd16a557d8 100644+index ff2daa513c7fd2791b3f28e47b521a8ad4ade968..d75ff772fd46b53c5734203ae4e617ffffde5657 100644--- a/Source/WebKit/SourcesCocoa.txt+++ b/Source/WebKit/SourcesCocoa.txt@@ -271,6 +271,7 @@ UIProcess/API/Cocoa/_WKArchiveExclusionRule.mm@@ -9835,7 +9747,7 @@ index 8dc390feda97fbe8e80e0bdfd62b682be36c81e5..9dee9867202c5e63e81dec992fa348fdUIProcess/API/Cocoa/_WKContentRuleListAction.mmUIProcess/API/Cocoa/_WKContextMenuElementInfo.mmUIProcess/API/Cocoa/_WKCustomHeaderFields.mm @no-unify-@@ -455,6 +456,7 @@ UIProcess/Inspector/ios/WKInspectorHighlightView.mm+@@ -454,6 +455,7 @@ UIProcess/Inspector/ios/WKInspectorHighlightView.mmUIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.mmUIProcess/Inspector/mac/RemoteWebInspectorUIProxyMac.mm@@ -9844,10 +9756,10 @@ index 8dc390feda97fbe8e80e0bdfd62b682be36c81e5..9dee9867202c5e63e81dec992fa348fdUIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mmUIProcess/Inspector/mac/WKInspectorViewController.mmdiff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt-index bec1e568f9ad00bfff883318692d9c404e012e2c..de45461d0851248f44973780b07d0ba7692fd578 100644+index 4ccf24056472cbaca8f61ed82ab6447f8bb45db7..4d283f3cb33cee9756252c929a8551b0d8595295 100644--- a/Source/WebKit/SourcesGTK.txt+++ b/Source/WebKit/SourcesGTK.txt-@@ -134,6 +134,7 @@ UIProcess/API/glib/WebKitAutomationSession.cpp @no-unify+@@ -130,6 +130,7 @@ UIProcess/API/glib/WebKitAutomationSession.cpp @no-unifyUIProcess/API/glib/WebKitBackForwardList.cpp @no-unifyUIProcess/API/glib/WebKitBackForwardListItem.cpp @no-unifyUIProcess/API/glib/WebKitClipboardPermissionRequest.cpp @no-unify@@ -9855,7 +9767,7 @@ index bec1e568f9ad00bfff883318692d9c404e012e2c..de45461d0851248f44973780b07d0ba7UIProcess/API/glib/WebKitContextMenuClient.cpp @no-unifyUIProcess/API/glib/WebKitCookieManager.cpp @no-unifyUIProcess/API/glib/WebKitCredential.cpp @no-unify-@@ -262,6 +263,7 @@ UIProcess/glib/DisplayLinkGLib.cpp+@@ -257,6 +258,7 @@ UIProcess/glib/DisplayLinkGLib.cppUIProcess/glib/DisplayVBlankMonitor.cppUIProcess/glib/DisplayVBlankMonitorDRM.cppUIProcess/glib/DisplayVBlankMonitorTimer.cpp@@ -9863,7 +9775,7 @@ index bec1e568f9ad00bfff883318692d9c404e012e2c..de45461d0851248f44973780b07d0ba7UIProcess/glib/ScreenManager.cppUIProcess/glib/WebPageProxyGLib.cppUIProcess/glib/WebProcessPoolGLib.cpp-@@ -277,6 +279,7 @@ UIProcess/gtk/ClipboardGtk4.cpp @no-unify+@@ -272,6 +274,7 @@ UIProcess/gtk/ClipboardGtk4.cpp @no-unifyUIProcess/gtk/WebDateTimePickerGtk.cppUIProcess/gtk/GtkSettingsManager.cppUIProcess/gtk/HardwareAccelerationManager.cpp@@ -9871,7 +9783,7 @@ index bec1e568f9ad00bfff883318692d9c404e012e2c..de45461d0851248f44973780b07d0ba7UIProcess/gtk/KeyBindingTranslator.cppUIProcess/gtk/PointerLockManager.cpp @no-unifyUIProcess/gtk/PointerLockManagerWayland.cpp @no-unify-@@ -289,6 +292,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cpp+@@ -284,6 +287,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cppUIProcess/gtk/WebColorPickerGtk.cppUIProcess/gtk/WebContextMenuProxyGtk.cppUIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp@@ -9881,18 +9793,10 @@ index bec1e568f9ad00bfff883318692d9c404e012e2c..de45461d0851248f44973780b07d0ba7UIProcess/gtk/WebPasteboardProxyGtk.cppUIProcess/gtk/WebPopupMenuProxyGtk.cppdiff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt-index 3eefd6cc3eb22329583901518442756d728378a1..45f2092be52d2d347660972a6723741176ff4b42 100644+index 3dfcab5bbd7918b57c5dcaf8c0548bb0c4da52f2..82d274947520fe70f91da62bf1e39f728a65a003 100644--- a/Source/WebKit/SourcesWPE.txt+++ b/Source/WebKit/SourcesWPE.txt-@@ -86,6 +86,7 @@ Shared/glib/ProcessExecutablePathGLib.cpp- Shared/glib/UserMessage.cpp- Shared/glib/WebContextMenuItemGlib.cpp--+Shared/libwpe/ArgumentCodersWPE.cpp- Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp- Shared/libwpe/NativeWebMouseEventLibWPE.cpp- Shared/libwpe/NativeWebTouchEventLibWPE.cpp-@@ -136,6 +137,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify+@@ -132,6 +132,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unifyUIProcess/API/glib/WebKitAutomationSession.cpp @no-unifyUIProcess/API/glib/WebKitBackForwardList.cpp @no-unifyUIProcess/API/glib/WebKitBackForwardListItem.cpp @no-unify@@ -9900,7 +9804,7 @@ index 3eefd6cc3eb22329583901518442756d728378a1..45f2092be52d2d347660972a67237411UIProcess/API/glib/WebKitContextMenuClient.cpp @no-unifyUIProcess/API/glib/WebKitCookieManager.cpp @no-unifyUIProcess/API/glib/WebKitCredential.cpp @no-unify-@@ -169,6 +171,7 @@ UIProcess/API/glib/WebKitOptionMenu.cpp @no-unify+@@ -165,6 +166,7 @@ UIProcess/API/glib/WebKitOptionMenu.cpp @no-unifyUIProcess/API/glib/WebKitOptionMenuItem.cpp @no-unifyUIProcess/API/glib/WebKitPermissionRequest.cpp @no-unifyUIProcess/API/glib/WebKitPermissionStateQuery.cpp @no-unify@@ -9908,15 +9812,15 @@ index 3eefd6cc3eb22329583901518442756d728378a1..45f2092be52d2d347660972a67237411UIProcess/API/glib/WebKitPolicyDecision.cpp @no-unifyUIProcess/API/glib/WebKitPrivate.cpp @no-unifyUIProcess/API/glib/WebKitProtocolHandler.cpp @no-unify-@@ -205,6 +208,7 @@ UIProcess/API/soup/HTTPCookieStoreSoup.cpp+@@ -201,6 +203,7 @@ UIProcess/API/soup/HTTPCookieStoreSoup.cppUIProcess/API/wpe/InputMethodFilterWPE.cpp @no-unifyUIProcess/API/wpe/PageClientImpl.cpp @no-unifyUIProcess/API/wpe/WebKitColor.cpp @no-unify+UIProcess/API/wpe/WebKitDataListSuggestionsDropdown.cpp @no-unifyUIProcess/API/wpe/WebKitInputMethodContextWPE.cpp @no-unify+ UIProcess/API/wpe/WebKitInputMethodContextImplWPE.cpp @no-unifyUIProcess/API/wpe/WebKitPopupMenu.cpp @no-unify- UIProcess/API/wpe/WebKitRectangle.cpp @no-unify-@@ -228,6 +232,7 @@ UIProcess/glib/DisplayLinkGLib.cpp+@@ -225,6 +228,7 @@ UIProcess/glib/DisplayLinkGLib.cppUIProcess/glib/DisplayVBlankMonitor.cppUIProcess/glib/DisplayVBlankMonitorDRM.cppUIProcess/glib/DisplayVBlankMonitorTimer.cpp@@ -9924,7 +9828,7 @@ index 3eefd6cc3eb22329583901518442756d728378a1..45f2092be52d2d347660972a67237411UIProcess/glib/ScreenManager.cppUIProcess/glib/WebPageProxyGLib.cppUIProcess/glib/WebProcessPoolGLib.cpp-@@ -258,7 +263,12 @@ UIProcess/linux/MemoryPressureMonitor.cpp+@@ -255,7 +259,12 @@ UIProcess/linux/MemoryPressureMonitor.cppUIProcess/soup/WebProcessPoolSoup.cppUIProcess/wpe/AcceleratedBackingStoreDMABuf.cpp@@ -9937,7 +9841,7 @@ index 3eefd6cc3eb22329583901518442756d728378a1..45f2092be52d2d347660972a67237411UIProcess/wpe/WebPageProxyWPE.cppUIProcess/wpe/WebPreferencesWPE.cpp-@@ -282,6 +292,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp+@@ -279,6 +288,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cppWebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp@@ -9993,11 +9897,24 @@ index 32ef9bd308e520f5ac7173639c8b23ea91cde037..7a80553c2d91b9236f563fa1b76aa8a5bool m_alwaysRunsAtBackgroundPriority { false };bool m_shouldTakeUIBackgroundAssertion { true };bool m_shouldCaptureDisplayInUIProcess { DEFAULT_CAPTURE_DISPLAY_IN_UI_PROCESS };+diff --git a/Source/WebKit/UIProcess/API/APITargetedElementRequest.h b/Source/WebKit/UIProcess/API/APITargetedElementRequest.h+index 6dc23b36695692f1052de941d4d89dcd72e9f337..804cbc2666d410d7465036621f1c7a16056f9e79 100644+--- a/Source/WebKit/UIProcess/API/APITargetedElementRequest.h++++ b/Source/WebKit/UIProcess/API/APITargetedElementRequest.h+@@ -34,7 +34,7 @@ class WebPageProxy;++ namespace API {++-class TargetedElementRequest final : public ObjectImpl<Object::Type::TargetedElementRequest> {++class TargetedElementRequest final : public ObjectImpl<API::Object::Type::TargetedElementRequest> {+ public:++ bool shouldIgnorePointerEventsNone() const { return m_request.shouldIgnorePointerEventsNone; }diff --git a/Source/WebKit/UIProcess/API/APIUIClient.h b/Source/WebKit/UIProcess/API/APIUIClient.h-index f8baf3b5cbd1613da54c001cbff573125742358d..be628650e5562978187f8cc1d0afed8849a083b2 100644+index 9ecfb4e61a015c97e3adaeccfcf52ce24735eeed..decae9b739c9692921305b87449f6557a07959c2 100644--- a/Source/WebKit/UIProcess/API/APIUIClient.h+++ b/Source/WebKit/UIProcess/API/APIUIClient.h-@@ -114,6 +114,7 @@ public:+@@ -115,6 +115,7 @@ public:virtual void runJavaScriptAlert(WebKit::WebPageProxy&, const WTF::String&, WebKit::WebFrameProxy*, WebKit::FrameInfoData&&, Function<void()>&& completionHandler) { completionHandler(); }virtual void runJavaScriptConfirm(WebKit::WebPageProxy&, const WTF::String&, WebKit::WebFrameProxy*, WebKit::FrameInfoData&&, Function<void(bool)>&& completionHandler) { completionHandler(false); }virtual void runJavaScriptPrompt(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy*, WebKit::FrameInfoData&&, Function<void(const WTF::String&)>&& completionHandler) { completionHandler(WTF::String()); }@@ -10049,7 +9966,7 @@ index 026121d114c5fcad84c1396be8d692625beaa3bd..edd6e5cae033124c589959a42522fde0}#endifdiff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp-index 81d4f44bd1f4201cb0ddd9d4b8ef210862551cdb..6e750c6e1f4624b5cf54a642b831ab10d4448649 100644+index 47abb7de04be89f82e90f0a2197ef129b2d2f1cd..fb71b452a27d62af68165a778647c4b2e0236443 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@@ -10157,7 +10074,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 48e4b28374b93173df1be63444aa5ca3abd626d6..194b2099be032c800a463891976364ab7cd74890 100644+index 3ff86aaf450aaa15ebd57e6703927f1234c35f3f..e3914dc048bcd7fc595a21ef11d648a70c8c84d4 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) {@@ -10169,12 +10086,12 @@ index 48e4b28374b93173df1be63444aa5ca3abd626d6..194b2099be032c800a463891976364ab@property (nonatomic, setter=_setICECandidateFilteringEnabled:) BOOL _iceCandidateFilteringEnabled WK_API_AVAILABLE(macos(10.13.4), ios(11.3));@property (nonatomic, setter=_setInactiveMediaCaptureSteamRepromptIntervalInMinutes:) double _inactiveMediaCaptureSteamRepromptIntervalInMinutes WK_API_AVAILABLE(macos(10.13.4), ios(11.3));diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h-index 24b33cf16d46efce11a30032925600b97e64c65d..422355368191b9189b6283338bea2244b2fddd9e 100644+index ca205ac38f92e95c24830d30657d093afd22f02b..aeaf6335ab9fc0590cd723e0c585677a014c4549 100644--- a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h+++ b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h-@@ -148,6 +148,12 @@ typedef NS_ENUM(NSInteger, WKDialogResult) {+@@ -149,6 +149,12 @@ WK_SWIFT_UI_ACTOR*/- - (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * _Nullable result))completionHandler;+ - (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(WK_SWIFT_UI_ACTOR void (^)(NSString * _Nullable result))completionHandler;+/*! @abstract Handle a JavaScript dialog.+ @param webView The web view invoking the delegate method.@@ -10186,7 +10103,7 @@ index 24b33cf16d46efce11a30032925600b97e64c65d..422355368191b9189b6283338bea2244/*! @abstract A delegate to request permission for microphone audio and camera video access.@param webView The web view invoking the delegate method.diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h-index 4f5956098f0e83c2e9c421c97056b6718b124a3c..1eb51dd70dc6ef1b7e95a09118aa816b4f77e2d7 100644+index eff4cf557033561ab20762d93a58c2d71f5505f0..2fd5a2515c54d9edcab48fa3d993298fa3969648 100644--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h@@ -24,7 +24,6 @@@@ -10197,7 +10114,7 @@ index 4f5956098f0e83c2e9c421c97056b6718b124a3c..1eb51dd70dc6ef1b7e95a09118aa816b#import <WebKit/WKWebsiteDataRecord.h>#if __has_include(<Network/proxy_config.h>)-@@ -124,6 +123,8 @@ WK_CLASS_AVAILABLE(macos(10.11), ios(9.0))+@@ -126,6 +125,8 @@ WK_CLASS_AVAILABLE(macos(10.11), ios(9.0))#endif#endif@@ -10358,7 +10275,7 @@ index 0000000000000000000000000000000000000000..69eb9c6aa30beb8ea21a0ef647e46304+}+@enddiff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h-index da0374cf56919b7324a90586d0a7009bfe895be1..1a6f5ff024592a6c3a5c7018045e0a5015aac2c0 100644+index 9eadc5f1a8c9b002ab96727a1fb472403a21cf24..f3ceaaa8a23690b77e01aed1ed532e3afccd866c 100644--- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h@@ -67,6 +67,7 @@ WK_CLASS_AVAILABLE(macos(10.10), ios(8.0))@@ -10629,10 +10546,10 @@ index 0000000000000000000000000000000000000000..e0b1da48465c850f541532ed961d1b77+WebKit::WebPageProxy* webkitBrowserInspectorCreateNewPageInContext(WebKitWebContext*);+void webkitBrowserInspectorQuitApplication();diff --git a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp-index d6b7f61b141870b4af00fdd0a104dc6cf382fc36..bacc29f875ec5dccb65f7653a772bb99ceee2129 100644+index e0a36ef8b438626b97ca791c250868c15fd663ea..1af633927046fd388d7a7a9a4b4e503e31df2e65 100644--- a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp+++ b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp-@@ -95,6 +95,10 @@ private:+@@ -94,6 +94,10 @@ private:page.makeViewBlankIfUnpaintedSinceLastLoadCommit();webkitWebViewRunJavaScriptPrompt(m_webView, message.utf8(), defaultValue.utf8(), WTFMove(completionHandler));}@@ -10644,10 +10561,10 @@ index d6b7f61b141870b4af00fdd0a104dc6cf382fc36..bacc29f875ec5dccb65f7653a772bb99bool canRunBeforeUnloadConfirmPanel() const final { return true; }diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp-index 14c655bdd47bfb87d548e8c4ddd826e6bbb5d7c5..05440a65021ff70887fc88dc5fbfff71f4990957 100644+index f2df10c56663a21420eafc06ace0d204eaae1747..dc2b805b52c202d4910633bf9c6db6edf07f3b5f 100644--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp-@@ -415,10 +415,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa+@@ -417,10 +417,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa}}@@ -10667,7 +10584,7 @@ index 14c655bdd47bfb87d548e8c4ddd826e6bbb5d7c5..05440a65021ff70887fc88dc5fbfff71GUniquePtr<char> bundleFilename(g_build_filename(injectedBundleDirectory(), INJECTED_BUNDLE_FILENAME, nullptr));WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(object);-@@ -475,6 +484,8 @@ static void webkitWebContextConstructed(GObject* object)+@@ -477,6 +486,8 @@ static void webkitWebContextConstructed(GObject* object)static void webkitWebContextDispose(GObject* object){@@ -10676,7 +10593,7 @@ index 14c655bdd47bfb87d548e8c4ddd826e6bbb5d7c5..05440a65021ff70887fc88dc5fbfff71WebKitWebContextPrivate* priv = WEBKIT_WEB_CONTEXT(object)->priv;if (!priv->clientsDetached) {priv->clientsDetached = true;-@@ -934,6 +945,11 @@ WebKitNetworkSession* webkit_web_context_get_network_session_for_automation(WebK+@@ -938,6 +949,11 @@ WebKitNetworkSession* webkit_web_context_get_network_session_for_automation(WebKreturn nullptr;#endif}@@ -10689,7 +10606,7 @@ index 14c655bdd47bfb87d548e8c4ddd826e6bbb5d7c5..05440a65021ff70887fc88dc5fbfff71/*** webkit_web_context_set_cache_model:diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in-index fa559936ba819425cfca7ad0f26e9d373690180a..112eb9f64b9c08385eb9a7ac4d6815f574efed0e 100644+index b8c2337af32ac3ce5be2b494f02c259392af994e..b1e4b2660fa30acad76888e2fe9bd50673a76549 100644--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in@@ -161,6 +161,10 @@ webkit_web_context_set_automation_allowed (WebKitWebContext@@ -10704,7 +10621,7 @@ index fa559936ba819425cfca7ad0f26e9d373690180a..112eb9f64b9c08385eb9a7ac4d6815f5WEBKIT_API voiddiff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h-index e994309b097c1b140abfa4373fd2fafee46c05ec..6e0cc677a3bf33683ae8c89d12a4819144b3df89 100644+index c1945fbe717a42afc1f51d64a80c7de3fa9009ba..ab63fe19b00ecbd64c9421e6eecad3e25cbb2361 100644--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h@@ -43,3 +43,4 @@ void webkitWebContextInitializeNotificationPermissions(WebKitWebContext*);@@ -10713,10 +10630,10 @@ index e994309b097c1b140abfa4373fd2fafee46c05ec..6e0cc677a3bf33683ae8c89d12a48191#endif+int webkitWebContextExistingCount();diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp-index 1e389f70c7b4722458cffbf4ac34b1d67efa4ba8..b9f5f22c8e866de1909240b72d23c06d7525d863 100644+index 9c64c74cc0f7fbfbc8c63d7815dece46c2c3c6f4..23d807f87cf8beaf7f4b05d15b12055d1abcd895 100644--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp-@@ -33,6 +33,7 @@+@@ -34,6 +34,7 @@#include "WebContextMenuItem.h"#include "WebContextMenuItemData.h"#include "WebFrameProxy.h"@@ -10724,7 +10641,7 @@ index 1e389f70c7b4722458cffbf4ac34b1d67efa4ba8..b9f5f22c8e866de1909240b72d23c06d#include "WebKitAuthenticationRequestPrivate.h"#include "WebKitBackForwardListPrivate.h"#include "WebKitContextMenuClient.h"-@@ -50,6 +51,7 @@+@@ -51,6 +52,7 @@#include "WebKitNavigationClient.h"#include "WebKitNotificationPrivate.h"#include "WebKitPermissionStateQueryPrivate.h"@@ -10732,15 +10649,15 @@ index 1e389f70c7b4722458cffbf4ac34b1d67efa4ba8..b9f5f22c8e866de1909240b72d23c06d#include "WebKitPrivate.h"#include "WebKitResponsePolicyDecision.h"#include "WebKitScriptDialogPrivate.h"-@@ -89,7 +91,6 @@- #include "GtkSettingsManager.h"+@@ -90,7 +92,6 @@+ #if PLATFORM(GTK)#include "WebKitFaviconDatabasePrivate.h"#include "WebKitInputMethodContextImplGtk.h"-#include "WebKitPointerLockPermissionRequest.h"#include "WebKitPrintOperationPrivate.h"#include "WebKitWebInspectorPrivate.h"#include "WebKitWebViewBasePrivate.h"-@@ -141,6 +142,7 @@ enum {+@@ -145,6 +146,7 @@ enum {CLOSE,SCRIPT_DIALOG,@@ -10748,29 +10665,43 @@ index 1e389f70c7b4722458cffbf4ac34b1d67efa4ba8..b9f5f22c8e866de1909240b72d23c06dDECIDE_POLICY,PERMISSION_REQUEST,-@@ -494,6 +496,9 @@ GRefPtr<WebKitOptionMenu> WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& p+@@ -497,6 +499,16 @@ GRefPtr<WebKitOptionMenu> WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& pvoid WebKitWebViewClient::frameDisplayed(WKWPE::View&){++++#if USE(SKIA)++ sk_sp<SkImage> surface(webkitWebViewBackendTakeScreenshot(m_webView->priv->backend.get()));++ if (surface)++ getPage(m_webView).inspectorController().didPaint(WTFMove(surface));++#elif USE(CAIRO)+ if (RefPtr<cairo_surface_t> surface = adoptRef(webkitWebViewBackendTakeScreenshot(m_webView->priv->backend.get())))+ getPage(m_webView).inspectorController().didPaint(surface.get());++#endif+{SetForScope inFrameDisplayedGuard(m_webView->priv->inFrameDisplayed, true);for (const auto& callback : m_webView->priv->frameDisplayedCallbacks) {-@@ -510,6 +515,11 @@ void WebKitWebViewClient::frameDisplayed(WKWPE::View&)+@@ -513,6 +525,18 @@ void WebKitWebViewClient::frameDisplayed(WKWPE::View&)}}++#if USE(SKIA)++sk_sp<SkImage> WebKitWebViewClient::takeViewScreenshot()++{++ return sk_sp<SkImage>(webkitWebViewBackendTakeScreenshot(m_webView->priv->backend.get()));++}++#elif USE(CAIRO)+cairo_surface_t* WebKitWebViewClient::takeViewScreenshot()+{+ return webkitWebViewBackendTakeScreenshot(m_webView->priv->backend.get());+}++#endif+void WebKitWebViewClient::willStartLoad(WKWPE::View&){webkitWebViewWillStartLoad(m_webView);-@@ -596,7 +606,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*+@@ -599,7 +623,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*static gboolean webkitWebViewPermissionRequest(WebKitWebView*, WebKitPermissionRequest* request){@@ -10779,7 +10710,18 @@ index 1e389f70c7b4722458cffbf4ac34b1d67efa4ba8..b9f5f22c8e866de1909240b72d23c06dif (WEBKIT_IS_POINTER_LOCK_PERMISSION_REQUEST(request)) {webkit_permission_request_allow(request);return TRUE;-@@ -1903,6 +1913,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)+@@ -913,6 +937,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);++++ // Playwright: REGRESSION(278896@main): Need to preserve configuration's preferences.++ configuration->setPreferences(webkitSettingsGetPreferences(priv->settings.get()));+++ webkitWebViewCreatePage(webView, WTFMove(configuration));+ webkitWebContextWebViewCreated(priv->context.get(), webView);++@@ -1942,6 +1970,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)G_TYPE_BOOLEAN, 1,WEBKIT_TYPE_SCRIPT_DIALOG);@@ -10795,7 +10737,7 @@ index 1e389f70c7b4722458cffbf4ac34b1d67efa4ba8..b9f5f22c8e866de1909240b72d23c06d/*** WebKitWebView::decide-policy:* @web_view: the #WebKitWebView on which the signal is emitted-@@ -2702,6 +2721,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const+@@ -2734,6 +2771,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, constwebkit_script_dialog_unref(webView->priv->currentScriptDialog);}@@ -10820,10 +10762,10 @@ index 1e389f70c7b4722458cffbf4ac34b1d67efa4ba8..b9f5f22c8e866de1909240b72d23c06d{if (!webView->priv->currentScriptDialog)diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h-index 1a04ee05c3ddec0628ef5b8b8c181cbcc2b7d622..2a24f8f3fdc3f0eed13f8a79050258a4e4a489f0 100644+index 76f5b743cfe0a713897666545feb6fe07d6b16e8..4f13cca3cea9b20fbdb16cd5de0833832298d29a 100644--- a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h-@@ -66,6 +66,7 @@ void webkitWebViewRunJavaScriptAlert(WebKitWebView*, const CString& message, Fun+@@ -64,6 +64,7 @@ void webkitWebViewRunJavaScriptAlert(WebKitWebView*, const CString& message, Funvoid webkitWebViewRunJavaScriptConfirm(WebKitWebView*, const CString& message, Function<void(bool)>&& completionHandler);void webkitWebViewRunJavaScriptPrompt(WebKitWebView*, const CString& message, const CString& defaultText, Function<void(const String&)>&& completionHandler);void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView*, const CString& message, Function<void(bool)>&& completionHandler);@@ -10869,7 +10811,7 @@ index cea5882f6c455898e1b5a231e1213e6b71ff21b6..d82b93d3c759b1184869b3504e1c3c07void PageClientImpl::didChangeContentSize(const IntSize& size)diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h-index 0445554dc296421d56237b07ea8d09b6e5e533b5..d7d91b30309e7106ae801aaad8162277ed636d1b 100644+index adf00c390a0bc584955be83d15baae5898a928eb..2a70aba8ef2d8d5882f6520425e1b9d06796b477 100644--- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h+++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h@@ -105,7 +105,7 @@ private:@@ -10982,10 +10924,10 @@ index 496079da90993ac37689b060b69ecd4a67c2b6a8..af30181ca922f16c0f6e245c70e5ce7dG_BEGIN_DECLSdiff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp-index 9ce95b0e5ec142f4067c99d4aeb388fa08ae3f89..0718c8d9764d100fc8f41348a9273020645f0825 100644+index 44ca7ff8b13bf0b1d4b16d90b8488f596175f2a1..58371f574003fba1d280ad0464b7688cd99b5ebe 100644--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp-@@ -2908,6 +2908,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)+@@ -2946,6 +2946,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)#endif}@@ -10997,7 +10939,7 @@ index 9ce95b0e5ec142f4067c99d4aeb388fa08ae3f89..0718c8d9764d100fc8f41348a9273020void webkitWebViewBaseEnterAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase, const LayerTreeContext& layerTreeContext){ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);-@@ -2964,12 +2969,12 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase)+@@ -3002,12 +3007,12 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase)webkitWebViewBase->priv->acceleratedBackingStore->update({ });}@@ -11013,7 +10955,7 @@ index 9ce95b0e5ec142f4067c99d4aeb388fa08ae3f89..0718c8d9764d100fc8f41348a9273020#if !USE(GTK4)diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h-index a227380c1171e1e5824370b21c66440bb744c7f7..9b7bc68d01ef5d7c5d34720a6ab7c27f9e8c2156 100644+index a99b65ba10a47d9806d1d61240e0e3e883bf91e5..61991ab00a922356e1ec74771a992751c6d219cc 100644--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h@@ -27,6 +27,7 @@@@ -11024,7 +10966,7 @@ index a227380c1171e1e5824370b21c66440bb744c7f7..9b7bc68d01ef5d7c5d34720a6ab7c27f#include "APIPageConfiguration.h"#include "InputMethodState.h"#include "RendererBufferFormat.h"-@@ -107,7 +108,7 @@ void webkitWebViewBaseStartDrag(WebKitWebViewBase*, WebCore::SelectionData&&, Op+@@ -108,7 +109,7 @@ void webkitWebViewBaseStartDrag(WebKitWebViewBase*, WebCore::SelectionData&&, Opvoid webkitWebViewBaseDidPerformDragControllerAction(WebKitWebViewBase*);#endif@@ -11033,36 +10975,45 @@ index a227380c1171e1e5824370b21c66440bb744c7f7..9b7bc68d01ef5d7c5d34720a6ab7c27fvoid webkitWebViewBaseSetEnableBackForwardNavigationGesture(WebKitWebViewBase*, bool enabled);WebKit::ViewGestureController* webkitWebViewBaseViewGestureController(WebKitWebViewBase*);-@@ -148,3 +149,5 @@ void webkitWebViewBaseSetPlugID(WebKitWebViewBase*, const String&);+@@ -149,3 +150,5 @@ void webkitWebViewBaseSetPlugID(WebKitWebViewBase*, const String&);#endifWebKit::RendererBufferFormat webkitWebViewBaseGetRendererBufferFormat(WebKitWebViewBase*);++WebKit::AcceleratedBackingStore* webkitWebViewBaseGetAcceleratedBackingStore(WebKitWebViewBase*);diff --git a/Source/WebKit/UIProcess/API/wpe/APIViewClient.h b/Source/WebKit/UIProcess/API/wpe/APIViewClient.h-index 26d1790017e528f26ae04dac635678d5494bfd04..48dbe50eb05628307264a350350ac19f0acb3ae3 100644+index 26d1790017e528f26ae04dac635678d5494bfd04..b9832e9221edaa14af485d34ac6216ffebac4e0d 100644--- a/Source/WebKit/UIProcess/API/wpe/APIViewClient.h+++ b/Source/WebKit/UIProcess/API/wpe/APIViewClient.h-@@ -26,6 +26,7 @@+@@ -26,6 +26,12 @@#pragma once#include "UserMessage.h"++#if USE(CAIRO)+#include <cairo.h>++#endif++#if USE(SKIA)++#include <skia/core/SkImage.h>++#endif#include <wtf/CompletionHandler.h>typedef struct OpaqueJSContext* JSGlobalContextRef;-@@ -49,6 +50,9 @@ public:+@@ -49,6 +55,13 @@ public:virtual bool isGLibBasedAPI() { return false; }virtual void frameDisplayed(WKWPE::View&) { }+// Playwright begin++#if USE(CAIRO)+ virtual cairo_surface_t* takeViewScreenshot() { return nullptr; }++#elif USE(SKIA)++ virtual sk_sp<SkImage> takeViewScreenshot() { return nullptr; }++#endif+// Playwright endvirtual void willStartLoad(WKWPE::View&) { }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..503a8875fed34fd7925646b61a1eed11d7c866b7 100644+index f498562d70a4652f6831ac6bc12ef86e537d3930..73b11a5904d32e28c469622f98f0d90659c40a40 100644--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp@@ -33,9 +33,13 @@@@ -11079,7 +11030,20 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..503a8875fed34fd7925646b61a1eed11#include <WebCore/ActivityState.h>#include <WebCore/Cursor.h>#include <WebCore/DOMPasteAccess.h>-@@ -203,7 +207,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I+@@ -45,6 +49,12 @@+ #include <atk/atk.h>+ #endif+++#if USE(SKIA)++#include <skia/core/SkBitmap.h>++#include <skia/core/SkCanvas.h>++#include <skia/core/SkImage.h>++#endif+++ namespace WebKit {++ PageClientImpl::PageClientImpl(WKWPE::View& view)+@@ -203,7 +213,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::IWebCore::IntRect PageClientImpl::rootViewToAccessibilityScreen(const WebCore::IntRect& rect){@@ -11088,10 +11052,39 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..503a8875fed34fd7925646b61a1eed11}void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&, bool)-@@ -465,6 +469,33 @@ void PageClientImpl::selectionDidChange()+@@ -465,6 +475,64 @@ void PageClientImpl::selectionDidChange()m_view.selectionDidChange();}++#if USE(SKIA)++sk_sp<SkImage> PageClientImpl::takeViewSnapshot(std::optional<WebCore::IntRect>&& clipRect, bool nominalResolution)++{++ sk_sp<SkImage> fullScreenshot = m_view.client().takeViewScreenshot();++ float deviceScale = m_view.page().deviceScaleFactor();++ if (!clipRect && (!nominalResolution || deviceScale == 1))++ return fullScreenshot;++++ WebCore::IntSize size = clipRect ? clipRect->size() : m_view.page().viewSize();++ if (!nominalResolution) {++ size.scale(deviceScale);++ if (clipRect)++ clipRect->scale(deviceScale);++ }++++ SkBitmap bitmap;++ bitmap.allocPixels(SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul_SkAlphaType));++ SkCanvas canvas(bitmap);++ if (clipRect) {++ canvas.translate(-clipRect->x(), -clipRect->y());++ SkRect rect = SkRect::MakeXYWH(clipRect->x(), clipRect->y(), clipRect->width(), clipRect->height());++ canvas.clipRect(rect);++ }++ if (nominalResolution)++ canvas.scale(1/deviceScale, 1/deviceScale);++ canvas.drawImage(fullScreenshot, 0, 0);++ return bitmap.asImage();++}++#elif USE(CAIRO)+RefPtr<cairo_surface_t> PageClientImpl::takeViewSnapshot(std::optional<WebCore::IntRect>&& clipRect, bool nominalResolution)+{+ RefPtr<cairo_surface_t> fullScreenshot = adoptRef(m_view.client().takeViewScreenshot());@@ -11118,11 +11111,13 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..503a8875fed34fd7925646b61a1eed11+ cairo_paint(cr.get());+ return surface;+}++#endif+++WebKitWebResourceLoadManager* PageClientImpl::webResourceLoadManager(){return m_view.webResourceLoadManager();-@@ -475,4 +506,23 @@ void PageClientImpl::callAfterNextPresentationUpdate(CompletionHandler<void()>&&+@@ -475,4 +543,23 @@ void PageClientImpl::callAfterNextPresentationUpdate(CompletionHandler<void()>&&m_view.callAfterNextPresentationUpdate(WTFMove(callback));}@@ -11147,16 +11142,21 @@ index f498562d70a4652f6831ac6bc12ef86e537d3930..503a8875fed34fd7925646b61a1eed11+} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h-index a7ece2c8dc3fd30bfb850de04c4fc10004444d5a..b5ee1a1877b3e748dea3ce195cd75cb0701a7034 100644+index 6c113e0349dea1d7457874a948d6e55ba2625730..0fcffc23a58401ac54cd6864011a3dd86fa0683b 100644--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h-@@ -166,9 +166,21 @@ private:+@@ -166,10 +166,25 @@ private:void didChangeWebPageID() const override;void selectionDidChange() override;+-++#if USE(SKIA)++ sk_sp<SkImage> takeViewSnapshot(std::optional<WebCore::IntRect>&&, bool nominalResolution) override;++#elif USE(CAIRO)+ RefPtr<cairo_surface_t> takeViewSnapshot(std::optional<WebCore::IntRect>&&, bool nominalResolution) override;-++#endifWebKitWebResourceLoadManager* webResourceLoadManager() override;+ void didClearEditorStateAfterPageTransition() final { }+#if ENABLE(DATALIST_ELEMENT)+ RefPtr<WebKit::WebDataListSuggestionsDropdown> createDataListSuggestionsDropdown(WebKit::WebPageProxy& page) override;@@ -11173,7 +11173,7 @@ index a7ece2c8dc3fd30bfb850de04c4fc10004444d5a..b5ee1a1877b3e748dea3ce195cd75cb0};diff --git a/Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp b/Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp-index 8a9b8a7a853f2bdb6ae0b8bb389d3db1e1a53ac4..c22553b96c3e9afc126ce93c4e45e3af0fbd38f0 100644+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@@ -11400,7 +11400,7 @@ index 0000000000000000000000000000000000000000..0a099832c3dd959f456fcae49a1d62a9++#endif // ENABLE(DATALIST_ELEMENT)diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.cpp b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.cpp-index 763bda5b29304f7ed7133c0a8158e6c8b94c5ea1..ff5d01438e44ce6785a2aa70fc5423ba74e7101c 100644+index 763bda5b29304f7ed7133c0a8158e6c8b94c5ea1..8ed962e8c1af62b9b73a68348d0d88765429861d 100644--- a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.cpp+++ b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.cpp@@ -54,6 +54,7 @@ struct _WebKitWebViewBackend {@@ -11420,7 +11420,7 @@ index 763bda5b29304f7ed7133c0a8158e6c8b94c5ea1..ff5d01438e44ce6785a2aa70fc5423ba+ view_backend->screenshotCallback = callback;+}+-+cairo_surface_t* webkitWebViewBackendTakeScreenshot(WebKitWebViewBackend* view_backend)++PlatformImage webkitWebViewBackendTakeScreenshot(WebKitWebViewBackend* view_backend)+{+ if (!view_backend->screenshotCallback)+ return nullptr;@@ -11432,22 +11432,30 @@ index 763bda5b29304f7ed7133c0a8158e6c8b94c5ea1..ff5d01438e44ce6785a2aa70fc5423batemplate <> WebKitWebViewBackend* refGPtr(WebKitWebViewBackend* ptr)diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h-index 16dcc1f69c38cd8ad630bc49d6d69feaa3aa811e..ddbd14645944fdb02925c381f06721d368a434f8 100644+index 16dcc1f69c38cd8ad630bc49d6d69feaa3aa811e..efa3814a8e896e02b955dea0be70bdc5828e3d82 100644--- a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h+++ b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h-@@ -27,6 +27,7 @@- #include <glib-object.h>+@@ -28,6 +28,15 @@#include <wpe/WebKitDefines.h>#include <wpe/wpe.h>-+#include <cairo.h>++#if defined(USE_CAIRO) && USE_CAIRO++#include <cairo.h>++using PlatformImage = cairo_surface_t*;++#endif++#if defined(USE_SKIA) && USE_SKIA++#include <skia/core/SkImage.h>++using PlatformImage = SkImage*;++#endif++G_BEGIN_DECLS-@@ -44,6 +45,12 @@ webkit_web_view_backend_new (struct wpe_view_backend *backend,+ #define WEBKIT_TYPE_WEB_VIEW_BACKEND (webkit_web_view_backend_get_type())+@@ -44,6 +53,12 @@ webkit_web_view_backend_new (struct wpe_view_backend *backend,WEBKIT_API struct wpe_view_backend *webkit_web_view_backend_get_wpe_backend (WebKitWebViewBackend *view_backend);-+typedef cairo_surface_t* (*take_screenshot_callback)(gpointer user_data);++typedef PlatformImage (*take_screenshot_callback)(gpointer user_data);++WEBKIT_API void+webkit_web_view_backend_set_screenshot_callback (WebKitWebViewBackend *view_backend,@@ -11457,7 +11465,7 @@ index 16dcc1f69c38cd8ad630bc49d6d69feaa3aa811e..ddbd14645944fdb02925c381f06721d3#endif /* WebKitWebViewBackend_h */diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackendPrivate.h b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackendPrivate.h-index e4b92ace1531090ae38a7aec3d3d4febf19aee84..43690f9ef4969a39084501613bfc00a77fd5df49 100644+index e4b92ace1531090ae38a7aec3d3d4febf19aee84..b66b573f9148c39c5ce2738add6cd01a9a352be8 100644--- a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackendPrivate.h+++ b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackendPrivate.h@@ -31,3 +31,5 @@ template <> void derefGPtr(WebKitWebViewBackend* ptr);@@ -11465,26 +11473,51 @@ index e4b92ace1531090ae38a7aec3d3d4febf19aee84..43690f9ef4969a39084501613bfc00a7void webkitWebViewBackendUnref(WebKitWebViewBackend*);+-+cairo_surface_t* webkitWebViewBackendTakeScreenshot(WebKitWebViewBackend*);++PlatformImage webkitWebViewBackendTakeScreenshot(WebKitWebViewBackend*);diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewClient.h b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewClient.h-index 720c88818bdb4cde3cb58e95785454754f6c1396..7f702c0b922e13128522d2bb1ace6a233812a7d4 100644+index 720c88818bdb4cde3cb58e95785454754f6c1396..2658e6709a13e5d6258abca956ec52bc6b68324d 100644--- a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewClient.h+++ b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewClient.h-@@ -50,6 +50,9 @@ private:+@@ -50,6 +50,13 @@ private:bool isGLibBasedAPI() override { return true; }void frameDisplayed(WKWPE::View&) override;+// Playwright begin++#if USE(CAIRO)+ cairo_surface_t* takeViewScreenshot() override;++#elif USE(SKIA)++ sk_sp<SkImage> takeViewScreenshot() override;++#endif+// Playwright endvoid willStartLoad(WKWPE::View&) override;void didChangePageID(WKWPE::View&) override;void didReceiveUserMessage(WKWPE::View&, WebKit::UserMessage&&, CompletionHandler<void(WebKit::UserMessage&&)>&&) override;+diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSession.h b/Source/WebKit/UIProcess/Automation/WebAutomationSession.h+index 65bf3b71e451aad11039130d2d23a68f5fce499f..99a1402270bcd210107bcc4f029837891886cbdd 100644+--- a/Source/WebKit/UIProcess/Automation/WebAutomationSession.h++++ b/Source/WebKit/UIProcess/Automation/WebAutomationSession.h+@@ -233,6 +233,8 @@ public:++ void didDestroyFrame(WebCore::FrameIdentifier);+++ static std::optional<String> platformGetBase64EncodedPNGData(const ViewSnapshot&);+++ private:+ RefPtr<WebPageProxy> webPageProxyForHandle(const String&);+ String handleForWebPageProxy(const WebPageProxy&);+@@ -284,7 +286,6 @@ private:++ // Get base64-encoded PNG data from a bitmap.+ static std::optional<String> platformGetBase64EncodedPNGData(WebCore::ShareableBitmap::Handle&&);+- static std::optional<String> platformGetBase64EncodedPNGData(const ViewSnapshot&);++ // 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 6f69cd9d4db8544a2c0c8b11fb557697f9b6a183..750a565d8a0c1208cd6950740b2beffa8c1d69d9 100644+index 15a56d77cdd54d17a38e71b4adf31c981e6407ee..6bc36ee8b7b762699283ab6cbb12b11cf243836a 100644--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp-@@ -158,7 +158,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau+@@ -168,7 +168,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& laulaunchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix);#endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE))@@ -11497,10 +11530,10 @@ index 6f69cd9d4db8544a2c0c8b11fb557697f9b6a183..750a565d8a0c1208cd6950740b2beffaplatformGetLaunchOptions(launchOptions);}diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h-index e2d1e9dfbc77e3d520ce8d31c812a8482facae10..28238da43a4fc45466b43753bc5ad8aa07963f94 100644+index f203c2ea1a77939b1acaf5352e4cf67a58817ab2..08db3dba0ab5c4e22207c1dced9530ddad67e976 100644--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h-@@ -264,13 +264,16 @@ protected:+@@ -277,13 +277,16 @@ protected:static RefPtr<WebCore::SharedBuffer> fetchAudioComponentServerRegistrations();#endif@@ -11519,10 +11552,10 @@ index e2d1e9dfbc77e3d520ce8d31c812a8482facae10..28238da43a4fc45466b43753bc5ad8aaResponsivenessTimer m_responsivenessTimer;diff --git a/Source/WebKit/UIProcess/BackingStore.h b/Source/WebKit/UIProcess/BackingStore.h-index f9b557ae57a25f53f6d17aab23a256e3cc7d1e66..cced83f477cb1344dd079b9c3523b109ee5cfd89 100644+index e1d579d6d428c3575ddf83b9d78dae045beb218d..9a2830e50ec8ab965e4a5a2b5faa9285c99bcc99 100644--- a/Source/WebKit/UIProcess/BackingStore.h+++ b/Source/WebKit/UIProcess/BackingStore.h-@@ -61,6 +61,7 @@ public:+@@ -66,6 +66,7 @@ public:float deviceScaleFactor() const { return m_deviceScaleFactor; }void paint(PlatformPaintContextPtr, const WebCore::IntRect&);@@ -11663,10 +11696,10 @@ index 957f7f088087169668a9b4f1ba65d9f206a2a836..15e44c8d5b6a3eafb7f1148707366b0cclass PopUpSOAuthorizationSession final : public SOAuthorizationSession {public:diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.h b/Source/WebKit/UIProcess/Cocoa/UIDelegate.h-index 20af8a02d6dee5af7328accca7cd88a06995c4bb..16e8fc676e4bd70f3f35414434963ccb9f277311 100644+index f6b1c41cd18d751f0622b4ecf00b5355b6212a17..5b116ff1a8c94906f94802af233c7f1e97d47d00 100644--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.h+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.h-@@ -96,6 +96,7 @@ private:+@@ -105,6 +105,7 @@ private:void runJavaScriptAlert(WebPageProxy&, const WTF::String&, WebFrameProxy*, FrameInfoData&&, Function<void()>&& completionHandler) final;void runJavaScriptConfirm(WebPageProxy&, const WTF::String&, WebFrameProxy*, FrameInfoData&&, Function<void(bool)>&& completionHandler) final;void runJavaScriptPrompt(WebPageProxy&, const WTF::String&, const WTF::String&, WebFrameProxy*, FrameInfoData&&, Function<void(const WTF::String&)>&&) final;@@ -11674,7 +11707,7 @@ index 20af8a02d6dee5af7328accca7cd88a06995c4bb..16e8fc676e4bd70f3f35414434963ccbvoid presentStorageAccessConfirmDialog(const WTF::String& requestingDomain, const WTF::String& currentDomain, CompletionHandler<void(bool)>&&);void requestStorageAccessConfirm(WebPageProxy&, WebFrameProxy*, const WebCore::RegistrableDomain& requestingDomain, const WebCore::RegistrableDomain& currentDomain, std::optional<WebCore::OrganizationStorageAccessPromptQuirk>&&, CompletionHandler<void(bool)>&&) final;void decidePolicyForGeolocationPermissionRequest(WebPageProxy&, WebFrameProxy&, const FrameInfoData&, Function<void(bool)>&) final;-@@ -207,6 +208,7 @@ private:+@@ -221,6 +222,7 @@ private:bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1;bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;bool webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler : 1;@@ -11683,7 +11716,7 @@ index 20af8a02d6dee5af7328accca7cd88a06995c4bb..16e8fc676e4bd70f3f35414434963ccbbool webViewRequestStorageAccessPanelForDomainUnderCurrentDomainForQuirkDomainsCompletionHandler : 1;bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm-index db0e7523899917cc9055ced3127a1e4eb493313d..c5a8a5a7da934deda55313465c26a38b1b33d2ac 100644+index 3ac9df925437afb3b4d37107fc6c02dc9ee41fa6..eb0dc8703860ef5006d6df26a6ca6115a871ed0f 100644--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm@@ -118,6 +118,7 @@ void UIDelegate::setDelegate(id <WKUIDelegate> delegate)@@ -11694,7 +11727,7 @@ index db0e7523899917cc9055ced3127a1e4eb493313d..c5a8a5a7da934deda55313465c26a38bm_delegateMethods.webViewRequestStorageAccessPanelUnderFirstPartyCompletionHandler = [delegate respondsToSelector:@selector(_webView:requestStorageAccessPanelForDomain:underCurrentDomain:completionHandler:)];m_delegateMethods.webViewRequestStorageAccessPanelForDomainUnderCurrentDomainForQuirkDomainsCompletionHandler = [delegate respondsToSelector:@selector(_webView:requestStorageAccessPanelForDomain:underCurrentDomain:forQuirkDomains:completionHandler:)];m_delegateMethods.webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:)];-@@ -442,6 +443,15 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy& page, const WTF::St+@@ -447,6 +448,15 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy& page, const WTF::St}).get()];}@@ -11711,7 +11744,7 @@ index db0e7523899917cc9055ced3127a1e4eb493313d..c5a8a5a7da934deda55313465c26a38b{if (!m_uiDelegate)diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm-index b77d46b64193c5cf2017da8d81623e54d5f6f7a8..61a08b78ff3829995b54ce14c1752d4e073d5796 100644+index 58b550ade47802818b3d5ed8027f757ec7b282ec..31cbc0362a1d991de69ebd040ea70700716e097f 100644--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm@@ -38,6 +38,7 @@@@ -11722,7 +11755,7 @@ index b77d46b64193c5cf2017da8d81623e54d5f6f7a8..61a08b78ff3829995b54ce14c1752d4e#import "PlaybackSessionManagerProxy.h"#import "QuickLookThumbnailLoader.h"#import "RemoteLayerTreeTransaction.h"-@@ -283,10 +284,87 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()+@@ -293,10 +294,84 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()void WebPageProxy::startDrag(const DragItem& dragItem, ShareableBitmap::Handle&& dragImageHandle){@@ -11745,12 +11778,9 @@ index b77d46b64193c5cf2017da8d81623e54d5f6f7a8..61a08b78ff3829995b54ce14c1752d4e+ return;+ }+-+ ASSERT(info.additionalTypes.size() == info.additionalData.size());-+ if (info.additionalTypes.size() == info.additionalData.size()) {-+ for (size_t index = 0; index < info.additionalTypes.size(); ++index) {-+ auto nsData = info.additionalData[index]->createNSData();-+ [pasteboard setData:nsData.get() forType:info.additionalTypes[index]];-+ }++ for (size_t index = 0; index < info.additionalTypesAndData.size(); ++index) {++ auto nsData = info.additionalTypesAndData[index].second->createNSData();++ [pasteboard setData:nsData.get() forType:info.additionalTypesAndData[index].first];+ }+ } else {+ [pasteboard setString:@"" forType:PasteboardTypes::WebDummyPboardType];@@ -11809,10 +11839,10 @@ index b77d46b64193c5cf2017da8d81623e54d5f6f7a8..61a08b78ff3829995b54ce14c1752d4e++#endif // ENABLE(DRAG_SUPPORT)- #if ENABLE(UNIFIED_TEXT_REPLACEMENT)+ #if ENABLE(ATTACHMENT_ELEMENT)diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm-index ba0c5fe1678dc1055c7f495f5ff421438db7e082..bdf2dd23de87c114db52603b919f29188a2c4bed 100644+index ddef8d1c1f33c435baa3c5f3faa80dca2b01401b..9ec578895ed986ae786b45b2fe755a5848703567 100644--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm@@ -434,7 +434,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END@@ -11824,7 +11854,7 @@ index ba0c5fe1678dc1055c7f495f5ff421438db7e082..bdf2dd23de87c114db52603b919f2918#endif#if (PLATFORM(IOS) || PLATFORM(VISION)) && HAVE(AGX_COMPILER_SERVICE)-@@ -803,8 +803,8 @@ void WebProcessPool::registerNotificationObservers()+@@ -840,8 +840,8 @@ void WebProcessPool::registerNotificationObservers()}];m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {@@ -11836,7 +11866,7 @@ index ba0c5fe1678dc1055c7f495f5ff421438db7e082..bdf2dd23de87c114db52603b919f2918m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidBecomeActiveNotification object:NSApp queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp-index 3796110b3f6ffb29bc1eae80505017dee9e779d1..1a181f4ac8ce8d15d5e65a9df6afc8fe5695e85c 100644+index 39eb5f67b50e99eddac8e12b4ecee66fe1d81360..91f5b350d7ae87af8754b56662e8dbc286084d5b 100644--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp@@ -33,14 +33,17 @@@@ -11875,7 +11905,7 @@ index 3796110b3f6ffb29bc1eae80505017dee9e779d1..1a181f4ac8ce8d15d5e65a9df6afc8fesend(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()));}-+void DrawingAreaProxyCoordinatedGraphics::waitForSizeUpdate(Function<void ()>&& callback)++void DrawingAreaProxyCoordinatedGraphics::waitForSizeUpdate(Function<void (const DrawingAreaProxyCoordinatedGraphics&)>&& callback)+{+ m_callbacks.append(WTFMove(callback));+}@@ -11929,20 +11959,21 @@ index 3796110b3f6ffb29bc1eae80505017dee9e779d1..1a181f4ac8ce8d15d5e65a9df6afc8febool DrawingAreaProxyCoordinatedGraphics::alwaysUseCompositing() const{return m_webPageProxy->preferences().acceleratedCompositingEnabled() && m_webPageProxy->preferences().forceCompositingMode();-@@ -275,6 +329,11 @@ void DrawingAreaProxyCoordinatedGraphics::didUpdateGeometry()+@@ -275,6 +329,12 @@ void DrawingAreaProxyCoordinatedGraphics::didUpdateGeometry()// we need to resend the new size here.if (m_lastSentSize != m_size)sendUpdateGeometry();+ else {-+ for (auto& value : m_callbacks)-+ value();-+ m_callbacks.clear();++ Vector<Function<void (const DrawingAreaProxyCoordinatedGraphics&)>> callbacks;++ callbacks.swap(m_callbacks);++ for (auto& cb : callbacks)++ cb(*this);+ }}#if !PLATFORM(WPE)diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h-index d2ceeda76e90ab2041f238c240f81bf9e37f6072..faa338a2b4af13663bb63efc940b7efe5544e409 100644+index 555814f9771f8f16d3572cd7007817ba4296d6d3..8850e4adb182e7f0b23e5cde45f14ad8c66bcc15 100644--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h@@ -29,6 +29,7 @@@@ -11953,18 +11984,18 @@ index d2ceeda76e90ab2041f238c240f81bf9e37f6072..faa338a2b4af13663bb63efc940b7efe#include <wtf/RunLoop.h>#if !PLATFORM(WPE)-@@ -52,6 +53,10 @@ public:+@@ -61,6 +62,10 @@ public:bool isInAcceleratedCompositingMode() const { return !m_layerTreeContext.isEmpty(); }const LayerTreeContext& layerTreeContext() const { return m_layerTreeContext; }-+ void waitForSizeUpdate(Function<void ()>&&);++ void waitForSizeUpdate(Function<void (const DrawingAreaProxyCoordinatedGraphics&)>&&);+#if !PLATFORM(WPE)+ void captureFrame();+#endifvoid dispatchAfterEnsuringDrawing(CompletionHandler<void()>&&);-@@ -75,6 +80,9 @@ private:+@@ -84,6 +89,9 @@ private:void enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) override;void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, UpdateInfo&&) override;void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) override;@@ -11974,15 +12005,15 @@ index d2ceeda76e90ab2041f238c240f81bf9e37f6072..faa338a2b4af13663bb63efc940b7efebool shouldSendWheelEventsToEventDispatcher() const override { return true; }-@@ -117,6 +125,7 @@ private:+@@ -126,6 +134,7 @@ private:// The last size we sent to the web process.WebCore::IntSize m_lastSentSize;-+ Vector<Function<void ()>> m_callbacks;++ Vector<Function<void (const DrawingAreaProxyCoordinatedGraphics&)>> m_callbacks;#if !PLATFORM(WPE)bool m_isBackingStoreDiscardable { true };-@@ -125,6 +134,10 @@ private:+@@ -134,6 +143,10 @@ private:RunLoop::Timer m_discardBackingStoreTimer;#endifstd::unique_ptr<DrawingMonitor> m_drawingMonitor;@@ -11994,7 +12025,7 @@ index d2ceeda76e90ab2041f238c240f81bf9e37f6072..faa338a2b4af13663bb63efc940b7efe} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp-index 0295a560194b82bf172bfe978c711bb8f280f8e4..e8584dc0133a6a57734c63f6020f3d27dbcd04d7 100644+index f9123661bf8e84307bfe55a78999d4e35c70f165..897c488a2cef712613e53cd0c502f5e48b201341 100644--- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp+++ b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp@@ -40,8 +40,10 @@@@ -12008,7 +12039,7 @@ index 0295a560194b82bf172bfe978c711bb8f280f8e4..e8584dc0133a6a57734c63f6020f3d27#if PLATFORM(MAC)#include <pal/spi/mac/QuarantineSPI.h>-@@ -58,7 +60,10 @@ DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebsiteDataStor+@@ -62,7 +64,10 @@ DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebsiteDataStor, m_request(resourceRequest), m_originatingPage(originatingPage), m_frameInfo(API::FrameInfo::create(FrameInfoData { frameInfoData }, originatingPage))@@ -12019,7 +12050,7 @@ index 0295a560194b82bf172bfe978c711bb8f280f8e4..e8584dc0133a6a57734c63f6020f3d27}DownloadProxy::~DownloadProxy()-@@ -77,9 +82,12 @@ static RefPtr<API::Data> createData(std::span<const uint8_t> data)+@@ -81,9 +86,12 @@ static RefPtr<API::Data> createData(std::span<const uint8_t> data)void DownloadProxy::cancel(CompletionHandler<void(API::Data*)>&& completionHandler){if (m_dataStore) {@@ -12033,7 +12064,7 @@ index 0295a560194b82bf172bfe978c711bb8f280f8e4..e8584dc0133a6a57734c63f6020f3d27m_downloadProxyMap.downloadFinished(*this);});} else-@@ -164,6 +172,21 @@ void DownloadProxy::decideDestinationWithSuggestedFilename(const WebCore::Resour+@@ -168,6 +176,21 @@ void DownloadProxy::decideDestinationWithSuggestedFilename(const WebCore::ResoursuggestedFilename = m_suggestedFilename;suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(suggestedFilename, response.mimeType());@@ -12055,7 +12086,7 @@ index 0295a560194b82bf172bfe978c711bb8f280f8e4..e8584dc0133a6a57734c63f6020f3d27m_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()) {-@@ -212,6 +235,8 @@ void DownloadProxy::didFinish()+@@ -216,6 +239,8 @@ void DownloadProxy::didFinish()updateQuarantinePropertiesIfPossible();#endifm_client->didFinish(*this);@@ -12064,7 +12095,7 @@ index 0295a560194b82bf172bfe978c711bb8f280f8e4..e8584dc0133a6a57734c63f6020f3d27// This can cause the DownloadProxy object to be deleted.m_downloadProxyMap.downloadFinished(*this);-@@ -222,6 +247,8 @@ void DownloadProxy::didFail(const ResourceError& error, std::span<const uint8_t>+@@ -226,6 +251,8 @@ void DownloadProxy::didFail(const ResourceError& error, std::span<const uint8_t>m_legacyResumeData = createData(resumeData);m_client->didFail(*this, error, m_legacyResumeData.get());@@ -12086,10 +12117,10 @@ index 6f0d076b1b1cb0ec3e1c7fdc5f3a6dfffe9ee63d..656d4259dbf9ab97a8b0408c061c0fd2} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.h b/Source/WebKit/UIProcess/DrawingAreaProxy.h-index 8cfe9bf3d49afd3345209c22c59663f72791fea4..9c13c012e21b33a889eb04a3733712a66470a88e 100644+index a11762ba4969c3b5a38b01ba3eb831940e48c9ab..e4df189df7b5246dd39a485f735743f81cdc3041 100644--- a/Source/WebKit/UIProcess/DrawingAreaProxy.h+++ b/Source/WebKit/UIProcess/DrawingAreaProxy.h-@@ -89,6 +89,7 @@ public:+@@ -98,6 +98,7 @@ public:const WebCore::IntSize& size() const { return m_size; }bool setSize(const WebCore::IntSize&, const WebCore::IntSize& scrollOffset = { });@@ -12097,7 +12128,7 @@ index 8cfe9bf3d49afd3345209c22c59663f72791fea4..9c13c012e21b33a889eb04a3733712a6virtual void minimumSizeForAutoLayoutDidChange() { }virtual void sizeToContentAutoSizeMaximumSizeDidChange() { }-@@ -172,6 +173,10 @@ private:+@@ -181,6 +182,10 @@ private:virtual void update(uint64_t /* backingStoreStateID */, UpdateInfo&&) { }virtual void exitAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, UpdateInfo&&) { }#endif@@ -12410,10 +12441,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.cppnew file mode 100644-index 0000000000000000000000000000000000000000..91cf94cd292350afb3e3ed071ca44760acda1c14+index 0000000000000000000000000000000000000000..41c52ae52e31fb90721be7cab85677745577f9a7--- /dev/null+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp-@@ -0,0 +1,305 @@+@@ -0,0 +1,393 @@+/*+ * Copyright (C) 2020 Microsoft Corporation.+ *@@ -12454,6 +12485,18 @@ index 0000000000000000000000000000000000000000..91cf94cd292350afb3e3ed071ca44760+#include <wtf/UUID.h>+#include <wtf/text/Base64.h>+++#if USE(SKIA)++#include "DrawingAreaProxyCoordinatedGraphics.h"++#include "DrawingAreaProxy.h"++#include <skia/core/SkBitmap.h>++#include <skia/core/SkCanvas.h>++#include <skia/core/SkImage.h>++#include <skia/core/SkPixmap.h>++#include <skia/core/SkData.h>++#include <skia/core/SkStream.h>++#include <skia/encode/SkJpegEncoder.h>++#endif+++#if USE(CAIRO)+#include "CairoJpegEncoder.h"+#include "DrawingAreaProxyCoordinatedGraphics.h"@@ -12500,6 +12543,82 @@ index 0000000000000000000000000000000000000000..91cf94cd292350afb3e3ed071ca44760+ m_encoder = nullptr;+}+++#if USE(SKIA)++void InspectorScreencastAgent::didPaint(sk_sp<SkImage>&& surface)++{++ sk_sp<SkImage> image(surface);++#if PLATFORM(WPE)++ // Get actual image size (in device pixels).++ WebCore::IntSize displaySize(image->width(), image->height());++++ WebCore::IntSize drawingAreaSize = m_page.drawingArea()->size();++ drawingAreaSize.scale(m_page.deviceScaleFactor());++ if (drawingAreaSize != displaySize) {++ return;++ }++#else++ WebCore::IntSize displaySize = m_page.drawingArea()->size();++#endif++ // Do not WTFMove image here as it is used below++ if (m_encoder)++ 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");++ return;++ }++ // Do not send the same frame over and over.++ size_t len = bitmap.computeByteSize();++ auto cryptoDigest = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_1);++ cryptoDigest->addBytes(std::span(reinterpret_cast<unsigned char*>(bitmap.getPixels()), len));++ auto digest = cryptoDigest->computeHash();++ if (m_lastFrameDigest == digest)++ return;++ m_lastFrameDigest = digest;++ }++++ if (m_screencastFramesInFlight > kMaxFramesInFlight)++ return;++ // 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;++ }++ SkCanvas canvas(dstBitmap);++ canvas.scale(scale, scale);++ canvas.drawImage(image, 0, 0);++ image = dstBitmap.asImage();++ }++++ SkPixmap pixmap;++ if (!image->peekPixels(&pixmap)) {++ fprintf(stderr, "Failed to peek pixels from SkImage\n");++ return;++ }++++ SkJpegEncoder::Options options;++ options.fQuality = 90;++ SkDynamicMemoryWStream stream;++ if (!SkJpegEncoder::Encode(&stream, pixmap, options)) {++ fprintf(stderr, "Failed to encode image to JPEG\n");++ return;++ }++ sk_sp<SkData> jpegData = stream.detachAsData();++ String result = base64EncodeToString(std::span(reinterpret_cast<const unsigned char*>(jpegData->data()), jpegData->size()));++ ++m_screencastFramesInFlight;++ m_frontendDispatcher->screencastFrame(result, displaySize.width(), displaySize.height());++ }++}++#endif+++#if USE(CAIRO)+void InspectorScreencastAgent::didPaint(cairo_surface_t* surface)+{@@ -12553,7 +12672,7 @@ index 0000000000000000000000000000000000000000..91cf94cd292350afb3e3ed071ca44760+ unsigned char *data = nullptr;+ size_t len = 0;+ cairo_image_surface_write_to_jpeg_mem(surface, &data, &len, m_screencastQuality);-+ String result = base64EncodeToString(data, len);++ String result = base64EncodeToString(std::span(data, len));+ ++m_screencastFramesInFlight;+ m_frontendDispatcher->screencastFrame(result, displaySize.width(), displaySize.height());+ }@@ -12642,7 +12761,7 @@ index 0000000000000000000000000000000000000000..91cf94cd292350afb3e3ed071ca44760+ scheduleFrameEncoding();+#endif+ }-+ m_page.forceRepaint([] { });++ m_page.updateRenderingWithForcedRepaint([] { });+}++#if !PLATFORM(WPE)@@ -12721,10 +12840,10 @@ index 0000000000000000000000000000000000000000..91cf94cd292350afb3e3ed071ca44760+} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.hnew file mode 100644-index 0000000000000000000000000000000000000000..d28dde452275f18739e3b1c8d709185c9bf0f40e+index 0000000000000000000000000000000000000000..72399da38336232f93776e8c6e8b342ad51711ba--- /dev/null+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h-@@ -0,0 +1,97 @@+@@ -0,0 +1,109 @@+/*+ * Copyright (C) 2020 Microsoft Corporation.+ *@@ -12772,6 +12891,15 @@ index 0000000000000000000000000000000000000000..d28dde452275f18739e3b1c8d709185c+}++namespace WebKit {++class InspectorScreencastAgent;++}++++namespace WTF {++template<typename T> struct IsDeprecatedWeakRefSmartPointerException;++template<> struct IsDeprecatedWeakRefSmartPointerException<WebKit::InspectorScreencastAgent> : std::true_type { };++}++++namespace WebKit {++class ScreencastEncoder;+class WebPageProxy;@@ -12786,6 +12914,9 @@ index 0000000000000000000000000000000000000000..d28dde452275f18739e3b1c8d709185c+ void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;+++#if USE(SKIA)++ void didPaint(sk_sp<SkImage>&& surface);++#endif+#if USE(CAIRO)+ void didPaint(cairo_surface_t*);+#endif@@ -12824,10 +12955,10 @@ index 0000000000000000000000000000000000000000..d28dde452275f18739e3b1c8d709185c+} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cppnew file mode 100644-index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12f0bca9c5+index 0000000000000000000000000000000000000000..026f5f7cbb9a81d83b9d4c307aecffe3f2fe93e6--- /dev/null+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp-@@ -0,0 +1,391 @@+@@ -0,0 +1,437 @@+/*+ * Copyright (c) 2010, The WebM Project authors. All rights reserved.+ * Copyright (c) 2013 The Chromium Authors. All rights reserved.@@ -12869,6 +13000,13 @@ index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12+#include <wtf/WorkQueue.h>+#include <wtf/text/StringConcatenateNumbers.h>+++#if USE(SKIA)++#include <skia/core/SkBitmap.h>++#include <skia/core/SkCanvas.h>++#include <skia/core/SkData.h>++#include <skia/core/SkImage.h>++#endif+++#if USE(CAIRO)+#include <WebCore/RefPtrCairo.h>+#endif@@ -12957,7 +13095,11 @@ index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12+ WTF_MAKE_NONCOPYABLE(VPXFrame);+ WTF_MAKE_FAST_ALLOCATED;+public:-+#if USE(CAIRO)++#if USE(SKIA)++ explicit VPXFrame(sk_sp<SkImage>&& surface)++ : m_surface(WTFMove(surface))++ { }++#elif USE(CAIRO)+ explicit VPXFrame(RefPtr<cairo_surface_t>&& surface)+ : m_surface(WTFMove(surface))+ { }@@ -12973,7 +13115,16 @@ index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12++ void convertToVpxImage(vpx_image_t* image)+ {-+#if USE(CAIRO)++#if USE(SKIA)++ // 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();++ size_t bufferSize = info.computeByteSize(argb_stride);++ UniqueArray<uint8_t> buffer = makeUniqueArray<uint8_t>(bufferSize);++ 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)+ // 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());@@ -12999,7 +13150,9 @@ index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12+ }++private:-+#if USE(CAIRO)++#if USE(SKIA)++ sk_sp<SkImage> m_surface;++#elif USE(CAIRO)+ RefPtr<cairo_surface_t> m_surface;+#elif PLATFORM(MAC)+ RetainPtr<CGImageRef> m_windowImage;@@ -13121,7 +13274,7 @@ index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12+ memset(&cfg, 0, sizeof(cfg));+ vpx_codec_err_t error = vpx_codec_enc_config_default(codec_interface, &cfg, 0);+ if (error) {-+ errorString = makeString("Failed to get default codec config: "_s, vpx_codec_err_to_string(error));++ errorString = makeString("Failed to get default codec config: "_s, span(vpx_codec_err_to_string(error)));+ return nullptr;+ }+@@ -13133,13 +13286,13 @@ index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12++ ScopedVpxCodec codec(new vpx_codec_ctx_t);+ if (vpx_codec_enc_init(codec.get(), codec_interface, &cfg, 0)) {-+ errorString = makeString("Failed to initialize encoder: "_s, vpx_codec_error(codec.get()));++ errorString = makeString("Failed to initialize encoder: "_s, span(vpx_codec_error(codec.get())));+ return nullptr;+ }++ FILE* file = fopen(filePath.utf8().data(), "wb");+ if (!file) {-+ errorString = makeString("Failed to open file '", filePath, "' for writing: ", strerror(errno));++ errorString = makeString("Failed to open file '"_s, filePath, "' for writing: "_s, span(strerror(errno)));+ return nullptr;+ }+@@ -13162,7 +13315,31 @@ index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12+ m_lastFrameTimestamp = now;+}+-+#if USE(CAIRO)++#if USE(SKIA)++void ScreencastEncoder::encodeFrame(sk_sp<SkImage>&& image, IntSize size)++{++ flushLastFrame();++ // Note that in WPE drawing area size is updated asynchronously and may differ from acutal++ // size of the surface.++ if (size.isZero()) {++ return;++ }++ SkBitmap surface;++ surface.allocPixels(SkImageInfo::Make(m_size.width(), m_size.height(), kBGRA_8888_SkColorType, kPremul_SkAlphaType));++ SkCanvas canvas(surface);++ SkMatrix transform;++ if (size.width() > m_size.width() || size.height() > m_size.height()) {++ // If no scale is specified shrink to fit the frame.++ double scale = std::min(static_cast<double>(m_size.width()) / size.width(),++ static_cast<double>(m_size.height()) / size.height());++ transform.setScale(scale, scale);++ canvas.setMatrix(transform);++ }++ // Record top left part of the drawing area that fits into the frame.++ canvas.drawImage(image, 0, 0);++ m_lastFrame = makeUnique<VPXFrame>(surface.asImage());++}++#elif USE(CAIRO)+void ScreencastEncoder::encodeFrame(cairo_surface_t* drawingAreaSurface, IntSize size)+{+ flushLastFrame();@@ -13221,10 +13398,10 @@ index 0000000000000000000000000000000000000000..90080e92c8278e73355c1fd4c571ea12+} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.hnew file mode 100644-index 0000000000000000000000000000000000000000..36df6131950ca95f74dc191628376fc589dbcb33+index 0000000000000000000000000000000000000000..987577f5d9c2bb21eec25bc0839cc3af7b84ce1e--- /dev/null+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.h-@@ -0,0 +1,80 @@+@@ -0,0 +1,82 @@+/*+ * Copyright (C) 2020 Microsoft Corporation.+ *@@ -13279,7 +13456,9 @@ index 0000000000000000000000000000000000000000..36df6131950ca95f74dc191628376fc5+ ScreencastEncoder(std::unique_ptr<VPXCodec>&&, WebCore::IntSize);+ ~ScreencastEncoder();+-+#if USE(CAIRO)++#if USE(SKIA)++ void encodeFrame(sk_sp<SkImage>&&, WebCore::IntSize);++#elif USE(CAIRO)+ void encodeFrame(cairo_surface_t*, WebCore::IntSize);+#elif PLATFORM(MAC)+ void encodeFrame(RetainPtr<CGImageRef>&&);@@ -13554,7 +13733,7 @@ index a2239cec8e18850f35f7f88a9c4ebadc62bf4023..79f3ff84327dc075ec96983e04db4b10} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp-index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..7294731b4ff75a0cec1dd010cc7facaf140b6a8a 100644+index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..916464f24c583edeacca19cc1955cea0654b9679 100644--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp@@ -26,13 +26,21 @@@@ -13743,10 +13922,19 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..7294731b4ff75a0cec1dd010cc7facafauto inspectedPage = protectedInspectedPage();inspectedPage->didChangeInspectorFrontendCount(m_frontendRouter->frontendCount());-@@ -160,6 +270,66 @@ void WebPageInspectorController::setIndicating(bool indicating)+@@ -160,6 +270,75 @@ void WebPageInspectorController::setIndicating(bool indicating)}#endif++#if USE(SKIA)++void WebPageInspectorController::didPaint(sk_sp<SkImage>&& surface)++{++ if (!m_frontendRouter->hasFrontends())++ return;++++ m_screecastAgent->didPaint(WTFMove(surface));++}++#endif+#if USE(CAIRO)+void WebPageInspectorController::didPaint(cairo_surface_t* surface)+{@@ -13810,7 +13998,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..7294731b4ff75a0cec1dd010cc7facafvoid WebPageInspectorController::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type){addTarget(InspectorTargetProxy::create(protectedInspectedPage(), targetId, type));-@@ -179,6 +349,32 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta+@@ -179,6 +358,32 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& tam_targetAgent->sendMessageFromTargetToFrontend(targetId, message);}@@ -13843,7 +14031,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..7294731b4ff75a0cec1dd010cc7facafbool WebPageInspectorController::shouldPauseLoading(const ProvisionalPageProxy& provisionalPage) const{if (!m_frontendRouter->hasFrontends())-@@ -198,7 +394,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag+@@ -198,7 +403,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPagvoid WebPageInspectorController::didCreateProvisionalPage(ProvisionalPageProxy& provisionalPage){@@ -13852,7 +14040,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..7294731b4ff75a0cec1dd010cc7facaf}void WebPageInspectorController::willDestroyProvisionalPage(const ProvisionalPageProxy& provisionalPage)-@@ -277,4 +473,27 @@ void WebPageInspectorController::browserExtensionsDisabled(HashSet<String>&& ext+@@ -277,4 +482,27 @@ void WebPageInspectorController::browserExtensionsDisabled(HashSet<String>&& extm_enabledBrowserAgent->extensionsDisabled(WTFMove(extensionIDs));}@@ -13881,7 +14069,7 @@ index 6d229b943fe69cd258b32b1e38c5716715a4cd4b..7294731b4ff75a0cec1dd010cc7facaf+} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h-index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..91473e6a0b4a37a15959f966fc75134c15e1112d 100644+index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..964fd0b69738771ec24e8da54bbe1aea583dfd90 100644--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h@@ -26,6 +26,7 @@@@ -13892,12 +14080,17 @@ index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..91473e6a0b4a37a15959f966fc75134c#include <JavaScriptCore/InspectorAgentRegistry.h>#include <JavaScriptCore/InspectorTargetAgent.h>#include <WebCore/PageIdentifier.h>-@@ -33,11 +34,28 @@+@@ -33,11 +34,33 @@#include <wtf/Forward.h>#include <wtf/Noncopyable.h>#include <wtf/text/WTFString.h>+#include <wtf/URL.h>+++#if USE(SKIA)++#include <skia/core/SkData.h>++#include <skia/core/SkImage.h>++#endif+++#if USE(CAIRO)+#include <cairo.h>+#endif@@ -13921,7 +14114,7 @@ index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..91473e6a0b4a37a15959f966fc75134c}namespace WebKit {-@@ -45,6 +63,23 @@ namespace WebKit {+@@ -45,6 +68,23 @@ namespace WebKit {class InspectorBrowserAgent;struct WebPageAgentContext;@@ -13945,7 +14138,7 @@ index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..91473e6a0b4a37a15959f966fc75134cclass WebPageInspectorController {WTF_MAKE_NONCOPYABLE(WebPageInspectorController);WTF_MAKE_FAST_ALLOCATED;-@@ -52,7 +87,21 @@ public:+@@ -52,7 +92,21 @@ public:WebPageInspectorController(WebPageProxy&);void init();@@ -13967,10 +14160,13 @@ index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..91473e6a0b4a37a15959f966fc75134cbool hasLocalFrontend() const;-@@ -65,11 +114,25 @@ public:+@@ -65,11 +119,28 @@ public:#if ENABLE(REMOTE_INSPECTOR)void setIndicating(bool);#endif++#if USE(SKIA)++ void didPaint(sk_sp<SkImage>&&);++#endif+#if USE(CAIRO)+ void didPaint(cairo_surface_t*);+#endif@@ -13993,7 +14189,7 @@ index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..91473e6a0b4a37a15959f966fc75134cbool shouldPauseLoading(const ProvisionalPageProxy&) const;void setContinueLoadingCallback(const ProvisionalPageProxy&, WTF::Function<void()>&&);-@@ -84,11 +147,12 @@ public:+@@ -84,11 +155,12 @@ public:void browserExtensionsDisabled(HashSet<String>&&);private:@@ -14007,7 +14203,7 @@ index c6aafe0e9339c8ac02dc133754ddc23e1cb522ff..91473e6a0b4a37a15959f966fc75134cRef<Inspector::FrontendRouter> m_frontendRouter;Ref<Inspector::BackendDispatcher> m_backendDispatcher;-@@ -97,11 +161,17 @@ private:+@@ -97,11 +169,17 @@ private:WeakRef<WebPageProxy> m_inspectedPage;Inspector::InspectorTargetAgent* m_targetAgent { nullptr };@@ -14258,10 +14454,10 @@ index 0000000000000000000000000000000000000000..d0e11ed81a6257c011df23d5870da740+} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cppnew file mode 100644-index 0000000000000000000000000000000000000000..a494ee1006f70d398149753f8953515d434cbcd4+index 0000000000000000000000000000000000000000..bb5dcfc6234db1b5100e4aa98d678370a4dad12d--- /dev/null+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp-@@ -0,0 +1,1019 @@+@@ -0,0 +1,1025 @@+/*+ * Copyright (C) 2019 Microsoft Corporation.+ *@@ -14444,13 +14640,13 @@ index 0000000000000000000000000000000000000000..a494ee1006f70d398149753f8953515d+static Ref<JSON::ArrayOf<String>> getEnabledWindowFeatures(const WebCore::WindowFeatures& features) {+ auto result = JSON::ArrayOf<String>::create();+ if (features.x)-+ result->addItem("left=" + String::number(*features.x));++ result->addItem("left="_s + String::number(*features.x));+ if (features.y)-+ result->addItem("top=" + String::number(*features.y));++ result->addItem("top="_s + String::number(*features.y));+ if (features.width)-+ result->addItem("width=" + String::number(*features.width));++ result->addItem("width="_s + String::number(*features.width));+ if (features.height)-+ result->addItem("height=" + String::number(*features.height));++ result->addItem("height="_s + String::number(*features.height));+ if (features.menuBarVisible)+ result->addItem("menubar"_s);+ if (features.toolBarVisible)@@ -14634,7 +14830,7 @@ index 0000000000000000000000000000000000000000..a494ee1006f70d398149753f8953515d+ if (!m_isEnabled)+ return;+-+ if (isInspectorProcessPool(page.process().processPool()))++ if (isInspectorProcessPool(page.legacyMainFrameProcess().processPool()))+ return;++ ASSERT(m_frontendChannel);@@ -14664,7 +14860,7 @@ index 0000000000000000000000000000000000000000..a494ee1006f70d398149753f8953515d+ if (!m_isEnabled)+ return;+-+ if (isInspectorProcessPool(page.process().processPool()))++ if (isInspectorProcessPool(page.legacyMainFrameProcess().processPool()))+ return;++ String browserContextID = toBrowserContextIDProtocolString(page.sessionID());@@ -15105,6 +15301,12 @@ index 0000000000000000000000000000000000000000..a494ee1006f70d398149753f8953515d+ cookie.sameSite = WebCore::Cookie::SameSitePolicy::Lax;+ if (sameSite == "Strict"_s)+ cookie.sameSite = WebCore::Cookie::SameSitePolicy::Strict;++#if USE(SOUP)++ } else {++ // Cookies are Lax by default in libsoup and will reject cookies with++ // sameSite: None and secure: false (defaults in WebCore::Cookie).++ cookie.sameSite = WebCore::Cookie::SameSitePolicy::Lax;++#endif+ }+ cookies.append(WTFMove(cookie));+ }@@ -15203,7 +15405,7 @@ index 0000000000000000000000000000000000000000..a494ee1006f70d398149753f8953515d+{+ if (!m_isEnabled)+ return;-+ String frameID = WebCore::InspectorPageAgent::makeFrameID(page->process().coreProcessIdentifier(), frameInfoData.frameID);++ String frameID = WebCore::InspectorPageAgent::makeFrameID(page->legacyMainFrameProcess().coreProcessIdentifier(), frameInfoData.frameID);+ m_downloads.set(uuid, download);+ m_frontendDispatcher->downloadCreated(+ toPageProxyIDProtocolString(*page),@@ -15283,10 +15485,10 @@ index 0000000000000000000000000000000000000000..a494ee1006f70d398149753f8953515d+#endif // ENABLE(REMOTE_INSPECTOR)diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.hnew file mode 100644-index 0000000000000000000000000000000000000000..36b7f12b5d9fce000715b42ee2980c20e0e91ef7+index 0000000000000000000000000000000000000000..1a63e17a88f13f7e315cdcbd5644919c3217be4a--- /dev/null+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.h-@@ -0,0 +1,130 @@+@@ -0,0 +1,139 @@+/*+ * Copyright (C) 2019 Microsoft Corporation.+ *@@ -15337,6 +15539,15 @@ index 0000000000000000000000000000000000000000..36b7f12b5d9fce000715b42ee2980c20+}++namespace WebKit {++class OverridenGeolocationProvider;++}++++namespace WTF {++template<typename T> struct IsDeprecatedWeakRefSmartPointerException;++template<> struct IsDeprecatedWeakRefSmartPointerException<WebKit::OverridenGeolocationProvider> : std::true_type { };++}++++namespace WebKit {++class WebFrameProxy;+@@ -15497,7 +15708,7 @@ index 0000000000000000000000000000000000000000..e7a3dcc533294bb6e12f65d79b5b716b++#endif // ENABLE(REMOTE_INSPECTOR)diff --git a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp-index 1a26781907e71c9cc3e99aff38d8060c4387abd7..b4e6e7edec5a716da63c74a6be5d08b6e1981f52 100644+index fac881d7c3d44758591d7a9f392a3992ce9f9a72..ad56113497f21d2916664ffe605489e939c736f4 100644--- a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp+++ b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp@@ -97,8 +97,11 @@ void ProcessLauncher::launchProcess()@@ -15514,7 +15725,7 @@ index 1a26781907e71c9cc3e99aff38d8060c4387abd7..b4e6e7edec5a716da63c74a6be5d08b6BOOL 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 3fe0abcfe36bef7ca45bed5661a737ed2bfe56d0..510656948af01ec65d4543c805e9667a307018fd 100644+index 4dbbd6c6206b214541217f6b49f4ba441855f8f9..6b4b3d7448a64e9b0519f37ce75e364deba62b6f 100644--- a/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp+++ b/Source/WebKit/UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp@@ -30,6 +30,7 @@@@ -15526,21 +15737,35 @@ index 3fe0abcfe36bef7ca45bed5661a737ed2bfe56d0..510656948af01ec65d4543c805e9667a#include "RemoteMediaSessionCoordinatorProxyMessages.h"#include "WebPageProxy.h"diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h-index 46f725b53f67ed41ff3312d106a23174d6a16363..369ee3539762a6286977d94a7958b25291f11ed6 100644+index b368e79479e84e95eebbaaea5e3d0e0dd4c70d62..1ad4b36568d33e7fd52dbabfa1ef6e5bbe6a8433 100644--- a/Source/WebKit/UIProcess/PageClient.h+++ b/Source/WebKit/UIProcess/PageClient.h-@@ -92,6 +92,10 @@ OBJC_CLASS WKView;+@@ -72,6 +72,11 @@+ #include <WebCore/PlatformTextAlternatives.h>+ #endif+++#if USE(SKIA)++#include <skia/core/SkData.h>++#include <skia/core/SkImage.h>++#endif+++ OBJC_CLASS AVPlayerViewController;+ OBJC_CLASS CALayer;+ OBJC_CLASS NSFileWrapper;+@@ -93,6 +98,12 @@ OBJC_CLASS WKView;#endif#endif+#if PLATFORM(GTK) || PLATFORM(WPE)++#if USE(CAIRO)+#include <WebCore/RefPtrCairo.h>+#endif++#endif+- namespace API {- class Attachment;- class HitTestResult;-@@ -347,7 +351,16 @@ public:+ namespace WebKit {+ class PageClient;+ }+@@ -357,7 +368,20 @@ public:virtual void selectionDidChange() = 0;#endif@@ -15549,7 +15774,11 @@ index 46f725b53f67ed41ff3312d106a23174d6a16363..369ee3539762a6286977d94a7958b252+#if PLATFORM(COCOA)+ virtual RetainPtr<CGImageRef> takeSnapshotForAutomation() = 0;+#elif PLATFORM(WPE)++#if USE(SKIA)++ virtual sk_sp<SkImage> takeViewSnapshot(std::optional<WebCore::IntRect>&&, bool nominalResolution = false) = 0;++#elif USE(CAIRO)+ virtual RefPtr<cairo_surface_t> takeViewSnapshot(std::optional<WebCore::IntRect>&&, bool nominalResolution = false) = 0;++#endif+#elif PLATFORM(GTK)+ virtual RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&, bool nominalResolution = false) = 0;+#endif@@ -15684,7 +15913,7 @@ index 0000000000000000000000000000000000000000..3c8fd0549f1847515d35092f0f49b060++#endif // ENABLE(FULLSCREEN_API)diff --git a/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp b/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp-index b2dc99d6ca28e7f1140122a259d9fbcf3b4eeabf..4f182cd32458d19b775f79deb1f6da22a4077ba6 100644+index 5fcfd69c72a7bf369d1c043e3cfd26cbfed7f023..92c638d01d397fc39f654caed5b6f87a8b6ead99 100644--- a/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp+++ b/Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp@@ -25,6 +25,7 @@@@ -15694,7 +15923,7 @@ index b2dc99d6ca28e7f1140122a259d9fbcf3b4eeabf..4f182cd32458d19b775f79deb1f6da22+#include "WebFrameProxy.h"#include "FrameProcess.h"- #include "VisitedLinkStore.h"+ #include "ProvisionalFrameCreationParameters.h"diff --git a/Source/WebKit/UIProcess/RemoteInspectorPipe.cpp b/Source/WebKit/UIProcess/RemoteInspectorPipe.cppnew file mode 100644index 0000000000000000000000000000000000000000..1a824be7d9fcb225d018b4a821fa895e844d7805@@ -16022,7 +16251,7 @@ index d499ee31f32b9dcdb456ba0b476d211fba115673..43b349887d18e21162b59fa8174df32cnamespace WebCore {class PlatformWheelEvent;diff --git a/Source/WebKit/UIProcess/RemotePageProxy.cpp b/Source/WebKit/UIProcess/RemotePageProxy.cpp-index 1db0914af03203844ccbda63b50f8486dc823586..3bf331ae9866aaea83e3bea6ca5bb196d4039110 100644+index b89ab7f35c6a3bfda89f1575b65d192f8237d1eb..d2bba95b349634674240c964511606e49cb11912 100644--- a/Source/WebKit/UIProcess/RemotePageProxy.cpp+++ b/Source/WebKit/UIProcess/RemotePageProxy.cpp@@ -43,6 +43,7 @@@@ -16034,10 +16263,10 @@ index 1db0914af03203844ccbda63b50f8486dc823586..3bf331ae9866aaea83e3bea6ca5bb196namespace WebKit {diff --git a/Source/WebKit/UIProcess/RemotePageProxy.h b/Source/WebKit/UIProcess/RemotePageProxy.h-index 5ecfa03204724d8e5696149dd45e4d35877993f0..fc8262fb617aef3eb68cf13117747dc48a7d843e 100644+index 34cd273d199470e42f3bfe152642d565b0d53485..53241e02fdbfb33d128ea4c7942a501b843c20fd 100644--- a/Source/WebKit/UIProcess/RemotePageProxy.h+++ b/Source/WebKit/UIProcess/RemotePageProxy.h-@@ -64,7 +64,6 @@ class WebProcessProxy;+@@ -73,7 +73,6 @@ class WebProcessProxy;struct FrameInfoData;struct FrameTreeCreationParameters;@@ -16046,7 +16275,7 @@ index 5ecfa03204724d8e5696149dd45e4d35877993f0..fc8262fb617aef3eb68cf13117747dc4class 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 4d8a16e02d2d3c1d11df5df2c84197da76539324..5de382d79c2dd8f7884eb27ef454ba0b99f3fab8 100644+index 777ab704b262e00208193dee7738e14d853b102a..12a66a3ff48565d6a5682207b94f39572545f786 100644--- a/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp+++ b/Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp@@ -37,6 +37,7 @@@@ -16058,7 +16287,7 @@ index 4d8a16e02d2d3c1d11df5df2c84197da76539324..5de382d79c2dd8f7884eb27ef454ba0b#define U2F_RELEASE_LOG(fmt, ...) RELEASE_LOG(WebAuthn, "%p [transport=%s] - U2fAuthenticator::" fmt, this, transportForDebugging().utf8().data(), ##__VA_ARGS__)diff --git a/Source/WebKit/UIProcess/WebContextMenuProxy.cpp b/Source/WebKit/UIProcess/WebContextMenuProxy.cpp-index d74ec9892f9a57bd7622ff5a4e16b67262165661..e884998f2a0823c32f33fe7a8499c7b4904a2fc0 100644+index 71fdc0b69e820af7f955482b42562e941eeac349..2a2d55e5a67aa7120193fd55913d3dbbbac62919 100644--- a/Source/WebKit/UIProcess/WebContextMenuProxy.cpp+++ b/Source/WebKit/UIProcess/WebContextMenuProxy.cpp@@ -33,6 +33,7 @@@@ -16070,7 +16299,7 @@ index d74ec9892f9a57bd7622ff5a4e16b67262165661..e884998f2a0823c32f33fe7a8499c7b4namespace WebKit {diff --git a/Source/WebKit/UIProcess/WebContextMenuProxy.h b/Source/WebKit/UIProcess/WebContextMenuProxy.h-index e7d6621532fcc73212cc9130a7cafbb13f458d1d..ec931c8f19d2a61c0fa7d78b52df7f3f94bdd2c5 100644+index e2ded3c65b9680346be2534a3e970e2f425a83a8..b0c006c1dcbfae4b33530f8eae04f9868cd4d8b9 100644--- a/Source/WebKit/UIProcess/WebContextMenuProxy.h+++ b/Source/WebKit/UIProcess/WebContextMenuProxy.h@@ -46,6 +46,7 @@ public:@@ -16082,7 +16311,7 @@ index e7d6621532fcc73212cc9130a7cafbb13f458d1d..ec931c8f19d2a61c0fa7d78b52df7f3fWebPageProxy* page() const { return m_page.get(); }diff --git a/Source/WebKit/UIProcess/WebFrameProxy.cpp b/Source/WebKit/UIProcess/WebFrameProxy.cpp-index 6e6560e17721ed182ab27277759488c410ae130e..207bda7e3c53118344536568ef18ccc043104ba1 100644+index 992ebbfcd3094576076084ef394dd4802c5dcc8e..2a1e09b4da5e67ba524f769e3de239b77043cf16 100644--- a/Source/WebKit/UIProcess/WebFrameProxy.cpp+++ b/Source/WebKit/UIProcess/WebFrameProxy.cpp@@ -31,6 +31,7 @@@@ -16093,7 +16322,7 @@ index 6e6560e17721ed182ab27277759488c410ae130e..207bda7e3c53118344536568ef18ccc0#include "FrameProcess.h"#include "FrameTreeCreationParameters.h"#include "FrameTreeNodeData.h"-@@ -43,6 +44,7 @@+@@ -42,6 +43,7 @@#include "RemotePageProxy.h"#include "WebFramePolicyListenerProxy.h"#include "WebNavigationState.h"@@ -16102,7 +16331,7 @@ index 6e6560e17721ed182ab27277759488c410ae130e..207bda7e3c53118344536568ef18ccc0#include "WebPageProxy.h"#include "WebPageProxyMessages.h"diff --git a/Source/WebKit/UIProcess/WebNavigationState.h b/Source/WebKit/UIProcess/WebNavigationState.h-index f68592e910d61293346fbc251afd9bcbd28cd3a5..2f92c407fa357031a1d054aa39a65a20cbe30751 100644+index 0968d688b613c7112dd243083b839242b95cb308..b05d1f71a641bfacc27965b2c78725575840b583 100644--- a/Source/WebKit/UIProcess/WebNavigationState.h+++ b/Source/WebKit/UIProcess/WebNavigationState.h@@ -29,6 +29,7 @@@@ -16111,9 +16340,9 @@ index f68592e910d61293346fbc251afd9bcbd28cd3a5..2f92c407fa357031a1d054aa39a65a20#include <wtf/WeakPtr.h>+#include "WebPageProxy.h"- namespace API {- class Navigation;-@@ -43,7 +44,6 @@ enum class FrameLoadType : uint8_t;+ namespace WebKit {+ class WebNavigationState;+@@ -52,7 +53,6 @@ enum class FrameLoadType : uint8_t;namespace WebKit {@@ -16123,10 +16352,10 @@ index f68592e910d61293346fbc251afd9bcbd28cd3a5..2f92c407fa357031a1d054aa39a65a20class WebNavigationState : public CanMakeWeakPtr<WebNavigationState> {diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cppnew file mode 100644-index 0000000000000000000000000000000000000000..fef34b5cf77742521c679a46f38111c1e198b9bf+index 0000000000000000000000000000000000000000..0eec34c12082631d2d07a7a2b96ed189bd52a518--- /dev/null+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp-@@ -0,0 +1,147 @@+@@ -0,0 +1,159 @@+/*+ * Copyright (C) 2019 Microsoft Corporation.+ *@@ -16266,6 +16495,18 @@ index 0000000000000000000000000000000000000000..fef34b5cf77742521c679a46f38111c1+ return { };+}+++Inspector::Protocol::ErrorStringOr<void> WebPageInspectorEmulationAgent::setOrientationOverride(std::optional<int>&& angle)++{++#if ENABLE(ORIENTATION_EVENTS)++ m_page.setOrientationOverride(WTFMove(angle));++ return { };++#else++ UNUSED_PARAM(angle);++ return makeUnexpected("Orientation events are disabled in this build"_s);++#endif++}+++++void WebPageInspectorEmulationAgent::didShowPage()+{+ for (auto& command : m_commandsToRunWhenShown)@@ -16276,10 +16517,10 @@ index 0000000000000000000000000000000000000000..fef34b5cf77742521c679a46f38111c1+} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.hnew file mode 100644-index 0000000000000000000000000000000000000000..12657f8e7c4b2596707680d299dc8084d48f03c2+index 0000000000000000000000000000000000000000..b70bfe0411571f4d181a7fae3186aaae7cd7b831--- /dev/null+++ b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.h-@@ -0,0 +1,75 @@+@@ -0,0 +1,76 @@+/*+ * Copyright (C) 2019 Microsoft Corporation.+ *@@ -16341,6 +16582,7 @@ index 0000000000000000000000000000000000000000..12657f8e7c4b2596707680d299dc8084+ Inspector::Protocol::ErrorStringOr<void> setActiveAndFocused(std::optional<bool>&&) override;+ Inspector::Protocol::ErrorStringOr<void> grantPermissions(const String& origin, Ref<JSON::Array>&& permissions) override;+ Inspector::Protocol::ErrorStringOr<void> resetPermissions() override;++ Inspector::Protocol::ErrorStringOr<void> setOrientationOverride(std::optional<int>&& angle) override;++ void didShowPage();+@@ -16357,7 +16599,7 @@ index 0000000000000000000000000000000000000000..12657f8e7c4b2596707680d299dc8084+} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cppnew file mode 100644-index 0000000000000000000000000000000000000000..f4519d0655e1e92e6d47a9e59cf01b0fd07ababf+index 0000000000000000000000000000000000000000..8e48dfabe2a520deec08b771cf6699b22e27c9da--- /dev/null+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp@@ -0,0 +1,334 @@@@ -16486,7 +16728,7 @@ index 0000000000000000000000000000000000000000..f4519d0655e1e92e6d47a9e59cf01b0f+static String keyIdentifierForKey(const String& key)+{+ if (key.length() == 1)-+ return makeString("U+", hex(toASCIIUpper(key.characterAt(0)), 4));++ return makeString("U+"_s, hex(toASCIIUpper(key.characterAt(0)), 4));+ if (key == "Delete"_s)+ return "U+007F"_s;+ if (key == "Backspace"_s)@@ -16788,10 +17030,10 @@ index 0000000000000000000000000000000000000000..3e87bf40ced2301f4fb145c6cb31f2cf++} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp-index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453d4592996 100644+index a9f735f67fb71479cce369e020529fe9dd5a1e67..58571b1025ac41d2349e64ba0ea58e0a4de493a3 100644--- a/Source/WebKit/UIProcess/WebPageProxy.cpp+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp-@@ -185,12 +185,14 @@+@@ -186,12 +186,14 @@#include <WebCore/AppHighlight.h>#include <WebCore/ArchiveError.h>#include <WebCore/BitmapImage.h>@@ -16806,7 +17048,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453#include <WebCore/DragController.h>#include <WebCore/DragData.h>#include <WebCore/ElementContext.h>-@@ -211,6 +213,7 @@+@@ -212,6 +214,7 @@#include <WebCore/ModalContainerTypes.h>#include <WebCore/NotImplemented.h>#include <WebCore/OrganizationStorageAccessPromptQuirk.h>@@ -16814,7 +17056,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453#include <WebCore/PerformanceLoggingClient.h>#include <WebCore/PermissionDescriptor.h>#include <WebCore/PermissionState.h>-@@ -218,11 +221,13 @@+@@ -219,12 +222,15 @@#include <WebCore/PublicSuffixStore.h>#include <WebCore/Quirks.h>#include <WebCore/RealtimeMediaSourceCenter.h>@@ -16826,9 +17068,11 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453#include <WebCore/RuntimeApplicationChecks.h>+#include <WebCore/SecurityOriginData.h>#include <WebCore/SerializedCryptoKeyWrap.h>++#include <WebCore/ScreenOrientationType.h>#include <WebCore/ShareData.h>#include <WebCore/SharedBuffer.h>-@@ -298,6 +303,9 @@+ #include <WebCore/ShouldTreatAsContinuingLoad.h>+@@ -299,6 +305,9 @@#include "AcceleratedBackingStoreDMABuf.h"#endif#include "GtkSettingsManager.h"@@ -16838,7 +17082,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453#include <WebCore/SelectionData.h>#endif-@@ -419,6 +427,8 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms;+@@ -421,6 +430,8 @@ static constexpr Seconds tryCloseTimeoutDelay = 50_ms;static constexpr Seconds audibleActivityClearDelay = 10_s;#endif@@ -16847,7 +17091,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageProxyCounter, ("WebPageProxy"));#if PLATFORM(COCOA)-@@ -823,6 +833,10 @@ WebPageProxy::~WebPageProxy()+@@ -826,6 +837,10 @@ WebPageProxy::~WebPageProxy()if (preferences->mediaSessionCoordinatorEnabled())GroupActivitiesSessionNotifier::sharedNotifier().removeWebPage(*this);#endif@@ -16858,7 +17102,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453}void WebPageProxy::addAllMessageReceivers()-@@ -1361,6 +1375,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)+@@ -1364,6 +1379,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)protectedPageClient()->didRelaunchProcess();internals().pageLoadState.didSwapWebProcesses();@@ -16866,7 +17110,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453}void WebPageProxy::didAttachToRunningProcess()-@@ -1369,7 +1384,7 @@ void WebPageProxy::didAttachToRunningProcess()+@@ -1372,7 +1388,7 @@ void WebPageProxy::didAttachToRunningProcess()#if ENABLE(FULLSCREEN_API)ASSERT(!m_fullScreenManager);@@ -16875,8 +17119,8 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453#endif#if ENABLE(VIDEO_PRESENTATION_MODE)ASSERT(!m_playbackSessionManager);-@@ -1764,6 +1779,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()- return m_process;+@@ -1767,6 +1783,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()+ return m_legacyMainFrameProcess;}+RefPtr<API::Navigation> WebPageProxy::loadRequestForInspector(WebCore::ResourceRequest&& request, WebFrameProxy* frame)@@ -16884,20 +17128,20 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453+ if (!frame || frame == mainFrame())+ return loadRequest(WTFMove(request), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow);+-+ auto navigation = m_navigationState->createLoadRequestNavigation(process().coreProcessIdentifier(), ResourceRequest(request), m_backForwardList->currentItem());++ auto navigation = m_navigationState->createLoadRequestNavigation(legacyMainFrameProcess().coreProcessIdentifier(), ResourceRequest(request), m_backForwardList->currentItem());+ LoadParameters loadParameters;+ loadParameters.navigationID = navigation->navigationID();+ loadParameters.request = WTFMove(request);+ loadParameters.shouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow;+ loadParameters.shouldTreatAsContinuingLoad = ShouldTreatAsContinuingLoad::No;-+ m_process->send(Messages::WebPage::LoadRequestInFrameForInspector(WTFMove(loadParameters), frame->frameID()), internals().webPageID);++ 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)-@@ -2336,6 +2366,42 @@ void WebPageProxy::setControlledByAutomation(bool controlled)+@@ -2365,6 +2396,61 @@ void WebPageProxy::setControlledByAutomation(bool controlled)websiteDataStore().protectedNetworkProcess()->send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0);}@@ -16912,6 +17156,25 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453+ m_permissionsForAutomation = permissions;+}+++static inline WebCore::ScreenOrientationType toScreenOrientationType(int angle)++{++ if (angle == -90)++ return WebCore::ScreenOrientationType::LandscapeSecondary;++ if (angle == 180)++ return WebCore::ScreenOrientationType::PortraitSecondary;++ if (angle == 90)++ return WebCore::ScreenOrientationType::LandscapePrimary;++ return WebCore::ScreenOrientationType::PortraitPrimary;++}++++void WebPageProxy::setOrientationOverride(std::optional<int>&& angle)++{++ auto deviceOrientation = toScreenOrientationType(angle.value_or(0));++ if (m_screenOrientationManager)++ m_screenOrientationManager->setCurrentOrientation(deviceOrientation);++ legacyMainFrameProcess().send(Messages::WebPage::SetDeviceOrientation(angle.value_or(0)), webPageID());++}+++std::optional<bool> WebPageProxy::permissionForAutomation(const String& origin, const String& permission) const+{+ auto permissions = m_permissionsForAutomation.find(origin);@@ -16939,8 +17202,8 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453+void WebPageProxy::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type){- MESSAGE_CHECK(m_process, !targetId.isEmpty());-@@ -2577,6 +2643,24 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState> flagsToUpdate)+ MESSAGE_CHECK(m_legacyMainFrameProcess, !targetId.isEmpty());+@@ -2606,6 +2692,24 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState> flagsToUpdate)bool wasVisible = isViewVisible();Ref pageClient = this->pageClient();internals().activityState.remove(flagsToUpdate);@@ -16965,7 +17228,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453if (flagsToUpdate & ActivityState::IsFocused && pageClient->isViewFocused())internals().activityState.add(ActivityState::IsFocused);if (flagsToUpdate & ActivityState::WindowIsActive && pageClient->isViewWindowActive())-@@ -3302,7 +3386,7 @@ void WebPageProxy::performDragOperation(DragData& dragData, const String& dragSt+@@ -3348,7 +3452,7 @@ void WebPageProxy::performDragOperation(DragData& dragData, const String& dragStgrantAccessToCurrentPasteboardData(dragStorageName);#endif@@ -16974,7 +17237,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453performDragControllerAction(DragControllerAction::PerformDragOperation, dragData);#elseif (!hasRunningProcess())-@@ -3319,6 +3403,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag+@@ -3365,6 +3469,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Dragif (!hasRunningProcess())return;@@ -16983,8 +17246,8 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453auto 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);-@@ -3335,6 +3421,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag- protectedProcess()->assumeReadAccessToBaseURL(*this, url);+@@ -3381,6 +3487,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag+ protectedLegacyMainFrameProcess()->assumeReadAccessToBaseURL(*this, url);ASSERT(dragData.platformData());+#endif@@ -16992,7 +17255,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453sendWithAsyncReply(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags()), WTFMove(completionHandler));#elsesendToProcessContainingFrame(frameID, Messages::WebPage::PerformDragControllerAction(frameID, action, dragData), WTFMove(completionHandler));-@@ -3350,14 +3438,34 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe+@@ -3396,14 +3504,34 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpeinternals().currentDragCaretEditableElementRect = editableElementRect;setDragCaretRect(insertionRect);protectedPageClient()->didPerformDragControllerAction();@@ -17030,7 +17293,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453didStartDrag();}#endif-@@ -3378,6 +3486,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo+@@ -3424,6 +3552,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glosetDragCaretRect({ });}@@ -17055,7 +17318,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453void WebPageProxy::didStartDrag(){if (!hasRunningProcess())-@@ -3385,6 +3511,16 @@ void WebPageProxy::didStartDrag()+@@ -3431,6 +3577,16 @@ void WebPageProxy::didStartDrag()discardQueuedMouseEvents();send(Messages::WebPage::DidStartDrag());@@ -17072,7 +17335,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453}void WebPageProxy::dragCancelled()-@@ -3540,16 +3676,37 @@ void WebPageProxy::processNextQueuedMouseEvent()+@@ -3590,16 +3746,37 @@ void WebPageProxy::processNextQueuedMouseEvent()process->startResponsivenessTimer();}@@ -17116,16 +17379,16 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453}void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function<void ()>&& action)-@@ -3715,6 +3872,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled)+@@ -3770,6 +3947,8 @@ void WebPageProxy::wheelEventHandlingCompleted(bool wasHandled)- if (RefPtr automationSession = process().processPool().automationSession())+ if (RefPtr automationSession = configuration().processPool().automationSession())automationSession->wheelEventsFlushedForPage(*this);++ m_inspectorController->didProcessAllPendingWheelEvents();}void WebPageProxy::cacheWheelEventScrollingAccelerationCurve(const NativeWebWheelEvent& nativeWheelEvent)-@@ -3863,7 +4022,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)+@@ -3919,7 +4098,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent){@@ -17134,7 +17397,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453for (auto& touchPoint : touchStartEvent.touchPoints()) {auto location = touchPoint.location();auto update = [this, location](TrackingType& trackingType, EventTrackingRegions::EventType eventType) {-@@ -4460,6 +4619,7 @@ void WebPageProxy::receivedNavigationActionPolicyDecision(WebProcessProxy& proce+@@ -4529,6 +4708,7 @@ void WebPageProxy::receivedNavigationActionPolicyDecision(WebProcessProxy& procevoid 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){@@ -17142,7 +17405,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453if (!hasRunningProcess())return completionHandler(PolicyDecision { });-@@ -5382,6 +5542,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)+@@ -5460,6 +5640,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)m_pageScaleFactor = scaleFactor;}@@ -17153,8 +17416,8 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453+void WebPageProxy::pluginScaleFactorDidChange(double pluginScaleFactor){- MESSAGE_CHECK(m_process, scaleFactorIsValid(pluginScaleFactor));-@@ -5935,6 +6100,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref<WebProcessProxy>&& process, ui+ MESSAGE_CHECK(m_legacyMainFrameProcess, scaleFactorIsValid(pluginScaleFactor));+@@ -6015,6 +6200,7 @@ void WebPageProxy::didDestroyNavigationShared(Ref<WebProcessProxy>&& process, uiRef protectedPageClient { pageClient() };m_navigationState->didDestroyNavigation(process->coreProcessIdentifier(), navigationID);@@ -17162,7 +17425,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453}void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)-@@ -6189,6 +6355,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p+@@ -6282,6 +6468,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& pm_failingProvisionalLoadURL = { };@@ -17171,23 +17434,23 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453// 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;-@@ -6834,7 +7002,14 @@ void WebPageProxy::beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListen+@@ -6942,7 +7130,14 @@ void WebPageProxy::beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListenvoid WebPageProxy::decidePolicyForNavigationActionAsync(NavigationActionData&& data, CompletionHandler<void(PolicyDecision&&)>&& completionHandler){-- decidePolicyForNavigationActionAsyncShared(protectedProcess(), WTFMove(data), WTFMove(completionHandler));+- decidePolicyForNavigationActionAsyncShared(protectedLegacyMainFrameProcess(), WTFMove(data), WTFMove(completionHandler));+ if (m_inspectorController->shouldPauseLoading()) {-+ decidePolicyForNavigationActionAsyncShared(protectedProcess(), WTFMove(data), WTFMove(completionHandler));++ decidePolicyForNavigationActionAsyncShared(protectedLegacyMainFrameProcess(), WTFMove(data), WTFMove(completionHandler));+ m_inspectorController->setContinueLoadingCallback([this, protectedThis = Ref { *this }, data = WTFMove(data), completionHandler = WTFMove(completionHandler)] () mutable {-+ decidePolicyForNavigationActionAsyncShared(protectedProcess(), WTFMove(data), WTFMove(completionHandler));++ decidePolicyForNavigationActionAsyncShared(protectedLegacyMainFrameProcess(), WTFMove(data), WTFMove(completionHandler));+ });+ } else {-+ decidePolicyForNavigationActionAsyncShared(protectedProcess(), WTFMove(data), WTFMove(completionHandler));++ decidePolicyForNavigationActionAsyncShared(protectedLegacyMainFrameProcess(), WTFMove(data), WTFMove(completionHandler));+ }}void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&& process, NavigationActionData&& data, CompletionHandler<void(PolicyDecision&&)>&& completionHandler)-@@ -7474,6 +7649,7 @@ void WebPageProxy::createNewPage(WindowFeatures&& windowFeatures, NavigationActi+@@ -7618,6 +7813,7 @@ void WebPageProxy::createNewPage(WindowFeatures&& windowFeatures, NavigationActiif (RefPtr page = originatingFrameInfo->page())openerAppInitiatedState = page->lastNavigationWasAppInitiated();@@ -17195,7 +17458,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453auto completionHandler = [this,protectedThis = Ref { *this },-@@ -7540,6 +7716,7 @@ void WebPageProxy::createNewPage(WindowFeatures&& windowFeatures, NavigationActi+@@ -7690,6 +7886,7 @@ void WebPageProxy::createNewPage(WindowFeatures&& windowFeatures, NavigationActivoid WebPageProxy::showPage(){m_uiClient->showPage(this);@@ -17203,7 +17466,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453}bool WebPageProxy::hasOpenedPage() const-@@ -7621,6 +7798,10 @@ void WebPageProxy::closePage()+@@ -7776,6 +7973,10 @@ void WebPageProxy::closePage()if (isClosed())return;@@ -17214,7 +17477,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:");protectedPageClient()->clearAllEditCommands();m_uiClient->close(this);-@@ -7657,6 +7838,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f+@@ -7812,6 +8013,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f}runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {@@ -17223,8 +17486,8 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453page.m_uiClient->runJavaScriptAlert(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)]() mutable {reply();completion();-@@ -7678,6 +7861,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&- if (RefPtr automationSession = process().processPool().automationSession())+@@ -7833,6 +8036,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&+ if (RefPtr automationSession = configuration().processPool().automationSession())automationSession->willShowJavaScriptDialog(*this);}+ if (m_inspectorDialogAgent)@@ -17232,8 +17495,8 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453runModalJavaScriptDialog(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 {-@@ -7701,6 +7886,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&- if (RefPtr automationSession = process().processPool().automationSession())+@@ -7856,6 +8061,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&+ if (RefPtr automationSession = configuration().processPool().automationSession())automationSession->willShowJavaScriptDialog(*this);}+ if (m_inspectorDialogAgent)@@ -17241,7 +17504,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453runModalJavaScriptDialog(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 {-@@ -7817,6 +8004,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf+@@ -7972,6 +8179,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInfreturn;}}@@ -17249,8 +17512,8 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453+ m_inspectorDialogAgent->javascriptDialogOpening("beforeunload"_s, message);// Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer.- protectedProcess()->stopResponsivenessTimer();-@@ -8307,6 +8496,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo,+ protectedLegacyMainFrameProcess()->stopResponsivenessTimer();+@@ -8464,6 +8673,11 @@ void WebPageProxy::resourceLoadDidCompleteWithError(ResourceLoadInfo&& loadInfo,}#if ENABLE(FULLSCREEN_API)@@ -17262,9 +17525,9 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453WebFullScreenManagerProxy* WebPageProxy::fullScreenManager(){return m_fullScreenManager.get();-@@ -8383,6 +8577,17 @@ void WebPageProxy::requestDOMPasteAccess(WebCore::DOMPasteAccessCategory pasteAc- {- MESSAGE_CHECK_COMPLETION(m_process, !originIdentifier.isEmpty(), completionHandler(DOMPasteAccessResponse::DeniedForGesture));+@@ -8564,6 +8778,17 @@ void WebPageProxy::requestDOMPasteAccess(DOMPasteAccessCategory pasteAccessCateg+ }+ }+ if (isControlledByAutomation()) {+ DOMPasteAccessResponse response = DOMPasteAccessResponse::DeniedForGesture;@@ -17280,8 +17543,8 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453m_pageClient->requestDOMPasteAccess(pasteAccessCategory, elementRect, originIdentifier, WTFMove(completionHandler));}-@@ -9232,6 +9437,8 @@ void WebPageProxy::mouseEventHandlingCompleted(std::optional<WebEventType> event- if (RefPtr automationSession = process().processPool().automationSession())+@@ -9424,6 +9649,8 @@ void WebPageProxy::mouseEventHandlingCompleted(std::optional<WebEventType> event+ if (RefPtr automationSession = configuration().processPool().automationSession())automationSession->mouseEventsFlushedForPage(*this);didFinishProcessingAllPendingMouseEvents();+ if (m_dragEventsQueued == 0)@@ -17289,15 +17552,15 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453}}-@@ -9266,6 +9473,7 @@ void WebPageProxy::keyEventHandlingCompleted(std::optional<WebEventType> eventTy+@@ -9458,6 +9685,7 @@ void WebPageProxy::keyEventHandlingCompleted(std::optional<WebEventType> eventTyif (!canProcessMoreKeyEvents) {- if (RefPtr automationSession = process().processPool().automationSession())+ if (RefPtr automationSession = configuration().processPool().automationSession())automationSession->keyboardEventsFlushedForPage(*this);+ m_inspectorController->didProcessAllPendingKeyboardEvents();}}-@@ -9671,7 +9879,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)+@@ -9863,7 +10091,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason){WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%" PUBLIC_LOG_STRING, processTerminationReasonToString(reason).characters());@@ -17309,15 +17572,15 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453if (m_loaderClient)handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this);else-@@ -10041,6 +10252,7 @@ bool WebPageProxy::useGPUProcessForDOMRenderingEnabled() const+@@ -10237,6 +10468,7 @@ bool WebPageProxy::useGPUProcessForDOMRenderingEnabled() const- WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea, std::optional<SubframeProcessPageParameters>&& subframeProcessPageParameters, bool isProcessSwap, RefPtr<API::WebsitePolicies>&& websitePolicies, std::optional<WebCore::FrameIdentifier>&& mainFrameIdentifier, std::optional<float> topContentInset)+ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea, std::optional<RemotePageParameters>&& remotePageParameters, bool isProcessSwap, RefPtr<API::WebsitePolicies>&& websitePolicies, std::optional<WebCore::FrameIdentifier>&& mainFrameIdentifier){+WebPageCreationParameters parameters;parameters.processDisplayName = configuration().processDisplayName();-@@ -10267,6 +10479,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc+@@ -10461,6 +10693,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& procparameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false;@@ -17326,9 +17589,9 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453#if PLATFORM(IOS) || PLATFORM(VISION)// FIXME: This is also being passed over the to WebProcess via the PreferencesStore.parameters.allowsDeprecatedSynchronousXMLHttpRequestDuringUnload = allowsDeprecatedSynchronousXMLHttpRequestDuringUnload();-@@ -10373,8 +10587,42 @@ void WebPageProxy::gamepadActivity(const Vector<std::optional<GamepadData>>& gam+@@ -10590,8 +10824,42 @@ void WebPageProxy::gamepadsRecentlyAccessed()- #endif+ #endif // ENABLE(GAMEPAD)+bool WebPageProxy::shouldSendAutomationCredentialsForProtectionSpace(const WebProtectionSpace& protectionSpace)+{@@ -17369,7 +17632,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) {m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = Ref { *this }, authenticationChallenge] (bool shouldAllowLegacyTLS) {if (shouldAllowLegacyTLS)-@@ -10469,6 +10717,12 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge+@@ -10686,6 +10954,12 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier gerequest->deny();};@@ -17382,7 +17645,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453// 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-@@ -10531,6 +10785,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi+@@ -10748,6 +11022,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const PermishouldChangeDeniedToPrompt = false;if (sessionID().isEphemeral()) {@@ -17395,7 +17658,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453completionHandler(shouldChangeDeniedToPrompt ? PermissionState::Prompt : PermissionState::Denied);return;}-@@ -10545,6 +10805,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permi+@@ -10762,6 +11042,12 @@ void WebPageProxy::queryPermission(const ClientOrigin& clientOrigin, const Permireturn;}@@ -17409,7 +17672,7 @@ index 365c5e2c7925347531f2e488d720973612f25d39..585c51dd017a628f08d443c863fd1453completionHandler(shouldChangeDeniedToPrompt ? PermissionState::Prompt : PermissionState::Denied);return;diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h-index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8f0aa3a6c 100644+index c2ee994879f2f26a8ccbfccb330acdbc85b42898..7d5c35038d16bfaabbe55905b8fb870731bbb871 100644--- a/Source/WebKit/UIProcess/WebPageProxy.h+++ b/Source/WebKit/UIProcess/WebPageProxy.h@@ -26,6 +26,7 @@@@ -17417,10 +17680,10 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8#include "APIObject.h"+#include "APIWebsitePolicies.h"+ #include "IdentifierTypes.h"#include "MessageReceiver.h"#include "MessageSender.h"- #include <WebCore/FrameIdentifier.h>-@@ -36,6 +37,24 @@+@@ -39,6 +40,20 @@#include <wtf/ProcessID.h>#include <wtf/UniqueRef.h>#include <wtf/WeakHashSet.h>@@ -17435,17 +17698,13 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8++OBJC_CLASS NSPasteboard;+-+#if PLATFORM(WPE)-+#include "ArgumentCodersWPE.h"-+#endif-++#if PLATFORM(GTK) || PLATFORM(WPE)+#include <WebCore/SelectionData.h>+#endif#if USE(DICTATION_ALTERNATIVES)#include <WebCore/PlatformTextAlternatives.h>-@@ -106,6 +125,7 @@ class DestinationColorSpace;+@@ -110,6 +125,7 @@ class DestinationColorSpace;class DragData;class FloatPoint;class FloatQuad;@@ -17453,7 +17712,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8class FloatRect;class FloatSize;class FontAttributeChanges;-@@ -421,6 +441,7 @@ class WebExtensionController;+@@ -426,6 +442,7 @@ class WebExtensionController;class WebFramePolicyListenerProxy;class WebFrameProxy;class WebFullScreenManagerProxy;@@ -17461,7 +17720,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8class WebInspectorUIProxy;class WebKeyboardEvent;class WebMouseEvent;-@@ -649,6 +670,8 @@ public:+@@ -661,6 +678,8 @@ public:void setControlledByAutomation(bool);WebPageInspectorController& inspectorController() { return *m_inspectorController; }@@ -17470,7 +17729,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8#if PLATFORM(IOS_FAMILY)void showInspectorIndication();-@@ -682,6 +705,7 @@ public:+@@ -694,6 +713,7 @@ public:bool hasSleepDisabler() const;#if ENABLE(FULLSCREEN_API)@@ -17478,19 +17737,20 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8WebFullScreenManagerProxy* fullScreenManager();API::FullscreenClient& fullscreenClient() const { return *m_fullscreenClient; }-@@ -770,6 +794,11 @@ public:+@@ -782,6 +802,12 @@ public:void setPageLoadStateObserver(std::unique_ptr<PageLoadStateObserverBase>&&);+ void setAuthCredentialsForAutomation(std::optional<WebCore::Credential>&&, std::optional<URL>&&);+ void setPermissionsForAutomation(const HashMap<String, HashSet<String>>&);++ void setOrientationOverride(std::optional<int>&& angle);+ void setActiveForAutomation(std::optional<bool> active);+ void logToStderr(const String& str);+void initializeWebPage();void setDrawingArea(std::unique_ptr<DrawingAreaProxy>&&);-@@ -796,6 +825,7 @@ public:+@@ -808,6 +834,7 @@ public:void addPlatformLoadParameters(WebProcessProxy&, LoadParameters&);RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&);RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object* userData = nullptr);@@ -17498,7 +17758,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8RefPtr<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);-@@ -862,6 +892,7 @@ public:+@@ -874,6 +901,7 @@ public:PageClient& pageClient() const;Ref<PageClient> protectedPageClient() const;@@ -17506,7 +17766,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8void setViewNeedsDisplay(const WebCore::Region&);void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, WebCore::ScrollIsAnimated);-@@ -1389,6 +1420,7 @@ public:+@@ -1400,6 +1428,7 @@ public:#endifvoid pageScaleFactorDidChange(double);@@ -17514,7 +17774,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8void pluginScaleFactorDidChange(double);void pluginZoomFactorDidChange(double);-@@ -1473,14 +1505,20 @@ public:+@@ -1484,14 +1513,20 @@ public:void didStartDrag();void dragCancelled();void setDragCaretRect(const WebCore::IntRect&);@@ -17536,7 +17796,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8#endifvoid processDidBecomeUnresponsive();-@@ -1713,6 +1751,7 @@ public:+@@ -1724,6 +1759,7 @@ public:void setViewportSizeForCSSViewportUnits(const WebCore::FloatSize&);WebCore::FloatSize viewportSizeForCSSViewportUnits() const;@@ -17544,7 +17804,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8void didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&&, NegotiatedLegacyTLS);void negotiatedLegacyTLS();void didNegotiateModernTLS(const URL&);-@@ -1747,6 +1786,8 @@ public:+@@ -1758,6 +1794,8 @@ public:#if PLATFORM(COCOA) || PLATFORM(GTK)RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&);@@ -17553,7 +17813,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8#endifvoid wrapCryptoKey(const Vector<uint8_t>&, CompletionHandler<void(std::optional<Vector<uint8_t>>&&)>&&);-@@ -2639,6 +2680,7 @@ private:+@@ -2666,6 +2704,7 @@ private:RefPtr<API::Navigation> launchProcessForReload();void requestNotificationPermission(const String& originString, CompletionHandler<void(bool allowed)>&&);@@ -17561,7 +17821,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8void didChangeContentSize(const WebCore::IntSize&);void didChangeIntrinsicContentSize(const WebCore::IntSize&);-@@ -3145,8 +3187,10 @@ private:+@@ -3178,8 +3217,10 @@ private:String m_overrideContentSecurityPolicy;RefPtr<WebInspectorUIProxy> m_inspector;@@ -17572,7 +17832,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8std::unique_ptr<WebFullScreenManagerProxy> m_fullScreenManager;std::unique_ptr<API::FullscreenClient> m_fullscreenClient;#endif-@@ -3336,6 +3380,22 @@ private:+@@ -3371,6 +3412,22 @@ private:std::optional<WebCore::DragOperation> m_currentDragOperation;bool m_currentDragIsOverFileInput { false };unsigned m_currentDragNumberOfFilesToBeAccepted { 0 };@@ -17595,7 +17855,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8#endifbool m_mainFrameHasHorizontalScrollbar { false };-@@ -3507,6 +3567,10 @@ private:+@@ -3542,6 +3599,10 @@ private:RefPtr<API::Object> messageBody;};Vector<InjectedBundleMessage> m_pendingInjectedBundleMessages;@@ -17607,7 +17867,7 @@ index 2e40bbb43a05c10eee30296c5a7febdcdb74c157..4deb131a7c531d9035833f22062cf9e8#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 3907e52e0136c24b8cdc24cb6e178b201e3e482a..03ef59a3032b12f91dcdd4a1160c7c8ef12cc0e3 100644+index cf1a795016100a37361cad1902723c11c571fdba..2462eb77a81b5a904e1ed9bf06927f839bc6f391 100644--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in@@ -29,6 +29,7 @@ messages -> WebPageProxy {@@ -17626,7 +17886,7 @@ index 3907e52e0136c24b8cdc24cb6e178b201e3e482a..03ef59a3032b12f91dcdd4a1160c7c8ePluginScaleFactorDidChange(double zoomFactor)PluginZoomFactorDidChange(double zoomFactor)-@@ -309,10 +311,14 @@ messages -> WebPageProxy {+@@ -310,10 +312,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@@ -17658,10 +17918,10 @@ index c909cd634d6acd72695de8372866691269ad6a04..ff5b37e3b4a17eab4bd3f8e9a2a6ef84}diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp-index f997e69f867ecaa6ec60a94a21ac89d51de413a4..78008ea36f1d08948c671fdfeeef08b30c7fc7fa 100644+index 3a3655d43728126604dc246de49ba7c9210038b2..6d2552c13caadb09a5c8fed13e6034a087465ddb 100644--- a/Source/WebKit/UIProcess/WebProcessPool.cpp+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp-@@ -430,10 +430,10 @@ void WebProcessPool::setAutomationClient(std::unique_ptr<API::AutomationClient>&+@@ -426,10 +426,10 @@ void WebProcessPool::setAutomationClient(std::unique_ptr<API::AutomationClient>&void WebProcessPool::setOverrideLanguages(Vector<String>&& languages){@@ -17674,7 +17934,7 @@ index f997e69f867ecaa6ec60a94a21ac89d51de413a4..78008ea36f1d08948c671fdfeeef08b3#if ENABLE(GPU_PROCESS)if (RefPtr gpuProcess = GPUProcessProxy::singletonIfCreated())-@@ -441,9 +441,10 @@ void WebProcessPool::setOverrideLanguages(Vector<String>&& languages)+@@ -437,9 +437,10 @@ void WebProcessPool::setOverrideLanguages(Vector<String>&& languages)#endif#if USE(SOUP)for (Ref networkProcess : NetworkProcessProxy::allNetworkProcesses())@@ -17686,7 +17946,7 @@ index f997e69f867ecaa6ec60a94a21ac89d51de413a4..78008ea36f1d08948c671fdfeeef08b3void WebProcessPool::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled){-@@ -936,7 +937,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa+@@ -925,7 +926,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa#endifparameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel();@@ -17696,7 +17956,7 @@ index f997e69f867ecaa6ec60a94a21ac89d51de413a4..78008ea36f1d08948c671fdfeeef08b3parameters.urlSchemesRegisteredAsEmptyDocument = copyToVector(m_schemesToRegisterAsEmptyDocument);diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp-index b8305771145ecb6b92e28de1bcb370dc8ccbba0d..d3b591bc81ccd07367223270c545056fbdb51f49 100644+index bec37fb35fb6e2077f6ad3a73d06b1b7d105ffc4..a5764d995f015b7f343303b4896c44abd38e024d 100644--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp@@ -188,6 +188,11 @@ Vector<Ref<WebProcessProxy>> WebProcessProxy::allProcesses()@@ -17711,7 +17971,7 @@ index b8305771145ecb6b92e28de1bcb370dc8ccbba0d..d3b591bc81ccd07367223270c545056fRefPtr<WebProcessProxy> WebProcessProxy::processForIdentifier(ProcessIdentifier identifier){return allProcessMap().get(identifier);-@@ -555,6 +560,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt+@@ -561,6 +566,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptif (WebKit::isInspectorProcessPool(processPool()))launchOptions.extraInitializationData.add<HashTranslatorASCIILiteral>("inspector-process"_s, "1"_s);@@ -17739,19 +17999,19 @@ index b8305771145ecb6b92e28de1bcb370dc8ccbba0d..d3b591bc81ccd07367223270c545056fif (isPrewarmed())diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h-index 92ebcbaf5abecd997e8bfd3cb5cb41b02191b7c5..bec4da91324e832f1dd027ad9e064a3336b3e047 100644+index d154105bcabd3fe11657b484712aee58deb2d450..111e6b272fc3b1700b82bf3df98c5e501126daeb 100644--- a/Source/WebKit/UIProcess/WebProcessProxy.h+++ b/Source/WebKit/UIProcess/WebProcessProxy.h-@@ -166,6 +166,7 @@ public:+@@ -175,6 +175,7 @@ public:static void forWebPagesWithOrigin(PAL::SessionID, const WebCore::SecurityOriginData&, const Function<void(WebPageProxy&)>&);static Vector<std::pair<WebCore::ProcessIdentifier, WebCore::RegistrableDomain>> allowedFirstPartiesForCookies();+ static Vector<Ref<WebProcessProxy>> allProcessesForInspector();- WebConnection* webConnection() const { return m_webConnection.get(); }- RefPtr<WebConnection> protectedWebConnection() const { return m_webConnection; }+ void initializeWebProcess(WebProcessCreationParameters&&);+diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp-index 9729698017cabce150921532f0dd40e10634f0ce..9bb75eda6f3e5e0633d6ef55b3980f8ce35b2f2f 100644+index f3b3f0101a88eefff3b3dde49017d0d918758bfa..09f4b3d331d6f44bdce4ba4895da2e600183e6b8 100644--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp@@ -305,7 +305,8 @@ SOAuthorizationCoordinator& WebsiteDataStore::soAuthorizationCoordinator(const W@@ -17864,7 +18124,7 @@ index 165885137ca032390c6b55baacc30a8c4c423eb5..930ceeca56587636993f9a0c0e0a21d0std::unique_ptr<SOAuthorizationCoordinator> m_soAuthorizationCoordinator;#endifdiff --git a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp-index d02a8ad4cd66f7f277eee16d21e9ffb0e1a961db..ef35d46977b9b6a866b665e3a01eac94a648cc97 100644+index cfb4be2f7b34d1ecc97989d4bfefa6e8c1a3c864..f250d43ad30903ffa93cce52e1d3843f7c428ecf 100644--- a/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp+++ b/Source/WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp@@ -101,6 +101,14 @@ void GeoclueGeolocationProvider::stop()@@ -17907,10 +18167,10 @@ index 69610f8f7b81d914d74444d9c86b3b039251edb6..c234848afb5e523165bf827bac800848RunLoop::Timer m_destroyLaterTimer;diff --git a/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cppnew file mode 100644-index 0000000000000000000000000000000000000000..93de9be341045a616b0219a965af2447ecbfc926+index 0000000000000000000000000000000000000000..379d57818019b28afa25c9ca3de32fde8e6b5e67--- /dev/null+++ b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp-@@ -0,0 +1,184 @@+@@ -0,0 +1,201 @@+/*+ * Copyright (C) 2019 Microsoft Corporation.+ *@@ -17944,12 +18204,18 @@ index 0000000000000000000000000000000000000000..93de9be341045a616b0219a965af2447+#include "InspectorPlaywrightAgent.h"+#include "PageClient.h"+#include "ViewSnapshotStore.h"++#include "WebAutomationSession.h"+#include "WebKitBrowserInspectorPrivate.h"+#include "WebKitWebContextPrivate.h"+#include "WebKitWebsiteDataManagerPrivate.h"+#include "WebKitWebViewPrivate.h"+#include "WebPageProxy.h"++#if USE(CAIRO)+#include <WebCore/ImageBufferUtilitiesCairo.h>++#endif++#if USE(SKIA)++#include <WebCore/ImageBufferUtilitiesSkia.h>++#endif+#include <wtf/HashMap.h>+#include <wtf/RefPtr.h>+#include <wtf/text/Base64.h>@@ -18036,8 +18302,10 @@ index 0000000000000000000000000000000000000000..93de9be341045a616b0219a965af2447+#endif+ // WPE has PSON enabled by default and doesn't have such parameter.+#if PLATFORM(GTK)++#if !ENABLE(2022_GLIB_API)+ "process-swap-on-cross-site-navigation-enabled", true,+#endif++#endif+ nullptr)));+ if (!context) {+ error = "Failed to create GLib ephemeral context"_s;@@ -18073,12 +18341,21 @@ index 0000000000000000000000000000000000000000..93de9be341045a616b0219a965af2447+void InspectorPlaywrightAgentClientGlib::takePageScreenshot(WebPageProxy& page, WebCore::IntRect&& clip, bool nominalResolution, CompletionHandler<void(const String&, const String&)>&& completionHandler)+{+ page.callAfterNextPresentationUpdate([protectedPage = Ref{ page }, clip = WTFMove(clip), nominalResolution, completionHandler = WTFMove(completionHandler)]() mutable {-+ cairo_surface_t* surface = nullptr;+#if PLATFORM(GTK)+ RefPtr<ViewSnapshot> viewSnapshot = protectedPage->pageClient().takeViewSnapshot(WTFMove(clip), nominalResolution);-+ if (viewSnapshot)-+ surface = viewSnapshot->surface();++ if (viewSnapshot) {++ std::optional<String> data = WebAutomationSession::platformGetBase64EncodedPNGData(*viewSnapshot);++ if (data) {++ completionHandler(emptyString(), makeString("data:image/png;base64,"_s, *data));++ return;++ }++ }+#elif PLATFORM(WPE)++#if USE(SKIA)++ sk_sp<SkImage> protectPtr = protectedPage->pageClient().takeViewSnapshot(WTFMove(clip), nominalResolution);++ SkImage* surface = protectPtr.get();++#elif USE(CAIRO)++ cairo_surface_t* surface = nullptr;+ RefPtr<cairo_surface_t> protectPtr = protectedPage->pageClient().takeViewSnapshot(WTFMove(clip), nominalResolution);+ surface = protectPtr.get();+#endif@@ -18087,7 +18364,7 @@ index 0000000000000000000000000000000000000000..93de9be341045a616b0219a965af2447+ completionHandler(emptyString(), makeString("data:image/png;base64,"_s, base64Encoded(encodeData)));+ return;+ }-+++#endif+ completionHandler("Failed to take screenshot"_s, emptyString());+ });+}@@ -18184,10 +18461,10 @@ index b02c70d85fe1a93899640a8b909b0cf734d28b18..b1dc8e89eb265be81e083bf337109561virtual void unrealize() { };virtual int renderHostFileDescriptor() { return -1; }diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp-index bef1f57ad45eaef04640991d4afd34138b8d7b76..a37024640fbf6eb79838c039001ee1cf4907042e 100644+index b71fb0a8ac0605edc6466ac1a5b12607fb8f211b..bcbfd33dfe367e1b04426f8162dd1552b4dbbcc1 100644--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp-@@ -659,4 +659,30 @@ RendererBufferFormat AcceleratedBackingStoreDMABuf::bufferFormat() const+@@ -662,4 +662,30 @@ RendererBufferFormat AcceleratedBackingStoreDMABuf::bufferFormat() constreturn buffer ? buffer->format() : RendererBufferFormat { };}@@ -18242,10 +18519,10 @@ index cd95ceb063fc776b5d68ff45262c4d84e572c509..041c562551cd467c320b8f566264885d} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/gtk/InspectorTargetProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/InspectorTargetProxyGtk.cppnew file mode 100644-index 0000000000000000000000000000000000000000..f5f811ced4eafef530d101c4e397fe2780ac3071+index 0000000000000000000000000000000000000000..5a255b0389470c4fd1baaff5e8e4882ea0218e27--- /dev/null+++ b/Source/WebKit/UIProcess/gtk/InspectorTargetProxyGtk.cpp-@@ -0,0 +1,44 @@+@@ -0,0 +1,48 @@+/*+ * Copyright (C) 2019 Microsoft Corporation.+ *@@ -18282,7 +18559,11 @@ index 0000000000000000000000000000000000000000..f5f811ced4eafef530d101c4e397fe27++void InspectorTargetProxy::platformActivate(String& error) const+{++#if USE(GTK4)++ GtkWidget* parent = GTK_WIDGET(gtk_widget_get_root(m_page.viewWidget()));++#else+ GtkWidget* parent = gtk_widget_get_toplevel(m_page.viewWidget());++#endif+ if (WebCore::widgetIsOnscreenToplevelWindow(parent))+ gtk_window_present(GTK_WINDOW(parent));+ else@@ -18305,10 +18586,10 @@ index 6029857cfcd6c4fea14de28243f1955138a62844..8a1bda8f2637670cf88baca998cbff09Ref<WebDateTimePickerGtk> WebDateTimePickerGtk::create(WebPageProxy& page)diff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cppnew file mode 100644-index 0000000000000000000000000000000000000000..e5e25acebabb76a05a77db02a99f1267bd99a3af+index 0000000000000000000000000000000000000000..a75642f1d3765efa6fcc7c07cc51beb2ddf450d2--- /dev/null+++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorEmulationAgentGtk.cpp-@@ -0,0 +1,69 @@+@@ -0,0 +1,115 @@+/*+ * Copyright (C) 2019 Microsoft Corporation.+ *@@ -18342,8 +18623,22 @@ index 0000000000000000000000000000000000000000..e5e25acebabb76a05a77db02a99f1267+#include <gtk/gtk.h>++namespace WebKit {++++#if USE(GTK4)++bool windowHasManyTabs(GtkWidget* widget) {++ for (GtkWidget* parent = gtk_widget_get_parent(widget); parent; parent = gtk_widget_get_parent(parent)) {++ if (GTK_IS_NOTEBOOK(parent)) {++ int pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(parent));++ return pages > 1;++ }++ }++ return false;++}++#endif+++void WebPageInspectorEmulationAgent::platformSetSize(int width, int height, Function<void (const String& error)>&& callback)+{++ WebCore::IntSize viewSize(width, height);+ GtkWidget* viewWidget = m_page.viewWidget();+ GtkWidget* window = gtk_widget_get_toplevel(viewWidget);+ if (!window) {@@ -18356,6 +18651,14 @@ index 0000000000000000000000000000000000000000..e5e25acebabb76a05a77db02a99f1267+ }+ GtkAllocation viewAllocation;+ gtk_widget_get_allocation(viewWidget, &viewAllocation);++#if USE(GTK4)++ // In GTK4 newly added tabs will have allocation size of 0x0, before the tab is shown.++ // This is a Ctrl+click scenario. We invoke callback righ await to not stall.++ if (!viewAllocation.width && !viewAllocation.height && windowHasManyTabs(viewWidget)) {++ callback(String());++ return;++ }++#endif+ if (viewAllocation.width == width && viewAllocation.height == height) {+ callback(String());+ return;@@ -18368,22 +18671,46 @@ index 0000000000000000000000000000000000000000..e5e25acebabb76a05a77db02a99f1267+ height += windowAllocation.height - viewAllocation.height;++ if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_page.drawingArea())) {-+ drawingArea->waitForSizeUpdate([callback = WTFMove(callback)]() {++ bool didNotHaveInitialAllocation = !windowAllocation.width && !windowAllocation.height;++ // The callback can only be called if the page is still alive, so we can safely capture `this`.++ drawingArea->waitForSizeUpdate([this, callback = WTFMove(callback), didNotHaveInitialAllocation, viewSize](const DrawingAreaProxyCoordinatedGraphics& drawingArea) mutable {++#if USE(GTK4)++ if (viewSize == drawingArea.size()) {++ callback(String());++ return;++ }++ if (didNotHaveInitialAllocation) {++ // In gtk4 resize request may be lost (overridden by default one) if the window is not yet++ // allocated when we are changing the size, so we try again.++ platformSetSize(viewSize.width(), viewSize.height(), WTFMove(callback));++ return;++ }++ callback("Failed to resize window"_s);++#else++ UNUSED_PARAM(drawingArea);+ callback(String());++#endif+ });+ } else {+ callback("No backing store for window"_s);+ }++#if USE(GTK4)++ // Depending on whether default size has been applied or not, we need to++ // do one of the calls, so we just do both.++ gtk_window_set_default_size(GTK_WINDOW(window), width, height);++ gtk_widget_set_size_request(window, width, height);++#else+ gtk_window_resize(GTK_WINDOW(window), width, height);++#endif+}++} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cppnew file mode 100644-index 0000000000000000000000000000000000000000..6a204c5bba8fb95ddb2d1c14cae7a3a79610abc6+index 0000000000000000000000000000000000000000..36ab6e9aec9f8d79fb13a8a49beadaafb3da58f5--- /dev/null+++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp-@@ -0,0 +1,105 @@+@@ -0,0 +1,76 @@+/*+ * Copyright (C) 2019 Microsoft Corporation.+ *@@ -18419,22 +18746,6 @@ index 0000000000000000000000000000000000000000..6a204c5bba8fb95ddb2d1c14cae7a3a7++namespace WebKit {+-+static Vector<String> commandsForKeyEvent(GdkEventType type, unsigned keyVal, unsigned state)-+{-+ ASSERT(type == GDK_KEY_PRESS || type == GDK_KEY_RELEASE);-+-+ GUniquePtr<GdkEvent> event(gdk_event_new(type));-+ event->key.keyval = keyVal;-+ event->key.time = GDK_CURRENT_TIME;-+ event->key.state = state;-+ // When synthesizing an event, an invalid hardware_keycode value can cause it to be badly processed by GTK+.-+ GUniqueOutPtr<GdkKeymapKey> keys;-+ int keysCount;-+ if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), keyVal, &keys.outPtr(), &keysCount) && keysCount)-+ event->key.hardware_keycode = keys.get()[0].keycode;-+ return KeyBindingTranslator().commandsForKeyEvent(&event->key);-+}-++static unsigned modifiersToEventState(OptionSet<WebEventModifier> modifiers)+{+ unsigned state = 0;@@ -18454,21 +18765,8 @@ index 0000000000000000000000000000000000000000..6a204c5bba8fb95ddb2d1c14cae7a3a7+ Vector<String> commands;+ const guint keyVal = WebCore::PlatformKeyboardEvent::gdkKeyCodeForWindowsKeyCode(windowsVirtualKeyCode);+ if (keyVal) {-+ GdkEventType event = GDK_NOTHING;-+ switch (type)-+ {-+ case WebEventType::KeyDown:-+ event = GDK_KEY_PRESS;-+ break;-+ case WebEventType::KeyUp:-+ event = GDK_KEY_RELEASE;-+ break;-+ default:-+ fprintf(stderr, "Unsupported event type = %d\n", type);-+ break;-+ }+ unsigned state = modifiersToEventState(modifiers);-+ commands = commandsForKeyEvent(event, keyVal, state);++ commands = KeyBindingTranslator().commandsForKeyval(keyVal, state);+ }+ NativeWebKeyboardEvent event(+ type,@@ -18507,10 +18805,10 @@ index d18b3e777203ef5d0f33884f909bc598d3526831..aef80b47359d7a2e4805a006dc59cd60m_primarySelectionOwner = frame;}diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm-index 286877d14b4eb6ac45092fa1cce5ce530558f8af..85240554255d69a30269e764214a139743de521b 100644+index d45b06876bac4046a05a03fbaf734af33071191d..8c136ce12155bda85cc31d2422a0bd5ff7dfdea9 100644--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm-@@ -504,6 +504,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)+@@ -503,6 +503,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled){@@ -18729,7 +19027,7 @@ index 0000000000000000000000000000000000000000..721826c8c98fc85b68a4f45deaee69c1++#endifdiff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.h b/Source/WebKit/UIProcess/mac/PageClientImplMac.h-index 1647891b55a718f66ee2f4a084439edd655c623a..2099b9166e2cac062d4161d704050a0795a26c93 100644+index 708c5d11dec4797db15b51293a94089869024e8a..ee05508c06f739c27df3d5e6c6b5234bad8a82bf 100644--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.h+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.h@@ -54,6 +54,8 @@ class PageClientImpl final : public PageClientImplCocoa@@ -18741,7 +19039,7 @@ index 1647891b55a718f66ee2f4a084439edd655c623a..2099b9166e2cac062d4161d704050a07PageClientImpl(NSView *, WKWebView *);virtual ~PageClientImpl();-@@ -170,6 +172,9 @@ private:+@@ -171,6 +173,9 @@ private:void updateAcceleratedCompositingMode(const LayerTreeContext&) override;void didFirstLayerFlush(const LayerTreeContext&) override;@@ -18751,7 +19049,7 @@ index 1647891b55a718f66ee2f4a084439edd655c623a..2099b9166e2cac062d4161d704050a07RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) override;void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;#if ENABLE(MAC_GESTURE_EVENTS)-@@ -222,6 +227,10 @@ private:+@@ -225,6 +230,10 @@ private:void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;#endif@@ -18763,10 +19061,10 @@ index 1647891b55a718f66ee2f4a084439edd655c623a..2099b9166e2cac062d4161d704050a07void 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 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cd830855c0 100644+index c17d3e660de168d07772480800099730562675ed..6ebec657486366f970817f511b840f3050926a9f 100644--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm-@@ -80,6 +80,7 @@+@@ -79,6 +79,7 @@#import <WebCore/TextUndoInsertionMarkupMac.h>#import <WebCore/ValidationBubble.h>#import <WebCore/WebCoreCALayerExtras.h>@@ -18774,7 +19072,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cd#import <pal/spi/mac/NSApplicationSPI.h>#import <wtf/ProcessPrivilege.h>#import <wtf/RetainPtr.h>-@@ -106,6 +107,13 @@ namespace WebKit {+@@ -105,6 +106,13 @@ namespace WebKit {using namespace WebCore;@@ -18788,7 +19086,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cdPageClientImpl::PageClientImpl(NSView *view, WKWebView *webView): PageClientImplCocoa(webView), m_view(view)-@@ -159,6 +167,9 @@ NSWindow *PageClientImpl::activeWindow() const+@@ -158,6 +166,9 @@ NSWindow *PageClientImpl::activeWindow() constbool PageClientImpl::isViewWindowActive(){@@ -18798,7 +19096,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cdASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));NSWindow *activeViewWindow = activeWindow();return activeViewWindow.isKeyWindow || (activeViewWindow && [NSApp keyWindow] == activeViewWindow);-@@ -166,6 +177,9 @@ bool PageClientImpl::isViewWindowActive()+@@ -165,6 +176,9 @@ bool PageClientImpl::isViewWindowActive()bool PageClientImpl::isViewFocused(){@@ -18808,7 +19106,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cd// 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)-@@ -189,6 +203,9 @@ void PageClientImpl::makeFirstResponder()+@@ -188,6 +202,9 @@ void PageClientImpl::makeFirstResponder()bool PageClientImpl::isViewVisible(){@@ -18818,7 +19116,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cdNSView *activeView = this->activeView();NSWindow *activeViewWindow = activeWindow();-@@ -272,7 +289,8 @@ void PageClientImpl::didRelaunchProcess()+@@ -271,7 +288,8 @@ void PageClientImpl::didRelaunchProcess()void PageClientImpl::preferencesDidChange(){@@ -18828,7 +19126,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cd}void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip)-@@ -475,6 +493,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)+@@ -474,6 +492,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled){@@ -18837,7 +19135,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cdm_impl->doneWithKeyEvent(event.nativeEvent(), eventWasHandled);}-@@ -494,6 +514,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl+@@ -493,6 +513,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, ShareablRefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page){@@ -18846,7 +19144,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cdreturn WebPopupMenuProxyMac::create(m_view, page.popupMenuClient());}-@@ -635,6 +657,12 @@ CALayer *PageClientImpl::footerBannerLayer() const+@@ -634,6 +656,12 @@ CALayer *PageClientImpl::footerBannerLayer() constreturn m_impl->footerBannerLayer();}@@ -18859,7 +19157,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cdRefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(std::optional<WebCore::IntRect>&&){return m_impl->takeViewSnapshot();-@@ -810,6 +838,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR+@@ -824,6 +852,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR#endif // ENABLE(FULLSCREEN_API)@@ -18873,7 +19171,7 @@ index 3fe2a9487a96b31f476bb17e45374f880e80da9a..b72433e5981f298d4d1ca93274df51cdvoid PageClientImpl::navigationGestureDidBegin(){m_impl->dismissContentRelativeChildWindowsWithAnimation(true);-@@ -997,6 +1032,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c+@@ -1011,6 +1046,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, cbool PageClientImpl::windowIsFrontWindowUnderMouse(const NativeWebMouseEvent& event){@@ -18914,10 +19212,10 @@ index 6ab7aacaebfda818e3010bb06db72c8552ac598a..3e19cba50d73084392f62f176ad4c315bool showAfterPostProcessingContextData();diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm-index 6da27ca16f9f4d359118053049caa5033b6789d7..254e582066fbc774fc02c69dddbc1ae589efdc7a 100644+index 26db4b48e75b3e65febc8cbfb314a4c22e9bdfb3..138ea13ab34b83ed190436afea7d994cb4dfa70e 100644--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm-@@ -481,6 +481,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem+@@ -478,6 +478,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem}#endif@@ -19117,10 +19415,10 @@ index 0000000000000000000000000000000000000000..4ec25daff6a0c75e378eb25b2f2638e2++} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.h b/Source/WebKit/UIProcess/mac/WebViewImpl.h-index 363c8b384c7e2e2379f06903c77c7d139e1a454f..b0ca037bc8741ec245d9afefa2be734e1aa6ba32 100644+index 4e6b8f5f0b70f8a98fc86ce3042690fbc24b4cfa..a81f385cb14a98e94c44c645ef922873cc8cc9b1 100644--- a/Source/WebKit/UIProcess/mac/WebViewImpl.h+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.h-@@ -526,6 +526,9 @@ ALLOW_DEPRECATED_DECLARATIONS_END+@@ -536,6 +536,9 @@ public:void provideDataForPasteboard(NSPasteboard *, NSString *type);NSArray *namesOfPromisedFilesDroppedAtDestination(NSURL *dropDestination);@@ -19131,10 +19429,10 @@ index 363c8b384c7e2e2379f06903c77c7d139e1a454f..b0ca037bc8741ec245d9afefa2be734evoid saveBackForwardSnapshotForCurrentItem();void saveBackForwardSnapshotForItem(WebBackForwardListItem&);diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.mm b/Source/WebKit/UIProcess/mac/WebViewImpl.mm-index b12b690eff989c9f4235c874360e26543c3e95ee..e8be29392d3c1765fc977f8a0036a24e7d95c799 100644+index c387818c8a3970d062c57f65d7e0cae0487564db..a6b109c3e4e392f29c1411fd702a776602f432bc 100644--- a/Source/WebKit/UIProcess/mac/WebViewImpl.mm+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.mm-@@ -2410,6 +2410,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()+@@ -2409,6 +2409,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()if (!m_colorSpace)m_colorSpace = [NSColorSpace sRGBColorSpace];}@@ -19146,7 +19444,7 @@ index b12b690eff989c9f4235c874360e26543c3e95ee..e8be29392d3c1765fc977f8a0036a24eASSERT(m_colorSpace);return WebCore::DestinationColorSpace { [m_colorSpace CGColorSpace] };-@@ -4487,6 +4492,18 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN+@@ -4525,6 +4530,18 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGINALLOW_DEPRECATED_DECLARATIONS_END}@@ -19370,10 +19668,10 @@ index 0000000000000000000000000000000000000000..135a60361fa8fbf907382625e7c8dd4e++} // namespace WebKitdiff --git a/Source/WebKit/UIProcess/win/WebContextMenuProxyWin.cpp b/Source/WebKit/UIProcess/win/WebContextMenuProxyWin.cpp-index da6859dcd444de953a255a5c835c659b018a08a6..95fefa995acaedf879c88130e44d9a1bbd0d107f 100644+index 3c95132b41b124e49f52e97ba2306614f46d53b9..115cfc4871aef732d5c57bae3b13818b67193cd5 100644--- a/Source/WebKit/UIProcess/win/WebContextMenuProxyWin.cpp+++ b/Source/WebKit/UIProcess/win/WebContextMenuProxyWin.cpp-@@ -112,5 +112,11 @@ WebContextMenuProxyWin::~WebContextMenuProxyWin()+@@ -114,5 +114,11 @@ WebContextMenuProxyWin::~WebContextMenuProxyWin()::DestroyMenu(m_menu);}@@ -19937,10 +20235,10 @@ index b6536b74452c26a4d661bcf6039af54824f258d0..ade7c4ad1cef7bc69c452bef404eb384#if USE(ATK)diff --git a/Source/WebKit/WPEPlatform/CMakeLists.txt b/Source/WebKit/WPEPlatform/CMakeLists.txt-index 9319cacf6dff2c3ffdd469927c91a880978a80aa..17a829b23ae6941b184d32e8701f0fd774639449 100644+index 74f395b50b2d4668c521a8d72a5581113cf16698..75496b3c36a58c8da1bd8382cecddc8f81c62119 100644--- a/Source/WebKit/WPEPlatform/CMakeLists.txt+++ b/Source/WebKit/WPEPlatform/CMakeLists.txt-@@ -82,6 +82,7 @@ set(WPEPlatform_SYSTEM_INCLUDE_DIRECTORIES+@@ -89,6 +89,7 @@ set(WPEPlatform_SYSTEM_INCLUDE_DIRECTORIESset(WPEPlatform_LIBRARIESEpoxy::Epoxy@@ -19949,10 +20247,10 @@ index 9319cacf6dff2c3ffdd469927c91a880978a80aa..17a829b23ae6941b184d32e8701f0fd7${GLIB_GIO_LIBRARIES}${GLIB_GOBJECT_LIBRARIES}diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj-index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3ffb292f7 100644+index 72fd5ec5a539c5375f4c9203166470d80170c3a0..8921f3a62e95ea9bc944bbbdf84953ce659aeb8a 100644--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj-@@ -1542,6 +1542,7 @@+@@ -1540,6 +1540,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 */; };@@ -19960,7 +20258,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c35CAF7AA726F93AB00003F19E /* 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 */; };-@@ -2381,6 +2382,18 @@+@@ -2370,6 +2371,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 */; };@@ -19979,7 +20277,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3DF462E0F23F22F5500EFF35F /* 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, ); }; };-@@ -2468,6 +2481,8 @@+@@ -2458,6 +2471,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 */; };@@ -19988,7 +20286,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3E5CBA76527A318E100DF7858 /* 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 */; };-@@ -2488,6 +2503,9 @@+@@ -2478,6 +2493,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, ); }; };@@ -19998,7 +20296,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3F409BA181E6E64BC009DA28E /* 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 */; };-@@ -6218,6 +6236,7 @@+@@ -6210,6 +6228,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>"; };@@ -20006,7 +20304,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c35CAECB5E27465AE300AB78D0 /* 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>"; };-@@ -7930,6 +7949,19 @@+@@ -7908,6 +7927,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>"; };@@ -20026,7 +20324,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3DF462E0E23F22F5300EFF35F /* 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>"; };-@@ -8082,6 +8114,8 @@+@@ -8061,6 +8093,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>"; };@@ -20035,7 +20333,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3E5DEFA6726F8F42600AB68DB /* 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>"; };-@@ -8106,6 +8140,14 @@+@@ -8085,6 +8119,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>"; };@@ -20050,7 +20348,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3F409BA171E6E64B3009DA28E /* 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>"; };-@@ -8404,6 +8446,7 @@+@@ -8389,6 +8431,7 @@3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */,3766F9F1189A1254003CF19B /* libicucore.dylib in Frameworks */,7B9FC5BB28A5233B007570E7 /* libWebKitPlatform.a in Frameworks */,@@ -20058,7 +20356,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c33766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */,37694525184FC6B600CDE21F /* Security.framework in Frameworks */,37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */,-@@ -11278,6 +11321,7 @@+@@ -11262,6 +11305,7 @@99788ACA1F421DCA00C08000 /* _WKAutomationSessionConfiguration.mm */,990D28A81C6404B000986977 /* _WKAutomationSessionDelegate.h */,990D28AF1C65203900986977 /* _WKAutomationSessionInternal.h */,@@ -20066,7 +20364,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c35C4609E222430E4C009943C2 /* _WKContentRuleListAction.h */,5C4609E322430E4D009943C2 /* _WKContentRuleListAction.mm */,5C4609E422430E4D009943C2 /* _WKContentRuleListActionInternal.h */,-@@ -12589,6 +12633,7 @@+@@ -12572,6 +12616,7 @@E34B110C27C46BC6006D2F2E /* libWebCoreTestShim.dylib */,E34B110F27C46D09006D2F2E /* libWebCoreTestSupport.dylib */,DDE992F4278D06D900F60D26 /* libWebKitAdditions.a */,@@ -20074,7 +20372,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c357A9FF15252C6AEF006A2040 /* libWTF.a */,5750F32A2032D4E500389347 /* LocalAuthentication.framework */,570DAAB0230273D200E8FC04 /* NearField.framework */,-@@ -13159,6 +13204,12 @@+@@ -13142,6 +13187,12 @@children = (9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */,9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */,@@ -20087,7 +20385,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3);path = Agents;sourceTree = "<group>";-@@ -13167,6 +13218,7 @@+@@ -13150,6 +13201,7 @@isa = PBXGroup;children = (A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorUIProxyMac.mm */,@@ -20095,7 +20393,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c31CA8B935127C774E00576C2B /* WebInspectorUIProxyMac.mm */,99A7ACE326012919006D57FD /* WKInspectorResourceURLSchemeHandler.h */,99A7ACE42601291A006D57FD /* WKInspectorResourceURLSchemeHandler.mm */,-@@ -13884,6 +13936,7 @@+@@ -13866,6 +13918,7 @@E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */,46A2B6061E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.cpp */,46A2B6071E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.h */,@@ -20103,7 +20401,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c35C6D69352AC3935D0099BDAF /* BrowsingContextGroup.cpp */,5C6D69362AC3935D0099BDAF /* BrowsingContextGroup.h */,07297F9C1C1711EA003F0735 /* DeviceIdHashSaltStorage.cpp */,-@@ -13907,6 +13960,8 @@+@@ -13889,6 +13942,8 @@BC06F43912DBCCFB002D78DE /* GeolocationPermissionRequestProxy.cpp */,BC06F43812DBCCFB002D78DE /* GeolocationPermissionRequestProxy.h */,2DD5A72A1EBF09A7009BA597 /* HiddenPageThrottlingAutoIncreasesCounter.h */,@@ -20112,7 +20410,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c35CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */,5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */,31607F3819627002009B87DA /* LegacySessionStateCoding.h */,-@@ -13940,6 +13995,7 @@+@@ -13922,6 +13977,7 @@1A0C227D2451130A00ED614D /* QuickLookThumbnailingSoftLink.mm */,1AEE57232409F142002005D6 /* QuickLookThumbnailLoader.h */,1AEE57242409F142002005D6 /* QuickLookThumbnailLoader.mm */,@@ -20120,7 +20418,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c35CCB54DC2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.cpp */,5CCB54DB2A4FEA6A0005FAA8 /* RemotePageDrawingAreaProxy.h */,5C907E9A294D507100B3402D /* RemotePageProxy.cpp */,-@@ -14045,6 +14101,8 @@+@@ -14024,6 +14080,8 @@BC7B6204129A0A6700D174A4 /* WebPageGroup.h */,2D9EA3101A96D9EB002D2807 /* WebPageInjectedBundleClient.cpp */,2D9EA30E1A96CBFF002D2807 /* WebPageInjectedBundleClient.h */,@@ -20129,7 +20427,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3BC111B0B112F5E4F00337BAB /* WebPageProxy.cpp */,BC032DCB10F4389F0058C15A /* WebPageProxy.h */,BCBD38FA125BAB9A00D2C29F /* WebPageProxy.messages.in */,-@@ -14209,6 +14267,7 @@+@@ -14190,6 +14248,7 @@BC646C1911DD399F006455B0 /* WKBackForwardListItemRef.h */,BC646C1611DD399F006455B0 /* WKBackForwardListRef.cpp */,BC646C1711DD399F006455B0 /* WKBackForwardListRef.h */,@@ -20137,17 +20435,17 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3BCB9E24A1120E15C00A137E0 /* WKContext.cpp */,BCB9E2491120E15C00A137E0 /* WKContext.h */,1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */,-@@ -14792,6 +14851,9 @@- 7AFA6F682A9F57C50055322A /* DisplayLinkMac.cpp */,+@@ -14771,6 +14830,9 @@+ 7AFA6F682A9F57C50055322A /* DisplayLinkMac.mm */,31ABA79C215AF9E000C90E31 /* HighPerformanceGPUManager.h */,31ABA79D215AF9E000C90E31 /* HighPerformanceGPUManager.mm */,+ D71A94302370E025002C4D9E /* InspectorPlaywrightAgentClientMac.h */,+ D7EB04E62372A73B00F744CE /* InspectorPlaywrightAgentClientMac.mm */,+ D79902AF236E9404005D6F7E /* InspectorTargetProxyMac.mm */,+ 7139CA3F2BF670BC00CA613A /* LegacyDisplayLinkMac.cpp */,1AFDE65B1954E8D500C48FFA /* LegacySessionStateCoding.cpp */,0FCB4E5818BBE3D9000FCFC9 /* PageClientImplMac.h */,- 0FCB4E5918BBE3D9000FCFC9 /* PageClientImplMac.mm */,-@@ -14815,6 +14877,8 @@+@@ -14795,6 +14857,8 @@E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */,E55CD20124D09F1F0042DB9C /* WebDateTimePickerMac.h */,E55CD20224D09F1F0042DB9C /* WebDateTimePickerMac.mm */,@@ -20156,7 +20454,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */,BC5750951268F3C6006F0F12 /* WebPopupMenuProxyMac.h */,BC5750961268F3C6006F0F12 /* WebPopupMenuProxyMac.mm */,-@@ -15820,6 +15884,7 @@+@@ -15797,6 +15861,7 @@99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */,990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */,990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */,@@ -20164,7 +20462,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c35C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */,5C4609E8224317BB009943C2 /* _WKContentRuleListActionInternal.h in Headers */,1A5704F81BE01FF400874AF1 /* _WKContextMenuElementInfo.h in Headers */,-@@ -16129,6 +16194,7 @@+@@ -16108,6 +16173,7 @@E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */,4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */,1A5705111BE410E600874AF1 /* BlockSPI.h in Headers */,@@ -20172,7 +20470,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3A7E69BCC2B2117A100D43D3F /* BufferAndBackendInfo.h in Headers */,BC3065FA1259344E00E71278 /* CacheModel.h in Headers */,935BF7FC2936BF1A00B41326 /* CacheStorageCache.h in Headers */,-@@ -16309,7 +16375,11 @@+@@ -16288,7 +16354,11 @@BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */,CE550E152283752200D28791 /* InsertTextOptions.h in Headers */,9197940523DBC4BB00257892 /* InspectorBrowserAgent.h in Headers */,@@ -20184,7 +20482,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3A5E391FD2183C1F800C8FB31 /* InspectorTargetProxy.h in Headers */,C5BCE5DF1C50766A00CDE3FA /* InteractionInformationAtPosition.h in Headers */,2D4D2C811DF60BF3002EB10C /* InteractionInformationRequest.h in Headers */,-@@ -16567,6 +16637,7 @@+@@ -16547,6 +16617,7 @@CDAC20C923FC2F750021DEE3 /* RemoteCDMInstanceSessionIdentifier.h in Headers */,F451C0FE2703B263002BA03B /* RemoteDisplayListRecorderProxy.h in Headers */,A78A5FE42B0EB39E005036D3 /* RemoteImageBufferSetIdentifier.h in Headers */,@@ -20192,7 +20490,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c32D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */,2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */,1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */,-@@ -16622,6 +16693,7 @@+@@ -16601,6 +16672,7 @@E1E552C516AE065F004ED653 /* SandboxInitializationParameters.h in Headers */,E36FF00327F36FBD004BE21A /* SandboxStateVariables.h in Headers */,7BAB111025DD02B3008FC479 /* ScopedActiveMessageReceiveQueue.h in Headers */,@@ -20200,7 +20498,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3463BB93A2B9D08D80098C5C3 /* ScriptMessageHandlerIdentifier.h in Headers */,E4D54D0421F1D72D007E3C36 /* ScrollingTreeFrameScrollingNodeRemoteIOS.h in Headers */,0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */,-@@ -16972,6 +17044,8 @@+@@ -16947,6 +17019,8 @@939EF87029D112EE00F23AEE /* WebPageInlines.h in Headers */,9197940823DBC4CB00257892 /* WebPageInspectorAgentBase.h in Headers */,A513F5402154A5D700662841 /* WebPageInspectorController.h in Headers */,@@ -20209,7 +20507,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3A543E30C215C8A8D00279CD9 /* WebPageInspectorTarget.h in Headers */,A543E30D215C8A9000279CD9 /* WebPageInspectorTargetController.h in Headers */,A543E307215AD13700279CD9 /* WebPageInspectorTargetFrontendChannel.h in Headers */,-@@ -19367,6 +19441,8 @@+@@ -19338,6 +19412,8 @@522F792928D50EBB0069B45B /* HidService.mm in Sources */,2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */,2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */,@@ -20218,7 +20516,7 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c31CC94E532AC92F190045F269 /* JSWebExtensionAPIAction.mm in Sources */,1C2B4D4B2A819D0D00C528A1 /* JSWebExtensionAPIAlarms.mm in Sources */,1C8ECFEA2AFC7DCB007BAA62 /* JSWebExtensionAPICommands.mm in Sources */,-@@ -19807,6 +19883,8 @@+@@ -19777,6 +19853,8 @@E3816B3D27E2463A005EAFC0 /* WebMockContentFilterManager.cpp in Sources */,31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,2DF6FE52212E110900469030 /* WebPage.cpp in Sources */,@@ -20228,10 +20526,10 @@ index 5638e7e7ca660b2bb7c9b3f21dde5f5dfb68dad0..d4c7e4081d7b4c80423e2a406f8471c3BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */,7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */,diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp-index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450257bd2fb 100644+index a3444c240790680684a09a929f5ba07d6e68e793..4b27fb80a9b81d91eb4e661c743f5748b64ce144 100644--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp-@@ -229,6 +229,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou+@@ -233,6 +233,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou}#endif@@ -20243,7 +20541,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450#if ENABLE(PDFJS)if (tryLoadingUsingPDFJSHandler(resourceLoader, trackingParameters))return;-@@ -360,7 +365,8 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadPara+@@ -366,7 +371,8 @@ static void addParametersShared(const LocalFrame* frame, NetworkResourceLoadParaparameters.linkPreconnectEarlyHintsEnabled = mainFrame->settings().linkPreconnectEarlyHintsEnabled();}@@ -20253,7 +20551,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450{auto identifier = resourceLoader.identifier();ASSERT(identifier);-@@ -376,7 +382,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL+@@ -382,7 +388,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceLRunLoop::main().dispatch([resourceLoader = Ref { resourceLoader }, error = blockedError(request)] {resourceLoader->didFail(error);});@@ -20262,7 +20560,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450}}-@@ -386,7 +392,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL+@@ -392,7 +398,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceLLOG(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);@@ -20270,7 +20568,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450loadParameters.identifier = identifier;loadParameters.webPageProxyID = trackingParameters.webPageProxyID;loadParameters.webPageID = trackingParameters.pageID;-@@ -476,14 +481,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL+@@ -482,14 +487,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceLif (loadParameters.options.mode != FetchOptions::Mode::Navigate) {ASSERT(loadParameters.sourceOrigin);@@ -20288,7 +20586,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450loadParameters.isMainFrameNavigation = isMainFrameNavigation;if (loadParameters.isMainFrameNavigation && document)-@@ -525,6 +527,17 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL+@@ -529,6 +531,17 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL}ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials);@@ -20306,7 +20604,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450std::optional<NetworkResourceLoadIdentifier> existingNetworkResourceLoadIdentifierToResume;if (loadParameters.isMainFrameNavigation)-@@ -540,7 +553,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL+@@ -544,7 +557,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL}auto loader = WebResourceLoader::create(resourceLoader, trackingParameters);@@ -20315,7 +20613,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450}void WebLoaderStrategy::scheduleInternallyFailedLoad(WebCore::ResourceLoader& resourceLoader)-@@ -950,7 +963,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier+@@ -954,7 +967,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifierbool WebLoaderStrategy::isOnLine() const{@@ -20324,7 +20622,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450}void WebLoaderStrategy::addOnlineStateChangeListener(Function<void(bool)>&& listener)-@@ -977,6 +990,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet+@@ -981,6 +994,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Completvoid WebLoaderStrategy::setOnLineState(bool isOnLine){@@ -20336,7 +20634,7 @@ index 0ab7a191b4d1b35579666f381f87d8a3995e3501..bfd50e5c4f82ad02d9a96afb9a297450if (m_isOnLine == isOnLine)return;-@@ -985,6 +1003,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)+@@ -989,6 +1007,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)listener(isOnLine);}@@ -20380,7 +20678,7 @@ index 3ef86cc236b8acee2fbe5d0b9c3fd755fcc9f06f..75951fc0fc5e4ef566582c0a49482793} // namespace WebKitdiff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp-index ee6ed68f57ac7205087c7f0abe59fb56ee0fa012..9d81ae6dff0ab154a0665d6430be58affae6d820 100644+index 1707b38220552075313bac33a735756abad53ced..f7bd60794a52bb64c37a51ac34af379dfab0e976 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@@ -20416,10 +20714,10 @@ index ee9c3c4f48c328daaa015e2122235e51349bd999..5b3a4d3e742147195e0ff9e88176759dauto permissionHandlers = m_requestsPerOrigin.take(securityOrigin);diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp-index 3fa53c3e4977dcc0b83d48091490c2261ed785e0..bef114c5988a88eaca305287471c55515fc22ff6 100644+index d07821c8847c094bbce9e742f7dd4048b9d4d319..ab301c87d8ec84580e3e502427037440092aece4 100644--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp-@@ -468,6 +468,8 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev+@@ -471,6 +471,8 @@ void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel lev{// Notify the bundle client.auto page = protectedPage();@@ -20429,24 +20727,20 @@ index 3fa53c3e4977dcc0b83d48091490c2261ed785e0..bef114c5988a88eaca305287471c5551}diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp-index 2eb0886f13ed035a53b8eaa60605de4dfe53fbe3..0f6a539f00a42149c0f2b2237a9cbdd8334459d6 100644+index 2eb0886f13ed035a53b8eaa60605de4dfe53fbe3..c3a216415ab588cde1f1e524e0a232efa425717e 100644--- a/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp-@@ -29,6 +29,13 @@+@@ -29,6 +29,9 @@#if ENABLE(DRAG_SUPPORT)#include "WebPage.h"+#include <WebCore/DataTransfer.h>+#include <WebCore/Pasteboard.h>+#include <WebCore/ShareableBitmap.h>-+-+#if PLATFORM(WPE)-+#include "ArgumentCodersWPE.h"-+#endifnamespace WebKit {using namespace WebCore;-@@ -50,7 +57,7 @@ OptionSet<DragSourceAction> WebDragClient::dragSourceActionMaskForPoint(const In+@@ -50,7 +53,7 @@ OptionSet<DragSourceAction> WebDragClient::dragSourceActionMaskForPoint(const Inreturn m_page->allowedDragSourceActions();}@@ -20456,13 +20750,13 @@ index 2eb0886f13ed035a53b8eaa60605de4dfe53fbe3..0f6a539f00a42149c0f2b2237a9cbdd8{}diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp-index 7b9b0348c1a3b606ad31b3fe2df3eedcb64cf233..97a6a56cc8427bd3eadfacc8fd5c4f15d5bfcdf7 100644+index 2c6c166b8f287a66e914722fe46e5f6400a4c1e2..980a5a9fb54c355d1766e8b7d4f944bb6792bb53 100644--- a/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp-@@ -1592,14 +1592,6 @@ void WebLocalFrameLoaderClient::transitionToCommittedForNewPage(InitializingIfra+@@ -1586,14 +1586,6 @@ void WebLocalFrameLoaderClient::transitionToCommittedForNewPage(InitializingIfraif (initializingIframe == InitializingIframe::No)- webPage->scheduleFullEditorStateUpdate();+ webPage->clearEditorStateAfterPageTransition();--#if USE(COORDINATED_GRAPHICS)- if (shouldUseFixedLayout) {@@ -20554,10 +20848,10 @@ index 0000000000000000000000000000000000000000..66972b66094050b2429a927861ff7d0d+#endif // ENABLE(DRAG_SUPPORT)diff --git a/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cpp b/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cppnew file mode 100644-index 0000000000000000000000000000000000000000..4fa6b70b978998849950d1fe4d9f902ede155956+index 0000000000000000000000000000000000000000..226b3bf6bd83d2606a0aeb627ae9302fd3bcf874--- /dev/null+++ b/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cpp-@@ -0,0 +1,57 @@+@@ -0,0 +1,56 @@+/*+ * Copyright (C) 2011 Igalia S.L.+ *@@ -20588,7 +20882,6 @@ index 0000000000000000000000000000000000000000..4fa6b70b978998849950d1fe4d9f902e++#if ENABLE(DRAG_SUPPORT)+-+#include "ArgumentCodersWPE.h"+#include "WebPage.h"+#include "WebPageProxyMessages.h"+#include <WebCore/DataTransfer.h>@@ -20616,7 +20909,7 @@ index 0000000000000000000000000000000000000000..4fa6b70b978998849950d1fe4d9f902e++#endif // ENABLE(DRAG_SUPPORT)diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp-index 6780fb04b94241977df3396ffb77585f10faf035..db015c88e2b3413c9fde348779b62c90896ba09c 100644+index c0dd11d1a720907b1e2d863302a483eea1d39765..a4ad1b5acc545d98aea99c58fc5a5ca3b3cc0bd9 100644--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp@@ -39,6 +39,7 @@@@ -20669,7 +20962,7 @@ index 6780fb04b94241977df3396ffb77585f10faf035..db015c88e2b3413c9fde348779b62c90void DrawingAreaCoordinatedGraphics::scheduleDisplay()diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp-index d453fc33b2a366e4944b48c47bbe056d508124e7..4b58d67c55ebcde8598a1045cbc99202bf6f8feb 100644+index 9792a2310ecae603e83eefd602beab20c47d696c..2744b289afd8341f05d72a6c205d347fbdff4dd1 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)@@ -20689,15 +20982,7 @@ index d453fc33b2a366e4944b48c47bbe056d508124e7..4b58d67c55ebcde8598a1045cbc99202m_viewportController.didScroll(rect.location());didChangeViewport();-@@ -273,6 +281,7 @@ GraphicsLayerFactory* LayerTreeHost::graphicsLayerFactory()- void LayerTreeHost::contentsSizeChanged(const IntSize& newSize)- {- m_viewportController.didChangeContentsSize(newSize);-+ didChangeViewport();- }-- void LayerTreeHost::didChangeViewportAttributes(ViewportAttributes&& attr)-@@ -312,6 +321,10 @@ void LayerTreeHost::didChangeViewport()+@@ -313,6 +321,10 @@ void LayerTreeHost::didChangeViewport()if (!view->useFixedLayout())view->notifyScrollPositionChanged(m_lastScrollPosition);@@ -20709,7 +20994,7 @@ index d453fc33b2a366e4944b48c47bbe056d508124e7..4b58d67c55ebcde8598a1045cbc99202if (m_lastPageScaleFactor != pageScale) {diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h-index 40926ecda30b9f7cdb4d1908436b1af4353999a4..2fa2c6363cfedd3dac46692cc6c8642752ec728f 100644+index d2630055562da015318b5863de64693161bb1b58..a537e2d6db6a49698c5646ca7f9d2c20c6872692 100644--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h@@ -115,6 +115,13 @@ public:@@ -20753,7 +21038,7 @@ index 94bbead87936ab599f79c3c08b260cad939aea62..5099d3d7bdf220aa5c8f3729a04397ec{if (m_hasRemovedMessageReceiver)diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.h b/Source/WebKit/WebProcess/WebPage/DrawingArea.h-index e61851e273de92fc97b7707c4427b4d03cd2df70..d1e0850461624188febc8a477e6d3d6bc44fee50 100644+index 20749934a7fb69de11b85858e8e53f33b059d056..1818cb1fa27e7f3b66e4d17132f9c1ad062a2b9a 100644--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.h+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.h@@ -164,6 +164,9 @@ public:@@ -20805,10 +21090,10 @@ index b6e5283f51db82b60091320df44ef0bbf20c33c6..0d82fbb98b93e760cecf5fa7a41327d0WebCookieJar();diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp-index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7c8d54faad 100644+index 302b6fc3639e3bfe5a3f7624c21c518a6e142781..2a799f3454f6d51712f27cbc0b86036f079f3489 100644--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp-@@ -1034,6 +1034,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)+@@ -1047,6 +1047,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)#endif#endif // HAVE(SANDBOX_STATE_FLAGS)@@ -20818,8 +21103,8 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7cupdateThrottleState();#if ENABLE(ACCESSIBILITY_ANIMATION_CONTROL)updateImageAnimationEnabled();-@@ -2007,6 +2010,22 @@ void WebPage::transitionFrameToLocal(LocalFrameCreationParameters&& creationPara- frame->transitionToLocal(creationParameters.layerHostingContextIdentifier);+@@ -2027,6 +2030,22 @@ void WebPage::loadDidCommitInAnotherProcess(WebCore::FrameIdentifier frameID, st+ frame->loadDidCommitInAnotherProcess(layerHostingContextIdentifier);}+void WebPage::loadRequestInFrameForInspector(LoadParameters&& loadParameters, WebCore::FrameIdentifier frameID)@@ -20841,7 +21126,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7cvoid 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());-@@ -2283,17 +2302,14 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)+@@ -2312,17 +2331,14 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)view->resize(viewSize);m_drawingArea->setNeedsDisplay();@@ -20859,7 +21144,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7cvoid WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArguments){RefPtr localMainFrame = dynamicDowncast<LocalFrame>(m_page->mainFrame());-@@ -2318,20 +2334,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg+@@ -2347,20 +2363,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArgViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);@@ -20887,7 +21172,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7c#if USE(COORDINATED_GRAPHICS)m_drawingArea->didChangeViewportAttributes(WTFMove(attr));-@@ -2339,7 +2353,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg+@@ -2368,7 +2382,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArgsend(Messages::WebPageProxy::DidChangeViewportProperties(attr));#endif}@@ -20895,7 +21180,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7cvoid WebPage::scrollMainFrameIfNotAtMaxScrollPosition(const IntSize& scrollOffset){-@@ -2640,6 +2653,7 @@ void WebPage::scaleView(double scale)+@@ -2670,6 +2683,7 @@ void WebPage::scaleView(double scale)}m_page->setViewScaleFactor(scale);@@ -20903,7 +21188,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7cscalePage(pageScale, scrollPositionAtNewScale);}-@@ -2819,18 +2833,14 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum+@@ -2849,18 +2863,14 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgumviewportConfigurationChanged();#endif@@ -20923,7 +21208,21 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7c}#if !PLATFORM(IOS_FAMILY)-@@ -3830,6 +3840,97 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent, CompletionHandler<void+@@ -3578,6 +3588,13 @@ void WebPage::setLastKnownMousePosition(WebCore::FrameIdentifier frameID, IntPoi+ frame->coreLocalFrame()->eventHandler().setLastKnownMousePosition(eventPoint, globalPoint);+ }+++#if ENABLE(ORIENTATION_EVENTS)++void WebPage::setDeviceOrientation(WebCore::IntDegrees deviceOrientation)++{++ m_page->setOverrideOrientation(deviceOrientation);++}++#endif+++ void WebPage::flushDeferredDidReceiveMouseEvent()+ {+ if (auto info = std::exchange(m_deferredMouseEventCompletionHandler, std::nullopt))+@@ -3862,6 +3879,97 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent, CompletionHandler<voidcompletionHandler(touchEvent.type(), handled);}@@ -21021,7 +21320,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7c#endifvoid WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint)-@@ -3915,6 +4016,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m+@@ -3950,6 +4058,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& mm_inspectorTargetController->sendMessageToTargetBackend(targetId, message);}@@ -21033,7 +21332,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7cvoid WebPage::insertNewlineInQuotedContent(){RefPtr frame = m_page->checkedFocusController()->focusedOrMainFrame();-@@ -4150,6 +4256,7 @@ void WebPage::didCompletePageTransition()+@@ -4185,6 +4298,7 @@ void WebPage::didCompletePageTransition()void WebPage::show(){send(Messages::WebPageProxy::ShowPage());@@ -21041,7 +21340,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7c}void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension)-@@ -5249,7 +5356,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana+@@ -5296,7 +5410,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana#if ENABLE(DRAG_SUPPORT)@@ -21050,7 +21349,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7cvoid 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)-@@ -7586,6 +7693,10 @@ void WebPage::didCommitLoad(WebFrame* frame)+@@ -7646,6 +7760,10 @@ void WebPage::didCommitLoad(WebFrame* frame)#endifflushDeferredDidReceiveMouseEvent();@@ -21061,7 +21360,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7c}void WebPage::didFinishDocumentLoad(WebFrame& frame)-@@ -7850,6 +7961,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(LocalFrame& frame, const Resou+@@ -7915,6 +8033,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(LocalFrame& frame, const ResouWebsitePoliciesData::applyToDocumentLoader(WTFMove(*m_pendingWebsitePolicies), documentLoader);m_pendingWebsitePolicies = std::nullopt;}@@ -21072,7 +21371,7 @@ index 36ca16c66c74db2f7d4b2a4938e7714b5ef49ca1..821029c298841fc1408f80579d43ec7creturn documentLoader;diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h-index a8d232fda1bf1dc7a9b3e866b3cbfb2952b26eef..b048960902cdd660209be177b4ecbe7719c74f8d 100644+index 1cb204697117b143bd031cfd1a0ff8e7116864ba..1f8abf4d4dada0543b5aefc0b2640d57c664d616 100644--- a/Source/WebKit/WebProcess/WebPage/WebPage.h+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h@@ -70,6 +70,7 @@@@ -21083,18 +21382,7 @@ index a8d232fda1bf1dc7a9b3e866b3cbfb2952b26eef..b048960902cdd660209be177b4ecbe77#include <WebCore/PageIdentifier.h>#include <WebCore/PageOverlay.h>#include <WebCore/PlatformLayerIdentifier.h>-@@ -112,6 +113,10 @@- #include "WebPrintOperationGtk.h"- #endif--+#if PLATFORM(WPE)-+#include "ArgumentCodersWPE.h"-+#endif-+- #if PLATFORM(GTK) || PLATFORM(WPE)- #include "InputMethodState.h"- #endif-@@ -1145,11 +1150,11 @@ public:+@@ -1155,11 +1156,11 @@ public:void clearSelection();void restoreSelectionInFocusedEditableElement();@@ -21108,7 +21396,7 @@ index a8d232fda1bf1dc7a9b3e866b3cbfb2952b26eef..b048960902cdd660209be177b4ecbe77void 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-@@ -1164,6 +1169,9 @@ public:+@@ -1174,6 +1175,9 @@ public:void didStartDrag();void dragCancelled();OptionSet<WebCore::DragSourceAction> allowedDragSourceActions() const { return m_allowedDragSourceActions; }@@ -21118,7 +21406,20 @@ index a8d232fda1bf1dc7a9b3e866b3cbfb2952b26eef..b048960902cdd660209be177b4ecbe77#endifvoid beginPrinting(WebCore::FrameIdentifier, const PrintInfo&);-@@ -1387,6 +1395,7 @@ public:+@@ -1249,8 +1253,11 @@ public:+ void gestureEvent(WebCore::FrameIdentifier, const WebGestureEvent&, CompletionHandler<void(std::optional<WebEventType>, bool, std::optional<WebCore::RemoteUserInputEventData>)>&&);+ #endif++-#if PLATFORM(IOS_FAMILY)++#if ENABLE(ORIENTATION_EVENTS)+ void setDeviceOrientation(WebCore::IntDegrees);++#endif++++#if PLATFORM(IOS_FAMILY)+ void dynamicViewportSizeUpdate(const DynamicViewportSizeUpdate&);+ bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }+ void willStartUserTriggeredZooming();+@@ -1397,6 +1404,7 @@ public:void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType);void disconnectInspector(const String& targetId);void sendMessageToTargetBackend(const String& targetId, const String& message);@@ -21126,15 +21427,15 @@ index a8d232fda1bf1dc7a9b3e866b3cbfb2952b26eef..b048960902cdd660209be177b4ecbe77void insertNewlineInQuotedContent();-@@ -1863,6 +1872,7 @@ private:- void tryClose(CompletionHandler<void(bool)>&&);- void platformDidReceiveLoadParameters(const LoadParameters&);- void transitionFrameToLocal(LocalFrameCreationParameters&&, WebCore::FrameIdentifier);+@@ -1883,6 +1891,7 @@ private:+ void createProvisionalFrame(ProvisionalFrameCreationParameters&&, WebCore::FrameIdentifier);+ void destroyProvisionalFrame(WebCore::FrameIdentifier);+ void loadDidCommitInAnotherProcess(WebCore::FrameIdentifier, std::optional<WebCore::LayerHostingContextIdentifier>);+ void loadRequestInFrameForInspector(LoadParameters&&, WebCore::FrameIdentifier);void loadRequest(LoadParameters&&);[[noreturn]] void loadRequestWaitingForProcessLaunch(LoadParameters&&, URL&&, WebPageProxyIdentifier, bool);void loadData(LoadParameters&&);-@@ -1902,6 +1912,7 @@ private:+@@ -1924,6 +1933,7 @@ private:void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);#elif ENABLE(TOUCH_EVENTS)void touchEvent(const WebTouchEvent&, CompletionHandler<void(std::optional<WebEventType>, bool)>&&);@@ -21142,7 +21443,7 @@ index a8d232fda1bf1dc7a9b3e866b3cbfb2952b26eef..b048960902cdd660209be177b4ecbe77#endifvoid cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);-@@ -2046,9 +2057,7 @@ private:+@@ -2070,9 +2080,7 @@ private:void addLayerForFindOverlay(CompletionHandler<void(WebCore::PlatformLayerIdentifier)>&&);void removeLayerForFindOverlay(CompletionHandler<void()>&&);@@ -21152,7 +21453,7 @@ index a8d232fda1bf1dc7a9b3e866b3cbfb2952b26eef..b048960902cdd660209be177b4ecbe77void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);void setTextForActivePopupMenu(int32_t index);-@@ -2649,6 +2658,7 @@ private:+@@ -2676,6 +2684,7 @@ private:UserActivity m_userActivity;uint64_t m_pendingNavigationID { 0 };@@ -21161,10 +21462,25 @@ index a8d232fda1bf1dc7a9b3e866b3cbfb2952b26eef..b048960902cdd660209be177b4ecbe77bool m_mainFrameProgressCompleted { false };diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in-index b67b771976b46970925529207e0153bc5637c533..7fc087a6d9769664347d62776d744287ec39c3a3 100644+index e1925f00bdbcabf1d9509a4dac169490000ef48d..75c54167747fc391179449ba22dda0ddb1f9b0a8 100644--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in-@@ -147,6 +147,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType+@@ -55,10 +55,13 @@ messages -> WebPage LegacyReceiver {+ ClearNotificationPermissionState()+ #endif+++#if ENABLE(ORIENTATION_EVENTS)++ SetDeviceOrientation(WebCore::IntDegrees deviceOrientation)++#endif+++ #if PLATFORM(IOS_FAMILY)+ SetSceneIdentifier(String sceneIdentifier)+ SetViewportConfigurationViewLayoutSize(WebCore::FloatSize size, double scaleFactor, double minimumEffectiveDeviceWidth)+- SetDeviceOrientation(WebCore::IntDegrees deviceOrientation)+ SetOverrideViewportArguments(std::optional<WebCore::ViewportArguments> arguments)+ DynamicViewportSizeUpdate(struct WebKit::DynamicViewportSizeUpdate target)++@@ -148,6 +151,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandTypeConnectInspector(String targetId, Inspector::FrontendChannel::ConnectionType connectionType)DisconnectInspector(String targetId)SendMessageToTargetBackend(String targetId, String message)@@ -21172,7 +21488,7 @@ index b67b771976b46970925529207e0153bc5637c533..7fc087a6d9769664347d62776d744287#if ENABLE(REMOTE_INSPECTOR)SetIndicating(bool indicating);-@@ -157,6 +158,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType+@@ -158,6 +162,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)@@ -21180,15 +21496,15 @@ index b67b771976b46970925529207e0153bc5637c533..7fc087a6d9769664347d62776d744287#endifCancelPointer(WebCore::PointerID pointerId, WebCore::IntPoint documentPoint)-@@ -188,6 +190,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType- LoadDataInFrame(std::span<const uint8_t> data, String MIMEType, String encodingName, URL baseURL, WebCore::FrameIdentifier frameID)- LoadRequest(struct WebKit::LoadParameters loadParameters)- TransitionFrameToLocal(struct WebKit::LocalFrameCreationParameters creationParameters, WebCore::FrameIdentifier frameID)+@@ -191,6 +196,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)+ LoadRequestInFrameForInspector(struct WebKit::LoadParameters loadParameters, WebCore::FrameIdentifier frameID)LoadRequestWaitingForProcessLaunch(struct WebKit::LoadParameters loadParameters, URL resourceDirectoryURL, WebKit::WebPageProxyIdentifier pageID, bool checkAssumedReadAccessToResourceURL)LoadData(struct WebKit::LoadParameters loadParameters)LoadSimulatedRequestAndResponse(struct WebKit::LoadParameters loadParameters, WebCore::ResourceResponse simulatedResponse)-@@ -353,10 +356,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType+@@ -355,10 +361,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandTypeRemoveLayerForFindOverlay() -> ()# Drag and drop.@@ -21201,7 +21517,7 @@ index b67b771976b46970925529207e0153bc5637c533..7fc087a6d9769664347d62776d744287PerformDragControllerAction(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-@@ -366,6 +369,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType+@@ -368,6 +374,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandTypeDragCancelled()#endif@@ -21213,10 +21529,10 @@ index b67b771976b46970925529207e0153bc5637c533..7fc087a6d9769664347d62776d744287RequestDragStart(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 46b5327ff8777f3dce83ecf37219ad08321e8462..364d1010f0356a37d3f3b07d7fde187973028857 100644+index a95a86568072d78053ccd8cf758aad9ba3f1bcc4..661923b01c15d9b3ec4b351d657c2e650642762d 100644--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm-@@ -800,21 +800,37 @@ String WebPage::platformUserAgent(const URL&) const+@@ -802,21 +802,37 @@ String WebPage::platformUserAgent(const URL&) constbool WebPage::hoverSupportedByPrimaryPointingDevice() const{@@ -21305,7 +21621,7 @@ index f17f5d719d892309ed9c7093384945866b5117b9..1dba47bbf0dbd0362548423a74b38034}diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp-index 4b52cd3a81eceb55531d48d4e4a54dc7d62b4d32..e3427d76d44a9bf148f4f9dca7ed7d7b58319b53 100644+index fb283adec78aec2bc00f4db13f243bb814b84d5a..5e13f718081dc6da8c9105bcde23408c21bbed14 100644--- a/Source/WebKit/WebProcess/WebProcess.cpp+++ b/Source/WebKit/WebProcess/WebProcess.cpp@@ -88,6 +88,7 @@@@ -21316,7 +21632,7 @@ index 4b52cd3a81eceb55531d48d4e4a54dc7d62b4d32..e3427d76d44a9bf148f4f9dca7ed7d7b#include <JavaScriptCore/JSLock.h>#include <JavaScriptCore/MemoryStatistics.h>#include <JavaScriptCore/WasmFaultSignalHandler.h>-@@ -365,6 +366,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter+@@ -371,6 +372,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameterplatformInitializeProcess(parameters);updateCPULimit();@@ -21341,7 +21657,7 @@ index 8987c3964a9308f2454759de7f8972215a3ae416..bcac0afeb94ed8123d1f9fb0b932c849SetProcessDPIAware();return true;diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm-index 1ef662de86f8b92a7a5c6414df2dac6dbb3882f0..793785e12f96fe52193e8c27ec8b015521e06390 100644+index 7c01c6e5509f448a3ebdf10376ef2974403e37c0..7a9c9e3a197dc723e7a94dce5ddbddf05ba5111b 100644--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm@@ -4214,7 +4214,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END@@ -21354,10 +21670,10 @@ index 1ef662de86f8b92a7a5c6414df2dac6dbb3882f0..793785e12f96fe52193e8c27ec8b0155- (void)touch:(WebEvent *)event{diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm-index c892fdcdb2834ab3d93a4a0575b712c848b662c0..0e817f6ac6cf4e0bc04e1acd178ef976105d9b16 100644+index e36b84e6c861fcef5102d881a037c2b414de0469..1a216224bf7b8fadba7033d785520d30050865c8 100644--- a/Source/WebKitLegacy/mac/WebView/WebView.mm+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm-@@ -3979,7 +3979,7 @@ + (void)_doNotStartObservingNetworkReachability+@@ -3981,7 +3981,7 @@ + (void)_doNotStartObservingNetworkReachability}#endif // PLATFORM(IOS_FAMILY)@@ -21366,7 +21682,7 @@ index c892fdcdb2834ab3d93a4a0575b712c848b662c0..0e817f6ac6cf4e0bc04e1acd178ef976- (NSArray *)_touchEventRegions{-@@ -4021,7 +4021,7 @@ - (NSArray *)_touchEventRegions+@@ -4023,7 +4023,7 @@ - (NSArray *)_touchEventRegions}).autorelease();}@@ -21407,7 +21723,7 @@ index 0000000000000000000000000000000000000000..dd6a53e2d57318489b7e49dd7373706d+ LIBVPX_LIBRARIES+)diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake-index 31085c5a7f8d4e1680887ff9f20de2d421256a62..d1374f5f68f26d166d9a6e4f1ae9a23dd9151e13 100644+index fa9c8766ea53612b9651e03375eb8b6bf4f15e76..621fb9f05c620f486feed36c4f23f66188a7ee88 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@@ -21471,9 +21787,9 @@ index 31085c5a7f8d4e1680887ff9f20de2d421256a62..d1374f5f68f26d166d9a6e4f1ae9a23dWEBKIT_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)-@@ -141,6 +150,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_API_STATISTICS PRIVATE ON)- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CODECS PRIVATE ON)- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})+@@ -147,6 +156,14 @@ else ()+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SKIA PRIVATE OFF)+ endif ()+# Playwright+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_APPLICATION_MANIFEST PRIVATE ON)@@ -21487,7 +21803,7 @@ index 31085c5a7f8d4e1680887ff9f20de2d421256a62..d1374f5f68f26d166d9a6e4f1ae9a23d# Finalize the value for all options. Do not attempt to use an option beforediff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake-index e0c8dc92717c31173b6848b9f04856276125fb9d..24bbbae0654cded5197e6a4ce13246f71f5d5590 100644+index 8d5c7b97d0b717e4da818baaef1a681629332edb..df125a4c00c79daa73e9959a6b8b8fe0e3929e99 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@@ -21541,7 +21857,7 @@ index e0c8dc92717c31173b6848b9f04856276125fb9d..24bbbae0654cded5197e6a4ce13246f7WEBKIT_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)-@@ -83,6 +88,23 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90)+@@ -89,6 +94,23 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90)WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PUBLIC ON)endif ()@@ -21565,17 +21881,17 @@ index e0c8dc92717c31173b6848b9f04856276125fb9d..24bbbae0654cded5197e6a4ce13246f7# 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.-@@ -92,7 +114,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_JOURNALD_LOG "Whether to enable journald logging" PU+@@ -98,7 +120,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_JOURNALD_LOG "Whether to enable journald logging" PUWEBKIT_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)--WEBKIT_OPTION_DEFINE(ENABLE_WPE_QT_API "Whether to enable support for the Qt5/QML plugin" PUBLIC ${ENABLE_DEVELOPER_MODE})-+WEBKIT_OPTION_DEFINE(ENABLE_WPE_QT_API "Whether to enable support for the Qt5/QML plugin" PUBLIC OFF)+-WEBKIT_OPTION_DEFINE(ENABLE_WPE_QT_API "Whether to enable support for the Qt/QML plugin" PUBLIC ${ENABLE_DEVELOPER_MODE})++WEBKIT_OPTION_DEFINE(ENABLE_WPE_QT_API "Whether to enable support for the Qt/QML plugin" PUBLIC OFF)WEBKIT_OPTION_DEFINE(ENABLE_WPE_1_1_API "Whether to build WPE 1.1 instead of WPE 2.0" PUBLIC OFF)WEBKIT_OPTION_DEFINE(USE_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 2ed9985c35980ba0fca09c2fc9ea5ab300b19b00..a5f773d071cb67025b16614a998bd09355061572 100644+index 92171930d24d199ebe5e7ff13252a6561ce57379..4d0b67710fa8a68dd604fb5c41ae16dd1a29e797 100644--- a/Source/cmake/OptionsWin.cmake+++ b/Source/cmake/OptionsWin.cmake@@ -86,6 +86,29 @@ find_package(ZLIB 1.2.11 REQUIRED)@@ -21608,7 +21924,7 @@ index 2ed9985c35980ba0fca09c2fc9ea5ab300b19b00..a5f773d071cb67025b16614a998bd093WEBKIT_OPTION_BEGIN()# FIXME: Most of these options should not be public.-@@ -159,6 +182,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)+@@ -156,6 +179,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)@@ -21624,7 +21940,7 @@ index 2ed9985c35980ba0fca09c2fc9ea5ab300b19b00..a5f773d071cb67025b16614a998bd093set(USE_ANGLE_EGL ON)diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake-index 26f8c4421bf45bb2f7e5f67ebd31ecfd9c0ddd3d..52ad063be9977fbbfa17ed0ae09676fd9455aef9 100644+index 4db77baa1f6f1b66a6c84e7577ee4169797b474b..cc57a3a95dcf7863aeeda489b25554f4172ca10b 100644--- a/Source/cmake/WebKitCompilerFlags.cmake+++ b/Source/cmake/WebKitCompilerFlags.cmake@@ -122,7 +122,7 @@ macro(WEBKIT_ADD_TARGET_CXX_FLAGS _target)@@ -21706,7 +22022,7 @@ index 61616b96e2f4e21aa6d098445e0f1a933e512a9c..33732da18013679a869ff8eb2b445434}diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.c b/Tools/MiniBrowser/gtk/BrowserWindow.c-index bd00606c26b6fedb75978ed26a9b07f4b70828d8..8460a4ae5ff7461e3435fe2e704bb04e0a8bd0f8 100644+index f8f78a9b2e711d8250e770d73f0f7af6dc1520ed..101313a9ba3c1ddcfa10561d582ce485f0212765 100644--- a/Tools/MiniBrowser/gtk/BrowserWindow.c+++ b/Tools/MiniBrowser/gtk/BrowserWindow.c@@ -73,7 +73,7 @@ struct _BrowserWindowClass {@@ -21754,30 +22070,51 @@ index bd00606c26b6fedb75978ed26a9b07f4b70828d8..8460a4ae5ff7461e3435fe2e704bb04ereturn FALSE;/* Multiple tabs are not allowed in editor mode. */-@@ -1498,6 +1496,12 @@ static gboolean browserWindowDeleteEvent(GtkWidget *widget, GdkEventAny* event)+@@ -1498,6 +1496,28 @@ static gboolean browserWindowDeleteEvent(GtkWidget *widget, GdkEventAny* event)}#endif++#if GTK_CHECK_VERSION(3, 98, 0)++static void zero_widget_measure (GtkWidget *widget,++ GtkOrientation orientation,++ int for_size,++ int *minimum_size,++ int *natural_size,++ int *minimum_baseline,++ int *natural_baseline)++{++ *minimum_size = 10;++ *natural_size = 10;++ // *minimum_baseline = 10;++ // *natural_baseline = 10;++}++#else+static void zeroPreferredSize(GtkWidget* widget, gint* minimumSize, gint* naturalSize)+{+ *minimumSize = 10;+ *naturalSize = 10;+}++#endif+static void browser_window_class_init(BrowserWindowClass *klass){GObjectClass *gobjectClass = G_OBJECT_CLASS(klass);-@@ -1511,6 +1515,14 @@ static void browser_window_class_init(BrowserWindowClass *klass)+@@ -1511,6 +1531,19 @@ static void browser_window_class_init(BrowserWindowClass *klass)GtkWidgetClass *widgetClass = GTK_WIDGET_CLASS(klass);widgetClass->delete_event = browserWindowDeleteEvent;#endif++// Playwrigth begin-+ // Override preferred (which is minimum :-) size to 0 so that we can-+ // emulate arbitrary resolution.++// Override preferred (which is minimum :-) size to 0 so that we can++// emulate arbitrary resolution.++#if GTK_CHECK_VERSION(3, 98, 0)++ GtkWidgetClass* browserWidgetClass = GTK_WIDGET_CLASS(klass);++ browserWidgetClass->measure = zero_widget_measure;++#else+ GtkWidgetClass* browserWidgetClass = GTK_WIDGET_CLASS(klass);+ browserWidgetClass->get_preferred_width = zeroPreferredSize;+ browserWidgetClass->get_preferred_height = zeroPreferredSize;++#endif+// Playwrigth end}@@ -21796,10 +22133,10 @@ index 1fd07efb828b85b6d8def6c6cd92a0c11debfe1b..da9fac7975d477857ead2adb1d67108dtypedef struct _BrowserWindow BrowserWindow;diff --git a/Tools/MiniBrowser/gtk/main.c b/Tools/MiniBrowser/gtk/main.c-index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4ee6c664754 100644+index 0dd4a639e69f52e674c6bbe257e35daabd25d077..1c0af52edd19d19d30136158f25ede2618bb386a 100644--- a/Tools/MiniBrowser/gtk/main.c+++ b/Tools/MiniBrowser/gtk/main.c-@@ -75,7 +75,12 @@ static char* timeZone;+@@ -75,9 +75,14 @@ static char* timeZone;static gboolean enableITP;static gboolean exitAfterLoad;static gboolean webProcessCrashed;@@ -21808,14 +22145,16 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4ee+static gboolean noStartupWindow;+static const char *userDataDir;static gboolean printVersion;+ static char *configFile;+ static GSettings *interfaceSettings;+static GtkApplication *browserApplication = NULL;#if !GTK_CHECK_VERSION(3, 98, 0)static gboolean enableSandbox;-@@ -179,6 +184,10 @@ static const GOptionEntry commandLineOptions[] =- { "exit-after-load", 0, 0, G_OPTION_ARG_NONE, &exitAfterLoad, "Quit the browser after the load finishes", NULL },+@@ -182,6 +187,10 @@ static const GOptionEntry commandLineOptions[] ={ "time-zone", 't', 0, G_OPTION_ARG_STRING, &timeZone, "Set time zone", "TIMEZONE" },{ "version", 'v', 0, G_OPTION_ARG_NONE, &printVersion, "Print the WebKitGTK version", NULL },+ { "config", 'C', 0, G_OPTION_ARG_FILENAME, &configFile, "Path to a configuration file", "PATH" },+ { "inspector-pipe", 0, 0, G_OPTION_ARG_NONE, &inspectorPipe, "Open pipe connection to the remote inspector", NULL },+ { "user-data-dir", 0, 0, G_OPTION_ARG_STRING, &userDataDir, "Default profile persistence folder location", NULL },+ { "headless", 0, 0, G_OPTION_ARG_NONE, &headless, "Noop headless operation", NULL },@@ -21823,15 +22162,20 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4ee{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, 0, "[URL…]" },{ 0, 0, 0, 0, 0, 0, 0 }};-@@ -736,6 +745,57 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul+@@ -739,6 +748,70 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResulg_main_loop_quit(data->mainLoop);}+static WebKitSettings* createPlaywrightSettings() {+ WebKitSettings* webkitSettings = webkit_settings_new();++#if GTK_CHECK_VERSION(3, 98, 0)++ // FIXME(Playwright): in GTK4, WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS is the default, but the page content is just black in that case.++ webkit_settings_set_hardware_acceleration_policy(webkitSettings, WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER);++#else+ // Playwright: revert to the default state before https://github.com/WebKit/WebKit/commit/a73a25b9ea9229987c8fa7b2e092e6324cb17913+ webkit_settings_set_hardware_acceleration_policy(webkitSettings, WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER);+ webkit_settings_set_hardware_acceleration_policy(webkitSettings, WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND);++#endif+ return webkitSettings;+}+@@ -21845,10 +22189,18 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4ee+ WebKitWebView *newWebView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,+ "web-context", context,+ "settings", createPlaywrightSettings(),++#if GTK_CHECK_VERSION(3, 98, 0)++ "network-session", webkit_web_context_get_network_session_for_automation(context),++#else+ "is-ephemeral", webkit_web_context_is_ephemeral(context),++#endif+ "is-controlled-by-automation", TRUE,+ NULL));++#if GTK_CHECK_VERSION(3, 98, 0)++ GtkWidget *newWindow = browser_window_new(NULL, context, webkit_web_context_get_network_session_for_automation(context));++#else+ GtkWidget *newWindow = browser_window_new(NULL, context);++#endif+ gtk_window_set_application(GTK_WINDOW(newWindow), browserApplication);+ browser_window_append_view(BROWSER_WINDOW(newWindow), newWebView);+ gtk_widget_grab_focus(GTK_WIDGET(newWebView));@@ -21881,7 +22233,7 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4eestatic void startup(GApplication *application){const char *actionAccels[] = {-@@ -766,6 +826,14 @@ static void startup(GApplication *application)+@@ -797,17 +870,30 @@ static void setupDarkMode(GtkSettings *settings)static void activate(GApplication *application, WebKitSettings *webkitSettings){@@ -21896,7 +22248,36 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4ee#if GTK_CHECK_VERSION(3, 98, 0)WebKitWebContext *webContext = g_object_new(WEBKIT_TYPE_WEB_CONTEXT, "time-zone-override", timeZone, NULL);webkit_web_context_set_automation_allowed(webContext, automationMode);-@@ -818,9 +886,12 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)+ g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), application);++ WebKitNetworkSession *networkSession;+- if (automationMode)+- networkSession = g_object_ref(webkit_web_context_get_network_session_for_automation(webContext));+- else if (privateMode)++ if (userDataDir) {++ char *dataDirectory = g_build_filename(userDataDir, "data", NULL);++ char *cacheDirectory = g_build_filename(userDataDir, "cache", NULL);++ networkSession = webkit_network_session_new(dataDirectory, cacheDirectory);++ g_free(dataDirectory);++ g_free(cacheDirectory);++ cookiesFile = g_build_filename(userDataDir, "cookies.txt", NULL);++ } else if (inspectorPipe || privateMode || automationMode) {+ networkSession = webkit_network_session_new_ephemeral();+- else {++ } else {+ char *dataDirectory = g_build_filename(g_get_user_data_dir(), "webkitgtk-" WEBKITGTK_API_VERSION, "MiniBrowser", NULL);+ char *cacheDirectory = g_build_filename(g_get_user_cache_dir(), "webkitgtk-" WEBKITGTK_API_VERSION, "MiniBrowser", NULL);+ networkSession = webkit_network_session_new(dataDirectory, cacheDirectory);+@@ -815,6 +901,8 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)+ g_free(cacheDirectory);+ }+++ webkit_web_context_set_network_session_for_automation(webContext, networkSession);+++ webkit_network_session_set_itp_enabled(networkSession, enableITP);++ if (!automationMode) {+@@ -849,9 +937,12 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)}#elseWebKitWebsiteDataManager *manager;@@ -21911,7 +22292,7 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4eechar *dataDirectory = g_build_filename(g_get_user_data_dir(), "webkitgtk-" WEBKITGTK_API_VERSION, "MiniBrowser", NULL);char *cacheDirectory = g_build_filename(g_get_user_cache_dir(), "webkitgtk-" WEBKITGTK_API_VERSION, "MiniBrowser", NULL);manager = webkit_website_data_manager_new("base-data-directory", dataDirectory, "base-cache-directory", cacheDirectory, NULL);-@@ -871,6 +942,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)+@@ -901,6 +992,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)// Enable the favicon database.webkit_web_context_set_favicon_database_directory(webContext, NULL);#endif@@ -21919,7 +22300,7 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4eewebkit_web_context_register_uri_scheme(webContext, BROWSER_ABOUT_SCHEME, (WebKitURISchemeRequestCallback)aboutURISchemeRequestCallback, NULL, NULL);-@@ -941,9 +1013,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)+@@ -970,9 +1062,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)if (exitAfterLoad)exitAfterWebViewLoadFinishes(webView, application);}@@ -21930,7 +22311,7 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4ee}} else {WebKitWebView *webView = createBrowserTab(mainWindow, webkitSettings, userContentManager, defaultWebsitePolicies);-@@ -993,7 +1063,7 @@ int main(int argc, char *argv[])+@@ -1022,7 +1112,7 @@ int main(int argc, char *argv[])g_option_context_add_group(context, gst_init_get_option_group());#endif@@ -21939,7 +22320,7 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4eewebkit_settings_set_enable_developer_extras(webkitSettings, TRUE);webkit_settings_set_enable_webgl(webkitSettings, TRUE);webkit_settings_set_enable_media_stream(webkitSettings, TRUE);-@@ -1025,9 +1095,11 @@ int main(int argc, char *argv[])+@@ -1074,9 +1164,11 @@ int main(int argc, char *argv[])}GtkApplication *application = gtk_application_new("org.webkitgtk.MiniBrowser", G_APPLICATION_NON_UNIQUE);@@ -21950,9 +22331,9 @@ index 451e0333dd4e8f5d6313fa80c5027ef2661a61ac..7398af4772ed9a479b1632e38af2d4ee+ browserApplication = NULL;g_object_unref(application);- return exitAfterLoad && webProcessCrashed ? 1 : 0;+ g_clear_object(&interfaceSettings);diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp-index 3c2476471ef67299da6312d0f995fc0738aa96c9..b13ab78bfe62c8c2cdd052e24255a780bbc2afa3 100644+index 3c2476471ef67299da6312d0f995fc0738aa96c9..bdbc645f41d254e75ae8aba6eb2850c1f03a8746 100644--- a/Tools/MiniBrowser/wpe/main.cpp+++ b/Tools/MiniBrowser/wpe/main.cpp@@ -45,6 +45,9 @@ static gboolean headlessMode;@@ -22117,7 +22498,7 @@ index 3c2476471ef67299da6312d0f995fc0738aa96c9..b13ab78bfe62c8c2cdd052e24255a780+ return webView;+}+-+static void quitBroserApplication(WebKitBrowserInspector* browser_inspector, gpointer data)++static void quitBroserApplication(WebKitBrowserInspector*, gpointer data)+{+ GApplication* application = static_cast<GApplication*>(data);+ g_application_quit(application);@@ -22281,7 +22662,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 244cfc247fa50bf073ba523913543cab0c6f1b3b..d1cd4657f513d1be167f8d1176dc1217f57acbbd 100644+index 02656db352f2d52dd24e7886e9119edb562be1c1..21366de86e0c2caeb9c040cd9f9f5b966b29438b 100644--- a/Tools/WebKitTestRunner/TestController.cpp+++ b/Tools/WebKitTestRunner/TestController.cpp@@ -964,6 +964,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options)@@ -22349,7 +22730,7 @@ index c7c925b66ea04d8f7a44fb7410ad45acb74f022f..b4738697e5ecb5c947d2bc1864a0f390+} // namespace WTRdiff --git a/Tools/glib/dependencies/apt b/Tools/glib/dependencies/apt-index 7ae5cb94f966df2b730fc54489abf1d8174ed390..c1baaeb0a411ad80d9f6771bd8a3811c4d71d337 100644+index 75ba644cfef7cc80b1520802e149dbc1246d9061..f8ed0d79ec83a2ad4362bf3d6b08a7584c8bc763 100644--- a/Tools/glib/dependencies/apt+++ b/Tools/glib/dependencies/apt@@ -1,11 +1,11 @@@@ -22394,7 +22775,7 @@ index 1e2a9202f88c63afa6525d97d0f945438f5f2032..e6cdee08aff723eb5c6b16491051ca39# These are dependencies necessary for running tests.cups-daemondiff --git a/Tools/gtk/jhbuild.modules b/Tools/gtk/jhbuild.modules-index 5453eb855928744d58e459f8a986535825dc29a0..b7d9568aef262d8e2825569b021ea0f5d0923ba0 100644+index 5453eb855928744d58e459f8a986535825dc29a0..71cf6b873863e06d908c924e545eb9d94be52ab6 100644--- a/Tools/gtk/jhbuild.modules+++ b/Tools/gtk/jhbuild.modules@@ -252,10 +252,10 @@@@ -22403,16 +22784,29 @@ index 5453eb855928744d58e459f8a986535825dc29a0..b7d9568aef262d8e2825569b021ea0f5</dependencies>- <branch module="/sources/libsoup/3.0/libsoup-${version}.tar.xz"- version="3.0.7"-+ <branch module="/sources/libsoup/3.2/libsoup-${version}.tar.xz"-+ version="3.2.2"++ <branch module="/sources/libsoup/3.4/libsoup-${version}.tar.xz"++ version="3.4.4"repo="download.gnome.org"- hash="sha256:ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8">-+ hash="sha256:83673c685b910fb7d39f1f28eee5afbefb71c05798fc350ac3bf1b885e1efaa1">++ hash="sha256:291c67725f36ed90ea43efff25064b69c5a2d1981488477c05c481a3b4b0c5aa"></branch></meson>+@@ -378,9 +378,9 @@+ <meson id="libdrm" mesonargs="-Dtegra=enabled -Dcairo-tests=disabled -Dman-pages=disabled -Dvalgrind=disabled -Dudev=false -Dtests=false">+ <pkg-config>libdrm.pc</pkg-config>+ <branch module="mesa/drm.git"+- version="2.4.113"+- tag="libdrm-2.4.113"+- checkoutdir="libdrm-2.4.113"++ version="2.4.120"++ tag="libdrm-2.4.120"++ checkoutdir="libdrm-2.4.120"+ repo="git.freedesktop.org" />+ </meson>+diff --git a/Tools/jhbuild/jhbuild-minimal.modules b/Tools/jhbuild/jhbuild-minimal.modules-index fe58a444522de94d8f2a57c538a8e7bca93e5c74..78fd69a2a98cb0a826cba13f95c3f419b4376045 100644+index 056c4052b8ee34b35262f7f24b11dae4168d3a02..4455a928333323afeff87f56a4ab983ecac7f2b6 100644--- a/Tools/jhbuild/jhbuild-minimal.modules+++ b/Tools/jhbuild/jhbuild-minimal.modules@@ -32,7 +32,6 @@@@ -22423,21 +22817,37 @@ index fe58a444522de94d8f2a57c538a8e7bca93e5c74..78fd69a2a98cb0a826cba13f95c3f419<dep package="wayland"/><dep package="wayland-protocols"/><dep package="wpebackend-fdo"/>-@@ -132,10 +131,10 @@+@@ -121,23 +120,22 @@+ <meson id="libdrm" mesonargs="-Dtegra=enabled -Dcairo-tests=disabled -Dman-pages=disabled -Dvalgrind=disabled -Dudev=false -Dtests=false">+ <pkg-config>libdrm.pc</pkg-config>+ <branch module="mesa/drm.git"+- version="2.4.113"+- tag="libdrm-2.4.113"+- checkoutdir="libdrm-2.4.113"++ version="2.4.120"++ tag="libdrm-2.4.120"++ checkoutdir="libdrm-2.4.120"+ repo="git.freedesktop.org" />+ </meson>++ <meson id="libsoup" mesonargs="-Dgssapi=disabled -Dvapi=disabled -Dntlm=disabled -Dsysprof=disabled -Dautobahn=disabled -Dpkcs11_tests=disabled">+- <pkg-config>libsoup-3.0.pc</pkg-config>+ <dependencies>+ <dep package="glib"/><dep package="glib-networking"/><dep package="libpsl"/></dependencies>- <branch module="/sources/libsoup/3.0/libsoup-${version}.tar.xz"- version="3.0.7"-+ <branch module="/sources/libsoup/3.2/libsoup-${version}.tar.xz"-+ version="3.2.2"++ <branch module="/sources/libsoup/3.4/libsoup-${version}.tar.xz"++ version="3.4.4"repo="download.gnome.org"- hash="sha256:ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8">-+ hash="sha256:83673c685b910fb7d39f1f28eee5afbefb71c05798fc350ac3bf1b885e1efaa1">++ hash="sha256:291c67725f36ed90ea43efff25064b69c5a2d1981488477c05c481a3b4b0c5aa"></branch></meson>-@@ -231,6 +230,16 @@+@@ -233,6 +231,16 @@</dependencies></meson>@@ -22445,9 +22855,9 @@ index fe58a444522de94d8f2a57c538a8e7bca93e5c74..78fd69a2a98cb0a826cba13f95c3f419+ <meson id="libdrm" mesonargs="-Dtegra=enabled -Dcairo-tests=disabled -Dman-pages=disabled -Dvalgrind=disabled -Dudev=false -Dtests=false">+ <pkg-config>libdrm.pc</pkg-config>+ <branch module="mesa/drm.git"-+ version="2.4.113"-+ tag="libdrm-2.4.113"-+ checkoutdir="libdrm-2.4.113"++ version="2.4.120"++ tag="libdrm-2.4.120"++ checkoutdir="libdrm-2.4.120"+ repo="git.freedesktop.org" />+ </meson>+@@ -22517,32 +22927,37 @@ index 05b0196555fbc993ebff3088c1f5926c4cfe391a..dd82d6c324f158045372fb48552fa919static cairo_user_data_key_t bufferKey;cairo_surface_set_user_data(m_snapshot, &bufferKey, buffer,diff --git a/Tools/wpe/jhbuild.modules b/Tools/wpe/jhbuild.modules-index 33286bb2ee2941d430d8e49dba667f700f73edc4..77cea8a9d0e1762da2545852698fdd16dd9bab37 100644+index 33286bb2ee2941d430d8e49dba667f700f73edc4..98e87967086e5d606de4695389608a68629423da 100644--- a/Tools/wpe/jhbuild.modules+++ b/Tools/wpe/jhbuild.modules-@@ -20,6 +20,7 @@- <dep package="libepoxy"/>- <dep package="libgcrypt"/>- <dep package="libgpg-error"/>-+ <dep package="libdrm"/>- <dep package="libjxl"/>- <dep package="libsoup"/>- <dep package="libwpe"/>-@@ -102,10 +103,10 @@+@@ -102,10 +102,10 @@<dep package="glib-networking"/><dep package="libpsl"/></dependencies>- <branch module="/sources/libsoup/3.0/libsoup-${version}.tar.xz"- version="3.0.7"-+ <branch module="/sources/libsoup/3.2/libsoup-${version}.tar.xz"-+ version="3.2.2"++ <branch module="/sources/libsoup/3.4/libsoup-${version}.tar.xz"++ version="3.4.4"repo="download.gnome.org"- hash="sha256:ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8">-+ hash="sha256:83673c685b910fb7d39f1f28eee5afbefb71c05798fc350ac3bf1b885e1efaa1">++ hash="sha256:291c67725f36ed90ea43efff25064b69c5a2d1981488477c05c481a3b4b0c5aa"></branch></meson>-@@ -334,6 +335,16 @@+@@ -161,9 +161,9 @@+ <meson id="libdrm" mesonargs="-Dtegra=enabled -Dcairo-tests=disabled -Dman-pages=disabled -Dvalgrind=disabled -Dudev=false -Dtests=false">+ <pkg-config>libdrm.pc</pkg-config>+ <branch module="mesa/drm.git"+- version="2.4.113"+- tag="libdrm-2.4.113"+- checkoutdir="libdrm-2.4.113"++ version="2.4.120"++ tag="libdrm-2.4.120"++ checkoutdir="libdrm-2.4.120"+ repo="git.freedesktop.org" />+ </meson>++@@ -334,6 +334,16 @@hash="sha256:c625a83b4838befc8cafcd54e3619946515d9e44d63d61c4adf7f5513ddfbebf"/></autotools>@@ -22550,9 +22965,9 @@ index 33286bb2ee2941d430d8e49dba667f700f73edc4..77cea8a9d0e1762da2545852698fdd16+ <meson id="libdrm" mesonargs="-Dtegra=enabled -Dcairo-tests=disabled -Dman-pages=disabled -Dvalgrind=disabled -Dudev=false -Dtests=false">+ <pkg-config>libdrm.pc</pkg-config>+ <branch module="mesa/drm.git"-+ version="2.4.113"-+ tag="libdrm-2.4.113"-+ checkoutdir="libdrm-2.4.113"++ version="2.4.120"++ tag="libdrm-2.4.120"++ checkoutdir="libdrm-2.4.120"+ repo="git.freedesktop.org" />+ </meson>+diff --git a/browser_patches/winldd/archive.sh b/browser_patches/winldd/archive.shindex 02fd1ab8bb..898dcb8258 100755--- a/browser_patches/winldd/archive.sh+++ b/browser_patches/winldd/archive.sh@@ -39,5 +39,4 @@ fi# create a TMP directory to copy all necessary filescd ./x64/Release-zip $ZIP_PATH ./PrintDeps.exe-+7z a "$ZIP_PATH" ./PrintDeps.exe