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 Dec 13, 2022 (#20297)

Andrey Lushnikov6c5317bd3145
diff --git a/browser_patches/firefox/UPSTREAM_CONFIG.sh b/browser_patches/firefox/UPSTREAM_CONFIG.sh
index ed5d78cb8e..3e1cde2636 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="fd854580ffc6fba6a0acdf335c96a1b24b976cb9"
+BASE_REVISION="e2956def6c181ca7375897992c5c821a5a6c886d"
diff --git a/browser_patches/firefox/juggler/Helper.js b/browser_patches/firefox/juggler/Helper.js
index 70d8aef0d3..aa225d8917 100644
--- a/browser_patches/firefox/juggler/Helper.js
+++ b/browser_patches/firefox/juggler/Helper.js
@@ -6,6 +6,16 @@ const uuidGen = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerat
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
class Helper {
+ decorateAsEventEmitter(objectToDecorate) {
+ const { EventEmitter } = ChromeUtils.import('resource://gre/modules/EventEmitter.jsm');
+ const emitter = new EventEmitter();
+ objectToDecorate.on = emitter.on.bind(emitter);
+ objectToDecorate.addEventListener = emitter.on.bind(emitter);
+ objectToDecorate.off = emitter.off.bind(emitter);
+ objectToDecorate.removeEventListener = emitter.off.bind(emitter);
+ objectToDecorate.once = emitter.once.bind(emitter);
+ objectToDecorate.emit = emitter.emit.bind(emitter);
+ }
addObserver(handler, topic) {
Services.obs.addObserver(handler, topic);
@@ -19,7 +29,15 @@ class Helper {
addEventListener(receiver, eventName, handler) {
receiver.addEventListener(eventName, handler);
- return () => receiver.removeEventListener(eventName, handler);
+ return () => {
+ try {
+ receiver.removeEventListener(eventName, handler);
+ } catch (e) {
+ // This could fail when window has navigated cross-process
+ // and we remove the listener from WindowProxy.
+ dump(`WARNING: removeEventListener throws ${e} at ${new Error().stack}\n`);
+ }
+ };
}
awaitEvent(receiver, eventName) {
diff --git a/browser_patches/firefox/juggler/JugglerFrameParent.jsm b/browser_patches/firefox/juggler/JugglerFrameParent.jsm
new file mode 100644
index 0000000000..da234ac7c7
--- /dev/null
+++ b/browser_patches/firefox/juggler/JugglerFrameParent.jsm
@@ -0,0 +1,35 @@
+"use strict";
+
+const { TargetRegistry } = ChromeUtils.import('chrome://juggler/content/TargetRegistry.js');
+const { Helper } = ChromeUtils.import('chrome://juggler/content/Helper.js');
+
+const helper = new Helper();
+
+var EXPORTED_SYMBOLS = ['JugglerFrameParent'];
+
+class JugglerFrameParent extends JSWindowActorParent {
+ constructor() {
+ super();
+ }
+
+ receiveMessage() { }
+
+ async actorCreated() {
+ // Only interested in main frames for now.
+ if (this.browsingContext.parent)
+ return;
+
+ this._target = TargetRegistry.instance()?.targetForBrowserId(this.browsingContext.browserId);
+ if (!this._target)
+ return;
+
+ this.actorName = `browser::page[${this._target.id()}]/${this.browsingContext.browserId}/${this.browsingContext.id}/${this._target.nextActorSequenceNumber()}`;
+ this._target.setActor(this);
+ }
+
+ didDestroy() {
+ if (!this._target)
+ return;
+ this._target.removeActor(this);
+ }
+}
diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.js
index f197959497..60636978e9 100644
--- a/browser_patches/firefox/juggler/NetworkObserver.js
+++ b/browser_patches/firefox/juggler/NetworkObserver.js
@@ -4,7 +4,6 @@
"use strict";
-const {EventEmitter} = ChromeUtils.import('resource://gre/modules/EventEmitter.jsm');
const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm');
@@ -41,7 +40,7 @@ class PageNetwork {
}
constructor(target) {
- EventEmitter.decorate(this);
+ helper.decorateAsEventEmitter(this);
this._target = target;
this._extraHTTPHeaders = null;
this._responseStorage = new ResponseStorage(MAX_RESPONSE_STORAGE_SIZE, MAX_RESPONSE_STORAGE_SIZE / 10);
@@ -217,8 +216,9 @@ class NetworkRequest {
_onInternalRedirect(newChannel) {
// Intercepted requests produce "internal redirects" - this is both for our own
// interception and service workers.
- // An internal redirect has the same channelId, inherits notificationCallbacks and
- // listener, and should be used instead of an old channel.
+ // An internal redirect does not necessarily have the same channelId,
+ // but inherits notificationCallbacks and the listener,
+ // and should be used instead of an old channel.
this._networkObserver._channelToRequest.delete(this.httpChannel);
this.httpChannel = newChannel;
this._networkObserver._channelToRequest.set(this.httpChannel, this);
@@ -363,7 +363,7 @@ class NetworkRequest {
}
const browserContext = pageNetwork._target.browserContext();
- if (browserContext.settings.onlineOverride === 'offline') {
+ if (browserContext.crossProcessCookie.settings.onlineOverride === 'offline') {
// Implement offline.
this.abort(Cr.NS_ERROR_OFFLINE);
return;
@@ -458,7 +458,7 @@ class NetworkRequest {
const browserContext = pageNetwork._target.browserContext();
if (browserContext.requestInterceptionEnabled)
return true;
- if (browserContext.settings.onlineOverride === 'offline')
+ if (browserContext.crossProcessCookie.settings.onlineOverride === 'offline')
return true;
return false;
}
@@ -581,7 +581,7 @@ class NetworkObserver {
}
constructor(targetRegistry) {
- EventEmitter.decorate(this);
+ helper.decorateAsEventEmitter(this);
NetworkObserver._instance = this;
this._targetRegistry = targetRegistry;
diff --git a/browser_patches/firefox/juggler/SimpleChannel.js b/browser_patches/firefox/juggler/SimpleChannel.js
index 59b29532ab..6f9b948f19 100644
--- a/browser_patches/firefox/juggler/SimpleChannel.js
+++ b/browser_patches/firefox/juggler/SimpleChannel.js
@@ -9,6 +9,12 @@
const SIMPLE_CHANNEL_MESSAGE_NAME = 'juggler:simplechannel';
class SimpleChannel {
+ static createForActor(actor) {
+ const channel = new SimpleChannel('');
+ channel.bindToActor(actor);
+ return channel;
+ }
+
static createForMessageManager(name, mm) {
const channel = new SimpleChannel(name);
@@ -32,15 +38,34 @@ class SimpleChannel {
this._pendingMessages = new Map();
this._handlers = new Map();
this._bufferedIncomingMessages = [];
- this._bufferedOutgoingMessages = [];
this.transport = {
sendMessage: null,
- dispose: null,
+ dispose: () => {},
};
this._ready = false;
this._disposed = false;
}
+ bindToActor(actor) {
+ this.resetTransport();
+ this._name = actor.actorName;
+ const oldReceiveMessage = actor.receiveMessage;
+ actor.receiveMessage = message => this._onMessage(message.data);
+ this.setTransport({
+ sendMessage: obj => actor.sendAsyncMessage(SIMPLE_CHANNEL_MESSAGE_NAME, obj),
+ dispose: () => actor.receiveMessage = oldReceiveMessage,
+ });
+ }
+
+ resetTransport() {
+ this.transport.dispose();
+ this.transport = {
+ sendMessage: null,
+ dispose: () => {},
+ };
+ this._ready = false;
+ }
+
setTransport(transport) {
this.transport = transport;
// connection handshake:
@@ -59,9 +84,8 @@ class SimpleChannel {
if (this._ready)
return;
this._ready = true;
- for (const msg of this._bufferedOutgoingMessages)
- this.transport.sendMessage(msg);
- this._bufferedOutgoingMessages = [];
+ for (const { message } of this._pendingMessages.values())
+ this.transport.sendMessage(message);
}
dispose() {
@@ -121,14 +145,12 @@ class SimpleChannel {
if (this._disposed)
throw new Error(`ERROR: channel ${this._name} is already disposed! Cannot send "${methodName}" to "${namespace}"`);
const id = ++this._messageId;
+ const message = {requestId: id, methodName, params, namespace};
const promise = new Promise((resolve, reject) => {
- this._pendingMessages.set(id, {connectorId, resolve, reject, methodName, namespace});
+ this._pendingMessages.set(id, {connectorId, resolve, reject, methodName, namespace, message});
});
- const message = {requestId: id, methodName, params, namespace};
if (this._ready)
this.transport.sendMessage(message);
- else
- this._bufferedOutgoingMessages.push(message);
return promise;
}
@@ -143,12 +165,19 @@ class SimpleChannel {
return;
}
if (data.responseId) {
- const {resolve, reject} = this._pendingMessages.get(data.responseId);
+ const message = this._pendingMessages.get(data.responseId);
+ if (!message) {
+ // During corss-process navigation, we might receive a response for
+ // the message sent by another process.
+ // TODO: consider events that are marked as "no-response" to avoid
+ // unneeded responses altogether.
+ return;
+ }
this._pendingMessages.delete(data.responseId);
if (data.error)
- reject(new Error(data.error));
+ message.reject(new Error(data.error));
else
- resolve(data.result);
+ message.resolve(data.result);
} else if (data.requestId) {
const namespace = data.namespace;
const handler = this._handlers.get(namespace);
@@ -169,9 +198,7 @@ class SimpleChannel {
return;
}
} else {
- dump(`
- ERROR: unknown message in channel "${this._name}": ${JSON.stringify(data)}
- `);
+ dump(`WARNING: unknown message in channel "${this._name}": ${JSON.stringify(data)}\n`);
}
}
}
diff --git a/browser_patches/firefox/juggler/TargetRegistry.js b/browser_patches/firefox/juggler/TargetRegistry.js
index b222ba98bb..4a3fe17743 100644
--- a/browser_patches/firefox/juggler/TargetRegistry.js
+++ b/browser_patches/firefox/juggler/TargetRegistry.js
@@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-const {EventEmitter} = ChromeUtils.import('resource://gre/modules/EventEmitter.jsm');
const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {SimpleChannel} = ChromeUtils.import('chrome://juggler/content/SimpleChannel.js');
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
@@ -38,7 +37,7 @@ class DownloadInterceptor {
if (!(request instanceof Ci.nsIChannel))
return false;
const channel = request.QueryInterface(Ci.nsIChannel);
- let pageTarget = this._registry._browserBrowsingContextToTarget.get(channel.loadInfo.browsingContext.top);
+ let pageTarget = this._registry._browserIdToTarget.get(channel.loadInfo.browsingContext.top.browserId);
if (!pageTarget)
return false;
@@ -57,7 +56,7 @@ class DownloadInterceptor {
try {
file.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
} catch (e) {
- dump(`interceptDownloadRequest failed to create file: ${e}\n`);
+ dump(`WARNING: interceptDownloadRequest failed to create file: ${e}\n`);
return false;
}
}
@@ -68,6 +67,7 @@ class DownloadInterceptor {
uuid,
browserContextId: browserContext.browserContextId,
pageTargetId: pageTarget.id(),
+ frameId: helper.browsingContextToFrameId(channel.loadInfo.browsingContext),
url: request.name,
suggestedFileName: externalAppHandler.suggestedFileName,
};
@@ -103,13 +103,18 @@ class DownloadInterceptor {
const screencastService = Cc['@mozilla.org/juggler/screencast;1'].getService(Ci.nsIScreencastService);
class TargetRegistry {
+ static instance() {
+ return TargetRegistry._instance || null;
+ }
+
constructor() {
- EventEmitter.decorate(this);
+ helper.decorateAsEventEmitter(this);
+ TargetRegistry._instance = this;
this._browserContextIdToBrowserContext = new Map();
this._userContextIdToBrowserContext = new Map();
this._browserToTarget = new Map();
- this._browserBrowsingContextToTarget = new Map();
+ this._browserIdToTarget = new Map();
this._browserProxy = null;
@@ -136,20 +141,14 @@ class TargetRegistry {
}
}, 'oop-frameloader-crashed');
- Services.mm.addMessageListener('juggler:content-ready', {
- receiveMessage: message => {
- const linkedBrowser = message.target;
- const target = this._browserToTarget.get(linkedBrowser);
- if (!target)
- return;
-
- return {
- initScripts: target.browserContext().initScripts,
- bindings: target.browserContext().bindings,
- settings: target.browserContext().settings,
- };
- },
- });
+ 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;
@@ -161,7 +160,7 @@ class TargetRegistry {
if (openerContext) {
// Popups usually have opener context. Get top context for the case when opener is
// an iframe.
- openerTarget = this._browserBrowsingContextToTarget.get(openerContext.top);
+ openerTarget = this._browserIdToTarget.get(openerContext.top.browserId);
} else if (tab.openerTab) {
// Noopener popups from the same window have opener tab instead.
openerTarget = this._browserToTarget.get(tab.openerTab.linkedBrowser);
@@ -169,13 +168,7 @@ class TargetRegistry {
if (!browserContext)
throw new Error(`Internal error: cannot find context for userContextId=${userContextId}`);
const target = new PageTarget(this, window, tab, browserContext, openerTarget);
- target.updateUserAgent();
- target.updatePlatform();
- target.updateJavaScriptDisabled();
- target.updateTouchOverride();
- target.updateColorSchemeOverride();
- target.updateReducedMotionOverride();
- target.updateForcedColorsOverride();
+ target.updateOverridesForBrowsingContext(tab.linkedBrowser.browsingContext);
if (!hasExplicitSize)
target.updateViewportSize();
if (browserContext.videoRecordingOptions)
@@ -329,7 +322,7 @@ class TargetRegistry {
target = this._browserToTarget.get(browser);
}
browser.focus();
- if (browserContext.settings.timezoneId) {
+ if (browserContext.crossProcessCookie.settings.timezoneId) {
if (await target.hasFailedToOverrideTimezone())
throw new Error('Failed to override timezone');
}
@@ -343,11 +336,15 @@ class TargetRegistry {
targetForBrowser(browser) {
return this._browserToTarget.get(browser);
}
+
+ targetForBrowserId(browserId) {
+ return this._browserIdToTarget.get(browserId);
+ }
}
class PageTarget {
constructor(registry, win, tab, browserContext, opener) {
- EventEmitter.decorate(this);
+ helper.decorateAsEventEmitter(this);
this._targetId = helper.generateId();
this._registry = registry;
@@ -360,12 +357,19 @@ class PageTarget {
this._initialDPPX = this._linkedBrowser.browsingContext.overrideDPPX;
this._url = 'about:blank';
this._openerId = opener ? opener.id() : undefined;
- this._channel = SimpleChannel.createForMessageManager(`browser::page[${this._targetId}]`, this._linkedBrowser.messageManager);
+ this._actor = undefined;
+ this._actorSequenceNumber = 0;
+ this._channel = new SimpleChannel(`browser::page[${this._targetId}]`);
this._videoRecordingInfo = undefined;
this._screencastRecordingInfo = undefined;
this._dialogs = new Map();
this.forcedColors = 'no-override';
- this._pageInitScripts = [];
+ this.mediumOverride = '';
+ this.crossProcessCookie = {
+ initScripts: [],
+ bindings: [],
+ interceptFileChooserDialog: false,
+ };
const navigationListener = {
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]),
@@ -380,11 +384,38 @@ class PageTarget {
this._disposed = false;
browserContext.pages.add(this);
this._registry._browserToTarget.set(this._linkedBrowser, this);
- this._registry._browserBrowsingContextToTarget.set(this._linkedBrowser.browsingContext, this);
+ this._registry._browserIdToTarget.set(this._linkedBrowser.browsingContext.browserId, this);
this._registry.emit(TargetRegistry.Events.TargetCreated, this);
}
+ nextActorSequenceNumber() {
+ return ++this._actorSequenceNumber;
+ }
+
+ setActor(actor) {
+ this._actor = actor;
+ this._channel.bindToActor(actor);
+ }
+
+ removeActor(actor) {
+ // Note: the order between setActor and removeActor is non-deterministic.
+ // Therefore we check that we are still bound to the actor that is being removed.
+ if (this._actor !== actor)
+ return;
+ this._actor = undefined;
+ 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);
+ }
+
dialog(dialogId) {
return this._dialogs.get(dialogId);
}
@@ -405,20 +436,31 @@ class PageTarget {
return this._browserContext;
}
- updateTouchOverride() {
- this._linkedBrowser.browsingContext.touchEventsOverride = this._browserContext.touchOverride ? 'enabled' : 'none';
+ updateOverridesForBrowsingContext(browsingContext = undefined) {
+ this.updateTouchOverride(browsingContext);
+ this.updateUserAgent(browsingContext);
+ this.updatePlatform(browsingContext);
+ this.updateDPPXOverride(browsingContext);
+ this.updateEmulatedMedia(browsingContext);
+ this.updateColorSchemeOverride(browsingContext);
+ this.updateReducedMotionOverride(browsingContext);
+ this.updateForcedColorsOverride(browsingContext);
+ }
+
+ updateTouchOverride(browsingContext = undefined) {
+ (browsingContext || this._linkedBrowser.browsingContext).touchEventsOverride = this._browserContext.touchOverride ? 'enabled' : 'none';
}
- updateUserAgent() {
- this._linkedBrowser.browsingContext.customUserAgent = this._browserContext.defaultUserAgent;
+ updateUserAgent(browsingContext = undefined) {
+ (browsingContext || this._linkedBrowser.browsingContext).customUserAgent = this._browserContext.defaultUserAgent;
}
- updatePlatform() {
- this._linkedBrowser.browsingContext.customPlatform = this._browserContext.defaultPlatform;
+ updatePlatform(browsingContext = undefined) {
+ (browsingContext || this._linkedBrowser.browsingContext).customPlatform = this._browserContext.defaultPlatform;
}
- updateJavaScriptDisabled() {
- this._linkedBrowser.browsingContext.allowJavascript = !this._browserContext.javaScriptDisabled;
+ updateDPPXOverride(browsingContext = undefined) {
+ (browsingContext || this._linkedBrowser.browsingContext).overrideDPPX = this._browserContext.deviceScaleFactor || this._initialDPPX;
}
_updateModalDialogs() {
@@ -452,7 +494,7 @@ class PageTarget {
// default viewport.
const viewportSize = this._viewportSize || this._browserContext.defaultViewportSize;
const actualSize = await setViewportSizeForBrowser(viewportSize, this._linkedBrowser, this._window);
- this._linkedBrowser.browsingContext.overrideDPPX = this._browserContext.deviceScaleFactor || this._initialDPPX;
+ this.updateDPPXOverride();
await this._channel.connect('').send('awaitViewportDimensions', {
width: actualSize.width,
height: actualSize.height,
@@ -461,7 +503,12 @@ class PageTarget {
}
setEmulatedMedia(mediumOverride) {
- this._linkedBrowser.browsingContext.mediumOverride = mediumOverride || '';
+ this.mediumOverride = mediumOverride || '';
+ this.updateEmulatedMedia();
+ }
+
+ updateEmulatedMedia(browsingContext = undefined) {
+ (browsingContext || this._linkedBrowser.browsingContext).mediumOverride = this.mediumOverride;
}
setColorScheme(colorScheme) {
@@ -469,8 +516,8 @@ class PageTarget {
this.updateColorSchemeOverride();
}
- updateColorSchemeOverride() {
- this._linkedBrowser.browsingContext.prefersColorSchemeOverride = this.colorScheme || this._browserContext.colorScheme || 'none';
+ updateColorSchemeOverride(browsingContext = undefined) {
+ (browsingContext || this._linkedBrowser.browsingContext).prefersColorSchemeOverride = this.colorScheme || this._browserContext.colorScheme || 'none';
}
setReducedMotion(reducedMotion) {
@@ -478,8 +525,8 @@ class PageTarget {
this.updateReducedMotionOverride();
}
- updateReducedMotionOverride() {
- this._linkedBrowser.browsingContext.prefersReducedMotionOverride = this.reducedMotion || this._browserContext.reducedMotion || 'none';
+ updateReducedMotionOverride(browsingContext = undefined) {
+ (browsingContext || this._linkedBrowser.browsingContext).prefersReducedMotionOverride = this.reducedMotion || this._browserContext.reducedMotion || 'none';
}
setForcedColors(forcedColors) {
@@ -487,8 +534,14 @@ class PageTarget {
this.updateForcedColorsOverride();
}
- updateForcedColorsOverride() {
- this._linkedBrowser.browsingContext.forcedColorsOverride = (this.forcedColors !== 'no-override' ? this.forcedColors : this._browserContext.forcedColors) || 'no-override';
+ updateForcedColorsOverride(browsingContext = undefined) {
+ (browsingContext || this._linkedBrowser.browsingContext).forcedColorsOverride = (this.forcedColors !== 'no-override' ? this.forcedColors : this._browserContext.forcedColors) || 'no-override';
+ }
+
+ async setInterceptFileChooserDialog(enabled) {
+ this.crossProcessCookie.interceptFileChooserDialog = enabled;
+ this._updateCrossProcessCookie();
+ await this._channel.connect('').send('setInterceptFileChooserDialog', enabled).catch(e => {});
}
async setViewportSize(viewportSize) {
@@ -524,20 +577,28 @@ class PageTarget {
this._browserContext.grantPermissionsToOrigin(this._url);
}
+ _updateCrossProcessCookie() {
+ Services.ppmm.sharedData.set('juggler:page-cookie-' + this._linkedBrowser.browsingContext.browserId, this.crossProcessCookie);
+ Services.ppmm.sharedData.flush();
+ }
+
async ensurePermissions() {
await this._channel.connect('').send('ensurePermissions', {}).catch(e => void e);
}
async setInitScripts(scripts) {
- this._pageInitScripts = scripts;
+ this.crossProcessCookie.initScripts = scripts;
+ this._updateCrossProcessCookie();
await this.pushInitScripts();
}
async pushInitScripts() {
- await this._channel.connect('').send('setInitScripts', [...this._browserContext.initScripts, ...this._pageInitScripts]).catch(e => void e);
+ await this._channel.connect('').send('setInitScripts', [...this._browserContext.crossProcessCookie.initScripts, ...this.crossProcessCookie.initScripts]).catch(e => void e);
}
async addBinding(worldName, name, script) {
+ this.crossProcessCookie.bindings.push({ worldName, name, script });
+ this._updateCrossProcessCookie();
await this._channel.connect('').send('addBinding', { worldName, name, script }).catch(e => void e);
}
@@ -641,7 +702,7 @@ class PageTarget {
this.stopScreencast();
this._browserContext.pages.delete(this);
this._registry._browserToTarget.delete(this._linkedBrowser);
- this._registry._browserBrowsingContextToTarget.delete(this._linkedBrowser.browsingContext);
+ this._registry._browserIdToTarget.delete(this._linkedBrowser.browsingContext.browserId);
try {
helper.removeListeners(this._eventListeners);
} catch (e) {
@@ -660,6 +721,7 @@ PageTarget.Events = {
Crashed: Symbol('PageTarget.Crashed'),
DialogOpened: Symbol('PageTarget.DialogOpened'),
DialogClosed: Symbol('PageTarget.DialogClosed'),
+ TopBrowsingContextReplaced: Symbol('PageTarget.TopBrowsingContextReplaced'),
};
function fromProtocolColorScheme(colorScheme) {
@@ -712,18 +774,24 @@ class BrowserContext {
this.deviceScaleFactor = undefined;
this.defaultUserAgent = null;
this.defaultPlatform = null;
- this.javaScriptDisabled = false;
this.touchOverride = false;
this.colorScheme = 'none';
this.forcedColors = 'no-override';
this.reducedMotion = 'none';
this.videoRecordingOptions = undefined;
- this.initScripts = [];
- this.bindings = [];
- this.settings = {};
+ this.crossProcessCookie = {
+ initScripts: [],
+ bindings: [],
+ settings: {},
+ };
this.pages = new Set();
}
+ _updateCrossProcessCookie() {
+ Services.ppmm.sharedData.set('juggler:context-cookie-' + this.userContextId, this.crossProcessCookie);
+ Services.ppmm.sharedData.flush();
+ }
+
setColorScheme(colorScheme) {
this.colorScheme = fromProtocolColorScheme(colorScheme);
for (const page of this.pages)
@@ -796,12 +864,6 @@ class BrowserContext {
page.updatePlatform();
}
- setJavaScriptDisabled(javaScriptDisabled) {
- this.javaScriptDisabled = javaScriptDisabled;
- for (const page of this.pages)
- page.updateJavaScriptDisabled();
- }
-
setTouchOverride(touchOverride) {
this.touchOverride = touchOverride;
for (const page of this.pages)
@@ -815,17 +877,20 @@ class BrowserContext {
}
async setInitScripts(scripts) {
- this.initScripts = scripts;
+ this.crossProcessCookie.initScripts = scripts;
+ this._updateCrossProcessCookie();
await Promise.all(Array.from(this.pages).map(page => page.pushInitScripts()));
}
async addBinding(worldName, name, script) {
- this.bindings.push({ worldName, name, script });
+ this.crossProcessCookie.bindings.push({ worldName, name, script });
+ this._updateCrossProcessCookie();
await Promise.all(Array.from(this.pages).map(page => page.addBinding(worldName, name, script)));
}
async applySetting(name, value) {
- this.settings[name] = value;
+ this.crossProcessCookie.settings[name] = value;
+ this._updateCrossProcessCookie();
await Promise.all(Array.from(this.pages).map(page => page.applyContextSetting(name, value)));
}
diff --git a/browser_patches/firefox/juggler/components/Juggler.js b/browser_patches/firefox/juggler/components/Juggler.js
index ed4242406f..ba7e240749 100644
--- a/browser_patches/firefox/juggler/components/Juggler.js
+++ b/browser_patches/firefox/juggler/components/Juggler.js
@@ -12,12 +12,34 @@ const {BrowserHandler} = ChromeUtils.import("chrome://juggler/content/protocol/B
const {NetworkObserver} = ChromeUtils.import("chrome://juggler/content/NetworkObserver.js");
const {TargetRegistry} = ChromeUtils.import("chrome://juggler/content/TargetRegistry.js");
const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
+const {ActorManagerParent} = ChromeUtils.import('resource://gre/modules/ActorManagerParent.jsm');
const helper = new Helper();
const Cc = Components.classes;
const Ci = Components.interfaces;
-const FRAME_SCRIPT = "chrome://juggler/content/content/main.js";
+// Register JSWindowActors that will be instantiated for each frame.
+ActorManagerParent.addJSWindowActors({
+ JugglerFrame: {
+ parent: {
+ moduleURI: 'chrome://juggler/content/JugglerFrameParent.jsm',
+ },
+ child: {
+ moduleURI: 'chrome://juggler/content/content/JugglerFrameChild.jsm',
+ events: {
+ // Normally, we instantiate an actor when a new window is created.
+ DOMWindowCreated: {},
+ // However, for same-origin iframes, the navigation from about:blank
+ // to the URL will share the same window, so we need to also create
+ // an actor for a new document via DOMDocElementInserted.
+ DOMDocElementInserted: {},
+ // Also, listening to DOMContentLoaded.
+ DOMContentLoaded: {},
+ },
+ },
+ allFrames: true,
+ },
+});
let browserStartupFinishedCallback;
let browserStartupFinishedPromise = new Promise(x => browserStartupFinishedCallback = x);
@@ -72,8 +94,7 @@ class Juggler {
const targetRegistry = new TargetRegistry();
new NetworkObserver(targetRegistry);
- const loadFrameScript = () => {
- Services.mm.loadFrameScript(FRAME_SCRIPT, true /* aAllowDelayedLoad */);
+ const loadStyleSheet = () => {
if (Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo).isHeadless) {
const styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);
const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
@@ -118,7 +139,7 @@ class Juggler {
pipeStopped = true;
}, () => browserStartupFinishedPromise);
dispatcher.rootSession().setHandler(browserHandler);
- loadFrameScript();
+ loadStyleSheet();
dump(`\nJuggler listening to the pipe\n`);
break;
}
diff --git a/browser_patches/firefox/juggler/content/FrameTree.js b/browser_patches/firefox/juggler/content/FrameTree.js
index 61ff889e75..b803327282 100644
--- a/browser_patches/firefox/juggler/content/FrameTree.js
+++ b/browser_patches/firefox/juggler/content/FrameTree.js
@@ -9,14 +9,13 @@ const Cu = Components.utils;
const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {SimpleChannel} = ChromeUtils.import('chrome://juggler/content/SimpleChannel.js');
-const {EventEmitter} = ChromeUtils.import('resource://gre/modules/EventEmitter.jsm');
const {Runtime} = ChromeUtils.import('chrome://juggler/content/content/Runtime.js');
const helper = new Helper();
class FrameTree {
constructor(rootDocShell) {
- EventEmitter.decorate(this);
+ helper.decorateAsEventEmitter(this);
this._browsingContextGroup = rootDocShell.browsingContext.group;
if (!this._browsingContextGroup.__jugglerFrameTrees)
@@ -33,6 +32,7 @@ class FrameTree {
this._docShellToFrame = new Map();
this._frameIdToFrame = new Map();
this._pageReady = false;
+ this._javaScriptDisabled = false;
this._mainFrame = this._createFrame(rootDocShell);
const webProgress = rootDocShell.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebProgress);
@@ -128,6 +128,12 @@ class FrameTree {
this.scrollbarsHidden = hidden;
}
+ setJavaScriptDisabled(javaScriptDisabled) {
+ this._javaScriptDisabled = javaScriptDisabled;
+ for (const frame of this.frames())
+ frame._updateJavaScriptDisabled();
+ }
+
_onWorkerCreated(workerDebugger) {
// Note: we do not interoperate with firefox devtools.
if (workerDebugger.isInitialized)
@@ -214,7 +220,7 @@ class FrameTree {
const docShell = progress.DOMWindow.docShell;
const frame = this._docShellToFrame.get(docShell);
if (!frame) {
- dump(`ERROR: got a state changed event for un-tracked docshell!\n`);
+ dump(`WARNING: got a state changed event for un-tracked docshell!\n`);
return;
}
@@ -227,7 +233,6 @@ class FrameTree {
const isStart = flag & Ci.nsIWebProgressListener.STATE_START;
const isTransferring = flag & Ci.nsIWebProgressListener.STATE_TRANSFERRING;
const isStop = flag & Ci.nsIWebProgressListener.STATE_STOP;
- const isDocument = flag & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT;
if (isStart) {
// Starting a new navigation.
@@ -257,9 +262,6 @@ class FrameTree {
if (frame === this._mainFrame && status !== Cr.NS_BINDING_ABORTED)
this.forcePageReady();
}
-
- if (isStop && isDocument)
- this.emit(FrameTree.Events.Load, frame);
}
onLocationChange(progress, request, location, flags) {
@@ -287,6 +289,10 @@ class FrameTree {
_createFrame(docShell) {
const parentFrame = this._docShellToFrame.get(docShell.parent) || null;
+ if (!parentFrame && this._mainFrame) {
+ dump(`WARNING: found docShell with the same root, but no parent!\n`);
+ return;
+ }
const frame = new Frame(this, this._runtime, docShell, parentFrame);
this._docShellToFrame.set(docShell, frame);
this._frameIdToFrame.set(frame.id(), frame);
@@ -308,6 +314,11 @@ class FrameTree {
// Detach all children first
for (const subframe of frame._children)
this._detachFrame(subframe);
+ if (frame === this._mainFrame) {
+ // Do not detach main frame (happens during cross-process navigation),
+ // as it confuses the client.
+ return;
+ }
this._docShellToFrame.delete(frame._docShell);
this._frameIdToFrame.delete(frame.id());
if (frame._parentFrame)
@@ -333,7 +344,6 @@ FrameTree.Events = {
NavigationAborted: 'navigationaborted',
SameDocumentNavigation: 'samedocumentnavigation',
PageReady: 'pageready',
- Load: 'load',
};
class IsolatedWorld {
@@ -518,6 +528,20 @@ class Frame {
for (const script of world._scriptsToEvaluateOnNewDocument)
executionContext.evaluateScriptSafely(script);
}
+
+ const url = this.domWindow().location?.href;
+ if (url === 'about:blank' && !this._url) {
+ // Sometimes FrameTree is created too early, before the location has been set.
+ this._url = url;
+ this._frameTree.emit(FrameTree.Events.NavigationCommitted, this);
+ }
+
+ this._updateJavaScriptDisabled();
+ }
+
+ _updateJavaScriptDisabled() {
+ if (this._docShell.browsingContext.currentWindowContext)
+ this._docShell.browsingContext.currentWindowContext.allowJavascript = !this._frameTree._javaScriptDisabled;
}
mainExecutionContext() {
@@ -592,7 +616,7 @@ class Worker {
onMessage: msg => void this._channel._onMessage(JSON.parse(msg)),
onClose: () => void this._channel.dispose(),
onError: (filename, lineno, message) => {
- dump(`Error in worker: ${message} @${filename}:${lineno}\n`);
+ dump(`WARNING: Error in worker: ${message} @${filename}:${lineno}\n`);
},
};
workerDebugger.addListener(this._workerDebuggerListener);
diff --git a/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm
new file mode 100644
index 0000000000..ba918931ec
--- /dev/null
+++ b/browser_patches/firefox/juggler/content/JugglerFrameChild.jsm
@@ -0,0 +1,55 @@
+"use strict";
+
+const { Helper } = ChromeUtils.import('chrome://juggler/content/Helper.js');
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { initialize } = ChromeUtils.import('chrome://juggler/content/content/main.js');
+
+const Ci = Components.interfaces;
+const helper = new Helper();
+
+let sameProcessInstanceNumber = 0;
+
+class JugglerFrameChild extends JSWindowActorChild {
+ constructor() {
+ super();
+
+ this._eventListeners = [];
+ }
+
+ handleEvent(aEvent) {
+ if (this._agents && aEvent.target === this.document)
+ this._agents.pageAgent.onWindowEvent(aEvent);
+ }
+
+ actorCreated() {
+ this.actorName = `content::${this.browsingContext.browserId}/${this.browsingContext.id}/${++sameProcessInstanceNumber}`;
+
+ this._eventListeners.push(helper.addEventListener(this.contentWindow, 'load', event => {
+ this._agents?.pageAgent.onWindowEvent(event);
+ }));
+
+ if (this.document.documentURI.startsWith('moz-extension://'))
+ return;
+ this._agents = initialize(this.browsingContext, this.docShell, this);
+ }
+
+ _dispose() {
+ helper.removeListeners(this._eventListeners);
+ // We do not cleanup since agents are shared for all frames in the process.
+
+ // TODO: restore the cleanup.
+ // Reset transport so that all messages will be pending and will not throw any errors.
+ // this._channel.resetTransport();
+ // this._agents.pageAgent.dispose();
+ // this._agents.frameTree.dispose();
+ // this._agents = undefined;
+ }
+
+ didDestroy() {
+ this._dispose();
+ }
+
+ receiveMessage() { }
+}
+
+var EXPORTED_SYMBOLS = ['JugglerFrameChild'];
diff --git a/browser_patches/firefox/juggler/content/PageAgent.js b/browser_patches/firefox/juggler/content/PageAgent.js
index 63a1807e4d..c727d46d86 100644
--- a/browser_patches/firefox/juggler/content/PageAgent.js
+++ b/browser_patches/firefox/juggler/content/PageAgent.js
@@ -50,8 +50,7 @@ class WorkerData {
}
class PageAgent {
- constructor(messageManager, browserChannel, frameTree) {
- this._messageManager = messageManager;
+ constructor(browserChannel, frameTree) {
this._browserChannel = browserChannel;
this._browserPage = browserChannel.connect('page');
this._frameTree = frameTree;
@@ -78,6 +77,7 @@ class PageAgent {
this._onWorkerCreated(worker);
// Report execution contexts.
+ this._browserPage.emit('runtimeExecutionContextsCleared', {});
for (const context of this._runtime.executionContexts())
this._onExecutionContextCreated(context);
@@ -99,9 +99,7 @@ class PageAgent {
helper.addObserver(this._linkClicked.bind(this, true), 'juggler-link-click-sync'),
helper.addObserver(this._onWindowOpenInNewContext.bind(this), 'juggler-window-open-in-new-context'),
helper.addObserver(this._filePickerShown.bind(this), 'juggler-file-picker-shown'),
- helper.addEventListener(this._messageManager, 'DOMContentLoaded', this._onDOMContentLoaded.bind(this)),
helper.addObserver(this._onDocumentOpenLoad.bind(this), 'juggler-document-open-loaded'),
- helper.on(this._frameTree, 'load', this._onLoad.bind(this)),
helper.on(this._frameTree, 'frameattached', this._onFrameAttached.bind(this)),
helper.on(this._frameTree, 'framedetached', this._onFrameDetached.bind(this)),
helper.on(this._frameTree, 'navigationstarted', this._onNavigationStarted.bind(this)),
@@ -133,7 +131,6 @@ class PageAgent {
this._runtime.events.onExecutionContextDestroyed(this._onExecutionContextDestroyed.bind(this)),
this._runtime.events.onBindingCalled(this._onBindingCalled.bind(this)),
browserChannel.register('page', {
- addBinding: ({ worldName, name, script }) => this._frameTree.addBinding(worldName, name, script),
adoptNode: this._adoptNode.bind(this),
crash: this._crash.bind(this),
describeNode: this._describeNode.bind(this),
@@ -143,15 +140,11 @@ class PageAgent {
dispatchTapEvent: this._dispatchTapEvent.bind(this),
getContentQuads: this._getContentQuads.bind(this),
getFullAXTree: this._getFullAXTree.bind(this),
- goBack: this._goBack.bind(this),
- goForward: this._goForward.bind(this),
insertText: this._insertText.bind(this),
navigate: this._navigate.bind(this),
- reload: this._reload.bind(this),
scrollIntoViewIfNeeded: this._scrollIntoViewIfNeeded.bind(this),
setCacheDisabled: this._setCacheDisabled.bind(this),
setFileInputFiles: this._setFileInputFiles.bind(this),
- setInterceptFileChooserDialog: this._setInterceptFileChooserDialog.bind(this),
evaluate: this._runtime.evaluate.bind(this._runtime),
callFunction: this._runtime.callFunction.bind(this._runtime),
getObjectProperties: this._runtime.getObjectProperties.bind(this._runtime),
@@ -224,10 +217,6 @@ class PageAgent {
this._emitAllEvents(this._frameTree.mainFrame());
}
- _setInterceptFileChooserDialog({enabled}) {
- this._docShell.fileInputInterceptionEnabled = !!enabled;
- }
-
_linkClicked(sync, anchorElement) {
if (anchorElement.ownerGlobal.docShell !== this._docShell)
return;
@@ -259,7 +248,9 @@ class PageAgent {
});
}
- _onDOMContentLoaded(event) {
+ onWindowEvent(event) {
+ if (event.type !== 'DOMContentLoaded' && event.type !== 'load')
+ return;
if (!event.target.ownerGlobal)
return;
const docShell = event.target.ownerGlobal.docShell;
@@ -268,7 +259,7 @@ class PageAgent {
return;
this._browserPage.emit('pageEventFired', {
frameId: frame.id(),
- name: 'DOMContentLoaded',
+ name: event.type,
});
}
@@ -291,13 +282,6 @@ class PageAgent {
});
}
- _onLoad(frame) {
- this._browserPage.emit('pageEventFired', {
- frameId: frame.id(),
- name: 'load'
- });
- }
-
_onNavigationStarted(frame) {
this._browserPage.emit('pageNavigationStarted', {
frameId: frame.id(),
@@ -395,35 +379,16 @@ class PageAgent {
return {navigationId: frame.pendingNavigationId(), navigationURL: frame.pendingNavigationURL()};
}
- async _reload({frameId, url}) {
- const frame = this._frameTree.frame(frameId);
- const docShell = frame.docShell().QueryInterface(Ci.nsIWebNavigation);
- docShell.reload(Ci.nsIWebNavigation.LOAD_FLAGS_NONE);
- }
-
- async _goBack({frameId, url}) {
- const frame = this._frameTree.frame(frameId);
- const docShell = frame.docShell();
- if (!docShell.canGoBack)
- return {success: false};
- docShell.goBack();
- return {success: true};
- }
-
- async _goForward({frameId, url}) {
- const frame = this._frameTree.frame(frameId);
- const docShell = frame.docShell();
- if (!docShell.canGoForward)
- return {success: false};
- docShell.goForward();
- return {success: true};
- }
-
async _adoptNode({frameId, objectId, executionContextId}) {
const frame = this._frameTree.frame(frameId);
if (!frame)
throw new Error('Failed to find frame with id = ' + frameId);
- const unsafeObject = frame.unsafeObject(objectId);
+ let unsafeObject;
+ if (!objectId) {
+ unsafeObject = frame.domWindow().frameElement;
+ } else {
+ unsafeObject = frame.unsafeObject(objectId);
+ }
const context = this._runtime.findExecutionContext(executionContextId);
const fromPrincipal = unsafeObject.nodePrincipal;
const toFrame = this._frameTree.frame(context.auxData().frameId);
@@ -655,30 +620,23 @@ class PageAgent {
}
_simulateDragEvent(type, x, y, modifiers) {
- const window = this._frameTree.mainFrame().domWindow();
- const element = window.windowUtils.elementFromPoint(x, y, false, false);
- const event = window.document.createEvent('DragEvent');
-
- event.initDragEvent(
- type,
- true /* bubble */,
- true /* cancelable */,
- window,
- 0 /* clickCount */,
- window.mozInnerScreenX + x,
- window.mozInnerScreenY + y,
- x,
- y,
- modifiers & 2 /* ctrlkey */,
- modifiers & 1 /* altKey */,
- modifiers & 4 /* shiftKey */,
- modifiers & 8 /* metaKey */,
- 0 /* button */, // firefox always has the button as 0 on drops, regardless of which was pressed
- null /* relatedTarget */,
- null,
- );
- if (type !== 'drop' || dragService.dragAction)
- window.windowUtils.dispatchDOMEventViaPresShellForTesting(element, event);
+ if (type !== 'drop' || dragService.dragAction) {
+ const window = this._frameTree.mainFrame().domWindow();
+ window.windowUtils.sendMouseEvent(
+ type,
+ x,
+ y,
+ 0, /*button*/
+ 0, /*clickCount*/
+ modifiers,
+ false /*aIgnoreRootScrollFrame*/,
+ undefined /*pressure*/,
+ undefined /*inputSource*/,
+ undefined /*isDOMEventSynthesized*/,
+ undefined /*isWidgetEventSynthesized*/,
+ 0, /*buttons*/
+ );
+ }
if (type === 'drop')
this._cancelDragIfNeeded();
}
diff --git a/browser_patches/firefox/juggler/content/Runtime.js b/browser_patches/firefox/juggler/content/Runtime.js
index 20c046a1db..a64d2b5dea 100644
--- a/browser_patches/firefox/juggler/content/Runtime.js
+++ b/browser_patches/firefox/juggler/content/Runtime.js
@@ -367,7 +367,7 @@ class ExecutionContext {
try {
this._debuggee.executeInGlobal(script);
} catch (e) {
- dump(`ERROR: ${e.message}\n${e.stack}\n`);
+ dump(`WARNING: ${e.message}\n${e.stack}\n`);
}
}
@@ -450,7 +450,7 @@ class ExecutionContext {
subtype = 'array';
else if (Object.is(rawObj, null))
subtype = 'null';
- else if (this._instanceOf(debuggerObj, rawObj, 'Node'))
+ else if (typeof Node !== 'undefined' && Node.isInstance(rawObj))
subtype = 'node';
else if (this._instanceOf(debuggerObj, rawObj, 'RegExp'))
subtype = 'regexp';
diff --git a/browser_patches/firefox/juggler/content/main.js b/browser_patches/firefox/juggler/content/main.js
index d471ab9553..9e35917d87 100644
--- a/browser_patches/firefox/juggler/content/main.js
+++ b/browser_patches/firefox/juggler/content/main.js
@@ -8,119 +8,118 @@ const {FrameTree} = ChromeUtils.import('chrome://juggler/content/content/FrameTr
const {SimpleChannel} = ChromeUtils.import('chrome://juggler/content/SimpleChannel.js');
const {PageAgent} = ChromeUtils.import('chrome://juggler/content/content/PageAgent.js');
-let frameTree;
+const browsingContextToAgents = new Map();
const helper = new Helper();
-const messageManager = this;
-
-let pageAgent;
-
-let failedToOverrideTimezone = false;
-
-const applySetting = {
- geolocation: (geolocation) => {
- if (geolocation) {
- docShell.setGeolocationOverride({
- coords: {
- latitude: geolocation.latitude,
- longitude: geolocation.longitude,
- accuracy: geolocation.accuracy,
- altitude: NaN,
- altitudeAccuracy: NaN,
- heading: NaN,
- speed: NaN,
- },
- address: null,
- timestamp: Date.now()
- });
- } else {
- docShell.setGeolocationOverride(null);
- }
- },
-
- onlineOverride: (onlineOverride) => {
- if (!onlineOverride) {
- docShell.onlineOverride = Ci.nsIDocShell.ONLINE_OVERRIDE_NONE;
- return;
- }
- docShell.onlineOverride = onlineOverride === 'online' ?
- Ci.nsIDocShell.ONLINE_OVERRIDE_ONLINE : Ci.nsIDocShell.ONLINE_OVERRIDE_OFFLINE;
- },
-
- bypassCSP: (bypassCSP) => {
- docShell.bypassCSPEnabled = bypassCSP;
- },
-
- timezoneId: (timezoneId) => {
- failedToOverrideTimezone = !docShell.overrideTimezone(timezoneId);
- },
-
- locale: (locale) => {
- docShell.languageOverride = locale;
- },
-
- scrollbarsHidden: (hidden) => {
- frameTree.setScrollbarsHidden(hidden);
- },
-
- colorScheme: (colorScheme) => {
- frameTree.setColorScheme(colorScheme);
- },
-
- reducedMotion: (reducedMotion) => {
- frameTree.setReducedMotion(reducedMotion);
- },
-
- forcedColors: (forcedColors) => {
- frameTree.setForcedColors(forcedColors);
- },
-};
-
-const channel = SimpleChannel.createForMessageManager('content::page', messageManager);
-
-function initialize() {
- const response = sendSyncMessage('juggler:content-ready')[0];
- // If we didn't get a response, then we don't want to do anything
- // as a part of this frame script.
- if (!response)
- return;
- const {
- initScripts = [],
- bindings = [],
- settings = {}
- } = response || {};
+
+function initialize(browsingContext, docShell, actor) {
+ if (browsingContext.parent) {
+ // For child frames, return agents from the main frame.
+ return browsingContextToAgents.get(browsingContext.top);
+ }
+
+ let data = browsingContextToAgents.get(browsingContext);
+ if (data) {
+ // Rebind from one main frame actor to another one.
+ data.channel.bindToActor(actor);
+ return data;
+ }
+
+ data = { channel: undefined, pageAgent: undefined, frameTree: undefined, failedToOverrideTimezone: false };
+ browsingContextToAgents.set(browsingContext, data);
+
+ const applySetting = {
+ geolocation: (geolocation) => {
+ if (geolocation) {
+ docShell.setGeolocationOverride({
+ coords: {
+ latitude: geolocation.latitude,
+ longitude: geolocation.longitude,
+ accuracy: geolocation.accuracy,
+ altitude: NaN,
+ altitudeAccuracy: NaN,
+ heading: NaN,
+ speed: NaN,
+ },
+ address: null,
+ timestamp: Date.now()
+ });
+ } else {
+ docShell.setGeolocationOverride(null);
+ }
+ },
+
+ onlineOverride: (onlineOverride) => {
+ if (!onlineOverride) {
+ docShell.onlineOverride = Ci.nsIDocShell.ONLINE_OVERRIDE_NONE;
+ return;
+ }
+ docShell.onlineOverride = onlineOverride === 'online' ?
+ Ci.nsIDocShell.ONLINE_OVERRIDE_ONLINE : Ci.nsIDocShell.ONLINE_OVERRIDE_OFFLINE;
+ },
+
+ bypassCSP: (bypassCSP) => {
+ docShell.bypassCSPEnabled = bypassCSP;
+ },
+
+ timezoneId: (timezoneId) => {
+ data.failedToOverrideTimezone = !docShell.overrideTimezone(timezoneId);
+ },
+
+ locale: (locale) => {
+ docShell.languageOverride = locale;
+ },
+
+ scrollbarsHidden: (hidden) => {
+ data.frameTree.setScrollbarsHidden(hidden);
+ },
+
+ javaScriptDisabled: (javaScriptDisabled) => {
+ data.frameTree.setJavaScriptDisabled(javaScriptDisabled);
+ },
+ };
+
+ const contextCrossProcessCookie = Services.cpmm.sharedData.get('juggler:context-cookie-' + browsingContext.originAttributes.userContextId) || { initScripts: [], bindings: [], settings: {} };
+ const pageCrossProcessCookie = Services.cpmm.sharedData.get('juggler:page-cookie-' + browsingContext.browserId) || { initScripts: [], bindings: [], interceptFileChooserDialog: false };
+
// Enforce focused state for all top level documents.
docShell.overrideHasFocus = true;
docShell.forceActiveState = true;
- frameTree = new FrameTree(docShell);
- for (const [name, value] of Object.entries(settings)) {
+ docShell.disallowBFCache = true;
+ data.frameTree = new FrameTree(docShell);
+ for (const [name, value] of Object.entries(contextCrossProcessCookie.settings)) {
if (value !== undefined)
applySetting[name](value);
}
- for (const { worldName, name, script } of bindings)
- frameTree.addBinding(worldName, name, script);
- frameTree.setInitScripts(initScripts);
-
- pageAgent = new PageAgent(messageManager, channel, frameTree);
-
- channel.register('', {
+ for (const { worldName, name, script } of [...contextCrossProcessCookie.bindings, ...pageCrossProcessCookie.bindings])
+ data.frameTree.addBinding(worldName, name, script);
+ data.frameTree.setInitScripts([...contextCrossProcessCookie.initScripts, ...pageCrossProcessCookie.initScripts]);
+ data.channel = SimpleChannel.createForActor(actor);
+ data.pageAgent = new PageAgent(data.channel, data.frameTree);
+ docShell.fileInputInterceptionEnabled = !!pageCrossProcessCookie.interceptFileChooserDialog;
+
+ data.channel.register('', {
setInitScripts(scripts) {
- frameTree.setInitScripts(scripts);
+ data.frameTree.setInitScripts(scripts);
},
addBinding({worldName, name, script}) {
- frameTree.addBinding(worldName, name, script);
+ data.frameTree.addBinding(worldName, name, script);
},
applyContextSetting({name, value}) {
applySetting[name](value);
},
+ setInterceptFileChooserDialog(enabled) {
+ docShell.fileInputInterceptionEnabled = !!enabled;
+ },
+
ensurePermissions() {
// noop, just a rountrip.
},
hasFailedToOverrideTimezone() {
- return failedToOverrideTimezone;
+ return data.failedToOverrideTimezone;
},
async awaitViewportDimensions({width, height, deviceSizeIsPageSize}) {
@@ -142,14 +141,8 @@ function initialize() {
},
});
- const gListeners = [
- helper.addEventListener(messageManager, 'unload', msg => {
- helper.removeListeners(gListeners);
- pageAgent.dispose();
- frameTree.dispose();
- channel.dispose();
- }),
- ];
+ return data;
}
-initialize();
+var EXPORTED_SYMBOLS = ['initialize'];
+this.initialize = initialize;
diff --git a/browser_patches/firefox/juggler/jar.mn b/browser_patches/firefox/juggler/jar.mn
index 8b3d3922c1..7f3ecf5cdf 100644
--- a/browser_patches/firefox/juggler/jar.mn
+++ b/browser_patches/firefox/juggler/jar.mn
@@ -11,11 +11,13 @@ juggler.jar:
content/NetworkObserver.js (NetworkObserver.js)
content/TargetRegistry.js (TargetRegistry.js)
content/SimpleChannel.js (SimpleChannel.js)
+ content/JugglerFrameParent.jsm (JugglerFrameParent.jsm)
content/protocol/PrimitiveTypes.js (protocol/PrimitiveTypes.js)
content/protocol/Protocol.js (protocol/Protocol.js)
content/protocol/Dispatcher.js (protocol/Dispatcher.js)
content/protocol/PageHandler.js (protocol/PageHandler.js)
content/protocol/BrowserHandler.js (protocol/BrowserHandler.js)
+ content/content/JugglerFrameChild.jsm (content/JugglerFrameChild.jsm)
content/content/main.js (content/main.js)
content/content/FrameTree.js (content/FrameTree.js)
content/content/PageAgent.js (content/PageAgent.js)
diff --git a/browser_patches/firefox/juggler/protocol/BrowserHandler.js b/browser_patches/firefox/juggler/protocol/BrowserHandler.js
index 623f9cc331..2492840cc2 100644
--- a/browser_patches/firefox/juggler/protocol/BrowserHandler.js
+++ b/browser_patches/firefox/juggler/protocol/BrowserHandler.js
@@ -214,7 +214,7 @@ class BrowserHandler {
}
async ['Browser.setJavaScriptDisabled']({browserContextId, javaScriptDisabled}) {
- await this._targetRegistry.browserContextForId(browserContextId).setJavaScriptDisabled(javaScriptDisabled);
+ await this._targetRegistry.browserContextForId(browserContextId).applySetting('javaScriptDisabled', nullToUndefined(javaScriptDisabled));
}
async ['Browser.setLocaleOverride']({browserContextId, locale}) {
diff --git a/browser_patches/firefox/juggler/protocol/PageHandler.js b/browser_patches/firefox/juggler/protocol/PageHandler.js
index 415f395aaf..cdf408cd4d 100644
--- a/browser_patches/firefox/juggler/protocol/PageHandler.js
+++ b/browser_patches/firefox/juggler/protocol/PageHandler.js
@@ -89,6 +89,11 @@ 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();
@@ -100,6 +105,7 @@ 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')),
@@ -113,9 +119,9 @@ class PageHandler {
pageFrameDetached: emitProtocolEvent('Page.frameDetached'),
pageLinkClicked: emitProtocolEvent('Page.linkClicked'),
pageWillOpenNewWindowAsynchronously: emitProtocolEvent('Page.willOpenNewWindowAsynchronously'),
- pageNavigationAborted: emitProtocolEvent('Page.navigationAborted'),
- pageNavigationCommitted: emitProtocolEvent('Page.navigationCommitted'),
- pageNavigationStarted: emitProtocolEvent('Page.navigationStarted'),
+ pageNavigationAborted: params => this._handleNavigationEvent('Page.navigationAborted', params),
+ pageNavigationCommitted: params => this._handleNavigationEvent('Page.navigationCommitted', params),
+ pageNavigationStarted: params => this._handleNavigationEvent('Page.navigationStarted', params),
pageReady: this._onPageReady.bind(this),
pageSameDocumentNavigation: emitProtocolEvent('Page.sameDocumentNavigation'),
pageUncaughtError: emitProtocolEvent('Page.uncaughtError'),
@@ -129,10 +135,11 @@ class PageHandler {
return;
}
}
- emitProtocolEvent('Runtime.console')(params);
+ this._session.emitEvent('Runtime.console', params);
},
runtimeExecutionContextCreated: emitProtocolEvent('Runtime.executionContextCreated'),
runtimeExecutionContextDestroyed: emitProtocolEvent('Runtime.executionContextDestroyed'),
+ runtimeExecutionContextsCleared: emitProtocolEvent('Runtime.executionContextsCleared'),
webSocketCreated: emitProtocolEvent('Page.webSocketCreated'),
webSocketOpened: emitProtocolEvent('Page.webSocketOpened'),
@@ -157,6 +164,28 @@ 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');
@@ -210,6 +239,8 @@ 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) || [];
@@ -295,8 +326,8 @@ class PageHandler {
return await this._contentPage.send('setCacheDisabled', options);
}
- async ['Page.addBinding'](options) {
- return await this._contentPage.send('addBinding', options);
+ async ['Page.addBinding']({ worldName, name, script }) {
+ return await this._pageTarget.addBinding(worldName, name, script);
}
async ['Page.adoptNode'](options) {
@@ -358,16 +389,25 @@ class PageHandler {
return await this._contentPage.send('navigate', options);
}
- async ['Page.goBack'](options) {
- return await this._contentPage.send('goBack', options);
+ async ['Page.goBack']({}) {
+ const browsingContext = this._pageTarget.linkedBrowser().browsingContext;
+ if (!browsingContext.embedderElement?.canGoBack)
+ return { success: false };
+ browsingContext.goBack();
+ return { success: true };
}
- async ['Page.goForward'](options) {
- return await this._contentPage.send('goForward', options);
+ async ['Page.goForward']({}) {
+ const browsingContext = this._pageTarget.linkedBrowser().browsingContext;
+ if (!browsingContext.embedderElement?.canGoForward)
+ return { success: false };
+ browsingContext.goForward();
+ return { success: true };
}
- async ['Page.reload'](options) {
- return await this._contentPage.send('reload', options);
+ async ['Page.reload']({}) {
+ const browsingContext = this._pageTarget.linkedBrowser().browsingContext;
+ browsingContext.reload(Ci.nsIWebNavigation.LOAD_FLAGS_NONE);
}
async ['Page.describeNode'](options) {
@@ -438,8 +478,8 @@ class PageHandler {
dialog.dismiss();
}
- async ['Page.setInterceptFileChooserDialog'](options) {
- return await this._contentPage.send('setInterceptFileChooserDialog', options);
+ async ['Page.setInterceptFileChooserDialog']({ enabled }) {
+ return await this._pageTarget.setInterceptFileChooserDialog(enabled);
}
async ['Page.startScreencast'](options) {
diff --git a/browser_patches/firefox/juggler/protocol/Protocol.js b/browser_patches/firefox/juggler/protocol/Protocol.js
index be0f15af0d..329bb7e19c 100644
--- a/browser_patches/firefox/juggler/protocol/Protocol.js
+++ b/browser_patches/firefox/juggler/protocol/Protocol.js
@@ -227,6 +227,7 @@ const Browser = {
uuid: t.String,
browserContextId: t.Optional(t.String),
pageTargetId: t.String,
+ frameId: t.String,
url: t.String,
suggestedFileName: t.String,
},
@@ -573,6 +574,8 @@ const Runtime = {
'executionContextDestroyed': {
executionContextId: t.String,
},
+ 'executionContextsCleared': {
+ },
'console': {
executionContextId: t.String,
args: t.Array(runtimeTypes.RemoteObject),
@@ -847,7 +850,8 @@ const Page = {
'adoptNode': {
params: {
frameId: t.String,
- objectId: t.String,
+ // Missing objectId adopts frame owner.
+ objectId: t.Optional(t.String),
executionContextId: t.String,
},
returns: {
diff --git a/browser_patches/firefox/juggler/screencast/HeadlessWindowCapturer.cpp b/browser_patches/firefox/juggler/screencast/HeadlessWindowCapturer.cpp
index 88d1791dde..d8aaae8443 100644
--- a/browser_patches/firefox/juggler/screencast/HeadlessWindowCapturer.cpp
+++ b/browser_patches/firefox/juggler/screencast/HeadlessWindowCapturer.cpp
@@ -19,7 +19,9 @@ using namespace webrtc;
namespace mozilla {
rtc::scoped_refptr<webrtc::VideoCaptureModuleEx> HeadlessWindowCapturer::Create(HeadlessWidget* headlessWindow) {
- return new rtc::RefCountedObject<HeadlessWindowCapturer>(headlessWindow);
+ return rtc::scoped_refptr<webrtc::VideoCaptureModuleEx>(
+ new rtc::RefCountedObject<HeadlessWindowCapturer>(headlessWindow)
+ );
}
HeadlessWindowCapturer::HeadlessWindowCapturer(mozilla::widget::HeadlessWidget* window)
diff --git a/browser_patches/firefox/juggler/screencast/nsScreencastService.cpp b/browser_patches/firefox/juggler/screencast/nsScreencastService.cpp
index 20a766dc37..c58cbf0c84 100644
--- a/browser_patches/firefox/juggler/screencast/nsScreencastService.cpp
+++ b/browser_patches/firefox/juggler/screencast/nsScreencastService.cpp
@@ -55,7 +55,7 @@ rtc::scoped_refptr<webrtc::VideoCaptureModuleEx> CreateWindowCapturer(nsIWidget*
windowId.AppendPrintf("%" PRIuPTR, rawWindowId);
bool captureCursor = false;
static int moduleId = 0;
- return webrtc::DesktopCaptureImpl::Create(++moduleId, windowId.get(), CaptureDeviceType::Window, captureCursor);
+ return rtc::scoped_refptr<webrtc::VideoCaptureModuleEx>(webrtc::DesktopCaptureImpl::Create(++moduleId, windowId.get(), CaptureDeviceType::Window, captureCursor));
}
nsresult generateUid(nsString& uid) {
diff --git a/browser_patches/firefox/patches/bootstrap.diff b/browser_patches/firefox/patches/bootstrap.diff
index b32d2fe975..ad9f8aa2d0 100644
--- a/browser_patches/firefox/patches/bootstrap.diff
+++ b/browser_patches/firefox/patches/bootstrap.diff
@@ -1,8 +1,8 @@
diff --git a/accessible/base/NotificationController.h b/accessible/base/NotificationController.h
-index afb6230bb613ecde4a5e3271478a682d0396dc3b..a3a7d9786f9d18bad6afc292264b9dbc62c14cf2 100644
+index 2f0428b53d5e1fc4fd97cbc6c0619edbe425e7bd..8e72e1b3d0f69ab613eb95bc1d4676dcaec5c6a9 100644
--- a/accessible/base/NotificationController.h
+++ b/accessible/base/NotificationController.h
-@@ -276,6 +276,8 @@ class NotificationController final : public EventQueue,
+@@ -245,6 +245,8 @@ class NotificationController final : public EventQueue,
}
#endif
@@ -59,7 +59,7 @@ index 416a1c5497c97ed80cc0f37d72545e36f7e36b4c..b81983cf7153378260a21f6af225e349
* Return XPCOM wrapper for the internal accessible.
*/
diff --git a/browser/app/winlauncher/LauncherProcessWin.cpp b/browser/app/winlauncher/LauncherProcessWin.cpp
-index 4460774865769609b66c0710f7c83f4d5c02b6fa..2ca95607b9b093218d48f83adc95c514cebe661b 100644
+index 16e8c466e00d7dafe12e5e958c5be5967b06360b..a34658a87ac19797e694fb69dd369bb2476fb7d4 100644
--- a/browser/app/winlauncher/LauncherProcessWin.cpp
+++ b/browser/app/winlauncher/LauncherProcessWin.cpp
@@ -23,6 +23,7 @@
@@ -70,7 +70,7 @@ index 4460774865769609b66c0710f7c83f4d5c02b6fa..2ca95607b9b093218d48f83adc95c514
#include <windows.h>
#include <processthreadsapi.h>
-@@ -359,8 +360,19 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
+@@ -421,8 +422,18 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
HANDLE stdHandles[] = {::GetStdHandle(STD_INPUT_HANDLE),
::GetStdHandle(STD_OUTPUT_HANDLE),
::GetStdHandle(STD_ERROR_HANDLE)};
@@ -78,8 +78,7 @@ index 4460774865769609b66c0710f7c83f4d5c02b6fa..2ca95607b9b093218d48f83adc95c514
attrs.AddInheritableHandles(stdHandles);
+ // Playwright pipe installation.
+ bool hasJugglerPipe =
-+ mozilla::CheckArg(argc, argv, L"juggler-pipe",
-+ static_cast<const wchar_t**>(nullptr),
++ mozilla::CheckArg(argc, argv, "juggler-pipe", nullptr,
+ mozilla::CheckArgFlag::None) == mozilla::ARG_FOUND;
+ if (hasJugglerPipe) {
+ intptr_t stdio3 = _get_osfhandle(3);
@@ -92,10 +91,10 @@ index 4460774865769609b66c0710f7c83f4d5c02b6fa..2ca95607b9b093218d48f83adc95c514
DWORD creationFlags = CREATE_SUSPENDED | CREATE_UNICODE_ENVIRONMENT;
diff --git a/browser/installer/allowed-dupes.mn b/browser/installer/allowed-dupes.mn
-index b59fe4b1854fec7cb329139f9c6773498fb9de51..29973af04902848808e850b40bf85e5f694d349a 100644
+index 6ab29ba31e937e1c5bb1208a9a2508ff0496fd02..7989da51c5368fa80cc66cccdfc018a9b3fb2f38 100644
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
-@@ -71,6 +71,12 @@ browser/features/[email protected]/shims/empty-shim.txt
+@@ -67,6 +67,12 @@ browser/features/[email protected]/shims/empty-shim.txt
removed-files
#endif
@@ -109,10 +108,10 @@ index b59fe4b1854fec7cb329139f9c6773498fb9de51..29973af04902848808e850b40bf85e5f
gmp-clearkey/0.1/manifest.json
i686/gmp-clearkey/0.1/manifest.json
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
-index 14e582fc61be808d5b6f3ae7801f43c7b0b743d4..80e400b5c3e316afe2bff1bac16808bad16dc4bd 100644
+index 9229a0bd0e041815331aaf2973afda22c007423d..3ce0e453d4124d110e11877f5bbade776d11cfd4 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
-@@ -192,6 +192,9 @@
+@@ -196,6 +196,9 @@
@RESPATH@/chrome/remote.manifest
#endif
@@ -123,10 +122,10 @@ index 14e582fc61be808d5b6f3ae7801f43c7b0b743d4..80e400b5c3e316afe2bff1bac16808ba
@RESPATH@/components/extensions-toolkit.manifest
@RESPATH@/browser/components/extensions-browser.manifest
diff --git a/devtools/server/socket/websocket-server.js b/devtools/server/socket/websocket-server.js
-index 040c7b124dec6bb254563bbe74fe50012cb077a3..b4e6b8132786af70e8ad0dce88b67c2835307f88 100644
+index a32156978aacd7c8cbe9001250bfa1516dbc360f..ff03ff48b505ef8a9117671bf21e8b0e8214ec1f 100644
--- a/devtools/server/socket/websocket-server.js
+++ b/devtools/server/socket/websocket-server.js
-@@ -133,13 +133,12 @@ function writeHttpResponse(output, response) {
+@@ -134,13 +134,12 @@ function writeHttpResponse(output, response) {
* Process the WebSocket handshake headers and return the key to be sent in
* Sec-WebSocket-Accept response header.
*/
@@ -142,7 +141,7 @@ index 040c7b124dec6bb254563bbe74fe50012cb077a3..b4e6b8132786af70e8ad0dce88b67c28
throw new Error("The handshake request has unknown path");
}
-@@ -189,13 +188,13 @@ function computeKey(key) {
+@@ -190,13 +189,13 @@ function computeKey(key) {
/**
* Perform the server part of a WebSocket opening handshake on an incoming connection.
*/
@@ -158,7 +157,7 @@ index 040c7b124dec6bb254563bbe74fe50012cb077a3..b4e6b8132786af70e8ad0dce88b67c28
// Send response headers
await writeHttpResponse(output, [
-@@ -217,8 +216,8 @@ const serverHandshake = async function(input, output) {
+@@ -218,8 +217,8 @@ const serverHandshake = async function(input, output) {
* Performs the WebSocket handshake and waits for the WebSocket to open.
* Returns Promise with a WebSocket ready to send and receive messages.
*/
@@ -170,7 +169,7 @@ index 040c7b124dec6bb254563bbe74fe50012cb077a3..b4e6b8132786af70e8ad0dce88b67c28
const transportProvider = {
setListener(upgradeListener) {
diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp
-index 4b4c20d5d04e51e5eeb08027c4b48068ee21d703..5529185d2a39e041b7e5021a5f5de63269644a4b 100644
+index 31a929e3150366d25f5acc295fe81ea0352d4621..217fe517155382ef7fa4d3cb6144be6784b83b55 100644
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -111,6 +111,20 @@ struct ParamTraits<mozilla::dom::PrefersColorSchemeOverride>
@@ -194,7 +193,7 @@ index 4b4c20d5d04e51e5eeb08027c4b48068ee21d703..5529185d2a39e041b7e5021a5f5de632
template <>
struct ParamTraits<mozilla::dom::ExplicitActiveStatus>
: public ContiguousEnumSerializer<
-@@ -2782,6 +2796,40 @@ void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
+@@ -2839,6 +2853,40 @@ void BrowsingContext::DidSet(FieldIndex<IDX_PrefersColorSchemeOverride>,
PresContextAffectingFieldChanged();
}
@@ -236,10 +235,10 @@ index 4b4c20d5d04e51e5eeb08027c4b48068ee21d703..5529185d2a39e041b7e5021a5f5de632
nsString&& aOldValue) {
MOZ_ASSERT(IsTop());
diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h
-index e0b091feba6ce38e57681c62c386d3b70234de1f..4fae381a8bded7ae004ccb25187b3ace559fea41 100644
+index 8d32d0f5a37396eb18aa217bcac887f131df9fa2..4971c7ea0c38e2fef4b138dbadd17de1288afe08 100644
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
-@@ -176,10 +176,10 @@ enum class ExplicitActiveStatus : uint8_t {
+@@ -190,10 +190,10 @@ struct EmbedderColorSchemes {
FIELD(GVInaudibleAutoplayRequestStatus, GVAutoplayRequestStatus) \
/* ScreenOrientation-related APIs */ \
FIELD(CurrentOrientationAngle, float) \
@@ -252,9 +251,9 @@ index e0b091feba6ce38e57681c62c386d3b70234de1f..4fae381a8bded7ae004ccb25187b3ace
FIELD(EmbedderElementType, Maybe<nsString>) \
FIELD(MessageManagerGroup, nsString) \
FIELD(MaxTouchPointsOverride, uint8_t) \
-@@ -217,6 +217,10 @@ enum class ExplicitActiveStatus : uint8_t {
+@@ -231,6 +231,10 @@ struct EmbedderColorSchemes {
* <browser> embedder element. */ \
- FIELD(EmbedderColorScheme, dom::PrefersColorSchemeOverride) \
+ FIELD(EmbedderColorSchemes, EmbedderColorSchemes) \
FIELD(DisplayMode, dom::DisplayMode) \
+ /* playwright addition */ \
+ FIELD(PrefersReducedMotionOverride, dom::PrefersReducedMotionOverride) \
@@ -263,7 +262,7 @@ index e0b091feba6ce38e57681c62c386d3b70234de1f..4fae381a8bded7ae004ccb25187b3ace
/* The number of entries added to the session history because of this \
* browsing context. */ \
FIELD(HistoryEntryCount, uint32_t) \
-@@ -893,6 +897,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+@@ -922,6 +926,14 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
return GetPrefersColorSchemeOverride();
}
@@ -278,7 +277,7 @@ index e0b091feba6ce38e57681c62c386d3b70234de1f..4fae381a8bded7ae004ccb25187b3ace
bool IsInBFCache() const;
bool AllowJavascript() const { return GetAllowJavascript(); }
-@@ -1047,6 +1059,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+@@ -1079,6 +1091,23 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
void PresContextAffectingFieldChanged();
@@ -303,7 +302,7 @@ index e0b091feba6ce38e57681c62c386d3b70234de1f..4fae381a8bded7ae004ccb25187b3ace
bool CanSet(FieldIndex<IDX_SuspendMediaWhenInactive>, bool, ContentParent*) {
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
-index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fef768d74c 100644
+index 0a029957c8232018f46dd1a677e131bc91f12ad6..f24d066592c186ec9059732e3ab59938ab7061e0 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -15,6 +15,12 @@
@@ -351,7 +350,7 @@ index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fe
#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsObjectLoadingContent.h"
-@@ -371,6 +381,13 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
+@@ -371,6 +381,14 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
mAllowDNSPrefetch(true),
mAllowWindowControl(true),
mCSSErrorReportingEnabled(false),
@@ -359,13 +358,14 @@ index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fe
+ mOverrideHasFocus(false),
+ mBypassCSPEnabled(false),
+ mForceActiveState(false),
++ mDisallowBFCache(false),
+ mOnlineOverride(nsIDocShell::ONLINE_OVERRIDE_NONE),
+ mReducedMotionOverride(REDUCED_MOTION_OVERRIDE_NONE),
+ mForcedColorsOverride(FORCED_COLORS_OVERRIDE_NO_OVERRIDE),
mAllowAuth(mItemType == typeContent),
mAllowKeywordFixup(false),
mDisableMetaRefreshWhenInactive(false),
-@@ -3256,6 +3273,221 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
+@@ -3268,6 +3286,234 @@ nsDocShell::GetMessageManager(ContentFrameMessageManager** aMessageManager) {
return NS_OK;
}
@@ -405,6 +405,19 @@ index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fe
+ return NS_OK;
+}
+
++NS_IMETHODIMP
++nsDocShell::GetDisallowBFCache(bool* aEnabled) {
++ MOZ_ASSERT(aEnabled);
++ *aEnabled = mDisallowBFCache;
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsDocShell::SetDisallowBFCache(bool aEnabled) {
++ mDisallowBFCache = aEnabled;
++ return NS_OK;
++}
++
+bool nsDocShell::IsBypassCSPEnabled() {
+ return GetRootDocShell()->mBypassCSPEnabled;
+}
@@ -587,7 +600,7 @@ index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fe
NS_IMETHODIMP
nsDocShell::GetIsNavigating(bool* aOut) {
*aOut = mIsNavigating;
-@@ -4886,7 +5118,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
+@@ -4895,7 +5141,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
}
void nsDocShell::ActivenessMaybeChanged() {
@@ -596,7 +609,18 @@ index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fe
if (RefPtr<PresShell> presShell = GetPresShell()) {
presShell->ActivenessMaybeChanged();
}
-@@ -8624,6 +8856,12 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
+@@ -6847,6 +7093,10 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
+ return false; // no entry to save into
+ }
+
++ if (mDisallowBFCache) {
++ return false;
++ }
++
+ 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) {
true, // aForceNoOpener
getter_AddRefs(newBC));
MOZ_ASSERT(!newBC);
@@ -609,7 +633,7 @@ index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fe
return rv;
}
-@@ -12780,6 +13018,9 @@ class OnLinkClickEvent : public Runnable {
+@@ -12793,6 +13049,9 @@ class OnLinkClickEvent : public Runnable {
mHandler->OnLinkClickSync(mContent, mLoadState, mNoOpenerImplied,
mTriggeringPrincipal);
}
@@ -619,7 +643,7 @@ index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fe
return NS_OK;
}
-@@ -12859,6 +13100,8 @@ nsresult nsDocShell::OnLinkClick(
+@@ -12872,6 +13131,8 @@ nsresult nsDocShell::OnLinkClick(
nsCOMPtr<nsIRunnable> ev =
new OnLinkClickEvent(this, aContent, loadState, noOpenerImplied,
aIsTrusted, aTriggeringPrincipal);
@@ -629,7 +653,7 @@ index e7f3305fae1c6754974b2a53995080f487d559cf..eaa173262e6cfec0765153fb890588fe
}
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
-index 61998bf661a2c765411280e03d0726b227c31a3f..5ba8e2ac8e13ae9d18591fd477e5c9414843e3cc 100644
+index 293bfeee6e0779d15dd6ef60fc06f9969f70f003..a0481717f5f7b5ceb0301b7311c27b5631c258ee 100644
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -16,6 +16,7 @@
@@ -673,7 +697,7 @@ index 61998bf661a2c765411280e03d0726b227c31a3f..5ba8e2ac8e13ae9d18591fd477e5c941
// Handles retrieval of subframe session history for nsDocShell::LoadURI. If a
// load is requested in a subframe of the current DocShell, the subframe
// loadType may need to reflect the loadType of the parent document, or in
-@@ -1313,6 +1326,16 @@ class nsDocShell final : public nsDocLoader,
+@@ -1313,6 +1326,17 @@ class nsDocShell final : public nsDocLoader,
bool mAllowDNSPrefetch : 1;
bool mAllowWindowControl : 1;
bool mCSSErrorReportingEnabled : 1;
@@ -681,6 +705,7 @@ index 61998bf661a2c765411280e03d0726b227c31a3f..5ba8e2ac8e13ae9d18591fd477e5c941
+ bool mOverrideHasFocus : 1;
+ bool mBypassCSPEnabled : 1;
+ bool mForceActiveState : 1;
++ bool mDisallowBFCache : 1;
+ nsString mLanguageOverride;
+ RefPtr<nsGeolocationService> mGeolocationServiceOverride;
+ OnlineOverride mOnlineOverride;
@@ -691,7 +716,7 @@ index 61998bf661a2c765411280e03d0726b227c31a3f..5ba8e2ac8e13ae9d18591fd477e5c941
bool mAllowKeywordFixup : 1;
bool mDisableMetaRefreshWhenInactive : 1;
diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl
-index 6b85ddd842a6d2e29f86047017b78b2007b99867..e0b56c4f85544580b9a631619fb06799ad244494 100644
+index 6b85ddd842a6d2e29f86047017b78b2007b99867..f530ab61ac26cb7c94c8ccd07d11aa90c5148212 100644
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -44,6 +44,7 @@ interface nsIURI;
@@ -702,7 +727,7 @@ index 6b85ddd842a6d2e29f86047017b78b2007b99867..e0b56c4f85544580b9a631619fb06799
interface nsIEditor;
interface nsIEditingSession;
interface nsIInputStream;
-@@ -803,6 +804,41 @@ interface nsIDocShell : nsIDocShellTreeItem
+@@ -803,6 +804,43 @@ interface nsIDocShell : nsIDocShellTreeItem
*/
void synchronizeLayoutHistoryState();
@@ -714,6 +739,8 @@ index 6b85ddd842a6d2e29f86047017b78b2007b99867..e0b56c4f85544580b9a631619fb06799
+
+ attribute boolean forceActiveState;
+
++ attribute boolean disallowBFCache;
++
+ attribute AString languageOverride;
+
+ boolean overrideTimezone(in AString timezoneId);
@@ -745,10 +772,10 @@ index 6b85ddd842a6d2e29f86047017b78b2007b99867..e0b56c4f85544580b9a631619fb06799
* 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 3c074b09154843577c78b0271b2069eacca8408c..efcb018e9568ce55889acde030dc2baabdbb3e9b 100644
+index 5d529f6023db60091054b975ac9738b91326c330..a06117382098e45693e2170398dbf0b7715184cb 100644
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
-@@ -3646,6 +3646,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
+@@ -3619,6 +3619,9 @@ void Document::SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages) {
}
void Document::ApplySettingsFromCSP(bool aSpeculative) {
@@ -758,7 +785,7 @@ index 3c074b09154843577c78b0271b2069eacca8408c..efcb018e9568ce55889acde030dc2baa
nsresult rv = NS_OK;
if (!aSpeculative) {
// 1) apply settings from regular CSP
-@@ -3703,6 +3706,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
+@@ -3676,6 +3679,11 @@ nsresult Document::InitCSP(nsIChannel* aChannel) {
MOZ_ASSERT(!mScriptGlobalObject,
"CSP must be initialized before mScriptGlobalObject is set!");
@@ -770,7 +797,7 @@ index 3c074b09154843577c78b0271b2069eacca8408c..efcb018e9568ce55889acde030dc2baa
// If this is a data document - no need to set CSP.
if (mLoadedAsData) {
return NS_OK;
-@@ -4510,6 +4518,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
+@@ -4491,6 +4499,10 @@ bool Document::HasFocus(ErrorResult& rv) const {
return false;
}
@@ -781,7 +808,7 @@ index 3c074b09154843577c78b0271b2069eacca8408c..efcb018e9568ce55889acde030dc2baa
if (!fm->IsInActiveWindow(bc)) {
return false;
}
-@@ -17984,6 +17996,71 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
+@@ -17838,6 +17850,71 @@ ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
return LookAndFeel::PreferredColorSchemeForContent();
}
@@ -854,10 +881,10 @@ index 3c074b09154843577c78b0271b2069eacca8408c..efcb018e9568ce55889acde030dc2baa
if (!sLoadingForegroundTopLevelContentDocument) {
return false;
diff --git a/dom/base/Document.h b/dom/base/Document.h
-index 67377432eaec1a6220e17184fce79e3de8362028..52c2dae0bd73f887df0bc4b4cbb32f990dbf672f 100644
+index b81fb1088ab0025555c24e7353cda836f896b26b..21403d0a219cc478b8de20fda410eb265eb1569a 100644
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
-@@ -4016,6 +4016,9 @@ class Document : public nsINode,
+@@ -4023,6 +4023,9 @@ class Document : public nsINode,
// color-scheme meta tag.
ColorScheme DefaultColorScheme() const;
@@ -868,10 +895,10 @@ index 67377432eaec1a6220e17184fce79e3de8362028..52c2dae0bd73f887df0bc4b4cbb32f99
static bool AutomaticStorageAccessPermissionCanBeGranted(
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
-index 92081a09b4925e0b687608abd8ad51d02ff2f5cf..b010190d8af0cd1765d91b5bbd7e46e360a6c30f 100644
+index e432d25c7397be64b009e4cb671cb6e322175830..074b1c7241c64412ee58a6239d36c9f74476ae46 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
-@@ -325,14 +325,18 @@ void Navigator::GetAppName(nsAString& aAppName, CallerType aCallerType) const {
+@@ -326,14 +326,18 @@ void Navigator::GetAppName(nsAString& aAppName, CallerType aCallerType) const {
* for more detail.
*/
/* static */
@@ -892,7 +919,7 @@ index 92081a09b4925e0b687608abd8ad51d02ff2f5cf..b010190d8af0cd1765d91b5bbd7e46e3
// Split values on commas.
for (nsDependentSubstring lang :
-@@ -384,7 +388,13 @@ void Navigator::GetLanguage(nsAString& aLanguage) {
+@@ -385,7 +389,13 @@ void Navigator::GetLanguage(nsAString& aLanguage) {
}
void Navigator::GetLanguages(nsTArray<nsString>& aLanguages) {
@@ -907,7 +934,7 @@ index 92081a09b4925e0b687608abd8ad51d02ff2f5cf..b010190d8af0cd1765d91b5bbd7e46e3
// The returned value is cached by the binding code. The window listens to the
// accept languages change and will clear the cache when needed. It has to
-@@ -563,7 +573,13 @@ bool Navigator::CookieEnabled() {
+@@ -564,7 +574,13 @@ bool Navigator::CookieEnabled() {
return granted;
}
@@ -922,11 +949,21 @@ index 92081a09b4925e0b687608abd8ad51d02ff2f5cf..b010190d8af0cd1765d91b5bbd7e46e3
void Navigator::GetBuildID(nsAString& aBuildID, CallerType aCallerType,
ErrorResult& aRv) const {
+@@ -2257,7 +2273,8 @@ bool Navigator::Webdriver() {
+ }
+ #endif
+
+- return false;
++ // Playwright is automating the browser, so we should pretend to be a webdriver
++ return true;
+ }
+
+ } // namespace mozilla::dom
diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h
-index cb821086b1ac884ba96ef8874211bff16106b206..3b93388637f9ec7493735e9beb6f02a78e14c6b3 100644
+index 19b9c31fa2464fc3e865e7a7d69ff91140153510..14b617eefc5c23fcca20c407cb71b5618321f6da 100644
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
-@@ -215,7 +215,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
+@@ -219,7 +219,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
StorageManager* Storage();
@@ -936,10 +973,10 @@ index cb821086b1ac884ba96ef8874211bff16106b206..3b93388637f9ec7493735e9beb6f02a7
dom::MediaCapabilities* MediaCapabilities();
dom::MediaSession* MediaSession();
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
-index 25b6994c9a42054f97b18d5c4a3e35a0010ee749..cef7ba95112677f1a41beb66db718126601bd151 100644
+index 5a11c595acf75c2de3a50e33572e61f60379dbe9..4b0818df3622ee285f13d7d47bbbe681b5bfb8a3 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
-@@ -8505,7 +8505,8 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8357,7 +8357,8 @@ nsresult nsContentUtils::SendMouseEvent(
bool aIgnoreRootScrollFrame, float aPressure,
unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,
PreventDefaultResult* aPreventDefault, bool aIsDOMEventSynthesized,
@@ -949,7 +986,52 @@ index 25b6994c9a42054f97b18d5c4a3e35a0010ee749..cef7ba95112677f1a41beb66db718126
nsPoint offset;
nsCOMPtr<nsIWidget> widget = GetWidget(aPresShell, &offset);
if (!widget) return NS_ERROR_FAILURE;
-@@ -8564,6 +8565,7 @@ nsresult nsContentUtils::SendMouseEvent(
+@@ -8365,6 +8366,7 @@ nsresult nsContentUtils::SendMouseEvent(
+ EventMessage msg;
+ Maybe<WidgetMouseEvent::ExitFrom> exitFrom;
+ bool contextMenuKey = false;
++ bool isDragEvent = false;
+ if (aType.EqualsLiteral("mousedown")) {
+ msg = eMouseDown;
+ } else if (aType.EqualsLiteral("mouseup")) {
+@@ -8389,6 +8391,12 @@ nsresult nsContentUtils::SendMouseEvent(
+ msg = eMouseHitTest;
+ } else if (aType.EqualsLiteral("MozMouseExploreByTouch")) {
+ msg = eMouseExploreByTouch;
++ } else if (aType.EqualsLiteral("dragover")) {
++ msg = eDragOver;
++ isDragEvent = true;
++ } else if (aType.EqualsLiteral("drop")) {
++ msg = eDrop;
++ isDragEvent = true;
+ } else {
+ return NS_ERROR_FAILURE;
+ }
+@@ -8397,12 +8405,21 @@ nsresult nsContentUtils::SendMouseEvent(
+ aInputSourceArg = MouseEvent_Binding::MOZ_SOURCE_MOUSE;
+ }
+
+- WidgetMouseEvent event(true, msg, widget,
++ std::unique_ptr<WidgetMouseEvent> eventOwner;
++ if (isDragEvent) {
++ eventOwner.reset(new WidgetDragEvent(true, msg, widget));
++ eventOwner->mReason = aIsWidgetEventSynthesized
++ ? WidgetMouseEvent::eSynthesized
++ : WidgetMouseEvent::eReal;
++ } else {
++ eventOwner.reset(new WidgetMouseEvent(true, msg, widget,
+ aIsWidgetEventSynthesized
+ ? WidgetMouseEvent::eSynthesized
+ : WidgetMouseEvent::eReal,
+ contextMenuKey ? WidgetMouseEvent::eContextMenuKey
+- : WidgetMouseEvent::eNormal);
++ : WidgetMouseEvent::eNormal));
++ }
++ WidgetMouseEvent& event = *eventOwner.get();
+ event.pointerId = aIdentifier;
+ event.mModifiers = GetWidgetModifiers(aModifiers);
+ event.mButton = aButton;
+@@ -8416,6 +8433,7 @@ nsresult nsContentUtils::SendMouseEvent(
event.mTime = PR_IntervalNow();
event.mFlags.mIsSynthesizedForTests = aIsDOMEventSynthesized;
event.mExitFrom = exitFrom;
@@ -958,10 +1040,10 @@ index 25b6994c9a42054f97b18d5c4a3e35a0010ee749..cef7ba95112677f1a41beb66db718126
nsPresContext* presContext = aPresShell->GetPresContext();
if (!presContext) return NS_ERROR_FAILURE;
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
-index de038d0832adb4037d2d076011e433412e85cb83..79c59cb6da7a7746df983614d7eff02f97eddfb0 100644
+index 0f48e5319a23b149f0daf38bf0910090c7bf616c..2263a70fe578800301f719a27d084840bc1d6e93 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
-@@ -2957,7 +2957,8 @@ class nsContentUtils {
+@@ -2944,7 +2944,8 @@ class nsContentUtils {
int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure,
unsigned short aInputSourceArg, uint32_t aIdentifier, bool aToWindow,
mozilla::PreventDefaultResult* aPreventDefault,
@@ -972,7 +1054,7 @@ index de038d0832adb4037d2d076011e433412e85cb83..79c59cb6da7a7746df983614d7eff02f
static void FirePageShowEventForFrameLoaderSwap(
nsIDocShellTreeItem* aItem,
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp
-index 8cee829af918aa0c44049f794746816f73fb7b50..daad61c3fbd526aa941c8c0be28892d7ec00521d 100644
+index 885083ab95bf5cfe8183934dfedc4e36b7eb6225..e51374306f322685f0fc1f1da9996d64281dfb79 100644
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -683,7 +683,7 @@ nsDOMWindowUtils::SendMouseEvent(
@@ -1023,10 +1105,10 @@ index 30e0fafa77857c33e9871259a6ac0cebac965df8..3d8810abcfac1c220529b4e6163b0159
MOZ_CAN_RUN_SCRIPT
nsresult SendTouchEventCommon(
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
-index 25c06cd90d552345da4fffbcdb4dfaab02377c97..cc81b234da508405daba42735430dd3f065d2b0c 100644
+index cf46ac3458eb2d45b8cf2bfd2e06c8597a07d30b..e308ee762ed5936fb92332cf65e53e69e063ebeb 100644
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
-@@ -1610,6 +1610,10 @@ void nsFocusManager::SetFocusInner(Element* aNewContent, int32_t aFlags,
+@@ -1613,6 +1613,10 @@ void nsFocusManager::SetFocusInner(Element* aNewContent, int32_t aFlags,
(GetActiveBrowsingContext() == newRootBrowsingContext);
}
@@ -1037,7 +1119,7 @@ index 25c06cd90d552345da4fffbcdb4dfaab02377c97..cc81b234da508405daba42735430dd3f
// Exit fullscreen if a website focuses another window
if (StaticPrefs::full_screen_api_exit_on_windowRaise() &&
!isElementInActiveWindow && (aFlags & FLAG_RAISE) &&
-@@ -2934,7 +2938,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
+@@ -2927,7 +2931,9 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
}
}
@@ -1049,10 +1131,10 @@ index 25c06cd90d552345da4fffbcdb4dfaab02377c97..cc81b234da508405daba42735430dd3f
// 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 02e1ad995ba68d69e4353b89464a0259e22d24a0..bb169f97aff4fe707a4fb2be6c5db5eba7e80c49 100644
+index d8e2ac7cc54c2ca8adb914b05328c76e909a3041..2b49a20cac7376ea561b2bad1bce1bd216dc960e 100644
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
-@@ -2489,7 +2489,7 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
+@@ -2485,7 +2485,7 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
&nsGlobalWindowInner::FireOnNewGlobalObject));
}
@@ -1061,7 +1143,7 @@ index 02e1ad995ba68d69e4353b89464a0259e22d24a0..bb169f97aff4fe707a4fb2be6c5db5eb
// 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
-@@ -2508,10 +2508,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
+@@ -2504,10 +2504,16 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
}();
if (!isContentAboutBlankInChromeDocshell) {
@@ -1082,7 +1164,7 @@ index 02e1ad995ba68d69e4353b89464a0259e22d24a0..bb169f97aff4fe707a4fb2be6c5db5eb
}
}
-@@ -2632,6 +2638,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {
+@@ -2628,6 +2634,19 @@ void nsGlobalWindowOuter::DispatchDOMWindowCreated() {
}
}
@@ -1102,7 +1184,7 @@ index 02e1ad995ba68d69e4353b89464a0259e22d24a0..bb169f97aff4fe707a4fb2be6c5db5eb
void nsGlobalWindowOuter::ClearStatus() { SetStatusOuter(u""_ns); }
void nsGlobalWindowOuter::SetDocShell(nsDocShell* aDocShell) {
-@@ -3769,6 +3788,14 @@ Maybe<CSSIntSize> nsGlobalWindowOuter::GetRDMDeviceSize(
+@@ -3765,6 +3784,14 @@ Maybe<CSSIntSize> nsGlobalWindowOuter::GetRDMDeviceSize(
}
}
}
@@ -1118,7 +1200,7 @@ index 02e1ad995ba68d69e4353b89464a0259e22d24a0..bb169f97aff4fe707a4fb2be6c5db5eb
}
diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h
-index a82771c6d0bf1b5d5547e42fa3dad61537381d4a..0a4e153a11972b305a425ecb4fdb427766174a18 100644
+index 96bb20c65ab6211e4fdf04b0d5f15b0764143672..4c54c97fb6789798921cc6e3b4d4ef7318756d00 100644
--- a/dom/base/nsGlobalWindowOuter.h
+++ b/dom/base/nsGlobalWindowOuter.h
@@ -333,6 +333,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,
@@ -1130,10 +1212,10 @@ index a82771c6d0bf1b5d5547e42fa3dad61537381d4a..0a4e153a11972b305a425ecb4fdb4277
// Outer windows only.
virtual void EnsureSizeAndPositionUpToDate() override;
diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
-index 1088bfc489a067f95bfb84a822a787bdf9463e54..54c4687ff71ec1b82912d9139f061ef5c7d4a426 100644
+index 7260effcc77431adb800e3577183002369c614d3..4fe3d05882d6a14dbf32dd842d7039ae8da4cae4 100644
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
-@@ -1324,6 +1324,62 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
+@@ -1331,6 +1331,62 @@ void nsINode::GetBoxQuadsFromWindowOrigin(const BoxQuadOptions& aOptions,
mozilla::GetBoxQuadsFromWindowOrigin(this, aOptions, aResult, aRv);
}
@@ -1197,10 +1279,10 @@ index 1088bfc489a067f95bfb84a822a787bdf9463e54..54c4687ff71ec1b82912d9139f061ef5
DOMQuad& aQuad, const GeometryNode& aFrom,
const ConvertCoordinateOptions& aOptions, CallerType aCallerType,
diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h
-index 0c7c5867c4a1f2543b774a1f3371c4ce0807f33f..ae35e4a023297f2f0b9d59eb9a0fa8e5aa649202 100644
+index fccf07b43eb05f709eaf49e63c00ab7ddb6df11b..2c07a0f1cf8e321df047b3ef8bcba88752fb855b 100644
--- a/dom/base/nsINode.h
+++ b/dom/base/nsINode.h
-@@ -2130,6 +2130,10 @@ class nsINode : public mozilla::dom::EventTarget {
+@@ -2140,6 +2140,10 @@ class nsINode : public mozilla::dom::EventTarget {
nsTArray<RefPtr<DOMQuad>>& aResult,
ErrorResult& aRv);
@@ -1240,7 +1322,7 @@ index 85a21e459305f556933f4dc0fa7441d8f9ed95a9..d7cb86479ba2ed06542307349d6d86df
static bool DumpEnabled();
diff --git a/dom/chrome-webidl/BrowsingContext.webidl b/dom/chrome-webidl/BrowsingContext.webidl
-index 414e8367d19057d3249f07f6590fc84534406bf3..5872741f2e22d500cd3b939e66e730aaac5ad717 100644
+index 76d0d088dea7520f5fd7753525e98840f30db969..fa8ddfc7fbe0969079892b8f035eece2aeed61eb 100644
--- a/dom/chrome-webidl/BrowsingContext.webidl
+++ b/dom/chrome-webidl/BrowsingContext.webidl
@@ -52,6 +52,24 @@ enum PrefersColorSchemeOverride {
@@ -1282,7 +1364,7 @@ index 414e8367d19057d3249f07f6590fc84534406bf3..5872741f2e22d500cd3b939e66e730aa
* A unique identifier for the browser element that is hosting this
* BrowsingContext tree. Every BrowsingContext in the element's tree will
diff --git a/dom/geolocation/Geolocation.cpp b/dom/geolocation/Geolocation.cpp
-index 5b85084f551faa37ed41a3f7c15482b68b653937..b0886dc9fdd5740d24359aed29d45351599950e1 100644
+index 1d2f65deb8add446993a8a578e1f8bb5b46de090..8dd68391e0e0eb1e6d92898f5263cc984836ee7c 100644
--- a/dom/geolocation/Geolocation.cpp
+++ b/dom/geolocation/Geolocation.cpp
@@ -23,6 +23,7 @@
@@ -1306,7 +1388,7 @@ index 5b85084f551faa37ed41a3f7c15482b68b653937..b0886dc9fdd5740d24359aed29d45351
CachedPositionAndAccuracy lastPosition = gs->GetCachedPosition();
if (lastPosition.position) {
EpochTimeStamp cachedPositionTime_ms;
-@@ -436,8 +435,7 @@ void nsGeolocationRequest::Shutdown() {
+@@ -441,8 +440,7 @@ void nsGeolocationRequest::Shutdown() {
// If there are no other high accuracy requests, the geolocation service will
// notify the provider to switch to the default accuracy.
if (mOptions && mOptions->mEnableHighAccuracy) {
@@ -1316,7 +1398,7 @@ index 5b85084f551faa37ed41a3f7c15482b68b653937..b0886dc9fdd5740d24359aed29d45351
if (gs) {
gs->UpdateAccuracy();
}
-@@ -727,8 +725,14 @@ void nsGeolocationService::StopDevice() {
+@@ -732,8 +730,14 @@ void nsGeolocationService::StopDevice() {
StaticRefPtr<nsGeolocationService> nsGeolocationService::sService;
already_AddRefed<nsGeolocationService>
@@ -1332,7 +1414,7 @@ index 5b85084f551faa37ed41a3f7c15482b68b653937..b0886dc9fdd5740d24359aed29d45351
if (nsGeolocationService::sService) {
result = nsGeolocationService::sService;
-@@ -820,7 +824,9 @@ nsresult Geolocation::Init(nsPIDOMWindowInner* aContentDom) {
+@@ -825,7 +829,9 @@ nsresult Geolocation::Init(nsPIDOMWindowInner* aContentDom) {
// If no aContentDom was passed into us, we are being used
// by chrome/c++ and have no mOwner, no mPrincipal, and no need
// to prompt.
@@ -1344,7 +1426,7 @@ index 5b85084f551faa37ed41a3f7c15482b68b653937..b0886dc9fdd5740d24359aed29d45351
mService->AddLocator(this);
}
diff --git a/dom/geolocation/Geolocation.h b/dom/geolocation/Geolocation.h
-index 5c0d2f96a22c6928d6aee5a226032c0944ae7a54..5a7bb1f6cea1946eea143dca4e2f1e19746a04a4 100644
+index 7e1af00d05fbafa2d828e2c7e4dcc5c82d115f5b..e85af9718d064e4d2865bc944e9d4ba1efb9a5d7 100644
--- a/dom/geolocation/Geolocation.h
+++ b/dom/geolocation/Geolocation.h
@@ -31,6 +31,7 @@
@@ -1381,7 +1463,7 @@ index 5c0d2f96a22c6928d6aee5a226032c0944ae7a54..5a7bb1f6cea1946eea143dca4e2f1e19
~Geolocation();
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
-index d53de983402c9e0fd2d1bd848563efc04edee616..c635674099390cf412a361430517c200fec5796a 100644
+index 6a724b3e39c0a37450780804c8b07003b2a6656e..dbc79440e34f9dc01a16bf579446ca19a80cc59a 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -53,6 +53,7 @@
@@ -1406,7 +1488,7 @@ index d53de983402c9e0fd2d1bd848563efc04edee616..c635674099390cf412a361430517c200
return NS_OK;
}
diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl
-index 51e3288c4cc8f40309a7c75d36c236f6f21fdfb7..844d362d956884feb41181fe40504de497ada14b 100644
+index faefb552491e75b674e4f27418089ef7fcc1a3c0..a1e79fce86440e617ee2e7ae4a3eb0769aa72cfb 100644
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
@@ -372,7 +372,8 @@ interface nsIDOMWindowUtils : nsISupports {
@@ -1420,10 +1502,10 @@ index 51e3288c4cc8f40309a7c75d36c236f6f21fdfb7..844d362d956884feb41181fe40504de4
/** 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 9d4e8fbbfe8d45cc6245c7659423004ad1ceedeb..f955c7bace3cedfe0469e59a5e8c5824158c4d50 100644
+index 3d8f2a67e3ec273bc0e7be610b4e683dc23280d4..728f2fdaf1410b86c0d20df0cfbb29beab4c03bf 100644
--- a/dom/media/systemservices/video_engine/desktop_capture_impl.cc
+++ b/dom/media/systemservices/video_engine/desktop_capture_impl.cc
-@@ -123,10 +123,11 @@ int32_t ScreenDeviceInfoImpl::GetOrientation(const char* deviceUniqueIdUTF8,
+@@ -124,10 +124,11 @@ int32_t ScreenDeviceInfoImpl::GetOrientation(const char* deviceUniqueIdUTF8,
return 0;
}
@@ -1438,7 +1520,7 @@ index 9d4e8fbbfe8d45cc6245c7659423004ad1ceedeb..f955c7bace3cedfe0469e59a5e8c5824
}
int32_t WindowDeviceInfoImpl::Init() {
-@@ -358,9 +359,13 @@ int32_t DesktopCaptureImpl::Init() {
+@@ -365,9 +366,13 @@ int32_t DesktopCaptureImpl::LazyInitDesktopCapturer() {
DesktopCapturer::SourceId sourceId = atoi(_deviceUniqueId.c_str());
pWindowCapturer->SelectSource(sourceId);
@@ -1455,7 +1537,7 @@ index 9d4e8fbbfe8d45cc6245c7659423004ad1ceedeb..f955c7bace3cedfe0469e59a5e8c5824
} 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.
-@@ -377,13 +382,15 @@ int32_t DesktopCaptureImpl::Init() {
+@@ -384,13 +389,15 @@ int32_t DesktopCaptureImpl::LazyInitDesktopCapturer() {
}
DesktopCaptureImpl::DesktopCaptureImpl(const int32_t id, const char* uniqueId,
@@ -1470,8 +1552,8 @@ index 9d4e8fbbfe8d45cc6245c7659423004ad1ceedeb..f955c7bace3cedfe0469e59a5e8c5824
last_capture_time_ms_(rtc::TimeMillis()),
+ capture_cursor_(captureCursor),
time_event_(EventWrapper::Create()),
- #if defined(_WIN32)
- capturer_thread_(
+ capturer_thread_(nullptr),
+ started_(false) {
@@ -428,6 +435,19 @@ void DesktopCaptureImpl::DeRegisterCaptureDataCallback(
}
}
@@ -1492,7 +1574,7 @@ index 9d4e8fbbfe8d45cc6245c7659423004ad1ceedeb..f955c7bace3cedfe0469e59a5e8c5824
int32_t DesktopCaptureImpl::StopCaptureIfAllClientsClose() {
if (_dataCallBacks.empty()) {
return StopCapture();
-@@ -636,6 +656,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result result,
+@@ -645,6 +665,15 @@ void DesktopCaptureImpl::OnCaptureResult(DesktopCapturer::Result result,
frameInfo.height = frame->size().height();
frameInfo.videoType = VideoType::kARGB;
@@ -1509,10 +1591,10 @@ index 9d4e8fbbfe8d45cc6245c7659423004ad1ceedeb..f955c7bace3cedfe0469e59a5e8c5824
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 b725849dab1d1f898ab988e57a35c27e3eb44700..e2e13b0a0926475fe673fecf5e3c497569d158b3 100644
+index e8414b154fb615afd888ae06aae1d3046f042e69..fd86601a774befc8b7a03d953a73390870aa380f 100644
--- a/dom/media/systemservices/video_engine/desktop_capture_impl.h
+++ b/dom/media/systemservices/video_engine/desktop_capture_impl.h
-@@ -46,6 +46,21 @@ namespace webrtc {
+@@ -48,6 +48,21 @@ namespace webrtc {
class VideoCaptureEncodeInterface;
@@ -1534,7 +1616,7 @@ index b725849dab1d1f898ab988e57a35c27e3eb44700..e2e13b0a0926475fe673fecf5e3c4975
// simulate deviceInfo interface for video engine, bridge screen/application and
// real screen/application device info
-@@ -158,12 +173,13 @@ class BrowserDeviceInfoImpl : public VideoCaptureModule::DeviceInfo {
+@@ -160,12 +175,13 @@ class BrowserDeviceInfoImpl : public VideoCaptureModule::DeviceInfo {
// As with video, DesktopCaptureImpl is a proxy for screen sharing
// and follows the video pipeline design
class DesktopCaptureImpl : public DesktopCapturer::Callback,
@@ -1551,7 +1633,7 @@ index b725849dab1d1f898ab988e57a35c27e3eb44700..e2e13b0a0926475fe673fecf5e3c4975
static VideoCaptureModule::DeviceInfo* CreateDeviceInfo(
const int32_t id, const CaptureDeviceType type);
-@@ -173,6 +189,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -175,6 +191,8 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
void DeRegisterCaptureDataCallback(
rtc::VideoSinkInterface<VideoFrame>* dataCallback) override;
int32_t StopCaptureIfAllClientsClose() override;
@@ -1560,7 +1642,7 @@ index b725849dab1d1f898ab988e57a35c27e3eb44700..e2e13b0a0926475fe673fecf5e3c4975
int32_t SetCaptureRotation(VideoRotation rotation) override;
bool SetApplyRotation(bool enable) override;
-@@ -193,7 +211,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -195,7 +213,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
protected:
DesktopCaptureImpl(const int32_t id, const char* uniqueId,
@@ -1569,7 +1651,7 @@ index b725849dab1d1f898ab988e57a35c27e3eb44700..e2e13b0a0926475fe673fecf5e3c4975
virtual ~DesktopCaptureImpl();
int32_t DeliverCapturedFrame(webrtc::VideoFrame& captureFrame);
-@@ -215,6 +233,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -218,6 +236,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
rtc::RecursiveCriticalSection _apiCs;
std::set<rtc::VideoSinkInterface<VideoFrame>*> _dataCallBacks;
@@ -1577,7 +1659,7 @@ index b725849dab1d1f898ab988e57a35c27e3eb44700..e2e13b0a0926475fe673fecf5e3c4975
int64_t _incomingFrameTimesNanos
[kFrameRateCountHistorySize]; // timestamp for local captured frames
-@@ -237,6 +256,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
+@@ -240,6 +259,7 @@ class DesktopCaptureImpl : public DesktopCapturer::Callback,
void ProcessIter();
private:
@@ -1630,7 +1712,7 @@ index 8c8a5810fd56512cf37635da1f43757719f06113..d2bc58fcd3b05f989f948839d574d00d
return aGlobalOrNull;
diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp
-index b31ca1000cb1d7b8ca1af74b9ac0313aba053875..54abd38a35fc2b4906760c370d9f96d7f2ade0e2 100644
+index 3f0ca7fb77fc7722b8cf666b8af20ade826a7bb5..0864882a17e18c12bce73cbc5f259ea7641559b2 100644
--- a/dom/security/nsCSPUtils.cpp
+++ b/dom/security/nsCSPUtils.cpp
@@ -127,6 +127,11 @@ void CSP_ApplyMetaCSPToDoc(mozilla::dom::Document& aDoc,
@@ -1646,7 +1728,7 @@ index b31ca1000cb1d7b8ca1af74b9ac0313aba053875..54abd38a35fc2b4906760c370d9f96d7
nsContentUtils::TrimWhitespace<nsContentUtils::IsHTMLWhitespace>(
aPolicyStr));
diff --git a/dom/webidl/GeometryUtils.webidl b/dom/webidl/GeometryUtils.webidl
-index 2f71b284ee5f7e11f117c447834b48355784448c..ddcc545da1efec5784273b032efa00ad8b89fec0 100644
+index 2f71b284ee5f7e11f117c447834b48355784448c..2640bd57123c2b03bf4b06a2419cd020ba95f155 100644
--- a/dom/webidl/GeometryUtils.webidl
+++ b/dom/webidl/GeometryUtils.webidl
@@ -16,6 +16,8 @@ dictionary BoxQuadOptions {
@@ -1663,16 +1745,16 @@ index 2f71b284ee5f7e11f117c447834b48355784448c..ddcc545da1efec5784273b032efa00ad
sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options = {});
+ [ChromeOnly, Throws, Func="nsINode::HasBoxQuadsSupport"]
-+ void scrollRectIntoViewIfNeeded(long x, long y, long w, long h);
++ undefined scrollRectIntoViewIfNeeded(long x, long y, long w, long h);
+
/* getBoxQuadsFromWindowOrigin is similar to getBoxQuads, but the
* 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 88e55560a914f1661b5302a924de519157c25dd9..b86513356488b48cb788acefaaa9905c38c2b05c 100644
+index 2f9beef0bde229a2f414f46d3ec2b10eac5c4f1c..2aa8c6b75b7791e29b6f579718a2d6e250dc4236 100644
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
-@@ -977,7 +977,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {
+@@ -981,7 +981,7 @@ void PrefLanguagesChanged(const char* /* aPrefName */, void* /* aClosure */) {
AssertIsOnMainThread();
nsTArray<nsString> languages;
@@ -1681,7 +1763,7 @@ index 88e55560a914f1661b5302a924de519157c25dd9..b86513356488b48cb788acefaaa9905c
RuntimeService* runtime = RuntimeService::GetService();
if (runtime) {
-@@ -1179,8 +1179,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
+@@ -1183,8 +1183,7 @@ bool RuntimeService::RegisterWorker(WorkerPrivate& aWorkerPrivate) {
}
// The navigator overridden properties should have already been read.
@@ -1691,7 +1773,7 @@ index 88e55560a914f1661b5302a924de519157c25dd9..b86513356488b48cb788acefaaa9905c
mNavigatorPropertiesLoaded = true;
}
-@@ -1778,6 +1777,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted(
+@@ -1782,6 +1781,13 @@ void RuntimeService::PropagateStorageAccessPermissionGranted(
}
}
@@ -1705,7 +1787,7 @@ index 88e55560a914f1661b5302a924de519157c25dd9..b86513356488b48cb788acefaaa9905c
template <typename Func>
void RuntimeService::BroadcastAllWorkers(const Func& aFunc) {
AssertIsOnMainThread();
-@@ -2193,6 +2199,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(
+@@ -2197,6 +2203,14 @@ void PropagateStorageAccessPermissionGrantedToWorkers(
}
}
@@ -1721,7 +1803,7 @@ index 88e55560a914f1661b5302a924de519157c25dd9..b86513356488b48cb788acefaaa9905c
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(aCx);
diff --git a/dom/workers/RuntimeService.h b/dom/workers/RuntimeService.h
-index ef32cc847e8b86319830bb93879aaf809fe464d4..5db3be0dc87e50ff75177194ca734313b22509d6 100644
+index d1a44a19e865fb76cf2b7bfe5e1fbd9c64ec0465..1a44fee6508ea0ef3f48700b83b1185565778cc8 100644
--- a/dom/workers/RuntimeService.h
+++ b/dom/workers/RuntimeService.h
@@ -110,6 +110,8 @@ class RuntimeService final : public nsIObserver {
@@ -1747,10 +1829,10 @@ index d10dabb5c5ff8e17851edf2bd2efc08e74584d8e..53c4070c5fde43b27fb8fbfdcf4c23d8
bool IsWorkerGlobal(JSObject* global);
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
-index 96357690e6f056501bef4729291c0c280d43b8e3..6fbcad9a972d61ab1d2de295219c361288ffb381 100644
+index e15afcdebdecb9ceed97cb539a511b34670b19c1..9879d33cbe2a6ac3bc7965c9287f72804d60d8ec 100644
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
-@@ -699,6 +699,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable {
+@@ -700,6 +700,18 @@ class UpdateContextOptionsRunnable final : public WorkerControlRunnable {
}
};
@@ -1769,7 +1851,7 @@ index 96357690e6f056501bef4729291c0c280d43b8e3..6fbcad9a972d61ab1d2de295219c3612
class UpdateLanguagesRunnable final : public WorkerRunnable {
nsTArray<nsString> mLanguages;
-@@ -1951,6 +1963,16 @@ void WorkerPrivate::UpdateContextOptions(
+@@ -1952,6 +1964,16 @@ void WorkerPrivate::UpdateContextOptions(
}
}
@@ -1803,7 +1885,7 @@ index 96357690e6f056501bef4729291c0c280d43b8e3..6fbcad9a972d61ab1d2de295219c3612
const nsTArray<nsString>& aLanguages) {
WorkerGlobalScope* globalScope = GlobalScope();
diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h
-index 1f31c4a6a94491cb6c981655e30e1fd42c4dbfc1..dbfdf4fc27f112e7cadbb768a858323f8ee919d1 100644
+index 41eb3a9cad9a5d49573faef26b4f6e3815064c85..9e58fc7746d4953ee29a76b4af4c488db35fe0df 100644
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
@@ -330,6 +330,8 @@ class WorkerPrivate final
@@ -1815,7 +1897,7 @@ index 1f31c4a6a94491cb6c981655e30e1fd42c4dbfc1..dbfdf4fc27f112e7cadbb768a858323f
void UpdateLanguagesInternal(const nsTArray<nsString>& aLanguages);
void UpdateJSWorkerMemoryParameterInternal(JSContext* aCx, JSGCParamKey key,
-@@ -966,6 +968,8 @@ class WorkerPrivate final
+@@ -956,6 +958,8 @@ class WorkerPrivate final
void UpdateContextOptions(const JS::ContextOptions& aContextOptions);
@@ -1877,7 +1959,7 @@ index bb69d58dc96ed7f0b37f73e26abdd0bdfeaaf556..8436d439f72287176a2fe6a1a837d3db
inline ClippedTime TimeClip(double time);
diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp
-index 1c00fed8e0dc84b12c9b1c169d841e27402579a1..ad25cb5f8a0572c9c8622f85551b79dd2ffea819 100644
+index baf9debd7b2153aa37e791001e6b37bc1bd14122..68a4d69a4e16711b00a46428e9a51c53154ec923 100644
--- a/js/src/debugger/Object.cpp
+++ b/js/src/debugger/Object.cpp
@@ -2373,7 +2373,11 @@ Maybe<Completion> DebuggerObject::call(JSContext* cx,
@@ -1953,10 +2035,10 @@ index a86a6e9f7177c86624f118ebbc2e012766137bd1..5ebd1f106a556471fda5961d1f11f8ea
# if defined(XP_WIN)
diff --git a/js/src/vm/DateTime.h b/js/src/vm/DateTime.h
-index 3ce936fe3a4a83f9161eddc9e5289322d6a363e3..6b1c34244d8b2f2102ec423e2d96812fb5d41a9d 100644
+index b70e4e0ae25947daed0079334956b8cabd5c52b7..38750b81cf82749d5cc6aaa72aa037bc466468f4 100644
--- a/js/src/vm/DateTime.h
+++ b/js/src/vm/DateTime.h
-@@ -63,6 +63,8 @@ enum class ResetTimeZoneMode : bool {
+@@ -62,6 +62,8 @@ enum class ResetTimeZoneMode : bool {
*/
extern void ResetTimeZoneInternal(ResetTimeZoneMode mode);
@@ -1965,7 +2047,7 @@ index 3ce936fe3a4a83f9161eddc9e5289322d6a363e3..6b1c34244d8b2f2102ec423e2d96812f
/**
* ICU's default time zone, used for various date/time formatting operations
* that include the local time in the representation, is allowed to go stale
-@@ -202,6 +204,7 @@ class DateTimeInfo {
+@@ -201,6 +203,7 @@ class DateTimeInfo {
// and js::ResyncICUDefaultTimeZone().
friend void js::ResetTimeZoneInternal(ResetTimeZoneMode);
friend void js::ResyncICUDefaultTimeZone();
@@ -1973,7 +2055,7 @@ index 3ce936fe3a4a83f9161eddc9e5289322d6a363e3..6b1c34244d8b2f2102ec423e2d96812f
static void resetTimeZone(ResetTimeZoneMode mode) {
auto guard = instance->lock();
-@@ -293,6 +296,8 @@ class DateTimeInfo {
+@@ -292,6 +295,8 @@ class DateTimeInfo {
JS::UniqueChars locale_;
JS::UniqueTwoByteChars standardName_;
JS::UniqueTwoByteChars daylightSavingsName_;
@@ -1982,7 +2064,7 @@ index 3ce936fe3a4a83f9161eddc9e5289322d6a363e3..6b1c34244d8b2f2102ec423e2d96812f
#else
// Restrict the data-time range to the minimum required time_t range as
// specified in POSIX. Most operating systems support 64-bit time_t
-@@ -308,6 +313,8 @@ class DateTimeInfo {
+@@ -307,6 +312,8 @@ class DateTimeInfo {
void internalResetTimeZone(ResetTimeZoneMode mode);
@@ -2042,10 +2124,10 @@ index dac899f7558b26d6848da8b98ed8a93555c8751a..2a07d67fa1c2840b25085566e84dc3b2
// No boxes to return
return;
diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
-index 014b655e374af3bf6f346febb76df4f7484e2e8d..cf62af15fd34fbcbb3d2bc3b00065eb5aee21d62 100644
+index 13c0b901b39279c023e99d8b42852c315baf847d..5dd2741fd06d8a16af050d55c5333c4c095bf591 100644
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
-@@ -10885,7 +10885,9 @@ auto PresShell::ComputeActiveness() const -> Activeness {
+@@ -10923,7 +10923,9 @@ auto PresShell::ComputeActiveness() const -> Activeness {
if (!browserChild->IsVisible()) {
MOZ_LOG(gLog, LogLevel::Debug,
(" > BrowserChild %p is not visible", browserChild));
@@ -2057,10 +2139,10 @@ index 014b655e374af3bf6f346febb76df4f7484e2e8d..cf62af15fd34fbcbb3d2bc3b00065eb5
// 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 3bc4cd498dc22b7d3db097beb9988c68baf26437..77557e174283e8c151ad540f92ede87f88197c80 100644
+index e5762879ea3120dca4864e286ffce6d52d33d40e..b2281efd2529c3155355eb18a6a1b7b417514869 100644
--- a/layout/style/GeckoBindings.h
+++ b/layout/style/GeckoBindings.h
-@@ -575,6 +575,7 @@ void Gecko_MediaFeatures_GetDeviceSize(const mozilla::dom::Document*,
+@@ -605,6 +605,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*);
@@ -2069,10 +2151,10 @@ index 3bc4cd498dc22b7d3db097beb9988c68baf26437..77557e174283e8c151ad540f92ede87f
const mozilla::dom::Document*);
mozilla::StylePrefersColorScheme Gecko_MediaFeatures_PrefersColorScheme(
diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
-index 2ef43008df12886ad00485ef743564774850c2ba..bb53b96ae491146d895e1c32d62dc0f2ea00812f 100644
+index a9d3f075f3587fc1e55544b010864cd0e4b67107..d9ce4a1a7d9e2cd27e20f0ef36132e6599b0bb66 100644
--- a/layout/style/nsMediaFeatures.cpp
+++ b/layout/style/nsMediaFeatures.cpp
-@@ -260,10 +260,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) {
+@@ -264,10 +264,11 @@ bool Gecko_MediaFeatures_MatchesPlatform(StylePlatform aPlatform) {
}
bool Gecko_MediaFeatures_PrefersReducedMotion(const Document* aDocument) {
@@ -2101,10 +2183,10 @@ index f2723e654098ff27542e1eb16a536c11ad0af617..b0b480551ff7d895dfdeb5a980087485
/* Use accelerated SIMD routines. */
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
-index 4e81c2325b0d4a73f6fe52f10a7a6ad593e806ce..541ac135bb854ecf951d4f4dab0aaed1fe8fc051 100644
+index dfe52b1d7477fea400a387ed221557454d746589..fb50c04fe18c1c876f649bedac7b5ae231e98da8 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
-@@ -4359,7 +4359,9 @@ pref("devtools.experiment.f12.shortcut_disabled", false);
+@@ -4241,7 +4241,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
@@ -2114,9 +2196,9 @@ index 4e81c2325b0d4a73f6fe52f10a7a6ad593e806ce..541ac135bb854ecf951d4f4dab0aaed1
+pref("dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled", false);
#endif
- // Whether to start the private browsing mode at application startup
+ // Whether sites require the open-protocol-handler permission to open a
diff --git a/netwerk/base/nsINetworkInterceptController.idl b/netwerk/base/nsINetworkInterceptController.idl
-index e869cd28d396aa87c522241d3e63d435ee8dbae6..2d307f089209721d88d231b03e8628890b8228ea 100644
+index fba1a83231165cbda92e9b017c70ec6c1d59d037..e8093ed2a06f728c125a4ad8a096d205ef8d3155 100644
--- a/netwerk/base/nsINetworkInterceptController.idl
+++ b/netwerk/base/nsINetworkInterceptController.idl
@@ -59,6 +59,7 @@ interface nsIInterceptedChannel : nsISupports
@@ -2128,12 +2210,12 @@ index e869cd28d396aa87c522241d3e63d435ee8dbae6..2d307f089209721d88d231b03e862889
/**
* 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 56eabba18f021719aa084b5bb616d3602d782a97..1408518cdba2db29e994963c4e21aead2aa573c6 100644
+index 2c02db86d5ac9567d7174ac5e685296d4466d16c..a0a91ab331d0289a53b3d29c11d3df9496ae9f2b 100644
--- a/netwerk/protocol/http/InterceptedHttpChannel.cpp
+++ b/netwerk/protocol/http/InterceptedHttpChannel.cpp
-@@ -662,6 +662,14 @@ void InterceptedHttpChannel::DoAsyncAbort(nsresult aStatus) {
- Unused << AsyncAbort(aStatus);
- }
+@@ -728,6 +728,14 @@ NS_IMPL_ISUPPORTS(ResetInterceptionHeaderVisitor, nsIHttpHeaderVisitor)
+
+ } // anonymous namespace
+NS_IMETHODIMP
+InterceptedHttpChannel::ResetInterceptionWithURI(nsIURI* aURI) {
@@ -2145,12 +2227,12 @@ index 56eabba18f021719aa084b5bb616d3602d782a97..1408518cdba2db29e994963c4e21aead
+
NS_IMETHODIMP
InterceptedHttpChannel::ResetInterception(bool aBypass) {
- if (mCanceled) {
+ INTERCEPTED_LOG(("InterceptedHttpChannel::ResetInterception [%p] bypass: %s",
diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp
-index d956b3b5c6ecf6a983689d09e491193519f34ceb..826aabb5b794a2d4028950066ca3036223a35e0c 100644
+index 55c7dbe1ae90d64e5aa993424cc1c5659833582f..a451248676b9b7cdd773a74948eb3b4d442a2b18 100644
--- a/parser/html/nsHtml5TreeOpExecutor.cpp
+++ b/parser/html/nsHtml5TreeOpExecutor.cpp
-@@ -1330,6 +1330,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
+@@ -1363,6 +1363,10 @@ void nsHtml5TreeOpExecutor::UpdateReferrerInfoFromMeta(
void nsHtml5TreeOpExecutor::AddSpeculationCSP(const nsAString& aCSP) {
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
@@ -2162,10 +2244,10 @@ index d956b3b5c6ecf6a983689d09e491193519f34ceb..826aabb5b794a2d4028950066ca30362
nsCOMPtr<nsIContentSecurityPolicy> preloadCsp = mDocument->GetPreloadCsp();
if (!preloadCsp) {
diff --git a/security/manager/ssl/nsCertOverrideService.cpp b/security/manager/ssl/nsCertOverrideService.cpp
-index 153722c33b9db6475aa5134ad5b665051ac68658..74324d95f7088c65c3d52ab2a7c40e89901d9512 100644
+index 4f2f595fb14c7c7244d5fe9a3da2eadc0c3b3adc..3ca0b4a3b9f4bdf21c1107a1e5ea3f0f58050f51 100644
--- a/security/manager/ssl/nsCertOverrideService.cpp
+++ b/security/manager/ssl/nsCertOverrideService.cpp
-@@ -572,7 +572,12 @@ nsCertOverrideService::HasMatchingOverride(
+@@ -472,7 +472,12 @@ nsCertOverrideService::HasMatchingOverride(
bool disableAllSecurityCheck = false;
{
MutexAutoLock lock(mMutex);
@@ -2178,8 +2260,8 @@ index 153722c33b9db6475aa5134ad5b665051ac68658..74324d95f7088c65c3d52ab2a7c40e89
+ }
}
if (disableAllSecurityCheck) {
- nsCertOverride::OverrideBits all = nsCertOverride::OverrideBits::Untrusted |
-@@ -789,14 +794,24 @@ static bool IsDebugger() {
+ *aIsTemporary = false;
+@@ -689,14 +694,24 @@ static bool IsDebugger() {
NS_IMETHODIMP
nsCertOverrideService::
@@ -2208,22 +2290,22 @@ index 153722c33b9db6475aa5134ad5b665051ac68658..74324d95f7088c65c3d52ab2a7c40e89
nsCOMPtr<nsINSSComponent> nss(do_GetService(PSM_COMPONENT_CONTRACTID));
diff --git a/security/manager/ssl/nsCertOverrideService.h b/security/manager/ssl/nsCertOverrideService.h
-index e601df1b13d9b2c028bffe6348d052960c80951c..0d782585199479db6218f4c72ed7b6133e3122b3 100644
+index 42760f8ec675af22bdf27a07954b1d3b600d29ab..aad868ef636dbb743f3268d662db7914a2418588 100644
--- a/security/manager/ssl/nsCertOverrideService.h
+++ b/security/manager/ssl/nsCertOverrideService.h
-@@ -134,6 +134,7 @@ class nsCertOverrideService final : public nsICertOverrideService,
+@@ -119,6 +119,7 @@ class nsCertOverrideService final : public nsICertOverrideService,
mozilla::Mutex mMutex;
- bool mDisableAllSecurityCheck GUARDED_BY(mMutex);
-+ mozilla::HashSet<uint32_t> mUserContextIdsWithDisabledSecurityChecks GUARDED_BY(mMutex);
- nsCOMPtr<nsIFile> mSettingsFile GUARDED_BY(mMutex);
- nsTHashtable<nsCertOverrideEntry> mSettingsTable GUARDED_BY(mMutex);
+ bool mDisableAllSecurityCheck MOZ_GUARDED_BY(mMutex);
++ mozilla::HashSet<uint32_t> mUserContextIdsWithDisabledSecurityChecks MOZ_GUARDED_BY(mMutex);
+ nsCOMPtr<nsIFile> mSettingsFile MOZ_GUARDED_BY(mMutex);
+ nsTHashtable<nsCertOverrideEntry> mSettingsTable MOZ_GUARDED_BY(mMutex);
diff --git a/security/manager/ssl/nsICertOverrideService.idl b/security/manager/ssl/nsICertOverrideService.idl
-index 3862fe6830874c036592fd217cab7ad5f4cd3e27..3166b37db0e52f7f2972d2bcb7a72ed819805794 100644
+index e31cf158dcac3540b0c721cbd677b8522d7549b3..029fc67df81911e3abf3724e8ed99e4bde010f4b 100644
--- a/security/manager/ssl/nsICertOverrideService.idl
+++ b/security/manager/ssl/nsICertOverrideService.idl
-@@ -201,7 +201,9 @@ interface nsICertOverrideService : nsISupports {
+@@ -143,7 +143,9 @@ interface nsICertOverrideService : nsISupports {
* @param aDisable If true, disable all security check and make
* hasMatchingOverride always return true.
*/
@@ -2235,7 +2317,7 @@ index 3862fe6830874c036592fd217cab7ad5f4cd3e27..3166b37db0e52f7f2972d2bcb7a72ed8
readonly attribute boolean securityCheckDisabled;
};
diff --git a/services/settings/Utils.jsm b/services/settings/Utils.jsm
-index a8b0c67ce19d801d2f032d1b59110871a9859787..9d8d689bc4c4fb6aa00ff6c551cbab0dcda7d85d 100644
+index de557af4275b51a0e4dbc95bd4f6896dd585c232..5049f8613c7a1efa3fec5cc28ff761abe18c557c 100644
--- a/services/settings/Utils.jsm
+++ b/services/settings/Utils.jsm
@@ -102,7 +102,7 @@ function _isUndefined(value) {
@@ -2248,10 +2330,10 @@ index a8b0c67ce19d801d2f032d1b59110871a9859787..9d8d689bc4c4fb6aa00ff6c551cbab0d
: AppConstants.REMOTE_SETTINGS_SERVER_URL;
},
diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs
-index 8c93dfa24ce7810f004227fc0430338229a0bc3f..09a1f93dd027394345e910e00b765689490ac2a3 100644
+index f44fd788b00005c64d94a67d72f83946178a7848..015c8c5cb9fc764d0cf1cab2e448da135cbded10 100644
--- a/servo/components/style/gecko/media_features.rs
+++ b/servo/components/style/gecko/media_features.rs
-@@ -224,10 +224,15 @@ pub enum ForcedColors {
+@@ -232,10 +232,15 @@ pub enum ForcedColors {
/// https://drafts.csswg.org/mediaqueries-5/#forced-colors
fn eval_forced_colors(context: &Context, query_value: Option<ForcedColors>) -> bool {
@@ -2284,10 +2366,10 @@ index 4f7337926efbb086a2be97cdbcb3dca39e27c786..f2005cb726ff153d6b1011d6af0479db
// Prevents new window animations on MacOS and Windows. Currently
// ignored for Linux.
const unsigned long CHROME_SUPPRESS_ANIMATION = 0x01000000;
-diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.jsm b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.jsm
-index 5184d1dcb0618dc15abd28462985040236ddf643..bce45ad2d76098c16e0877fa46f71158c884ea5a 100644
---- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.jsm
-+++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.jsm
+diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
+index 0a7ba257a4d43c74841f003a8a0556d7f057700b..cf78a44fa64248ecf5b3ade8a8e92efffeb9f831 100644
+--- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
++++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
@@ -116,6 +116,12 @@ EnterprisePoliciesManager.prototype = {
Services.prefs.clearUserPref(PREF_POLICIES_APPLIED);
}
@@ -2302,7 +2384,7 @@ index 5184d1dcb0618dc15abd28462985040236ddf643..bce45ad2d76098c16e0877fa46f71158
if (provider.failed) {
diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp
-index a76e612bc7149155305468307bebf0e69679897d..ba3c5dc0af69a34fcfbf04a3dbc506ef45833107 100644
+index 34ced370120f843ab7afd330fb5626ae6f6da7e4..205fc4e5fe3adeacbfe5ab6c15d1bbccf7baf9e8 100644
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -370,7 +370,7 @@ nsAppStartup::Quit(uint32_t aMode, int aExitCode, bool* aUserAllowedQuit) {
@@ -2330,10 +2412,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 3983d580cd11a8241481876aaf8a924f4f083ad0..0dd75bab6249a4db25dea3cabefd4f8e3744caad 100644
+index 3afb5e02eb9c65b2d4dc34692f7c94e43a103b1a..4037e9118dae628ed370cd14934f1dafc3f99feb 100644
--- a/toolkit/components/windowwatcher/nsWindowWatcher.cpp
+++ b/toolkit/components/windowwatcher/nsWindowWatcher.cpp
-@@ -1815,7 +1815,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(
+@@ -1852,7 +1852,11 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsForContent(
// Open a minimal popup.
*aIsPopupRequested = true;
@@ -2347,10 +2429,10 @@ index 3983d580cd11a8241481876aaf8a924f4f083ad0..0dd75bab6249a4db25dea3cabefd4f8e
/**
diff --git a/toolkit/mozapps/update/UpdateService.jsm b/toolkit/mozapps/update/UpdateService.jsm
-index 393ff53b8f69aba56d7f4d849e18aaddb0b94f49..f29602b0c7c436dec335bb7d6033750f3499fbbe 100644
+index d969d9e8d0790bff7c837828b92e1a92d945b116..34f2a030eca9c8258900c5b8d2564fa06580f1f3 100644
--- a/toolkit/mozapps/update/UpdateService.jsm
+++ b/toolkit/mozapps/update/UpdateService.jsm
-@@ -3607,6 +3607,8 @@ UpdateService.prototype = {
+@@ -3610,6 +3610,8 @@ UpdateService.prototype = {
},
get disabledForTesting() {
@@ -2360,10 +2442,10 @@ index 393ff53b8f69aba56d7f4d849e18aaddb0b94f49..f29602b0c7c436dec335bb7d6033750f
(Cu.isInAutomation ||
lazy.Marionette.running ||
diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild
-index 1241f1b0f94e0965b517898167ca1b52cfb48dc5..39c14eb7c548b81d564bd2a4ed15c70a920e173c 100644
+index 04453a437873b2e6339cb7e81ee11c2a5bb46bb1..2ce3151b9a97e7b86619109716a6d942b80f58ed 100644
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
-@@ -154,6 +154,7 @@ if CONFIG['ENABLE_WEBDRIVER']:
+@@ -153,6 +153,7 @@ if CONFIG['ENABLE_WEBDRIVER']:
'/remote',
'/testing/firefox-ui',
'/testing/marionette',
@@ -2372,7 +2454,7 @@ index 1241f1b0f94e0965b517898167ca1b52cfb48dc5..39c14eb7c548b81d564bd2a4ed15c70a
]
diff --git a/toolkit/xre/nsWindowsWMain.cpp b/toolkit/xre/nsWindowsWMain.cpp
-index ea14a59b80bbfbaa17d7569734b8409d9d21fcde..f993e78e02563cada8c131be3d4658bc8f7532b6 100644
+index ea14a59b80bbfbaa17d7569734b8409d9d21fcde..28cb052c3115f91e6a036ad8466385ff1d740cd0 100644
--- a/toolkit/xre/nsWindowsWMain.cpp
+++ b/toolkit/xre/nsWindowsWMain.cpp
@@ -14,9 +14,11 @@
@@ -2387,13 +2469,12 @@ index ea14a59b80bbfbaa17d7569734b8409d9d21fcde..f993e78e02563cada8c131be3d4658bc
#include <windows.h>
#include <versionhelpers.h>
-@@ -130,6 +132,20 @@ int wmain(int argc, WCHAR** argv) {
+@@ -130,6 +132,19 @@ int wmain(int argc, WCHAR** argv) {
SanitizeEnvironmentVariables();
SetDllDirectoryW(L"");
+ bool hasJugglerPipe =
-+ mozilla::CheckArg(argc, argv, L"juggler-pipe",
-+ static_cast<const wchar_t**>(nullptr),
++ mozilla::CheckArg(argc, argv, "juggler-pipe", nullptr,
+ mozilla::CheckArgFlag::None) == mozilla::ARG_FOUND;
+ if (hasJugglerPipe && !mozilla::EnvHasValue("PW_PIPE_READ")) {
+ intptr_t stdio3 = _get_osfhandle(3);
@@ -2409,10 +2490,10 @@ index ea14a59b80bbfbaa17d7569734b8409d9d21fcde..f993e78e02563cada8c131be3d4658bc
// Only run this code if LauncherProcessWin.h was included beforehand, thus
// signalling that the hosting process should support launcher mode.
diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp
-index 9ca3975c99c8bff3829bce1cf49d1235910c3ab8..6606eb02fba53ea8bd401d07460b85b068abd2bd 100644
+index e1e46ccdceae595f95d100116ff480905047e82b..eaa0252e768140120158525723ad867b8cb020be 100644
--- a/uriloader/base/nsDocLoader.cpp
+++ b/uriloader/base/nsDocLoader.cpp
-@@ -827,6 +827,13 @@ void nsDocLoader::DocLoaderIsEmpty(bool aFlushLayout,
+@@ -830,6 +830,13 @@ void nsDocLoader::DocLoaderIsEmpty(bool aFlushLayout,
("DocLoader:%p: Firing load event for document.open\n",
this));
@@ -2427,10 +2508,10 @@ index 9ca3975c99c8bff3829bce1cf49d1235910c3ab8..6606eb02fba53ea8bd401d07460b85b0
// 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 a66f215e577d29eb1db88899136ccf4eff34a960..67ea697e80608a3d5a3836b01334efe3141e70a1 100644
+index 54a8d617308c2fb2ce816bb4a88162b8395c2723..140059c6ae4e52b4720aaa34d6313a92729b98a7 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
-@@ -113,6 +113,7 @@
+@@ -112,6 +112,7 @@
#include "mozilla/Components.h"
#include "mozilla/ClearOnShutdown.h"
@@ -2438,7 +2519,7 @@ index a66f215e577d29eb1db88899136ccf4eff34a960..67ea697e80608a3d5a3836b01334efe3
#include "mozilla/Preferences.h"
#include "mozilla/ipc/URIUtils.h"
-@@ -838,6 +839,12 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension(
+@@ -836,6 +837,12 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension(
return NS_OK;
}
@@ -2451,7 +2532,7 @@ index a66f215e577d29eb1db88899136ccf4eff34a960..67ea697e80608a3d5a3836b01334efe3
nsresult nsExternalHelperAppService::GetFileTokenForPath(
const char16_t* aPlatformAppPath, nsIFile** aFile) {
nsDependentString platformAppPath(aPlatformAppPath);
-@@ -1448,7 +1455,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) {
+@@ -1446,7 +1453,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel* aChannel) {
// Strip off the ".part" from mTempLeafName
mTempLeafName.Truncate(mTempLeafName.Length() - ArrayLength(".part") + 1);
@@ -2464,7 +2545,7 @@ index a66f215e577d29eb1db88899136ccf4eff34a960..67ea697e80608a3d5a3836b01334efe3
mSaver =
do_CreateInstance(NS_BACKGROUNDFILESAVERSTREAMLISTENER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
-@@ -1639,7 +1651,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
+@@ -1637,7 +1649,36 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
return NS_OK;
}
@@ -2502,7 +2583,7 @@ index a66f215e577d29eb1db88899136ccf4eff34a960..67ea697e80608a3d5a3836b01334efe3
if (NS_FAILED(rv)) {
nsresult transferError = rv;
-@@ -1693,6 +1734,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
+@@ -1691,6 +1732,9 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest* request) {
bool alwaysAsk = true;
mMimeInfo->GetAlwaysAskBeforeHandling(&alwaysAsk);
@@ -2546,10 +2627,10 @@ index a66f215e577d29eb1db88899136ccf4eff34a960..67ea697e80608a3d5a3836b01334efe3
// OnStartRequest)
mDialog = nullptr;
diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h
-index 2a1d67ffe2650d0d5f3e00bcb7f23deee8e76d0f..9e9731bc18de04fef382d0951a03793d83d14e14 100644
+index 17c7dccf0217b0aa71cff630dd7b0e9beda9f5aa..06558286f5ed9d1e324654365909f9f8cad957ac 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.h
+++ b/uriloader/exthandler/nsExternalHelperAppService.h
-@@ -244,6 +244,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService,
+@@ -245,6 +245,8 @@ class nsExternalHelperAppService : public nsIExternalHelperAppService,
mozilla::dom::BrowsingContext* aContentContext, bool aForceSave,
nsIInterfaceRequestor* aWindowContext,
nsIStreamListener** aStreamListener);
@@ -2558,7 +2639,7 @@ index 2a1d67ffe2650d0d5f3e00bcb7f23deee8e76d0f..9e9731bc18de04fef382d0951a03793d
};
/**
-@@ -446,6 +448,9 @@ class nsExternalAppHandler final : public nsIStreamListener,
+@@ -447,6 +449,9 @@ class nsExternalAppHandler final : public nsIStreamListener,
* Upon successful return, both mTempFile and mSaver will be valid.
*/
nsresult SetUpTempFile(nsIChannel* aChannel);
@@ -2639,7 +2720,7 @@ diff --git a/widget/cocoa/NativeKeyBindings.mm b/widget/cocoa/NativeKeyBindings.
index d3e5983259053175584254e7ac01ca9ce024f33a..97f5b851c402fea5477c0ee57af451c62b016eec 100644
--- a/widget/cocoa/NativeKeyBindings.mm
+++ b/widget/cocoa/NativeKeyBindings.mm
-@@ -492,6 +492,13 @@ void NativeKeyBindings::GetEditCommandsForTests(NativeKeyBindingsType aType,
+@@ -492,6 +492,13 @@
break;
case KEY_NAME_INDEX_ArrowLeft:
if (aEvent.IsAlt()) {
@@ -2653,7 +2734,7 @@ index d3e5983259053175584254e7ac01ca9ce024f33a..97f5b851c402fea5477c0ee57af451c6
break;
}
if (aEvent.IsMeta() || (aEvent.IsControl() && aEvent.IsShift())) {
-@@ -512,6 +519,13 @@ void NativeKeyBindings::GetEditCommandsForTests(NativeKeyBindingsType aType,
+@@ -512,6 +519,13 @@
break;
case KEY_NAME_INDEX_ArrowRight:
if (aEvent.IsAlt()) {
@@ -2667,7 +2748,7 @@ index d3e5983259053175584254e7ac01ca9ce024f33a..97f5b851c402fea5477c0ee57af451c6
break;
}
if (aEvent.IsMeta() || (aEvent.IsControl() && aEvent.IsShift())) {
-@@ -532,6 +546,10 @@ void NativeKeyBindings::GetEditCommandsForTests(NativeKeyBindingsType aType,
+@@ -532,6 +546,10 @@
break;
case KEY_NAME_INDEX_ArrowUp:
if (aEvent.IsControl()) {
@@ -2678,7 +2759,7 @@ index d3e5983259053175584254e7ac01ca9ce024f33a..97f5b851c402fea5477c0ee57af451c6
break;
}
if (aEvent.IsMeta()) {
-@@ -541,7 +559,7 @@ void NativeKeyBindings::GetEditCommandsForTests(NativeKeyBindingsType aType,
+@@ -541,7 +559,7 @@
instance->AppendEditCommandsForSelector(
!aEvent.IsShift()
? ToObjcSelectorPtr(@selector(moveToBeginningOfDocument:))
@@ -2687,7 +2768,7 @@ index d3e5983259053175584254e7ac01ca9ce024f33a..97f5b851c402fea5477c0ee57af451c6
aCommands);
break;
}
-@@ -564,6 +582,10 @@ void NativeKeyBindings::GetEditCommandsForTests(NativeKeyBindingsType aType,
+@@ -564,6 +582,10 @@
break;
case KEY_NAME_INDEX_ArrowDown:
if (aEvent.IsControl()) {
@@ -2848,10 +2929,10 @@ index 7f91de9e67d7ffa02de3eef1d760e5cfd05e7ad6..753b8902026626e8f0a190ea3130ba5e
} // namespace widget
diff --git a/widget/headless/HeadlessWidget.cpp b/widget/headless/HeadlessWidget.cpp
-index c1fbcccc93d9a6876aa82893cdf9c09b72087751..7a8073e3b746aec3a894957e87975189c06782d3 100644
+index 340cb723bd4de51e64164b67b69c77da5c5fa443..252f9411479f6aaa0b65942668ccfb7030af7b46 100644
--- a/widget/headless/HeadlessWidget.cpp
+++ b/widget/headless/HeadlessWidget.cpp
-@@ -109,6 +109,8 @@ void HeadlessWidget::Destroy() {
+@@ -110,6 +110,8 @@ void HeadlessWidget::Destroy() {
}
}
@@ -2860,11 +2941,10 @@ index c1fbcccc93d9a6876aa82893cdf9c09b72087751..7a8073e3b746aec3a894957e87975189
nsBaseWidget::OnDestroy();
nsBaseWidget::Destroy();
-@@ -564,5 +566,15 @@ nsresult HeadlessWidget::SynthesizeNativeTouchPadPinch(
- DispatchPinchGestureInput(inputToDispatch);
+@@ -608,5 +610,14 @@ nsresult HeadlessWidget::SynthesizeNativeTouchpadPan(
return NS_OK;
}
-+
+
+void HeadlessWidget::SetSnapshotListener(SnapshotListener&& listener) {
+ if (!mCompositorWidget) {
+ if (listener)
@@ -2877,12 +2957,12 @@ index c1fbcccc93d9a6876aa82893cdf9c09b72087751..7a8073e3b746aec3a894957e87975189
} // namespace widget
} // namespace mozilla
diff --git a/widget/headless/HeadlessWidget.h b/widget/headless/HeadlessWidget.h
-index 2b80eea70e58dd53c34edd9c5fa4415c42bcd632..72ecda7d8ddc7a9f87a954b547f8411e67ef1570 100644
+index b77ec632a90ff98f4df7af6846fc02fd6411d2e1..ccdbaac472b4c9f6d94e6f8665af9ee740f61311 100644
--- a/widget/headless/HeadlessWidget.h
+++ b/widget/headless/HeadlessWidget.h
-@@ -135,6 +135,9 @@ class HeadlessWidget : public nsBaseWidget {
- TouchpadGesturePhase aEventPhase, float aScale,
- LayoutDeviceIntPoint aPoint, int32_t aModifierFlags) override;
+@@ -141,6 +141,9 @@ class HeadlessWidget : public nsBaseWidget {
+ int32_t aModifierFlags,
+ nsIObserver* aObserver) override;
+ using SnapshotListener = std::function<void(RefPtr<gfx::DataSourceSurface>&&)>;
+ void SetSnapshotListener(SnapshotListener&& listener);
diff --git a/browser_patches/firefox/preferences/playwright.cfg b/browser_patches/firefox/preferences/playwright.cfg
index f58a6d10d4..041d6f5815 100644
--- a/browser_patches/firefox/preferences/playwright.cfg
+++ b/browser_patches/firefox/preferences/playwright.cfg
@@ -8,24 +8,88 @@ pref("datareporting.policy.dataSubmissionEnabled", false);
pref("datareporting.policy.dataSubmissionPolicyAccepted", false);
pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
-// @see https://github.com/microsoft/playwright/issues/4297
-pref("browser.tabs.remote.useCrossOriginEmbedderPolicy", false);
-pref("browser.tabs.remote.useCrossOriginOpenerPolicy", false);
-
-pref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", false);
-
+// Force pdfs into downloads.
pref("pdfjs.disabled", true);
-// Disable all kinds of cross-process navigations until we are ready.
-pref("fission.autostart", false);
+// Disable cross-process iframes, but not cross-process navigations.
pref("fission.webContentIsolationStrategy", 0);
+
+// Disable BFCache in parent process.
+// We also separately disable BFCache in content via docSchell property.
pref("fission.bfcacheInParent", false);
-// Avoid about:blank loading cross-process until we are ready.
-pref("browser.tabs.remote.systemTriggeredAboutBlankAnywhere", true);
+
+// 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.
+pref("network.cookie.cookieBehavior", 4);
+
+// Increase max number of child web processes so that new pages
+// get a new process by default and we have a process isolation
+// between pages from different contexts. If this becomes a performance
+// issue we can povide custom '@mozilla.org/ipc/processselector;1'
+pref("dom.ipc.processCount", 60000);
+
+// Never reuse processes as they may keep previously overridden values
+// (locale, timezone etc.).
+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);
+
+// Do not warn when closing all open tabs
+pref("browser.tabs.warnOnClose", false);
+
+// Do not warn when closing all other open tabs
+pref("browser.tabs.warnOnCloseOtherTabs", false);
+
+// Do not warn when multiple tabs will be opened
+pref("browser.tabs.warnOnOpen", false);
+
+// Do not warn on quitting Firefox
+pref("browser.warnOnQuit", false);
+
+// Disable popup-blocker
+pref("dom.disable_open_during_load", false);
+
+// Disable the ProcessHangMonitor
+pref("dom.ipc.reportProcessHangs", false);
+pref("hangmonitor.timeout", 0);
+
+// Allow the application to have focus even it runs in the background
+pref("focusmanager.testmode", true);
+
+// No ICC color correction. We need this for reproducible screenshots.
+// See https://developer.mozilla.org/en/docs/Mozilla/Firefox/Releases/3.5/ICC_color_correction_in_Firefox.
+pref("gfx.color_management.mode", 0);
+pref("gfx.color_management.rendering_intent", 3);
+
+// Always use network provider for geolocation tests so we bypass the
+// macOS dialog raised by the corelocation provider
+pref("geo.provider.testing", true);
+
+
+
// =================================================================
+// THESE ARE NICHE PROPERTIES THAT ARE NICE TO HAVE
// =================================================================
+// Avoid stalling on shutdown, after "xpcom-will-shutdown" phase.
+// This at least happens when shutting down soon after launching.
+// See AppShutdown.cpp for more details on shutdown phases.
+pref("toolkit.shutdown.fastShutdownStage", 3);
+
// @see https://github.com/microsoft/playwright/issues/8178
pref("dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled", true);
@@ -36,23 +100,9 @@ pref("ui.systemUsesDarkTheme", 0);
// support for the new modal UI (see Bug 1686743).
pref("prompts.contentPromptSubDialog", false);
-// Increase max number of child web processes so that new pages
-// get a new process by default and we have a process isolation
-// between pages from different contexts. If this becomes a performance
-// issue we can povide custom '@mozilla.org/ipc/processselector;1'
-//
-pref("dom.ipc.processCount", 60000);
-
-// Never reuse processes as they may keep previously overridden values
-// (locale, timezone etc.).
-pref("dom.ipc.processPrelaunch.enabled", false);
-
// Do not use system colors - they are affected by themes.
pref("ui.use_standins_for_native_colors", true);
-// Isolate permissions by user context.
-pref("permissions.isolateBy.userContext", true);
-
pref("dom.push.serverURL", "");
// This setting breaks settings loading.
pref("services.settings.server", "");
@@ -87,14 +137,10 @@ pref("browser.newtabpage.enabled", false);
// Do not redirect user when a milstone upgrade of Firefox is detected
pref("browser.startup.homepage_override.mstone", "ignore");
-pref("browser.tabs.remote.separateFileUriProcess", false);
-pref("security.sandbox.content.level", 2);
-
// Disable topstories
pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
// DevTools JSONViewer sometimes fails to load dependencies with its require.js.
-// This doesn't affect Puppeteer operations, but spams console with a lot of
-// unpleasant errors.
+// This spams console with a lot of unpleasant errors.
// (bug 1424372)
pref("devtools.jsonview.enabled", false);
@@ -107,10 +153,6 @@ pref("devtools.jsonview.enabled", false);
// (bug 1176798, bug 1177018, bug 1210465)
pref("apz.content_response_timeout", 60000);
-// Allow creating files in content process - required for
-// |Page.setFileInputFiles| protocol method.
-pref("dom.file.createInChild", true);
-
// Indicate that the download panel has been shown once so that
// whichever download test runs first doesn't show the popup
// inconsistently.
@@ -142,15 +184,6 @@ pref("browser.tabs.closeWindowWithLastTab", true);
// unloaded
pref("browser.tabs.disableBackgroundZombification", false);
-// Do not warn when closing all open tabs
-pref("browser.tabs.warnOnClose", false);
-
-// Do not warn when closing all other open tabs
-pref("browser.tabs.warnOnCloseOtherTabs", false);
-
-// Do not warn when multiple tabs will be opened
-pref("browser.tabs.warnOnOpen", false);
-
// Disable first run splash page on Windows 10
pref("browser.usedOnWindows10.introURL", "");
@@ -163,9 +196,6 @@ pref("browser.uitour.enabled", false);
// network connections.
pref("browser.urlbar.suggest.searches", false);
-// Do not warn on quitting Firefox
-pref("browser.warnOnQuit", false);
-
// Do not show datareporting policy notifications which can
// interfere with tests
pref("datareporting.healthreport.documentServerURI", "");
@@ -178,13 +208,6 @@ pref("datareporting.healthreport.uploadEnabled", false);
// Automatically unload beforeunload alerts
pref("dom.disable_beforeunload", false);
-// Disable popup-blocker
-pref("dom.disable_open_during_load", false);
-
-// Disable the ProcessHangMonitor
-pref("dom.ipc.reportProcessHangs", false);
-pref("hangmonitor.timeout", 0);
-
// Disable slow script dialogues
pref("dom.max_chrome_script_run_time", 0);
pref("dom.max_script_run_time", 0);
@@ -210,21 +233,9 @@ pref("extensions.webservice.discoverURL", "");
pref("extensions.screenshots.disabled", true);
pref("extensions.screenshots.upload-disabled", true);
-// Allow the application to have focus even it runs in the background
-pref("focusmanager.testmode", true);
-
// Disable useragent updates
pref("general.useragent.updates.enabled", false);
-// No ICC color correction.
-// See https://developer.mozilla.org/en/docs/Mozilla/Firefox/Releases/3.5/ICC_color_correction_in_Firefox.
-pref("gfx.color_management.mode", 0);
-pref("gfx.color_management.rendering_intent", 3);
-
-// Always use network provider for geolocation tests so we bypass the
-// macOS dialog raised by the corelocation provider
-pref("geo.provider.testing", true);
-
// Do not scan Wifi
pref("geo.wifi.scan", false);
diff --git a/browser_patches/webkit/UPSTREAM_CONFIG.sh b/browser_patches/webkit/UPSTREAM_CONFIG.sh
index a83035ec31..2647e291c6 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="c888c485b787e204057b56d69536aae567ab8b3a"
+BASE_REVISION="675d141bdcf7fa6df9bdf505d46e46fdac638452"
diff --git a/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m b/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m
index d4ec183fb2..d558529953 100644
--- a/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m
+++ b/browser_patches/webkit/embedder/Playwright/mac/AppDelegate.m
@@ -229,6 +229,7 @@ const NSActivityOptions ActivityOptions =
if (!configuration) {
configuration = [[WKWebViewConfiguration alloc] init];
configuration.websiteDataStore = [self persistentDataStore];
+ configuration._controlledByAutomation = true;
configuration.preferences._fullScreenEnabled = YES;
configuration.preferences._developerExtrasEnabled = YES;
configuration.preferences._mediaDevicesEnabled = YES;
@@ -496,6 +497,12 @@ const NSActivityOptions ActivityOptions =
download.delegate = self;
}
+// Always automatically accept requestStorageAccess dialog.
+- (void)_webView:(WKWebView *)webView requestStorageAccessPanelForDomain:(NSString *)requestingDomain underCurrentDomain:(NSString *)currentDomain completionHandler:(void (^)(BOOL result))completionHandler
+{
+ completionHandler(true);
+}
+
#pragma mark WKDownloadDelegate
- (void)download:(WKDownload *)download decideDestinationUsingResponse:(NSURLResponse *)response suggestedFilename:(NSString *)suggestedFilename completionHandler:(void (^)(NSURL * _Nullable destination))completionHandler
diff --git a/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m b/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
index 365920d2fb..c5e618ca30 100644
--- a/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
+++ b/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
@@ -67,10 +67,22 @@ static void* keyValueObservingContext = &keyValueObservingContext;
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
{
- // Retain the frame size, but make sure that
- // the top of the window is always visible.
- CGFloat yPos = NSHeight(self.screen.frame) - 100 - NSHeight(self.frame);
- return NSMakeRect(frameRect.origin.x, yPos, frameRect.size.width, frameRect.size.height);
+ float kWindowControlBarHeight = 35;
+
+ CGFloat screenHeight = screen.frame.size.height; // e.g. 1080
+ CGFloat windowHeight = self.frame.size.height; // e.g. 5000
+ CGFloat screenYOffset = screen.frame.origin.y; // screen arrangement offset
+
+ bool exceedsAtTheTop = (NSMaxY(frameRect) - screenYOffset) > screenHeight;
+ bool exceedsAtTheBottom = (frameRect.origin.y + windowHeight + -screenYOffset - kWindowControlBarHeight) < 0;
+ CGFloat newOriginY = frameRect.origin.y;
+ // if it exceeds the height, then we move it to the top of the screen
+ if (screenHeight > 0 && exceedsAtTheTop)
+ newOriginY = screenHeight - windowHeight - kWindowControlBarHeight + screenYOffset;
+ // if it exceeds the bottom, then we move it to the bottom of the screen but make sure that the control bar is still visible
+ else if (screenHeight > 0 && exceedsAtTheBottom)
+ newOriginY = -windowHeight + screenYOffset + kWindowControlBarHeight;
+ return NSMakeRect(frameRect.origin.x, newOriginY, frameRect.size.width, frameRect.size.height);
}
@end
@@ -670,6 +682,12 @@ static BOOL areEssentiallyEqual(double a, double b)
}];
}
+// Always automatically accept requestStorageAccess dialog.
+- (void)_webView:(WKWebView *)webView requestStorageAccessPanelForDomain:(NSString *)requestingDomain underCurrentDomain:(NSString *)currentDomain completionHandler:(void (^)(BOOL result))completionHandler
+{
+ completionHandler(true);
+}
+
- (WKDragDestinationAction)_webView:(WKWebView *)webView dragDestinationActionMaskForDraggingInfo:(id)draggingInfo
{
return WKDragDestinationActionAny;
diff --git a/browser_patches/webkit/embedder/Playwright/win/Playwright.rc b/browser_patches/webkit/embedder/Playwright/win/Playwright.rc
index 4430f19062..8d71276512 100644
--- a/browser_patches/webkit/embedder/Playwright/win/Playwright.rc
+++ b/browser_patches/webkit/embedder/Playwright/win/Playwright.rc
@@ -1,76 +1,76 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "PlaywrightResource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_PLAYWRIGHT ICON "Playwright.ico"
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "PlaywrightResource.\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""windows.h""\r\n"
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "PlaywrightResource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_PLAYWRIGHT ICON "Playwright.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "PlaywrightResource.\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/browser_patches/webkit/embedder/Playwright/win/PlaywrightLib.rc b/browser_patches/webkit/embedder/Playwright/win/PlaywrightLib.rc
index 83039d330f..ddd837e49f 100644
--- a/browser_patches/webkit/embedder/Playwright/win/PlaywrightLib.rc
+++ b/browser_patches/webkit/embedder/Playwright/win/PlaywrightLib.rc
@@ -1,354 +1,354 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "PlaywrightLibResource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_PLAYWRIGHT ICON "Playwright.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDC_PLAYWRIGHT MENU
-BEGIN
- POPUP "&File"
- BEGIN
- MENUITEM "New Window\tCtrl-N" IDM_NEW_WINDOW
- MENUITEM "Close\tCtrl-W", IDM_CLOSE_WINDOW
- END
- POPUP "&View"
- BEGIN
- MENUITEM "Actual Size\tCtrl+0", IDM_ACTUAL_SIZE
- MENUITEM "Zoom In\tCtrl++", IDM_ZOOM_IN
- MENUITEM "Zoom Out\tCtrl+-", IDM_ZOOM_OUT
- MENUITEM "Invert Colors", IDM_INVERT_COLORS
- END
- POPUP "&History"
- BEGIN
- MENUITEM "Reload\tCtrl-R", IDM_RELOAD
- MENUITEM "Back", IDM_HISTORY_BACKWARD
- MENUITEM "Forward", IDM_HISTORY_FORWARD
- END
- POPUP "D&evelop"
- BEGIN
- MENUITEM "Show Web Inspector", IDM_WEB_INSPECTOR
- END
- POPUP "&Help"
- BEGIN
- MENUITEM "&About ...", IDM_ABOUT
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Accelerator
-//
-
-IDC_PLAYWRIGHT ACCELERATORS
-BEGIN
- "/", IDM_ABOUT, ASCII, ALT, NOINVERT
- "0", IDM_ACTUAL_SIZE, VIRTKEY, CONTROL, NOINVERT
- "?", IDM_ABOUT, ASCII, ALT, NOINVERT
- "R", IDM_RELOAD, VIRTKEY, CONTROL, NOINVERT
- "N", IDM_NEW_WINDOW, VIRTKEY, CONTROL, NOINVERT
- VK_ADD, IDM_ZOOM_IN, VIRTKEY, CONTROL, NOINVERT
- VK_OEM_MINUS, IDM_ZOOM_OUT, VIRTKEY, CONTROL, NOINVERT
- VK_OEM_PLUS, IDM_ZOOM_IN, VIRTKEY, CONTROL, NOINVERT
- VK_SUBTRACT, IDM_ZOOM_OUT, VIRTKEY, CONTROL, NOINVERT
-END
-
-IDR_ACCELERATORS_PRE ACCELERATORS
-BEGIN
- "W", IDM_CLOSE_WINDOW, VIRTKEY, CONTROL, NOINVERT
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_ABOUTBOX DIALOGEX 22, 17, 230, 41
-STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-CAPTION "About"
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- ICON IDI_PLAYWRIGHT,IDC_MYICON,14,9,20,20
- LTEXT "Playwright Version 1.1",IDC_STATIC,49,10,119,8
- LTEXT "Copyright (C) 2015-2019",IDC_STATIC,49,20,119,8
- DEFPUSHBUTTON "OK",IDOK,186,10,30,11,WS_GROUP
-END
-
-IDD_CACHES DIALOGEX 0, 0, 401, 456
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Dialog"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,287,435,50,14
- PUSHBUTTON "Cancel",IDCANCEL,344,435,50,14
- GROUPBOX "FastMalloc",IDC_STATIC,208,14,186,67
- GROUPBOX "WebCore Cache",IDC_STATIC,17,83,376,105
- GROUPBOX "JavaScript Heap",IDC_STATIC,18,193,376,168
- GROUPBOX "Site Icon Database",IDC_STATIC,18,366,142,65
- GROUPBOX "Font and Glyph Caches",IDC_STATIC,168,366,226,66
- GROUPBOX "CFURLCache",IDC_STATIC,7,14,197,67
- PUSHBUTTON "Empty URLCache",IDC_EMPTY_URL_CACHE,131,63,69,14,WS_DISABLED
- PUSHBUTTON "Return Free Memory",IDC_RETURN_FREE_MEMORY,308,63,76,14,WS_DISABLED
- PUSHBUTTON "Empty WebCore Cache",IDC_EMPTY_WEBCORE_CACHE,21,170,83,14,WS_DISABLED
- CONTROL "Disable WebCore Cache",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,119,172,93,10
- PUSHBUTTON "Garbage Collect JavaScript Objects",IDC_GC_JSC,253,343,135,14,WS_DISABLED
- RTEXT "Reserved VM",IDC_STATIC,212,26,67,9
- RTEXT "0",IDC_RESERVED_VM,290,26,94,8
- RTEXT "Committed VM",IDC_STATIC,211,39,67,8
- RTEXT "0",IDC_COMMITTED_VM,290,39,94,8
- RTEXT "Free List Bytes",IDC_STATIC,211,52,67,8
- RTEXT "0",IDC_FREE_LIST_BYTES,290,52,94,8
- RTEXT "Images",IDC_STATIC,37,106,24,8
- RTEXT "CSS",IDC_STATIC,47,116,14,8
- RTEXT "XSL",IDC_STATIC,49,126,12,8
- RTEXT "JavaScript",IDC_STATIC,27,135,34,8
- RTEXT "Total",IDC_STATIC,43,146,17,8
- LTEXT "Objects",IDC_STATIC,111,96,26,8
- LTEXT "Bytes",IDC_STATIC,175,96,19,8
- LTEXT "Live",IDC_STATIC,232,96,14,8
- LTEXT "Decoded",IDC_STATIC,284,96,29,8
- LTEXT "Purgeable",IDC_STATIC,351,96,33,8
- RTEXT "0",IDC_IMAGES_OBJECT_COUNT,100,106,32,8
- RTEXT "0",IDC_CSS_OBJECT_COUNT,100,116,32,8
- RTEXT "0",IDC_XSL_OBJECT_COUNT,100,126,32,8
- RTEXT "0",IDC_JSC_OBJECT_COUNT,100,135,32,8
- RTEXT "0",IDC_TOTAL_OBJECT_COUNT,100,146,32,8
- RTEXT "0",IDC_IMAGES_BYTES,162,106,32,8
- RTEXT "0",IDC_CSS_BYTES,162,116,32,8
- RTEXT "0",IDC_XSL_BYTES,162,126,32,8
- RTEXT "0",IDC_JSC_BYTES,162,135,32,8
- RTEXT "0",IDC_TOTAL_BYTES,162,146,32,8
- RTEXT "0",IDC_IMAGES_LIVE_COUNT,221,106,32,8
- RTEXT "0",IDC_CSS_LIVE_COUNT,221,116,32,8
- RTEXT "0",IDC_XSL_LIVE_COUNT,221,126,32,8
- RTEXT "0",IDC_JSC_LIVE_COUNT,221,135,32,8
- RTEXT "0",IDC_TOTAL_LIVE_COUNT,221,146,32,8
- RTEXT "0",IDC_IMAGES_DECODED_COUNT,284,106,32,8
- RTEXT "0",IDC_CSS_DECODED_COUNT,284,116,32,8
- RTEXT "0",IDC_XSL_DECODED_COUNT,284,126,32,8
- RTEXT "0",IDC_JSC_DECODED_COUNT,284,135,32,8
- RTEXT "0",IDC_TOTAL_DECODED,284,146,32,8
- RTEXT "0",IDC_IMAGES_PURGEABLE_COUNT,354,106,32,8
- RTEXT "0",IDC_CSS_PURGEABLE_COUNT,354,116,32,8
- RTEXT "0",IDC_XSL_PURGEABLE_COUNT,354,126,32,8
- RTEXT "0",IDC_JSC_PURGEABLE_COUNT,354,135,32,8
- RTEXT "0",IDC_TOTAL_PURGEABLE,354,146,32,8
- RTEXT "Total Objects",IDC_STATIC,63,207,44,8
- RTEXT "Global Objects",IDC_STATIC,56,217,51,8
- RTEXT "Protected Objects",IDC_STATIC,48,227,59,8
- RTEXT "0",IDC_TOTAL_JSC_HEAP_OBJECTS,127,207,56,8
- RTEXT "0",IDC_GLOBAL_JSC_HEAP_OBJECTS,127,217,56,8
- RTEXT "0",IDC_PROTECTED_JSC_HEAP_OBJECTS,127,227,56,8
- RTEXT "Size",IDC_STATIC56,223,207,14,8
- RTEXT "Free",IDC_STATIC57,222,217,16,8
- RTEXT "0",IDC_JSC_HEAP_SIZE,270,207,56,8
- RTEXT "0",IDC_JSC_HEAP_FREE,270,217,56,8
- PUSHBUTTON "Purge Inactive Font Data",IDC_BUTTON5,293,415,95,14,WS_DISABLED
- LTEXT "Total Font Data Objects",IDC_STATIC,208,379,78,8
- LTEXT "Inactive Font Data Objects",IDC_STATIC,198,390,88,8
- LTEXT "Glyph Pages",IDC_STATIC,246,402,40,8
- RTEXT "0",IDC_TOTAL_FONT_OBJECTS,329,379,56,8
- RTEXT "0",IDC_INACTIVE_FONT_OBJECTS,329,390,56,8
- RTEXT "0",IDC_GLYPH_PAGES,329,402,56,8
- LTEXT "Page URL Mappings",IDC_STATIC,33,380,64,8
- LTEXT "Retained Page URLs",IDC_STATIC,31,390,66,8
- LTEXT "Site Icon Records",IDC_STATIC,40,400,57,8
- LTEXT "Site Icons with Data",IDC_STATIC,32,410,65,8
- RTEXT "0",IDC_PAGE_URL_MAPPINGS,101,380,52,8
- RTEXT "0",IDC_RETAINED_PAGE_URLS,101,390,52,8
- RTEXT "0",IDC_SITE_ICON_RECORDS,101,400,52,8
- RTEXT "0",IDC_SITE_ICONS_WITH_DATA,101,410,52,8
-END
-
-IDD_AUTH DIALOGEX 0, 0, 231, 119
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Authentication Required"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "Sign In",IDOK,116,98,50,14
- PUSHBUTTON "Cancel",IDCANCEL,174,98,50,14
- LTEXT "Realm",IDC_REALM_TEXT,67,21,157,8
- RTEXT "User Name:",IDC_STATIC,7,41,57,8
- EDITTEXT IDC_AUTH_USER,67,39,157,14,ES_AUTOHSCROLL
- RTEXT "Password:",IDC_STATIC,7,66,57,8
- EDITTEXT IDC_AUTH_PASSWORD,67,64,157,14,ES_PASSWORD | ES_AUTOHSCROLL
-END
-
-IDD_PROXY DIALOGEX 0, 0, 310, 176
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Proxy Configuration"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,199,155,50,14
- PUSHBUTTON "Cancel",IDCANCEL,253,155,50,14
- CONTROL "Use system default proxy configuration.",IDC_PROXY_DEFAULT,
- "Button",BS_AUTORADIOBUTTON | WS_GROUP,22,15,226,10
- CONTROL "Use custom proxy configuration:",IDC_PROXY_CUSTOM,
- "Button",BS_AUTORADIOBUTTON,22,33,226,10
- CONTROL "Don't use proxy.",IDC_PROXY_DISABLE,"Button",BS_AUTORADIOBUTTON,22,117,226,10
- EDITTEXT IDC_PROXY_URL,76,52,193,14,ES_AUTOHSCROLL
- EDITTEXT IDC_PROXY_EXCLUDE,76,85,193,14,ES_AUTOHSCROLL
- LTEXT "URL:",IDC_STATIC,30,55,43,8,0,WS_EX_RIGHT
- LTEXT "Excude list:",IDC_STATIC,30,88,43,8,0,WS_EX_RIGHT
- LTEXT "Example: http://192.168.0.2:8000",IDC_STATIC,80,68,194,8
- LTEXT "Comma separated hostnames.",IDC_STATIC,80,101,194,8
-END
-
-IDD_SERVER_TRUST DIALOGEX 0, 0, 319, 184
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Server Trust Evaluation Request"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "Yes",IDOK,197,163,50,14
- PUSHBUTTON "No",IDCANCEL,262,163,50,14
- LTEXT "Certificate information",IDC_STATIC,7,7,294,17
- EDITTEXT IDC_SERVER_TRUST_TEXT,7,24,305,130,ES_MULTILINE | ES_READONLY | WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP
-END
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "PlaywrightLibResource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""windows.h""\r\n"
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_ABOUTBOX, DIALOG
- BEGIN
- END
-
- IDD_CACHES, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 394
- TOPMARGIN, 7
- BOTTOMMARGIN, 449
- END
-
- IDD_AUTH, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 224
- VERTGUIDE, 64
- VERTGUIDE, 67
- TOPMARGIN, 7
- BOTTOMMARGIN, 92
- HORZGUIDE, 25
- HORZGUIDE, 50
- END
-
- IDD_PROXY, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 303
- VERTGUIDE, 22
- TOPMARGIN, 7
- BOTTOMMARGIN, 169
- END
-
- IDD_SERVER_TRUST, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 312
- TOPMARGIN, 7
- BOTTOMMARGIN, 177
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDB_TOOLBAR BITMAP "toolbar.bmp"
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE
-BEGIN
- IDS_APP_TITLE "Playwright"
- IDC_PLAYWRIGHT "Playwright"
-END
-
-#endif // English (United States) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "PlaywrightLibResource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_PLAYWRIGHT ICON "Playwright.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDC_PLAYWRIGHT MENU
+BEGIN
+ POPUP "&File"
+ BEGIN
+ MENUITEM "New Window\tCtrl-N" IDM_NEW_WINDOW
+ MENUITEM "Close\tCtrl-W", IDM_CLOSE_WINDOW
+ END
+ POPUP "&View"
+ BEGIN
+ MENUITEM "Actual Size\tCtrl+0", IDM_ACTUAL_SIZE
+ MENUITEM "Zoom In\tCtrl++", IDM_ZOOM_IN
+ MENUITEM "Zoom Out\tCtrl+-", IDM_ZOOM_OUT
+ MENUITEM "Invert Colors", IDM_INVERT_COLORS
+ END
+ POPUP "&History"
+ BEGIN
+ MENUITEM "Reload\tCtrl-R", IDM_RELOAD
+ MENUITEM "Back", IDM_HISTORY_BACKWARD
+ MENUITEM "Forward", IDM_HISTORY_FORWARD
+ END
+ POPUP "D&evelop"
+ BEGIN
+ MENUITEM "Show Web Inspector", IDM_WEB_INSPECTOR
+ END
+ POPUP "&Help"
+ BEGIN
+ MENUITEM "&About ...", IDM_ABOUT
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDC_PLAYWRIGHT ACCELERATORS
+BEGIN
+ "/", IDM_ABOUT, ASCII, ALT, NOINVERT
+ "0", IDM_ACTUAL_SIZE, VIRTKEY, CONTROL, NOINVERT
+ "?", IDM_ABOUT, ASCII, ALT, NOINVERT
+ "R", IDM_RELOAD, VIRTKEY, CONTROL, NOINVERT
+ "N", IDM_NEW_WINDOW, VIRTKEY, CONTROL, NOINVERT
+ VK_ADD, IDM_ZOOM_IN, VIRTKEY, CONTROL, NOINVERT
+ VK_OEM_MINUS, IDM_ZOOM_OUT, VIRTKEY, CONTROL, NOINVERT
+ VK_OEM_PLUS, IDM_ZOOM_IN, VIRTKEY, CONTROL, NOINVERT
+ VK_SUBTRACT, IDM_ZOOM_OUT, VIRTKEY, CONTROL, NOINVERT
+END
+
+IDR_ACCELERATORS_PRE ACCELERATORS
+BEGIN
+ "W", IDM_CLOSE_WINDOW, VIRTKEY, CONTROL, NOINVERT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUTBOX DIALOGEX 22, 17, 230, 41
+STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "About"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ ICON IDI_PLAYWRIGHT,IDC_MYICON,14,9,20,20
+ LTEXT "Playwright Version 1.1",IDC_STATIC,49,10,119,8
+ LTEXT "Copyright (C) 2015-2019",IDC_STATIC,49,20,119,8
+ DEFPUSHBUTTON "OK",IDOK,186,10,30,11,WS_GROUP
+END
+
+IDD_CACHES DIALOGEX 0, 0, 401, 456
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Dialog"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,287,435,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,344,435,50,14
+ GROUPBOX "FastMalloc",IDC_STATIC,208,14,186,67
+ GROUPBOX "WebCore Cache",IDC_STATIC,17,83,376,105
+ GROUPBOX "JavaScript Heap",IDC_STATIC,18,193,376,168
+ GROUPBOX "Site Icon Database",IDC_STATIC,18,366,142,65
+ GROUPBOX "Font and Glyph Caches",IDC_STATIC,168,366,226,66
+ GROUPBOX "CFURLCache",IDC_STATIC,7,14,197,67
+ PUSHBUTTON "Empty URLCache",IDC_EMPTY_URL_CACHE,131,63,69,14,WS_DISABLED
+ PUSHBUTTON "Return Free Memory",IDC_RETURN_FREE_MEMORY,308,63,76,14,WS_DISABLED
+ PUSHBUTTON "Empty WebCore Cache",IDC_EMPTY_WEBCORE_CACHE,21,170,83,14,WS_DISABLED
+ CONTROL "Disable WebCore Cache",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,119,172,93,10
+ PUSHBUTTON "Garbage Collect JavaScript Objects",IDC_GC_JSC,253,343,135,14,WS_DISABLED
+ RTEXT "Reserved VM",IDC_STATIC,212,26,67,9
+ RTEXT "0",IDC_RESERVED_VM,290,26,94,8
+ RTEXT "Committed VM",IDC_STATIC,211,39,67,8
+ RTEXT "0",IDC_COMMITTED_VM,290,39,94,8
+ RTEXT "Free List Bytes",IDC_STATIC,211,52,67,8
+ RTEXT "0",IDC_FREE_LIST_BYTES,290,52,94,8
+ RTEXT "Images",IDC_STATIC,37,106,24,8
+ RTEXT "CSS",IDC_STATIC,47,116,14,8
+ RTEXT "XSL",IDC_STATIC,49,126,12,8
+ RTEXT "JavaScript",IDC_STATIC,27,135,34,8
+ RTEXT "Total",IDC_STATIC,43,146,17,8
+ LTEXT "Objects",IDC_STATIC,111,96,26,8
+ LTEXT "Bytes",IDC_STATIC,175,96,19,8
+ LTEXT "Live",IDC_STATIC,232,96,14,8
+ LTEXT "Decoded",IDC_STATIC,284,96,29,8
+ LTEXT "Purgeable",IDC_STATIC,351,96,33,8
+ RTEXT "0",IDC_IMAGES_OBJECT_COUNT,100,106,32,8
+ RTEXT "0",IDC_CSS_OBJECT_COUNT,100,116,32,8
+ RTEXT "0",IDC_XSL_OBJECT_COUNT,100,126,32,8
+ RTEXT "0",IDC_JSC_OBJECT_COUNT,100,135,32,8
+ RTEXT "0",IDC_TOTAL_OBJECT_COUNT,100,146,32,8
+ RTEXT "0",IDC_IMAGES_BYTES,162,106,32,8
+ RTEXT "0",IDC_CSS_BYTES,162,116,32,8
+ RTEXT "0",IDC_XSL_BYTES,162,126,32,8
+ RTEXT "0",IDC_JSC_BYTES,162,135,32,8
+ RTEXT "0",IDC_TOTAL_BYTES,162,146,32,8
+ RTEXT "0",IDC_IMAGES_LIVE_COUNT,221,106,32,8
+ RTEXT "0",IDC_CSS_LIVE_COUNT,221,116,32,8
+ RTEXT "0",IDC_XSL_LIVE_COUNT,221,126,32,8
+ RTEXT "0",IDC_JSC_LIVE_COUNT,221,135,32,8
+ RTEXT "0",IDC_TOTAL_LIVE_COUNT,221,146,32,8
+ RTEXT "0",IDC_IMAGES_DECODED_COUNT,284,106,32,8
+ RTEXT "0",IDC_CSS_DECODED_COUNT,284,116,32,8
+ RTEXT "0",IDC_XSL_DECODED_COUNT,284,126,32,8
+ RTEXT "0",IDC_JSC_DECODED_COUNT,284,135,32,8
+ RTEXT "0",IDC_TOTAL_DECODED,284,146,32,8
+ RTEXT "0",IDC_IMAGES_PURGEABLE_COUNT,354,106,32,8
+ RTEXT "0",IDC_CSS_PURGEABLE_COUNT,354,116,32,8
+ RTEXT "0",IDC_XSL_PURGEABLE_COUNT,354,126,32,8
+ RTEXT "0",IDC_JSC_PURGEABLE_COUNT,354,135,32,8
+ RTEXT "0",IDC_TOTAL_PURGEABLE,354,146,32,8
+ RTEXT "Total Objects",IDC_STATIC,63,207,44,8
+ RTEXT "Global Objects",IDC_STATIC,56,217,51,8
+ RTEXT "Protected Objects",IDC_STATIC,48,227,59,8
+ RTEXT "0",IDC_TOTAL_JSC_HEAP_OBJECTS,127,207,56,8
+ RTEXT "0",IDC_GLOBAL_JSC_HEAP_OBJECTS,127,217,56,8
+ RTEXT "0",IDC_PROTECTED_JSC_HEAP_OBJECTS,127,227,56,8
+ RTEXT "Size",IDC_STATIC56,223,207,14,8
+ RTEXT "Free",IDC_STATIC57,222,217,16,8
+ RTEXT "0",IDC_JSC_HEAP_SIZE,270,207,56,8
+ RTEXT "0",IDC_JSC_HEAP_FREE,270,217,56,8
+ PUSHBUTTON "Purge Inactive Font Data",IDC_BUTTON5,293,415,95,14,WS_DISABLED
+ LTEXT "Total Font Data Objects",IDC_STATIC,208,379,78,8
+ LTEXT "Inactive Font Data Objects",IDC_STATIC,198,390,88,8
+ LTEXT "Glyph Pages",IDC_STATIC,246,402,40,8
+ RTEXT "0",IDC_TOTAL_FONT_OBJECTS,329,379,56,8
+ RTEXT "0",IDC_INACTIVE_FONT_OBJECTS,329,390,56,8
+ RTEXT "0",IDC_GLYPH_PAGES,329,402,56,8
+ LTEXT "Page URL Mappings",IDC_STATIC,33,380,64,8
+ LTEXT "Retained Page URLs",IDC_STATIC,31,390,66,8
+ LTEXT "Site Icon Records",IDC_STATIC,40,400,57,8
+ LTEXT "Site Icons with Data",IDC_STATIC,32,410,65,8
+ RTEXT "0",IDC_PAGE_URL_MAPPINGS,101,380,52,8
+ RTEXT "0",IDC_RETAINED_PAGE_URLS,101,390,52,8
+ RTEXT "0",IDC_SITE_ICON_RECORDS,101,400,52,8
+ RTEXT "0",IDC_SITE_ICONS_WITH_DATA,101,410,52,8
+END
+
+IDD_AUTH DIALOGEX 0, 0, 231, 119
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Authentication Required"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "Sign In",IDOK,116,98,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,174,98,50,14
+ LTEXT "Realm",IDC_REALM_TEXT,67,21,157,8
+ RTEXT "User Name:",IDC_STATIC,7,41,57,8
+ EDITTEXT IDC_AUTH_USER,67,39,157,14,ES_AUTOHSCROLL
+ RTEXT "Password:",IDC_STATIC,7,66,57,8
+ EDITTEXT IDC_AUTH_PASSWORD,67,64,157,14,ES_PASSWORD | ES_AUTOHSCROLL
+END
+
+IDD_PROXY DIALOGEX 0, 0, 310, 176
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Proxy Configuration"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,199,155,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,253,155,50,14
+ CONTROL "Use system default proxy configuration.",IDC_PROXY_DEFAULT,
+ "Button",BS_AUTORADIOBUTTON | WS_GROUP,22,15,226,10
+ CONTROL "Use custom proxy configuration:",IDC_PROXY_CUSTOM,
+ "Button",BS_AUTORADIOBUTTON,22,33,226,10
+ CONTROL "Don't use proxy.",IDC_PROXY_DISABLE,"Button",BS_AUTORADIOBUTTON,22,117,226,10
+ EDITTEXT IDC_PROXY_URL,76,52,193,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_PROXY_EXCLUDE,76,85,193,14,ES_AUTOHSCROLL
+ LTEXT "URL:",IDC_STATIC,30,55,43,8,0,WS_EX_RIGHT
+ LTEXT "Excude list:",IDC_STATIC,30,88,43,8,0,WS_EX_RIGHT
+ LTEXT "Example: http://192.168.0.2:8000",IDC_STATIC,80,68,194,8
+ LTEXT "Comma separated hostnames.",IDC_STATIC,80,101,194,8
+END
+
+IDD_SERVER_TRUST DIALOGEX 0, 0, 319, 184
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Server Trust Evaluation Request"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "Yes",IDOK,197,163,50,14
+ PUSHBUTTON "No",IDCANCEL,262,163,50,14
+ LTEXT "Certificate information",IDC_STATIC,7,7,294,17
+ EDITTEXT IDC_SERVER_TRUST_TEXT,7,24,305,130,ES_MULTILINE | ES_READONLY | WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "PlaywrightLibResource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_ABOUTBOX, DIALOG
+ BEGIN
+ END
+
+ IDD_CACHES, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 394
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 449
+ END
+
+ IDD_AUTH, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 224
+ VERTGUIDE, 64
+ VERTGUIDE, 67
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 92
+ HORZGUIDE, 25
+ HORZGUIDE, 50
+ END
+
+ IDD_PROXY, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 303
+ VERTGUIDE, 22
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 169
+ END
+
+ IDD_SERVER_TRUST, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 312
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 177
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_TOOLBAR BITMAP "toolbar.bmp"
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+ IDS_APP_TITLE "Playwright"
+ IDC_PLAYWRIGHT "Playwright"
+END
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.cpp b/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.cpp
index 5116eba952..54a3aa2dec 100644
--- a/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.cpp
+++ b/browser_patches/webkit/embedder/Playwright/win/WebKitBrowserWindow.cpp
@@ -34,6 +34,7 @@
#include <WebKit/WKCredential.h>
#include <WebKit/WKFramePolicyListener.h>
#include <WebKit/WKInspector.h>
+#include <WebKit/WKPagePrivate.h>
#include <WebKit/WKProtectionSpace.h>
#include <WebKit/WKProtectionSpaceCurl.h>
#include <WebKit/WKWebsiteDataStoreRef.h>
@@ -102,6 +103,8 @@ WebKitBrowserWindow::WebKitBrowserWindow(BrowserWindowClient& client, HWND mainW
policyClient.decidePolicyForResponse_deprecatedForUseWithV0 = decidePolicyForResponse;
policyClient.decidePolicyForNavigationAction = decidePolicyForNavigationAction;
WKPageSetPagePolicyClient(page, &policyClient.base);
+
+ WKPageSetControlledByAutomation(page, true);
resetZoom();
}
diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff
index f3aa2a9041..c815a22f9d 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 c2e1cda64b287749cb508203f8e0562dff62cec6..5799df8cc071219937a19d1a4d6893409dd6ae03 100644
+index 05cc3b536d85fd2fbc98e7add71f533c42a6f71b..b3917a9e9d88f5c030295273150745b9f5497abf 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
-@@ -1360,22 +1360,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
+@@ -1393,22 +1393,27 @@ set(JavaScriptCore_INSPECTOR_DOMAINS
${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
@@ -31,10 +31,10 @@ index c2e1cda64b287749cb508203f8e0562dff62cec6..5799df8cc071219937a19d1a4d689340
${JAVASCRIPTCORE_DIR}/inspector/protocol/ServiceWorker.json
${JAVASCRIPTCORE_DIR}/inspector/protocol/Target.json
diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make
-index a1ee4b4a0563f2bb0fa07080da0f5b1c10bb6767..79cdd20c34092dd9cc8026128e6aba3bfac9e50a 100644
+index b03119859b76d648dc990e056e9ac78237bda7d4..fe2dda9d96752270d4d202c8ce6825dd51c4204a 100644
--- a/Source/JavaScriptCore/DerivedSources.make
+++ b/Source/JavaScriptCore/DerivedSources.make
-@@ -291,22 +291,27 @@ INSPECTOR_DOMAINS := \
+@@ -298,22 +298,27 @@ INSPECTOR_DOMAINS := \
$(JavaScriptCore)/inspector/protocol/CSS.json \
$(JavaScriptCore)/inspector/protocol/Canvas.json \
$(JavaScriptCore)/inspector/protocol/Console.json \
@@ -168,10 +168,10 @@ 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 9f2623d75b9825639b0cc664c3b4d64a6615fedb..ecc1f6fe0cf2e005e8740a2f652ce88dd199dcca 100644
+index 1cf725d02a5771cddee1029669eac752efc9bf3e..6b441343ef4e771d525d4056e743c3100be43c69 100644
--- a/Source/JavaScriptCore/inspector/InjectedScriptSource.js
+++ b/Source/JavaScriptCore/inspector/InjectedScriptSource.js
-@@ -167,7 +167,7 @@ let InjectedScript = class InjectedScript
+@@ -172,7 +172,7 @@ let InjectedScript = class InjectedScript extends PrototypelessObjectBase
return;
}
@@ -180,7 +180,7 @@ index 9f2623d75b9825639b0cc664c3b4d64a6615fedb..ecc1f6fe0cf2e005e8740a2f652ce88d
callback("Object with given id is not a Promise");
return;
}
-@@ -202,14 +202,16 @@ let InjectedScript = class InjectedScript
+@@ -207,14 +207,16 @@ let InjectedScript = class InjectedScript extends PrototypelessObjectBase
return this._evaluateAndWrap(callFrame.evaluateWithScopeExtension, callFrame, expression, objectGroup, isEvalOnCallFrame, includeCommandLineAPI, returnByValue, generatePreview, saveResult);
}
@@ -200,7 +200,7 @@ index 9f2623d75b9825639b0cc664c3b4d64a6615fedb..ecc1f6fe0cf2e005e8740a2f652ce88d
let resolvedArgs = @createArrayWithoutPrototype();
if (args) {
-@@ -218,22 +220,37 @@ let InjectedScript = class InjectedScript
+@@ -223,22 +225,37 @@ let InjectedScript = class InjectedScript extends PrototypelessObjectBase
try {
resolvedArgs[i] = this._resolveCallArgument(callArgs[i]);
} catch (e) {
@@ -369,7 +369,7 @@ index 6e573c4dfd1f356b76ef9b46dcee4254e9a28f27..8855604064f5130211baab6caa89318c
void warnUnimplemented(const String& method);
void internalAddMessage(MessageType, MessageLevel, JSC::JSGlobalObject*, Ref<ScriptArguments>&&);
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
-index 6e976621186326be53aedeeda618a441d7bea6a6..17bb59df54bb58782c3d5988736d4976794a412d 100644
+index aef96857b46e980a12f2c0a4d38d6035c024ac99..2eb163fe20cbbd975c7f49d9835485152057993d 100644
--- a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
+++ b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
@@ -177,41 +177,43 @@ void InspectorRuntimeAgent::awaitPromise(const Protocol::Runtime::RemoteObjectId
@@ -541,7 +541,7 @@ index e81573fd0fffaaf6fd2af36635c78fcdf8608c69..c8cde6cfcde9612624f12e21bd9fa56b
// FrontendChannel
FrontendChannel::ConnectionType connectionType() const;
diff --git a/Source/JavaScriptCore/inspector/protocol/DOM.json b/Source/JavaScriptCore/inspector/protocol/DOM.json
-index 4c067acbce3e95883082561e24b2fe6febd9f61e..7923364429b32dbc1851177119201601ec200107 100644
+index 4c067acbce3e95883082561e24b2fe6febd9f61e..67b6702d11c46baad9cfb0aef6348d09eb8277a7 100644
--- a/Source/JavaScriptCore/inspector/protocol/DOM.json
+++ b/Source/JavaScriptCore/inspector/protocol/DOM.json
@@ -80,6 +80,16 @@
@@ -578,18 +578,19 @@ index 4c067acbce3e95883082561e24b2fe6febd9f61e..7923364429b32dbc1851177119201601
}
],
"commands": [
-@@ -560,7 +580,9 @@
+@@ -560,7 +580,10 @@
"description": "Resolves JavaScript node object for given node id.",
"targetTypes": ["page"],
"parameters": [
- { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to resolve." },
+ { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Id of the node to resolve." },
+ { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Source element handle." },
++ { "name": "frameId", "$ref": "Network.FrameId", "optional": true, "description": "Id of the frame to resolve the owner element." },
+ { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which execution context to adopt to." },
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
],
"returns": [
-@@ -627,6 +649,46 @@
+@@ -627,6 +650,46 @@
"parameters": [
{ "name": "allow", "type": "boolean" }
]
@@ -1833,22 +1834,22 @@ index 72c81757450ad5ebacd5fd20d2a16095514802ec..b7d8ab1e04d3850180079870468b28ef
private:
enum ArgumentRequirement { ArgumentRequired, ArgumentNotRequired };
diff --git a/Source/ThirdParty/libwebrtc/CMakeLists.txt b/Source/ThirdParty/libwebrtc/CMakeLists.txt
-index 0d42c17c6a85b2a9f6af319431332f7f8a709188..8899c8e85b11db81d1da14c7f27814883f75da50 100644
+index 9d2c74d08ce6f19f91b3c6ee63cd9682e9a4b310..fed7d9787dbb7e21648a24e32c4bc418d1c881a5 100644
--- a/Source/ThirdParty/libwebrtc/CMakeLists.txt
+++ b/Source/ThirdParty/libwebrtc/CMakeLists.txt
-@@ -398,6 +398,11 @@ set(webrtc_SOURCES
- Source/third_party/boringssl/src/ssl/tls13_server.cc
- Source/third_party/boringssl/src/ssl/tls_method.cc
- Source/third_party/boringssl/src/ssl/tls_record.cc
+@@ -551,6 +551,11 @@ set(webrtc_SOURCES
+ Source/third_party/boringssl/src/util/fipstools/cavp/cavp_main.cc
+ Source/third_party/boringssl/src/util/fipstools/cavp/cavp_test_util.cc
+ Source/third_party/boringssl/src/util/fipstools/cavp/test_fips.c
+# Playwright begin
+ Source/third_party/libwebm/mkvmuxer/mkvmuxer.cc
+ Source/third_party/libwebm/mkvmuxer/mkvmuxerutil.cc
+ Source/third_party/libwebm/mkvmuxer/mkvwriter.cc
+# Playwright end
+ Source/third_party/libyuv/source/compare.cc
Source/third_party/libyuv/source/compare_common.cc
Source/third_party/libyuv/source/compare_gcc.cc
- Source/third_party/libyuv/source/convert.cc
-@@ -1857,6 +1862,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE
+@@ -2187,6 +2192,10 @@ set(webrtc_INCLUDE_DIRECTORIES PRIVATE
Source/third_party/libsrtp/config
Source/third_party/libsrtp/crypto/include
Source/third_party/libsrtp/include
@@ -1860,13 +1861,13 @@ index 0d42c17c6a85b2a9f6af319431332f7f8a709188..8899c8e85b11db81d1da14c7f2781488
Source/third_party/opus/src/celt
Source/third_party/opus/src/include
diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
-index 0a36256d0da1126ff93c39f189e76a2f5f282094..db1fe9fab24f4480b0e067c9022f731d717d98b6 100644
+index ca891a7159d890799759ff78c79de4c69be1f898..3eb14670d55db3dd0296ddc7f85c540ede3383e1 100644
--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
-@@ -339,3 +339,24 @@ __ZN6webrtc25CreateTaskQueueGcdFactoryEv
- __ZN6webrtc27CreatePeerConnectionFactoryEPN3rtc6ThreadES2_S2_NS0_13scoped_refptrINS_17AudioDeviceModuleEEENS3_INS_19AudioEncoderFactoryEEENS3_INS_19AudioDecoderFactoryEEENSt3__110unique_ptrINS_19VideoEncoderFactoryENSA_14default_deleteISC_EEEENSB_INS_19VideoDecoderFactoryENSD_ISG_EEEENS3_INS_10AudioMixerEEENS3_INS_15AudioProcessingEEEPNS_19AudioFrameProcessorENSB_INS_16TaskQueueFactoryENSD_ISP_EEEE
- __ZN6webrtc16convertBGRAToYUVEP10__CVBufferS1_
- __ZNK7cricket9Candidate16ToStringInternalEb
+@@ -362,3 +362,24 @@ __ZNK6webrtc10ColorSpace5rangeEv
+ __ZNK6webrtc10ColorSpace6matrixEv
+ __ZNK6webrtc10ColorSpace8transferEv
+ __ZNK6webrtc10ColorSpace9primariesEv
+__ZN8mkvmuxer11SegmentInfo15set_writing_appEPKc
+__ZN8mkvmuxer11SegmentInfo4InitEv
+__ZN8mkvmuxer7Segment10OutputCuesEb
@@ -1889,20 +1890,20 @@ index 0a36256d0da1126ff93c39f189e76a2f5f282094..db1fe9fab24f4480b0e067c9022f731d
+_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 64433d3d2a0be3d9b83bde060700af8ce57a0b9d..14e35310c06a3add1cbe951287706be705761580 100644
+index ce8d0e7792f5ea2eefdec09bdc821ed844257828..77763b7c70dd8d93f37e406d1fdfa3e481a1089c 100644
--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
@@ -50,7 +50,7 @@ DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_ = $(NORMAL_WEBCORE_FRAMEWORKS
DYLIB_INSTALL_NAME_BASE_WK_RELOCATABLE_FRAMEWORKS_YES = @loader_path/../../../;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
--HEADER_SEARCH_PATHS = Source Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include Source/third_party/boringssl/src/include Source/third_party/libyuv/include Source/third_party/usrsctp Source/third_party/usrsctp/usrsctplib Source/third_party/usrsctp/usrsctplib/usrsctplib Source/webrtc/sdk/objc/Framework/Headers Source/webrtc/common_audio/signal_processing/include Source/webrtc/modules/audio_coding/codecs/isac/main/include Source/third_party/opus/src/celt Source/third_party/opus/src/include Source/third_party/opus/src/src Source/webrtc/modules/audio_device/mac Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet Source/webrtc/modules/audio_device/ios Source/webrtc Source/webrtc/sdk/objc Source/webrtc/sdk/objc/base Source/webrtc/sdk/objc/Framework/Classes Source/third_party/libsrtp/config Source/webrtc/sdk/objc/Framework/Classes/Common Source/webrtc/sdk/objc/Framework/Classes/Video Source/webrtc/sdk/objc/Framework/Classes/PeerConnection Source/third_party/abseil-cpp Source/third_party/libvpx/source/libvpx Source/third_party/libwebm/webm_parser/include;
-+HEADER_SEARCH_PATHS = Source Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include Source/third_party/boringssl/src/include Source/third_party/libyuv/include Source/third_party/usrsctp Source/third_party/usrsctp/usrsctplib Source/third_party/usrsctp/usrsctplib/usrsctplib Source/webrtc/sdk/objc/Framework/Headers Source/webrtc/common_audio/signal_processing/include Source/webrtc/modules/audio_coding/codecs/isac/main/include Source/third_party/opus/src/celt Source/third_party/opus/src/include Source/third_party/opus/src/src Source/webrtc/modules/audio_device/mac Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet Source/webrtc/modules/audio_device/ios Source/webrtc Source/webrtc/sdk/objc Source/webrtc/sdk/objc/base Source/webrtc/sdk/objc/Framework/Classes Source/third_party/libsrtp/config Source/webrtc/sdk/objc/Framework/Classes/Common Source/webrtc/sdk/objc/Framework/Classes/Video Source/webrtc/sdk/objc/Framework/Classes/PeerConnection Source/third_party/abseil-cpp Source/third_party/libvpx/source/libvpx Source/third_party/libwebm/webm_parser/include Source/third_party/libvpx/source/libvpx/third_party/libwebm;
+-HEADER_SEARCH_PATHS = Source Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include Source/third_party/boringssl/src/include Source/third_party/libyuv/include Source/webrtc/sdk/objc/Framework/Headers Source/webrtc/common_audio/signal_processing/include Source/webrtc/modules/audio_coding/codecs/isac/main/include Source/third_party/opus/src/celt Source/third_party/opus/src/include Source/third_party/opus/src/src Source/webrtc/modules/audio_device/mac Source/webrtc/modules/audio_device/ios Source/webrtc Source/webrtc/sdk/objc Source/webrtc/sdk/objc/base Source/webrtc/sdk/objc/Framework/Classes Source/third_party/libsrtp/config Source/webrtc/sdk/objc/Framework/Classes/Common Source/webrtc/sdk/objc/Framework/Classes/Video Source/webrtc/sdk/objc/Framework/Classes/PeerConnection Source/third_party/abseil-cpp Source/third_party/libvpx/source/libvpx Source/third_party/libwebm/webm_parser/include Source/third_party/crc32c/config Source/third_party/crc32c/include Source/third_party/crc32c/src/include;
++HEADER_SEARCH_PATHS = Source Source/third_party/libsrtp/crypto/include Source/third_party/libsrtp/include Source/third_party/boringssl/src/include Source/third_party/libyuv/include Source/webrtc/sdk/objc/Framework/Headers Source/webrtc/common_audio/signal_processing/include Source/webrtc/modules/audio_coding/codecs/isac/main/include Source/third_party/opus/src/celt Source/third_party/opus/src/include Source/third_party/opus/src/src Source/webrtc/modules/audio_device/mac Source/webrtc/modules/audio_device/ios Source/webrtc Source/webrtc/sdk/objc Source/webrtc/sdk/objc/base Source/webrtc/sdk/objc/Framework/Classes Source/third_party/libsrtp/config Source/webrtc/sdk/objc/Framework/Classes/Common Source/webrtc/sdk/objc/Framework/Classes/Video Source/webrtc/sdk/objc/Framework/Classes/PeerConnection Source/third_party/abseil-cpp Source/third_party/libvpx/source/libvpx Source/third_party/libwebm/webm_parser/include Source/third_party/crc32c/config Source/third_party/crc32c/include Source/third_party/crc32c/src/include Source/third_party/libwebm/mkvmuxer Source/third_party/libvpx/source/libvpx/third_party/libwebm;
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 e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6d0eaea03 100644
+index 4d7b343e1d78d5e66a02dbdfe1cc18747eef1de7..c24705abe9b37c66b0d2f4f4de8be1f453bd72a9 100644
--- a/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
+++ b/Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
@@ -6,6 +6,20 @@
@@ -1924,9 +1925,9 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
+/* End PBXAggregateTarget section */
+
/* Begin PBXBuildFile section */
- 410091CF242CFD6500C5EDA2 /* internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 41A391FA1EFC493000C4516A /* internal.h */; };
- 410091D2242CFF6F00C5EDA2 /* gcm_nohw.c in Sources */ = {isa = PBXBuildFile; fileRef = 410091D0242CFD8200C5EDA2 /* gcm_nohw.c */; };
-@@ -4529,6 +4543,9 @@
+ 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, ); }; };
+@@ -4659,6 +4673,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 */; };
@@ -1936,7 +1937,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
-@@ -4779,6 +4796,13 @@
+@@ -4902,6 +4919,13 @@
remoteGlobalIDString = DDF30D0527C5C003006A526F;
remoteInfo = absl;
};
@@ -1950,7 +1951,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
-@@ -9558,6 +9582,9 @@
+@@ -9804,6 +9828,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>"; };
@@ -1960,7 +1961,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
FB39D0D11200F0E300088E69 /* libwebrtc.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwebrtc.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
-@@ -16876,6 +16903,7 @@
+@@ -17390,6 +17417,7 @@
isa = PBXGroup;
children = (
CDFD2F9224C4B2F90048DAC3 /* common */,
@@ -1968,7 +1969,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
CDEBB19224C0191800ADBD44 /* webm_parser */,
);
path = libwebm;
-@@ -17343,6 +17371,16 @@
+@@ -17844,6 +17872,16 @@
path = include;
sourceTree = "<group>";
};
@@ -1985,7 +1986,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
FB39D06E1200ED9200088E69 = {
isa = PBXGroup;
children = (
-@@ -20024,6 +20062,7 @@
+@@ -20566,6 +20604,7 @@
DDF30CFA27C5A98F006A526F /* PBXBuildRule */,
);
dependencies = (
@@ -1993,7 +1994,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
DD2E76E827C6B69A00F2A74C /* PBXTargetDependency */,
CDEBB4CC24C01AB400ADBD44 /* PBXTargetDependency */,
411ED040212E0811004320BA /* PBXTargetDependency */,
-@@ -20084,6 +20123,7 @@
+@@ -20624,6 +20663,7 @@
41F77D15215BE45E00E72967 /* yasm */,
CDEBB11824C0187400ADBD44 /* webm */,
DDF30D0527C5C003006A526F /* absl */,
@@ -2001,7 +2002,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
);
};
/* End PBXProject section */
-@@ -20217,6 +20257,23 @@
+@@ -20757,6 +20797,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";
};
@@ -2025,17 +2026,17 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
-@@ -21787,6 +21844,9 @@
- 417953DB216983910028266B /* metrics.cc in Sources */,
+@@ -22345,6 +22402,9 @@
5CDD865E1E43B8B500621E92 /* min_max_operations.c in Sources */,
4189395B242A71F5007FDC41 /* min_video_bitrate_experiment.cc in Sources */,
+ 41B8D8FB28CB85CB00E5FA37 /* missing_mandatory_parameter_cause.cc in Sources */,
+ F3B7819A24C7CC5200FCB122 /* mkvmuxer.cc in Sources */,
+ F3B7819924C7CC5200FCB122 /* mkvmuxerutil.cc in Sources */,
+ F3B7819B24C7CC5200FCB122 /* mkvwriter.cc in Sources */,
4131C387234B957D0028A615 /* moving_average.cc in Sources */,
41FCBB1521B1F7AA00A5DF27 /* moving_average.cc in Sources */,
5CD286101E6A64C90094FDC8 /* moving_max.cc in Sources */,
-@@ -22471,6 +22531,11 @@
+@@ -23062,6 +23122,11 @@
target = DDF30D0527C5C003006A526F /* absl */;
targetProxy = DD2E76E727C6B69A00F2A74C /* PBXContainerItemProxy */;
};
@@ -2047,7 +2048,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
-@@ -22719,6 +22784,27 @@
+@@ -23268,6 +23333,27 @@
};
name = Production;
};
@@ -2075,7 +2076,7 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
FB39D0711200ED9200088E69 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */;
-@@ -22851,6 +22937,16 @@
+@@ -23390,6 +23476,16 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Production;
};
@@ -2093,10 +2094,10 @@ index e4b94b59216277aae01696e6d4846abf8f287dce..8cbe085788ba582ee4615faef20769b6
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/Source/WTF/Scripts/Preferences/WebPreferences.yaml b/Source/WTF/Scripts/Preferences/WebPreferences.yaml
-index 909094b0ff2cc7273f3d4ac96cf4498f0d0c6e50..51958e6eba239952f834978515b6a3c72a2a52dd 100644
+index 464f6bfc8e91b411509d22412fa278603a5c5ac7..7c669e977fe456ecd649d02cbb2a8105380a8962 100644
--- a/Source/WTF/Scripts/Preferences/WebPreferences.yaml
+++ b/Source/WTF/Scripts/Preferences/WebPreferences.yaml
-@@ -977,7 +977,7 @@ InspectorStartsAttached:
+@@ -957,7 +957,7 @@ InspectorStartsAttached:
exposed: [ WebKit ]
defaultValue:
WebKit:
@@ -2105,7 +2106,7 @@ index 909094b0ff2cc7273f3d4ac96cf4498f0d0c6e50..51958e6eba239952f834978515b6a3c7
InspectorWindowFrame:
type: String
-@@ -1736,6 +1736,17 @@ PluginsEnabled:
+@@ -1759,6 +1759,17 @@ PluginsEnabled:
WebCore:
default: false
@@ -2124,10 +2125,10 @@ index 909094b0ff2cc7273f3d4ac96cf4498f0d0c6e50..51958e6eba239952f834978515b6a3c7
type: bool
humanReadableName: "Private Click Measurement"
diff --git a/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml b/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
-index 3b939d4dc4783e89183439a8a245b0311f0957d1..1258e9d46afb9e008009dd60f23f1f74ec79159c 100644
+index d81ce0249cdfae29b9dcfd98153cdbcafd04d01c..15b970e4978a1403f2949a4b1ebddadc55c99c2d 100644
--- a/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
+++ b/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
-@@ -539,7 +539,7 @@ CrossOriginOpenerPolicyEnabled:
+@@ -601,7 +601,7 @@ CrossOriginOpenerPolicyEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -2136,7 +2137,7 @@ index 3b939d4dc4783e89183439a8a245b0311f0957d1..1258e9d46afb9e008009dd60f23f1f74
WebCore:
default: false
-@@ -872,6 +872,7 @@ IsThirdPartyCookieBlockingDisabled:
+@@ -985,6 +985,7 @@ IsThirdPartyCookieBlockingDisabled:
WebCore:
default: false
@@ -2144,7 +2145,7 @@ index 3b939d4dc4783e89183439a8a245b0311f0957d1..1258e9d46afb9e008009dd60f23f1f74
LazyIframeLoadingEnabled:
type: bool
humanReadableName: "Lazy iframe loading"
-@@ -880,9 +881,9 @@ LazyIframeLoadingEnabled:
+@@ -993,9 +994,9 @@ LazyIframeLoadingEnabled:
WebKitLegacy:
default: true
WebKit:
@@ -2156,7 +2157,7 @@ index 3b939d4dc4783e89183439a8a245b0311f0957d1..1258e9d46afb9e008009dd60f23f1f74
LazyImageLoadingEnabled:
type: bool
-@@ -941,9 +942,9 @@ MaskWebGLStringsEnabled:
+@@ -1054,9 +1055,9 @@ MaskWebGLStringsEnabled:
WebKitLegacy:
default: true
WebKit:
@@ -2166,9 +2167,9 @@ index 3b939d4dc4783e89183439a8a245b0311f0957d1..1258e9d46afb9e008009dd60f23f1f74
- default: true
+ default: false
- # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
- MediaCapabilitiesExtensionsEnabled:
-@@ -1462,7 +1463,7 @@ SpeechRecognitionEnabled:
+ MasonryEnabled:
+ type: bool
+@@ -1621,7 +1622,7 @@ SpeechRecognitionEnabled:
WebKitLegacy:
default: false
WebKit:
@@ -2177,7 +2178,7 @@ index 3b939d4dc4783e89183439a8a245b0311f0957d1..1258e9d46afb9e008009dd60f23f1f74
default: false
WebCore:
default: false
-@@ -1577,6 +1578,7 @@ UseGPUProcessForDisplayCapture:
+@@ -1749,6 +1750,7 @@ UseGPUProcessForDisplayCapture:
WebKit:
default: true
@@ -2185,7 +2186,7 @@ index 3b939d4dc4783e89183439a8a245b0311f0957d1..1258e9d46afb9e008009dd60f23f1f74
UseGPUProcessForWebGLEnabled:
type: bool
humanReadableName: "GPU Process: WebGL"
-@@ -1587,7 +1589,7 @@ UseGPUProcessForWebGLEnabled:
+@@ -1759,7 +1761,7 @@ UseGPUProcessForWebGLEnabled:
default: false
WebKit:
"ENABLE(GPU_PROCESS_BY_DEFAULT) && PLATFORM(IOS_FAMILY) && !HAVE(UIKIT_WEBKIT_INTERNALS)": true
@@ -2195,10 +2196,10 @@ index 3b939d4dc4783e89183439a8a245b0311f0957d1..1258e9d46afb9e008009dd60f23f1f74
WebCore:
"ENABLE(GPU_PROCESS_BY_DEFAULT) && PLATFORM(IOS_FAMILY) && !HAVE(UIKIT_WEBKIT_INTERNALS)": true
diff --git a/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml b/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
-index 4ab12fa7bb55377e66167b4f5686abfce6b3e297..27fa81ae823bc360964422bfea153f9253867075 100644
+index 5ac46723fa7b3c5447c26eab2f669e8f00282bca..aa398a4e7811e5272372a96818ba9dfe7d82a625 100644
--- a/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
+++ b/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
-@@ -979,6 +979,7 @@ UseCGDisplayListsForDOMRendering:
+@@ -1136,6 +1136,7 @@ UseCGDisplayListsForDOMRendering:
WebKit:
default: true
@@ -2206,7 +2207,7 @@ index 4ab12fa7bb55377e66167b4f5686abfce6b3e297..27fa81ae823bc360964422bfea153f92
UseGPUProcessForCanvasRenderingEnabled:
type: bool
humanReadableName: "GPU Process: Canvas Rendering"
-@@ -989,7 +990,7 @@ UseGPUProcessForCanvasRenderingEnabled:
+@@ -1146,7 +1147,7 @@ UseGPUProcessForCanvasRenderingEnabled:
defaultValue:
WebKit:
"ENABLE(GPU_PROCESS_BY_DEFAULT)": true
@@ -2216,10 +2217,10 @@ index 4ab12fa7bb55377e66167b4f5686abfce6b3e297..27fa81ae823bc360964422bfea153f92
UseGPUProcessForMediaEnabled:
diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
-index 8863f57db1e6a6c21b61fe7598a39806d1be4028..30ebe6a4609540551c64fd0d7ec49a6afda54338 100644
+index 2a22ed8c3ccd02d8463b2808a0aba322db54f7e5..30f4b61687ff570053d3aaa816323df94f88bc3f 100644
--- a/Source/WTF/wtf/PlatformEnable.h
+++ b/Source/WTF/wtf/PlatformEnable.h
-@@ -416,7 +416,7 @@
+@@ -412,7 +412,7 @@
#endif
#if !defined(ENABLE_ORIENTATION_EVENTS)
@@ -2238,7 +2239,7 @@ index 8863f57db1e6a6c21b61fe7598a39806d1be4028..30ebe6a4609540551c64fd0d7ec49a6a
#if !defined(ENABLE_TOUCH_ACTION_REGIONS)
diff --git a/Source/WTF/wtf/PlatformEnableCocoa.h b/Source/WTF/wtf/PlatformEnableCocoa.h
-index 37a6ac6ffce784d6663dcbe08b948eb63e22e572..c7921895e3700e28a4d625647f5beb825877a265 100644
+index 8bda096be6b9abf155f7473d11a4141cf49ace72..dcbd25e3f1c02709b38e4c8b0bb3b9b91c3c83a1 100644
--- a/Source/WTF/wtf/PlatformEnableCocoa.h
+++ b/Source/WTF/wtf/PlatformEnableCocoa.h
@@ -255,7 +255,7 @@
@@ -2251,10 +2252,10 @@ index 37a6ac6ffce784d6663dcbe08b948eb63e22e572..c7921895e3700e28a4d625647f5beb82
#endif
diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h
-index 19d254d65173b8d0c373bb800cd0d09dae119c9f..27e9d7283d9250643c55a27a80cb0ca851d45ae5 100644
+index cc621805b4759e30fce1dc9610e57b85da7b5927..86ce0ef2f0880f6cb5d701dd681e6d7d5b1929e8 100644
--- a/Source/WTF/wtf/PlatformHave.h
+++ b/Source/WTF/wtf/PlatformHave.h
-@@ -422,7 +422,7 @@
+@@ -418,7 +418,7 @@
#define HAVE_FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT 1
#endif
@@ -2263,7 +2264,7 @@ index 19d254d65173b8d0c373bb800cd0d09dae119c9f..27e9d7283d9250643c55a27a80cb0ca8
#define HAVE_OS_DARK_MODE_SUPPORT 1
#endif
-@@ -1302,7 +1302,8 @@
+@@ -1309,7 +1309,8 @@
#endif
#if PLATFORM(MAC)
@@ -2274,10 +2275,10 @@ index 19d254d65173b8d0c373bb800cd0d09dae119c9f..27e9d7283d9250643c55a27a80cb0ca8
#if (!defined(HAVE_LOCKDOWN_MODE_PDF_ADDITIONS) && \
diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make
-index 3fed02ead342e0beaf5297ea2f1af76d7f64325e..8e02fef515ebecc187c8668cec9ba5c745eec029 100644
+index 756a2d80d4672c2a65515f58ca398f46584ac97f..0cabee776961eab326bb0ee7e313384f6131b835 100644
--- a/Source/WebCore/DerivedSources.make
+++ b/Source/WebCore/DerivedSources.make
-@@ -995,6 +995,10 @@ JS_BINDING_IDLS := \
+@@ -1029,6 +1029,10 @@ JS_BINDING_IDLS := \
$(WebCore)/dom/Slotable.idl \
$(WebCore)/dom/StaticRange.idl \
$(WebCore)/dom/StringCallback.idl \
@@ -2288,10 +2289,10 @@ index 3fed02ead342e0beaf5297ea2f1af76d7f64325e..8e02fef515ebecc187c8668cec9ba5c7
$(WebCore)/dom/Text.idl \
$(WebCore)/dom/TextDecoder.idl \
$(WebCore)/dom/TextDecoderStream.idl \
-@@ -1543,9 +1547,6 @@ JS_BINDING_IDLS := \
- ADDITIONAL_BINDING_IDLS = \
- DocumentTouch.idl \
+@@ -1569,9 +1573,6 @@ ADDITIONAL_BINDING_IDLS = \
GestureEvent.idl \
+ Internals+Additions.idl \
+ InternalsAdditions.idl \
- Touch.idl \
- TouchEvent.idl \
- TouchList.idl \
@@ -2329,7 +2330,7 @@ diff --git a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm b/So
index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d768ace22 100644
--- a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
+++ b/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
-@@ -198,6 +198,7 @@ NS_ASSUME_NONNULL_BEGIN
+@@ -198,6 +198,7 @@ - (void)sendEndIfNeeded
- (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidChange:(BOOL)available
{
@@ -2337,7 +2338,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
if (available || !_task)
-@@ -211,6 +212,7 @@ NS_ASSUME_NONNULL_BEGIN
+@@ -211,6 +212,7 @@ - (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidC
- (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTranscription:(SFTranscription *)transcription
{
@@ -2345,7 +2346,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
[self sendSpeechStartIfNeeded];
-@@ -219,6 +221,7 @@ NS_ASSUME_NONNULL_BEGIN
+@@ -219,6 +221,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTran
- (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecognition:(SFSpeechRecognitionResult *)recognitionResult
{
@@ -2353,7 +2354,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
[self callbackWithTranscriptions:recognitionResult.transcriptions isFinal:YES];
-@@ -230,6 +233,7 @@ NS_ASSUME_NONNULL_BEGIN
+@@ -230,6 +233,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecogniti
- (void)speechRecognitionTaskWasCancelled:(SFSpeechRecognitionTask *)task
{
@@ -2362,10 +2363,10 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
[self sendSpeechEndIfNeeded];
diff --git a/Source/WebCore/PlatformWPE.cmake b/Source/WebCore/PlatformWPE.cmake
-index 7fc5555344b50da4ca98634b93afda82d27723fb..1557731c79df84aecc9d17297dc0107fe96c02a7 100644
+index 9741a79be98a93c7b6151d762af343f6bbd14bde..029fb407b941a38c3d0f5d0e4d293666f7d7c7f3 100644
--- a/Source/WebCore/PlatformWPE.cmake
+++ b/Source/WebCore/PlatformWPE.cmake
-@@ -49,6 +49,7 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
+@@ -50,6 +50,7 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
platform/graphics/wayland/PlatformDisplayWayland.h
platform/graphics/wayland/WlUniquePtr.h
@@ -2374,10 +2375,10 @@ index 7fc5555344b50da4ca98634b93afda82d27723fb..1557731c79df84aecc9d17297dc0107f
set(CSS_VALUE_PLATFORM_DEFINES "HAVE_OS_DARK_MODE_SUPPORT=1")
diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt
-index 9d1777db8db0f19e0bf93f027878d882e0b4e268..97c4a6ac951e302086d8e91ad431bcea26607e09 100644
+index 4ec42d4ecf9770f25339ff659c4579828004ac6d..80375f3419247bbabf14b383df5c275c7ee3b1f8 100644
--- a/Source/WebCore/SourcesCocoa.txt
+++ b/Source/WebCore/SourcesCocoa.txt
-@@ -641,3 +641,9 @@ platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify
+@@ -650,3 +650,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
@@ -2388,7 +2389,7 @@ index 9d1777db8db0f19e0bf93f027878d882e0b4e268..97c4a6ac951e302086d8e91ad431bcea
+JSTouchList.cpp
+// Playwright end
diff --git a/Source/WebCore/SourcesGTK.txt b/Source/WebCore/SourcesGTK.txt
-index a2504495796d1d625afd0092ffd21739be30470f..64be77d2ed6ef550e1f7d6779516187b471d1026 100644
+index 723e7782ff80a3dc839d96aaf77864e63834e1d9..2e743b22e9dc5205ab41844f2d325714ff8e959e 100644
--- a/Source/WebCore/SourcesGTK.txt
+++ b/Source/WebCore/SourcesGTK.txt
@@ -138,3 +138,10 @@ platform/xdg/MIMETypeRegistryXdg.cpp
@@ -2403,7 +2404,7 @@ index a2504495796d1d625afd0092ffd21739be30470f..64be77d2ed6ef550e1f7d6779516187b
+JSSpeechSynthesisEventInit.cpp
+// Playwright: end.
diff --git a/Source/WebCore/SourcesWPE.txt b/Source/WebCore/SourcesWPE.txt
-index fe289785470b37d3bb774c1891a829f5fffa7562..8ef19ee128531a523f72cb6fe5f7b386200a5497 100644
+index ec0ab70ea90648a5d72afa35946735c747f1c2d2..b3d82fa0cd4e7e38c700bb11dd1218cb92f0de7e 100644
--- a/Source/WebCore/SourcesWPE.txt
+++ b/Source/WebCore/SourcesWPE.txt
@@ -43,6 +43,8 @@ editing/libwpe/EditorLibWPE.cpp
@@ -2415,7 +2416,7 @@ index fe289785470b37d3bb774c1891a829f5fffa7562..8ef19ee128531a523f72cb6fe5f7b386
page/linux/ResourceUsageOverlayLinux.cpp
page/linux/ResourceUsageThreadLinux.cpp
-@@ -96,8 +98,19 @@ platform/text/LocaleICU.cpp
+@@ -95,8 +97,19 @@ platform/text/LocaleICU.cpp
platform/unix/LoggingUnix.cpp
@@ -2448,10 +2449,10 @@ index a5938677622935e2c6ca3ed76c3a12d0eb7e04a7..cea2a0e330cfdf01b172b3f6acc60acb
__ZN7WebCore14DocumentLoaderD2Ev
__ZN7WebCore14DocumentLoader17clearMainResourceEv
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c98e71c64e 100644
+index dbc69643468007f535fae8ffb9529f22a79e3f19..fa5c07bf98ed61d8f00be1606b92f235892ba648 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
-@@ -5599,6 +5599,13 @@
+@@ -5682,6 +5682,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, ); }; };
@@ -2465,7 +2466,7 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9
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, ); }; };
-@@ -18111,6 +18118,14 @@
+@@ -18405,6 +18412,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>"; };
@@ -2480,7 +2481,7 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9
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>"; };
-@@ -24856,6 +24871,11 @@
+@@ -25239,6 +25254,11 @@
BC4A5324256055590028C592 /* TextDirectionSubmenuInclusionBehavior.h */,
2D4F96F11A1ECC240098BF88 /* TextIndicator.cpp */,
2D4F96F21A1ECC240098BF88 /* TextIndicator.h */,
@@ -2492,7 +2493,7 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9
F48570A42644C76D00C05F71 /* TranslationContextMenuInfo.h */,
F4E1965F21F26E4E00285078 /* UndoItem.cpp */,
2ECDBAD521D8906300F00ECD /* UndoItem.h */,
-@@ -30712,6 +30732,8 @@
+@@ -31145,6 +31165,8 @@
29E4D8DF16B0940F00C84704 /* PlatformSpeechSynthesizer.h */,
1AD8F81A11CAB9E900E93E54 /* PlatformStrategies.cpp */,
1AD8F81911CAB9E900E93E54 /* PlatformStrategies.h */,
@@ -2501,7 +2502,7 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9
0FD7C21D23CE41E30096D102 /* PlatformWheelEvent.cpp */,
935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */,
BCBB8AB513F1AFB000734DF0 /* PODInterval.h */,
-@@ -33072,6 +33094,7 @@
+@@ -33611,6 +33633,7 @@
AD6E71AB1668899D00320C13 /* DocumentSharedObjectPool.h */,
6BDB5DC1227BD3B800919770 /* DocumentStorageAccess.cpp */,
6BDB5DC0227BD3B800919770 /* DocumentStorageAccess.h */,
@@ -2509,7 +2510,7 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9
7CE7FA5B1EF882300060C9D6 /* DocumentTouch.cpp */,
7CE7FA591EF882300060C9D6 /* DocumentTouch.h */,
A8185F3209765765005826D9 /* DocumentType.cpp */,
-@@ -37393,6 +37416,8 @@
+@@ -37966,6 +37989,8 @@
1AD8F81B11CAB9E900E93E54 /* PlatformStrategies.h in Headers */,
0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */,
074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */,
@@ -2518,7 +2519,7 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9
CDD08ABD277E542600EA3755 /* PlatformTrackConfiguration.h in Headers */,
CD1F9B022700323D00617EB6 /* PlatformVideoColorPrimaries.h in Headers */,
CD1F9B01270020B700617EB6 /* PlatformVideoColorSpace.h in Headers */,
-@@ -38546,6 +38571,7 @@
+@@ -39140,6 +39165,7 @@
0F54DD081881D5F5003EEDBB /* Touch.h in Headers */,
71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */,
0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */,
@@ -2526,16 +2527,16 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9
0F54DD0A1881D5F5003EEDBB /* TouchList.h in Headers */,
070334D71459FFD5008D8D45 /* TrackBase.h in Headers */,
BE88E0C21715CE2600658D98 /* TrackListBase.h in Headers */,
-@@ -39491,6 +39517,7 @@
+@@ -40117,6 +40143,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 */,
- 51A4BB0A1954D61600FA5C2E /* Gamepad.cpp in Sources */,
-@@ -39568,6 +39595,9 @@
- C1692DD223D23ABD006E88F7 /* SystemBattery.mm in Sources */,
+@@ -40189,6 +40216,9 @@
+ 329C0C2328BD96D600F187D2 /* TagName.cpp in Sources */,
CE88EE262414467B007F29C2 /* TextAlternativeWithRange.mm in Sources */,
51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
+ F050E16A23AD660C0011CE47 /* Touch.cpp in Sources */,
@@ -2545,10 +2546,10 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9
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 12f2f786ac833ec6b856b163342c166341cad932..38b335492530db8eec03686e5d2d5b745e1a0c6c 100644
+index 23debc73e35748078662e25801a34a3eb595931b..21a031bddda117ca732014f3e60451a08a825ba3 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp
-@@ -61,6 +61,7 @@
+@@ -62,6 +62,7 @@
#include "HTMLParserIdioms.h"
#include "HTMLTextAreaElement.h"
#include "HitTestResult.h"
@@ -2556,7 +2557,7 @@ index 12f2f786ac833ec6b856b163342c166341cad932..38b335492530db8eec03686e5d2d5b74
#include "LocalizedStrings.h"
#include "MathMLNames.h"
#include "NodeList.h"
-@@ -3758,9 +3759,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const
+@@ -3644,9 +3645,14 @@ AccessibilityObjectInclusion AccessibilityObject::defaultObjectInclusion() const
if (roleValue() == AccessibilityRole::ApplicationDialog)
return AccessibilityObjectInclusion::IncludeObject;
@@ -2574,7 +2575,7 @@ index 12f2f786ac833ec6b856b163342c166341cad932..38b335492530db8eec03686e5d2d5b74
{
AXComputedObjectAttributeCache* attributeCache = nullptr;
diff --git a/Source/WebCore/accessibility/AccessibilityObjectInterface.h b/Source/WebCore/accessibility/AccessibilityObjectInterface.h
-index 8aaa2178da795e5586abd0792b43a0671714c34d..51ed0a4b014f32bc90d299656eba206ec1f8ccd3 100644
+index 1cb7bbf79d54c297ee4f03c41d42432160741572..64e5b7bb5a9bd0cc865af6e41e05705cbae149a6 100644
--- a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
+++ b/Source/WebCore/accessibility/AccessibilityObjectInterface.h
@@ -57,7 +57,7 @@ typedef const struct __AXTextMarkerRange* AXTextMarkerRangeRef;
@@ -2586,33 +2587,33 @@ index 8aaa2178da795e5586abd0792b43a0671714c34d..51ed0a4b014f32bc90d299656eba206e
#endif
namespace PAL {
-@@ -1516,6 +1516,8 @@ private:
+@@ -1430,6 +1430,8 @@ private:
COMPtr<AccessibilityObjectWrapper> m_wrapper;
#elif USE(ATSPI)
RefPtr<AccessibilityObjectAtspi> m_wrapper;
+#else
+ RefPtr<AccessibilityObjectWrapper> m_wrapper;
#endif
- virtual void detachPlatformWrapper(AccessibilityDetachmentType) = 0;
};
+
diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
-index 472716d33f0c0f105b1c81a06fba0e60a4260d76..383837148b8b7a5eb39bba73bb505a0f7b0a0a7c 100644
+index d4f0ba7bb656c6410145bdeb81a9501d7b987208..8e795cc1b065612f39f153c2141571f2ff6cf1ab 100644
--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
-@@ -158,6 +158,8 @@ namespace WebCore {
- macro(DecompressionStreamDecoder) \
+@@ -161,6 +161,8 @@ namespace WebCore {
macro(DecompressionStreamTransform) \
macro(DelayNode) \
+ macro(DeprecationReportBody) \
+ macro(DeviceMotionEvent) \
+ macro(DeviceOrientationEvent) \
macro(DocumentTimeline) \
macro(DynamicsCompressorNode) \
- macro(ExtendableEvent) \
-diff --git a/Source/WebCore/css/MediaQueryEvaluator.cpp b/Source/WebCore/css/MediaQueryEvaluator.cpp
-index 871eb7cc9333921c4848b909786de27d4b2827b5..937637c8eed766ceedb0a698376c8c92ebf93d13 100644
---- a/Source/WebCore/css/MediaQueryEvaluator.cpp
-+++ b/Source/WebCore/css/MediaQueryEvaluator.cpp
-@@ -489,8 +489,12 @@ static bool scanEvaluate(CSSValue* value, const CSSToLengthConversionData&, Fram
+ macro(ElementInternals) \
+diff --git a/Source/WebCore/css/LegacyMediaQueryEvaluator.cpp b/Source/WebCore/css/LegacyMediaQueryEvaluator.cpp
+index c98b714d588e86303317e31ab3c97e8bd54da48f..98b28c71c8a802af492351485fafc1d70b03f22d 100644
+--- a/Source/WebCore/css/LegacyMediaQueryEvaluator.cpp
++++ b/Source/WebCore/css/LegacyMediaQueryEvaluator.cpp
+@@ -453,8 +453,12 @@ static bool scanEvaluate(CSSValue* value, const CSSToLengthConversionData&, Fram
return primitiveValue->valueID() == CSSValueProgressive;
}
@@ -2626,7 +2627,7 @@ index 871eb7cc9333921c4848b909786de27d4b2827b5..937637c8eed766ceedb0a698376c8c92
auto* primitiveValue = dynamicDowncast<CSSPrimitiveValue>(value);
if (!primitiveValue)
return false;
-@@ -874,7 +878,11 @@ static bool prefersContrastEvaluate(CSSValue* value, const CSSToLengthConversion
+@@ -838,7 +842,11 @@ static bool prefersContrastEvaluate(CSSValue* value, const CSSToLengthConversion
static bool prefersReducedMotionEvaluate(CSSValue* value, const CSSToLengthConversionData&, Frame& frame, MediaFeaturePrefix)
{
bool userPrefersReducedMotion = false;
@@ -2639,7 +2640,7 @@ index 871eb7cc9333921c4848b909786de27d4b2827b5..937637c8eed766ceedb0a698376c8c92
switch (frame.settings().forcedPrefersReducedMotionAccessibilityValue()) {
case ForcedAccessibilityValue::On:
userPrefersReducedMotion = true;
-@@ -887,6 +895,7 @@ static bool prefersReducedMotionEvaluate(CSSValue* value, const CSSToLengthConve
+@@ -851,6 +859,7 @@ static bool prefersReducedMotionEvaluate(CSSValue* value, const CSSToLengthConve
#endif
break;
}
@@ -2648,10 +2649,10 @@ index 871eb7cc9333921c4848b909786de27d4b2827b5..937637c8eed766ceedb0a698376c8c92
if (!value)
return userPrefersReducedMotion;
diff --git a/Source/WebCore/dom/DataTransfer.cpp b/Source/WebCore/dom/DataTransfer.cpp
-index e252c8972cdff190f99ec8c4dc5251b23080b428..82dc8f09c5d94ce32d97bd5815475adb9ef8ec7a 100644
+index e4c4e919c88f824e1e087819e35288f37eb7081a..8a70ed2258cd535924740de348c8f2519b2e8b33 100644
--- a/Source/WebCore/dom/DataTransfer.cpp
+++ b/Source/WebCore/dom/DataTransfer.cpp
-@@ -496,6 +496,14 @@ Ref<DataTransfer> DataTransfer::createForDrag(const Document& document)
+@@ -503,6 +503,14 @@ Ref<DataTransfer> DataTransfer::createForDrag(const Document& document)
return adoptRef(*new DataTransfer(StoreMode::ReadWrite, Pasteboard::createForDragAndDrop(PagePasteboardContext::create(document.pageID())), Type::DragAndDropData));
}
@@ -2667,7 +2668,7 @@ index e252c8972cdff190f99ec8c4dc5251b23080b428..82dc8f09c5d94ce32d97bd5815475adb
{
auto dataTransfer = adoptRef(*new DataTransfer(StoreMode::ReadWrite, makeUnique<StaticPasteboard>(), Type::DragAndDropData));
diff --git a/Source/WebCore/dom/DataTransfer.h b/Source/WebCore/dom/DataTransfer.h
-index fbcdea3855b8a42ab5f69ba06839b78857abb1f1..a5686a98b117836df7656d4360056be8ef2a2878 100644
+index d976b9e0003c58f6efa4d42bec14b62a1b8cbba9..12f58b462bafd805274d9cddc4c62ab8b18d7a22 100644
--- a/Source/WebCore/dom/DataTransfer.h
+++ b/Source/WebCore/dom/DataTransfer.h
@@ -90,6 +90,9 @@ public:
@@ -2717,7 +2718,7 @@ index 9043052540b13d8120fb641de6337af46c3b36ef..a0f89e64b64640d2d4dbc14734868c4d
] interface DeviceOrientationEvent : Event {
readonly attribute unrestricted double? alpha;
diff --git a/Source/WebCore/dom/Document+PointerLock.idl b/Source/WebCore/dom/Document+PointerLock.idl
-index 898027004b8553cac8130541026af70ffb5ee073..883d6a7df7a164625037cd8cee95c8fe4312b9e8 100644
+index 2e9c9fda6a920cd8904432bd1bdbfbf32d01c085..2fd33597e905b0544665ff765f310945305a0c4a 100644
--- a/Source/WebCore/dom/Document+PointerLock.idl
+++ b/Source/WebCore/dom/Document+PointerLock.idl
@@ -25,6 +25,7 @@
@@ -2727,7 +2728,7 @@ index 898027004b8553cac8130541026af70ffb5ee073..883d6a7df7a164625037cd8cee95c8fe
+ EnabledBySetting=PointerLockEnabled,
Conditional=POINTER_LOCK
] partial interface Document {
- [NotEnumerable] attribute EventHandler onpointerlockchange; // FIXME: Should be enumerable.
+ attribute EventHandler onpointerlockchange;
diff --git a/Source/WebCore/dom/DocumentOrShadowRoot+PointerLock.idl b/Source/WebCore/dom/DocumentOrShadowRoot+PointerLock.idl
index 9b8dbfc15ce078702321abcd6c0e636df7a60510..2956f7098e87af10ab8f5584b456ce9a6d432a20 100644
--- a/Source/WebCore/dom/DocumentOrShadowRoot+PointerLock.idl
@@ -2753,10 +2754,10 @@ index f27718c1e2b8cd0a8075e556d4cdba7d9ae8fc54..2b61721594e5435845f3151e0de345e9
] partial interface Element {
undefined requestPointerLock();
diff --git a/Source/WebCore/dom/PointerEvent.cpp b/Source/WebCore/dom/PointerEvent.cpp
-index 4433bc1c4a055d0a8386fd01e7e9d44b99425516..a8a43743370f3a00bed40a206ae98a5cc50bc7c7 100644
+index 936f9913c28269fa1a425b87f8458328e1a7d715..3e7bb61930d8f0f2f46b881968ff04d7bc6b32f1 100644
--- a/Source/WebCore/dom/PointerEvent.cpp
+++ b/Source/WebCore/dom/PointerEvent.cpp
-@@ -114,4 +114,61 @@ EventInterface PointerEvent::eventInterface() const
+@@ -116,4 +116,61 @@ EventInterface PointerEvent::eventInterface() const
return PointerEventInterfaceType;
}
@@ -2805,7 +2806,7 @@ index 4433bc1c4a055d0a8386fd01e7e9d44b99425516..a8a43743370f3a00bed40a206ae98a5c
+}
+
+PointerEvent::PointerEvent(const AtomString& type, const PlatformTouchEvent& event, IsCancelable isCancelable, unsigned index, bool isPrimary, Ref<WindowProxy>&& view)
-+ : MouseEvent(type, typeCanBubble(type), isCancelable, typeIsComposed(type), event.timestamp().approximateMonotonicTime(), WTFMove(view), 0, event.touchPoints().at(index).pos(), event.touchPoints().at(index).pos(), { }, event.modifiers(), buttonForType(type), buttonsForType(type), nullptr, 0, 0, IsSimulated::No, IsTrusted::Yes)
++ : MouseEvent(type, typeCanBubble(type), isCancelable, typeIsComposed(type), event.timestamp().approximateMonotonicTime(), WTFMove(view), 0, event.touchPoints().at(index).pos(), event.touchPoints().at(index).pos(), 0, 0, event.modifiers(), buttonForType(type), buttonsForType(type), nullptr, 0, 0, IsSimulated::No, IsTrusted::Yes)
+ , m_pointerId(2)
+ , m_width(2 * event.touchPoints().at(index).radiusX())
+ , m_height(2 * event.touchPoints().at(index).radiusY())
@@ -2850,7 +2851,7 @@ index 7542bab569d49879f0eb460520738b3da37116f6..17c92229cc596bc80a718911b74737d3
#endif
diff --git a/Source/WebCore/editing/libwpe/EditorLibWPE.cpp b/Source/WebCore/editing/libwpe/EditorLibWPE.cpp
-index e060d8178fe501a0c6d47d4affaf4d422d15e358..5064f6ae31464a109b3dad0fc69e186661e274d9 100644
+index c70485a62c660838229d40db14bcb2786feb7202..8212b5df96b00ba79a84c122993b30e849fa6c30 100644
--- a/Source/WebCore/editing/libwpe/EditorLibWPE.cpp
+++ b/Source/WebCore/editing/libwpe/EditorLibWPE.cpp
@@ -34,6 +34,7 @@
@@ -2877,7 +2878,7 @@ index e060d8178fe501a0c6d47d4affaf4d422d15e358..5064f6ae31464a109b3dad0fc69e1866
#endif // USE(LIBWPE)
diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp
-index c43310a5628456dddbdb27d5496c580854d40758..c962f3b962e28ef82baa1bf3da377e26b983ba77 100644
+index 0784b3bc15534d4ba0db1c02ec1a2dd4bc37ed15..0075c58ad1c02e0f8cf697d63ac2df4fa6286994 100644
--- a/Source/WebCore/html/FileInputType.cpp
+++ b/Source/WebCore/html/FileInputType.cpp
@@ -38,6 +38,7 @@
@@ -2888,7 +2889,7 @@ index c43310a5628456dddbdb27d5496c580854d40758..c962f3b962e28ef82baa1bf3da377e26
#include "LocalizedStrings.h"
#include "MIMETypeRegistry.h"
#include "RenderFileUploadControl.h"
-@@ -202,6 +203,11 @@ void FileInputType::handleDOMActivateEvent(Event& event)
+@@ -205,6 +206,11 @@ void FileInputType::handleDOMActivateEvent(Event& event)
if (input.isDisabledFormControl())
return;
@@ -2901,10 +2902,10 @@ index c43310a5628456dddbdb27d5496c580854d40758..c962f3b962e28ef82baa1bf3da377e26
return;
diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp
-index 9e4515b7e7f7261f936471b81557ec96697c34e6..3b32377172112fc143b5e719122e8bf648be5b25 100644
+index d392cf514a0306ba9eb516a5cb4c92280ed13bb0..276daf6464546a451de17951d3c6773555d9ae17 100644
--- a/Source/WebCore/inspector/InspectorController.cpp
+++ b/Source/WebCore/inspector/InspectorController.cpp
-@@ -285,6 +285,8 @@ void InspectorController::disconnectFrontend(FrontendChannel& frontendChannel)
+@@ -288,6 +288,8 @@ void InspectorController::disconnectFrontend(FrontendChannel& frontendChannel)
// Unplug all instrumentations since they aren't needed now.
InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgents.get());
@@ -2913,7 +2914,7 @@ index 9e4515b7e7f7261f936471b81557ec96697c34e6..3b32377172112fc143b5e719122e8bf6
}
m_inspectorClient->frontendCountChanged(m_frontendRouter->frontendCount());
-@@ -304,6 +306,8 @@ void InspectorController::disconnectAllFrontends()
+@@ -307,6 +309,8 @@ void InspectorController::disconnectAllFrontends()
// The frontend should call setInspectorFrontendClient(nullptr) under closeWindow().
ASSERT(!m_inspectorFrontendClient);
@@ -2922,7 +2923,7 @@ index 9e4515b7e7f7261f936471b81557ec96697c34e6..3b32377172112fc143b5e719122e8bf6
if (!m_frontendRouter->hasFrontends())
return;
-@@ -392,8 +396,8 @@ void InspectorController::inspect(Node* node)
+@@ -395,8 +399,8 @@ void InspectorController::inspect(Node* node)
if (!enabled())
return;
@@ -2933,7 +2934,7 @@ index 9e4515b7e7f7261f936471b81557ec96697c34e6..3b32377172112fc143b5e719122e8bf6
ensureDOMAgent().inspect(node);
}
-@@ -534,4 +538,24 @@ void InspectorController::didComposite(Frame& frame)
+@@ -539,4 +543,24 @@ void InspectorController::didComposite(Frame& frame)
InspectorInstrumentation::didComposite(frame);
}
@@ -2959,7 +2960,7 @@ index 9e4515b7e7f7261f936471b81557ec96697c34e6..3b32377172112fc143b5e719122e8bf6
+
} // namespace WebCore
diff --git a/Source/WebCore/inspector/InspectorController.h b/Source/WebCore/inspector/InspectorController.h
-index 4d5a3859ec6a46d07d45c80a3b5870ee2ef13d36..75eb55a024a6ae3892a4fedc535bf6a647cc3bc7 100644
+index 7aeee0352e6ade8c9bfa503fc15f468d1ab4f9c9..56843a129442849e31896fdf1366abe1b55113a8 100644
--- a/Source/WebCore/inspector/InspectorController.h
+++ b/Source/WebCore/inspector/InspectorController.h
@@ -101,6 +101,10 @@ public:
@@ -2982,10 +2983,10 @@ index 4d5a3859ec6a46d07d45c80a3b5870ee2ef13d36..75eb55a024a6ae3892a4fedc535bf6a6
} // namespace WebCore
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
-index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db90855ee7a6d 100644
+index 8e79d4bdd8e36c8300a72ae5e91f873b9fc77731..17aad32435d1d878fb714ce4a81e3c7ec2188965 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
-@@ -576,6 +576,13 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i
+@@ -593,6 +593,13 @@ void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents& i
pageAgent->applyUserAgentOverride(userAgent);
}
@@ -2999,7 +3000,7 @@ index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db908
void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents& instrumentingAgents, String& media)
{
if (auto* pageAgent = instrumentingAgents.enabledPageAgent())
-@@ -655,6 +662,12 @@ void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents& instrumen
+@@ -676,6 +683,12 @@ void InspectorInstrumentation::didFailLoadingImpl(InstrumentingAgents& instrumen
consoleAgent->didFailLoading(identifier, error); // This should come AFTER resource notification, front-end relies on this.
}
@@ -3012,7 +3013,7 @@ index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db908
void InspectorInstrumentation::willLoadXHRSynchronouslyImpl(InstrumentingAgents& instrumentingAgents)
{
if (auto* networkAgent = instrumentingAgents.enabledNetworkAgent())
-@@ -687,20 +700,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&
+@@ -708,20 +721,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&
void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
{
@@ -3036,7 +3037,7 @@ index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db908
}
void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
-@@ -781,12 +791,6 @@ void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& ins
+@@ -802,12 +812,6 @@ void InspectorInstrumentation::frameDocumentUpdatedImpl(InstrumentingAgents& ins
pageDOMDebuggerAgent->frameDocumentUpdated(frame);
}
@@ -3049,7 +3050,7 @@ index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db908
void InspectorInstrumentation::frameStartedLoadingImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
{
if (frame.isMainFrame()) {
-@@ -823,6 +827,12 @@ void InspectorInstrumentation::frameClearedScheduledNavigationImpl(Instrumenting
+@@ -844,6 +848,12 @@ void InspectorInstrumentation::frameClearedScheduledNavigationImpl(Instrumenting
inspectorPageAgent->frameClearedScheduledNavigation(frame);
}
@@ -3062,7 +3063,7 @@ index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db908
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
void InspectorInstrumentation::defaultAppearanceDidChangeImpl(InstrumentingAgents& instrumentingAgents, bool useDarkAppearance)
{
-@@ -1005,6 +1015,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent
+@@ -1026,6 +1036,12 @@ void InspectorInstrumentation::consoleStopRecordingCanvasImpl(InstrumentingAgent
canvasAgent->consoleStopRecordingCanvas(context);
}
@@ -3075,7 +3076,7 @@ index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db908
void InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents& instrumentingAgents, Database& database)
{
if (auto* databaseAgent = instrumentingAgents.enabledDatabaseAgent())
-@@ -1305,6 +1321,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins
+@@ -1326,6 +1342,36 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins
layerTreeAgent->renderLayerDestroyed(renderLayer);
}
@@ -3112,7 +3113,7 @@ index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db908
InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(WorkerOrWorkletGlobalScope& globalScope)
{
return globalScope.inspectorController().m_instrumentingAgents;
-@@ -1316,6 +1362,13 @@ InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(Page& page)
+@@ -1337,6 +1383,13 @@ InstrumentingAgents& InspectorInstrumentation::instrumentingAgents(Page& page)
return page.inspectorController().m_instrumentingAgents.get();
}
@@ -3127,7 +3128,7 @@ index 0d5cb92ec4cbb0e7ad8b755b3b8f684996bbc40f..45d9f9d236bce99be5fd2f77253db908
{
if (is<Document>(context))
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
-index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218ebc99e69 100644
+index 21046dba54107ccd965b9f3df586b276806f870e..7cd364d86cbb76e40bb2978e31047dd411c29df3 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
@@ -31,6 +31,7 @@
@@ -3138,7 +3139,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
#include "CSSSelector.h"
#include "CanvasBase.h"
#include "CanvasRenderingContext.h"
-@@ -45,6 +46,7 @@
+@@ -46,6 +47,7 @@
#include "HitTestResult.h"
#include "InspectorInstrumentationPublic.h"
#include "Page.h"
@@ -3146,7 +3147,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
#include "ResourceLoader.h"
#include "ResourceLoaderIdentifier.h"
#include "StorageArea.h"
-@@ -77,6 +79,7 @@ class DOMWrapperWorld;
+@@ -78,6 +80,7 @@ class DOMWrapperWorld;
class Document;
class DocumentLoader;
class EventListener;
@@ -3154,7 +3155,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
class HTTPHeaderMap;
class InspectorTimelineAgent;
class InstrumentingAgents;
-@@ -189,6 +192,7 @@ public:
+@@ -192,6 +195,7 @@ public:
static void didRecalculateStyle(Document&);
static void didScheduleStyleRecalculation(Document&);
static void applyUserAgentOverride(Frame&, String&);
@@ -3162,7 +3163,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
static void applyEmulatedMedia(Frame&, String&);
static void flexibleBoxRendererBeganLayout(const RenderObject&);
-@@ -201,6 +205,7 @@ public:
+@@ -204,6 +208,7 @@ public:
static void didReceiveData(Frame*, ResourceLoaderIdentifier, const SharedBuffer*, int encodedDataLength);
static void didFinishLoading(Frame*, DocumentLoader*, ResourceLoaderIdentifier, const NetworkLoadMetrics&, ResourceLoader*);
static void didFailLoading(Frame*, DocumentLoader*, ResourceLoaderIdentifier, const ResourceError&);
@@ -3170,7 +3171,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
static void willSendRequest(WorkerOrWorkletGlobalScope&, ResourceLoaderIdentifier, ResourceRequest&);
static void didReceiveResourceResponse(WorkerOrWorkletGlobalScope&, ResourceLoaderIdentifier, const ResourceResponse&);
-@@ -227,11 +232,11 @@ public:
+@@ -230,11 +235,11 @@ public:
static void frameDetachedFromParent(Frame&);
static void didCommitLoad(Frame&, DocumentLoader*);
static void frameDocumentUpdated(Frame&);
@@ -3183,7 +3184,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
static void defaultAppearanceDidChange(Page&, bool useDarkAppearance);
#endif
-@@ -263,6 +268,7 @@ public:
+@@ -266,6 +271,7 @@ public:
static void stopProfiling(Page&, JSC::JSGlobalObject*, const String& title);
static void consoleStartRecordingCanvas(CanvasRenderingContext&, JSC::JSGlobalObject&, JSC::JSObject* options);
static void consoleStopRecordingCanvas(CanvasRenderingContext&);
@@ -3191,7 +3192,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
static void didRequestAnimationFrame(Document&, int callbackId);
static void didCancelAnimationFrame(Document&, int callbackId);
-@@ -318,6 +324,12 @@ public:
+@@ -321,6 +327,12 @@ public:
static void layerTreeDidChange(Page*);
static void renderLayerDestroyed(Page*, const RenderLayer&);
@@ -3204,7 +3205,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
static void frontendCreated();
static void frontendDeleted();
static bool hasFrontends() { return InspectorInstrumentationPublic::hasFrontends(); }
-@@ -334,6 +346,8 @@ public:
+@@ -337,6 +349,8 @@ public:
static void registerInstrumentingAgents(InstrumentingAgents&);
static void unregisterInstrumentingAgents(InstrumentingAgents&);
@@ -3213,7 +3214,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
private:
static void didClearWindowObjectInWorldImpl(InstrumentingAgents&, Frame&, DOMWrapperWorld&);
static bool isDebuggerPausedImpl(InstrumentingAgents&);
-@@ -411,6 +425,7 @@ private:
+@@ -416,6 +430,7 @@ private:
static void didRecalculateStyleImpl(InstrumentingAgents&);
static void didScheduleStyleRecalculationImpl(InstrumentingAgents&, Document&);
static void applyUserAgentOverrideImpl(InstrumentingAgents&, String&);
@@ -3221,7 +3222,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
static void applyEmulatedMediaImpl(InstrumentingAgents&, String&);
static void flexibleBoxRendererBeganLayoutImpl(InstrumentingAgents&, const RenderObject&);
-@@ -425,6 +440,7 @@ private:
+@@ -430,6 +445,7 @@ private:
static void didReceiveDataImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const SharedBuffer*, int encodedDataLength);
static void didFinishLoadingImpl(InstrumentingAgents&, ResourceLoaderIdentifier, DocumentLoader*, const NetworkLoadMetrics&, ResourceLoader*);
static void didFailLoadingImpl(InstrumentingAgents&, ResourceLoaderIdentifier, DocumentLoader*, const ResourceError&);
@@ -3229,7 +3230,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
static void willLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void didLoadXHRSynchronouslyImpl(InstrumentingAgents&);
static void scriptImportedImpl(InstrumentingAgents&, ResourceLoaderIdentifier, const String& sourceString);
-@@ -435,11 +451,11 @@ private:
+@@ -440,11 +456,11 @@ private:
static void frameDetachedFromParentImpl(InstrumentingAgents&, Frame&);
static void didCommitLoadImpl(InstrumentingAgents&, Frame&, DocumentLoader*);
static void frameDocumentUpdatedImpl(InstrumentingAgents&, Frame&);
@@ -3242,7 +3243,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
static void defaultAppearanceDidChangeImpl(InstrumentingAgents&, bool useDarkAppearance);
#endif
-@@ -466,6 +482,7 @@ private:
+@@ -471,6 +487,7 @@ private:
static void stopProfilingImpl(InstrumentingAgents&, JSC::JSGlobalObject*, const String& title);
static void consoleStartRecordingCanvasImpl(InstrumentingAgents&, CanvasRenderingContext&, JSC::JSGlobalObject&, JSC::JSObject* options);
static void consoleStopRecordingCanvasImpl(InstrumentingAgents&, CanvasRenderingContext&);
@@ -3250,7 +3251,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
static void didRequestAnimationFrameImpl(InstrumentingAgents&, int callbackId, Document&);
static void didCancelAnimationFrameImpl(InstrumentingAgents&, int callbackId, Document&);
-@@ -521,6 +538,12 @@ private:
+@@ -526,6 +543,12 @@ private:
static void layerTreeDidChangeImpl(InstrumentingAgents&);
static void renderLayerDestroyedImpl(InstrumentingAgents&, const RenderLayer&);
@@ -3263,7 +3264,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
static InstrumentingAgents& instrumentingAgents(Page&);
static InstrumentingAgents& instrumentingAgents(WorkerOrWorkletGlobalScope&);
-@@ -1039,6 +1062,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(Frame& frame, Strin
+@@ -1058,6 +1081,13 @@ inline void InspectorInstrumentation::applyUserAgentOverride(Frame& frame, Strin
applyUserAgentOverrideImpl(*agents, userAgent);
}
@@ -3277,7 +3278,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
inline void InspectorInstrumentation::applyEmulatedMedia(Frame& frame, String& media)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1141,6 +1171,13 @@ inline void InspectorInstrumentation::didFailLoading(WorkerOrWorkletGlobalScope&
+@@ -1160,6 +1190,13 @@ inline void InspectorInstrumentation::didFailLoading(WorkerOrWorkletGlobalScope&
didFailLoadingImpl(instrumentingAgents(globalScope), identifier, nullptr, error);
}
@@ -3291,7 +3292,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame& frame, ResourceLoaderIdentifier identifier, DocumentLoader& loader, const ResourceResponse& response)
{
// Treat the same as didReceiveResponse.
-@@ -1231,13 +1268,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(Frame& frame)
+@@ -1250,13 +1287,6 @@ inline void InspectorInstrumentation::frameDocumentUpdated(Frame& frame)
frameDocumentUpdatedImpl(*agents, frame);
}
@@ -3305,7 +3306,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
inline void InspectorInstrumentation::frameStartedLoading(Frame& frame)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1266,6 +1296,13 @@ inline void InspectorInstrumentation::frameClearedScheduledNavigation(Frame& fra
+@@ -1285,6 +1315,13 @@ inline void InspectorInstrumentation::frameClearedScheduledNavigation(Frame& fra
frameClearedScheduledNavigationImpl(*agents, frame);
}
@@ -3319,7 +3320,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
inline void InspectorInstrumentation::defaultAppearanceDidChange(Page& page, bool useDarkAppearance)
{
-@@ -1640,6 +1677,11 @@ inline void InspectorInstrumentation::consoleStopRecordingCanvas(CanvasRendering
+@@ -1659,6 +1696,11 @@ inline void InspectorInstrumentation::consoleStopRecordingCanvas(CanvasRendering
consoleStopRecordingCanvasImpl(*agents, context);
}
@@ -3331,7 +3332,7 @@ index 9ef49586f5125ac3670007e6c09733fdd1e303ba..ccc8d93cc7a53fe7e13a80bc6ce0c218
inline void InspectorInstrumentation::didRequestAnimationFrame(Document& document, int callbackId)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
-@@ -1696,6 +1738,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren
+@@ -1715,6 +1757,42 @@ inline void InspectorInstrumentation::renderLayerDestroyed(Page* page, const Ren
renderLayerDestroyedImpl(*agents, renderLayer);
}
@@ -3387,7 +3388,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 d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056383d5750 100644
+index 4f713696232c2acc4d8d6b1a43939489ea0d7bfe..0d55b71d845257d41c55952a0a0d9f1468ad1ab5 100644
--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
@@ -62,12 +62,16 @@
@@ -3462,7 +3463,7 @@ index d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056
class RevalidateStyleAttributeTask {
WTF_MAKE_FAST_ALLOCATED;
public:
-@@ -451,6 +472,20 @@ Node* InspectorDOMAgent::assertNode(Protocol::ErrorString& errorString, Protocol
+@@ -454,6 +475,20 @@ Node* InspectorDOMAgent::assertNode(Protocol::ErrorString& errorString, Protocol
return node;
}
@@ -3483,7 +3484,7 @@ index d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056
Document* InspectorDOMAgent::assertDocument(Protocol::ErrorString& errorString, Protocol::DOM::NodeId nodeId)
{
Node* node = assertNode(errorString, nodeId);
-@@ -1444,16 +1479,7 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightSelector(Ref<JSON::Obj
+@@ -1447,16 +1482,7 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightSelector(Ref<JSON::Obj
Protocol::ErrorStringOr<void> InspectorDOMAgent::highlightNode(Ref<JSON::Object>&& highlightInspectorObject, std::optional<Protocol::DOM::NodeId>&& nodeId, const Protocol::Runtime::RemoteObjectId& objectId)
{
Protocol::ErrorString errorString;
@@ -3501,18 +3502,16 @@ index d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056
if (!node)
return makeUnexpected(errorString);
-@@ -1691,15 +1717,141 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::setInspectedNode(Protocol::DOM:
+@@ -1694,15 +1720,154 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::setInspectedNode(Protocol::DOM:
return { };
}
-Protocol::ErrorStringOr<Ref<Protocol::Runtime::RemoteObject>> InspectorDOMAgent::resolveNode(Protocol::DOM::NodeId nodeId, const String& objectGroup)
+static FloatPoint contentsToRootView(FrameView& containingView, const FloatPoint& point)
- {
-- Protocol::ErrorString errorString;
++{
+ return containingView.convertToRootView(point - toFloatSize(containingView.documentScrollPositionRelativeToViewOrigin()));
+}
-
-- Node* node = assertNode(errorString, nodeId);
++
+static void frameQuadToViewport(FrameView& containingView, FloatQuad& quad, float pageScaleFactor)
+{
+ // Return css (not dip) coordinates by scaling back.
@@ -3635,10 +3634,24 @@ index d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056
+ return buildArrayOfQuads(quads);
+}
+
-+Protocol::ErrorStringOr<Ref<Protocol::Runtime::RemoteObject>> InspectorDOMAgent::resolveNode(std::optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId, std::optional<int>&& contextId, const String& objectGroup)
-+{
-+ Protocol::ErrorString errorString;
-+ Node* node = assertNode(errorString, WTFMove(nodeId), objectId);
++Protocol::ErrorStringOr<Ref<Protocol::Runtime::RemoteObject>> InspectorDOMAgent::resolveNode(std::optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId, const Inspector::Protocol::Network::FrameId& frameId, std::optional<int>&& contextId, const String& objectGroup)
+ {
+ Protocol::ErrorString errorString;
++ Node* node = nullptr;
++ if (!!frameId) {
++ auto* pageAgent = m_instrumentingAgents.enabledPageAgent();
++ if (!pageAgent)
++ return makeUnexpected("Page domain must be enabled"_s);
+
+- Node* node = assertNode(errorString, nodeId);
++ auto* frame = pageAgent->assertFrame(errorString, frameId);
++ if (!frame)
++ return makeUnexpected(errorString);
++
++ node = frame->ownerElement();
++ } else {
++ node = assertNode(errorString, WTFMove(nodeId), objectId);
++ }
if (!node)
return makeUnexpected(errorString);
@@ -3647,7 +3660,7 @@ index d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056
if (!object)
return makeUnexpected("Missing injected script for given nodeId"_s);
-@@ -2956,7 +3108,7 @@ Protocol::ErrorStringOr<Protocol::DOM::NodeId> InspectorDOMAgent::pushNodeByPath
+@@ -2959,7 +3124,7 @@ Protocol::ErrorStringOr<Protocol::DOM::NodeId> InspectorDOMAgent::pushNodeByPath
return makeUnexpected("Missing node for given path"_s);
}
@@ -3656,7 +3669,7 @@ index d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056
{
Document* document = &node->document();
if (auto* templateHost = document->templateDocumentHost())
-@@ -2965,12 +3117,18 @@ RefPtr<Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* nod
+@@ -2968,12 +3133,18 @@ RefPtr<Protocol::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* nod
if (!frame)
return nullptr;
@@ -3678,7 +3691,7 @@ index d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056
}
Node* InspectorDOMAgent::scriptValueAsNode(JSC::JSValue value)
-@@ -2993,4 +3151,57 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::setAllowEditingUserAgentShadowT
+@@ -2996,4 +3167,57 @@ Protocol::ErrorStringOr<void> InspectorDOMAgent::setAllowEditingUserAgentShadowT
return { };
}
@@ -3737,7 +3750,7 @@ index d86256ff04f0eda3d9ed4d23ff8f66f2db26f742..af198fa8d839eb9a2af9b1a0cefec056
+
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.h b/Source/WebCore/inspector/agents/InspectorDOMAgent.h
-index 14dd53be7d293dfde8826724fa73d74ef00c03c4..7a63a353015c85ad72db824bf62657d5904de6e9 100644
+index 3388aaf2e56eef45ad037497af8721487ff88d8f..ec0c749db7f6128545b0c4a887b86190346da78e 100644
--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.h
+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.h
@@ -57,6 +57,7 @@ namespace WebCore {
@@ -3761,7 +3774,7 @@ index 14dd53be7d293dfde8826724fa73d74ef00c03c4..7a63a353015c85ad72db824bf62657d5
Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<Inspector::Protocol::DOM::NodeId>>> getSearchResults(const String& searchId, int fromIndex, int toIndex);
Inspector::Protocol::ErrorStringOr<void> discardSearchResults(const String& searchId);
- Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::Runtime::RemoteObject>> resolveNode(Inspector::Protocol::DOM::NodeId, const String& objectGroup);
-+ Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::Runtime::RemoteObject>> resolveNode(std::optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId, std::optional<int>&& contextId, const String& objectGroup);
++ Inspector::Protocol::ErrorStringOr<Ref<Inspector::Protocol::Runtime::RemoteObject>> resolveNode(std::optional<Inspector::Protocol::DOM::NodeId>&& nodeId, const String& objectId, const Inspector::Protocol::Network::FrameId& frameId, std::optional<int>&& contextId, const String& objectGroup);
Inspector::Protocol::ErrorStringOr<Ref<JSON::ArrayOf<String>>> getAttributes(Inspector::Protocol::DOM::NodeId);
#if PLATFORM(IOS_FAMILY)
Inspector::Protocol::ErrorStringOr<void> setInspectModeEnabled(bool, RefPtr<JSON::Object>&& highlightConfig);
@@ -3810,7 +3823,7 @@ index 14dd53be7d293dfde8826724fa73d74ef00c03c4..7a63a353015c85ad72db824bf62657d5
void discardBindings();
diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
-index 3f095032390bb73cd3d72422b969bcf3cb66f781..97a7ad9612301d5c00943cd2aa5ca475683b1c3a 100644
+index 596e029c72964a3dfe67dd4d22dd967a2bc06da0..672ed93ee6c733ed7f0b4b51088c2726c2ed471c 100644
--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
@@ -45,6 +45,7 @@
@@ -3829,7 +3842,7 @@ index 3f095032390bb73cd3d72422b969bcf3cb66f781..97a7ad9612301d5c00943cd2aa5ca475
#include "Page.h"
#include "PlatformStrategies.h"
#include "ProgressTracker.h"
-@@ -335,8 +337,8 @@ static Ref<Protocol::Network::Request> buildObjectForResourceRequest(const Resou
+@@ -336,8 +338,8 @@ static Ref<Protocol::Network::Request> buildObjectForResourceRequest(const Resou
.release();
if (request.httpBody() && !request.httpBody()->isEmpty()) {
@@ -3840,7 +3853,7 @@ index 3f095032390bb73cd3d72422b969bcf3cb66f781..97a7ad9612301d5c00943cd2aa5ca475
}
if (resourceLoader) {
-@@ -389,6 +391,8 @@ RefPtr<Protocol::Network::Response> InspectorNetworkAgent::buildObjectForResourc
+@@ -390,6 +392,8 @@ RefPtr<Protocol::Network::Response> InspectorNetworkAgent::buildObjectForResourc
.setSource(responseSource(response.source()))
.release();
@@ -3849,7 +3862,7 @@ index 3f095032390bb73cd3d72422b969bcf3cb66f781..97a7ad9612301d5c00943cd2aa5ca475
if (resourceLoader) {
auto* metrics = response.deprecatedNetworkLoadMetricsOrNull();
responseObject->setTiming(buildObjectForTiming(metrics ? *metrics : NetworkLoadMetrics::emptyMetrics(), *resourceLoader));
-@@ -954,6 +958,7 @@ void InspectorNetworkAgent::continuePendingResponses()
+@@ -955,6 +959,7 @@ void InspectorNetworkAgent::continuePendingResponses()
Protocol::ErrorStringOr<void> InspectorNetworkAgent::setExtraHTTPHeaders(Ref<JSON::Object>&& headers)
{
@@ -3857,7 +3870,7 @@ index 3f095032390bb73cd3d72422b969bcf3cb66f781..97a7ad9612301d5c00943cd2aa5ca475
for (auto& entry : headers.get()) {
auto stringValue = entry.value->asString();
if (!!stringValue)
-@@ -1234,6 +1239,9 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithRequest(const
+@@ -1235,6 +1240,9 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptWithRequest(const
return makeUnexpected("Missing pending intercept request for given requestId"_s);
auto& loader = *pendingRequest->m_loader;
@@ -3867,7 +3880,7 @@ index 3f095032390bb73cd3d72422b969bcf3cb66f781..97a7ad9612301d5c00943cd2aa5ca475
ResourceRequest request = loader.request();
if (!!url)
request.setURL(URL({ }, url));
-@@ -1333,14 +1341,23 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithRespons
+@@ -1334,14 +1342,23 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::interceptRequestWithRespons
response.setHTTPStatusCode(status);
response.setHTTPStatusText(AtomString { statusText });
HTTPHeaderMap explicitHeaders;
@@ -3893,7 +3906,7 @@ index 3f095032390bb73cd3d72422b969bcf3cb66f781..97a7ad9612301d5c00943cd2aa5ca475
if (loader->reachedTerminalState())
return;
-@@ -1403,6 +1420,12 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::setEmulatedConditions(std::
+@@ -1404,6 +1421,12 @@ Protocol::ErrorStringOr<void> InspectorNetworkAgent::setEmulatedConditions(std::
#endif // ENABLE(INSPECTOR_NETWORK_THROTTLING)
@@ -3928,7 +3941,7 @@ index c6ebcc9d7e399a35f71350c9374df0f2107c518b..3bfa03ae7f27d9128fe207c1de1bfea9
// InspectorInstrumentation
void willRecalculateStyle();
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
-index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e844b2e893d 100644
+index 7efbf27a7d6881950365e9a20d546558630a62bf..37b2fc6aa36bc2af85398730f4b5a48d0b421859 100644
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
@@ -32,20 +32,28 @@
@@ -4007,7 +4020,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
static bool decodeBuffer(const uint8_t* buffer, unsigned size, const String& textEncodingName, String* result)
{
if (buffer) {
-@@ -326,6 +348,7 @@ InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorClien
+@@ -329,6 +351,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)
@@ -4015,7 +4028,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
, m_client(client)
, m_overlay(overlay)
{
-@@ -357,12 +380,20 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::enable()
+@@ -360,12 +383,20 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::enable()
defaultAppearanceDidChange(m_inspectedPage.defaultUseDarkAppearance());
#endif
@@ -4036,7 +4049,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
setShowPaintRects(false);
#if !PLATFORM(IOS_FAMILY)
-@@ -411,6 +442,22 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optional<bool>&& i
+@@ -414,6 +445,22 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::reload(std::optional<bool>&& i
return { };
}
@@ -4059,7 +4072,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
Protocol::ErrorStringOr<void> InspectorPageAgent::navigate(const String& url)
{
Frame& frame = m_inspectedPage.mainFrame();
-@@ -432,6 +479,13 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideUserAgent(const String
+@@ -435,6 +482,13 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideUserAgent(const String
return { };
}
@@ -4073,7 +4086,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page::Setting setting, std::optional<bool>&& value)
{
auto& inspectedPageSettings = m_inspectedPage.settings();
-@@ -445,6 +499,12 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
+@@ -448,6 +502,12 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
inspectedPageSettings.setAuthorAndUserStylesEnabledInspectorOverride(value);
return { };
@@ -4086,7 +4099,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
case Protocol::Page::Setting::ICECandidateFilteringEnabled:
inspectedPageSettings.setICECandidateFilteringEnabledInspectorOverride(value);
return { };
-@@ -470,6 +530,36 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
+@@ -473,6 +533,36 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
inspectedPageSettings.setNeedsSiteSpecificQuirksInspectorOverride(value);
return { };
@@ -4123,7 +4136,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
case Protocol::Page::Setting::ScriptEnabled:
inspectedPageSettings.setScriptEnabledInspectorOverride(value);
return { };
-@@ -482,6 +572,12 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
+@@ -485,6 +575,12 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::overrideSetting(Protocol::Page
inspectedPageSettings.setShowRepaintCounterInspectorOverride(value);
return { };
@@ -4136,7 +4149,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
case Protocol::Page::Setting::WebRTCEncryptionEnabled:
inspectedPageSettings.setWebRTCEncryptionEnabledInspectorOverride(value);
return { };
-@@ -702,9 +798,13 @@ Protocol::ErrorStringOr<std::tuple<String, bool /* base64Encoded */>> InspectorP
+@@ -720,9 +816,13 @@ Protocol::ErrorStringOr<std::tuple<String, bool /* base64Encoded */>> InspectorP
return { { content, base64Encoded } };
}
@@ -4152,7 +4165,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
return { };
}
-@@ -807,15 +907,16 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setShowPaintRects(bool show)
+@@ -828,15 +928,16 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setShowPaintRects(bool show)
return { };
}
@@ -4174,18 +4187,18 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
}
void InspectorPageAgent::frameNavigated(Frame& frame)
-@@ -823,13 +924,23 @@ void InspectorPageAgent::frameNavigated(Frame& frame)
+@@ -844,13 +945,23 @@ void InspectorPageAgent::frameNavigated(Frame& frame)
m_frontendDispatcher->frameNavigated(buildObjectForFrame(&frame));
}
+String InspectorPageAgent::makeFrameID(ProcessIdentifier processID, FrameIdentifier frameID)
+{
-+ return makeString(processID.toUInt64(), ".", frameID.toUInt64());
++ return makeString(processID.toUInt64(), ".", frameID.object().toUInt64());
+}
+
+static String globalIDForFrame(Frame& frame)
+{
-+ return InspectorPageAgent::makeFrameID(Process::identifier(), *frame.loader().client().frameID());
++ return InspectorPageAgent::makeFrameID(Process::identifier(), frame.loader().frameID());
+}
+
void InspectorPageAgent::frameDetached(Frame& frame)
@@ -4201,7 +4214,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
}
Frame* InspectorPageAgent::frameForId(const Protocol::Network::FrameId& frameId)
-@@ -841,20 +952,18 @@ String InspectorPageAgent::frameId(Frame* frame)
+@@ -862,20 +973,18 @@ String InspectorPageAgent::frameId(Frame* frame)
{
if (!frame)
return emptyString();
@@ -4228,7 +4241,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
}
Frame* InspectorPageAgent::assertFrame(Protocol::ErrorString& errorString, const Protocol::Network::FrameId& frameId)
-@@ -865,11 +974,6 @@ Frame* InspectorPageAgent::assertFrame(Protocol::ErrorString& errorString, const
+@@ -886,11 +995,6 @@ Frame* InspectorPageAgent::assertFrame(Protocol::ErrorString& errorString, const
return frame;
}
@@ -4240,7 +4253,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
void InspectorPageAgent::frameStartedLoading(Frame& frame)
{
m_frontendDispatcher->frameStartedLoading(frameId(&frame));
-@@ -890,6 +994,12 @@ void InspectorPageAgent::frameClearedScheduledNavigation(Frame& frame)
+@@ -911,6 +1015,12 @@ void InspectorPageAgent::frameClearedScheduledNavigation(Frame& frame)
m_frontendDispatcher->frameClearedScheduledNavigation(frameId(&frame));
}
@@ -4253,7 +4266,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
void InspectorPageAgent::defaultAppearanceDidChange(bool useDarkAppearance)
{
-@@ -899,13 +1009,22 @@ void InspectorPageAgent::defaultAppearanceDidChange(bool useDarkAppearance)
+@@ -920,13 +1030,22 @@ void InspectorPageAgent::defaultAppearanceDidChange(bool useDarkAppearance)
void InspectorPageAgent::didClearWindowObjectInWorld(Frame& frame, DOMWrapperWorld& world)
{
@@ -4279,7 +4292,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
}
void InspectorPageAgent::didPaint(RenderObject& renderer, const LayoutRect& rect)
-@@ -949,6 +1068,52 @@ void InspectorPageAgent::didRecalculateStyle()
+@@ -970,6 +1089,51 @@ void InspectorPageAgent::didRecalculateStyle()
m_overlay->update();
}
@@ -4309,8 +4322,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
+
+void InspectorPageAgent::frameAttached(Frame& frame)
+{
-+ Frame* parent = frame.tree().parent();
-+ String parentFrameId = frameId(parent);
++ String parentFrameId = frameId(dynamicDowncast<LocalFrame>(frame.tree().parent()));
+ m_frontendDispatcher->frameAttached(frameId(&frame), parentFrameId);
+}
+
@@ -4332,7 +4344,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
Ref<Protocol::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame)
{
ASSERT_ARG(frame, frame);
-@@ -1062,6 +1227,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent)
+@@ -1086,6 +1250,12 @@ void InspectorPageAgent::applyUserAgentOverride(String& userAgent)
userAgent = m_userAgentOverride;
}
@@ -4345,7 +4357,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
void InspectorPageAgent::applyEmulatedMedia(String& media)
{
if (!m_emulatedMedia.isEmpty())
-@@ -1085,11 +1256,13 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Protocol::DOM::
+@@ -1109,11 +1279,13 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotNode(Protocol::DOM::
return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes);
}
@@ -4360,7 +4372,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
IntRect rectangle(x, y, width, height);
auto snapshot = snapshotFrameRect(m_inspectedPage.mainFrame(), rectangle, WTFMove(options));
-@@ -1100,6 +1273,67 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, i
+@@ -1124,6 +1296,67 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::snapshotRect(int x, int y, i
return snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes);
}
@@ -4428,7 +4440,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
#if ENABLE(WEB_ARCHIVE) && USE(CF)
Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
{
-@@ -1112,7 +1346,6 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
+@@ -1136,7 +1369,6 @@ Protocol::ErrorStringOr<String> InspectorPageAgent::archive()
}
#endif
@@ -4436,7 +4448,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::optional<int>&& width, std::optional<int>&& height)
{
if (width.has_value() != height.has_value())
-@@ -1127,6 +1360,636 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::opt
+@@ -1151,6 +1383,634 @@ Protocol::ErrorStringOr<void> InspectorPageAgent::setScreenSizeOverride(std::opt
m_inspectedPage.mainFrame().setOverrideScreenSize(FloatSize(width.value_or(0), height.value_or(0)));
return { };
}
@@ -4795,6 +4807,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
+ auto axNode = Inspector::Protocol::Page::AXNode::create()
+ .setRole(roleFromObject(axObject))
+ .release();
++ auto* liveObject = dynamicDowncast<AccessibilityObject>(axObject.get());
+
+ if (!axObject->computedLabel().isEmpty())
+ axNode->setName(axObject->computedLabel());
@@ -4821,10 +4834,8 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
+ axNode->setMultiline(multiline);
+ if (axObject->isMultiSelectable())
+ axNode->setMultiselectable(axObject->isMultiSelectable());
-+ /* FIXME(dpino): Build error after 253506@main.
-+ if (axObject->supportsReadOnly() && !axObject->canSetValueAttribute() && axObject->isEnabled())
++ if (liveObject && liveObject->supportsReadOnly() && !axObject->canSetValueAttribute() && axObject->isEnabled())
+ axNode->setReadonly(true);
-+ */
+ if (axObject->supportsRequiredAttribute())
+ axNode->setRequired(axObject->isRequired());
+ if (axObject->isSelected())
@@ -4864,10 +4875,8 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
+ axNode->setValuemin(axObject->minValueForRange());
+ if (axObject->maxValueForRange() != 0)
+ axNode->setValuemax(axObject->maxValueForRange());
-+ /* FIXME(dpino): Build error after 253506@main.
-+ if (axObject->supportsAutoComplete())
++ if (liveObject && liveObject->supportsAutoComplete())
+ axNode->setAutocomplete(axObject->autoCompleteValue());
-+ */
+ if (axObject->hasPopup())
+ axNode->setHaspopup(axObject->popupValue());
+
@@ -4972,9 +4981,10 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84
+
+void InspectorPageAgent::ensureUserWorldsExistInAllFrames(const Vector<DOMWrapperWorld*>& worlds)
+{
-+ for (Frame* frame = &m_inspectedPage.mainFrame(); frame; frame = frame->tree().traverseNext()) {
++ for (AbstractFrame* frame = &m_inspectedPage.mainFrame(); frame; frame = frame->tree().traverseNext()) {
++ auto* localFrame = dynamicDowncast<LocalFrame>(frame);
+ for (auto* world : worlds)
-+ frame->windowProxy().jsWindowProxy(*world)->window();
++ localFrame->windowProxy().jsWindowProxy(*world)->window();
+ }
+}
+
@@ -5229,7 +5239,7 @@ index 6d94ad131257d8d7cdb05898fd3f42e0c72766bf..06d6cc40ad9bd914fa77197b1910aa60
} // namespace WebCore
diff --git a/Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp b/Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp
-index fe1cc2dbb9863cd4480476d2e21a5a229dc8a0e8..35dd7ca4cabe0d0ec76d44e260870a99becaa128 100644
+index e42732004c102fba94b58fb90a52716f111b1179..31fa0e10e9e62c1fcdf1013771b6fb084c44a0bd 100644
--- a/Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp
@@ -168,7 +168,11 @@ void InspectorWorkerAgent::connectToWorkerInspectorProxy(WorkerInspectorProxy& p
@@ -5486,10 +5496,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 e601aa9c6d3b04df2e9ffb341626013778e4c9d7..bb1f35d83d64500eb70e16e9bcd3149094601908 100644
+index 1f972cd312338d92e6cf937357a6ab45af25aa84..c687a73caaf2e7f55cddf041e110b41ac4356a73 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
-@@ -728,8 +728,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc
+@@ -741,8 +741,10 @@ void DocumentLoader::willSendRequest(ResourceRequest&& newRequest, const Resourc
if (!didReceiveRedirectResponse)
return completionHandler(WTFMove(newRequest));
@@ -5500,7 +5510,7 @@ index e601aa9c6d3b04df2e9ffb341626013778e4c9d7..bb1f35d83d64500eb70e16e9bcd31490
switch (navigationPolicyDecision) {
case NavigationPolicyDecision::IgnoreLoad:
case NavigationPolicyDecision::StopAllLoads:
-@@ -1510,8 +1512,6 @@ void DocumentLoader::detachFromFrame()
+@@ -1508,8 +1510,6 @@ void DocumentLoader::detachFromFrame()
if (!m_frame)
return;
@@ -5510,10 +5520,10 @@ index e601aa9c6d3b04df2e9ffb341626013778e4c9d7..bb1f35d83d64500eb70e16e9bcd31490
}
diff --git a/Source/WebCore/loader/DocumentLoader.h b/Source/WebCore/loader/DocumentLoader.h
-index 74431bab05725f9673833ea4a37938013ffa578e..ccf7fb599d98d64f599ca0d750abbaf879efc7b2 100644
+index 56f62d1517898771d4df1f2159af15fd11770155..d95957f28dae75664f27b9a3b812dd563139204e 100644
--- a/Source/WebCore/loader/DocumentLoader.h
+++ b/Source/WebCore/loader/DocumentLoader.h
-@@ -181,9 +181,13 @@ public:
+@@ -182,9 +182,13 @@ public:
WEBCORE_EXPORT virtual void detachFromFrame();
@@ -5528,10 +5538,10 @@ index 74431bab05725f9673833ea4a37938013ffa578e..ccf7fb599d98d64f599ca0d750abbaf8
DocumentWriter& writer() const { return m_writer; }
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
-index fd0a865aa9ca1e34eeae0cb522e0c03c4a72d774..9cecc4a144300f0d60aa7ed8d35372884721b8c9 100644
+index 428fc300039c57640861e71aaa1d89d3365f81ea..dfe0c6ab364b7e7d146dac9f626c7c29e10d77c3 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
-@@ -1174,6 +1174,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat
+@@ -1201,6 +1201,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr<SerializedScriptValue> stat
}
m_client->dispatchDidNavigateWithinPage();
@@ -5539,7 +5549,7 @@ index fd0a865aa9ca1e34eeae0cb522e0c03c4a72d774..9cecc4a144300f0d60aa7ed8d3537288
m_frame.document()->statePopped(stateObject ? stateObject.releaseNonNull() : SerializedScriptValue::nullValue());
m_client->dispatchDidPopStateWithinPage();
-@@ -1610,6 +1611,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+@@ -1647,6 +1648,8 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
const String& httpMethod = loader->request().httpMethod();
if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {
@@ -5548,7 +5558,7 @@ index fd0a865aa9ca1e34eeae0cb522e0c03c4a72d774..9cecc4a144300f0d60aa7ed8d3537288
RefPtr<DocumentLoader> oldDocumentLoader = m_documentLoader;
NavigationAction action { *m_frame.document(), loader->request(), InitiatedByMainFrame::Unknown, policyChecker().loadType(), isFormSubmission };
action.setIsRequestFromClientOrUserInput(loader->isRequestFromClientOrUserInput());
-@@ -1639,7 +1642,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
+@@ -1679,7 +1682,9 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
}
RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()) || history().provisionalItem());
@@ -5558,7 +5568,7 @@ index fd0a865aa9ca1e34eeae0cb522e0c03c4a72d774..9cecc4a144300f0d60aa7ed8d3537288
continueLoadAfterNavigationPolicy(request, formState.get(), navigationPolicyDecision, allowNavigationToInvalidURL);
completionHandler();
}, PolicyDecisionMode::Asynchronous);
-@@ -2806,12 +2811,17 @@ String FrameLoader::userAgent(const URL& url) const
+@@ -2878,12 +2883,17 @@ String FrameLoader::userAgent(const URL& url) const
String FrameLoader::navigatorPlatform() const
{
@@ -5578,7 +5588,7 @@ index fd0a865aa9ca1e34eeae0cb522e0c03c4a72d774..9cecc4a144300f0d60aa7ed8d3537288
}
void FrameLoader::dispatchOnloadEvents()
-@@ -3222,6 +3232,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
+@@ -3294,6 +3304,8 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
checkCompleted();
if (m_frame.page())
checkLoadComplete();
@@ -5586,8 +5596,8 @@ index fd0a865aa9ca1e34eeae0cb522e0c03c4a72d774..9cecc4a144300f0d60aa7ed8d3537288
+ InspectorInstrumentation::didReceiveMainResourceError(m_frame, error);
}
- void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, bool shouldContinue)
-@@ -4030,9 +4042,6 @@ String FrameLoader::referrer() const
+ void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, const SecurityOrigin* requesterOrigin, bool shouldContinue)
+@@ -4110,9 +4122,6 @@ String FrameLoader::referrer() const
void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
{
@@ -5597,7 +5607,7 @@ index fd0a865aa9ca1e34eeae0cb522e0c03c4a72d774..9cecc4a144300f0d60aa7ed8d3537288
Vector<Ref<DOMWrapperWorld>> worlds;
ScriptController::getAllWorlds(worlds);
for (auto& world : worlds)
-@@ -4041,13 +4050,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
+@@ -4121,13 +4130,13 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
{
@@ -5630,19 +5640,19 @@ index 29d2e3f46140aaa51160e6a28562f370e371eb21..676ddc9369050c19454fbf5faffac2b2
virtual bool shouldPerformSecurityChecks() const { return false; }
virtual bool havePerformedSecurityChecks(const ResourceResponse&) const { return false; }
diff --git a/Source/WebCore/loader/PolicyChecker.cpp b/Source/WebCore/loader/PolicyChecker.cpp
-index 8079a61388ccbdc52d585ba2d1568b8d5312e718..caceb12b5460454293c820bd1ebcd7fa9017610d 100644
+index b54a6042e66d2e27bdbbc03bafe929dd59895e5b..144cd06630077baecb78a3e83aa9af2076e2aa21 100644
--- a/Source/WebCore/loader/PolicyChecker.cpp
+++ b/Source/WebCore/loader/PolicyChecker.cpp
-@@ -47,6 +47,7 @@
+@@ -46,6 +46,7 @@
#include "HTMLFormElement.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLPlugInElement.h"
+#include "InspectorInstrumentation.h"
#include "Logging.h"
#include "ThreadableBlobRegistry.h"
- #include <wtf/CompletionHandler.h>
+ #include "URLKeepingBlobAlive.h"
diff --git a/Source/WebCore/loader/ProgressTracker.cpp b/Source/WebCore/loader/ProgressTracker.cpp
-index a2c6d72b5ba0f04a49ca6dc710ef6fa5e0125c33..759b0d34b7db839027063a1b6ce8fb0f7ee2acd4 100644
+index 12874da9a80ed235c9a25c5fd05d6c02df62a053..8e0d01703c8d6b2eaa6aa19623f94cc42b69a198 100644
--- a/Source/WebCore/loader/ProgressTracker.cpp
+++ b/Source/WebCore/loader/ProgressTracker.cpp
@@ -160,6 +160,8 @@ void ProgressTracker::progressCompleted(Frame& frame)
@@ -5663,11 +5673,27 @@ index a2c6d72b5ba0f04a49ca6dc710ef6fa5e0125c33..759b0d34b7db839027063a1b6ce8fb0f
}
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 59e8e53a29f5b03476765199e7243f46a522786b..a021e1674e702085c379fddcef74ee555e417cd8 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
+
+ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequest&& request)
+ {
+- if (InspectorInstrumentation::willIntercept(frame(), request.resourceRequest()))
+- return makeUnexpected(ResourceError { errorDomainWebKitInternal, 0, request.resourceRequest().url(), "Inspector intercept"_s });
++ // Playwright: <link rel=preload ... /> requests are intercepted (see https://github.com/microsoft/playwright/issues/16745)
++ // if (InspectorInstrumentation::willIntercept(frame(), request.resourceRequest()))
++ // return makeUnexpected(ResourceError { errorDomainWebKitInternal, 0, request.resourceRequest().url(), "Inspector intercept"_s });
+
+ 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 45da6b795b2f1b28e79bc549effa2fed862cec4c..dfc6c68665eb1c88fcdc116f08764eaa37f8782a 100644
+index 44c390a31d95ba46b8c4094087cd9eb96929d423..8d6ca239802ddbf6fd0406ed84cc255826d96b25 100644
--- a/Source/WebCore/page/ChromeClient.h
+++ b/Source/WebCore/page/ChromeClient.h
-@@ -319,7 +319,7 @@ public:
+@@ -320,7 +320,7 @@ public:
#endif
#if ENABLE(ORIENTATION_EVENTS)
@@ -5677,7 +5703,7 @@ index 45da6b795b2f1b28e79bc549effa2fed862cec4c..dfc6c68665eb1c88fcdc116f08764eaa
#if ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebCore/page/DeprecatedGlobalSettings.cpp b/Source/WebCore/page/DeprecatedGlobalSettings.cpp
-index f23dab33290785df9bfe0a8e305dbc780f33f381..f5cb5d7d7fc6934b0aa8421a3ef120c941c2c09b 100644
+index 05e59ace8adca913c2b9a5cefae6f25667a04d1e..0cbdcbbf56997a453bd7ccd45fd5b17005345f7b 100644
--- a/Source/WebCore/page/DeprecatedGlobalSettings.cpp
+++ b/Source/WebCore/page/DeprecatedGlobalSettings.cpp
@@ -79,7 +79,11 @@ DeprecatedGlobalSettings& DeprecatedGlobalSettings::shared()
@@ -5694,10 +5720,10 @@ index f23dab33290785df9bfe0a8e305dbc780f33f381..f5cb5d7d7fc6934b0aa8421a3ef120c9
#endif
diff --git a/Source/WebCore/page/DeprecatedGlobalSettings.h b/Source/WebCore/page/DeprecatedGlobalSettings.h
-index 58fbc5e15aff1ab5c04952f056d48575c9c68498..2a638ab7da4557ec9be2c5e655f0666d106f9f71 100644
+index 1e5943afa961784ddde45b07d263f46d497431ae..2ee54f0cc981376ae113dd0a208cfce22fb7cb4b 100644
--- a/Source/WebCore/page/DeprecatedGlobalSettings.h
+++ b/Source/WebCore/page/DeprecatedGlobalSettings.h
-@@ -216,6 +216,7 @@ public:
+@@ -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; }
@@ -5706,7 +5732,7 @@ index 58fbc5e15aff1ab5c04952f056d48575c9c68498..2a638ab7da4557ec9be2c5e655f0666d
static bool pageAtRuleSupportEnabled() { return shared().m_pageAtRuleSupportEnabled; }
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp
-index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825afd7af986 100644
+index ed459c110a6d309b43d06c1f2ef39bc7e887132e..9456738629338750f84d37de6013f0c679340109 100644
--- a/Source/WebCore/page/EventHandler.cpp
+++ b/Source/WebCore/page/EventHandler.cpp
@@ -142,6 +142,7 @@
@@ -5717,7 +5743,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
#endif
#if ENABLE(MAC_GESTURE_EVENTS)
-@@ -807,9 +808,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
+@@ -818,9 +819,7 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
m_mousePressNode = event.targetNode();
m_frame.document()->setFocusNavigationStartingNode(event.targetNode());
@@ -5727,7 +5753,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
m_mousePressed = true;
m_selectionInitiationState = HaveNotStartedSelection;
-@@ -849,8 +848,6 @@ VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const Vis
+@@ -860,8 +859,6 @@ VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const Vis
return adjustedTarget->renderer()->positionForPoint(LayoutPoint(selectionEndPoint), nullptr);
}
@@ -5736,7 +5762,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
#if !PLATFORM(IOS_FAMILY)
bool EventHandler::supportsSelectionUpdatesOnMouseDrag() const
-@@ -872,8 +869,10 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -883,8 +880,10 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
Ref<Frame> protectedFrame(m_frame);
@@ -5747,7 +5773,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
RefPtr targetNode = event.targetNode();
if (event.event().button() != LeftButton || !targetNode)
-@@ -894,7 +893,9 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -905,7 +904,9 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
ASSERT(mouseDownMayStartSelect() || m_mouseDownMayStartAutoscroll);
#endif
@@ -5757,7 +5783,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
if (m_mouseDownMayStartAutoscroll && !panScrollInProgress()) {
m_autoscrollController->startAutoscrollForSelection(renderer);
-@@ -911,6 +912,8 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
+@@ -922,6 +923,8 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
return true;
}
@@ -5766,7 +5792,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
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
-@@ -942,6 +945,8 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
+@@ -953,6 +956,8 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
return targetElement && page->dragController().draggableElement(&m_frame, targetElement.get(), result.roundedPointInInnerNodeFrame(), state);
}
@@ -5775,7 +5801,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
void EventHandler::updateSelectionForMouseDrag()
{
if (!supportsSelectionUpdatesOnMouseDrag())
-@@ -1036,7 +1041,6 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul
+@@ -1061,7 +1066,6 @@ void EventHandler::updateSelectionForMouseDrag(const HitTestResult& hitTestResul
if (oldSelection != newSelection && ImageOverlay::isOverlayText(newSelection.start().containerNode()) && ImageOverlay::isOverlayText(newSelection.end().containerNode()))
invalidateClick();
}
@@ -5783,7 +5809,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
void EventHandler::lostMouseCapture()
{
-@@ -1084,9 +1088,7 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e
+@@ -1109,9 +1113,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
@@ -5793,7 +5819,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
&& m_frame.selection().isRange()
&& event.event().button() != RightButton) {
VisibleSelection newSelection;
-@@ -2052,10 +2054,8 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& platformMouseE
+@@ -2088,10 +2090,8 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& platformMouseE
swallowEvent = !dispatchMouseEvent(eventNames().mousemoveEvent, mouseEvent.targetNode(), 0, platformMouseEvent, FireMouseOverOut::Yes);
@@ -5804,7 +5830,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
return swallowEvent;
}
-@@ -4140,7 +4140,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
+@@ -4183,7 +4183,14 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
if (!m_frame.document())
return false;
@@ -5820,7 +5846,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
auto hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No;
if (dragState().shouldDispatchEvents) {
-@@ -4617,7 +4624,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
+@@ -4755,7 +4762,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
allTouchReleased = false;
}
@@ -5830,7 +5856,7 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
PlatformTouchPoint::State pointState = point.state();
LayoutPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos());
-@@ -4744,6 +4752,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
+@@ -4882,6 +4890,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
changedTouches[pointState].m_touches->append(WTFMove(touch));
changedTouches[pointState].m_targets.add(touchTarget);
}
@@ -5841,10 +5867,10 @@ index 2bf547f813052776110c63bc11bb0226c7973bed..a2f4332b8237fe68d980383ac75f825a
m_touchPressed = touches->length() > 0;
if (allTouchReleased)
diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h
-index e3c31cf0b58886e9081b44612aa44476cf9fd0cc..5d0d3444f16953a50b7d3f3a1ca494f3a0dfde7c 100644
+index 6985cd3f00ae178f8e11f4575733767f2f052ee8..fe2111a21248551ac0f7b4f0fd8d5ef3979816a5 100644
--- a/Source/WebCore/page/EventHandler.h
+++ b/Source/WebCore/page/EventHandler.h
-@@ -136,9 +136,7 @@ public:
+@@ -137,9 +137,7 @@ public:
WEBCORE_EXPORT VisiblePosition selectionExtentRespectingEditingBoundary(const VisibleSelection&, const LayoutPoint&, Node*);
@@ -5854,9 +5880,9 @@ index e3c31cf0b58886e9081b44612aa44476cf9fd0cc..5d0d3444f16953a50b7d3f3a1ca494f3
#if ENABLE(PAN_SCROLLING)
void didPanScrollStart();
-@@ -394,10 +392,8 @@ private:
+@@ -398,10 +396,8 @@ private:
bool startKeyboardScrollAnimationOnEnclosingScrollableContainer(ScrollDirection, ScrollGranularity, Node*);
- bool focusedScrollableAreaUsesScrollSnap();
+ bool focusedScrollableAreaShouldUseSmoothKeyboardScrolling();
-#if ENABLE(DRAG_SUPPORT)
bool handleMouseDraggedEvent(const MouseEventWithHitTestResults&, CheckDragHysteresis = ShouldCheckDragHysteresis);
@@ -5865,7 +5891,7 @@ index e3c31cf0b58886e9081b44612aa44476cf9fd0cc..5d0d3444f16953a50b7d3f3a1ca494f3
WEBCORE_EXPORT bool handleMouseReleaseEvent(const MouseEventWithHitTestResults&);
-@@ -497,10 +493,8 @@ private:
+@@ -505,10 +501,8 @@ private:
void defaultTabEventHandler(KeyboardEvent&);
void defaultArrowEventHandler(FocusDirection, KeyboardEvent&);
@@ -5876,7 +5902,7 @@ index e3c31cf0b58886e9081b44612aa44476cf9fd0cc..5d0d3444f16953a50b7d3f3a1ca494f3
// The following are called at the beginning of handleMouseUp and handleDrag.
// If they return true it indicates that they have consumed the event.
-@@ -508,9 +502,10 @@ private:
+@@ -516,9 +510,10 @@ private:
#if ENABLE(DRAG_SUPPORT)
bool eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&);
@@ -5888,18 +5914,18 @@ index e3c31cf0b58886e9081b44612aa44476cf9fd0cc..5d0d3444f16953a50b7d3f3a1ca494f3
enum class SetOrClearLastScrollbar { Clear, Set };
void updateLastScrollbarUnderMouse(Scrollbar*, SetOrClearLastScrollbar);
-@@ -602,8 +597,8 @@ private:
+@@ -610,8 +605,8 @@ private:
Timer m_autoHideCursorTimer;
#endif
-#if ENABLE(DRAG_SUPPORT)
LayoutPoint m_dragStartPosition;
+#if ENABLE(DRAG_SUPPORT)
+ std::optional<SimpleRange> m_dragStartSelection;
RefPtr<Element> m_dragTarget;
bool m_mouseDownMayStartDrag { false };
- bool m_dragMayStartSelectionInstead { false };
diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp
-index 2d1133a87e56315d531f8d6e72c6c6a4c86c126b..571265e1b7ec906af8217cfaa008a99391e8a745 100644
+index 8082d758326c993982746da4f25d5bcaa9877028..abbbee9b596f2b1f6550fe7c339e9aa0b09f0b10 100644
--- a/Source/WebCore/page/Frame.cpp
+++ b/Source/WebCore/page/Frame.cpp
@@ -39,6 +39,7 @@
@@ -5918,7 +5944,7 @@ index 2d1133a87e56315d531f8d6e72c6c6a4c86c126b..571265e1b7ec906af8217cfaa008a993
#include "NodeTraversal.h"
#include "Page.h"
#include "ProcessWarming.h"
-@@ -189,6 +191,7 @@ Frame::Frame(Page& page, HTMLFrameOwnerElement* ownerElement, UniqueRef<FrameLoa
+@@ -180,6 +182,7 @@ Frame::Frame(Page& page, HTMLFrameOwnerElement* ownerElement, UniqueRef<FrameLoa
void Frame::init()
{
@@ -5926,16 +5952,16 @@ index 2d1133a87e56315d531f8d6e72c6c6a4c86c126b..571265e1b7ec906af8217cfaa008a993
m_loader->init();
}
-@@ -373,7 +376,7 @@ void Frame::orientationChanged()
+@@ -359,7 +362,7 @@ void Frame::orientationChanged()
int Frame::orientation() const
{
- if (m_page)
-- return m_page->chrome().client().deviceOrientation();
-+ return m_page->orientation();
+ if (auto* page = this->page())
+- return page->chrome().client().deviceOrientation();
++ return page->orientation();
return 0;
}
#endif // ENABLE(ORIENTATION_EVENTS)
-@@ -1170,6 +1173,362 @@ DataDetectionResultsStorage& Frame::dataDetectionResults()
+@@ -1158,6 +1161,362 @@ DataDetectionResultsStorage& Frame::dataDetectionResults()
#endif
@@ -6299,10 +6325,10 @@ index 2d1133a87e56315d531f8d6e72c6c6a4c86c126b..571265e1b7ec906af8217cfaa008a993
#undef FRAME_RELEASE_LOG_ERROR
diff --git a/Source/WebCore/page/Frame.h b/Source/WebCore/page/Frame.h
-index 856ff374f367332ca5ab10a46bff825b8bcb159b..24bbbcd6b51a9ae27c72a0810c97678afb6b018c 100644
+index 9640894eebf3923ef32cbe33a1b93ee6652a4f30..93f7df7aa691b11bbfe818ffa7f0e808f4c771b3 100644
--- a/Source/WebCore/page/Frame.h
+++ b/Source/WebCore/page/Frame.h
-@@ -113,8 +113,8 @@ enum {
+@@ -111,8 +111,8 @@ enum {
};
enum OverflowScrollAction { DoNotPerformOverflowScroll, PerformOverflowScroll };
@@ -6312,7 +6338,7 @@ index 856ff374f367332ca5ab10a46bff825b8bcb159b..24bbbcd6b51a9ae27c72a0810c97678a
// FIXME: Rename Frame to LocalFrame and AbstractFrame to Frame.
class Frame final : public AbstractFrame {
-@@ -220,10 +220,6 @@ public:
+@@ -214,10 +214,6 @@ public:
WEBCORE_EXPORT DataDetectionResultsStorage& dataDetectionResults();
#endif
@@ -6323,7 +6349,7 @@ index 856ff374f367332ca5ab10a46bff825b8bcb159b..24bbbcd6b51a9ae27c72a0810c97678a
WEBCORE_EXPORT Node* deepestNodeAtLocation(const FloatPoint& viewportLocation);
WEBCORE_EXPORT Node* nodeRespondingToClickEvents(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, SecurityOrigin* = nullptr);
WEBCORE_EXPORT Node* nodeRespondingToDoubleClickEvent(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation);
-@@ -231,6 +227,10 @@ public:
+@@ -225,6 +221,10 @@ public:
WEBCORE_EXPORT Node* nodeRespondingToScrollWheelEvents(const FloatPoint& viewportLocation);
WEBCORE_EXPORT Node* approximateNodeAtViewportLocationLegacy(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation);
@@ -6334,7 +6360,7 @@ index 856ff374f367332ca5ab10a46bff825b8bcb159b..24bbbcd6b51a9ae27c72a0810c97678a
WEBCORE_EXPORT NSArray *wordsInCurrentParagraph() const;
WEBCORE_EXPORT CGRect renderRectForPoint(CGPoint, bool* isReplaced, float* fontSize) const;
-@@ -298,6 +298,7 @@ public:
+@@ -292,6 +292,7 @@ public:
WEBCORE_EXPORT FloatSize screenSize() const;
void setOverrideScreenSize(FloatSize&&);
@@ -6342,7 +6368,7 @@ index 856ff374f367332ca5ab10a46bff825b8bcb159b..24bbbcd6b51a9ae27c72a0810c97678a
void selfOnlyRef();
void selfOnlyDeref();
-@@ -336,7 +337,6 @@ private:
+@@ -327,7 +328,6 @@ private:
#if ENABLE(DATA_DETECTION)
std::unique_ptr<DataDetectionResultsStorage> m_dataDetectionResults;
#endif
@@ -6350,7 +6376,7 @@ index 856ff374f367332ca5ab10a46bff825b8bcb159b..24bbbcd6b51a9ae27c72a0810c97678a
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);
-@@ -344,6 +344,7 @@ private:
+@@ -335,6 +335,7 @@ private:
enum class ShouldFindRootEditableElement : bool { No, Yes };
Node* qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, const NodeQualifier&, ShouldApproximate, ShouldFindRootEditableElement = ShouldFindRootEditableElement::Yes);
@@ -6419,7 +6445,7 @@ index bb1bc2ffd02177718a77c5534e66bed55232e660..1eaff1702c30b337d4a8f5a804a9a4b1
struct SnapshotOptions {
diff --git a/Source/WebCore/page/History.cpp b/Source/WebCore/page/History.cpp
-index a782c3be51ca113a52482c5a10583c8fa64724ef..1d82dff81be5c5492efb3bfe77d2f259c2f2b5db 100644
+index 8b29ef05fbe815bc3f7505f624940294bee2c4f7..1a1348144f68982cebcef18418c317dbe8bbc2f1 100644
--- a/Source/WebCore/page/History.cpp
+++ b/Source/WebCore/page/History.cpp
@@ -33,6 +33,7 @@
@@ -6430,7 +6456,7 @@ index a782c3be51ca113a52482c5a10583c8fa64724ef..1d82dff81be5c5492efb3bfe77d2f259
#include "Logging.h"
#include "NavigationScheduler.h"
#include "Page.h"
-@@ -260,6 +261,7 @@ ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& data
+@@ -272,6 +273,7 @@ ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& data
if (!urlString.isEmpty())
frame->document()->updateURLForPushOrReplaceState(fullURL);
@@ -6439,10 +6465,10 @@ index a782c3be51ca113a52482c5a10583c8fa64724ef..1d82dff81be5c5492efb3bfe77d2f259
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 0e42a6dcd65bbb96e163a7508849145d3332be83..447ab395d74072b5a7bf47a6f830d27abd2decbf 100644
+index a10fa4ef64f030ae2cb48cab689cf9bd6f25e295..2625f6b5620fcd8a7a88b7b69df46cc3678ac6f3 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
-@@ -486,6 +486,37 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
+@@ -490,6 +490,37 @@ void Page::setOverrideViewportArguments(const std::optional<ViewportArguments>&
document->updateViewportArguments();
}
@@ -6480,7 +6506,7 @@ index 0e42a6dcd65bbb96e163a7508849145d3332be83..447ab395d74072b5a7bf47a6f830d27a
ScrollingCoordinator* Page::scrollingCoordinator()
{
if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) {
-@@ -1375,10 +1406,6 @@ void Page::didCommitLoad()
+@@ -1411,10 +1442,6 @@ void Page::didCommitLoad()
m_isEditableRegionEnabled = false;
#endif
@@ -6491,7 +6517,7 @@ index 0e42a6dcd65bbb96e163a7508849145d3332be83..447ab395d74072b5a7bf47a6f830d27a
resetSeenPlugins();
resetSeenMediaEngines();
-@@ -3420,6 +3447,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
+@@ -3488,6 +3515,26 @@ void Page::setUseDarkAppearanceOverride(std::optional<bool> valueOverride)
#endif
}
@@ -6519,10 +6545,10 @@ index 0e42a6dcd65bbb96e163a7508849145d3332be83..447ab395d74072b5a7bf47a6f830d27a
{
if (insets == m_fullscreenInsets)
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
-index 680b1008ce574f1f50f61940a6647a74019063d5..7a252304e48e522b5c082494b22f447f3a0092c6 100644
+index 64efd272b34db5447eeaf797fa880d1a49c2e7a2..463e55ba610411303f5a45122ec85e8a159d0207 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
-@@ -285,6 +285,9 @@ public:
+@@ -287,6 +287,9 @@ public:
const std::optional<ViewportArguments>& overrideViewportArguments() const { return m_overrideViewportArguments; }
WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional<ViewportArguments>&);
@@ -6532,7 +6558,7 @@ index 680b1008ce574f1f50f61940a6647a74019063d5..7a252304e48e522b5c082494b22f447f
static void refreshPlugins(bool reload);
WEBCORE_EXPORT PluginData& pluginData();
void clearPluginData();
-@@ -339,6 +342,10 @@ public:
+@@ -341,6 +344,10 @@ public:
DragCaretController& dragCaretController() const { return *m_dragCaretController; }
#if ENABLE(DRAG_SUPPORT)
DragController& dragController() const { return *m_dragController; }
@@ -6543,7 +6569,7 @@ index 680b1008ce574f1f50f61940a6647a74019063d5..7a252304e48e522b5c082494b22f447f
#endif
FocusController& focusController() const { return *m_focusController; }
#if ENABLE(CONTEXT_MENUS)
-@@ -506,6 +513,10 @@ public:
+@@ -508,6 +515,10 @@ public:
WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel);
bool defaultUseDarkAppearance() const { return m_useDarkAppearance; }
void setUseDarkAppearanceOverride(std::optional<bool>);
@@ -6554,7 +6580,7 @@ index 680b1008ce574f1f50f61940a6647a74019063d5..7a252304e48e522b5c082494b22f447f
#if ENABLE(TEXT_AUTOSIZING)
float textAutosizingWidth() const { return m_textAutosizingWidth; }
-@@ -913,6 +924,11 @@ public:
+@@ -922,6 +933,11 @@ public:
WEBCORE_EXPORT void setInteractionRegionsEnabled(bool);
#endif
@@ -6566,7 +6592,7 @@ index 680b1008ce574f1f50f61940a6647a74019063d5..7a252304e48e522b5c082494b22f447f
#if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); }
#endif
-@@ -1034,6 +1050,9 @@ private:
+@@ -1046,6 +1062,9 @@ private:
#if ENABLE(DRAG_SUPPORT)
const std::unique_ptr<DragController> m_dragController;
@@ -6576,7 +6602,7 @@ index 680b1008ce574f1f50f61940a6647a74019063d5..7a252304e48e522b5c082494b22f447f
#endif
const std::unique_ptr<FocusController> m_focusController;
#if ENABLE(CONTEXT_MENUS)
-@@ -1113,6 +1132,8 @@ private:
+@@ -1125,6 +1144,8 @@ private:
bool m_useElevatedUserInterfaceLevel { false };
bool m_useDarkAppearance { false };
std::optional<bool> m_useDarkAppearanceOverride;
@@ -6585,7 +6611,7 @@ index 680b1008ce574f1f50f61940a6647a74019063d5..7a252304e48e522b5c082494b22f447f
#if ENABLE(TEXT_AUTOSIZING)
float m_textAutosizingWidth { 0 };
-@@ -1288,6 +1309,11 @@ private:
+@@ -1302,6 +1323,11 @@ private:
#endif
std::optional<ViewportArguments> m_overrideViewportArguments;
@@ -6669,50 +6695,50 @@ index 8c911ca663507b61640a4e29245dabe79573c420..08cdd2bfea9f5ac19c8cc39dc80032e1
#endif
bool hasAnyElement() const {
diff --git a/Source/WebCore/page/Screen.cpp b/Source/WebCore/page/Screen.cpp
-index a204ceb7d50a08631dd6e90cd11a2202571e4d76..af8cce6a1732fd7455ff362961e0ebcd71f6f459 100644
+index 3c70bb46c5322bf836ca78e9ac5e78cad4da6e2b..8f6b1667907f9b4f374f96fbfb0293bcefe997db 100644
--- a/Source/WebCore/page/Screen.cpp
+++ b/Source/WebCore/page/Screen.cpp
-@@ -102,6 +102,8 @@ int Screen::availLeft() const
+@@ -105,6 +105,8 @@ int Screen::availLeft() const
return 0;
if (DeprecatedGlobalSettings::webAPIStatisticsEnabled())
- ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::AvailLeft);
+ ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ScreenAPIsAccessed::AvailLeft);
+ if (frame->hasScreenSizeOverride())
+ return 0;
return static_cast<int>(screenAvailableRect(frame->view()).x());
}
-@@ -112,6 +114,8 @@ int Screen::availTop() const
+@@ -115,6 +117,8 @@ int Screen::availTop() const
return 0;
if (DeprecatedGlobalSettings::webAPIStatisticsEnabled())
- ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::AvailTop);
+ ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ScreenAPIsAccessed::AvailTop);
+ if (frame->hasScreenSizeOverride())
+ return 0;
return static_cast<int>(screenAvailableRect(frame->view()).y());
}
-@@ -122,6 +126,8 @@ unsigned Screen::availHeight() const
+@@ -125,6 +129,8 @@ unsigned Screen::availHeight() const
return 0;
if (DeprecatedGlobalSettings::webAPIStatisticsEnabled())
- ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::AvailHeight);
+ 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());
}
-@@ -132,6 +138,8 @@ unsigned Screen::availWidth() const
+@@ -135,6 +141,8 @@ unsigned Screen::availWidth() const
return 0;
if (DeprecatedGlobalSettings::webAPIStatisticsEnabled())
- ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::AvailWidth);
+ 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());
}
diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
-index 3cb3184dc359d5a6ad9159e5991e2309d0d0099b..4aaff93ba52e9ec097540e5a57140dca1bda2ec5 100644
+index 18dfe523967e9f727eba2ec4aa65aa832594602a..3fd356023550d75915e7f92845436fc74062f484 100644
--- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
+++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
-@@ -298,6 +298,8 @@ bool ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtoc
+@@ -325,6 +325,8 @@ bool ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtoc
template<typename Predicate, typename... Args>
typename std::enable_if<!std::is_convertible<Predicate, ContentSecurityPolicy::ViolatedDirectiveCallback>::value, bool>::type ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposition, Predicate&& predicate, Args&&... args) const
{
@@ -6721,7 +6747,7 @@ index 3cb3184dc359d5a6ad9159e5991e2309d0d0099b..4aaff93ba52e9ec097540e5a57140dca
bool isReportOnly = disposition == ContentSecurityPolicy::Disposition::ReportOnly;
for (auto& policy : m_policies) {
if (policy->isReportOnly() != isReportOnly)
-@@ -311,6 +313,8 @@ typename std::enable_if<!std::is_convertible<Predicate, ContentSecurityPolicy::V
+@@ -338,6 +340,8 @@ typename std::enable_if<!std::is_convertible<Predicate, ContentSecurityPolicy::V
template<typename Predicate, typename... Args>
bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposition, ViolatedDirectiveCallback&& callback, Predicate&& predicate, Args&&... args) const
{
@@ -6730,7 +6756,7 @@ index 3cb3184dc359d5a6ad9159e5991e2309d0d0099b..4aaff93ba52e9ec097540e5a57140dca
bool isReportOnly = disposition == ContentSecurityPolicy::Disposition::ReportOnly;
bool isAllowed = true;
for (auto& policy : m_policies) {
-@@ -327,6 +331,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit
+@@ -354,6 +358,8 @@ bool ContentSecurityPolicy::allPoliciesWithDispositionAllow(Disposition disposit
template<typename Predicate, typename... Args>
bool ContentSecurityPolicy::allPoliciesAllow(ViolatedDirectiveCallback&& callback, Predicate&& predicate, Args&&... args) const
{
@@ -6838,7 +6864,7 @@ index 1fb0e9d5cee3b3df4ee1e96eb8d75016ad687fc5..497bd34cc97e2d20c9d6982a8d92d852
)
diff --git a/Source/WebCore/platform/DragData.h b/Source/WebCore/platform/DragData.h
-index 6600dfa7b189e15fab7fb796f66ef1a79dcd22f3..4c0bc485ca92614efca23a5a2da871b77d5285d3 100644
+index 9bfca89c3beb3de7436072f78eafff543f9501cc..001008647d3ff26525a55649ee383130a9045d24 100644
--- a/Source/WebCore/platform/DragData.h
+++ b/Source/WebCore/platform/DragData.h
@@ -48,7 +48,7 @@ typedef void* DragDataRef;
@@ -6864,7 +6890,7 @@ index 9e97dd5f689e6a1a90c9069445dc3f4b8c45e840..cc3ddc3e6d656a91c5ed58e050483d37
IntSize dragImageSize(DragImageRef)
{
diff --git a/Source/WebCore/platform/Pasteboard.h b/Source/WebCore/platform/Pasteboard.h
-index 6c8bff431b593b2443e411381f634e417f71cf06..c48473c936e9f7d997db8006770ae1488e1b2a1f 100644
+index e85de1de305e3c3313fe86b2f21056e0a7ec26e2..04344917c936497e38e33e0421083a657f558035 100644
--- a/Source/WebCore/platform/Pasteboard.h
+++ b/Source/WebCore/platform/Pasteboard.h
@@ -44,7 +44,7 @@ OBJC_CLASS NSString;
@@ -6876,25 +6902,7 @@ index 6c8bff431b593b2443e411381f634e417f71cf06..c48473c936e9f7d997db8006770ae148
#include "SelectionData.h"
#endif
-@@ -92,16 +92,12 @@ struct PasteboardWebContent {
- Vector<String> clientTypes;
- Vector<RefPtr<SharedBuffer>> clientData;
- #endif
--#if PLATFORM(GTK)
-+#if PLATFORM(GTK) || PLATFORM(WPE)
- String contentOrigin;
- bool canSmartCopyOrDelete;
- String text;
- String markup;
- #endif
--#if USE(LIBWPE)
-- String text;
-- String markup;
--#endif
- };
-
- struct PasteboardURL {
-@@ -110,7 +106,7 @@ struct PasteboardURL {
+@@ -108,7 +108,7 @@ struct PasteboardURL {
#if PLATFORM(MAC)
String userVisibleForm;
#endif
@@ -6903,7 +6911,7 @@ index 6c8bff431b593b2443e411381f634e417f71cf06..c48473c936e9f7d997db8006770ae148
String markup;
#endif
};
-@@ -200,6 +196,11 @@ public:
+@@ -193,6 +193,11 @@ public:
#endif
#endif
@@ -6915,7 +6923,7 @@ index 6c8bff431b593b2443e411381f634e417f71cf06..c48473c936e9f7d997db8006770ae148
#if PLATFORM(WIN)
explicit Pasteboard(std::unique_ptr<PasteboardContext>&&, IDataObject*);
explicit Pasteboard(std::unique_ptr<PasteboardContext>&&, WCDataObject*);
-@@ -266,6 +267,12 @@ public:
+@@ -259,6 +264,12 @@ public:
static std::unique_ptr<Pasteboard> createForGlobalSelection(std::unique_ptr<PasteboardContext>&&);
#endif
@@ -6928,7 +6936,7 @@ index 6c8bff431b593b2443e411381f634e417f71cf06..c48473c936e9f7d997db8006770ae148
#if PLATFORM(IOS_FAMILY)
explicit Pasteboard(std::unique_ptr<PasteboardContext>&&, int64_t changeCount);
explicit Pasteboard(std::unique_ptr<PasteboardContext>&&, const String& pasteboardName);
-@@ -300,6 +307,7 @@ public:
+@@ -293,6 +304,7 @@ public:
COMPtr<IDataObject> dataObject() const { return m_dataObject; }
void setExternalDataObject(IDataObject*);
const DragDataMap& dragDataMap() const { return m_dragDataMap; }
@@ -6936,7 +6944,7 @@ index 6c8bff431b593b2443e411381f634e417f71cf06..c48473c936e9f7d997db8006770ae148
void writeURLToWritableDataObject(const URL&, const String&);
COMPtr<WCDataObject> writableDataObject() const { return m_writableDataObject; }
void writeImageToDataObject(Element&, const URL&); // FIXME: Layering violation.
-@@ -351,6 +359,10 @@ private:
+@@ -344,6 +356,10 @@ private:
String m_name;
#endif
@@ -6947,7 +6955,7 @@ index 6c8bff431b593b2443e411381f634e417f71cf06..c48473c936e9f7d997db8006770ae148
#if PLATFORM(COCOA)
String m_pasteboardName;
int64_t m_changeCount;
-@@ -366,6 +378,7 @@ private:
+@@ -359,6 +375,7 @@ private:
COMPtr<IDataObject> m_dataObject;
COMPtr<WCDataObject> m_writableDataObject;
DragDataMap m_dragDataMap;
@@ -7027,10 +7035,10 @@ index 44799e0b2a93cbcf25f4315d62a3d95896c02f3d..29277223448a0936a16f975970ab60d7
#endif
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
-index 59c42302727cdb400f4832d09ad1ece583d84aa5..b44626f26509dd6978495560d087ddb289392bed 100644
+index 49ffc11a7aab50e52144275e37841dcd602a3842..fb43d85c27a65ef2205a079dd6574310ab198b21 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
-@@ -103,7 +103,7 @@ public:
+@@ -110,7 +110,7 @@ public:
void stopKeyboardScrollAnimation();
#if ENABLE(TOUCH_EVENTS)
@@ -7053,10 +7061,10 @@ index 53f48ba8ad99364680457daf4dcbae632360be12..8825859d561113f14ba6ef8d860c5202
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..f0c3a183e5bc44bdfa4201e0db2067b41bf51580
+index 0000000000000000000000000000000000000000..9713ccd3229ec26874b29de468bd9f9081ea641b
--- /dev/null
+++ b/Source/WebCore/platform/glib/PlatformSpeechSynthesizerGLib.cpp
-@@ -0,0 +1,68 @@
+@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
@@ -7089,7 +7097,12 @@ index 0000000000000000000000000000000000000000..f0c3a183e5bc44bdfa4201e0db2067b4
+
+namespace WebCore {
+
-+PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient* client)
++Ref<PlatformSpeechSynthesizer> PlatformSpeechSynthesizer::create(PlatformSpeechSynthesizerClient& client)
++{
++ return adoptRef(*new PlatformSpeechSynthesizer(client));
++}
++
++PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient& client)
+ : m_speechSynthesizerClient(client)
+{
+}
@@ -7126,10 +7139,10 @@ index 0000000000000000000000000000000000000000..f0c3a183e5bc44bdfa4201e0db2067b4
+
+#endif // ENABLE(SPEECH_SYNTHESIS)
diff --git a/Source/WebCore/platform/graphics/FontCascade.h b/Source/WebCore/platform/graphics/FontCascade.h
-index 7eab503aba753ba11a67417e809bc24e5cdb1eae..891e928b4c992acee19cf29cfa3f3a35734a814e 100644
+index 5ed6a20e4830587cc6302b01787e4ca6d928c9db..3a4eff8a36184e777d49b1faab38ebfa960676eb 100644
--- a/Source/WebCore/platform/graphics/FontCascade.h
+++ b/Source/WebCore/platform/graphics/FontCascade.h
-@@ -310,7 +310,8 @@ private:
+@@ -308,7 +308,8 @@ private:
return true;
if (textRenderingMode == TextRenderingMode::OptimizeSpeed)
return false;
@@ -7139,6 +7152,46 @@ index 7eab503aba753ba11a67417e809bc24e5cdb1eae..891e928b4c992acee19cf29cfa3f3a35
return true;
#else
return false;
+diff --git a/Source/WebCore/platform/graphics/GraphicsStyle.h b/Source/WebCore/platform/graphics/GraphicsStyle.h
+index 7fcd97b7e8f99b05b700c63a7ae4d81eab53e4d8..2e6043d13f5f118d0e9903dd3f96d3247af0102c 100644
+--- a/Source/WebCore/platform/graphics/GraphicsStyle.h
++++ b/Source/WebCore/platform/graphics/GraphicsStyle.h
+@@ -49,6 +49,11 @@ inline bool operator==(const GraphicsDropShadow& a, const GraphicsDropShadow& b)
+ return a.offset == b.offset && a.radius == b.radius && a.color == b.color;
+ }
+
++inline bool operator!=(const GraphicsDropShadow& a, const GraphicsDropShadow& b)
++{
++ return !(a == b);
++}
++
+ struct GraphicsGaussianBlur {
+ FloatSize radius;
+
+@@ -61,6 +66,11 @@ inline bool operator==(const GraphicsGaussianBlur& a, const GraphicsGaussianBlur
+ return a.radius == b.radius;
+ }
+
++inline bool operator!=(const GraphicsGaussianBlur& a, const GraphicsGaussianBlur& b)
++{
++ return !(a == b);
++}
++
+ struct GraphicsColorMatrix {
+ std::array<float, 20> values;
+
+@@ -73,6 +83,11 @@ inline bool operator==(const GraphicsColorMatrix& a, const GraphicsColorMatrix&
+ return a.values == b.values;
+ }
+
++inline bool operator!=(const GraphicsColorMatrix& a, const GraphicsColorMatrix& b)
++{
++ return !(a == b);
++}
++
+ using GraphicsStyle = std::variant<
+ GraphicsDropShadow,
+ GraphicsGaussianBlur,
diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp
index 97f733ef9af5558ef7375ab2b74c8d4c6e6d8502..cd201b0155a4e12576c2bd1af8b45c4be1101763 100644
--- a/Source/WebCore/platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp
@@ -7259,94 +7312,30 @@ index b60f9a64bacc8282860da6de299b75aeb295b9b5..55bd017c03c6478ca334bd5ef164160f
namespace WebCore {
-diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
-index 761a1b18570e48c1769d894781475d2771bb9173..396b72f62a027210582e2b53df4d5606952f781d 100644
---- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
-+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
-@@ -108,6 +108,55 @@ void webkitGstVideoFormatInfoComponent(const GstVideoFormatInfo* info, guint pla
+diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
+index 2fc402a9d5270ee610dcb81ff856c597a0df7cfa..d551be654bfa428c999d804977b22dfdb858fa1c 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)
+ return true;
}
- #endif
++// gst_element_get_current_running_time() is GStreamer 1.18 API, so for older versions we use a local
++// vendored copy of the function.
+#if !GST_CHECK_VERSION(1, 18, 0)
-+GstClockTime gst_element_get_current_clock_time(GstElement * element)
-+{
-+ GstClock *clock = NULL;
-+ GstClockTime ret;
-+
-+ g_return_val_if_fail (GST_IS_ELEMENT (element), GST_CLOCK_TIME_NONE);
-+
-+ clock = gst_element_get_clock (element);
-+
-+ if (!clock) {
-+ GST_DEBUG_OBJECT (element, "Element has no clock");
-+ return GST_CLOCK_TIME_NONE;
-+ }
-+
-+ ret = gst_clock_get_time (clock);
-+ gst_object_unref (clock);
-+
-+ return ret;
-+}
-+
-+GstClockTime webkitGstElementGetCurrentRunningTime(GstElement * element)
-+{
-+ GstClockTime base_time, clock_time;
-+
-+ g_return_val_if_fail (GST_IS_ELEMENT (element), GST_CLOCK_TIME_NONE);
-+
-+ base_time = gst_element_get_base_time (element);
-+
-+ if (!GST_CLOCK_TIME_IS_VALID (base_time)) {
-+ GST_DEBUG_OBJECT (element, "Could not determine base time");
-+ return GST_CLOCK_TIME_NONE;
-+ }
-+
-+ clock_time = gst_element_get_current_clock_time (element);
-+
-+ if (!GST_CLOCK_TIME_IS_VALID (clock_time)) {
-+ return GST_CLOCK_TIME_NONE;
-+ }
-+
-+ if (clock_time < base_time) {
-+ GST_DEBUG_OBJECT (element, "Got negative current running time");
-+ return GST_CLOCK_TIME_NONE;
-+ }
-+
-+ return clock_time - base_time;
-+}
++GstClockTime webkitGstElementGetCurrentRunningTime(GstElement*);
++#define gst_element_get_current_running_time webkitGstElementGetCurrentRunningTime
+#endif
+
- #if ENABLE(VIDEO)
- bool getVideoSizeAndFormatFromCaps(const GstCaps* caps, WebCore::IntSize& size, GstVideoFormat& format, int& pixelAspectRatioNumerator, int& pixelAspectRatioDenominator, int& stride)
- {
-diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
-index ddfdee52fffb5e9c9ab68c4503df8b26a4c288e5..fc52dd2034f072fa084584018d45873f4152c5e9 100644
---- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
-+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
-@@ -60,8 +60,10 @@ inline bool webkitGstCheckVersion(guint major, guint minor, guint micro)
+ // gst_video_format_info_component() is GStreamer 1.18 API, so for older versions we use a local
+ // vendored copy of the function.
#if !GST_CHECK_VERSION(1, 18, 0)
#define GST_VIDEO_MAX_COMPONENTS 4
void webkitGstVideoFormatInfoComponent(const GstVideoFormatInfo*, guint, gint components[GST_VIDEO_MAX_COMPONENTS]);
-+GstClockTime webkitGstElementGetCurrentRunningTime(GstElement * element);
-
+-
#define gst_video_format_info_component webkitGstVideoFormatInfoComponent
-+#define gst_element_get_current_running_time webkitGstElementGetCurrentRunningTime
#endif
- #define GST_VIDEO_CAPS_TYPE_PREFIX "video/"
-diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
-index ce40cc903f98688cbd2da28c0f0ed6660ce38b52..808e5e68f6abafc3a200f6c2d7cd12c9f34be473 100644
---- a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
-+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
-@@ -27,7 +27,7 @@
- #include "config.h"
- #include "GraphicsContextGLOpenGL.h"
-
--#if ENABLE(WEBGL) && USE(OPENGL)
-+#if !PLATFORM(WIN) && ENABLE(WEBGL) && USE(OPENGL)
-
- #include "ByteArrayPixelBuffer.h"
- #include "ExtensionsGLOpenGL.h"
diff --git a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp b/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp
index 6d6820fc22f9a7102bbdad6c4b5e3e7e9645f66c..f44797b8c197bf1b3daaa9b59dad2a8e250c4791 100644
--- a/Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp
@@ -7395,7 +7384,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 dd5fb8634277baea92be6ecaf6d2fbc7ce7ee9f0..9aa9e4d923d487cd4003e7396ebe61c7df51057d 100644
+index e55d0559b18f4a6ba3b5a64675bad8ada08ae19a..da2ef1b4bd5ef78cbbe5dc555f2d97c2767af50d 100644
--- a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
+++ b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
@@ -37,8 +37,10 @@
@@ -7409,7 +7398,7 @@ index dd5fb8634277baea92be6ecaf6d2fbc7ce7ee9f0..9aa9e4d923d487cd4003e7396ebe61c7
namespace WebCore {
-@@ -1294,6 +1296,246 @@ int PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode(unsigned keycode)
+@@ -1302,6 +1304,246 @@ int PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode(unsigned keycode)
}
@@ -7679,7 +7668,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..c004d77c162f87701278fa1ada9200b92a8e7838 100644
+index ae439e30f1fb239d18e1164e8896dfb272c75673..1f7ee7a1ed4b81219ffdb6eeb1fcc54013a74c42 100644
--- a/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp
+++ b/Source/WebCore/platform/libwpe/PasteboardLibWPE.cpp
@@ -32,6 +32,10 @@
@@ -7758,7 +7747,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..c004d77c162f87701278fa1ada9200b9
}
void Pasteboard::write(const PasteboardBuffer&)
-@@ -129,7 +165,14 @@ void Pasteboard::write(const PasteboardBuffer&)
+@@ -129,7 +165,13 @@ void Pasteboard::write(const PasteboardBuffer&)
void Pasteboard::write(const PasteboardWebContent& content)
{
@@ -7767,14 +7756,13 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..c004d77c162f87701278fa1ada9200b9
+ m_selectionData->clearAll();
+ m_selectionData->setText(content.text);
+ m_selectionData->setMarkup(content.markup);
-+ m_selectionData->setCanSmartReplace(content.canSmartCopyOrDelete);
+ } else {
+ platformStrategies()->pasteboardStrategy()->writeToPasteboard(content);
+ }
}
Pasteboard::FileContentState Pasteboard::fileContentState()
-@@ -160,6 +203,35 @@ void Pasteboard::write(const Color&)
+@@ -160,6 +202,35 @@ void Pasteboard::write(const Color&)
{
}
@@ -7811,7 +7799,7 @@ index ae439e30f1fb239d18e1164e8896dfb272c75673..c004d77c162f87701278fa1ada9200b9
#endif // USE(LIBWPE)
diff --git a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
-index a724f126f8f389d46ba5c1a941eef76fdc59c94c..aa40f6c3ee81213074639cce1d18eb21c6e204f4 100644
+index d81c80ccc4b6619812d59e02595d8aa6821f4bec..59c3db0cb8f67788cbef6430b4085c3676101e6a 100644
--- a/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
+++ b/Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp
@@ -30,8 +30,10 @@
@@ -7825,7 +7813,7 @@ index a724f126f8f389d46ba5c1a941eef76fdc59c94c..aa40f6c3ee81213074639cce1d18eb21
namespace WebCore {
-@@ -1291,6 +1293,246 @@ int PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode(unsigned keycode)
+@@ -1299,6 +1301,246 @@ int PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode(unsigned keycode)
return 0;
}
@@ -8176,11 +8164,24 @@ index 93db57fd75b8fcac1a745f62294e27c97e040ab0..02411ac6bb361c2677c269945f665e0a
}
Vector<String> PlatformPasteboard::typesSafeForDOMToReadAndWrite(const String&) const
+diff --git a/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/LibWebRTCProviderGStreamer.h b/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/LibWebRTCProviderGStreamer.h
+index b191296067d18bca4495f2b331a12f6257ae07bc..803c05a88f181781a9d197872813903f607204e5 100644
+--- a/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/LibWebRTCProviderGStreamer.h
++++ b/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/LibWebRTCProviderGStreamer.h
+@@ -30,6 +30,8 @@
+ #include "GStreamerVideoDecoderFactory.h"
+ #include "GStreamerVideoEncoderFactory.h"
+
++#include "LibWebRTCProvider.h"
++
+ namespace WebCore {
+
+ class WEBCORE_EXPORT LibWebRTCProviderGStreamer : public LibWebRTCProvider {
diff --git a/Source/WebCore/platform/network/HTTPHeaderMap.cpp b/Source/WebCore/platform/network/HTTPHeaderMap.cpp
-index f169677e661510b225b899c79b68d040179a097a..420e101c7bb7a49b5c644076a8a2ffab2282d758 100644
+index 35ade40b37f0c476815535541118f9246ed199cd..2bd1444f9a5e9a14ab3d6acbc020434e1f55ede1 100644
--- a/Source/WebCore/platform/network/HTTPHeaderMap.cpp
+++ b/Source/WebCore/platform/network/HTTPHeaderMap.cpp
-@@ -229,8 +229,11 @@ void HTTPHeaderMap::add(HTTPHeaderName name, const String& value)
+@@ -235,8 +235,11 @@ void HTTPHeaderMap::add(HTTPHeaderName name, const String& value)
auto index = m_commonHeaders.findIf([&](auto& header) {
return header.key == name;
});
@@ -8194,7 +8195,7 @@ index f169677e661510b225b899c79b68d040179a097a..420e101c7bb7a49b5c644076a8a2ffab
m_commonHeaders.append(CommonHeader { name, value });
}
diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h
-index cad5fdc361c1ae84f56e0c8cba754ede9b70450f..64ba38b5a05202ae2ec5ec4d244177a7b169e569 100644
+index 1e5675e4e072600844cf5948a627376df44f9437..718db1a41924e2b93581a1d1e3f8e497d64f0ea1 100644
--- a/Source/WebCore/platform/network/NetworkStorageSession.h
+++ b/Source/WebCore/platform/network/NetworkStorageSession.h
@@ -156,6 +156,8 @@ public:
@@ -8207,10 +8208,10 @@ index cad5fdc361c1ae84f56e0c8cba754ede9b70450f..64ba38b5a05202ae2ec5ec4d244177a7
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.h b/Source/WebCore/platform/network/ResourceResponseBase.h
-index cd8cde01d0bbb527983cee06f1759ff35bea2f9a..c87610f9a3386d518b3cf8529a42d61dbac200b1 100644
+index 238b1349e1fc1a9ee168c82b35c6190ef3c46d24..d834ac702c5924044be3e4d84385288414c3e6ea 100644
--- a/Source/WebCore/platform/network/ResourceResponseBase.h
+++ b/Source/WebCore/platform/network/ResourceResponseBase.h
-@@ -224,6 +224,8 @@ public:
+@@ -230,6 +230,8 @@ public:
WEBCORE_EXPORT static ResourceResponse dataURLResponse(const URL&, const DataURLDecoder::Result&);
@@ -8219,7 +8220,7 @@ index cd8cde01d0bbb527983cee06f1759ff35bea2f9a..c87610f9a3386d518b3cf8529a42d61d
protected:
enum InitLevel {
Uninitialized,
-@@ -303,6 +305,7 @@ void ResourceResponseBase::encode(Encoder& encoder) const
+@@ -310,6 +312,7 @@ void ResourceResponseBase::encode(Encoder& encoder) const
encoder << m_httpStatusText;
encoder << m_httpVersion;
encoder << m_httpHeaderFields;
@@ -8227,7 +8228,7 @@ index cd8cde01d0bbb527983cee06f1759ff35bea2f9a..c87610f9a3386d518b3cf8529a42d61d
// We don't want to put the networkLoadMetrics info
// into the disk cache, because we will never use the old info.
-@@ -375,6 +378,12 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon
+@@ -384,6 +387,12 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon
return false;
response.m_httpHeaderFields = WTFMove(*httpHeaderFields);
@@ -8241,7 +8242,7 @@ index cd8cde01d0bbb527983cee06f1759ff35bea2f9a..c87610f9a3386d518b3cf8529a42d61d
if constexpr (Decoder::isIPCDecoder) {
std::optional<Box<NetworkLoadMetrics>> networkLoadMetrics;
diff --git a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
-index a32a938cceed433559c00e15c72f6a47465ec575..1759e5d76989670705100cb3427a79b5ce35b761 100644
+index f44cc0669cc095f192960b4767e8f61b13519937..6b06efd4233287b5dd8ba968bd77eb30d87f8fbd 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
@@ -8361,7 +8362,7 @@ index 0c39c90aac884fca48849388acc1b42bad16d620..dd8e50686c348b46d5ae92fd67a31eb0
void send(CurlStreamID, UniqueArray<uint8_t>&&, size_t);
diff --git a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
-index 1b93415110a77d443d951890095c31fdadf889e9..b7682f0a2539b1a98c23e5391ec255f169768b32 100644
+index 93f996d23372b2aee03f480d31905bddfa0e221a..cfd265e7576d4871c09c67aa3f53423af1fc2f08 100644
--- a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
+++ b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
@@ -118,6 +118,12 @@ void NetworkStorageSession::setCookieAcceptPolicy(CookieAcceptPolicy policy) con
@@ -8422,7 +8423,7 @@ index e106d2e9c4bdf2f099c34d61270ab1ab12e1b1bc..d1ffe11e4fc2a0bece55c4a70f4d1eef
SocketStreamHandleImpl::~SocketStreamHandleImpl()
diff --git a/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp b/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
-index 1c91f93595ab4362409762530880878e3804c2b8..8848c9d880f341d4a0de089ff0ddc1d0fdde5ea4 100644
+index ad7471cbd809b2c9b8bedeab15ead1f9d824b8e3..07ce9246c343d18602b31481f6df0c8603d15ba2 100644
--- a/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
+++ b/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
@@ -410,6 +410,30 @@ void NetworkStorageSession::setCookie(const Cookie& cookie)
@@ -8457,7 +8458,7 @@ index 1c91f93595ab4362409762530880878e3804c2b8..8848c9d880f341d4a0de089ff0ddc1d0
{
GUniquePtr<SoupCookie> targetCookie(cookie.toSoupCookie());
diff --git a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
-index e3b1ba835135de598a653c823872ff4f01bec4b9..84ae88e1245572de6770c7aa1345da14af99b8fb 100644
+index 726b26ae3157c1b92c7f6f51f3d31d0bbd52bac2..a811a177ff06cee89e558b2d47a803688be4b9ef 100644
--- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
+++ b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
@@ -39,6 +39,7 @@
@@ -8505,10 +8506,10 @@ index 207572d157ba2173c045e01da8f9b83b034c047e..6590bd36b23bdcbc947b191d2c011414
}
diff --git a/Source/WebCore/platform/win/KeyEventWin.cpp b/Source/WebCore/platform/win/KeyEventWin.cpp
-index 05a0d1256a136982507b732c7852bbece201b513..f2c00eca40fbf3a88780610228f60ba6f8c1f441 100644
+index 2d2a6796dda9e52bf0eff2552d219f8b19c83e75..8e09a99d9d0dc3e14d8a2054c03504072874f7fa 100644
--- a/Source/WebCore/platform/win/KeyEventWin.cpp
+++ b/Source/WebCore/platform/win/KeyEventWin.cpp
-@@ -239,10 +239,16 @@ PlatformKeyboardEvent::PlatformKeyboardEvent(HWND, WPARAM code, LPARAM keyData,
+@@ -242,10 +242,16 @@ PlatformKeyboardEvent::PlatformKeyboardEvent(HWND, WPARAM code, LPARAM keyData,
{
}
@@ -8527,9 +8528,9 @@ index 05a0d1256a136982507b732c7852bbece201b513..f2c00eca40fbf3a88780610228f60ba6
+ }
}
- bool PlatformKeyboardEvent::currentCapsLockState()
+ OptionSet<PlatformEvent::Modifier> PlatformKeyboardEvent::currentStateOfModifierKeys()
diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp
-index cff81b5ce4fdd771b7c4daab1570187de262efce..a990de0a7177bf1e48ea53f1be6444f410f2bbc6 100644
+index c9f46f58514296264f5414685cc768ba28c3c801..77f0f9c620e81d0f5740e22ee11d146e3c0466ee 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)
@@ -9014,10 +9015,10 @@ index 0000000000000000000000000000000000000000..cf2b51f6f02837a1106f4d999f2f130e
+
+} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderTextControl.cpp b/Source/WebCore/rendering/RenderTextControl.cpp
-index fcd984f4ec4646da9cc9920f9447b1ce0e96456d..8fea25dbf3cd74992dd2f3b8907c691f3fe2e6a8 100644
+index 403cd8fc7b149ba99b2299fd0532362957e29977..fdbf33cb6d0674c4db5a268c03bbfd9b3125cb4b 100644
--- a/Source/WebCore/rendering/RenderTextControl.cpp
+++ b/Source/WebCore/rendering/RenderTextControl.cpp
-@@ -212,13 +212,13 @@ void RenderTextControl::layoutExcludedChildren(bool relayoutChildren)
+@@ -217,13 +217,13 @@ void RenderTextControl::layoutExcludedChildren(bool relayoutChildren)
}
}
@@ -9033,7 +9034,7 @@ index fcd984f4ec4646da9cc9920f9447b1ce0e96456d..8fea25dbf3cd74992dd2f3b8907c691f
{
auto innerText = innerTextElement();
diff --git a/Source/WebCore/rendering/RenderTextControl.h b/Source/WebCore/rendering/RenderTextControl.h
-index fac9402820702989bf72ed2425678bfb82bd6523..40b5a6441d22714fd370ce1a7c2f534e6e7510f5 100644
+index 86f9c8b1bb416a7d8aa402b9e08bb28fe5592186..78886b268425cfbc3c58d54b31ab333b384d53e0 100644
--- a/Source/WebCore/rendering/RenderTextControl.h
+++ b/Source/WebCore/rendering/RenderTextControl.h
@@ -36,9 +36,9 @@ public:
@@ -9090,7 +9091,7 @@ 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 82af7442b68c025cdcc75674f6e579ff91b96847..ad576043d7c156efc03a6e0f1489be6b2b41c976 100644
+index a8c0e3238c8d71f3e691e29cf507249fb9457f1d..7b0da5539e96bbf4bd9d93e9e83d5d24a36d585c 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
@@ -83,6 +83,11 @@
@@ -9105,7 +9106,7 @@ index 82af7442b68c025cdcc75674f6e579ff91b96847..ad576043d7c156efc03a6e0f1489be6b
#if ENABLE(APPLE_PAY_REMOTE_UI)
#include "WebPaymentCoordinatorProxyMessages.h"
#endif
-@@ -486,6 +491,10 @@ void NetworkConnectionToWebProcess::createSocketStream(URL&& url, String cachePa
+@@ -487,6 +492,10 @@ void NetworkConnectionToWebProcess::createSocketStream(URL&& url, String cachePa
if (auto* session = networkSession())
acceptInsecureCertificates = session->shouldAcceptInsecureCertificatesForWebSockets();
#endif
@@ -9116,7 +9117,7 @@ index 82af7442b68c025cdcc75674f6e579ff91b96847..ad576043d7c156efc03a6e0f1489be6b
m_networkSocketStreams.add(identifier, NetworkSocketStream::create(m_networkProcess.get(), WTFMove(url), m_sessionID, cachePartition, identifier, m_connection, WTFMove(token), acceptInsecureCertificates));
}
-@@ -1030,6 +1039,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)
+@@ -1035,6 +1044,14 @@ void NetworkConnectionToWebProcess::clearPageSpecificData(PageIdentifier pageID)
#endif
}
@@ -9128,24 +9129,24 @@ index 82af7442b68c025cdcc75674f6e579ff91b96847..ad576043d7c156efc03a6e0f1489be6b
+ networkStorageSession->setCookiesFromResponse(firstParty, sameSiteInfo, url, setCookieValue);
+}
+
- #if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
+ #if ENABLE(TRACKING_PREVENTION)
void NetworkConnectionToWebProcess::removeStorageAccessForFrame(FrameIdentifier frameID, PageIdentifier pageID)
{
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-index aee16bae32d2fc033f6bbc152c481189591b7a10..0970fdde3709f68e424b532bc25bd8ba193706ff 100644
+index 1e0c700fcb789f2fc853df86df59b490563ad631..6ba99ecb52832ff272f33f64a0ce8c8d6a3f3829 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
-@@ -312,6 +312,8 @@ private:
+@@ -310,6 +310,8 @@ private:
void clearPageSpecificData(WebCore::PageIdentifier);
+ void setCookieFromResponse(const URL& firstParty, const WebCore::SameSiteInfo&, const URL& url, const String& setCookieValue);
+
- #if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
+ #if ENABLE(TRACKING_PREVENTION)
void removeStorageAccessForFrame(WebCore::FrameIdentifier, WebCore::PageIdentifier);
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
-index 8323aa8c7a6a488ad651528eecd7a1fa3eae9610..6a620d6ffdc7812b638a299dcaf1b3b0d3a7e014 100644
+index 118aff35c592dd4ad9a29568a9139be61da7275b..22260b500fd3ebeb96f796709ecdd3d2d876c65d 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
@@ -66,6 +66,8 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver {
@@ -9154,14 +9155,14 @@ index 8323aa8c7a6a488ad651528eecd7a1fa3eae9610..6a620d6ffdc7812b638a299dcaf1b3b0
+ SetCookieFromResponse(URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, String setCookieValue);
+
- #if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
+ #if ENABLE(TRACKING_PREVENTION)
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 a85a915ce9223070249618944691ae5f4a701126..3d5560f75f064bba89861789cb7fda4288f67e4f 100644
+index 0f78fd289fea49391da88dad693cb7c79f00a1b8..c5aabe379f81979f335253cb9fc1318384fb26f5 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp
-@@ -531,6 +531,12 @@ void NetworkProcess::destroySession(PAL::SessionID sessionID)
+@@ -569,6 +569,12 @@ void NetworkProcess::destroySession(PAL::SessionID sessionID)
m_sessionsControlledByAutomation.remove(sessionID);
}
@@ -9171,11 +9172,11 @@ index a85a915ce9223070249618944691ae5f4a701126..3d5560f75f064bba89861789cb7fda42
+ networkSession->setIgnoreCertificateErrors(ignore);
+}
+
- #if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
+ #if ENABLE(TRACKING_PREVENTION)
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 79529bec31b56db31d9501f763cb7d0ea0255e71..5a7c9b1982560c226526574033d28af4176ae4a8 100644
+index 04197c2ccaf4d95b41f0a7d086270b7f4e41f03d..34523aa912a5f675444be3352d49e18dcfc670e7 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.h
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.h
@@ -36,6 +36,7 @@
@@ -9194,33 +9195,33 @@ index 79529bec31b56db31d9501f763cb7d0ea0255e71..5a7c9b1982560c226526574033d28af4
class CurlProxySettings;
class ProtectionSpace;
class NetworkStorageSession;
-@@ -201,6 +203,8 @@ public:
+@@ -203,6 +205,8 @@ public:
void addWebsiteDataStore(WebsiteDataStoreParameters&&);
+ void setIgnoreCertificateErrors(PAL::SessionID, bool);
+
- #if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
+ #if ENABLE(TRACKING_PREVENTION)
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 72b4a17928321402f4234e0fa60f92659d6617a1..fd0a7b05935a13caf102b69ee9ac3548420ff812 100644
+index 569c112b6ecedaefa679b7141fed6fa766f5c39f..37885f9e46305b8a94f43cc5da3f7940a01b28b7 100644
--- a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
+++ b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
-@@ -77,6 +77,8 @@ messages -> NetworkProcess LegacyReceiver {
+@@ -79,6 +79,8 @@ messages -> NetworkProcess LegacyReceiver {
- PreconnectTo(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, URL url, String userAgent, enum:uint8_t WebCore::StoredCredentialsPolicy storedCredentialsPolicy, enum:bool std::optional<WebKit::NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, enum:bool WebKit::LastNavigationWasAppInitiated lastNavigationWasAppInitiated);
+ 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);
+ SetIgnoreCertificateErrors(PAL::SessionID sessionID, bool ignoreTLSErrors)
+
- #if ENABLE(INTELLIGENT_TRACKING_PREVENTION)
+ #if ENABLE(TRACKING_PREVENTION)
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 95d1403c8368d6409ce67559164218c2877884c4..e09bfcacefef60e42fbe386e35e501de9a4a2548 100644
+index a330f669ad83072259d88dd1e44b9e72471ad267..f4b6f6c79fe53a90b70df39debe7ee6f151b1e9e 100644
--- a/Source/WebKit/NetworkProcess/NetworkSession.h
+++ b/Source/WebKit/NetworkProcess/NetworkSession.h
-@@ -192,6 +192,9 @@ public:
+@@ -196,6 +196,9 @@ public:
void lowMemoryHandler(WTF::Critical);
@@ -9230,7 +9231,7 @@ index 95d1403c8368d6409ce67559164218c2877884c4..e09bfcacefef60e42fbe386e35e501de
#if ENABLE(SERVICE_WORKER)
void addSoftUpdateLoader(std::unique_ptr<ServiceWorkerSoftUpdateLoader>&& loader) { m_softUpdateLoaders.add(WTFMove(loader)); }
void removeSoftUpdateLoader(ServiceWorkerSoftUpdateLoader* loader) { m_softUpdateLoaders.remove(loader); }
-@@ -276,6 +279,7 @@ protected:
+@@ -283,6 +286,7 @@ protected:
bool m_privateClickMeasurementDebugModeEnabled { false };
std::optional<WebCore::PrivateClickMeasurement> m_ephemeralMeasurement;
bool m_isRunningEphemeralMeasurementTest { false };
@@ -9239,10 +9240,10 @@ index 95d1403c8368d6409ce67559164218c2877884c4..e09bfcacefef60e42fbe386e35e501de
HashSet<Ref<NetworkResourceLoader>> m_keptAliveLoads;
diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-index 2b18ee764e7a00159de3f64028a48021c3988a8a..e8461857b83572c42246b99b255389115d58afba 100644
+index 446f27b5919f4e65f2795724e6e94995edcf2a3b..fb562a4f447dd2cab40121cd574fd635386e0aa3 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
-@@ -720,7 +720,7 @@ void NetworkSessionCocoa::setClientAuditToken(const WebCore::AuthenticationChall
+@@ -722,7 +722,7 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
sessionCocoa->setClientAuditToken(challenge);
@@ -9251,7 +9252,7 @@ index 2b18ee764e7a00159de3f64028a48021c3988a8a..e8461857b83572c42246b99b25538911
return completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
NSURLSessionTaskTransactionMetrics *metrics = task._incompleteTaskMetrics.transactionMetrics.lastObject;
-@@ -964,6 +964,13 @@ ALLOW_DEPRECATED_DECLARATIONS_END
+@@ -966,6 +966,13 @@ ALLOW_DEPRECATED_DECLARATIONS_END
resourceResponse.setDeprecatedNetworkLoadMetrics(WebCore::copyTimingData(taskMetrics, networkDataTask->networkLoadMetrics()));
@@ -9266,10 +9267,10 @@ index 2b18ee764e7a00159de3f64028a48021c3988a8a..e8461857b83572c42246b99b25538911
#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 d1fac29ff7fb628b8994642eb9b7a35cad9ad37f..5f2068c1d6deff4792d974714d75b204958e9a42 100644
+index b7e2b29834846db2cd2e034b7923b5bbcf36a87b..c35f153793f6ee6d48556509c8f17e0860a0000c 100644
--- a/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
+++ b/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
-@@ -84,6 +84,8 @@ NetworkDataTaskCurl::NetworkDataTaskCurl(NetworkSession& session, NetworkDataTas
+@@ -87,6 +87,8 @@ NetworkDataTaskCurl::NetworkDataTaskCurl(NetworkSession& session, NetworkDataTas
m_curlRequest->setUserPass(m_initialCredential.user(), m_initialCredential.password());
m_curlRequest->setAuthenticationScheme(ProtectionSpace::AuthenticationScheme::HTTPBasic);
}
@@ -9278,15 +9279,15 @@ index d1fac29ff7fb628b8994642eb9b7a35cad9ad37f..5f2068c1d6deff4792d974714d75b204
m_curlRequest->start();
}
-@@ -160,6 +162,7 @@ void NetworkDataTaskCurl::curlDidReceiveResponse(CurlRequest& request, CurlRespo
- m_response = ResourceResponse(receivedResponse);
- m_response.setCertificateInfo(WTFMove(receivedResponse.certificateInfo));
+@@ -165,6 +167,7 @@ void NetworkDataTaskCurl::curlDidReceiveResponse(CurlRequest& request, CurlRespo
+
+ updateNetworkLoadMetrics(receivedResponse.networkLoadMetrics);
m_response.setDeprecatedNetworkLoadMetrics(Box<NetworkLoadMetrics>::create(WTFMove(receivedResponse.networkLoadMetrics)));
+ m_response.m_httpRequestHeaderFields = request.resourceRequest().httpHeaderFields();
handleCookieHeaders(request.resourceRequest(), receivedResponse);
-@@ -386,6 +389,8 @@ void NetworkDataTaskCurl::willPerformHTTPRedirection()
+@@ -395,6 +398,8 @@ void NetworkDataTaskCurl::willPerformHTTPRedirection()
m_curlRequest->setUserPass(m_initialCredential.user(), m_initialCredential.password());
m_curlRequest->setAuthenticationScheme(ProtectionSpace::AuthenticationScheme::HTTPBasic);
}
@@ -9296,12 +9297,12 @@ index d1fac29ff7fb628b8994642eb9b7a35cad9ad37f..5f2068c1d6deff4792d974714d75b204
if (m_state != State::Suspended) {
diff --git a/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp b/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp
-index 80d8eada3319bec0d8c359af1db319bef87683cf..c71439dee81dc379e827f92de1ff12fa9118684a 100644
+index 92a56b944d04850494c27b954ad68ec9ca3324b8..ead9a4c8b7f4b8add8439c02e72cdafe6515e643 100644
--- a/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp
+++ b/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp
@@ -61,7 +61,7 @@ NetworkSessionCurl::~NetworkSessionCurl()
- std::unique_ptr<WebSocketTask> NetworkSessionCurl::createWebSocketTask(WebPageProxyIdentifier, NetworkSocketChannel& channel, const WebCore::ResourceRequest& request, const String& protocol, const WebCore::ClientOrigin&, bool, bool)
+ std::unique_ptr<WebSocketTask> NetworkSessionCurl::createWebSocketTask(WebPageProxyIdentifier, NetworkSocketChannel& channel, const WebCore::ResourceRequest& request, const String& protocol, const WebCore::ClientOrigin&, bool, bool, OptionSet<WebCore::NetworkConnectionIntegrity>)
{
- return makeUnique<WebSocketTask>(channel, request, protocol);
+ return makeUnique<WebSocketTask>(channel, request, protocol, ignoreCertificateErrors());
@@ -9309,7 +9310,7 @@ index 80d8eada3319bec0d8c359af1db319bef87683cf..c71439dee81dc379e827f92de1ff12fa
} // namespace WebKit
diff --git a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp
-index 2c14f606108b1942a5a84ddc833055bea95a37d3..d14839aef6cfca76c3f385651bc3ef3c5af951b2 100644
+index 02d6b15340f62666ac372b13be555c043feed277..fc2e66175600d3c1c196fd3a97306537d13fbda9 100644
--- a/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp
+++ b/Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp
@@ -33,7 +33,7 @@
@@ -9344,7 +9345,7 @@ index 2027a4b929fda90b34f46bf563846ca8d4553829..34bfbb236d5f16c8bb34920a2bb01c04
void sendString(const IPC::DataReference&, CompletionHandler<void()>&&);
diff --git a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
-index fb70fe2e30abc45508eac1ff7b6fa5b576c22917..6d6404a9fdacf1f5c5f108b860e0e577856b6bf3 100644
+index 1ca32e3c9320415163dbb5b870fd8817942c64ca..8f2c0c39d282b60e6faa39c4f075a89bfddf8060 100644
--- a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
+++ b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
@@ -494,6 +494,8 @@ void NetworkDataTaskSoup::didSendRequest(GRefPtr<GInputStream>&& inputStream)
@@ -9366,7 +9367,7 @@ index fb70fe2e30abc45508eac1ff7b6fa5b576c22917..6d6404a9fdacf1f5c5f108b860e0e577
if (!error)
return true;
diff --git a/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp
-index 8893772d3dd02b38124e8eefae5199274b3b9148..76939e34e7f9d69814fed6b5eb320f57313dc03c 100644
+index ab45835e203ebb3b17a88ab86231d23e45e4fa84..5d384660fb85c6f53b16d0070b607b17bf3aa5da 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
@@ -9394,7 +9395,7 @@ index 8893772d3dd02b38124e8eefae5199274b3b9148..76939e34e7f9d69814fed6b5eb320f57
+ g_signal_connect(connection, "accept-certificate", G_CALLBACK(webSocketAcceptCertificateCallbackIgnoreTLSErrors), soupMessage);
+}
+
- std::unique_ptr<WebSocketTask> NetworkSessionSoup::createWebSocketTask(WebPageProxyIdentifier, NetworkSocketChannel& channel, const ResourceRequest& request, const String& protocol, const ClientOrigin&, bool, bool)
+ std::unique_ptr<WebSocketTask> NetworkSessionSoup::createWebSocketTask(WebPageProxyIdentifier, NetworkSocketChannel& channel, const ResourceRequest& request, const String& protocol, const ClientOrigin&, bool, bool, OptionSet<WebCore::NetworkConnectionIntegrity>)
{
GRefPtr<SoupMessage> soupMessage = request.createSoupMessage(blobRegistry());
@@ -127,14 +141,21 @@ std::unique_ptr<WebSocketTask> NetworkSessionSoup::createWebSocketTask(WebPagePr
@@ -9426,11 +9427,28 @@ index 8893772d3dd02b38124e8eefae5199274b3b9148..76939e34e7f9d69814fed6b5eb320f57
#endif
}
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 1ad4194add639c451a676a2c7bc7838d976ef73c..3399f5f01776e9d28c322754c1c5dfc4ae7b953a 100644
+--- a/Source/WebKit/Platform/IPC/ArgumentCoders.h
++++ b/Source/WebKit/Platform/IPC/ArgumentCoders.h
+@@ -145,8 +145,11 @@ struct ArgumentCoder<ArrayReferenceTuple<Types...>> {
+ {
+ constexpr size_t Index = sizeof...(DataPointerTypes);
+ static_assert(Index <= sizeof...(Types));
++ // Must be a separate variable, as otherwise
++ // the Visual Studio C++ compiler gets confused
++ constexpr bool Recurse = Index < sizeof...(Types);
+
+- if constexpr (Index < sizeof...(Types)) {
++ if constexpr (Recurse) {
+ using ElementType = ArrayReferenceTupleElementType<Index>;
+ auto dataSize = CheckedSize { size } * sizeof(ElementType);
+ if (UNLIKELY(dataSize.hasOverflowed()))
diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake
-index 1d029fd29c4e3fded98e80dd30f48532ad45b844..d6e9cf9f2259b3d0aaf0ed7f551e8a5db5d02e7c 100644
+index cc60a858ad128f93b099c51a7e8f0883443ace31..587f38a8862c87bb9da970871b1b63d0e65ea2e5 100644
--- a/Source/WebKit/PlatformGTK.cmake
+++ b/Source/WebKit/PlatformGTK.cmake
-@@ -494,6 +494,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+@@ -491,6 +491,9 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
${GSTREAMER_PBUTILS_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
@@ -9440,7 +9458,7 @@ index 1d029fd29c4e3fded98e80dd30f48532ad45b844..d6e9cf9f2259b3d0aaf0ed7f551e8a5d
)
if (USE_WPE_RENDERER)
-@@ -535,6 +538,9 @@ if (USE_LIBWEBRTC)
+@@ -532,6 +535,9 @@ if (USE_LIBWEBRTC)
list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
"${THIRDPARTY_DIR}/libwebrtc/Source/"
"${THIRDPARTY_DIR}/libwebrtc/Source/webrtc"
@@ -9450,9 +9468,9 @@ index 1d029fd29c4e3fded98e80dd30f48532ad45b844..d6e9cf9f2259b3d0aaf0ed7f551e8a5d
)
endif ()
-@@ -565,6 +571,12 @@ GENERATE_API_HEADERS(WebKit2WebExtension_HEADER_TEMPLATES
- "-DUSE(GTK4)=$<BOOL:${USE_GTK4}>"
- )
+@@ -570,6 +576,12 @@ else ()
+ set(WebKitGTK_ENUM_HEADER_TEMPLATE ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitEnumTypesGtk3.h.in)
+ endif ()
+# Playwright begin
+list(APPEND WebKit_PRIVATE_INCLUDE_DIRECTORIES
@@ -9461,13 +9479,13 @@ index 1d029fd29c4e3fded98e80dd30f48532ad45b844..d6e9cf9f2259b3d0aaf0ed7f551e8a5d
+# Playwright end
+
# To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
- set(WebKit2GTK_ENUM_GENERATION_HEADERS ${WebKit2GTK_INSTALLED_HEADERS})
- list(REMOVE_ITEM WebKit2GTK_ENUM_GENERATION_HEADERS ${WebKit2Gtk_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.h)
+ set(WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_INSTALLED_HEADERS})
+ list(REMOVE_ITEM WebKitGTK_ENUM_GENERATION_HEADERS ${WebKitGTK_DERIVED_SOURCES_DIR}/webkit/WebKitEnumTypes.h)
diff --git a/Source/WebKit/PlatformWPE.cmake b/Source/WebKit/PlatformWPE.cmake
-index 8375a0623af77204b3fa5d2fd68af3658164c4c7..6e5d6a9dfe7da8b0f4b7acb65acb4c3849968d87 100644
+index 2d488b3a9fea1f487b26ca8cb22894b2f04ad1cb..721a9e36eda0165cb0c472e235e408c37d962876 100644
--- a/Source/WebKit/PlatformWPE.cmake
+++ b/Source/WebKit/PlatformWPE.cmake
-@@ -226,6 +226,7 @@ set(WPE_API_INSTALLED_HEADERS
+@@ -218,6 +218,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
@@ -9475,15 +9493,15 @@ index 8375a0623af77204b3fa5d2fd68af3658164c4c7..6e5d6a9dfe7da8b0f4b7acb65acb4c38
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitRectangle.h
${WEBKIT_DIR}/UIProcess/API/wpe/WebKitWebViewBackend.h
${WEBKIT_DIR}/UIProcess/API/wpe/webkit.h
-@@ -349,6 +350,7 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
- "${WEBKIT_DIR}/UIProcess/Inspector/glib"
+@@ -345,6 +346,7 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
+ "${WEBKIT_DIR}/UIProcess/Launcher/libwpe"
"${WEBKIT_DIR}/UIProcess/Notifications/glib/"
"${WEBKIT_DIR}/UIProcess/geoclue"
+ "${WEBKIT_DIR}/UIProcess/glib"
"${WEBKIT_DIR}/UIProcess/gstreamer"
"${WEBKIT_DIR}/UIProcess/linux"
"${WEBKIT_DIR}/UIProcess/soup"
-@@ -370,8 +372,17 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+@@ -366,8 +368,17 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
${GIO_UNIX_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
@@ -9502,10 +9520,10 @@ index 8375a0623af77204b3fa5d2fd68af3658164c4c7..6e5d6a9dfe7da8b0f4b7acb65acb4c38
Cairo::Cairo
Freetype::Freetype
diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmake
-index feb39b35c1bd873c646da76aa762e40680f96533..9188b2fd6561727504fb5f14185d00d245cc98cf 100644
+index f78d51303c31e8ad71807f3d6ed64f2148e9e8d1..cf1ec2705c7155723757d1708cea4e169637cf85 100644
--- a/Source/WebKit/PlatformWin.cmake
+++ b/Source/WebKit/PlatformWin.cmake
-@@ -64,8 +64,12 @@ list(APPEND WebKit_SOURCES
+@@ -62,8 +62,12 @@ list(APPEND WebKit_SOURCES
UIProcess/wc/DrawingAreaProxyWC.cpp
@@ -9518,7 +9536,7 @@ index feb39b35c1bd873c646da76aa762e40680f96533..9188b2fd6561727504fb5f14185d00d2
UIProcess/win/WebPageProxyWin.cpp
UIProcess/win/WebPopupMenuProxyWin.cpp
UIProcess/win/WebProcessPoolWin.cpp
-@@ -84,6 +88,7 @@ list(APPEND WebKit_SOURCES
+@@ -82,6 +86,7 @@ list(APPEND WebKit_SOURCES
WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp
@@ -9526,7 +9544,7 @@ index feb39b35c1bd873c646da76aa762e40680f96533..9188b2fd6561727504fb5f14185d00d2
WebProcess/WebPage/AcceleratedSurface.cpp
-@@ -137,6 +142,72 @@ list(APPEND WebKit_MESSAGES_IN_FILES
+@@ -136,6 +141,72 @@ list(APPEND WebKit_MESSAGES_IN_FILES
GPUProcess/graphics/wc/RemoteWCLayerTreeHost
)
@@ -9599,10 +9617,10 @@ index feb39b35c1bd873c646da76aa762e40680f96533..9188b2fd6561727504fb5f14185d00d2
set(WebKitCommonIncludeDirectories ${WebKit_INCLUDE_DIRECTORIES})
set(WebKitCommonSystemIncludeDirectories ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
-@@ -197,6 +268,7 @@ if (${WTF_PLATFORM_WIN_CAIRO})
- OpenSSL::SSL
- mfuuid.lib
- strmiids.lib
+@@ -193,6 +264,7 @@ if (${WTF_PLATFORM_WIN_CAIRO})
+
+ list(APPEND WebKit_PRIVATE_LIBRARIES
+ comctl32
+ ${LIBVPX_CUSTOM_LIBRARY}
)
endif ()
@@ -9620,7 +9638,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 ee8cac1c980039c4a36de5501ab7f135e710d06b..deae2be9e720ff76186ecea89920dfc39c4f186a 100644
+index 41ca60e664a95ef35a6872b7bdd25713eb3c722f..5e61331ea2dbc9127a12d662187d1081bed68605 100644
--- a/Source/WebKit/Shared/NativeWebKeyboardEvent.h
+++ b/Source/WebKit/Shared/NativeWebKeyboardEvent.h
@@ -33,6 +33,7 @@
@@ -9631,11 +9649,11 @@ index ee8cac1c980039c4a36de5501ab7f135e710d06b..deae2be9e720ff76186ecea89920dfc3
#endif
#if PLATFORM(GTK)
-@@ -65,19 +66,35 @@ public:
+@@ -66,19 +67,35 @@ public:
#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<Modifier> modifiers, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands)
++ 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)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp, WTFMove(commands))
+ {
+ }
@@ -9643,8 +9661,8 @@ index ee8cac1c980039c4a36de5501ab7f135e710d06b..deae2be9e720ff76186ecea89920dfc3
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<Modifier>);
-+ 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<Modifier> modifiers, WallTime timestamp, Vector<String>&& commands)
+ 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)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp, WTFMove(commands))
+ {
+ }
@@ -9654,13 +9672,13 @@ index ee8cac1c980039c4a36de5501ab7f135e710d06b..deae2be9e720ff76186ecea89920dfc3
#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<Modifier> modifiers, WallTime timestamp)
++ 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)
+ : 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<Modifier> modifiers, WallTime timestamp)
++ 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)
+ : WebKeyboardEvent(type, text, unmodifiedText, key, code, keyIdentifier, windowsVirtualKeyCode, nativeVirtualKeyCode, isAutoRepeat, isKeypad, isSystemKey, modifiers, timestamp)
+ {
+ }
@@ -9668,26 +9686,26 @@ index ee8cac1c980039c4a36de5501ab7f135e710d06b..deae2be9e720ff76186ecea89920dfc3
#if USE(APPKIT)
diff --git a/Source/WebKit/Shared/NativeWebMouseEvent.h b/Source/WebKit/Shared/NativeWebMouseEvent.h
-index fef57e34be6ed7592187c3e1fd73c989bf79da1a..e35612e9b88877627802df18e9084e7f4022e629 100644
+index 1b5cd6a32c2df5662c89903497089b059f95804e..0c63417365032c39a1a8a50393b01a81921126e6 100644
--- a/Source/WebKit/Shared/NativeWebMouseEvent.h
+++ b/Source/WebKit/Shared/NativeWebMouseEvent.h
-@@ -78,6 +78,11 @@ public:
+@@ -79,6 +79,11 @@ public:
NativeWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool);
#endif
+#if PLATFORM(GTK) || USE(LIBWPE) || PLATFORM(WIN)
-+ NativeWebMouseEvent(Type type, Button button, unsigned short buttons, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet<Modifier> modifiers, WallTime timestamp)
-+ : WebMouseEvent(type, button, buttons, position, globalPosition, deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp) { }
++ 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)
++ : WebMouseEvent({type, modifiers, timestamp}, button, buttons, position, globalPosition, deltaX, deltaY, deltaZ, clickCount) { }
+#endif
+
#if USE(APPKIT)
NSEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(GTK)
diff --git a/Source/WebKit/Shared/NativeWebWheelEvent.h b/Source/WebKit/Shared/NativeWebWheelEvent.h
-index f2f3979fcac9dfd97d0e0ead600fe35eb8defd40..ac91412e1a96bdf521b1890a66e465dc54293d31 100644
+index d294b46e3ca59de0aa5898db488ade26ccc47f2e..5e50be35ac39c22669d589e0a4a7fc15c33b414a 100644
--- a/Source/WebKit/Shared/NativeWebWheelEvent.h
+++ b/Source/WebKit/Shared/NativeWebWheelEvent.h
-@@ -67,7 +67,8 @@ public:
+@@ -68,7 +68,8 @@ public:
#elif PLATFORM(WIN)
NativeWebWheelEvent(HWND, UINT message, WPARAM, LPARAM);
#endif
@@ -9697,11 +9715,36 @@ index f2f3979fcac9dfd97d0e0ead600fe35eb8defd40..ac91412e1a96bdf521b1890a66e465dc
#if USE(APPKIT)
NSEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(GTK)
+diff --git a/Source/WebKit/Shared/Pasteboard.serialization.in b/Source/WebKit/Shared/Pasteboard.serialization.in
+index 08167501bf88fdcae7828ff0e81d702b037ef1af..bae42c6065adfc3d318b6f5362286f647c8d945b 100644
+--- a/Source/WebKit/Shared/Pasteboard.serialization.in
++++ b/Source/WebKit/Shared/Pasteboard.serialization.in
+@@ -75,7 +75,7 @@ header: <WebCore/Pasteboard.h>
+ #if PLATFORM(MAC)
+ String userVisibleForm
+ #endif
+-#if PLATFORM(GTK)
++#if PLATFORM(GTK) || PLATFORM(WPE)
+ String markup
+ #endif
+ };
+diff --git a/Source/WebKit/Shared/RTCPacketOptions.h b/Source/WebKit/Shared/RTCPacketOptions.h
+index 8b8223a49829fd2c0a325519881d6878f8c3f2b5..7e1cc65fecf18e0f71166c99f224294141fe8f73 100644
+--- a/Source/WebKit/Shared/RTCPacketOptions.h
++++ b/Source/WebKit/Shared/RTCPacketOptions.h
+@@ -30,6 +30,7 @@
+ #include <WebCore/LibWebRTCMacros.h>
+ #include <optional>
+ #include <wtf/Forward.h>
++#include <optional>
+
+ ALLOW_COMMA_BEGIN
+
diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
-index 39baefe9fd496ea8a4943612c5df57a09ec3b34c..feee88d36c6d6604e69125780c73fbe11931fcf6 100644
+index 7be65fc0efdfdd7b76fe43375b849a0316eda251..388311a330ad93636d6cae60eba0a8ff4935f5f1 100644
--- a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
-@@ -125,6 +125,10 @@
+@@ -131,6 +131,10 @@
#include <WebCore/TextRecognitionResult.h>
#endif
@@ -9712,30 +9755,7 @@ index 39baefe9fd496ea8a4943612c5df57a09ec3b34c..feee88d36c6d6604e69125780c73fbe1
// FIXME: Seems like we could use std::tuple to cut down the code below a lot!
namespace IPC {
-@@ -1299,6 +1303,9 @@ void ArgumentCoder<WindowFeatures>::encode(Encoder& encoder, const WindowFeature
- encoder << windowFeatures.resizable;
- encoder << windowFeatures.fullscreen;
- encoder << windowFeatures.dialog;
-+ encoder << windowFeatures.noopener;
-+ encoder << windowFeatures.noreferrer;
-+ encoder << windowFeatures.additionalFeatures;
- }
-
- bool ArgumentCoder<WindowFeatures>::decode(Decoder& decoder, WindowFeatures& windowFeatures)
-@@ -1327,6 +1334,12 @@ bool ArgumentCoder<WindowFeatures>::decode(Decoder& decoder, WindowFeatures& win
- return false;
- if (!decoder.decode(windowFeatures.dialog))
- return false;
-+ if (!decoder.decode(windowFeatures.noopener))
-+ return false;
-+ if (!decoder.decode(windowFeatures.noreferrer))
-+ return false;
-+ if (!decoder.decode(windowFeatures.additionalFeatures))
-+ return false;
- return true;
- }
-
-@@ -1340,6 +1353,11 @@ void ArgumentCoder<DragData>::encode(Encoder& encoder, const DragData& dragData)
+@@ -786,6 +790,11 @@ void ArgumentCoder<DragData>::encode(Encoder& encoder, const DragData& dragData)
#if PLATFORM(COCOA)
encoder << dragData.pasteboardName();
encoder << dragData.fileNames();
@@ -9747,7 +9767,7 @@ index 39baefe9fd496ea8a4943612c5df57a09ec3b34c..feee88d36c6d6604e69125780c73fbe1
#endif
encoder << dragData.dragDestinationActionMask();
encoder << dragData.pageID();
-@@ -1363,9 +1381,16 @@ bool ArgumentCoder<DragData>::decode(Decoder& decoder, DragData& dragData)
+@@ -809,9 +818,16 @@ bool ArgumentCoder<DragData>::decode(Decoder& decoder, DragData& dragData)
if (!decoder.decode(applicationFlags))
return false;
@@ -9765,7 +9785,7 @@ index 39baefe9fd496ea8a4943612c5df57a09ec3b34c..feee88d36c6d6604e69125780c73fbe1
if (!decoder.decode(pasteboardName))
return false;
-@@ -1381,8 +1406,14 @@ bool ArgumentCoder<DragData>::decode(Decoder& decoder, DragData& dragData)
+@@ -827,8 +843,14 @@ bool ArgumentCoder<DragData>::decode(Decoder& decoder, DragData& dragData)
if (!decoder.decode(pageID))
return false;
@@ -9780,11 +9800,26 @@ index 39baefe9fd496ea8a4943612c5df57a09ec3b34c..feee88d36c6d6604e69125780c73fbe1
return true;
}
+diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
+index 6a5e48c14c79053ccc9d23367be67c38f6d5ac21..b1a0be6a9b8162038fb5c9920083b6a42d81663d 100644
+--- a/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
++++ b/Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
+@@ -1271,6 +1271,10 @@ struct WebCore::WindowFeatures {
+
+ bool fullscreen;
+ bool dialog;
++
++ bool noopener;
++ bool noreferrer;
++ Vector<String> additionalFeatures;
+ };
+
+ [Nested] enum class WebCore::CompositionUnderlineColor : bool
diff --git a/Source/WebKit/Shared/WebEvent.h b/Source/WebKit/Shared/WebEvent.h
-index 3ae6504779d3917a79f69f32b58260afeda270b4..72d44c33953cc13bf2ed7c762b4f9a7b88571b56 100644
+index 77907a08157fc793ec8fbf1617e1ee4dafa7f00f..c2c326c7d5fa7985f5d05c02e8b7f87e08c8cf81 100644
--- a/Source/WebKit/Shared/WebEvent.h
+++ b/Source/WebKit/Shared/WebEvent.h
-@@ -31,6 +31,7 @@
+@@ -34,6 +34,7 @@
#include <wtf/EnumTraits.h>
#include <wtf/OptionSet.h>
@@ -9792,8 +9827,22 @@ index 3ae6504779d3917a79f69f32b58260afeda270b4..72d44c33953cc13bf2ed7c762b4f9a7b
#include <wtf/WallTime.h>
#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
+--- a/Source/WebKit/Shared/WebEvent.serialization.in
++++ b/Source/WebKit/Shared/WebEvent.serialization.in
+@@ -86,9 +86,7 @@ class WebKit::WebKeyboardEvent : WebKit::WebEvent {
+ #if !USE(APPKIT) && PLATFORM(GTK)
+ Vector<String> commands();
+ #endif
+-#if !PLATFORM(GTK) && !USE(LIBWPE)
+ bool isAutoRepeat();
+-#endif
+ bool isKeypad();
+ #if !PLATFORM(GTK) && !USE(LIBWPE)
+ bool isSystemKey();
diff --git a/Source/WebKit/Shared/WebKeyboardEvent.cpp b/Source/WebKit/Shared/WebKeyboardEvent.cpp
-index 3679736973ebc06771c7d94591909688f28a70b4..8df0a8e223551e2ee73e816adcb3b31153c54eb5 100644
+index bfbc02f4cd90a80638033ce06392696c902ea9e2..9f929ea75637583100b784bb6824fbaa383af7d5 100644
--- a/Source/WebKit/Shared/WebKeyboardEvent.cpp
+++ b/Source/WebKit/Shared/WebKeyboardEvent.cpp
@@ -35,6 +35,7 @@ WebKeyboardEvent::WebKeyboardEvent()
@@ -9803,12 +9852,12 @@ index 3679736973ebc06771c7d94591909688f28a70b4..8df0a8e223551e2ee73e816adcb3b311
+
#if USE(APPKIT)
- WebKeyboardEvent::WebKeyboardEvent(Type type, 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>& commands, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<Modifier> modifiers, WallTime timestamp)
-@@ -56,6 +57,24 @@ WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String&
- ASSERT(isKeyboardEventType(type));
+ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>& commands, bool isAutoRepeat, bool isKeypad, bool isSystemKey)
+@@ -56,9 +57,27 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S
+ 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<Modifier> modifiers, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands)
++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)
+ : WebEvent(type, modifiers, timestamp)
+ , m_text(text)
+ , m_unmodifiedText(text)
@@ -9828,12 +9877,24 @@ index 3679736973ebc06771c7d94591909688f28a70b4..8df0a8e223551e2ee73e816adcb3b311
+
#elif PLATFORM(GTK)
- WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&& preeditUnderlines, std::optional<EditingRange>&& preeditSelectionRange, Vector<String>&& commands, bool isKeypad, OptionSet<Modifier> modifiers, WallTime timestamp)
-@@ -79,6 +98,24 @@ WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String&
- ASSERT(isKeyboardEventType(type));
+-WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&& preeditUnderlines, std::optional<EditingRange>&& preeditSelectionRange, Vector<String>&& commands, bool isKeypad)
++WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&& preeditUnderlines, std::optional<EditingRange>&& preeditSelectionRange, Vector<String>&& commands, bool isAutoRepeat, bool isKeypad)
+ : WebEvent(WTFMove(event))
+ , m_text(text)
+ , m_unmodifiedText(text)
+@@ -72,13 +91,31 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S
+ , m_preeditUnderlines(WTFMove(preeditUnderlines))
+ , m_preeditSelectionRange(WTFMove(preeditSelectionRange))
+ , m_commands(WTFMove(commands))
+- , m_isAutoRepeat(false)
++ , m_isAutoRepeat(isAutoRepeat)
+ , m_isKeypad(isKeypad)
+ , m_isSystemKey(false)
+ {
+ 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<Modifier> modifiers, WallTime timestamp, Vector<String>&& commands)
++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)
+ : WebEvent(type, modifiers, timestamp)
+ , m_text(text)
+ , m_unmodifiedText(text)
@@ -9853,14 +9914,32 @@ index 3679736973ebc06771c7d94591909688f28a70b4..8df0a8e223551e2ee73e816adcb3b311
+
#elif PLATFORM(IOS_FAMILY)
- WebKeyboardEvent::WebKeyboardEvent(Type type, 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, OptionSet<Modifier> modifiers, WallTime timestamp)
-@@ -142,6 +179,27 @@ WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String&
+ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const String& unmodifiedText, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, int macCharCode, bool handledByInputMethod, bool isAutoRepeat, bool isKeypad, bool isSystemKey)
+@@ -101,7 +138,7 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S
+
+ #elif USE(LIBWPE)
+
+-WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&& preeditUnderlines, std::optional<EditingRange>&& preeditSelectionRange, bool isKeypad)
++WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional<Vector<WebCore::CompositionUnderline>>&& preeditUnderlines, std::optional<EditingRange>&& preeditSelectionRange, bool isAutoRepeat, bool isKeypad)
+ : WebEvent(WTFMove(event))
+ , m_text(text)
+ , m_unmodifiedText(text)
+@@ -114,7 +151,7 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S
+ , m_handledByInputMethod(handledByInputMethod)
+ , m_preeditUnderlines(WTFMove(preeditUnderlines))
+ , m_preeditSelectionRange(WTFMove(preeditSelectionRange))
+- , m_isAutoRepeat(false)
++ , m_isAutoRepeat(isAutoRepeat)
+ , m_isKeypad(isKeypad)
+ , m_isSystemKey(false)
+ {
+@@ -142,6 +179,27 @@ WebKeyboardEvent::WebKeyboardEvent(WebEvent&& event, const String& text, const S
#endif
+#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<Modifier> modifiers, WallTime timestamp)
++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)
+ : WebEvent(type, modifiers, timestamp)
+ , m_text(text)
+ , m_unmodifiedText(text)
@@ -9883,45 +9962,47 @@ index 3679736973ebc06771c7d94591909688f28a70b4..8df0a8e223551e2ee73e816adcb3b311
{
}
diff --git a/Source/WebKit/Shared/WebKeyboardEvent.h b/Source/WebKit/Shared/WebKeyboardEvent.h
-index 1817691d3e12ddec8169248c791826cc13b057e3..cdc90eda23ed5ba20ee78a02c0dd632be4bc615a 100644
+index d9af5618f5fdd5ef95364d23cbc8c66116bdffd4..a308ad0d68a7b8e8330c3c1494e725eee11be294 100644
--- a/Source/WebKit/Shared/WebKeyboardEvent.h
+++ b/Source/WebKit/Shared/WebKeyboardEvent.h
@@ -43,14 +43,18 @@ public:
#if USE(APPKIT)
- WebKeyboardEvent(Type, 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, OptionSet<Modifier>, WallTime timestamp);
-+ 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<Modifier>, WallTime timestamp, Vector<WebCore::KeypressCommand>&& commands);
+ 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);
#elif PLATFORM(GTK)
- WebKeyboardEvent(Type, 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, OptionSet<Modifier>, WallTime timestamp);
-+ 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<Modifier>, WallTime timestamp, Vector<String>&& commands);
+- 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);
#elif PLATFORM(IOS_FAMILY)
- WebKeyboardEvent(Type, 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, OptionSet<Modifier>, WallTime timestamp);
+ 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(Type, 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, OptionSet<Modifier>, WallTime timestamp);
-+ 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<Modifier>, WallTime timestamp);
+- 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);
#else
- WebKeyboardEvent(Type, 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, OptionSet<Modifier>, WallTime timestamp);
-+ 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<Modifier>, WallTime timestamp);
+ 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);
#endif
const String& text() const { return m_text; }
diff --git a/Source/WebKit/Shared/WebMouseEvent.h b/Source/WebKit/Shared/WebMouseEvent.h
-index cf2adc382b3f59890c43a54b6c28bab2c4a965c6..998e96ec8c997bd1b51434c77e73e9420f5ebaa7 100644
+index 4196b689dbb047cd8961be391b53f4d311ed1f7d..15056ca3f871494997539ff2c0e5c8d380f31ea2 100644
--- a/Source/WebKit/Shared/WebMouseEvent.h
+++ b/Source/WebKit/Shared/WebMouseEvent.h
-@@ -62,6 +62,7 @@ public:
+@@ -73,6 +73,7 @@ public:
- Button button() const { return static_cast<Button>(m_button); }
+ WebMouseEventButton button() const { return static_cast<WebMouseEventButton>(m_button); }
unsigned short buttons() const { return m_buttons; }
+ void playwrightSetButtons(unsigned short buttons) { m_buttons = buttons; }
const WebCore::IntPoint& position() const { return m_position; } // Relative to the view.
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 6ae6b07fc61da5d205154eccd91f0e62c29c6a9d..96c0a25e20aa48d1f38fa77e723c05bc0a3f4010 100644
+index 47205d2cc395074c1bc5c4238da8acc40548f1a3..4f9c17ed72588e718cf979010d1e2324e5ba72a0 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.cpp
+++ b/Source/WebKit/Shared/WebPageCreationParameters.cpp
-@@ -156,6 +156,8 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const
+@@ -159,6 +159,8 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const
encoder << crossOriginAccessControlCheckEnabled;
encoder << processDisplayName;
@@ -9930,7 +10011,7 @@ index 6ae6b07fc61da5d205154eccd91f0e62c29c6a9d..96c0a25e20aa48d1f38fa77e723c05bc
encoder << shouldCaptureAudioInUIProcess;
encoder << shouldCaptureAudioInGPUProcess;
encoder << shouldCaptureVideoInUIProcess;
-@@ -540,7 +542,10 @@ std::optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::
+@@ -551,7 +553,10 @@ std::optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::
if (!processDisplayName)
return std::nullopt;
parameters.processDisplayName = WTFMove(*processDisplayName);
@@ -9943,10 +10024,10 @@ index 6ae6b07fc61da5d205154eccd91f0e62c29c6a9d..96c0a25e20aa48d1f38fa77e723c05bc
return std::nullopt;
diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h
-index 162144ef14b86c62f724c3d2f3418a560980347b..baa5f9ae1e1b61c1994faacdb2399abbc6823198 100644
+index 2cab6ebc4595abaf8f8665a0174cf68da979d26b..5ecb0c9c2ed6bc5a4898ac54fbf7a23052b461d9 100644
--- a/Source/WebKit/Shared/WebPageCreationParameters.h
+++ b/Source/WebKit/Shared/WebPageCreationParameters.h
-@@ -255,6 +255,8 @@ struct WebPageCreationParameters {
+@@ -263,6 +263,8 @@ struct WebPageCreationParameters {
bool httpsUpgradeEnabled { true };
@@ -9956,31 +10037,55 @@ index 162144ef14b86c62f724c3d2f3418a560980347b..baa5f9ae1e1b61c1994faacdb2399abb
bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload { false };
#endif
diff --git a/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp b/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
-index c204637774ee803eac42a34cde79aa556f143b82..345f5b08179e3dd239725bed06e48b46bc718336 100644
+index 76235337d1cfed0f67181fc12b9512f4354a35d9..d1ac93acbea8145b540cb32c3506725a28ca45da 100644
--- a/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
+++ b/Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
-@@ -50,7 +50,7 @@ NativeWebKeyboardEvent::NativeWebKeyboardEvent(Type type, const String& text, co
+@@ -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)
+ {
+ }
+
+ 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)
+- : 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)
+ {
}
NativeWebKeyboardEvent::NativeWebKeyboardEvent(const NativeWebKeyboardEvent& event)
-- : WebKeyboardEvent(event.type(), event.text(), event.key(), event.code(), event.keyIdentifier(), event.windowsVirtualKeyCode(), event.nativeVirtualKeyCode(), event.handledByInputMethod(), std::optional<Vector<WebCore::CompositionUnderline>>(event.preeditUnderlines()), std::optional<EditingRange>(event.preeditSelectionRange()), Vector<String>(event.commands()), event.isKeypad(), event.modifiers(), event.timestamp())
+- : WebKeyboardEvent(WebEvent(event.type(), event.modifiers(), event.timestamp()), event.text(), event.key(), event.code(), event.keyIdentifier(), event.windowsVirtualKeyCode(), event.nativeVirtualKeyCode(), event.handledByInputMethod(), std::optional<Vector<WebCore::CompositionUnderline>>(event.preeditUnderlines()), std::optional<EditingRange>(event.preeditSelectionRange()), Vector<String>(event.commands()), event.isKeypad())
+ : WebKeyboardEvent(event)
- , m_nativeEvent(event.nativeEvent() ? gdk_event_copy(event.nativeEvent()) : nullptr)
+ , m_nativeEvent(event.nativeEvent() ? constructNativeEvent(event.nativeEvent()) : nullptr)
{
}
diff --git a/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp b/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
-index ebf179e3f11c3e05e2354d36b1a68c4c3b965403..c00ea8a5ebe6f1d7fa987cac003dc3a281cfb386 100644
+index befca68ef35689c35e7ed10b531d5c6368e4be8b..8b3cd57facdc54ce1a200960e2ac03c63570ccc1 100644
--- a/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
+++ b/Source/WebKit/Shared/gtk/NativeWebMouseEventGtk.cpp
-@@ -54,7 +54,7 @@ NativeWebMouseEvent::NativeWebMouseEvent(Type type, Button button, unsigned shor
+@@ -61,7 +61,7 @@ NativeWebMouseEvent::NativeWebMouseEvent(Type type, WebMouseEventButton button,
}
NativeWebMouseEvent::NativeWebMouseEvent(const NativeWebMouseEvent& event)
-- : WebMouseEvent(event.type(), event.button(), event.buttons(), event.position(), event.globalPosition(), event.deltaX(), event.deltaY(), event.deltaZ(), event.clickCount(), event.modifiers(), event.timestamp(), 0, NoTap, event.isTouchEvent(), event.pointerId(), event.pointerType())
+- : WebMouseEvent(WebEvent(event.type(), event.modifiers(), event.timestamp()), event.button(), event.buttons(), event.position(), event.globalPosition(), event.deltaX(), event.deltaY(), event.deltaZ(), event.clickCount(), 0, WebMouseEventSyntheticClickType::NoTap, event.isTouchEvent(), event.pointerId(), event.pointerType())
+ : WebMouseEvent(event)
- , m_nativeEvent(event.nativeEvent() ? gdk_event_copy(const_cast<GdkEvent*>(event.nativeEvent())) : nullptr)
+ , m_nativeEvent(event.nativeEvent() ? constructNativeEvent(const_cast<GdkEvent*>(event.nativeEvent())) : nullptr)
{
}
+diff --git a/Source/WebKit/Shared/gtk/WebEventFactory.cpp b/Source/WebKit/Shared/gtk/WebEventFactory.cpp
+index e0af267c5a3df701860e3f002f0465f08c11eadd..5ea446938fe06fe6768218ea8337b45c51a7aa06 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,
+ WTFMove(preeditUnderlines),
+ WTFMove(preeditSelectionRange),
+ WTFMove(commands),
++ false,
+ isGdkKeyCodeFromKeyPad(keyval)
+ );
+ }
diff --git a/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp b/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp
index 03e118154f6bb5b704b4ecb83d3d9543f8c5a5fa..9725caaac6ee65a96ea324ddbb4e1a3785bbc028 100644
--- a/Source/WebKit/Shared/ios/WebPlatformTouchPointIOS.cpp
@@ -9998,33 +10103,14 @@ index 03e118154f6bb5b704b4ecb83d3d9543f8c5a5fa..9725caaac6ee65a96ea324ddbb4e1a37
} // namespace WebKit
--#endif // ENABLE(TOUCH_EVENTS)
-+#endif // ENABLE(TOUCH_EVENTS) && PLATFORM(IOS_FAMILY)
-diff --git a/Source/WebKit/Shared/ios/WebTouchEventIOS.cpp b/Source/WebKit/Shared/ios/WebTouchEventIOS.cpp
-index e40a6e172bfd2b75076fd4053da643ebab9eb81f..2516655bbc9e5bc863537a554c5faac0f6fc1a09 100644
---- a/Source/WebKit/Shared/ios/WebTouchEventIOS.cpp
-+++ b/Source/WebKit/Shared/ios/WebTouchEventIOS.cpp
-@@ -26,7 +26,7 @@
- #include "config.h"
- #include "WebTouchEvent.h"
-
--#if ENABLE(TOUCH_EVENTS)
-+#if ENABLE(TOUCH_EVENTS) && PLATFORM(IOS_FAMILY)
-
- #include "ArgumentCoders.h"
- #include "WebCoreArgumentCoders.h"
-@@ -71,4 +71,4 @@ bool WebTouchEvent::decode(IPC::Decoder& decoder, WebTouchEvent& result)
-
- } // namespace WebKit
-
-#endif // ENABLE(TOUCH_EVENTS)
+#endif // ENABLE(TOUCH_EVENTS) && PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..85842bcbac87cb4964c8b144f549a512034fb392
+index 0000000000000000000000000000000000000000..42d4448dc95ece1b2144c5ad5ef3d03ab05f8e5f
--- /dev/null
+++ b/Source/WebKit/Shared/libwpe/ArgumentCodersWPE.cpp
-@@ -0,0 +1,173 @@
+@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
@@ -10069,19 +10155,17 @@ index 0000000000000000000000000000000000000000..85842bcbac87cb4964c8b144f549a512
+ RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(IntSize(image.size()), { });
+ bitmap->createGraphicsContext()->drawImage(image, IntPoint());
+
-+ ShareableBitmap::Handle handle;
-+ bitmap->createHandle(handle);
-+
-+ encoder << handle;
++ encoder << bitmap->createHandle();
+}
+
+static WARN_UNUSED_RETURN bool decodeImage(Decoder& decoder, RefPtr<Image>& image)
+{
-+ ShareableBitmap::Handle handle;
-+ if (!decoder.decode(handle))
++ std::optional<std::optional<ShareableBitmapHandle>> handle;
++ decoder >> handle;
++ if (!handle || !*handle)
+ return false;
+
-+ RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(handle);
++ RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(**handle);
+ if (!bitmap)
+ return false;
+ image = bitmap->createImage();
@@ -10245,11 +10329,23 @@ 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
+--- 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
+ handledByInputMethod,
+ WTFMove(preeditUnderlines),
+ WTFMove(preeditSelectionRange),
++ false,
+ isWPEKeyCodeFromKeyPad(event->key_code)
+ );
+ }
diff --git a/Source/WebKit/Shared/win/WebEventFactory.cpp b/Source/WebKit/Shared/win/WebEventFactory.cpp
-index 90df093a49c09dc670dfea55077c77d889dd1c1b..6ffd51532e29b941b8dc10f545b7f5b81e9407b4 100644
+index c76a3daa5c453e9bf4272fc2ee539608e1191dd4..2115e51d10ac8b9728eecec3881319b717efef17 100644
--- a/Source/WebKit/Shared/win/WebEventFactory.cpp
+++ b/Source/WebKit/Shared/win/WebEventFactory.cpp
-@@ -473,7 +473,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message
+@@ -474,7 +474,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(HWND hwnd, UINT message
}
#if ENABLE(TOUCH_EVENTS)
@@ -10259,10 +10355,10 @@ index 90df093a49c09dc670dfea55077c77d889dd1c1b..6ffd51532e29b941b8dc10f545b7f5b8
return WebTouchEvent();
}
diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt
-index 69195152333b0deb19654ea685ef86b313bbb192..d7521c5e0fa48a7bc9facad0895f7debebc674ad 100644
+index 9bae25adde66b5c3a2342284e4212dee14dcdae2..7d27f423fe52cae94c9f70ae51ba2d8f2c821588 100644
--- a/Source/WebKit/Sources.txt
+++ b/Source/WebKit/Sources.txt
-@@ -399,11 +399,14 @@ Shared/XR/XRDeviceProxy.cpp
+@@ -378,11 +378,14 @@ Shared/XR/XRDeviceProxy.cpp
UIProcess/AuxiliaryProcessProxy.cpp
UIProcess/BackgroundProcessResponsivenessTimer.cpp
@@ -10277,7 +10373,7 @@ index 69195152333b0deb19654ea685ef86b313bbb192..d7521c5e0fa48a7bc9facad0895f7deb
UIProcess/LegacyGlobalSettings.cpp
UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp
UIProcess/MediaKeySystemPermissionRequestProxy.cpp
-@@ -413,6 +416,7 @@ UIProcess/PageLoadState.cpp
+@@ -392,6 +395,7 @@ UIProcess/PageLoadState.cpp
UIProcess/ProcessAssertion.cpp
UIProcess/ProcessThrottler.cpp
UIProcess/ProvisionalPageProxy.cpp
@@ -10285,7 +10381,7 @@ index 69195152333b0deb19654ea685ef86b313bbb192..d7521c5e0fa48a7bc9facad0895f7deb
UIProcess/ResponsivenessTimer.cpp
UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp
UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp
-@@ -454,6 +458,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp
+@@ -433,6 +437,8 @@ UIProcess/WebOpenPanelResultListenerProxy.cpp
UIProcess/WebPageDiagnosticLoggingClient.cpp
UIProcess/WebPageGroup.cpp
UIProcess/WebPageInjectedBundleClient.cpp
@@ -10294,7 +10390,7 @@ index 69195152333b0deb19654ea685ef86b313bbb192..d7521c5e0fa48a7bc9facad0895f7deb
UIProcess/WebPageProxy.cpp
UIProcess/WebPasteboardProxy.cpp
UIProcess/WebPermissionControllerProxy.cpp
-@@ -580,7 +586,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp
+@@ -563,7 +569,11 @@ UIProcess/Inspector/WebInspectorUtilities.cpp
UIProcess/Inspector/WebPageDebuggable.cpp
UIProcess/Inspector/WebPageInspectorController.cpp
@@ -10307,10 +10403,10 @@ index 69195152333b0deb19654ea685ef86b313bbb192..d7521c5e0fa48a7bc9facad0895f7deb
UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp
UIProcess/Media/MediaUsageManager.cpp
diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt
-index 42fb8d187014366a1e54a0658d3005c5444ae754..ec4b0b9642f64ea2bc04ca29d3941624ef555e3b 100644
+index a127ac6842b53b38ed4e3609fe2771dbec400246..15621ea1146d7857d8285e236602d367c24e072f 100644
--- a/Source/WebKit/SourcesCocoa.txt
+++ b/Source/WebKit/SourcesCocoa.txt
-@@ -283,6 +283,7 @@ UIProcess/API/Cocoa/_WKApplicationManifest.mm
+@@ -260,6 +260,7 @@ UIProcess/API/Cocoa/_WKApplicationManifest.mm
UIProcess/API/Cocoa/_WKAttachment.mm
UIProcess/API/Cocoa/_WKAutomationSession.mm
UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.mm
@@ -10318,7 +10414,7 @@ index 42fb8d187014366a1e54a0658d3005c5444ae754..ec4b0b9642f64ea2bc04ca29d3941624
UIProcess/API/Cocoa/_WKContentRuleListAction.mm
UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm
UIProcess/API/Cocoa/_WKCustomHeaderFields.mm @no-unify
-@@ -461,6 +462,7 @@ UIProcess/Inspector/ios/WKInspectorHighlightView.mm
+@@ -437,6 +438,7 @@ UIProcess/Inspector/ios/WKInspectorHighlightView.mm
UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.mm
UIProcess/Inspector/mac/RemoteWebInspectorUIProxyMac.mm
@@ -10327,10 +10423,10 @@ index 42fb8d187014366a1e54a0658d3005c5444ae754..ec4b0b9642f64ea2bc04ca29d3941624
UIProcess/Inspector/mac/WKInspectorResourceURLSchemeHandler.mm
UIProcess/Inspector/mac/WKInspectorViewController.mm
diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt
-index 1ce5369aaedcfe904f2a02d7ca9492b34cfa05e1..ff8cec3c01b41e8ec328c9b55fe98bd9c3936819 100644
+index 125067f7cc9d1fa3c4aaa1b45f6600a9aacf8457..e5bd96d9c9c22d4f860119577c3f6e1c7754bfd0 100644
--- a/Source/WebKit/SourcesGTK.txt
+++ b/Source/WebKit/SourcesGTK.txt
-@@ -129,6 +129,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify
+@@ -130,6 +130,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
@@ -10338,7 +10434,7 @@ index 1ce5369aaedcfe904f2a02d7ca9492b34cfa05e1..ff8cec3c01b41e8ec328c9b55fe98bd9
UIProcess/API/glib/WebKitContextMenuClient.cpp @no-unify
UIProcess/API/glib/WebKitCookieManager.cpp @no-unify
UIProcess/API/glib/WebKitCredential.cpp @no-unify
-@@ -250,6 +251,7 @@ UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp
+@@ -254,6 +255,7 @@ UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp
UIProcess/cairo/BackingStoreCairo.cpp @no-unify
@@ -10346,7 +10442,7 @@ index 1ce5369aaedcfe904f2a02d7ca9492b34cfa05e1..ff8cec3c01b41e8ec328c9b55fe98bd9
UIProcess/glib/WebPageProxyGLib.cpp
UIProcess/glib/WebProcessPoolGLib.cpp
UIProcess/glib/WebProcessProxyGLib.cpp
-@@ -267,6 +269,7 @@ UIProcess/gtk/ClipboardGtk4.cpp @no-unify
+@@ -271,6 +273,7 @@ UIProcess/gtk/ClipboardGtk4.cpp @no-unify
UIProcess/gtk/WebDateTimePickerGtk.cpp
UIProcess/gtk/GtkSettingsManager.cpp
UIProcess/gtk/HardwareAccelerationManager.cpp
@@ -10354,7 +10450,7 @@ index 1ce5369aaedcfe904f2a02d7ca9492b34cfa05e1..ff8cec3c01b41e8ec328c9b55fe98bd9
UIProcess/gtk/KeyBindingTranslator.cpp
UIProcess/gtk/PointerLockManager.cpp @no-unify
UIProcess/gtk/PointerLockManagerWayland.cpp @no-unify
-@@ -279,6 +282,8 @@ UIProcess/gtk/WaylandCompositor.cpp @no-unify
+@@ -282,6 +285,8 @@ UIProcess/gtk/ViewGestureControllerGtk.cpp
UIProcess/gtk/WebColorPickerGtk.cpp
UIProcess/gtk/WebContextMenuProxyGtk.cpp
UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp
@@ -10364,10 +10460,10 @@ index 1ce5369aaedcfe904f2a02d7ca9492b34cfa05e1..ff8cec3c01b41e8ec328c9b55fe98bd9
UIProcess/gtk/WebPasteboardProxyGtk.cpp
UIProcess/gtk/WebPopupMenuProxyGtk.cpp
diff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt
-index 79fa705d8250c9cfe487502e6aaa6ecb08a326d3..7624ff72a451b9892da3c883e12333f1a75ddf3a 100644
+index 6661a23fd3ad3eb8aee1fc5be03fc7a30ac59e9e..fef7c90e2b8ca253bd9eb80a933fc0110163e94d 100644
--- a/Source/WebKit/SourcesWPE.txt
+++ b/Source/WebKit/SourcesWPE.txt
-@@ -87,6 +87,7 @@ Shared/glib/ProcessExecutablePathGLib.cpp
+@@ -88,6 +88,7 @@ Shared/glib/ProcessExecutablePathGLib.cpp
Shared/glib/UserMessage.cpp
Shared/glib/WebContextMenuItemGlib.cpp
@@ -10375,7 +10471,7 @@ index 79fa705d8250c9cfe487502e6aaa6ecb08a326d3..7624ff72a451b9892da3c883e12333f1
Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp
Shared/libwpe/NativeWebMouseEventLibWPE.cpp
Shared/libwpe/NativeWebTouchEventLibWPE.cpp
-@@ -122,6 +123,7 @@ UIProcess/API/glib/WebKitAuthenticationRequest.cpp @no-unify
+@@ -123,6 +124,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
@@ -10383,7 +10479,7 @@ index 79fa705d8250c9cfe487502e6aaa6ecb08a326d3..7624ff72a451b9892da3c883e12333f1
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
+@@ -157,6 +159,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/WebKitPlugin.cpp @no-unify
@@ -10391,7 +10487,7 @@ index 79fa705d8250c9cfe487502e6aaa6ecb08a326d3..7624ff72a451b9892da3c883e12333f1
UIProcess/API/glib/WebKitPolicyDecision.cpp @no-unify
UIProcess/API/glib/WebKitPrivate.cpp @no-unify
UIProcess/API/glib/WebKitProtocolHandler.cpp @no-unify
-@@ -190,6 +193,7 @@ UIProcess/API/wpe/InputMethodFilterWPE.cpp @no-unify
+@@ -192,6 +195,7 @@ 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
@@ -10399,7 +10495,7 @@ index 79fa705d8250c9cfe487502e6aaa6ecb08a326d3..7624ff72a451b9892da3c883e12333f1
UIProcess/API/wpe/WebKitInputMethodContextWPE.cpp @no-unify
UIProcess/API/wpe/WebKitPopupMenu.cpp @no-unify
UIProcess/API/wpe/WebKitRectangle.cpp @no-unify
-@@ -208,6 +212,7 @@ UIProcess/Gamepad/wpe/UIGamepadProviderWPE.cpp
+@@ -212,6 +216,7 @@ UIProcess/Gamepad/libwpe/UIGamepadProviderLibWPE.cpp
UIProcess/geoclue/GeoclueGeolocationProvider.cpp
@@ -10407,7 +10503,7 @@ index 79fa705d8250c9cfe487502e6aaa6ecb08a326d3..7624ff72a451b9892da3c883e12333f1
UIProcess/glib/WebPageProxyGLib.cpp
UIProcess/glib/WebProcessPoolGLib.cpp
UIProcess/glib/WebProcessProxyGLib.cpp
-@@ -235,6 +240,11 @@ UIProcess/linux/MemoryPressureMonitor.cpp
+@@ -242,6 +247,11 @@ UIProcess/linux/MemoryPressureMonitor.cpp
UIProcess/soup/WebProcessPoolSoup.cpp
@@ -10419,7 +10515,7 @@ index 79fa705d8250c9cfe487502e6aaa6ecb08a326d3..7624ff72a451b9892da3c883e12333f1
UIProcess/wpe/WebPageProxyWPE.cpp
WebProcess/GPU/graphics/gbm/RemoteGraphicsContextGLProxyGBM.cpp
-@@ -265,6 +275,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp
+@@ -272,6 +282,8 @@ WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp
WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
@@ -10476,17 +10572,17 @@ index 57fec1703102930b8d29271d0deccff2b980b086..db0769075e7c07863b051885f445b292
bool m_shouldTakeUIBackgroundAssertion { true };
bool m_shouldCaptureDisplayInUIProcess { DEFAULT_CAPTURE_DISPLAY_IN_UI_PROCESS };
diff --git a/Source/WebKit/UIProcess/API/APIUIClient.h b/Source/WebKit/UIProcess/API/APIUIClient.h
-index 68e80682d1d0c003493e20a63d634aa8e0526a7d..67d6f7f1e370a537e1f539f58d5555462d7a0e78 100644
+index ab4ddd6cc3299d499c7b790e5f9e0d023ade977b..49ff1364d1c2ed1379a796e7e682fe0a0f478439 100644
--- a/Source/WebKit/UIProcess/API/APIUIClient.h
+++ b/Source/WebKit/UIProcess/API/APIUIClient.h
-@@ -106,6 +106,7 @@ public:
+@@ -107,6 +107,7 @@ public:
virtual void runJavaScriptAlert(WebKit::WebPageProxy&, const WTF::String&, WebKit::WebFrameProxy*, WebKit::FrameInfoData&&, Function<void()>&& completionHandler) { completionHandler(); }
virtual void runJavaScriptConfirm(WebKit::WebPageProxy&, const WTF::String&, WebKit::WebFrameProxy*, WebKit::FrameInfoData&&, Function<void(bool)>&& completionHandler) { completionHandler(false); }
virtual void runJavaScriptPrompt(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy*, WebKit::FrameInfoData&&, Function<void(const WTF::String&)>&& completionHandler) { completionHandler(WTF::String()); }
+ virtual void handleJavaScriptDialog(WebKit::WebPageProxy&, bool, const WTF::String&) { }
virtual void setStatusText(WebKit::WebPageProxy*, const WTF::String&) { }
- virtual void mouseDidMoveOverElement(WebKit::WebPageProxy&, const WebKit::WebHitTestResultData&, OptionSet<WebKit::WebEvent::Modifier>, Object*) { }
+ virtual void mouseDidMoveOverElement(WebKit::WebPageProxy&, const WebKit::WebHitTestResultData&, OptionSet<WebKit::WebEventModifier>, Object*) { }
diff --git a/Source/WebKit/UIProcess/API/C/WKInspector.cpp b/Source/WebKit/UIProcess/API/C/WKInspector.cpp
index e1465edd29caf3109c17d44bb3c88aaba98cfbb5..32d569d3240c583334b8b6512407430fd448ae75 100644
--- a/Source/WebKit/UIProcess/API/C/WKInspector.cpp
@@ -10531,10 +10627,10 @@ index 026121d114c5fcad84c1396be8d692625beaa3bd..edd6e5cae033124c589959a42522fde0
}
#endif
diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp
-index 2ded6f050d4560a5a405d9fbe4a38a5c32a85264..32d395e5edc12041e3234f352a2946b7e1f52835 100644
+index af38ea0e44a62de34f6b48a1938d9814ca606ee8..2243f82f464dc8dcf97f651d31b8a5d3ea3e265a 100644
--- a/Source/WebKit/UIProcess/API/C/WKPage.cpp
+++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp
-@@ -1762,6 +1762,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
+@@ -1758,6 +1758,13 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
completionHandler(String());
}
@@ -10548,7 +10644,7 @@ index 2ded6f050d4560a5a405d9fbe4a38a5c32a85264..32d395e5edc12041e3234f352a2946b7
void setStatusText(WebPageProxy* page, const String& text) final
{
if (!m_client.setStatusText)
-@@ -1791,6 +1798,8 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
+@@ -1787,6 +1794,8 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
{
if (!m_client.didNotHandleKeyEvent)
return;
@@ -10558,10 +10654,10 @@ index 2ded6f050d4560a5a405d9fbe4a38a5c32a85264..32d395e5edc12041e3234f352a2946b7
}
diff --git a/Source/WebKit/UIProcess/API/C/WKPageUIClient.h b/Source/WebKit/UIProcess/API/C/WKPageUIClient.h
-index 63323ea918dcddf512dadfff52dd5e60326e6ab8..63acaadcdb0d4a80b543db2728f3657cd4ed6f5f 100644
+index 65d8ab73430840b02682ce879d1db18b9597d6b0..ea89752f4b90018ea1f008e0d89f9a2a80d1a8e1 100644
--- a/Source/WebKit/UIProcess/API/C/WKPageUIClient.h
+++ b/Source/WebKit/UIProcess/API/C/WKPageUIClient.h
-@@ -90,6 +90,7 @@ typedef void (*WKPageRunBeforeUnloadConfirmPanelCallback)(WKPageRef page, WKStri
+@@ -98,6 +98,7 @@ typedef void (*WKPageRunBeforeUnloadConfirmPanelCallback)(WKPageRef page, WKStri
typedef void (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, WKSecurityOriginRef securityOrigin, WKPageRunJavaScriptAlertResultListenerRef listener, const void *clientInfo);
typedef void (*WKPageRunJavaScriptConfirmCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, WKSecurityOriginRef securityOrigin, WKPageRunJavaScriptConfirmResultListenerRef listener, const void *clientInfo);
typedef void (*WKPageRunJavaScriptPromptCallback)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, WKSecurityOriginRef securityOrigin, WKPageRunJavaScriptPromptResultListenerRef listener, const void *clientInfo);
@@ -10569,7 +10665,7 @@ index 63323ea918dcddf512dadfff52dd5e60326e6ab8..63acaadcdb0d4a80b543db2728f3657c
typedef void (*WKPageRequestStorageAccessConfirmCallback)(WKPageRef page, WKFrameRef frame, WKStringRef requestingDomain, WKStringRef currentDomain, WKPageRequestStorageAccessConfirmResultListenerRef listener, const void *clientInfo);
typedef void (*WKPageTakeFocusCallback)(WKPageRef page, WKFocusDirection direction, const void *clientInfo);
typedef void (*WKPageFocusCallback)(WKPageRef page, const void *clientInfo);
-@@ -1355,6 +1356,7 @@ typedef struct WKPageUIClientV14 {
+@@ -1365,6 +1366,7 @@ typedef struct WKPageUIClientV14 {
// Version 14.
WKPageRunWebAuthenticationPanelCallback runWebAuthenticationPanel;
@@ -10577,7 +10673,15 @@ index 63323ea918dcddf512dadfff52dd5e60326e6ab8..63acaadcdb0d4a80b543db2728f3657c
} WKPageUIClientV14;
typedef struct WKPageUIClientV15 {
-@@ -1462,6 +1464,7 @@ typedef struct WKPageUIClientV15 {
+@@ -1472,6 +1474,7 @@ typedef struct WKPageUIClientV15 {
+
+ // Version 14.
+ WKPageRunWebAuthenticationPanelCallback runWebAuthenticationPanel;
++ WKPageHandleJavaScriptDialogCallback handleJavaScriptDialog;
+
+ // Version 15.
+ WKPageDecidePolicyForSpeechRecognitionPermissionRequestCallback decidePolicyForSpeechRecognitionPermissionRequest;
+@@ -1583,6 +1586,7 @@ typedef struct WKPageUIClientV16 {
// Version 14.
WKPageRunWebAuthenticationPanelCallback runWebAuthenticationPanel;
@@ -10585,7 +10689,7 @@ index 63323ea918dcddf512dadfff52dd5e60326e6ab8..63acaadcdb0d4a80b543db2728f3657c
// Version 15.
WKPageDecidePolicyForSpeechRecognitionPermissionRequestCallback decidePolicyForSpeechRecognitionPermissionRequest;
-@@ -1573,6 +1576,7 @@ typedef struct WKPageUIClientV16 {
+@@ -1697,6 +1701,7 @@ typedef struct WKPageUIClientV17 {
// Version 14.
WKPageRunWebAuthenticationPanelCallback runWebAuthenticationPanel;
@@ -10593,7 +10697,7 @@ index 63323ea918dcddf512dadfff52dd5e60326e6ab8..63acaadcdb0d4a80b543db2728f3657c
// Version 15.
WKPageDecidePolicyForSpeechRecognitionPermissionRequestCallback decidePolicyForSpeechRecognitionPermissionRequest;
-@@ -1687,6 +1691,7 @@ typedef struct WKPageUIClientV17 {
+@@ -1813,6 +1818,7 @@ typedef struct WKPageUIClientV18 {
// Version 14.
WKPageRunWebAuthenticationPanelCallback runWebAuthenticationPanel;
@@ -10601,7 +10705,7 @@ index 63323ea918dcddf512dadfff52dd5e60326e6ab8..63acaadcdb0d4a80b543db2728f3657c
// Version 15.
WKPageDecidePolicyForSpeechRecognitionPermissionRequestCallback decidePolicyForSpeechRecognitionPermissionRequest;
-@@ -1803,6 +1808,7 @@ typedef struct WKPageUIClientV18 {
+@@ -1932,6 +1938,7 @@ typedef struct WKPageUIClientV19 {
// Version 14.
WKPageRunWebAuthenticationPanelCallback runWebAuthenticationPanel;
@@ -10648,7 +10752,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 67c2480832991ff512fd49b0195cc195e85794e2..619c8a85bd1bdb14a593f15fa02ae90bf6e877ba 100644
+index 1536c9eb6a4c4f46051bd890ad6fd8cdc2b87b87..c14d9049dc03153fcdb4faa3a7c1f4dc47b0a7c0 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
@@ -47,6 +47,7 @@
@@ -10659,7 +10763,7 @@ index 67c2480832991ff512fd49b0195cc195e85794e2..619c8a85bd1bdb14a593f15fa02ae90b
#import <WebCore/Credential.h>
#import <WebCore/RegistrationDatabase.h>
#import <WebCore/ServiceWorkerClientData.h>
-@@ -234,6 +235,11 @@ static WallTime toSystemClockTime(NSDate *date)
+@@ -234,6 +235,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple
});
}
@@ -10823,7 +10927,7 @@ index b1c6e033c8a86353f96161482d92c227d7946201..64e592705c97d2d78668aa532f271ddf
#import "WKObject.h"
#import <wtf/RetainPtr.h>
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h
-index 5b5d106b46392ed95bc7bc6df74c9b43ad07627b..846b2bbbc19b17fa4a2b8d14751b7c5c44beb902 100644
+index a8119337eead3c07fb7cceab832ba9ad51f7a9b1..ea4c7ad8234e0ee237b49fdc268dca70c11448ac 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h
@@ -67,6 +67,7 @@ WK_CLASS_AVAILABLE(macos(10.10), ios(8.0))
@@ -10835,10 +10939,10 @@ index 5b5d106b46392ed95bc7bc6df74c9b43ad07627b..846b2bbbc19b17fa4a2b8d14751b7c5c
@property (nonatomic) BOOL processSwapsOnWindowOpenWithOpener WK_API_AVAILABLE(macos(10.14), ios(12.0));
@property (nonatomic) BOOL processSwapsOnNavigationWithinSameNonHTTPFamilyProtocol WK_API_AVAILABLE(macos(12.0), ios(15.0));
diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
-index 2e235bb880c638a0e74256b6d66cb0244ea0a3f1..3471eebb47e860f7c2071d0e7f2691c9f0a6355d 100644
+index 65589f14fc1bf38f97cf244fc0812c0d8e513aa1..496d4b5ac7d840678a6d5b73df54ee69ea4f3c7d 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
-@@ -257,6 +257,16 @@
+@@ -257,6 +257,16 @@ - (BOOL)processSwapsOnNavigation
return _processPoolConfiguration->processSwapsOnNavigation();
}
@@ -11094,7 +11198,7 @@ index 0000000000000000000000000000000000000000..e0b1da48465c850f541532ed961d1b77
+WebKit::WebPageProxy* webkitBrowserInspectorCreateNewPageInContext(WebKitWebContext*);
+void webkitBrowserInspectorQuitApplication();
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
-index 64c90f9f25fc44911e819ab94fa973bf0b82a0e4..8d8c739fb903b71f7881801cb41901f241709b2a 100644
+index d9389e65c4e0e71c35704876d652a38ab42b7931..7a89a4b2e4d1296651f0e7ecdb2dc86d330bde8a 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
@@ -98,6 +98,10 @@ private:
@@ -11109,10 +11213,10 @@ index 64c90f9f25fc44911e819ab94fa973bf0b82a0e4..8d8c739fb903b71f7881801cb41901f2
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 6bb6767869af7b7b3ac1ff2bb935432d9e4b6ffd..04ae9eea575c9150aededb4af9d8b07a387be665 100644
+index 147ad70a69cf0d774cb58eb1c52439cbb8d35205..719544afeef9957d48f2c37f48d7a37bad6ad142 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
-@@ -406,10 +406,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa
+@@ -397,10 +397,19 @@ static void webkitWebContextSetProperty(GObject* object, guint propID, const GVa
}
}
@@ -11132,7 +11236,7 @@ index 6bb6767869af7b7b3ac1ff2bb935432d9e4b6ffd..04ae9eea575c9150aededb4af9d8b07a
GUniquePtr<char> bundleFilename(g_build_filename(injectedBundleDirectory(), INJECTED_BUNDLE_FILENAME, nullptr));
WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(object);
-@@ -462,6 +471,8 @@ static void webkitWebContextConstructed(GObject* object)
+@@ -453,6 +462,8 @@ static void webkitWebContextConstructed(GObject* object)
static void webkitWebContextDispose(GObject* object)
{
@@ -11151,18 +11255,18 @@ index 78d1578f94793e9e59a3d4d2b33e79ea8530fa04..493cdadac3873508b3efa3048638e73a
#endif
+int webkitWebContextExistingCount();
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
-index d105f15d8d6851ded0397723a74a5d283abc5e51..24936b79ba4a3a51c94235c9717a2efd1164b590 100644
+index 56d974bd026edee94f007ef5a86d8a0f5fc35522..675dc1122e6c57926d484c95a981b86e5210e830 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
-@@ -33,6 +33,7 @@
- #include "WebCertificateInfo.h"
+@@ -32,6 +32,7 @@
+ #include "ProvisionalPageProxy.h"
#include "WebContextMenuItem.h"
#include "WebContextMenuItemData.h"
+#include "WebPageInspectorController.h"
#include "WebKitAuthenticationRequestPrivate.h"
#include "WebKitBackForwardListPrivate.h"
#include "WebKitContextMenuClient.h"
-@@ -52,6 +53,7 @@
+@@ -51,6 +52,7 @@
#include "WebKitJavascriptResultPrivate.h"
#include "WebKitNavigationClient.h"
#include "WebKitNotificationPrivate.h"
@@ -11186,7 +11290,7 @@ index d105f15d8d6851ded0397723a74a5d283abc5e51..24936b79ba4a3a51c94235c9717a2efd
DECIDE_POLICY,
PERMISSION_REQUEST,
-@@ -468,6 +470,9 @@ void WebKitWebViewClient::handleDownloadRequest(WKWPE::View&, DownloadProxy& dow
+@@ -463,6 +465,9 @@ void WebKitWebViewClient::handleDownloadRequest(WKWPE::View&, DownloadProxy& dow
void WebKitWebViewClient::frameDisplayed(WKWPE::View&)
{
@@ -11196,15 +11300,7 @@ index d105f15d8d6851ded0397723a74a5d283abc5e51..24936b79ba4a3a51c94235c9717a2efd
{
SetForScope inFrameDisplayedGuard(m_webView->priv->inFrameDisplayed, true);
for (const auto& callback : m_webView->priv->frameDisplayedCallbacks) {
-@@ -498,6 +503,7 @@ void WebKitWebViewClient::didReceiveUserMessage(WKWPE::View&, UserMessage&& mess
- {
- webkitWebViewDidReceiveUserMessage(m_webView, WTFMove(message), WTFMove(completionHandler));
- }
-+
- #endif
-
- static gboolean webkitWebViewLoadFail(WebKitWebView* webView, WebKitLoadEvent, const char* failingURI, GError* error)
-@@ -549,7 +555,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*
+@@ -549,7 +554,7 @@ static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision*
static gboolean webkitWebViewPermissionRequest(WebKitWebView*, WebKitPermissionRequest* request)
{
@@ -11213,7 +11309,7 @@ index d105f15d8d6851ded0397723a74a5d283abc5e51..24936b79ba4a3a51c94235c9717a2efd
if (WEBKIT_IS_POINTER_LOCK_PERMISSION_REQUEST(request)) {
webkit_permission_request_allow(request);
return TRUE;
-@@ -1791,6 +1797,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
+@@ -1728,6 +1733,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_TYPE_BOOLEAN, 1,
WEBKIT_TYPE_SCRIPT_DIALOG);
@@ -11229,7 +11325,7 @@ index d105f15d8d6851ded0397723a74a5d283abc5e51..24936b79ba4a3a51c94235c9717a2efd
/**
* WebKitWebView::decide-policy:
* @web_view: the #WebKitWebView on which the signal is emitted
-@@ -2634,6 +2649,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const
+@@ -2485,6 +2499,23 @@ void webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView* webView, const
webkit_script_dialog_unref(webView->priv->currentScriptDialog);
}
@@ -11254,10 +11350,10 @@ index d105f15d8d6851ded0397723a74a5d283abc5e51..24936b79ba4a3a51c94235c9717a2efd
{
if (!webView->priv->currentScriptDialog)
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
-index fbab1afe9ca09f5e6a6793f5065f08fc76bfedaf..23f66f4da6229d88271e4b732414088b7cc0397e 100644
+index dfb1a25102714f7ea5541ae17a1f55a13669e294..d1fc7dffc4eed2aee1c1703ad6a8995d71fc02ff 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
-@@ -60,6 +60,7 @@ void webkitWebViewRunJavaScriptAlert(WebKitWebView*, const CString& message, Fun
+@@ -65,6 +65,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);
@@ -11266,7 +11362,7 @@ index fbab1afe9ca09f5e6a6793f5065f08fc76bfedaf..23f66f4da6229d88271e4b732414088b
bool webkitWebViewIsScriptDialogRunning(WebKitWebView*, WebKitScriptDialog*);
String webkitWebViewGetCurrentScriptDialogMessage(WebKitWebView*);
diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
-index 5a44624f8d2fc8fb7f8871c97c8ffd3cd73c3b5e..39751c87230dee3e800b8c1c8a54fbe86efc5b3f 100644
+index 87fe51400dc9fbcc37e7951def32a54d884505ff..7dba0d103ce5ae5dfd9006a1397f6e638bc50e6f 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
@@ -11276,11 +11372,11 @@ index 5a44624f8d2fc8fb7f8871c97c8ffd3cd73c3b5e..39751c87230dee3e800b8c1c8a54fbe8
+ if (!event.nativeEvent())
+ return;
- WebKitWebViewBase* webkitWebViewBase = WEBKIT_WEB_VIEW_BASE(m_viewWidget);
- webkitWebViewBaseForwardNextKeyEvent(webkitWebViewBase);
+ // Always consider arrow keys as handled, otherwise the GtkWindow key bindings will move the focus.
+ guint keyval;
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitBrowserInspector.h b/Source/WebKit/UIProcess/API/gtk/WebKitBrowserInspector.h
new file mode 100644
-index 0000000000000000000000000000000000000000..9f1a0173a5641d6f158d815b8f7b9ea66f65c26d
+index 0000000000000000000000000000000000000000..45221096280941d747ef3f46749b1466b2d70090
--- /dev/null
+++ b/Source/WebKit/UIProcess/API/gtk/WebKitBrowserInspector.h
@@ -0,0 +1,81 @@
@@ -11309,7 +11405,7 @@ index 0000000000000000000000000000000000000000..9f1a0173a5641d6f158d815b8f7b9ea6
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
-+#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
++#if !defined(__WEBKIT2_H_INSIDE__) && !defined(BUILDING_WEBKIT)
+#error "Only <webkit2/webkit2.h> can be included directly."
+#endif
+
@@ -11317,8 +11413,8 @@ index 0000000000000000000000000000000000000000..9f1a0173a5641d6f158d815b8f7b9ea6
+#define WebKitBrowserInspector_h
+
+#include <glib-object.h>
-+#include <webkit2/WebKitDefines.h>
-+#include <webkit2/WebKitWebView.h>
++#include <webkit/WebKitDefines.h>
++#include <webkit/WebKitWebView.h>
+
+G_BEGIN_DECLS
+
@@ -11366,10 +11462,10 @@ index 0000000000000000000000000000000000000000..9f1a0173a5641d6f158d815b8f7b9ea6
+
+#endif
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
-index 430e8f8195a361932999f598385b770e75322fa9..c4f6c200a388497ea46b70506f5a12f17910ae7b 100644
+index 55279031a940d6cc4f82774c220f10717267194f..62b65a78ff22585c7570e8616c34543423f0569b 100644
--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
-@@ -2569,6 +2569,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
+@@ -2611,6 +2611,11 @@ void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
#endif
}
@@ -11382,7 +11478,7 @@ index 430e8f8195a361932999f598385b770e75322fa9..c4f6c200a388497ea46b70506f5a12f1
{
ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);
diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
-index b60e10c4fb1c6c867579b58661a6e3f017ba81b0..3f8ec4479449e9cc1e3b2503ba2e3e352e329d84 100644
+index af927f35b3a28089788ec28531e7cd75db348af6..d2db5e32b70099f0fd991460ada54a52b6c4a2b6 100644
--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
@@ -27,6 +27,7 @@
@@ -11393,26 +11489,26 @@ index b60e10c4fb1c6c867579b58661a6e3f017ba81b0..3f8ec4479449e9cc1e3b2503ba2e3e35
#include "APIPageConfiguration.h"
#include "InputMethodState.h"
#include "SameDocumentNavigationType.h"
-@@ -122,3 +123,5 @@ void webkitWebViewBaseSynthesizeWheelEvent(WebKitWebViewBase*, const GdkEvent*,
+@@ -130,3 +131,5 @@ void webkitWebViewBaseSynthesizeWheelEvent(WebKitWebViewBase*, const GdkEvent*,
void webkitWebViewBaseMakeBlank(WebKitWebViewBase*, bool);
void webkitWebViewBasePageGrabbedTouch(WebKitWebViewBase*);
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
-index 5cd9524252a97d4ea64dfeb22e5a47b55f36c887..45da62b4ffe54d5cfd680dd40cabd6f45bc993a6 100644
+index fc6b402d92bb0e1f02568a51d9e2e9bbecdc4c1e..46e1a90fa48cd6e57a1b50d34fa9d6d9e03dc0ef 100644
--- a/Source/WebKit/UIProcess/API/gtk/webkit2.h
+++ b/Source/WebKit/UIProcess/API/gtk/webkit2.h
@@ -32,6 +32,7 @@
- #include <webkit2/WebKitAutomationSession.h>
- #include <webkit2/WebKitBackForwardList.h>
- #include <webkit2/WebKitBackForwardListItem.h>
-+#include <webkit2/WebKitBrowserInspector.h>
- #include <webkit2/WebKitColorChooserRequest.h>
- #include <webkit2/WebKitContextMenu.h>
- #include <webkit2/WebKitContextMenuActions.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>
diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
-index cfe3689f22c6659ceab3950e40b686e9b97b4254..d2de92105afecd8e1a5ffb6de16965aad74c71a0 100644
+index 9fba86a2feee0a7f056ec65b9ffeeb48c0694def..4c1e54e79d868721a0af651984a5ddd28d153bfe 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
@@ -32,8 +32,11 @@
@@ -11436,8 +11532,8 @@ index cfe3689f22c6659ceab3950e40b686e9b97b4254..d2de92105afecd8e1a5ffb6de16965aa
}
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&, bool)
-@@ -447,4 +450,23 @@ void PageClientImpl::selectionDidChange()
- m_view.selectionDidChange();
+@@ -452,4 +455,23 @@ WebKitWebResourceLoadManager* PageClientImpl::webResourceLoadManager()
+ return m_view.webResourceLoadManager();
}
+#if ENABLE(DATALIST_ELEMENT)
@@ -11461,12 +11557,12 @@ index cfe3689f22c6659ceab3950e40b686e9b97b4254..d2de92105afecd8e1a5ffb6de16965aa
+
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
-index 7c08a13e10c75677452b74f52be2b447a5edaa13..56cf11581d453e8234f0957828083ee7c9bce8a6 100644
+index 8f246bc2e73b5720863e250ee1217ddcb64117fe..0801d5f5b3dc85765c42c48474c63e8835553789 100644
--- a/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
+++ b/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
-@@ -167,6 +167,17 @@ private:
+@@ -169,6 +169,17 @@ private:
- void selectionDidChange() override;
+ WebKitWebResourceLoadManager* webResourceLoadManager() override;
+#if ENABLE(DATALIST_ELEMENT)
+ RefPtr<WebKit::WebDataListSuggestionsDropdown> createDataListSuggestionsDropdown(WebKit::WebPageProxy& page) override;
@@ -11483,7 +11579,7 @@ index 7c08a13e10c75677452b74f52be2b447a5edaa13..56cf11581d453e8234f0957828083ee7
};
diff --git a/Source/WebKit/UIProcess/API/wpe/WPEView.cpp b/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
-index fb4ca2944d6b71834f6bd7b2707af451950cdad5..f8f0b07f1f5593be7ed0a1b040b3fa71b8aed3f0 100644
+index bb56a8d06ab00b6bf86aa0433c328f6e7c6d67cc..fc74b842fa4926ce5fd1aef84dbfef38296373a5 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
@@ -11499,7 +11595,7 @@ index fb4ca2944d6b71834f6bd7b2707af451950cdad5..f8f0b07f1f5593be7ed0a1b040b3fa71
diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitBrowserInspector.h b/Source/WebKit/UIProcess/API/wpe/WebKitBrowserInspector.h
new file mode 100644
-index 0000000000000000000000000000000000000000..cb1a540d341b07581ec87b922b7d007ce45ba989
+index 0000000000000000000000000000000000000000..273c5105cdf1638955cea01128c9bbab3e64436c
--- /dev/null
+++ b/Source/WebKit/UIProcess/API/wpe/WebKitBrowserInspector.h
@@ -0,0 +1,81 @@
@@ -11528,7 +11624,7 @@ index 0000000000000000000000000000000000000000..cb1a540d341b07581ec87b922b7d007c
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
-+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
++#if !defined(__WEBKIT_H_INSIDE__) && !defined(BUILDING_WEBKIT)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
@@ -11711,7 +11807,7 @@ index 0000000000000000000000000000000000000000..0a099832c3dd959f456fcae49a1d62a9
+#endif // ENABLE(DATALIST_ELEMENT)
diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitPointerLockPermissionRequest.h b/Source/WebKit/UIProcess/API/wpe/WebKitPointerLockPermissionRequest.h
new file mode 100644
-index 0000000000000000000000000000000000000000..a47e7eeb15094655c87d41ad0de7973306121184
+index 0000000000000000000000000000000000000000..c815e81ed38828a8cf2c1b7a4e195efb61cb4b2f
--- /dev/null
+++ b/Source/WebKit/UIProcess/API/wpe/WebKitPointerLockPermissionRequest.h
@@ -0,0 +1,64 @@
@@ -11734,7 +11830,7 @@ index 0000000000000000000000000000000000000000..a47e7eeb15094655c87d41ad0de79733
+ * Boston, MA 02110-1301, USA.
+ */
+
-+#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
++#if !defined(__WEBKIT2_H_INSIDE__) && !defined(BUILDING_WEBKIT)
+#error "Only <webkit2/webkit2.h> can be included directly."
+#endif
+
@@ -11812,7 +11908,7 @@ index 763bda5b29304f7ed7133c0a8158e6c8b94c5ea1..ff5d01438e44ce6785a2aa70fc5423ba
template <> WebKitWebViewBackend* refGPtr(WebKitWebViewBackend* ptr)
diff --git a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h
-index 6663964d5abac79e123d90e0351590884c66aa72..13ba5e7c3895c6e4efda95f1f90b9baea1c1bf30 100644
+index 16dcc1f69c38cd8ad630bc49d6d69feaa3aa811e..ddbd14645944fdb02925c381f06721d368a434f8 100644
--- a/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h
+++ b/Source/WebKit/UIProcess/API/wpe/WebKitWebViewBackend.h
@@ -27,6 +27,7 @@
@@ -11859,7 +11955,7 @@ index c2221efc00618c2ec4d20a88c59840767bd52ff5..71f1cd7e07c705a7c830ff5c4f7d7f98
#include <wpe/WebKitContextMenuActions.h>
#include <wpe/WebKitContextMenuItem.h>
diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
-index 27b741df36e254eb0c65e353b3d716f0c69fcc8d..a8ae9bae269b4bbf13cff5f2fc8f669aca78b8cf 100644
+index 08b47fcb75fb56c0645bd982406209733159955a..6e4d493529fb3c018496d5cdcef9c576126459f5 100644
--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
@@ -123,7 +123,11 @@ void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& lau
@@ -11875,10 +11971,10 @@ index 27b741df36e254eb0c65e353b3d716f0c69fcc8d..a8ae9bae269b4bbf13cff5f2fc8f669a
platformGetLaunchOptions(launchOptions);
}
diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
-index 876b7fd4e1c1abcfa55fe0942506d4f0fc79bb41..f6fb35b10bcfbaf5278b89a96159432e3bb33f20 100644
+index 31071d6a700dab7eedac1b5d2f4bd5fca3cb1937..541187249d345a0f53a5f7907a0e15e8158e2436 100644
--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
-@@ -181,12 +181,15 @@ protected:
+@@ -192,12 +192,15 @@ protected:
static RefPtr<WebCore::SharedBuffer> fetchAudioComponentServerRegistrations();
#endif
@@ -12047,7 +12143,7 @@ index 9edf4e2ca81f85f4cf8827932964e5fc352af99e..2eb7b0a327f517b7975cc0cab100a381
static NSString *const classifierOutputFeatureKey = @"label";
diff --git a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h
-index 454c61ffdefecc476d1560c7c43f5b5d345f281d..59f93c79167d3d392b46ff5243494b02af073550 100644
+index 957f7f088087169668a9b4f1ba65d9f206a2a836..15e44c8d5b6a3eafb7f1148707366b0cddcd119f 100644
--- a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h
+++ b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.h
@@ -29,6 +29,7 @@
@@ -12068,7 +12164,7 @@ index 454c61ffdefecc476d1560c7c43f5b5d345f281d..59f93c79167d3d392b46ff5243494b02
class PopUpSOAuthorizationSession final : public SOAuthorizationSession {
public:
diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.h b/Source/WebKit/UIProcess/Cocoa/UIDelegate.h
-index 9d6aa518ea6933af528b0bb56b89dc16b2085411..333ef27d1783a66ebcf19920ea0f37dc22368e62 100644
+index f6de6bb7dd8472c12d2d8381e95b3dd322bdf48a..8950670adf48f13cadfbc382d6be34f83707c27e 100644
--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.h
+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.h
@@ -95,6 +95,7 @@ private:
@@ -12079,7 +12175,7 @@ index 9d6aa518ea6933af528b0bb56b89dc16b2085411..333ef27d1783a66ebcf19920ea0f37dc
void presentStorageAccessConfirmDialog(const WTF::String& requestingDomain, const WTF::String& currentDomain, CompletionHandler<void(bool)>&&);
void requestStorageAccessConfirm(WebPageProxy&, WebFrameProxy*, const WebCore::RegistrableDomain& requestingDomain, const WebCore::RegistrableDomain& currentDomain, CompletionHandler<void(bool)>&&) final;
void decidePolicyForGeolocationPermissionRequest(WebPageProxy&, WebFrameProxy&, const FrameInfoData&, Function<void(bool)>&) final;
-@@ -199,6 +200,7 @@ private:
+@@ -201,6 +202,7 @@ private:
bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler : 1;
@@ -12088,7 +12184,7 @@ index 9d6aa518ea6933af528b0bb56b89dc16b2085411..333ef27d1783a66ebcf19920ea0f37dc
bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRequestGeolocationPermissionForFrameDecisionHandler : 1;
diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
-index a0a646412aa6ab10cb6b505cd35164dfa3a56200..e7ab24857b612bd48bba044bb43c6d93eebf88ae 100644
+index 69b98a2110020348ad7e7204c2422a9b46747820..1f5e1cbb66cbad66578a69bc6e5f8a295e2f23ab 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)
@@ -12099,7 +12195,7 @@ index a0a646412aa6ab10cb6b505cd35164dfa3a56200..e7ab24857b612bd48bba044bb43c6d93
m_delegateMethods.webViewRequestStorageAccessPanelUnderFirstPartyCompletionHandler = [delegate respondsToSelector:@selector(_webView:requestStorageAccessPanelForDomain:underCurrentDomain:completionHandler:)];
m_delegateMethods.webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewRequestGeolocationPermissionForOriginDecisionHandler = [delegate respondsToSelector:@selector(_webView:requestGeolocationPermissionForOrigin:initiatedByFrame:decisionHandler:)];
-@@ -412,6 +413,15 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy& page, const WTF::St
+@@ -416,6 +417,15 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy& page, const WTF::St
}).get()];
}
@@ -12116,7 +12212,7 @@ index a0a646412aa6ab10cb6b505cd35164dfa3a56200..e7ab24857b612bd48bba044bb43c6d93
{
if (!m_uiDelegate)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
-index 0674c7d1d8d468d4450c1331f58961492e4764c3..1d944382049ceb41414bce54bf5b9d0754e8f67e 100644
+index 292a7ff0e1e9348a5407eb12c5465688e9d89fcb..d448359c85277881de4ca83aa4e1650ceb1c2b92 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
@@ -37,6 +37,7 @@
@@ -12127,9 +12223,9 @@ index 0674c7d1d8d468d4450c1331f58961492e4764c3..1d944382049ceb41414bce54bf5b9d07
#import "PlaybackSessionManagerProxy.h"
#import "QuickLookThumbnailLoader.h"
#import "SafeBrowsingSPI.h"
-@@ -252,9 +253,66 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
+@@ -254,9 +255,66 @@ bool WebPageProxy::scrollingUpdatesDisabledForTesting()
- void WebPageProxy::startDrag(const DragItem& dragItem, const ShareableBitmap::Handle& dragImageHandle)
+ void WebPageProxy::startDrag(const DragItem& dragItem, const ShareableBitmapHandle& dragImageHandle)
{
+ if (m_interceptDrags) {
+ NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName: m_overrideDragPasteboardName];
@@ -12195,10 +12291,10 @@ index 0674c7d1d8d468d4450c1331f58961492e4764c3..1d944382049ceb41414bce54bf5b9d07
#if PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-index b86d5e91351454f7ea0c4b133eb5992fcecc3f99..fe4d5d641ac7e0f7e4dfd884ff9bb4bdfa3e18b3 100644
+index 6eb3b3bb85d68b35ac8012974dd65b40e50fc672..b01856886e6660af7dce809f949d9e92c8281ee6 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
-@@ -380,7 +380,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
+@@ -472,7 +472,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
auto screenProperties = WebCore::collectScreenProperties();
parameters.screenProperties = WTFMove(screenProperties);
#if PLATFORM(MAC)
@@ -12207,7 +12303,7 @@ index b86d5e91351454f7ea0c4b133eb5992fcecc3f99..fe4d5d641ac7e0f7e4dfd884ff9bb4bd
#endif
#if PLATFORM(IOS) && HAVE(AGX_COMPILER_SERVICE)
-@@ -656,8 +656,8 @@ void WebProcessPool::registerNotificationObservers()
+@@ -746,8 +746,8 @@ void WebProcessPool::registerNotificationObservers()
}];
m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
@@ -12219,7 +12315,7 @@ index b86d5e91351454f7ea0c4b133eb5992fcecc3f99..fe4d5d641ac7e0f7e4dfd884ff9bb4bd
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 32c82b899b301c957c5632c09e0ae321cf64e961..71cabafb96edd24d63f21f7fcc0a841cf8e72deb 100644
+index c69c58dd6a4168174750c13629c5a68b4f94d2c4..69d9fcf2586243a519e28b1f447cef596a70d503 100644
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
@@ -32,13 +32,16 @@
@@ -12455,7 +12551,7 @@ index 447320824dcb6f91eedc15f469f5fc57ce68703f..7f8b2a0ee2c5985e86ef888c6ebc709e
// This can cause the DownloadProxy object to be deleted.
m_downloadProxyMap.downloadFinished(*this);
diff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.h b/Source/WebKit/UIProcess/Downloads/DownloadProxy.h
-index 26c569d3cf475e6d4320f2388e43d77014caad86..79eebdc32a322b902ed9ada16a2084c0f214049a 100644
+index 42e9c901f866a2892396c83441ecbc5638270b52..42d2f292df2f337e302a8ec281333c704e985b96 100644
--- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.h
+++ b/Source/WebKit/UIProcess/Downloads/DownloadProxy.h
@@ -149,6 +149,7 @@ private:
@@ -12467,10 +12563,10 @@ index 26c569d3cf475e6d4320f2388e43d77014caad86..79eebdc32a322b902ed9ada16a2084c0
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.h b/Source/WebKit/UIProcess/DrawingAreaProxy.h
-index 21dd04d3fb314a0a96ccad8191edde3ada5de326..5a2ac57e9bcedd650996161112441d9598c036ee 100644
+index c359b84c9b7084ba15af6d2e52396b54c3fc2511..58e0d811dc2527d6bbebf94eb126d2110ae6dea9 100644
--- a/Source/WebKit/UIProcess/DrawingAreaProxy.h
+++ b/Source/WebKit/UIProcess/DrawingAreaProxy.h
-@@ -75,6 +75,7 @@ public:
+@@ -85,6 +85,7 @@ public:
const WebCore::IntSize& size() const { return m_size; }
bool setSize(const WebCore::IntSize&, const WebCore::IntSize& scrollOffset = { });
@@ -12478,7 +12574,7 @@ index 21dd04d3fb314a0a96ccad8191edde3ada5de326..5a2ac57e9bcedd650996161112441d95
#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
// The timeout we use when waiting for a DidUpdateGeometry message.
-@@ -162,6 +163,9 @@ private:
+@@ -174,6 +175,9 @@ private:
virtual void update(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
virtual void didUpdateBackingStoreState(uint64_t /* backingStoreStateID */, const UpdateInfo&, const LayerTreeContext&) { }
virtual void exitAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
@@ -14262,7 +14358,7 @@ index ed4e6f30b8c35966075573dccee801daceec865e..81e10124a8a745727fc25316345cda01
+
} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
-index 8c1339345d451874502b271f6aa2eca3fa0d3faf..1f8f5e74c86b61c1c5a16ac33d48afdd0e59a2e9 100644
+index 90619b09c986a6791eec834668ac38ba1581ba93..5ef7f3e25ae95cfbe5564d3456953b9abcd23db4 100644
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
@@ -26,17 +26,35 @@
@@ -14390,7 +14486,7 @@ index 8c1339345d451874502b271f6aa2eca3fa0d3faf..1f8f5e74c86b61c1c5a16ac33d48afdd
+ InspectorScreencastAgent* m_screecastAgent { nullptr };
HashMap<String, std::unique_ptr<InspectorTargetProxy>> m_targets;
- InspectorBrowserAgent* m_enabledBrowserAgent;
+ InspectorBrowserAgent* m_enabledBrowserAgent { nullptr };
bool m_didCreateLazyAgents { false };
+ HashMap<uint64_t, NavigationHandler> m_pendingNavigations;
@@ -14632,10 +14728,10 @@ index 0000000000000000000000000000000000000000..d0e11ed81a6257c011df23d5870da740
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..d9f566a6cce6433c2cfbb25fd6793f65a4ec1f23
+index 0000000000000000000000000000000000000000..84a473633483bcfe9d49514ea0d9be02a69a1cde
--- /dev/null
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
-@@ -0,0 +1,956 @@
+@@ -0,0 +1,959 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
@@ -15278,8 +15374,11 @@ index 0000000000000000000000000000000000000000..d9f566a6cce6433c2cfbb25fd6793f65
+
+ String frameIDString = frameID.substring(dotPos + 1);
+ uint64_t frameIDNumber = strtoull(frameIDString.ascii().data(), 0, 10);
-+ auto frameIdentifier = makeObjectIdentifier<WebCore::FrameIdentifierType>(frameIDNumber);
-+ WebFrameProxy* frame = process->webFrame(frameIdentifier);
++ auto frameIdentifier = WebCore::FrameIdentifier {
++ makeObjectIdentifier<WebCore::FrameIdentifierType>(frameIDNumber),
++ processID
++ };
++ WebFrameProxy* frame = WebFrameProxy::webFrame(frameIdentifier);
+ if (!frame) {
+ error = "Cannot find web frame for the frame id"_s;
+ return nullptr;
@@ -15801,10 +15900,10 @@ 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 7a14cfba15c103a2d4fe263fa49d25af3c396ec2..3ee0e154349661632799057c71f1d1f1551c2d69 100644
+index 1f17cf73705c763a75f1f007e5e783e0a07d13fd..68d4462d1749158831451ca98a456a425a7ea421 100644
--- a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
+++ b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
-@@ -96,8 +96,11 @@ void ProcessLauncher::launchProcess()
+@@ -97,8 +97,11 @@ void ProcessLauncher::launchProcess()
STARTUPINFO startupInfo { };
startupInfo.cb = sizeof(startupInfo);
@@ -15818,10 +15917,10 @@ index 7a14cfba15c103a2d4fe263fa49d25af3c396ec2..3ee0e154349661632799057c71f1d1f1
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 a94688670995d1e2f7834cef64735a9b9f62c233..560b8b99955d185c9e42d597459bcdff873b6ccc 100644
+index 53402c4b138aef755c73f67c01720015628ecaad..66cee299c768f8e0807dd84b5b0b21d0f96c4b44 100644
--- a/Source/WebKit/UIProcess/PageClient.h
+++ b/Source/WebKit/UIProcess/PageClient.h
-@@ -323,6 +323,11 @@ public:
+@@ -328,6 +328,11 @@ public:
virtual void selectionDidChange() = 0;
#endif
@@ -15833,16 +15932,6 @@ index a94688670995d1e2f7834cef64735a9b9f62c233..560b8b99955d185c9e42d597459bcdff
#if PLATFORM(COCOA) || PLATFORM(GTK)
virtual RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) = 0;
#endif
-diff --git a/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp b/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
-index f85e2a653d0dff83a2970b0a05e75459830a5c21..f64097fc38ef2a3630d7625a4a7ea678ed12fdaf 100644
---- a/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
-+++ b/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
-@@ -635,3 +635,5 @@ bool ProvisionalPageProxy::sendMessage(UniqueRef<IPC::Encoder>&& encoder, Option
- }
-
- } // namespace WebKit
-+
-+#undef MESSAGE_CHECK
diff --git a/Source/WebKit/UIProcess/RemoteInspectorPipe.cpp b/Source/WebKit/UIProcess/RemoteInspectorPipe.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dd8b28e692dca4078eb710b2a97e61716126a4cb
@@ -16168,6 +16257,22 @@ 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 15aa50662746fbebc5b2574076b433452b03176e..a273256fe5e84819efc98e0723c7d26cc84fc9b5 100644
+--- a/Source/WebKit/UIProcess/WebFrameProxy.cpp
++++ b/Source/WebKit/UIProcess/WebFrameProxy.cpp
+@@ -28,9 +28,11 @@
+
+ #include "APINavigation.h"
+ #include "Connection.h"
++#include "FormDataReference.h"
+ #include "ProvisionalPageProxy.h"
+ #include "WebFramePolicyListenerProxy.h"
+ #include "WebFrameProxyMessages.h"
++#include "WebPageInspectorController.h"
+ #include "WebPageMessages.h"
+ #include "WebPasteboardProxy.h"
+ #include "WebProcessPool.h"
diff --git a/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp b/Source/WebKit/UIProcess/WebPageInspectorEmulationAgent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ae45b4212bdb3f6a004cc80a1d91146b540f86f5
@@ -16404,7 +16509,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..ac30c5f2308932d0074e59acf8093750f5eab9db
+index 0000000000000000000000000000000000000000..f2582719303adaa1463715d60f8c5b606b7ad479
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.cpp
@@ -0,0 +1,332 @@
@@ -16564,7 +16669,7 @@ index 0000000000000000000000000000000000000000..ac30c5f2308932d0074e59acf8093750
+ callback->sendFailure("Unsupported event type."_s);
+ return;
+ }
-+ OptionSet<WebEvent::Modifier> eventModifiers;
++ OptionSet<WebEventModifier> eventModifiers;
+ if (modifiers)
+ eventModifiers = eventModifiers.fromRaw(*modifiers);
+ int eventWindowsVirtualKeyCode = 0;
@@ -16636,20 +16741,20 @@ index 0000000000000000000000000000000000000000..ac30c5f2308932d0074e59acf8093750
+ return;
+ }
+
-+ OptionSet<WebEvent::Modifier> eventModifiers;
++ OptionSet<WebEventModifier> eventModifiers;
+ if (modifiers)
+ eventModifiers = eventModifiers.fromRaw(*modifiers);
+
-+ WebMouseEvent::Button eventButton = WebMouseEvent::NoButton;
++ WebMouseEventButton eventButton = WebMouseEventButton::NoButton;
+ if (!!button) {
+ if (button == "left"_s)
-+ eventButton = WebMouseEvent::LeftButton;
++ eventButton = WebMouseEventButton::LeftButton;
+ else if (button == "middle"_s)
-+ eventButton = WebMouseEvent::MiddleButton;
++ eventButton = WebMouseEventButton::MiddleButton;
+ else if (button == "right"_s)
-+ eventButton = WebMouseEvent::RightButton;
++ eventButton = WebMouseEventButton::RightButton;
+ else if (button == "none"_s)
-+ eventButton = WebMouseEvent::NoButton;
++ eventButton = WebMouseEventButton::NoButton;
+ else {
+ callback->sendFailure("Unsupported eventButton"_s);
+ return;
@@ -16713,7 +16818,7 @@ index 0000000000000000000000000000000000000000..ac30c5f2308932d0074e59acf8093750
+
+void WebPageInspectorInputAgent::dispatchWheelEvent(int x, int y, std::optional<int>&& modifiers, std::optional<int>&& deltaX, std::optional<int>&& deltaY, Ref<DispatchWheelEventCallback>&& callback)
+{
-+ OptionSet<WebEvent::Modifier> eventModifiers;
++ OptionSet<WebEventModifier> eventModifiers;
+ if (modifiers)
+ eventModifiers = eventModifiers.fromRaw(*modifiers);
+
@@ -16734,7 +16839,7 @@ index 0000000000000000000000000000000000000000..ac30c5f2308932d0074e59acf8093750
+ WebCore::FloatSize delta = {-eventDeltaX, -eventDeltaY};
+ WebCore::FloatSize wheelTicks = delta;
+ wheelTicks.scale(1.0f / WebCore::Scrollbar::pixelsPerLineStep());
-+ WebWheelEvent webEvent(WebEvent::Wheel, {x, y}, {x, y}, delta, wheelTicks, WebWheelEvent::ScrollByPixelWheelEvent, eventModifiers, timestamp);
++ WebWheelEvent webEvent({WebEvent::Wheel, eventModifiers, timestamp}, {x, y}, {x, y}, delta, wheelTicks, WebWheelEvent::ScrollByPixelWheelEvent);
+ NativeWebWheelEvent event(webEvent);
+ m_page.handleWheelEvent(event);
+}
@@ -16742,7 +16847,7 @@ index 0000000000000000000000000000000000000000..ac30c5f2308932d0074e59acf8093750
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h
new file mode 100644
-index 0000000000000000000000000000000000000000..48c9ccc420c1b4ae3259e1d5ba17fd8fbea24b96
+index 0000000000000000000000000000000000000000..f1e6579eeaf6478a593e2558b8652222d5d16cbd
--- /dev/null
+++ b/Source/WebKit/UIProcess/WebPageInspectorInputAgent.h
@@ -0,0 +1,86 @@
@@ -16813,7 +16918,7 @@ index 0000000000000000000000000000000000000000..48c9ccc420c1b4ae3259e1d5ba17fd8f
+ 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<WebEvent::Modifier> modifiers, Vector<String>& commands, WallTime timestamp);
++ 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);
+#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
@@ -16833,10 +16938,10 @@ index 0000000000000000000000000000000000000000..48c9ccc420c1b4ae3259e1d5ba17fd8f
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
-index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e2e630be1 100644
+index 6e935c35cf7c7bfdb71fdb88af47a941f6e1f8eb..b2749ecdc7fdbc4011a66257ee2743be53fec783 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
-@@ -246,6 +246,9 @@
+@@ -249,6 +249,9 @@
#if PLATFORM(GTK)
#include "GtkSettingsManager.h"
@@ -16846,7 +16951,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
#include <WebCore/SelectionData.h>
#endif
-@@ -628,6 +631,10 @@ WebPageProxy::~WebPageProxy()
+@@ -647,6 +650,10 @@ WebPageProxy::~WebPageProxy()
if (m_preferences->mediaSessionCoordinatorEnabled())
GroupActivitiesSessionNotifier::sharedNotifier().removeWebPage(*this);
#endif
@@ -16857,7 +16962,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
}
void WebPageProxy::addAllMessageReceivers()
-@@ -1052,6 +1059,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)
+@@ -1072,6 +1079,7 @@ void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason)
m_pageLoadState.didSwapWebProcesses();
if (reason != ProcessLaunchReason::InitialProcess)
m_drawingArea->waitForBackingStoreUpdateOnNextPaint();
@@ -16865,7 +16970,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
}
void WebPageProxy::didAttachToRunningProcess()
-@@ -1405,6 +1413,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
+@@ -1434,6 +1442,21 @@ WebProcessProxy& WebPageProxy::ensureRunningProcess()
return m_process;
}
@@ -16887,7 +16992,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
RefPtr<API::Navigation> WebPageProxy::loadRequest(ResourceRequest&& request, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, API::Object* userData)
{
if (m_isClosed)
-@@ -1964,6 +1987,31 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
+@@ -2005,6 +2028,31 @@ void WebPageProxy::setControlledByAutomation(bool controlled)
websiteDataStore().networkProcess().send(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation), 0);
}
@@ -16919,7 +17024,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
void WebPageProxy::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type)
{
MESSAGE_CHECK(m_process, !targetId.isEmpty());
-@@ -2158,6 +2206,25 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpd
+@@ -2199,6 +2247,25 @@ void WebPageProxy::updateActivityState(OptionSet<ActivityState::Flag> flagsToUpd
{
bool wasVisible = isViewVisible();
m_activityState.remove(flagsToUpdate);
@@ -16945,7 +17050,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
if (flagsToUpdate & ActivityState::IsFocused && pageClient().isViewFocused())
m_activityState.add(ActivityState::IsFocused);
if (flagsToUpdate & ActivityState::WindowIsActive && pageClient().isViewWindowActive())
-@@ -2796,6 +2863,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -2837,6 +2904,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
{
if (!hasRunningProcess())
return;
@@ -16954,7 +17059,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
#if PLATFORM(GTK)
UNUSED_PARAM(dragStorageName);
UNUSED_PARAM(sandboxExtensionHandle);
-@@ -2806,6 +2875,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
+@@ -2847,6 +2916,8 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag
m_process->assumeReadAccessToBaseURL(*this, url);
ASSERT(dragData.platformData());
@@ -16963,7 +17068,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), *dragData.platformData(), dragData.flags()));
#else
send(Messages::WebPage::PerformDragControllerAction(action, dragData, sandboxExtensionHandle, sandboxExtensionsForUpload));
-@@ -2821,18 +2892,41 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
+@@ -2862,18 +2933,41 @@ void WebPageProxy::didPerformDragControllerAction(std::optional<WebCore::DragOpe
m_currentDragCaretEditableElementRect = editableElementRect;
setDragCaretRect(insertionRect);
pageClient().didPerformDragControllerAction();
@@ -16975,7 +17080,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) || PLATFORM(WPE)
- void WebPageProxy::startDrag(SelectionData&& selectionData, OptionSet<WebCore::DragOperation> dragOperationMask, const ShareableBitmap::Handle& dragImageHandle, IntPoint&& dragImageHotspot)
+ void WebPageProxy::startDrag(SelectionData&& selectionData, OptionSet<WebCore::DragOperation> dragOperationMask, const ShareableBitmapHandle& dragImageHandle, IntPoint&& dragImageHotspot)
{
- RefPtr<ShareableBitmap> dragImage = !dragImageHandle.isNull() ? ShareableBitmap::create(dragImageHandle) : nullptr;
- pageClient().startDrag(WTFMove(selectionData), dragOperationMask, WTFMove(dragImage), WTFMove(dragImageHotspot));
@@ -17008,7 +17113,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<WebCore::DragOperation> dragOperationMask)
{
if (!hasRunningProcess())
-@@ -2841,6 +2935,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
+@@ -2882,6 +2976,24 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo
setDragCaretRect({ });
}
@@ -17033,7 +17138,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
void WebPageProxy::didPerformDragOperation(bool handled)
{
pageClient().didPerformDragOperation(handled);
-@@ -2853,8 +2965,18 @@ void WebPageProxy::didStartDrag()
+@@ -2894,8 +3006,18 @@ void WebPageProxy::didStartDrag()
discardQueuedMouseEvents();
send(Messages::WebPage::DidStartDrag());
@@ -17053,7 +17158,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
void WebPageProxy::dragCancelled()
{
if (hasRunningProcess())
-@@ -2959,16 +3081,38 @@ void WebPageProxy::processNextQueuedMouseEvent()
+@@ -3007,16 +3129,38 @@ void WebPageProxy::processNextQueuedMouseEvent()
m_process->startResponsivenessTimer();
}
@@ -17063,10 +17168,10 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
+ std::optional<Vector<SandboxExtension::Handle>> sandboxExtensions;
#if PLATFORM(MAC)
-- bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEvent::MouseMove && event.button() != WebMouseEvent::Button::NoButton;
+- bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEvent::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() != WebMouseEvent::Button::NoButton;
++ bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEvent::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
@@ -17098,7 +17203,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
}
void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function<void ()>&& action)
-@@ -3132,7 +3276,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
+@@ -3180,7 +3324,7 @@ static TrackingType mergeTrackingTypes(TrackingType a, TrackingType b)
void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent)
{
@@ -17107,7 +17212,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
for (auto& touchPoint : touchStartEvent.touchPoints()) {
IntPoint location = touchPoint.location();
auto updateTrackingType = [this, location](TrackingType& trackingType, EventTrackingRegions::EventType eventType) {
-@@ -3164,7 +3308,7 @@ void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent
+@@ -3212,7 +3356,7 @@ void WebPageProxy::updateTouchEventTracking(const WebTouchEvent& touchStartEvent
m_touchAndPointerEventTracking.touchStartTracking = TrackingType::Synchronous;
m_touchAndPointerEventTracking.touchMoveTracking = TrackingType::Synchronous;
m_touchAndPointerEventTracking.touchEndTracking = TrackingType::Synchronous;
@@ -17116,16 +17221,16 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
}
TrackingType WebPageProxy::touchEventTrackingType(const WebTouchEvent& touchStartEvent) const
-@@ -3552,6 +3696,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
- policyAction = PolicyAction::Download;
-
- if (policyAction != PolicyAction::Use || !frame.isMainFrame() || !navigation) {
+@@ -3602,6 +3746,8 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
+ if (policyAction != PolicyAction::Use
+ || (!preferences().siteIsolationEnabled() && !frame.isMainFrame())
+ || !navigation) {
+ if (policyAction == PolicyAction::Download && navigation)
+ m_decidePolicyForResponseRequest = navigation->currentRequest();
receivedPolicyDecision(policyAction, navigation, navigation->websitePolicies(), WTFMove(navigationAction), WTFMove(sender));
return;
}
-@@ -3622,6 +3768,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, A
+@@ -3672,6 +3818,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)
{
@@ -17133,7 +17238,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
if (!hasRunningProcess()) {
sender->send(PolicyDecision { sender->identifier(), isNavigatingToAppBoundDomain(), PolicyAction::Ignore, 0, std::nullopt, std::nullopt });
return;
-@@ -4396,6 +4543,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
+@@ -4457,6 +4604,11 @@ void WebPageProxy::pageScaleFactorDidChange(double scaleFactor)
m_pageScaleFactor = scaleFactor;
}
@@ -17145,7 +17250,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
void WebPageProxy::pluginScaleFactorDidChange(double pluginScaleFactor)
{
m_pluginScaleFactor = pluginScaleFactor;
-@@ -4807,6 +4959,7 @@ void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
+@@ -4862,6 +5014,7 @@ void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
return;
m_navigationState->didDestroyNavigation(navigationID);
@@ -17153,7 +17258,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
}
void WebPageProxy::didStartProvisionalLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, URL&& url, URL&& unreachableURL, const UserData& userData)
-@@ -5032,6 +5185,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
+@@ -5087,6 +5240,8 @@ void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& p
m_failingProvisionalLoadURL = { };
@@ -17162,23 +17267,23 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
// 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;
-@@ -5555,7 +5710,14 @@ void WebPageProxy::decidePolicyForNavigationActionAsync(FrameIdentifier frameID,
+@@ -5612,7 +5767,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, const UserData& userData, uint64_t listenerID)
+ IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, uint64_t listenerID)
{
-- decidePolicyForNavigationActionAsyncShared(m_process.copyRef(), m_webPageID, frameID, WTFMove(frameInfo), identifier, navigationID, WTFMove(navigationActionData), WTFMove(originatingFrameInfo), originatingPageID, originalRequest, WTFMove(request), WTFMove(requestBody), WTFMove(redirectResponse), userData, listenerID);
+- decidePolicyForNavigationActionAsyncShared(m_process.copyRef(), m_webPageID, frameID, WTFMove(frameInfo), identifier, navigationID, WTFMove(navigationActionData), WTFMove(originatingFrameInfo), originatingPageID, originalRequest, WTFMove(request), WTFMove(requestBody), WTFMove(redirectResponse), listenerID);
+ if (m_inspectorController->shouldPauseLoading()) {
+ m_inspectorController->setContinueLoadingCallback([this, protectedThis = Ref { *this }, frameID, frameInfo = WTFMove(frameInfo), identifier, navigationID, navigationActionData = WTFMove(navigationActionData),
-+ originatingFrameInfo = WTFMove(originatingFrameInfo), originatingPageID, originalRequest, request = WTFMove(request), requestBody = WTFMove(requestBody), redirectResponse = WTFMove(redirectResponse), userData, listenerID] () mutable {
-+ decidePolicyForNavigationActionAsyncShared(m_process.copyRef(), m_webPageID, frameID, WTFMove(frameInfo), identifier, navigationID, WTFMove(navigationActionData), WTFMove(originatingFrameInfo), originatingPageID, originalRequest, WTFMove(request), WTFMove(requestBody), WTFMove(redirectResponse), userData, listenerID);
++ originatingFrameInfo = WTFMove(originatingFrameInfo), originatingPageID, originalRequest, request = WTFMove(request), requestBody = WTFMove(requestBody), redirectResponse = WTFMove(redirectResponse), listenerID] () mutable {
++ decidePolicyForNavigationActionAsyncShared(m_process.copyRef(), m_webPageID, frameID, WTFMove(frameInfo), identifier, navigationID, WTFMove(navigationActionData), WTFMove(originatingFrameInfo), originatingPageID, originalRequest, WTFMove(request), WTFMove(requestBody), WTFMove(redirectResponse), listenerID);
+ });
+ } else {
-+ decidePolicyForNavigationActionAsyncShared(m_process.copyRef(), m_webPageID, frameID, WTFMove(frameInfo), identifier, navigationID, WTFMove(navigationActionData), WTFMove(originatingFrameInfo), originatingPageID, originalRequest, WTFMove(request), WTFMove(requestBody), WTFMove(redirectResponse), userData, listenerID);
++ decidePolicyForNavigationActionAsyncShared(m_process.copyRef(), m_webPageID, frameID, WTFMove(frameInfo), identifier, navigationID, WTFMove(navigationActionData), WTFMove(originatingFrameInfo), originatingPageID, originalRequest, WTFMove(request), WTFMove(requestBody), WTFMove(redirectResponse), listenerID);
+ }
}
void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&& process, PageIdentifier webPageID, FrameIdentifier frameID, FrameInfoData&& frameInfo,
-@@ -6145,6 +6307,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
+@@ -6193,6 +6355,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
if (originatingPage)
openerAppInitiatedState = originatingPage->lastNavigationWasAppInitiated();
@@ -17186,7 +17291,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
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);
-@@ -6191,6 +6354,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
+@@ -6239,6 +6402,7 @@ void WebPageProxy::createNewPage(FrameInfoData&& originatingFrameInfoData, WebPa
void WebPageProxy::showPage()
{
m_uiClient->showPage(this);
@@ -17194,7 +17299,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
}
void WebPageProxy::exitFullscreenImmediately()
-@@ -6250,6 +6414,10 @@ void WebPageProxy::closePage()
+@@ -6308,6 +6472,10 @@ void WebPageProxy::closePage()
if (isClosed())
return;
@@ -17205,7 +17310,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:");
pageClient().clearAllEditCommands();
m_uiClient->close(this);
-@@ -6286,6 +6454,8 @@ void WebPageProxy::runJavaScriptAlert(FrameIdentifier frameID, FrameInfoData&& f
+@@ -6344,6 +6512,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 {
@@ -17214,7 +17319,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
page.m_uiClient->runJavaScriptAlert(page, message, frame, WTFMove(frameInfo), [reply = WTFMove(reply), completion = WTFMove(completion)]() mutable {
reply();
completion();
-@@ -6307,6 +6477,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
+@@ -6365,6 +6535,8 @@ void WebPageProxy::runJavaScriptConfirm(FrameIdentifier frameID, FrameInfoData&&
if (auto* automationSession = process().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -17223,7 +17328,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
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 {
-@@ -6330,6 +6502,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
+@@ -6388,6 +6560,8 @@ void WebPageProxy::runJavaScriptPrompt(FrameIdentifier frameID, FrameInfoData&&
if (auto* automationSession = process().processPool().automationSession())
automationSession->willShowJavaScriptDialog(*this);
}
@@ -17232,7 +17337,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
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 {
-@@ -6457,6 +6631,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
+@@ -6503,6 +6677,8 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(FrameIdentifier frameID, FrameInf
return;
}
}
@@ -17241,7 +17346,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
// Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer.
m_process->stopResponsivenessTimer();
-@@ -7743,6 +7919,8 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7844,6 +8020,8 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
if (auto* automationSession = process().processPool().automationSession())
automationSession->mouseEventsFlushedForPage(*this);
didFinishProcessingAllPendingMouseEvents();
@@ -17250,7 +17355,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
}
break;
}
-@@ -7757,10 +7935,13 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7858,10 +8036,13 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
pageClient().wheelEventWasNotHandledByWebCore(oldestProcessedEvent);
}
@@ -17267,7 +17372,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
break;
}
-@@ -7769,7 +7950,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7870,7 +8051,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());
@@ -17275,7 +17380,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
MESSAGE_CHECK(m_process, !m_keyEventQueue.isEmpty());
auto event = m_keyEventQueue.takeFirst();
MESSAGE_CHECK(m_process, type == event.type());
-@@ -7788,7 +7968,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7889,7 +8069,6 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
// The call to doneWithKeyEvent may close this WebPage.
// Protect against this being destroyed.
Ref<WebPageProxy> protect(*this);
@@ -17283,7 +17388,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
pageClient().doneWithKeyEvent(event, handled);
if (!handled)
m_uiClient->didNotHandleKeyEvent(this, event);
-@@ -7797,6 +7976,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
+@@ -7898,6 +8077,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
if (!canProcessMoreKeyEvents) {
if (auto* automationSession = process().processPool().automationSession())
automationSession->keyboardEventsFlushedForPage(*this);
@@ -17291,9 +17396,9 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
}
break;
}
-@@ -8130,7 +8310,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
+@@ -8251,7 +8431,10 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
{
- WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%{public}s", processTerminationReasonToString(reason));
+ WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%" PUBLIC_LOG_STRING, processTerminationReasonToString(reason));
- bool handledByClient = false;
+ bool handledByClient = m_inspectorController->pageCrashed(reason);
@@ -17303,7 +17408,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
if (m_loaderClient)
handledByClient = reason != ProcessTerminationReason::RequestedByClient && m_loaderClient->processDidCrash(*this);
else
-@@ -8464,6 +8647,7 @@ static Span<const ASCIILiteral> gpuMachServices()
+@@ -8590,6 +8773,7 @@ static Span<const ASCIILiteral> gpuMachServices()
WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea, RefPtr<API::WebsitePolicies>&& websitePolicies)
{
@@ -17311,7 +17416,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
WebPageCreationParameters parameters;
parameters.processDisplayName = configuration().processDisplayName();
-@@ -8657,6 +8841,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
+@@ -8790,6 +8974,8 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
parameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false;
@@ -17320,7 +17425,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
#if PLATFORM(IOS)
// FIXME: This is also being passed over the to WebProcess via the PreferencesStore.
parameters.allowsDeprecatedSynchronousXMLHttpRequestDuringUnload = allowsDeprecatedSynchronousXMLHttpRequestDuringUnload();
-@@ -8729,6 +8915,14 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, Even
+@@ -8862,6 +9048,14 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, Even
void WebPageProxy::didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&& authenticationChallenge, NegotiatedLegacyTLS negotiatedLegacyTLS)
{
@@ -17335,7 +17440,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
if (negotiatedLegacyTLS == NegotiatedLegacyTLS::Yes) {
m_navigationClient->shouldAllowLegacyTLS(*this, authenticationChallenge.get(), [this, protectedThis = Ref { *this }, authenticationChallenge] (bool shouldAllowLegacyTLS) {
if (shouldAllowLegacyTLS)
-@@ -8822,6 +9016,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
+@@ -8955,6 +9149,15 @@ void WebPageProxy::requestGeolocationPermissionForFrame(GeolocationIdentifier ge
request->deny();
};
@@ -17352,7 +17457,7 @@ index f114801f439bb4b8362d27ec656c57d8c2f0770b..8c428f1e44f26bfd7414588e610d9e6e
// 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 fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bcb745cf23 100644
+index f29b9095ff0e3dc64778e27f10c8815528f2e5c9..28eafbea324df544fbdf20f98e53f29c2bdf302f 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.h
+++ b/Source/WebKit/UIProcess/WebPageProxy.h
@@ -39,6 +39,7 @@
@@ -17390,7 +17495,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
#include <WebCore/MediaPlaybackTargetPicker.h>
#include <WebCore/WebMediaSessionManagerClient.h>
-@@ -249,6 +261,7 @@ class AuthenticationChallenge;
+@@ -253,6 +265,7 @@ class AuthenticationChallenge;
class CertificateInfo;
class Cursor;
class DragData;
@@ -17398,7 +17503,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
class FloatRect;
class FontAttributeChanges;
class FontChanges;
-@@ -256,7 +269,6 @@ class GraphicsLayer;
+@@ -260,7 +273,6 @@ class GraphicsLayer;
class IntSize;
class ProtectionSpace;
class RunLoopObserver;
@@ -17406,7 +17511,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
class SharedBuffer;
class SpeechRecognitionRequest;
class TextIndicator;
-@@ -542,6 +554,8 @@ public:
+@@ -549,6 +561,8 @@ public:
void setControlledByAutomation(bool);
WebPageInspectorController& inspectorController() { return *m_inspectorController; }
@@ -17415,7 +17520,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
#if PLATFORM(IOS_FAMILY)
void showInspectorIndication();
-@@ -652,6 +666,11 @@ public:
+@@ -659,6 +673,11 @@ public:
void setPageLoadStateObserver(std::unique_ptr<PageLoadState::Observer>&&);
@@ -17427,7 +17532,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
void initializeWebPage();
void setDrawingArea(std::unique_ptr<DrawingAreaProxy>&&);
-@@ -679,6 +698,7 @@ public:
+@@ -683,6 +702,7 @@ public:
void closePage();
void addPlatformLoadParameters(WebProcessProxy&, LoadParameters&);
@@ -17443,21 +17548,21 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
void pluginScaleFactorDidChange(double);
void pluginZoomFactorDidChange(double);
-@@ -1317,14 +1338,20 @@ public:
+@@ -1318,14 +1339,20 @@ public:
void didStartDrag();
void dragCancelled();
void setDragCaretRect(const WebCore::IntRect&);
+ void setInterceptDrags(bool shouldIntercept);
+ bool cancelDragIfNeeded();
#if PLATFORM(COCOA)
- void startDrag(const WebCore::DragItem&, const ShareableBitmap::Handle& dragImageHandle);
+ void startDrag(const WebCore::DragItem&, const ShareableBitmapHandle& dragImageHandle);
void setPromisedDataForImage(const String& pasteboardName, const SharedMemory::Handle& imageHandle, const String& filename, const String& extension,
const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, const String& originIdentifier);
+ void releaseInspectorDragPasteboard();
#endif
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) || PLATFORM(WPE)
- void startDrag(WebCore::SelectionData&&, OptionSet<WebCore::DragOperation>, const ShareableBitmap::Handle& dragImage, WebCore::IntPoint&& dragImageHotspot);
+ void startDrag(WebCore::SelectionData&&, OptionSet<WebCore::DragOperation>, const ShareableBitmapHandle& dragImage, WebCore::IntPoint&& dragImageHotspot);
#endif
+#if PLATFORM(WIN)
+ void startDrag(WebCore::DragDataMap&& dragDataMap);
@@ -17465,7 +17570,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
#endif
void processDidBecomeUnresponsive();
-@@ -1575,6 +1602,8 @@ public:
+@@ -1580,6 +1607,8 @@ public:
#if PLATFORM(COCOA) || PLATFORM(GTK)
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&);
@@ -17474,7 +17579,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
#endif
#if ENABLE(WEB_CRYPTO)
-@@ -2767,6 +2796,7 @@ private:
+@@ -2796,6 +2825,7 @@ private:
String m_overrideContentSecurityPolicy;
RefPtr<WebInspectorUIProxy> m_inspector;
@@ -17482,7 +17587,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
#if PLATFORM(COCOA)
WeakObjCPtr<WKWebView> m_cocoaView;
-@@ -3041,6 +3071,20 @@ private:
+@@ -3075,6 +3105,20 @@ private:
unsigned m_currentDragNumberOfFilesToBeAccepted { 0 };
WebCore::IntRect m_currentDragCaretRect;
WebCore::IntRect m_currentDragCaretEditableElementRect;
@@ -17503,7 +17608,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
#endif
PageLoadState m_pageLoadState;
-@@ -3255,6 +3299,9 @@ private:
+@@ -3287,6 +3331,9 @@ private:
RefPtr<API::Object> messageBody;
};
Vector<InjectedBundleMessage> m_pendingInjectedBundleMessages;
@@ -17514,7 +17619,7 @@ index fb40ca2963e67f3e39fbc552f9d5c45ce01b6cc0..ffafbe89a52870233cce27da61ab66bc
#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 941f874a3f7be45275d18cf9495d91800839d32b..37ceecb165f5b568d4d4b1a4974c96b072c492cc 100644
+index 0a3536fd3f8df52f2bf87dd6d0935afbfbd67ea3..b037e9d955c4112d9456352bcb90b535fb3768a2 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in
@@ -29,6 +29,7 @@ messages -> WebPageProxy {
@@ -17523,9 +17628,9 @@ index 941f874a3f7be45275d18cf9495d91800839d32b..37ceecb165f5b568d4d4b1a4974c96b0
MouseDidMoveOverElement(struct WebKit::WebHitTestResultData hitTestResultData, uint32_t modifiers, WebKit::UserData userData)
+ LogToStderr(String text)
- #if ENABLE(WEBGL)
- WebGLPolicyForURL(URL url) -> (enum:uint8_t WebCore::WebGLLoadPolicy loadPolicy) Synchronous
-@@ -176,6 +177,7 @@ messages -> WebPageProxy {
+ DidChangeViewportProperties(struct WebCore::ViewportAttributes attributes)
+ DidReceiveEvent(uint32_t type, bool handled)
+@@ -175,6 +176,7 @@ messages -> WebPageProxy {
#endif
PageScaleFactorDidChange(double scaleFactor)
@@ -17533,13 +17638,13 @@ index 941f874a3f7be45275d18cf9495d91800839d32b..37ceecb165f5b568d4d4b1a4974c96b0
PluginScaleFactorDidChange(double zoomFactor)
PluginZoomFactorDidChange(double zoomFactor)
-@@ -305,10 +307,12 @@ messages -> WebPageProxy {
- StartDrag(struct WebCore::DragItem dragItem, WebKit::ShareableBitmap::Handle dragImage)
+@@ -304,10 +306,12 @@ messages -> WebPageProxy {
+ StartDrag(struct WebCore::DragItem dragItem, WebKit::ShareableBitmapHandle dragImage)
SetPromisedDataForImage(String pasteboardName, WebKit::SharedMemory::Handle imageHandle, String filename, String extension, String title, String url, String visibleURL, WebKit::SharedMemory::Handle archiveHandle, String originIdentifier)
#endif
-#if PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
+#if (PLATFORM(GTK) || PLATFORM(WPE)) && ENABLE(DRAG_SUPPORT)
- StartDrag(WebCore::SelectionData selectionData, OptionSet<WebCore::DragOperation> dragOperationMask, WebKit::ShareableBitmap::Handle dragImage, WebCore::IntPoint dragImageHotspot)
+ StartDrag(WebCore::SelectionData selectionData, OptionSet<WebCore::DragOperation> dragOperationMask, WebKit::ShareableBitmapHandle dragImage, WebCore::IntPoint dragImageHotspot)
#endif
-
+#if PLATFORM(WIN) && ENABLE(DRAG_SUPPORT)
@@ -17549,7 +17654,7 @@ index 941f874a3f7be45275d18cf9495d91800839d32b..37ceecb165f5b568d4d4b1a4974c96b0
DidPerformDragOperation(bool handled)
#endif
diff --git a/Source/WebKit/UIProcess/WebProcessCache.cpp b/Source/WebKit/UIProcess/WebProcessCache.cpp
-index a87227253e0f52388407d9c16a62a27cb35059fe..fbfbb6ef783e214707801963f61dc27f50819957 100644
+index e68471d45366b6f7a609e6a57bcfea2820511e29..d2344e7b428ae19399ded4e37bfbf81c26f07dfd 100644
--- a/Source/WebKit/UIProcess/WebProcessCache.cpp
+++ b/Source/WebKit/UIProcess/WebProcessCache.cpp
@@ -81,6 +81,10 @@ bool WebProcessCache::canCacheProcess(WebProcessProxy& process) const
@@ -17564,10 +17669,10 @@ index a87227253e0f52388407d9c16a62a27cb35059fe..fbfbb6ef783e214707801963f61dc27f
}
diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp
-index 7f9db2b972eef69cbbb7ed9185381bf2a3dcffe5..ab985444d3485303f5226883c7b2e8908455602d 100644
+index 92c0965f31cf4e6d1cd65830eb52ab6eaa9031ce..4b500d1e599334d47a8811645eead699ca057148 100644
--- a/Source/WebKit/UIProcess/WebProcessPool.cpp
+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp
-@@ -364,17 +364,19 @@ void WebProcessPool::setCustomWebContentServiceBundleIdentifier(const String& cu
+@@ -363,17 +363,19 @@ void WebProcessPool::setCustomWebContentServiceBundleIdentifier(const String& cu
m_configuration->setCustomWebContentServiceBundleIdentifier(customWebContentServiceBundleIdentifier);
}
@@ -17590,7 +17695,7 @@ index 7f9db2b972eef69cbbb7ed9185381bf2a3dcffe5..ab985444d3485303f5226883c7b2e890
void WebProcessPool::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
{
-@@ -521,6 +523,14 @@ void WebProcessPool::establishRemoteWorkerContextConnectionToNetworkProcess(Remo
+@@ -520,6 +522,14 @@ void WebProcessPool::establishRemoteWorkerContextConnectionToNetworkProcess(Remo
RefPtr<WebProcessProxy> requestingProcess = requestingProcessIdentifier ? WebProcessProxy::processForIdentifier(*requestingProcessIdentifier) : nullptr;
WebProcessPool* processPool = requestingProcess ? &requestingProcess->processPool() : processPools()[0];
@@ -17605,7 +17710,7 @@ index 7f9db2b972eef69cbbb7ed9185381bf2a3dcffe5..ab985444d3485303f5226883c7b2e890
ASSERT(processPool);
WebProcessProxy* remoteWorkerProcessProxy { nullptr };
-@@ -793,7 +803,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
+@@ -804,7 +814,7 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
#endif
parameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel();
@@ -17615,10 +17720,10 @@ index 7f9db2b972eef69cbbb7ed9185381bf2a3dcffe5..ab985444d3485303f5226883c7b2e890
parameters.urlSchemesRegisteredAsEmptyDocument = copyToVector(m_schemesToRegisterAsEmptyDocument);
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp
-index 331ee8054f7c8a8ddccd2b3aa7a8e67c285abf38..46d70ced9730a4a62f55ae833049e27a9356ec0a 100644
+index 86a768663dbd5eabb936c826a29b63988416b562..b331511bae7bed7f926e6c777474830461d768b1 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp
+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp
-@@ -148,6 +148,11 @@ HashMap<ProcessIdentifier, WebProcessProxy*>& WebProcessProxy::allProcesses()
+@@ -152,6 +152,11 @@ HashMap<ProcessIdentifier, WebProcessProxy*>& WebProcessProxy::allProcesses()
return map;
}
@@ -17630,7 +17735,7 @@ index 331ee8054f7c8a8ddccd2b3aa7a8e67c285abf38..46d70ced9730a4a62f55ae833049e27a
WebProcessProxy* WebProcessProxy::processForIdentifier(ProcessIdentifier identifier)
{
return allProcesses().get(identifier);
-@@ -409,6 +414,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt
+@@ -431,6 +436,26 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt
if (WebKit::isInspectorProcessPool(processPool()))
launchOptions.extraInitializationData.add<HashTranslatorASCIILiteral>("inspector-process"_s, "1"_s);
@@ -17658,22 +17763,22 @@ index 331ee8054f7c8a8ddccd2b3aa7a8e67c285abf38..46d70ced9730a4a62f55ae833049e27a
if (isPrewarmed())
diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h
-index f59e7a215781099f804acfe44f406375057b758f..a699aba91f5cbf35702f2109b01065881202bf30 100644
+index 39d47536f3e4b5b63bea159dcc9c244b80b2aeb4..bd5b2cce8cc53be2d8d3cd66863b872356649943 100644
--- a/Source/WebKit/UIProcess/WebProcessProxy.h
+++ b/Source/WebKit/UIProcess/WebProcessProxy.h
-@@ -147,6 +147,7 @@ public:
- ~WebProcessProxy();
+@@ -159,6 +159,7 @@ public:
static void forWebPagesWithOrigin(PAL::SessionID, const WebCore::SecurityOriginData&, const Function<void(WebPageProxy&)>&);
+ static Vector<std::pair<WebCore::ProcessIdentifier, WebCore::RegistrableDomain>> allowedFirstPartiesForCookies();
+ static Vector<WebProcessProxy*> allProcessesForInspector();
WebConnection* webConnection() const { return m_webConnection.get(); }
diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-index 71ca21d2b7acf40c785af5755bfc1e7c13d5752c..fe3a0e9fac65f8a1197db74fb7d885f15acf1a86 100644
+index a070cd97a28ad6094a7b5e7db6422af43861da39..c28d71d9d83276bb7441c580113fc3596cfc259f 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
-@@ -1972,6 +1972,12 @@ void WebsiteDataStore::originDirectoryForTesting(URL&& origin, URL&& topOrigin,
+@@ -2012,6 +2012,12 @@ void WebsiteDataStore::originDirectoryForTesting(URL&& origin, URL&& topOrigin,
networkProcess().websiteDataOriginDirectoryForTesting(m_sessionID, WTFMove(origin), WTFMove(topOrigin), type, WTFMove(completionHandler));
}
@@ -17687,7 +17792,7 @@ index 71ca21d2b7acf40c785af5755bfc1e7c13d5752c..fe3a0e9fac65f8a1197db74fb7d885f1
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 14bba73989a561da8a7347a7fe15217347bc0f7b..ca8dd3f3a58221d7f13c37087c6a57c9f60bbc33 100644
+index 5f9e5d5a6e81f20d2ea88470e4d29fa41aae6653..f349a5b84950e44a4abd3b18fd8a2b290db21210 100644
--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
@@ -89,6 +89,7 @@ class SecKeyProxyStore;
@@ -17721,7 +17826,7 @@ index 14bba73989a561da8a7347a7fe15217347bc0f7b..ca8dd3f3a58221d7f13c37087c6a57c9
class WebsiteDataStore : public API::ObjectImpl<API::Object::Type::WebsiteDataStore>, public Identified<WebsiteDataStore>, public CanMakeWeakPtr<WebsiteDataStore> {
public:
static Ref<WebsiteDataStore> defaultDataStore();
-@@ -297,11 +307,13 @@ public:
+@@ -299,11 +309,13 @@ public:
const WebCore::CurlProxySettings& networkProxySettings() const { return m_proxySettings; }
#endif
@@ -17736,7 +17841,7 @@ index 14bba73989a561da8a7347a7fe15217347bc0f7b..ca8dd3f3a58221d7f13c37087c6a57c9
void setNetworkProxySettings(WebCore::SoupNetworkProxySettings&&);
const WebCore::SoupNetworkProxySettings& networkProxySettings() const { return m_networkProxySettings; }
void setCookiePersistentStorage(const String&, SoupCookiePersistentStorageType);
-@@ -364,6 +376,12 @@ public:
+@@ -373,6 +385,12 @@ public:
static constexpr uint64_t defaultPerOriginQuota() { return 1000 * MB; }
static bool defaultShouldUseCustomStoragePaths();
@@ -17749,7 +17854,7 @@ index 14bba73989a561da8a7347a7fe15217347bc0f7b..ca8dd3f3a58221d7f13c37087c6a57c9
void resetQuota(CompletionHandler<void()>&&);
void clearStorage(CompletionHandler<void()>&&);
#if PLATFORM(IOS_FAMILY)
-@@ -472,9 +490,11 @@ private:
+@@ -500,9 +518,11 @@ private:
WebCore::CurlProxySettings m_proxySettings;
#endif
@@ -17762,7 +17867,7 @@ index 14bba73989a561da8a7347a7fe15217347bc0f7b..ca8dd3f3a58221d7f13c37087c6a57c9
WebCore::SoupNetworkProxySettings m_networkProxySettings;
String m_cookiePersistentStoragePath;
SoupCookiePersistentStorageType m_cookiePersistentStorageType { SoupCookiePersistentStorageType::SQLite };
-@@ -502,6 +522,10 @@ private:
+@@ -530,6 +550,10 @@ private:
RefPtr<API::HTTPCookieStore> m_cookieStore;
RefPtr<NetworkProcessProxy> m_networkProcess;
@@ -18077,13 +18182,14 @@ index 0000000000000000000000000000000000000000..8006336003a4512b4c63bc8272d4b350
+
+#endif // ENABLE(REMOTE_INSPECTOR)
diff --git a/Source/WebKit/UIProcess/glib/WebPageProxyGLib.cpp b/Source/WebKit/UIProcess/glib/WebPageProxyGLib.cpp
-index 521df7840ab6d376c25130e87ea500942398c8b6..da198916beb0d0b46661f5209db3967ba5f9f776 100644
+index 9b04c5c3b91ade5679f01b835c908e84628903ca..d413ec71b4d33f032bc33d9b7029ac1be24ed87f 100644
--- a/Source/WebKit/UIProcess/glib/WebPageProxyGLib.cpp
+++ b/Source/WebKit/UIProcess/glib/WebPageProxyGLib.cpp
-@@ -57,4 +57,34 @@ void WebPageProxy::loadRecentSearches(const String&, CompletionHandler<void(Vect
- completionHandler({ });
+@@ -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&)
+{
@@ -18114,7 +18220,7 @@ index 521df7840ab6d376c25130e87ea500942398c8b6..da198916beb0d0b46661f5209db3967b
+}
+#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
@@ -18288,7 +18394,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..d0f9827544994e450e24e3f7a427c35eeff94d67
+index 0000000000000000000000000000000000000000..bd42403cc3c6fc109a4149392ed5143e361eb293
--- /dev/null
+++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp
@@ -0,0 +1,105 @@
@@ -18343,21 +18449,21 @@ index 0000000000000000000000000000000000000000..d0f9827544994e450e24e3f7a427c35e
+ return KeyBindingTranslator().commandsForKeyEvent(&event->key);
+}
+
-+static unsigned modifiersToEventState(OptionSet<WebEvent::Modifier> modifiers)
++static unsigned modifiersToEventState(OptionSet<WebEventModifier> modifiers)
+{
+ unsigned state = 0;
-+ if (modifiers.contains(WebEvent::Modifier::ControlKey))
++ if (modifiers.contains(WebEventModifier::ControlKey))
+ state |= GDK_CONTROL_MASK;
-+ if (modifiers.contains(WebEvent::Modifier::ShiftKey))
++ if (modifiers.contains(WebEventModifier::ShiftKey))
+ state |= GDK_SHIFT_MASK;
-+ if (modifiers.contains(WebEvent::Modifier::AltKey))
++ if (modifiers.contains(WebEventModifier::AltKey))
+ state |= GDK_META_MASK;
-+ if (modifiers.contains(WebEvent::Modifier::CapsLockKey))
++ if (modifiers.contains(WebEventModifier::CapsLockKey))
+ state |= GDK_LOCK_MASK;
+ 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<WebEvent::Modifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
++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)
+{
+ Vector<String> commands;
+ const guint keyVal = WebCore::PlatformKeyboardEvent::gdkKeyCodeForWindowsKeyCode(windowsVirtualKeyCode);
@@ -18398,10 +18504,10 @@ index 0000000000000000000000000000000000000000..d0f9827544994e450e24e3f7a427c35e
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
-index ce1a53586efb645a194646a615687eb727f5898b..e38ca201fa91daa21f7f33babbe37136dbff7ce2 100644
+index b2182e5786ccbf955adb38e5df831e7c341046e2..75eb9665e439f1d8c1aea78461de51e08b2e52b7 100644
--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
-@@ -438,6 +438,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
+@@ -439,6 +439,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled)
{
@@ -18599,7 +18705,7 @@ index 0000000000000000000000000000000000000000..721826c8c98fc85b68a4f45deaee69c1
+
+#endif
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.h b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
-index 4d795740f062bf59e99b1ee2098dc56d101d5561..540dc56fb31ac77f07f0c979650fc20fa5d1e00b 100644
+index a274468620adefb1d4a3ba2af1275b38da2fe74c..1c764fb95f283d1d4bf6e05836ab6ef10948c5ae 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.h
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.h
@@ -53,6 +53,8 @@ class PageClientImpl final : public PageClientImplCocoa
@@ -18611,7 +18717,7 @@ index 4d795740f062bf59e99b1ee2098dc56d101d5561..540dc56fb31ac77f07f0c979650fc20f
PageClientImpl(NSView *, WKWebView *);
virtual ~PageClientImpl();
-@@ -165,6 +167,9 @@ private:
+@@ -170,6 +172,9 @@ private:
void updateAcceleratedCompositingMode(const LayerTreeContext&) override;
void didFirstLayerFlush(const LayerTreeContext&) override;
@@ -18621,7 +18727,7 @@ index 4d795740f062bf59e99b1ee2098dc56d101d5561..540dc56fb31ac77f07f0c979650fc20f
RefPtr<ViewSnapshot> takeViewSnapshot(std::optional<WebCore::IntRect>&&) override;
void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
#if ENABLE(MAC_GESTURE_EVENTS)
-@@ -216,6 +221,10 @@ private:
+@@ -221,6 +226,10 @@ private:
void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) override;
#endif
@@ -18633,7 +18739,7 @@ index 4d795740f062bf59e99b1ee2098dc56d101d5561..540dc56fb31ac77f07f0c979650fc20f
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 496290a54e38ca2931f579fa14e04e6cc3cb747e..5ce3691dcac88c29a33f004a3894e69a8197add2 100644
+index 129d4733338056af9f9e6e17fdd03974384629c2..962e14d90b71c8568324b8d45af244345c3a0d01 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
@@ -81,6 +81,7 @@
@@ -18698,7 +18804,7 @@ index 496290a54e38ca2931f579fa14e04e6cc3cb747e..5ce3691dcac88c29a33f004a3894e69a
}
void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip)
-@@ -479,6 +497,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
+@@ -484,6 +502,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled)
{
@@ -18707,7 +18813,7 @@ index 496290a54e38ca2931f579fa14e04e6cc3cb747e..5ce3691dcac88c29a33f004a3894e69a
m_impl->doneWithKeyEvent(event.nativeEvent(), eventWasHandled);
}
-@@ -498,6 +518,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl
+@@ -503,6 +523,8 @@ void PageClientImpl::computeHasVisualSearchResults(const URL& imageURL, Shareabl
RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page)
{
@@ -18716,7 +18822,7 @@ index 496290a54e38ca2931f579fa14e04e6cc3cb747e..5ce3691dcac88c29a33f004a3894e69a
return WebPopupMenuProxyMac::create(m_view, page);
}
-@@ -629,6 +651,12 @@ CALayer *PageClientImpl::acceleratedCompositingRootLayer() const
+@@ -634,6 +656,12 @@ CALayer *PageClientImpl::acceleratedCompositingRootLayer() const
return m_impl->acceleratedCompositingRootLayer();
}
@@ -18729,7 +18835,7 @@ index 496290a54e38ca2931f579fa14e04e6cc3cb747e..5ce3691dcac88c29a33f004a3894e69a
RefPtr<ViewSnapshot> PageClientImpl::takeViewSnapshot(std::optional<WebCore::IntRect>&&)
{
return m_impl->takeViewSnapshot();
-@@ -796,6 +824,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
+@@ -801,6 +829,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
#endif // ENABLE(FULLSCREEN_API)
@@ -18743,7 +18849,7 @@ index 496290a54e38ca2931f579fa14e04e6cc3cb747e..5ce3691dcac88c29a33f004a3894e69a
void PageClientImpl::navigationGestureDidBegin()
{
m_impl->dismissContentRelativeChildWindowsWithAnimation(true);
-@@ -973,6 +1008,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c
+@@ -978,6 +1013,9 @@ void PageClientImpl::requestScrollToRect(const WebCore::FloatRect& targetRect, c
bool PageClientImpl::windowIsFrontWindowUnderMouse(const NativeWebMouseEvent& event)
{
@@ -18766,10 +18872,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 941292c53d9a136c3f5d8f64bd7d18ea24e13067..00b0366cd82d5891ae2e5560417ad9bdea777517 100644
+index c676e5b71241c6509e49a2c32333467fe91b0f6a..9e78fab770b75cb00ba59beed08083fd14d50d0e 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
-@@ -465,6 +465,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem
+@@ -475,6 +475,12 @@ void WebContextMenuProxyMac::getShareMenuItem(CompletionHandler<void(NSMenuItem
}
#endif
@@ -18834,7 +18940,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..b91811b37f892e10ec3ad50693e514682c75e91d
+index 0000000000000000000000000000000000000000..d72149eda8354890af21dcb5759db2cc2b9a5a51
--- /dev/null
+++ b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
@@ -0,0 +1,130 @@
@@ -18938,7 +19044,7 @@ index 0000000000000000000000000000000000000000..b91811b37f892e10ec3ad50693e51468
+ 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<WebEvent::Modifier> modifiers, Vector<String>& commands, WallTime timestamp)
++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)
+{
+ Vector<WebCore::KeypressCommand> macCommands;
+ for (const String& command : commands) {
@@ -18969,10 +19075,10 @@ index 0000000000000000000000000000000000000000..b91811b37f892e10ec3ad50693e51468
+
+} // namespace WebKit
diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.h b/Source/WebKit/UIProcess/mac/WebViewImpl.h
-index 9806df0d14e074cd678bf3ef923eac86a46c5275..30910188c04d4aa90b135d4a379a10d21236e28d 100644
+index 7479a879eaa3609957a12963bf631915527d50b2..81979b63f1d7deebf789a86f976f24f2a9c6cb79 100644
--- a/Source/WebKit/UIProcess/mac/WebViewImpl.h
+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.h
-@@ -510,6 +510,9 @@ public:
+@@ -509,6 +509,9 @@ public:
void provideDataForPasteboard(NSPasteboard *, NSString *type);
NSArray *namesOfPromisedFilesDroppedAtDestination(NSURL *dropDestination);
@@ -18983,10 +19089,10 @@ index 9806df0d14e074cd678bf3ef923eac86a46c5275..30910188c04d4aa90b135d4a379a10d2
void saveBackForwardSnapshotForCurrentItem();
void saveBackForwardSnapshotForItem(WebBackForwardListItem&);
diff --git a/Source/WebKit/UIProcess/mac/WebViewImpl.mm b/Source/WebKit/UIProcess/mac/WebViewImpl.mm
-index 3bc2628559f9a178345310319aec86b6604bb1b1..02496603e2fe99b99ec07024def183cfb69c5b54 100644
+index 55f22067ece7f71c916553ac33b0687c69aa5095..248b79660ff75e8fb77690b55b42e964bb4d43cf 100644
--- a/Source/WebKit/UIProcess/mac/WebViewImpl.mm
+++ b/Source/WebKit/UIProcess/mac/WebViewImpl.mm
-@@ -2313,6 +2313,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
+@@ -2316,6 +2316,11 @@ WebCore::DestinationColorSpace WebViewImpl::colorSpace()
if (!m_colorSpace)
m_colorSpace = [NSColorSpace sRGBColorSpace];
}
@@ -18998,7 +19104,7 @@ index 3bc2628559f9a178345310319aec86b6604bb1b1..02496603e2fe99b99ec07024def183cf
ASSERT(m_colorSpace);
return WebCore::DestinationColorSpace { [m_colorSpace CGColorSpace] };
-@@ -4300,6 +4305,18 @@ static RetainPtr<CGImageRef> takeWindowSnapshot(CGSWindowID windowID, bool captu
+@@ -4328,6 +4333,18 @@ static RetainPtr<CGImageRef> takeWindowSnapshot(CGSWindowID windowID, bool captu
return adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, windowID, imageOptions));
}
@@ -19315,7 +19421,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..5cf8a010e9809e6a95741cdb7c2cbeb445ab638b
+index 0000000000000000000000000000000000000000..9d903636ff4bec199ea9a21686375df176e65543
--- /dev/null
+++ b/Source/WebKit/UIProcess/win/WebPageInspectorInputAgentWin.cpp
@@ -0,0 +1,55 @@
@@ -19354,7 +19460,7 @@ index 0000000000000000000000000000000000000000..5cf8a010e9809e6a95741cdb7c2cbeb4
+
+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<WebEvent::Modifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
++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)
+{
+ NativeWebKeyboardEvent event(
+ type,
@@ -19717,7 +19823,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..c3d7cacea987ba2b094d5022c670705ef6ced129
+index 0000000000000000000000000000000000000000..31a4649df8e1df36dc1116ada35c3a3364031301
--- /dev/null
+++ b/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp
@@ -0,0 +1,55 @@
@@ -19756,7 +19862,7 @@ index 0000000000000000000000000000000000000000..c3d7cacea987ba2b094d5022c670705e
+
+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<WebEvent::Modifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
++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)
+{
+ NativeWebKeyboardEvent event(
+ type,
@@ -19777,10 +19883,10 @@ index 0000000000000000000000000000000000000000..c3d7cacea987ba2b094d5022c670705e
+
+} // namespace WebKit
diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3366dbd58 100644
+index a0bbf5a4cb8fc2228760b63c4b541964f2a6888c..3d5c0ffaa08908c14d02d76bb5ffc9a1df6ecd9b 100644
--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj
-@@ -1248,6 +1248,7 @@
+@@ -1329,6 +1329,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 */; };
@@ -19788,7 +19894,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
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 */; };
-@@ -2227,6 +2228,18 @@
+@@ -2328,6 +2329,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 */; };
@@ -19806,8 +19912,8 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
+ D7EB04E72372A73B00F744CE /* InspectorPlaywrightAgentClientMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = D7EB04E62372A73B00F744CE /* InspectorPlaywrightAgentClientMac.mm */; };
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, ); }; };
- DF84CEE4249AA24D009096F6 /* WKPDFHUDView.mm in Sources */ = {isa = PBXBuildFile; fileRef = DF84CEE2249AA21F009096F6 /* WKPDFHUDView.mm */; };
-@@ -2289,6 +2302,8 @@
+ DF7A231C291B088D00B98DF3 /* WKSnapshotConfigurationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF7A231B291B088D00B98DF3 /* WKSnapshotConfigurationPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
+@@ -2390,6 +2403,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 */; };
@@ -19816,7 +19922,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
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 */; };
-@@ -2305,6 +2320,9 @@
+@@ -2406,6 +2421,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, ); }; };
@@ -19826,15 +19932,15 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
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 */; };
-@@ -5282,6 +5300,7 @@
- 5CABDC8522C40FCC001EDE8E /* WKMessageListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMessageListener.h; sourceTree = "<group>"; };
+@@ -5628,6 +5646,7 @@
+ 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>"; };
5CAECB5E27465AE300AB78D0 /* UnifiedSource115.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = UnifiedSource115.cpp; path = "DerivedSources/WebKit/unified-sources/UnifiedSource115.cpp"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1D7178FBC4EDB168CDB0B04D /* UnifiedSource116.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = UnifiedSource116.cpp; path = "DerivedSources/WebKit/unified-sources/UnifiedSource116.cpp"; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
5CAF7AA626F93AA50003F19E /* adattributiond.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = adattributiond.xcconfig; sourceTree = "<group>"; };
-@@ -7010,6 +7029,19 @@
+@@ -7427,6 +7446,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>"; };
@@ -19854,7 +19960,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
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>"; };
-@@ -7139,6 +7171,8 @@
+@@ -7556,6 +7588,8 @@
E5CB07DA20E1678F0022C183 /* WKFormColorControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFormColorControl.h; path = ios/forms/WKFormColorControl.h; sourceTree = "<group>"; };
E5CB07DB20E1678F0022C183 /* WKFormColorControl.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFormColorControl.mm; path = ios/forms/WKFormColorControl.mm; sourceTree = "<group>"; };
E5CBA75F27A3187800DF7858 /* UnifiedSource120.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = UnifiedSource120.cpp; path = "DerivedSources/WebKit/unified-sources/UnifiedSource120.cpp"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -19863,7 +19969,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
E5CBA76027A3187900DF7858 /* UnifiedSource119.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = UnifiedSource119.cpp; path = "DerivedSources/WebKit/unified-sources/UnifiedSource119.cpp"; sourceTree = BUILT_PRODUCTS_DIR; };
E5CBA76127A3187900DF7858 /* UnifiedSource118.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = UnifiedSource118.cpp; path = "DerivedSources/WebKit/unified-sources/UnifiedSource118.cpp"; sourceTree = BUILT_PRODUCTS_DIR; };
E5CBA76227A3187900DF7858 /* UnifiedSource117.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = UnifiedSource117.cpp; path = "DerivedSources/WebKit/unified-sources/UnifiedSource117.cpp"; sourceTree = BUILT_PRODUCTS_DIR; };
-@@ -7161,6 +7195,14 @@
+@@ -7578,6 +7612,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>"; };
@@ -19878,15 +19984,15 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
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>"; };
-@@ -7295,6 +7337,7 @@
- 52A69BEA286CFFAC00893E8F /* CryptoTokenKit.framework in Frameworks */,
+@@ -7733,6 +7775,7 @@
3766F9EE189A1241003CF19B /* JavaScriptCore.framework in Frameworks */,
3766F9F1189A1254003CF19B /* libicucore.dylib in Frameworks */,
+ 7B9FC5BB28A5233B007570E7 /* libWebKitPlatform.a in Frameworks */,
+ F33C7AC7249AD79C0018BE41 /* libwebrtc.dylib in Frameworks */,
3766F9EF189A1244003CF19B /* QuartzCore.framework in Frameworks */,
37694525184FC6B600CDE21F /* Security.framework in Frameworks */,
37BEC4DD1948FC6A008B4286 /* WebCore.framework in Frameworks */,
-@@ -9440,6 +9483,7 @@
+@@ -10138,6 +10181,7 @@
99788ACA1F421DCA00C08000 /* _WKAutomationSessionConfiguration.mm */,
990D28A81C6404B000986977 /* _WKAutomationSessionDelegate.h */,
990D28AF1C65203900986977 /* _WKAutomationSessionInternal.h */,
@@ -19894,7 +20000,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
5C4609E222430E4C009943C2 /* _WKContentRuleListAction.h */,
5C4609E322430E4D009943C2 /* _WKContentRuleListAction.mm */,
5C4609E422430E4D009943C2 /* _WKContentRuleListActionInternal.h */,
-@@ -10536,6 +10580,7 @@
+@@ -11253,6 +11297,7 @@
E34B110C27C46BC6006D2F2E /* libWebCoreTestShim.dylib */,
E34B110F27C46D09006D2F2E /* libWebCoreTestSupport.dylib */,
DDE992F4278D06D900F60D26 /* libWebKitAdditions.a */,
@@ -19902,7 +20008,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
57A9FF15252C6AEF006A2040 /* libWTF.a */,
5750F32A2032D4E500389347 /* LocalAuthentication.framework */,
570DAAB0230273D200E8FC04 /* NearField.framework */,
-@@ -11073,6 +11118,12 @@
+@@ -11792,6 +11837,12 @@
children = (
9197940423DBC4BB00257892 /* InspectorBrowserAgent.cpp */,
9197940323DBC4BB00257892 /* InspectorBrowserAgent.h */,
@@ -19915,7 +20021,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
);
path = Agents;
sourceTree = "<group>";
-@@ -11081,6 +11132,7 @@
+@@ -11800,6 +11851,7 @@
isa = PBXGroup;
children = (
A5D3504D1D78F0D2005124A9 /* RemoteWebInspectorUIProxyMac.mm */,
@@ -19923,15 +20029,15 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
1CA8B935127C774E00576C2B /* WebInspectorUIProxyMac.mm */,
99A7ACE326012919006D57FD /* WKInspectorResourceURLSchemeHandler.h */,
99A7ACE42601291A006D57FD /* WKInspectorResourceURLSchemeHandler.mm */,
-@@ -11624,6 +11676,7 @@
+@@ -12350,6 +12402,7 @@
E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */,
46A2B6061E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.cpp */,
46A2B6071E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.h */,
+ D71A944B237239FB002C4D9E /* BrowserInspectorPipe.h */,
- 4659F25E275FF6B200BBB369 /* CaptivePortalModeObserver.h */,
07297F9C1C1711EA003F0735 /* DeviceIdHashSaltStorage.cpp */,
07297F9D1C17BBEA223F0735 /* DeviceIdHashSaltStorage.h */,
-@@ -11641,6 +11694,8 @@
+ BC2652121182608100243E12 /* DrawingAreaProxy.cpp */,
+@@ -12366,6 +12419,8 @@
2DD5A72A1EBF09A7009BA597 /* HiddenPageThrottlingAutoIncreasesCounter.h */,
839A2F2F1E2067390039057E /* HighPerformanceGraphicsUsageSampler.cpp */,
839A2F301E2067390039057E /* HighPerformanceGraphicsUsageSampler.h */,
@@ -19940,7 +20046,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
5CEABA2B2333251400797797 /* LegacyGlobalSettings.cpp */,
5CEABA2A2333247700797797 /* LegacyGlobalSettings.h */,
31607F3819627002009B87DA /* LegacySessionStateCoding.h */,
-@@ -11672,6 +11727,7 @@
+@@ -12398,6 +12453,7 @@
1A0C227D2451130A00ED614D /* QuickLookThumbnailingSoftLink.mm */,
1AEE57232409F142002005D6 /* QuickLookThumbnailLoader.h */,
1AEE57242409F142002005D6 /* QuickLookThumbnailLoader.mm */,
@@ -19948,7 +20054,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
BC111B08112F5E3C00337BAB /* ResponsivenessTimer.cpp */,
1A30066C1110F4F70031937C /* ResponsivenessTimer.h */,
5CA98549210BEB5A0057EB6B /* SafeBrowsingWarning.h */,
-@@ -11772,6 +11828,8 @@
+@@ -12499,6 +12555,8 @@
BC7B6204129A0A6700D174A4 /* WebPageGroup.h */,
2D9EA3101A96D9EB002D2807 /* WebPageInjectedBundleClient.cpp */,
2D9EA30E1A96CBFF002D2807 /* WebPageInjectedBundleClient.h */,
@@ -19957,7 +20063,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
BC111B0B112F5E4F00337BAB /* WebPageProxy.cpp */,
BC032DCB10F4389F0058C15A /* WebPageProxy.h */,
BCBD38FA125BAB9A00D2C29F /* WebPageProxy.messages.in */,
-@@ -11927,6 +11985,7 @@
+@@ -12657,6 +12715,7 @@
BC646C1911DD399F006455B0 /* WKBackForwardListItemRef.h */,
BC646C1611DD399F006455B0 /* WKBackForwardListRef.cpp */,
BC646C1711DD399F006455B0 /* WKBackForwardListRef.h */,
@@ -19965,8 +20071,8 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
BCB9E24A1120E15C00A137E0 /* WKContext.cpp */,
BCB9E2491120E15C00A137E0 /* WKContext.h */,
1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */,
-@@ -12514,6 +12573,9 @@
- C18173602058424700DFDA65 /* DisplayLink.h */,
+@@ -13245,6 +13304,9 @@
+ 0F49294628FF0F4B00AF8509 /* DisplayLinkProcessProxyClient.h */,
31ABA79C215AF9E000C90E31 /* HighPerformanceGPUManager.h */,
31ABA79D215AF9E000C90E31 /* HighPerformanceGPUManager.mm */,
+ D71A94302370E025002C4D9E /* InspectorPlaywrightAgentClientMac.h */,
@@ -19975,7 +20081,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
1AFDE65B1954E8D500C48FFA /* LegacySessionStateCoding.cpp */,
0FCB4E5818BBE3D9000FCFC9 /* PageClientImplMac.h */,
0FCB4E5918BBE3D9000FCFC9 /* PageClientImplMac.mm */,
-@@ -12540,6 +12602,8 @@
+@@ -13271,6 +13333,8 @@
E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */,
E55CD20124D09F1F0042DB9C /* WebDateTimePickerMac.h */,
E55CD20224D09F1F0042DB9C /* WebDateTimePickerMac.mm */,
@@ -19984,7 +20090,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */,
BC5750951268F3C6006F0F12 /* WebPopupMenuProxyMac.h */,
BC5750961268F3C6006F0F12 /* WebPopupMenuProxyMac.mm */,
-@@ -13729,6 +13793,7 @@
+@@ -14510,6 +14574,7 @@
99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */,
990D28AC1C6420CF00986977 /* _WKAutomationSessionDelegate.h in Headers */,
990D28B11C65208D00986977 /* _WKAutomationSessionInternal.h in Headers */,
@@ -19992,7 +20098,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
5C4609E7224317B4009943C2 /* _WKContentRuleListAction.h in Headers */,
5C4609E8224317BB009943C2 /* _WKContentRuleListActionInternal.h in Headers */,
1A5704F81BE01FF400874AF1 /* _WKContextMenuElementInfo.h in Headers */,
-@@ -13977,6 +14042,7 @@
+@@ -14773,6 +14838,7 @@
E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */,
4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */,
1A5705111BE410E600874AF1 /* BlockSPI.h in Headers */,
@@ -20000,7 +20106,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
BC3065FA1259344E00E71278 /* CacheModel.h in Headers */,
41897ED81F415D8A0016FA42 /* CacheStorageEngine.h in Headers */,
41FABD2A1F4DE001006A6C97 /* CacheStorageEngineCache.h in Headers */,
-@@ -14244,7 +14310,11 @@
+@@ -15042,7 +15108,11 @@
2DD45ADE1E5F8972006C355F /* InputViewUpdateDeferrer.h in Headers */,
CE550E152283752200D28791 /* InsertTextOptions.h in Headers */,
9197940523DBC4BB00257892 /* InspectorBrowserAgent.h in Headers */,
@@ -20012,7 +20118,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
A5E391FD2183C1F800C8FB31 /* InspectorTargetProxy.h in Headers */,
51E9049C27BCB9D400929E7E /* InstallCoordinationSPI.h in Headers */,
C5BCE5DF1C50766A00CDE3FA /* InteractionInformationAtPosition.h in Headers */,
-@@ -14462,6 +14532,7 @@
+@@ -15265,6 +15335,7 @@
CDAC20CA23FC2F750021DEE3 /* RemoteCDMInstanceSession.h in Headers */,
CDAC20C923FC2F750021DEE3 /* RemoteCDMInstanceSessionIdentifier.h in Headers */,
F451C0FE2703B263002BA03B /* RemoteDisplayListRecorderProxy.h in Headers */,
@@ -20020,7 +20126,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */,
2DDF731518E95060004F5A66 /* RemoteLayerBackingStoreCollection.h in Headers */,
1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */,
-@@ -14520,6 +14591,7 @@
+@@ -15322,6 +15393,7 @@
E1E552C516AE065F004ED653 /* SandboxInitializationParameters.h in Headers */,
E36FF00327F36FBD004BE21A /* SandboxStateVariables.h in Headers */,
7BAB111025DD02B3008FC479 /* ScopedActiveMessageReceiveQueue.h in Headers */,
@@ -20028,7 +20134,7 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
E4D54D0421F1D72D007E3C36 /* ScrollingTreeFrameScrollingNodeRemoteIOS.h in Headers */,
0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */,
0F931C1C18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h in Headers */,
-@@ -14867,6 +14939,8 @@
+@@ -15689,6 +15761,8 @@
2D9EA30F1A96CBFF002D2807 /* WebPageInjectedBundleClient.h in Headers */,
9197940823DBC4CB00257892 /* WebPageInspectorAgentBase.h in Headers */,
A513F5402154A5D700662841 /* WebPageInspectorController.h in Headers */,
@@ -20037,16 +20143,16 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
A543E30C215C8A8D00279CD9 /* WebPageInspectorTarget.h in Headers */,
A543E30D215C8A9000279CD9 /* WebPageInspectorTargetController.h in Headers */,
A543E307215AD13700279CD9 /* WebPageInspectorTargetFrontendChannel.h in Headers */,
-@@ -16824,6 +16898,8 @@
+@@ -17920,6 +17994,8 @@
51E9049727BCB3D900929E7E /* ICAppBundle.mm in Sources */,
2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */,
2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */,
+ D7EB04E72372A73B00F744CE /* InspectorPlaywrightAgentClientMac.mm in Sources */,
+ D79902B2236E9404005D6F7E /* InspectorTargetProxyMac.mm in Sources */,
- C14D37FE24ACE086007FF014 /* LaunchServicesDatabaseManager.mm in Sources */,
- C1710CF724AA643200D7C112 /* LaunchServicesDatabaseObserver.mm in Sources */,
- 2984F588164BA095004BC0C6 /* LegacyCustomProtocolManagerMessageReceiver.cpp in Sources */,
-@@ -17158,6 +17234,8 @@
+ 1C5DC471290B33A20061EC62 /* JSWebExtensionAPIExtension.mm in Sources */,
+ 1C5DC4552908AC900061EC62 /* JSWebExtensionAPINamespace.mm in Sources */,
+ 1C5DC472290B33A60061EC62 /* JSWebExtensionAPIRuntime.mm in Sources */,
+@@ -18278,6 +18354,8 @@
E3816B3D27E2463A005EAFC0 /* WebMockContentFilterManager.cpp in Sources */,
31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,
2DF6FE52212E110900469030 /* WebPage.cpp in Sources */,
@@ -20056,10 +20162,10 @@ index 167e10d3322a79c90146f37c9803f03b562f5450..9792e6cec5ad3f3954d1cf54e916e6e3
BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */,
7CE9CE101FA0767A000177DE /* WebPageUpdatePreferences.cpp in Sources */,
diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
-index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788b8a34bbc 100644
+index 571054e3fe382944f6996d7f8e3da5550bf8c993..19b3612cdccd2544bccb537b952f38a084ec6c60 100644
--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
-@@ -232,6 +232,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
+@@ -234,6 +234,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou
}
#endif
@@ -20071,8 +20177,8 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
#if ENABLE(PDFJS)
if (tryLoadingUsingPDFJSHandler(resourceLoader, trackingParameters))
return;
-@@ -331,7 +336,8 @@ static void addParametersShared(const Frame* frame, NetworkResourceLoadParameter
- }
+@@ -344,7 +349,8 @@ static void addParametersShared(const Frame* frame, NetworkResourceLoadParameter
+ parameters.networkConnectionIntegrityPolicy = networkConnectionIntegrityPolicy;
}
-void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceLoader, const ResourceRequest& request, const WebResourceLoader::TrackingParameters& trackingParameters, bool shouldClearReferrerOnHTTPSToHTTPRedirect, Seconds maximumBufferingTime)
@@ -20081,7 +20187,7 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
{
auto identifier = resourceLoader.identifier();
ASSERT(identifier);
-@@ -347,7 +353,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -360,7 +366,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
RunLoop::main().dispatch([resourceLoader = Ref { resourceLoader }, error = blockedError(request)] {
resourceLoader->didFail(error);
});
@@ -20090,7 +20196,7 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
}
}
-@@ -357,7 +363,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -370,7 +376,6 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be scheduled with the NetworkProcess with priority %d, storedCredentialsPolicy %i", resourceLoader.url().string().latin1().data(), static_cast<int>(resourceLoader.request().priority()), (int)storedCredentialsPolicy);
@@ -20098,7 +20204,7 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
loadParameters.identifier = identifier;
loadParameters.webPageProxyID = trackingParameters.webPageProxyID;
loadParameters.webPageID = trackingParameters.pageID;
-@@ -442,14 +447,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -456,14 +461,11 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
if (loadParameters.options.mode != FetchOptions::Mode::Navigate) {
ASSERT(loadParameters.sourceOrigin);
@@ -20114,9 +20220,9 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
- loadParameters.shouldRestrictHTTPResponseAccess = shouldPerformSecurityChecks();
+ loadParameters.shouldRestrictHTTPResponseAccess = DeprecatedGlobalSettings::restrictedHTTPResponseAccess();
- loadParameters.isMainFrameNavigation = resourceLoader.frame() && resourceLoader.frame()->isMainFrame() && resourceLoader.options().mode == FetchOptions::Mode::Navigate;
+ loadParameters.isMainFrameNavigation = isMainFrameNavigation;
if (loadParameters.isMainFrameNavigation && document)
-@@ -481,6 +483,17 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -499,6 +501,17 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
}
ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials);
@@ -20134,7 +20240,7 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
std::optional<NetworkResourceLoadIdentifier> existingNetworkResourceLoadIdentifierToResume;
if (loadParameters.isMainFrameNavigation)
-@@ -495,7 +508,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
+@@ -513,7 +526,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL
}
auto loader = WebResourceLoader::create(resourceLoader, trackingParameters);
@@ -20143,7 +20249,7 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
}
void WebLoaderStrategy::scheduleInternallyFailedLoad(WebCore::ResourceLoader& resourceLoader)
-@@ -902,7 +915,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier
+@@ -928,7 +941,7 @@ void WebLoaderStrategy::didFinishPreconnection(WebCore::ResourceLoaderIdentifier
bool WebLoaderStrategy::isOnLine() const
{
@@ -20152,7 +20258,7 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
}
void WebLoaderStrategy::addOnlineStateChangeListener(Function<void(bool)>&& listener)
-@@ -922,6 +935,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet
+@@ -955,6 +968,11 @@ void WebLoaderStrategy::isResourceLoadFinished(CachedResource& resource, Complet
void WebLoaderStrategy::setOnLineState(bool isOnLine)
{
@@ -20164,7 +20270,7 @@ index cfbf657d8abdaed554fb53ba2a5002f93beba884..8f65caa1eeb0fca3d48d03a4f985e788
if (m_isOnLine == isOnLine)
return;
-@@ -930,6 +948,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)
+@@ -963,6 +981,12 @@ void WebLoaderStrategy::setOnLineState(bool isOnLine)
listener(isOnLine);
}
@@ -20208,7 +20314,7 @@ index cfa563b7d34056c9375d4382ff42d55dab3daa14..baf0bdc4f441721d085ff86bd152a7cc
} // namespace WebKit
diff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
-index 529ad5482554d07bd7bedbf3d48dc9f76e323c7c..b66401713b40e607f646414b90d6bf87c7e14d60 100644
+index 3218ba6dd2a24d0ca6769723b387e0915f1a66ab..5a389780519802f92c0deae83302f78ef5297e44 100644
--- a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
+++ b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
@@ -197,9 +197,6 @@ void WebResourceLoader::didReceiveResponse(ResourceResponse&& response, PrivateR
@@ -20244,10 +20350,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 f2fb81d88d3332ec4680d606a2a99b0c411261f9..3808cdb9fca8d60d76c237255318d2196e4235f9 100644
+index ba593851fd30144765ddb6b77f459f72500417f4..908095aed29359752f33e90e2381083a14a98e5f 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
-@@ -414,6 +414,8 @@ void WebChromeClient::setResizable(bool resizable)
+@@ -423,6 +423,8 @@ void WebChromeClient::setResizable(bool resizable)
void WebChromeClient::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID)
{
@@ -20284,16 +20390,16 @@ index 2eb0886f13ed035a53b8eaa60605de4dfe53fbe3..c46393209cb4f80704bbc9268fad4371
{
}
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
-index 72cd56ea4c03966283a24b77ac8a754fff98723a..2e181bcb2e151bbf0153d66aa3093ce9b91f3615 100644
+index a8cedd88ff0caf7a582be0c00805fef791ae57bc..ac14a1487a3d2445c25c48bf8720108847a2607d 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
-@@ -1597,13 +1597,6 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
+@@ -1588,13 +1588,6 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
if (webPage->scrollPinningBehavior() != DoNotPin)
view->setScrollPinningBehavior(webPage->scrollPinningBehavior());
-#if USE(COORDINATED_GRAPHICS)
- if (shouldUseFixedLayout) {
-- view->setDelegatesScrolling(shouldUseFixedLayout);
+- view->setDelegatedScrollingMode(shouldUseFixedLayout ? DelegatedScrollingMode::DelegatedToNativeScrollView : DelegatedScrollingMode::NotDelegated);
- view->setPaintsEntireContents(shouldUseFixedLayout);
- return;
- }
@@ -20302,10 +20408,10 @@ index 72cd56ea4c03966283a24b77ac8a754fff98723a..2e181bcb2e151bbf0153d66aa3093ce9
void WebFrameLoaderClient::didRestoreFromBackForwardCache()
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
-index cf573ccd65a64982e3dccd4a4e81a50d69310891..722b0aa00685d5e3865370c0d6170ba4115d2ad6 100644
+index cbe67e1e40ee5be3b778977aef8d00600e09a0d9..7ce8c2958a3adbc7f722ca0b939d6aee598b7f9b 100644
--- a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
+++ b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
-@@ -126,7 +126,8 @@ static WebCore::CachedImage* cachedImage(Element& element)
+@@ -128,7 +128,8 @@ static WebCore::CachedImage* cachedImage(Element& element)
void WebDragClient::declareAndWriteDragImage(const String& pasteboardName, Element& element, const URL& url, const String& label, Frame*)
{
@@ -20381,7 +20487,7 @@ index 0000000000000000000000000000000000000000..2606914d22e85affd9b2f71c361c9db3
+#endif // ENABLE(DRAG_SUPPORT)
diff --git a/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cpp b/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cpp
new file mode 100644
-index 0000000000000000000000000000000000000000..6d1dab390782a6c88d387bc94a36ecf07397902f
+index 0000000000000000000000000000000000000000..b1fcb0774ce90cfc33f08fd3e74bdedb37dc554f
--- /dev/null
+++ b/Source/WebKit/WebProcess/WebCoreSupport/wpe/WebDragClientWPE.cpp
@@ -0,0 +1,57 @@
@@ -20435,7 +20541,7 @@ index 0000000000000000000000000000000000000000..6d1dab390782a6c88d387bc94a36ecf0
+{
+ m_page->willStartDrag();
+
-+ ShareableBitmap::Handle handle;
++ ShareableBitmapHandle handle;
+ m_page->send(Messages::WebPageProxy::StartDrag(dataTransfer.pasteboard().selectionData(), dataTransfer.sourceOperationMask(), handle, dataTransfer.dragLocation()));
+}
+
@@ -20443,7 +20549,7 @@ index 0000000000000000000000000000000000000000..6d1dab390782a6c88d387bc94a36ecf0
+
+#endif // ENABLE(DRAG_SUPPORT)
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
-index 6bc7442b28ed5ee475d603975bee65cf32df39f4..21fb325d26bfe3819c62e9ad181c6c02c0490fb4 100644
+index b67281781bf9e6b4144eedb40fd211884ac21563..b39cda0772a37337afe70ceadae0b5daa04c0175 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
@@ -38,6 +38,7 @@
@@ -20504,10 +20610,10 @@ index 6bc7442b28ed5ee475d603975bee65cf32df39f4..21fb325d26bfe3819c62e9ad181c6c02
void DrawingAreaCoordinatedGraphics::scheduleDisplay()
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
-index 60d596ec08c0b3550a328ae715e180ae3669676b..be272bed2f5cf15d3b5b195ab5e7a90a9b33db34 100644
+index 6a21081b514678d2f36fd190266d3e60754d326c..721c40ba39b09821aa35b9fd7e4682ccdd9b78ab 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
-@@ -183,8 +183,16 @@ void LayerTreeHost::setViewOverlayRootLayer(GraphicsLayer* viewOverlayRootLayer)
+@@ -184,8 +184,16 @@ void LayerTreeHost::setViewOverlayRootLayer(GraphicsLayer* viewOverlayRootLayer)
void LayerTreeHost::scrollNonCompositedContents(const IntRect& rect)
{
auto* frameView = m_webPage.mainFrameView();
@@ -20524,7 +20630,7 @@ index 60d596ec08c0b3550a328ae715e180ae3669676b..be272bed2f5cf15d3b5b195ab5e7a90a
m_viewportController.didScroll(rect.location());
if (m_isDiscardable)
-@@ -318,6 +326,10 @@ void LayerTreeHost::didChangeViewport()
+@@ -319,6 +327,10 @@ void LayerTreeHost::didChangeViewport()
if (!view->useFixedLayout())
view->notifyScrollPositionChanged(m_lastScrollPosition);
@@ -20536,10 +20642,10 @@ index 60d596ec08c0b3550a328ae715e180ae3669676b..be272bed2f5cf15d3b5b195ab5e7a90a
if (m_lastPageScaleFactor != pageScale) {
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
-index 293c2e5de26e3612217e7f44ea43dfd589cc657e..659558a1e666cd099800c5291d06acbe5ac101e3 100644
+index 9af76856fa1d0b5e390ce45e1e916a4699f098ff..3513b8c356953a683c3c1070e8401f58cbf643d5 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
-@@ -105,6 +105,13 @@ public:
+@@ -102,6 +102,13 @@ public:
void adjustTransientZoom(double, WebCore::FloatPoint);
void commitTransientZoom(double, WebCore::FloatPoint);
#endif
@@ -20554,7 +20660,7 @@ index 293c2e5de26e3612217e7f44ea43dfd589cc657e..659558a1e666cd099800c5291d06acbe
#if USE(COORDINATED_GRAPHICS)
void layerFlushTimerFired();
diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp b/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp
-index db2e5d686e6ffff8f5299903c4d42fb3a64607ac..8a4d23bdebe6a7b2f7dea87517de8f0cea62093d 100644
+index 6cb8f0800f7c09ac3f46aaff431643b78464e349..c90eeed163f331ffaa9fff324457f335b529f3fc 100644
--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp
+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp
@@ -27,6 +27,7 @@
@@ -20565,7 +20671,7 @@ index db2e5d686e6ffff8f5299903c4d42fb3a64607ac..8a4d23bdebe6a7b2f7dea87517de8f0c
#include "WebPage.h"
#include "WebPageCreationParameters.h"
#include "WebProcess.h"
-@@ -94,6 +95,13 @@ void DrawingArea::tryMarkLayersVolatile(CompletionHandler<void(bool)>&& completi
+@@ -104,6 +105,13 @@ void DrawingArea::tryMarkLayersVolatile(CompletionHandler<void(bool)>&& completi
completionFunction(true);
}
@@ -20580,10 +20686,10 @@ index db2e5d686e6ffff8f5299903c4d42fb3a64607ac..8a4d23bdebe6a7b2f7dea87517de8f0c
{
if (m_hasRemovedMessageReceiver)
diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.h b/Source/WebKit/WebProcess/WebPage/DrawingArea.h
-index 3f6b9304dd08fbcc1fba7086163c753f0ad50785..165f22b4c3043cff7c9fbfb70fdc56f141b6bd6c 100644
+index c9c154f044a76be8d9ecff080417af8fdb013164..80ddeb7327f04277553c6e9cb778f76f67949030 100644
--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.h
+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.h
-@@ -148,6 +148,9 @@ public:
+@@ -154,6 +154,9 @@ public:
virtual void didChangeViewportAttributes(WebCore::ViewportAttributes&&) = 0;
virtual void deviceOrPageScaleFactorChanged() = 0;
#endif
@@ -20594,7 +20700,7 @@ index 3f6b9304dd08fbcc1fba7086163c753f0ad50785..165f22b4c3043cff7c9fbfb70fdc56f1
virtual void adoptLayersFromDrawingArea(DrawingArea&) { }
virtual void adoptDisplayRefreshMonitorsFromDrawingArea(DrawingArea&) { }
diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
-index 51afcf721a21c6b073b84f55dbceba45909e2000..233a6b023d27cd7d4b3579e8d006d34edc4ea91f 100644
+index 04d4e6dc3778a79f15b29c6479a4b57587d5a4d2..eaddad1a56101624f9f46cb8cbb3eea9a3bcbfe0 100644
--- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp
@@ -38,6 +38,7 @@
@@ -20605,7 +20711,7 @@ index 51afcf721a21c6b073b84f55dbceba45909e2000..233a6b023d27cd7d4b3579e8d006d34e
#include <WebCore/Settings.h>
#include <WebCore/StorageSessionProvider.h>
-@@ -256,4 +257,10 @@ void WebCookieJar::deleteCookie(const WebCore::Document& document, const URL& ur
+@@ -258,4 +259,10 @@ void WebCookieJar::deleteCookie(const WebCore::Document& document, const URL& ur
WebProcess::singleton().ensureNetworkProcessConnection().connection().sendWithAsyncReply(Messages::NetworkConnectionToWebProcess::DeleteCookie(url, cookieName), WTFMove(completionHandler));
}
@@ -20617,12 +20723,12 @@ index 51afcf721a21c6b073b84f55dbceba45909e2000..233a6b023d27cd7d4b3579e8d006d34e
+
} // namespace WebKit
diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.h b/Source/WebKit/WebProcess/WebPage/WebCookieJar.h
-index 4dca404d993dbcbafeac3cf175b45201db3857f8..9d1025bd52589de93f00139791f924b85a8c30ca 100644
+index 83df17e2137dc7664e9240ddfa7a03feb473aeab..9426d55f31beeaf6f6875ab33fa5a46bbd3a6228 100644
--- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.h
+++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.h
-@@ -52,6 +52,8 @@ public:
- void cookiesDeleted(const String& host, const Vector<WebCore::Cookie>&);
- void allCookiesDeleted();
+@@ -54,6 +54,8 @@ public:
+
+ void clearCache() final;
+ void setCookieFromResponse(WebCore::ResourceLoader&, const String& setCookieValue);
+
@@ -20664,20 +20770,28 @@ index f127d64d005ab7b93875591b94a5899205e91579..df0de26e4dc449a0fbf93e7037444df4
uint64_t m_navigationID;
};
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc472765ca5c 100644
+index da9c92f4672cbd79fe1e3b5f27c1a66f69685e3e..be36d57d915b72250857124fb5e4639133affcb9 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
-@@ -948,6 +948,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
- ProcessCapabilities::setCanUseAcceleratedBuffers(false);
- }
+@@ -222,6 +222,7 @@
+ #include <WebCore/PingLoader.h>
+ #include <WebCore/PlatformKeyboardEvent.h>
+ #include <WebCore/PlatformMediaSessionManager.h>
++#include <WebCore/PlatformMouseEvent.h>
+ #include <WebCore/PlatformStrategies.h>
+ #include <WebCore/PluginDocument.h>
+ #include <WebCore/PointerCaptureController.h>
+@@ -969,6 +970,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
+ #endif // USE(APPLE_INTERNAL_SDK)
+ #endif // HAVE(SANDBOX_STATE_FLAGS)
+ if (parameters.shouldPauseInInspectorWhenShown)
+ m_page->inspectorController().pauseWhenShown();
+
updateThrottleState();
+ updateImageAnimationEnabled();
}
-
-@@ -1725,6 +1728,22 @@ void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParamet
+@@ -1730,6 +1734,22 @@ void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParamet
}
#endif
@@ -20700,7 +20814,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
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());
-@@ -2001,17 +2020,13 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
+@@ -2001,17 +2021,13 @@ void WebPage::setSize(const WebCore::IntSize& viewSize)
view->resize(viewSize);
m_drawingArea->setNeedsDisplay();
@@ -20719,7 +20833,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
// Viewport properties have no impact on zero sized fixed viewports.
if (m_viewSize.isEmpty())
-@@ -2028,20 +2043,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -2028,20 +2044,18 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
@@ -20747,7 +20861,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
#if USE(COORDINATED_GRAPHICS)
m_drawingArea->didChangeViewportAttributes(WTFMove(attr));
-@@ -2049,7 +2062,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
+@@ -2049,7 +2063,6 @@ void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArg
send(Messages::WebPageProxy::DidChangeViewportProperties(attr));
#endif
}
@@ -20755,7 +20869,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
void WebPage::scrollMainFrameIfNotAtMaxScrollPosition(const IntSize& scrollOffset)
{
-@@ -2334,6 +2346,7 @@ void WebPage::scaleView(double scale)
+@@ -2334,6 +2347,7 @@ void WebPage::scaleView(double scale)
}
m_page->setViewScaleFactor(scale);
@@ -20763,7 +20877,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
scalePage(pageScale, scrollPositionAtNewScale);
}
-@@ -2513,17 +2526,13 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
+@@ -2513,17 +2527,13 @@ void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArgum
viewportConfigurationChanged();
#endif
@@ -20782,7 +20896,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
}
void WebPage::listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone> milestones)
-@@ -3412,6 +3421,104 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
+@@ -3438,6 +3448,92 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent)
send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(touchEvent.type()), handled));
}
@@ -20800,7 +20914,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
+ float force = 1.0;
+ const WebCore::IntSize radius(radiusX,radiusY);
+ const WebCore::IntPoint screenPosition = position;
-+ OptionSet<WebEvent::Modifier> eventModifiers;
++ OptionSet<WebEventModifier> eventModifiers;
+ eventModifiers = eventModifiers.fromRaw(modifiers);
+
+ {
@@ -20808,7 +20922,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
+ WebPlatformTouchPoint::TouchPointState state = WebPlatformTouchPoint::TouchPointState::TouchPressed;
+ touchPoints.append(WebPlatformTouchPoint(id, state, screenPosition, position, radius, rotationAngle, force));
+
-+ WebTouchEvent touchEvent(WebEvent::TouchStart, WTFMove(touchPoints), eventModifiers, WallTime::now());
++ WebTouchEvent touchEvent({WebEvent::TouchStart, eventModifiers, WallTime::now()}, WTFMove(touchPoints));
+
+ CurrentEvent currentEvent(touchEvent);
+ handled = handleTouchEvent(touchEvent, m_page.get());
@@ -20818,7 +20932,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
+ WebPlatformTouchPoint::TouchPointState state = WebPlatformTouchPoint::TouchPointState::TouchReleased;
+ touchPoints.append(WebPlatformTouchPoint(id, state, screenPosition, position, radius, rotationAngle, force));
+
-+ WebTouchEvent touchEvent(WebEvent::TouchEnd, WTFMove(touchPoints), eventModifiers, WallTime::now());
++ WebTouchEvent touchEvent({WebEvent::TouchEnd, eventModifiers, WallTime::now()}, WTFMove(touchPoints));
+
+ CurrentEvent currentEvent(touchEvent);
+ handled = handleTouchEvent(touchEvent, m_page.get()) || handled;
@@ -20832,23 +20946,17 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
+ completionHandler();
+ return;
+ }
-+ bool shiftKey = eventModifiers.contains(WebEvent::Modifier::ShiftKey);
-+ bool ctrlKey = eventModifiers.contains(WebEvent::Modifier::ControlKey);
-+ bool altKey = eventModifiers.contains(WebEvent::Modifier::AltKey);
-+ bool metaKey = eventModifiers.contains(WebEvent::Modifier::MetaKey);
+ double force = 0.0;
+ SyntheticClickType syntheticClickType = SyntheticClickType::OneFingerTap;
+
++ auto modifiers = PlatformKeyboardEvent::currentStateOfModifierKeys();
+ m_page->mainFrame().eventHandler().mouseMoved(PlatformMouseEvent(
+ adjustedIntPoint,
+ adjustedIntPoint,
+ MouseButton::NoButton,
+ PlatformEvent::Type::MouseMoved,
+ 0,
-+ shiftKey,
-+ ctrlKey,
-+ altKey,
-+ metaKey,
++ modifiers,
+ WallTime::now(),
+ force,
+ syntheticClickType
@@ -20859,10 +20967,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
+ MouseButton::LeftButton,
+ PlatformEvent::Type::MousePressed,
+ 1,
-+ shiftKey,
-+ ctrlKey,
-+ altKey,
-+ metaKey,
++ modifiers,
+ WallTime::now(),
+ force,
+ syntheticClickType
@@ -20873,10 +20978,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
+ MouseButton::LeftButton,
+ PlatformEvent::Type::MouseReleased,
+ 1,
-+ shiftKey,
-+ ctrlKey,
-+ altKey,
-+ metaKey,
++ modifiers,
+ WallTime::now(),
+ force,
+ syntheticClickType
@@ -20887,7 +20989,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
#endif
void WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint)
-@@ -3488,6 +3595,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
+@@ -3514,6 +3610,11 @@ void WebPage::sendMessageToTargetBackend(const String& targetId, const String& m
m_inspectorTargetController->sendMessageToTargetBackend(targetId, message);
}
@@ -20899,7 +21001,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
void WebPage::insertNewlineInQuotedContent()
{
Ref frame = CheckedRef(m_page->focusController())->focusedOrMainFrame();
-@@ -3728,6 +3840,7 @@ void WebPage::didCompletePageTransition()
+@@ -3746,6 +3847,7 @@ void WebPage::didCompletePageTransition()
void WebPage::show()
{
send(Messages::WebPageProxy::ShowPage());
@@ -20907,7 +21009,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
}
void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension)
-@@ -4615,7 +4728,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
+@@ -4679,7 +4781,7 @@ NotificationPermissionRequestManager* WebPage::notificationPermissionRequestMana
#if ENABLE(DRAG_SUPPORT)
@@ -20916,7 +21018,7 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
void WebPage::performDragControllerAction(DragControllerAction action, const IntPoint& clientPosition, const IntPoint& globalPosition, OptionSet<DragOperation> draggingSourceOperationMask, SelectionData&& selectionData, OptionSet<DragApplicationFlags> flags)
{
if (!m_page) {
-@@ -7037,6 +7150,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRe
+@@ -7134,6 +7236,9 @@ Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRe
WebsitePoliciesData::applyToDocumentLoader(WTFMove(*m_pendingWebsitePolicies), documentLoader);
m_pendingWebsitePolicies = std::nullopt;
}
@@ -20927,10 +21029,10 @@ index bcfd5062b0ee4077f18c69eb31a70384700ba093..47cfbc5171198c0c046427e957d4dc47
return documentLoader;
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h
-index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded0a9f18cf 100644
+index 8aedc5d2c3b678cf3147302e57eb9f4faced9bf5..f5634d181b78b1563ef8f009bb74bbfc115a4f03 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h
-@@ -118,6 +118,10 @@
+@@ -120,6 +120,10 @@
#include "WebPrintOperationGtk.h"
#endif
@@ -20941,7 +21043,7 @@ index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded
#if PLATFORM(GTK) || PLATFORM(WPE)
#include "InputMethodState.h"
#endif
-@@ -1017,11 +1021,11 @@ public:
+@@ -1031,11 +1035,11 @@ public:
void clearSelection();
void restoreSelectionInFocusedEditableElement();
@@ -20952,10 +21054,10 @@ index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded
-#if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK)
+#if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK) && !PLATFORM(WPE)
- void performDragControllerAction(DragControllerAction, const WebCore::DragData&, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&);
+ void performDragControllerAction(DragControllerAction, WebCore::DragData&&, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&);
#endif
-@@ -1035,6 +1039,9 @@ public:
+@@ -1049,6 +1053,9 @@ public:
void didStartDrag();
void dragCancelled();
OptionSet<WebCore::DragSourceAction> allowedDragSourceActions() const { return m_allowedDragSourceActions; }
@@ -20965,7 +21067,7 @@ index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded
#endif
void beginPrinting(WebCore::FrameIdentifier, const PrintInfo&);
-@@ -1269,6 +1276,7 @@ public:
+@@ -1289,6 +1296,7 @@ public:
void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType);
void disconnectInspector(const String& targetId);
void sendMessageToTargetBackend(const String& targetId, const String& message);
@@ -20973,7 +21075,7 @@ index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded
void insertNewlineInQuotedContent();
-@@ -1669,6 +1677,7 @@ private:
+@@ -1697,6 +1705,7 @@ private:
// Actions
void tryClose(CompletionHandler<void(bool)>&&);
void platformDidReceiveLoadParameters(const LoadParameters&);
@@ -20981,7 +21083,7 @@ index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded
void loadRequest(LoadParameters&&);
NO_RETURN void loadRequestWaitingForProcessLaunch(LoadParameters&&, URL&&, WebPageProxyIdentifier, bool);
void loadData(LoadParameters&&);
-@@ -1706,6 +1715,7 @@ private:
+@@ -1734,6 +1743,7 @@ private:
void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);
#elif ENABLE(TOUCH_EVENTS)
void touchEvent(const WebTouchEvent&);
@@ -20989,7 +21091,7 @@ index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded
#endif
void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);
-@@ -1851,9 +1861,7 @@ private:
+@@ -1879,9 +1889,7 @@ private:
void addLayerForFindOverlay(CompletionHandler<void(WebCore::GraphicsLayer::PlatformLayerID)>&&);
void removeLayerForFindOverlay(CompletionHandler<void()>&&);
@@ -20999,7 +21101,7 @@ index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded
void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
void setTextForActivePopupMenu(int32_t index);
-@@ -2394,6 +2402,7 @@ private:
+@@ -2428,6 +2436,7 @@ private:
UserActivity m_userActivity;
uint64_t m_pendingNavigationID { 0 };
@@ -21008,10 +21110,10 @@ index a8d6317c7628f3fe499ef7708da81f48a0b4988c..76f57f4cf23838ef85c11fb6e9b12ded
bool m_mainFrameProgressCompleted { false };
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-index 74ee4497373c9b9cca4b5894a31efffe777177d8..7cf743d4738b5993c8951caea2ccfc21804e9709 100644
+index 9355c3f0f2c8888445bfb48d8e5cf6b5944d23dd..c4b56070a1f207bfa52629bdad80aaaff8403a57 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
-@@ -144,6 +144,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -146,6 +146,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
ConnectInspector(String targetId, Inspector::FrontendChannel::ConnectionType connectionType)
DisconnectInspector(String targetId)
SendMessageToTargetBackend(String targetId, String message)
@@ -21019,7 +21121,7 @@ index 74ee4497373c9b9cca4b5894a31efffe777177d8..7cf743d4738b5993c8951caea2ccfc21
#if ENABLE(REMOTE_INSPECTOR)
SetIndicating(bool indicating);
-@@ -154,6 +155,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -156,6 +157,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
#endif
#if !ENABLE(IOS_TOUCH_EVENTS) && ENABLE(TOUCH_EVENTS)
TouchEvent(WebKit::WebTouchEvent event)
@@ -21027,7 +21129,7 @@ index 74ee4497373c9b9cca4b5894a31efffe777177d8..7cf743d4738b5993c8951caea2ccfc21
#endif
CancelPointer(WebCore::PointerID pointerId, WebCore::IntPoint documentPoint)
-@@ -183,6 +185,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -185,6 +187,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
LoadURLInFrame(URL url, String referrer, WebCore::FrameIdentifier frameID)
LoadDataInFrame(IPC::DataReference data, String MIMEType, String encodingName, URL baseURL, WebCore::FrameIdentifier frameID)
LoadRequest(struct WebKit::LoadParameters loadParameters)
@@ -21035,7 +21137,7 @@ index 74ee4497373c9b9cca4b5894a31efffe777177d8..7cf743d4738b5993c8951caea2ccfc21
LoadRequestWaitingForProcessLaunch(struct WebKit::LoadParameters loadParameters, URL resourceDirectoryURL, WebKit::WebPageProxyIdentifier pageID, bool checkAssumedReadAccessToResourceURL)
LoadData(struct WebKit::LoadParameters loadParameters)
LoadSimulatedRequestAndResponse(struct WebKit::LoadParameters loadParameters, WebCore::ResourceResponse simulatedResponse)
-@@ -349,10 +352,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -348,10 +351,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
AddMIMETypeWithCustomContentProvider(String mimeType)
# Drag and drop.
@@ -21048,7 +21150,7 @@ index 74ee4497373c9b9cca4b5894a31efffe777177d8..7cf743d4738b5993c8951caea2ccfc21
PerformDragControllerAction(enum:uint8_t WebKit::DragControllerAction action, WebCore::DragData dragData, WebKit::SandboxExtension::Handle sandboxExtensionHandle, Vector<WebKit::SandboxExtension::Handle> sandboxExtensionsForUpload)
#endif
#if ENABLE(DRAG_SUPPORT)
-@@ -361,6 +364,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
+@@ -360,6 +363,10 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType
DragCancelled()
#endif
@@ -21060,10 +21162,10 @@ index 74ee4497373c9b9cca4b5894a31efffe777177d8..7cf743d4738b5993c8951caea2ccfc21
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 958c5dce4f2cfa0aca1926c9181f01284570f57e..d7c3ce51ac62c345893fb72eedcc9535c7f08726 100644
+index 366f3ce3d84c09a87fe26281f2519333ab946c62..9cdbe9fbf4c22e78cd8eae2875e3e7953e84034e 100644
--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
-@@ -801,21 +801,37 @@ String WebPage::platformUserAgent(const URL&) const
+@@ -779,21 +779,37 @@ String WebPage::platformUserAgent(const URL&) const
bool WebPage::hoverSupportedByPrimaryPointingDevice() const
{
@@ -21102,7 +21204,7 @@ index 958c5dce4f2cfa0aca1926c9181f01284570f57e..d7c3ce51ac62c345893fb72eedcc9535
}
diff --git a/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp b/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
-index c77ff78cd3cd9627d1ae7b930c81457094645200..88746359159a76b169b7e6dcbee4fb34db5f246a 100644
+index 2f83b4b4cc246eec07b7200c0bde3fd0e4b28ac1..29f7e89143449039efe558b1e0a3f0711c915e45 100644
--- a/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
+++ b/Source/WebKit/WebProcess/WebPage/win/WebPageWin.cpp
@@ -43,6 +43,7 @@
@@ -21113,7 +21215,7 @@ index c77ff78cd3cd9627d1ae7b930c81457094645200..88746359159a76b169b7e6dcbee4fb34
#include <WebCore/PointerCharacteristics.h>
#include <WebCore/Settings.h>
#include <WebCore/SharedBuffer.h>
-@@ -118,21 +119,37 @@ String WebPage::platformUserAgent(const URL&) const
+@@ -81,21 +82,37 @@ String WebPage::platformUserAgent(const URL&) const
bool WebPage::hoverSupportedByPrimaryPointingDevice() const
{
@@ -21152,7 +21254,7 @@ index c77ff78cd3cd9627d1ae7b930c81457094645200..88746359159a76b169b7e6dcbee4fb34
}
diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp
-index 2f9a8a39375f65b66d986cf924168c92cff190e8..8d759fca6afe1e8d63a604dd08bdaec98561c0aa 100644
+index 769e54a6fc02229d6635419a09b8c5e655d5757b..cae3a4f41b9c08abaf7c3de312c5e39c29cbfdc3 100644
--- a/Source/WebKit/WebProcess/WebProcess.cpp
+++ b/Source/WebKit/WebProcess/WebProcess.cpp
@@ -93,6 +93,7 @@
@@ -21163,7 +21265,7 @@ index 2f9a8a39375f65b66d986cf924168c92cff190e8..8d759fca6afe1e8d63a604dd08bdaec9
#include <JavaScriptCore/JSLock.h>
#include <JavaScriptCore/MemoryStatistics.h>
#include <JavaScriptCore/WasmFaultSignalHandler.h>
-@@ -370,6 +371,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter
+@@ -365,6 +366,8 @@ void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameter
platformInitializeProcess(parameters);
updateCPULimit();
@@ -21188,10 +21290,10 @@ index 8987c3964a9308f2454759de7f8972215a3ae416..bcac0afeb94ed8123d1f9fb0b932c849
SetProcessDPIAware();
return true;
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-index ef4dbe919eed91caaea49292fa3926b7ec2be0e6..5332a0ad8cbe859c905f5a5995fa8c95617cea45 100644
+index ec7085326a8e30c8a1a20f1ca33a3d875aaccc7b..52c855345447f5268fc4a1d65833f21b6d69d3b1 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
-@@ -4200,7 +4200,7 @@ static BOOL currentScrollIsBlit(NSView *clipView)
+@@ -4203,7 +4203,7 @@ - (void)mouseDown:(WebEvent *)event
_private->handlingMouseDownEvent = NO;
}
@@ -21201,10 +21303,10 @@ index ef4dbe919eed91caaea49292fa3926b7ec2be0e6..5332a0ad8cbe859c905f5a5995fa8c95
- (void)touch:(WebEvent *)event
{
diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm
-index 48cc5be9887a698f2bae9261598c08b55705cff8..55904a59760c3a1f987e07db8f5d40d5efa66368 100644
+index a930db9f613b0c5f4ec42f3f2a4de916809d8844..b67478082dfb7fa0c509b5eb2dab2f65862bb576 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
-@@ -4035,7 +4035,7 @@ IGNORE_WARNINGS_END
+@@ -4036,7 +4036,7 @@ + (void)_doNotStartObservingNetworkReachability
}
#endif // PLATFORM(IOS_FAMILY)
@@ -21213,7 +21315,7 @@ index 48cc5be9887a698f2bae9261598c08b55705cff8..55904a59760c3a1f987e07db8f5d40d5
- (NSArray *)_touchEventRegions
{
-@@ -4077,7 +4077,7 @@ IGNORE_WARNINGS_END
+@@ -4078,7 +4078,7 @@ - (NSArray *)_touchEventRegions
}).autorelease();
}
@@ -21254,7 +21356,7 @@ index 0000000000000000000000000000000000000000..dd6a53e2d57318489b7e49dd7373706d
+ LIBVPX_LIBRARIES
+)
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
-index 6279a0d3435db9ac91f7705be3f8d40a6b3187a1..a77f548e0c421607f7c20cddfb7c9fe24e3655ac 100644
+index 885a2befa0414996d6302b4658d40f4b67cbafcc..9f4ab5ca7befec61a76664981aa304e1df2c50c4 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
@@ -21271,7 +21373,7 @@ index 6279a0d3435db9ac91f7705be3f8d40a6b3187a1..a77f548e0c421607f7c20cddfb7c9fe2
find_package(Cairo 1.14.0 REQUIRED)
find_package(Fontconfig 2.8.0 REQUIRED)
find_package(Freetype 2.4.2 REQUIRED)
-@@ -33,6 +38,10 @@ find_package(EGL)
+@@ -34,6 +39,10 @@ find_package(EGL)
find_package(OpenGL)
find_package(OpenGLES2)
@@ -21282,12 +21384,13 @@ index 6279a0d3435db9ac91f7705be3f8d40a6b3187a1..a77f548e0c421607f7c20cddfb7c9fe2
include(GStreamerDefinitions)
SET_AND_EXPOSE_TO_BUILD(USE_CAIRO TRUE)
-@@ -66,15 +75,15 @@ WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Qua
+@@ -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)
WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ON)
- WEBKIT_OPTION_DEFINE(USE_ANGLE_WEBGL "Whether to use ANGLE as WebGL backend." PUBLIC OFF)
--WEBKIT_OPTION_DEFINE(USE_AVIF "Whether to enable support for AVIF images." PUBLIC ${ENABLE_EXPERIMENTAL_FEATURES})
+-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})
+WEBKIT_OPTION_DEFINE(USE_JPEGXL "Whether to enable support for JPEG-XL images." PUBLIC OFF)
@@ -21299,9 +21402,9 @@ index 6279a0d3435db9ac91f7705be3f8d40a6b3187a1..a77f548e0c421607f7c20cddfb7c9fe2
-WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC OFF)
+WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC ON)
WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON)
- WEBKIT_OPTION_DEFINE(USE_WPE_RENDERER "Whether to enable WPE rendering" PUBLIC ON)
-@@ -124,9 +133,9 @@ endif ()
+ # Private options specific to the GTK port. Changing these options is
+@@ -121,9 +130,9 @@ 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)
@@ -21313,20 +21416,16 @@ index 6279a0d3435db9ac91f7705be3f8d40a6b3187a1..a77f548e0c421607f7c20cddfb7c9fe2
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)
-@@ -158,10 +167,10 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_WEEK PRIVATE ON)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INTELLIGENT_TRACKING_PREVENTION PRIVATE ON)
+@@ -153,7 +162,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_LAYOUT_FORMATTING_CONTEXT PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
--WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+-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_PLAYLIST PRIVATE OFF)
--WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
-+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MODERN_MEDIA_CONTROLS PRIVATE ON)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_CONTEXT_MENUS PRIVATE ON)
-@@ -171,7 +180,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION P
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON)
+@@ -166,7 +175,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})
@@ -21335,7 +21434,7 @@ index 6279a0d3435db9ac91f7705be3f8d40a6b3187a1..a77f548e0c421607f7c20cddfb7c9fe2
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PERIODIC_MEMORY_MONITOR PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_POINTER_LOCK PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ON)
-@@ -180,6 +189,15 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_API_STATISTICS PRIVATE ON)
+@@ -175,6 +184,15 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_API_STATISTICS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL2 PRIVATE ON)
@@ -21351,7 +21450,7 @@ index 6279a0d3435db9ac91f7705be3f8d40a6b3187a1..a77f548e0c421607f7c20cddfb7c9fe2
include(GStreamerDependencies)
# Finalize the value for all options. Do not attempt to use an option before
-@@ -278,6 +296,7 @@ if (NOT EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
+@@ -283,6 +301,7 @@ if (NOT EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
endif ()
SET_AND_EXPOSE_TO_BUILD(USE_ATSPI ${ENABLE_ACCESSIBILITY})
@@ -21360,7 +21459,7 @@ index 6279a0d3435db9ac91f7705be3f8d40a6b3187a1..a77f548e0c421607f7c20cddfb7c9fe2
SET_AND_EXPOSE_TO_BUILD(HAVE_OS_DARK_MODE_SUPPORT 1)
diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake
-index 88d2a536009f74c54d74717819e94adf5c316089..15a022fa1cca72d482beec584313e2cea6b1680d 100644
+index 6293aebadb81ee40a5dd19cdf6dbce9fd983c723..049dc02e30fc542f00a9dbd0b1bc7cb6ebda27aa 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
@@ -21386,20 +21485,16 @@ index 88d2a536009f74c54d74717819e94adf5c316089..15a022fa1cca72d482beec584313e2ce
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)
-@@ -64,10 +69,10 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INTELLIGENT_TRACKING_PREVENTION PRIVATE
+@@ -62,7 +67,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_LAYOUT_FORMATTING_CONTEXT PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_CONTEXT_MENUS PRIVATE ON)
--WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+-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_PLAYLIST PRIVATE OFF)
--WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
-+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MODERN_MEDIA_CONTROLS PRIVATE ON)
- WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)
-@@ -78,7 +83,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OFFSCREEN_CANVAS_IN_WORKERS PRIVATE ${EN
+ 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)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHAREABLE_RESOURCE PRIVATE ON)
@@ -21408,7 +21503,7 @@ index 88d2a536009f74c54d74717819e94adf5c316089..15a022fa1cca72d482beec584313e2ce
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL2 PRIVATE ON)
-@@ -88,19 +93,36 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90)
+@@ -86,19 +91,36 @@ if (WPE_VERSION VERSION_GREATER_EQUAL 1.13.90)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PUBLIC ON)
endif ()
@@ -21437,8 +21532,8 @@ index 88d2a536009f74c54d74717819e94adf5c316089..15a022fa1cca72d482beec584313e2ce
WEBKIT_OPTION_DEFINE(ENABLE_JOURNALD_LOG "Whether to enable journald logging" PUBLIC ON)
-WEBKIT_OPTION_DEFINE(ENABLE_WPE_QT_API "Whether to enable support for the Qt5/QML plugin" PUBLIC ${ENABLE_DEVELOPER_MODE})
+WEBKIT_OPTION_DEFINE(ENABLE_WPE_QT_API "Whether to enable support for the Qt5/QML plugin" PUBLIC OFF)
- WEBKIT_OPTION_DEFINE(USE_ANGLE_WEBGL "Whether to use ANGLE as WebGL backend." PUBLIC OFF)
--WEBKIT_OPTION_DEFINE(USE_AVIF "Whether to enable support for AVIF images." PUBLIC ${ENABLE_EXPERIMENTAL_FEATURES})
+ 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)
@@ -21450,7 +21545,7 @@ index 88d2a536009f74c54d74717819e94adf5c316089..15a022fa1cca72d482beec584313e2ce
# Private options specific to the WPE port.
diff --git a/Source/cmake/OptionsWin.cmake b/Source/cmake/OptionsWin.cmake
-index 00ac7921bf6903d047585063cc374231397f236b..038ddb5f9adeda2f950e4631f4390fc9ef51e93c 100644
+index 9d6e8b0600ef87c63f6816b44d2fcb8fa2181f83..3ab82e5450581768875b6c8cbf27a7aaa560589f 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)
@@ -21484,7 +21579,7 @@ index 00ac7921bf6903d047585063cc374231397f236b..038ddb5f9adeda2f950e4631f4390fc9
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)
-@@ -89,6 +87,16 @@ if (${WTF_PLATFORM_WIN_CAIRO})
+@@ -88,6 +86,16 @@ if (${WTF_PLATFORM_WIN_CAIRO})
# No support planned
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
@@ -21502,10 +21597,10 @@ index 00ac7921bf6903d047585063cc374231397f236b..038ddb5f9adeda2f950e4631f4390fc9
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 bdf462125f056ecb241f79dbb0ff79dbefa40291..9844ea22e138c715b8142cd1771f99131b1155c3 100644
+index d4891defd8f682d86f258d7b62467f4a2fc1041f..ebded546c2dd38453699e932fee292b6f6d39bcf 100644
--- a/Source/cmake/OptionsWinCairo.cmake
+++ b/Source/cmake/OptionsWinCairo.cmake
-@@ -37,20 +37,42 @@ if (OpenJPEG_FOUND)
+@@ -40,19 +40,41 @@ if (OpenJPEG_FOUND)
endif ()
find_package(WOFF2 1.0.2 COMPONENTS dec)
@@ -21526,7 +21621,7 @@ index bdf462125f056ecb241f79dbb0ff79dbefa40291..9844ea22e138c715b8142cd1771f9913
+file(TO_CMAKE_PATH "${LIBVPX_PACKAGE_PATH}" LIBVPX_PACKAGE_PATH)
+message(STATUS "Using LIBVPX_PACKAGE_PATH = ${LIBVPX_PACKAGE_PATH}")
+
-+find_library(LIBVPX_CUSTOM_LIBRARY vpxmd.lib
++find_library(LIBVPX_CUSTOM_LIBRARY vpx.lib
+ HINTS ${LIBVPX_PACKAGE_PATH}/lib
+ REQIRED
+ NO_DEFAULT_PATH
@@ -21543,7 +21638,6 @@ index bdf462125f056ecb241f79dbb0ff79dbefa40291..9844ea22e138c715b8142cd1771f9913
+# Playwright end
+
set(USE_ANGLE_EGL ON)
- set(USE_ANGLE_WEBGL ON)
SET_AND_EXPOSE_TO_BUILD(USE_ANGLE ON)
SET_AND_EXPOSE_TO_BUILD(USE_CAIRO ON)
@@ -21551,7 +21645,7 @@ index bdf462125f056ecb241f79dbb0ff79dbefa40291..9844ea22e138c715b8142cd1771f9913
SET_AND_EXPOSE_TO_BUILD(USE_CURL ON)
SET_AND_EXPOSE_TO_BUILD(USE_GRAPHICS_LAYER_TEXTURE_MAPPER ON)
SET_AND_EXPOSE_TO_BUILD(USE_GRAPHICS_LAYER_WC ON)
-@@ -74,11 +96,7 @@ set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
+@@ -76,11 +98,7 @@ set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
WEBKIT_CHECK_HAVE_SYMBOL(USE_BORINGSSL OPENSSL_IS_BORINGSSL openssl/ssl.h)
cmake_pop_check_state()
@@ -21564,11 +21658,24 @@ index bdf462125f056ecb241f79dbb0ff79dbefa40291..9844ea22e138c715b8142cd1771f9913
add_definitions(-DWTF_PLATFORM_WIN_CAIRO=1)
add_definitions(-DNOCRYPT)
+diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake
+index cadc61dc830ff88801fe1653ee594d6f7e67e870..32844513e7887b207cf3df7a785c8c1df992ba8c 100644
+--- a/Source/cmake/WebKitCompilerFlags.cmake
++++ b/Source/cmake/WebKitCompilerFlags.cmake
+@@ -87,7 +87,7 @@ macro(WEBKIT_ADD_TARGET_CXX_FLAGS _target)
+ endmacro()
+
+
+-option(DEVELOPER_MODE_FATAL_WARNINGS "Build with warnings as errors if DEVELOPER_MODE is also enabled" ON)
++option(DEVELOPER_MODE_FATAL_WARNINGS "Build with warnings as errors if DEVELOPER_MODE is also enabled" OFF)
+ if (DEVELOPER_MODE AND DEVELOPER_MODE_FATAL_WARNINGS)
+ if (MSVC)
+ set(FATAL_WARNINGS_FLAG /WX)
diff --git a/Tools/MiniBrowser/gtk/BrowserTab.c b/Tools/MiniBrowser/gtk/BrowserTab.c
-index 1c84f30b2ea96dd0c168918f9d63773b8e2548a3..55603437900a65de7bef70563c9ec0399c5f563c 100644
+index f46c5321ee891d7bff9fe7832ec03ec4b65f967a..976cf04297795519b4c0a1f9b5a03955b0250c81 100644
--- a/Tools/MiniBrowser/gtk/BrowserTab.c
+++ b/Tools/MiniBrowser/gtk/BrowserTab.c
-@@ -161,6 +161,11 @@ static void loadChanged(WebKitWebView *webView, WebKitLoadEvent loadEvent, Brows
+@@ -158,6 +158,11 @@ static void loadChanged(WebKitWebView *webView, WebKitLoadEvent loadEvent, Brows
#endif
}
@@ -21580,7 +21687,7 @@ index 1c84f30b2ea96dd0c168918f9d63773b8e2548a3..55603437900a65de7bef70563c9ec039
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);
-@@ -708,6 +713,7 @@ static void browserTabConstructed(GObject *gObject)
+@@ -705,6 +710,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);
@@ -21588,7 +21695,7 @@ index 1c84f30b2ea96dd0c168918f9d63773b8e2548a3..55603437900a65de7bef70563c9ec039
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);
-@@ -758,6 +764,9 @@ static char *getInternalURI(const char *uri)
+@@ -755,6 +761,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);
@@ -21672,10 +21779,10 @@ index 881609c9fe8f2b5ed6158a5972438c14fd650cf5..566568382a2983a8a823cf0a0cf2634a
/* Public API. */
diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.h b/Tools/MiniBrowser/gtk/BrowserWindow.h
-index 62629b4c1c25ae82bd797b39bbf9de0331f8eed2..5de7900a29b0e629f1ac404bbb0dc5b4e605294d 100644
+index 72831873d5fd321a27494254876c6dee378be4c0..ffc6f5e153312e929a188552d97b661c591e278d 100644
--- a/Tools/MiniBrowser/gtk/BrowserWindow.h
+++ b/Tools/MiniBrowser/gtk/BrowserWindow.h
-@@ -37,7 +37,7 @@ G_BEGIN_DECLS
+@@ -42,7 +42,7 @@ G_BEGIN_DECLS
#define BROWSER_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), BROWSER_TYPE_WINDOW))
#define BROWSER_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), BROWSER_TYPE_WINDOW))
#define BROWSER_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BROWSER_TYPE_WINDOW, BrowserWindowClass))
@@ -21685,10 +21792,10 @@ index 62629b4c1c25ae82bd797b39bbf9de0331f8eed2..5de7900a29b0e629f1ac404bbb0dc5b4
typedef struct _BrowserWindow BrowserWindow;
diff --git a/Tools/MiniBrowser/gtk/main.c b/Tools/MiniBrowser/gtk/main.c
-index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f69e68db86 100644
+index 2b232c87cbccaf60e30e3ad316f38538e059843b..154da257b55941ce7fd4259f457bdc826bacd8eb 100644
--- a/Tools/MiniBrowser/gtk/main.c
+++ b/Tools/MiniBrowser/gtk/main.c
-@@ -61,7 +61,12 @@ static gboolean enableITP;
+@@ -66,7 +66,12 @@ static gboolean enableITP;
static gboolean enableSandbox;
static gboolean exitAfterLoad;
static gboolean webProcessCrashed;
@@ -21701,7 +21808,7 @@ index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f6
typedef enum {
MINI_BROWSER_ERROR_INVALID_ABOUT_PATH
-@@ -156,6 +161,10 @@ static const GOptionEntry commandLineOptions[] =
+@@ -161,6 +166,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 },
@@ -21712,7 +21819,7 @@ index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f6
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, 0, "[URL…]" },
{ 0, 0, 0, 0, 0, 0, 0 }
};
-@@ -624,6 +633,57 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
+@@ -631,6 +640,57 @@ static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResul
g_main_loop_quit(data->mainLoop);
}
@@ -21770,7 +21877,7 @@ index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f6
static void startup(GApplication *application)
{
const char *actionAccels[] = {
-@@ -654,10 +714,22 @@ static void startup(GApplication *application)
+@@ -661,10 +721,22 @@ static void startup(GApplication *application)
static void activate(GApplication *application, WebKitSettings *webkitSettings)
{
@@ -21792,10 +21899,10 @@ index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f6
manager = webkit_website_data_manager_new_ephemeral();
- else {
+ } else {
- char *dataDirectory = g_build_filename(g_get_user_data_dir(), "webkitgtk-" WEBKITGTK_API_VERSION_STRING, "MiniBrowser", NULL);
- char *cacheDirectory = g_build_filename(g_get_user_cache_dir(), "webkitgtk-" WEBKITGTK_API_VERSION_STRING, "MiniBrowser", NULL);
+ 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);
-@@ -682,6 +754,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
+@@ -690,6 +762,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
#endif
"time-zone-override", timeZone,
NULL);
@@ -21803,7 +21910,7 @@ index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f6
g_object_unref(manager);
if (enableSandbox)
-@@ -763,9 +836,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
+@@ -771,9 +844,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
if (exitAfterLoad)
exitAfterWebViewLoadFinishes(webView, application);
}
@@ -21814,7 +21921,7 @@ index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f6
}
} else {
WebKitWebView *webView = createBrowserTab(mainWindow, webkitSettings, userContentManager, defaultWebsitePolicies);
-@@ -812,7 +883,7 @@ int main(int argc, char *argv[])
+@@ -820,7 +891,7 @@ int main(int argc, char *argv[])
g_option_context_add_group(context, gst_init_get_option_group());
#endif
@@ -21823,7 +21930,7 @@ index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f6
webkit_settings_set_enable_developer_extras(webkitSettings, TRUE);
webkit_settings_set_enable_webgl(webkitSettings, TRUE);
webkit_settings_set_enable_media_stream(webkitSettings, TRUE);
-@@ -844,9 +915,11 @@ int main(int argc, char *argv[])
+@@ -852,9 +923,11 @@ int main(int argc, char *argv[])
}
GtkApplication *application = gtk_application_new("org.webkitgtk.MiniBrowser", G_APPLICATION_NON_UNIQUE);
@@ -21836,7 +21943,7 @@ index c3beeba577d32dc32ea5f0fb80cd46ebe118bb34..ed7714a20ab2869d188aa1d30cee49f6
return exitAfterLoad && webProcessCrashed ? 1 : 0;
diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp
-index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a33690b57 100644
+index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..b857674667e32216204fa4f029f8a024af75234a 100644
--- a/Tools/MiniBrowser/wpe/main.cpp
+++ b/Tools/MiniBrowser/wpe/main.cpp
@@ -45,6 +45,9 @@ static gboolean headlessMode;
@@ -21897,7 +22004,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
{
auto backend = createViewBackend(1280, 720);
struct wpe_view_backend* wpeBackend = backend->backend();
-@@ -172,17 +201,88 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
+@@ -172,17 +201,89 @@ static WebKitWebView* createWebView(WebKitWebView* webView, WebKitNavigationActi
delete static_cast<WPEToolingBackends::ViewBackend*>(data);
}, backend.release());
@@ -21918,6 +22025,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
+ newWebView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
+ "backend", viewBackend,
+ "web-context", webContext,
++ "is-controlled-by-automation", TRUE,
+ nullptr));
+ }
@@ -21988,7 +22096,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
int main(int argc, char *argv[])
{
#if ENABLE_DEVELOPER_MODE
-@@ -218,6 +318,16 @@ int main(int argc, char *argv[])
+@@ -218,6 +319,16 @@ int main(int argc, char *argv[])
}
auto* loop = g_main_loop_new(nullptr, FALSE);
@@ -22005,7 +22113,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
auto backend = createViewBackend(1280, 720);
struct wpe_view_backend* wpeBackend = backend->backend();
-@@ -227,7 +337,15 @@ int main(int argc, char *argv[])
+@@ -227,7 +338,15 @@ int main(int argc, char *argv[])
return 1;
}
@@ -22022,7 +22130,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
webkit_website_data_manager_set_itp_enabled(manager, enableITP);
if (proxy) {
-@@ -240,6 +358,7 @@ int main(int argc, char *argv[])
+@@ -240,6 +359,7 @@ int main(int argc, char *argv[])
webkit_website_data_manager_set_tls_errors_policy(manager, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
auto* webContext = WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, "website-data-manager", manager, "time-zone-override", timeZone, nullptr));
@@ -22030,7 +22138,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
g_object_unref(manager);
if (cookiesPolicy) {
-@@ -298,7 +417,14 @@ int main(int argc, char *argv[])
+@@ -298,7 +418,14 @@ int main(int argc, char *argv[])
auto* viewBackend = webkit_web_view_backend_new(wpeBackend, [](gpointer data) {
delete static_cast<WPEToolingBackends::ViewBackend*>(data);
}, backend.release());
@@ -22046,7 +22154,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
auto* webView = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
"backend", viewBackend,
"web-context", webContext,
-@@ -315,8 +441,6 @@ int main(int argc, char *argv[])
+@@ -315,8 +442,6 @@ int main(int argc, char *argv[])
backendPtr->setAccessibleChild(ATK_OBJECT(accessible));
#endif
@@ -22055,7 +22163,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
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 +453,9 @@ int main(int argc, char *argv[])
+@@ -329,16 +454,9 @@ int main(int argc, char *argv[])
webkit_web_view_set_background_color(webView, &color);
if (uriArguments) {
@@ -22075,7 +22183,7 @@ index 38fd6896339c7ca66e5f31ff6ad93cc0f330f7e5..f154e7e7da2f03f4a34e6e329ad5f38a
webkit_web_view_load_uri(webView, "about:blank");
else
webkit_web_view_load_uri(webView, "https://wpewebkit.org");
-@@ -348,8 +465,7 @@ int main(int argc, char *argv[])
+@@ -348,8 +466,7 @@ int main(int argc, char *argv[])
g_hash_table_destroy(openViews);
@@ -22123,10 +22231,10 @@ index 9ee1f886d0148827da93466dece71d1eec5307cc..ee7d59af6b1ea62f6d4a61a19bf60a8f
set(WebKitTestRunnerInjectedBundle_IDL_FILES
"${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityController.idl"
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
-index a453d896f4ae544a03daf15c091885463869086f..c7e84d3831dcbfde0ccf4508336b6fbe93d733a8 100644
+index 04970776e5e5adf6f7102bd9a275f5712d5a1547..cb2112c711766c4ddd88b3d156fa812ee3b92811 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
-@@ -891,6 +891,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options)
+@@ -941,6 +941,7 @@ void TestController::createWebViewWithOptions(const TestOptions& options)
0, // requestStorageAccessConfirm
shouldAllowDeviceOrientationAndMotionAccess,
runWebAuthenticationPanel,
@@ -22135,7 +22243,7 @@ index a453d896f4ae544a03daf15c091885463869086f..c7e84d3831dcbfde0ccf4508336b6fbe
decidePolicyForMediaKeySystemPermissionRequest,
nullptr, // requestWebAuthenticationNoGesture
diff --git a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
-index b0a503013185f29feeca47e4313b27e349973c02..ee1f87780a99b2b626b1ada984d6310975076019 100644
+index 402c0ec98a26e040765473c660c2a7fed5f4ea46..3b9594d0da435b35fb0e423d10d2852151615d91 100644
--- a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
+++ b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
@@ -896,4 +896,51 @@ void EventSenderProxy::scaleGestureEnd(double scale)
@@ -22221,22 +22329,24 @@ index 8635ebd88f92175c6cec4781ae3934193afec484..552dbf544180132ee7a72e364bf52582
# These are dependencies necessary for running tests.
diff --git a/Tools/gtk/dependencies/apt b/Tools/gtk/dependencies/apt
-index 04cfec1eca7818035ca2de7dd4f2efcc9434741f..9435d01ef9ad3eaec226ed6abbd6151214f132f9 100644
+index 92e312b9ce6383eb6b73296e70a3c9e996f55f2c..b3e968773a1919c3edadbb0a543ea056bc0af5c4 100644
--- a/Tools/gtk/dependencies/apt
+++ b/Tools/gtk/dependencies/apt
-@@ -35,6 +35,7 @@ PACKAGES+=(
+@@ -37,6 +37,9 @@ PACKAGES+=(
nasm
unifdef
xfonts-utils
+ $(aptIfElse libenchant-dev libenchant-2-dev)
++ $(aptIfExists libwpe-1.0-dev)
++ $(aptIfExists libwpebackend-fdo-1.0-dev)
# These are dependencies necessary for running tests.
cups-daemon
diff --git a/Tools/gtk/jhbuild.modules b/Tools/gtk/jhbuild.modules
-index 3eb911ba48eca35de2de9ee671cb577a0a96ec27..916b45a541486e59380d66b524a004a77d955ed8 100644
+index af4b52daa5d58af71cc2860f765a2940a69e343a..079de4ed4f9ca640ab04f06e60e020e7c4460684 100644
--- a/Tools/gtk/jhbuild.modules
+++ b/Tools/gtk/jhbuild.modules
-@@ -295,28 +295,28 @@
+@@ -292,28 +292,28 @@
</autotools>
<meson id="atk" mesonargs="-Dintrospection=false">
@@ -22273,7 +22383,7 @@ index 3eb911ba48eca35de2de9ee671cb577a0a96ec27..916b45a541486e59380d66b524a004a7
<dependencies>
<dep package="glib"/>
diff --git a/Tools/jhbuild/jhbuild-minimal.modules b/Tools/jhbuild/jhbuild-minimal.modules
-index a08c829f49b43d494a09c40f71606735c172b6a5..49403c27d67b40e5ae0fb4cf294d835cfdaf37c6 100644
+index f88cafefce902e1abe41b4890ab58030bd02f04d..18624763488a34676adaa0e74e7c7ee5f53bf51c 100644
--- a/Tools/jhbuild/jhbuild-minimal.modules
+++ b/Tools/jhbuild/jhbuild-minimal.modules
@@ -22,7 +22,6 @@
@@ -22503,7 +22613,7 @@ index 4b3d262528d33800ac46e4e9fc342b11f2744979..39d72bd2c04e79b94a5c7634b6abc9b2
static cairo_user_data_key_t bufferKey;
cairo_surface_set_user_data(m_snapshot, &bufferKey, buffer,
diff --git a/Tools/wpe/jhbuild.modules b/Tools/wpe/jhbuild.modules
-index 8b8ba5b934075fe53e231a418db17ddcf7ba92aa..08aba0aa37ffbbd5878befe05e2950ab5350ea3c 100644
+index 0f6f8837619eee7b48b2b1cba0b2d4da513f07c6..8e72dc82e404a2009ff922d1517abf92509267e3 100644
--- a/Tools/wpe/jhbuild.modules
+++ b/Tools/wpe/jhbuild.modules
@@ -276,28 +276,28 @@
@@ -22543,13 +22653,13 @@ index 8b8ba5b934075fe53e231a418db17ddcf7ba92aa..08aba0aa37ffbbd5878befe05e2950ab
<dependencies>
<dep package="glib"/>
diff --git a/WebKit.xcworkspace/contents.xcworkspacedata b/WebKit.xcworkspace/contents.xcworkspacedata
-index 8660306662de6faabab78662034958811e3e4a67..979c470d97950007ad990564eba18de965c295b2 100644
+index a0f02e61be7e667c6ba164ca578109af36ac28d9..8f5af2e82c167ba6798fb7fde24a9f641f6554a5 100644
--- a/WebKit.xcworkspace/contents.xcworkspacedata
+++ b/WebKit.xcworkspace/contents.xcworkspacedata
-@@ -1,6 +1,9 @@
- <?xml version="1.0" encoding="UTF-8"?>
- <Workspace
- version = "1.0">
+@@ -4,6 +4,9 @@
+ <FileRef
+ location = "group:Configurations">
+ </FileRef>
+ <FileRef
+ location = "group:Tools/Playwright/Playwright.xcodeproj">
+ </FileRef>