feat: Run a migration for pinned tabs renamed titles, b=no-bug, c=common

This commit is contained in:
mr. m
2026-01-13 13:31:52 +01:00
parent 902651a196
commit 2b4e46ce4e
5 changed files with 77 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..959e73ab86bdb78203e3aed0c939c1b9acbe4897 100644
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..27f85dc47d66f2f83820e964198832d82bff04c1 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -127,6 +127,9 @@ const TAB_EVENTS = [
@@ -235,7 +235,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..959e73ab86bdb78203e3aed0c939c1b9
+ if (tabData.zenIsEmpty) {
+ tab.setAttribute("zen-empty-tab", "true");
+ }
+ if (tabData.zenStaticLabel) {
+ if (typeof tabData.zenStaticLabel === "string") {
+ tab.zenStaticLabel = tabData.zenStaticLabel;
+ }
+ if (tabData.zenHasStaticIcon && tabData.image) {

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..64b6fc581be1791ef9a750e03ab9a91c92325be3 100644
index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..452879acc73898eb28cabae66d2d5692e301f853 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -398,6 +398,7 @@
@@ -191,7 +191,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..64b6fc581be1791ef9a750e03ab9a91c
+ if (!aTab._zenContentsVisible && !aTab._zenChangeLabelFlag && !aTab._labelIsInitialTitle && !gZenWorkspaces.privateWindowOrDisabled) {
+ return false;
+ }
+ aLabel = aTab.zenStaticLabel || aLabel;
+ aLabel = (typeof aTab.zenStaticLabel === "string" && aTab.zenStaticLabel) ? aTab.zenStaticLabel : aLabel;
+ gZenPinnedTabManager.onTabLabelChanged(aTab);
if (!aLabel || aLabel.includes("about:reader?")) {
return false;