chore: update browser patches to Jan 9 2024 (#29623)
Commit 337e0dbf2cb068a5a519b09fee1155509fb2dc1f
This commit is contained in:
parent
50e7d8ca7a
commit
92b1b16041
|
|
@ -1,3 +1,3 @@
|
|||
REMOTE_URL="https://github.com/mozilla/gecko-dev"
|
||||
BASE_BRANCH="release"
|
||||
BASE_REVISION="7ab3cc0103090dd7bfa02e072a529b9fc784ab4e"
|
||||
BASE_REVISION="a32b8662993085139ac91212a297123b632fc1c0"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,16 @@ class Helper {
|
|||
return allBrowsingContexts;
|
||||
}
|
||||
|
||||
awaitTopic(topic) {
|
||||
return new Promise(resolve => {
|
||||
const listener = () => {
|
||||
Services.obs.removeObserver(listener, topic);
|
||||
resolve();
|
||||
}
|
||||
Services.obs.addObserver(listener, topic);
|
||||
});
|
||||
}
|
||||
|
||||
toProtocolNavigationId(loadIdentifier) {
|
||||
return `nav-${loadIdentifier}`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,13 +366,6 @@ class NetworkRequest {
|
|||
return;
|
||||
}
|
||||
|
||||
const browserContext = pageNetwork._target.browserContext();
|
||||
if (browserContext.crossProcessCookie.settings.onlineOverride === 'offline') {
|
||||
// Implement offline.
|
||||
this.abort(Cr.NS_ERROR_OFFLINE);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ok, so now we have intercepted the request, let's issue onRequest.
|
||||
// If interception has been disabled while we were intercepting, resume and forget.
|
||||
const interceptionEnabled = this._shouldIntercept();
|
||||
|
|
@ -462,8 +455,6 @@ class NetworkRequest {
|
|||
const browserContext = pageNetwork._target.browserContext();
|
||||
if (browserContext.requestInterceptionEnabled)
|
||||
return true;
|
||||
if (browserContext.crossProcessCookie.settings.onlineOverride === 'offline')
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -458,6 +458,11 @@ class PageTarget {
|
|||
this.updateColorSchemeOverride(browsingContext);
|
||||
this.updateReducedMotionOverride(browsingContext);
|
||||
this.updateForcedColorsOverride(browsingContext);
|
||||
this.updateForceOffline(browsingContext);
|
||||
}
|
||||
|
||||
updateForceOffline(browsingContext = undefined) {
|
||||
(browsingContext || this._linkedBrowser.browsingContext).forceOffline = this._browserContext.forceOffline;
|
||||
}
|
||||
|
||||
updateTouchOverride(browsingContext = undefined) {
|
||||
|
|
@ -829,6 +834,7 @@ class BrowserContext {
|
|||
this.defaultUserAgent = null;
|
||||
this.defaultPlatform = null;
|
||||
this.touchOverride = false;
|
||||
this.forceOffline = false;
|
||||
this.colorScheme = 'none';
|
||||
this.forcedColors = 'no-override';
|
||||
this.reducedMotion = 'none';
|
||||
|
|
@ -924,6 +930,12 @@ class BrowserContext {
|
|||
page.updateTouchOverride();
|
||||
}
|
||||
|
||||
setForceOffline(forceOffline) {
|
||||
this.forceOffline = forceOffline;
|
||||
for (const page of this.pages)
|
||||
page.updateForceOffline();
|
||||
}
|
||||
|
||||
async setDefaultViewport(viewport) {
|
||||
this.defaultViewportSize = viewport ? viewport.viewportSize : undefined;
|
||||
this.deviceScaleFactor = viewport ? viewport.deviceScaleFactor : undefined;
|
||||
|
|
|
|||
|
|
@ -461,16 +461,8 @@ class PageAgent {
|
|||
}
|
||||
|
||||
async _dispatchKeyEvent({type, keyCode, code, key, repeat, location, text}) {
|
||||
if (code === 'OSLeft')
|
||||
code = 'MetaLeft';
|
||||
else if (code === 'OSRight')
|
||||
code = 'MetaRight';
|
||||
const frame = this._frameTree.mainFrame();
|
||||
const tip = frame.textInputProcessor();
|
||||
if (key === 'Meta' && Services.appinfo.OS !== 'Darwin')
|
||||
key = 'OS';
|
||||
else if (key === 'OS' && Services.appinfo.OS === 'Darwin')
|
||||
key = 'Meta';
|
||||
let keyEvent = new (frame.domWindow().KeyboardEvent)("", {
|
||||
key,
|
||||
code,
|
||||
|
|
|
|||
|
|
@ -47,15 +47,6 @@ function initialize(browsingContext, docShell, actor) {
|
|||
}
|
||||
},
|
||||
|
||||
onlineOverride: (onlineOverride) => {
|
||||
if (!onlineOverride) {
|
||||
docShell.onlineOverride = Ci.nsIDocShell.ONLINE_OVERRIDE_NONE;
|
||||
return;
|
||||
}
|
||||
docShell.onlineOverride = onlineOverride === 'online' ?
|
||||
Ci.nsIDocShell.ONLINE_OVERRIDE_ONLINE : Ci.nsIDocShell.ONLINE_OVERRIDE_OFFLINE;
|
||||
},
|
||||
|
||||
bypassCSP: (bypassCSP) => {
|
||||
docShell.bypassCSPEnabled = bypassCSP;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -199,7 +199,8 @@ class BrowserHandler {
|
|||
}
|
||||
|
||||
async ['Browser.setOnlineOverride']({browserContextId, override}) {
|
||||
await this._targetRegistry.browserContextForId(browserContextId).applySetting('onlineOverride', nullToUndefined(override));
|
||||
const forceOffline = override === 'offline';
|
||||
await this._targetRegistry.browserContextForId(browserContextId).setForceOffline(forceOffline);
|
||||
}
|
||||
|
||||
async ['Browser.setColorScheme']({browserContextId, colorScheme}) {
|
||||
|
|
|
|||
|
|
@ -488,6 +488,9 @@ class PageHandler {
|
|||
this._pageTarget._linkedBrowser.scrollRectIntoViewIfNeeded(x, y, 0, 0);
|
||||
// 2. Get element's bounding box in the browser after the scroll is completed.
|
||||
const boundingBox = this._pageTarget._linkedBrowser.getBoundingClientRect();
|
||||
// 3. Make sure compositor is flushed after scrolling.
|
||||
if (win.windowUtils.flushApzRepaints())
|
||||
await helper.awaitTopic('apz-repaints-flushed');
|
||||
|
||||
const watcher = new EventWatcher(this._pageEventSink, types, this._pendingEventWatchers);
|
||||
const promises = [];
|
||||
|
|
@ -608,7 +611,7 @@ class PageHandler {
|
|||
const lineOrPageDeltaX = deltaX > 0 ? Math.floor(deltaX) : Math.ceil(deltaX);
|
||||
const lineOrPageDeltaY = deltaY > 0 ? Math.floor(deltaY) : Math.ceil(deltaY);
|
||||
|
||||
await this._pageTarget.activateAndRun(() => {
|
||||
await this._pageTarget.activateAndRun(async () => {
|
||||
this._pageTarget.ensureContextMenuClosed();
|
||||
|
||||
// 1. Scroll element to the desired location first; the coordinates are relative to the element.
|
||||
|
|
@ -617,6 +620,10 @@ class PageHandler {
|
|||
const boundingBox = this._pageTarget._linkedBrowser.getBoundingClientRect();
|
||||
|
||||
const win = this._pageTarget._window;
|
||||
// 3. Make sure compositor is flushed after scrolling.
|
||||
if (win.windowUtils.flushApzRepaints())
|
||||
await helper.awaitTopic('apz-repaints-flushed');
|
||||
|
||||
win.windowUtils.sendWheelEvent(
|
||||
x + boundingBox.left,
|
||||
y + boundingBox.top,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,6 +6,8 @@
|
|||
pref("dom.input_events.security.minNumTicks", 0);
|
||||
pref("dom.input_events.security.minTimeElapsedInMS", 0);
|
||||
|
||||
pref("dom.iframe_lazy_loading.enabled", false);
|
||||
|
||||
pref("datareporting.policy.dataSubmissionEnabled", false);
|
||||
pref("datareporting.policy.dataSubmissionPolicyAccepted", false);
|
||||
pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
|
||||
|
|
@ -97,9 +99,6 @@ pref("security.enterprise_roots.enabled", true);
|
|||
// 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);
|
||||
|
||||
// Use light theme by default.
|
||||
pref("ui.systemUsesDarkTheme", 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
REMOTE_URL="https://github.com/WebKit/WebKit.git"
|
||||
BASE_BRANCH="main"
|
||||
BASE_REVISION="bc0bc692bc9e368bbd9d530322db73b374cd6268"
|
||||
BASE_REVISION="3db3a794a844d2c7e4cda8fc6a7588f8e62ee85a"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue