mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-19 11:27:16 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
@@ -24,3 +24,5 @@ pref("browser.formfill.enable", false);
|
||||
pref("security.insecure_connection_text.enabled", true);
|
||||
pref("security.insecure_connection_text.pbmode.enabled", true);
|
||||
pref("network.IDN_show_punycode", true);
|
||||
|
||||
pref("browser.urlbar.suggest.topsites", true, locked);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
index 5633e5032f5d50c70512187d27e045b579978927..01df61b55b427212a61e6bc2de8c1df612055e1b 100644
|
||||
index 5633e5032f5d50c70512187d27e045b579978927..6b9e56cb62a4812925ff812763ea9b0e6a478202 100644
|
||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
@@ -2081,7 +2081,6 @@ var SessionStoreInternal = {
|
||||
@@ -68,7 +68,7 @@ index 5633e5032f5d50c70512187d27e045b579978927..01df61b55b427212a61e6bc2de8c1df6
|
||||
continue;
|
||||
}
|
||||
let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab));
|
||||
@@ -5442,10 +5443,13 @@ var SessionStoreInternal = {
|
||||
@@ -5442,7 +5443,7 @@ var SessionStoreInternal = {
|
||||
// We don't store the Firefox View tab in Session Store, so if it was the last selected "tab" when
|
||||
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
|
||||
// since it's only inserted into the tab strip after it's selected).
|
||||
@@ -77,13 +77,7 @@ index 5633e5032f5d50c70512187d27e045b579978927..01df61b55b427212a61e6bc2de8c1df6
|
||||
selectedIndex = 1;
|
||||
winData.title = tabbrowser.tabs[0].label;
|
||||
}
|
||||
+ if (!tabbrowser.selectedTab.pinned) {
|
||||
+ selectedIndex += 1;
|
||||
+ }
|
||||
winData.selected = selectedIndex;
|
||||
|
||||
this._updateWindowFeatures(aWindow);
|
||||
@@ -5599,6 +5603,7 @@ var SessionStoreInternal = {
|
||||
@@ -5599,6 +5600,7 @@ var SessionStoreInternal = {
|
||||
winData.tabs,
|
||||
winData.groups ?? []
|
||||
);
|
||||
@@ -91,7 +85,7 @@ index 5633e5032f5d50c70512187d27e045b579978927..01df61b55b427212a61e6bc2de8c1df6
|
||||
this._log.debug(
|
||||
`restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs`
|
||||
);
|
||||
@@ -6148,8 +6153,23 @@ var SessionStoreInternal = {
|
||||
@@ -6148,8 +6150,23 @@ var SessionStoreInternal = {
|
||||
|
||||
// Most of tabData has been restored, now continue with restoring
|
||||
// attributes that may trigger external events.
|
||||
|
||||
@@ -2,7 +2,7 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/compo
|
||||
index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee005392282 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -415,11 +415,58 @@
|
||||
@@ -415,11 +415,45 @@
|
||||
return this.tabContainer.visibleTabs;
|
||||
}
|
||||
|
||||
@@ -37,19 +37,6 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
+ }
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
+ get _numZenVisibleEssentials() {
|
||||
+ let i = 0;
|
||||
+ for (let tab of this.tabs) {
|
||||
+ if (!tab.hasAttribute("zen-essential") && !tab.hasAttribute("zen-glance-tab")) {
|
||||
+ break;
|
||||
+ }
|
||||
+ if (!tab.hidden) {
|
||||
+ i += !tab.hasAttribute("zen-glance-tab");
|
||||
+ }
|
||||
+ }
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
get pinnedTabCount() {
|
||||
- for (var i = 0; i < this.tabs.length; i++) {
|
||||
@@ -63,7 +50,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
}
|
||||
return i;
|
||||
}
|
||||
@@ -571,6 +618,7 @@
|
||||
@@ -571,6 +605,7 @@
|
||||
this.tabpanels.appendChild(panel);
|
||||
|
||||
let tab = this.tabs[0];
|
||||
@@ -71,7 +58,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
tab.linkedPanel = uniqueId;
|
||||
this._selectedTab = tab;
|
||||
this._selectedBrowser = browser;
|
||||
@@ -836,11 +884,13 @@
|
||||
@@ -836,11 +871,13 @@
|
||||
}
|
||||
|
||||
this.showTab(aTab);
|
||||
@@ -88,7 +75,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
this.moveTabTo(aTab, {
|
||||
tabIndex: this.pinnedTabCount,
|
||||
forceUngrouped: true,
|
||||
@@ -857,12 +907,15 @@
|
||||
@@ -857,12 +894,15 @@
|
||||
}
|
||||
|
||||
if (this.tabContainer.verticalMode) {
|
||||
@@ -105,7 +92,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
});
|
||||
} else {
|
||||
this.moveTabTo(aTab, {
|
||||
@@ -1046,6 +1099,8 @@
|
||||
@@ -1046,6 +1086,8 @@
|
||||
|
||||
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
|
||||
|
||||
@@ -114,7 +101,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (
|
||||
aIconURL &&
|
||||
!aLoadingPrincipal &&
|
||||
@@ -1056,6 +1111,9 @@
|
||||
@@ -1056,6 +1098,9 @@
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -124,7 +111,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
|
||||
let browser = this.getBrowserForTab(aTab);
|
||||
browser.mIconURL = aIconURL;
|
||||
@@ -1305,6 +1363,7 @@
|
||||
@@ -1305,6 +1350,7 @@
|
||||
if (!this._previewMode) {
|
||||
newTab.recordTimeFromUnloadToReload();
|
||||
newTab.updateLastAccessed();
|
||||
@@ -132,7 +119,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
oldTab.updateLastAccessed();
|
||||
// if this is the foreground window, update the last-seen timestamps.
|
||||
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
|
||||
@@ -1457,6 +1516,9 @@
|
||||
@@ -1457,6 +1503,9 @@
|
||||
}
|
||||
|
||||
let activeEl = document.activeElement;
|
||||
@@ -142,7 +129,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
// If focus is on the old tab, move it to the new tab.
|
||||
if (activeEl == oldTab) {
|
||||
newTab.focus();
|
||||
@@ -1780,7 +1842,8 @@
|
||||
@@ -1780,7 +1829,8 @@
|
||||
}
|
||||
|
||||
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
|
||||
@@ -152,7 +139,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1888,7 +1951,7 @@
|
||||
@@ -1888,7 +1938,7 @@
|
||||
newIndex = this.selectedTab._tPos + 1;
|
||||
}
|
||||
|
||||
@@ -161,7 +148,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (this.isTabGroupLabel(targetTab)) {
|
||||
throw new Error(
|
||||
"Replacing a tab group label with a tab is not supported"
|
||||
@@ -2152,6 +2215,7 @@
|
||||
@@ -2152,6 +2202,7 @@
|
||||
uriIsAboutBlank,
|
||||
userContextId,
|
||||
skipLoad,
|
||||
@@ -169,7 +156,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
} = {}) {
|
||||
let b = document.createXULElement("browser");
|
||||
// Use the JSM global to create the permanentKey, so that if the
|
||||
@@ -2225,8 +2289,7 @@
|
||||
@@ -2225,8 +2276,7 @@
|
||||
// we use a different attribute name for this?
|
||||
b.setAttribute("name", name);
|
||||
}
|
||||
@@ -179,7 +166,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
b.setAttribute("transparent", "true");
|
||||
}
|
||||
|
||||
@@ -2391,7 +2454,7 @@
|
||||
@@ -2391,7 +2441,7 @@
|
||||
|
||||
let panel = this.getPanel(browser);
|
||||
let uniqueId = this._generateUniquePanelID();
|
||||
@@ -188,7 +175,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
aTab.linkedPanel = uniqueId;
|
||||
|
||||
// Inject the <browser> into the DOM if necessary.
|
||||
@@ -2450,8 +2513,8 @@
|
||||
@@ -2450,8 +2500,8 @@
|
||||
// If we transitioned from one browser to two browsers, we need to set
|
||||
// hasSiblings=false on both the existing browser and the new browser.
|
||||
if (this.tabs.length == 2) {
|
||||
@@ -199,7 +186,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
} else {
|
||||
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
||||
}
|
||||
@@ -2679,6 +2742,7 @@
|
||||
@@ -2679,6 +2729,7 @@
|
||||
schemelessInput,
|
||||
hasValidUserGestureActivation = false,
|
||||
textDirectiveUserActivation = false,
|
||||
@@ -207,7 +194,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
} = {}
|
||||
) {
|
||||
// all callers of addTab that pass a params object need to pass
|
||||
@@ -2689,6 +2753,12 @@
|
||||
@@ -2689,6 +2740,12 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -220,7 +207,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (!UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.start("browser.tabs.opening", "initting", window);
|
||||
}
|
||||
@@ -2752,6 +2822,16 @@
|
||||
@@ -2752,6 +2809,16 @@
|
||||
noInitialLabel,
|
||||
skipBackgroundNotify,
|
||||
});
|
||||
@@ -237,7 +224,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (insertTab) {
|
||||
if (typeof index == "number") {
|
||||
elementIndex = this.#tabIndexToElementIndex(index);
|
||||
@@ -2779,6 +2859,7 @@
|
||||
@@ -2779,6 +2846,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
triggeringRemoteType,
|
||||
@@ -245,7 +232,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
}));
|
||||
|
||||
if (focusUrlBar) {
|
||||
@@ -2898,6 +2979,9 @@
|
||||
@@ -2898,6 +2966,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,7 +242,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this._notifyPinnedStatus(t);
|
||||
@@ -2945,12 +3029,15 @@
|
||||
@@ -2945,12 +3016,15 @@
|
||||
* @param {string} [label=]
|
||||
* @returns {MozTabbrowserTabGroup}
|
||||
*/
|
||||
@@ -272,7 +259,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
return group;
|
||||
}
|
||||
|
||||
@@ -2993,6 +3080,7 @@
|
||||
@@ -2993,6 +3067,7 @@
|
||||
insertBefore = null,
|
||||
isUserTriggered = false,
|
||||
telemetryUserCreateSource = "unknown",
|
||||
@@ -280,7 +267,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
} = {}
|
||||
) {
|
||||
if (!tabs?.length) {
|
||||
@@ -3011,7 +3099,12 @@
|
||||
@@ -3011,7 +3086,12 @@
|
||||
id = `${Date.now()}-${Math.round(Math.random() * 100)}`;
|
||||
}
|
||||
let group = this._createTabGroup(id, color, false, label);
|
||||
@@ -294,7 +281,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
group,
|
||||
insertBefore?.group ?? insertBefore
|
||||
);
|
||||
@@ -3342,6 +3435,7 @@
|
||||
@@ -3342,6 +3422,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
triggeringRemoteType,
|
||||
@@ -302,7 +289,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
}
|
||||
) {
|
||||
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
|
||||
@@ -3411,6 +3505,7 @@
|
||||
@@ -3411,6 +3492,7 @@
|
||||
openWindowInfo,
|
||||
name,
|
||||
skipLoad,
|
||||
@@ -310,7 +297,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3599,7 +3694,7 @@
|
||||
@@ -3599,7 +3681,7 @@
|
||||
// Add a new tab if needed.
|
||||
if (!tab) {
|
||||
let createLazyBrowser =
|
||||
@@ -319,7 +306,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
|
||||
let url = "about:blank";
|
||||
if (tabData.entries?.length) {
|
||||
@@ -3638,6 +3733,27 @@
|
||||
@@ -3638,6 +3720,27 @@
|
||||
preferredRemoteType,
|
||||
});
|
||||
|
||||
@@ -347,7 +334,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -3661,7 +3777,8 @@
|
||||
@@ -3661,7 +3764,8 @@
|
||||
// needs calling:
|
||||
shouldUpdateForPinnedTabs = true;
|
||||
}
|
||||
@@ -357,7 +344,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
let { groupId } = tabData;
|
||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||
// if a tab refers to a tab group we don't know, skip any group
|
||||
@@ -3675,7 +3792,10 @@
|
||||
@@ -3675,7 +3779,10 @@
|
||||
tabGroup.stateData.id,
|
||||
tabGroup.stateData.color,
|
||||
tabGroup.stateData.collapsed,
|
||||
@@ -369,7 +356,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
);
|
||||
tabsFragment.appendChild(tabGroup.node);
|
||||
}
|
||||
@@ -3723,8 +3843,21 @@
|
||||
@@ -3723,8 +3830,21 @@
|
||||
// to remove the old selected tab.
|
||||
if (tabToSelect) {
|
||||
let leftoverTab = this.selectedTab;
|
||||
@@ -391,7 +378,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
}
|
||||
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
@@ -3912,7 +4045,7 @@
|
||||
@@ -3912,7 +4032,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.
|
||||
@@ -432,7 +419,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
|
||||
// Place at the front of, or between tabs in, the same tab group
|
||||
this.tabContainer.insertBefore(tab, itemAfter);
|
||||
@@ -4290,6 +4423,9 @@
|
||||
@@ -4290,6 +4410,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -442,7 +429,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
this.removeTabs(selectedTabs, { telemetrySource });
|
||||
}
|
||||
|
||||
@@ -4542,6 +4678,7 @@
|
||||
@@ -4542,6 +4665,7 @@
|
||||
telemetrySource,
|
||||
} = {}
|
||||
) {
|
||||
@@ -450,7 +437,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||
// can be considered equivalent to closing the window.
|
||||
if (
|
||||
@@ -4626,6 +4763,7 @@
|
||||
@@ -4626,6 +4750,7 @@
|
||||
if (lastToClose) {
|
||||
this.removeTab(lastToClose, aParams);
|
||||
}
|
||||
@@ -458,7 +445,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
@@ -4650,6 +4788,7 @@
|
||||
@@ -4650,6 +4775,7 @@
|
||||
telemetrySource,
|
||||
} = {}
|
||||
) {
|
||||
@@ -466,7 +453,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.finish("browser.tabs.opening", window);
|
||||
}
|
||||
@@ -4663,6 +4802,12 @@
|
||||
@@ -4663,6 +4789,12 @@
|
||||
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
|
||||
}
|
||||
|
||||
@@ -479,7 +466,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
// Handle requests for synchronously removing an already
|
||||
// asynchronously closing tab.
|
||||
if (!animate && aTab.closing) {
|
||||
@@ -4677,7 +4822,9 @@
|
||||
@@ -4677,7 +4809,9 @@
|
||||
// frame created for it (for example, by updating the visually selected
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
@@ -490,7 +477,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -4840,7 +4987,7 @@
|
||||
@@ -4840,7 +4974,7 @@
|
||||
closeWindowWithLastTab != null
|
||||
? closeWindowWithLastTab
|
||||
: !window.toolbar.visible ||
|
||||
@@ -499,7 +486,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -4864,6 +5011,7 @@
|
||||
@@ -4864,6 +4998,7 @@
|
||||
|
||||
newTab = true;
|
||||
}
|
||||
@@ -507,7 +494,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||
|
||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||
@@ -4903,9 +5051,7 @@
|
||||
@@ -4903,9 +5038,7 @@
|
||||
aTab._mouseleave();
|
||||
|
||||
if (newTab) {
|
||||
@@ -518,7 +505,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
} else {
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -5034,6 +5180,8 @@
|
||||
@@ -5034,6 +5167,8 @@
|
||||
this.tabs[i]._tPos = i;
|
||||
}
|
||||
|
||||
@@ -527,7 +514,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (!this._windowIsClosing) {
|
||||
if (wasPinned) {
|
||||
this.tabContainer._positionPinnedTabs();
|
||||
@@ -5159,8 +5307,8 @@
|
||||
@@ -5159,8 +5294,8 @@
|
||||
return closedCount;
|
||||
}
|
||||
|
||||
@@ -538,7 +525,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (unloadBlocked) {
|
||||
return;
|
||||
}
|
||||
@@ -5248,6 +5396,7 @@
|
||||
@@ -5248,6 +5383,7 @@
|
||||
}
|
||||
|
||||
let excludeTabs = new Set(aExcludeTabs);
|
||||
@@ -546,7 +533,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
|
||||
// If this tab has a successor, it should be selectable, since
|
||||
// hiding or closing a tab removes that tab as a successor.
|
||||
@@ -5260,13 +5409,13 @@
|
||||
@@ -5260,13 +5396,13 @@
|
||||
!excludeTabs.has(aTab.owner) &&
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||
) {
|
||||
@@ -562,7 +549,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
);
|
||||
|
||||
let tab = this.tabContainer.findNextTab(aTab, {
|
||||
@@ -5282,7 +5431,7 @@
|
||||
@@ -5282,7 +5418,7 @@
|
||||
}
|
||||
|
||||
if (tab) {
|
||||
@@ -571,7 +558,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
}
|
||||
|
||||
// If no qualifying visible tab was found, see if there is a tab in
|
||||
@@ -5303,7 +5452,7 @@
|
||||
@@ -5303,7 +5439,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -580,7 +567,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
}
|
||||
|
||||
_blurTab(aTab) {
|
||||
@@ -5704,10 +5853,10 @@
|
||||
@@ -5704,10 +5840,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -593,7 +580,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -6001,7 +6150,7 @@
|
||||
@@ -6001,7 +6137,7 @@
|
||||
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (this.isTab(element) && element.pinned) {
|
||||
@@ -602,7 +589,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
} else {
|
||||
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -6028,9 +6177,16 @@
|
||||
@@ -6028,9 +6164,16 @@
|
||||
element,
|
||||
() => {
|
||||
let neighbor = this.tabs[tabIndex];
|
||||
@@ -620,7 +607,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
||||
neighbor.after(element);
|
||||
} else {
|
||||
@@ -6099,7 +6255,9 @@
|
||||
@@ -6099,7 +6242,9 @@
|
||||
targetElement = targetElement.group;
|
||||
}
|
||||
}
|
||||
@@ -631,7 +618,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (element.pinned && !targetElement?.pinned) {
|
||||
targetElement = this.tabs[this.pinnedTabCount - 1];
|
||||
@@ -6109,7 +6267,13 @@
|
||||
@@ -6109,7 +6254,13 @@
|
||||
moveBefore = true;
|
||||
}
|
||||
|
||||
@@ -645,7 +632,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
if (element.pinned && this.tabContainer.verticalMode) {
|
||||
return this.tabContainer.verticalPinnedTabsContainer;
|
||||
}
|
||||
@@ -6169,7 +6333,7 @@
|
||||
@@ -6169,7 +6320,7 @@
|
||||
if (!this.isTab(aTab)) {
|
||||
throw new Error("Can only move a tab into a tab group");
|
||||
}
|
||||
@@ -654,7 +641,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
return;
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
@@ -6263,6 +6427,10 @@
|
||||
@@ -6263,6 +6414,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
@@ -665,7 +652,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -7080,7 +7248,7 @@
|
||||
@@ -7080,7 +7235,7 @@
|
||||
// preventDefault(). It will still raise the window if appropriate.
|
||||
break;
|
||||
}
|
||||
@@ -674,7 +661,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
@@ -7981,6 +8149,7 @@
|
||||
@@ -7981,6 +8136,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -682,7 +669,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -8954,7 +9123,7 @@ var TabContextMenu = {
|
||||
@@ -8954,7 +9110,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !this.multiselected;
|
||||
@@ -691,7 +678,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..f61af937b348cc0afc29c1c6c4324ee0
|
||||
// Move Tab items
|
||||
let contextMoveTabOptions = document.getElementById(
|
||||
"context_moveTabOptions"
|
||||
@@ -9223,6 +9392,7 @@ var TabContextMenu = {
|
||||
@@ -9223,6 +9379,7 @@ var TabContextMenu = {
|
||||
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP,
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..2885d896c4026278dfcb309f12230d6f86275ada 100644
|
||||
index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..1a3aa415d08379b00960de398808e771c299f2ca 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -83,7 +83,7 @@
|
||||
@@ -33,7 +33,7 @@ index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..2885d896c4026278dfcb309f12230d6f
|
||||
// In expanded vertical mode, the max number of pinned tabs per row is dynamic
|
||||
// Set this before adjusting dragged tab's position
|
||||
- let pinnedTabs = this.visibleTabs.slice(0, gBrowser.pinnedTabCount);
|
||||
+ let pinnedTabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(0, gBrowser._numZenVisibleEssentials);
|
||||
+ let pinnedTabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(0, gBrowser._numZenEssentials);
|
||||
let tabsPerRow = 0;
|
||||
let position = 0;
|
||||
for (let pinnedTab of pinnedTabs) {
|
||||
@@ -87,8 +87,8 @@ index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..2885d896c4026278dfcb309f12230d6f
|
||||
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
|
||||
+ let essential = draggedTab.hasAttribute("zen-essential");
|
||||
+ let tabs = this.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
|
||||
+ isPinned ? (essential ? 0 : gBrowser._numZenVisibleEssentials) : numPinned,
|
||||
+ isPinned ? (essential ? gBrowser._numZenVisibleEssentials : numPinned) : undefined
|
||||
+ isPinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned,
|
||||
+ isPinned ? (essential ? gBrowser._numZenEssentials : numPinned) : undefined
|
||||
);
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let screenAxis = this.verticalMode ? "screenY" : "screenX";
|
||||
@@ -349,7 +349,7 @@ index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..2885d896c4026278dfcb309f12230d6f
|
||||
}
|
||||
|
||||
- let tabs = this.visibleTabs.slice(0, gBrowser.pinnedTabCount);
|
||||
+ let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(0, gBrowser._numZenVisibleEssentials);
|
||||
+ let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(0, gBrowser._numZenEssentials);
|
||||
|
||||
let directionX = screenX > dragData.animLastScreenX;
|
||||
let directionY = screenY > dragData.animLastScreenY;
|
||||
@@ -375,8 +375,8 @@ index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..2885d896c4026278dfcb309f12230d6f
|
||||
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
|
||||
+ let essential = draggedTab.hasAttribute("zen-essential");
|
||||
+ let tabs = this.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
|
||||
+ isPinned ? (essential ? 0 : gBrowser._numZenVisibleEssentials) : numPinned,
|
||||
+ isPinned ? (essential ? gBrowser._numZenVisibleEssentials : numPinned) : undefined
|
||||
+ isPinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned,
|
||||
+ isPinned ? (essential ? gBrowser._numZenEssentials : numPinned) : undefined
|
||||
);
|
||||
+ if (draggedTab.group?.hasAttribute("split-view-group")) {
|
||||
+ draggedTab = draggedTab.group.labelElement;
|
||||
|
||||
@@ -529,7 +529,7 @@ button.popup-notification-dropmarker {
|
||||
}
|
||||
|
||||
.urlbarView-userContext {
|
||||
padding-top: 0px !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.urlbarView-row[has-action]:is([type='switchtab'], [type='remotetab'], [type='clipboard']) {
|
||||
|
||||
@@ -756,7 +756,8 @@
|
||||
const isVisible = contextTab.pinned && !contextTab.multiselected;
|
||||
document.getElementById('context_zen-reset-pinned-tab').hidden = !isVisible || !contextTab.getAttribute('zen-pin-id');
|
||||
document.getElementById('context_zen-replace-pinned-url-with-current').hidden = !isVisible;
|
||||
document.getElementById('context_zen-add-essential').hidden = contextTab.getAttribute('zen-essential');
|
||||
document.getElementById('context_zen-add-essential').hidden =
|
||||
contextTab.getAttribute('zen-essential') || !!contextTab.group;
|
||||
document.getElementById('context_zen-remove-essential').hidden = !contextTab.getAttribute('zen-essential');
|
||||
document.getElementById('context_unpinTab').hidden =
|
||||
document.getElementById('context_unpinTab').hidden || contextTab.getAttribute('zen-essential');
|
||||
|
||||
@@ -798,7 +798,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (this._initialTab._shouldRemove && this._initialTab._veryPossiblyEmpty) {
|
||||
gBrowser.removeTab(this._initialTab, {
|
||||
skipSessionStore: true,
|
||||
animate: false
|
||||
animate: false,
|
||||
});
|
||||
} else {
|
||||
this.moveTabToWorkspace(this._initialTab, this.activeWorkspace);
|
||||
@@ -816,7 +816,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
gBrowser.removeTab(this._tabToRemoveForEmpty, {
|
||||
skipSessionStore: true,
|
||||
animate: false
|
||||
animate: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user