diff --git a/src/toolkit/components/prompts/content/commonDialog-css.patch b/src/toolkit/components/prompts/content/commonDialog-css.patch index bee1149cb..abd4043d7 100644 --- a/src/toolkit/components/prompts/content/commonDialog-css.patch +++ b/src/toolkit/components/prompts/content/commonDialog-css.patch @@ -1,5 +1,5 @@ diff --git a/toolkit/components/prompts/content/commonDialog.css b/toolkit/components/prompts/content/commonDialog.css -index d811fb62d502cf6fc0bf8163f11e1d264dee9e82..9fd96c560342b3417299ee3c6afda30ddcec76c0 100644 +index d811fb62d502cf6fc0bf8163f11e1d264dee9e82..79e44af5d6d37bdb756bc1737d279e8769abb50e 100644 --- a/toolkit/components/prompts/content/commonDialog.css +++ b/toolkit/components/prompts/content/commonDialog.css @@ -3,7 +3,8 @@ @@ -12,7 +12,15 @@ index d811fb62d502cf6fc0bf8163f11e1d264dee9e82..9fd96c560342b3417299ee3c6afda30d } dialog[insecureauth] { -@@ -91,11 +92,12 @@ dialog[insecureauth] { +@@ -49,7 +50,6 @@ dialog[insecureauth] { + .sizeDetermined #infoRow, + .sizeDetermined #infoContainer { + /* Allow stuff to shrink */ +- min-height: 0; + } + + .sizeDetermined #infoRow { +@@ -91,11 +91,12 @@ dialog[insecureauth] { --grid-padding: 16px; /* All the inner items should have 4px inline margin, leading to 1.16em spacing * between the dialog and its contents, and 8px horizontal spacing between items. */ diff --git a/src/zen/common/styles/zen-omnibox.css b/src/zen/common/styles/zen-omnibox.css index 9eede5da4..529293857 100644 --- a/src/zen/common/styles/zen-omnibox.css +++ b/src/zen/common/styles/zen-omnibox.css @@ -492,6 +492,7 @@ :root[zen-single-toolbar="true"] #urlbar[breakout-extend="true"] #identity-icon-box { --urlbar-box-hover-bgcolor: transparent; margin-inline: 2px 8px; + transition: none; } /* stylelint-disable-next-line media-query-no-invalid */ diff --git a/src/zen/sessionstore/ZenWindowSync.sys.mjs b/src/zen/sessionstore/ZenWindowSync.sys.mjs index 00b66f2ae..3a8eab4c6 100644 --- a/src/zen/sessionstore/ZenWindowSync.sys.mjs +++ b/src/zen/sessionstore/ZenWindowSync.sys.mjs @@ -1116,9 +1116,9 @@ class nsZenWindowSync { */ async #onTabSwitchOrWindowFocus(aWindow, aPreviousTab = null) { let activeBrowsers = aWindow.gBrowser.selectedBrowsers; - let activeTabs = activeBrowsers.map(browser => - aWindow.gBrowser.getTabForBrowser(browser) - ); + let activeTabs = activeBrowsers + .map(browser => aWindow.gBrowser.getTabForBrowser(browser)) + .filter(tab => tab); // Ignore previous tabs that are still "active". These scenarios could happen for example, // when selecting on a split view tab that was already active. if ( diff --git a/src/zen/spaces/ZenGradientGenerator.mjs b/src/zen/spaces/ZenGradientGenerator.mjs index 43464097e..5259f07c5 100644 --- a/src/zen/spaces/ZenGradientGenerator.mjs +++ b/src/zen/spaces/ZenGradientGenerator.mjs @@ -1470,11 +1470,12 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { * Get the primary color from a list of colors. * * @param {Array} accentColor The accent color as an array of RGB values. + * @param {boolean} isDarkMode Whether the current theme is in dark mode. * @returns {string} The primary color in hex format. */ - getAccentColorForUI(accentColor) { + getAccentColorForUI(accentColor, isDarkMode) { const [h, s, l] = this.rgbToHsl(...accentColor); - if (s < 0.1) { + if (isDarkMode) { return `rgb(${accentColor[0]}, ${accentColor[1]}, ${accentColor[2]})`; } const saturation = Math.min(1, s + 0.3); @@ -1735,9 +1736,6 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { docElement.removeAttribute("zen-default-theme"); } if (dominantColor) { - const primaryColor = this.getAccentColorForUI(dominantColor); - docElement.style.setProperty("--zen-primary-color", primaryColor); - // Should be set to `this.isLegacyVersion` but for some reason it is set to undefined if we open a private window, // so instead get the pref value directly. browser.gZenThemePicker.isLegacyVersion = @@ -1759,6 +1757,13 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { ); } } + + const primaryColor = this.getAccentColorForUI( + dominantColor, + isDarkMode + ); + docElement.style.setProperty("--zen-primary-color", primaryColor); + // Set `--toolbox-textcolor` to have a contrast with the primary color let textColor = this.getToolbarColor(isDarkMode, dominantColor); docElement.style.setProperty( @@ -1998,7 +2003,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { isDarkMode, isExplicitMode, toolbarColor: this.getToolbarColor(isDarkMode, dominantColor), - primaryColor: this.getAccentColorForUI(dominantColor), + primaryColor: this.getAccentColorForUI(dominantColor, isDarkMode), }; this.currentOpacity = previousOpacity; this.#currentLightness = previousLightness; diff --git a/src/zen/tabs/ZenPinnedTabManager.mjs b/src/zen/tabs/ZenPinnedTabManager.mjs index b764c250c..4c2446805 100644 --- a/src/zen/tabs/ZenPinnedTabManager.mjs +++ b/src/zen/tabs/ZenPinnedTabManager.mjs @@ -405,7 +405,17 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { } // Remove everything except the entry we want to keep - state.entries = [initialState.entry]; + state.entries = [ + { + ...initialState.entry, + triggeringPrincipal_base64: E10SUtils.serializePrincipal( + Services.scriptSecurityManager.createContentPrincipal( + Services.io.newURI(initialState.entry.url), + {} + ) + ), + }, + ]; state.image = tab.zenStaticIcon || initialState.image; state.index = 0;