mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-02 16:08:41 +00:00
chore: Updated to firefox 142.0, p=#9870
* chore: Updateed to firefox 142.0, b=no-bug, c=l10n, folders * chore: Finish updating to firefox, b=no-bug, c=tabs * chore: Fixed mods builds, b=no-bug, c=mods * feat: Small changes to tabs layout, b=no-bug, c=tabs, compact-mode, folders, workspaces * test: Fixed tests, b=no-bug, c=scripts, tests, folders * test: Fixed tests, b=no-bug, c=tabs, tests, welcome
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d784cc9da0 100644
|
||||
index e47f735e4e4563c9b7537944628418d1478c068d..e8e52b56ba2eca562186512363d90e38c4d3dffe 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -289,6 +289,7 @@
|
||||
on_TabGroupCollapse(event) {
|
||||
this._invalidateCachedVisibleTabs();
|
||||
this._unlockTabSizing();
|
||||
+ return;
|
||||
|
||||
// If the user's selected tab is in the collapsing group, kick them off
|
||||
// the tab. If no tabs exist outside the group, create a new one and
|
||||
@@ -345,7 +346,7 @@
|
||||
@@ -332,7 +332,7 @@
|
||||
// and we're not hitting the scroll buttons.
|
||||
if (
|
||||
event.button != 0 ||
|
||||
@@ -19,7 +11,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
event.composedTarget.localName == "toolbarbutton"
|
||||
) {
|
||||
return;
|
||||
@@ -695,7 +696,7 @@
|
||||
@@ -686,7 +686,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
|
||||
@@ -28,14 +20,10 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
let tabsPerRow = 0;
|
||||
let position = RTL_UI
|
||||
? window.windowUtils.getBoundsWithoutFlushing(
|
||||
@@ -777,11 +778,12 @@
|
||||
|
||||
@@ -773,8 +773,9 @@
|
||||
if (tab.multiselected) {
|
||||
this.#moveTogetherSelectedTabs(tab);
|
||||
- } else if (isTabGroupLabel(tab) && !tab.group.collapsed) {
|
||||
+ } else if (isTabGroupLabel(tab)) {
|
||||
this._lockTabSizing();
|
||||
this.#keepTabSizeLocked = true;
|
||||
} else if (isTabGroupLabel(tab) && !tab.group.collapsed) {
|
||||
- tab.group.collapsed = true;
|
||||
- expandGroupOnDrop = true;
|
||||
+ tab.group.collapsed = !tab.group.hasAttribute("split-view-group");
|
||||
@@ -44,7 +32,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
}
|
||||
}
|
||||
|
||||
@@ -879,7 +881,7 @@
|
||||
@@ -872,7 +873,7 @@
|
||||
? event.screenY - window.screenY - tabOffset
|
||||
: event.screenY - window.screenY,
|
||||
scrollPos:
|
||||
@@ -53,18 +41,18 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
? this.pinnedTabsContainer.scrollPosition
|
||||
: this.arrowScrollbox.scrollPosition,
|
||||
screenX: event.screenX,
|
||||
@@ -933,6 +935,10 @@
|
||||
@@ -933,6 +934,10 @@
|
||||
}
|
||||
|
||||
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||
+ if (draggedTab && effects === "move") {
|
||||
+ if (draggedTab && dropEffect === "move") {
|
||||
+ gZenPinnedTabManager.applyDragoverClass(event, draggedTab);
|
||||
+ gZenViewSplitter.onBrowserDragEndToSplit(event);
|
||||
+ }
|
||||
if (
|
||||
(effects == "move" || effects == "copy") &&
|
||||
(dropEffect == "move" || dropEffect == "copy") &&
|
||||
document == draggedTab.ownerDocument &&
|
||||
@@ -1060,7 +1066,9 @@
|
||||
@@ -1060,7 +1065,9 @@
|
||||
isTabGroupLabel(draggedTab) &&
|
||||
draggedTab._dragData?.expandGroupOnDrop
|
||||
) {
|
||||
@@ -72,10 +60,10 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
+ const isActive = draggedTab.group.hasAttribute("has-active");
|
||||
+ draggedTab.group.collapsed = isActive;
|
||||
+ if (isActive) gZenFolders.expandVisibleTab(draggedTab.group);
|
||||
this.#keepTabSizeLocked = false;
|
||||
this._unlockTabSizing();
|
||||
}
|
||||
@@ -1089,6 +1097,18 @@
|
||||
}
|
||||
|
||||
@@ -1096,6 +1103,18 @@
|
||||
|
||||
this._tabDropIndicator.hidden = true;
|
||||
event.stopPropagation();
|
||||
@@ -94,15 +82,21 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
if (draggedTab && dropEffect == "copy") {
|
||||
let duplicatedDraggedTab;
|
||||
let duplicatedTabs = [];
|
||||
@@ -1127,11 +1147,12 @@
|
||||
newTranslateY -= tabHeight;
|
||||
@@ -1120,8 +1139,9 @@
|
||||
let translateOffsetY = oldTranslateY % tabHeight;
|
||||
let newTranslateX = oldTranslateX - translateOffsetX;
|
||||
let newTranslateY = oldTranslateY - translateOffsetY;
|
||||
- let isPinned = draggedTab.pinned;
|
||||
- let numPinned = gBrowser.pinnedTabCount;
|
||||
+ let isPinned = draggedTab?.group ? draggedTab.group.pinned : draggedTab.pinned;
|
||||
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
|
||||
+ let essential = draggedTab.hasAttribute("zen-essential");
|
||||
|
||||
if (this.#isContainerVerticalPinnedGrid(draggedTab)) {
|
||||
// Update both translate axis for pinned vertical expanded tabs
|
||||
@@ -1137,8 +1157,8 @@
|
||||
}
|
||||
} else {
|
||||
- let isPinned = draggedTab.pinned;
|
||||
- let numPinned = gBrowser.pinnedTabCount;
|
||||
+ let isPinned = draggedTab?.group ? draggedTab.group.pinned : draggedTab.pinned;
|
||||
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
|
||||
+ let essential = draggedTab.hasAttribute("zen-essential");
|
||||
let tabs = this.ariaFocusableItems.slice(
|
||||
- isPinned ? 0 : numPinned,
|
||||
- isPinned ? numPinned : undefined
|
||||
@@ -111,15 +105,29 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
);
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let screenAxis = this.verticalMode ? "screenY" : "screenX";
|
||||
@@ -1181,6 +1202,7 @@
|
||||
@@ -1179,11 +1199,9 @@
|
||||
}
|
||||
|
||||
let shouldPin =
|
||||
- numPinned &&
|
||||
- this.pinnedTabsContainer.contains(event.target) &&
|
||||
- !draggedTab.pinned;
|
||||
+ false;
|
||||
let shouldUnpin =
|
||||
- this.arrowScrollbox.contains(event.target) && draggedTab.pinned;
|
||||
+ false;
|
||||
let shouldTranslate =
|
||||
!gReduceMotion &&
|
||||
!shouldCreateGroupOnDrop &&
|
||||
@@ -1196,6 +1214,7 @@
|
||||
(oldTranslateY && oldTranslateY != newTranslateY);
|
||||
} else if (this.verticalMode) {
|
||||
shouldTranslate &&= oldTranslateY && oldTranslateY != newTranslateY;
|
||||
+ shouldTranslate = false; // TODO: Find a way to animate vertical tab moves.
|
||||
+ shouldTranslate = false;
|
||||
} else {
|
||||
shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX;
|
||||
}
|
||||
@@ -1349,6 +1371,7 @@
|
||||
@@ -1379,6 +1398,7 @@
|
||||
|
||||
let nextItem = this.ariaFocusableItems[newIndex];
|
||||
let tabGroup = isTab(nextItem) && nextItem.group;
|
||||
@@ -127,7 +135,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
gBrowser.loadTabs(urls, {
|
||||
inBackground,
|
||||
replace,
|
||||
@@ -1381,6 +1404,17 @@
|
||||
@@ -1411,6 +1431,17 @@
|
||||
|
||||
this.finishMoveTogetherSelectedTabs(draggedTab);
|
||||
this.finishAnimateTabMove();
|
||||
@@ -142,10 +150,10 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
+ if (gZenViewSplitter._lastOpenedTab) gZenViewSplitter._lastOpenedTab._visuallySelected = false;
|
||||
+ }
|
||||
+
|
||||
this.#keepTabSizeLocked = false;
|
||||
this._unlockTabSizing();
|
||||
this.#expandGroupOnDrop(draggedTab);
|
||||
|
||||
if (
|
||||
@@ -1607,7 +1641,7 @@
|
||||
@@ -1640,7 +1671,7 @@
|
||||
}
|
||||
|
||||
get newTabButton() {
|
||||
@@ -154,7 +162,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
}
|
||||
|
||||
get verticalMode() {
|
||||
@@ -1623,6 +1657,7 @@
|
||||
@@ -1656,6 +1687,7 @@
|
||||
}
|
||||
|
||||
get overflowing() {
|
||||
@@ -162,7 +170,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
return this.hasAttribute("overflow");
|
||||
}
|
||||
|
||||
@@ -1631,26 +1666,54 @@
|
||||
@@ -1664,26 +1696,54 @@
|
||||
if (this.#allTabs) {
|
||||
return this.#allTabs;
|
||||
}
|
||||
@@ -224,7 +232,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1717,33 +1780,27 @@
|
||||
@@ -1750,32 +1810,27 @@
|
||||
|
||||
let elementIndex = 0;
|
||||
|
||||
@@ -243,17 +251,18 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
} else if (isTabGroup(child)) {
|
||||
child.labelElement.elementIndex = elementIndex++;
|
||||
focusableItems.push(child.labelElement);
|
||||
- if (!child.collapsed) {
|
||||
- let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
|
||||
- visibleTabsInGroup.forEach(tab => {
|
||||
-
|
||||
- let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
|
||||
- visibleTabsInGroup.forEach(tab => {
|
||||
- tab.elementIndex = elementIndex++;
|
||||
- });
|
||||
+ if (!child.hasAttribute("split-view-group")) {
|
||||
+ let visibleTabsAndGroupsInGroup = child.childGroupsAndTabs.filter(tab => tab.visible);
|
||||
+ visibleTabsAndGroupsInGroup.forEach(tab => {
|
||||
tab.elementIndex = elementIndex++;
|
||||
});
|
||||
- focusableItems.push(...visibleTabsInGroup);
|
||||
+ focusableItems.push(...visibleTabsAndGroupsInGroup);
|
||||
}
|
||||
+ let visibleTabsInGroup = child.childGroupsAndTabs.filter(tab => tab.visible);
|
||||
+ visibleTabsInGroup.forEach(tab => {
|
||||
+ tab.elementIndex = elementIndex++;
|
||||
+ });
|
||||
focusableItems.push(...visibleTabsInGroup);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,7 +274,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
|
||||
return this.#focusableItems;
|
||||
}
|
||||
@@ -1751,6 +1808,7 @@
|
||||
@@ -1783,6 +1838,7 @@
|
||||
_invalidateCachedTabs() {
|
||||
this.#allTabs = null;
|
||||
this._invalidateCachedVisibleTabs();
|
||||
@@ -273,7 +282,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
}
|
||||
|
||||
_invalidateCachedVisibleTabs() {
|
||||
@@ -1766,8 +1824,8 @@
|
||||
@@ -1798,8 +1854,8 @@
|
||||
#isContainerVerticalPinnedGrid(tab) {
|
||||
return (
|
||||
this.verticalMode &&
|
||||
@@ -284,7 +293,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
!this.expandOnHover
|
||||
);
|
||||
}
|
||||
@@ -1783,7 +1841,7 @@
|
||||
@@ -1815,7 +1871,7 @@
|
||||
|
||||
if (node == null) {
|
||||
// We have a container for non-tab elements at the end of the scrollbox.
|
||||
@@ -293,7 +302,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
}
|
||||
|
||||
node.before(tab);
|
||||
@@ -1878,7 +1936,7 @@
|
||||
@@ -1910,7 +1966,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.
|
||||
@@ -302,7 +311,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
const newTab2 = this.newTabButton;
|
||||
const newTabVertical = document.getElementById(
|
||||
"vertical-tabs-newtab-button"
|
||||
@@ -1973,10 +2031,12 @@
|
||||
@@ -2005,10 +2061,12 @@
|
||||
|
||||
_handleTabSelect(aInstant) {
|
||||
let selectedTab = this.selectedItem;
|
||||
@@ -315,7 +324,15 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
selectedTab._notselectedsinceload = false;
|
||||
}
|
||||
|
||||
@@ -2130,7 +2190,7 @@
|
||||
@@ -2152,6 +2210,7 @@
|
||||
when the tab is first selected to be dragged.
|
||||
*/
|
||||
#updateTabStylesOnDrag(tab) {
|
||||
+ return;
|
||||
let isPinned = tab.pinned;
|
||||
let numPinned = gBrowser.pinnedTabCount;
|
||||
let allTabs = this.ariaFocusableItems;
|
||||
@@ -2385,7 +2444,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -324,7 +341,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
|
||||
let directionX = screenX > dragData.animLastScreenX;
|
||||
let directionY = screenY > dragData.animLastScreenY;
|
||||
@@ -2139,6 +2199,8 @@
|
||||
@@ -2394,6 +2453,8 @@
|
||||
|
||||
let { width: tabWidth, height: tabHeight } =
|
||||
draggedTab.getBoundingClientRect();
|
||||
@@ -333,16 +350,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
let shiftSizeX = tabWidth * movingTabs.length;
|
||||
let shiftSizeY = tabHeight;
|
||||
dragData.tabWidth = tabWidth;
|
||||
@@ -2168,7 +2230,7 @@
|
||||
let translateX = screenX - dragData.screenX;
|
||||
let translateY = screenY - dragData.screenY;
|
||||
translateY +=
|
||||
- this.pinnedTabsContainer.scrollPosition - dragData.scrollPos;
|
||||
+ dragData.scrollPos;
|
||||
let firstBoundX = firstTabInRow.screenX - firstMovingTabScreenX;
|
||||
let firstBoundY = firstTabInRow.screenY - firstMovingTabScreenY;
|
||||
let lastBoundX =
|
||||
@@ -2294,7 +2356,7 @@
|
||||
@@ -2547,7 +2608,7 @@
|
||||
}
|
||||
|
||||
dragData.animDropElementIndex = newIndex;
|
||||
@@ -351,7 +359,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
dragData.dropBefore = newIndex < tabs.length;
|
||||
|
||||
// Shift background tabs to leave a gap where the dragged tab
|
||||
@@ -2327,12 +2389,17 @@
|
||||
@@ -2580,13 +2641,18 @@
|
||||
|
||||
this.#clearDragOverCreateGroupTimer();
|
||||
|
||||
@@ -361,7 +369,8 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
|
||||
+ let essential = draggedTab.hasAttribute("zen-essential");
|
||||
+ const isDraggingFolder = isTabGroupLabel(draggedTab) && draggedTab.group?.isZenFolder;
|
||||
let tabs = this.ariaFocusableItems.slice(
|
||||
let allTabs = this.ariaFocusableItems;
|
||||
let tabs = allTabs.slice(
|
||||
- isPinned ? 0 : numPinned,
|
||||
- isPinned ? numPinned : undefined
|
||||
+ (isPinned && essential) ? 0 : gBrowser._numZenEssentials,
|
||||
@@ -373,17 +382,17 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
|
||||
if (this.#rtlMode) {
|
||||
tabs.reverse();
|
||||
@@ -2346,7 +2413,7 @@
|
||||
@@ -2597,7 +2663,7 @@
|
||||
let screenAxis = this.verticalMode ? "screenY" : "screenX";
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let translateAxis = this.verticalMode ? "translateY" : "translateX";
|
||||
let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft";
|
||||
- let { width: tabWidth, height: tabHeight } = bounds(draggedTab);
|
||||
+ let { width: tabWidth, height: tabHeight } = bounds(draggedTab.group?.hasAttribute("split-view-group") ? draggedTab.group : draggedTab);
|
||||
let translateX = event.screenX - dragData.screenX;
|
||||
let translateY = event.screenY - dragData.screenY;
|
||||
|
||||
@@ -2360,12 +2427,18 @@
|
||||
let lastTab = tabs.at(-1);
|
||||
@@ -2611,6 +2677,12 @@
|
||||
let lastTab = allTabs.at(this.#rtlMode ? 0 : -1);
|
||||
let lastMovingTab = movingTabs.at(-1);
|
||||
let firstMovingTab = movingTabs[0];
|
||||
+ if (lastMovingTab.group?.hasAttribute("split-view-group")) {
|
||||
@@ -395,22 +404,15 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
let endEdge = ele => ele[screenAxis] + bounds(ele)[size];
|
||||
let lastMovingTabScreen = endEdge(lastMovingTab);
|
||||
let firstMovingTabScreen = firstMovingTab[screenAxis];
|
||||
let shiftSize = lastMovingTabScreen - firstMovingTabScreen;
|
||||
let translate = screen - dragData[screenAxis];
|
||||
- if (!isPinned) {
|
||||
+ if (true) {
|
||||
translate +=
|
||||
this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos;
|
||||
} else if (isPinned && this.verticalMode) {
|
||||
@@ -2377,6 +2450,7 @@
|
||||
// - for unpinned tabs, between the first and last unpinned tab
|
||||
@@ -2619,6 +2691,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;
|
||||
+ lastBound = gZenPinnedTabManager.getLastTabBound(lastBound, lastTab, isDraggingFolder);
|
||||
translate = Math.min(Math.max(translate, firstBound), lastBound);
|
||||
|
||||
for (let item of movingTabs) {
|
||||
@@ -2384,6 +2458,9 @@
|
||||
// Center the tab under the cursor if the tab is not under the cursor while dragging
|
||||
if (
|
||||
@@ -2636,6 +2709,9 @@
|
||||
// Shift the `.tab-group-label-container` to shift the label element.
|
||||
item = item.parentElement;
|
||||
}
|
||||
@@ -420,7 +422,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
item.style.transform = `${translateAxis}(${translate}px)`;
|
||||
}
|
||||
|
||||
@@ -2521,6 +2598,9 @@
|
||||
@@ -2773,6 +2849,9 @@
|
||||
break;
|
||||
}
|
||||
let element = tabs[mid];
|
||||
@@ -430,7 +432,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
let elementForSize = isTabGroupLabel(element)
|
||||
? element.parentElement
|
||||
: element;
|
||||
@@ -2540,6 +2620,8 @@
|
||||
@@ -2792,6 +2871,8 @@
|
||||
};
|
||||
|
||||
let dropElement = getOverlappedElement();
|
||||
@@ -439,7 +441,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
|
||||
let newDropElementIndex;
|
||||
if (dropElement) {
|
||||
@@ -2604,7 +2686,7 @@
|
||||
@@ -2856,7 +2937,7 @@
|
||||
let shouldCreateGroupOnDrop;
|
||||
let dropBefore;
|
||||
if (dropElement) {
|
||||
@@ -448,7 +450,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
? dropElement.parentElement
|
||||
: dropElement;
|
||||
|
||||
@@ -2624,7 +2706,7 @@
|
||||
@@ -2876,7 +2957,7 @@
|
||||
? Services.prefs.getIntPref(
|
||||
"browser.tabs.dragDrop.moveOverThresholdPercent"
|
||||
) / 100
|
||||
@@ -457,7 +459,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
moveOverThreshold = Math.min(1, Math.max(0, moveOverThreshold));
|
||||
let shouldMoveOver = overlapPercent > moveOverThreshold;
|
||||
if (logicalForward && shouldMoveOver) {
|
||||
@@ -2656,44 +2738,21 @@
|
||||
@@ -2908,44 +2989,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.
|
||||
@@ -507,7 +509,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
// When dragging tab(s) over an ungrouped tab, signal to the user
|
||||
// that dropping the tab(s) will create a new tab group.
|
||||
shouldCreateGroupOnDrop =
|
||||
@@ -2703,12 +2762,6 @@
|
||||
@@ -2955,12 +3013,6 @@
|
||||
overlapPercent > dragOverGroupingThreshold;
|
||||
|
||||
if (shouldCreateGroupOnDrop) {
|
||||
@@ -520,7 +522,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
} else {
|
||||
this.removeAttribute("movingtab-createGroup");
|
||||
document
|
||||
@@ -2735,19 +2788,14 @@
|
||||
@@ -2987,19 +3039,14 @@
|
||||
dropElement = dropElementGroup;
|
||||
colorCode = undefined;
|
||||
} else if (isTabGroupLabel(dropElement)) {
|
||||
@@ -548,7 +550,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
}
|
||||
this.#setDragOverGroupColor(colorCode);
|
||||
this.toggleAttribute("movingtab-ungroup", !colorCode);
|
||||
@@ -2765,19 +2813,28 @@
|
||||
@@ -3017,19 +3064,28 @@
|
||||
dragData.dropElement = dropElement;
|
||||
dragData.dropBefore = dropBefore;
|
||||
dragData.animDropElementIndex = newDropElementIndex;
|
||||
@@ -579,7 +581,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
}
|
||||
item.style.transform = transform;
|
||||
}
|
||||
@@ -2830,12 +2887,14 @@
|
||||
@@ -3082,12 +3138,14 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -596,7 +598,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
|
||||
for (let item of this.ariaFocusableItems) {
|
||||
if (isTabGroupLabel(item)) {
|
||||
@@ -2843,6 +2902,18 @@
|
||||
@@ -3095,6 +3153,18 @@
|
||||
item = item.parentElement;
|
||||
}
|
||||
item.style.transform = "";
|
||||
@@ -615,7 +617,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
item.removeAttribute("dragover-createGroup");
|
||||
}
|
||||
this.removeAttribute("movingtab-createGroup");
|
||||
@@ -2889,7 +2960,7 @@
|
||||
@@ -3198,7 +3268,7 @@
|
||||
let postTransitionCleanup = () => {
|
||||
movingTab._moveTogetherSelectedTabsData.animate = false;
|
||||
};
|
||||
@@ -624,7 +626,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -3062,7 +3133,7 @@
|
||||
@@ -3371,7 +3441,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
@@ -633,7 +635,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3171,7 +3242,10 @@
|
||||
@@ -3480,7 +3550,10 @@
|
||||
#getDragTarget(event, { ignoreSides = false } = {}) {
|
||||
let { target } = event;
|
||||
while (target) {
|
||||
@@ -645,7 +647,7 @@ index 1fcebe3962398ff1b7cadef657ac8b68a80e720d..1cd2e9f24b3be1717493b4e663bc41d7
|
||||
break;
|
||||
}
|
||||
target = target.parentNode;
|
||||
@@ -3188,6 +3262,9 @@
|
||||
@@ -3497,6 +3570,9 @@
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user