diff --git a/src/browser/base/content/zen-styles/zen-urlbar.css b/src/browser/base/content/zen-styles/zen-urlbar.css index b6799d5f2..a074fd993 100644 --- a/src/browser/base/content/zen-styles/zen-urlbar.css +++ b/src/browser/base/content/zen-styles/zen-urlbar.css @@ -392,7 +392,7 @@ button.popup-notification-dropmarker { the backdrop woudn't work, we would need to apply a clip-path to the site and that's not recommended due to performance issues */ background-color: light-dark(hsl(0, 0%, 100%), hsl(0, 0%, 14%)) !important; - outline: 1px solid rgba(0,0,0,.3) !important; + outline: 1px solid rgba(0, 0, 0, 0.3) !important; } } diff --git a/src/browser/base/zen-components/ZenGlanceManager.mjs b/src/browser/base/zen-components/ZenGlanceManager.mjs index fc4f13942..58f2046fd 100644 --- a/src/browser/base/zen-components/ZenGlanceManager.mjs +++ b/src/browser/base/zen-components/ZenGlanceManager.mjs @@ -67,7 +67,7 @@ } getTabPosition(tab) { - return Math.max(gBrowser.pinnedTabCount, tab._tPos); + return Math.max(gBrowser._numVisiblePinTabs, tab._tPos); } createBrowserElement(url, currentTab, existingTab = null) { @@ -574,6 +574,7 @@ DOMContentLoaded: {}, }, }, + matches: ["https://*/*"], }); } } diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index f991c91ea..5d2f2730d 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..39cb6ceda6154609daa8f3b84c4931de6604534f 100644 +index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..f7c02c14498b4ec5fcf5521480c88abac25a2283 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -406,11 +406,39 @@ @@ -44,7 +44,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..39cb6ceda6154609daa8f3b84c4931de } return i; } -@@ -807,7 +835,7 @@ +@@ -807,10 +835,10 @@ this.showTab(aTab); if (this.tabContainer.verticalMode) { this._handleTabMove(aTab, () => @@ -52,7 +52,20 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..39cb6ceda6154609daa8f3b84c4931de + aTab.hasAttribute("zen-essential") ? document.getElementById("zen-essentials-container").appendChild(aTab) : this.verticalPinnedTabsContainer.appendChild(aTab) ); } else { - this.moveTabTo(aTab, this.pinnedTabCount, { forceStandaloneTab: true }); +- this.moveTabTo(aTab, this.pinnedTabCount, { forceStandaloneTab: true }); ++ this.moveTabTo(aTab, this._numVisiblePinTabs, { forceStandaloneTab: true }); + } + aTab.setAttribute("pinned", "true"); + this._updateTabBarForPinnedTabs(); +@@ -831,7 +859,7 @@ + this.tabContainer.arrowScrollbox.prepend(aTab); + }); + } else { +- this.moveTabTo(aTab, this.pinnedTabCount - 1, { ++ this.moveTabTo(aTab, this._numVisiblePinTabs - 1, { + forceStandaloneTab: true, + }); + aTab.removeAttribute("pinned"); @@ -1055,6 +1083,8 @@ let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"]; @@ -197,16 +210,36 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..39cb6ceda6154609daa8f3b84c4931de if (select) { tabToSelect = tab; } +@@ -3464,8 +3546,8 @@ + // inserted in the DOM. If the tab is not yet in the DOM, + // just insert it in the right place from the start. + if (!tab.parentNode) { +- tab._tPos = this.pinnedTabCount; +- this.tabContainer.insertBefore(tab, this.tabs[this.pinnedTabCount]); ++ tab._tPos = this._numVisiblePinTabs; ++ this.tabContainer.insertBefore(tab, this.tabs[this._numVisiblePinTabs]); + tab.toggleAttribute("pinned", true); + this.tabContainer._invalidateCachedTabs(); + // Then ensure all the tab open/pinning information is sent. @@ -3729,7 +3811,7 @@ // Ensure we have an index if one was not provided. if (typeof index != "number") { // Move the new tab after another tab if needed, to the end otherwise. - index = Infinity; -+ index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this.pinnedTabCount : Infinity; ++ index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this._numVisiblePinTabs : Infinity; if ( !bulkOrderedOpen && ((openerTab && -@@ -3780,7 +3862,7 @@ +@@ -3773,14 +3855,14 @@ + // Ensure index is within bounds. + if (tab.pinned) { + index = Math.max(index, 0); +- index = Math.min(index, this.pinnedTabCount); ++ index = Math.min(index, this._numVisiblePinTabs); + } else { +- index = Math.max(index, this.pinnedTabCount); ++ index = Math.max(index, this._numVisiblePinTabs); + index = Math.min(index, this.tabs.length); } /** @type {MozTabbrowserTab|undefined} */ @@ -295,6 +328,18 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..39cb6ceda6154609daa8f3b84c4931de aTab.selected || aTab.closing || // Tabs that are sharing the screen, microphone or camera cannot be hidden. +@@ -5706,9 +5799,9 @@ + + // Don't allow mixing pinned and unpinned tabs. + if (aTab.pinned) { +- aIndex = Math.min(aIndex, this.pinnedTabCount - 1); ++ aIndex = Math.min(aIndex, this._numVisiblePinTabs - 1); + } else { +- aIndex = Math.max(aIndex, this.pinnedTabCount); ++ aIndex = Math.max(aIndex, this._numVisiblePinTabs); + } + if (aTab._tPos == aIndex) { + return; @@ -5727,6 +5820,9 @@ this.tabContainer.insertBefore(aTab, neighbor); } @@ -305,6 +350,15 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..39cb6ceda6154609daa8f3b84c4931de } moveTabToGroup(aTab, aGroup) { +@@ -5802,7 +5898,7 @@ + createLazyBrowser, + }; + +- let numPinned = this.pinnedTabCount; ++ let numPinned = this._numVisiblePinTabs; + if (aIndex < numPinned || (aTab.pinned && aIndex == numPinned)) { + params.pinned = true; + } @@ -7443,6 +7539,7 @@ aWebProgress.isTopLevel ) {