Skip to content

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

chore: update browser patches as of Feb 7, 2023 (#21824)

Andrey Lushnikova6468b73b2cb
diff --git a/browser_patches/firefox/UPSTREAM_CONFIG.sh b/browser_patches/firefox/UPSTREAM_CONFIG.sh
index 3e1cde2636..29e1497d59 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="e2956def6c181ca7375897992c5c821a5a6c886d"
+BASE_REVISION="fe696abae79ffbfa13037a5d9bd3a2e2b293f2af"
diff --git a/browser_patches/firefox/juggler/Helper.js b/browser_patches/firefox/juggler/Helper.js
index aa225d8917..f0fa13d563 100644
--- a/browser_patches/firefox/juggler/Helper.js
+++ b/browser_patches/firefox/juggler/Helper.js
@@ -17,6 +17,17 @@ class Helper {
objectToDecorate.emit = emitter.emit.bind(emitter);
}
+ collectAllBrowsingContexts(rootBrowsingContext, allBrowsingContexts = []) {
+ allBrowsingContexts.push(rootBrowsingContext);
+ for (const child of rootBrowsingContext.children)
+ this.collectAllBrowsingContexts(child, allBrowsingContexts);
+ return allBrowsingContexts;
+ }
+
+ toProtocolNavigationId(loadIdentifier) {
+ return `nav-${loadIdentifier}`;
+ }
+
addObserver(handler, topic) {
Services.obs.addObserver(handler, topic);
return () => Services.obs.removeObserver(handler, topic);
@@ -27,11 +38,11 @@ class Helper {
return () => receiver.removeMessageListener(eventName, handler);
}
- addEventListener(receiver, eventName, handler) {
- receiver.addEventListener(eventName, handler);
+ addEventListener(receiver, eventName, handler, options) {
+ receiver.addEventListener(eventName, handler, options);
return () => {
try {
- receiver.removeEventListener(eventName, handler);
+ receiver.removeEventListener(eventName, handler, options);
} catch (e) {
// This could fail when window has navigated cross-process
// and we remove the listener from WindowProxy.
@@ -49,11 +60,11 @@ class Helper {
});
}
- on(receiver, eventName, handler) {
+ on(receiver, eventName, handler, options) {
// The toolkit/modules/EventEmitter.jsm dispatches event name as a first argument.
// Fire event listeners without it for convenience.
const handlerWrapper = (_, ...args) => handler(...args);
- receiver.on(eventName, handlerWrapper);
+ receiver.on(eventName, handlerWrapper, options);
return () => receiver.off(eventName, handlerWrapper);
}
@@ -144,10 +155,72 @@ class Helper {
browsingContextToFrameId(browsingContext) {
if (!browsingContext)
return undefined;
- return 'frame-' + browsingContext.id;
+ if (!browsingContext.parent)
+ return 'mainframe-' + browsingContext.browserId;
+ return 'subframe-' + browsingContext.id;
+ }
+}
+
+const helper = new Helper();
+
+class EventWatcher {
+ constructor(receiver, eventNames) {
+ this._events = [];
+ this._pendingPromises = [];
+ this._eventListeners = eventNames.map(eventName =>
+ helper.on(receiver, eventName, this._onEvent.bind(this, eventName)),
+ );
+ }
+
+ _onEvent(eventName, eventObject) {
+ this._events.push({eventName, eventObject});
+ for (const promise of this._pendingPromises)
+ promise.resolve();
+ this._pendingPromises = [];
+ }
+
+ async ensureEvent(aEventName, predicate) {
+ if (typeof aEventName !== 'string')
+ throw new Error('ERROR: ensureEvent expects a "string" as its first argument');
+ while (true) {
+ const result = this.getEvent(aEventName, predicate);
+ if (result)
+ return result;
+ await new Promise((resolve, reject) => this._pendingPromises.push({resolve, reject}));
+ }
+ }
+
+ async ensureEvents(eventNames, predicate) {
+ if (!Array.isArray(eventNames))
+ throw new Error('ERROR: ensureEvents expects an array of event names as its first argument');
+ return await Promise.all(eventNames.map(eventName => this.ensureEvent(eventName, predicate)));
+ }
+
+ async ensureEventsAndDispose(eventNames, predicate) {
+ if (!Array.isArray(eventNames))
+ throw new Error('ERROR: ensureEventsAndDispose expects an array of event names as its first argument');
+ const result = await this.ensureEvents(eventNames, predicate);
+ this.dispose();
+ return result;
+ }
+
+ getEvent(aEventName, predicate = (eventObject) => true) {
+ return this._events.find(({eventName, eventObject}) => eventName === aEventName && predicate(eventObject))?.eventObject;
+ }
+
+ hasEvent(aEventName, predicate) {
+ return !!this.getEvent(aEventName, predicate);
+ }
+
+ dispose() {
+ for (const promise of this._pendingPromises)
+ promise.reject(new Error('EventWatcher is being disposed'));
+ this._pendingPromises = [];
+ helper.removeListeners(this._eventListeners);
}
}
-var EXPORTED_SYMBOLS = [ "Helper" ];
+var EXPORTED_SYMBOLS = [ "Helper", "EventWatcher" ];
this.Helper = Helper;
+this.EventWatcher = EventWatcher;
diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.js
index 60636978e9..2610b37f41 100644
--- a/browser_patches/firefox/juggler/NetworkObserver.js
+++ b/browser_patches/firefox/juggler/NetworkObserver.js
@@ -119,7 +119,7 @@ class NetworkRequest {
this._frameId = helper.browsingContextToFrameId(browsingContext);
this.requestId = httpChannel.channelId + '';
- this.navigationId = httpChannel.isMainDocumentChannel ? this.requestId : undefined;
+ this.navigationId = httpChannel.isMainDocumentChannel ? helper.toProtocolNavigationId(browsingContext.jugglerCurrentLoadIdentifier) : undefined;
this._redirectedIndex = 0;
if (redirectedFrom) {
diff --git a/browser_patches/firefox/juggler/SimpleChannel.js b/browser_patches/firefox/juggler/SimpleChannel.js
index 6f9b948f19..9abe2146fc 100644
--- a/browser_patches/firefox/juggler/SimpleChannel.js
+++ b/browser_patches/firefox/juggler/SimpleChannel.js
@@ -43,6 +43,7 @@ class SimpleChannel {
dispose: () => {},
};
this._ready = false;
+ this._paused = false;
this._disposed = false;
}
@@ -80,6 +81,23 @@ class SimpleChannel {
this.transport.sendMessage('READY');
}
+ pause() {
+ this._paused = true;
+ }
+
+ resumeSoon() {
+ if (!this._paused)
+ return;
+ this._paused = false;
+ this._setTimeout(() => this._deliverBufferedIncomingMessages(), 0);
+ }
+
+ _setTimeout(cb, timeout) {
+ // Lazy load on first call.
+ this._setTimeout = ChromeUtils.import('resource://gre/modules/Timer.jsm').setTimeout;
+ this._setTimeout(cb, timeout);
+ }
+
_markAsReady() {
if (this._ready)
return;
@@ -121,13 +139,16 @@ class SimpleChannel {
if (this._handlers.has(namespace))
throw new Error('ERROR: double-register for namespace ' + namespace);
this._handlers.set(namespace, handler);
- // Try to re-deliver all pending messages.
+ this._deliverBufferedIncomingMessages();
+ return () => this.unregister(namespace);
+ }
+
+ _deliverBufferedIncomingMessages() {
const bufferedRequests = this._bufferedIncomingMessages;
this._bufferedIncomingMessages = [];
for (const data of bufferedRequests) {
this._onMessage(data);
}
- return () => this.unregister(namespace);
}
unregister(namespace) {
@@ -154,7 +175,7 @@ class SimpleChannel {
return promise;
}
- async _onMessage(data) {
+ _onMessage(data) {
if (data === 'READY') {
this.transport.sendMessage('READY_ACK');
this._markAsReady();
@@ -164,6 +185,13 @@ class SimpleChannel {
this._markAsReady();
return;
}
+ if (this._paused)
+ this._bufferedIncomingMessages.push(data);
+ else
+ this._onMessageInternal(data);
+ }
+
+ async _onMessageInternal(data) {
if (data.responseId) {
const message = this._pendingMessages.get(data.responseId);
if (!message) {
diff --git a/browser_patches/firefox/juggler/TargetRegistry.js b/browser_patches/firefox/juggler/TargetRegistry.js
index 4a3fe17743..80195058f6 100644
--- a/browser_patches/firefox/juggler/TargetRegistry.js
+++ b/browser_patches/firefox/juggler/TargetRegistry.js
@@ -141,15 +141,6 @@ class TargetRegistry {
}
}, 'oop-frameloader-crashed');
- helper.addObserver((browsingContext, topic, why) => {
- if (why === 'replace') {
- // Top-level browsingContext is replaced on cross-process navigations.
- const target = this._browserIdToTarget.get(browsingContext.browserId);
- if (target)
- target.replaceTopBrowsingContext(browsingContext);
- }
- }, 'browsing-context-attached');
-
const onTabOpenListener = (appWindow, window, event) => {
const tab = event.target;
const userContextId = tab.userContextId;
@@ -379,6 +370,7 @@ class PageTarget {
helper.addObserver(this._updateModalDialogs.bind(this), 'tabmodal-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()),
];
this._disposed = false;
@@ -389,6 +381,27 @@ class PageTarget {
this._registry.emit(TargetRegistry.Events.TargetCreated, this);
}
+ async activateAndRun(callback = () => {}) {
+ const ownerWindow = this._tab.linkedBrowser.ownerGlobal;
+ const tabBrowser = ownerWindow.gBrowser;
+ // Serialize all tab-switching commands per tabbed browser
+ // to disallow concurrent tab switching.
+ tabBrowser.__serializedChain = (tabBrowser.__serializedChain ?? Promise.resolve()).then(async () => {
+ this._window.focus();
+ if (tabBrowser.selectedTab !== this._tab) {
+ const promise = helper.awaitEvent(ownerWindow, 'TabSwitchDone');
+ tabBrowser.selectedTab = this._tab;
+ await promise;
+ }
+ await callback();
+ });
+ return tabBrowser.__serializedChain;
+ }
+
+ frameIdToBrowsingContext(frameId) {
+ return helper.collectAllBrowsingContexts(this._linkedBrowser.browsingContext).find(bc => helper.browsingContextToFrameId(bc) === frameId);
+ }
+
nextActorSequenceNumber() {
return ++this._actorSequenceNumber;
}
@@ -407,13 +420,8 @@ class PageTarget {
this._channel.resetTransport();
}
- replaceTopBrowsingContext(browsingContext) {
- if (this._actor && this._actor.browsingContext !== browsingContext) {
- // Disconnect early to avoid receiving protocol messages from the old actor.
- this.removeActor(this._actor);
- }
- this.emit(PageTarget.Events.TopBrowsingContextReplaced);
- this.updateOverridesForBrowsingContext(browsingContext);
+ _willChangeBrowserRemoteness() {
+ this.removeActor(this._actor);
}
dialog(dialogId) {
@@ -721,7 +729,6 @@ PageTarget.Events = {
Crashed: Symbol('PageTarget.Crashed'),
DialogOpened: Symbol('PageTarget.DialogOpened'),
DialogClosed: Symbol('PageTarget.DialogClosed'),
- TopBrowsingContextReplaced: Symbol('PageTarget.TopBrowsingContextReplaced'),
};
function fromProtocolColorScheme(colorScheme) {
diff --git a/browser_patches/firefox/juggler/components/Juggler.js b/browser_patches/firefox/juggler/components/Juggler.js
index ba7e240749..6ed8580078 100644
--- a/browser_patches/firefox/juggler/components/Juggler.js
+++ b/browser_patches/firefox/juggler/components/Juggler.js
@@ -35,6 +35,8 @@ ActorManagerParent.addJSWindowActors({
DOMDocElementInserted: {},
// Also, listening to DOMContentLoaded.
DOMContentLoaded: {},
+ DOMWillOpenModalDialog: {},
+ DOMModalDialogClosed: {},
},
},
allFrames: true,
diff --git a/browser_patches/firefox/juggler/content/FrameTree.js b/browser_patches/firefox/juggler/content/FrameTree.js
index dfa169553a..680ec5303d 100644
--- a/browser_patches/firefox/juggler/content/FrameTree.js
+++ b/browser_patches/firefox/juggler/content/FrameTree.js
@@ -57,12 +57,21 @@ class FrameTree {
const flags = Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT |
Ci.nsIWebProgress.NOTIFY_LOCATION;
this._eventListeners = [
+ helper.addObserver((docShell, topic, loadIdentifier) => {
+ const frame = this._docShellToFrame.get(docShell);
+ if (!frame)
+ return;
+ frame._pendingNavigationId = helper.toProtocolNavigationId(loadIdentifier);
+ this.emit(FrameTree.Events.NavigationStarted, frame);
+ }, 'juggler-navigation-started-renderer'),
helper.addObserver(this._onDOMWindowCreated.bind(this), 'content-document-global-created'),
helper.addObserver(this._onDOMWindowCreated.bind(this), 'juggler-dom-window-reused'),
helper.addObserver(subject => this._onDocShellCreated(subject.QueryInterface(Ci.nsIDocShell)), 'webnavigation-create'),
helper.addObserver(subject => this._onDocShellDestroyed(subject.QueryInterface(Ci.nsIDocShell)), 'webnavigation-destroy'),
helper.addProgressListener(webProgress, this, flags),
];
+
+ this._mouseEventListeners = [];
}
workers() {
@@ -222,6 +231,60 @@ class FrameTree {
this._wdm.removeListener(this._wdmListener);
this._runtime.dispose();
helper.removeListeners(this._eventListeners);
+ helper.removeListeners(this._mouseEventListeners);
+ }
+
+ _onMouseEvent(eventType, eventObject) {
+ this.emit(FrameTree.Events.MouseEvent, {
+ type: eventType,
+ eventObject,
+ });
+ }
+
+ onWindowEvent(event) {
+ if (event.type !== 'DOMDocElementInserted' || !event.target.ownerGlobal)
+ return;
+
+ const docShell = event.target.ownerGlobal.docShell;
+ const frame = this._docShellToFrame.get(docShell);
+ if (!frame) {
+ dump(`WARNING: ${event.type} for unknown frame ${docShell.browsingContext.id}\n`);
+ return;
+ }
+ if (frame._pendingNavigationId) {
+ const url = docShell.domWindow ? docShell.domWindow.location.href : 'about:blank';
+ this._frameNavigationCommitted(frame, url);
+ }
+
+ if (frame === this._mainFrame) {
+ helper.removeListeners(this._mouseEventListeners);
+ const chromeEventHandler = docShell.chromeEventHandler;
+ const options = {
+ mozSystemGroup: true,
+ capture: true,
+ };
+ this._mouseEventListeners = [
+ helper.addEventListener(chromeEventHandler, 'dragover', this._onMouseEvent.bind(this, 'dragover'), options),
+ helper.addEventListener(chromeEventHandler, 'dragend', this._onMouseEvent.bind(this, 'dragend'), options),
+ helper.addEventListener(chromeEventHandler, 'contextmenu', this._onMouseEvent.bind(this, 'contextmenu'), options),
+ helper.addEventListener(chromeEventHandler, 'mousedown', this._onMouseEvent.bind(this, 'mousedown'), options),
+ helper.addEventListener(chromeEventHandler, 'mouseup', this._onMouseEvent.bind(this, 'mouseup'), options),
+ helper.addEventListener(chromeEventHandler, 'mousemove', this._onMouseEvent.bind(this, 'mousemove'), options),
+ helper.addEventListener(chromeEventHandler, 'dragstart', this._onMouseEvent.bind(this, 'dragstart'), options),
+ ];
+ }
+ }
+
+ _frameNavigationCommitted(frame, url) {
+ for (const subframe of frame._children)
+ this._detachFrame(subframe);
+ const navigationId = frame._pendingNavigationId;
+ frame._pendingNavigationId = null;
+ frame._lastCommittedNavigationId = navigationId;
+ frame._url = url;
+ this.emit(FrameTree.Events.NavigationCommitted, frame);
+ if (frame === this._mainFrame)
+ this.forcePageReady();
}
onStateChange(progress, request, flag, status) {
@@ -230,10 +293,8 @@ class FrameTree {
const channel = request.QueryInterface(Ci.nsIChannel);
const docShell = progress.DOMWindow.docShell;
const frame = this._docShellToFrame.get(docShell);
- if (!frame) {
- dump(`WARNING: got a state changed event for un-tracked docshell!\n`);
+ if (!frame)
return;
- }
if (!channel.isDocument) {
// Somehow, we can get worker requests here,
@@ -241,32 +302,11 @@ class FrameTree {
return;
}
- const isStart = flag & Ci.nsIWebProgressListener.STATE_START;
- const isTransferring = flag & Ci.nsIWebProgressListener.STATE_TRANSFERRING;
const isStop = flag & Ci.nsIWebProgressListener.STATE_STOP;
-
- if (isStart) {
- // Starting a new navigation.
- frame._pendingNavigationId = channelId(channel);
- frame._pendingNavigationURL = channel.URI.spec;
- this.emit(FrameTree.Events.NavigationStarted, frame);
- } else if (isTransferring || (isStop && frame._pendingNavigationId && !status)) {
- // Navigation is committed.
- for (const subframe of frame._children)
- this._detachFrame(subframe);
- const navigationId = frame._pendingNavigationId;
- frame._pendingNavigationId = null;
- frame._pendingNavigationURL = null;
- frame._lastCommittedNavigationId = navigationId;
- frame._url = channel.URI.spec;
- this.emit(FrameTree.Events.NavigationCommitted, frame);
- if (frame === this._mainFrame)
- this.forcePageReady();
- } else if (isStop && frame._pendingNavigationId && status) {
+ if (isStop && frame._pendingNavigationId && status) {
// Navigation is aborted.
const navigationId = frame._pendingNavigationId;
frame._pendingNavigationId = null;
- frame._pendingNavigationURL = null;
// Always report download navigation as failure to match other browsers.
const errorText = helper.getNetworkErrorStatusText(status);
this.emit(FrameTree.Events.NavigationAborted, frame, navigationId, errorText);
@@ -307,6 +347,8 @@ class FrameTree {
const frame = new Frame(this, this._runtime, docShell, parentFrame);
this._docShellToFrame.set(docShell, frame);
this._frameIdToFrame.set(frame.id(), frame);
+ if (docShell.domWindow && docShell.domWindow.location)
+ frame._url = docShell.domWindow.location.href;
this.emit(FrameTree.Events.FrameAttached, frame);
// Create execution context **after** reporting frame.
// This is our protocol contract.
@@ -355,6 +397,7 @@ FrameTree.Events = {
NavigationAborted: 'navigationaborted',
SameDocumentNavigation: 'samedocumentnavigation',
PageReady: 'pageready',
+ MouseEvent: 'mouseevent',
};
class IsolatedWorld {
@@ -374,8 +417,6 @@ class Frame {
this._frameId = helper.browsingContextToFrameId(this._docShell.browsingContext);
this._parentFrame = null;
this._url = '';
- if (docShell.domWindow && docShell.domWindow.location)
- this._url = docShell.domWindow.location.href;
if (parentFrame) {
this._parentFrame = parentFrame;
parentFrame._children.add(this);
@@ -383,7 +424,6 @@ class Frame {
this._lastCommittedNavigationId = null;
this._pendingNavigationId = null;
- this._pendingNavigationURL = null;
this._textInputProcessor = null;
@@ -571,10 +611,6 @@ class Frame {
return this._pendingNavigationId;
}
- pendingNavigationURL() {
- return this._pendingNavigationURL;
- }
-
lastCommittedNavigationId() {
return this._lastCommittedNavigationId;
}
diff --git a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm
index ba918931ec..80b532c6b9 100644
--- a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm
+++ b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm
@@ -17,8 +17,18 @@ class JugglerFrameChild extends JSWindowActorChild {
}
handleEvent(aEvent) {
+ if (this._agents && aEvent.type === 'DOMWillOpenModalDialog') {
+ this._agents.channel.pause();
+ return;
+ }
+ if (this._agents && aEvent.type === 'DOMModalDialogClosed') {
+ this._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);
}
actorCreated() {
diff --git a/browser_patches/firefox/juggler/content/PageAgent.js b/browser_patches/firefox/juggler/content/PageAgent.js
index c727d46d86..dbdc3bebe3 100644
--- a/browser_patches/firefox/juggler/content/PageAgent.js
+++ b/browser_patches/firefox/juggler/content/PageAgent.js
@@ -4,12 +4,15 @@
"use strict";
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm');
+const {setTimeout} = ChromeUtils.import('resource://gre/modules/Timer.jsm');
+
const dragService = Cc["@mozilla.org/widget/dragservice;1"].getService(
Ci.nsIDragService
);
@@ -61,7 +64,6 @@ class PageAgent {
const docShell = frameTree.mainFrame().docShell();
this._docShell = docShell;
this._initialDPPX = docShell.contentViewer.overrideDPPX;
- this._dragging = false;
// Dispatch frameAttached events for all initial frames
for (const frame of this._frameTree.frames()) {
@@ -114,6 +116,16 @@ class PageAgent {
helper.on(this._frameTree, 'websocketframesent', event => this._browserPage.emit('webSocketFrameSent', event)),
helper.on(this._frameTree, 'websocketframereceived', event => this._browserPage.emit('webSocketFrameReceived', event)),
helper.on(this._frameTree, 'websocketclosed', event => this._browserPage.emit('webSocketClosed', event)),
+ helper.on(this._frameTree, 'mouseevent', event => {
+ this._browserPage.emit('pageInputEvent', { type: event.type });
+ if (event.type === 'dragstart') {
+ // After the dragStart event is dispatched and handled by Web,
+ // it might or might not create a new drag session, depending on its preventing default.
+ setTimeout(() => {
+ this._browserPage.emit('pageInputEvent', { type: 'juggler-drag-finalized', dragSessionStarted: !!dragService.getCurrentSession() });
+ }, 0);
+ }
+ }),
helper.addObserver(this._onWindowOpen.bind(this), 'webNavigation-createdNavigationTarget-from-js'),
this._runtime.events.onErrorFromWorker((domWindow, message, stack) => {
const frame = this._frameTree.frameForDocShell(domWindow.docShell);
@@ -135,13 +147,12 @@ class PageAgent {
crash: this._crash.bind(this),
describeNode: this._describeNode.bind(this),
dispatchKeyEvent: this._dispatchKeyEvent.bind(this),
- dispatchMouseEvent: this._dispatchMouseEvent.bind(this),
+ dispatchDragEvent: this._dispatchDragEvent.bind(this),
dispatchTouchEvent: this._dispatchTouchEvent.bind(this),
dispatchTapEvent: this._dispatchTapEvent.bind(this),
getContentQuads: this._getContentQuads.bind(this),
getFullAXTree: this._getFullAXTree.bind(this),
insertText: this._insertText.bind(this),
- navigate: this._navigate.bind(this),
scrollIntoViewIfNeeded: this._scrollIntoViewIfNeeded.bind(this),
setCacheDisabled: this._setCacheDisabled.bind(this),
setFileInputFiles: this._setFileInputFiles.bind(this),
@@ -286,7 +297,6 @@ class PageAgent {
this._browserPage.emit('pageNavigationStarted', {
frameId: frame.id(),
navigationId: frame.pendingNavigationId(),
- url: frame.pendingNavigationURL(),
});
}
@@ -346,39 +356,6 @@ class PageAgent {
helper.removeListeners(this._eventListeners);
}
- async _navigate({frameId, url, referer}) {
- try {
- const uri = NetUtil.newURI(url);
- } catch (e) {
- throw new Error(`Invalid url: "${url}"`);
- }
- let referrerURI = null;
- let referrerInfo = null;
- if (referer) {
- try {
- referrerURI = NetUtil.newURI(referer);
- const ReferrerInfo = Components.Constructor(
- '@mozilla.org/referrer-info;1',
- 'nsIReferrerInfo',
- 'init'
- );
- referrerInfo = new ReferrerInfo(Ci.nsIHttpChannel.REFERRER_POLICY_UNSET, true, referrerURI);
- } catch (e) {
- throw new Error(`Invalid referer: "${referer}"`);
- }
- }
- const frame = this._frameTree.frame(frameId);
- const docShell = frame.docShell().QueryInterface(Ci.nsIWebNavigation);
- docShell.loadURI(url, {
- triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
- flags: Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
- referrerInfo,
- postData: null,
- headers: null,
- });
- return {navigationId: frame.pendingNavigationId(), navigationURL: frame.pendingNavigationURL()};
- }
-
async _adoptNode({frameId, objectId, executionContextId}) {
const frame = this._frameTree.frame(frameId);
if (!frame)
@@ -485,12 +462,6 @@ class PageAgent {
}
async _dispatchKeyEvent({type, keyCode, code, key, repeat, location, text}) {
- // key events don't fire if we are dragging.
- if (this._dragging) {
- if (type === 'keydown' && key === 'Escape')
- this._cancelDragIfNeeded();
- return;
- }
const frame = this._frameTree.mainFrame();
const tip = frame.textInputProcessor();
if (key === 'Meta' && Services.appinfo.OS !== 'Darwin')
@@ -532,7 +503,9 @@ class PageAgent {
touchPoints.map(point => point.radiusY === undefined ? 1.0 : point.radiusY),
touchPoints.map(point => point.rotationAngle === undefined ? 0.0 : point.rotationAngle),
touchPoints.map(point => point.force === undefined ? 1.0 : point.force),
- touchPoints.length,
+ touchPoints.map(point => 0),
+ touchPoints.map(point => 0),
+ touchPoints.map(point => 0),
modifiers);
return {defaultPrevented};
}
@@ -609,20 +582,13 @@ class PageAgent {
true /*disablePointerEvent*/);
}
- _startDragSessionIfNeeded() {
- const sess = dragService.getCurrentSession();
- if (sess) return;
- dragService.startDragSessionForTests(
- Ci.nsIDragService.DRAGDROP_ACTION_MOVE |
- Ci.nsIDragService.DRAGDROP_ACTION_COPY |
- Ci.nsIDragService.DRAGDROP_ACTION_LINK
- );
- }
+ async _dispatchDragEvent({type, x, y, modifiers}) {
+ const session = dragService.getCurrentSession();
+ const dropEffect = session.dataTransfer.dropEffect;
- _simulateDragEvent(type, x, y, modifiers) {
- if (type !== 'drop' || dragService.dragAction) {
- const window = this._frameTree.mainFrame().domWindow();
- window.windowUtils.sendMouseEvent(
+ if ((type === 'drop' && dropEffect !== 'none') || type === 'dragover') {
+ const win = this._frameTree.mainFrame().domWindow();
+ win.windowUtils.sendMouseEvent(
type,
x,
y,
@@ -636,69 +602,13 @@ class PageAgent {
undefined /*isWidgetEventSynthesized*/,
0, /*buttons*/
);
+ return;
}
- if (type === 'drop')
- this._cancelDragIfNeeded();
- }
-
- _cancelDragIfNeeded() {
- this._dragging = false;
- const sess = dragService.getCurrentSession();
- if (sess)
- dragService.endDragSession(true);
- }
-
- async _dispatchMouseEvent({type, x, y, button, clickCount, modifiers, buttons}) {
- this._startDragSessionIfNeeded();
- const trapDrag = subject => {
- this._dragging = true;
- }
-
- // Don't send mouse events if there is an active drag
- if (!this._dragging) {
- const frame = this._frameTree.mainFrame();
-
- obs.addObserver(trapDrag, 'on-datatransfer-available');
- frame.domWindow().windowUtils.sendMouseEvent(
- type,
- x,
- y,
- button,
- clickCount,
- modifiers,
- false /*aIgnoreRootScrollFrame*/,
- undefined /*pressure*/,
- undefined /*inputSource*/,
- true /*isDOMEventSynthesized*/,
- false /*isWidgetEventSynthesized*/,
- buttons);
- obs.removeObserver(trapDrag, 'on-datatransfer-available');
-
- if (type === 'mousedown' && button === 2) {
- frame.domWindow().windowUtils.sendMouseEvent(
- 'contextmenu',
- x,
- y,
- button,
- clickCount,
- modifiers,
- false /*aIgnoreRootScrollFrame*/,
- undefined /*pressure*/,
- undefined /*inputSource*/,
- undefined /*isDOMEventSynthesized*/,
- undefined /*isWidgetEventSynthesized*/,
- buttons);
- }
- }
-
- // update drag state
- if (this._dragging) {
- if (type === 'mousemove')
- this._simulateDragEvent('dragover', x, y, modifiers);
- else if (type === 'mouseup') // firefox will do drops when any mouse button is released
- this._simulateDragEvent('drop', x, y, modifiers);
- } else {
- this._cancelDragIfNeeded();
+ if (type === 'dragend') {
+ const session = dragService.getCurrentSession();
+ if (session)
+ dragService.endDragSession(true);
+ return;
}
}
diff --git a/browser_patches/firefox/juggler/protocol/Dispatcher.js b/browser_patches/firefox/juggler/protocol/Dispatcher.js
index af72f307ac..8542461d52 100644
--- a/browser_patches/firefox/juggler/protocol/Dispatcher.js
+++ b/browser_patches/firefox/juggler/protocol/Dispatcher.js
@@ -74,6 +74,9 @@ class Dispatcher {
this._connection.send(JSON.stringify({id, sessionId, result}));
} catch (e) {
+ dump(`
+ ERROR: ${e.message} ${e.stack}
+ `);
this._connection.send(JSON.stringify({id, sessionId, error: {
message: e.message,
data: e.stack
diff --git a/browser_patches/firefox/juggler/protocol/PageHandler.js b/browser_patches/firefox/juggler/protocol/PageHandler.js
index cdf408cd4d..82539d4221 100644
--- a/browser_patches/firefox/juggler/protocol/PageHandler.js
+++ b/browser_patches/firefox/juggler/protocol/PageHandler.js
@@ -4,8 +4,9 @@
"use strict";
-const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
+const {Helper, EventWatcher} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm');
const {NetworkObserver, PageNetwork} = ChromeUtils.import('chrome://juggler/content/NetworkObserver.js');
const {PageTarget} = ChromeUtils.import('chrome://juggler/content/TargetRegistry.js');
const {setTimeout} = ChromeUtils.import('resource://gre/modules/Timer.jsm');
@@ -79,6 +80,9 @@ class PageHandler {
return (...args) => this._session.emitEvent(eventName, ...args);
}
+ this._isDragging = false;
+ this._lastMousePosition = { x: 0, y: 0 };
+
this._reportedFrameIds = new Set();
this._networkEventsForUnreportedFrameIds = new Map();
@@ -89,14 +93,12 @@ class PageHandler {
// to be ignored by the protocol clients.
this._isPageReady = false;
- // Whether the page is about to go cross-process after navigation.
- this._isTransferringCrossProcessNavigation = false;
- this._mainFrameId = undefined;
- this._lastMainFrameNavigationId = undefined;
-
if (this._pageTarget.videoRecordingInfo())
this._onVideoRecordingStarted();
+ this._pageEventSink = {};
+ helper.decorateAsEventEmitter(this._pageEventSink);
+
this._eventListeners = [
helper.on(this._pageTarget, PageTarget.Events.DialogOpened, this._onDialogOpened.bind(this)),
helper.on(this._pageTarget, PageTarget.Events.DialogClosed, this._onDialogClosed.bind(this)),
@@ -105,7 +107,6 @@ class PageHandler {
}),
helper.on(this._pageTarget, PageTarget.Events.ScreencastStarted, this._onVideoRecordingStarted.bind(this)),
helper.on(this._pageTarget, PageTarget.Events.ScreencastFrame, this._onScreencastFrame.bind(this)),
- helper.on(this._pageTarget, PageTarget.Events.TopBrowsingContextReplaced, this._onTopBrowsingContextReplaced.bind(this)),
helper.on(this._pageNetwork, PageNetwork.Events.Request, this._handleNetworkEvent.bind(this, 'Network.requestWillBeSent')),
helper.on(this._pageNetwork, PageNetwork.Events.Response, this._handleNetworkEvent.bind(this, 'Network.responseReceived')),
helper.on(this._pageNetwork, PageNetwork.Events.RequestFinished, this._handleNetworkEvent.bind(this, 'Network.requestFinished')),
@@ -119,10 +120,11 @@ class PageHandler {
pageFrameDetached: emitProtocolEvent('Page.frameDetached'),
pageLinkClicked: emitProtocolEvent('Page.linkClicked'),
pageWillOpenNewWindowAsynchronously: emitProtocolEvent('Page.willOpenNewWindowAsynchronously'),
- pageNavigationAborted: params => this._handleNavigationEvent('Page.navigationAborted', params),
- pageNavigationCommitted: params => this._handleNavigationEvent('Page.navigationCommitted', params),
- pageNavigationStarted: params => this._handleNavigationEvent('Page.navigationStarted', params),
+ pageNavigationAborted: emitProtocolEvent('Page.navigationAborted'),
+ pageNavigationCommitted: emitProtocolEvent('Page.navigationCommitted'),
+ pageNavigationStarted: emitProtocolEvent('Page.navigationStarted'),
pageReady: this._onPageReady.bind(this),
+ pageInputEvent: (event) => this._pageEventSink.emit(event.type, event),
pageSameDocumentNavigation: emitProtocolEvent('Page.sameDocumentNavigation'),
pageUncaughtError: emitProtocolEvent('Page.uncaughtError'),
pageWorkerCreated: this._onWorkerCreated.bind(this),
@@ -164,28 +166,6 @@ class PageHandler {
this._session.emitEvent('Page.screencastFrame', params);
}
- _onTopBrowsingContextReplaced() {
- this._isTransferringCrossProcessNavigation = true;
- }
-
- _handleNavigationEvent(event, params) {
- if (this._isTransferringCrossProcessNavigation && params.frameId === this._mainFrameId) {
- // During a cross-process navigation, http channel in the new process might not be
- // the same as the original one in the old process, for example after a redirect/interception.
- // Therefore, the new proces has a new navigationId.
- //
- // To preserve protocol consistency, we replace the new navigationId with
- // the old navigationId.
- params.navigationId = this._lastMainFrameNavigationId || params.navigationId;
- if (event === 'Page.navigationCommitted' || event === 'Page.navigationAborted')
- this._isTransferringCrossProcessNavigation = false;
- }
-
- if (event === 'Page.navigationStarted' && params.frameId === this._mainFrameId)
- this._lastMainFrameNavigationId = params.navigationId;
- this._session.emitEvent(event, params);
- }
-
_onPageReady(event) {
this._isPageReady = true;
this._session.emitEvent('Page.ready');
@@ -239,8 +219,6 @@ class PageHandler {
}
_onFrameAttached({frameId, parentFrameId}) {
- if (!parentFrameId)
- this._mainFrameId = frameId;
this._session.emitEvent('Page.frameAttached', {frameId, parentFrameId});
this._reportedFrameIds.add(frameId);
const events = this._networkEventsForUnreportedFrameIds.get(frameId) || [];
@@ -319,7 +297,7 @@ class PageHandler {
}
async ['Page.bringToFront'](options) {
- this._pageTarget._window.focus();
+ await this._pageTarget.activateAndRun(() => {});
}
async ['Page.setCacheDisabled'](options) {
@@ -385,8 +363,51 @@ class PageHandler {
return await this._contentPage.send('getContentQuads', options);
}
- async ['Page.navigate'](options) {
- return await this._contentPage.send('navigate', options);
+ async ['Page.navigate']({frameId, url, referer}) {
+ const browsingContext = this._pageTarget.frameIdToBrowsingContext(frameId);
+ let sameDocumentNavigation = false;
+ try {
+ const uri = NetUtil.newURI(url);
+ // This is the same check that verifes browser-side if this is the same-document navigation.
+ // See CanonicalBrowsingContext::SupportsLoadingInParent.
+ sameDocumentNavigation = browsingContext.currentURI && uri.hasRef && uri.equalsExceptRef(browsingContext.currentURI);
+ } catch (e) {
+ throw new Error(`Invalid url: "${url}"`);
+ }
+ let referrerURI = null;
+ let referrerInfo = null;
+ if (referer) {
+ try {
+ referrerURI = NetUtil.newURI(referer);
+ const ReferrerInfo = Components.Constructor(
+ '@mozilla.org/referrer-info;1',
+ 'nsIReferrerInfo',
+ 'init'
+ );
+ referrerInfo = new ReferrerInfo(Ci.nsIHttpChannel.REFERRER_POLICY_UNSET, true, referrerURI);
+ } catch (e) {
+ throw new Error(`Invalid referer: "${referer}"`);
+ }
+ }
+
+ let navigationId;
+ const unsubscribe = helper.addObserver((browsingContext, topic, loadIdentifier) => {
+ navigationId = helper.toProtocolNavigationId(loadIdentifier);
+ }, 'juggler-navigation-started-browser');
+ browsingContext.loadURI(url, {
+ triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
+ loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_IS_LINK,
+ referrerInfo,
+ // postData: null,
+ // headers: null,
+ // Fake user activation.
+ hasValidUserGestureActivation: true,
+ });
+ unsubscribe();
+
+ return {
+ navigationId: sameDocumentNavigation ? null : navigationId,
+ };
}
async ['Page.goBack']({}) {
@@ -422,8 +443,22 @@ class PageHandler {
return await this._pageTarget.setInitScripts(scripts);
}
- async ['Page.dispatchKeyEvent'](options) {
- return await this._contentPage.send('dispatchKeyEvent', options);
+ async ['Page.dispatchKeyEvent']({type, keyCode, code, key, repeat, location, text}) {
+ // key events don't fire if we are dragging.
+ if (this._isDragging) {
+ if (type === 'keydown' && key === 'Escape') {
+ await this._contentPage.send('dispatchDragEvent', {
+ type: 'dragover',
+ x: this._lastMousePosition.x,
+ y: this._lastMousePosition.y,
+ modifiers: 0
+ });
+ await this._contentPage.send('dispatchDragEvent', {type: 'dragend'});
+ this._isDragging = false;
+ }
+ return;
+ }
+ return await this._contentPage.send('dispatchKeyEvent', {type, keyCode, code, key, repeat, location, text});
}
async ['Page.dispatchTouchEvent'](options) {
@@ -434,8 +469,86 @@ class PageHandler {
return await this._contentPage.send('dispatchTapEvent', options);
}
- async ['Page.dispatchMouseEvent'](options) {
- return await this._contentPage.send('dispatchMouseEvent', options);
+ async ['Page.dispatchMouseEvent']({type, x, y, button, clickCount, modifiers, buttons}) {
+ const boundingBox = this._pageTarget._linkedBrowser.getBoundingClientRect();
+
+ const win = this._pageTarget._window;
+ const sendEvents = async (types) => {
+ // We must switch to proper tab in the tabbed browser so that
+ // event is dispatched to a proper renderer.
+ await this._pageTarget.activateAndRun(() => {
+ for (const type of types) {
+ // This dispatches to the renderer synchronously.
+ win.windowUtils.sendMouseEvent(
+ type,
+ x + boundingBox.left,
+ y + boundingBox.top,
+ button,
+ clickCount,
+ modifiers,
+ false /* aIgnoreRootScrollFrame */,
+ undefined /* pressure */,
+ undefined /* inputSource */,
+ true /* isDOMEventSynthesized */,
+ undefined /* isWidgetEventSynthesized */,
+ buttons);
+ }
+ });
+ };
+
+ if (type === 'mousedown') {
+ if (this._isDragging)
+ return;
+
+ const eventNames = button === 2 ? ['mousedown', 'contextmenu'] : ['mousedown'];
+ const watcher = new EventWatcher(this._pageEventSink, eventNames);
+ await sendEvents(eventNames);
+ await watcher.ensureEventsAndDispose(eventNames);
+ return;
+ }
+
+ if (type === 'mousemove') {
+ this._lastMousePosition = { x, y };
+ if (this._isDragging) {
+ const watcher = new EventWatcher(this._pageEventSink, ['dragover']);
+ await this._contentPage.send('dispatchDragEvent', {type:'dragover', x, y, modifiers});
+ await watcher.ensureEventsAndDispose(['dragover']);
+ return;
+ }
+
+ const watcher = new EventWatcher(this._pageEventSink, ['dragstart', 'mousemove', 'juggler-drag-finalized']);
+ await sendEvents(['mousemove']);
+
+ // The order of events after 'mousemove' is sent:
+ // 1. [dragstart] - might or might NOT be emitted
+ // 2. [mousemove] - always emitted
+ // 3. [juggler-drag-finalized] - only emitted if dragstart was emitted.
+
+ await watcher.ensureEvent('mousemove');
+ if (watcher.hasEvent('dragstart')) {
+ const eventObject = await watcher.ensureEvent('juggler-drag-finalized');
+ this._isDragging = eventObject.dragSessionStarted;
+ }
+ watcher.dispose();
+ return;
+ }
+
+ if (type === 'mouseup') {
+ if (this._isDragging) {
+ const watcher = new EventWatcher(this._pageEventSink, ['dragover', 'dragend']);
+ await this._contentPage.send('dispatchDragEvent', {type: 'dragover', x, y, modifiers});
+ await this._contentPage.send('dispatchDragEvent', {type: 'drop', x, y, modifiers});
+ await this._contentPage.send('dispatchDragEvent', {type: 'dragend', x, y, modifiers});
+ // NOTE: 'drop' event might not be dispatched at all, depending on dropAction.
+ await watcher.ensureEventsAndDispose(['dragover', 'dragend']);
+ this._isDragging = false;
+ } else {
+ const watcher = new EventWatcher(this._pageEventSink, ['mouseup']);
+ await sendEvents(['mouseup']);
+ await watcher.ensureEventsAndDispose(['mouseup']);
+ }
+ return;
+ }
}
async ['Page.dispatchWheelEvent']({x, y, button, deltaX, deltaY, deltaZ, modifiers }) {
@@ -446,18 +559,20 @@ class PageHandler {
const lineOrPageDeltaX = deltaX > 0 ? Math.floor(deltaX) : Math.ceil(deltaX);
const lineOrPageDeltaY = deltaY > 0 ? Math.floor(deltaY) : Math.ceil(deltaY);
- const win = this._pageTarget._window;
- win.windowUtils.sendWheelEvent(
- x,
- y,
- deltaX,
- deltaY,
- deltaZ,
- deltaMode,
- modifiers,
- lineOrPageDeltaX,
- lineOrPageDeltaY,
- 0 /* options */);
+ await this._pageTarget.activateAndRun(() => {
+ const win = this._pageTarget._window;
+ win.windowUtils.sendWheelEvent(
+ x,
+ y,
+ deltaX,
+ deltaY,
+ deltaZ,
+ deltaMode,
+ modifiers,
+ lineOrPageDeltaX,
+ lineOrPageDeltaY,
+ 0 /* options */);
+ });
}
async ['Page.insertText'](options) {
diff --git a/browser_patches/firefox/juggler/protocol/Protocol.js b/browser_patches/firefox/juggler/protocol/Protocol.js
index 329bb7e19c..79ed9b42a6 100644
--- a/browser_patches/firefox/juggler/protocol/Protocol.js
+++ b/browser_patches/firefox/juggler/protocol/Protocol.js
@@ -659,7 +659,6 @@ const Page = {
'navigationStarted': {
frameId: t.String,
navigationId: t.String,
- url: t.String,
},
'navigationCommitted': {
frameId: t.String,
@@ -823,7 +822,6 @@ const Page = {
},
returns: {
navigationId: t.Nullable(t.String),
- navigationURL: t.Nullable(t.String),
}
},
'goBack': {
@@ -907,7 +905,7 @@ const Page = {
},
'dispatchMouseEvent': {
params: {
- type: t.String,
+ type: t.Enum(['mousedown', 'mousemove', 'mouseup']),
button: t.Number,
x: t.Number,
y: t.Number,
diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diff
index a1cc1331fd..549d3054b3 100644
--- a/browser_patches/firefox/patches/bootstrap.diff
+++ b/browser_patches/firefox/patches/bootstrap.diff
@@ -169,7 +169,7 @@ index a32156978aacd7c8cbe9001250bfa1516dbc360f..ff03ff48b505ef8a9117671bf21e8b0e
const transportProvider = {
setListener(upgradeListener) {
diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp
-index 31a929e3150366d25f5acc295fe81ea0352d4621..217fe517155382ef7fa4d3cb6144be6784b83b55 100644
+index 0ed77a6b3225b0c23d960376545698bb9f4b7d38..1db1cbeddf56d4be45e66f89a802e88ebe1f0b40 100644
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -111,6 +111,20 @@ struct ParamTraits<mozilla::dom::PrefersColorSchemeOverride>
@@ -193,7 +193,7 @@ index 31a929e3150366d25f5acc295fe81ea0352d4621..217fe517155382ef7fa4d3cb6144be67
template <>
struct ParamTraits<mozilla::dom::ExplicitActiveStatus>
: public ContiguousEnumSerializer<
-@@ -2839,6 +2853,40 @@ void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
+@@ -2835,6 +2849,40 @@ void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
PresContextAffectingFieldChanged();
}
@@ -235,7 +235,7 @@ index 31a929e3150366d25f5acc295fe81ea0352d4621..217fe517155382ef7fa4d3cb6144be67
nsString&& aOldValue) {
MOZ_ASSERT(IsTop());
diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h
-index 8d32d0f5a37396eb18aa217bcac887f131df9fa2..4971c7ea0c38e2fef4b138dbadd17de1288afe08 100644
+index 8d32d0f5a37396eb18aa217bcac887f131df9fa2..86eca6ab834829283454d1565d1a72116dfb9554 100644
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
@@ -190,10 +190,10 @@ struct EmbedderColorSchemes {
@@ -262,7 +262,18 @@ index 8d32d0f5a37396eb18aa217bcac887f131df9fa2..4971c7ea0c38e2fef4b138dbadd17de1
/* The number of entries added to the session history because of this \
* browsing context. */ \
FIELD(HistoryEntryCount, uint32_t) \
-@@ -922,6 +926,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+@@ -343,6 +347,10 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+
+ bool IsOwnedByProcess() const;
+
++ uint64_t JugglerCurrentLoadIdentifier() const {
++ return GetCurrentLoadIdentifier() ? GetCurrentLoadIdentifier().value() : 0;
++ }
++
+ bool CanHaveRemoteOuterProxies() const {
+ return !mIsInProcess || mDanglingRemoteOuterProxies;
+ }
+@@ -922,6 +930,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
return GetPrefersColorSchemeOverride();
}
@@ -277,7 +288,7 @@ index 8d32d0f5a37396eb18aa217bcac887f131df9fa2..4971c7ea0c38e2fef4b138dbadd17de1
bool IsInBFCache() const;
bool AllowJavascript() const { return GetAllowJavascript(); }
-@@ -1079,6 +1091,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+@@ -1079,6 +1095,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
void PresContextAffectingFieldChanged();
@@ -301,8 +312,25 @@ index 8d32d0f5a37396eb18aa217bcac887f131df9fa2..4971c7ea0c38e2fef4b138dbadd17de1
void DidSet(FieldIndex<IDX_MediumOverride>, nsString&& aOldValue);
bool CanSet(FieldIndex<IDX_SuspendMediaWhenInactive>, bool, ContentParent*) {
+diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp
+index 4afe2dfa63ffc2486472fe4565eacce4204c7a76..4ed1e688fcc32ef279eb409c9c8f66c13c2cf887 100644
+--- a/docshell/base/CanonicalBrowsingContext.cpp
++++ b/docshell/base/CanonicalBrowsingContext.cpp
+@@ -1393,6 +1393,12 @@ void CanonicalBrowsingContext::LoadURI(const nsAString& aURI,
+ return;
+ }
+
++ {
++ nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
++ if (observerService) {
++ observerService->NotifyObservers(ToSupports(this), "juggler-navigation-started-browser", NS_ConvertASCIItoUTF16(nsPrintfCString("%llu", loadState->GetLoadIdentifier())).get());
++ }
++ }
+ LoadURI(loadState, true);
+ }
+
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
-index 0a029957c8232018f46dd1a677e131bc91f12ad6..f24d066592c186ec9059732e3ab59938ab7061e0 100644
+index e188c7614d2fffb76e9e931e759aa1534d13af38..e4d34751b34dde333201041d32e46a257c836f7c 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -15,6 +15,12 @@
@@ -600,7 +628,7 @@ index 0a029957c8232018f46dd1a677e131bc91f12ad6..f24d066592c186ec9059732e3ab59938
NS_IMETHODIMP
nsDocShell::GetIsNavigating(bool* aOut) {
*aOut = mIsNavigating;
-@@ -4895,7 +5141,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
+@@ -4912,7 +5158,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
}
void nsDocShell::ActivenessMaybeChanged() {
@@ -609,7 +637,7 @@ index 0a029957c8232018f46dd1a677e131bc91f12ad6..f24d066592c186ec9059732e3ab59938
if (RefPtr<PresShell> presShell = GetPresShell()) {
presShell->ActivenessMaybeChanged();
}
-@@ -6847,6 +7093,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
+@@ -6865,6 +7111,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
return false; // no entry to save into
}
@@ -620,7 +648,7 @@ index 0a029957c8232018f46dd1a677e131bc91f12ad6..f24d066592c186ec9059732e3ab59938
MOZ_ASSERT(!mozilla::SessionHistoryInParent(),
"mOSHE cannot be non-null with SHIP");
nsCOMPtr<nsIContentViewer> viewer = mOSHE->GetContentViewer();
-@@ -8634,6 +8884,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
+@@ -8652,6 +8902,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
true, // aForceNoOpener
getter_AddRefs(newBC));
MOZ_ASSERT(!newBC);
@@ -633,7 +661,24 @@ index 0a029957c8232018f46dd1a677e131bc91f12ad6..f24d066592c186ec9059732e3ab59938
return rv;
}
-@@ -12793,6 +13049,9 @@ class OnLinkClickEvent : public Runnable {
+@@ -9653,6 +9909,16 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
+ nsINetworkPredictor::PREDICT_LOAD, attrs, nullptr);
+
+ nsCOMPtr<nsIRequest> req;
++
++ // Juggler: report navigation started for non-same-document and non-javascript
++ // navigations.
++ if (!isJavaScript && !sameDocument) {
++ nsCOMPtr<nsIObserverService> observerService =
++ mozilla::services::GetObserverService();
++ if (observerService) {
++ observerService->NotifyObservers(GetAsSupports(this), "juggler-navigation-started-renderer", NS_ConvertASCIItoUTF16(nsPrintfCString("%llu", aLoadState->GetLoadIdentifier())).get());
++ }
++ }
+ rv = DoURILoad(aLoadState, aCacheKey, getter_AddRefs(req));
+
+ if (NS_SUCCEEDED(rv)) {
+@@ -12817,6 +13083,9 @@ class OnLinkClickEvent : public Runnable {
mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied,
mTriggeringPrincipal);
}
@@ -643,7 +688,7 @@ index 0a029957c8232018f46dd1a677e131bc91f12ad6..f24d066592c186ec9059732e3ab59938
return NS_OK;
}
-@@ -12872,6 +13131,8 @@ nsresult nsDocShell::OnLinkClick(
+@@ -12896,6 +13165,8 @@ nsresult nsDocShell::OnLinkClick(
nsCOMPtr<nsIRunnable> ev =
new OnLinkClickEvent(this, aContent, loadState, noOpenerImplied,
aIsTrusted, aTriggeringPrincipal);
@@ -772,10 +817,10 @@ index 6b85ddd842a6d2e29f86047017b78b2007b99867..f530ab61ac26cb7c94c8ccd07d11aa90
* This attempts to save any applicable layout history state (like
* scroll position) in the nsISHEntry. This is normally done
diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
-index 5d529f6023db60091054b975ac9738b91326c330..a06117382098e45693e2170398dbf0b7715184cb 100644
+index b54b5111b7bde93bdfa6ec0294e345e5986feaae..0cbd7b3116c5277027d6e7ee2d40d12f815db1e0 100644
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
-@@ -3619,6 +3619,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
+@@ -3647,6 +3647,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
}
void Document::ApplySettingsFromCSP(bool aSpeculative) {
@@ -785,7 +830,7 @@ index 5d529f6023db60091054b975ac9738b91326c330..a06117382098e45693e2170398dbf0b7
nsresult rv = NS_OK;
if (!aSpeculative) {
// 1) apply settings from regular CSP
-@@ -3676,6 +3679,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
+@@ -3704,6 +3707,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
MOZ_ASSERT(!mScriptGlobalObject,
"CSP must be initialized before mScriptGlobalObject is set!");
@@ -797,7 +842,7 @@ index 5d529f6023db60091054b975ac9738b91326c330..a06117382098e45693e2170398dbf0b7
// If this is a data document - no need to set CSP.
if (mLoadedAsData) {
return NS_OK;
-@@ -4491,6 +4499,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
+@@ -4519,6 +4527,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
return false;
}
@@ -808,7 +853,7 @@ index 5d529f6023db60091054b975ac9738b91326c330..a06117382098e45693e2170398dbf0b7
if (!fm->IsInActiveWindow(bc)) {
return false;
}
-@@ -17838,6 +17850,71 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
+@@ -17907,6 +17919,71 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
return LookAndFeel::PreferredColorSchemeForContent();
}
@@ -839,7 +884,7 @@ index 5d529f6023db60091054b975ac9738b91326c330..a06117382098e45693e2170398dbf0b7
+ }
+ }
+
-+ if (nsContentUtils::ShouldResistFingerprinting(this)) {
++ if (ShouldResistFingerprinting()) {
+ return false;
+ }
+ return LookAndFeel::GetInt(LookAndFeel::IntID::PrefersReducedMotion, 0) == 1;
@@ -881,10 +926,10 @@ index 5d529f6023db60091054b975ac9738b91326c330..a06117382098e45693e2170398dbf0b7
if (!sLoadingForegroundTopLevelContentDocument) {
return false;
diff --git a/dom/base/Document.h b/dom/base/Document.h
-index b81fb1088ab0025555c24e7353cda836f896b26b..21403d0a219cc478b8de20fda410eb265eb1569a 100644
+index 7d7f342bee2248e4c0152bc6430bcbde416cb9dc..1af7812071429a8cd849c8b7a9fbbd0f4b36feb0 100644
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
-@@ -4023,6 +4023,9 @@ class Document : public nsINode,
+@@ -4052,6 +4052,9 @@ class Document : public nsINode,
// color-scheme meta tag.
ColorScheme DefaultColorScheme() const;
@@ -895,7 +940,7 @@ index b81fb1088ab0025555c24e7353cda836f896b26b..21403d0a219cc478b8de20fda410eb26
static bool AutomaticStorageAccessPermissionCanBeGranted(
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
-index e432d25c7397be64b009e4cb671cb6e322175830..2d9fd36ed9bf96065b4d7cf37944523626522345 100644
+index b3200900ea2b59968c11ec1347ab947446bb1215..06f9f3d91397986973401a8dc95ccca9b27addf0 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -326,14 +326,18 @@ void Navigator::GetAppName(nsAString& aAppName, CallerType aCallerType) const {
@@ -950,10 +995,10 @@ index e432d25c7397be64b009e4cb671cb6e322175830..2d9fd36ed9bf96065b4d7cf379445236
void Navigator::GetBuildID(nsAString& aBuildID, CallerType aCallerType,
ErrorResult& aRv) const {
diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h
-index 19b9c31fa2464fc3e865e7a7d69ff91140153510..14b617eefc5c23fcca20c407cb71b5618321f6da 100644
+index fd4b1276ab056b4c0b66b57b0b45f793a877dda7..340dcb8e220f2c30aba98bc86e750613ce5edb32 100644
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
-@@ -219,7 +219,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
+@@ -214,7 +214,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
StorageManager* Storage();
@@ -963,10 +1008,10 @@ index 19b9c31fa2464fc3e865e7a7d69ff91140153510..14b617eefc5c23fcca20c407cb71b561
dom::MediaCapabilities* MediaCapabilities();
dom::MediaSession* MediaSession();
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
-index 5a11c595acf75c2de3a50e33572e61f60379dbe9..4b0818df3622ee285f13d7d47bbbe681b5bfb8a3 100644
+index 25dc7c7d952319cb5ffbc77a12b19b5ed9c3a401..48f4295c4fd23e37b0726f0eb070b3aadf2e90e1 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
-@@ -8357,7 +8357,8 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8364,7 +8364,8 @@ nsresult nsContentUtils::SendMouseEvent(
bool aIgnoreRootScrollFrame, float aPressure,
unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,
PreventDefaultResult* aPreventDefault, bool aIsDOMEventSynthesized,
@@ -976,7 +1021,7 @@ index 5a11c595acf75c2de3a50e33572e61f60379dbe9..4b0818df3622ee285f13d7d47bbbe681
nsPoint offset;
nsCOMPtr<nsIWidget> widget = GetWidget(aPresShell, &offset);
if (!widget) return NS_ERROR_FAILURE;
-@@ -8365,6 +8366,7 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8372,6 +8373,7 @@ nsresult nsContentUtils::SendMouseEvent(
EventMessage msg;
Maybe<WidgetMouseEvent::ExitFrom> exitFrom;
bool contextMenuKey = false;
@@ -984,7 +1029,7 @@ index 5a11c595acf75c2de3a50e33572e61f60379dbe9..4b0818df3622ee285f13d7d47bbbe681
if (aType.EqualsLiteral("mousedown")) {
msg = eMouseDown;
} else if (aType.EqualsLiteral("mouseup")) {
-@@ -8389,6 +8391,12 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8396,6 +8398,12 @@ nsresult nsContentUtils::SendMouseEvent(
msg = eMouseHitTest;
} else if (aType.EqualsLiteral("MozMouseExploreByTouch")) {
msg = eMouseExploreByTouch;
@@ -997,7 +1042,7 @@ index 5a11c595acf75c2de3a50e33572e61f60379dbe9..4b0818df3622ee285f13d7d47bbbe681
} else {
return NS_ERROR_FAILURE;
}
-@@ -8397,12 +8405,21 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8404,12 +8412,21 @@ nsresult nsContentUtils::SendMouseEvent(
aInputSourceArg = MouseEvent_Binding::MOZ_SOURCE_MOUSE;
}
@@ -1021,7 +1066,7 @@ index 5a11c595acf75c2de3a50e33572e61f60379dbe9..4b0818df3622ee285f13d7d47bbbe681
event.pointerId = aIdentifier;
event.mModifiers = GetWidgetModifiers(aModifiers);
event.mButton = aButton;
-@@ -8416,6 +8433,7 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8423,6 +8440,7 @@ nsresult nsContentUtils::SendMouseEvent(
event.mTime = PR_IntervalNow();
event.mFlags.mIsSynthesizedForTests = aIsDOMEventSynthesized;
event.mExitFrom = exitFrom;
@@ -1030,10 +1075,10 @@ index 5a11c595acf75c2de3a50e33572e61f60379dbe9..4b0818df3622ee285f13d7d47bbbe681
nsPresContext* presContext = aPresShell->GetPresContext();
if (!presContext) return NS_ERROR_FAILURE;
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
-index 0f48e5319a23b149f0daf38bf0910090c7bf616c..2263a70fe578800301f719a27d084840bc1d6e93 100644
+index 4a7bc62fe746bc617b8e230c7743de2644eca1a4..f5a4c806a02a406bf025684535a4028fe18cbaf4 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
-@@ -2944,7 +2944,8 @@ class nsContentUtils {
+@@ -2940,7 +2940,8 @@ class nsContentUtils {
int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure,
unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,
mozilla::PreventDefaultResult* aPreventDefault,
@@ -1044,10 +1089,10 @@ index 0f48e5319a23b149f0daf38bf0910090c7bf616c..2263a70fe578800301f719a27d084840
static void FirePageShowEventForFrameLoaderSwap(
nsIDocShellTreeItem* aItem,
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp
-index 885083ab95bf5cfe8183934dfedc4e36b7eb6225..e51374306f322685f0fc1f1da9996d64281dfb79 100644
+index e2cc2300c6a27b54cd5cef52ca0362fb816bd342..0bdbead3c978224b72a9a151b4b99ee71df9b95a 100644
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
-@@ -683,7 +683,7 @@ nsDOMWindowUtils::SendMouseEvent(
+@@ -682,7 +682,7 @@ nsDOMWindowUtils::SendMouseEvent(
int32_t aClickCount, int32_t aModifiers, bool aIgnoreRootScrollFrame,
float aPressure, unsigned short aInputSourceArg,
bool aIsDOMEventSynthesized, bool aIsWidgetEventSynthesized,
@@ -1056,7 +1101,7 @@ index 885083ab95bf5cfe8183934dfedc4e36b7eb6225..e51374306f322685f0fc1f1da9996d64
bool* aPreventDefault) {
return SendMouseEventCommon(
aType, aX, aY, aButton, aClickCount, aModifiers, aIgnoreRootScrollFrame,
-@@ -691,7 +691,7 @@ nsDOMWindowUtils::SendMouseEvent(
+@@ -690,7 +690,7 @@ nsDOMWindowUtils::SendMouseEvent(
aOptionalArgCount >= 7 ? aIdentifier : DEFAULT_MOUSE_POINTER_ID, false,
aPreventDefault, aOptionalArgCount >= 4 ? aIsDOMEventSynthesized : true,
aOptionalArgCount >= 5 ? aIsWidgetEventSynthesized : false,
@@ -1065,7 +1110,7 @@ index 885083ab95bf5cfe8183934dfedc4e36b7eb6225..e51374306f322685f0fc1f1da9996d64
}
NS_IMETHODIMP
-@@ -718,13 +718,13 @@ nsDOMWindowUtils::SendMouseEventCommon(
+@@ -717,13 +717,13 @@ nsDOMWindowUtils::SendMouseEventCommon(
int32_t aClickCount, int32_t aModifiers, bool aIgnoreRootScrollFrame,
float aPressure, unsigned short aInputSourceArg, uint32_t aPointerId,
bool aToWindow, bool* aPreventDefault, bool aIsDOMEventSynthesized,
@@ -1082,7 +1127,7 @@ index 885083ab95bf5cfe8183934dfedc4e36b7eb6225..e51374306f322685f0fc1f1da9996d64
if (aPreventDefault) {
*aPreventDefault = preventDefaultResult != PreventDefaultResult::No;
diff --git a/dom/base/nsDOMWindowUtils.h b/dom/base/nsDOMWindowUtils.h
-index 30e0fafa77857c33e9871259a6ac0cebac965df8..3d8810abcfac1c220529b4e6163b0159475723ff 100644
+index 63968c9b7a4e418e4c0de6e7a75fa215a36a9105..4dcec26021e74ada0757b4686bd0782858995a4b 100644
--- a/dom/base/nsDOMWindowUtils.h
+++ b/dom/base/nsDOMWindowUtils.h
@@ -93,7 +93,7 @@ class nsDOMWindowUtils final : public nsIDOMWindowUtils,
@@ -1095,10 +1140,10 @@ index 30e0fafa77857c33e9871259a6ac0cebac965df8..3d8810abcfac1c220529b4e6163b0159
MOZ_CAN_RUN_SCRIPT
nsresult SendTouchEventCommon(
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
-index cf46ac3458eb2d45b8cf2bfd2e06c8597a07d30b..e308ee762ed5936fb92332cf65e53e69e063ebeb 100644
+index f29523824dee02d15bd6e662e95a32357cc72bf1..1f216917eb393344f6449955b2e3702d0a0b7b08 100644
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
-@@ -1613,6 +1613,10 @@ void nsFocusManager::SetFocusInner(Element* aNewContent, int32_t aFlags,
+@@ -1634,6 +1634,10 @@ void nsFocusManager::SetFocusInner(Element* aNewContent, int32_t aFlags,
(GetActiveBrowsingContext() == newRootBrowsingContext);
}
@@ -1109,7 +1154,7 @@ index cf46ac3458eb2d45b8cf2bfd2e06c8597a07d30b..e308ee762ed5936fb92332cf65e53e69
// Exit fullscreen if a website focuses another window
if (StaticPrefs::full_screen_api_exit_on_windowRaise() &&
!isElementInActiveWindow && (aFlags & FLAG_RAISE) &&
-@@ -2927,7 +2931,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
+@@ -2951,7 +2955,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
}
}
@@ -1121,10 +1166,10 @@ index cf46ac3458eb2d45b8cf2bfd2e06c8597a07d30b..e308ee762ed5936fb92332cf65e53e69
// care of lowering the present active window. This happens in
// a separate runnable to avoid touching multiple windows in
diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp
-index d8e2ac7cc54c2ca8adb914b05328c76e909a3041..2b49a20cac7376ea561b2bad1bce1bd216dc960e 100644
+index 0eedb288e67ae18fb73b758d81b770b04f8f628c..dc2255273ef4e46b4ed985d32bd3283c75de071d 100644
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
-@@ -2485,7 +2485,7 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
+@@ -2489,7 +2489,7 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
&nsGlobalWindowInner::FireOnNewGlobalObject));
}
@@ -1133,7 +1178,7 @@ index d8e2ac7cc54c2ca8adb914b05328c76e909a3041..2b49a20cac7376ea561b2bad1bce1bd2
// We should probably notify. However if this is the, arguably bad,
// situation when we're creating a temporary non-chrome-about-blank
// document in a chrome docshell, don't notify just yet. Instead wait
-@@ -2504,10 +2504,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
+@@ -2508,10 +2508,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
}();
if (!isContentAboutBlankInChromeDocshell) {
@@ -1154,7 +1199,7 @@ index d8e2ac7cc54c2ca8adb914b05328c76e909a3041..2b49a20cac7376ea561b2bad1bce1bd2
}
}
-@@ -2628,6 +2634,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {
+@@ -2632,6 +2638,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {
}
}
@@ -1174,7 +1219,7 @@ index d8e2ac7cc54c2ca8adb914b05328c76e909a3041..2b49a20cac7376ea561b2bad1bce1bd2
void nsGlobalWindowOuter::ClearStatus() { SetStatusOuter(u""_ns); }
void nsGlobalWindowOuter::SetDocShell(nsDocShell* aDocShell) {
-@@ -3765,6 +3784,14 @@ Maybe<CSSIntSize> nsGlobalWindowOuter::GetRDMDeviceSize(
+@@ -3769,6 +3788,14 @@ Maybe<CSSIntSize> nsGlobalWindowOuter::GetRDMDeviceSize(
}
}
}
@@ -1190,10 +1235,10 @@ index d8e2ac7cc54c2ca8adb914b05328c76e909a3041..2b49a20cac7376ea561b2bad1bce1bd2
}
diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h
-index 96bb20c65ab6211e4fdf04b0d5f15b0764143672..4c54c97fb6789798921cc6e3b4d4ef7318756d00 100644
+index f7f512a301cd637c404fbfb3c2fabc206414b5f1..337bb3be30262145e82ebac4853907561bf812b4 100644
--- a/dom/base/nsGlobalWindowOuter.h
+++ b/dom/base/nsGlobalWindowOuter.h
-@@ -333,6 +333,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,
+@@ -334,6 +334,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,
// Outer windows only.
void DispatchDOMWindowCreated();
@@ -1202,10 +1247,10 @@ index 96bb20c65ab6211e4fdf04b0d5f15b0764143672..4c54c97fb6789798921cc6e3b4d4ef73
// Outer windows only.
virtual void EnsureSizeAndPositionUpToDate() override;
diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
-index 7260effcc77431adb800e3577183002369c614d3..4fe3d05882d6a14dbf32dd842d7039ae8da4cae4 100644
+index 524ae260f708d5d3f6a7582984a57043eff679f2..503f1718527ef677ed9fef3f53e4dcc3f576aa34 100644
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
-@@ -1331,6 +1331,62 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
+@@ -1331,6 +1331,61 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
mozilla::GetBoxQuadsFromWindowOrigin(this, aOptions, aResult, aRv);
}
@@ -1251,11 +1296,10 @@ index 7260effcc77431adb800e3577183002369c614d3..4fe3d05882d6a14dbf32dd842d7039ae
+ nsPresContext::CSSPixelsToAppUnits(w),
+ nsPresContext::CSSPixelsToAppUnits(h));
+ }
-+ presShell->ScrollFrameRectIntoView(
-+ primaryFrame, rect,
-+ nsMargin(),
-+ ScrollAxis(kScrollToCenter, WhenToScroll::Always),
-+ ScrollAxis(kScrollToCenter, WhenToScroll::Always),
++ presShell->ScrollFrameIntoView(
++ primaryFrame, Some(rect),
++ ScrollAxis(WhereToScroll::Center, WhenToScroll::Always),
++ ScrollAxis(WhereToScroll::Center, WhenToScroll::Always),
+ ScrollFlags::ScrollOverflowHidden);
+ // If a _visual_ scroll update is pending, cancel it; otherwise, it will
+ // clobber next scroll (e.g. subsequent window.scrollTo(0, 0) wlll break).
@@ -1269,10 +1313,10 @@ index 7260effcc77431adb800e3577183002369c614d3..4fe3d05882d6a14dbf32dd842d7039ae
DOMQuad& aQuad, const GeometryNode& aFrom,
const ConvertCoordinateOptions& aOptions, CallerType aCallerType,
diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h
-index fccf07b43eb05f709eaf49e63c00ab7ddb6df11b..2c07a0f1cf8e321df047b3ef8bcba88752fb855b 100644
+index 6e80d425e51523b971daa02091fadb9ffdf55650..41ef3ea3884cc3373dcfd23a3bedc0ba5edd43a4 100644
--- a/dom/base/nsINode.h
+++ b/dom/base/nsINode.h
-@@ -2140,6 +2140,10 @@ class nsINode : public mozilla::dom::EventTarget {
+@@ -2146,6 +2146,10 @@ class nsINode : public mozilla::dom::EventTarget {
nsTArray<RefPtr<DOMQuad>>& aResult,
ErrorResult& aRv);
@@ -1312,7 +1356,7 @@ index 85a21e459305f556933f4dc0fa7441d8f9ed95a9..d7cb86479ba2ed06542307349d6d86df
static bool DumpEnabled();
diff --git a/dom/chrome-webidl/BrowsingContext.webidl b/dom/chrome-webidl/BrowsingContext.webidl
-index 76d0d088dea7520f5fd7753525e98840f30db969..fa8ddfc7fbe0969079892b8f035eece2aeed61eb 100644
+index 76d0d088dea7520f5fd7753525e98840f30db969..2452b99f6cc7faf80c4589221d622ac97f602cb3 100644
--- a/dom/chrome-webidl/BrowsingContext.webidl
+++ b/dom/chrome-webidl/BrowsingContext.webidl
@@ -52,6 +52,24 @@ enum PrefersColorSchemeOverride {
@@ -1353,6 +1397,15 @@ index 76d0d088dea7520f5fd7753525e98840f30db969..fa8ddfc7fbe0969079892b8f035eece2
/**
* A unique identifier for the browser element that is hosting this
* BrowsingContext tree. Every BrowsingContext in the element's tree will
+@@ -244,6 +268,8 @@ interface BrowsingContext {
+ undefined resetLocationChangeRateLimit();
+
+ readonly attribute long childOffset;
++
++ readonly attribute unsigned long long jugglerCurrentLoadIdentifier;
+ };
+
+ BrowsingContext includes LoadContextMixin;
diff --git a/dom/geolocation/Geolocation.cpp b/dom/geolocation/Geolocation.cpp
index 1d2f65deb8add446993a8a578e1f8bb5b46de090..8dd68391e0e0eb1e6d92898f5263cc984836ee7c 100644
--- a/dom/geolocation/Geolocation.cpp
@@ -1453,10 +1506,10 @@ index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1
~Geolocation();
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
-index 6a724b3e39c0a37450780804c8b07003b2a6656e..dbc79440e34f9dc01a16bf579446ca19a80cc59a 100644
+index a72822084f09180e57b337ee5fe66c2e5f8b2232..7226b2c665e8920d25824e0aca6c730a3e763f7c 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
-@@ -53,6 +53,7 @@
+@@ -56,6 +56,7 @@
#include "nsMappedAttributes.h"
#include "nsIFormControl.h"
#include "mozilla/dom/Document.h"
@@ -1464,7 +1517,7 @@ index 6a724b3e39c0a37450780804c8b07003b2a6656e..dbc79440e34f9dc01a16bf579446ca19
#include "nsIFormControlFrame.h"
#include "nsITextControlFrame.h"
#include "nsIFrame.h"
-@@ -746,6 +747,12 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
+@@ -749,6 +750,12 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
return NS_ERROR_FAILURE;
}
@@ -1478,7 +1531,7 @@ index 6a724b3e39c0a37450780804c8b07003b2a6656e..dbc79440e34f9dc01a16bf579446ca19
return NS_OK;
}
diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl
-index faefb552491e75b674e4f27418089ef7fcc1a3c0..a1e79fce86440e617ee2e7ae4a3eb0769aa72cfb 100644
+index 89338882e70f7954d5f728406302c8bfc88ab3af..30bef01638db72293ea093ecb572b71bb88f9528 100644
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
@@ -372,7 +372,8 @@ interface nsIDOMWindowUtils : nsISupports {
@@ -1492,10 +1545,10 @@ index faefb552491e75b674e4f27418089ef7fcc1a3c0..a1e79fce86440e617ee2e7ae4a3eb076
/** Synthesize a touch event. The event types supported are:
* touchstart, touchend, touchmove, and touchcancel
diff --git a/dom/media/systemservices/video_engine/desktop_capture_impl.cc b/dom/media/systemservices/video_engine/desktop_capture_impl.cc
-index 3d8f2a67e3ec273bc0e7be610b4e683dc23280d4..728f2fdaf1410b86c0d20df0cfbb29beab4c03bf 100644
+index 6e3b67ccf5ab93a63a75bf9d7045aff01b46d94e..e4ae75881fe49b7c72723059640d551cb348e823 100644
--- a/dom/media/systemservices/video_engine/desktop_capture_impl.cc
+++ b/dom/media/systemservices/video_engine/desktop_capture_impl.cc
-@@ -124,10 +124,11 @@ int32_t ScreenDeviceInfoImpl::GetOrientation(const char* deviceUniqueIdUTF8,
+@@ -131,10 +131,11 @@ int32_t ScreenDeviceInfoImpl::GetOrientation(const char* deviceUniqueIdUTF8,
return 0;
}
@@ -1510,7 +1563,7 @@ index 3d8f2a67e3ec273bc0e7be610b4e683dc23280d4..728f2fdaf1410b86c0d20df0cfbb29be
}
int32_t WindowDeviceInfoImpl::Init() {
-@@ -365,9 +366,13 @@ int32_t DesktopCaptureImpl::LazyInitDesktopCapturer() {
+@@ -372,9 +373,13 @@ int32_t DesktopCaptureImpl::LazyInitDesktopCapturer() {
DesktopCapturer::SourceId sourceId = atoi(_deviceUniqueId.c_str());
pWindowCapturer->SelectSource(sourceId);
@@ -1527,7 +1580,7 @@ index 3d8f2a67e3ec273bc0e7be610b4e683dc23280d4..728f2fdaf1410b86c0d20df0cfbb29be
} else if (_deviceType == CaptureDeviceType::Browser) {
// XXX We don't capture cursors, so avoid the extra indirection layer. We
// could also pass null for the pMouseCursorMonitor.
-@@ -384,13 +389,15 @@ int32_t DesktopCaptureImpl::LazyInitDesktopCapturer() {
+@@ -391,7 +396,8 @@ int32_t DesktopCaptureImpl::LazyInitDesktopCapturer() {
}
DesktopCaptureImpl::DesktopCaptureImpl(const int32_t id, const char* uniqueId,
@@ -1535,8 +1588,9 @@ index 3d8f2a67e3ec273bc0e7be610b4e683dc23280d4..728f2fdaf1410b86c0d20df0cfbb29be
+ const CaptureDeviceType type,
+ bool captureCursor)
: _id(id),
- _deviceUniqueId(uniqueId),
- _deviceType(type),
+ _tracking_id(
+ mozilla::TrackingId(CaptureEngineToTrackingSourceStr([&] {
+@@ -412,6 +418,7 @@ DesktopCaptureImpl::DesktopCaptureImpl(const int32_t id, const char* uniqueId,
_requestedCapability(),
_rotateFrame(kVideoRotation_0),
last_capture_time_ms_(rtc::TimeMillis()),
@@ -1544,7 +1598,7 @@ index 3d8f2a67e3ec273bc0e7be610b4e683dc23280d4..728f2fdaf1410b86c0d20df0cfbb29be
time_event_(EventWrapper::Create()),
capturer_thread_(nullptr),
started_(false) {
-@@ -428,6 +435,19 @@ void DesktopCaptureImpl::DeRegisterCaptureDataCallback(
+@@ -449,6 +456,19 @@ void DesktopCaptureImpl::DeRegisterCaptureDataCallback(
}
}
@@ -1564,7 +1618,7 @@ index 3d8f2a67e3ec273bc0e7be610b4e683dc23280d4..728f2fdaf1410b86c0d20df0cfbb29be
int32_t DesktopCaptureImpl::StopCaptureIfAllClientsClose() {
if (_dataCallBacks.empty()) {
return StopCapture();
-@@ -645,6 +665,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result result,
+@@ -669,6 +689,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result result,
frameInfo.height = frame->size().height();
frameInfo.videoType = VideoType::kARGB;
@@ -1581,7 +1635,7 @@ index 3d8f2a67e3ec273bc0e7be610b4e683dc23280d4..728f2fdaf1410b86c0d20df0cfbb29be
frameInfo.width * frameInfo.height * DesktopFrame::kBytesPerPixel;
IncomingFrame(videoFrame, videoFrameLength,
diff --git a/dom/media/systemservices/video_engine/desktop_capture_impl.h b/dom/media/systemservices/video_engine/desktop_capture_impl.h
-index e8414b154fb615afd888ae06aae1d3046f042e69..fd86601a774befc8b7a03d953a73390870aa380f 100644
+index d6b024f24be5b2ed0359e241d0014409798ac4b9..e0f80c54d7a6e87936ed345744d4f568821561ab 100644
--- a/dom/media/systemservices/video_engine/desktop_capture_impl.h
+++ b/dom/media/systemservices/video_engine/desktop_capture_impl.h
@@ -48,6 +48,21 @@ namespace webrtc {
@@ -1641,7 +1695,7 @@ index e8414b154fb615afd888ae06aae1d3046f042e69..fd86601a774befc8b7a03d953a733908
virtual ~DesktopCaptureImpl();
int32_t DeliverCapturedFrame(webrtc::VideoFrame& captureFrame);
-@@ -218,6 +236,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -220,6 +238,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
rtc::RecursiveCriticalSection _apiCs;
std::set<rtc::VideoSinkInterface<VideoFrame>*> _dataCallBacks;
@@ -1649,7 +1703,7 @@ index e8414b154fb615afd888ae06aae1d3046f042e69..fd86601a774befc8b7a03d953a733908
int64_t _incomingFrameTimesNanos
[kFrameRateCountHistorySize]; // timestamp for local captured frames
-@@ -240,6 +259,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -242,6 +261,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
void ProcessIter();
private:
@@ -1702,7 +1756,7 @@ index 8c8a5810fd56512cf37635da1f43757719f06113..d2bc58fcd3b05f989f948839d574d00d
return aGlobalOrNull;
diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp
-index 3f0ca7fb77fc7722b8cf666b8af20ade826a7bb5..0864882a17e18c12bce73cbc5f259ea7641559b2 100644
+index 0af8c6b7d09ef727b5ee1a245704ab9a360eadfc..44a5b1071ff2fa468bf30758d3aa344944df8591 100644
--- a/dom/security/nsCSPUtils.cpp
+++ b/dom/security/nsCSPUtils.cpp
@@ -127,6 +127,11 @@ void CSP_ApplyMetaCSPToDoc(mozilla::dom::Document& aDoc,
@@ -1741,10 +1795,10 @@ index 2f71b284ee5f7e11f117c447834b48355784448c..2640bd57123c2b03bf4b06a2419cd020
* returned quads are further translated relative to the window
* origin -- which is not the layout origin. Further translation
diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp
-index 2f9beef0bde229a2f414f46d3ec2b10eac5c4f1c..2aa8c6b75b7791e29b6f579718a2d6e250dc4236 100644
+index 60dbd47ed22c3109d558c3c1a3fa4a128f5bc72a..60111e5ec2b531ee13e83dbb628a4b205500ddb5 100644
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
-@@ -981,7 +981,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {
+@@ -983,7 +983,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {
AssertIsOnMainThread();
nsTArray<nsString> languages;
@@ -1753,7 +1807,7 @@ index 2f9beef0bde229a2f414f46d3ec2b10eac5c4f1c..2aa8c6b75b7791e29b6f579718a2d6e2
RuntimeService* runtime = RuntimeService::GetService();
if (runtime) {
-@@ -1183,8 +1183,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
+@@ -1185,8 +1185,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
}
// The navigator overridden properties should have already been read.
@@ -1763,7 +1817,7 @@ index 2f9beef0bde229a2f414f46d3ec2b10eac5c4f1c..2aa8c6b75b7791e29b6f579718a2d6e2
mNavigatorPropertiesLoaded = true;
}
-@@ -1782,6 +1781,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted(
+@@ -1784,6 +1783,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted(
}
}
@@ -1777,7 +1831,7 @@ index 2f9beef0bde229a2f414f46d3ec2b10eac5c4f1c..2aa8c6b75b7791e29b6f579718a2d6e2
template <typename Func>
void RuntimeService::BroadcastAllWorkers(const Func& aFunc) {
AssertIsOnMainThread();
-@@ -2197,6 +2203,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(
+@@ -2209,6 +2215,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(
}
}
@@ -1819,7 +1873,7 @@ index d10dabb5c5ff8e17851edf2bd2efc08e74584d8e..53c4070c5fde43b27fb8fbfdcf4c23d8
bool IsWorkerGlobal(JSObject* global);
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
-index e15afcdebdecb9ceed97cb539a511b34670b19c1..9879d33cbe2a6ac3bc7965c9287f72804d60d8ec 100644
+index 30cbeb4c562848bcca03fa9e53b63210f101e354..36dff2d6f5a7842442c7eeb03f08c8937647e15d 100644
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -700,6 +700,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable {
@@ -1858,7 +1912,7 @@ index e15afcdebdecb9ceed97cb539a511b34670b19c1..9879d33cbe2a6ac3bc7965c9287f7280
void WorkerPrivate::UpdateLanguages(const nsTArray<nsString>& aLanguages) {
AssertIsOnParentThread();
-@@ -5123,6 +5145,15 @@ void WorkerPrivate::UpdateContextOptionsInternal(
+@@ -5151,6 +5173,15 @@ void WorkerPrivate::UpdateContextOptionsInternal(
}
}
@@ -1875,7 +1929,7 @@ index e15afcdebdecb9ceed97cb539a511b34670b19c1..9879d33cbe2a6ac3bc7965c9287f7280
const nsTArray<nsString>& aLanguages) {
WorkerGlobalScope* globalScope = GlobalScope();
diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h
-index 41eb3a9cad9a5d49573faef26b4f6e3815064c85..9e58fc7746d4953ee29a76b4af4c488db35fe0df 100644
+index 1ba0be2a34151d66ec33f48c58552e3e33b25bfc..4f65d40575e7d5dd6c507d8738979c10bdb3a52a 100644
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
@@ -330,6 +330,8 @@ class WorkerPrivate final
@@ -1887,7 +1941,7 @@ index 41eb3a9cad9a5d49573faef26b4f6e3815064c85..9e58fc7746d4953ee29a76b4af4c488d
void UpdateLanguagesInternal(const nsTArray<nsString>& aLanguages);
void UpdateJSWorkerMemoryParameterInternal(JSContext* aCx, JSGCParamKey key,
-@@ -956,6 +958,8 @@ class WorkerPrivate final
+@@ -955,6 +957,8 @@ class WorkerPrivate final
void UpdateContextOptions(const JS::ContextOptions& aContextOptions);
@@ -1936,7 +1990,7 @@ index 180092bd3fc0b70462cc6ba67e72946e4c4c7604..bcaecb9fcd7b630c75289581a887cc68
* Set the default time zone.
*/
diff --git a/js/public/Date.h b/js/public/Date.h
-index bb69d58dc96ed7f0b37f73e26abdd0bdfeaaf556..8436d439f72287176a2fe6a1a837d3db73409e67 100644
+index cd641a54d9f968b4f5ac62aff701576e63a29439..27067c68a74a5578b8b5e6bbef3a4b4876897eb1 100644
--- a/js/public/Date.h
+++ b/js/public/Date.h
@@ -53,6 +53,8 @@ namespace JS {
@@ -1949,7 +2003,7 @@ index bb69d58dc96ed7f0b37f73e26abdd0bdfeaaf556..8436d439f72287176a2fe6a1a837d3db
inline ClippedTime TimeClip(double time);
diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp
-index baf9debd7b2153aa37e791001e6b37bc1bd14122..68a4d69a4e16711b00a46428e9a51c53154ec923 100644
+index 0b40f96e76a75fd4c3b3f0bae787515571723f5e..a75b2706d3206859dc7ebebd98b7c5d5f57195f8 100644
--- a/js/src/debugger/Object.cpp
+++ b/js/src/debugger/Object.cpp
@@ -2373,7 +2373,11 @@ Maybe<Completion> DebuggerObject::call(JSContext* cx,
@@ -1965,10 +2019,10 @@ index baf9debd7b2153aa37e791001e6b37bc1bd14122..68a4d69a4e16711b00a46428e9a51c53
}
diff --git a/js/src/vm/DateTime.cpp b/js/src/vm/DateTime.cpp
-index a86a6e9f7177c86624f118ebbc2e012766137bd1..5ebd1f106a556471fda5961d1f11f8eac31718cc 100644
+index cb3d1288c8b3f40fbcb40429381306c230960d76..7ec3f6c4e6d037aadd798f891ecfca0b5a83678a 100644
--- a/js/src/vm/DateTime.cpp
+++ b/js/src/vm/DateTime.cpp
-@@ -178,6 +178,11 @@ void js::DateTimeInfo::internalResetTimeZone(ResetTimeZoneMode mode) {
+@@ -179,6 +179,11 @@ void js::DateTimeInfo::internalResetTimeZone(ResetTimeZoneMode mode) {
}
}
@@ -1980,7 +2034,7 @@ index a86a6e9f7177c86624f118ebbc2e012766137bd1..5ebd1f106a556471fda5961d1f11f8ea
void js::DateTimeInfo::updateTimeZone() {
MOZ_ASSERT(timeZoneStatus_ != TimeZoneStatus::Valid);
-@@ -502,10 +507,24 @@ void js::ResetTimeZoneInternal(ResetTimeZoneMode mode) {
+@@ -510,10 +515,24 @@ void js::ResetTimeZoneInternal(ResetTimeZoneMode mode) {
js::DateTimeInfo::resetTimeZone(mode);
}
@@ -2005,7 +2059,7 @@ index a86a6e9f7177c86624f118ebbc2e012766137bd1..5ebd1f106a556471fda5961d1f11f8ea
#if JS_HAS_INTL_API
# if defined(XP_WIN)
static bool IsOlsonCompatibleWindowsTimeZoneId(std::string_view tz) {
-@@ -727,9 +746,17 @@ void js::ResyncICUDefaultTimeZone() {
+@@ -735,9 +754,17 @@ void js::ResyncICUDefaultTimeZone() {
void js::DateTimeInfo::internalResyncICUDefaultTimeZone() {
#if JS_HAS_INTL_API
@@ -2114,10 +2168,10 @@ index dac899f7558b26d6848da8b98ed8a93555c8751a..2a07d67fa1c2840b25085566e84dc3b2
// No boxes to return
return;
diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
-index 13c0b901b39279c023e99d8b42852c315baf847d..5dd2741fd06d8a16af050d55c5333c4c095bf591 100644
+index d43373d90e82f4ac2f6399b38956167481ff9951..95b18fcde2f18f9944ddf2828f1f58ac89b3b03b 100644
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
-@@ -10923,7 +10923,9 @@ auto PresShell::ComputeActiveness() const -> Activeness {
+@@ -10969,7 +10969,9 @@ auto PresShell::ComputeActiveness() const -> Activeness {
if (!browserChild->IsVisible()) {
MOZ_LOG(gLog, LogLevel::Debug,
(" > BrowserChild %p is not visible", browserChild));
@@ -2129,10 +2183,10 @@ index 13c0b901b39279c023e99d8b42852c315baf847d..5dd2741fd06d8a16af050d55c5333c4c
// If the browser is visible but just due to be preserving layers
diff --git a/layout/style/GeckoBindings.h b/layout/style/GeckoBindings.h
-index e5762879ea3120dca4864e286ffce6d52d33d40e..b2281efd2529c3155355eb18a6a1b7b417514869 100644
+index 73e9c213afcd5ef7f6ba4cfcf5b95bdb9226d48e..128745902d7b56dd85e05999cb4fb882bc74c8cd 100644
--- a/layout/style/GeckoBindings.h
+++ b/layout/style/GeckoBindings.h
-@@ -605,6 +605,7 @@ void Gecko_MediaFeatures_GetDeviceSize(const mozilla::dom::Document*,
+@@ -608,6 +608,7 @@ void Gecko_MediaFeatures_GetDeviceSize(const mozilla::dom::Document*,
float Gecko_MediaFeatures_GetResolution(const mozilla::dom::Document*);
bool Gecko_MediaFeatures_PrefersReducedMotion(const mozilla::dom::Document*);
@@ -2141,14 +2195,14 @@ index e5762879ea3120dca4864e286ffce6d52d33d40e..b2281efd2529c3155355eb18a6a1b7b4
const mozilla::dom::Document*);
mozilla::StylePrefersColorScheme Gecko_MediaFeatures_PrefersColorScheme(
diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
-index a9d3f075f3587fc1e55544b010864cd0e4b67107..d9ce4a1a7d9e2cd27e20f0ef36132e6599b0bb66 100644
+index d3b604a668e0d6d18b7427811e91744a7ac2f0d1..9f92569829e51f3516f9c33c65ec0b4aa016dd46 100644
--- a/layout/style/nsMediaFeatures.cpp
+++ b/layout/style/nsMediaFeatures.cpp
@@ -264,10 +264,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) {
}
bool Gecko_MediaFeatures_PrefersReducedMotion(const Document* aDocument) {
-- if (nsContentUtils::ShouldResistFingerprinting(aDocument)) {
+- if (aDocument->ShouldResistFingerprinting()) {
- return false;
- }
- return LookAndFeel::GetInt(LookAndFeel::IntID::PrefersReducedMotion, 0) == 1;
@@ -2173,10 +2227,10 @@ index f2723e654098ff27542e1eb16a536c11ad0af617..b0b480551ff7d895dfdeb5a980087485
/* Use accelerated SIMD routines. */
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
-index dfe52b1d7477fea400a387ed221557454d746589..fb50c04fe18c1c876f649bedac7b5ae231e98da8 100644
+index 5ec8703f298994caad9698dca0c98c68fd487b01..24c75b6760cc8436e5cfa9cf05d0f2383f87fe0c 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
-@@ -4241,7 +4241,9 @@ pref("devtools.experiment.f12.shortcut_disabled", false);
+@@ -4126,7 +4126,9 @@ pref("devtools.experiment.f12.shortcut_disabled", false);
// doesn't provide a way to lock the pref
pref("dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled", false);
#else
@@ -2200,7 +2254,7 @@ index fba1a83231165cbda92e9b017c70ec6c1d59d037..e8093ed2a06f728c125a4ad8a096d205
/**
* Set the status and reason for the forthcoming synthesized response.
diff --git a/netwerk/protocol/http/InterceptedHttpChannel.cpp b/netwerk/protocol/http/InterceptedHttpChannel.cpp
-index 2c02db86d5ac9567d7174ac5e685296d4466d16c..a0a91ab331d0289a53b3d29c11d3df9496ae9f2b 100644
+index 735b3a134a8c7104909ff9424eff74eab80c4830..a31e8b68e201dbf238d80ab32d46d4657f9b8cd7 100644
--- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
+++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
@@ -728,6 +728,14 @@ NS_IMPL_ISUPPORTS(ResetInterceptionHeaderVisitor, nsIHttpHeaderVisitor)
@@ -2218,11 +2272,30 @@ index 2c02db86d5ac9567d7174ac5e685296d4466d16c..a0a91ab331d0289a53b3d29c11d3df94
NS_IMETHODIMP
InterceptedHttpChannel::ResetInterception(bool aBypass) {
INTERCEPTED_LOG(("InterceptedHttpChannel::ResetInterception [%p] bypass: %s",
+@@ -1070,11 +1078,18 @@ InterceptedHttpChannel::OnStartRequest(nsIRequest* aRequest) {
+ GetCallback(mProgressSink);
+ }
+
++ // Playwright: main requests in firefox do not have loading principal.
++ // As they are intercepted by Playwright, they don't have
++ // serviceWorkerTainting as well.
++ // Thus these asserts are wrong for Playwright world.
++ // Note: these checks were added in https://github.com/mozilla/gecko-dev/commit/92e2cdde79c11510c3e4192e1b6264d00398ed95
++ /*
+ MOZ_ASSERT_IF(!mLoadInfo->GetServiceWorkerTaintingSynthesized(),
+ mLoadInfo->GetLoadingPrincipal());
+ // No need to do ORB checks if these conditions hold.
+ MOZ_DIAGNOSTIC_ASSERT(mLoadInfo->GetServiceWorkerTaintingSynthesized() ||
+ mLoadInfo->GetLoadingPrincipal()->IsSystemPrincipal());
++ */
+
+ if (mPump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) {
+ mPump->PeekStream(CallTypeSniffers, static_cast<nsIChannel*>(this));
diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp
-index 55c7dbe1ae90d64e5aa993424cc1c5659833582f..a451248676b9b7cdd773a74948eb3b4d442a2b18 100644
+index 17d2c7d96c19421ae0b19ac02c3668d2247c1f64..c0b733791f6244c25595434992ff8ec9f9b6ef0b 100644
--- a/parser/html/nsHtml5TreeOpExecutor.cpp
+++ b/parser/html/nsHtml5TreeOpExecutor.cpp
-@@ -1363,6 +1363,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
+@@ -1371,6 +1371,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
void nsHtml5TreeOpExecutor::AddSpeculationCSP(const nsAString& aCSP) {
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
@@ -2307,10 +2380,10 @@ index e31cf158dcac3540b0c721cbd677b8522d7549b3..029fc67df81911e3abf3724e8ed99e4b
readonly attribute boolean securityCheckDisabled;
};
diff --git a/services/settings/Utils.jsm b/services/settings/Utils.jsm
-index de557af4275b51a0e4dbc95bd4f6896dd585c232..5049f8613c7a1efa3fec5cc28ff761abe18c557c 100644
+index 50114dfbbc464fd59779d0babfb1489cafc9a28b..70f56aac932bebe3837b1fb67bbdbafe697a6b1d 100644
--- a/services/settings/Utils.jsm
+++ b/services/settings/Utils.jsm
-@@ -102,7 +102,7 @@ function _isUndefined(value) {
+@@ -96,7 +96,7 @@ function _isUndefined(value) {
var Utils = {
get SERVER_URL() {
@@ -2320,7 +2393,7 @@ index de557af4275b51a0e4dbc95bd4f6896dd585c232..5049f8613c7a1efa3fec5cc28ff761ab
: AppConstants.REMOTE_SETTINGS_SERVER_URL;
},
diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs
-index f44fd788b00005c64d94a67d72f83946178a7848..015c8c5cb9fc764d0cf1cab2e448da135cbded10 100644
+index 778a57cd95d710a2331bb59a9ce2a19a2a0679df..0fd70320d4773247d1f00a12ed812fcb4c5ff843 100644
--- a/servo/components/style/gecko/media_features.rs
+++ b/servo/components/style/gecko/media_features.rs
@@ -232,10 +232,15 @@ pub enum ForcedColors {
@@ -2357,10 +2430,10 @@ index 4f7337926efbb086a2be97cdbcb3dca39e27c786..f2005cb726ff153d6b1011d6af0479db
// ignored for Linux.
const unsigned long CHROME_SUPPRESS_ANIMATION = 0x01000000;
diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
-index 0a7ba257a4d43c74841f003a8a0556d7f057700b..cf78a44fa64248ecf5b3ade8a8e92efffeb9f831 100644
+index 44f50e1c45f21159031e29748aab59cbdd366cbe..9fa2b8487140fc6d45b70240ce8ad64005f4bb26 100644
--- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
+++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
-@@ -116,6 +116,12 @@ EnterprisePoliciesManager.prototype = {
+@@ -113,6 +113,12 @@ EnterprisePoliciesManager.prototype = {
Services.prefs.clearUserPref(PREF_POLICIES_APPLIED);
}
@@ -2402,10 +2475,10 @@ index 3e9672fdfe9ddab8acd0f8b18772aece92bb3b64..83454a9c27c96d72597445653beaa014
int32_t aMaxSelfProgress,
int32_t aCurTotalProgress,
diff --git a/toolkit/components/windowwatcher/nsWindowWatcher.cpp b/toolkit/components/windowwatcher/nsWindowWatcher.cpp
-index 3afb5e02eb9c65b2d4dc34692f7c94e43a103b1a..4037e9118dae628ed370cd14934f1dafc3f99feb 100644
+index be8deb75c81c2614c0b034e20b0d523de3b59cc0..41813bf13751601b679e816325f30d834962640e 100644
--- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp
+++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp
-@@ -1852,7 +1852,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(
+@@ -1854,7 +1854,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(
// Open a minimal popup.
*aIsPopupRequested = true;
@@ -2419,10 +2492,10 @@ index 3afb5e02eb9c65b2d4dc34692f7c94e43a103b1a..4037e9118dae628ed370cd14934f1daf
/**
diff --git a/toolkit/mozapps/update/UpdateService.jsm b/toolkit/mozapps/update/UpdateService.jsm
-index d969d9e8d0790bff7c837828b92e1a92d945b116..34f2a030eca9c8258900c5b8d2564fa06580f1f3 100644
+index 512b4058c6aa467cd04d25765c7ddd0b75acda86..c2ef1ac2c2e034d77401dd711f46a85c5848eaea 100644
--- a/toolkit/mozapps/update/UpdateService.jsm
+++ b/toolkit/mozapps/update/UpdateService.jsm
-@@ -3610,6 +3610,8 @@ UpdateService.prototype = {
+@@ -3848,6 +3848,8 @@ UpdateService.prototype = {
},
get disabledForTesting() {
@@ -2498,7 +2571,7 @@ index e1e46ccdceae595f95d100116ff480905047e82b..eaa0252e768140120158525723ad867b
// nsDocumentViewer::LoadComplete that doesn't do various things
// that are not relevant here because this wasn't an actual
diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp
-index 54a8d617308c2fb2ce816bb4a88162b8395c2723..140059c6ae4e52b4720aaa34d6313a92729b98a7 100644
+index 2fb5aefa9b47a25051449df37d81587f6939d300..8bb750c1abd487d5458fa108e3079986eb0f1b6d 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -112,6 +112,7 @@
@@ -2535,7 +2608,7 @@ index 54a8d617308c2fb2ce816bb4a88162b8395c2723..140059c6ae4e52b4720aaa34d6313a92
mSaver =
do_CreateInstance(NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
-@@ -1637,7 +1649,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
+@@ -1635,7 +1647,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
return NS_OK;
}
@@ -2573,7 +2646,7 @@ index 54a8d617308c2fb2ce816bb4a88162b8395c2723..140059c6ae4e52b4720aaa34d6313a92
if (NS_FAILED(rv)) {
nsresult transferError = rv;
-@@ -1691,6 +1732,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
+@@ -1687,6 +1728,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
bool alwaysAsk = true;
mMimeInfo->GetAlwaysAskBeforeHandling(&alwaysAsk);
@@ -2583,7 +2656,7 @@ index 54a8d617308c2fb2ce816bb4a88162b8395c2723..140059c6ae4e52b4720aaa34d6313a92
if (alwaysAsk) {
// But we *don't* ask if this mimeInfo didn't come from
// our user configuration datastore and the user has said
-@@ -2259,6 +2303,16 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver,
+@@ -2197,6 +2241,16 @@ nsExternalAppHandler::OnSaveComplete(nsIBackgroundFileSaver* aSaver,
NotifyTransfer(aStatus);
}
@@ -2600,7 +2673,7 @@ index 54a8d617308c2fb2ce816bb4a88162b8395c2723..140059c6ae4e52b4720aaa34d6313a92
return NS_OK;
}
-@@ -2744,6 +2798,15 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) {
+@@ -2682,6 +2736,15 @@ NS_IMETHODIMP nsExternalAppHandler::Cancel(nsresult aReason) {
}
}
@@ -2617,10 +2690,10 @@ index 54a8d617308c2fb2ce816bb4a88162b8395c2723..140059c6ae4e52b4720aaa34d6313a92
// OnStartRequest)
mDialog = nullptr;
diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h
-index 17c7dccf0217b0aa71cff630dd7b0e9beda9f5aa..06558286f5ed9d1e324654365909f9f8cad957ac 100644
+index 62f9d60abcd072e4ca23cd44cf52133d29b91dfc..5ebb5c6c305fdbc761641cdf2929787874dad5df 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.h
+++ b/uriloader/exthandler/nsExternalHelperAppService.h
-@@ -245,6 +245,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService,
+@@ -253,6 +253,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService,
mozilla::dom::BrowsingContext* aContentContext, bool aForceSave,
nsIInterfaceRequestor* aWindowContext,
nsIStreamListener** aStreamListener);
@@ -2629,7 +2702,7 @@ index 17c7dccf0217b0aa71cff630dd7b0e9beda9f5aa..06558286f5ed9d1e324654365909f9f8
};
/**
-@@ -447,6 +449,9 @@ class nsExternalAppHandler final : public nsIStreamListener,
+@@ -452,6 +454,9 @@ class nsExternalAppHandler final : public nsIStreamListener,
* Upon successful return, both mTempFile and mSaver will be valid.
*/
nsresult SetUpTempFile(nsIChannel* aChannel);
@@ -2919,10 +2992,10 @@ index 7f91de9e67d7ffa02de3eef1d760e5cfd05e7ad6..753b8902026626e8f0a190ea3130ba5e
} // namespace widget
diff --git a/widget/headless/HeadlessWidget.cpp b/widget/headless/HeadlessWidget.cpp
-index 340cb723bd4de51e64164b67b69c77da5c5fa443..252f9411479f6aaa0b65942668ccfb7030af7b46 100644
+index 1beca01cf88466e8a10e2cb6ae972e4461e94e22..8c5c1d8685190d9710200daed17aa423095cdc0b 100644
--- a/widget/headless/HeadlessWidget.cpp
+++ b/widget/headless/HeadlessWidget.cpp
-@@ -110,6 +110,8 @@ void HeadlessWidget::Destroy() {
+@@ -109,6 +109,8 @@ void HeadlessWidget::Destroy() {
}
}
@@ -2931,7 +3004,7 @@ index 340cb723bd4de51e64164b67b69c77da5c5fa443..252f9411479f6aaa0b65942668ccfb70
nsBaseWidget::OnDestroy();
nsBaseWidget::Destroy();
-@@ -608,5 +610,14 @@ nsresult HeadlessWidget::SynthesizeNativeTouchpadPan(
+@@ -607,5 +609,14 @@ nsresult HeadlessWidget::SynthesizeNativeTouchpadPan(
return NS_OK;
}
diff --git a/browser_patches/firefox/preferences/playwright.cfg b/browser_patches/firefox/preferences/playwright.cfg
index 041d6f5815..0d8483d3aa 100644
--- a/browser_patches/firefox/preferences/playwright.cfg
+++ b/browser_patches/firefox/preferences/playwright.cfg
@@ -18,9 +18,6 @@ pref("fission.webContentIsolationStrategy", 0);
// We also separately disable BFCache in content via docSchell property.
pref("fission.bfcacheInParent", false);
-// File url navigations behave differently from http, we are not ready.
-pref("browser.tabs.remote.separateFileUriProcess", false);
-
// Disable first-party-based cookie partitioning.
// When it is enabled, we have to retain "thirdPartyCookie^" permissions
// in the storageState.
@@ -39,10 +36,6 @@ pref("dom.ipc.processPrelaunch.enabled", false);
// Isolate permissions by user context.
pref("permissions.isolateBy.userContext", true);
-// We need this to issue Page.navigate from inside the renderer
-// to cross-process domains, for example file urls.
-pref("security.sandbox.content.level", 2);
-
// Allow creating files in content process - required for
// |Page.setFileInputFiles| protocol method.
pref("dom.file.createInChild", true);
diff --git a/browser_patches/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.sh
index 9925fa4111..1ccf9f5732 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="654646fe6187abcf9ced6a3ace80eaf04754fd39"
+BASE_REVISION="2091944d51ce324e4e7e735350062c715d163e35"
diff --git a/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m b/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m
index d558529953..a6c7be8ae4 100644
--- a/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m
+++ b/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m
@@ -180,7 +180,7 @@ const NSActivityOptions ActivityOptions =
_WKWebsiteDataStoreConfiguration *configuration = [[[_WKWebsiteDataStoreConfiguration alloc] init] autorelease];
if (_userDataDir) {
// Local storage state should be stored in separate dirs for persistent contexts.
- [configuration setShouldUseCustomStoragePaths:YES];
+ [configuration setUnifiedOriginStorageLevel:_WKUnifiedOriginStorageLevelNone];
NSURL *cookieFile = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/cookie.db", _userDataDir]];
[configuration _setCookieStorageFile:cookieFile];
@@ -234,6 +234,8 @@ const NSActivityOptions ActivityOptions =
configuration.preferences._developerExtrasEnabled = YES;
configuration.preferences._mediaDevicesEnabled = YES;
configuration.preferences._mockCaptureDevicesEnabled = YES;
+ // Enable WebM support.
+ configuration.preferences._alternateWebMPlayerEnabled = YES;
configuration.preferences._hiddenPageDOMTimerThrottlingEnabled = NO;
configuration.preferences._hiddenPageDOMTimerThrottlingAutoIncreases = NO;
configuration.preferences._pageVisibilityBasedProcessSuppressionEnabled = NO;
@@ -477,8 +479,20 @@ const NSActivityOptions ActivityOptions =
decisionHandler(WKNavigationResponsePolicyAllow);
return;
}
+
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)navigationResponse.response;
+ NSString *contentType = [httpResponse valueForHTTPHeaderField:@"Content-Type"];
+ if (!navigationResponse.canShowMIMEType && (contentType && [contentType length] > 0)) {
+ decisionHandler(WKNavigationResponsePolicyDownload);
+ return;
+ }
+
+ if (contentType && ([contentType isEqualToString:@"application/pdf"] || [contentType isEqualToString:@"text/pdf"])) {
+ decisionHandler(WKNavigationResponsePolicyDownload);
+ return;
+ }
+
NSString *disposition = [[httpResponse allHeaderFields] objectForKey:@"Content-Disposition"];
if (disposition && [disposition hasPrefix:@"attachment"]) {
decisionHandler(WKNavigationResponsePolicyDownload);
diff --git a/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m b/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
index c5e618ca30..275d4b85f1 100644
--- a/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
+++ b/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
@@ -792,8 +792,20 @@ static NSSet *dataTypes()
decisionHandler(WKNavigationResponsePolicyAllow);
return;
}
+
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)navigationResponse.response;
+ NSString *contentType = [httpResponse valueForHTTPHeaderField:@"Content-Type"];
+ if (!navigationResponse.canShowMIMEType && (contentType && [contentType length] > 0)) {
+ decisionHandler(WKNavigationResponsePolicyDownload);
+ return;
+ }
+
+ if (contentType && ([contentType isEqualToString:@"application/pdf"] || [contentType isEqualToString:@"text/pdf"])) {
+ decisionHandler(WKNavigationResponsePolicyDownload);
+ return;
+ }
+
NSString *disposition = [[httpResponse allHeaderFields] objectForKey:@"Content-Disposition"];
if (disposition && [disposition hasPrefix:@"attachment"]) {
decisionHandler(WKNavigationResponsePolicyDownload);
diff --git a/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.cpp b/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.cpp
index 54a3aa2dec..ee4ea065a7 100644
--- a/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.cpp
+++ b/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.cpp
@@ -100,7 +100,7 @@ WebKitBrowserWindow::WebKitBrowserWindow(BrowserWindowClient& client, HWND mainW
WKPagePolicyClientV1 policyClient = { };
policyClient.base.version = 1;
policyClient.base.clientInfo = this;
- policyClient.decidePolicyForResponse_deprecatedForUseWithV0 = decidePolicyForResponse;
+ policyClient.decidePolicyForResponse = decidePolicyForResponse;
policyClient.decidePolicyForNavigationAction = decidePolicyForNavigationAction;
WKPageSetPagePolicyClient(page, &policyClient.base);
@@ -402,9 +402,10 @@ void WebKitBrowserWindow::decidePolicyForNavigationAction(WKPageRef page, WKFram
WKFramePolicyListenerUse(listener);
}
-void WebKitBrowserWindow::decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
+void WebKitBrowserWindow::decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
{
- if (WKURLResponseIsAttachment(response))
+ // Safari renders resources without content-type as text.
+ if (WKURLResponseIsAttachment(response) || (!WKStringIsEmpty(WKURLResponseCopyMIMEType(response)) && !canShowMIMEType))
WKFramePolicyListenerDownload(listener);
else
WKFramePolicyListenerUse(listener);
diff --git a/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.h b/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.h
index a8d08516c1..6b677e808f 100644
--- a/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.h
+++ b/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.h
@@ -73,7 +73,7 @@ private:
static WKRect getWindowFrame(WKPageRef page, const void *clientInfo);
static void didNotHandleKeyEvent(WKPageRef, WKNativeEventPtr, const void*);
static void decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKFrameRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void* clientInfo);
- static void decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
+ static void decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, bool, WKFramePolicyListenerRef, WKTypeRef, const void*);
BrowserWindowClient& m_client;
WKRetainPtr<WKViewRef> m_view;
diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff
index 2471618070..2c55fb8b22 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 6c06f3fb67b6c047654660c5b3cff4dde8641c33..b6c7f6beb8d16224539d3fbbfed9351edb9e011e 100644
+index 7ac90340dc605072b34b7d35f58f6e48e49704d0..e9f60ce05e5537f26f4c6d6c4dae16179be12abb 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
-@@ -1393,22 +1393,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
+@@ -1394,22 +1394,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
@@ -168,7 +168,7 @@ index e6b24967273095ae424ac9b3fe5e081ee8999ab7..9f7b72259ab79504b8bfcc24d35abe70
void functionDetails(Protocol::ErrorString&, JSC::JSValue, RefPtr<Protocol::Debugger::FunctionDetails>& result);
void getPreview(Protocol::ErrorString&, const String& objectId, RefPtr<Protocol::Runtime::ObjectPreview>& result);
diff --git a/Source/JavaScriptCore/inspector/InjectedScriptSource.js b/Source/JavaScriptCore/inspector/InjectedScriptSource.js
-index 1cf725d02a5771cddee1029669eac752efc9bf3e..6b441343ef4e771d525d4056e743c3100be43c69 100644
+index 1cf725d02a5771cddee1029669eac752efc9bf3e..3d625dec9a281e898f4e3085bbfec8291020848b 100644
--- a/Source/JavaScriptCore/inspector/InjectedScriptSource.js
+++ b/Source/JavaScriptCore/inspector/InjectedScriptSource.js
@@ -172,7 +172,7 @@ let InjectedScript = class InjectedScript extends PrototypelessObjectBase
@@ -224,7 +224,7 @@ index 1cf725d02a5771cddee1029669eac752efc9bf3e..6b441343ef4e771d525d4056e743c310
+ callback(this._createThrownValue("Given expression does not evaluate to a function", objectGroupName));
+ return;
+ }
-+ let result = func.apply(object, resolvedArgs);
++ let result = func.@apply(object, resolvedArgs);
+ if (awaitPromise && isDefined(result) && (InjectedScriptHost.internalConstructorName(result) === 'Promise')) {
+ result.then(value => {
+ callback({
@@ -248,7 +248,7 @@ index 1cf725d02a5771cddee1029669eac752efc9bf3e..6b441343ef4e771d525d4056e743c310
}
diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
-index 1088a6a8f2965e17e52d7ba1d1142b9ed697ad3f..a928811c56eaac0ea5a9a350093cb69e7b3ad59d 100644
+index c7ca76cc055bd7d57f33664ac00013bc5e944aa2..9ab8476df0cb52eab6dee44e995d80db4cd6f4b3 100644
--- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
+++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
@@ -101,7 +101,7 @@ void BackendDispatcher::registerDispatcherForDomain(const String& domain, Supple
@@ -984,7 +984,7 @@ index 96af27ece2ac200e11c4311b3ca0d9d3b5a048da..3168f7806fcbdabec07acc5e304bae1e
],
"events": [
diff --git a/Source/JavaScriptCore/inspector/protocol/Page.json b/Source/JavaScriptCore/inspector/protocol/Page.json
-index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f94e3daaca 100644
+index 0752749468843c52d3a86fae5660a5182b1f0df7..65845910c80877dc1529d77d8d6d7411e8bc8933 100644
--- a/Source/JavaScriptCore/inspector/protocol/Page.json
+++ b/Source/JavaScriptCore/inspector/protocol/Page.json
@@ -21,7 +21,14 @@
@@ -1003,17 +1003,11 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
]
},
{
-@@ -63,6 +70,18 @@
+@@ -63,6 +70,12 @@
"enum": ["None", "Lax", "Strict"],
"description": "Same-Site policy of a cookie."
},
+ {
-+ "id": "ReducedMotion",
-+ "type": "string",
-+ "enum": ["Reduce", "NoPreference"],
-+ "description": "Page reduced-motion media query override."
-+ },
-+ {
+ "id": "ForcedColors",
+ "type": "string",
+ "enum": ["Active", "None"],
@@ -1022,7 +1016,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
{
"id": "Frame",
"type": "object",
-@@ -126,6 +145,51 @@
+@@ -126,6 +139,51 @@
{ "name": "secure", "type": "boolean", "description": "True if cookie is secure." },
{ "name": "sameSite", "$ref": "CookieSameSitePolicy", "description": "Cookie Same-Site policy." }
]
@@ -1074,7 +1068,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
}
],
"commands": [
-@@ -145,6 +209,14 @@
+@@ -145,6 +203,14 @@
{ "name": "revalidateAllResources", "type": "boolean", "optional": true, "description": "If true, all cached subresources will be revalidated when the main resource loads. Otherwise, only expired cached subresources will be revalidated (the default behavior for most WebKit clients)." }
]
},
@@ -1089,7 +1083,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
{
"name": "navigate",
"description": "Navigates current page to the given URL.",
-@@ -161,6 +233,14 @@
+@@ -161,6 +227,14 @@
{ "name": "value", "type": "string", "optional": true, "description": "Value to override the user agent with. If this value is not provided, the override is removed. Overrides are removed when Web Inspector closes/disconnects." }
]
},
@@ -1104,7 +1098,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
{
"name": "overrideSetting",
"description": "Allows the frontend to override the inspected page's settings.",
-@@ -227,7 +307,8 @@
+@@ -227,7 +301,8 @@
"name": "setBootstrapScript",
"targetTypes": ["page"],
"parameters": [
@@ -1114,19 +1108,11 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
]
},
{
-@@ -284,6 +365,36 @@
+@@ -284,6 +359,28 @@
{ "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." }
]
},
+ {
-+ "name": "setForcedReducedMotion",
-+ "description": "Forces the reduced-motion media query for the page.",
-+ "targetTypes": ["page"],
-+ "parameters": [
-+ { "name": "reducedMotion", "$ref": "ReducedMotion", "optional": true }
-+ ]
-+ },
-+ {
+ "name": "setForcedColors",
+ "description": "Forces the forced-colors media query for the page.",
+ "targetTypes": ["page"],
@@ -1151,7 +1137,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
{
"name": "snapshotNode",
"description": "Capture a snapshot of the specified node that does not include unrelated layers.",
-@@ -304,7 +415,8 @@
+@@ -304,7 +401,8 @@
{ "name": "y", "type": "integer", "description": "Y coordinate" },
{ "name": "width", "type": "integer", "description": "Rectangle width" },
{ "name": "height", "type": "integer", "description": "Rectangle height" },
@@ -1161,7 +1147,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
],
"returns": [
{ "name": "dataURL", "type": "string", "description": "Base64-encoded image data (PNG)." }
-@@ -322,12 +434,92 @@
+@@ -322,12 +420,92 @@
{
"name": "setScreenSizeOverride",
"description": "Overrides screen size exposed to DOM and used in media queries for testing with provided values.",
@@ -1255,7 +1241,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
}
],
"events": [
-@@ -335,14 +527,16 @@
+@@ -335,14 +513,16 @@
"name": "domContentEventFired",
"targetTypes": ["page"],
"parameters": [
@@ -1274,7 +1260,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
]
},
{
-@@ -352,6 +546,14 @@
+@@ -352,6 +532,14 @@
{ "name": "frame", "$ref": "Frame", "description": "Frame object." }
]
},
@@ -1289,7 +1275,17 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
{
"name": "frameDetached",
"description": "Fired when frame has been detached from its parent.",
-@@ -391,6 +593,22 @@
+@@ -380,7 +568,8 @@
+ "targetTypes": ["page"],
+ "parameters": [
+ { "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has scheduled a navigation." },
+- { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." }
++ { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." },
++ { "name": "targetIsCurrentFrame", "type": "boolean", "description": "Whether the naviation will happen in the same frame." }
+ ]
+ },
+ {
+@@ -391,6 +580,22 @@
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has cleared its scheduled navigation." }
]
},
@@ -1312,7 +1308,7 @@ index 0752749468843c52d3a86fae5660a5182b1f0df7..dc23a8a2b542e715a67ee027c0d0e2f9
{
"name": "defaultUserPreferencesDidChange",
"description": "Fired when the default value of a user preference changes at the system level.",
-@@ -398,6 +616,42 @@
+@@ -398,6 +603,42 @@
"parameters": [
{ "name": "preferences", "type": "array", "items": { "$ref": "UserPreference" }, "description": "List of user preferences that can be overriden and their new system (default) values." }
]
@@ -1890,10 +1886,10 @@ index 626efe5d02febd3d80066d2013dd479ecec29471..4c05722dfc3fe885968a69b64adc6f0a
+_vpx_codec_version_str
+_vpx_codec_vp8_cx
diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
-index e49454249a4ca366dd840c174b67587a6a07521e..be7c83d56c01f7da6049824598f81b7190eb2eeb 100644
+index ebc991e8977b0afc2e3fb6932e2f506e965a712c..edba5c71a65e1e252cfe9be0b34a0f856b8df470 100644
--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
-@@ -47,7 +47,7 @@ DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_ = $(NORMAL_UMBRELLA_FRAMEWORK
+@@ -41,7 +41,7 @@ DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_ = $(NORMAL_UMBRELLA_FRAMEWORK
DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_YES = @loader_path/../../../;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
@@ -1903,7 +1899,7 @@ index e49454249a4ca366dd840c174b67587a6a07521e..be7c83d56c01f7da6049824598f81b71
PUBLIC_HEADERS_FOLDER_PREFIX = $(WK_LIBRARY_HEADERS_FOLDER_PATH);
INSTALL_PUBLIC_HEADER_PREFIX = $(INSTALL_PATH_PREFIX)$(PUBLIC_HEADERS_FOLDER_PREFIX);
diff --git a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
-index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae187f99fb 100644
+index d1a987d3d22fa2ce5f904cef06190c98a1195a1e..4886fb31422966cfdd04cf03db932f0fe9d96608 100644
--- a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
+++ b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
@@ -6,6 +6,20 @@
@@ -1927,7 +1923,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
/* 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, ); }; };
-@@ -5104,6 +5118,9 @@
+@@ -5081,6 +5095,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 */; };
@@ -1937,7 +1933,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
-@@ -5367,6 +5384,13 @@
+@@ -5344,6 +5361,13 @@
remoteGlobalIDString = DDF30D0527C5C003006A526F;
remoteInfo = absl;
};
@@ -1951,7 +1947,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
-@@ -10871,6 +10895,9 @@
+@@ -10848,6 +10872,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>"; };
@@ -1961,7 +1957,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
FB39D0D11200F0E300088E69 /* libwebrtc.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwebrtc.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
-@@ -19298,6 +19325,7 @@
+@@ -19275,6 +19302,7 @@
isa = PBXGroup;
children = (
CDFD2F9224C4B2F90048DAC3 /* common */,
@@ -1969,7 +1965,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
CDEBB19224C0191800ADBD44 /* webm_parser */,
);
path = libwebm;
-@@ -19760,6 +19788,16 @@
+@@ -19737,6 +19765,16 @@
path = include;
sourceTree = "<group>";
};
@@ -1986,7 +1982,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
FB39D06E1200ED9200088E69 = {
isa = PBXGroup;
children = (
-@@ -22744,6 +22782,7 @@
+@@ -22697,6 +22735,7 @@
);
dependencies = (
410B3827292B73E90003E515 /* PBXTargetDependency */,
@@ -1994,7 +1990,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
DD2E76E827C6B69A00F2A74C /* PBXTargetDependency */,
CDEBB4CC24C01AB400ADBD44 /* PBXTargetDependency */,
411ED040212E0811004320BA /* PBXTargetDependency */,
-@@ -22803,6 +22842,7 @@
+@@ -22756,6 +22795,7 @@
CDEBB11824C0187400ADBD44 /* webm */,
DDEBB11824C0187400ADBD44 /* aom */,
DDF30D0527C5C003006A526F /* absl */,
@@ -2002,7 +1998,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
);
};
/* End PBXProject section */
-@@ -22954,6 +22994,23 @@
+@@ -22889,6 +22929,23 @@
shellPath = /bin/sh;
shellScript = "[ \"${WK_USE_NEW_BUILD_SYSTEM}\" = YES ] && exit 0\nxcodebuild -project \"${PROJECT_FILE_PATH}\" -target \"${TARGET_NAME}\" installhdrs SYMROOT=\"${TARGET_TEMP_DIR}/LegacyNestHeaders-build\" DSTROOT=\"${BUILT_PRODUCTS_DIR}\" SDKROOT=\"${SDKROOT}\" -UseNewBuildSystem=YES\n";
};
@@ -2026,7 +2022,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
-@@ -24757,6 +24814,9 @@
+@@ -24692,6 +24749,9 @@
5CDD865E1E43B8B500621E92 /* min_max_operations.c in Sources */,
4189395B242A71F5007FDC41 /* min_video_bitrate_experiment.cc in Sources */,
41B8D8FB28CB85CB00E5FA37 /* missing_mandatory_parameter_cause.cc in Sources */,
@@ -2036,7 +2032,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
4131C387234B957D0028A615 /* moving_average.cc in Sources */,
41FCBB1521B1F7AA00A5DF27 /* moving_average.cc in Sources */,
5CD286101E6A64C90094FDC8 /* moving_max.cc in Sources */,
-@@ -25481,6 +25541,11 @@
+@@ -25416,6 +25476,11 @@
target = DDF30D0527C5C003006A526F /* absl */;
targetProxy = DD2E76E727C6B69A00F2A74C /* PBXContainerItemProxy */;
};
@@ -2048,7 +2044,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
-@@ -25708,6 +25773,27 @@
+@@ -25643,6 +25708,27 @@
};
name = Production;
};
@@ -2076,7 +2072,7 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
FB39D0711200ED9200088E69 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */;
-@@ -25840,6 +25926,16 @@
+@@ -25775,6 +25861,16 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Production;
};
@@ -2093,42 +2089,36 @@ index e933f4a4936766b0430f947a0fa06811366fb1be..a43887624e093302e815c2f87e13a8ae
FB39D0731200ED9200088E69 /* Build configuration list for PBXProject "libwebrtc" */ = {
isa = XCConfigurationList;
buildConfigurations = (
-diff --git a/Source/WTF/Scripts/Preferences/WebPreferences.yaml b/Source/WTF/Scripts/Preferences/WebPreferences.yaml
-index 564f5afdd9122bafb4aa96e1e216ea6282cd3e57..6107ef369dd5b538e90be1978b1743c8c49b8a8f 100644
---- a/Source/WTF/Scripts/Preferences/WebPreferences.yaml
-+++ b/Source/WTF/Scripts/Preferences/WebPreferences.yaml
-@@ -979,7 +979,7 @@ InspectorStartsAttached:
- exposed: [ WebKit ]
- defaultValue:
+diff --git a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
+index a7d5323039a01c02f792171542a2eaa1a087f1a6..868170570591531f72818bfcad2cde9e4eb1c4cc 100644
+--- a/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
++++ b/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
+@@ -554,6 +554,7 @@ AspectRatioOfImgFromWidthAndHeightEnabled:
+ default: true
+
+ # FIXME: This is on by default in WebKit2 PLATFORM(COCOA). Perhaps we should consider turning it on for WebKitLegacy as well.
++# Playwright: enable on all platforms to align with Safari.
+ AsyncClipboardAPIEnabled:
+ type: bool
+ status: stable
+@@ -564,7 +565,7 @@ AsyncClipboardAPIEnabled:
+ default: false
WebKit:
-- default: true
-+ default: false
+ "PLATFORM(COCOA)" : true
+- default: false
++ default: true
+ WebCore:
+ default: false
- InspectorWindowFrame:
- type: String
-@@ -1784,6 +1784,17 @@ PluginsEnabled:
+@@ -1517,6 +1518,7 @@ CrossOriginEmbedderPolicyEnabled:
WebCore:
default: false
-+PointerLockEnabled:
-+ type: bool
-+ condition: ENABLE(POINTER_LOCK)
-+ defaultValue:
-+ WebKitLegacy:
-+ default: true
-+ WebKit:
-+ default: true
-+ WebCore:
-+ default: true
-+
- PrivateClickMeasurementEnabled:
++# Playwright: disable setting.
+ CrossOriginOpenerPolicyEnabled:
type: bool
- humanReadableName: "Private Click Measurement"
-diff --git a/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml b/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
-index 712cf13b0d34848990384965147ef71b7f728a80..6c13be70d8d9b3ef374e22e9506301a080864a28 100644
---- a/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
-+++ b/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
-@@ -661,7 +661,7 @@ CrossOriginOpenerPolicyEnabled:
+ status: stable
+@@ -1526,7 +1528,7 @@ CrossOriginOpenerPolicyEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -2137,27 +2127,58 @@ index 712cf13b0d34848990384965147ef71b7f728a80..6c13be70d8d9b3ef374e22e9506301a0
WebCore:
default: false
-@@ -1019,6 +1019,7 @@ IsThirdPartyCookieBlockingDisabled:
+@@ -1556,7 +1558,7 @@ CustomPasteboardDataEnabled:
+ WebKitLegacy:
+ default: false
+ WebKit:
+- "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WIN)": true
++ "PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)": true
+ default: false
+
+ DNSPrefetchingEnabled:
+@@ -1599,6 +1601,7 @@ DOMAudioSessionFullEnabled:
WebCore:
default: false
-+# Playwright: disable loading=lazy
- LazyIframeLoadingEnabled:
++# Playwright: enable on all platforms to align with Safari.
+ DOMPasteAccessRequestsEnabled:
type: bool
- humanReadableName: "Lazy iframe loading"
-@@ -1027,9 +1028,9 @@ LazyIframeLoadingEnabled:
- WebKitLegacy:
- default: true
+ status: internal
+@@ -1609,7 +1612,7 @@ DOMPasteAccessRequestsEnabled:
+ default: false
WebKit:
-- default: true
-+ default: false
+ "PLATFORM(IOS) || PLATFORM(MAC)": true
+- default: false
++ default: true
WebCore:
+ default: false
+
+@@ -2917,6 +2920,7 @@ InspectorAttachmentSide:
+ WebKit:
+ default: 0
+
++# Playwright: disable setting.
+ InspectorStartsAttached:
+ type: bool
+ status: embedder
+@@ -2924,7 +2928,7 @@ InspectorStartsAttached:
+ exposed: [ WebKit ]
+ defaultValue:
+ WebKit:
- default: true
+ default: false
- LazyImageLoadingEnabled:
+ InspectorWindowFrame:
+ type: String
+@@ -3300,6 +3304,7 @@ LayoutViewportHeightExpansionFactor:
+ WebCore:
+ default: 0
+
++# Playwright: disable setting.
+ LazyIframeLoadingEnabled:
type: bool
-@@ -1088,9 +1089,9 @@ MaskWebGLStringsEnabled:
+ status: stable
+@@ -3309,10 +3314,11 @@ LazyIframeLoadingEnabled:
WebKitLegacy:
default: true
WebKit:
@@ -2167,30 +2188,48 @@ index 712cf13b0d34848990384965147ef71b7f728a80..6c13be70d8d9b3ef374e22e9506301a0
- default: true
+ default: false
- MasonryEnabled:
++# Playwright: disable setting.
+ LazyImageLoadingEnabled:
type: bool
-@@ -1655,7 +1656,7 @@ SpeechRecognitionEnabled:
+ status: stable
+@@ -3322,7 +3328,7 @@ LazyImageLoadingEnabled:
WebKitLegacy:
default: false
WebKit:
-- "HAVE(SPEECHRECOGNIZER) && ENABLE(MEDIA_STREAM)": true
-+ "ENABLE(MEDIA_STREAM)": true
+- default: true
++ default: false
+ WebCore:
default: false
+
+@@ -4553,6 +4559,19 @@ PluginsEnabled:
WebCore:
default: false
-diff --git a/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml b/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
-index 59d2b3566ce487ff2f05c9f0d7360f10a6be0128..f013b577ced08245e30b2822a0b9e8333b9e3a7c 100644
---- a/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
-+++ b/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
-@@ -1164,6 +1164,7 @@ UseCGDisplayListsForDOMRendering:
+
++# Playwright: add preference 'PointerLockEnabled'.
++PointerLockEnabled:
++ type: bool
++ status: embedder
++ condition: ENABLE(POINTER_LOCK)
++ defaultValue:
++ WebKitLegacy:
++ default: true
++ WebKit:
++ default: true
++ WebCore:
++ default: true
++
+ PreferFasterClickOverDoubleTap:
+ type: bool
+ status: internal
+@@ -6061,6 +6080,7 @@ UseCGDisplayListsForDOMRendering:
WebKit:
default: true
-+# Playwright: force-disable on Windows
++# Playwright: force-disable on Windows.
UseGPUProcessForCanvasRenderingEnabled:
type: bool
- humanReadableName: "GPU Process: Canvas Rendering"
-@@ -1174,7 +1175,7 @@ UseGPUProcessForCanvasRenderingEnabled:
+ status: preview
+@@ -6072,7 +6092,7 @@ UseGPUProcessForCanvasRenderingEnabled:
defaultValue:
WebKit:
"ENABLE(GPU_PROCESS_BY_DEFAULT)": true
@@ -2198,16 +2237,16 @@ index 59d2b3566ce487ff2f05c9f0d7360f10a6be0128..f013b577ced08245e30b2822a0b9e833
+ "PLATFORM(WIN)": false
default: false
- UseGPUProcessForMediaEnabled:
-@@ -1189,6 +1190,7 @@ UseGPUProcessForMediaEnabled:
+ UseGPUProcessForDOMRenderingEnabled:
+@@ -6114,6 +6134,7 @@ UseGPUProcessForMediaEnabled:
"ENABLE(GPU_PROCESS_BY_DEFAULT)": true
default: false
-+# Playwright: force-disable on Windows
++# Playwright: force-disable on Windows.
UseGPUProcessForWebGLEnabled:
type: bool
- humanReadableName: "GPU Process: WebGL"
-@@ -1199,7 +1201,7 @@ UseGPUProcessForWebGLEnabled:
+ status: internal
+@@ -6125,7 +6146,7 @@ UseGPUProcessForWebGLEnabled:
default: false
WebKit:
"ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": true
@@ -2217,7 +2256,7 @@ index 59d2b3566ce487ff2f05c9f0d7360f10a6be0128..f013b577ced08245e30b2822a0b9e833
WebCore:
"ENABLE(GPU_PROCESS_BY_DEFAULT) && ENABLE(GPU_PROCESS_WEBGL_BY_DEFAULT)": true
diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
-index 4cb5cdfb3da22acf6a1f40a60040c45891017af6..a9c9fda14c9bf37f545ecf552039537059cbea87 100644
+index 5e8be2af35c30b5a74221842d745dc9a73c6d8be..77d04901bd0b7d4f6d10ab720f1622b1d58cb80c 100644
--- a/Source/WTF/wtf/PlatformEnable.h
+++ b/Source/WTF/wtf/PlatformEnable.h
@@ -412,7 +412,7 @@
@@ -2239,7 +2278,7 @@ index 4cb5cdfb3da22acf6a1f40a60040c45891017af6..a9c9fda14c9bf37f545ecf5520395370
#if !defined(ENABLE_TOUCH_ACTION_REGIONS)
diff --git a/Source/WTF/wtf/PlatformEnableCocoa.h b/Source/WTF/wtf/PlatformEnableCocoa.h
-index 5f7d59938cbbe0fde74a385f55a0e7b9b39ef104..e944e5bab6938cb9dd875f4928e0348bfe8aa1fd 100644
+index b6631dd48afad8ac946e421cb8c1564f1770c91a..9f623b5fcf42ca46b56b990a5a650ecc1f59066f 100644
--- a/Source/WTF/wtf/PlatformEnableCocoa.h
+++ b/Source/WTF/wtf/PlatformEnableCocoa.h
@@ -255,7 +255,7 @@
@@ -2252,10 +2291,10 @@ index 5f7d59938cbbe0fde74a385f55a0e7b9b39ef104..e944e5bab6938cb9dd875f4928e0348b
#endif
diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h
-index 038b33f3fe519646aa8558e7c862d9cbd3150482..5f8226eaf0f09b72812b432483a2dda47844a6fd 100644
+index a0c0d75c4bba005930f93e0a6830f7620ee4d708..55fe328ce5bc7431b8a51ccbf43fea6d329b7b42 100644
--- a/Source/WTF/wtf/PlatformHave.h
+++ b/Source/WTF/wtf/PlatformHave.h
-@@ -422,7 +422,7 @@
+@@ -426,7 +426,7 @@
#define HAVE_FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT 1
#endif
@@ -2264,7 +2303,7 @@ index 038b33f3fe519646aa8558e7c862d9cbd3150482..5f8226eaf0f09b72812b432483a2dda4
#define HAVE_OS_DARK_MODE_SUPPORT 1
#endif
-@@ -1317,7 +1317,8 @@
+@@ -1321,7 +1321,8 @@
#endif
#if PLATFORM(MAC)
@@ -2275,10 +2314,10 @@ index 038b33f3fe519646aa8558e7c862d9cbd3150482..5f8226eaf0f09b72812b432483a2dda4
#if (!defined(HAVE_LOCKDOWN_MODE_PDF_ADDITIONS) && \
diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make
-index 3c5edc9b5faa51cc03cc61d4099e7bf1182496c3..7a01de4f2649ebc594f81122ae3a3d7be83c989a 100644
+index 3729a208b4c8d9819f6dea3192cce6d67c6a11b4..b17e05d61954cfe2898c28cd7ff3dadb2fb0b1b7 100644
--- a/Source/WebCore/DerivedSources.make
+++ b/Source/WebCore/DerivedSources.make
-@@ -1034,6 +1034,10 @@ JS_BINDING_IDLS := \
+@@ -1038,6 +1038,10 @@ JS_BINDING_IDLS := \
$(WebCore)/dom/Slotable.idl \
$(WebCore)/dom/StaticRange.idl \
$(WebCore)/dom/StringCallback.idl \
@@ -2289,7 +2328,7 @@ index 3c5edc9b5faa51cc03cc61d4099e7bf1182496c3..7a01de4f2649ebc594f81122ae3a3d7b
$(WebCore)/dom/Text.idl \
$(WebCore)/dom/TextDecoder.idl \
$(WebCore)/dom/TextDecoderStream.idl \
-@@ -1574,9 +1578,6 @@ ADDITIONAL_BINDING_IDLS = \
+@@ -1580,9 +1584,6 @@ ADDITIONAL_BINDING_IDLS = \
GestureEvent.idl \
Internals+Additions.idl \
InternalsAdditions.idl \
@@ -2363,7 +2402,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
[self sendSpeechEndIfNeeded];
diff --git a/Source/WebCore/PlatformWPE.cmake b/Source/WebCore/PlatformWPE.cmake
-index 9741a79be98a93c7b6151d762af343f6bbd14bde..029fb407b941a38c3d0f5d0e4d293666f7d7c7f3 100644
+index ca1b377de5ef0be938bfa7356f67714a03a90c02..6468a08f678bd657c1c2cf1f928aa5a9874a7bba 100644
--- a/Source/WebCore/PlatformWPE.cmake
+++ b/Source/WebCore/PlatformWPE.cmake
@@ -50,6 +50,7 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
@@ -2375,10 +2414,10 @@ index 9741a79be98a93c7b6151d762af343f6bbd14bde..029fb407b941a38c3d0f5d0e4d293666
set(CSS_VALUE_PLATFORM_DEFINES "HAVE_OS_DARK_MODE_SUPPORT=1")
diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt
-index fe796b9f241f7129bba5f9e1dc464f89cf10a7a1..ea0023693f722ed5df755185896306b98f3f50de 100644
+index 26dc2aa0ba6900b43514ab94929ca81f07995c1f..3771eea385b374c583824240fa4e9977a0956456 100644
--- a/Source/WebCore/SourcesCocoa.txt
+++ b/Source/WebCore/SourcesCocoa.txt
-@@ -661,3 +661,9 @@ platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify
+@@ -682,3 +682,9 @@ platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify
platform/graphics/cocoa/ANGLEUtilitiesCocoa.cpp @no-unify
platform/graphics/cocoa/GraphicsContextGLCocoa.mm @no-unify
platform/graphics/cv/GraphicsContextGLCVCocoa.cpp @no-unify
@@ -2449,10 +2488,10 @@ index a5938677622935e2c6ca3ed76c3a12d0eb7e04a7..cea2a0e330cfdf01b172b3f6acc60acb
__ZN7WebCore14DocumentLoaderD2Ev
__ZN7WebCore14DocumentLoader17clearMainResourceEv
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc44e252e02 100644
+index e4516ba0cb033df81189b69b4f2c9604fede76c5..04bf943d7d84a00cf0d7f30ade1200f03d16eb62 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-@@ -5709,6 +5709,13 @@
+@@ -5763,6 +5763,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, ); }; };
@@ -2466,7 +2505,7 @@ index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc4
F12171F616A8CF0B000053CA /* WebVTTElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F12171F416A8BC63000053CA /* WebVTTElement.h */; };
F32BDCD92363AACA0073B6AE /* UserGestureEmulationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = F32BDCD72363AACA0073B6AE /* UserGestureEmulationScope.h */; };
F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
-@@ -18502,6 +18509,14 @@
+@@ -18672,6 +18679,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>"; };
@@ -2481,7 +2520,7 @@ index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc4
F12171F316A8BC63000053CA /* WebVTTElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTElement.cpp; sourceTree = "<group>"; };
F12171F416A8BC63000053CA /* WebVTTElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTElement.h; sourceTree = "<group>"; };
F32BDCD52363AAC90073B6AE /* UserGestureEmulationScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserGestureEmulationScope.cpp; sourceTree = "<group>"; };
-@@ -25380,6 +25395,11 @@
+@@ -25581,6 +25596,11 @@
BC4A5324256055590028C592 /* TextDirectionSubmenuInclusionBehavior.h */,
2D4F96F11A1ECC240098BF88 /* TextIndicator.cpp */,
2D4F96F21A1ECC240098BF88 /* TextIndicator.h */,
@@ -2493,7 +2532,7 @@ index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc4
F48570A42644C76D00C05F71 /* TranslationContextMenuInfo.h */,
F4E1965F21F26E4E00285078 /* UndoItem.cpp */,
2ECDBAD521D8906300F00ECD /* UndoItem.h */,
-@@ -31341,6 +31361,8 @@
+@@ -31621,6 +31641,8 @@
29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */,
1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */,
1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */,
@@ -2502,7 +2541,7 @@ index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc4
0FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */,
935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,
BCBB8AB513F1AFB000734DF0 /* PODInterval.h */,
-@@ -33801,6 +33823,7 @@
+@@ -34109,6 +34131,7 @@
AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */,
6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */,
6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */,
@@ -2510,7 +2549,7 @@ index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc4
7CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */,
7CE7FA591EF882300060C9D6 /* DocumentTouch.h */,
A8185F3209765765005826D9 /* DocumentType.cpp */,
-@@ -38173,6 +38196,8 @@
+@@ -38512,6 +38535,8 @@
1AD8F81B11CAB9E900E93E54 /* PlatformStrategies.h in Headers */,
0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */,
074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */,
@@ -2519,7 +2558,7 @@ index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc4
CDD08ABD277E542600EA3755 /* PlatformTrackConfiguration.h in Headers */,
CD1F9B022700323D00617EB6 /* PlatformVideoColorPrimaries.h in Headers */,
CD1F9B01270020B700617EB6 /* PlatformVideoColorSpace.h in Headers */,
-@@ -39354,6 +39379,7 @@
+@@ -39710,6 +39735,7 @@
0F54DD081881D5F5003EEDBB /* Touch.h in Headers */,
71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */,
0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */,
@@ -2527,15 +2566,15 @@ index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc4
0F54DD0A1881D5F5003EEDBB /* TouchList.h in Headers */,
070334D71459FFD5008D8D45 /* TrackBase.h in Headers */,
BE88E0C21715CE2600658D98 /* TrackListBase.h in Headers */,
-@@ -40333,6 +40359,7 @@
+@@ -40674,6 +40700,7 @@
1ABA76CA11D20E50004C201C /* CSSPropertyNames.cpp in Sources */,
2D22830323A8470700364B7E /* CursorMac.mm in Sources */,
5CBD59592280E926002B22AA /* CustomHeaderFields.cpp in Sources */,
+ F050E17423AD6A800011CE47 /* DocumentTouch.cpp in Sources */,
329C0C2528BD96EB00F187D2 /* ElementName.cpp in Sources */,
7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */,
- 5130F2F624AEA60A00E1D0A0 /* GameControllerSoftLink.mm in Sources */,
-@@ -40406,6 +40433,9 @@
+ 4667EA3E2968D9DA00BAB1E2 /* GameControllerHapticEffect.mm in Sources */,
+@@ -40751,6 +40778,9 @@
329C0C2328BD96D600F187D2 /* TagName.cpp in Sources */,
CE88EE262414467B007F29C2 /* TextAlternativeWithRange.mm in Sources */,
51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
@@ -2546,7 +2585,7 @@ index a2d61fc9cd55f36a64e6ea8a8cf7c79dd049070f..649fd9e8f50ea76ae90a6a5ebbde4bc4
538EC8021F96AF81004D22A8 /* UnifiedSource1.cpp in Sources */,
538EC8051F96AF81004D22A8 /* UnifiedSource2-mm.mm in Sources */,
diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp
-index 9ab9296131b597dc7a675b7f05637587874aafd3..b78cb5039f1d3f3350d0da171ef02d912280001a 100644
+index fc9a0a8c4078fd533364d429dee947d0f801d887..2a43efe25027d712178600ef8e9ba5be7f279118 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp
@@ -62,6 +62,7 @@
@@ -2557,7 +2596,7 @@ index 9ab9296131b597dc7a675b7f05637587874aafd3..b78cb5039f1d3f3350d0da171ef02d91
#include "LocalizedStrings.h"
#include "MathMLNames.h"
#include "NodeList.h"
-@@ -3653,9 +3654,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const
+@@ -3657,9 +3658,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const
if (roleValue() == AccessibilityRole::ApplicationDialog)
return AccessibilityObjectInclusion::IncludeObject;
@@ -2574,30 +2613,8 @@ index 9ab9296131b597dc7a675b7f05637587874aafd3..b78cb5039f1d3f3350d0da171ef02d91
bool AccessibilityObject::accessibilityIsIgnored() const
{
AXComputedObjectAttributeCache* attributeCache = nullptr;
-diff --git a/Source/WebCore/accessibility/AccessibilityObjectInterface.h b/Source/WebCore/accessibility/AccessibilityObjectInterface.h
-index 4514a8f1fd9d79f4138c94ab9d8e7ac662862bba..ba3a6e13f595b47b968aae7ef3eab54b1eaf0d38 100644
---- a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
-+++ b/Source/WebCore/accessibility/AccessibilityObjectInterface.h
-@@ -57,7 +57,7 @@ typedef const struct __AXTextMarkerRange* AXTextMarkerRangeRef;
- #elif USE(ATSPI)
- typedef WebCore::AccessibilityObjectAtspi AccessibilityObjectWrapper;
- #else
--class AccessibilityObjectWrapper;
-+class AccessibilityObjectWrapper : public RefCounted<AccessibilityObjectWrapper> {};
- #endif
-
- namespace PAL {
-@@ -1430,6 +1430,8 @@ private:
- COMPtr<AccessibilityObjectWrapper> m_wrapper;
- #elif USE(ATSPI)
- RefPtr<AccessibilityObjectAtspi> m_wrapper;
-+#else
-+ RefPtr<AccessibilityObjectWrapper> m_wrapper;
- #endif
- };
-
diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
-index 418244258bf77191eabf6926790e2d42698eaa52..7e50b0035652c737c743c8d0a596f2aa4d36f846 100644
+index c4fd0ee5013d5f22e61a8013abe67a1730128705..97412e7a3bd1c95ce1bd8a4f5d1528ebcc6fa8bb 100644
--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
@@ -162,6 +162,8 @@ namespace WebCore {
@@ -2610,10 +2627,23 @@ index 418244258bf77191eabf6926790e2d42698eaa52..7e50b0035652c737c743c8d0a596f2aa
macro(DynamicsCompressorNode) \
macro(ElementInternals) \
diff --git a/Source/WebCore/css/query/MediaQueryFeatures.cpp b/Source/WebCore/css/query/MediaQueryFeatures.cpp
-index ab1ccbfa400ef05139c1f5c7cf25efaf6e74a16e..d6e8c2dc7ef6f0f6081057574d0ace874424ae03 100644
+index ab1ccbfa400ef05139c1f5c7cf25efaf6e74a16e..fdb488be74e8715da0c62d70832851393801f913 100644
--- a/Source/WebCore/css/query/MediaQueryFeatures.cpp
+++ b/Source/WebCore/css/query/MediaQueryFeatures.cpp
-@@ -535,6 +535,9 @@ const FeatureSchema& prefersReducedMotion()
+@@ -355,7 +355,11 @@ const FeatureSchema& forcedColors()
+ static MainThreadNeverDestroyed<IdentifierSchema> schema {
+ "forced-colors"_s,
+ Vector { CSSValueNone, CSSValueActive },
+- [](auto&) {
++ [](auto& context) {
++ auto* page = context.document.frame()->page();
++ std::optional<bool> forcedColorsOverride = page->useForcedColorsOverride();
++ if (forcedColorsOverride)
++ return forcedColorsOverride.value() ? MatchingIdentifiers { CSSValueActive } : MatchingIdentifiers { CSSValueNone };
+ return MatchingIdentifiers { CSSValueNone };
+ }
+ };
+@@ -535,6 +539,9 @@ const FeatureSchema& prefersReducedMotion()
[](auto& context) {
bool userPrefersReducedMotion = [&] {
auto& frame = *context.document.frame();
@@ -2624,7 +2654,7 @@ index ab1ccbfa400ef05139c1f5c7cf25efaf6e74a16e..d6e8c2dc7ef6f0f6081057574d0ace87
case ForcedAccessibilityValue::On:
return true;
diff --git a/Source/WebCore/dom/DataTransfer.cpp b/Source/WebCore/dom/DataTransfer.cpp
-index 4eaef7290df7c6c814e8fba35c222fe0a0152983..e49e2b3c75d9cabb28a134e25032a071b36683cf 100644
+index c816a217e6d632a472e4f7a499d051443c599e84..e5733a0e482ea5f8a2e319bccb02f13f33d75cb8 100644
--- a/Source/WebCore/dom/DataTransfer.cpp
+++ b/Source/WebCore/dom/DataTransfer.cpp
@@ -503,6 +503,14 @@ Ref<DataTransfer> DataTransfer::createForDrag(const Document& document)
@@ -2853,10 +2883,10 @@ index 780b9decb28f284cfdc3f88a11bef37dd3e96ca5..0b827f111748054377e296c3973089eb
#endif // USE(LIBWPE)
diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp
-index 80d0a5347ef02ae78f1e99415b871cc6229a5bad..abc27f89fc177007a7e1da04ab25f0f833d3c294 100644
+index c24037a5738c3b02ab26044db7c5830f8eabd8ad..e3ada478803f06243e9317fc96dee74a3825b577 100644
--- a/Source/WebCore/html/FileInputType.cpp
+++ b/Source/WebCore/html/FileInputType.cpp
-@@ -39,6 +39,7 @@
+@@ -38,6 +38,7 @@
#include "HTMLNames.h"
#include "Icon.h"
#include "InputTypeNames.h"
@@ -2864,7 +2894,7 @@ index 80d0a5347ef02ae78f1e99415b871cc6229a5bad..abc27f89fc177007a7e1da04ab25f0f8
#include "LocalizedStrings.h"
#include "MIMETypeRegistry.h"
#include "RenderFileUploadControl.h"
-@@ -206,6 +207,11 @@ void FileInputType::handleDOMActivateEvent(Event& event)
+@@ -205,6 +206,11 @@ void FileInputType::handleDOMActivateEvent(Event& event)
if (input.isDisabledFormControl())
return;
@@ -2876,6 +2906,17 @@ index 80d0a5347ef02ae78f1e99415b871cc6229a5bad..abc27f89fc177007a7e1da04ab25f0f8
if (!UserGestureIndicator::processingUserGesture())
return;
+@@ -374,7 +380,9 @@ void FileInputType::setFiles(RefPtr<FileList>&& files, RequestIcon shouldRequest
+ pathsChanged = true;
+ else {
+ for (unsigned i = 0; i < length; ++i) {
+- if (files->file(i).path() != m_fileList->file(i).path() || !FileSystem::fileIDsAreEqual(files->file(i).fileID(), m_fileList->file(i).fileID())) {
++ if (files->file(i).path() != m_fileList->file(i).path() || !FileSystem::fileIDsAreEqual(files->file(i).fileID(), m_fileList->file(i).fileID()) ||
++ // Files created from Blob have empty path.
++ (files->file(i).path().isEmpty() && files->file(i).name() != m_fileList->file(i).name())) {
+ pathsChanged = true;
+ break;
+ }
diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp
index d392cf514a0306ba9eb516a5cb4c92280ed13bb0..276daf6464546a451de17951d3c6773555d9ae17 100644
--- a/Source/WebCore/inspector/InspectorController.cpp
@@ -2958,7 +2999,7 @@ index d41c9f913f5916aec62452041d5a40988b4a25c9..aa62e18e401249aad2939aa62a20c8e2
} // namespace WebCore
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
-index 5186d9c00d3611633ff89dceb3230a7742f8e1db..0a0f0267104d54695c55860e16b92d983faa0e43 100644
+index 88725f518d3bc0a46d15ca14fab3b8d252fb3816..6612a07e137e7b53b3f029ab36ee627a4a26dc8a 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -601,6 +601,12 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i
@@ -3024,6 +3065,19 @@ index 5186d9c00d3611633ff89dceb3230a7742f8e1db..0a0f0267104d54695c55860e16b92d98
void InspectorInstrumentation::frameStartedLoadingImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
{
if (frame.isMainFrame()) {
+@@ -840,10 +843,10 @@ void InspectorInstrumentation::frameStoppedLoadingImpl(InstrumentingAgents& inst
+ inspectorPageAgent->frameStoppedLoading(frame);
+ }
+
+-void InspectorInstrumentation::frameScheduledNavigationImpl(InstrumentingAgents& instrumentingAgents, Frame& frame, Seconds delay)
++void InspectorInstrumentation::frameScheduledNavigationImpl(InstrumentingAgents& instrumentingAgents, Frame& frame, Seconds delay, bool targetIsCurrentFrame)
+ {
+ if (auto* inspectorPageAgent = instrumentingAgents.enabledPageAgent())
+- inspectorPageAgent->frameScheduledNavigation(frame, delay);
++ inspectorPageAgent->frameScheduledNavigation(frame, delay, targetIsCurrentFrame);
+ }
+
+ void InspectorInstrumentation::frameClearedScheduledNavigationImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
@@ -858,6 +861,12 @@ void InspectorInstrumentation::accessibilitySettingsDidChangeImpl(InstrumentingA
inspectorPageAgent->accessibilitySettingsDidChange();
}
@@ -3102,7 +3156,7 @@ index 5186d9c00d3611633ff89dceb3230a7742f8e1db..0a0f0267104d54695c55860e16b92d98
{
if (is<Document>(context))
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
-index 91ba27fea97c8925fdbd7b1ae967b784540c0d70..1aa4925aa1260605b3f7710e6b5e3b74818363bf 100644
+index 540e42cc8be86644470c90b0bbbd24bff8a38c9d..072ee2a97fcf5d60c5e1b540173348a6f2565625 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
@@ -31,6 +31,7 @@
@@ -3152,7 +3206,8 @@ index 91ba27fea97c8925fdbd7b1ae967b784540c0d70..1aa4925aa1260605b3f7710e6b5e3b74
- static void loaderDetachedFromFrame(Frame&, DocumentLoader&);
static void frameStartedLoading(Frame&);
static void frameStoppedLoading(Frame&);
- static void frameScheduledNavigation(Frame&, Seconds delay);
+- static void frameScheduledNavigation(Frame&, Seconds delay);
++ static void frameScheduledNavigation(Frame&, Seconds delay, bool targetIsCurrentFrame);
static void frameClearedScheduledNavigation(Frame&);
static void accessibilitySettingsDidChange(Page&);
+ static void didNavigateWithinPage(Frame&);
@@ -3212,7 +3267,8 @@ index 91ba27fea97c8925fdbd7b1ae967b784540c0d70..1aa4925aa1260605b3f7710e6b5e3b74
- static void loaderDetachedFromFrameImpl(InstrumentingAgents&, DocumentLoader&);
static void frameStartedLoadingImpl(InstrumentingAgents&, Frame&);
static void frameStoppedLoadingImpl(InstrumentingAgents&, Frame&);
- static void frameScheduledNavigationImpl(InstrumentingAgents&, Frame&, Seconds delay);
+- static void frameScheduledNavigationImpl(InstrumentingAgents&, Frame&, Seconds delay);
++ static void frameScheduledNavigationImpl(InstrumentingAgents&, Frame&, Seconds delay, bool targetIsCurrentFrame);
static void frameClearedScheduledNavigationImpl(InstrumentingAgents&, Frame&);
static void accessibilitySettingsDidChangeImpl(InstrumentingAgents&);
+ static void didNavigateWithinPageImpl(InstrumentingAgents&, Frame&);
@@ -3282,6 +3338,20 @@ index 91ba27fea97c8925fdbd7b1ae967b784540c0d70..1aa4925aa1260605b3f7710e6b5e3b74
inline void InspectorInstrumentation::frameStartedLoading(Frame& frame)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
+@@ -1274,11 +1304,11 @@ inline void InspectorInstrumentation::frameStoppedLoading(Frame& frame)
+ frameStoppedLoadingImpl(*agents, frame);
+ }
+
+-inline void InspectorInstrumentation::frameScheduledNavigation(Frame& frame, Seconds delay)
++inline void InspectorInstrumentation::frameScheduledNavigation(Frame& frame, Seconds delay, bool targetIsCurrentFrame)
+ {
+ FAST_RETURN_IF_NO_FRONTENDS(void());
+ if (auto* agents = instrumentingAgents(frame))
+- frameScheduledNavigationImpl(*agents, frame, delay);
++ frameScheduledNavigationImpl(*agents, frame, delay, targetIsCurrentFrame);
+ }
+
+ inline void InspectorInstrumentation::frameClearedScheduledNavigation(Frame& frame)
@@ -1294,6 +1324,13 @@ inline void InspectorInstrumentation::accessibilitySettingsDidChange(Page& page)
accessibilitySettingsDidChangeImpl(instrumentingAgents(page));
}
@@ -3364,7 +3434,7 @@ index 07103c35e0a9193a010a85cf2ea8017b2ad59212..338d158be5a6f35adc6817dc94d6084b
class UserGestureEmulationScope {
WTF_MAKE_NONCOPYABLE(UserGestureEmulationScope);
diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
-index aefd8aa53a0578d335a077a224481cd139b32edf..fb2efda3bea3b924d49f26ed91ffe7d2f1f84b43 100644
+index aefd8aa53a0578d335a077a224481cd139b32edf..77316083fa2e841cd3e08db84897e379020f2dbf 100644
--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
@@ -62,12 +62,16 @@
@@ -3570,7 +3640,7 @@ index aefd8aa53a0578d335a077a224481cd139b32edf..fb2efda3bea3b924d49f26ed91ffe7d2
+ if (!renderer)
+ return makeUnexpected("Node does not have a layout object"_s);
+
-+ bool insideFixed;
++ bool insideFixed = false;
+ LayoutRect absoluteBounds = renderer->absoluteBoundingBoxRect(true, &insideFixed);
+ if (rect) {
+ std::optional<double> x = rect->getDouble("x"_s);
@@ -3918,7 +3988,7 @@ index c6ebcc9d7e399a35f71350c9374df0f2107c518b..3bfa03ae7f27d9128fe207c1de1bfea9
// InspectorInstrumentation
void willRecalculateStyle();
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
-index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713ac8ad6143 100644
+index a88b7eec7ac6de39d55bb5e6045677b2a495299a..e4cb156d0fcf7b3be0953b9f185a08838e55cd08 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
@@ -32,21 +32,29 @@
@@ -3951,11 +4021,12 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
#include "HTMLNames.h"
#include "ImageBuffer.h"
#include "InspectorClient.h"
-@@ -57,8 +65,11 @@
+@@ -57,8 +65,12 @@
#include "MIMETypeRegistry.h"
#include "MemoryCache.h"
#include "Page.h"
+#include "PageRuntimeAgent.h"
++#include "PlatformScreen.h"
#include "RenderObject.h"
#include "RenderTheme.h"
+#include "DeprecatedGlobalSettings.h"
@@ -3963,7 +4034,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "SecurityOrigin.h"
-@@ -66,11 +77,18 @@
+@@ -66,11 +78,18 @@
#include "StyleScope.h"
#include "Theme.h"
#include <pal/text/TextEncoding.h>
@@ -3982,7 +4053,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
#include <wtf/Stopwatch.h>
#include <wtf/text/Base64.h>
#include <wtf/text/StringBuilder.h>
-@@ -83,11 +101,15 @@
+@@ -83,11 +102,15 @@
#include "LegacyWebArchive.h"
#endif
@@ -3999,7 +4070,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
static bool decodeBuffer(const uint8_t* buffer, unsigned size, const String& textEncodingName, String* result)
{
if (buffer) {
-@@ -331,6 +353,7 @@ InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorClien
+@@ -331,6 +354,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)
@@ -4007,7 +4078,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
, m_client(client)
, m_overlay(overlay)
{
-@@ -360,12 +383,20 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::enable()
+@@ -360,12 +384,20 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::enable()
defaultUserPreferencesDidChange();
@@ -4028,7 +4099,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
setShowPaintRects(false);
#if !PLATFORM(IOS_FAMILY)
-@@ -414,6 +445,22 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optional<bool>&& i
+@@ -414,6 +446,22 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optional<bool>&& i
return { };
}
@@ -4051,7 +4122,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
Protocol::ErrorStringOr<void> InspectorPageAgent::navigate(const String& url)
{
Frame& frame = m_inspectedPage.mainFrame();
-@@ -435,6 +482,13 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideUserAgent(const String
+@@ -435,6 +483,13 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideUserAgent(const String
return { };
}
@@ -4065,7 +4136,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page::Setting setting, std::optional<bool>&& value)
{
auto& inspectedPageSettings = m_inspectedPage.settings();
-@@ -448,6 +502,12 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
+@@ -448,6 +503,12 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
inspectedPageSettings.setAuthorAndUserStylesEnabledInspectorOverride(value);
return { };
@@ -4078,7 +4149,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
case Protocol::Page::Setting::ICECandidateFilteringEnabled:
inspectedPageSettings.setICECandidateFilteringEnabledInspectorOverride(value);
return { };
-@@ -473,6 +533,36 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
+@@ -473,6 +534,38 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
inspectedPageSettings.setNeedsSiteSpecificQuirksInspectorOverride(value);
return { };
@@ -4094,17 +4165,19 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
+ return { };
+#endif
+
-+#if ENABLE(INPUT_TYPE_MONTH)
+ case Protocol::Page::Setting::InputTypeMonthEnabled:
++// Playwright client sends it even if it's not supported.
++#if ENABLE(INPUT_TYPE_MONTH)
+ inspectedPageSettings.setInputTypeMonthEnabled(value.value_or(false));
-+ return { };
+#endif
++ return { };
+
-+#if ENABLE(INPUT_TYPE_WEEK)
+ case Protocol::Page::Setting::InputTypeWeekEnabled:
++// Playwright client sends it even if it's not supported.
++#if ENABLE(INPUT_TYPE_WEEK)
+ inspectedPageSettings.setInputTypeWeekEnabled(value.value_or(false));
-+ return { };
+#endif
++ return { };
+
+#if ENABLE(POINTER_LOCK)
+ case Protocol::Page::Setting::PointerLockEnabled:
@@ -4115,7 +4188,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
case Protocol::Page::Setting::ScriptEnabled:
inspectedPageSettings.setScriptEnabledInspectorOverride(value);
return { };
-@@ -485,6 +575,12 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
+@@ -485,6 +578,12 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
inspectedPageSettings.setShowRepaintCounterInspectorOverride(value);
return { };
@@ -4128,7 +4201,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
case Protocol::Page::Setting::WebRTCEncryptionEnabled:
inspectedPageSettings.setWebRTCEncryptionEnabledInspectorOverride(value);
return { };
-@@ -780,9 +876,13 @@ Protocol::ErrorStringOr<std::tuple<String, bool /* base64Encoded */>> InspectorP
+@@ -780,9 +879,13 @@ Protocol::ErrorStringOr<std::tuple<String, bool /* base64Encoded */>> InspectorP
return { { content, base64Encoded } };
}
@@ -4144,7 +4217,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
return { };
}
-@@ -888,15 +988,16 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setShowPaintRects(bool show)
+@@ -888,15 +991,16 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setShowPaintRects(bool show)
return { };
}
@@ -4166,7 +4239,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
}
void InspectorPageAgent::frameNavigated(Frame& frame)
-@@ -904,13 +1005,23 @@ void InspectorPageAgent::frameNavigated(Frame& frame)
+@@ -904,13 +1008,23 @@ void InspectorPageAgent::frameNavigated(Frame& frame)
m_frontendDispatcher->frameNavigated(buildObjectForFrame(&frame));
}
@@ -4193,7 +4266,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
}
Frame* InspectorPageAgent::frameForId(const Protocol::Network::FrameId& frameId)
-@@ -922,20 +1033,18 @@ String InspectorPageAgent::frameId(Frame* frame)
+@@ -922,20 +1036,18 @@ String InspectorPageAgent::frameId(Frame* frame)
{
if (!frame)
return emptyString();
@@ -4220,7 +4293,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
}
Frame* InspectorPageAgent::assertFrame(Protocol::ErrorString& errorString, const Protocol::Network::FrameId& frameId)
-@@ -946,11 +1055,6 @@ Frame* InspectorPageAgent::assertFrame(Protocol::ErrorString& errorString, const
+@@ -946,11 +1058,6 @@ Frame* InspectorPageAgent::assertFrame(Protocol::ErrorString& errorString, const
return frame;
}
@@ -4232,7 +4305,19 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
void InspectorPageAgent::frameStartedLoading(Frame& frame)
{
m_frontendDispatcher->frameStartedLoading(frameId(&frame));
-@@ -1018,6 +1122,12 @@ void InspectorPageAgent::defaultUserPreferencesDidChange()
+@@ -961,9 +1068,9 @@ void InspectorPageAgent::frameStoppedLoading(Frame& frame)
+ m_frontendDispatcher->frameStoppedLoading(frameId(&frame));
+ }
+
+-void InspectorPageAgent::frameScheduledNavigation(Frame& frame, Seconds delay)
++void InspectorPageAgent::frameScheduledNavigation(Frame& frame, Seconds delay, bool targetIsCurrentFrame)
+ {
+- m_frontendDispatcher->frameScheduledNavigation(frameId(&frame), delay.value());
++ m_frontendDispatcher->frameScheduledNavigation(frameId(&frame), delay.value(), targetIsCurrentFrame);
+ }
+
+ void InspectorPageAgent::frameClearedScheduledNavigation(Frame& frame)
+@@ -1018,6 +1125,12 @@ void InspectorPageAgent::defaultUserPreferencesDidChange()
m_frontendDispatcher->defaultUserPreferencesDidChange(WTFMove(defaultUserPreferences));
}
@@ -4245,7 +4330,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
void InspectorPageAgent::defaultAppearanceDidChange()
{
-@@ -1027,13 +1137,22 @@ void InspectorPageAgent::defaultAppearanceDidChange()
+@@ -1027,13 +1140,22 @@ void InspectorPageAgent::defaultAppearanceDidChange()
void InspectorPageAgent::didClearWindowObjectInWorld(Frame& frame, DOMWrapperWorld& world)
{
@@ -4271,7 +4356,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
}
void InspectorPageAgent::didPaint(RenderObject& renderer, const LayoutRect& rect)
-@@ -1078,6 +1197,51 @@ void InspectorPageAgent::didRecalculateStyle()
+@@ -1078,6 +1200,51 @@ void InspectorPageAgent::didRecalculateStyle()
m_overlay->update();
}
@@ -4323,7 +4408,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
Ref<Protocol::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame)
{
ASSERT_ARG(frame, frame);
-@@ -1171,6 +1335,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent)
+@@ -1171,6 +1338,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent)
userAgent = m_userAgentOverride;
}
@@ -4336,7 +4421,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
void InspectorPageAgent::applyEmulatedMedia(AtomString& media)
{
if (!m_emulatedMedia.isEmpty())
-@@ -1194,11 +1364,13 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Protocol::DOM::
+@@ -1194,11 +1367,13 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Protocol::DOM::
return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes);
}
@@ -4351,30 +4436,10 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
IntRect rectangle(x, y, width, height);
auto snapshot = snapshotFrameRect(m_inspectedPage.mainFrame(), rectangle, WTFMove(options));
-@@ -1209,6 +1381,67 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, i
+@@ -1209,6 +1384,43 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, i
return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes);
}
-+Protocol::ErrorStringOr<void> InspectorPageAgent::setForcedReducedMotion(std::optional<Protocol::Page::ReducedMotion>&& reducedMotion)
-+{
-+ if (!reducedMotion) {
-+ m_inspectedPage.setUseReducedMotionOverride(std::nullopt);
-+ return { };
-+ }
-+
-+ switch (*reducedMotion) {
-+ case Protocol::Page::ReducedMotion::Reduce:
-+ m_inspectedPage.setUseReducedMotionOverride(true);
-+ return { };
-+ case Protocol::Page::ReducedMotion::NoPreference:
-+ m_inspectedPage.setUseReducedMotionOverride(false);
-+ return { };
-+ }
-+
-+ ASSERT_NOT_REACHED();
-+ return { };
-+}
-+
+Protocol::ErrorStringOr<void> InspectorPageAgent::setForcedColors(std::optional<Protocol::Page::ForcedColors>&& forcedColors)
+{
+ if (!forcedColors) {
@@ -4406,20 +4471,16 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
+
+Protocol::ErrorStringOr<void> InspectorPageAgent::setTouchEmulationEnabled(bool enabled)
+{
-+#if ENABLE(TOUCH_EVENTS)
-+ DeprecatedGlobalSettings::setTouchEventsEnabled(enabled);
-+ return { };
-+#else
-+ UNUSED_PARAM(enabled);
-+ return makeUnexpected("Not supported"_s);
-+#endif
++ setScreenHasTouchDeviceOverride(enabled);
++ m_inspectedPage.settings().setTouchEventsEnabled(enabled);
++ return { };
+}
+
+
#if ENABLE(WEB_ARCHIVE) && USE(CF)
Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
{
-@@ -1221,7 +1454,6 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
+@@ -1221,7 +1433,6 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
}
#endif
@@ -4427,7 +4488,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::optional<int>&& width, std::optional<int>&& height)
{
if (width.has_value() != height.has_value())
-@@ -1236,6 +1468,634 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::opt
+@@ -1236,6 +1447,634 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::opt
m_inspectedPage.mainFrame().setOverrideScreenSize(FloatSize(width.value_or(0), height.value_or(0)));
return { };
}
@@ -5063,7 +5124,7 @@ index a88b7eec7ac6de39d55bb5e6045677b2a495299a..28f37879ac049ebce3ac1f83707f713a
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.h b/Source/WebCore/inspector/agents/InspectorPageAgent.h
-index da15dbfd4576edf4e958435ad4a247250b928245..204fb87fff6b6d63e6629e2874a2efa0330b2851 100644
+index da15dbfd4576edf4e958435ad4a247250b928245..89fa3c0b21fef5929f4c3db8324dcde64b6079aa 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.h
@@ -32,8 +32,10 @@
@@ -5123,11 +5184,10 @@ index da15dbfd4576edf4e958435ad4a247250b928245..204fb87fff6b6d63e6629e2874a2efa0
Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>> searchInResource(const Inspector::Protocol::Network::FrameId&, const String& url, const String& query, std::optional<bool>&& caseSensitive, std::optional<bool>&& isRegex, const Inspector::Protocol::Network::RequestId&);
Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::Page::SearchResult>>> searchInResources(const String&, std::optional<bool>&& caseSensitive, std::optional<bool>&& isRegex);
#if !PLATFORM(IOS_FAMILY)
-@@ -114,37 +125,58 @@ public:
+@@ -114,37 +125,57 @@ public:
#endif
Inspector::Protocol::ErrorStringOr<void> setShowPaintRects(bool);
Inspector::Protocol::ErrorStringOr<void> setEmulatedMedia(const String&);
-+ Inspector::Protocol::ErrorStringOr<void> setForcedReducedMotion(std::optional<Inspector::Protocol::Page::ReducedMotion>&&);
+ Inspector::Protocol::ErrorStringOr<void> setForcedColors(std::optional<Inspector::Protocol::Page::ForcedColors>&&);
+ Inspector::Protocol::ErrorStringOr<void> setTimeZone(const String&);
+ Inspector::Protocol::ErrorStringOr<void> setTouchEmulationEnabled(bool);
@@ -5163,7 +5223,8 @@ index da15dbfd4576edf4e958435ad4a247250b928245..204fb87fff6b6d63e6629e2874a2efa0
- void loaderDetachedFromFrame(DocumentLoader&);
void frameStartedLoading(Frame&);
void frameStoppedLoading(Frame&);
- void frameScheduledNavigation(Frame&, Seconds delay);
+- void frameScheduledNavigation(Frame&, Seconds delay);
++ void frameScheduledNavigation(Frame&, Seconds delay, bool targetIsCurrentFrame);
void frameClearedScheduledNavigation(Frame&);
void accessibilitySettingsDidChange();
void defaultUserPreferencesDidChange();
@@ -5188,7 +5249,7 @@ index da15dbfd4576edf4e958435ad4a247250b928245..204fb87fff6b6d63e6629e2874a2efa0
Frame* frameForId(const Inspector::Protocol::Network::FrameId&);
WEBCORE_EXPORT String frameId(Frame*);
-@@ -153,6 +185,7 @@ public:
+@@ -153,6 +184,7 @@ public:
private:
double timestamp();
@@ -5196,7 +5257,7 @@ index da15dbfd4576edf4e958435ad4a247250b928245..204fb87fff6b6d63e6629e2874a2efa0
static bool mainResourceContent(Frame*, bool withBase64Encode, String* result);
static bool dataContent(const uint8_t* data, unsigned size, const String& textEncodingName, bool withBase64Encode, String* result);
-@@ -168,18 +201,21 @@ private:
+@@ -168,18 +200,21 @@ private:
RefPtr<Inspector::PageBackendDispatcher> m_backendDispatcher;
Page& m_inspectedPage;
@@ -5479,10 +5540,10 @@ index 21e33e46bdb1af8434527747e3c308cbe53f60f0..c17c4de17f439c04d27caa532771934c
protected:
static SameSiteInfo sameSiteInfo(const Document&, IsForDOMCookieAccess = IsForDOMCookieAccess::No);
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
-index 7af93825419c992dd7c977275160d2b32ca8dbf4..eb46ca7341ad167db2076a432dd2e6c0fe37d583 100644
+index 6d92fb273a0415f0cfcba433782a6e1386b6afba..a405e03629122c540d4f64affd219448e23d958d 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
-@@ -741,8 +741,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc
+@@ -733,8 +733,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc
if (!didReceiveRedirectResponse)
return completionHandler(WTFMove(newRequest));
@@ -5493,7 +5554,7 @@ index 7af93825419c992dd7c977275160d2b32ca8dbf4..eb46ca7341ad167db2076a432dd2e6c0
switch (navigationPolicyDecision) {
case NavigationPolicyDecision::IgnoreLoad:
case NavigationPolicyDecision::StopAllLoads:
-@@ -1511,8 +1513,6 @@ void DocumentLoader::detachFromFrame()
+@@ -1506,8 +1508,6 @@ void DocumentLoader::detachFromFrame()
if (!m_frame)
return;
@@ -5503,10 +5564,10 @@ index 7af93825419c992dd7c977275160d2b32ca8dbf4..eb46ca7341ad167db2076a432dd2e6c0
}
diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h
-index 56f62d1517898771d4df1f2159af15fd11770155..d95957f28dae75664f27b9a3b812dd563139204e 100644
+index b05ba79ecb09b64a5b11a771e8b30e1b7e3e2c20..3f1ae67f0654a66ff54bd7ab0e71d983b0c65833 100644
--- a/Source/WebCore/loader/DocumentLoader.h
+++ b/Source/WebCore/loader/DocumentLoader.h
-@@ -182,9 +182,13 @@ public:
+@@ -183,9 +183,13 @@ public:
WEBCORE_EXPORT virtual void detachFromFrame();
@@ -5521,10 +5582,10 @@ index 56f62d1517898771d4df1f2159af15fd11770155..d95957f28dae75664f27b9a3b812dd56
DocumentWriter& writer() const { return m_writer; }
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
-index 548faab5a7b1b5e92b4780526f016ffe5307b75a..2afe4e4425b3c8622c14a8306531fb50ca3f58f4 100644
+index f5e7a1a9ba0567dbdf752bec4bdf11e9916c9968..9c9d7fae9e6862fef70db781c42411a3bd04f9da 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
-@@ -1201,6 +1201,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat
+@@ -1196,6 +1196,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat
}
m_client->dispatchDidNavigateWithinPage();
@@ -5532,7 +5593,7 @@ index 548faab5a7b1b5e92b4780526f016ffe5307b75a..2afe4e4425b3c8622c14a8306531fb50
m_frame.document()->statePopped(stateObject ? stateObject.releaseNonNull() : SerializedScriptValue::nullValue());
m_client->dispatchDidPopStateWithinPage();
-@@ -1647,6 +1648,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+@@ -1649,6 +1650,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
const String& httpMethod = loader->request().httpMethod();
if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {
@@ -5541,7 +5602,7 @@ index 548faab5a7b1b5e92b4780526f016ffe5307b75a..2afe4e4425b3c8622c14a8306531fb50
RefPtr<DocumentLoader> oldDocumentLoader = m_documentLoader;
NavigationAction action { *m_frame.document(), loader->request(), InitiatedByMainFrame::Unknown, policyChecker().loadType(), isFormSubmission };
action.setIsRequestFromClientOrUserInput(loader->isRequestFromClientOrUserInput());
-@@ -1679,7 +1682,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+@@ -1681,7 +1684,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
}
RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()) || history().provisionalItem());
@@ -5551,7 +5612,7 @@ index 548faab5a7b1b5e92b4780526f016ffe5307b75a..2afe4e4425b3c8622c14a8306531fb50
continueLoadAfterNavigationPolicy(request, formState.get(), navigationPolicyDecision, allowNavigationToInvalidURL);
completionHandler();
}, PolicyDecisionMode::Asynchronous);
-@@ -2878,12 +2883,17 @@ String FrameLoader::userAgent(const URL& url) const
+@@ -2876,12 +2881,17 @@ String FrameLoader::userAgent(const URL& url) const
String FrameLoader::navigatorPlatform() const
{
@@ -5571,7 +5632,7 @@ index 548faab5a7b1b5e92b4780526f016ffe5307b75a..2afe4e4425b3c8622c14a8306531fb50
}
void FrameLoader::dispatchOnloadEvents()
-@@ -3294,6 +3304,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
+@@ -3293,6 +3303,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
checkCompleted();
if (m_frame.page())
checkLoadComplete();
@@ -5580,7 +5641,7 @@ index 548faab5a7b1b5e92b4780526f016ffe5307b75a..2afe4e4425b3c8622c14a8306531fb50
}
void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, const SecurityOrigin* requesterOrigin, bool shouldContinue)
-@@ -4116,9 +4128,6 @@ String FrameLoader::referrer() const
+@@ -4115,9 +4127,6 @@ String FrameLoader::referrer() const
void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
{
@@ -5590,7 +5651,7 @@ index 548faab5a7b1b5e92b4780526f016ffe5307b75a..2afe4e4425b3c8622c14a8306531fb50
Vector<Ref<DOMWrapperWorld>> worlds;
ScriptController::getAllWorlds(worlds);
for (auto& world : worlds)
-@@ -4127,13 +4136,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
+@@ -4126,13 +4135,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
{
@@ -5622,6 +5683,19 @@ index 29d2e3f46140aaa51160e6a28562f370e371eb21..676ddc9369050c19454fbf5faffac2b2
virtual bool shouldPerformSecurityChecks() const { return false; }
virtual bool havePerformedSecurityChecks(const ResourceResponse&) const { return false; }
+diff --git a/Source/WebCore/loader/NavigationScheduler.cpp b/Source/WebCore/loader/NavigationScheduler.cpp
+index b7e4eb49213057523d45aefd2e912fc775173756..c74407d6b1309bb9ab5b7e84bd915353b1869872 100644
+--- a/Source/WebCore/loader/NavigationScheduler.cpp
++++ b/Source/WebCore/loader/NavigationScheduler.cpp
+@@ -640,7 +640,7 @@ void NavigationScheduler::startTimer()
+
+ Seconds delay = 1_s * m_redirect->delay();
+ m_timer.startOneShot(delay);
+- InspectorInstrumentation::frameScheduledNavigation(m_frame, delay);
++ InspectorInstrumentation::frameScheduledNavigation(m_frame, delay, m_redirect->targetIsCurrentFrame());
+ m_redirect->didStartTimer(m_frame, m_timer); // m_redirect may be null on return (e.g. the client canceled the load)
+ }
+
diff --git a/Source/WebCore/loader/PolicyChecker.cpp b/Source/WebCore/loader/PolicyChecker.cpp
index b54a6042e66d2e27bdbbc03bafe929dd59895e5b..144cd06630077baecb78a3e83aa9af2076e2aa21 100644
--- a/Source/WebCore/loader/PolicyChecker.cpp
@@ -5657,10 +5731,24 @@ index 12874da9a80ed235c9a25c5fd05d6c02df62a053..8e0d01703c8d6b2eaa6aa19623f94cc4
void ProgressTracker::incrementProgress(ResourceLoaderIdentifier identifier, const ResourceResponse& response)
diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
-index e0b17e394f60eb7f4d1935ebd789f294eab20eb3..848cd8f23b2c033f52d34645f06dc2105071ac01 100644
+index 6c21253ea59e005b4a7b8742923347ab54014800..d76c78d0905567192a31ebb9d15310a0fc6fe3c2 100644
--- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
-@@ -1644,8 +1644,9 @@ Vector<Ref<SVGImage>> CachedResourceLoader::allCachedSVGImages() const
+@@ -1009,8 +1009,11 @@ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::requ
+
+ request.updateReferrerPolicy(document() ? document()->referrerPolicy() : ReferrerPolicy::Default);
+
+- if (InspectorInstrumentation::willIntercept(&frame, request.resourceRequest()))
+- request.setCachingPolicy(CachingPolicy::DisallowCaching);
++ if (InspectorInstrumentation::willIntercept(&frame, request.resourceRequest())) {
++ // Playwright: we don't disable such caching in other browsers and it breaks css resource downloads,
++ // see https://github.com/microsoft/playwright/issues/19158
++ // request.setCachingPolicy(CachingPolicy::DisallowCaching);
++ }
+
+ auto& page = *frame.page();
+
+@@ -1648,8 +1651,9 @@ Vector<Ref<SVGImage>> CachedResourceLoader::allCachedSVGImages() const
ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequest&& request)
{
@@ -5673,10 +5761,10 @@ index e0b17e394f60eb7f4d1935ebd789f294eab20eb3..848cd8f23b2c033f52d34645f06dc210
if (request.charset().isEmpty() && (type == CachedResource::Type::Script || type == CachedResource::Type::CSSStyleSheet))
request.setCharset(m_document->charset());
diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h
-index 527ce3c5a997853b849cceb611b18b556cad6d4f..c50928f6f4afb3caf5e059ef8264bc6bb09e7194 100644
+index 02d6fb8314b69943a34f3b342d12725b7d1e7385..538b9d953b61ab0f5485e98871904d75a34227f7 100644
--- a/Source/WebCore/page/ChromeClient.h
+++ b/Source/WebCore/page/ChromeClient.h
-@@ -323,7 +323,7 @@ public:
+@@ -319,7 +319,7 @@ public:
#endif
#if ENABLE(ORIENTATION_EVENTS)
@@ -5685,37 +5773,8 @@ index 527ce3c5a997853b849cceb611b18b556cad6d4f..c50928f6f4afb3caf5e059ef8264bc6b
#endif
#if ENABLE(INPUT_TYPE_COLOR)
-diff --git a/Source/WebCore/page/DeprecatedGlobalSettings.cpp b/Source/WebCore/page/DeprecatedGlobalSettings.cpp
-index 05e59ace8adca913c2b9a5cefae6f25667a04d1e..0cbdcbbf56997a453bd7ccd45fd5b17005345f7b 100644
---- a/Source/WebCore/page/DeprecatedGlobalSettings.cpp
-+++ b/Source/WebCore/page/DeprecatedGlobalSettings.cpp
-@@ -79,7 +79,11 @@ DeprecatedGlobalSettings& DeprecatedGlobalSettings::shared()
- #if ENABLE(TOUCH_EVENTS)
- bool DeprecatedGlobalSettings::touchEventsEnabled()
- {
-- return shared().m_touchEventsEnabled.value_or(screenHasTouchDevice());
-+ return shared().m_touchEventsEnabled.value_or(platformScreenHasTouchDevice());
-+}
-+bool DeprecatedGlobalSettings::isTouchPrimaryInputDevice()
-+{
-+ return shared().m_touchEventsEnabled.value_or(platformScreenIsTouchPrimaryInputDevice());
- }
- #endif
-
-diff --git a/Source/WebCore/page/DeprecatedGlobalSettings.h b/Source/WebCore/page/DeprecatedGlobalSettings.h
-index b5b0f2dc098d9cc63398b29c5085cb715cef801b..fb7ec55e3c41003c7e2874c1b0da8b9b8cd37009 100644
---- a/Source/WebCore/page/DeprecatedGlobalSettings.h
-+++ b/Source/WebCore/page/DeprecatedGlobalSettings.h
-@@ -203,6 +203,7 @@ public:
- static void setMouseEventsSimulationEnabled(bool isEnabled) { shared().m_mouseEventsSimulationEnabled = isEnabled; }
- static bool touchEventsEnabled();
- static void setTouchEventsEnabled(bool isEnabled) { shared().m_touchEventsEnabled = isEnabled; }
-+ static bool isTouchPrimaryInputDevice();
- #endif
-
- static bool pageAtRuleSupportEnabled() { return shared().m_pageAtRuleSupportEnabled; }
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp
-index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e02066b4f 100644
+index 28287fc760b62ec7c60a11b1105484892aa08d0c..4d79711bdfb42db3ff71108e2c5ccd5b00ae31c9 100644
--- a/Source/WebCore/page/EventHandler.cpp
+++ b/Source/WebCore/page/EventHandler.cpp
@@ -143,6 +143,7 @@
@@ -5726,7 +5785,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
#endif
#if ENABLE(MAC_GESTURE_EVENTS)
-@@ -820,9 +821,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
+@@ -817,9 +818,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
m_mousePressNode = event.targetNode();
m_frame.document()->setFocusNavigationStartingNode(event.targetNode());
@@ -5736,7 +5795,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
m_mousePressed = true;
m_selectionInitiationState = HaveNotStartedSelection;
-@@ -862,8 +861,6 @@ VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const Vis
+@@ -859,8 +858,6 @@ VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const Vis
return adjustedTarget->renderer()->positionForPoint(LayoutPoint(selectionEndPoint), nullptr);
}
@@ -5745,7 +5804,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
#if !PLATFORM(IOS_FAMILY)
bool EventHandler::supportsSelectionUpdatesOnMouseDrag() const
-@@ -885,8 +882,10 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -882,8 +879,10 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
Ref<Frame> protectedFrame(m_frame);
@@ -5756,7 +5815,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
RefPtr targetNode = event.targetNode();
if (event.event().button() != LeftButton || !targetNode)
-@@ -907,7 +906,9 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -904,7 +903,9 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
ASSERT(mouseDownMayStartSelect() || m_mouseDownMayStartAutoscroll);
#endif
@@ -5766,7 +5825,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
if (m_mouseDownMayStartAutoscroll && !panScrollInProgress()) {
m_autoscrollController->startAutoscrollForSelection(renderer);
-@@ -924,6 +925,8 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -921,6 +922,8 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
return true;
}
@@ -5775,7 +5834,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
{
// This is a pre-flight check of whether the event might lead to a drag being started. Be careful
-@@ -955,6 +958,8 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
+@@ -952,6 +955,8 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
return targetElement && page->dragController().draggableElement(&m_frame, targetElement.get(), result.roundedPointInInnerNodeFrame(), state);
}
@@ -5784,7 +5843,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
void EventHandler::updateSelectionForMouseDrag()
{
if (!supportsSelectionUpdatesOnMouseDrag())
-@@ -1063,7 +1068,6 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul
+@@ -1060,7 +1065,6 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul
if (oldSelection != newSelection && ImageOverlay::isOverlayText(newSelection.start().containerNode()) && ImageOverlay::isOverlayText(newSelection.end().containerNode()))
invalidateClick();
}
@@ -5792,7 +5851,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
void EventHandler::lostMouseCapture()
{
-@@ -1111,9 +1115,7 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e
+@@ -1108,9 +1112,7 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e
// on the selection, the selection goes away. However, if we are
// editing, place the caret.
if (m_mouseDownWasSingleClickInSelection && m_selectionInitiationState != ExtendedSelection
@@ -5802,7 +5861,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
&& m_frame.selection().isRange()
&& event.event().button() != RightButton) {
VisibleSelection newSelection;
-@@ -2093,10 +2095,8 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& platformMouseE
+@@ -2090,10 +2092,8 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& platformMouseE
swallowEvent = !dispatchMouseEvent(eventNames().mousemoveEvent, mouseEvent.targetNode(), 0, platformMouseEvent, FireMouseOverOut::Yes);
@@ -5813,7 +5872,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
return swallowEvent;
}
-@@ -4188,7 +4188,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
+@@ -4190,7 +4190,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
if (!m_frame.document())
return false;
@@ -5850,7 +5909,7 @@ index 670a2690fe686d1b02e4e634d012c5706de8f103..94f4ca96ef96475923adb3a61f18966e
m_touchPressed = touches->length() > 0;
if (allTouchReleased)
diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h
-index 1cf523aaa48a0bb6d1d4309eb92e15637c7d515a..78b0a805c4390eec5ea9338cc3ff74cf9951b97d 100644
+index bd65cf54c2ddcd191e0f4944350bbd0c76830e4f..a17d366ba6af75caa569affc05869916eb88bd8e 100644
--- a/Source/WebCore/page/EventHandler.h
+++ b/Source/WebCore/page/EventHandler.h
@@ -137,9 +137,7 @@ public:
@@ -5863,9 +5922,9 @@ index 1cf523aaa48a0bb6d1d4309eb92e15637c7d515a..78b0a805c4390eec5ea9338cc3ff74cf
#if ENABLE(PAN_SCROLLING)
void didPanScrollStart();
-@@ -398,10 +396,8 @@ private:
- bool startKeyboardScrollAnimationOnEnclosingScrollableContainer(ScrollDirection, ScrollGranularity, Node*);
- bool focusedScrollableAreaShouldUseSmoothKeyboardScrolling();
+@@ -397,10 +395,8 @@ private:
+ bool startKeyboardScrollAnimationOnRenderBoxAndItsAncestors(ScrollDirection, ScrollGranularity, RenderBox*, bool isKeyRepeat);
+ bool startKeyboardScrollAnimationOnEnclosingScrollableContainer(ScrollDirection, ScrollGranularity, Node*, bool isKeyRepeat);
-#if ENABLE(DRAG_SUPPORT)
bool handleMouseDraggedEvent(const MouseEventWithHitTestResults&, CheckDragHysteresis = ShouldCheckDragHysteresis);
@@ -5874,7 +5933,7 @@ index 1cf523aaa48a0bb6d1d4309eb92e15637c7d515a..78b0a805c4390eec5ea9338cc3ff74cf
WEBCORE_EXPORT bool handleMouseReleaseEvent(const MouseEventWithHitTestResults&);
-@@ -505,10 +501,8 @@ private:
+@@ -502,10 +498,8 @@ private:
void defaultTabEventHandler(KeyboardEvent&);
void defaultArrowEventHandler(FocusDirection, KeyboardEvent&);
@@ -5885,7 +5944,7 @@ index 1cf523aaa48a0bb6d1d4309eb92e15637c7d515a..78b0a805c4390eec5ea9338cc3ff74cf
// The following are called at the beginning of handleMouseUp and handleDrag.
// If they return true it indicates that they have consumed the event.
-@@ -516,9 +510,10 @@ private:
+@@ -513,9 +507,10 @@ private:
#if ENABLE(DRAG_SUPPORT)
bool eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&);
@@ -5897,7 +5956,7 @@ index 1cf523aaa48a0bb6d1d4309eb92e15637c7d515a..78b0a805c4390eec5ea9338cc3ff74cf
enum class SetOrClearLastScrollbar { Clear, Set };
void updateLastScrollbarUnderMouse(Scrollbar*, SetOrClearLastScrollbar);
-@@ -610,8 +605,8 @@ private:
+@@ -607,8 +602,8 @@ private:
Timer m_autoHideCursorTimer;
#endif
@@ -5908,10 +5967,10 @@ index 1cf523aaa48a0bb6d1d4309eb92e15637c7d515a..78b0a805c4390eec5ea9338cc3ff74cf
RefPtr<Element> m_dragTarget;
bool m_mouseDownMayStartDrag { false };
diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp
-index 1b4f16c3a6fe53719ad7cc0ae17264af318d9b2b..4c6be5f274ec6c4e36457ab480dccfcb8591047c 100644
+index a3135c9de5ceacf34eec9a65218dcdeaeb5a3af9..fc62e4b600fadfb2989337732e9b4c325225fab9 100644
--- a/Source/WebCore/page/Frame.cpp
+++ b/Source/WebCore/page/Frame.cpp
-@@ -39,6 +39,7 @@
+@@ -40,6 +40,7 @@
#include "CachedResourceLoader.h"
#include "Chrome.h"
#include "ChromeClient.h"
@@ -5919,7 +5978,7 @@ index 1b4f16c3a6fe53719ad7cc0ae17264af318d9b2b..4c6be5f274ec6c4e36457ab480dccfcb
#include "DOMWindow.h"
#include "DocumentTimelinesController.h"
#include "DocumentType.h"
-@@ -73,6 +74,7 @@
+@@ -74,6 +75,7 @@
#include "NavigationScheduler.h"
#include "Navigator.h"
#include "NodeList.h"
@@ -5927,7 +5986,7 @@ index 1b4f16c3a6fe53719ad7cc0ae17264af318d9b2b..4c6be5f274ec6c4e36457ab480dccfcb
#include "NodeTraversal.h"
#include "Page.h"
#include "ProcessWarming.h"
-@@ -179,6 +181,7 @@ Frame::Frame(Page& page, HTMLFrameOwnerElement* ownerElement, UniqueRef<FrameLoa
+@@ -178,6 +180,7 @@ Frame::Frame(Page& page, HTMLFrameOwnerElement* ownerElement, UniqueRef<FrameLoa
void Frame::init()
{
@@ -5935,7 +5994,7 @@ index 1b4f16c3a6fe53719ad7cc0ae17264af318d9b2b..4c6be5f274ec6c4e36457ab480dccfcb
m_loader->init();
}
-@@ -353,7 +356,7 @@ void Frame::orientationChanged()
+@@ -352,7 +355,7 @@ void Frame::orientationChanged()
int Frame::orientation() const
{
if (auto* page = this->page())
@@ -5944,7 +6003,7 @@ index 1b4f16c3a6fe53719ad7cc0ae17264af318d9b2b..4c6be5f274ec6c4e36457ab480dccfcb
return 0;
}
#endif // ENABLE(ORIENTATION_EVENTS)
-@@ -1147,6 +1150,362 @@ DataDetectionResultsStorage& Frame::dataDetectionResults()
+@@ -1146,6 +1149,362 @@ DataDetectionResultsStorage& Frame::dataDetectionResults()
#endif
@@ -6036,7 +6095,7 @@ index 1b4f16c3a6fe53719ad7cc0ae17264af318d9b2b..4c6be5f274ec6c4e36457ab480dccfcb
+ };
+
+ Node* originalApproximateNode = approximateNode;
-+ for (unsigned n = 0; n < WTF_ARRAY_LENGTH(testOffsets); n += 2) {
++ for (unsigned n = 0; n < std::size(testOffsets); n += 2) {
+ IntSize testOffset(testOffsets[n] * searchRadius, testOffsets[n + 1] * searchRadius);
+ IntPoint testPoint = testCenter + testOffset;
+
@@ -6079,7 +6138,7 @@ index 1b4f16c3a6fe53719ad7cc0ae17264af318d9b2b..4c6be5f274ec6c4e36457ab480dccfcb
+ IntRect testRect(testCenter, IntSize());
+ testRect.inflate(searchRadius);
+ int currentTestRadius = 0;
-+ for (unsigned n = 0; n < WTF_ARRAY_LENGTH(testOffsets); n += 2) {
++ for (unsigned n = 0; n < std::size(testOffsets); n += 2) {
+ IntSize testOffset(testOffsets[n] * searchRadius, testOffsets[n + 1] * searchRadius);
+ IntPoint testPoint = testCenter + testOffset;
+ int testRadius = std::max(abs(testOffset.width()), abs(testOffset.height()));
@@ -6308,7 +6367,7 @@ index 1b4f16c3a6fe53719ad7cc0ae17264af318d9b2b..4c6be5f274ec6c4e36457ab480dccfcb
#undef FRAME_RELEASE_LOG_ERROR
diff --git a/Source/WebCore/page/Frame.h b/Source/WebCore/page/Frame.h
-index 99cea1c8385a2e4326d44a8d408ac46550326d58..1d1d899aa5ec302121b11bdfc00aefb98dad9dc5 100644
+index 4654d7ee7456850c31c40c291f3a66d5fd0d33ec..bed69305f5ba16fe786de22c33d045a7d55a239e 100644
--- a/Source/WebCore/page/Frame.h
+++ b/Source/WebCore/page/Frame.h
@@ -111,8 +111,8 @@ enum {
@@ -6358,7 +6417,7 @@ index 99cea1c8385a2e4326d44a8d408ac46550326d58..1d1d899aa5ec302121b11bdfc00aefb9
-#if PLATFORM(IOS_FAMILY)
void betterApproximateNode(const IntPoint& testPoint, const NodeQualifier&, Node*& best, Node* failedNode, IntPoint& bestPoint, IntRect& bestRect, const IntRect& testRect);
bool hitTestResultAtViewportLocation(const FloatPoint& viewportLocation, HitTestResult&, IntPoint& center);
-
+
@@ -332,6 +332,7 @@ private:
enum class ShouldFindRootEditableElement : bool { No, Yes };
Node* qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, const NodeQualifier&, ShouldApproximate, ShouldFindRootEditableElement = ShouldFindRootEditableElement::Yes);
@@ -6448,10 +6507,10 @@ index 8b29ef05fbe815bc3f7505f624940294bee2c4f7..1a1348144f68982cebcef18418c317db
if (stateObjectType == StateObjectType::Push) {
frame->loader().history().pushState(WTFMove(data), title, fullURL.string());
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp
-index 6b1de221bd0200410edf7ba26bb40c1cccc41a1b..d99067f6ac977b79e872cbc354daa8b23ea4dd94 100644
+index 4d846b094462cac9e6bd31e648edb35f06f79398..5edaa5a01221581a9c5205a481a368a7b6d9767a 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
-@@ -491,6 +491,37 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
+@@ -490,6 +490,37 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
document->updateViewportArguments();
}
@@ -6489,7 +6548,7 @@ index 6b1de221bd0200410edf7ba26bb40c1cccc41a1b..d99067f6ac977b79e872cbc354daa8b2
ScrollingCoordinator* Page::scrollingCoordinator()
{
if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) {
-@@ -1413,10 +1444,6 @@ void Page::didCommitLoad()
+@@ -1412,10 +1443,6 @@ void Page::didCommitLoad()
m_isEditableRegionEnabled = false;
#endif
@@ -6500,7 +6559,7 @@ index 6b1de221bd0200410edf7ba26bb40c1cccc41a1b..d99067f6ac977b79e872cbc354daa8b2
resetSeenPlugins();
resetSeenMediaEngines();
-@@ -3504,6 +3531,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
+@@ -3508,6 +3535,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
#endif
}
@@ -6528,10 +6587,10 @@ index 6b1de221bd0200410edf7ba26bb40c1cccc41a1b..d99067f6ac977b79e872cbc354daa8b2
{
if (insets == m_fullscreenInsets)
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
-index 938111d6718ad79dbe549ca0f421f7185066d425..17430e0cfe3fdfe4c7b6f731b52058febefed74d 100644
+index 63f6a2ef6c375c98ace52bdae3225495a1adc6a3..06511fdf1291bc530f6a88dd9041628f6ed133de 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
-@@ -290,6 +290,9 @@ public:
+@@ -296,6 +296,9 @@ public:
const std::optional<ViewportArguments>& overrideViewportArguments() const { return m_overrideViewportArguments; }
WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional<ViewportArguments>&);
@@ -6541,7 +6600,7 @@ index 938111d6718ad79dbe549ca0f421f7185066d425..17430e0cfe3fdfe4c7b6f731b52058fe
static void refreshPlugins(bool reload);
WEBCORE_EXPORT PluginData& pluginData();
void clearPluginData();
-@@ -344,6 +347,10 @@ public:
+@@ -350,6 +353,10 @@ public:
DragCaretController& dragCaretController() const { return *m_dragCaretController; }
#if ENABLE(DRAG_SUPPORT)
DragController& dragController() const { return *m_dragController; }
@@ -6552,7 +6611,7 @@ index 938111d6718ad79dbe549ca0f421f7185066d425..17430e0cfe3fdfe4c7b6f731b52058fe
#endif
FocusController& focusController() const { return *m_focusController; }
#if ENABLE(CONTEXT_MENUS)
-@@ -511,6 +518,10 @@ public:
+@@ -517,6 +524,10 @@ public:
WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel);
bool defaultUseDarkAppearance() const { return m_useDarkAppearance; }
void setUseDarkAppearanceOverride(std::optional<bool>);
@@ -6563,7 +6622,7 @@ index 938111d6718ad79dbe549ca0f421f7185066d425..17430e0cfe3fdfe4c7b6f731b52058fe
#if ENABLE(TEXT_AUTOSIZING)
float textAutosizingWidth() const { return m_textAutosizingWidth; }
-@@ -931,6 +942,11 @@ public:
+@@ -939,6 +950,11 @@ public:
WEBCORE_EXPORT void setInteractionRegionsEnabled(bool);
#endif
@@ -6575,7 +6634,7 @@ index 938111d6718ad79dbe549ca0f421f7185066d425..17430e0cfe3fdfe4c7b6f731b52058fe
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); }
#endif
-@@ -1061,6 +1077,9 @@ private:
+@@ -1070,6 +1086,9 @@ private:
#if ENABLE(DRAG_SUPPORT)
const std::unique_ptr<DragController> m_dragController;
@@ -6585,7 +6644,7 @@ index 938111d6718ad79dbe549ca0f421f7185066d425..17430e0cfe3fdfe4c7b6f731b52058fe
#endif
const std::unique_ptr<FocusController> m_focusController;
#if ENABLE(CONTEXT_MENUS)
-@@ -1140,6 +1159,8 @@ private:
+@@ -1149,6 +1168,8 @@ private:
bool m_useElevatedUserInterfaceLevel { false };
bool m_useDarkAppearance { false };
std::optional<bool> m_useDarkAppearanceOverride;
@@ -6594,7 +6653,7 @@ index 938111d6718ad79dbe549ca0f421f7185066d425..17430e0cfe3fdfe4c7b6f731b52058fe
#if ENABLE(TEXT_AUTOSIZING)
float m_textAutosizingWidth { 0 };
-@@ -1316,6 +1337,11 @@ private:
+@@ -1327,6 +1348,11 @@ private:
#endif
std::optional<ViewportArguments> m_overrideViewportArguments;
@@ -6607,10 +6666,10 @@ index 938111d6718ad79dbe549ca0f421f7185066d425..17430e0cfe3fdfe4c7b6f731b52058fe
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
RefPtr<DeviceOrientationUpdateProvider> m_deviceOrientationUpdateProvider;
diff --git a/Source/WebCore/page/PageConsoleClient.cpp b/Source/WebCore/page/PageConsoleClient.cpp
-index 0c51d8cac09c17b5d1bb05847410a873a4eb503b..ad35630d5a519d2f82ac0d509a04639b4d7838b2 100644
+index 9ed53f6f5d0c842b0e38f91bbfca4be1b8b258cd..3b9c8007ab0f49c4522e64e4b840fe1e973eea59 100644
--- a/Source/WebCore/page/PageConsoleClient.cpp
+++ b/Source/WebCore/page/PageConsoleClient.cpp
-@@ -447,4 +447,10 @@ void PageConsoleClient::screenshot(JSC::JSGlobalObject* lexicalGlobalObject, Ref
+@@ -442,4 +442,10 @@ void PageConsoleClient::screenshot(JSC::JSGlobalObject* lexicalGlobalObject, Ref
addMessage(makeUnique<Inspector::ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::Image, MessageLevel::Log, dataURL, WTFMove(arguments), lexicalGlobalObject, 0, timestamp));
}
@@ -6678,12 +6737,12 @@ index 8c911ca663507b61640a4e29245dabe79573c420..08cdd2bfea9f5ac19c8cc39dc80032e1
#endif
bool hasAnyElement() const {
diff --git a/Source/WebCore/page/Screen.cpp b/Source/WebCore/page/Screen.cpp
-index 3c70bb46c5322bf836ca78e9ac5e78cad4da6e2b..8f6b1667907f9b4f374f96fbfb0293bcefe997db 100644
+index be4736dd6d9a2340d72930d2aef3e3286f3c0131..452c7f0ec042ee95e3d31f2f4f9756471ede63ba 100644
--- a/Source/WebCore/page/Screen.cpp
+++ b/Source/WebCore/page/Screen.cpp
@@ -105,6 +105,8 @@ int Screen::availLeft() const
return 0;
- if (DeprecatedGlobalSettings::webAPIStatisticsEnabled())
+ if (frame->settings().webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ScreenAPIsAccessed::AvailLeft);
+ if (frame->hasScreenSizeOverride())
+ return 0;
@@ -6692,29 +6751,29 @@ index 3c70bb46c5322bf836ca78e9ac5e78cad4da6e2b..8f6b1667907f9b4f374f96fbfb0293bc
@@ -115,6 +117,8 @@ int Screen::availTop() const
return 0;
- if (DeprecatedGlobalSettings::webAPIStatisticsEnabled())
+ if (frame->settings().webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ScreenAPIsAccessed::AvailTop);
+ if (frame->hasScreenSizeOverride())
+ return 0;
return static_cast<int>(screenAvailableRect(frame->view()).y());
}
-@@ -125,6 +129,8 @@ unsigned Screen::availHeight() const
+@@ -125,6 +129,8 @@ int Screen::availHeight() const
return 0;
- if (DeprecatedGlobalSettings::webAPIStatisticsEnabled())
+ if (frame->settings().webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ScreenAPIsAccessed::AvailHeight);
+ if (frame->hasScreenSizeOverride())
-+ return static_cast<unsigned>(frame->screenSize().height());
- return static_cast<unsigned>(screenAvailableRect(frame->view()).height());
++ return static_cast<int>(frame->screenSize().height());
+ return static_cast<int>(screenAvailableRect(frame->view()).height());
}
-@@ -135,6 +141,8 @@ unsigned Screen::availWidth() const
+@@ -135,6 +141,8 @@ int Screen::availWidth() const
return 0;
- if (DeprecatedGlobalSettings::webAPIStatisticsEnabled())
+ if (frame->settings().webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ScreenAPIsAccessed::AvailWidth);
+ if (frame->hasScreenSizeOverride())
-+ return static_cast<unsigned>(frame->screenSize().width());
- return static_cast<unsigned>(screenAvailableRect(frame->view()).width());
++ return static_cast<int>(frame->screenSize().width());
+ return static_cast<int>(screenAvailableRect(frame->view()).width());
}
diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
@@ -6847,10 +6906,10 @@ index 1fb0e9d5cee3b3df4ee1e96eb8d75016ad687fc5..497bd34cc97e2d20c9d6982a8d92d852
)
diff --git a/Source/WebCore/platform/DragData.h b/Source/WebCore/platform/DragData.h
-index 747347e5de70106fd85b7001904e2bb7f8c01b92..99b8436c844ecc3f0b613f68baf87e8be48eaa52 100644
+index c77ddd17643628a87c0245ee2ea3ba417d40bc23..c5179ff48e57cdcfbe709a10bae517ff2b9bdc17 100644
--- a/Source/WebCore/platform/DragData.h
+++ b/Source/WebCore/platform/DragData.h
-@@ -48,7 +48,7 @@ typedef void* DragDataRef;
+@@ -47,7 +47,7 @@ typedef void* DragDataRef;
#elif PLATFORM(WIN)
typedef struct IDataObject* DragDataRef;
@@ -6859,6 +6918,26 @@ index 747347e5de70106fd85b7001904e2bb7f8c01b92..99b8436c844ecc3f0b613f68baf87e8b
namespace WebCore {
class SelectionData;
}
+@@ -92,8 +92,8 @@ public:
+ // is initialized by the decoder and not in the constructor.
+ DragData() = default;
+ #if PLATFORM(WIN)
+- WEBCORE_EXPORT DragData(const DragDataMap&, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> sourceOperationMask, OptionSet<DragApplicationFlags> = { }, std::optional<PageIdentifier> pageID = std::nullopt);
+- const DragDataMap& dragDataMap();
++ WEBCORE_EXPORT DragData(const DragDataMap&, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> sourceOperationMask, OptionSet<DragApplicationFlags> = { }, OptionSet<DragDestinationAction> = anyDragDestinationAction(), std::optional<PageIdentifier> pageID = std::nullopt);
++ WEBCORE_EXPORT const DragDataMap& dragDataMap() const;
+ void getDragFileDescriptorData(int& size, String& pathname);
+ void getDragFileContentData(int size, void* dataBlob);
+ #endif
+@@ -140,7 +140,7 @@ private:
+ String m_pasteboardName;
+ #endif
+ #if PLATFORM(WIN)
+- DragDataMap m_dragDataMap;
++ mutable DragDataMap m_dragDataMap;
+ #endif
+ bool m_disallowFileAccess { false };
+ };
diff --git a/Source/WebCore/platform/DragImage.cpp b/Source/WebCore/platform/DragImage.cpp
index 9e97dd5f689e6a1a90c9069445dc3f4b8c45e840..cc3ddc3e6d656a91c5ed58e050483d37e36d015a 100644
--- a/Source/WebCore/platform/DragImage.cpp
@@ -6947,7 +7026,7 @@ index 58c51c2bc278d4c228d456f5df9f5f03dd717c66..c74c01a5c3b9b7e82aec0f378cdb36d4
};
diff --git a/Source/WebCore/platform/PlatformKeyboardEvent.h b/Source/WebCore/platform/PlatformKeyboardEvent.h
-index 0820575a57c946342b49fa81dcc64f619606a2c6..df35ad10a181dd85cf7e9ade8d5596c4ea74e815 100644
+index deef18898ade8424c670fd809d04c448f5ab4558..52302ec6ebb1e760b5c87f1c344c17af81055699 100644
--- a/Source/WebCore/platform/PlatformKeyboardEvent.h
+++ b/Source/WebCore/platform/PlatformKeyboardEvent.h
@@ -134,6 +134,7 @@ namespace WebCore {
@@ -6967,7 +7046,7 @@ index 0820575a57c946342b49fa81dcc64f619606a2c6..df35ad10a181dd85cf7e9ade8d5596c4
#endif
diff --git a/Source/WebCore/platform/PlatformScreen.cpp b/Source/WebCore/platform/PlatformScreen.cpp
-index ba50b688ab6d0bae5d199fa0bac4b7e2004baf81..9963c0526c0a6d48c7c910ad81f5cab37cec2be7 100644
+index ba50b688ab6d0bae5d199fa0bac4b7e2004baf81..f27481c6039ed2450209179b4ed08d9d09842cd3 100644
--- a/Source/WebCore/platform/PlatformScreen.cpp
+++ b/Source/WebCore/platform/PlatformScreen.cpp
@@ -25,6 +25,7 @@
@@ -6978,7 +7057,7 @@ index ba50b688ab6d0bae5d199fa0bac4b7e2004baf81..9963c0526c0a6d48c7c910ad81f5cab3
#if PLATFORM(COCOA)
-@@ -72,3 +73,16 @@ const ScreenData* screenData(PlatformDisplayID screenDisplayID)
+@@ -72,3 +73,25 @@ const ScreenData* screenData(PlatformDisplayID screenDisplayID)
} // namespace WebCore
#endif // PLATFORM(COCOA)
@@ -6986,24 +7065,35 @@ index ba50b688ab6d0bae5d199fa0bac4b7e2004baf81..9963c0526c0a6d48c7c910ad81f5cab3
+#if ENABLE(TOUCH_EVENTS)
+namespace WebCore {
+
++static std::optional<bool> screenHasTouchDeviceOverride = std::nullopt;
++void setScreenHasTouchDeviceOverride(bool value) {
++ screenHasTouchDeviceOverride = value;
++}
++
+bool screenHasTouchDevice() {
-+ return DeprecatedGlobalSettings::touchEventsEnabled();
++ if (screenHasTouchDeviceOverride)
++ return screenHasTouchDeviceOverride.value();
++ return platformScreenHasTouchDevice();
+}
+bool screenIsTouchPrimaryInputDevice() {
-+ return DeprecatedGlobalSettings::isTouchPrimaryInputDevice();
++ if (screenHasTouchDeviceOverride)
++ return screenHasTouchDeviceOverride.value();
++ return platformScreenIsTouchPrimaryInputDevice();
+}
+
+} // namespace WebCore
+#endif
diff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h
-index 44799e0b2a93cbcf25f4315d62a3d95896c02f3d..29277223448a0936a16f975970ab60d739b000cd 100644
+index 44799e0b2a93cbcf25f4315d62a3d95896c02f3d..ec593ea30f6e45c355f5d6806290f2462729ed8f 100644
--- a/Source/WebCore/platform/PlatformScreen.h
+++ b/Source/WebCore/platform/PlatformScreen.h
-@@ -151,12 +151,14 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);
+@@ -151,15 +151,20 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);
#endif
#if ENABLE(TOUCH_EVENTS)
-#if PLATFORM(GTK) || PLATFORM(WPE)
++WEBCORE_EXPORT void setScreenHasTouchDeviceOverride(bool);
++
WEBCORE_EXPORT bool screenHasTouchDevice();
WEBCORE_EXPORT bool screenIsTouchPrimaryInputDevice();
+#if PLATFORM(GTK) || PLATFORM(WPE)
@@ -7017,8 +7107,12 @@ index 44799e0b2a93cbcf25f4315d62a3d95896c02f3d..29277223448a0936a16f975970ab60d7
#endif
#endif
++
+ } // namespace WebCore
+
+ namespace WTF {
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
-index eac1056e04595cdc983baf57779603705d05c91e..c6c9c73464c4e7551fd0c175d43dea693a7a5f92 100644
+index 035f4f4978bd6562d13b2ce68dfb6132f533c697..e7b88b4c345b2dc13245f211461102ec3977f89a 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
@@ -111,7 +111,7 @@ public:
@@ -7030,97 +7124,19 @@ index eac1056e04595cdc983baf57779603705d05c91e..c6c9c73464c4e7551fd0c175d43dea69
#endif
#if PLATFORM(IOS_FAMILY)
-diff --git a/Source/WebCore/platform/SourcesGLib.txt b/Source/WebCore/platform/SourcesGLib.txt
-index 53f48ba8ad99364680457daf4dcbae632360be12..8825859d561113f14ba6ef8d860c5202d2fbd253 100644
---- a/Source/WebCore/platform/SourcesGLib.txt
-+++ b/Source/WebCore/platform/SourcesGLib.txt
-@@ -33,6 +33,7 @@ platform/glib/LowPowerModeNotifierGLib.cpp
- platform/glib/RemoteCommandListenerGLib.cpp
- platform/glib/SharedBufferGlib.cpp
- platform/glib/UserAgentGLib.cpp
-+platform/glib/PlatformSpeechSynthesizerGLib.cpp
-
- platform/network/glib/DNSResolveQueueGLib.cpp
- platform/network/glib/NetworkStateNotifierGLib.cpp
-diff --git a/Source/WebCore/platform/glib/PlatformSpeechSynthesizerGLib.cpp b/Source/WebCore/platform/glib/PlatformSpeechSynthesizerGLib.cpp
-new file mode 100644
-index 0000000000000000000000000000000000000000..9713ccd3229ec26874b29de468bd9f9081ea641b
---- /dev/null
-+++ b/Source/WebCore/platform/glib/PlatformSpeechSynthesizerGLib.cpp
-@@ -0,0 +1,73 @@
-+/*
-+ * Copyright (C) 2013 Apple Inc. 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. ``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
-+ * 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.
-+ */
-+
-+#import "config.h"
-+#import "PlatformSpeechSynthesizer.h"
-+
-+#if ENABLE(SPEECH_SYNTHESIS)
-+
-+namespace WebCore {
-+
-+Ref<PlatformSpeechSynthesizer> PlatformSpeechSynthesizer::create(PlatformSpeechSynthesizerClient& client)
-+{
-+ return adoptRef(*new PlatformSpeechSynthesizer(client));
-+}
-+
-+PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient& client)
-+ : m_speechSynthesizerClient(client)
-+{
-+}
-+
-+PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
-+{
-+}
-+
-+void PlatformSpeechSynthesizer::initializeVoiceList()
-+{
-+}
-+
-+void PlatformSpeechSynthesizer::pause()
-+{
-+}
-+
-+void PlatformSpeechSynthesizer::resume()
-+{
-+}
-+
-+void PlatformSpeechSynthesizer::speak(RefPtr<PlatformSpeechSynthesisUtterance>&& utterance)
-+{
-+}
-+
-+void PlatformSpeechSynthesizer::cancel()
-+{
-+}
-+
-+void PlatformSpeechSynthesizer::resetState()
-+{
-+}
-+
-+} // namespace WebCore
-+
-+#endif // ENABLE(SPEECH_SYNTHESIS)
+diff --git a/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp b/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp
+index 47507797466b03841a28934263e90f0e63e73ab3..2c0c62b66e497b6610f732121189dac0ee20f54a 100644
+--- a/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp
++++ b/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp
+@@ -41,7 +41,7 @@
+
+ namespace WebCore {
+
+-static const unsigned scrollbarSize = 21;
++static const unsigned scrollbarSize = 0;
+ static const unsigned scrollbarBorderSize = 1;
+ static const unsigned thumbBorderSize = 1;
+ static const unsigned overlayThumbSize = 3;
diff --git a/Source/WebCore/platform/graphics/FontCascade.h b/Source/WebCore/platform/graphics/FontCascade.h
index f4b3f9f8441dfc68018953b326701725c295cb2d..5e403922983e1133ef369df04863a4bc16842cfd 100644
--- a/Source/WebCore/platform/graphics/FontCascade.h
@@ -7256,7 +7272,7 @@ index b60f9a64bacc8282860da6de299b75aeb295b9b5..55bd017c03c6478ca334bd5ef164160f
namespace WebCore {
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
-index 2fc402a9d5270ee610dcb81ff856c597a0df7cfa..d551be654bfa428c999d804977b22dfdb858fa1c 100644
+index 07ef77d93ff0258d5447ba8156a9e050794c9f59..94cccd1cc7519f793d77cbec56001e24f31ef044 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
@@ -56,12 +56,18 @@ inline bool webkitGstCheckVersion(guint major, guint minor, guint micro)
@@ -7327,7 +7343,7 @@ index 6d6820fc22f9a7102bbdad6c4b5e3e7e9645f66c..f44797b8c197bf1b3daaa9b59dad2a8e
// Determine the string for this item.
const UChar* str = cp + items[i].iCharPos;
diff --git a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
-index e55d0559b18f4a6ba3b5a64675bad8ada08ae19a..da2ef1b4bd5ef78cbbe5dc555f2d97c2767af50d 100644
+index 23f7caefeb0fdfd47d05b8bbc0f949d0b772dc15..d89d5395c7c5eddeaa3aebae8ae3fcc07964856e 100644
--- a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
+++ b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
@@ -37,8 +37,10 @@
@@ -7611,7 +7627,7 @@ index 80958ba565a877224d0ed37e4e4057b4be0dde24..eca42bf5181bc4a95efca9c9c3f5ce0f
auto* 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..1f7ee7a1ed4b81219ffdb6eeb1fcc54013a74c42 100644
+index ae439e30f1fb239d18e1164e8896dfb272c75673..eddcb9bda783fcdcbf9f924d4eaa6cc78dd54395 100644
--- a/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp
+++ b/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp
@@ -32,6 +32,10 @@
@@ -7625,7 +7641,51 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..1f7ee7a1ed4b81219ffdb6eeb1fcc540
namespace WebCore {
std::unique_ptr<Pasteboard> Pasteboard::createForCopyAndPaste(std::unique_ptr<PasteboardContext>&& context)
-@@ -73,6 +77,16 @@ String Pasteboard::readOrigin()
+@@ -52,9 +56,28 @@ bool Pasteboard::hasData()
+ return !types.isEmpty();
+ }
+
+-Vector<String> Pasteboard::typesSafeForBindings(const String&)
++Vector<String> Pasteboard::typesSafeForBindings(const String& origin)
+ {
+- notImplemented();
++ if (m_selectionData) {
++ ListHashSet<String> types;
++ if (auto* buffer = m_selectionData->customData()) {
++ auto customData = PasteboardCustomData::fromSharedBuffer(*buffer);
++ if (customData.origin() == origin) {
++ for (auto& type : customData.orderedTypes())
++ types.add(type);
++ }
++ }
++
++ if (m_selectionData->hasText())
++ types.add("text/plain"_s);
++ if (m_selectionData->hasMarkup())
++ types.add("text/html"_s);
++ if (m_selectionData->hasURIList())
++ types.add("text/uri-list"_s);
++
++ return copyToVector(types);
++ }
++
+ return { };
+ }
+
+@@ -67,23 +90,55 @@ Vector<String> Pasteboard::typesForLegacyUnsafeBindings()
+
+ String Pasteboard::readOrigin()
+ {
+- notImplemented(); // webkit.org/b/177633: [GTK] Move to new Pasteboard API
++ if (m_selectionData) {
++ if (auto* buffer = m_selectionData->customData())
++ return PasteboardCustomData::fromSharedBuffer(*buffer).origin();
++
++ return { };
++ }
++
+ return { };
+ }
String Pasteboard::readString(const String& type)
{
@@ -7642,8 +7702,20 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..1f7ee7a1ed4b81219ffdb6eeb1fcc540
return platformStrategies()->pasteboardStrategy()->readStringFromPasteboard(0, type, name(), context());
}
-@@ -84,6 +98,15 @@ String Pasteboard::readStringInCustomData(const String&)
-
+-String Pasteboard::readStringInCustomData(const String&)
++String Pasteboard::readStringInCustomData(const String& type)
+ {
++ if (m_selectionData) {
++ if (auto* buffer = m_selectionData->customData())
++ return PasteboardCustomData::fromSharedBuffer(*buffer).readStringInCustomData(type);
++
++ return { };
++ }
++
+ notImplemented();
+ return { };
+ }
+
void Pasteboard::writeString(const String& type, const String& text)
{
+ if (m_selectionData) {
@@ -7658,7 +7730,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..1f7ee7a1ed4b81219ffdb6eeb1fcc540
platformStrategies()->pasteboardStrategy()->writeToPasteboard(type, text);
}
-@@ -111,7 +134,12 @@ void Pasteboard::read(PasteboardFileReader&, std::optional<size_t>)
+@@ -111,7 +166,12 @@ void Pasteboard::read(PasteboardFileReader&, std::optional<size_t>)
void Pasteboard::write(const PasteboardURL& url)
{
@@ -7672,7 +7744,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..1f7ee7a1ed4b81219ffdb6eeb1fcc540
}
void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
-@@ -119,8 +147,16 @@ void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
+@@ -119,8 +179,16 @@ void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
notImplemented();
}
@@ -7690,7 +7762,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..1f7ee7a1ed4b81219ffdb6eeb1fcc540
}
void Pasteboard::write(const PasteboardBuffer&)
-@@ -129,7 +165,13 @@ void Pasteboard::write(const PasteboardBuffer&)
+@@ -129,7 +197,13 @@ void Pasteboard::write(const PasteboardBuffer&)
void Pasteboard::write(const PasteboardWebContent& content)
{
@@ -7705,7 +7777,27 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..1f7ee7a1ed4b81219ffdb6eeb1fcc540
}
Pasteboard::FileContentState Pasteboard::fileContentState()
-@@ -160,6 +202,35 @@ void Pasteboard::write(const Color&)
+@@ -152,14 +226,54 @@ void Pasteboard::writePlainText(const String& text, SmartReplaceOption)
+ writeString("text/plain;charset=utf-8"_s, text);
+ }
+
+-void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>&)
++void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>& data)
+ {
++ if (m_selectionData) {
++ if (!data.isEmpty()) {
++ const auto& customData = data[0];
++ customData.forEachPlatformString([this] (auto& type, auto& string) {
++ writeString(type, string);
++ });
++ if (customData.hasSameOriginCustomData() || !customData.origin().isEmpty())
++ m_selectionData->setCustomData(customData.createSharedBuffer());
++ }
++ return;
++ }
+ }
+
+ void Pasteboard::write(const Color&)
{
}
@@ -7742,7 +7834,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..1f7ee7a1ed4b81219ffdb6eeb1fcc540
#endif // USE(LIBWPE)
diff --git a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
-index d81c80ccc4b6619812d59e02595d8aa6821f4bec..59c3db0cb8f67788cbef6430b4085c3676101e6a 100644
+index b2c1a92cb400e3a441c1164fb5b723226023df6a..90e9d5e3c9b216a4b61dc297bfa33e115316d511 100644
--- a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
+++ b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
@@ -30,8 +30,10 @@
@@ -8138,10 +8230,10 @@ index 35ade40b37f0c476815535541118f9246ed199cd..2bd1444f9a5e9a14ab3d6acbc020434e
m_commonHeaders.append(CommonHeader { name, value });
}
diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h
-index d81d38a89d9c594188204c6aa1d311769d6de511..94bdde054debfdfe9b11667022c1a6823c90333c 100644
+index d2e64c115e80f6b225ff4c39e0d8306a058ad5ea..aa3b5355ed439f0fd67776789580d9027b144f8b 100644
--- a/Source/WebCore/platform/network/NetworkStorageSession.h
+++ b/Source/WebCore/platform/network/NetworkStorageSession.h
-@@ -156,6 +156,8 @@ public:
+@@ -157,6 +157,8 @@ public:
NetworkingContext* context() const;
#endif
@@ -8150,20 +8242,51 @@ index d81d38a89d9c594188204c6aa1d311769d6de511..94bdde054debfdfe9b11667022c1a682
WEBCORE_EXPORT HTTPCookieAcceptPolicy cookieAcceptPolicy() const;
WEBCORE_EXPORT void setCookie(const Cookie&);
WEBCORE_EXPORT void setCookies(const Vector<Cookie>&, const URL&, const URL& mainDocumentURL);
+diff --git a/Source/WebCore/platform/network/ResourceResponseBase.cpp b/Source/WebCore/platform/network/ResourceResponseBase.cpp
+index 1e9280cc7df42d6caa0eab7b8093ea704fab41eb..e12e1a6f9bbe920162e7b2a46f57806974588f5c 100644
+--- a/Source/WebCore/platform/network/ResourceResponseBase.cpp
++++ b/Source/WebCore/platform/network/ResourceResponseBase.cpp
+@@ -70,6 +70,7 @@ ResourceResponseBase::ResourceResponseBase(std::optional<ResourceResponseBase::R
+ , m_httpStatusText(data ? data->m_httpStatusText : AtomString { })
+ , m_httpVersion(data ? data->m_httpVersion : AtomString { })
+ , m_httpHeaderFields(data ? data->m_httpHeaderFields : HTTPHeaderMap { })
++ , m_httpRequestHeaderFields(data ? data->m_httpRequestHeaderFields : HTTPHeaderMap { })
+ , m_networkLoadMetrics(data ? data->m_networkLoadMetrics : Box<WebCore::NetworkLoadMetrics> { })
+ , m_certificateInfo(data ? data->m_certificateInfo : std::nullopt)
+ , m_httpStatusCode(data ? data->m_httpStatusCode : 0)
+@@ -875,6 +876,7 @@ std::optional<ResourceResponseBase::ResponseData> ResourceResponseBase::getRespo
+ m_httpStatusText,
+ m_httpVersion,
+ m_httpHeaderFields,
++ m_httpRequestHeaderFields,
+ m_networkLoadMetrics,
+
+ m_httpStatusCode,
diff --git a/Source/WebCore/platform/network/ResourceResponseBase.h b/Source/WebCore/platform/network/ResourceResponseBase.h
-index b1f17979054c72ff73cd523737b5f171663e5be0..9592e283c7aa11e53bc76ab4276e8e2f7ad5db6a 100644
+index 7ae65673112817df642ba634afe441c5fb0090d7..e60f646a0268604d890194ada0318a28b4915100 100644
--- a/Source/WebCore/platform/network/ResourceResponseBase.h
+++ b/Source/WebCore/platform/network/ResourceResponseBase.h
-@@ -262,6 +262,8 @@ public:
-
- WEBCORE_EXPORT std::optional<ResponseData> getResponseData() const;
-
+@@ -102,6 +102,7 @@ public:
+ AtomString m_httpStatusText;
+ AtomString m_httpVersion;
+ HTTPHeaderMap m_httpHeaderFields;
++ HTTPHeaderMap m_httpRequestHeaderFields;
+ Box<WebCore::NetworkLoadMetrics> m_networkLoadMetrics;
+
+ short m_httpStatusCode;
+@@ -295,6 +296,11 @@ protected:
+ AtomString m_httpStatusText;
+ AtomString m_httpVersion;
+ HTTPHeaderMap m_httpHeaderFields;
++
++public:
+ HTTPHeaderMap m_httpRequestHeaderFields;
+
- protected:
- enum InitLevel {
- Uninitialized,
-@@ -342,6 +344,7 @@ void ResourceResponseBase::encode(Encoder& encoder) const
++protected:
+ Box<NetworkLoadMetrics> m_networkLoadMetrics;
+
+ mutable std::optional<CertificateInfo> m_certificateInfo;
+@@ -343,6 +349,7 @@ void ResourceResponseBase::encode(Encoder& encoder) const
encoder << m_httpStatusText;
encoder << m_httpVersion;
encoder << m_httpHeaderFields;
@@ -8171,7 +8294,7 @@ index b1f17979054c72ff73cd523737b5f171663e5be0..9592e283c7aa11e53bc76ab4276e8e2f
encoder << m_httpStatusCode;
encoder << m_certificateInfo;
-@@ -411,6 +414,12 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon
+@@ -412,6 +419,12 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon
return false;
response.m_httpHeaderFields = WTFMove(*httpHeaderFields);
@@ -8185,10 +8308,10 @@ index b1f17979054c72ff73cd523737b5f171663e5be0..9592e283c7aa11e53bc76ab4276e8e2f
decoder >> httpStatusCode;
if (!httpStatusCode)
diff --git a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
-index f44cc0669cc095f192960b4767e8f61b13519937..6b06efd4233287b5dd8ba968bd77eb30d87f8fbd 100644
+index 47476515324b3d64d8a17b39a7933b73361ce084..54764589c5e4563b0d5e818665e677cd54225764 100644
--- a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
+++ b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
-@@ -479,6 +479,22 @@ void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameS
+@@ -481,6 +481,22 @@ void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameS
END_BLOCK_OBJC_EXCEPTIONS
}
@@ -8401,7 +8524,7 @@ index ad7471cbd809b2c9b8bedeab15ead1f9d824b8e3..07ce9246c343d18602b31481f6df0c86
{
GUniquePtr<SoupCookie> targetCookie(cookie.toSoupCookie());
diff --git a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
-index 726b26ae3157c1b92c7f6f51f3d31d0bbd52bac2..a811a177ff06cee89e558b2d47a803688be4b9ef 100644
+index fc63698cd682f9a70ac43c8417a48651ff9d628d..e6c4d00d977cd0186c8ffc4ed0c5ca37da9a6df3 100644
--- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
+++ b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
@@ -39,6 +39,7 @@
@@ -8437,19 +8560,37 @@ index c50799b63e05adbe32bae3535d786c7d268f980f..9cf1cc7ec4eaae22947f80ba272dfae2
HGLOBAL 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 207572d157ba2173c045e01da8f9b83b034c047e..6590bd36b23bdcbc947b191d2c011414655dfd68 100644
+index 7bdb180c89bf3fe9d48098318d3b7503b8fd6279..296a3b2b82733b27272acb51ab4f883decfbaf14 100644
--- a/Source/WebCore/platform/win/DragDataWin.cpp
+++ b/Source/WebCore/platform/win/DragDataWin.cpp
+@@ -40,7 +40,7 @@
+
+ namespace WebCore {
+
+-DragData::DragData(const DragDataMap& data, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> sourceOperationMask, OptionSet<DragApplicationFlags> flags, std::optional<PageIdentifier> pageID)
++DragData::DragData(const DragDataMap& data, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> sourceOperationMask, OptionSet<DragApplicationFlags> flags, OptionSet<DragDestinationAction> dragDestinationAction, std::optional<PageIdentifier> pageID)
+ : m_clientPosition(clientPosition)
+ , m_globalPosition(globalPosition)
+ , m_platformDragData(0)
@@ -48,6 +48,7 @@ DragData::DragData(const DragDataMap& data, const IntPoint& clientPosition, cons
, m_applicationFlags(flags)
, m_pageID(pageID)
, m_dragDataMap(data)
-+ , m_dragDestinationActionMask(anyDragDestinationAction())
++ , m_dragDestinationActionMask(dragDestinationAction)
{
}
+@@ -63,7 +64,7 @@ bool DragData::containsURL(FilenameConversionPolicy filenamePolicy) const
+ || (filenamePolicy == ConvertFilenames && (m_dragDataMap.contains(filenameWFormat()->cfFormat) || m_dragDataMap.contains(filenameFormat()->cfFormat)));
+ }
+
+-const DragDataMap& DragData::dragDataMap()
++const DragDataMap& DragData::dragDataMap() const
+ {
+ if (!m_dragDataMap.isEmpty() || !m_platformDragData)
+ return m_dragDataMap;
diff --git a/Source/WebCore/platform/win/KeyEventWin.cpp b/Source/WebCore/platform/win/KeyEventWin.cpp
-index 2d2a6796dda9e52bf0eff2552d219f8b19c83e75..8e09a99d9d0dc3e14d8a2054c03504072874f7fa 100644
+index 6350161d8c2cd0832f68883b98615e7c52630c75..f20f5c90459ec160e990eccf902cb0281a7e4526 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,
@@ -8462,7 +8603,7 @@ index 2d2a6796dda9e52bf0eff2552d219f8b19c83e75..8e09a99d9d0dc3e14d8a2054c0350407
- // No KeyDown events on Windows to disambiguate.
- ASSERT_NOT_REACHED();
+ m_type = type;
-+ if (type == PlatformEvent::RawKeyDown) {
++ if (type == PlatformEvent::Type::RawKeyDown) {
+ m_text = String();
+ m_unmodifiedText = String();
+ } else {
@@ -8473,7 +8614,7 @@ index 2d2a6796dda9e52bf0eff2552d219f8b19c83e75..8e09a99d9d0dc3e14d8a2054c0350407
OptionSet<PlatformEvent::Modifier> PlatformKeyboardEvent::currentStateOfModifierKeys()
diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp
-index c9f46f58514296264f5414685cc768ba28c3c801..77f0f9c620e81d0f5740e22ee11d146e3c0466ee 100644
+index 4ad2497fa8c9f0a2857965e40f239735e0db411c..48ff919f35d52df949474764da0753637212a6ad 100644
--- a/Source/WebCore/platform/win/PasteboardWin.cpp
+++ b/Source/WebCore/platform/win/PasteboardWin.cpp
@@ -1129,7 +1129,21 @@ void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>& data)
@@ -8524,20 +8665,6 @@ index c9f46f58514296264f5414685cc768ba28c3c801..77f0f9c620e81d0f5740e22ee11d146e
+}
+
} // namespace WebCore
-diff --git a/Source/WebCore/platform/win/ScrollbarThemeWin.cpp b/Source/WebCore/platform/win/ScrollbarThemeWin.cpp
-index e89ec9d83d8abc141938716f24eaba061a085af3..6005d02b9bf20ef2cbf9382fdf50c863952c8db5 100644
---- a/Source/WebCore/platform/win/ScrollbarThemeWin.cpp
-+++ b/Source/WebCore/platform/win/ScrollbarThemeWin.cpp
-@@ -114,8 +114,7 @@ static int scrollbarThicknessInPixels()
-
- int ScrollbarThemeWin::scrollbarThickness(ScrollbarControlSize, ScrollbarExpansionState)
- {
-- float inverseScaleFactor = 1.0f / deviceScaleFactorForWindow(0);
-- return clampTo<int>(inverseScaleFactor * scrollbarThicknessInPixels());
-+ return 0;
- }
-
- void ScrollbarThemeWin::themeChanged()
diff --git a/Source/WebCore/platform/wpe/DragDataWPE.cpp b/Source/WebCore/platform/wpe/DragDataWPE.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..07fb260a5203167fdf94a552949394bb73ca8c61
@@ -9034,10 +9161,10 @@ index 2081154f90fac8f7b9f7c6061cf5dc6da1af44b5..e7c6071a6f2e05e76e0fd1cb4661ebd3
void SetHTTPCookieAcceptPolicy(enum:uint8_t WebCore::HTTPCookieAcceptPolicy policy) -> ()
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
-index 6cdb6edc00f0fcda7706bb8863898005da8edbae..4300568c7bd07c7e86741f2d73223d2fb0162070 100644
+index 3e9ad052e74831d2b4b6172fee5f7ba12c15ad00..2dfc8557852fcfeadf9727bf307b53a4ad2f936d 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
-@@ -83,6 +83,11 @@
+@@ -84,6 +84,11 @@
#include <WebCore/SameSiteInfo.h>
#include <WebCore/SecurityPolicy.h>
@@ -9049,7 +9176,7 @@ index 6cdb6edc00f0fcda7706bb8863898005da8edbae..4300568c7bd07c7e86741f2d73223d2f
#if ENABLE(APPLE_PAY_REMOTE_UI)
#include "WebPaymentCoordinatorProxyMessages.h"
#endif
-@@ -487,6 +492,10 @@ void NetworkConnectionToWebProcess::createSocketStream(URL&& url, String cachePa
+@@ -488,6 +493,10 @@ void NetworkConnectionToWebProcess::createSocketStream(URL&& url, String cachePa
if (auto* session = networkSession())
acceptInsecureCertificates = session->shouldAcceptInsecureCertificatesForWebSockets();
#endif
@@ -9060,7 +9187,7 @@ index 6cdb6edc00f0fcda7706bb8863898005da8edbae..4300568c7bd07c7e86741f2d73223d2f
m_networkSocketStreams.add(identifier, NetworkSocketStream::create(m_networkProcess.get(), WTFMove(url), m_sessionID, cachePartition, identifier, m_connection, WTFMove(token), acceptInsecureCertificates));
}
-@@ -1031,6 +1040,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)
+@@ -1032,6 +1041,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)
#endif
}
@@ -9076,10 +9203,10 @@ index 6cdb6edc00f0fcda7706bb8863898005da8edbae..4300568c7bd07c7e86741f2d73223d2f
void NetworkConnectionToWebProcess::removeStorageAccessForFrame(FrameIdentifier frameID, PageIdentifier pageID)
{
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-index 1e0c700fcb789f2fc853df86df59b490563ad631..6ba99ecb52832ff272f33f64a0ce8c8d6a3f3829 100644
+index f309af72791be7ebcd1d31b2712008dd727e175e..9245272836fa02c0129fb1b19429205933c90003 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-@@ -310,6 +310,8 @@ private:
+@@ -309,6 +309,8 @@ private:
void clearPageSpecificData(WebCore::PageIdentifier);
@@ -9102,10 +9229,10 @@ index 118aff35c592dd4ad9a29568a9139be61da7275b..22260b500fd3ebeb96f796709ecdd3d2
RemoveStorageAccessForFrame(WebCore::FrameIdentifier frameID, WebCore::PageIdentifier pageID);
LogUserInteraction(WebCore::RegistrableDomain domain)
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.cpp b/Source/WebKit/NetworkProcess/NetworkProcess.cpp
-index 01beddfd3a8e52b4f9fb975f3940e42889a31e95..c2852d0051294840120c4c313143e8b40c50e54c 100644
+index 67f86f699cda48e9f9dce2690b0fa83408366110..71308c342f471cc666ad5a1eb7c8d36a571a6fcb 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp
-@@ -577,6 +577,12 @@ void NetworkProcess::destroySession(PAL::SessionID sessionID)
+@@ -599,6 +599,12 @@ void NetworkProcess::destroySession(PAL::SessionID sessionID)
m_sessionsControlledByAutomation.remove(sessionID);
}
@@ -9119,7 +9246,7 @@ index 01beddfd3a8e52b4f9fb975f3940e42889a31e95..c2852d0051294840120c4c313143e8b4
void NetworkProcess::dumpResourceLoadStatistics(PAL::SessionID sessionID, CompletionHandler<void(String)>&& completionHandler)
{
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.h b/Source/WebKit/NetworkProcess/NetworkProcess.h
-index daa9c06fc0815453d840f9f63dead4accf8cc33a..a84298042f48abe339c44771bddbac837ca3a4de 100644
+index 4b529d1e4e1ca0d52e908fb202eca93c2396e0d8..2c4f7634cf34d5cb486ffc2830725b524951ec62 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.h
@@ -36,6 +36,7 @@
@@ -9138,7 +9265,7 @@ index daa9c06fc0815453d840f9f63dead4accf8cc33a..a84298042f48abe339c44771bddbac83
class CurlProxySettings;
class ProtectionSpace;
class NetworkStorageSession;
-@@ -199,6 +201,8 @@ public:
+@@ -200,6 +202,8 @@ public:
void addWebsiteDataStore(WebsiteDataStoreParameters&&);
@@ -9148,10 +9275,10 @@ index daa9c06fc0815453d840f9f63dead4accf8cc33a..a84298042f48abe339c44771bddbac83
void clearPrevalentResource(PAL::SessionID, RegistrableDomain&&, CompletionHandler<void()>&&);
void clearUserInteraction(PAL::SessionID, RegistrableDomain&&, CompletionHandler<void()>&&);
diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
-index ffea578a0e9dc1d79c9a31042a843dd76776fcec..3e6b665fb2804fa473e30dd1a63c619f852254cb 100644
+index 2a429ff20a6718c879340f0c626caf0a75868fa7..738e96ad11b472baaad069f6139524d02fa50ca5 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
-@@ -79,6 +79,8 @@ messages -> NetworkProcess LegacyReceiver {
+@@ -81,6 +81,8 @@ messages -> NetworkProcess LegacyReceiver {
PreconnectTo(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, URL url, String userAgent, enum:uint8_t WebCore::StoredCredentialsPolicy storedCredentialsPolicy, std::optional<WebKit::NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, enum:bool WebKit::LastNavigationWasAppInitiated lastNavigationWasAppInitiated);
@@ -9161,7 +9288,7 @@ index ffea578a0e9dc1d79c9a31042a843dd76776fcec..3e6b665fb2804fa473e30dd1a63c619f
ClearPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> ()
ClearUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> ()
diff --git a/Source/WebKit/NetworkProcess/NetworkSession.h b/Source/WebKit/NetworkProcess/NetworkSession.h
-index 267287ddbbdf8ab5c2606f3a45325a896ecf45a4..8bef9c0b75061b633d92a690ef825ec12c3c7985 100644
+index a27a1f04a163ef7d763d132686570ed2d091867c..e9c725bf6fd112ba27d3d7187a16f407c7438c3c 100644
--- a/Source/WebKit/NetworkProcess/NetworkSession.h
+++ b/Source/WebKit/NetworkProcess/NetworkSession.h
@@ -197,6 +197,9 @@ public:
@@ -9174,7 +9301,7 @@ index 267287ddbbdf8ab5c2606f3a45325a896ecf45a4..8bef9c0b75061b633d92a690ef825ec1
#if ENABLE(SERVICE_WORKER)
void addSoftUpdateLoader(std::unique_ptr<ServiceWorkerSoftUpdateLoader>&& loader) { m_softUpdateLoaders.add(WTFMove(loader)); }
void removeSoftUpdateLoader(ServiceWorkerSoftUpdateLoader* loader) { m_softUpdateLoaders.remove(loader); }
-@@ -285,6 +288,7 @@ protected:
+@@ -289,6 +292,7 @@ protected:
bool m_privateClickMeasurementDebugModeEnabled { false };
std::optional<WebCore::PrivateClickMeasurement> m_ephemeralMeasurement;
bool m_isRunningEphemeralMeasurementTest { false };
@@ -9183,7 +9310,7 @@ index 267287ddbbdf8ab5c2606f3a45325a896ecf45a4..8bef9c0b75061b633d92a690ef825ec1
HashSet<Ref<NetworkResourceLoader>> m_keptAliveLoads;
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-index 7b439f33f331ab69dd29a3bd3a2f334c8ac0da25..88d51bc8d12bbf149b4143595507061f896cacbd 100644
+index 3c94224bf44f943408c6f33537ec24da8375be1b..2b6bd50d8d0974e633cd91a941645cf51d7042b1 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
@@ -747,7 +747,7 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece
@@ -9210,7 +9337,7 @@ index 7b439f33f331ab69dd29a3bd3a2f334c8ac0da25..88d51bc8d12bbf149b4143595507061f
#if !LOG_DISABLED
LOG(NetworkSession, "%llu didReceiveResponse completionHandler (%d)", taskIdentifier, policyAction);
diff --git a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
-index c97a7ea07e79f95216f2f43bbcf643edd508c4a2..4d6b8e72e01a2dd5f143b113968fb13f9ca879af 100644
+index 51b762c507ebb7081acdfc84cab2e29c9f5d3c3f..a1b4c3a3b34d2cf5726e150f6f14d879d08331b2 100644
--- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
+++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
@@ -89,6 +89,8 @@ NetworkDataTaskCurl::NetworkDataTaskCurl(NetworkSession& session, NetworkDataTas
@@ -9310,7 +9437,7 @@ index 0ed3ef8b632b9c0c57aceb413fbf263cbd485e68..45b434cbf1b1a55cf6314ea94f3ae181
if (!error)
return true;
diff --git a/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp
-index ab45835e203ebb3b17a88ab86231d23e45e4fa84..5d384660fb85c6f53b16d0070b607b17bf3aa5da 100644
+index 670ac930d9af9d6b5f05414b8294b3f18124a19a..7d851c0702d9aa16de2870eae3744e93fadb9921 100644
--- a/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp
+++ b/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp
@@ -109,6 +109,11 @@ static gboolean webSocketAcceptCertificateCallback(GTlsConnection* connection, G
@@ -9371,10 +9498,10 @@ index ab45835e203ebb3b17a88ab86231d23e45e4fa84..5d384660fb85c6f53b16d0070b607b17
}
return makeUnique<WebSocketTask>(channel, request, soupSession(), soupMessage.get(), protocol);
diff --git a/Source/WebKit/Platform/IPC/ArgumentCoders.h b/Source/WebKit/Platform/IPC/ArgumentCoders.h
-index 23b9d6e4f19f434cd198ff083d0d2f05999489e8..b010c8863e2ea5b861a68116bdde2d31735de5e1 100644
+index 9d2d2c8827689363ee98c8076b79df281b4e7c45..9944e1e300b6a5ce34f7bde3a423ec7e919a8bad 100644
--- a/Source/WebKit/Platform/IPC/ArgumentCoders.h
+++ b/Source/WebKit/Platform/IPC/ArgumentCoders.h
-@@ -145,8 +145,11 @@ struct ArgumentCoder<ArrayReferenceTuple<Types...>> {
+@@ -154,8 +154,11 @@ struct ArgumentCoder<ArrayReferenceTuple<Types...>> {
{
constexpr size_t Index = sizeof...(DataPointerTypes);
static_assert(Index <= sizeof...(Types));
@@ -9384,14 +9511,14 @@ index 23b9d6e4f19f434cd198ff083d0d2f05999489e8..b010c8863e2ea5b861a68116bdde2d31
- if constexpr (Index < sizeof...(Types)) {
+ if constexpr (Recurse) {
- using ElementType = ArrayReferenceTupleElementType<Index>;
- auto dataSize = CheckedSize { size } * sizeof(ElementType);
- if (UNLIKELY(dataSize.hasOverflowed()))
+ using ElementType = std::tuple_element_t<Index, std::tuple<Types...>>;
+ auto data = decoder.template decodeSpan<ElementType>(size);
+ if (!data.data())
diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake
-index 25dbba58c271556a588746769d714070e5c3037d..5722e2bd50b8895718f467f65fe02ef4ba10ed13 100644
+index 8e20ebf009c97649ecc78abd2bfdaaa74d99e7a8..a3a191911a601dbd5481eafb90e68d5ee815c07d 100644
--- a/Source/WebKit/PlatformGTK.cmake
+++ b/Source/WebKit/PlatformGTK.cmake
-@@ -274,6 +274,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+@@ -280,6 +280,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
${GSTREAMER_PBUTILS_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
@@ -9401,7 +9528,7 @@ index 25dbba58c271556a588746769d714070e5c3037d..5722e2bd50b8895718f467f65fe02ef4
)
if (USE_WPE_RENDERER)
-@@ -315,6 +318,9 @@ if (USE_LIBWEBRTC)
+@@ -321,6 +324,9 @@ if (USE_LIBWEBRTC)
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
"${THIRDPARTY_DIR}/libwebrtc/Source/"
"${THIRDPARTY_DIR}/libwebrtc/Source/webrtc"
@@ -9411,18 +9538,7 @@ index 25dbba58c271556a588746769d714070e5c3037d..5722e2bd50b8895718f467f65fe02ef4
)
endif ()
-@@ -347,12 +353,23 @@ GENERATE_API_HEADERS(WebKitWebExtension_HEADER_TEMPLATES
- "-DENABLE_2022_GLIB_API=$<BOOL:${ENABLE_2022_GLIB_API}>"
- )
-
-+if (NOT USE_GTK4)
-+ list(REMOVE_ITEM WebKitGTK_INSTALLED_HEADERS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit.h)
-+ list(REMOVE_ITEM WebKitWebExtension_INSTALLED_HEADERS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit-web-extension.h)
-+endif ()
-+
- if (USE_GTK4)
- set(WebKitGTK_ENUM_HEADER_TEMPLATE ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypesGtk4.h.in)
- else ()
+@@ -364,6 +370,12 @@ else ()
set(WebKitGTK_ENUM_HEADER_TEMPLATE ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypesGtk3.h.in)
endif ()
@@ -9435,97 +9551,11 @@ index 25dbba58c271556a588746769d714070e5c3037d..5722e2bd50b8895718f467f65fe02ef4
# To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
set(WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_INSTALLED_HEADERS})
list(REMOVE_ITEM WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.h)
-@@ -459,35 +476,6 @@ if (COMPILER_IS_GCC_OR_CLANG)
- WEBKIT_ADD_TARGET_CXX_FLAGS(webkit${WEBKITGTK_API_INFIX}gtkinjectedbundle -Wno-unused-parameter)
- endif ()
-
--# For GTK 3 builds, we have to maintain webkit2/webkit2.h and webkit2/webkit-web-extension.h for API
--# compatibility. These are the only headers still installed under webkit2/. Install them manually.
--if (NOT USE_GTK4)
-- file(MAKE_DIRECTORY ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2)
-- add_custom_command(
-- OUTPUT ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit2.h
-- DEPENDS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit.h
-- COMMAND ${CMAKE_COMMAND} -E copy ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit.h ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/
-- VERBATIM
-- )
--
-- add_custom_command(
-- OUTPUT ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit-web-extension.h
-- DEPENDS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit-web-extension.h
-- COMMAND ${CMAKE_COMMAND} -E copy ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit-web-extension.h ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/
-- VERBATIM
-- )
--
-- list(APPEND WebKit_SOURCES ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit2.h ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit-web-extension.h)
--
-- list(REMOVE_ITEM WebKitGTK_INSTALLED_HEADERS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit.h)
-- list(REMOVE_ITEM WebKitWebExtension_INSTALLED_HEADERS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit-web-extension.h)
--
-- install(FILES ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit2.h
-- ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit-web-extension.h
-- DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkit2"
-- )
--endif ()
--
- install(TARGETS webkit${WEBKITGTK_API_INFIX}gtkinjectedbundle
- DESTINATION "${LIB_INSTALL_DIR}/webkit${WEBKITGTK_API_INFIX}gtk-${WEBKITGTK_API_VERSION}/injected-bundle"
- )
-diff --git a/Source/WebKit/PlatformGTKDeprecated.cmake b/Source/WebKit/PlatformGTKDeprecated.cmake
-index c536c67136999232f64bbe95af88581eb952a045..e8cdbd6f05c4fcd3cbeeebd5bd73b1b880cbb146 100644
---- a/Source/WebKit/PlatformGTKDeprecated.cmake
-+++ b/Source/WebKit/PlatformGTKDeprecated.cmake
-@@ -4,6 +4,8 @@ list(APPEND WebKit_UNIFIED_SOURCE_LIST_FILES
-
- add_definitions(-DWEBKIT_DOM_USE_UNSTABLE_API)
-
-+file(MAKE_DIRECTORY ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2)
-+
- list(APPEND WebKitGTK_HEADER_TEMPLATES
- ${WEBKIT_DIR}/UIProcess/API/glib/WebKitMimeInfo.h.in
- ${WEBKIT_DIR}/UIProcess/API/glib/WebKitPlugin.h.in
-@@ -135,6 +137,8 @@ set(WebKitDOM_SOURCES_FOR_INTROSPECTION
- )
-
- list(APPEND WebKitGTK_FAKE_API_HEADERS
-+ ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit2.h
-+ ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit-web-extension.h
- ${WebKitGTK_FRAMEWORK_HEADERS_DIR}/webkitgtk-webextension/webkitdom
- )
-
-@@ -147,6 +151,27 @@ install(FILES ${WebKitDOM_INSTALLED_HEADERS}
- DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
- )
-
-+# For GTK 3 builds, we have to maintain webkit2/webkit2.h and webkit2/webkit-web-extension.h for API
-+# compatibility. These are the only headers still installed under webkit2/. Install them manually.
-+install(FILES ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit2.h
-+ ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit-web-extension.h
-+ DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkit2"
-+)
-+
-+add_custom_command(
-+ OUTPUT ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit2.h
-+ DEPENDS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit.h
-+ COMMAND ${CMAKE_COMMAND} -E copy ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit.h ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit2.h
-+ VERBATIM
-+)
-+
-+add_custom_command(
-+ OUTPUT ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/webkit-web-extension.h
-+ DEPENDS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit-web-extension.h
-+ COMMAND ${CMAKE_COMMAND} -E copy ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/webkit-web-extension.h ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit2/
-+ VERBATIM
-+)
-+
- add_custom_command(
- OUTPUT ${WebKitGTK_FRAMEWORK_HEADERS_DIR}/webkitgtk-webextension/webkitdom
- DEPENDS ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM
diff --git a/Source/WebKit/PlatformWPE.cmake b/Source/WebKit/PlatformWPE.cmake
-index 0e63cf33c439b38f2938124d3588bfae284a9aaa..9de18a08be7925522bc49fedae55515b8a8efbf6 100644
+index 1ec0ba4a8d80e1a2a7b0fd283b49985d5566667f..c48a2b9b0051f95668afb774c53e1b23e3af1a71 100644
--- a/Source/WebKit/PlatformWPE.cmake
+++ b/Source/WebKit/PlatformWPE.cmake
-@@ -198,6 +198,7 @@ set(WPE_API_INSTALLED_HEADERS
+@@ -203,6 +203,7 @@ set(WPE_API_INSTALLED_HEADERS
${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
${DERIVED_SOURCES_WPE_API_DIR}/WebKitVersion.h
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitColor.h
@@ -9533,7 +9563,7 @@ index 0e63cf33c439b38f2938124d3588bfae284a9aaa..9de18a08be7925522bc49fedae55515b
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitRectangle.h
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWebViewBackend.h
)
-@@ -336,6 +337,7 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
+@@ -342,6 +343,7 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
"${WEBKIT_DIR}/UIProcess/Launcher/libwpe"
"${WEBKIT_DIR}/UIProcess/Notifications/glib/"
"${WEBKIT_DIR}/UIProcess/geoclue"
@@ -9541,7 +9571,7 @@ index 0e63cf33c439b38f2938124d3588bfae284a9aaa..9de18a08be7925522bc49fedae55515b
"${WEBKIT_DIR}/UIProcess/gstreamer"
"${WEBKIT_DIR}/UIProcess/linux"
"${WEBKIT_DIR}/UIProcess/soup"
-@@ -355,8 +357,17 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+@@ -361,8 +363,17 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
${GIO_UNIX_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
@@ -9560,10 +9590,19 @@ index 0e63cf33c439b38f2938124d3588bfae284a9aaa..9de18a08be7925522bc49fedae55515b
Cairo::Cairo
Freetype::Freetype
diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmake
-index f78d51303c31e8ad71807f3d6ed64f2148e9e8d1..cf1ec2705c7155723757d1708cea4e169637cf85 100644
+index f78d51303c31e8ad71807f3d6ed64f2148e9e8d1..adfbfff6bf20919c84c229bfd5c64382edd44e32 100644
--- a/Source/WebKit/PlatformWin.cmake
+++ b/Source/WebKit/PlatformWin.cmake
-@@ -62,8 +62,12 @@ list(APPEND WebKit_SOURCES
+@@ -4,6 +4,8 @@ set(NetworkProcess_OUTPUT_NAME WebKitNetworkProcess)
+ set(GPUProcess_OUTPUT_NAME WebKitGPUProcess)
+ set(PluginProcess_OUTPUT_NAME WebKitPluginProcess)
+
++set(WebKit_USE_PREFIX_HEADER ON)
++
+ include(Headers.cmake)
+
+ list(APPEND WebKit_SOURCES
+@@ -62,8 +64,12 @@ list(APPEND WebKit_SOURCES
UIProcess/wc/DrawingAreaProxyWC.cpp
@@ -9576,7 +9615,7 @@ index f78d51303c31e8ad71807f3d6ed64f2148e9e8d1..cf1ec2705c7155723757d1708cea4e16
UIProcess/win/WebPageProxyWin.cpp
UIProcess/win/WebPopupMenuProxyWin.cpp
UIProcess/win/WebProcessPoolWin.cpp
-@@ -82,6 +86,7 @@ list(APPEND WebKit_SOURCES
+@@ -82,6 +88,7 @@ list(APPEND WebKit_SOURCES
WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp
@@ -9584,7 +9623,7 @@ index f78d51303c31e8ad71807f3d6ed64f2148e9e8d1..cf1ec2705c7155723757d1708cea4e16
WebProcess/WebPage/AcceleratedSurface.cpp
-@@ -136,6 +141,72 @@ list(APPEND WebKit_MESSAGES_IN_FILES
+@@ -136,6 +143,72 @@ list(APPEND WebKit_MESSAGES_IN_FILES
GPUProcess/graphics/wc/RemoteWCLayerTreeHost
)
@@ -9657,7 +9696,7 @@ index f78d51303c31e8ad71807f3d6ed64f2148e9e8d1..cf1ec2705c7155723757d1708cea4e16
set(WebKitCommonIncludeDirectories ${WebKit_INCLUDE_DIRECTORIES})
set(WebKitCommonSystemIncludeDirectories ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
-@@ -193,6 +264,7 @@ if (${WTF_PLATFORM_WIN_CAIRO})
+@@ -193,6 +266,7 @@ if (${WTF_PLATFORM_WIN_CAIRO})
list(APPEND WebKit_PRIVATE_LIBRARIES
comctl32
@@ -9678,7 +9717,7 @@ index caf67e1dece5b727e43eba780e70814f8fdb0f63..740150d2589d6e16a516daa3bf6ef899
#include <WebKit/WKContextConfigurationRef.h>
#include <WebKit/WKCredential.h>
diff --git a/Source/WebKit/Shared/NativeWebKeyboardEvent.h b/Source/WebKit/Shared/NativeWebKeyboardEvent.h
-index 41ca60e664a95ef35a6872b7bdd25713eb3c722f..5e61331ea2dbc9127a12d662187d1081bed68605 100644
+index 81f1e954237a1632cb9481e78a52eeea034ee6a8..d34963331605ea4c89b68016768d66c4961ac2a7 100644
--- a/Source/WebKit/Shared/NativeWebKeyboardEvent.h
+++ b/Source/WebKit/Shared/NativeWebKeyboardEvent.h
@@ -33,6 +33,7 @@
@@ -9693,7 +9732,7 @@ index 41ca60e664a95ef35a6872b7bdd25713eb3c722f..5e61331ea2dbc9127a12d662187d1081
#if USE(APPKIT)
// FIXME: Share iOS's HandledByInputMethod enum here instead of passing a boolean.
NativeWebKeyboardEvent(NSEvent *, bool handledByInputMethod, bool replacesSoftSpace, const Vector<WebCore::KeypressCommand>&);
-+ NativeWebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands)
++ NativeWebKeyboardEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp, WTFMove(commands))
+ {
+ }
@@ -9701,8 +9740,8 @@ index 41ca60e664a95ef35a6872b7bdd25713eb3c722f..5e61331ea2dbc9127a12d662187d1081
NativeWebKeyboardEvent(const NativeWebKeyboardEvent&);
NativeWebKeyboardEvent(GdkEvent*, const String&, Vector<String>&& commands);
NativeWebKeyboardEvent(const String&, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&);
- NativeWebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, Vector<String>&& commands, bool isKeypad, OptionSet<WebEventModifier>);
-+ NativeWebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp, Vector<String>&& commands)
+ NativeWebKeyboardEvent(WebEventType, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, Vector<String>&& commands, bool isKeypad, OptionSet<WebEventModifier>);
++ NativeWebKeyboardEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp, Vector<String>&& commands)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp, WTFMove(commands))
+ {
+ }
@@ -9712,13 +9751,13 @@ index 41ca60e664a95ef35a6872b7bdd25713eb3c722f..5e61331ea2dbc9127a12d662187d1081
#elif USE(LIBWPE)
enum class HandledByInputMethod : bool { No, Yes };
NativeWebKeyboardEvent(struct wpe_input_keyboard_event*, const String&, HandledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&);
-+ NativeWebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp)
++ NativeWebKeyboardEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp)
+ {
+ }
#elif PLATFORM(WIN)
NativeWebKeyboardEvent(HWND, UINT message, WPARAM, LPARAM, Vector<MSG>&& pendingCharEvents);
-+ NativeWebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp)
++ NativeWebKeyboardEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp)
+ {
+ }
@@ -9726,7 +9765,7 @@ index 41ca60e664a95ef35a6872b7bdd25713eb3c722f..5e61331ea2dbc9127a12d662187d1081
#if USE(APPKIT)
diff --git a/Source/WebKit/Shared/NativeWebMouseEvent.h b/Source/WebKit/Shared/NativeWebMouseEvent.h
-index 1b5cd6a32c2df5662c89903497089b059f95804e..0c63417365032c39a1a8a50393b01a81921126e6 100644
+index cd5bd406daa4d1ff7b38d1a6e59cedbd234e642c..13899dc1ebd083d871ca63979a482c0ed8f4d23c 100644
--- a/Source/WebKit/Shared/NativeWebMouseEvent.h
+++ b/Source/WebKit/Shared/NativeWebMouseEvent.h
@@ -79,6 +79,11 @@ public:
@@ -9734,7 +9773,7 @@ index 1b5cd6a32c2df5662c89903497089b059f95804e..0c63417365032c39a1a8a50393b01a81
#endif
+#if PLATFORM(GTK) || USE(LIBWPE) || PLATFORM(WIN)
-+ NativeWebMouseEvent(Type type, WebMouseEventButton button, unsigned short buttons, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet<WebEventModifier> modifiers, WallTime timestamp)
++ NativeWebMouseEvent(WebEventType type, WebMouseEventButton button, unsigned short buttons, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet<WebEventModifier> modifiers, WallTime timestamp)
+ : WebMouseEvent({type, modifiers, timestamp}, button, buttons, position, globalPosition, deltaX, deltaY, deltaZ, clickCount) { }
+#endif
+
@@ -9781,10 +9820,10 @@ index 8b8223a49829fd2c0a325519881d6878f8c3f2b5..7e1cc65fecf18e0f71166c99f2242941
ALLOW_COMMA_BEGIN
diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
-index 3b20404ed05f3dd7dac6902bc40e7e132eb56a1a..3c6c301cd32ee71f641e2592ee7ce10bdaa6fd06 100644
+index 72202c50ab8d40045883ce27bb71daa2afebbcba..27d96ae419eee65018823a72f89bb10d9c5f4fd3 100644
--- a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
-@@ -149,6 +149,10 @@
+@@ -193,6 +193,10 @@
#include <WebCore/AppKitControlSystemImage.h>
#endif
@@ -9796,10 +9835,10 @@ index 3b20404ed05f3dd7dac6902bc40e7e132eb56a1a..3c6c301cd32ee71f641e2592ee7ce10b
namespace IPC {
diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
-index 3a99800292e0cfabd33d3370a43feb1655aa5a02..adaf91b718f4596cfefd5fcaf8faefae41ca06ae 100644
+index 9505c35067b40fe8d034fa64a0ebbec2afb417d8..136d0218285eda2b58dccd821f74bf9606ee69a1 100644
--- a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
-@@ -1305,6 +1305,10 @@ struct WebCore::WindowFeatures {
+@@ -1372,6 +1372,10 @@ struct WebCore::WindowFeatures {
bool fullscreen;
bool dialog;
@@ -9810,8 +9849,26 @@ index 3a99800292e0cfabd33d3370a43feb1655aa5a02..adaf91b718f4596cfefd5fcaf8faefae
};
[Nested] enum class WebCore::CompositionUnderlineColor : bool
+@@ -1828,6 +1832,9 @@ class WebCore::AuthenticationChallenge {
+ class WebCore::DragData {
+ #if PLATFORM(COCOA)
+ String pasteboardName();
++#endif
++#if PLATFORM(WIN)
++ WebCore::DragDataMap dragDataMap();
+ #endif
+ WebCore::IntPoint clientPosition();
+ WebCore::IntPoint globalPosition();
+@@ -2325,6 +2332,7 @@ enum class WebCore::ResourceLoadPriority : uint8_t {
+ AtomString m_httpStatusText;
+ AtomString m_httpVersion;
+ WebCore::HTTPHeaderMap m_httpHeaderFields;
++ WebCore::HTTPHeaderMap m_httpRequestHeaderFields;
+ Box<WebCore::NetworkLoadMetrics> m_networkLoadMetrics;
+
+ short m_httpStatusCode;
diff --git a/Source/WebKit/Shared/WebEvent.h b/Source/WebKit/Shared/WebEvent.h
-index 77907a08157fc793ec8fbf1617e1ee4dafa7f00f..c2c326c7d5fa7985f5d05c02e8b7f87e08c8cf81 100644
+index ed7111a107f658ee48a2f15e8e415856658a35a6..a6ed71b714a471fb363795cfb5f05b72d39706a3 100644
--- a/Source/WebKit/Shared/WebEvent.h
+++ b/Source/WebKit/Shared/WebEvent.h
@@ -34,6 +34,7 @@
@@ -9823,7 +9880,7 @@ index 77907a08157fc793ec8fbf1617e1ee4dafa7f00f..c2c326c7d5fa7985f5d05c02e8b7f87e
#include <wtf/text/WTFString.h>
diff --git a/Source/WebKit/Shared/WebEvent.serialization.in b/Source/WebKit/Shared/WebEvent.serialization.in
-index be60fdc15437ae1d4ce5e98b6682a69f3d7c3824..f71be46d2034553c733fdc1e980dd4c31e1fa491 100644
+index e9232c2e15929c598f2f9cadd5dc11cb292a3f5d..4fe7dda4a7a2197e4e2b4e43fd4692d9dd4ad474 100644
--- a/Source/WebKit/Shared/WebEvent.serialization.in
+++ b/Source/WebKit/Shared/WebEvent.serialization.in
@@ -86,9 +86,7 @@ class WebKit::WebKeyboardEvent : WebKit::WebEvent {
@@ -9837,7 +9894,7 @@ index be60fdc15437ae1d4ce5e98b6682a69f3d7c3824..f71be46d2034553c733fdc1e980dd4c3
#if !PLATFORM(GTK) && !USE(LIBWPE)
bool isSystemKey();
diff --git a/Source/WebKit/Shared/WebKeyboardEvent.cpp b/Source/WebKit/Shared/WebKeyboardEvent.cpp
-index bfbc02f4cd90a80638033ce06392696c902ea9e2..9f929ea75637583100b784bb6824fbaa383af7d5 100644
+index 73cf481519fadb80efc84baaac22c4002a47a429..17d9d5461ae47a122160f10b7fdcb662f06bea7a 100644
--- a/Source/WebKit/Shared/WebKeyboardEvent.cpp
+++ b/Source/WebKit/Shared/WebKeyboardEvent.cpp
@@ -35,6 +35,7 @@ WebKeyboardEvent::WebKeyboardEvent()
@@ -9852,7 +9909,7 @@ index bfbc02f4cd90a80638033ce06392696c902ea9e2..9f929ea75637583100b784bb6824fbaa
ASSERT(isKeyboardEventType(type()));
}
-+WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands)
++WebKeyboardEvent::WebKeyboardEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands)
+ : WebEvent(type, modifiers, timestamp)
+ , m_text(text)
+ , m_unmodifiedText(text)
@@ -9889,7 +9946,7 @@ index bfbc02f4cd90a80638033ce06392696c902ea9e2..9f929ea75637583100b784bb6824fbaa
ASSERT(isKeyboardEventType(type()));
}
-+WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp, Vector<String>&& commands)
++WebKeyboardEvent::WebKeyboardEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp, Vector<String>&& commands)
+ : WebEvent(type, modifiers, timestamp)
+ , m_text(text)
+ , m_unmodifiedText(text)
@@ -9934,7 +9991,7 @@ index bfbc02f4cd90a80638033ce06392696c902ea9e2..9f929ea75637583100b784bb6824fbaa
+#if PLATFORM(WIN) || USE(LIBWPE)
+
-+WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp)
++WebKeyboardEvent::WebKeyboardEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, WallTime timestamp)
+ : WebEvent(type, modifiers, timestamp)
+ , m_text(text)
+ , m_unmodifiedText(text)
@@ -9957,32 +10014,32 @@ index bfbc02f4cd90a80638033ce06392696c902ea9e2..9f929ea75637583100b784bb6824fbaa
{
}
diff --git a/Source/WebKit/Shared/WebKeyboardEvent.h b/Source/WebKit/Shared/WebKeyboardEvent.h
-index d9af5618f5fdd5ef95364d23cbc8c66116bdffd4..a308ad0d68a7b8e8330c3c1494e725eee11be294 100644
+index bafe631e1b4241e88ec184944053be0e6516a6cc..5e46313982ef4f5421a71c0c89faa05318e3436e 100644
--- a/Source/WebKit/Shared/WebKeyboardEvent.h
+++ b/Source/WebKit/Shared/WebKeyboardEvent.h
@@ -43,14 +43,18 @@ public:
#if USE(APPKIT)
WebKeyboardEvent(WebEvent&&, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>&, bool isAutoRepeat, bool isKeypad, bool isSystemKey);
-+ WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier>, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands);
++ WebKeyboardEvent(WebEventType, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier>, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands);
#elif PLATFORM(GTK)
- WebKeyboardEvent(WebEvent&&, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&, Vector<String>&& commands, bool isKeypad);
+ WebKeyboardEvent(WebEvent&&, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&, Vector<String>&& commands, bool isAutoRepeat, bool isKeypad);
-+ WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier>, WallTime timestamp, Vector<String>&& commands);
++ WebKeyboardEvent(WebEventType, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier>, WallTime timestamp, Vector<String>&& commands);
#elif PLATFORM(IOS_FAMILY)
WebKeyboardEvent(WebEvent&&, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, bool isAutoRepeat, bool isKeypad, bool isSystemKey);
#elif USE(LIBWPE)
- WebKeyboardEvent(WebEvent&&, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&, bool isKeypad);
+ WebKeyboardEvent(WebEvent&&, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&&, std::optional<EditingRange>&&, bool isAutoRepeat, bool isKeypad);
-+ WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier>, WallTime timestamp);
++ WebKeyboardEvent(WebEventType, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier>, WallTime timestamp);
#else
WebKeyboardEvent(WebEvent&&, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey);
-+ WebKeyboardEvent(Type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier>, WallTime timestamp);
++ WebKeyboardEvent(WebEventType, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier>, WallTime timestamp);
#endif
const String& text() const { return m_text; }
diff --git a/Source/WebKit/Shared/WebMouseEvent.h b/Source/WebKit/Shared/WebMouseEvent.h
-index 4196b689dbb047cd8961be391b53f4d311ed1f7d..15056ca3f871494997539ff2c0e5c8d380f31ea2 100644
+index a7862db2df45ac3ab8ba5c7dee7d9d0c5641c27b..149d8cc4ef277ebdfc3bb27be7d52f5cd2baffa7 100644
--- a/Source/WebKit/Shared/WebMouseEvent.h
+++ b/Source/WebKit/Shared/WebMouseEvent.h
@@ -73,6 +73,7 @@ public:
@@ -9994,7 +10051,7 @@ index 4196b689dbb047cd8961be391b53f4d311ed1f7d..15056ca3f871494997539ff2c0e5c8d3
const WebCore::IntPoint& globalPosition() const { return m_globalPosition; }
float deltaX() const { return m_deltaX; }
diff --git a/Source/WebKit/Shared/WebPageCreationParameters.cpp b/Source/WebKit/Shared/WebPageCreationParameters.cpp
-index 02469013666646c9f03dc6e4e2a6746409d6972a..65e8b875808ca50e390a97628bfebcc0f61b7df8 100644
+index 1f2dc399c63a1cce7f52fe52bcd92aab5fdb4d77..583fd1e9467790049535614a6fb221f683823746 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.cpp
+++ b/Source/WebKit/Shared/WebPageCreationParameters.cpp
@@ -159,6 +159,8 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const
@@ -10006,7 +10063,7 @@ index 02469013666646c9f03dc6e4e2a6746409d6972a..65e8b875808ca50e390a97628bfebcc0
encoder << shouldCaptureAudioInUIProcess;
encoder << shouldCaptureAudioInGPUProcess;
encoder << shouldCaptureVideoInUIProcess;
-@@ -556,7 +558,10 @@ std::optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::
+@@ -561,7 +563,10 @@ std::optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::
if (!processDisplayName)
return std::nullopt;
parameters.processDisplayName = WTFMove(*processDisplayName);
@@ -10019,10 +10076,10 @@ index 02469013666646c9f03dc6e4e2a6746409d6972a..65e8b875808ca50e390a97628bfebcc0
return std::nullopt;
diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h
-index b92f2972a936b9ae10b5bd22d51fdfb388cf4af2..2780f81a5cb4f73f9b4fc0ab925c5f3d70956809 100644
+index 26198d569e94de3ebe77339fa19eb5dec4e9a50e..759e5362cbc93add21aa26372f93c15a4d407b6f 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.h
+++ b/Source/WebKit/Shared/WebPageCreationParameters.h
-@@ -264,6 +264,8 @@ struct WebPageCreationParameters {
+@@ -268,6 +268,8 @@ struct WebPageCreationParameters {
bool httpsUpgradeEnabled { true };
@@ -10032,19 +10089,19 @@ index b92f2972a936b9ae10b5bd22d51fdfb388cf4af2..2780f81a5cb4f73f9b4fc0ab925c5f3d
bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload { false };
#endif
diff --git a/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp b/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
-index 76235337d1cfed0f67181fc12b9512f4354a35d9..d1ac93acbea8145b540cb32c3506725a28ca45da 100644
+index 846e5176c314343df27ee8209fb0283f8ce920e9..1d7a93f67a7951890c2385ef1834ffe34d6cf598 100644
--- a/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
+++ b/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
@@ -46,17 +46,17 @@ NativeWebKeyboardEvent::NativeWebKeyboardEvent(GdkEvent* event, const String& te
}
NativeWebKeyboardEvent::NativeWebKeyboardEvent(const String& text, std::optional<Vector<WebCore::CompositionUnderline>>&& preeditUnderlines, std::optional<EditingRange>&& preeditSelectionRange)
-- : WebKeyboardEvent(WebEvent(WebEvent::KeyDown, { }, WallTime::now()), text, "Unidentified"_s, "Unidentified"_s, "U+0000"_s, 229, GDK_KEY_VoidSymbol, true, WTFMove(preeditUnderlines), WTFMove(preeditSelectionRange), { }, false)
-+ : WebKeyboardEvent(WebEvent(WebEvent::KeyDown, { }, WallTime::now()), text, "Unidentified"_s, "Unidentified"_s, "U+0000"_s, 229, GDK_KEY_VoidSymbol, true, WTFMove(preeditUnderlines), WTFMove(preeditSelectionRange), { }, false, false)
+- : WebKeyboardEvent(WebEvent(WebEventType::KeyDown, { }, WallTime::now()), text, "Unidentified"_s, "Unidentified"_s, "U+0000"_s, 229, GDK_KEY_VoidSymbol, true, WTFMove(preeditUnderlines), WTFMove(preeditSelectionRange), { }, false)
++ : WebKeyboardEvent(WebEvent(WebEventType::KeyDown, { }, WallTime::now()), text, "Unidentified"_s, "Unidentified"_s, "U+0000"_s, 229, GDK_KEY_VoidSymbol, true, WTFMove(preeditUnderlines), WTFMove(preeditSelectionRange), { }, false, false)
{
}
- NativeWebKeyboardEvent::NativeWebKeyboardEvent(Type type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, Vector<String>&& commands, bool isKeypad, OptionSet<WebEventModifier> modifiers)
+ NativeWebKeyboardEvent::NativeWebKeyboardEvent(WebEventType type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, Vector<String>&& commands, bool isKeypad, OptionSet<WebEventModifier> modifiers)
- : WebKeyboardEvent(WebEvent(type, modifiers, WallTime::now()), text, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, false, std::nullopt, std::nullopt, WTFMove(commands), isKeypad)
+ : WebKeyboardEvent(WebEvent(type, modifiers, WallTime::now()), text, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, false, std::nullopt, std::nullopt, WTFMove(commands), false, isKeypad)
{
@@ -10057,10 +10114,10 @@ index 76235337d1cfed0f67181fc12b9512f4354a35d9..d1ac93acbea8145b540cb32c3506725a
{
}
diff --git a/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp b/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
-index befca68ef35689c35e7ed10b531d5c6368e4be8b..8b3cd57facdc54ce1a200960e2ac03c63570ccc1 100644
+index 9a1c3f09c756ea368ac2d68e183a13e2eb47ead7..01c738376230f83376d80d6d225543a3914943dd 100644
--- a/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
+++ b/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
-@@ -61,7 +61,7 @@ NativeWebMouseEvent::NativeWebMouseEvent(Type type, WebMouseEventButton button,
+@@ -61,7 +61,7 @@ NativeWebMouseEvent::NativeWebMouseEvent(WebEventType type, WebMouseEventButton
}
NativeWebMouseEvent::NativeWebMouseEvent(const NativeWebMouseEvent& event)
@@ -10070,7 +10127,7 @@ index befca68ef35689c35e7ed10b531d5c6368e4be8b..8b3cd57facdc54ce1a200960e2ac03c6
{
}
diff --git a/Source/WebKit/Shared/gtk/WebEventFactory.cpp b/Source/WebKit/Shared/gtk/WebEventFactory.cpp
-index e0af267c5a3df701860e3f002f0465f08c11eadd..5ea446938fe06fe6768218ea8337b45c51a7aa06 100644
+index b460609625914ae604de00ca844a503bcdcbef91..196aed25218e33b33a5d6a857aa9f9a9dd96bff0 100644
--- a/Source/WebKit/Shared/gtk/WebEventFactory.cpp
+++ b/Source/WebKit/Shared/gtk/WebEventFactory.cpp
@@ -369,6 +369,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(const GdkEvent* event,
@@ -10325,7 +10382,7 @@ index 0000000000000000000000000000000000000000..789a0d7cf69704c8f665a9ed79348fbc
+
+} // namespace IPC
diff --git a/Source/WebKit/Shared/libwpe/WebEventFactory.cpp b/Source/WebKit/Shared/libwpe/WebEventFactory.cpp
-index 859d0146e27907f20ec2837471bb19904eef370d..baf3e486fd128f6fb137812610cc339351165cde 100644
+index 053cc52f28c6b39446a36c2d44f7b5479f5dfb10..8d3960002e245c1786fd4300de502a2f63599b38 100644
--- a/Source/WebKit/Shared/libwpe/WebEventFactory.cpp
+++ b/Source/WebKit/Shared/libwpe/WebEventFactory.cpp
@@ -125,6 +125,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(struct wpe_input_keyboa
@@ -10337,7 +10394,7 @@ index 859d0146e27907f20ec2837471bb19904eef370d..baf3e486fd128f6fb137812610cc3393
);
}
diff --git a/Source/WebKit/Shared/win/WebEventFactory.cpp b/Source/WebKit/Shared/win/WebEventFactory.cpp
-index c76a3daa5c453e9bf4272fc2ee539608e1191dd4..2115e51d10ac8b9728eecec3881319b717efef17 100644
+index bb3a9f57582b1d7ebe5829c379cc8b288415937d..ede3dbadb38578bdaecb9caad351b1573c7ac50e 100644
--- a/Source/WebKit/Shared/win/WebEventFactory.cpp
+++ b/Source/WebKit/Shared/win/WebEventFactory.cpp
@@ -474,7 +474,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message
@@ -10350,10 +10407,10 @@ index c76a3daa5c453e9bf4272fc2ee539608e1191dd4..2115e51d10ac8b9728eecec3881319b7
return WebTouchEvent();
}
diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt
-index b3695e32c1df32fc22d02c60a7742a25fd52510b..15c05d6d856c9a8fe1169eec689bc7af443f0966 100644
+index b885199fcee0ff8f3c25c47e0b4622466d2cf87c..09318deaed9d69970e36e20b38b436488ce05862 100644
--- a/Source/WebKit/Sources.txt
+++ b/Source/WebKit/Sources.txt
-@@ -382,11 +382,14 @@ Shared/XR/XRDeviceProxy.cpp
+@@ -378,11 +378,14 @@ Shared/XR/XRDeviceProxy.cpp
UIProcess/AuxiliaryProcessProxy.cpp
UIProcess/BackgroundProcessResponsivenessTimer.cpp
@@ -10368,7 +10425,7 @@ index b3695e32c1df32fc22d02c60a7742a25fd52510b..15c05d6d856c9a8fe1169eec689bc7af
UIProcess/LegacyGlobalSettings.cpp
UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp
UIProcess/MediaKeySystemPermissionRequestProxy.cpp
-@@ -397,6 +400,7 @@ UIProcess/ProcessAssertion.cpp
+@@ -393,6 +396,7 @@ UIProcess/ProcessAssertion.cpp
UIProcess/ProcessThrottler.cpp
UIProcess/ProvisionalFrameProxy.cpp
UIProcess/ProvisionalPageProxy.cpp
@@ -10376,7 +10433,7 @@ index b3695e32c1df32fc22d02c60a7742a25fd52510b..15c05d6d856c9a8fe1169eec689bc7af
UIProcess/ResponsivenessTimer.cpp
UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp
UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp
-@@ -439,6 +443,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp
+@@ -435,6 +439,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp
UIProcess/WebPageDiagnosticLoggingClient.cpp
UIProcess/WebPageGroup.cpp
UIProcess/WebPageInjectedBundleClient.cpp
@@ -10385,7 +10442,7 @@ index b3695e32c1df32fc22d02c60a7742a25fd52510b..15c05d6d856c9a8fe1169eec689bc7af
UIProcess/WebPageProxy.cpp
UIProcess/WebPasteboardProxy.cpp
UIProcess/WebPermissionControllerProxy.cpp
-@@ -570,7 +576,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp
+@@ -564,7 +570,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp
UIProcess/Inspector/WebPageDebuggable.cpp
UIProcess/Inspector/WebPageInspectorController.cpp
@@ -10398,7 +10455,7 @@ index b3695e32c1df32fc22d02c60a7742a25fd52510b..15c05d6d856c9a8fe1169eec689bc7af
UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp
UIProcess/Media/MediaUsageManager.cpp
diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt
-index dc490e625143251dd35ed85a96e2b1d214e2d7ce..fe00e00a174980dd3ecbf9676efd4593819a5f63 100644
+index 505f4acc70f1c1dbe53adf24b90cb34757483320..6cbcbb3d4620a007977e840cdffd0d2d9ba2ecab 100644
--- a/Source/WebKit/SourcesCocoa.txt
+++ b/Source/WebKit/SourcesCocoa.txt
@@ -259,6 +259,7 @@ UIProcess/API/Cocoa/_WKApplicationManifest.mm
@@ -10409,7 +10466,7 @@ index dc490e625143251dd35ed85a96e2b1d214e2d7ce..fe00e00a174980dd3ecbf9676efd4593
UIProcess/API/Cocoa/_WKContentRuleListAction.mm
UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm
UIProcess/API/Cocoa/_WKCustomHeaderFields.mm @no-unify
-@@ -435,6 +436,7 @@ UIProcess/Inspector/ios/WKInspectorHighlightView.mm
+@@ -436,6 +437,7 @@ UIProcess/Inspector/ios/WKInspectorHighlightView.mm
UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.mm
UIProcess/Inspector/mac/RemoteWebInspectorUIProxyMac.mm
@@ -10418,7 +10475,7 @@ index dc490e625143251dd35ed85a96e2b1d214e2d7ce..fe00e00a174980dd3ecbf9676efd4593
UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm
UIProcess/Inspector/mac/WKInspectorViewController.mm
diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt
-index 5875bd4bd78a83d6722d4058939e875d32e5e3dc..d002aa538ad32c2ba213ee85b7c51a5494c56225 100644
+index 040fb60692b6542f07845849e1b02f3f95d9c45f..182375712ad69f197baa2e6f6e862e4f5d500ef9 100644
--- a/Source/WebKit/SourcesGTK.txt
+++ b/Source/WebKit/SourcesGTK.txt
@@ -130,6 +130,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify
@@ -10437,7 +10494,7 @@ index 5875bd4bd78a83d6722d4058939e875d32e5e3dc..d002aa538ad32c2ba213ee85b7c51a54
UIProcess/glib/WebPageProxyGLib.cpp
UIProcess/glib/WebProcessPoolGLib.cpp
UIProcess/glib/WebProcessProxyGLib.cpp
-@@ -270,6 +272,7 @@ UIProcess/gtk/ClipboardGtk4.cpp @no-unify
+@@ -269,6 +271,7 @@ UIProcess/gtk/ClipboardGtk4.cpp @no-unify
UIProcess/gtk/WebDateTimePickerGtk.cpp
UIProcess/gtk/GtkSettingsManager.cpp
UIProcess/gtk/HardwareAccelerationManager.cpp
@@ -10445,7 +10502,7 @@ index 5875bd4bd78a83d6722d4058939e875d32e5e3dc..d002aa538ad32c2ba213ee85b7c51a54
UIProcess/gtk/KeyBindingTranslator.cpp
UIProcess/gtk/PointerLockManager.cpp @no-unify
UIProcess/gtk/PointerLockManagerWayland.cpp @no-unify
-@@ -281,6 +284,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cpp
+@@ -280,6 +283,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cpp
UIProcess/gtk/WebColorPickerGtk.cpp
UIProcess/gtk/WebContextMenuProxyGtk.cpp
UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp
@@ -10455,7 +10512,7 @@ index 5875bd4bd78a83d6722d4058939e875d32e5e3dc..d002aa538ad32c2ba213ee85b7c51a54
UIProcess/gtk/WebPasteboardProxyGtk.cpp
UIProcess/gtk/WebPopupMenuProxyGtk.cpp
diff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt
-index 90f517a3b2c7bfe33d88c9ec8a29dcf96275df41..f180343cbf85700e62db6b3836d81f9952f6882f 100644
+index f005ec751b0bea47036500f8275dbcb58e6e2959..a03179043aed122068dcd29fbe266cecb4beae44 100644
--- a/Source/WebKit/SourcesWPE.txt
+++ b/Source/WebKit/SourcesWPE.txt
@@ -88,6 +88,7 @@ Shared/glib/ProcessExecutablePathGLib.cpp
@@ -10466,7 +10523,7 @@ index 90f517a3b2c7bfe33d88c9ec8a29dcf96275df41..f180343cbf85700e62db6b3836d81f99
Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp
Shared/libwpe/NativeWebMouseEventLibWPE.cpp
Shared/libwpe/NativeWebTouchEventLibWPE.cpp
-@@ -123,6 +124,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify
+@@ -122,6 +123,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify
UIProcess/API/glib/WebKitAutomationSession.cpp @no-unify
UIProcess/API/glib/WebKitBackForwardList.cpp @no-unify
UIProcess/API/glib/WebKitBackForwardListItem.cpp @no-unify
@@ -10474,7 +10531,7 @@ index 90f517a3b2c7bfe33d88c9ec8a29dcf96275df41..f180343cbf85700e62db6b3836d81f99
UIProcess/API/glib/WebKitContextMenuClient.cpp @no-unify
UIProcess/API/glib/WebKitCookieManager.cpp @no-unify
UIProcess/API/glib/WebKitCredential.cpp @no-unify
-@@ -156,6 +158,7 @@ UIProcess/API/glib/WebKitOptionMenu.cpp @no-unify
+@@ -155,6 +157,7 @@ UIProcess/API/glib/WebKitOptionMenu.cpp @no-unify
UIProcess/API/glib/WebKitOptionMenuItem.cpp @no-unify
UIProcess/API/glib/WebKitPermissionRequest.cpp @no-unify
UIProcess/API/glib/WebKitPermissionStateQuery.cpp @no-unify
@@ -10482,9 +10539,9 @@ index 90f517a3b2c7bfe33d88c9ec8a29dcf96275df41..f180343cbf85700e62db6b3836d81f99
UIProcess/API/glib/WebKitPolicyDecision.cpp @no-unify
UIProcess/API/glib/WebKitPrivate.cpp @no-unify
UIProcess/API/glib/WebKitProtocolHandler.cpp @no-unify
-@@ -191,6 +194,7 @@ UIProcess/API/wpe/InputMethodFilterWPE.cpp @no-unify
+@@ -191,6 +194,7 @@ UIProcess/API/soup/HTTPCookieStoreSoup.cpp
+ UIProcess/API/wpe/InputMethodFilterWPE.cpp @no-unify
UIProcess/API/wpe/PageClientImpl.cpp @no-unify
- UIProcess/API/wpe/TouchGestureController.cpp @no-unify
UIProcess/API/wpe/WebKitColor.cpp @no-unify
+UIProcess/API/wpe/WebKitDataListSuggestionsDropdown.cpp @no-unify
UIProcess/API/wpe/WebKitInputMethodContextWPE.cpp @no-unify
@@ -10498,7 +10555,7 @@ index 90f517a3b2c7bfe33d88c9ec8a29dcf96275df41..f180343cbf85700e62db6b3836d81f99
UIProcess/glib/WebPageProxyGLib.cpp
UIProcess/glib/WebProcessPoolGLib.cpp
UIProcess/glib/WebProcessProxyGLib.cpp
-@@ -241,6 +246,11 @@ UIProcess/linux/MemoryPressureMonitor.cpp
+@@ -240,6 +245,11 @@ UIProcess/linux/MemoryPressureMonitor.cpp
UIProcess/soup/WebProcessPoolSoup.cpp
@@ -10510,7 +10567,7 @@ index 90f517a3b2c7bfe33d88c9ec8a29dcf96275df41..f180343cbf85700e62db6b3836d81f99
UIProcess/wpe/WebPageProxyWPE.cpp
WebProcess/GPU/graphics/gbm/RemoteGraphicsContextGLProxyGBM.cpp
-@@ -264,6 +274,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp
+@@ -263,6 +273,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp
WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
@@ -10708,6 +10765,39 @@ index 65d8ab73430840b02682ce879d1db18b9597d6b0..ea89752f4b90018ea1f008e0d89f9a2a
// Version 15.
WKPageDecidePolicyForSpeechRecognitionPermissionRequestCallback decidePolicyForSpeechRecognitionPermissionRequest;
+diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
+index 8c24aeeaa2f8bd9689e23497539bfa372da4985b..5956c040d95dcd94d183181e364a60287948d926 100644
+--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
++++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
+@@ -691,6 +691,16 @@ - (void)_setMediaCaptureRequiresSecureConnection:(BOOL)requiresSecureConnection
+ _preferences->setMediaCaptureRequiresSecureConnection(requiresSecureConnection);
+ }
+
++- (BOOL)_alternateWebMPlayerEnabled
++{
++ return _preferences->alternateWebMPlayerEnabled();
++}
++
++- (void)_setAlternateWebMPlayerEnabled:(BOOL)enabled
++{
++ _preferences->setAlternateWebMPlayerEnabled(enabled);
++}
++
+ - (double)_inactiveMediaCaptureSteamRepromptIntervalInMinutes
+ {
+ return _preferences->inactiveMediaCaptureSteamRepromptIntervalInMinutes();
+diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
+index f12bc05f2eb46f1fe806b1205075a95f7352d689..0ad87ef2963b803869a3fd31f38ee13faeb2dab6 100644
+--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
++++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
+@@ -122,6 +122,7 @@ typedef NS_ENUM(NSInteger, _WKPitchCorrectionAlgorithm) {
+ @property (nonatomic, setter=_setMockCaptureDevicesEnabled:) BOOL _mockCaptureDevicesEnabled WK_API_AVAILABLE(macos(10.13), ios(11.0));
+ @property (nonatomic, setter=_setMockCaptureDevicesPromptEnabled:) BOOL _mockCaptureDevicesPromptEnabled WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
+ @property (nonatomic, setter=_setMediaCaptureRequiresSecureConnection:) BOOL _mediaCaptureRequiresSecureConnection WK_API_AVAILABLE(macos(10.13), ios(11.0));
++@property (nonatomic, setter=_setAlternateWebMPlayerEnabled:) BOOL _alternateWebMPlayerEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
+ @property (nonatomic, setter=_setEnumeratingAllNetworkInterfacesEnabled:) BOOL _enumeratingAllNetworkInterfacesEnabled WK_API_AVAILABLE(macos(10.13), ios(11.0));
+ @property (nonatomic, setter=_setICECandidateFilteringEnabled:) BOOL _iceCandidateFilteringEnabled WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
+ @property (nonatomic, setter=_setWebRTCLegacyAPIEnabled:) BOOL _webRTCLegacyAPIEnabled WK_API_AVAILABLE(macos(10.13), ios(11.0));
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h
index a3c0e6e941ce99bf094362e094d83fe6480568a2..d38b26f79f12a89fa8e14dcaecef64505f2431d8 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h
@@ -10747,7 +10837,7 @@ index afa925f36c29db9c23921298dead9cce737500d6..42d396342acdb6d39830f611df0ee40e
NS_ASSUME_NONNULL_END
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
-index f3291da194b52d5f8eabdd81eb8096820bdac133..edc886b52d798ef57b6cd32d9d4171b4b99b7d40 100644
+index a578dba043d47592a7ff7a959a267558dd264b38..3384a4fad6b686d138a28abb15d87be07c79986e 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
@@ -48,6 +48,7 @@
@@ -10921,6 +11011,31 @@ index b1c6e033c8a86353f96161482d92c227d7946201..64e592705c97d2d78668aa532f271ddf
#import "WKObject.h"
#import <wtf/RetainPtr.h>
+diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm
+index 26db4814884a690853300bd3b94352f8a03a66e3..5e207208c78060e4a7bcb2f8a78d2d233e6f8d0a 100644
+--- a/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm
++++ b/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm
+@@ -37,6 +37,7 @@
+ #import "_WKInspectorPrivateForTesting.h"
+ #import "_WKRemoteObjectRegistry.h"
+ #import <WebCore/FrameIdentifier.h>
++#import <WebCore/WebCoreObjCExtras.h>
+ #import <wtf/RetainPtr.h>
+ #import <wtf/text/WTFString.h>
+
+diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h b/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h
+index 86bfda0abb73f3857b70ef0d2d9eb9beb97af82c..c94ba0a3944da003f813a501a2127bdf3477295f 100644
+--- a/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h
++++ b/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h
+@@ -28,6 +28,8 @@
+ #import "WKObject.h"
+ #import "WebInspectorUIProxy.h"
+
++#import <wtf/WeakObjCPtr.h>
++
+ namespace WebKit {
+
+ template<> struct WrapperTraits<WebInspectorUIProxy> {
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h
index a8119337eead3c07fb7cceab832ba9ad51f7a9b1..ea4c7ad8234e0ee237b49fdc268dca70c11448ac 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h
@@ -10955,7 +11070,7 @@ index 65589f14fc1bf38f97cf244fc0812c0d8e513aa1..496d4b5ac7d840678a6d5b73df54ee69
{
_processPoolConfiguration->setIsAutomaticProcessWarmingEnabled(prewarms);
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm
-index 0907a865f5fbffcf5003f10de84584df32c6c251..c1340569e9023aa867f379cbeafea7752e178188 100644
+index 96d3ce10e76c3d24a452d6d22c7c7dc5bc141958..38ef5226464059584db57f8497eb7a4f470ccea2 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm
@@ -24,6 +24,7 @@
@@ -11193,10 +11308,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 cae90b5bb5200e0163e18a0e8a78438ddd109d40..6c5c414b0e6aa916769fd6f965eb7accb5b8411f 100644
+index 81f7f11584960e18a053964303128efb0e5032f3..6dd253a561cb8c56e874a1283e00ffe37bc6a9c6 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
-@@ -99,6 +99,10 @@ private:
+@@ -92,6 +92,10 @@ private:
page.makeViewBlankIfUnpaintedSinceLastLoadCommit();
webkitWebViewRunJavaScriptPrompt(m_webView, message.utf8(), defaultValue.utf8(), WTFMove(completionHandler));
}
@@ -11208,10 +11323,10 @@ index cae90b5bb5200e0163e18a0e8a78438ddd109d40..6c5c414b0e6aa916769fd6f965eb7acc
bool canRunBeforeUnloadConfirmPanel() const final { return true; }
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
-index 7f74f05a63e36c327b83fca0e5057505ee1fc0a5..6a41546c748210311e7c579c003cd817ac16338d 100644
+index abfbacf1238124bf9ec26f67bc63936bc282ffab..2baf33f17b7beb669c5683bd3e0ffbef98d3c27f 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
-@@ -397,10 +397,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa
+@@ -413,10 +413,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa
}
}
@@ -11231,7 +11346,7 @@ index 7f74f05a63e36c327b83fca0e5057505ee1fc0a5..6a41546c748210311e7c579c003cd817
GUniquePtr<char> bundleFilename(g_build_filename(injectedBundleDirectory(), INJECTED_BUNDLE_FILENAME, nullptr));
WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(object);
-@@ -453,6 +462,8 @@ static void webkitWebContextConstructed(GObject* object)
+@@ -473,6 +482,8 @@ static void webkitWebContextConstructed(GObject* object)
static void webkitWebContextDispose(GObject* object)
{
@@ -11241,16 +11356,16 @@ index 7f74f05a63e36c327b83fca0e5057505ee1fc0a5..6a41546c748210311e7c579c003cd817
if (!priv->clientsDetached) {
priv->clientsDetached = true;
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h
-index 78d1578f94793e9e59a3d4d2b33e79ea8530fa04..493cdadac3873508b3efa3048638e73a13f4c976 100644
+index f6c2d8c4dc4bf5721f15ba375fec3a7222156ccd..4ce2c5c139a47a4f3ae2d858764bdf9c5011c9ea 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h
-@@ -45,3 +45,4 @@ void webkitWebContextInitializeNotificationPermissions(WebKitWebContext*);
+@@ -43,3 +43,4 @@ void webkitWebContextInitializeNotificationPermissions(WebKitWebContext*);
#if ENABLE(REMOTE_INSPECTOR)
void webkitWebContextWillCloseAutomationSession(WebKitWebContext*);
#endif
+int webkitWebContextExistingCount();
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
-index cab85238ae6c63a19341471f7067de27799818c4..d30ecb6907d6f395fe660eec7d6891d38ed1d035 100644
+index b8c57b8cbf324a9130c29ea817fcedb93e49e75a..80a341913152c0e07bf6e6aa619d992d6b39fa5a 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
@@ -32,6 +32,7 @@
@@ -11261,7 +11376,7 @@ index cab85238ae6c63a19341471f7067de27799818c4..d30ecb6907d6f395fe660eec7d6891d3
#include "WebKitAuthenticationRequestPrivate.h"
#include "WebKitBackForwardListPrivate.h"
#include "WebKitContextMenuClient.h"
-@@ -52,6 +53,7 @@
+@@ -50,6 +51,7 @@
#include "WebKitNavigationClient.h"
#include "WebKitNotificationPrivate.h"
#include "WebKitPermissionStateQueryPrivate.h"
@@ -11269,15 +11384,15 @@ index cab85238ae6c63a19341471f7067de27799818c4..d30ecb6907d6f395fe660eec7d6891d3
#include "WebKitPrivate.h"
#include "WebKitResponsePolicyDecision.h"
#include "WebKitScriptDialogPrivate.h"
-@@ -88,7 +90,6 @@
-
+@@ -87,7 +89,6 @@
#if PLATFORM(GTK)
+ #include "WebKitFaviconDatabasePrivate.h"
#include "WebKitInputMethodContextImplGtk.h"
-#include "WebKitPointerLockPermissionRequest.h"
#include "WebKitPrintOperationPrivate.h"
#include "WebKitWebInspectorPrivate.h"
#include "WebKitWebViewBasePrivate.h"
-@@ -132,6 +133,7 @@ enum {
+@@ -135,6 +136,7 @@ enum {
CLOSE,
SCRIPT_DIALOG,
@@ -11285,7 +11400,7 @@ index cab85238ae6c63a19341471f7067de27799818c4..d30ecb6907d6f395fe660eec7d6891d3
DECIDE_POLICY,
PERMISSION_REQUEST,
-@@ -467,6 +469,9 @@ void WebKitWebViewClient::handleDownloadRequest(WKWPE::View&, DownloadProxy& dow
+@@ -478,6 +480,9 @@ GRefPtr<WebKitOptionMenu> WebKitWebViewClient::showOptionMenu(WebKitPopupMenu& p
void WebKitWebViewClient::frameDisplayed(WKWPE::View&)
{
@@ -11295,7 +11410,7 @@ index cab85238ae6c63a19341471f7067de27799818c4..d30ecb6907d6f395fe660eec7d6891d3
{
SetForScope inFrameDisplayedGuard(m_webView->priv->inFrameDisplayed, true);
for (const auto& callback : m_webView->priv->frameDisplayedCallbacks) {
-@@ -555,7 +560,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*
+@@ -568,7 +573,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*
static gboolean webkitWebViewPermissionRequest(WebKitWebView*, WebKitPermissionRequest* request)
{
@@ -11304,7 +11419,7 @@ index cab85238ae6c63a19341471f7067de27799818c4..d30ecb6907d6f395fe660eec7d6891d3
if (WEBKIT_IS_POINTER_LOCK_PERMISSION_REQUEST(request)) {
webkit_permission_request_allow(request);
return TRUE;
-@@ -1734,6 +1739,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
+@@ -1787,6 +1792,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_TYPE_BOOLEAN, 1,
WEBKIT_TYPE_SCRIPT_DIALOG);
@@ -11320,7 +11435,7 @@ index cab85238ae6c63a19341471f7067de27799818c4..d30ecb6907d6f395fe660eec7d6891d3
/**
* WebKitWebView::decide-policy:
* @web_view: the #WebKitWebView on which the signal is emitted
-@@ -2518,6 +2532,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const
+@@ -2585,6 +2599,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const
webkit_script_dialog_unref(webView->priv->currentScriptDialog);
}
@@ -11345,10 +11460,10 @@ index cab85238ae6c63a19341471f7067de27799818c4..d30ecb6907d6f395fe660eec7d6891d3
{
if (!webView->priv->currentScriptDialog)
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
-index 779db233a166830a8125bc86c29a106191e30ae0..aaa57b056052c646064770d7df3ebbf18810ab38 100644
+index b9430167f605a38f31e38679118220d372a33d6a..8462bbdea5cf4047ec027aa47ed6f09dfec829a6 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
-@@ -65,6 +65,7 @@ void webkitWebViewRunJavaScriptAlert(WebKitWebView*, const CString& message, Fun
+@@ -64,6 +64,7 @@ void webkitWebViewRunJavaScriptAlert(WebKitWebView*, const CString& message, Fun
void 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);
@@ -11357,7 +11472,7 @@ index 779db233a166830a8125bc86c29a106191e30ae0..aaa57b056052c646064770d7df3ebbf1
bool webkitWebViewIsScriptDialogRunning(WebKitWebView*, WebKitScriptDialog*);
String webkitWebViewGetCurrentScriptDialogMessage(WebKitWebView*);
diff --git a/Source/WebKit/UIProcess/API/glib/webkit.h.in b/Source/WebKit/UIProcess/API/glib/webkit.h.in
-index 47b65bc7f0d113db6498bb1fa2d08760b8d3ad5d..4f5b7b1c3ef4708b13647f852e07a10b629de480 100644
+index 639f083ce1882a34e6b8ac320739b365d0dcf8c7..dfd34e79d2a45e0f36383b99016f941aac5eed7d 100644
--- a/Source/WebKit/UIProcess/API/glib/webkit.h.in
+++ b/Source/WebKit/UIProcess/API/glib/webkit.h.in
@@ -41,6 +41,7 @@
@@ -11369,12 +11484,12 @@ index 47b65bc7f0d113db6498bb1fa2d08760b8d3ad5d..4f5b7b1c3ef4708b13647f852e07a10b
#include <@API_INCLUDE_PREFIX@/WebKitColorChooserRequest.h>
#endif
diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
-index 87fe51400dc9fbcc37e7951def32a54d884505ff..7dba0d103ce5ae5dfd9006a1397f6e638bc50e6f 100644
+index 52e60b0319cb5cfaa453ca216ede56d667635995..ba71ffa7d9695783d27e2287e23c5eed826117cf 100644
--- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
@@ -252,6 +252,8 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool
{
- if (wasEventHandled || event.type() != WebEvent::Type::KeyDown || !event.nativeEvent())
+ if (wasEventHandled || event.type() != WebEventType::KeyDown || !event.nativeEvent())
return;
+ if (!event.nativeEvent())
+ return;
@@ -11469,10 +11584,10 @@ index 0000000000000000000000000000000000000000..45221096280941d747ef3f46749b1466
+
+#endif
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
-index 54e903da1471856ac2ab9fd322a27b08b28beb40..025948e30ef15234ebe2331a883d03d81948db7a 100644
+index 3ecc21f37b5cb34592e4bb34b216522d14b58a56..5a98b47dce21b706f183cd6d40bd0374054dcc89 100644
--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
-@@ -2611,6 +2611,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
+@@ -2673,6 +2673,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
#endif
}
@@ -11485,7 +11600,7 @@ index 54e903da1471856ac2ab9fd322a27b08b28beb40..025948e30ef15234ebe2331a883d03d8
{
ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
-index af927f35b3a28089788ec28531e7cd75db348af6..d2db5e32b70099f0fd991460ada54a52b6c4a2b6 100644
+index 1204b4342c1cf8d38d215c1c8628bd7eb1fbd415..8534e582f54a343dc3bf6e01b8e43270adda74f2 100644
--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
@@ -27,6 +27,7 @@
@@ -11502,120 +11617,8 @@ index af927f35b3a28089788ec28531e7cd75db348af6..d2db5e32b70099f0fd991460ada54a52
void webkitWebViewBaseSetShouldNotifyFocusEvents(WebKitWebViewBase*, bool);
+
+WebKit::AcceleratedBackingStore* webkitWebViewBaseGetAcceleratedBackingStore(WebKitWebViewBase*);
-diff --git a/Source/WebKit/UIProcess/API/gtk/webkit2.h b/Source/WebKit/UIProcess/API/gtk/webkit2.h
-new file mode 100644
-index 0000000000000000000000000000000000000000..3e2da08331ac7cf493ef7885f6f5209b2dbc097b
---- /dev/null
-+++ b/Source/WebKit/UIProcess/API/gtk/webkit2.h
-@@ -0,0 +1,106 @@
-+/*
-+ * Copyright (C) 2011 Igalia S.L.
-+ * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved.
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public License
-+ * along with this library; see the file COPYING.LIB. If not, write to
-+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifdef __WEBKIT_WEB_EXTENSION_H__
-+#error "Headers <webkit2/webkit2.h> and <webkit2/webkit-web-extension.h> cannot be included together."
-+#endif
-+
-+#ifndef __WEBKIT_2_H__
-+#define __WEBKIT_2_H__
-+
-+#define __WEBKIT2_H_INSIDE__
-+
-+#include <webkit/WebKitApplicationInfo.h>
-+#include <webkit/WebKitAuthenticationRequest.h>
-+#include <webkit/WebKitAutomationSession.h>
-+#include <webkit/WebKitBackForwardList.h>
-+#include <webkit/WebKitBackForwardListItem.h>
-+#include <webkit/WebKitBrowserInspector.h>
-+#include <webkit/WebKitColorChooserRequest.h>
-+#include <webkit/WebKitContextMenu.h>
-+#include <webkit/WebKitContextMenuActions.h>
-+#include <webkit/WebKitContextMenuItem.h>
-+#include <webkit/WebKitCookieManager.h>
-+#include <webkit/WebKitCredential.h>
-+#include <webkit/WebKitDefines.h>
-+#include <webkit/WebKitDeviceInfoPermissionRequest.h>
-+#include <webkit/WebKitDownload.h>
-+#include <webkit/WebKitEditingCommands.h>
-+#include <webkit/WebKitEditorState.h>
-+#include <webkit/WebKitEnumTypes.h>
-+#include <webkit/WebKitError.h>
-+#include <webkit/WebKitFaviconDatabase.h>
-+#include <webkit/WebKitFileChooserRequest.h>
-+#include <webkit/WebKitFindController.h>
-+#include <webkit/WebKitFormSubmissionRequest.h>
-+#include <webkit/WebKitGeolocationManager.h>
-+#include <webkit/WebKitGeolocationPermissionRequest.h>
-+#include <webkit/WebKitHitTestResult.h>
-+#include <webkit/WebKitInputMethodContext.h>
-+#include <webkit/WebKitInstallMissingMediaPluginsPermissionRequest.h>
-+#include <webkit/WebKitJavascriptResult.h>
-+#include <webkit/WebKitMediaKeySystemPermissionRequest.h>
-+#include <webkit/WebKitMemoryPressureSettings.h>
-+#include <webkit/WebKitMimeInfo.h>
-+#include <webkit/WebKitNavigationAction.h>
-+#include <webkit/WebKitNavigationPolicyDecision.h>
-+#include <webkit/WebKitNetworkProxySettings.h>
-+#include <webkit/WebKitNotification.h>
-+#include <webkit/WebKitNotificationPermissionRequest.h>
-+#include <webkit/WebKitOptionMenu.h>
-+#include <webkit/WebKitOptionMenuItem.h>
-+#include <webkit/WebKitPermissionRequest.h>
-+#include <webkit/WebKitPermissionStateQuery.h>
-+#include <webkit/WebKitPlugin.h>
-+#include <webkit/WebKitPointerLockPermissionRequest.h>
-+#include <webkit/WebKitPrintCustomWidget.h>
-+#include <webkit/WebKitPrintOperation.h>
-+#include <webkit/WebKitResponsePolicyDecision.h>
-+#include <webkit/WebKitScriptDialog.h>
-+#include <webkit/WebKitSecurityManager.h>
-+#include <webkit/WebKitSecurityOrigin.h>
-+#include <webkit/WebKitSettings.h>
-+#include <webkit/WebKitURIRequest.h>
-+#include <webkit/WebKitURIResponse.h>
-+#include <webkit/WebKitURISchemeRequest.h>
-+#include <webkit/WebKitURISchemeResponse.h>
-+#include <webkit/WebKitURIUtilities.h>
-+#include <webkit/WebKitUserContent.h>
-+#include <webkit/WebKitUserContentFilterStore.h>
-+#include <webkit/WebKitUserContentManager.h>
-+#include <webkit/WebKitUserMediaPermissionRequest.h>
-+#include <webkit/WebKitUserMessage.h>
-+#include <webkit/WebKitVersion.h>
-+#include <webkit/WebKitWebContext.h>
-+#include <webkit/WebKitWebInspector.h>
-+#include <webkit/WebKitWebResource.h>
-+#include <webkit/WebKitWebView.h>
-+#include <webkit/WebKitWebViewBase.h>
-+#include <webkit/WebKitWebViewSessionState.h>
-+#include <webkit/WebKitWebsiteData.h>
-+#include <webkit/WebKitWebsiteDataAccessPermissionRequest.h>
-+#include <webkit/WebKitWebsiteDataManager.h>
-+#include <webkit/WebKitWindowProperties.h>
-+
-+#include <webkit/WebKitAutocleanups.h>
-+
-+#undef __WEBKIT2_H_INSIDE__
-+
-+#endif /* __WEBKIT2_H__ */
diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
-index 9fba86a2feee0a7f056ec65b9ffeeb48c0694def..4c1e54e79d868721a0af651984a5ddd28d153bfe 100644
+index 274e458e6c406826c3f06b1b53b78eecf7b60e85..c0848de352ce3bf14143c75c23e0ea0033057f28 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
@@ -32,8 +32,11 @@
@@ -11630,7 +11633,7 @@ index 9fba86a2feee0a7f056ec65b9ffeeb48c0694def..4c1e54e79d868721a0af651984a5ddd2
#include "WebKitPopupMenu.h"
#include <WebCore/ActivityState.h>
#include <WebCore/DOMPasteAccess.h>
-@@ -194,7 +197,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I
+@@ -189,7 +192,7 @@ WebCore::IntPoint PageClientImpl::accessibilityScreenToRootView(const WebCore::I
WebCore::IntRect PageClientImpl::rootViewToAccessibilityScreen(const WebCore::IntRect& rect)
{
@@ -11639,7 +11642,7 @@ index 9fba86a2feee0a7f056ec65b9ffeeb48c0694def..4c1e54e79d868721a0af651984a5ddd2
}
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&, bool)
-@@ -452,4 +455,23 @@ WebKitWebResourceLoadManager* PageClientImpl::webResourceLoadManager()
+@@ -440,4 +443,23 @@ WebKitWebResourceLoadManager* PageClientImpl::webResourceLoadManager()
return m_view.webResourceLoadManager();
}
@@ -11664,10 +11667,10 @@ index 9fba86a2feee0a7f056ec65b9ffeeb48c0694def..4c1e54e79d868721a0af651984a5ddd2
+
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
-index 8f246bc2e73b5720863e250ee1217ddcb64117fe..0801d5f5b3dc85765c42c48474c63e8835553789 100644
+index 948d0f4a4759afa1533cd84a190f3d56e54a5cb5..fc43ce6cc53636b5e6f9b5af9d6609b636d57da8 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
-@@ -169,6 +169,17 @@ private:
+@@ -164,6 +164,17 @@ private:
WebKitWebResourceLoadManager* webResourceLoadManager() override;
@@ -11686,10 +11689,10 @@ index 8f246bc2e73b5720863e250ee1217ddcb64117fe..0801d5f5b3dc85765c42c48474c63e88
};
diff --git a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
-index 85a6030f5756ba77d23b2dc68a62f6c6318fc740..1e239323f9e86772b079de4e2a7f91d500244f68 100644
+index 305dc1f16559c12efafee27f0f446041f71124c0..dfbfa808077045f93e8f668afda001564d50b3e8 100644
--- a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
+++ b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
-@@ -74,7 +74,9 @@ View::View(struct wpe_view_backend* backend, const API::PageConfiguration& baseC
+@@ -76,7 +76,9 @@ View::View(struct wpe_view_backend* backend, const API::PageConfiguration& baseC
if (preferences) {
preferences->setAcceleratedCompositingEnabled(true);
preferences->setForceCompositingMode(true);
@@ -12049,114 +12052,8 @@ index e4b92ace1531090ae38a7aec3d3d4febf19aee84..43690f9ef4969a39084501613bfc00a7
void webkitWebViewBackendUnref(WebKitWebViewBackend*);
+
+cairo_surface_t* webkitWebViewBackendTakeScreenshot(WebKitWebViewBackend*);
-diff --git a/Source/WebKit/UIProcess/API/wpe/webkit.h b/Source/WebKit/UIProcess/API/wpe/webkit.h
-new file mode 100644
-index 0000000000000000000000000000000000000000..efd4bdbfdb02f289971cbad22834383c5fbd4227
---- /dev/null
-+++ b/Source/WebKit/UIProcess/API/wpe/webkit.h
-@@ -0,0 +1,100 @@
-+/*
-+ * Copyright (C) 2011 Igalia S.L.
-+ * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved.
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public License
-+ * along with this library; see the file COPYING.LIB. If not, write to
-+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifdef __WEBKIT_WEB_EXTENSION_H__
-+#error "Headers <wpe/webkit.h> and <wpe/webkit-web-extension.h> cannot be included together."
-+#endif
-+
-+#ifndef __WEBKIT_H__
-+#define __WEBKIT_H__
-+
-+#define __WEBKIT_H_INSIDE__
-+
-+#include <wpe/WebKitApplicationInfo.h>
-+#include <wpe/WebKitAuthenticationRequest.h>
-+#include <wpe/WebKitAutomationSession.h>
-+#include <wpe/WebKitBackForwardList.h>
-+#include <wpe/WebKitBackForwardListItem.h>
-+#include <wpe/WebKitBrowserInspector.h>
-+#include <wpe/WebKitContextMenu.h>
-+#include <wpe/WebKitContextMenuActions.h>
-+#include <wpe/WebKitContextMenuItem.h>
-+#include <wpe/WebKitCookieManager.h>
-+#include <wpe/WebKitCredential.h>
-+#include <wpe/WebKitDefines.h>
-+#include <wpe/WebKitDeviceInfoPermissionRequest.h>
-+#include <wpe/WebKitDownload.h>
-+#include <wpe/WebKitEditingCommands.h>
-+#include <wpe/WebKitEditorState.h>
-+#include <wpe/WebKitEnumTypes.h>
-+#include <wpe/WebKitError.h>
-+#include <wpe/WebKitFaviconDatabase.h>
-+#include <wpe/WebKitFindController.h>
-+#include <wpe/WebKitFormSubmissionRequest.h>
-+#include <wpe/WebKitGeolocationManager.h>
-+#include <wpe/WebKitGeolocationPermissionRequest.h>
-+#include <wpe/WebKitHitTestResult.h>
-+#include <wpe/WebKitInputMethodContext.h>
-+#include <wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h>
-+#include <wpe/WebKitJavascriptResult.h>
-+#include <wpe/WebKitMediaKeySystemPermissionRequest.h>
-+#include <wpe/WebKitMemoryPressureSettings.h>
-+#include <wpe/WebKitMimeInfo.h>
-+#include <wpe/WebKitNavigationAction.h>
-+#include <wpe/WebKitNavigationPolicyDecision.h>
-+#include <wpe/WebKitNetworkProxySettings.h>
-+#include <wpe/WebKitNotification.h>
-+#include <wpe/WebKitNotificationPermissionRequest.h>
-+#include <wpe/WebKitOptionMenu.h>
-+#include <wpe/WebKitOptionMenuItem.h>
-+#include <wpe/WebKitPermissionRequest.h>
-+#include <wpe/WebKitPermissionStateQuery.h>
-+#include <wpe/WebKitPlugin.h>
-+#include <wpe/WebKitResponsePolicyDecision.h>
-+#include <wpe/WebKitScriptDialog.h>
-+#include <wpe/WebKitSecurityManager.h>
-+#include <wpe/WebKitSecurityOrigin.h>
-+#include <wpe/WebKitSettings.h>
-+#include <wpe/WebKitURIRequest.h>
-+#include <wpe/WebKitURIResponse.h>
-+#include <wpe/WebKitURISchemeRequest.h>
-+#include <wpe/WebKitURISchemeResponse.h>
-+#include <wpe/WebKitURIUtilities.h>
-+#include <wpe/WebKitUserContent.h>
-+#include <wpe/WebKitUserContentFilterStore.h>
-+#include <wpe/WebKitUserContentManager.h>
-+#include <wpe/WebKitUserMediaPermissionRequest.h>
-+#include <wpe/WebKitUserMessage.h>
-+#include <wpe/WebKitVersion.h>
-+#include <wpe/WebKitWebContext.h>
-+#include <wpe/WebKitWebResource.h>
-+#include <wpe/WebKitWebView.h>
-+#include <wpe/WebKitWebViewBackend.h>
-+#include <wpe/WebKitWebViewSessionState.h>
-+#include <wpe/WebKitWebsiteData.h>
-+#include <wpe/WebKitWebsiteDataAccessPermissionRequest.h>
-+#include <wpe/WebKitWebsiteDataManager.h>
-+#include <wpe/WebKitWindowProperties.h>
-+
-+#include <wpe/WebKitAutocleanups.h>
-+
-+#undef __WEBKIT_H_INSIDE__
-+
-+#endif /* __WEBKIT_H__ */
diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
-index 08b47fcb75fb56c0645bd982406209733159955a..6e4d493529fb3c018496d5cdcef9c576126459f5 100644
+index 5345d40ef57869f7a84b6059dc28e146a52b4abe..6e03323b1a13328fcc7df1fc1a5b533649bbb334 100644
--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
@@ -123,7 +123,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau
@@ -12385,10 +12282,10 @@ index bb0c358d3e3fc7f889fbb1e21a77d2f9f28d23ca..f061eec78d3f24e195115dd951ef3901
bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRequestGeolocationPermissionForFrameDecisionHandler : 1;
diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
-index eb20c8b93cee65f29350bf3739107ca7356d5675..0290ee35bd8e10aca0becd0f561fc8ad1e2c331c 100644
+index f588e06d07cc6c4346ba7bceda3588650fb1afae..03aedc9ea507d23ffa3c014572788d4f75de7b4a 100644
--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
-@@ -111,6 +111,7 @@ void UIDelegate::setDelegate(id <WKUIDelegate> delegate)
+@@ -112,6 +112,7 @@ void UIDelegate::setDelegate(id <WKUIDelegate> delegate)
m_delegateMethods.webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)];
@@ -12413,18 +12310,18 @@ index eb20c8b93cee65f29350bf3739107ca7356d5675..0290ee35bd8e10aca0becd0f561fc8ad
{
if (!m_uiDelegate)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
-index ba6f6193b28cab536901605ed870eef09469e6c1..5914147fdf5c7cc2f1a201ce2206f2f41c040c61 100644
+index 51d7f68a1ea6626b5b17bafa458d5f220b6da268..e476ef13742e0442e2578d148e46cbd2fbe206c2 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
-@@ -37,6 +37,7 @@
- #import "LoadParameters.h"
+@@ -38,6 +38,7 @@
#import "ModalContainerControlClassifier.h"
+ #import "NetworkConnectionIntegrityHelpers.h"
#import "PageClient.h"
+#import "PasteboardTypes.h"
#import "PlaybackSessionManagerProxy.h"
#import "QuickLookThumbnailLoader.h"
- #import "SafeBrowsingSPI.h"
-@@ -255,9 +256,66 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
+ #import "RemoteLayerTreeTransaction.h"
+@@ -292,9 +293,66 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
void WebPageProxy::startDrag(const DragItem& dragItem, const ShareableBitmapHandle& dragImageHandle)
{
@@ -12492,10 +12389,10 @@ index ba6f6193b28cab536901605ed870eef09469e6c1..5914147fdf5c7cc2f1a201ce2206f2f4
#if PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-index 4b3765de1e256b427f2bf94540482e7ce745f07e..ad0ae2a974feec0a9f911e94a1503c33e47c7859 100644
+index a70f5b60cab18c9321258cbd2a31554381a29f22..1870c0308be27a772c946d47113121337ec594f7 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-@@ -472,7 +472,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
+@@ -474,7 +474,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
auto screenProperties = WebCore::collectScreenProperties();
parameters.screenProperties = WTFMove(screenProperties);
#if PLATFORM(MAC)
@@ -12504,7 +12401,7 @@ index 4b3765de1e256b427f2bf94540482e7ce745f07e..ad0ae2a974feec0a9f911e94a1503c33
#endif
#if PLATFORM(IOS) && HAVE(AGX_COMPILER_SERVICE)
-@@ -746,8 +746,8 @@ void WebProcessPool::registerNotificationObservers()
+@@ -748,8 +748,8 @@ void WebProcessPool::registerNotificationObservers()
}];
m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
@@ -12516,7 +12413,7 @@ index 4b3765de1e256b427f2bf94540482e7ce745f07e..ad0ae2a974feec0a9f911e94a1503c33
m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidBecomeActiveNotification object:NSApp queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
-index c69c58dd6a4168174750c13629c5a68b4f94d2c4..69d9fcf2586243a519e28b1f447cef596a70d503 100644
+index cbdce63844f57918f43c5c1d71dd49bb9918ff5b..829b63cfe3b07f5cd63a77b894d882060b80c7d1 100644
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
@@ -32,13 +32,16 @@
@@ -12574,7 +12471,7 @@ index c69c58dd6a4168174750c13629c5a68b4f94d2c4..69d9fcf2586243a519e28b1f447cef59
{
m_hasReceivedFirstUpdate = true;
@@ -244,6 +263,45 @@ void DrawingAreaProxyCoordinatedGraphics::targetRefreshRateDidChange(unsigned ra
- send(Messages::DrawingArea::TargetRefreshRateDidChange(rate));
+ m_webPageProxy.send(Messages::DrawingArea::TargetRefreshRateDidChange(rate), m_identifier);
}
+#if PLATFORM(WIN)
@@ -12620,7 +12517,7 @@ index c69c58dd6a4168174750c13629c5a68b4f94d2c4..69d9fcf2586243a519e28b1f447cef59
void DrawingAreaProxyCoordinatedGraphics::incorporateUpdate(const UpdateInfo& updateInfo)
{
diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
-index 5c716fb054b4b082c4a87f42a866bf8087b3ca89..e03bd58188562826e33089f5e02ed842a1d00b3b 100644
+index e037e7dff6c877a676292a0b38cf9b54881ef1b9..9d8257825c71687659952249b4558ce7bb0e618e 100644
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
@@ -30,6 +30,7 @@
@@ -12652,7 +12549,7 @@ index 5c716fb054b4b082c4a87f42a866bf8087b3ca89..e03bd58188562826e33089f5e02ed842
bool shouldSendWheelEventsToEventDispatcher() const override { return true; }
-@@ -134,12 +142,18 @@ private:
+@@ -135,12 +143,18 @@ private:
// For a new Drawing Area don't draw anything until the WebProcess has sent over the first content.
bool m_hasReceivedFirstUpdate { false };
@@ -12672,10 +12569,10 @@ index 5c716fb054b4b082c4a87f42a866bf8087b3ca89..e03bd58188562826e33089f5e02ed842
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
-index 447320824dcb6f91eedc15f469f5fc57ce68703f..7f8b2a0ee2c5985e86ef888c6ebc709ec8fc2647 100644
+index c92e9cc718afaab95d306c28ece0848dfc6e7155..8672527119c01b6f54e0fdf23fc95387d6f12231 100644
--- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
+++ b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
-@@ -42,8 +42,10 @@
+@@ -41,8 +41,10 @@
#include <WebCore/MIMETypeRegistry.h>
#include <WebCore/ResourceResponseBase.h>
#include <wtf/FileSystem.h>
@@ -12686,7 +12583,7 @@ index 447320824dcb6f91eedc15f469f5fc57ce68703f..7f8b2a0ee2c5985e86ef888c6ebc709e
#if PLATFORM(MAC)
#include <pal/spi/mac/QuarantineSPI.h>
-@@ -60,7 +62,10 @@ DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebsiteDataStor
+@@ -59,7 +61,10 @@ DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebsiteDataStor
, m_request(resourceRequest)
, m_originatingPage(originatingPage)
, m_frameInfo(API::FrameInfo::create(FrameInfoData { frameInfoData }, originatingPage))
@@ -12697,7 +12594,7 @@ index 447320824dcb6f91eedc15f469f5fc57ce68703f..7f8b2a0ee2c5985e86ef888c6ebc709e
}
DownloadProxy::~DownloadProxy()
-@@ -79,9 +84,12 @@ static RefPtr<API::Data> createData(const IPC::DataReference& data)
+@@ -78,9 +83,12 @@ static RefPtr<API::Data> createData(const IPC::DataReference& data)
void DownloadProxy::cancel(CompletionHandler<void(API::Data*)>&& completionHandler)
{
if (m_dataStore) {
@@ -12711,7 +12608,7 @@ index 447320824dcb6f91eedc15f469f5fc57ce68703f..7f8b2a0ee2c5985e86ef888c6ebc709e
m_downloadProxyMap.downloadFinished(*this);
});
} else
-@@ -167,6 +175,21 @@ void DownloadProxy::decideDestinationWithSuggestedFilename(const WebCore::Resour
+@@ -166,6 +174,21 @@ void DownloadProxy::decideDestinationWithSuggestedFilename(const WebCore::Resour
suggestedFilename = m_suggestedFilename;
suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(suggestedFilename, response.mimeType());
@@ -12733,7 +12630,7 @@ index 447320824dcb6f91eedc15f469f5fc57ce68703f..7f8b2a0ee2c5985e86ef888c6ebc709e
m_client->decideDestinationWithSuggestedFilename(*this, response, ResourceResponseBase::sanitizeSuggestedFilename(suggestedFilename), [this, protectedThis = Ref { *this }, completionHandler = WTFMove(completionHandler)] (AllowOverwrite allowOverwrite, String destination) mutable {
SandboxExtension::Handle sandboxExtensionHandle;
if (!destination.isNull()) {
-@@ -215,6 +238,8 @@ void DownloadProxy::didFinish()
+@@ -214,6 +237,8 @@ void DownloadProxy::didFinish()
updateQuarantinePropertiesIfPossible();
#endif
m_client->didFinish(*this);
@@ -12742,7 +12639,7 @@ index 447320824dcb6f91eedc15f469f5fc57ce68703f..7f8b2a0ee2c5985e86ef888c6ebc709e
// This can cause the DownloadProxy object to be deleted.
m_downloadProxyMap.downloadFinished(*this);
-@@ -225,6 +250,8 @@ void DownloadProxy::didFail(const ResourceError& error, const IPC::DataReference
+@@ -224,6 +249,8 @@ void DownloadProxy::didFail(const ResourceError& error, const IPC::DataReference
m_legacyResumeData = createData(resumeData);
m_client->didFail(*this, error, m_legacyResumeData.get());
@@ -12764,7 +12661,7 @@ index 42e9c901f866a2892396c83441ecbc5638270b52..42d2f292df2f337e302a8ec281333c70
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.h b/Source/WebKit/UIProcess/DrawingAreaProxy.h
-index c69531c47f58aa85557be084c7fd65a7870d2c06..009613e9b4237b8a8b0a64897d66def28c0b25d0 100644
+index 09f7c720dcf5da78c3591ac303f5bf393fbda120..5e86d821e0cd9a4ee2ed7817a3707d15a3ff5c44 100644
--- a/Source/WebKit/UIProcess/DrawingAreaProxy.h
+++ b/Source/WebKit/UIProcess/DrawingAreaProxy.h
@@ -85,6 +85,7 @@ public:
@@ -12775,16 +12672,17 @@ index c69531c47f58aa85557be084c7fd65a7870d2c06..009613e9b4237b8a8b0a64897d66def2
#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
// The timeout we use when waiting for a DidUpdateGeometry message.
-@@ -175,6 +176,9 @@ private:
- virtual void update(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
+@@ -169,6 +170,10 @@ private:
virtual void didUpdateBackingStoreState(uint64_t /* backingStoreStateID */, const UpdateInfo&, const LayerTreeContext&) { }
virtual void exitAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
-+#endif
+ #endif
++
+#if PLATFORM(WIN)
+ virtual void didChangeAcceleratedCompositingMode(bool) { }
- #endif
- bool m_startedReceivingMessages { false };
++#endif
};
+
+ } // namespace WebKit
diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in b/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in
index b0722e7da81e56530deb570b82ed7cfece970362..05ec3e3ea97ba49135a27d7f9b91f14c507d9318 100644
--- a/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in
@@ -12799,10 +12697,10 @@ index b0722e7da81e56530deb570b82ed7cfece970362..05ec3e3ea97ba49135a27d7f9b91f14c
}
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/CairoJpegEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/CairoJpegEncoder.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..9426d9eed59f433eac62b8eb6a16139b84079949
+index 0000000000000000000000000000000000000000..f9af359a8b81babaf855132ec168feb22ef5799b
--- /dev/null
+++ b/Source/WebKit/UIProcess/Inspector/Agents/CairoJpegEncoder.cpp
-@@ -0,0 +1,244 @@
+@@ -0,0 +1,246 @@
+/* Copyright 2018 Bernhard R. Fischer, 4096R/8E24F29D <[email protected]>
+ *
+ * This file is part of Cairo_JPG.
@@ -12844,6 +12742,8 @@ index 0000000000000000000000000000000000000000..9426d9eed59f433eac62b8eb6a16139b
+ * @license LGPL3.
+ */
+
++#include "config.h"
++
+#if USE(CAIRO)
+
+#include "CairoJpegEncoder.h"
@@ -16101,7 +16001,7 @@ index 0000000000000000000000000000000000000000..c9f2d7ec888e819a49cb898803432013
+
+#endif // ENABLE(REMOTE_INSPECTOR)
diff --git a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
-index 1f17cf73705c763a75f1f007e5e783e0a07d13fd..68d4462d1749158831451ca98a456a425a7ea421 100644
+index f2377683234a05a45d6dd4ccbb317bdec47feb30..f70925c506dcf1283d1a9b6663f42ccc5f5a4c71 100644
--- a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
+++ b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
@@ -97,8 +97,11 @@ void ProcessLauncher::launchProcess()
@@ -16118,10 +16018,10 @@ index 1f17cf73705c763a75f1f007e5e783e0a07d13fd..68d4462d1749158831451ca98a456a42
BOOL result = ::CreateProcess(0, commandLine.data(), 0, 0, true, 0, 0, 0, &startupInfo, &processInformation);
diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h
-index acc7509d3a5d7fd5449f4d18d3cf30e5cff18af9..d137208ecc32e8a5dfbc8a192726d27934aea4dc 100644
+index d3e41f04696c7ccd969a33c9fd1256f9d4eeef73..c58d77873379cd4f505864650c21d024f95aa4f1 100644
--- a/Source/WebKit/UIProcess/PageClient.h
+++ b/Source/WebKit/UIProcess/PageClient.h
-@@ -328,6 +328,11 @@ public:
+@@ -325,6 +325,11 @@ public:
virtual void selectionDidChange() = 0;
#endif
@@ -16435,7 +16335,7 @@ index 0000000000000000000000000000000000000000..6d04f9290135069359ce6bf872654648
+
+#endif // ENABLE(REMOTE_INSPECTOR)
diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp
-index e882c10e903e431412203cb93244744d3c7d97fb..bc29c0bb3b1e6671bda06a99c6cc2bb53ad2a873 100644
+index b6fb4399f68f70f26f1a0c036c75679234d27010..e71fc5b71fd42a3f0d49096990d2402d1b6ac56d 100644
--- a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp
+++ b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp
@@ -32,6 +32,7 @@
@@ -16471,7 +16371,7 @@ index be46daa094f16baf6bd52f9cf651c119b1e1b858..bee096090050e87158764f45e1ba1280
WebPageProxy* page() const { return m_page.get(); }
diff --git a/Source/WebKit/UIProcess/WebFrameProxy.cpp b/Source/WebKit/UIProcess/WebFrameProxy.cpp
-index 8086ac177c51a01a5bb2dc80ba66a6e3e454ba00..20f0704d538b78995ae081eea09b80693620954b 100644
+index 0553afc5aae92320370e4ee19ecaee299e6bc774..b96613b7aa929a246cefa3274a5b2e6bdef71d8d 100644
--- a/Source/WebKit/UIProcess/WebFrameProxy.cpp
+++ b/Source/WebKit/UIProcess/WebFrameProxy.cpp
@@ -28,6 +28,7 @@
@@ -16726,7 +16626,7 @@ index 0000000000000000000000000000000000000000..b3bb4880a866ee6132b8b26acf8dad81
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..f2582719303adaa1463715d60f8c5b606b7ad479
+index 0000000000000000000000000000000000000000..0c479471cef9c281801cea873f4d6eba678c9243
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
@@ -0,0 +1,332 @@
@@ -16877,11 +16777,11 @@ index 0000000000000000000000000000000000000000..f2582719303adaa1463715d60f8c5b60
+
+void WebPageInspectorInputAgent::dispatchKeyEvent(const String& type, std::optional<int>&& modifiers, const String& text, const String& unmodifiedText, const String& code, const String& key, std::optional<int>&& windowsVirtualKeyCode, std::optional<int>&& nativeVirtualKeyCode, std::optional<bool>&& autoRepeat, std::optional<bool>&& isKeypad, std::optional<bool>&& isSystemKey, RefPtr<JSON::Array>&& commands, Ref<Inspector::InputBackendDispatcherHandler::DispatchKeyEventCallback>&& callback)
+{
-+ WebKit::WebEvent::Type eventType;
++ WebEventType eventType;
+ if (type == "keyDown"_s) {
-+ eventType = WebKit::WebEvent::KeyDown;
++ eventType = WebEventType::KeyDown;
+ } else if (type == "keyUp"_s) {
-+ eventType = WebKit::WebEvent::KeyUp;
++ eventType = WebEventType::KeyUp;
+ } else {
+ callback->sendFailure("Unsupported event type."_s);
+ return;
@@ -16921,7 +16821,7 @@ index 0000000000000000000000000000000000000000..f2582719303adaa1463715d60f8c5b60
+ WallTime timestamp = WallTime::now();
+
+ // cancel any active drag on Escape
-+ if (eventType == WebKit::WebEvent::KeyDown && key == "Escape"_s && m_page.cancelDragIfNeeded()) {
++ if (eventType == WebEventType::KeyDown && key == "Escape"_s && m_page.cancelDragIfNeeded()) {
+ callback->sendSuccess();
+ return;
+ }
@@ -16946,13 +16846,13 @@ index 0000000000000000000000000000000000000000..f2582719303adaa1463715d60f8c5b60
+
+void WebPageInspectorInputAgent::dispatchMouseEvent(const String& type, int x, int y, std::optional<int>&& modifiers, const String& button, std::optional<int>&& buttons, std::optional<int>&& clickCount, std::optional<int>&& deltaX, std::optional<int>&& deltaY, Ref<DispatchMouseEventCallback>&& callback)
+{
-+ WebEvent::Type eventType = WebEvent::NoType;
++ WebEventType eventType = WebEventType::NoType;
+ if (type == "down"_s)
-+ eventType = WebEvent::MouseDown;
++ eventType = WebEventType::MouseDown;
+ else if (type == "up"_s)
-+ eventType = WebEvent::MouseUp;
++ eventType = WebEventType::MouseUp;
+ else if (type == "move"_s)
-+ eventType = WebEvent::MouseMove;
++ eventType = WebEventType::MouseMove;
+ else {
+ callback->sendFailure("Unsupported event type"_s);
+ return;
@@ -17056,7 +16956,7 @@ index 0000000000000000000000000000000000000000..f2582719303adaa1463715d60f8c5b60
+ WebCore::FloatSize delta = {-eventDeltaX, -eventDeltaY};
+ WebCore::FloatSize wheelTicks = delta;
+ wheelTicks.scale(1.0f / WebCore::Scrollbar::pixelsPerLineStep());
-+ WebWheelEvent webEvent({WebEvent::Wheel, eventModifiers, timestamp}, {x, y}, {x, y}, delta, wheelTicks, WebWheelEvent::ScrollByPixelWheelEvent);
++ WebWheelEvent webEvent({WebEventType::Wheel, eventModifiers, timestamp}, {x, y}, {x, y}, delta, wheelTicks, WebWheelEvent::ScrollByPixelWheelEvent);
+ NativeWebWheelEvent event(webEvent);
+ m_page.handleWheelEvent(event);
+}
@@ -17064,7 +16964,7 @@ index 0000000000000000000000000000000000000000..f2582719303adaa1463715d60f8c5b60
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..f1e6579eeaf6478a593e2558b8652222d5d16cbd
+index 0000000000000000000000000000000000000000..3e87bf40ced2301f4fb145c6cb31f2cf7fa15dd6
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h
@@ -0,0 +1,86 @@
@@ -17135,7 +17035,7 @@ index 0000000000000000000000000000000000000000..f1e6579eeaf6478a593e2558b8652222
+ void dispatchWheelEvent(int x, int y, std::optional<int>&& modifiers, std::optional<int>&& deltaX, std::optional<int>&& deltaY, Ref<DispatchWheelEventCallback>&& callback) override;
+
+private:
-+ void platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& commands, WallTime timestamp);
++ void platformDispatchKeyEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& commands, WallTime timestamp);
+#if PLATFORM(MAC)
+ void platformDispatchMouseEvent(const String& type, int x, int y, std::optional<int>&& modifier, const String& button, std::optional<int>&& clickCount, unsigned short buttons);
+#endif
@@ -17155,10 +17055,37 @@ index 0000000000000000000000000000000000000000..f1e6579eeaf6478a593e2558b8652222
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
-index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251533f8895 100644
+index e0d41e09cd86f504afe6beb129191cf1f9cd8e08..78908baacef0b114d42775af54767bc195de49ad 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
-@@ -250,6 +250,9 @@
+@@ -153,6 +153,7 @@
+ #include <WebCore/AlternativeTextClient.h>
+ #include <WebCore/AppHighlight.h>
+ #include <WebCore/BitmapImage.h>
++#include <WebCore/Color.h>
+ #include <WebCore/CompositionHighlight.h>
+ #include <WebCore/CrossSiteNavigationDataTransfer.h>
+ #include <WebCore/DOMPasteAccess.h>
+@@ -176,15 +177,18 @@
+ #include <WebCore/MediaStreamRequest.h>
+ #include <WebCore/ModalContainerTypes.h>
+ #include <WebCore/NotImplemented.h>
++#include <WebCore/PageIdentifier.h>
+ #include <WebCore/PerformanceLoggingClient.h>
+ #include <WebCore/PermissionState.h>
+ #include <WebCore/PlatformEvent.h>
+ #include <WebCore/PrivateClickMeasurement.h>
+ #include <WebCore/PublicSuffix.h>
+ #include <WebCore/RealtimeMediaSourceCenter.h>
++#include <WebCore/RegistrableDomain.h>
+ #include <WebCore/RenderEmbeddedObject.h>
+ #include <WebCore/ResourceLoadStatistics.h>
+ #include <WebCore/RuntimeApplicationChecks.h>
++#include <WebCore/SecurityOriginData.h>
+ #include <WebCore/SerializedCryptoKeyWrap.h>
+ #include <WebCore/ShareData.h>
+ #include <WebCore/SharedBuffer.h>
+@@ -253,6 +257,9 @@
#if PLATFORM(GTK)
#include "GtkSettingsManager.h"
@@ -17168,7 +17095,16 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
#include <WebCore/SelectionData.h>
#endif
-@@ -648,6 +651,10 @@ WebPageProxy::~WebPageProxy()
+@@ -353,6 +360,8 @@ using namespace WebCore;
+
+ namespace WebKit {
+
++using namespace WebCore;
++
+ DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageProxyCounter, ("WebPageProxy"));
+
+ class StorageRequests {
+@@ -620,6 +629,10 @@ WebPageProxy::~WebPageProxy()
if (m_preferences->mediaSessionCoordinatorEnabled())
GroupActivitiesSessionNotifier::sharedNotifier().removeWebPage(*this);
#endif
@@ -17179,7 +17115,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
void WebPageProxy::addAllMessageReceivers()
-@@ -1073,6 +1080,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)
+@@ -1045,6 +1058,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)
m_pageLoadState.didSwapWebProcesses();
if (reason != ProcessLaunchReason::InitialProcess)
m_drawingArea->waitForBackingStoreUpdateOnNextPaint();
@@ -17187,7 +17123,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
void WebPageProxy::didAttachToRunningProcess()
-@@ -1439,6 +1447,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
+@@ -1427,6 +1441,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
return m_process;
}
@@ -17209,7 +17145,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
RefPtr<API::Navigation> WebPageProxy::loadRequest(ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, API::Object* userData)
{
if (m_isClosed)
-@@ -2010,6 +2033,31 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
+@@ -2001,6 +2030,31 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
websiteDataStore().networkProcess().send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0);
}
@@ -17241,7 +17177,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
void WebPageProxy::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type)
{
MESSAGE_CHECK(m_process, !targetId.isEmpty());
-@@ -2204,6 +2252,25 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpd
+@@ -2195,6 +2249,25 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpd
{
bool wasVisible = isViewVisible();
m_activityState.remove(flagsToUpdate);
@@ -17267,7 +17203,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
if (flagsToUpdate & ActivityState::IsFocused && pageClient().isViewFocused())
m_activityState.add(ActivityState::IsFocused);
if (flagsToUpdate & ActivityState::WindowIsActive && pageClient().isViewWindowActive())
-@@ -2842,6 +2909,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -2833,6 +2906,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
{
if (!hasRunningProcess())
return;
@@ -17276,7 +17212,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
#if PLATFORM(GTK)
UNUSED_PARAM(dragStorageName);
UNUSED_PARAM(sandboxExtensionHandle);
-@@ -2852,6 +2921,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -2843,6 +2918,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
m_process->assumeReadAccessToBaseURL(*this, url);
ASSERT(dragData.platformData());
@@ -17285,7 +17221,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags()));
#else
send(Messages::WebPage::PerformDragControllerAction(action, dragData, sandboxExtensionHandle, sandboxExtensionsForUpload));
-@@ -2867,18 +2938,41 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
+@@ -2858,18 +2935,41 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
m_currentDragCaretEditableElementRect = editableElementRect;
setDragCaretRect(insertionRect);
pageClient().didPerformDragControllerAction();
@@ -17330,7 +17266,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<WebCore::DragOperation> dragOperationMask)
{
if (!hasRunningProcess())
-@@ -2887,6 +2981,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
+@@ -2878,6 +2978,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
setDragCaretRect({ });
}
@@ -17355,7 +17291,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
void WebPageProxy::didPerformDragOperation(bool handled)
{
pageClient().didPerformDragOperation(handled);
-@@ -2899,8 +3011,18 @@ void WebPageProxy::didStartDrag()
+@@ -2890,8 +3008,18 @@ void WebPageProxy::didStartDrag()
discardQueuedMouseEvents();
send(Messages::WebPage::DidStartDrag());
@@ -17375,7 +17311,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
void WebPageProxy::dragCancelled()
{
if (hasRunningProcess())
-@@ -3012,16 +3134,38 @@ void WebPageProxy::processNextQueuedMouseEvent()
+@@ -3000,16 +3128,38 @@ void WebPageProxy::processNextQueuedMouseEvent()
m_process->startResponsivenessTimer();
}
@@ -17385,15 +17321,15 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
+ std::optional<Vector<SandboxExtension::Handle>> sandboxExtensions;
#if PLATFORM(MAC)
-- bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEvent::MouseMove && event.button() != WebMouseEventButton::NoButton;
+- bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEventType::MouseMove && event.button() != WebMouseEventButton::NoButton;
- if (eventMayStartDrag)
- sandboxExtensions = SandboxExtension::createHandlesForMachLookup({ "com.apple.iconservices"_s, "com.apple.iconservices.store"_s }, process().auditToken(), SandboxExtension::MachBootstrapOptions::EnableMachBootstrap);
-+ bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEvent::MouseMove && event.button() != WebMouseEventButton::NoButton;
++ bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEventType::MouseMove && event.button() != WebMouseEventButton::NoButton;
+ if (eventMayStartDrag)
+ sandboxExtensions = SandboxExtension::createHandlesForMachLookup({ "com.apple.iconservices"_s, "com.apple.iconservices.store"_s }, process().auditToken(), SandboxExtension::MachBootstrapOptions::EnableMachBootstrap);
+#endif
+
-+ LOG(MouseHandling, "UIProcess: sent mouse event %s (queue size %zu)", webMouseEventTypeString(eventType), m_mouseEventQueue.size());
++ LOG_WITH_STREAM(MouseHandling, stream << "UIProcess: sent mouse event " << eventType << " (queue size " << m_mouseEventQueue.size() << ")");
+ send(Messages::WebPage::MouseEvent(event, sandboxExtensions));
+ } else {
+#if PLATFORM(WIN) || PLATFORM(COCOA)
@@ -17401,14 +17337,14 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
+#else
+ DragData dragData(&*m_dragSelectionData, event.position(), event.globalPosition(), m_dragSourceOperationMask);
#endif
-+ if (eventType == WebEvent::MouseMove) {
++ if (eventType == WebEventType::MouseMove) {
+ dragUpdated(dragData);
-+ } else if (eventType == WebEvent::MouseUp) {
++ } else if (eventType == WebEventType::MouseUp) {
+ if (m_currentDragOperation && m_dragSourceOperationMask.containsAny(m_currentDragOperation.value())) {
+ SandboxExtension::Handle sandboxExtensionHandle;
+ Vector<SandboxExtension::Handle> sandboxExtensionsForUpload;
-- LOG(MouseHandling, "UIProcess: sent mouse event %s (queue size %zu)", webMouseEventTypeString(eventType), m_mouseEventQueue.size());
+- LOG_WITH_STREAM(MouseHandling, stream << "UIProcess: sent mouse event " << eventType << " (queue size " << m_mouseEventQueue.size() << ")");
- send(Messages::WebPage::MouseEvent(event, sandboxExtensions));
+ performDragOperation(dragData, ""_s, WTFMove(sandboxExtensionHandle), WTFMove(sandboxExtensionsForUpload));
+ }
@@ -17420,7 +17356,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function<void ()>&& action)
-@@ -3201,7 +3345,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
+@@ -3181,7 +3331,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent)
{
@@ -17429,7 +17365,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
for (auto& touchPoint : touchStartEvent.touchPoints()) {
IntPoint location = touchPoint.location();
auto updateTrackingType = [this, location](TrackingType& trackingType, EventTrackingRegions::EventType eventType) {
-@@ -3233,7 +3377,7 @@ void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent
+@@ -3213,7 +3363,7 @@ void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent
m_touchAndPointerEventTracking.touchStartTracking = TrackingType::Synchronous;
m_touchAndPointerEventTracking.touchMoveTracking = TrackingType::Synchronous;
m_touchAndPointerEventTracking.touchEndTracking = TrackingType::Synchronous;
@@ -17438,7 +17374,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
TrackingType WebPageProxy::touchEventTrackingType(const WebTouchEvent& touchStartEvent) const
-@@ -3623,6 +3767,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
+@@ -3603,6 +3753,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
if (policyAction != PolicyAction::Use
|| (!preferences().siteIsolationEnabled() && !frame.isMainFrame())
|| !navigation) {
@@ -17447,7 +17383,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
receivedPolicyDecision(policyAction, navigation, navigation->websitePolicies(), WTFMove(navigationAction), WTFMove(sender));
return;
}
-@@ -3693,6 +3839,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
+@@ -3673,6 +3825,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
void WebPageProxy::receivedPolicyDecision(PolicyAction action, API::Navigation* navigation, RefPtr<API::WebsitePolicies>&& websitePolicies, std::variant<Ref<API::NavigationResponse>, Ref<API::NavigationAction>>&& navigationActionOrResponse, Ref<PolicyDecisionSender>&& sender, WillContinueLoadInNewProcess willContinueLoadInNewProcess, std::optional<SandboxExtension::Handle> sandboxExtensionHandle)
{
@@ -17455,7 +17391,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
if (!hasRunningProcess()) {
sender->send(PolicyDecision { sender->identifier(), isNavigatingToAppBoundDomain(), PolicyAction::Ignore, 0, std::nullopt, std::nullopt });
return;
-@@ -4466,6 +4613,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
+@@ -4447,6 +4600,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
m_pageScaleFactor = scaleFactor;
}
@@ -17467,7 +17403,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
void WebPageProxy::pluginScaleFactorDidChange(double pluginScaleFactor)
{
m_pluginScaleFactor = pluginScaleFactor;
-@@ -4873,6 +5025,7 @@ void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
+@@ -4854,6 +5012,7 @@ void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
return;
m_navigationState->didDestroyNavigation(navigationID);
@@ -17475,7 +17411,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)
-@@ -5099,6 +5252,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
+@@ -5080,6 +5239,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
m_failingProvisionalLoadURL = { };
@@ -17484,7 +17420,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
// 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;
-@@ -5627,7 +5782,14 @@ void WebPageProxy::decidePolicyForNavigationActionAsync(FrameIdentifier frameID,
+@@ -5607,7 +5768,14 @@ void WebPageProxy::decidePolicyForNavigationActionAsync(FrameIdentifier frameID,
NavigationActionData&& navigationActionData, FrameInfoData&& originatingFrameInfo, std::optional<WebPageProxyIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request,
IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, uint64_t listenerID)
{
@@ -17500,7 +17436,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&& process, PageIdentifier webPageID, FrameIdentifier frameID, FrameInfoData&& frameInfo,
-@@ -6211,6 +6373,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
+@@ -6212,6 +6380,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
if (auto* page = originatingFrameInfo->page())
openerAppInitiatedState = page->lastNavigationWasAppInitiated();
@@ -17508,7 +17444,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
auto completionHandler = [this, protectedThis = Ref { *this }, mainFrameURL, request, reply = WTFMove(reply), privateClickMeasurement = navigationActionData.privateClickMeasurement, openerAppInitiatedState = WTFMove(openerAppInitiatedState)] (RefPtr<WebPageProxy> newPage) mutable {
if (!newPage) {
reply(std::nullopt, std::nullopt);
-@@ -6260,6 +6423,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
+@@ -6262,6 +6431,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
void WebPageProxy::showPage()
{
m_uiClient->showPage(this);
@@ -17516,7 +17452,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
void WebPageProxy::exitFullscreenImmediately()
-@@ -6329,6 +6493,10 @@ void WebPageProxy::closePage()
+@@ -6331,6 +6501,10 @@ void WebPageProxy::closePage()
if (isClosed())
return;
@@ -17527,7 +17463,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:");
pageClient().clearAllEditCommands();
m_uiClient->close(this);
-@@ -6365,6 +6533,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f
+@@ -6367,6 +6541,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 {
@@ -17536,7 +17472,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
page.m_uiClient->runJavaScriptAlert(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)]() mutable {
reply();
completion();
-@@ -6386,6 +6556,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
+@@ -6388,6 +6564,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
if (auto* automationSession = process().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -17545,7 +17481,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply)](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {
page.m_uiClient->runJavaScriptConfirm(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)](bool result) mutable {
-@@ -6409,6 +6581,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
+@@ -6411,6 +6589,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
if (auto* automationSession = process().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -17554,7 +17490,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
runModalJavaScriptDialog(WTFMove(frame), WTFMove(frameInfo), message, [reply = WTFMove(reply), defaultValue](WebPageProxy& page, WebFrameProxy* frame, FrameInfoData&& frameInfo, const String& message, CompletionHandler<void()>&& completion) mutable {
page.m_uiClient->runJavaScriptPrompt(page, message, defaultValue, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)](auto& result) mutable {
-@@ -6524,6 +6698,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
+@@ -6526,6 +6706,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
return;
}
}
@@ -17563,7 +17499,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
// Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer.
m_process->stopResponsivenessTimer();
-@@ -7865,6 +8041,8 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7861,6 +8043,8 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled)
if (auto* automationSession = process().processPool().automationSession())
automationSession->mouseEventsFlushedForPage(*this);
didFinishProcessingAllPendingMouseEvents();
@@ -17572,7 +17508,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
break;
}
-@@ -7879,10 +8057,13 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7875,10 +8059,13 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled)
pageClient().wheelEventWasNotHandledByWebCore(oldestProcessedEvent);
}
@@ -17589,15 +17525,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
break;
}
-@@ -7891,7 +8072,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
- case WebEvent::RawKeyDown:
- case WebEvent::Char: {
- LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s (queue empty %d)", webKeyboardEventTypeString(type), m_keyEventQueue.isEmpty());
--
- MESSAGE_CHECK(m_process, !m_keyEventQueue.isEmpty());
- auto event = m_keyEventQueue.takeFirst();
- MESSAGE_CHECK(m_process, type == event.type());
-@@ -7910,7 +8090,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7906,7 +8093,6 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled)
// The call to doneWithKeyEvent may close this WebPage.
// Protect against this being destroyed.
Ref<WebPageProxy> protect(*this);
@@ -17605,7 +17533,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
pageClient().doneWithKeyEvent(event, handled);
if (!handled)
m_uiClient->didNotHandleKeyEvent(this, event);
-@@ -7919,6 +8098,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7915,6 +8101,7 @@ void WebPageProxy::didReceiveEvent(WebEventType eventType, bool handled)
if (!canProcessMoreKeyEvents) {
if (auto* automationSession = process().processPool().automationSession())
automationSession->keyboardEventsFlushedForPage(*this);
@@ -17613,7 +17541,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
}
break;
}
-@@ -8272,7 +8452,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
+@@ -8268,7 +8455,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
{
WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%" PUBLIC_LOG_STRING, processTerminationReasonToString(reason));
@@ -17625,7 +17553,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
if (m_loaderClient)
handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this);
else
-@@ -8611,6 +8794,7 @@ static Span<const ASCIILiteral> gpuMachServices()
+@@ -8615,6 +8805,7 @@ bool WebPageProxy::useGPUProcessForDOMRenderingEnabled() const
WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea, RefPtr<API::WebsitePolicies>&& websitePolicies)
{
@@ -17633,7 +17561,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
WebPageCreationParameters parameters;
parameters.processDisplayName = configuration().processDisplayName();
-@@ -8814,6 +8998,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
+@@ -8818,6 +9009,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
parameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false;
@@ -17642,7 +17570,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
#if PLATFORM(IOS)
// FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.allowsDeprecatedSynchronousXMLHttpRequestDuringUnload = allowsDeprecatedSynchronousXMLHttpRequestDuringUnload();
-@@ -8890,6 +9076,14 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, Even
+@@ -8901,6 +9094,14 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, Even
void WebPageProxy::didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&& authenticationChallenge, NegotiatedLegacyTLS negotiatedLegacyTLS)
{
@@ -17657,7 +17585,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) {
m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = Ref { *this }, authenticationChallenge] (bool shouldAllowLegacyTLS) {
if (shouldAllowLegacyTLS)
-@@ -8988,6 +9182,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
+@@ -9004,6 +9205,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
request->deny();
};
@@ -17674,7 +17602,7 @@ index 4b9bff0b93d571834c2b2fdb06fcd3253efba9b6..03bfbe2490597a73b35d55f1cfcb8251
// and make it one UIClient call that calls the completionHandler with false
// if there is no delegate instead of returning the completionHandler
diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h
-index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f6448664b9d 100644
+index 250c1cfff0088c5b22a3d2fbebd772e21d9d1e53..e24108e8f7db5f1d7f7c2d97f5bb8757abb38826 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.h
+++ b/Source/WebKit/UIProcess/WebPageProxy.h
@@ -39,6 +39,7 @@
@@ -17685,7 +17613,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#include "LayerTreeContext.h"
#include "MediaKeySystemPermissionRequestManagerProxy.h"
#include "MediaPlaybackState.h"
-@@ -149,8 +150,11 @@
+@@ -150,8 +151,11 @@
#include "EndowmentStateTracker.h"
#endif
@@ -17697,7 +17625,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#endif
#if ENABLE(TOUCH_EVENTS)
-@@ -172,6 +176,14 @@
+@@ -174,6 +178,14 @@
#include "ArgumentCodersGtk.h"
#endif
@@ -17712,7 +17640,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
#include <WebCore/MediaPlaybackTargetPicker.h>
#include <WebCore/WebMediaSessionManagerClient.h>
-@@ -255,6 +267,7 @@ class CertificateInfo;
+@@ -257,6 +269,7 @@ class CertificateInfo;
class Cursor;
class DataSegment;
class DragData;
@@ -17720,7 +17648,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
class FloatRect;
class FontAttributeChanges;
class FontChanges;
-@@ -262,7 +275,6 @@ class GraphicsLayer;
+@@ -264,7 +277,6 @@ class GraphicsLayer;
class IntSize;
class ProtectionSpace;
class RunLoopObserver;
@@ -17728,7 +17656,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
class SharedBuffer;
class SpeechRecognitionRequest;
class TextIndicator;
-@@ -552,6 +564,8 @@ public:
+@@ -555,6 +567,8 @@ public:
void setControlledByAutomation(bool);
WebPageInspectorController& inspectorController() { return *m_inspectorController; }
@@ -17737,7 +17665,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#if PLATFORM(IOS_FAMILY)
void showInspectorIndication();
-@@ -664,6 +678,11 @@ public:
+@@ -667,6 +681,11 @@ public:
void setPageLoadStateObserver(std::unique_ptr<PageLoadState::Observer>&&);
@@ -17749,7 +17677,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
void initializeWebPage();
void setDrawingArea(std::unique_ptr<DrawingAreaProxy>&&);
-@@ -688,6 +707,7 @@ public:
+@@ -691,6 +710,7 @@ public:
void closePage();
void addPlatformLoadParameters(WebProcessProxy&, LoadParameters&);
@@ -17757,7 +17685,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemesButNotAppLinks, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, bool isAppInitiated = true, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadData(const IPC::DataReference&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow);
-@@ -1237,6 +1257,7 @@ public:
+@@ -1240,6 +1260,7 @@ public:
#endif
void pageScaleFactorDidChange(double);
@@ -17765,7 +17693,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
void pluginScaleFactorDidChange(double);
void pluginZoomFactorDidChange(double);
-@@ -1327,14 +1348,20 @@ public:
+@@ -1330,14 +1351,20 @@ public:
void didStartDrag();
void dragCancelled();
void setDragCaretRect(const WebCore::IntRect&);
@@ -17787,7 +17715,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#endif
void processDidBecomeUnresponsive();
-@@ -1591,6 +1618,8 @@ public:
+@@ -1594,6 +1621,8 @@ public:
#if PLATFORM(COCOA) || PLATFORM(GTK)
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&);
@@ -17796,7 +17724,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#endif
#if ENABLE(WEB_CRYPTO)
-@@ -2819,6 +2848,7 @@ private:
+@@ -2838,6 +2867,7 @@ private:
String m_overrideContentSecurityPolicy;
RefPtr<WebInspectorUIProxy> m_inspector;
@@ -17804,7 +17732,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#if PLATFORM(COCOA)
WeakObjCPtr<WKWebView> m_cocoaView;
-@@ -3097,6 +3127,20 @@ private:
+@@ -3115,6 +3145,20 @@ private:
unsigned m_currentDragNumberOfFilesToBeAccepted { 0 };
WebCore::IntRect m_currentDragCaretRect;
WebCore::IntRect m_currentDragCaretEditableElementRect;
@@ -17825,7 +17753,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#endif
PageLoadState m_pageLoadState;
-@@ -3309,6 +3353,9 @@ private:
+@@ -3329,6 +3373,9 @@ private:
RefPtr<API::Object> messageBody;
};
Vector<InjectedBundleMessage> m_pendingInjectedBundleMessages;
@@ -17836,7 +17764,7 @@ index ba5285d23dd2974ba6674db6827cf1df870fade5..fbcb3d53d988f0d2a932a59f45509f64
#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 12e495cd008d2c8ce766d326090e6062d7f2a4e1..69a4cc0ae761558b171e097637ccc955f9b80067 100644
+index 2e716ece0a04d989dd39b91247ab1bb2479cecd1..335b5e3a451eb74700bb21f27c0ee070f4c511b3 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in
@@ -29,6 +29,7 @@ messages -> WebPageProxy {
@@ -17846,7 +17774,7 @@ index 12e495cd008d2c8ce766d326090e6062d7f2a4e1..69a4cc0ae761558b171e097637ccc955
+ LogToStderr(String text)
DidChangeViewportProperties(struct WebCore::ViewportAttributes attributes)
- DidReceiveEvent(uint32_t type, bool handled)
+ DidReceiveEvent(enum:int8_t WebKit::WebEventType eventType, bool handled)
@@ -175,6 +176,7 @@ messages -> WebPageProxy {
#endif
@@ -17886,10 +17814,10 @@ index e68471d45366b6f7a609e6a57bcfea2820511e29..d2344e7b428ae19399ded4e37bfbf81c
}
diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp
-index ae3b1e2ce0a4a488b507b8f31c17ee12b021675d..373803d9ec0fce1935bab6dd13d37d50b81710bc 100644
+index de0f53203dec2cd468783f65bb1b16c462e592f2..2152abf7cdbf6d9b1462ed9d0651624da322ecb2 100644
--- a/Source/WebKit/UIProcess/WebProcessPool.cpp
+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp
-@@ -363,17 +363,19 @@ void WebProcessPool::setCustomWebContentServiceBundleIdentifier(const String& cu
+@@ -364,17 +364,19 @@ void WebProcessPool::setCustomWebContentServiceBundleIdentifier(const String& cu
m_configuration->setCustomWebContentServiceBundleIdentifier(customWebContentServiceBundleIdentifier);
}
@@ -17912,7 +17840,7 @@ index ae3b1e2ce0a4a488b507b8f31c17ee12b021675d..373803d9ec0fce1935bab6dd13d37d50
void WebProcessPool::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
{
-@@ -520,6 +522,14 @@ void WebProcessPool::establishRemoteWorkerContextConnectionToNetworkProcess(Remo
+@@ -508,6 +510,14 @@ void WebProcessPool::establishRemoteWorkerContextConnectionToNetworkProcess(Remo
RefPtr<WebProcessProxy> requestingProcess = requestingProcessIdentifier ? WebProcessProxy::processForIdentifier(*requestingProcessIdentifier) : nullptr;
WebProcessPool* processPool = requestingProcess ? &requestingProcess->processPool() : processPools()[0];
@@ -17927,7 +17855,7 @@ index ae3b1e2ce0a4a488b507b8f31c17ee12b021675d..373803d9ec0fce1935bab6dd13d37d50
ASSERT(processPool);
WebProcessProxy* remoteWorkerProcessProxy { nullptr };
-@@ -817,7 +827,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
+@@ -805,7 +815,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
#endif
parameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel();
@@ -17937,7 +17865,7 @@ index ae3b1e2ce0a4a488b507b8f31c17ee12b021675d..373803d9ec0fce1935bab6dd13d37d50
parameters.urlSchemesRegisteredAsEmptyDocument = copyToVector(m_schemesToRegisterAsEmptyDocument);
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp
-index b3850258eeed24447a735390d548e11b2348ec0d..063e7612af649b87f002578b1f3910f95fcad8be 100644
+index 57eb1990e20b79e98ad64f97e623c5a0856bc7aa..9ea7d71456194842457e3060d116a55fdeeaa05f 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp
@@ -162,6 +162,11 @@ Vector<RefPtr<WebProcessProxy>> WebProcessProxy::allProcesses()
@@ -17980,10 +17908,10 @@ index b3850258eeed24447a735390d548e11b2348ec0d..063e7612af649b87f002578b1f3910f9
if (isPrewarmed())
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h
-index 0825bdfdbc32995bd037773233c4d3e6dd66ef14..1d77d06b2e535b32c9af0ecaf114c9752d73fc27 100644
+index c21bba5f13042ba33c63a58a926dbd5c3126f75b..f0e30f78ce21ff91b236fff5e48f3c99ff9f69e0 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.h
+++ b/Source/WebKit/UIProcess/WebProcessProxy.h
-@@ -160,6 +160,7 @@ public:
+@@ -163,6 +163,7 @@ public:
static void forWebPagesWithOrigin(PAL::SessionID, const WebCore::SecurityOriginData&, const Function<void(WebPageProxy&)>&);
static Vector<std::pair<WebCore::ProcessIdentifier, WebCore::RegistrableDomain>> allowedFirstPartiesForCookies();
@@ -17992,10 +17920,10 @@ index 0825bdfdbc32995bd037773233c4d3e6dd66ef14..1d77d06b2e535b32c9af0ecaf114c975
WebConnection* webConnection() const { return m_webConnection.get(); }
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-index d4e89b39af8ec393016f452e133ebc9708043341..e1ab0cffebb8691b06031a78db43cc5a17e113ba 100644
+index d0b6307fa055ccb7603d9dced8c261550a0f3083..e1427655f0d8b68090d4f267ecf7c5d50e3fa10e 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-@@ -2014,6 +2014,12 @@ void WebsiteDataStore::originDirectoryForTesting(URL&& origin, URL&& topOrigin,
+@@ -2021,6 +2021,12 @@ void WebsiteDataStore::originDirectoryForTesting(URL&& origin, URL&& topOrigin,
networkProcess().websiteDataOriginDirectoryForTesting(m_sessionID, WTFMove(origin), WTFMove(topOrigin), type, WTFMove(completionHandler));
}
@@ -18009,18 +17937,18 @@ index d4e89b39af8ec393016f452e133ebc9708043341..e1ab0cffebb8691b06031a78db43cc5a
void WebsiteDataStore::hasAppBoundSession(CompletionHandler<void(bool)>&& completionHandler) const
{
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
-index 516c27eb24f35b037c3114e10ee9baa6c12c05a6..eb6b38052fa3cd08a4058fb847b6674f99ec523c 100644
+index 1dc8b10a94c9a7483826db54a92eb83eda8dfcf1..f0069fcfd8cc57d76e51f3b1fc3b909a810b5e65 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
-@@ -90,6 +90,7 @@ class SecKeyProxyStore;
- class DeviceIdHashSaltStorage;
+@@ -94,6 +94,7 @@ class DeviceIdHashSaltStorage;
+ class DownloadProxy;
class NetworkProcessProxy;
class SOAuthorizationCoordinator;
+class DownloadProxy;
class VirtualAuthenticatorManager;
class WebPageProxy;
class WebProcessPool;
-@@ -99,6 +100,7 @@ enum class CacheModel : uint8_t;
+@@ -105,6 +106,7 @@ enum class UnifiedOriginStorageLevel : uint8_t;
enum class WebsiteDataFetchOption : uint8_t;
enum class WebsiteDataType : uint32_t;
@@ -18028,7 +17956,7 @@ index 516c27eb24f35b037c3114e10ee9baa6c12c05a6..eb6b38052fa3cd08a4058fb847b6674f
struct NetworkProcessConnectionInfo;
struct WebsiteDataRecord;
struct WebsiteDataStoreParameters;
-@@ -109,6 +111,14 @@ enum class StorageAccessStatus : uint8_t;
+@@ -115,6 +117,14 @@ enum class StorageAccessStatus : uint8_t;
enum class StorageAccessPromptStatus;
#endif
@@ -18043,7 +17971,7 @@ index 516c27eb24f35b037c3114e10ee9baa6c12c05a6..eb6b38052fa3cd08a4058fb847b6674f
class WebsiteDataStore : public API::ObjectImpl<API::Object::Type::WebsiteDataStore>, public Identified<WebsiteDataStore>, public CanMakeWeakPtr<WebsiteDataStore> {
public:
static Ref<WebsiteDataStore> defaultDataStore();
-@@ -300,11 +310,13 @@ public:
+@@ -306,11 +316,13 @@ public:
const WebCore::CurlProxySettings& networkProxySettings() const { return m_proxySettings; }
#endif
@@ -18058,9 +17986,9 @@ index 516c27eb24f35b037c3114e10ee9baa6c12c05a6..eb6b38052fa3cd08a4058fb847b6674f
void setNetworkProxySettings(WebCore::SoupNetworkProxySettings&&);
const WebCore::SoupNetworkProxySettings& networkProxySettings() const { return m_networkProxySettings; }
void setCookiePersistentStorage(const String&, SoupCookiePersistentStorageType);
-@@ -374,6 +386,12 @@ public:
- static constexpr uint64_t defaultPerOriginQuota() { return 1000 * MB; }
- static bool defaultShouldUseCustomStoragePaths();
+@@ -385,6 +397,12 @@ public:
+ static const String& defaultBaseDataDirectory();
+ #endif
+ void setDownloadForAutomation(std::optional<bool> allow, const String& downloadPath);
+ std::optional<bool> allowDownloadForAutomation() { return m_allowDownloadForAutomation; };
@@ -18069,9 +17997,9 @@ index 516c27eb24f35b037c3114e10ee9baa6c12c05a6..eb6b38052fa3cd08a4058fb847b6674f
+ DownloadInstrumentation* downloadInstrumentation() { return m_downloadInstrumentation; };
+
void resetQuota(CompletionHandler<void()>&&);
- void clearStorage(CompletionHandler<void()>&&);
+ void resetStoragePersistedState(CompletionHandler<void()>&&);
#if PLATFORM(IOS_FAMILY)
-@@ -503,9 +521,11 @@ private:
+@@ -518,9 +536,11 @@ private:
WebCore::CurlProxySettings m_proxySettings;
#endif
@@ -18084,7 +18012,7 @@ index 516c27eb24f35b037c3114e10ee9baa6c12c05a6..eb6b38052fa3cd08a4058fb847b6674f
WebCore::SoupNetworkProxySettings m_networkProxySettings;
String m_cookiePersistentStoragePath;
SoupCookiePersistentStorageType m_cookiePersistentStorageType { SoupCookiePersistentStorageType::SQLite };
-@@ -533,6 +553,10 @@ private:
+@@ -548,6 +568,10 @@ private:
RefPtr<API::HTTPCookieStore> m_cookieStore;
RefPtr<NetworkProcessProxy> m_networkProcess;
@@ -18398,46 +18326,6 @@ index 0000000000000000000000000000000000000000..8006336003a4512b4c63bc8272d4b350
+} // namespace API
+
+#endif // ENABLE(REMOTE_INSPECTOR)
-diff --git a/Source/WebKit/UIProcess/glib/WebPageProxyGLib.cpp b/Source/WebKit/UIProcess/glib/WebPageProxyGLib.cpp
-index 9b04c5c3b91ade5679f01b835c908e84628903ca..d413ec71b4d33f032bc33d9b7029ac1be24ed87f 100644
---- a/Source/WebKit/UIProcess/glib/WebPageProxyGLib.cpp
-+++ b/Source/WebKit/UIProcess/glib/WebPageProxyGLib.cpp
-@@ -83,4 +83,35 @@ void WebPageProxy::didFinishLoadForResource(WebCore::ResourceLoaderIdentifier re
- manager->didFinishLoad(resourceID, frameID, WTFMove(error));
- }
-
-+
-+#if ENABLE(SPEECH_SYNTHESIS)
-+void WebPageProxy::didStartSpeaking(WebCore::PlatformSpeechSynthesisUtterance&)
-+{
-+}
-+
-+void WebPageProxy::didFinishSpeaking(WebCore::PlatformSpeechSynthesisUtterance&)
-+{
-+}
-+
-+void WebPageProxy::didPauseSpeaking(WebCore::PlatformSpeechSynthesisUtterance&)
-+{
-+}
-+
-+void WebPageProxy::didResumeSpeaking(WebCore::PlatformSpeechSynthesisUtterance&)
-+{
-+}
-+
-+void WebPageProxy::speakingErrorOccurred(WebCore::PlatformSpeechSynthesisUtterance&)
-+{
-+}
-+
-+void WebPageProxy::boundaryEventOccurred(WebCore::PlatformSpeechSynthesisUtterance&, WebCore::SpeechBoundary speechBoundary, unsigned charIndex, unsigned charLength)
-+{
-+}
-+
-+void WebPageProxy::voicesDidChange()
-+{
-+}
-+#endif // ENABLE(SPEECH_SYNTHESIS)
-+
- } // namespace WebKit
diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h
index 39aeff71fe05354cf63d3b3701d363642d63aca4..32e96cdd0bdbd8c5dcde43fdf60052ac13a226f7 100644
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.h
@@ -18611,7 +18499,7 @@ index 0000000000000000000000000000000000000000..e5e25acebabb76a05a77db02a99f1267
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..bd42403cc3c6fc109a4149392ed5143e361eb293
+index 0000000000000000000000000000000000000000..6a204c5bba8fb95ddb2d1c14cae7a3a79610abc6
--- /dev/null
+++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp
@@ -0,0 +1,105 @@
@@ -18680,7 +18568,7 @@ index 0000000000000000000000000000000000000000..bd42403cc3c6fc109a4149392ed5143e
+ return state;
+}
+
-+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
++void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
+{
+ Vector<String> commands;
+ const guint keyVal = WebCore::PlatformKeyboardEvent::gdkKeyCodeForWindowsKeyCode(windowsVirtualKeyCode);
@@ -18688,10 +18576,10 @@ index 0000000000000000000000000000000000000000..bd42403cc3c6fc109a4149392ed5143e
+ GdkEventType event = GDK_NOTHING;
+ switch (type)
+ {
-+ case WebKeyboardEvent::KeyDown:
++ case WebEventType::KeyDown:
+ event = GDK_KEY_PRESS;
+ break;
-+ case WebKeyboardEvent::KeyUp:
++ case WebEventType::KeyUp:
+ event = GDK_KEY_RELEASE;
+ break;
+ default:
@@ -18721,10 +18609,10 @@ index 0000000000000000000000000000000000000000..bd42403cc3c6fc109a4149392ed5143e
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
-index b2182e5786ccbf955adb38e5df831e7c341046e2..75eb9665e439f1d8c1aea78461de51e08b2e52b7 100644
+index a8212baccb7e67657b12bb53c20a422f51735280..8d0614907116f4db1a4d4ee9722b451e848af457 100644
--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
-@@ -439,6 +439,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
+@@ -434,6 +434,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled)
{
@@ -18922,7 +18810,7 @@ index 0000000000000000000000000000000000000000..721826c8c98fc85b68a4f45deaee69c1
+
+#endif
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.h b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
-index 1f074d98b5b1590295ac77f878e9cc057f09cf00..961681e328394476ddd0214f96768354a02e9ee6 100644
+index a1ecd944c24e577656ff192029f0bf960ec2a73a..bd5df7c6b7ae87cdd5864a06a4a5b88299f5c085 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.h
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
@@ -53,6 +53,8 @@ class PageClientImpl final : public PageClientImplCocoa
@@ -18934,7 +18822,7 @@ index 1f074d98b5b1590295ac77f878e9cc057f09cf00..961681e328394476ddd0214f96768354
PageClientImpl(NSView *, WKWebView *);
virtual ~PageClientImpl();
-@@ -170,6 +172,9 @@ private:
+@@ -169,6 +171,9 @@ private:
void updateAcceleratedCompositingMode(const LayerTreeContext&) override;
void didFirstLayerFlush(const LayerTreeContext&) override;
@@ -18944,7 +18832,7 @@ index 1f074d98b5b1590295ac77f878e9cc057f09cf00..961681e328394476ddd0214f96768354
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) override;
void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
#if ENABLE(MAC_GESTURE_EVENTS)
-@@ -223,6 +228,10 @@ private:
+@@ -225,6 +230,10 @@ private:
void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
#endif
@@ -18956,10 +18844,10 @@ index 1f074d98b5b1590295ac77f878e9cc057f09cf00..961681e328394476ddd0214f96768354
void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&) override;
void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&) override;
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
-index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e6549244e71 100644
+index bacd760091da8a2954be7aa263fdb5cd2fb33c41..82b3b4d96e64e54ad19f6aaf519639ace1979b04 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
-@@ -81,6 +81,7 @@
+@@ -80,6 +80,7 @@
#import <WebCore/TextUndoInsertionMarkupMac.h>
#import <WebCore/ValidationBubble.h>
#import <WebCore/WebCoreCALayerExtras.h>
@@ -18967,7 +18855,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
#import <pal/spi/mac/NSApplicationSPI.h>
#import <wtf/ProcessPrivilege.h>
#import <wtf/RetainPtr.h>
-@@ -107,6 +108,13 @@ namespace WebKit {
+@@ -106,6 +107,13 @@ namespace WebKit {
using namespace WebCore;
@@ -18981,7 +18869,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
PageClientImpl::PageClientImpl(NSView *view, WKWebView *webView)
: PageClientImplCocoa(webView)
, m_view(view)
-@@ -160,6 +168,9 @@ NSWindow *PageClientImpl::activeWindow() const
+@@ -159,6 +167,9 @@ NSWindow *PageClientImpl::activeWindow() const
bool PageClientImpl::isViewWindowActive()
{
@@ -18991,7 +18879,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
NSWindow *activeViewWindow = activeWindow();
return activeViewWindow.isKeyWindow || (activeViewWindow && [NSApp keyWindow] == activeViewWindow);
-@@ -167,6 +178,9 @@ bool PageClientImpl::isViewWindowActive()
+@@ -166,6 +177,9 @@ bool PageClientImpl::isViewWindowActive()
bool PageClientImpl::isViewFocused()
{
@@ -19001,7 +18889,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
// 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)
-@@ -190,6 +204,9 @@ void PageClientImpl::makeFirstResponder()
+@@ -189,6 +203,9 @@ void PageClientImpl::makeFirstResponder()
bool PageClientImpl::isViewVisible()
{
@@ -19011,7 +18899,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
NSView *activeView = this->activeView();
NSWindow *activeViewWindow = activeWindow();
-@@ -273,7 +290,8 @@ void PageClientImpl::didRelaunchProcess()
+@@ -272,7 +289,8 @@ void PageClientImpl::didRelaunchProcess()
void PageClientImpl::preferencesDidChange()
{
@@ -19021,7 +18909,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
}
void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip)
-@@ -484,6 +502,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
+@@ -479,6 +497,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled)
{
@@ -19030,7 +18918,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
m_impl->doneWithKeyEvent(event.nativeEvent(), eventWasHandled);
}
-@@ -503,6 +523,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl
+@@ -498,6 +518,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl
RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page)
{
@@ -19039,7 +18927,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
return WebPopupMenuProxyMac::create(m_view, page);
}
-@@ -634,6 +656,12 @@ CALayer *PageClientImpl::acceleratedCompositingRootLayer() const
+@@ -629,6 +651,12 @@ CALayer *PageClientImpl::acceleratedCompositingRootLayer() const
return m_impl->acceleratedCompositingRootLayer();
}
@@ -19052,7 +18940,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
RefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(std::optional<WebCore::IntRect>&&)
{
return m_impl->takeViewSnapshot();
-@@ -806,6 +834,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
+@@ -809,6 +837,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
#endif // ENABLE(FULLSCREEN_API)
@@ -19066,7 +18954,7 @@ index 7270593ccc7a99f364d866279d7c2371f86aacae..b38012396da0b8248ccbf0b090c04e65
void PageClientImpl::navigationGestureDidBegin()
{
m_impl->dismissContentRelativeChildWindowsWithAnimation(true);
-@@ -983,6 +1018,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c
+@@ -986,6 +1021,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c
bool PageClientImpl::windowIsFrontWindowUnderMouse(const NativeWebMouseEvent& event)
{
@@ -19089,10 +18977,10 @@ index 0ff5b643de021c6c959412fe25c293fac673fb9b..39bd77283931909133ef9834b40aabae
void getContextMenuItem(const WebContextMenuItemData&, CompletionHandler<void(NSMenuItem *)>&&);
void getContextMenuFromItems(const Vector<WebContextMenuItemData>&, CompletionHandler<void(NSMenu *)>&&);
diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
-index c676e5b71241c6509e49a2c32333467fe91b0f6a..9e78fab770b75cb00ba59beed08083fd14d50d0e 100644
+index fb8e4a0ca959b3f769f7e9f2f5b61968e6348ca8..17b1b9f681763bbbac190b37befc94aa400199ad 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
-@@ -475,6 +475,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem
+@@ -478,6 +478,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem
}
#endif
@@ -19157,7 +19045,7 @@ index 0000000000000000000000000000000000000000..6113f4cd60a5d72b8ead61176cb43200
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
new file mode 100644
-index 0000000000000000000000000000000000000000..d72149eda8354890af21dcb5759db2cc2b9a5a51
+index 0000000000000000000000000000000000000000..4ec25daff6a0c75e378eb25b2f2638e2311a783c
--- /dev/null
+++ b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
@@ -0,0 +1,130 @@
@@ -19261,7 +19149,7 @@ index 0000000000000000000000000000000000000000..d72149eda8354890af21dcb5759db2cc
+ m_page.handleMouseEvent(nativeEvent);
+}
+
-+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& commands, WallTime timestamp)
++void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& commands, WallTime timestamp)
+{
+ Vector<WebCore::KeypressCommand> macCommands;
+ for (const String& command : commands) {
@@ -19292,10 +19180,10 @@ index 0000000000000000000000000000000000000000..d72149eda8354890af21dcb5759db2cc
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.h b/Source/WebKit/UIProcess/mac/WebViewImpl.h
-index 27559055327ca0fcfffe454ec7db7315d85d8419..cb330894463b251236b4b0398e741c1f29258c5f 100644
+index 271801d19884f58e43d07728623305df746ca979..d227ffddb09c4e33bdd53b2330e1b07485096bbb 100644
--- a/Source/WebKit/UIProcess/mac/WebViewImpl.h
+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.h
-@@ -511,6 +511,9 @@ public:
+@@ -512,6 +512,9 @@ public:
void provideDataForPasteboard(NSPasteboard *, NSString *type);
NSArray *namesOfPromisedFilesDroppedAtDestination(NSURL *dropDestination);
@@ -19306,10 +19194,10 @@ index 27559055327ca0fcfffe454ec7db7315d85d8419..cb330894463b251236b4b0398e741c1f
void saveBackForwardSnapshotForCurrentItem();
void saveBackForwardSnapshotForItem(WebBackForwardListItem&);
diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.mm b/Source/WebKit/UIProcess/mac/WebViewImpl.mm
-index 0ab54d753752ee2b6499851043fb520f40c3cf58..4902e816e5785b4addc04d6b156db744b32232a3 100644
+index b76ee7a59fc05e16eb1ae0b8d613d0066289768f..1aefcf3c666ae8b289062f5584780aa2b40770ce 100644
--- a/Source/WebKit/UIProcess/mac/WebViewImpl.mm
+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.mm
-@@ -2323,6 +2323,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
+@@ -2324,6 +2324,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
if (!m_colorSpace)
m_colorSpace = [NSColorSpace sRGBColorSpace];
}
@@ -19321,7 +19209,7 @@ index 0ab54d753752ee2b6499851043fb520f40c3cf58..4902e816e5785b4addc04d6b156db744
ASSERT(m_colorSpace);
return WebCore::DestinationColorSpace { [m_colorSpace CGColorSpace] };
-@@ -4335,6 +4340,18 @@ static RetainPtr<CGImageRef> takeWindowSnapshot(CGSWindowID windowID, bool captu
+@@ -4337,6 +4342,18 @@ static RetainPtr<CGImageRef> takeWindowSnapshot(CGSWindowID windowID, bool captu
return adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, windowID, imageOptions));
}
@@ -19638,7 +19526,7 @@ index 0000000000000000000000000000000000000000..0f95bc9549b3a00f9b976b4fe9140ea8
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/win/WebPageInspectorInputAgentWin.cpp b/Source/WebKit/UIProcess/win/WebPageInspectorInputAgentWin.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..9d903636ff4bec199ea9a21686375df176e65543
+index 0000000000000000000000000000000000000000..8b474c730139b44a13c9d5b2d13ee20403e3e7f3
--- /dev/null
+++ b/Source/WebKit/UIProcess/win/WebPageInspectorInputAgentWin.cpp
@@ -0,0 +1,55 @@
@@ -19677,7 +19565,7 @@ index 0000000000000000000000000000000000000000..9d903636ff4bec199ea9a21686375df1
+
+namespace WebKit {
+
-+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
++void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
+{
+ NativeWebKeyboardEvent event(
+ type,
@@ -20040,7 +19928,7 @@ index 0000000000000000000000000000000000000000..5dc76aa302cb574307059e66a1b73730
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp b/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..31a4649df8e1df36dc1116ada35c3a3364031301
+index 0000000000000000000000000000000000000000..a7d88f8c745f95af21db71dcfce368ba4832a328
--- /dev/null
+++ b/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp
@@ -0,0 +1,55 @@
@@ -20079,7 +19967,7 @@ index 0000000000000000000000000000000000000000..31a4649df8e1df36dc1116ada35c3a33
+
+namespace WebKit {
+
-+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
++void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebEventType type, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEventModifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
+{
+ NativeWebKeyboardEvent event(
+ type,
@@ -20100,10 +19988,10 @@ index 0000000000000000000000000000000000000000..31a4649df8e1df36dc1116ada35c3a33
+
+} // namespace WebKit
diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e8404bdf8 100644
+index 0c2e74b392aba509cb181c471e4362a9ccbd63ef..547d13c876ddf8dec4424260bbe1bb5713cf6c67 100644
--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-@@ -1335,6 +1335,7 @@
+@@ -1331,6 +1331,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 */; };
@@ -20111,7 +19999,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
5CAF7AA726F93AB00003F19E /* adattributiond.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CAF7AA526F93A950003F19E /* adattributiond.cpp */; };
5CAFDE452130846300B1F7E1 /* _WKInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CAFDE422130843500B1F7E1 /* _WKInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
5CAFDE472130846A00B1F7E1 /* _WKInspectorInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CAFDE442130843600B1F7E1 /* _WKInspectorInternal.h */; };
-@@ -2343,6 +2344,18 @@
+@@ -2352,6 +2353,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 */; };
@@ -20130,7 +20018,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
DF462E0F23F22F5500EFF35F /* WKHTTPCookieStorePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF462E0E23F22F5300EFF35F /* WKHTTPCookieStorePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
DF462E1223F338BE00EFF35F /* WKContentWorldPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF462E1123F338AD00EFF35F /* WKContentWorldPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
DF7A231C291B088D00B98DF3 /* WKSnapshotConfigurationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF7A231B291B088D00B98DF3 /* WKSnapshotConfigurationPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
-@@ -2404,6 +2417,8 @@
+@@ -2413,6 +2426,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 */; };
@@ -20139,7 +20027,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
E5CBA76527A318E100DF7858 /* UnifiedSource118.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5CBA76127A3187900DF7858 /* UnifiedSource118.cpp */; };
E5CBA76627A318E100DF7858 /* UnifiedSource116.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5CBA76327A3187B00DF7858 /* UnifiedSource116.cpp */; };
E5CBA76727A318E100DF7858 /* UnifiedSource119.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5CBA76027A3187900DF7858 /* UnifiedSource119.cpp */; };
-@@ -2420,6 +2435,9 @@
+@@ -2429,6 +2444,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, ); }; };
@@ -20149,7 +20037,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
F4299507270E234D0032298B /* StreamMessageReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = F4299506270E234C0032298B /* StreamMessageReceiver.h */; };
F42D634122A0EFDF00D2FB3A /* WebAutocorrectionData.h in Headers */ = {isa = PBXBuildFile; fileRef = F42D633F22A0EFD300D2FB3A /* WebAutocorrectionData.h */; };
-@@ -5620,6 +5638,7 @@
+@@ -5623,6 +5641,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>"; };
@@ -20157,7 +20045,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
5CAECB5E27465AE300AB78D0 /* UnifiedSource115.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnifiedSource115.cpp; sourceTree = "<group>"; };
5CAF7AA426F93A750003F19E /* adattributiond */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = adattributiond; sourceTree = BUILT_PRODUCTS_DIR; };
5CAF7AA526F93A950003F19E /* adattributiond.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = adattributiond.cpp; sourceTree = "<group>"; };
-@@ -7425,6 +7444,19 @@
+@@ -7455,6 +7474,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>"; };
@@ -20177,7 +20065,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
DF462E0E23F22F5300EFF35F /* WKHTTPCookieStorePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHTTPCookieStorePrivate.h; sourceTree = "<group>"; };
DF462E1123F338AD00EFF35F /* WKContentWorldPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentWorldPrivate.h; sourceTree = "<group>"; };
DF58C6311371AC5800F9A37C /* NativeWebWheelEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebWheelEvent.h; sourceTree = "<group>"; };
-@@ -7561,6 +7593,8 @@
+@@ -7587,6 +7619,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>"; };
@@ -20186,7 +20074,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
E5DEFA6726F8F42600AB68DB /* PhotosUISPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotosUISPI.h; sourceTree = "<group>"; };
EB0D312D275AE13300863D8F /* com.apple.webkit.webpushd.mac.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.webkit.webpushd.mac.plist; sourceTree = "<group>"; };
EB0D312E275AE13300863D8F /* com.apple.webkit.webpushd.ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.webkit.webpushd.ios.plist; sourceTree = "<group>"; };
-@@ -7580,6 +7614,14 @@
+@@ -7606,6 +7640,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>"; };
@@ -20201,7 +20089,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDragDestinationAction.h; sourceTree = "<group>"; };
F40D1B68220BDC0F00B49A01 /* WebAutocorrectionContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebAutocorrectionContext.h; path = ios/WebAutocorrectionContext.h; sourceTree = "<group>"; };
F41056612130699A0092281D /* APIAttachmentCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = APIAttachmentCocoa.mm; sourceTree = "<group>"; };
-@@ -7738,6 +7780,7 @@
+@@ -7766,6 +7808,7 @@
3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */,
3766F9F1189A1254003CF19B /* libicucore.dylib in Frameworks */,
7B9FC5BB28A5233B007570E7 /* libWebKitPlatform.a in Frameworks */,
@@ -20209,7 +20097,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */,
37694525184FC6B600CDE21F /* Security.framework in Frameworks */,
37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */,
-@@ -10168,6 +10211,7 @@
+@@ -10207,6 +10250,7 @@
99788ACA1F421DCA00C08000 /* _WKAutomationSessionConfiguration.mm */,
990D28A81C6404B000986977 /* _WKAutomationSessionDelegate.h */,
990D28AF1C65203900986977 /* _WKAutomationSessionInternal.h */,
@@ -20217,7 +20105,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
5C4609E222430E4C009943C2 /* _WKContentRuleListAction.h */,
5C4609E322430E4D009943C2 /* _WKContentRuleListAction.mm */,
5C4609E422430E4D009943C2 /* _WKContentRuleListActionInternal.h */,
-@@ -11291,6 +11335,7 @@
+@@ -11343,6 +11387,7 @@
E34B110C27C46BC6006D2F2E /* libWebCoreTestShim.dylib */,
E34B110F27C46D09006D2F2E /* libWebCoreTestSupport.dylib */,
DDE992F4278D06D900F60D26 /* libWebKitAdditions.a */,
@@ -20225,7 +20113,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
57A9FF15252C6AEF006A2040 /* libWTF.a */,
5750F32A2032D4E500389347 /* LocalAuthentication.framework */,
570DAAB0230273D200E8FC04 /* NearField.framework */,
-@@ -11832,6 +11877,12 @@
+@@ -11882,6 +11927,12 @@
children = (
9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */,
9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */,
@@ -20238,7 +20126,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
);
path = Agents;
sourceTree = "<group>";
-@@ -11840,6 +11891,7 @@
+@@ -11890,6 +11941,7 @@
isa = PBXGroup;
children = (
A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorUIProxyMac.mm */,
@@ -20246,7 +20134,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
1CA8B935127C774E00576C2B /* WebInspectorUIProxyMac.mm */,
99A7ACE326012919006D57FD /* WKInspectorResourceURLSchemeHandler.h */,
99A7ACE42601291A006D57FD /* WKInspectorResourceURLSchemeHandler.mm */,
-@@ -12420,6 +12472,7 @@
+@@ -12471,6 +12523,7 @@
E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */,
46A2B6061E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.cpp */,
46A2B6071E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.h */,
@@ -20254,7 +20142,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
07297F9C1C1711EA003F0735 /* DeviceIdHashSaltStorage.cpp */,
07297F9D1C17BBEA223F0735 /* DeviceIdHashSaltStorage.h */,
BC2652121182608100243E12 /* DrawingAreaProxy.cpp */,
-@@ -12436,6 +12489,8 @@
+@@ -12487,6 +12540,8 @@
2DD5A72A1EBF09A7009BA597 /* HiddenPageThrottlingAutoIncreasesCounter.h */,
839A2F2F1E2067390039057E /* HighPerformanceGraphicsUsageSampler.cpp */,
839A2F301E2067390039057E /* HighPerformanceGraphicsUsageSampler.h */,
@@ -20263,7 +20151,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
5CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */,
5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */,
31607F3819627002009B87DA /* LegacySessionStateCoding.h */,
-@@ -12470,6 +12525,7 @@
+@@ -12521,6 +12576,7 @@
1A0C227D2451130A00ED614D /* QuickLookThumbnailingSoftLink.mm */,
1AEE57232409F142002005D6 /* QuickLookThumbnailLoader.h */,
1AEE57242409F142002005D6 /* QuickLookThumbnailLoader.mm */,
@@ -20271,7 +20159,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
BC111B08112F5E3C00337BAB /* ResponsivenessTimer.cpp */,
1A30066C1110F4F70031937C /* ResponsivenessTimer.h */,
5CA98549210BEB5A0057EB6B /* SafeBrowsingWarning.h */,
-@@ -12573,6 +12629,8 @@
+@@ -12624,6 +12680,8 @@
BC7B6204129A0A6700D174A4 /* WebPageGroup.h */,
2D9EA3101A96D9EB002D2807 /* WebPageInjectedBundleClient.cpp */,
2D9EA30E1A96CBFF002D2807 /* WebPageInjectedBundleClient.h */,
@@ -20280,7 +20168,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
BC111B0B112F5E4F00337BAB /* WebPageProxy.cpp */,
BC032DCB10F4389F0058C15A /* WebPageProxy.h */,
BCBD38FA125BAB9A00D2C29F /* WebPageProxy.messages.in */,
-@@ -12732,6 +12790,7 @@
+@@ -12782,6 +12840,7 @@
BC646C1911DD399F006455B0 /* WKBackForwardListItemRef.h */,
BC646C1611DD399F006455B0 /* WKBackForwardListRef.cpp */,
BC646C1711DD399F006455B0 /* WKBackForwardListRef.h */,
@@ -20288,7 +20176,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
BCB9E24A1120E15C00A137E0 /* WKContext.cpp */,
BCB9E2491120E15C00A137E0 /* WKContext.h */,
1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */,
-@@ -13316,6 +13375,9 @@
+@@ -13362,6 +13421,9 @@
0F49294628FF0F4B00AF8509 /* DisplayLinkProcessProxyClient.h */,
31ABA79C215AF9E000C90E31 /* HighPerformanceGPUManager.h */,
31ABA79D215AF9E000C90E31 /* HighPerformanceGPUManager.mm */,
@@ -20298,7 +20186,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
1AFDE65B1954E8D500C48FFA /* LegacySessionStateCoding.cpp */,
0FCB4E5818BBE3D9000FCFC9 /* PageClientImplMac.h */,
0FCB4E5918BBE3D9000FCFC9 /* PageClientImplMac.mm */,
-@@ -13339,6 +13401,8 @@
+@@ -13385,6 +13447,8 @@
E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */,
E55CD20124D09F1F0042DB9C /* WebDateTimePickerMac.h */,
E55CD20224D09F1F0042DB9C /* WebDateTimePickerMac.mm */,
@@ -20307,7 +20195,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */,
BC5750951268F3C6006F0F12 /* WebPopupMenuProxyMac.h */,
BC5750961268F3C6006F0F12 /* WebPopupMenuProxyMac.mm */,
-@@ -14520,6 +14584,7 @@
+@@ -14566,6 +14630,7 @@
99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */,
990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */,
990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */,
@@ -20315,7 +20203,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
5C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */,
5C4609E8224317BB009943C2 /* _WKContentRuleListActionInternal.h in Headers */,
1A5704F81BE01FF400874AF1 /* _WKContextMenuElementInfo.h in Headers */,
-@@ -14790,6 +14855,7 @@
+@@ -14837,6 +14902,7 @@
E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */,
4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */,
1A5705111BE410E600874AF1 /* BlockSPI.h in Headers */,
@@ -20323,7 +20211,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
BC3065FA1259344E00E71278 /* CacheModel.h in Headers */,
935BF7FC2936BF1A00B41326 /* CacheStorageCache.h in Headers */,
934CF817294B884C00304F7D /* CacheStorageDiskStore.h in Headers */,
-@@ -15066,7 +15132,11 @@
+@@ -15115,7 +15181,11 @@
2DD45ADE1E5F8972006C355F /* InputViewUpdateDeferrer.h in Headers */,
CE550E152283752200D28791 /* InsertTextOptions.h in Headers */,
9197940523DBC4BB00257892 /* InspectorBrowserAgent.h in Headers */,
@@ -20335,7 +20223,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
A5E391FD2183C1F800C8FB31 /* InspectorTargetProxy.h in Headers */,
51E9049C27BCB9D400929E7E /* InstallCoordinationSPI.h in Headers */,
C5BCE5DF1C50766A00CDE3FA /* InteractionInformationAtPosition.h in Headers */,
-@@ -15287,6 +15357,7 @@
+@@ -15338,6 +15408,7 @@
CDAC20CA23FC2F750021DEE3 /* RemoteCDMInstanceSession.h in Headers */,
CDAC20C923FC2F750021DEE3 /* RemoteCDMInstanceSessionIdentifier.h in Headers */,
F451C0FE2703B263002BA03B /* RemoteDisplayListRecorderProxy.h in Headers */,
@@ -20343,7 +20231,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */,
2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */,
1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */,
-@@ -15339,6 +15410,7 @@
+@@ -15390,6 +15461,7 @@
E1E552C516AE065F004ED653 /* SandboxInitializationParameters.h in Headers */,
E36FF00327F36FBD004BE21A /* SandboxStateVariables.h in Headers */,
7BAB111025DD02B3008FC479 /* ScopedActiveMessageReceiveQueue.h in Headers */,
@@ -20351,7 +20239,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
E4D54D0421F1D72D007E3C36 /* ScrollingTreeFrameScrollingNodeRemoteIOS.h in Headers */,
0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */,
0F931C1C18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h in Headers */,
-@@ -15705,6 +15777,8 @@
+@@ -15760,6 +15832,8 @@
2D9EA30F1A96CBFF002D2807 /* WebPageInjectedBundleClient.h in Headers */,
9197940823DBC4CB00257892 /* WebPageInspectorAgentBase.h in Headers */,
A513F5402154A5D700662841 /* WebPageInspectorController.h in Headers */,
@@ -20360,7 +20248,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
A543E30C215C8A8D00279CD9 /* WebPageInspectorTarget.h in Headers */,
A543E30D215C8A9000279CD9 /* WebPageInspectorTargetController.h in Headers */,
A543E307215AD13700279CD9 /* WebPageInspectorTargetFrontendChannel.h in Headers */,
-@@ -17937,6 +18011,8 @@
+@@ -17840,6 +17914,8 @@
51E9049727BCB3D900929E7E /* ICAppBundle.mm in Sources */,
2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */,
2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */,
@@ -20369,7 +20257,7 @@ index 3994fd549d923065cb2be29998f75d3989105161..7d4427a3aa361d5e45bfe31abf61c16e
B6114A7F29394A1600380B1B /* JSWebExtensionAPIEvent.mm in Sources */,
1C5DC471290B33A20061EC62 /* JSWebExtensionAPIExtension.mm in Sources */,
1C5DC4552908AC900061EC62 /* JSWebExtensionAPINamespace.mm in Sources */,
-@@ -18304,6 +18380,8 @@
+@@ -18210,6 +18286,8 @@
E3816B3D27E2463A005EAFC0 /* WebMockContentFilterManager.cpp in Sources */,
31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,
2DF6FE52212E110900469030 /* WebPage.cpp in Sources */,
@@ -20567,10 +20455,10 @@ index f6cbdb00920e43b98b43f153797d60a622f113dc..6d1a6fb19056a6c87d8900c8022efc42
auto permissionHandlers = m_requestsPerOrigin.take(securityOrigin);
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-index 4d6de0ce520acfe3bfad5ced87fed99e170450c2..e6e29252abec5af5a65c0a16fa12167ffb3b569a 100644
+index 9fec42eb30f877699590917608eb9f58253817c4..71d595f311eba04db546d24799a175bb8d6f2752 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-@@ -425,6 +425,8 @@ void WebChromeClient::setResizable(bool resizable)
+@@ -442,6 +442,8 @@ void WebChromeClient::setResizable(bool resizable)
void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID)
{
@@ -20607,10 +20495,10 @@ index 2eb0886f13ed035a53b8eaa60605de4dfe53fbe3..c46393209cb4f80704bbc9268fad4371
{
}
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
-index fc875a316cb999d070e6b005cfe1eb4ea6e0f2e6..7f0111a31802c82a19d07c20187a1c46ed489e80 100644
+index d42d4ae6249d0a6f20b46cc801167d4c4eb47354..3bee1daeab75b67d682d71c7f7146a3dfde2f644 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
-@@ -1604,13 +1604,6 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
+@@ -1661,13 +1661,6 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
if (webPage->scrollPinningBehavior() != DoNotPin)
view->setScrollPinningBehavior(webPage->scrollPinningBehavior());
@@ -20877,7 +20765,7 @@ index 45e4bbd8225e738453a4fa2d8238874ceb03d9de..fa1ecdd2ea661014f6f8eded307db1a7
#if USE(COORDINATED_GRAPHICS)
void layerFlushTimerFired();
diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp b/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp
-index bae8ecf95094d558075e990a23efc42d2919bd4c..928e32f9e10ca660297a93330a86b2564d735a68 100644
+index 19870d671df40a96d42ab0f531f34f6421695c07..b823ea19a055278d49091ea3cea801869e9a68d9 100644
--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp
+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp
@@ -27,6 +27,7 @@
@@ -20888,7 +20776,7 @@ index bae8ecf95094d558075e990a23efc42d2919bd4c..928e32f9e10ca660297a93330a86b256
#include "WebPage.h"
#include "WebPageCreationParameters.h"
#include "WebProcess.h"
-@@ -104,6 +105,13 @@ void DrawingArea::tryMarkLayersVolatile(CompletionHandler<void(bool)>&& completi
+@@ -107,6 +108,13 @@ void DrawingArea::tryMarkLayersVolatile(CompletionHandler<void(bool)>&& completi
completionFunction(true);
}
@@ -20903,10 +20791,10 @@ index bae8ecf95094d558075e990a23efc42d2919bd4c..928e32f9e10ca660297a93330a86b256
{
if (m_hasRemovedMessageReceiver)
diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.h b/Source/WebKit/WebProcess/WebPage/DrawingArea.h
-index 43a414296c3a3d47816642c49b833ac7e83ab08b..7bc035ee52b40b5b1adde8509b6b7d51baaf07b2 100644
+index 1448c01075177b671b84be0c937e5ea39efe2cb2..caa5ad2d88fa6eb841cb8d4b4aa33eab3b86d478 100644
--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.h
+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.h
-@@ -158,6 +158,9 @@ public:
+@@ -156,6 +156,9 @@ public:
virtual void didChangeViewportAttributes(WebCore::ViewportAttributes&&) = 0;
virtual void deviceOrPageScaleFactorChanged() = 0;
#endif
@@ -20987,10 +20875,10 @@ index f127d64d005ab7b93875591b94a5899205e91579..df0de26e4dc449a0fbf93e7037444df4
uint64_t m_navigationID;
};
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7db31cee78 100644
+index d3142de521b47ba96b67a6b00b7bc8d44b841002..8925ef6cc0c41484dbeb2da51787457667606de5 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-@@ -224,6 +224,7 @@
+@@ -225,6 +225,7 @@
#include <WebCore/PingLoader.h>
#include <WebCore/PlatformKeyboardEvent.h>
#include <WebCore/PlatformMediaSessionManager.h>
@@ -20998,7 +20886,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
#include <WebCore/PlatformStrategies.h>
#include <WebCore/PluginDocument.h>
#include <WebCore/PointerCaptureController.h>
-@@ -979,6 +980,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
+@@ -971,6 +972,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
sandbox_enable_state_flag("LockdownModeEnabled", *auditToken);
#endif // HAVE(SANDBOX_STATE_FLAGS)
@@ -21008,7 +20896,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
updateThrottleState();
#if ENABLE(ACCESSIBILITY_ANIMATION_CONTROL)
updateImageAnimationEnabled();
-@@ -1745,6 +1749,22 @@ void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParamet
+@@ -1732,6 +1736,22 @@ void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParamet
}
#endif
@@ -21031,7 +20919,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
void WebPage::loadRequest(LoadParameters&& loadParameters)
{
WEBPAGE_RELEASE_LOG(Loading, "loadRequest: navigationID=%" PRIu64 ", shouldTreatAsContinuingLoad=%u, lastNavigationWasAppInitiated=%d, existingNetworkResourceLoadIdentifierToResume=%" PRIu64, loadParameters.navigationID, static_cast<unsigned>(loadParameters.shouldTreatAsContinuingLoad), loadParameters.request.isAppInitiated(), valueOrDefault(loadParameters.existingNetworkResourceLoadIdentifierToResume).toUInt64());
-@@ -1991,17 +2011,13 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
+@@ -1978,17 +1998,13 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
view->resize(viewSize);
m_drawingArea->setNeedsDisplay();
@@ -21050,7 +20938,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
// Viewport properties have no impact on zero sized fixed viewports.
if (m_viewSize.isEmpty())
-@@ -2018,20 +2034,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -2005,20 +2021,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
@@ -21078,7 +20966,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
#if USE(COORDINATED_GRAPHICS)
m_drawingArea->didChangeViewportAttributes(WTFMove(attr));
-@@ -2039,7 +2053,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -2026,7 +2040,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
send(Messages::WebPageProxy::DidChangeViewportProperties(attr));
#endif
}
@@ -21086,7 +20974,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
void WebPage::scrollMainFrameIfNotAtMaxScrollPosition(const IntSize& scrollOffset)
{
-@@ -2324,6 +2337,7 @@ void WebPage::scaleView(double scale)
+@@ -2311,6 +2324,7 @@ void WebPage::scaleView(double scale)
}
m_page->setViewScaleFactor(scale);
@@ -21094,7 +20982,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
scalePage(pageScale, scrollPositionAtNewScale);
}
-@@ -2503,17 +2517,13 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
+@@ -2490,17 +2504,13 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
viewportConfigurationChanged();
#endif
@@ -21113,9 +21001,9 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
}
void WebPage::listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone> milestones)
-@@ -3426,6 +3436,92 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
+@@ -3422,6 +3432,92 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
- send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(touchEvent.type()), handled));
+ send(Messages::WebPageProxy::DidReceiveEvent(touchEvent.type(), handled));
}
+
+void WebPage::fakeTouchTap(const WebCore::IntPoint& position, uint8_t modifiers, CompletionHandler<void()>&& completionHandler)
@@ -21139,7 +21027,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
+ WebPlatformTouchPoint::TouchPointState state = WebPlatformTouchPoint::TouchPointState::TouchPressed;
+ touchPoints.append(WebPlatformTouchPoint(id, state, screenPosition, position, radius, rotationAngle, force));
+
-+ WebTouchEvent touchEvent({WebEvent::TouchStart, eventModifiers, WallTime::now()}, WTFMove(touchPoints));
++ WebTouchEvent touchEvent({WebEventType::TouchStart, eventModifiers, WallTime::now()}, WTFMove(touchPoints));
+
+ CurrentEvent currentEvent(touchEvent);
+ handled = handleTouchEvent(touchEvent, m_page.get());
@@ -21149,7 +21037,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
+ WebPlatformTouchPoint::TouchPointState state = WebPlatformTouchPoint::TouchPointState::TouchReleased;
+ touchPoints.append(WebPlatformTouchPoint(id, state, screenPosition, position, radius, rotationAngle, force));
+
-+ WebTouchEvent touchEvent({WebEvent::TouchEnd, eventModifiers, WallTime::now()}, WTFMove(touchPoints));
++ WebTouchEvent touchEvent({WebEventType::TouchEnd, eventModifiers, WallTime::now()}, WTFMove(touchPoints));
+
+ CurrentEvent currentEvent(touchEvent);
+ handled = handleTouchEvent(touchEvent, m_page.get()) || handled;
@@ -21206,7 +21094,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
#endif
void WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint)
-@@ -3502,6 +3598,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
+@@ -3498,6 +3594,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
m_inspectorTargetController->sendMessageToTargetBackend(targetId, message);
}
@@ -21218,7 +21106,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
void WebPage::insertNewlineInQuotedContent()
{
Ref frame = CheckedRef(m_page->focusController())->focusedOrMainFrame();
-@@ -3734,6 +3835,7 @@ void WebPage::didCompletePageTransition()
+@@ -3730,6 +3831,7 @@ void WebPage::didCompletePageTransition()
void WebPage::show()
{
send(Messages::WebPageProxy::ShowPage());
@@ -21226,7 +21114,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
}
void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension)
-@@ -4690,7 +4792,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
+@@ -4686,7 +4788,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
#if ENABLE(DRAG_SUPPORT)
@@ -21235,7 +21123,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
void WebPage::performDragControllerAction(DragControllerAction action, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> draggingSourceOperationMask, SelectionData&& selectionData, OptionSet<DragApplicationFlags> flags)
{
if (!m_page) {
-@@ -7146,6 +7248,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRe
+@@ -7158,6 +7260,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRe
WebsitePoliciesData::applyToDocumentLoader(WTFMove(*m_pendingWebsitePolicies), documentLoader);
m_pendingWebsitePolicies = std::nullopt;
}
@@ -21246,7 +21134,7 @@ index 55b6e29d891a86b58b75fdc4423f254bcdca3382..269e82feccabebfcce7b6dac1c846a7d
return documentLoader;
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h
-index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340ce2c3d35c 100644
+index 4f454e2994abeccdea7fbf4f47a650ccaa8199ea..201491952828bcd70352dec04d05686ea372eeca 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h
@@ -121,6 +121,10 @@
@@ -21260,7 +21148,7 @@ index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340c
#if PLATFORM(GTK) || PLATFORM(WPE)
#include "InputMethodState.h"
#endif
-@@ -1039,11 +1043,11 @@ public:
+@@ -1047,11 +1051,11 @@ public:
void clearSelection();
void restoreSelectionInFocusedEditableElement();
@@ -21274,7 +21162,7 @@ index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340c
void performDragControllerAction(DragControllerAction, WebCore::DragData&&, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&);
#endif
-@@ -1057,6 +1061,9 @@ public:
+@@ -1065,6 +1069,9 @@ public:
void didStartDrag();
void dragCancelled();
OptionSet<WebCore::DragSourceAction> allowedDragSourceActions() const { return m_allowedDragSourceActions; }
@@ -21284,7 +21172,7 @@ index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340c
#endif
void beginPrinting(WebCore::FrameIdentifier, const PrintInfo&);
-@@ -1298,6 +1305,7 @@ public:
+@@ -1303,6 +1310,7 @@ public:
void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType);
void disconnectInspector(const String& targetId);
void sendMessageToTargetBackend(const String& targetId, const String& message);
@@ -21292,7 +21180,7 @@ index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340c
void insertNewlineInQuotedContent();
-@@ -1712,6 +1720,7 @@ private:
+@@ -1722,6 +1730,7 @@ private:
// Actions
void tryClose(CompletionHandler<void(bool)>&&);
void platformDidReceiveLoadParameters(const LoadParameters&);
@@ -21300,7 +21188,7 @@ index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340c
void loadRequest(LoadParameters&&);
[[noreturn]] void loadRequestWaitingForProcessLaunch(LoadParameters&&, URL&&, WebPageProxyIdentifier, bool);
void loadData(LoadParameters&&);
-@@ -1749,6 +1758,7 @@ private:
+@@ -1759,6 +1768,7 @@ private:
void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);
#elif ENABLE(TOUCH_EVENTS)
void touchEvent(const WebTouchEvent&);
@@ -21308,7 +21196,7 @@ index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340c
#endif
void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);
-@@ -1894,9 +1904,7 @@ private:
+@@ -1904,9 +1914,7 @@ private:
void addLayerForFindOverlay(CompletionHandler<void(WebCore::GraphicsLayer::PlatformLayerID)>&&);
void removeLayerForFindOverlay(CompletionHandler<void()>&&);
@@ -21318,7 +21206,7 @@ index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340c
void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
void setTextForActivePopupMenu(int32_t index);
-@@ -2443,6 +2451,7 @@ private:
+@@ -2448,6 +2456,7 @@ private:
UserActivity m_userActivity;
uint64_t m_pendingNavigationID { 0 };
@@ -21327,7 +21215,7 @@ index 0330cc32c8a0d8fa9ddcfb87b4c06d30e88af0a9..772cf50483eac52dbda824985f20340c
bool m_mainFrameProgressCompleted { false };
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-index 39f3677a8ae64394523d9f75c5bb3a0d3fa2f27e..2d0bc40d83a1fb532decb8ab560dc5e4cc40174d 100644
+index 2261be7e05aede84ac7b18f67e8dfe08da78f55a..3d788722dace82bc1d34de2a96e13da97217e455 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
@@ -146,6 +146,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
@@ -21379,7 +21267,7 @@ index 39f3677a8ae64394523d9f75c5bb3a0d3fa2f27e..2d0bc40d83a1fb532decb8ab560dc5e4
RequestDragStart(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragSourceAction> allowedActionsMask)
RequestAdditionalItemsForDragSession(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragSourceAction> allowedActionsMask)
diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
-index 2c54db78b995c1ef1e5d678f4f6f609a11de1108..a604179c3db130eb4371b756627cc00ffce8e553 100644
+index f37cdd55c72bab3742cbcdadd8fbc25365a61c92..e8fd9f15cce741d472d6c76aaa8b83e6baa27449 100644
--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
@@ -791,21 +791,37 @@ String WebPage::platformUserAgent(const URL&) const
@@ -21421,7 +21309,7 @@ index 2c54db78b995c1ef1e5d678f4f6f609a11de1108..a604179c3db130eb4371b756627cc00f
}
diff --git a/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp b/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
-index 2f83b4b4cc246eec07b7200c0bde3fd0e4b28ac1..29f7e89143449039efe558b1e0a3f0711c915e45 100644
+index 4d8fbc9ad1ed1f45081608e485a605640dedae34..a0110028fc3651f9370f3904097d0853c5205896 100644
--- a/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
+++ b/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
@@ -43,6 +43,7 @@
@@ -21471,7 +21359,7 @@ index 2f83b4b4cc246eec07b7200c0bde3fd0e4b28ac1..29f7e89143449039efe558b1e0a3f071
}
diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp
-index abd97ee3dd7e13179804820ef91d3592b2e54134..fe8f3324d324688b6c38f94611f0905a15630f01 100644
+index 1b0dd53bc4f7b1fc8c9e8dfcb0706997012a973d..769998478c9b6ef1b37a471e140ed1fc7496a9d5 100644
--- a/Source/WebKit/WebProcess/WebProcess.cpp
+++ b/Source/WebKit/WebProcess/WebProcess.cpp
@@ -94,6 +94,7 @@
@@ -21482,7 +21370,7 @@ index abd97ee3dd7e13179804820ef91d3592b2e54134..fe8f3324d324688b6c38f94611f0905a
#include <JavaScriptCore/JSLock.h>
#include <JavaScriptCore/MemoryStatistics.h>
#include <JavaScriptCore/WasmFaultSignalHandler.h>
-@@ -367,6 +368,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter
+@@ -377,6 +378,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter
platformInitializeProcess(parameters);
updateCPULimit();
@@ -21507,10 +21395,10 @@ index 8987c3964a9308f2454759de7f8972215a3ae416..bcac0afeb94ed8123d1f9fb0b932c849
SetProcessDPIAware();
return true;
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-index ec7085326a8e30c8a1a20f1ca33a3d875aaccc7b..52c855345447f5268fc4a1d65833f21b6d69d3b1 100644
+index 66ec23e36408d55f8834f5d819eb909d3823f131..14e0aa04e5dca743b41d6ec6560547bbf34ecc17 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-@@ -4203,7 +4203,7 @@ - (void)mouseDown:(WebEvent *)event
+@@ -4210,7 +4210,7 @@ - (void)mouseDown:(WebEvent *)event
_private->handlingMouseDownEvent = NO;
}
@@ -21520,7 +21408,7 @@ index ec7085326a8e30c8a1a20f1ca33a3d875aaccc7b..52c855345447f5268fc4a1d65833f21b
- (void)touch:(WebEvent *)event
{
diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm
-index 75ac4aacf4e763f2910d397ef9626211a360de4d..854713f52cddc83ca79f60657ebf73e2fdb50a65 100644
+index fead8163f58b25b8d6e25e019d5b3d0e86ac3c53..38975c82f5a18d6e1fb53a1b9e36e77d02b193e7 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -4027,7 +4027,7 @@ + (void)_doNotStartObservingNetworkReachability
@@ -21573,7 +21461,7 @@ index 0000000000000000000000000000000000000000..dd6a53e2d57318489b7e49dd7373706d
+ LIBVPX_LIBRARIES
+)
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
-index 9ea0aa1b2fba32f68a04ccb77e14ebfba5fd594c..51253214e663c1dc2b03e23a87714893de40acdf 100644
+index e2da8539b4da21628d3f6669bed9ce75f612de80..4e4f350694148eb8765877e8c9993bc11693640b 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
@@ -21590,7 +21478,7 @@ index 9ea0aa1b2fba32f68a04ccb77e14ebfba5fd594c..51253214e663c1dc2b03e23a87714893
find_package(Cairo 1.14.0 REQUIRED)
find_package(Fontconfig 2.8.0 REQUIRED)
find_package(Freetype 2.4.2 REQUIRED)
-@@ -34,6 +39,10 @@ find_package(EGL)
+@@ -33,6 +38,10 @@ find_package(EGL)
find_package(OpenGL)
find_package(OpenGLES2)
@@ -21601,12 +21489,8 @@ index 9ea0aa1b2fba32f68a04ccb77e14ebfba5fd594c..51253214e663c1dc2b03e23a87714893
include(GStreamerDefinitions)
SET_AND_EXPOSE_TO_BUILD(USE_CAIRO TRUE)
-@@ -67,16 +76,16 @@ WEBKIT_OPTION_DEFINE(ENABLE_JOURNALD_LOG "Whether to enable journald logging" PU
- WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ON)
- WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ON)
+@@ -68,13 +77,13 @@ WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wa
WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ON)
--WEBKIT_OPTION_DEFINE(USE_AVIF "Whether to enable support for AVIF images." PUBLIC ON)
-+WEBKIT_OPTION_DEFINE(USE_AVIF "Whether to enable support for AVIF images." PUBLIC OFF)
WEBKIT_OPTION_DEFINE(USE_GBM "Whether to enable usage of GBM and libdrm." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_GTK4 "Whether to enable usage of GTK4 instead of GTK3." PUBLIC OFF)
-WEBKIT_OPTION_DEFINE(USE_JPEGXL "Whether to enable support for JPEG-XL images." PUBLIC ${ENABLE_EXPERIMENTAL_FEATURES})
@@ -21620,8 +21504,8 @@ index 9ea0aa1b2fba32f68a04ccb77e14ebfba5fd594c..51253214e663c1dc2b03e23a87714893
+WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON)
- # Private options specific to the GTK port. Changing these options is
-@@ -123,9 +132,9 @@ endif ()
+ WEBKIT_OPTION_DEPEND(ENABLE_DOCUMENTATION ENABLE_INTROSPECTION)
+@@ -120,15 +129,15 @@ endif ()
# without approval from a GTK reviewer. There must be strong reason to support
# changing the value of the option.
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT PUBLIC ON)
@@ -21633,16 +21517,23 @@ index 9ea0aa1b2fba32f68a04ccb77e14ebfba5fd594c..51253214e663c1dc2b03e23a87714893
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPELLCHECK PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CRYPTO PUBLIC ON)
-@@ -155,7 +164,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_TIME PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBDRIVER PUBLIC ON)
+
+-WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_AVIF PUBLIC ON)
++WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_AVIF PUBLIC OFF)
+
+ # Private options shared with other WebKit ports. Add options here when
+ # we need a value different from the default defined in WebKitFeatures.cmake.
+@@ -154,7 +163,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_TIME PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_WEEK PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TRACKING_PREVENTION PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LAYER_BASED_SVG_ENGINE PRIVATE ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE OFF)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION_PLAYLIST PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON)
-@@ -168,7 +177,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION P
+@@ -167,7 +176,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION P
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS_IN_WORKERS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
@@ -21652,8 +21543,8 @@ index 9ea0aa1b2fba32f68a04ccb77e14ebfba5fd594c..51253214e663c1dc2b03e23a87714893
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_POINTER_LOCK PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ON)
@@ -177,6 +186,15 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_API_STATISTICS PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CODECS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL2 PRIVATE USE_OPENGL_OR_ES)
+# Playwright
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_APPLICATION_MANIFEST PRIVATE ON)
@@ -21667,7 +21558,7 @@ index 9ea0aa1b2fba32f68a04ccb77e14ebfba5fd594c..51253214e663c1dc2b03e23a87714893
include(GStreamerDependencies)
# Finalize the value for all options. Do not attempt to use an option before
-@@ -285,6 +303,7 @@ if (NOT EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
+@@ -292,6 +310,7 @@ if (NOT EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
endif ()
SET_AND_EXPOSE_TO_BUILD(USE_ATSPI ${ENABLE_ACCESSIBILITY})
@@ -21676,7 +21567,7 @@ index 9ea0aa1b2fba32f68a04ccb77e14ebfba5fd594c..51253214e663c1dc2b03e23a87714893
SET_AND_EXPOSE_TO_BUILD(HAVE_OS_DARK_MODE_SUPPORT 1)
diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake
-index 12bed350a4657abcf5c390e7630e20a2a336419f..72d838e3ef769bac22d5fad12d0e2e833b0a8e50 100644
+index cf7adc888b962db99862c6ad217993994a7bfa66..a5724fca3c0a5af77084b269a1ad268ab0ed3509 100644
--- a/Source/cmake/OptionsWPE.cmake
+++ b/Source/cmake/OptionsWPE.cmake
@@ -9,8 +9,13 @@ if (${CMAKE_VERSION} VERSION_LESS "3.20" AND NOT ${CMAKE_GENERATOR} STREQUAL "Ni
@@ -21693,7 +21584,7 @@ index 12bed350a4657abcf5c390e7630e20a2a336419f..72d838e3ef769bac22d5fad12d0e2e83
find_package(Cairo 1.14.0 REQUIRED)
find_package(Fontconfig 2.8.0 REQUIRED)
find_package(Freetype 2.4.2 REQUIRED)
-@@ -42,7 +47,7 @@ include(GStreamerDefinitions)
+@@ -41,12 +46,12 @@ include(GStreamerDefinitions)
# changing the value of the option.
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCESSIBILITY PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ENCRYPTED_MEDIA PUBLIC ${ENABLE_EXPERIMENTAL_FEATURES})
@@ -21702,25 +21593,31 @@ index 12bed350a4657abcf5c390e7630e20a2a336419f..72d838e3ef769bac22d5fad12d0e2e83
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBDRIVER PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CRYPTO PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_XSLT PUBLIC ON)
-@@ -62,7 +67,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GPU_PROCESS PRIVATE OFF)
+
+-WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_AVIF PUBLIC ON)
++WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_AVIF PUBLIC OFF)
+
+ # Private options shared with other WebKit ports. Add options here only if
+ # we need a value different from the default defined in WebKitFeatures.cmake.
+@@ -63,7 +68,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GPU_PROCESS PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TRACKING_PREVENTION PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LAYER_BASED_SVG_ENGINE PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_CONTEXT_MENUS PRIVATE ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE OFF)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION_PLAYLIST PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON)
-@@ -76,7 +81,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS_IN_WORKERS PRIVATE ${EN
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PERIODIC_MEMORY_MONITOR PRIVATE ON)
+@@ -78,7 +83,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PERIODIC_MEMORY_MONITOR PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHAREABLE_RESOURCE PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPEECH_SYNTHESIS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_THUNDER PRIVATE ${ENABLE_DEVELOPER_MODE})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_THUNDER PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CODECS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL2 PRIVATE ON)
-@@ -86,19 +91,36 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90)
+@@ -88,18 +93,35 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PUBLIC ON)
endif ()
@@ -21750,9 +21647,7 @@ index 12bed350a4657abcf5c390e7630e20a2a336419f..72d838e3ef769bac22d5fad12d0e2e83
-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_1_1_API "Whether to build WPE 1.1 instead of WPE 2.0" PUBLIC OFF)
--WEBKIT_OPTION_DEFINE(USE_AVIF "Whether to enable support for AVIF images." PUBLIC ON)
-WEBKIT_OPTION_DEFINE(USE_JPEGXL "Whether to enable support for JPEG-XL images." PUBLIC ${ENABLE_EXPERIMENTAL_FEATURES})
-+WEBKIT_OPTION_DEFINE(USE_AVIF "Whether to enable support for AVIF images." PUBLIC OFF)
+WEBKIT_OPTION_DEFINE(USE_JPEGXL "Whether to enable support for JPEG-XL images." PUBLIC OFF)
WEBKIT_OPTION_DEFINE(USE_LCMS "Whether to enable support for image color management using libcms2." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON)
@@ -21762,7 +21657,7 @@ index 12bed350a4657abcf5c390e7630e20a2a336419f..72d838e3ef769bac22d5fad12d0e2e83
# Private options specific to the WPE port.
diff --git a/Source/cmake/OptionsWin.cmake b/Source/cmake/OptionsWin.cmake
-index 79e4e9c1f7ab709fd3369435f52f9b427c761121..05b665cd27354499a422c052c460310bc7222aff 100644
+index cef1f0911788124c8c32c892308f63af11878887..018ad0d0c39503f4b74dc44979e37d6f1e53d665 100644
--- a/Source/cmake/OptionsWin.cmake
+++ b/Source/cmake/OptionsWin.cmake
@@ -7,8 +7,9 @@ add_definitions(-D_WINDOWS -DWINVER=0x601 -D_WIN32_WINNT=0x601)
@@ -21796,7 +21691,7 @@ index 79e4e9c1f7ab709fd3369435f52f9b427c761121..05b665cd27354499a422c052c460310b
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO PUBLIC ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBASSEMBLY PRIVATE OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO PUBLIC OFF)
-@@ -90,6 +88,16 @@ if (${WTF_PLATFORM_WIN_CAIRO})
+@@ -89,6 +87,16 @@ if (${WTF_PLATFORM_WIN_CAIRO})
# No support planned
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
@@ -21814,7 +21709,7 @@ index 79e4e9c1f7ab709fd3369435f52f9b427c761121..05b665cd27354499a422c052c460310b
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)
else ()
diff --git a/Source/cmake/OptionsWinCairo.cmake b/Source/cmake/OptionsWinCairo.cmake
-index 8ee72e595446961e3ee47105eaebe99d7d47d0ca..be6fb810c4b811a0261646caabb93b23a9e77d54 100644
+index 8ee72e595446961e3ee47105eaebe99d7d47d0ca..b35401f3dd50d14653502f4392ed990e76cf0753 100644
--- a/Source/cmake/OptionsWinCairo.cmake
+++ b/Source/cmake/OptionsWinCairo.cmake
@@ -40,19 +40,41 @@ if (OpenJPEG_FOUND)
@@ -21871,7 +21766,7 @@ index 8ee72e595446961e3ee47105eaebe99d7d47d0ca..be6fb810c4b811a0261646caabb93b23
- SET_AND_EXPOSE_TO_BUILD(USE_CF ON)
- find_package(Apple REQUIRED COMPONENTS CoreFoundation)
-endif ()
-+set(COREFOUNDATION_LIBRARY CFlite)
++find_package(Apple REQUIRED COMPONENTS CoreFoundation)
add_definitions(-DWTF_PLATFORM_WIN_CAIRO=1)
add_definitions(-DNOCRYPT)
@@ -21889,10 +21784,31 @@ index 074fdf58bcbdcf1b11b89de925bd69bdac90ed62..2bf423fa13ab2b48fbc06b2dc2a13d94
if (MSVC)
set(FATAL_WARNINGS_FLAG /WX)
diff --git a/Tools/MiniBrowser/gtk/BrowserTab.c b/Tools/MiniBrowser/gtk/BrowserTab.c
-index f46c5321ee891d7bff9fe7832ec03ec4b65f967a..976cf04297795519b4c0a1f9b5a03955b0250c81 100644
+index 7a3f10169eb402c5158b37adbf75c27f70e2018a..3a7f919e0ed5a5f36cd57af2c26e8352e86d69a5 100644
--- a/Tools/MiniBrowser/gtk/BrowserTab.c
+++ b/Tools/MiniBrowser/gtk/BrowserTab.c
-@@ -158,6 +158,11 @@ static void loadChanged(WebKitWebView *webView, WebKitLoadEvent loadEvent, Brows
+@@ -122,13 +122,16 @@ static gboolean decidePolicy(WebKitWebView *webView, WebKitPolicyDecision *decis
+ return FALSE;
+
+ WebKitResponsePolicyDecision *responseDecision = WEBKIT_RESPONSE_POLICY_DECISION(decision);
+- if (webkit_response_policy_decision_is_mime_type_supported(responseDecision))
+- return FALSE;
+-
+ if (!webkit_response_policy_decision_is_main_frame_main_resource(responseDecision))
+ return FALSE;
+
+- webkit_policy_decision_download(decision);
++ const gchar* mimeType = webkit_uri_response_get_mime_type(webkit_response_policy_decision_get_response(responseDecision));
++ if (!webkit_response_policy_decision_is_mime_type_supported(responseDecision) && mimeType && mimeType[0] != '\0') {
++ webkit_policy_decision_download(decision);
++ return TRUE;
++ }
++
++ webkit_policy_decision_use(decision);
+ return TRUE;
+ }
+
+@@ -158,6 +161,11 @@ static void loadChanged(WebKitWebView *webView, WebKitLoadEvent loadEvent, Brows
#endif
}
@@ -21904,7 +21820,7 @@ index f46c5321ee891d7bff9fe7832ec03ec4b65f967a..976cf04297795519b4c0a1f9b5a03955
static GtkWidget *createInfoBarQuestionMessage(const char *title, const char *text)
{
GtkWidget *dialog = gtk_info_bar_new_with_buttons("No", GTK_RESPONSE_NO, "Yes", GTK_RESPONSE_YES, NULL);
-@@ -705,6 +710,7 @@ static void browserTabConstructed(GObject *gObject)
+@@ -705,6 +713,7 @@ static void browserTabConstructed(GObject *gObject)
g_signal_connect(tab->webView, "notify::is-loading", G_CALLBACK(isLoadingChanged), tab);
g_signal_connect(tab->webView, "decide-policy", G_CALLBACK(decidePolicy), tab);
g_signal_connect(tab->webView, "load-changed", G_CALLBACK(loadChanged), tab);
@@ -21912,7 +21828,7 @@ index f46c5321ee891d7bff9fe7832ec03ec4b65f967a..976cf04297795519b4c0a1f9b5a03955
g_signal_connect(tab->webView, "load-failed-with-tls-errors", G_CALLBACK(loadFailedWithTLSerrors), tab);
g_signal_connect(tab->webView, "permission-request", G_CALLBACK(decidePermissionRequest), tab);
g_signal_connect(tab->webView, "run-color-chooser", G_CALLBACK(runColorChooserCallback), tab);
-@@ -755,6 +761,9 @@ static char *getInternalURI(const char *uri)
+@@ -754,6 +763,9 @@ static char *getInternalURI(const char *uri)
if (g_str_has_prefix(uri, "about:") && !g_str_equal(uri, "about:blank"))
return g_strconcat(BROWSER_ABOUT_SCHEME, uri + strlen ("about"), NULL);
@@ -21923,10 +21839,10 @@ index f46c5321ee891d7bff9fe7832ec03ec4b65f967a..976cf04297795519b4c0a1f9b5a03955
}
diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.c b/Tools/MiniBrowser/gtk/BrowserWindow.c
-index 881609c9fe8f2b5ed6158a5972438c14fd650cf5..566568382a2983a8a823cf0a0cf2634a9848d607 100644
+index 9a7de085e42e18cbbe52786eda418be8c90a38ba..e8b154bc4ab1b6e6f706ee27505b3e5514c860c7 100644
--- a/Tools/MiniBrowser/gtk/BrowserWindow.c
+++ b/Tools/MiniBrowser/gtk/BrowserWindow.c
-@@ -70,7 +70,7 @@ struct _BrowserWindowClass {
+@@ -73,7 +73,7 @@ struct _BrowserWindowClass {
GtkApplicationWindowClass parent;
};
@@ -21935,7 +21851,7 @@ index 881609c9fe8f2b5ed6158a5972438c14fd650cf5..566568382a2983a8a823cf0a0cf2634a
static const gdouble minimumZoomLevel = 0.5;
static const gdouble maximumZoomLevel = 3;
static const gdouble defaultZoomLevel = 1;
-@@ -154,13 +154,11 @@ static void webViewURIChanged(WebKitWebView *webView, GParamSpec *pspec, Browser
+@@ -157,17 +157,11 @@ static void webViewURIChanged(WebKitWebView *webView, GParamSpec *pspec, Browser
static void webViewTitleChanged(WebKitWebView *webView, GParamSpec *pspec, BrowserWindow *window)
{
const char *title = webkit_web_view_get_title(webView);
@@ -21945,14 +21861,18 @@ index 881609c9fe8f2b5ed6158a5972438c14fd650cf5..566568382a2983a8a823cf0a0cf2634a
- char *privateTitle = NULL;
- if (webkit_web_view_is_controlled_by_automation(webView))
- privateTitle = g_strdup_printf("[Automation] %s", title);
+-#if GTK_CHECK_VERSION(3, 98, 0)
+- else if (webkit_network_session_is_ephemeral(webkit_web_view_get_network_session(webView)))
+-#else
- else if (webkit_web_view_is_ephemeral(webView))
+-#endif
- privateTitle = g_strdup_printf("[Private] %s", title);
+ else
+ privateTitle = g_strdup_printf("🎭 Playwright: %s", title);
gtk_window_set_title(GTK_WINDOW(window), privateTitle ? privateTitle : title);
g_free(privateTitle);
}
-@@ -493,8 +491,12 @@ static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision
+@@ -504,8 +498,12 @@ static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision
return FALSE;
WebKitNavigationAction *navigationAction = webkit_navigation_policy_decision_get_navigation_action(WEBKIT_NAVIGATION_POLICY_DECISION(decision));
@@ -21967,7 +21887,7 @@ index 881609c9fe8f2b5ed6158a5972438c14fd650cf5..566568382a2983a8a823cf0a0cf2634a
return FALSE;
/* Multiple tabs are not allowed in editor mode. */
-@@ -1445,6 +1447,12 @@ static gboolean browserWindowDeleteEvent(GtkWidget *widget, GdkEventAny* event)
+@@ -1484,6 +1482,12 @@ static gboolean browserWindowDeleteEvent(GtkWidget *widget, GdkEventAny* event)
}
#endif
@@ -21980,7 +21900,7 @@ index 881609c9fe8f2b5ed6158a5972438c14fd650cf5..566568382a2983a8a823cf0a0cf2634a
static void browser_window_class_init(BrowserWindowClass *klass)
{
GObjectClass *gobjectClass = G_OBJECT_CLASS(klass);
-@@ -1458,6 +1466,14 @@ static void browser_window_class_init(BrowserWindowClass *klass)
+@@ -1497,6 +1501,14 @@ static void browser_window_class_init(BrowserWindowClass *klass)
GtkWidgetClass *widgetClass = GTK_WIDGET_CLASS(klass);
widgetClass->delete_event = browserWindowDeleteEvent;
#endif
@@ -21996,7 +21916,7 @@ index 881609c9fe8f2b5ed6158a5972438c14fd650cf5..566568382a2983a8a823cf0a0cf2634a
/* Public API. */
diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.h b/Tools/MiniBrowser/gtk/BrowserWindow.h
-index 72831873d5fd321a27494254876c6dee378be4c0..ffc6f5e153312e929a188552d97b661c591e278d 100644
+index c58ebc2beec7e722e8b65b3358b278400e9a1232..526ab90cce49d94f263ab48bbb87e99710f220c9 100644
--- a/Tools/MiniBrowser/gtk/BrowserWindow.h
+++ b/Tools/MiniBrowser/gtk/BrowserWindow.h
@@ -42,7 +42,7 @@ G_BEGIN_DECLS
@@ -22009,11 +21929,11 @@ index 72831873d5fd321a27494254876c6dee378be4c0..ffc6f5e153312e929a188552d97b661c
typedef struct _BrowserWindow BrowserWindow;
diff --git a/Tools/MiniBrowser/gtk/main.c b/Tools/MiniBrowser/gtk/main.c
-index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f151568385337c5d 100644
+index 5254a76126fb3fd1345a30cd9579ea7fe130b75e..bd425e376792cdc1c54f0a330ab44e4a24e63738 100644
--- a/Tools/MiniBrowser/gtk/main.c
+++ b/Tools/MiniBrowser/gtk/main.c
-@@ -66,7 +66,12 @@ static gboolean enableITP;
- static gboolean enableSandbox;
+@@ -65,7 +65,12 @@ static char* timeZone;
+ static gboolean enableITP;
static gboolean exitAfterLoad;
static gboolean webProcessCrashed;
+static gboolean inspectorPipe;
@@ -22023,9 +21943,9 @@ index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f1515683
static gboolean printVersion;
+static GtkApplication *browserApplication = NULL;
- typedef enum {
- MINI_BROWSER_ERROR_INVALID_ABOUT_PATH
-@@ -161,6 +166,10 @@ static const GOptionEntry commandLineOptions[] =
+ #if !GTK_CHECK_VERSION(3, 98, 0)
+ static gboolean enableSandbox;
+@@ -169,6 +174,10 @@ static const GOptionEntry commandLineOptions[] =
{ "exit-after-load", 0, 0, G_OPTION_ARG_NONE, &exitAfterLoad, "Quit the browser after the load finishes", NULL },
{ "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 },
@@ -22036,7 +21956,7 @@ index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f1515683
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, 0, "[URL…]" },
{ 0, 0, 0, 0, 0, 0, 0 }
};
-@@ -625,6 +634,57 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
+@@ -642,6 +651,57 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
g_main_loop_quit(data->mainLoop);
}
@@ -22094,7 +22014,7 @@ index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f1515683
static void startup(GApplication *application)
{
const char *actionAccels[] = {
-@@ -655,10 +715,22 @@ static void startup(GApplication *application)
+@@ -672,6 +732,14 @@ static void startup(GApplication *application)
static void activate(GApplication *application, WebKitSettings *webkitSettings)
{
@@ -22106,7 +22026,12 @@ index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f1515683
+ g_clear_object(&webkitSettings);
+ return;
+ }
-+
+ #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);
+@@ -719,9 +787,12 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
+ }
+ #else
WebKitWebsiteDataManager *manager;
- if (privateMode || automationMode)
+ if (userDataDir) {
@@ -22119,15 +22044,15 @@ index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f1515683
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);
manager = webkit_website_data_manager_new("base-data-directory", dataDirectory, "base-cache-directory", cacheDirectory, NULL);
-@@ -684,6 +756,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
+@@ -772,6 +843,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
+ // Enable the favicon database. In GTK4 API they are enabled by default.
+ webkit_web_context_set_favicon_database_directory(webContext, NULL);
#endif
- "time-zone-override", timeZone,
- NULL);
+ persistentWebContext = webContext;
- g_object_unref(manager);
- if (enableSandbox)
-@@ -765,9 +838,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
+ webkit_web_context_register_uri_scheme(webContext, BROWSER_ABOUT_SCHEME, (WebKitURISchemeRequestCallback)aboutURISchemeRequestCallback, NULL, NULL);
+
+@@ -838,9 +910,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
if (exitAfterLoad)
exitAfterWebViewLoadFinishes(webView, application);
}
@@ -22138,7 +22063,7 @@ index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f1515683
}
} else {
WebKitWebView *webView = createBrowserTab(mainWindow, webkitSettings, userContentManager, defaultWebsitePolicies);
-@@ -814,7 +885,7 @@ int main(int argc, char *argv[])
+@@ -890,7 +960,7 @@ int main(int argc, char *argv[])
g_option_context_add_group(context, gst_init_get_option_group());
#endif
@@ -22147,7 +22072,7 @@ index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f1515683
webkit_settings_set_enable_developer_extras(webkitSettings, TRUE);
webkit_settings_set_enable_webgl(webkitSettings, TRUE);
webkit_settings_set_enable_media_stream(webkitSettings, TRUE);
-@@ -846,9 +917,11 @@ int main(int argc, char *argv[])
+@@ -922,9 +992,11 @@ int main(int argc, char *argv[])
}
GtkApplication *application = gtk_application_new("org.webkitgtk.MiniBrowser", G_APPLICATION_NON_UNIQUE);
@@ -22160,7 +22085,7 @@ index 9e597982bda6c0302fbbda9c3941dda6b48512cd..49b7665048fa34763089d609f1515683
return exitAfterLoad && webProcessCrashed ? 1 : 0;
diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp
-index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024af75234a 100644
+index e61e1ec89f3c9c923f712a0e2b12aaeffcc63431..7069b3551b9892a1528dcf117ca6d69f06a51a3b 100644
--- a/Tools/MiniBrowser/wpe/main.cpp
+++ b/Tools/MiniBrowser/wpe/main.cpp
@@ -45,6 +45,9 @@ static gboolean headlessMode;
@@ -22221,7 +22146,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024
{
auto backend = createViewBackend(1280, 720);
struct wpe_view_backend* wpeBackend = backend->backend();
-@@ -172,17 +201,89 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
+@@ -172,20 +201,109 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
delete static_cast<WPEToolingBackends::ViewBackend*>(data);
}, backend.release());
@@ -22265,6 +22190,21 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024
+
+static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision *decision, WebKitPolicyDecisionType decisionType, gpointer)
+{
++ if (decisionType == WEBKIT_POLICY_DECISION_TYPE_RESPONSE) {
++ WebKitResponsePolicyDecision *responseDecision = WEBKIT_RESPONSE_POLICY_DECISION(decision);
++ if (!webkit_response_policy_decision_is_main_frame_main_resource(responseDecision))
++ return FALSE;
++
++ const gchar* mimeType = webkit_uri_response_get_mime_type(webkit_response_policy_decision_get_response(responseDecision));
++ if (!webkit_response_policy_decision_is_mime_type_supported(responseDecision) && mimeType && mimeType[0] != '\0') {
++ webkit_policy_decision_download(decision);
++ return TRUE;
++ }
++
++ webkit_policy_decision_use(decision);
++ return TRUE;
++ }
++
+ if (decisionType != WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION)
+ return FALSE;
+
@@ -22298,42 +22238,33 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024
+
+static void quitBroserApplication(WebKitBrowserInspector* browser_inspector, gpointer data)
+{
-+ GMainLoop* mainLoop = static_cast<GMainLoop*>(data);
-+ g_main_loop_quit(mainLoop);
++ GApplication* application = static_cast<GApplication*>(data);
++ g_application_quit(application);
+}
+
-+static void configureBrowserInspector(GMainLoop* mainLoop)
++static void configureBrowserInspector(GApplication* application)
+{
+ WebKitBrowserInspector* browserInspector = webkit_browser_inspector_get_default();
+ g_signal_connect(browserInspector, "create-new-page", G_CALLBACK(createNewPage), NULL);
-+ g_signal_connect(browserInspector, "quit-application", G_CALLBACK(quitBroserApplication), mainLoop);
++ g_signal_connect(browserInspector, "quit-application", G_CALLBACK(quitBroserApplication), application);
+ webkit_browser_inspector_initialize_pipe(proxy, ignoreHosts);
+}
+
- int main(int argc, char *argv[])
+ static void activate(GApplication* application, WPEToolingBackends::ViewBackend* backend)
{
- #if ENABLE_DEVELOPER_MODE
-@@ -218,6 +319,16 @@ int main(int argc, char *argv[])
- }
-
- auto* loop = g_main_loop_new(nullptr, FALSE);
-+ if (inspectorPipe)
-+ configureBrowserInspector(loop);
-+
-+ openViews = g_hash_table_new_full(nullptr, nullptr, g_object_unref, nullptr);
-+
-+ if (noStartupWindow) {
-+ g_main_loop_run(loop);
-+ g_main_loop_unref(loop);
-+ return 0;
-+ }
-
- auto backend = createViewBackend(1280, 720);
- struct wpe_view_backend* wpeBackend = backend->backend();
-@@ -227,7 +338,15 @@ int main(int argc, char *argv[])
- return 1;
+ g_application_hold(application);
++ if (noStartupWindow)
++ return;
+ #if ENABLE_2022_GLIB_API
+ WebKitNetworkSession* networkSession = nullptr;
+ if (!automationMode) {
+@@ -216,10 +334,16 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
+ webkit_cookie_manager_set_persistent_storage(cookieManager, cookiesFile, storageType);
+ }
}
-
+-
+- auto* webContext = WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, "time-zone-override", timeZone, nullptr));
+ #else
- auto* manager = (privateMode || automationMode) ? webkit_website_data_manager_new_ephemeral() : webkit_website_data_manager_new(nullptr);
+ WebKitWebsiteDataManager *manager;
+ if (userDataDir) {
@@ -22347,19 +22278,18 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024
webkit_website_data_manager_set_itp_enabled(manager, enableITP);
if (proxy) {
-@@ -240,6 +359,7 @@ int main(int argc, char *argv[])
- webkit_website_data_manager_set_tls_errors_policy(manager, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
+@@ -250,6 +374,7 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
+ }
+ #endif
- auto* webContext = WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, "website-data-manager", manager, "time-zone-override", timeZone, nullptr));
+ persistentWebContext = webContext;
- g_object_unref(manager);
-
- if (cookiesPolicy) {
-@@ -298,7 +418,14 @@ int main(int argc, char *argv[])
- auto* viewBackend = webkit_web_view_backend_new(wpeBackend, [](gpointer data) {
+ WebKitUserContentManager* userContentManager = nullptr;
+ if (contentFilter) {
+ GFile* contentFilterFile = g_file_new_for_commandline_arg(contentFilter);
+@@ -287,6 +412,15 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
delete static_cast<WPEToolingBackends::ViewBackend*>(data);
- }, backend.release());
--
+ }, backend);
+
+// Playwright begin
+ if (headlessMode) {
+ webkit_web_view_backend_set_screenshot_callback(viewBackend,
@@ -22368,11 +22298,12 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024
+ });
+ }
+// Playwright end
++
auto* webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
"backend", viewBackend,
"web-context", webContext,
-@@ -315,8 +442,6 @@ int main(int argc, char *argv[])
- backendPtr->setAccessibleChild(ATK_OBJECT(accessible));
+@@ -306,8 +440,6 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
+ backend->setAccessibleChild(ATK_OBJECT(accessible));
#endif
- openViews = g_hash_table_new_full(nullptr, nullptr, g_object_unref, nullptr);
@@ -22380,7 +22311,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024
webkit_web_context_set_automation_allowed(webContext, automationMode);
g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), webView);
g_signal_connect(webView, "permission-request", G_CALLBACK(decidePermissionRequest), nullptr);
-@@ -329,16 +454,9 @@ int main(int argc, char *argv[])
+@@ -320,16 +452,9 @@ static void activate(GApplication* application, WPEToolingBackends::ViewBackend*
webkit_web_view_set_background_color(webView, &color);
if (uriArguments) {
@@ -22400,16 +22331,21 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024
webkit_web_view_load_uri(webView, "about:blank");
else
webkit_web_view_load_uri(webView, "https://wpewebkit.org");
-@@ -348,8 +466,7 @@ int main(int argc, char *argv[])
- g_hash_table_destroy(openViews);
-
+@@ -381,8 +506,14 @@ int main(int argc, char *argv[])
+ return 1;
+ }
-- if (privateMode || automationMode)
-- g_object_unref(webContext);
-+ g_object_unref(webContext);
- g_main_loop_unref(loop);
++ openViews = g_hash_table_new_full(nullptr, nullptr, g_object_unref, nullptr);
++
+ GApplication* application = g_application_new("org.wpewebkit.MiniBrowser", G_APPLICATION_NON_UNIQUE);
+ g_signal_connect(application, "activate", G_CALLBACK(activate), backend.release());
++
++ if (inspectorPipe)
++ configureBrowserInspector(application);
++
+ g_application_run(application, 0, nullptr);
+ g_object_unref(application);
- return 0;
diff --git a/Tools/PlatformWin.cmake b/Tools/PlatformWin.cmake
index 1067b31bc989748dfcc5502209d36d001b9b239e..7629263fb8bc93dca6dfc01c75eed8d2921fce1f 100644
--- a/Tools/PlatformWin.cmake
@@ -22423,10 +22359,10 @@ index 1067b31bc989748dfcc5502209d36d001b9b239e..7629263fb8bc93dca6dfc01c75eed8d2
+ add_subdirectory(Playwright/win)
+endif ()
diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit
-index ed6c15ce06c25ef12b165552bd665c5108d209dc..267612eb7239cfa91f0c675ec18d097599e95de8 100755
+index f52a2682fddc7b8502318ff5c57de33c4b7a3e42..121d76da00d467be3b0d1bb329870475f98d2f0e 100755
--- a/Tools/Scripts/build-webkit
+++ b/Tools/Scripts/build-webkit
-@@ -261,7 +261,7 @@ if (isAppleCocoaWebKit()) {
+@@ -266,7 +266,7 @@ if (isAppleCocoaWebKit()) {
push @projects, ("Source/WebKit");
if (!isEmbeddedWebKit()) {
@@ -22436,21 +22372,22 @@ index ed6c15ce06c25ef12b165552bd665c5108d209dc..267612eb7239cfa91f0c675ec18d0975
# WebInspectorUI must come after JavaScriptCore and WebCore but before WebKit and WebKit2
my $webKitIndex = first { $projects[$_] eq "Source/WebKitLegacy" } 0..$#projects;
diff --git a/Tools/WebKitTestRunner/CMakeLists.txt b/Tools/WebKitTestRunner/CMakeLists.txt
-index 7bc6f271a8c4902b74a3ab12d71a88860cdb64f4..5653a773d54830e5ff3ef048133caf7626d03eb7 100644
+index b8056910b6cde5610c3e8e4c2992723f8cf80cd0..44367cb186bff1fb85e76cf8f0530170c68fc1ed 100644
--- a/Tools/WebKitTestRunner/CMakeLists.txt
+++ b/Tools/WebKitTestRunner/CMakeLists.txt
-@@ -91,6 +91,9 @@ set(WebKitTestRunnerInjectedBundle_LIBRARIES
- WebKit::WebCoreTestSupport
- WebKit::WebKit
+@@ -95,6 +95,10 @@ set(TestRunnerInjectedBundle_PRIVATE_LIBRARIES
)
+ set(TestRunnerInjectedBundle_FRAMEWORKS ${WebKitTestRunner_FRAMEWORKS})
+
+if (NOT USE_SYSTEM_MALLOC)
+ list(APPEND WebKitTestRunnerInjectedBundle_LIBRARIES bmalloc)
+endif ()
-
- set(WebKitTestRunnerInjectedBundle_IDL_FILES
++
+ set(TestRunnerInjectedBundle_IDL_FILES
"${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 0067f0213b4930fafbcabe777be7250edab9880c..a5adb7724f2b45c14b66bd1b5b278d5aade0b6de 100644
+index 297d0efba8eb2cca75295ec87fad7018b3d55422..d62c1c1820f725df7c10bf562fa2eedbe994bb80 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -941,6 +941,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options)
@@ -22462,10 +22399,10 @@ index 0067f0213b4930fafbcabe777be7250edab9880c..a5adb7724f2b45c14b66bd1b5b278d5a
decidePolicyForMediaKeySystemPermissionRequest,
nullptr, // requestWebAuthenticationNoGesture
diff --git a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
-index 74da77470592f0b9144b3d518991e705436462f3..2609be019cc1c4dc0b6b3cddf086b80e48475077 100644
+index f55daaf5b3e5ee62c40ab0f68059e9da826d7b05..cb1350f95f204a7e90217850d7d5bc82302f61a4 100644
--- a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
+++ b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
-@@ -902,4 +902,51 @@ void EventSenderProxy::scaleGestureEnd(double scale)
+@@ -897,4 +897,51 @@ void EventSenderProxy::scaleGestureEnd(double scale)
#endif // ENABLE(MAC_GESTURE_EVENTS)
@@ -22518,7 +22455,7 @@ index 74da77470592f0b9144b3d518991e705436462f3..2609be019cc1c4dc0b6b3cddf086b80e
+
} // namespace WTR
diff --git a/Tools/glib/dependencies/apt b/Tools/glib/dependencies/apt
-index 8635ebd88f92175c6cec4781ae3934193afec484..552dbf544180132ee7a72e364bf52582ac6884fa 100644
+index 68f08203b65cf38c16eccc7e0245f1abdfd3bfe1..1983422250608940e0f56f008a547d2cde521308 100644
--- a/Tools/glib/dependencies/apt
+++ b/Tools/glib/dependencies/apt
@@ -1,11 +1,11 @@
@@ -22535,7 +22472,7 @@ index 8635ebd88f92175c6cec4781ae3934193afec484..552dbf544180132ee7a72e364bf52582
echo $2
fi
}
-@@ -66,9 +66,11 @@ PACKAGES=(
+@@ -67,9 +67,11 @@ PACKAGES=(
$(aptIfExists libwpe-1.0-dev)
$(aptIfExists libwpebackend-fdo-1.0-dev)
libxml2-utils