gh-13400: Fixed modal text being cutoff (gh-13410)

This commit is contained in:
mr. m
2026-04-26 00:00:44 +02:00
committed by GitHub
parent 0cfc25ccb0
commit cd956d34b1
5 changed files with 36 additions and 12 deletions

View File

@@ -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. */

View File

@@ -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 */

View File

@@ -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 (

View File

@@ -1470,11 +1470,12 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
* Get the primary color from a list of colors.
*
* @param {Array<number>} 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;

View File

@@ -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;