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 promise = new Promise((resolve, reject) => { - this._pendingMessages.set(id, {connectorId, resolve, reject, methodName, namespace}); - }); const message = {requestId: id, methodName, params, namespace}; + const promise = new Promise((resolve, reject) => { + this._pendingMessages.set(id, {connectorId, resolve, reject, methodName, namespace, message}); + }); 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); } - updateUserAgent() { - this._linkedBrowser.browsingContext.customUserAgent = this._browserContext.defaultUserAgent; + updateTouchOverride(browsingContext = undefined) { + (browsingContext || this._linkedBrowser.browsingContext).touchEventsOverride = this._browserContext.touchOverride ? 'enabled' : 'none'; } - updatePlatform() { - this._linkedBrowser.browsingContext.customPlatform = this._browserContext.defaultPlatform; + updateUserAgent(browsingContext = undefined) { + (browsingContext || this._linkedBrowser.browsingContext).customUserAgent = this._browserContext.defaultUserAgent; } - updateJavaScriptDisabled() { - this._linkedBrowser.browsingContext.allowJavascript = !this._browserContext.javaScriptDisabled; + updatePlatform(browsingContext = undefined) { + (browsingContext || this._linkedBrowser.browsingContext).customPlatform = this._browserContext.defaultPlatform; + } + + 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; +function initialize(browsingContext, docShell, actor) { + if (browsingContext.parent) { + // For child frames, return agents from the main frame. + return browsingContextToAgents.get(browsingContext.top); + } -let failedToOverrideTimezone = false; + let data = browsingContextToAgents.get(browsingContext); + if (data) { + // Rebind from one main frame actor to another one. + data.channel.bindToActor(actor); + return 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); - } - }, + data = { channel: undefined, pageAgent: undefined, frameTree: undefined, failedToOverrideTimezone: false }; + browsingContextToAgents.set(browsingContext, data); - 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; - }, + 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); + } + }, - bypassCSP: (bypassCSP) => { - docShell.bypassCSPEnabled = bypassCSP; - }, + 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; + }, - timezoneId: (timezoneId) => { - failedToOverrideTimezone = !docShell.overrideTimezone(timezoneId); - }, + bypassCSP: (bypassCSP) => { + docShell.bypassCSPEnabled = bypassCSP; + }, - locale: (locale) => { - docShell.languageOverride = locale; - }, + timezoneId: (timezoneId) => { + data.failedToOverrideTimezone = !docShell.overrideTimezone(timezoneId); + }, - scrollbarsHidden: (hidden) => { - frameTree.setScrollbarsHidden(hidden); - }, + locale: (locale) => { + docShell.languageOverride = locale; + }, - colorScheme: (colorScheme) => { - frameTree.setColorScheme(colorScheme); - }, + scrollbarsHidden: (hidden) => { + data.frameTree.setScrollbarsHidden(hidden); + }, - reducedMotion: (reducedMotion) => { - frameTree.setReducedMotion(reducedMotion); - }, + javaScriptDisabled: (javaScriptDisabled) => { + data.frameTree.setJavaScriptDisabled(javaScriptDisabled); + }, + }; - forcedColors: (forcedColors) => { - frameTree.setForcedColors(forcedColors); - }, -}; + 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 }; -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 || {}; // 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); + 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; - pageAgent = new PageAgent(messageManager, channel, frameTree); - - channel.register('', { + 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 HeadlessWindowCapturer::Create(HeadlessWidget* headlessWindow) { - return new rtc::RefCountedObject(headlessWindow); + return rtc::scoped_refptr( + new rtc::RefCountedObject(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 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::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 #include -@@ -359,8 +360,19 @@ Maybe LauncherMain(int& argc, wchar_t* argv[], +@@ -421,8 +422,18 @@ Maybe 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(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/webcompat@mozilla.org/shims/empty-shim.txt +@@ -67,6 +67,12 @@ browser/features/webcompat@mozilla.org/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 @@ -194,7 +193,7 @@ index 4b4c20d5d04e51e5eeb08027c4b48068ee21d703..5529185d2a39e041b7e5021a5f5de632 template <> struct ParamTraits : public ContiguousEnumSerializer< -@@ -2782,6 +2796,40 @@ void BrowsingContext::DidSet(FieldIndex, +@@ -2839,6 +2853,40 @@ void BrowsingContext::DidSet(FieldIndex, 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) \ FIELD(MessageManagerGroup, nsString) \ FIELD(MaxTouchPointsOverride, uint8_t) \ -@@ -217,6 +217,10 @@ enum class ExplicitActiveStatus : uint8_t { +@@ -231,6 +231,10 @@ struct EmbedderColorSchemes { * 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, 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 = 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 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 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 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& aMessages) { +@@ -3619,6 +3619,9 @@ void Document::SendToConsole(nsCOMArray& 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& 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 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 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 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 nsGlobalWindowOuter::GetRDMDeviceSize( +@@ -3765,6 +3784,14 @@ Maybe 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>& 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::sService; already_AddRefed @@ -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* 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*> _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( 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 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 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 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 mLanguages; -@@ -1951,6 +1963,16 @@ void WorkerPrivate::UpdateContextOptions( +@@ -1952,6 +1964,16 @@ void WorkerPrivate::UpdateContextOptions( } } @@ -1803,7 +1885,7 @@ index 96357690e6f056501bef4729291c0c280d43b8e3..6fbcad9a972d61ab1d2de295219c3612 const nsTArray& 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& 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 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 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 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 mUserContextIdsWithDisabledSecurityChecks GUARDED_BY(mMutex); - nsCOMPtr mSettingsFile GUARDED_BY(mMutex); - nsTHashtable mSettingsTable GUARDED_BY(mMutex); + bool mDisableAllSecurityCheck MOZ_GUARDED_BY(mMutex); ++ mozilla::HashSet mUserContextIdsWithDisabledSecurityChecks MOZ_GUARDED_BY(mMutex); + nsCOMPtr mSettingsFile MOZ_GUARDED_BY(mMutex); + nsTHashtable 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) -> 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 #include -@@ -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(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 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 #include #include +#include #include #include #include @@ -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& result); void getPreview(Protocol::ErrorString&, const String& objectId, RefPtr& 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&&); 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 = ""; }; DDF30D9327C5C756006A526F /* bwe_defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bwe_defines.h; sourceTree = ""; }; DDF30D9427C5C756006A526F /* remote_bitrate_estimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = remote_bitrate_estimator.h; sourceTree = ""; }; @@ -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 = ""; }; @@ -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 = ""; tabWidth = 4; usesTabs = 0; }; EFB7287B2124C73D005C2558 /* CanvasActivityRecord.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasActivityRecord.cpp; sourceTree = ""; }; EFCC6C8D20FE914000A2321B /* CanvasActivityRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasActivityRecord.h; sourceTree = ""; }; @@ -2480,7 +2481,7 @@ index 92762a6dca95eb30c8f9ff80201b909f610d5559..2a34779040a21f18ee125fd83a7901c9 F12171F316A8BC63000053CA /* WebVTTElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTElement.cpp; sourceTree = ""; }; F12171F416A8BC63000053CA /* WebVTTElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTElement.h; sourceTree = ""; }; F32BDCD52363AAC90073B6AE /* UserGestureEmulationScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserGestureEmulationScope.cpp; sourceTree = ""; }; -@@ -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 m_wrapper; #elif USE(ATSPI) RefPtr m_wrapper; +#else + RefPtr 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(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::createForDrag(const Document& document) +@@ -503,6 +503,14 @@ Ref 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(), 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&& 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(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 InspectorDOMAgent::highlightSelector(Ref InspectorDOMAgent::highlightSelector(Ref InspectorDOMAgent::highlightNode(Ref&& highlightInspectorObject, std::optional&& 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 InspectorDOMAgent::setInspectedNode(Protocol::DOM: +@@ -1694,15 +1720,154 @@ Protocol::ErrorStringOr InspectorDOMAgent::setInspectedNode(Protocol::DOM: return { }; } -Protocol::ErrorStringOr> 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> InspectorDOMAgent::resolveNode(std::optional&& nodeId, const String& objectId, std::optional&& contextId, const String& objectGroup) -+{ -+ Protocol::ErrorString errorString; -+ Node* node = assertNode(errorString, WTFMove(nodeId), objectId); ++Protocol::ErrorStringOr> InspectorDOMAgent::resolveNode(std::optional&& nodeId, const String& objectId, const Inspector::Protocol::Network::FrameId& frameId, std::optional&& 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 InspectorDOMAgent::pushNodeByPath +@@ -2959,7 +3124,7 @@ Protocol::ErrorStringOr 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 InspectorDOMAgent::resolveNode(Node* nod +@@ -2968,12 +3133,18 @@ RefPtr 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 InspectorDOMAgent::setAllowEditingUserAgentShadowT +@@ -2996,4 +3167,57 @@ Protocol::ErrorStringOr 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>> getSearchResults(const String& searchId, int fromIndex, int toIndex); Inspector::Protocol::ErrorStringOr discardSearchResults(const String& searchId); - Inspector::Protocol::ErrorStringOr> resolveNode(Inspector::Protocol::DOM::NodeId, const String& objectGroup); -+ Inspector::Protocol::ErrorStringOr> resolveNode(std::optional&& nodeId, const String& objectId, std::optional&& contextId, const String& objectGroup); ++ Inspector::Protocol::ErrorStringOr> resolveNode(std::optional&& nodeId, const String& objectId, const Inspector::Protocol::Network::FrameId& frameId, std::optional&& contextId, const String& objectGroup); Inspector::Protocol::ErrorStringOr>> getAttributes(Inspector::Protocol::DOM::NodeId); #if PLATFORM(IOS_FAMILY) Inspector::Protocol::ErrorStringOr setInspectModeEnabled(bool, RefPtr&& 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 buildObjectForResourceRequest(const Resou +@@ -336,8 +338,8 @@ static Ref buildObjectForResourceRequest(const Resou .release(); if (request.httpBody() && !request.httpBody()->isEmpty()) { @@ -3840,7 +3853,7 @@ index 3f095032390bb73cd3d72422b969bcf3cb66f781..97a7ad9612301d5c00943cd2aa5ca475 } if (resourceLoader) { -@@ -389,6 +391,8 @@ RefPtr InspectorNetworkAgent::buildObjectForResourc +@@ -390,6 +392,8 @@ RefPtr 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 InspectorNetworkAgent::setExtraHTTPHeaders(Ref&& 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 InspectorNetworkAgent::interceptWithRequest(const +@@ -1235,6 +1240,9 @@ Protocol::ErrorStringOr 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 InspectorNetworkAgent::interceptRequestWithRespons +@@ -1334,14 +1342,23 @@ Protocol::ErrorStringOr 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 InspectorNetworkAgent::setEmulatedConditions(std:: +@@ -1404,6 +1421,12 @@ Protocol::ErrorStringOr 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(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 InspectorPageAgent::enable() +@@ -360,12 +383,20 @@ Protocol::ErrorStringOr 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 InspectorPageAgent::reload(std::optional&& i +@@ -414,6 +445,22 @@ Protocol::ErrorStringOr InspectorPageAgent::reload(std::optional&& i return { }; } @@ -4059,7 +4072,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84 Protocol::ErrorStringOr InspectorPageAgent::navigate(const String& url) { Frame& frame = m_inspectedPage.mainFrame(); -@@ -432,6 +479,13 @@ Protocol::ErrorStringOr InspectorPageAgent::overrideUserAgent(const String +@@ -435,6 +482,13 @@ Protocol::ErrorStringOr InspectorPageAgent::overrideUserAgent(const String return { }; } @@ -4073,7 +4086,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84 Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Protocol::Page::Setting setting, std::optional&& value) { auto& inspectedPageSettings = m_inspectedPage.settings(); -@@ -445,6 +499,12 @@ Protocol::ErrorStringOr InspectorPageAgent::overrideSetting(Protocol::Page +@@ -448,6 +502,12 @@ Protocol::ErrorStringOr 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 InspectorPageAgent::overrideSetting(Protocol::Page +@@ -473,6 +533,36 @@ Protocol::ErrorStringOr 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 InspectorPageAgent::overrideSetting(Protocol::Page +@@ -485,6 +575,12 @@ Protocol::ErrorStringOr 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> InspectorP +@@ -720,9 +816,13 @@ Protocol::ErrorStringOr> InspectorP return { { content, base64Encoded } }; } @@ -4152,7 +4165,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84 return { }; } -@@ -807,15 +907,16 @@ Protocol::ErrorStringOr InspectorPageAgent::setShowPaintRects(bool show) +@@ -828,15 +928,16 @@ Protocol::ErrorStringOr 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(frame.tree().parent())); + m_frontendDispatcher->frameAttached(frameId(&frame), parentFrameId); +} + @@ -4332,7 +4344,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84 Ref 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 InspectorPageAgent::snapshotNode(Protocol::DOM:: +@@ -1109,11 +1279,13 @@ Protocol::ErrorStringOr 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 InspectorPageAgent::snapshotRect(int x, int y, i +@@ -1124,6 +1296,67 @@ Protocol::ErrorStringOr 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 InspectorPageAgent::archive() { -@@ -1112,7 +1346,6 @@ Protocol::ErrorStringOr InspectorPageAgent::archive() +@@ -1136,7 +1369,6 @@ Protocol::ErrorStringOr InspectorPageAgent::archive() } #endif @@ -4436,7 +4448,7 @@ index a6e415a9bf47e0f4c98b9f375b3195df287fe67b..15c5da138b47e518bea8b744d05c2e84 Protocol::ErrorStringOr InspectorPageAgent::setScreenSizeOverride(std::optional&& width, std::optional&& height) { if (width.has_value() != height.has_value()) -@@ -1127,6 +1360,636 @@ Protocol::ErrorStringOr InspectorPageAgent::setScreenSizeOverride(std::opt +@@ -1151,6 +1383,634 @@ Protocol::ErrorStringOr 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(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& 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(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 stat +@@ -1201,6 +1201,7 @@ void FrameLoader::loadInSameDocument(URL url, RefPtr 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 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> 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 + #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> CachedResourceLoader::allCachedSVGImages() const + + ResourceErrorOr> 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: 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 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 m_dragStartSelection; RefPtr 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, UniqueRefinit(); } -@@ -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 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 History::stateObjectAdded(RefPtr&& data +@@ -272,6 +273,7 @@ ExceptionOr History::stateObjectAdded(RefPtr&& 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& +@@ -490,6 +490,37 @@ void Page::setOverrideViewportArguments(const std::optional& 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 valueOverride) +@@ -3488,6 +3515,26 @@ void Page::setUseDarkAppearanceOverride(std::optional 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& overrideViewportArguments() const { return m_overrideViewportArguments; } WEBCORE_EXPORT void setOverrideViewportArguments(const std::optional&); @@ -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); @@ -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 m_dragController; @@ -6576,7 +6602,7 @@ index 680b1008ce574f1f50f61940a6647a74019063d5..7a252304e48e522b5c082494b22f447f #endif const std::unique_ptr 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 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 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(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(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(frame->screenSize().height()); return static_cast(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(frame->screenSize().width()); return static_cast(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 std::enable_if::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 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 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 clientTypes; - Vector> 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&&, IDataObject*); explicit Pasteboard(std::unique_ptr&&, WCDataObject*); -@@ -266,6 +267,12 @@ public: +@@ -259,6 +264,12 @@ public: static std::unique_ptr createForGlobalSelection(std::unique_ptr&&); #endif @@ -6928,7 +6936,7 @@ index 6c8bff431b593b2443e411381f634e417f71cf06..c48473c936e9f7d997db8006770ae148 #if PLATFORM(IOS_FAMILY) explicit Pasteboard(std::unique_ptr&&, int64_t changeCount); explicit Pasteboard(std::unique_ptr&&, const String& pasteboardName); -@@ -300,6 +307,7 @@ public: +@@ -293,6 +304,7 @@ public: COMPtr 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 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 m_dataObject; COMPtr 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::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 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 - } - #endif - -+#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; -+} -+#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 +index 2fc402a9d5270ee610dcb81ff856c597a0df7cfa..d551be654bfa428c999d804977b22dfdb858fa1c 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) +@@ -56,12 +56,18 @@ inline bool webkitGstCheckVersion(guint major, guint minor, guint micro) + return true; + } + ++// 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 webkitGstElementGetCurrentRunningTime(GstElement*); ++#define gst_element_get_current_running_time webkitGstElementGetCurrentRunningTime ++#endif ++ + // 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 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&, 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> 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&&, 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 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 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& 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&& 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 clearUserInteraction(PAL::SessionID, RegistrableDomain&&, CompletionHandler&&); 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 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 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&& 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 m_ephemeralMeasurement; bool m_isRunningEphemeralMeasurementTest { false }; @@ -9239,10 +9240,10 @@ index 95d1403c8368d6409ce67559164218c2877884c4..e09bfcacefef60e42fbe386e35e501de HashSet> 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::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 NetworkSessionCurl::createWebSocketTask(WebPageProxyIdentifier, NetworkSocketChannel& channel, const WebCore::ResourceRequest& request, const String& protocol, const WebCore::ClientOrigin&, bool, bool) + std::unique_ptr NetworkSessionCurl::createWebSocketTask(WebPageProxyIdentifier, NetworkSocketChannel& channel, const WebCore::ResourceRequest& request, const String& protocol, const WebCore::ClientOrigin&, bool, bool, OptionSet) { - return makeUnique(channel, request, protocol); + return makeUnique(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&&); 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&& 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 NetworkSessionSoup::createWebSocketTask(WebPageProxyIdentifier, NetworkSocketChannel& channel, const ResourceRequest& request, const String& protocol, const ClientOrigin&, bool, bool) + std::unique_ptr NetworkSessionSoup::createWebSocketTask(WebPageProxyIdentifier, NetworkSocketChannel& channel, const ResourceRequest& request, const String& protocol, const ClientOrigin&, bool, bool, OptionSet) { GRefPtr soupMessage = request.createSoupMessage(blobRegistry()); @@ -127,14 +141,21 @@ std::unique_ptr NetworkSessionSoup::createWebSocketTask(WebPagePr @@ -9426,11 +9427,28 @@ index 8893772d3dd02b38124e8eefae5199274b3b9148..76939e34e7f9d69814fed6b5eb320f57 #endif } return makeUnique(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> { + { + 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; + 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)=$" - ) +@@ -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 #include 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&); -+ 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 modifiers, WallTime timestamp, Vector&& 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 modifiers, WallTime timestamp, Vector&& 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&& commands); NativeWebKeyboardEvent(const String&, std::optional>&&, std::optional&&); - NativeWebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, Vector&& commands, bool isKeypad, OptionSet); -+ 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 modifiers, WallTime timestamp, Vector&& commands) + NativeWebKeyboardEvent(Type, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, Vector&& commands, bool isKeypad, OptionSet); ++ 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 modifiers, WallTime timestamp, Vector&& 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>&&, std::optional&&); -+ 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 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 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&& 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 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 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 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 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: + #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 + #include + #include ++#include + + 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 #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::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::decode(Decoder& decoder, WindowFeatures& windowFeatures) -@@ -1327,6 +1334,12 @@ bool ArgumentCoder::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::encode(Encoder& encoder, const DragData& dragData) +@@ -786,6 +790,11 @@ void ArgumentCoder::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::decode(Decoder& decoder, DragData& dragData) +@@ -809,9 +818,16 @@ bool ArgumentCoder::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::decode(Decoder& decoder, DragData& dragData) +@@ -827,8 +843,14 @@ bool ArgumentCoder::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 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 #include @@ -9792,8 +9827,22 @@ index 3ae6504779d3917a79f69f32b58260afeda270b4..72d44c33953cc13bf2ed7c762b4f9a7b #include #include +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 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& commands, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet 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& 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 modifiers, WallTime timestamp, Vector&& 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 modifiers, WallTime timestamp, Vector&& 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>&& preeditUnderlines, std::optional&& preeditSelectionRange, Vector&& commands, bool isKeypad, OptionSet 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>&& preeditUnderlines, std::optional&& preeditSelectionRange, Vector&& 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>&& preeditUnderlines, std::optional&& preeditSelectionRange, Vector&& 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 modifiers, WallTime timestamp, Vector&& 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 modifiers, WallTime timestamp, Vector&& 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 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>&& preeditUnderlines, std::optional&& 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>&& preeditUnderlines, std::optional&& 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 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 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&, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet, 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, WallTime timestamp, Vector&& 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&, 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, WallTime timestamp, Vector&& 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>&&, std::optional&&, Vector&& commands, bool isKeypad, OptionSet, 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, WallTime timestamp, Vector&& commands); +- WebKeyboardEvent(WebEvent&&, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional>&&, std::optional&&, Vector&& 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>&&, std::optional&&, Vector&& 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, WallTime timestamp, Vector&& 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, 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>&&, std::optional&&, bool isKeypad, OptionSet, 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, WallTime timestamp); +- WebKeyboardEvent(WebEvent&&, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional>&&, std::optional&&, bool isKeypad); ++ WebKeyboardEvent(WebEvent&&, const String& text, const String& key, const String& code, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool handledByInputMethod, std::optional>&&, std::optional&&, 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, 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, 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, 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, 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