Skip to content

Commit

Permalink
chore: update browser patches to 2e93a0b95 (#34426)
Browse files Browse the repository at this point in the history
  • Loading branch information
agg23 authored Jan 22, 2025
1 parent 256dc47 commit a121f85
Show file tree
Hide file tree
Showing 7 changed files with 1,518 additions and 2,214 deletions.
2 changes: 1 addition & 1 deletion browser_patches/firefox/UPSTREAM_CONFIG.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REMOTE_URL="https://github.com/mozilla/gecko-dev"
BASE_BRANCH="release"
BASE_REVISION="bc78b98043438d8ee2727a483b6e10dedfda883f"
BASE_REVISION="5cfa81898f6eef8fb1abe463e5253cea5bc17f3f"
11 changes: 6 additions & 5 deletions browser_patches/firefox/juggler/TargetRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ class PageTarget {
this._videoRecordingInfo = undefined;
this._screencastRecordingInfo = undefined;
this._dialogs = new Map();
this.forcedColors = 'no-override';
this.forcedColors = 'none';
this.disableCache = false;
this.mediumOverride = '';
this.crossProcessCookie = {
Expand Down Expand Up @@ -635,7 +635,8 @@ class PageTarget {
}

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

async setInterceptFileChooserDialog(enabled) {
Expand Down Expand Up @@ -858,8 +859,8 @@ function fromProtocolReducedMotion(reducedMotion) {
function fromProtocolForcedColors(forcedColors) {
if (forcedColors === 'active' || forcedColors === 'none')
return forcedColors;
if (forcedColors === null)
return undefined;
if (!forcedColors)
return 'none';
throw new Error('Unknown forced colors: ' + forcedColors);
}

Expand Down Expand Up @@ -893,7 +894,7 @@ class BrowserContext {
this.forceOffline = false;
this.disableCache = false;
this.colorScheme = 'none';
this.forcedColors = 'no-override';
this.forcedColors = 'none';
this.reducedMotion = 'none';
this.videoRecordingOptions = undefined;
this.crossProcessCookie = {
Expand Down
5 changes: 4 additions & 1 deletion browser_patches/firefox/juggler/components/Juggler.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ class Juggler {
};

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

let pipeStopped = false;
let browserHandler;
Expand Down
Loading

0 comments on commit a121f85

Please sign in to comment.