mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-04 13:05:12 +00:00
chore: Started to update to firefox 139, b=(no-bug), c=no-component
This commit is contained in:
@@ -222,8 +222,8 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..5c49c43714b3914130f8d821d902f9f2
|
||||
+ t.setAttribute("zen-empty-tab", "true");
|
||||
+ }
|
||||
if (insertTab) {
|
||||
if (typeof index == "number") {
|
||||
elementIndex = this.#tabIndexToElementIndex(index);
|
||||
// Insert the tab into the tab container in the correct position.
|
||||
// For now, we support `index` as an alias for `tabIndex`.
|
||||
@@ -2779,6 +2846,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
@@ -245,25 +245,8 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..5c49c43714b3914130f8d821d902f9f2
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this._notifyPinnedStatus(t);
|
||||
@@ -2945,12 +3019,15 @@
|
||||
* @param {string} [label=]
|
||||
* @returns {MozTabbrowserTabGroup}
|
||||
*/
|
||||
- _createTabGroup(id, color, collapsed, label = "") {
|
||||
+ _createTabGroup(id, color, collapsed, label = "", pinned = false, essential = false, splitViewGroup = false) {
|
||||
let group = document.createXULElement("tab-group", { is: "tab-group" });
|
||||
group.id = id;
|
||||
group.collapsed = collapsed;
|
||||
group.color = color;
|
||||
group.label = label;
|
||||
+ group.pinned = pinned;
|
||||
+ group.essential = essential;
|
||||
+ if (splitViewGroup) group.setAttribute('split-view-group', true);
|
||||
return group;
|
||||
}
|
||||
|
||||
@@ -2993,10 +3070,10 @@
|
||||
insertBefore = null,
|
||||
isAdoptingGroup = false,
|
||||
isUserTriggered = false,
|
||||
telemetryUserCreateSource = "unknown",
|
||||
+ forSplitView = false,
|
||||
@@ -275,9 +258,9 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..5c49c43714b3914130f8d821d902f9f2
|
||||
|
||||
if (!color) {
|
||||
@@ -3011,7 +3088,12 @@
|
||||
id = `${Date.now()}-${Math.round(Math.random() * 100)}`;
|
||||
}
|
||||
let group = this._createTabGroup(id, color, false, label);
|
||||
label,
|
||||
isAdoptingGroup
|
||||
);
|
||||
- this.tabContainer.insertBefore(
|
||||
+ if (forSplitView) {
|
||||
+ group.setAttribute('split-view-group', true);
|
||||
@@ -386,21 +369,21 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..5c49c43714b3914130f8d821d902f9f2
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
@@ -3912,7 +4030,7 @@
|
||||
// Ensure we have an index if one was not provided.
|
||||
if (typeof index != "number") {
|
||||
if (typeof elementIndex != "number" && typeof tabIndex != "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._numVisiblePinTabsWithoutCollapsed : Infinity;
|
||||
- elementIndex = Infinity;
|
||||
+ elementIndex = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this._numVisiblePinTabsWithoutCollapsed : Infinity;
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -3935,7 +4053,7 @@
|
||||
) {
|
||||
index = Infinity;
|
||||
elementIndex = Infinity;
|
||||
} else if (previousTab.visible) {
|
||||
- index = previousTab.elementIndex + 1;
|
||||
+ index = (typeof previousTab.elementIndex === 'undefined') ? index : (previousTab.elementIndex + 1);
|
||||
- elementIndex = previousTab.elementIndex + 1;
|
||||
+ elementIndex = (typeof previousTab.elementIndex === 'undefined') ? index : (previousTab.elementIndex + 1);
|
||||
} else if (previousTab == FirefoxViewHandler.tab) {
|
||||
index = 0;
|
||||
elementIndex = 0;
|
||||
}
|
||||
@@ -3958,18 +4076,18 @@
|
||||
|
||||
@@ -413,12 +396,12 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..5c49c43714b3914130f8d821d902f9f2
|
||||
} else {
|
||||
- index = Math.max(index, this.pinnedTabCount);
|
||||
+ index = Math.max(index, this._numVisiblePinTabsWithoutCollapsed);
|
||||
index = Math.min(index, this.tabContainer.ariaFocusableItems.length);
|
||||
index = Math.min(index, allItems.length);
|
||||
}
|
||||
|
||||
/** @type {MozTabbrowserTab|undefined} */
|
||||
- let itemAfter = this.tabContainer.ariaFocusableItems.at(index);
|
||||
+ let itemAfter = this.tabContainer.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).at(index);
|
||||
- let itemAfter = allItems.at(index);
|
||||
+ let itemAfter = allItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).at(index);
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
|
||||
- if (tabGroup) {
|
||||
|
||||
Reference in New Issue
Block a user