From c06de3372d328437e203655a92c3fcee8898fc2c Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Wed, 15 Oct 2025 02:06:51 +0200 Subject: [PATCH] test: Fixed tests and other small QA fixes, b=no-bug, c=common, workspaces --- locales/en-US/browser/browser/zen-general.ftl | 4 ++- .../base/content/zen-locales.inc.xhtml | 2 ++ src/image/DecoderFactory-cpp.patch | 32 ------------------- .../common/styles/zen-single-components.css | 8 ++++- src/zen/workspaces/ZenGradientGenerator.mjs | 9 ++++-- src/zen/workspaces/ZenWorkspaces.mjs | 7 ++-- 6 files changed, 24 insertions(+), 38 deletions(-) delete mode 100644 src/image/DecoderFactory-cpp.patch diff --git a/locales/en-US/browser/browser/zen-general.ftl b/locales/en-US/browser/browser/zen-general.ftl index 636809b2f..d75efe43d 100644 --- a/locales/en-US/browser/browser/zen-general.ftl +++ b/locales/en-US/browser/browser/zen-general.ftl @@ -31,7 +31,7 @@ pictureinpicture-minimize-btn = zen-panel-ui-gradient-generator-custom-color = Custom Color zen-panel-ui-gradient-generator-saved-message = Successfully saved the gradient! -zen-copy-current-url-confirmation = Copied Current URL! +zen-copy-current-url-confirmation = Copied current URL! zen-general-cancel-label = .label = Cancel @@ -90,6 +90,8 @@ zen-site-data-get-addons = .label = Add Extensions zen-site-data-site-settings = .label = All Site Settings +zen-site-data-share = + .label = Share This Page zen-urlbar-copy-url-button = .tooltiptext = Copy URL diff --git a/src/browser/base/content/zen-locales.inc.xhtml b/src/browser/base/content/zen-locales.inc.xhtml index b9693795e..247fbbc51 100644 --- a/src/browser/base/content/zen-locales.inc.xhtml +++ b/src/browser/base/content/zen-locales.inc.xhtml @@ -2,8 +2,10 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + diff --git a/src/image/DecoderFactory-cpp.patch b/src/image/DecoderFactory-cpp.patch deleted file mode 100644 index 63e321437..000000000 --- a/src/image/DecoderFactory-cpp.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/image/DecoderFactory.cpp b/image/DecoderFactory.cpp -index 21c94898cbbce9bdc9dec87c7e3e05fec77fb7c1..83a8fcc3aca34c61ac7334eb4b4ef3f3ea21c7ab 100644 ---- a/image/DecoderFactory.cpp -+++ b/image/DecoderFactory.cpp -@@ -249,7 +249,12 @@ nsresult DecoderFactory::CreateAnimationDecoder( - } - - MOZ_ASSERT(aType == DecoderType::GIF || aType == DecoderType::PNG || -- aType == DecoderType::WEBP || aType == DecoderType::AVIF, -+ aType == DecoderType::WEBP || aType == DecoderType::AVIF -+#ifdef MOZ_JXL -+ || aType == DecoderType::JXL, -+#else -+ , -+#endif - "Calling CreateAnimationDecoder for non-animating DecoderType"); - - // Create an anonymous decoder. Interaction with the SurfaceCache and the -@@ -304,7 +309,12 @@ already_AddRefed DecoderFactory::CloneAnimationDecoder( - // rediscover it is animated). - DecoderType type = aDecoder->GetType(); - MOZ_ASSERT(type == DecoderType::GIF || type == DecoderType::PNG || -- type == DecoderType::WEBP || type == DecoderType::AVIF, -+ type == DecoderType::WEBP || type == DecoderType::AVIF -+#ifdef MOZ_JXL -+ || aType == DecoderType::JXL, -+#else -+ , -+#endif - "Calling CloneAnimationDecoder for non-animating DecoderType"); - - RefPtr decoder = GetDecoder(type, nullptr, /* aIsRedecode = */ true); diff --git a/src/zen/common/styles/zen-single-components.css b/src/zen/common/styles/zen-single-components.css index 8108d4aef..4d78eccc9 100644 --- a/src/zen/common/styles/zen-single-components.css +++ b/src/zen/common/styles/zen-single-components.css @@ -386,12 +386,17 @@ body > #confetti { align-items: center; } +.permission-popup-permission-label-container { + min-width: 1px; +} + .permission-popup-permission-label { margin: 0px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + max-width: 100%; } .permission-popup-permission-icon { @@ -446,7 +451,8 @@ body > #confetti { margin: 0; } -#identity-box { +#identity-box, +#page-action-buttons { opacity: 0.6; } diff --git a/src/zen/workspaces/ZenGradientGenerator.mjs b/src/zen/workspaces/ZenGradientGenerator.mjs index a28ad93a2..d897442c5 100644 --- a/src/zen/workspaces/ZenGradientGenerator.mjs +++ b/src/zen/workspaces/ZenGradientGenerator.mjs @@ -126,7 +126,12 @@ darkModeChange ); - XPCOMUtils.defineLazyPreferenceGetter(this, 'darkModeBias', 'zen.theme.dark-mode-bias', 0.5); + XPCOMUtils.defineLazyPreferenceGetter( + this, + 'darkModeBias', + 'zen.theme.dark-mode-bias', + '0.5' + ); } handleDarkModeChange() { @@ -1212,7 +1217,7 @@ let lightText = this.getToolbarColor(false); // e.g. [r, g, b, a] if (this.canBeTransparent) { - lightText[3] -= this.darkModeBias; // Reduce alpha for light text + lightText[3] -= parseFloat(this.darkModeBias); // Reduce alpha for light text } // Composite text color over background diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 074877269..53378d6a8 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -2473,7 +2473,10 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature { const shouldHideSeparator = pinnedContainer.children.length === 1 || Array.from(arrowScrollbox.children).filter( - (child) => !child.hasAttribute('hidden') && !child.hasAttribute('zen-empty-tab') + (child) => + !child.hasAttribute('hidden') && + !child.hasAttribute('bursting') && + !child.hasAttribute('zen-empty-tab') ).length <= 1; if (shouldHideSeparator) { pinnedContainer.setAttribute('hide-separator', 'true'); @@ -2498,7 +2501,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature { for (const entry of entries) { let originalWorkspaceId = entry.target.getAttribute('zen-workspace-id'); if (!originalWorkspaceId) { - originalWorkspaceId = entry.target.closest('zen-workspace')?.id; + originalWorkspaceId = entry.target.closest('zen-workspace')?.id || this.activeWorkspace; } const workspacesIds = []; if (entry.target.closest('#zen-essentials')) {