gh-15084: Fixed incoming tab icons applying to active tabs (gh-15107)

This commit is contained in:
mr. m
2026-08-25 22:31:50 +02:00
committed by GitHub
parent 03b4e934fe
commit 7a093beae4
2 changed files with 10 additions and 4 deletions

View File

@@ -576,9 +576,11 @@ class nsZenSpacesSyncApplier {
}
}
tab.zenStaticIcon = data.hasStaticIcon && icon ? icon : undefined;
// Compare normalized: setIcon rewraps svg data: icons into
// moz-remote-image urls when writing the attribute.
if (icon && syncableIconUrl(tab.getAttribute("image")) !== icon) {
if (
icon &&
(data.hasStaticIcon || !tab.linkedPanel) &&
syncableIconUrl(tab.getAttribute("image")) !== icon
) {
try {
win.gBrowser.setIcon(tab, icon);
lazy.TabStateCache.update(tab.linkedBrowser.permanentKey, {

View File

@@ -231,7 +231,11 @@ class nsZenSpacesSyncModel {
if (!url || url === "about:blank") {
return null;
}
const icon = syncableIconUrl(tabData.image || initial?.image || "");
const icon = syncableIconUrl(
(tabData.zenHasStaticIcon
? tabData.image
: initial?.image || tabData.image) || ""
);
return { url, title: title || "", icon };
}