mirror of
https://github.com/zen-browser/desktop.git
synced 2025-12-14 18:35:36 +00:00
chore: Updated to Firefox 144.0, p=#10725, c=l10n, tabs, media, common, tests, workspaces
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221fb51207c6 100644
|
||||
index 1425607ef87d6c28fb676e722617edfb51ba12a1..62431aa1c78c8327edf2c8c93472cb8b19b606e9 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -44,6 +44,9 @@
|
||||
@@ -12,7 +12,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
if (isTab(element)) {
|
||||
return element;
|
||||
}
|
||||
@@ -411,7 +414,7 @@
|
||||
@@ -423,7 +426,7 @@
|
||||
// and we're not hitting the scroll buttons.
|
||||
if (
|
||||
event.button != 0 ||
|
||||
@@ -21,7 +21,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
event.composedTarget.localName == "toolbarbutton"
|
||||
) {
|
||||
return;
|
||||
@@ -492,7 +495,6 @@
|
||||
@@ -504,7 +507,6 @@
|
||||
});
|
||||
}
|
||||
} else if (isTabGroupLabel(event.target)) {
|
||||
@@ -29,7 +29,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
} else if (
|
||||
event.originalTarget.closest("scrollbox") &&
|
||||
!Services.prefs.getBoolPref(
|
||||
@@ -528,6 +530,9 @@
|
||||
@@ -540,6 +542,9 @@
|
||||
}
|
||||
|
||||
on_keydown(event) {
|
||||
@@ -39,7 +39,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
let { altKey, shiftKey } = event;
|
||||
let [accel, nonAccel] =
|
||||
AppConstants.platform == "macosx"
|
||||
@@ -765,7 +770,7 @@
|
||||
@@ -777,7 +782,7 @@
|
||||
if (this.#isContainerVerticalPinnedGrid(tab)) {
|
||||
// In expanded vertical mode, the max number of pinned tabs per row is dynamic
|
||||
// Set this before adjusting dragged tab's position
|
||||
@@ -48,7 +48,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
let tabsPerRow = 0;
|
||||
let position = RTL_UI
|
||||
? window.windowUtils.getBoundsWithoutFlushing(
|
||||
@@ -930,7 +935,7 @@
|
||||
@@ -942,7 +947,7 @@
|
||||
let dropEffect = this.getDropEffectForTabDrag(event);
|
||||
let isMovingInTabStrip = !fromTabList && dropEffect == "move";
|
||||
let collapseTabGroupDuringDrag =
|
||||
@@ -57,7 +57,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
|
||||
tab._dragData = {
|
||||
offsetX: this.verticalMode
|
||||
@@ -940,7 +945,7 @@
|
||||
@@ -952,7 +957,7 @@
|
||||
? event.screenY - window.screenY - tabOffset
|
||||
: event.screenY - window.screenY,
|
||||
scrollPos:
|
||||
@@ -66,7 +66,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
? this.pinnedTabsContainer.scrollPosition
|
||||
: this.arrowScrollbox.scrollPosition,
|
||||
screenX: event.screenX,
|
||||
@@ -969,6 +974,7 @@
|
||||
@@ -981,6 +986,7 @@
|
||||
|
||||
if (collapseTabGroupDuringDrag) {
|
||||
tab.group.collapsed = true;
|
||||
@@ -74,7 +74,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1015,6 +1021,10 @@
|
||||
@@ -1027,6 +1033,10 @@
|
||||
}
|
||||
|
||||
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||
@@ -85,7 +85,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
if (
|
||||
(dropEffect == "move" || dropEffect == "copy") &&
|
||||
document == draggedTab.ownerDocument &&
|
||||
@@ -1196,6 +1206,18 @@
|
||||
@@ -1208,6 +1218,18 @@
|
||||
|
||||
this._tabDropIndicator.hidden = true;
|
||||
event.stopPropagation();
|
||||
@@ -104,7 +104,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
if (draggedTab && dropEffect == "copy") {
|
||||
let duplicatedDraggedTab;
|
||||
let duplicatedTabs = [];
|
||||
@@ -1220,8 +1242,9 @@
|
||||
@@ -1232,8 +1254,9 @@
|
||||
let translateOffsetY = oldTranslateY % tabHeight;
|
||||
let newTranslateX = oldTranslateX - translateOffsetX;
|
||||
let newTranslateY = oldTranslateY - translateOffsetY;
|
||||
@@ -116,7 +116,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
|
||||
if (this.#isContainerVerticalPinnedGrid(draggedTab)) {
|
||||
// Update both translate axis for pinned vertical expanded tabs
|
||||
@@ -1237,8 +1260,8 @@
|
||||
@@ -1249,8 +1272,8 @@
|
||||
}
|
||||
} else {
|
||||
let tabs = this.ariaFocusableItems.slice(
|
||||
@@ -127,7 +127,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
);
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let screenAxis = this.verticalMode ? "screenY" : "screenX";
|
||||
@@ -1287,11 +1310,13 @@
|
||||
@@ -1299,11 +1322,13 @@
|
||||
this.dragToPinPromoCard,
|
||||
];
|
||||
let shouldPin =
|
||||
@@ -141,7 +141,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
isTab(draggedTab) &&
|
||||
draggedTab.pinned &&
|
||||
this.arrowScrollbox.contains(event.target);
|
||||
@@ -1309,6 +1334,7 @@
|
||||
@@ -1321,6 +1346,7 @@
|
||||
(oldTranslateY && oldTranslateY != newTranslateY);
|
||||
} else if (this.verticalMode) {
|
||||
shouldTranslate &&= oldTranslateY && oldTranslateY != newTranslateY;
|
||||
@@ -149,7 +149,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
} else {
|
||||
shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX;
|
||||
}
|
||||
@@ -1503,6 +1529,7 @@
|
||||
@@ -1515,6 +1541,7 @@
|
||||
|
||||
let nextItem = this.ariaFocusableItems[newIndex];
|
||||
let tabGroup = isTab(nextItem) && nextItem.group;
|
||||
@@ -157,7 +157,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
gBrowser.loadTabs(urls, {
|
||||
inBackground,
|
||||
replace,
|
||||
@@ -1541,6 +1568,17 @@
|
||||
@@ -1553,6 +1580,17 @@
|
||||
}
|
||||
this.#resetTabsAfterDrop(draggedTab.ownerDocument);
|
||||
|
||||
@@ -175,7 +175,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
if (
|
||||
dt.mozUserCancelled ||
|
||||
dt.dropEffect != "none" ||
|
||||
@@ -1707,7 +1745,6 @@
|
||||
@@ -1719,7 +1757,6 @@
|
||||
|
||||
this.toggleAttribute("overflow", true);
|
||||
this._updateCloseButtons();
|
||||
@@ -183,7 +183,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
|
||||
document
|
||||
.getElementById("tab-preview-panel")
|
||||
@@ -1765,7 +1802,7 @@
|
||||
@@ -1777,7 +1814,7 @@
|
||||
}
|
||||
|
||||
get newTabButton() {
|
||||
@@ -192,7 +192,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
}
|
||||
|
||||
get verticalMode() {
|
||||
@@ -1781,6 +1818,7 @@
|
||||
@@ -1793,6 +1830,7 @@
|
||||
}
|
||||
|
||||
get overflowing() {
|
||||
@@ -200,28 +200,25 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
return this.hasAttribute("overflow");
|
||||
}
|
||||
|
||||
@@ -1789,31 +1827,51 @@
|
||||
if (this.#allTabs) {
|
||||
return this.#allTabs;
|
||||
@@ -1806,29 +1844,54 @@
|
||||
if (pinnedChildren?.at(-1)?.id == "pinned-tabs-container-periphery") {
|
||||
pinnedChildren.pop();
|
||||
}
|
||||
- // Remove temporary periphery element added at drag start.
|
||||
- let pinnedChildren = Array.from(this.pinnedTabsContainer.children);
|
||||
- if (pinnedChildren?.at(-1)?.id == "pinned-tabs-container-periphery") {
|
||||
- pinnedChildren.pop();
|
||||
- }
|
||||
- let unpinnedChildren = Array.from(this.arrowScrollbox.children);
|
||||
- // remove arrowScrollbox periphery element.
|
||||
- unpinnedChildren.pop();
|
||||
-
|
||||
+ let children = gZenWorkspaces.tabboxChildren;
|
||||
+ children.pop();
|
||||
// explode tab groups
|
||||
+ let unpinnedChildren = gZenWorkspaces.tabboxChildren;
|
||||
// remove arrowScrollbox periphery element.
|
||||
unpinnedChildren.pop();
|
||||
|
||||
// explode tab groups and split view wrappers
|
||||
// Iterate backwards over the array to preserve indices while we modify
|
||||
// things in place
|
||||
- for (let i = unpinnedChildren.length - 1; i >= 0; i--) {
|
||||
- if (unpinnedChildren[i].tagName == "tab-group") {
|
||||
- if (
|
||||
- unpinnedChildren[i].tagName == "tab-group" ||
|
||||
- unpinnedChildren[i].tagName == "tab-split-view-wrapper"
|
||||
- ) {
|
||||
- unpinnedChildren.splice(i, 1, ...unpinnedChildren[i].tabs);
|
||||
+ const pinnedTabs = [...gZenWorkspaces.getCurrentEssentialsContainer().children, ...this.pinnedTabsContainer.children];
|
||||
+ const pinnedTabs = [...gZenWorkspaces.getCurrentEssentialsContainer().children, ...pinnedChildren];
|
||||
+ const expandTabs = (tabs) => {
|
||||
+ for (let i = tabs.length - 1; i >= 0; i--) {
|
||||
+ const tab = tabs[i];
|
||||
@@ -231,15 +228,13 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
+ // add the tabs in the group to the list
|
||||
+ tabs.splice(i, 0, ...tab.tabs);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
-
|
||||
- this.#allTabs = [...pinnedChildren, ...unpinnedChildren];
|
||||
+ }
|
||||
+ };
|
||||
+ expandTabs(pinnedTabs);
|
||||
+ expandTabs(children);
|
||||
+ expandTabs(unpinnedChildren);
|
||||
+ const allTabs = [
|
||||
+ ...pinnedTabs,
|
||||
+ ...children,
|
||||
+ ...unpinnedChildren,
|
||||
+ ];
|
||||
+ const lastPinnedTabIdx = pinnedTabs.length - 1;
|
||||
+ let i = 0;
|
||||
@@ -254,21 +249,23 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
+ // remove the separator from the list
|
||||
+ allTabs.splice(i, 1);
|
||||
+ i--;
|
||||
+ }
|
||||
}
|
||||
+ i++;
|
||||
+ }
|
||||
}
|
||||
-
|
||||
- this.#allTabs = [...pinnedChildren, ...unpinnedChildren];
|
||||
+ this.#allTabs = allTabs;
|
||||
return this.#allTabs;
|
||||
}
|
||||
|
||||
get allGroups() {
|
||||
- let children = Array.from(this.arrowScrollbox.children);
|
||||
let children = Array.from(this.arrowScrollbox.children);
|
||||
- return children.filter(node => node.tagName == "tab-group");
|
||||
+ return gZenWorkspaces.allTabGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1880,29 +1938,23 @@
|
||||
@@ -1895,29 +1958,23 @@
|
||||
|
||||
let elementIndex = 0;
|
||||
|
||||
@@ -307,7 +304,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1914,6 +1966,7 @@
|
||||
@@ -1929,6 +1986,7 @@
|
||||
_invalidateCachedTabs() {
|
||||
this.#allTabs = null;
|
||||
this._invalidateCachedVisibleTabs();
|
||||
@@ -315,7 +312,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
}
|
||||
|
||||
_invalidateCachedVisibleTabs() {
|
||||
@@ -1929,8 +1982,8 @@
|
||||
@@ -1944,8 +2002,8 @@
|
||||
#isContainerVerticalPinnedGrid(tab) {
|
||||
return (
|
||||
this.verticalMode &&
|
||||
@@ -326,7 +323,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
!this.expandOnHover
|
||||
);
|
||||
}
|
||||
@@ -1946,7 +1999,7 @@
|
||||
@@ -1961,7 +2019,7 @@
|
||||
|
||||
if (node == null) {
|
||||
// We have a container for non-tab elements at the end of the scrollbox.
|
||||
@@ -335,7 +332,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
}
|
||||
|
||||
node.before(tab);
|
||||
@@ -2041,7 +2094,7 @@
|
||||
@@ -2056,7 +2114,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.
|
||||
@@ -344,7 +341,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
const newTab2 = this.newTabButton;
|
||||
const newTabVertical = document.getElementById(
|
||||
"vertical-tabs-newtab-button"
|
||||
@@ -2139,8 +2192,10 @@
|
||||
@@ -2156,8 +2214,10 @@
|
||||
*/
|
||||
_handleTabSelect(aInstant) {
|
||||
let selectedTab = this.selectedItem;
|
||||
@@ -355,7 +352,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
selectedTab._notselectedsinceload = false;
|
||||
}
|
||||
|
||||
@@ -2149,7 +2204,7 @@
|
||||
@@ -2166,7 +2226,7 @@
|
||||
* @param {boolean} [shouldScrollInstantly=false]
|
||||
*/
|
||||
#ensureTabIsVisible(tab, shouldScrollInstantly = false) {
|
||||
@@ -364,7 +361,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
if (arrowScrollbox?.overflowing) {
|
||||
arrowScrollbox.ensureElementIsVisible(tab, shouldScrollInstantly);
|
||||
}
|
||||
@@ -2288,6 +2343,16 @@
|
||||
@@ -2305,6 +2365,16 @@
|
||||
when the tab is first selected to be dragged.
|
||||
*/
|
||||
#updateTabStylesOnDrag(tab) {
|
||||
@@ -381,7 +378,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
let isPinned = tab.pinned;
|
||||
let numPinned = gBrowser.pinnedTabCount;
|
||||
let allTabs = this.ariaFocusableItems;
|
||||
@@ -2540,7 +2605,7 @@
|
||||
@@ -2578,7 +2648,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -390,7 +387,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
|
||||
let directionX = screenX > dragData.animLastScreenX;
|
||||
let directionY = screenY > dragData.animLastScreenY;
|
||||
@@ -2549,6 +2614,8 @@
|
||||
@@ -2587,6 +2657,8 @@
|
||||
|
||||
let { width: tabWidth, height: tabHeight } =
|
||||
draggedTab.getBoundingClientRect();
|
||||
@@ -399,7 +396,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
let shiftSizeX = tabWidth * movingTabs.length;
|
||||
let shiftSizeY = tabHeight;
|
||||
dragData.tabWidth = tabWidth;
|
||||
@@ -2585,8 +2652,8 @@
|
||||
@@ -2623,8 +2695,8 @@
|
||||
let lastBoundX =
|
||||
lastTabInRow.screenX +
|
||||
lastTabInRow.getBoundingClientRect().width -
|
||||
@@ -410,7 +407,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
translateX = Math.min(Math.max(translateX, firstBoundX), lastBoundX);
|
||||
translateY = Math.min(Math.max(translateY, firstBoundY), lastBoundY);
|
||||
|
||||
@@ -2744,13 +2811,18 @@
|
||||
@@ -2782,13 +2854,18 @@
|
||||
this.#clearDragOverGroupingTimer();
|
||||
this.#clearPinnedDropIndicatorTimer();
|
||||
|
||||
@@ -433,7 +430,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
|
||||
if (this.#rtlMode) {
|
||||
tabs.reverse();
|
||||
@@ -2761,7 +2833,7 @@
|
||||
@@ -2799,7 +2876,7 @@
|
||||
let screenAxis = this.verticalMode ? "screenY" : "screenX";
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let translateAxis = this.verticalMode ? "translateY" : "translateX";
|
||||
@@ -442,7 +439,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
let tabSize = this.verticalMode ? tabHeight : tabWidth;
|
||||
let translateX = event.screenX - dragData.screenX;
|
||||
let translateY = event.screenY - dragData.screenY;
|
||||
@@ -2777,6 +2849,12 @@
|
||||
@@ -2815,6 +2892,12 @@
|
||||
);
|
||||
let lastMovingTab = movingTabs.at(-1);
|
||||
let firstMovingTab = movingTabs[0];
|
||||
@@ -455,7 +452,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
let endEdge = ele => ele[screenAxis] + bounds(ele)[size];
|
||||
let lastMovingTabScreen = endEdge(lastMovingTab);
|
||||
let firstMovingTabScreen = firstMovingTab[screenAxis];
|
||||
@@ -2791,6 +2869,11 @@
|
||||
@@ -2829,6 +2912,11 @@
|
||||
let endBound = this.#rtlMode
|
||||
? endEdge(this) - lastMovingTabScreen
|
||||
: periphery[screenAxis] - 1 - lastMovingTabScreen;
|
||||
@@ -467,7 +464,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
translate = Math.min(Math.max(translate, startBound), endBound);
|
||||
|
||||
// Center the tab under the cursor if the tab is not under the cursor while dragging
|
||||
@@ -2980,6 +3063,8 @@
|
||||
@@ -3018,6 +3106,8 @@
|
||||
};
|
||||
|
||||
let dropElement = getOverlappedElement();
|
||||
@@ -476,7 +473,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
|
||||
let newDropElementIndex;
|
||||
if (dropElement) {
|
||||
@@ -3061,7 +3146,7 @@
|
||||
@@ -3099,7 +3189,7 @@
|
||||
? Services.prefs.getIntPref(
|
||||
"browser.tabs.dragDrop.moveOverThresholdPercent"
|
||||
) / 100
|
||||
@@ -485,7 +482,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
moveOverThreshold = Math.min(1, Math.max(0, moveOverThreshold));
|
||||
let shouldMoveOver = overlapPercent > moveOverThreshold;
|
||||
if (logicalForward && shouldMoveOver) {
|
||||
@@ -3094,6 +3179,7 @@
|
||||
@@ -3132,6 +3222,7 @@
|
||||
// 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.
|
||||
if (
|
||||
@@ -493,7 +490,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
isTabGroupLabel(draggedTab) &&
|
||||
dropElement?.group &&
|
||||
(!dropElement.group.collapsed ||
|
||||
@@ -3120,20 +3206,13 @@
|
||||
@@ -3158,20 +3249,13 @@
|
||||
let isOutOfBounds = isPinned
|
||||
? dropElement.elementIndex >= numPinned
|
||||
: dropElement.elementIndex < numPinned;
|
||||
@@ -518,7 +515,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
let groupingDelay = Services.prefs.getIntPref(
|
||||
"browser.tabs.dragDrop.createGroup.delayMS"
|
||||
);
|
||||
@@ -3141,6 +3220,7 @@
|
||||
@@ -3179,6 +3263,7 @@
|
||||
// When dragging tab(s) over an ungrouped tab, signal to the user
|
||||
// that dropping the tab(s) will create a new tab group.
|
||||
let shouldCreateGroupOnDrop =
|
||||
@@ -526,7 +523,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
!movingTabsSet.has(dropElement) &&
|
||||
isTab(dropElement) &&
|
||||
!dropElement?.group &&
|
||||
@@ -3149,6 +3229,7 @@
|
||||
@@ -3187,6 +3272,7 @@
|
||||
// When dragging tab(s) over a collapsed tab group label, signal to the
|
||||
// user that dropping the tab(s) will add them to the group.
|
||||
let shouldDropIntoCollapsedTabGroup =
|
||||
@@ -534,7 +531,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
isTabGroupLabel(dropElement) &&
|
||||
dropElement.group.collapsed &&
|
||||
overlapPercent > dragOverGroupingThreshold;
|
||||
@@ -3193,19 +3274,14 @@
|
||||
@@ -3231,19 +3317,14 @@
|
||||
dropElement = dropElementGroup;
|
||||
colorCode = undefined;
|
||||
} else if (isTabGroupLabel(dropElement)) {
|
||||
@@ -562,7 +559,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
}
|
||||
this.#setDragOverGroupColor(colorCode);
|
||||
this.toggleAttribute("movingtab-addToGroup", colorCode);
|
||||
@@ -3224,11 +3300,11 @@
|
||||
@@ -3262,11 +3343,11 @@
|
||||
dragData.dropElement = dropElement;
|
||||
dragData.dropBefore = dropBefore;
|
||||
dragData.animDropElementIndex = newDropElementIndex;
|
||||
@@ -576,7 +573,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3350,12 +3426,14 @@
|
||||
@@ -3388,12 +3469,14 @@
|
||||
element?.removeAttribute("dragover-groupTarget");
|
||||
}
|
||||
|
||||
@@ -593,7 +590,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
|
||||
for (let item of this.ariaFocusableItems) {
|
||||
this.#resetGroupTarget(item);
|
||||
@@ -3402,16 +3480,15 @@
|
||||
@@ -3440,7 +3523,7 @@
|
||||
tab.style.left = "";
|
||||
tab.style.top = "";
|
||||
tab.style.maxWidth = "";
|
||||
@@ -602,17 +599,16 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
}
|
||||
for (let label of draggedTabDocument.getElementsByClassName(
|
||||
"tab-group-label-container"
|
||||
)) {
|
||||
label.style.width = "";
|
||||
- label.style.height = "";
|
||||
@@ -3450,7 +3533,7 @@
|
||||
label.style.left = "";
|
||||
label.style.top = "";
|
||||
label.style.maxWidth = "";
|
||||
- label.removeAttribute("dragtarget");
|
||||
+ label.removeAttribute("zen-dragtarget");
|
||||
}
|
||||
let periphery = draggedTabDocument.getElementById(
|
||||
"tabbrowser-arrowscrollbox-periphery"
|
||||
@@ -3483,7 +3560,7 @@
|
||||
@@ -3522,7 +3605,7 @@
|
||||
let postTransitionCleanup = () => {
|
||||
movingTab._moveTogetherSelectedTabsData.animate = false;
|
||||
};
|
||||
@@ -621,7 +617,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -3647,7 +3724,7 @@
|
||||
@@ -3686,7 +3769,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
@@ -630,7 +626,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3756,7 +3833,10 @@
|
||||
@@ -3795,7 +3878,10 @@
|
||||
#getDragTarget(event, { ignoreSides = false } = {}) {
|
||||
let { target } = event;
|
||||
while (target) {
|
||||
@@ -642,7 +638,7 @@ index b2d54218ca51f86d4591730054d0e7e1138adb94..d2c1f7f5b68ecc531c4e9e597457221f
|
||||
break;
|
||||
}
|
||||
target = target.parentNode;
|
||||
@@ -3773,6 +3853,9 @@
|
||||
@@ -3812,6 +3898,9 @@
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user