Skip to content

Commit a121f85

Browse files
authored
chore: update browser patches to 2e93a0b95 (#34426)
1 parent 256dc47 commit a121f85

File tree

7 files changed

+1518
-2214
lines changed

7 files changed

+1518
-2214
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
REMOTE_URL="https://github.com/mozilla/gecko-dev"
22
BASE_BRANCH="release"
3-
BASE_REVISION="bc78b98043438d8ee2727a483b6e10dedfda883f"
3+
BASE_REVISION="5cfa81898f6eef8fb1abe463e5253cea5bc17f3f"

browser_patches/firefox/juggler/TargetRegistry.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ class PageTarget {
393393
this._videoRecordingInfo = undefined;
394394
this._screencastRecordingInfo = undefined;
395395
this._dialogs = new Map();
396-
this.forcedColors = 'no-override';
396+
this.forcedColors = 'none';
397397
this.disableCache = false;
398398
this.mediumOverride = '';
399399
this.crossProcessCookie = {
@@ -635,7 +635,8 @@ class PageTarget {
635635
}
636636

637637
updateForcedColorsOverride(browsingContext = undefined) {
638-
(browsingContext || this._linkedBrowser.browsingContext).forcedColorsOverride = (this.forcedColors !== 'no-override' ? this.forcedColors : this._browserContext.forcedColors) || 'no-override';
638+
const isActive = this.forcedColors === 'active' || this._browserContext.forcedColors === 'active';
639+
(browsingContext || this._linkedBrowser.browsingContext).forcedColorsOverride = isActive ? 'active' : 'none';
639640
}
640641

641642
async setInterceptFileChooserDialog(enabled) {
@@ -858,8 +859,8 @@ function fromProtocolReducedMotion(reducedMotion) {
858859
function fromProtocolForcedColors(forcedColors) {
859860
if (forcedColors === 'active' || forcedColors === 'none')
860861
return forcedColors;
861-
if (forcedColors === null)
862-
return undefined;
862+
if (!forcedColors)
863+
return 'none';
863864
throw new Error('Unknown forced colors: ' + forcedColors);
864865
}
865866

@@ -893,7 +894,7 @@ class BrowserContext {
893894
this.forceOffline = false;
894895
this.disableCache = false;
895896
this.colorScheme = 'none';
896-
this.forcedColors = 'no-override';
897+
this.forcedColors = 'none';
897898
this.reducedMotion = 'none';
898899
this.videoRecordingOptions = undefined;
899900
this.crossProcessCookie = {

browser_patches/firefox/juggler/components/Juggler.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ class Juggler {
105105
};
106106

107107
// Force create hidden window here, otherwise its creation later closes the web socket!
108-
Services.appShell.hiddenDOMWindow;
108+
// Since https://phabricator.services.mozilla.com/D219834, hiddenDOMWindow is only available on MacOS.
109+
if (Services.appShell.hasHiddenWindow) {
110+
Services.appShell.hiddenDOMWindow;
111+
}
109112

110113
let pipeStopped = false;
111114
let browserHandler;

0 commit comments

Comments
 (0)