chore: Updated to firefox 142.0.1, b=no-bug, c=l10n, tabs, folders

This commit is contained in:
Mr. M
2025-08-27 19:55:58 +02:00
parent 257547acbd
commit 5852b2aaa6
9 changed files with 102 additions and 78 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d075b9cf7 100644
index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c3b65f80b 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -332,7 +332,7 @@
@@ -28,20 +28,16 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let tabsPerRow = 0;
let position = RTL_UI
? window.windowUtils.getBoundsWithoutFlushing(
@@ -772,9 +771,10 @@
@@ -851,7 +850,7 @@
let dropEffect = this.getDropEffectForTabDrag(event);
let isMovingInTabStrip = !fromTabList && dropEffect == "move";
let collapseTabGroupDuringDrag =
- isMovingInTabStrip && isTabGroupLabel(tab) && !tab.group.collapsed;
+ isMovingInTabStrip && isTabGroupLabel(tab) && (!tab.group.collapsed || tab.group.hasAttribute("has-active"));
if (tab.multiselected) {
this.#moveTogetherSelectedTabs(tab);
- } else if (isTabGroupLabel(tab) && !tab.group.collapsed) {
- tab.group.collapsed = true;
+ } else if (isTabGroupLabel(tab) && (!tab.group.collapsed || tab.group.hasAttribute("has-active"))) {
+ tab.group.collapsed = !tab.group.hasAttribute("split-view-group");
expandGroupOnDrop = true;
+ gZenFolders.collapseVisibleTab(tab.group);
}
}
@@ -872,7 +872,7 @@
tab._dragData = {
offsetX: this.verticalMode
@@ -861,7 +860,7 @@
? event.screenY - window.screenY - tabOffset
: event.screenY - window.screenY,
scrollPos:
@@ -50,7 +46,15 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
? this.pinnedTabsContainer.scrollPosition
: this.arrowScrollbox.scrollPosition,
screenX: event.screenX,
@@ -933,6 +933,10 @@
@@ -886,6 +885,7 @@
if (tab.multiselected) {
this.#moveTogetherSelectedTabs(tab);
} else if (collapseTabGroupDuringDrag) {
+ gZenFolders.collapseVisibleTab(tab.group);
tab.group.collapsed = true;
}
}
@@ -932,6 +932,10 @@
}
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
@@ -61,7 +65,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
if (
(dropEffect == "move" || dropEffect == "copy") &&
document == draggedTab.ownerDocument &&
@@ -1060,7 +1064,9 @@
@@ -1059,7 +1063,9 @@
isTabGroupLabel(draggedTab) &&
draggedTab._dragData?.expandGroupOnDrop
) {
@@ -72,7 +76,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
}
}
@@ -1096,6 +1102,18 @@
@@ -1095,6 +1101,18 @@
this._tabDropIndicator.hidden = true;
event.stopPropagation();
@@ -91,7 +95,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
if (draggedTab && dropEffect == "copy") {
let duplicatedDraggedTab;
let duplicatedTabs = [];
@@ -1120,8 +1138,9 @@
@@ -1119,8 +1137,9 @@
let translateOffsetY = oldTranslateY % tabHeight;
let newTranslateX = oldTranslateX - translateOffsetX;
let newTranslateY = oldTranslateY - translateOffsetY;
@@ -103,7 +107,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
if (this.#isContainerVerticalPinnedGrid(draggedTab)) {
// Update both translate axis for pinned vertical expanded tabs
@@ -1137,8 +1156,8 @@
@@ -1136,8 +1155,8 @@
}
} else {
let tabs = this.ariaFocusableItems.slice(
@@ -114,7 +118,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
);
let size = this.verticalMode ? "height" : "width";
let screenAxis = this.verticalMode ? "screenY" : "screenX";
@@ -1179,11 +1198,9 @@
@@ -1178,11 +1197,9 @@
}
let shouldPin =
@@ -128,7 +132,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let shouldTranslate =
!gReduceMotion &&
!shouldCreateGroupOnDrop &&
@@ -1196,6 +1213,7 @@
@@ -1195,6 +1212,7 @@
(oldTranslateY && oldTranslateY != newTranslateY);
} else if (this.verticalMode) {
shouldTranslate &&= oldTranslateY && oldTranslateY != newTranslateY;
@@ -136,7 +140,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
} else {
shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX;
}
@@ -1379,6 +1397,7 @@
@@ -1376,6 +1394,7 @@
let nextItem = this.ariaFocusableItems[newIndex];
let tabGroup = isTab(nextItem) && nextItem.group;
@@ -144,7 +148,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
gBrowser.loadTabs(urls, {
inBackground,
replace,
@@ -1411,6 +1430,17 @@
@@ -1408,6 +1427,17 @@
this.finishMoveTogetherSelectedTabs(draggedTab);
this.finishAnimateTabMove();
@@ -159,10 +163,10 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
+ if (gZenViewSplitter._lastOpenedTab) gZenViewSplitter._lastOpenedTab._visuallySelected = false;
+ }
+
this.#keepTabSizeLocked = false;
this._unlockTabSizing();
this.#expandGroupOnDrop(draggedTab);
@@ -1582,7 +1612,6 @@
this.#resetTabsAfterDrop(draggedTab.ownerDocument);
@@ -1577,7 +1607,6 @@
this.toggleAttribute("overflow", true);
this._updateCloseButtons();
@@ -170,7 +174,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
document
.getElementById("tab-preview-panel")
@@ -1640,7 +1669,7 @@
@@ -1635,7 +1664,7 @@
}
get newTabButton() {
@@ -179,7 +183,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
}
get verticalMode() {
@@ -1656,6 +1685,7 @@
@@ -1651,6 +1680,7 @@
}
get overflowing() {
@@ -187,7 +191,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
return this.hasAttribute("overflow");
}
@@ -1664,26 +1694,54 @@
@@ -1659,26 +1689,54 @@
if (this.#allTabs) {
return this.#allTabs;
}
@@ -249,7 +253,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
}
/**
@@ -1750,32 +1808,27 @@
@@ -1745,32 +1803,27 @@
let elementIndex = 0;
@@ -291,7 +295,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
return this.#focusableItems;
}
@@ -1783,6 +1836,7 @@
@@ -1778,6 +1831,7 @@
_invalidateCachedTabs() {
this.#allTabs = null;
this._invalidateCachedVisibleTabs();
@@ -299,7 +303,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
}
_invalidateCachedVisibleTabs() {
@@ -1798,8 +1852,8 @@
@@ -1793,8 +1847,8 @@
#isContainerVerticalPinnedGrid(tab) {
return (
this.verticalMode &&
@@ -310,7 +314,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
!this.expandOnHover
);
}
@@ -1815,7 +1869,7 @@
@@ -1810,7 +1864,7 @@
if (node == null) {
// We have a container for non-tab elements at the end of the scrollbox.
@@ -319,7 +323,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
}
node.before(tab);
@@ -1910,7 +1964,7 @@
@@ -1905,7 +1959,7 @@
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
// Attach the long click popup to all of them.
@@ -328,7 +332,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
const newTab2 = this.newTabButton;
const newTabVertical = document.getElementById(
"vertical-tabs-newtab-button"
@@ -2005,10 +2059,12 @@
@@ -2000,10 +2054,12 @@
_handleTabSelect(aInstant) {
let selectedTab = this.selectedItem;
@@ -341,7 +345,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
selectedTab._notselectedsinceload = false;
}
@@ -2152,6 +2208,16 @@
@@ -2140,6 +2196,16 @@
when the tab is first selected to be dragged.
*/
#updateTabStylesOnDrag(tab) {
@@ -358,7 +362,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let isPinned = tab.pinned;
let numPinned = gBrowser.pinnedTabCount;
let allTabs = this.ariaFocusableItems;
@@ -2385,7 +2451,7 @@
@@ -2398,7 +2464,7 @@
return;
}
@@ -367,7 +371,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let directionX = screenX > dragData.animLastScreenX;
let directionY = screenY > dragData.animLastScreenY;
@@ -2394,6 +2460,8 @@
@@ -2407,6 +2473,8 @@
let { width: tabWidth, height: tabHeight } =
draggedTab.getBoundingClientRect();
@@ -376,7 +380,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let shiftSizeX = tabWidth * movingTabs.length;
let shiftSizeY = tabHeight;
dragData.tabWidth = tabWidth;
@@ -2430,8 +2498,8 @@
@@ -2443,8 +2511,8 @@
let lastBoundX =
lastTabInRow.screenX +
lastTabInRow.getBoundingClientRect().width -
@@ -387,7 +391,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
translateX = Math.min(Math.max(translateX, firstBoundX), lastBoundX);
translateY = Math.min(Math.max(translateY, firstBoundY), lastBoundY);
@@ -2547,7 +2615,7 @@
@@ -2560,7 +2628,7 @@
}
dragData.animDropElementIndex = newIndex;
@@ -396,7 +400,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
dragData.dropBefore = newIndex < tabs.length;
// Shift background tabs to leave a gap where the dragged tab
@@ -2580,13 +2648,18 @@
@@ -2593,13 +2661,18 @@
this.#clearDragOverCreateGroupTimer();
@@ -419,7 +423,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
if (this.#rtlMode) {
tabs.reverse();
@@ -2597,7 +2670,7 @@
@@ -2610,7 +2683,7 @@
let screenAxis = this.verticalMode ? "screenY" : "screenX";
let size = this.verticalMode ? "height" : "width";
let translateAxis = this.verticalMode ? "translateY" : "translateX";
@@ -428,7 +432,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let translateX = event.screenX - dragData.screenX;
let translateY = event.screenY - dragData.screenY;
@@ -2607,10 +2680,16 @@
@@ -2620,10 +2693,16 @@
dragData.translateY = translateY;
// Move the dragged tab based on the mouse position.
@@ -447,7 +451,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let endEdge = ele => ele[screenAxis] + bounds(ele)[size];
let lastMovingTabScreen = endEdge(lastMovingTab);
let firstMovingTabScreen = firstMovingTab[screenAxis];
@@ -2619,6 +2698,7 @@
@@ -2632,6 +2711,7 @@
// Constrain the range over which the moving tabs can move between the first and last tab
let firstBound = firstTab[screenAxis] - firstMovingTabScreen;
let lastBound = endEdge(lastTab) - lastMovingTabScreen;
@@ -455,7 +459,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
// Center the tab under the cursor if the tab is not under the cursor while dragging
if (
@@ -2636,6 +2716,9 @@
@@ -2649,6 +2729,9 @@
// Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement;
}
@@ -465,7 +469,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
item.style.transform = `${translateAxis}(${translate}px)`;
}
@@ -2773,6 +2856,9 @@
@@ -2786,6 +2869,9 @@
break;
}
let element = tabs[mid];
@@ -475,7 +479,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let elementForSize = isTabGroupLabel(element)
? element.parentElement
: element;
@@ -2792,6 +2878,8 @@
@@ -2805,6 +2891,8 @@
};
let dropElement = getOverlappedElement();
@@ -484,7 +488,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
let newDropElementIndex;
if (dropElement) {
@@ -2856,7 +2944,10 @@
@@ -2869,7 +2957,10 @@
let shouldCreateGroupOnDrop;
let dropBefore;
if (dropElement) {
@@ -496,7 +500,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
? dropElement.parentElement
: dropElement;
@@ -2876,7 +2967,7 @@
@@ -2889,7 +2980,7 @@
? Services.prefs.getIntPref(
"browser.tabs.dragDrop.moveOverThresholdPercent"
) / 100
@@ -505,7 +509,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
moveOverThreshold = Math.min(1, Math.max(0, moveOverThreshold));
let shouldMoveOver = overlapPercent > moveOverThreshold;
if (logicalForward && shouldMoveOver) {
@@ -2908,44 +2999,21 @@
@@ -2921,44 +3012,21 @@
// If dragging a group over another group, don't make it look like it is
// possible to drop the dragged group inside the other group.
@@ -555,7 +559,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
// When dragging tab(s) over an ungrouped tab, signal to the user
// that dropping the tab(s) will create a new tab group.
shouldCreateGroupOnDrop =
@@ -2955,12 +3023,6 @@
@@ -2968,12 +3036,6 @@
overlapPercent > dragOverGroupingThreshold;
if (shouldCreateGroupOnDrop) {
@@ -568,7 +572,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
} else {
this.removeAttribute("movingtab-createGroup");
document
@@ -2987,19 +3049,14 @@
@@ -3000,19 +3062,14 @@
dropElement = dropElementGroup;
colorCode = undefined;
} else if (isTabGroupLabel(dropElement)) {
@@ -596,7 +600,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
}
this.#setDragOverGroupColor(colorCode);
this.toggleAttribute("movingtab-ungroup", !colorCode);
@@ -3017,19 +3074,28 @@
@@ -3030,19 +3087,28 @@
dragData.dropElement = dropElement;
dragData.dropBefore = dropBefore;
dragData.animDropElementIndex = newDropElementIndex;
@@ -627,7 +631,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
}
item.style.transform = transform;
}
@@ -3082,12 +3148,14 @@
@@ -3095,12 +3161,14 @@
);
}
@@ -644,7 +648,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
for (let item of this.ariaFocusableItems) {
if (isTabGroupLabel(item)) {
@@ -3095,6 +3163,18 @@
@@ -3108,6 +3176,18 @@
item = item.parentElement;
}
item.style.transform = "";
@@ -663,7 +667,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
item.removeAttribute("dragover-createGroup");
}
this.removeAttribute("movingtab-createGroup");
@@ -3116,16 +3196,15 @@
@@ -3129,16 +3209,15 @@
tab.style.left = "";
tab.style.top = "";
tab.style.maxWidth = "";
@@ -682,7 +686,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
}
let periphery = draggedTabDocument.getElementById(
"tabbrowser-arrowscrollbox-periphery"
@@ -3198,7 +3277,7 @@
@@ -3211,7 +3290,7 @@
let postTransitionCleanup = () => {
movingTab._moveTogetherSelectedTabsData.animate = false;
};
@@ -691,7 +695,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
postTransitionCleanup();
} else {
let onTransitionEnd = transitionendEvent => {
@@ -3371,7 +3450,7 @@
@@ -3384,7 +3463,7 @@
}
_notifyBackgroundTab(aTab) {
@@ -700,7 +704,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
return;
}
@@ -3480,7 +3559,10 @@
@@ -3493,7 +3572,10 @@
#getDragTarget(event, { ignoreSides = false } = {}) {
let { target } = event;
while (target) {
@@ -712,7 +716,7 @@ index e47f735e4e4563c9b7537944628418d1478c068d..b6d52ef3179d66ecd7f06fd61a6bca6d
break;
}
target = target.parentNode;
@@ -3497,6 +3579,9 @@
@@ -3510,6 +3592,9 @@
return null;
}
}