|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
|
|
|
|
index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a70e59c10 100644
|
|
|
|
|
index 43fb79a3060e20f671ae6ffc26350c7abf497702..68a037d5a0e3416f31ffcb163592f008ede72076 100644
|
|
|
|
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
|
|
|
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
|
|
|
|
@@ -502,6 +502,7 @@
|
|
|
|
|
@@ -79,15 +79,17 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
set selectedTab(val) {
|
|
|
|
|
if (
|
|
|
|
|
gSharedTabWarning.willShowSharedTabWarning(val) ||
|
|
|
|
|
@@ -592,6 +644,7 @@
|
|
|
|
|
@@ -592,6 +644,9 @@
|
|
|
|
|
) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
+ gZenWorkspaces.onBeforeTabSelect(val);
|
|
|
|
|
+ if (gZenWorkspaces.onBeforeTabSelect(val)) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
// Update the tab
|
|
|
|
|
this.tabbox.selectedTab = val;
|
|
|
|
|
}
|
|
|
|
|
@@ -659,6 +712,10 @@
|
|
|
|
|
@@ -659,6 +714,10 @@
|
|
|
|
|
userContextId = parseInt(tabArgument.getAttribute("usercontextid"), 10);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -98,7 +100,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (tabArgument && tabArgument.linkedBrowser) {
|
|
|
|
|
remoteType = tabArgument.linkedBrowser.remoteType;
|
|
|
|
|
initialBrowsingContextGroupId =
|
|
|
|
|
@@ -751,6 +808,8 @@
|
|
|
|
|
@@ -751,6 +810,8 @@
|
|
|
|
|
this.tabpanels.appendChild(panel);
|
|
|
|
|
|
|
|
|
|
let tab = this.tabs[0];
|
|
|
|
|
@@ -107,7 +109,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
tab.linkedPanel = uniqueId;
|
|
|
|
|
this._selectedTab = tab;
|
|
|
|
|
this._selectedBrowser = browser;
|
|
|
|
|
@@ -1121,13 +1180,18 @@
|
|
|
|
|
@@ -1121,13 +1182,18 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.showTab(aTab);
|
|
|
|
|
@@ -127,7 +129,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
aTab.setAttribute("pinned", "true");
|
|
|
|
|
this._updateTabBarForPinnedTabs();
|
|
|
|
|
@@ -1140,11 +1204,19 @@
|
|
|
|
|
@@ -1140,11 +1206,19 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.#handleTabMove(aTab, () => {
|
|
|
|
|
@@ -148,7 +150,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
aTab.style.marginInlineStart = "";
|
|
|
|
|
@@ -1321,6 +1393,9 @@
|
|
|
|
|
@@ -1321,6 +1395,9 @@
|
|
|
|
|
|
|
|
|
|
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
|
|
|
|
|
|
|
|
|
|
@@ -158,7 +160,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (
|
|
|
|
|
aIconURL &&
|
|
|
|
|
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
|
|
|
|
|
@@ -1330,6 +1405,9 @@
|
|
|
|
|
@@ -1330,6 +1407,9 @@
|
|
|
|
|
);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
@@ -168,7 +170,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
let browser = this.getBrowserForTab(aTab);
|
|
|
|
|
browser.mIconURL = aIconURL;
|
|
|
|
|
@@ -1652,7 +1730,6 @@
|
|
|
|
|
@@ -1652,7 +1732,6 @@
|
|
|
|
|
|
|
|
|
|
// Preview mode should not reset the owner
|
|
|
|
|
if (!this._previewMode && !oldTab.selected) {
|
|
|
|
|
@@ -176,7 +178,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let lastRelatedTab = this._lastRelatedTabMap.get(oldTab);
|
|
|
|
|
@@ -1743,6 +1820,7 @@
|
|
|
|
|
@@ -1743,6 +1822,7 @@
|
|
|
|
|
if (!this._previewMode) {
|
|
|
|
|
newTab.recordTimeFromUnloadToReload();
|
|
|
|
|
newTab.updateLastAccessed();
|
|
|
|
|
@@ -184,7 +186,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
oldTab.updateLastAccessed();
|
|
|
|
|
// if this is the foreground window, update the last-seen timestamps.
|
|
|
|
|
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
|
|
|
|
|
@@ -1957,6 +2035,9 @@
|
|
|
|
|
@@ -1957,6 +2037,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let activeEl = document.activeElement;
|
|
|
|
|
@@ -194,7 +196,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
// If focus is on the old tab, move it to the new tab.
|
|
|
|
|
if (activeEl == oldTab) {
|
|
|
|
|
newTab.focus();
|
|
|
|
|
@@ -1995,7 +2076,7 @@
|
|
|
|
|
@@ -1995,7 +2078,7 @@
|
|
|
|
|
// Focus the location bar if it was previously focused for that tab.
|
|
|
|
|
// In full screen mode, only bother making the location bar visible
|
|
|
|
|
// if the tab is a blank one.
|
|
|
|
|
@@ -203,7 +205,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
let selectURL = () => {
|
|
|
|
|
if (this._asyncTabSwitching) {
|
|
|
|
|
// Set _awaitingSetURI flag to suppress popup notification
|
|
|
|
|
@@ -2283,7 +2364,12 @@
|
|
|
|
|
@@ -2283,7 +2366,12 @@
|
|
|
|
|
return this._setTabLabel(aTab, aLabel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -217,7 +219,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (!aLabel || (isURL && /^about:reader\?url=/.test(aLabel))) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@@ -2408,7 +2494,7 @@
|
|
|
|
|
@@ -2408,7 +2496,7 @@
|
|
|
|
|
newIndex = this.selectedTab._tPos + 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -226,7 +228,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (this.isTabGroupLabel(targetTab)) {
|
|
|
|
|
throw new Error(
|
|
|
|
|
"Replacing a tab group label with a tab is not supported"
|
|
|
|
|
@@ -2685,6 +2771,7 @@
|
|
|
|
|
@@ -2685,6 +2773,7 @@
|
|
|
|
|
uriIsAboutBlank,
|
|
|
|
|
userContextId,
|
|
|
|
|
skipLoad,
|
|
|
|
|
@@ -234,7 +236,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} = {}) {
|
|
|
|
|
let b = document.createXULElement("browser");
|
|
|
|
|
// Use the JSM global to create the permanentKey, so that if the
|
|
|
|
|
@@ -2758,8 +2845,7 @@
|
|
|
|
|
@@ -2758,8 +2847,7 @@
|
|
|
|
|
// we use a different attribute name for this?
|
|
|
|
|
b.setAttribute("name", name);
|
|
|
|
|
}
|
|
|
|
|
@@ -244,7 +246,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
b.setAttribute("transparent", "true");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2929,7 +3015,7 @@
|
|
|
|
|
@@ -2929,7 +3017,7 @@
|
|
|
|
|
|
|
|
|
|
let panel = this.getPanel(browser);
|
|
|
|
|
let uniqueId = this._generateUniquePanelID();
|
|
|
|
|
@@ -253,7 +255,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
aTab.linkedPanel = uniqueId;
|
|
|
|
|
|
|
|
|
|
// Inject the <browser> into the DOM if necessary.
|
|
|
|
|
@@ -2989,8 +3075,8 @@
|
|
|
|
|
@@ -2989,8 +3077,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) {
|
|
|
|
|
@@ -264,7 +266,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} else {
|
|
|
|
|
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
|
|
|
|
}
|
|
|
|
|
@@ -3175,7 +3261,6 @@
|
|
|
|
|
@@ -3175,7 +3263,6 @@
|
|
|
|
|
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
|
|
|
|
|
tabIndex: tab._tPos + 1,
|
|
|
|
|
userContextId: tab.userContextId,
|
|
|
|
|
@@ -272,7 +274,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
focusUrlBar: true,
|
|
|
|
|
});
|
|
|
|
|
resolve(this.selectedBrowser);
|
|
|
|
|
@@ -3285,6 +3370,10 @@
|
|
|
|
|
@@ -3285,6 +3372,10 @@
|
|
|
|
|
schemelessInput,
|
|
|
|
|
hasValidUserGestureActivation = false,
|
|
|
|
|
textDirectiveUserActivation = false,
|
|
|
|
|
@@ -283,7 +285,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} = {}
|
|
|
|
|
) {
|
|
|
|
|
// all callers of addTab that pass a params object need to pass
|
|
|
|
|
@@ -3295,10 +3384,25 @@
|
|
|
|
|
@@ -3295,10 +3386,25 @@
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -294,7 +296,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
+
|
|
|
|
|
+ let hasZenDefaultUserContextId = false;
|
|
|
|
|
+ let zenForcedWorkspaceId = undefined;
|
|
|
|
|
+ if (beforeRouteResult.userContextId) {
|
|
|
|
|
+ if (beforeRouteResult.isRouteFound) {
|
|
|
|
|
+ userContextId = beforeRouteResult.userContextId;
|
|
|
|
|
+ hasZenDefaultUserContextId = true;
|
|
|
|
|
+ } else if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
|
|
|
|
|
@@ -309,7 +311,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
// If we're opening a foreground tab, set the owner by default.
|
|
|
|
|
ownerTab ??= inBackground ? null : this.selectedTab;
|
|
|
|
|
|
|
|
|
|
@@ -3306,6 +3410,7 @@
|
|
|
|
|
@@ -3306,6 +3412,7 @@
|
|
|
|
|
if (this.selectedTab.owner) {
|
|
|
|
|
this.selectedTab.owner = null;
|
|
|
|
|
}
|
|
|
|
|
@@ -317,7 +319,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
// Find the tab that opened this one, if any. This is used for
|
|
|
|
|
// determining positioning, and inherited attributes such as the
|
|
|
|
|
@@ -3358,6 +3463,22 @@
|
|
|
|
|
@@ -3358,6 +3465,22 @@
|
|
|
|
|
noInitialLabel,
|
|
|
|
|
skipBackgroundNotify,
|
|
|
|
|
});
|
|
|
|
|
@@ -340,7 +342,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (insertTab) {
|
|
|
|
|
// Insert the tab into the tab container in the correct position.
|
|
|
|
|
this.#insertTabAtIndex(t, {
|
|
|
|
|
@@ -3366,6 +3487,7 @@
|
|
|
|
|
@@ -3366,6 +3489,7 @@
|
|
|
|
|
ownerTab,
|
|
|
|
|
openerTab,
|
|
|
|
|
pinned,
|
|
|
|
|
@@ -348,7 +350,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
bulkOrderedOpen,
|
|
|
|
|
tabGroup: tabGroup ?? openerTab?.group,
|
|
|
|
|
});
|
|
|
|
|
@@ -3384,6 +3506,7 @@
|
|
|
|
|
@@ -3384,6 +3508,7 @@
|
|
|
|
|
openWindowInfo,
|
|
|
|
|
skipLoad,
|
|
|
|
|
triggeringRemoteType,
|
|
|
|
|
@@ -356,7 +358,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
if (focusUrlBar) {
|
|
|
|
|
@@ -3508,6 +3631,12 @@
|
|
|
|
|
@@ -3508,6 +3633,12 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -369,7 +371,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
// Additionally send pinned tab events
|
|
|
|
|
if (pinned) {
|
|
|
|
|
this.#notifyPinnedStatus(t);
|
|
|
|
|
@@ -3518,6 +3647,9 @@
|
|
|
|
|
@@ -3518,6 +3649,9 @@
|
|
|
|
|
if (!inBackground) {
|
|
|
|
|
this.selectedTab = t;
|
|
|
|
|
}
|
|
|
|
|
@@ -379,7 +381,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
return t;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3750,6 +3882,7 @@
|
|
|
|
|
@@ -3750,6 +3884,7 @@
|
|
|
|
|
isAdoptingGroup = false,
|
|
|
|
|
isUserTriggered = false,
|
|
|
|
|
telemetryUserCreateSource = "unknown",
|
|
|
|
|
@@ -387,7 +389,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} = {}
|
|
|
|
|
) {
|
|
|
|
|
if (
|
|
|
|
|
@@ -3760,9 +3893,6 @@
|
|
|
|
|
@@ -3760,9 +3895,6 @@
|
|
|
|
|
!this.isSplitViewWrapper(tabOrSplitView)
|
|
|
|
|
)
|
|
|
|
|
) {
|
|
|
|
|
@@ -397,7 +399,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!color) {
|
|
|
|
|
@@ -3783,9 +3913,14 @@
|
|
|
|
|
@@ -3783,9 +3915,14 @@
|
|
|
|
|
label,
|
|
|
|
|
isAdoptingGroup
|
|
|
|
|
);
|
|
|
|
|
@@ -414,7 +416,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
);
|
|
|
|
|
group.addTabs(tabsAndSplitViews);
|
|
|
|
|
|
|
|
|
|
@@ -3906,7 +4041,7 @@
|
|
|
|
|
@@ -3906,7 +4043,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.#handleTabMove(tab, () =>
|
|
|
|
|
@@ -423,7 +425,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3990,6 +4125,7 @@
|
|
|
|
|
@@ -3990,6 +4127,7 @@
|
|
|
|
|
color: group.color,
|
|
|
|
|
insertBefore: newTabs[0],
|
|
|
|
|
isAdoptingGroup: true,
|
|
|
|
|
@@ -431,7 +433,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -4200,6 +4336,7 @@
|
|
|
|
|
@@ -4200,6 +4338,7 @@
|
|
|
|
|
openWindowInfo,
|
|
|
|
|
skipLoad,
|
|
|
|
|
triggeringRemoteType,
|
|
|
|
|
@@ -439,7 +441,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
) {
|
|
|
|
|
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
|
|
|
|
|
@@ -4269,6 +4406,7 @@
|
|
|
|
|
@@ -4269,6 +4408,7 @@
|
|
|
|
|
openWindowInfo,
|
|
|
|
|
name,
|
|
|
|
|
skipLoad,
|
|
|
|
|
@@ -447,7 +449,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -4482,9 +4620,9 @@
|
|
|
|
|
@@ -4482,9 +4622,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add a new tab if needed.
|
|
|
|
|
@@ -459,7 +461,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
let url = "about:blank";
|
|
|
|
|
if (tabData.entries?.length) {
|
|
|
|
|
@@ -4521,8 +4659,10 @@
|
|
|
|
|
@@ -4521,8 +4661,10 @@
|
|
|
|
|
insertTab: false,
|
|
|
|
|
skipLoad: true,
|
|
|
|
|
preferredRemoteType,
|
|
|
|
|
@@ -471,7 +473,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (select) {
|
|
|
|
|
tabToSelect = tab;
|
|
|
|
|
}
|
|
|
|
|
@@ -4544,7 +4684,8 @@
|
|
|
|
|
@@ -4544,7 +4686,8 @@
|
|
|
|
|
this.pinTab(tab);
|
|
|
|
|
// Then ensure all the tab open/pinning information is sent.
|
|
|
|
|
this._fireTabOpen(tab, {});
|
|
|
|
|
@@ -481,7 +483,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
let { groupId } = tabData;
|
|
|
|
|
const tabGroup = tabGroupWorkingData.get(groupId);
|
|
|
|
|
// if a tab refers to a tab group we don't know, skip any group
|
|
|
|
|
@@ -4564,7 +4705,10 @@
|
|
|
|
|
@@ -4564,7 +4707,10 @@
|
|
|
|
|
tabGroup.stateData.id,
|
|
|
|
|
tabGroup.stateData.color,
|
|
|
|
|
tabGroup.stateData.collapsed,
|
|
|
|
|
@@ -493,7 +495,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
);
|
|
|
|
|
tabsFragment.appendChild(tabGroup.node);
|
|
|
|
|
}
|
|
|
|
|
@@ -4619,9 +4763,21 @@
|
|
|
|
|
@@ -4619,9 +4765,21 @@
|
|
|
|
|
// to remove the old selected tab.
|
|
|
|
|
if (tabToSelect) {
|
|
|
|
|
let leftoverTab = this.selectedTab;
|
|
|
|
|
@@ -515,7 +517,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
if (tabs.length > 1 || !tabs[0].selected) {
|
|
|
|
|
this._updateTabsAfterInsert();
|
|
|
|
|
@@ -4812,11 +4968,14 @@
|
|
|
|
|
@@ -4812,11 +4970,14 @@
|
|
|
|
|
if (ownerTab) {
|
|
|
|
|
tab.owner = ownerTab;
|
|
|
|
|
}
|
|
|
|
|
@@ -531,7 +533,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (
|
|
|
|
|
!bulkOrderedOpen &&
|
|
|
|
|
((openerTab &&
|
|
|
|
|
@@ -4828,7 +4987,7 @@
|
|
|
|
|
@@ -4828,7 +4989,7 @@
|
|
|
|
|
let lastRelatedTab =
|
|
|
|
|
openerTab && this._lastRelatedTabMap.get(openerTab);
|
|
|
|
|
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
|
|
|
|
|
@@ -540,7 +542,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
tabGroup = previousTab.group;
|
|
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
|
@@ -4844,7 +5003,7 @@
|
|
|
|
|
@@ -4844,7 +5005,7 @@
|
|
|
|
|
previousTab.splitview
|
|
|
|
|
) + 1;
|
|
|
|
|
} else if (previousTab.visible) {
|
|
|
|
|
@@ -549,7 +551,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} else if (previousTab == FirefoxViewHandler.tab) {
|
|
|
|
|
elementIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
@@ -4872,14 +5031,14 @@
|
|
|
|
|
@@ -4872,14 +5033,14 @@
|
|
|
|
|
}
|
|
|
|
|
// Ensure index is within bounds.
|
|
|
|
|
if (tab.pinned) {
|
|
|
|
|
@@ -568,7 +570,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
if (pinned && !itemAfter?.pinned) {
|
|
|
|
|
itemAfter = null;
|
|
|
|
|
@@ -4896,7 +5055,7 @@
|
|
|
|
|
@@ -4896,7 +5057,7 @@
|
|
|
|
|
|
|
|
|
|
this.tabContainer._invalidateCachedTabs();
|
|
|
|
|
|
|
|
|
|
@@ -577,7 +579,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (
|
|
|
|
|
(this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
|
|
|
|
|
this.isSplitViewWrapper(itemAfter)
|
|
|
|
|
@@ -4927,7 +5086,11 @@
|
|
|
|
|
@@ -4927,7 +5088,11 @@
|
|
|
|
|
const tabContainer = pinned
|
|
|
|
|
? this.tabContainer.pinnedTabsContainer
|
|
|
|
|
: this.tabContainer;
|
|
|
|
|
@@ -589,7 +591,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tab.group?.collapsed) {
|
|
|
|
|
@@ -4942,6 +5105,7 @@
|
|
|
|
|
@@ -4942,6 +5107,7 @@
|
|
|
|
|
if (pinned) {
|
|
|
|
|
this._updateTabBarForPinnedTabs();
|
|
|
|
|
}
|
|
|
|
|
@@ -597,7 +599,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
TabBarVisibility.update();
|
|
|
|
|
}
|
|
|
|
|
@@ -5490,6 +5654,7 @@
|
|
|
|
|
@@ -5490,6 +5656,7 @@
|
|
|
|
|
telemetrySource,
|
|
|
|
|
} = {}
|
|
|
|
|
) {
|
|
|
|
|
@@ -605,7 +607,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
|
|
|
|
// can be considered equivalent to closing the window.
|
|
|
|
|
if (
|
|
|
|
|
@@ -5579,6 +5744,7 @@
|
|
|
|
|
@@ -5579,6 +5746,7 @@
|
|
|
|
|
if (lastToClose) {
|
|
|
|
|
this.removeTab(lastToClose, aParams);
|
|
|
|
|
}
|
|
|
|
|
@@ -613,7 +615,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error(e);
|
|
|
|
|
}
|
|
|
|
|
@@ -5624,6 +5790,14 @@
|
|
|
|
|
@@ -5624,6 +5792,14 @@
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -628,7 +630,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
let isVisibleTab = aTab.visible;
|
|
|
|
|
// We have to sample the tab width now, since _beginRemoveTab might
|
|
|
|
|
// end up modifying the DOM in such a way that aTab gets a new
|
|
|
|
|
@@ -5631,6 +5805,9 @@
|
|
|
|
|
@@ -5631,6 +5807,9 @@
|
|
|
|
|
// state).
|
|
|
|
|
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
|
|
|
|
let isLastTab = this.#isLastTabInWindow(aTab);
|
|
|
|
|
@@ -638,7 +640,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (
|
|
|
|
|
!this._beginRemoveTab(aTab, {
|
|
|
|
|
closeWindowFastpath: true,
|
|
|
|
|
@@ -5642,13 +5819,14 @@
|
|
|
|
|
@@ -5642,13 +5821,14 @@
|
|
|
|
|
telemetrySource,
|
|
|
|
|
})
|
|
|
|
|
) {
|
|
|
|
|
@@ -654,7 +656,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
let lockTabSizing =
|
|
|
|
|
!this.tabContainer.verticalMode &&
|
|
|
|
|
!aTab.pinned &&
|
|
|
|
|
@@ -5679,7 +5857,13 @@
|
|
|
|
|
@@ -5679,7 +5859,13 @@
|
|
|
|
|
// We're not animating, so we can cancel the animation stopwatch.
|
|
|
|
|
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
|
|
|
|
|
aTab._closeTimeAnimTimerId = null;
|
|
|
|
|
@@ -669,7 +671,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -5813,7 +5997,7 @@
|
|
|
|
|
@@ -5813,7 +5999,7 @@
|
|
|
|
|
closeWindowWithLastTab != null
|
|
|
|
|
? closeWindowWithLastTab
|
|
|
|
|
: !window.toolbar.visible ||
|
|
|
|
|
@@ -678,7 +680,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
if (closeWindow) {
|
|
|
|
|
// We've already called beforeunload on all the relevant tabs if we get here,
|
|
|
|
|
@@ -5837,6 +6021,7 @@
|
|
|
|
|
@@ -5837,6 +6023,7 @@
|
|
|
|
|
|
|
|
|
|
newTab = true;
|
|
|
|
|
}
|
|
|
|
|
@@ -686,7 +688,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
aTab._endRemoveArgs = [closeWindow, newTab];
|
|
|
|
|
|
|
|
|
|
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
|
|
|
|
@@ -5877,13 +6062,7 @@
|
|
|
|
|
@@ -5877,13 +6064,7 @@
|
|
|
|
|
aTab._mouseleave();
|
|
|
|
|
|
|
|
|
|
if (newTab) {
|
|
|
|
|
@@ -701,7 +703,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} else {
|
|
|
|
|
TabBarVisibility.update();
|
|
|
|
|
}
|
|
|
|
|
@@ -6016,6 +6195,7 @@
|
|
|
|
|
@@ -6016,6 +6197,7 @@
|
|
|
|
|
this.tabs[i]._tPos = i;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -709,7 +711,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (!this._windowIsClosing) {
|
|
|
|
|
// update tab close buttons state
|
|
|
|
|
this.tabContainer._updateCloseButtons();
|
|
|
|
|
@@ -6201,6 +6381,7 @@
|
|
|
|
|
@@ -6201,6 +6383,7 @@
|
|
|
|
|
memory_after: await getTotalMemoryUsage(),
|
|
|
|
|
time_to_unload_in_ms: timeElapsed,
|
|
|
|
|
});
|
|
|
|
|
@@ -717,7 +719,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -6246,6 +6427,7 @@
|
|
|
|
|
@@ -6246,6 +6429,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let excludeTabs = new Set(aExcludeTabs);
|
|
|
|
|
@@ -725,7 +727,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
// If this tab has a successor, it should be selectable, since
|
|
|
|
|
// hiding or closing a tab removes that tab as a successor.
|
|
|
|
|
@@ -6258,15 +6440,22 @@
|
|
|
|
|
@@ -6258,15 +6442,22 @@
|
|
|
|
|
!excludeTabs.has(aTab.owner) &&
|
|
|
|
|
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
|
|
|
|
) {
|
|
|
|
|
@@ -750,7 +752,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
let tab = this.tabContainer.findNextTab(aTab, {
|
|
|
|
|
direction: 1,
|
|
|
|
|
filter: _tab => remainingTabs.includes(_tab),
|
|
|
|
|
@@ -6280,7 +6469,7 @@
|
|
|
|
|
@@ -6280,7 +6471,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tab) {
|
|
|
|
|
@@ -759,7 +761,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If no qualifying visible tab was found, see if there is a tab in
|
|
|
|
|
@@ -6301,7 +6490,7 @@
|
|
|
|
|
@@ -6301,7 +6492,7 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -768,7 +770,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_blurTab(aTab) {
|
|
|
|
|
@@ -6312,7 +6501,7 @@
|
|
|
|
|
@@ -6312,7 +6503,7 @@
|
|
|
|
|
* @returns {boolean}
|
|
|
|
|
* False if swapping isn't permitted, true otherwise.
|
|
|
|
|
*/
|
|
|
|
|
@@ -777,7 +779,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
// Do not allow transfering a private tab to a non-private window
|
|
|
|
|
// and vice versa.
|
|
|
|
|
if (
|
|
|
|
|
@@ -6366,6 +6555,7 @@
|
|
|
|
|
@@ -6366,6 +6557,7 @@
|
|
|
|
|
// fire the beforeunload event in the process. Close the other
|
|
|
|
|
// window if this was its last tab.
|
|
|
|
|
if (
|
|
|
|
|
@@ -785,7 +787,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
!remoteBrowser._beginRemoveTab(aOtherTab, {
|
|
|
|
|
adoptedByTab: aOurTab,
|
|
|
|
|
closeWindowWithLastTab: true,
|
|
|
|
|
@@ -6377,7 +6567,7 @@
|
|
|
|
|
@@ -6377,7 +6569,7 @@
|
|
|
|
|
// If this is the last tab of the window, hide the window
|
|
|
|
|
// immediately without animation before the docshell swap, to avoid
|
|
|
|
|
// about:blank being painted.
|
|
|
|
|
@@ -794,7 +796,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (closeWindow) {
|
|
|
|
|
let win = aOtherTab.ownerGlobal;
|
|
|
|
|
win.windowUtils.suppressAnimation(true);
|
|
|
|
|
@@ -6511,11 +6701,13 @@
|
|
|
|
|
@@ -6511,11 +6703,13 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Finish tearing down the tab that's going away.
|
|
|
|
|
@@ -808,7 +810,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
this.setTabTitle(aOurTab);
|
|
|
|
|
|
|
|
|
|
@@ -6717,10 +6909,10 @@
|
|
|
|
|
@@ -6717,10 +6911,10 @@
|
|
|
|
|
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -821,7 +823,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
aTab.selected ||
|
|
|
|
|
aTab.closing ||
|
|
|
|
|
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
|
|
|
|
@@ -6780,7 +6972,8 @@
|
|
|
|
|
@@ -6780,7 +6974,8 @@
|
|
|
|
|
* @param {object} [aOptions={}]
|
|
|
|
|
* Key-value pairs that will be serialized into the features string.
|
|
|
|
|
*/
|
|
|
|
|
@@ -831,7 +833,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
if (this.tabs.length == 1) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
@@ -6797,7 +6990,7 @@
|
|
|
|
|
@@ -6797,7 +6992,7 @@
|
|
|
|
|
// tell a new window to take the "dropped" tab
|
|
|
|
|
let args = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
|
|
|
|
|
args.appendElement(aTab.splitview ?? aTab);
|
|
|
|
|
@@ -840,7 +842,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
private: PrivateBrowsingUtils.isWindowPrivate(window),
|
|
|
|
|
features: Object.entries(aOptions)
|
|
|
|
|
.map(([key, value]) => `${key}=${value}`)
|
|
|
|
|
@@ -6805,6 +6998,8 @@
|
|
|
|
|
@@ -6805,6 +7000,8 @@
|
|
|
|
|
openerWindow: window,
|
|
|
|
|
args,
|
|
|
|
|
});
|
|
|
|
|
@@ -849,7 +851,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -6917,7 +7112,7 @@
|
|
|
|
|
@@ -6917,7 +7114,7 @@
|
|
|
|
|
* `true` if element is a `<tab-group>`
|
|
|
|
|
*/
|
|
|
|
|
isTabGroup(element) {
|
|
|
|
|
@@ -858,7 +860,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -7002,8 +7197,8 @@
|
|
|
|
|
@@ -7002,8 +7199,8 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Don't allow mixing pinned and unpinned tabs.
|
|
|
|
|
@@ -869,7 +871,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} else {
|
|
|
|
|
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
|
|
|
|
}
|
|
|
|
|
@@ -7049,8 +7244,8 @@
|
|
|
|
|
@@ -7049,8 +7246,8 @@
|
|
|
|
|
this.#handleTabMove(
|
|
|
|
|
element,
|
|
|
|
|
() => {
|
|
|
|
|
@@ -880,7 +882,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
neighbor = neighbor.group;
|
|
|
|
|
}
|
|
|
|
|
if (neighbor?.splitview) {
|
|
|
|
|
@@ -7061,6 +7256,12 @@
|
|
|
|
|
@@ -7061,6 +7258,12 @@
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -893,7 +895,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
if (movingForwards && neighbor) {
|
|
|
|
|
neighbor.after(element);
|
|
|
|
|
@@ -7119,23 +7320,31 @@
|
|
|
|
|
@@ -7119,23 +7322,31 @@
|
|
|
|
|
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
|
|
|
|
|
if (this.isTabGroupLabel(targetElement)) {
|
|
|
|
|
targetElement = targetElement.group;
|
|
|
|
|
@@ -931,7 +933,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
} else if (!element.pinned && targetElement && targetElement.pinned) {
|
|
|
|
|
// If the caller asks to move an unpinned element next to a pinned
|
|
|
|
|
// tab, move the unpinned element to be the first unpinned element
|
|
|
|
|
@@ -7148,12 +7357,35 @@
|
|
|
|
|
@@ -7148,12 +7359,35 @@
|
|
|
|
|
// move the tab group right before the first unpinned tab.
|
|
|
|
|
// 4. Moving a tab group and the first unpinned tab is grouped:
|
|
|
|
|
// move the tab group right before the first unpinned tab's tab group.
|
|
|
|
|
@@ -968,7 +970,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
// We want to include the splitview wrapper if it's the targetElement, but
|
|
|
|
|
// not in the case where we want to reverse tabs within the same splitview.
|
|
|
|
|
@@ -7162,6 +7394,7 @@
|
|
|
|
|
@@ -7162,6 +7396,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let getContainer = () =>
|
|
|
|
|
@@ -976,7 +978,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
element.pinned
|
|
|
|
|
? this.tabContainer.pinnedTabsContainer
|
|
|
|
|
: this.tabContainer;
|
|
|
|
|
@@ -7170,11 +7403,15 @@
|
|
|
|
|
@@ -7170,11 +7405,15 @@
|
|
|
|
|
element,
|
|
|
|
|
() => {
|
|
|
|
|
if (moveBefore) {
|
|
|
|
|
@@ -993,7 +995,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
metricsContext
|
|
|
|
|
@@ -7248,11 +7485,15 @@
|
|
|
|
|
@@ -7248,11 +7487,15 @@
|
|
|
|
|
* @param {TabMetricsContext} [metricsContext]
|
|
|
|
|
*/
|
|
|
|
|
moveTabToExistingGroup(aTab, aGroup, metricsContext) {
|
|
|
|
|
@@ -1012,7 +1014,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
if (aTab.group && aTab.group.id === aGroup.id) {
|
|
|
|
|
return;
|
|
|
|
|
@@ -7324,6 +7565,7 @@
|
|
|
|
|
@@ -7324,6 +7567,7 @@
|
|
|
|
|
|
|
|
|
|
let state = {
|
|
|
|
|
tabIndex: tab._tPos,
|
|
|
|
|
@@ -1020,7 +1022,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
};
|
|
|
|
|
if (tab.visible) {
|
|
|
|
|
state.elementIndex = tab.elementIndex;
|
|
|
|
|
@@ -7355,7 +7597,7 @@
|
|
|
|
|
@@ -7355,7 +7599,7 @@
|
|
|
|
|
let changedSplitView =
|
|
|
|
|
previousTabState.splitViewId != currentTabState.splitViewId;
|
|
|
|
|
|
|
|
|
|
@@ -1029,7 +1031,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
tab.dispatchEvent(
|
|
|
|
|
new CustomEvent("TabMove", {
|
|
|
|
|
bubbles: true,
|
|
|
|
|
@@ -7402,6 +7644,10 @@
|
|
|
|
|
@@ -7402,6 +7646,10 @@
|
|
|
|
|
|
|
|
|
|
moveActionCallback();
|
|
|
|
|
|
|
|
|
|
@@ -1040,7 +1042,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
// Clear tabs cache after moving nodes because the order of tabs may have
|
|
|
|
|
// changed.
|
|
|
|
|
this.tabContainer._invalidateCachedTabs();
|
|
|
|
|
@@ -7452,7 +7698,22 @@
|
|
|
|
|
@@ -7452,7 +7700,22 @@
|
|
|
|
|
* @returns {object}
|
|
|
|
|
* The new tab in the current window, null if the tab couldn't be adopted.
|
|
|
|
|
*/
|
|
|
|
|
@@ -1064,7 +1066,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
// Swap the dropped tab with a new one we create and then close
|
|
|
|
|
// it in the other window (making it seem to have moved between
|
|
|
|
|
// windows). We also ensure that the tab we create to swap into has
|
|
|
|
|
@@ -7495,6 +7756,8 @@
|
|
|
|
|
@@ -7495,6 +7758,8 @@
|
|
|
|
|
}
|
|
|
|
|
params.skipLoad = true;
|
|
|
|
|
let newTab = this.addWebTab("about:blank", params);
|
|
|
|
|
@@ -1073,7 +1075,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
aTab.container.tabDragAndDrop.finishAnimateTabMove();
|
|
|
|
|
|
|
|
|
|
@@ -8205,7 +8468,7 @@
|
|
|
|
|
@@ -8205,7 +8470,7 @@
|
|
|
|
|
// preventDefault(). It will still raise the window if appropriate.
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
@@ -1082,7 +1084,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
window.focus();
|
|
|
|
|
aEvent.preventDefault();
|
|
|
|
|
}
|
|
|
|
|
@@ -8222,7 +8485,6 @@
|
|
|
|
|
@@ -8222,7 +8487,6 @@
|
|
|
|
|
|
|
|
|
|
on_TabGroupCollapse(aEvent) {
|
|
|
|
|
aEvent.target.tabs.forEach(tab => {
|
|
|
|
|
@@ -1090,7 +1092,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -8556,7 +8818,9 @@
|
|
|
|
|
@@ -8556,7 +8820,9 @@
|
|
|
|
|
|
|
|
|
|
let filter = this._tabFilters.get(tab);
|
|
|
|
|
if (filter) {
|
|
|
|
|
@@ -1100,7 +1102,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
|
|
|
|
|
let listener = this._tabListeners.get(tab);
|
|
|
|
|
if (listener) {
|
|
|
|
|
@@ -9359,6 +9623,7 @@
|
|
|
|
|
@@ -9359,6 +9625,7 @@
|
|
|
|
|
aWebProgress.isTopLevel
|
|
|
|
|
) {
|
|
|
|
|
this.mTab.setAttribute("busy", "true");
|
|
|
|
|
@@ -1108,7 +1110,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
|
|
|
|
this.mTab._notselectedsinceload = !this.mTab.selected;
|
|
|
|
|
}
|
|
|
|
|
@@ -9439,6 +9704,7 @@
|
|
|
|
|
@@ -9439,6 +9706,7 @@
|
|
|
|
|
// known defaults. Note we use the original URL since about:newtab
|
|
|
|
|
// redirects to a prerendered page.
|
|
|
|
|
const shouldRemoveFavicon =
|
|
|
|
|
@@ -1116,7 +1118,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
!this.mBrowser.mIconURL &&
|
|
|
|
|
!ignoreBlank &&
|
|
|
|
|
!(originalLocation.spec in FAVICON_DEFAULTS);
|
|
|
|
|
@@ -9613,13 +9879,6 @@
|
|
|
|
|
@@ -9613,13 +9881,6 @@
|
|
|
|
|
this.mBrowser.originalURI = aRequest.originalURI;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1130,7 +1132,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..028dfcba9e23a17e4152071dd58eb97a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let userContextId = this.mBrowser.getAttribute("usercontextid") || 0;
|
|
|
|
|
@@ -10507,7 +10766,8 @@ var TabContextMenu = {
|
|
|
|
|
@@ -10507,7 +10768,8 @@ var TabContextMenu = {
|
|
|
|
|
);
|
|
|
|
|
contextUnpinSelectedTabs.hidden =
|
|
|
|
|
!this.contextTab.pinned || !this.multiselected;
|
|
|
|
|
|