Merge branch 'dev' into window-sync

This commit is contained in:
mr. m
2025-09-03 13:06:44 +02:00
committed by GitHub
127 changed files with 1156 additions and 471 deletions

View File

@@ -97,13 +97,13 @@
content/browser/zen-vendor/motion.min.mjs (../../zen/vendor/motion.min.mjs)
# FavIcons for startup
content/browser/zen-images/favicons/calendar.ico (../../zen/images/favicons/calendar.ico)
content/browser/zen-images/favicons/discord.ico (../../zen/images/favicons/discord.ico)
content/browser/zen-images/favicons/figma.ico (../../zen/images/favicons/figma.ico)
content/browser/zen-images/favicons/github.ico (../../zen/images/favicons/github.ico)
content/browser/zen-images/favicons/notion.ico (../../zen/images/favicons/notion.ico)
content/browser/zen-images/favicons/obsidian.ico (../../zen/images/favicons/obsidian.ico)
content/browser/zen-images/favicons/slack.ico (../../zen/images/favicons/slack.ico)
content/browser/zen-images/favicons/reddit.ico (../../zen/images/favicons/reddit.ico)
content/browser/zen-images/favicons/x.ico (../../zen/images/favicons/x.ico)
content/browser/zen-images/favicons/trello.ico (../../zen/images/favicons/trello.ico)
content/browser/zen-images/favicons/calendar.svg (../../zen/images/favicons/calendar.svg)
content/browser/zen-images/favicons/discord.svg (../../zen/images/favicons/discord.svg)
content/browser/zen-images/favicons/figma.svg (../../zen/images/favicons/figma.svg)
content/browser/zen-images/favicons/github.svg (../../zen/images/favicons/github.svg)
content/browser/zen-images/favicons/notion.svg (../../zen/images/favicons/notion.svg)
content/browser/zen-images/favicons/obsidian.svg (../../zen/images/favicons/obsidian.svg)
content/browser/zen-images/favicons/slack.svg (../../zen/images/favicons/slack.svg)
content/browser/zen-images/favicons/reddit.svg (../../zen/images/favicons/reddit.svg)
content/browser/zen-images/favicons/x.svg (../../zen/images/favicons/x.svg)
content/browser/zen-images/favicons/trello.svg (../../zen/images/favicons/trello.svg)

View File

@@ -8,8 +8,7 @@
<html:input id="zen-folder-tabs-list-search"
data-l10n-id="zen-folders-search-placeholder"
data-l10n-args="{&quot;folder-name&quot;:&quot;&quot;}"
type="search"
flex="1" />
type="search" />
</hbox>
<scrollbox class="zen-folder-tabs-list-scrollbox" flex="1">
<vbox id="zen-folder-tabs-list"></vbox>

View File

@@ -38,7 +38,6 @@
<menuseparator />
<menuitem id="context_zenFolderUnloadAll" data-l10n-id="zen-folders-unload-folder"/>
<menuitem id="context_zenFolderNewSubfolder" data-l10n-id="zen-folders-new-subfolder"/>
<menuitem id="context_zenFolderUnpack" data-l10n-id="zen-folders-panel-unpack-folder"/>
<menuseparator />
<menu id="context_zenChangeFolderSpace"
data-l10n-id="zen-folders-panel-change-folder-space">
@@ -46,5 +45,6 @@
</menu>
<menuitem id="context_zenFolderToSpace" data-l10n-id="zen-folders-panel-convert-folder-to-space" />
<menuseparator />
<menuitem id="context_zenFolderUnpack" data-l10n-id="zen-folders-panel-unpack-folder"/>
<menuitem id="context_zenFolderDelete" data-l10n-id="zen-folders-panel-delete-folder"/>
</menupopup>

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
index f9129fb171362e81369056923bf25acbb87d2ad8..924bcd2cd66a5dfcf9c45aac0c63cd0257c21a2c 100644
index 66ce978d9b022285dea67fdb75b3c005adb05d9b..db61587570ca18403a82ea6796a756d403cc207e 100644
--- a/browser/components/preferences/main.inc.xhtml
+++ b/browser/components/preferences/main.inc.xhtml
@@ -29,6 +29,9 @@
@@ -12,23 +12,17 @@ index f9129fb171362e81369056923bf25acbb87d2ad8..924bcd2cd66a5dfcf9c45aac0c63cd02
#ifdef XP_WIN
<hbox id="windowsLaunchOnLoginBox" align="center" hidden="true">
<checkbox id="windowsLaunchOnLogin"
@@ -186,6 +189,7 @@
</groupbox>
@@ -188,7 +191,8 @@
<!-- Browser layout -->
+#if 0
<groupbox data-category="paneGeneral"
data-subcategory="layout"
hidden="true">
@@ -201,6 +205,7 @@
preference="sidebar.revamp"/>
<description class="indent" data-l10n-id="browser-layout-show-sidebar-desc"></description>
</groupbox>
+#endif
<hbox id="languageAndAppearanceCategory"
class="subcategory"
@@ -421,6 +426,7 @@
- hidden="true">
+ hidden="true"
+ style="display: none !important;">
<label><html:h2 data-l10n-id="browser-layout-header"/></label>
<radiogroup id="browserLayoutRadioGroup" preference="sidebar.verticalTabs">
<radio id="browserLayoutHorizontalTabs" data-l10n-id="browser-layout-horizontal-tabs" value="false"/>
@@ -419,6 +423,7 @@
languages-customize-add.label,
" />
</hbox>

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index e954a8df26ed84731b08b151f90a758206946582..5b8013c71c6b50579668d16a5f7d5a82b5d43e4d 100644
index e954a8df26ed84731b08b151f90a758206946582..64ab1cce10324d574b49fe861975188c292756c3 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -2135,7 +2135,6 @@ var SessionStoreInternal = {
@@ -143,3 +143,12 @@ index e954a8df26ed84731b08b151f90a758206946582..5b8013c71c6b50579668d16a5f7d5a82
if (tabData.pinned) {
tabbrowser.pinTab(tab);
@@ -7266,7 +7289,7 @@ var SessionStoreInternal = {
let groupsToSave = new Map();
for (let tIndex = 0; tIndex < window.tabs.length; ) {
- if (window.tabs[tIndex].pinned) {
+ if (window.tabs[tIndex].pinned && false) {
// Adjust window.selected
if (tIndex + 1 < window.selected) {
window.selected -= 1;

View File

@@ -1,11 +1,15 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc58e2af77 100644
index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea99420448 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -422,15 +422,60 @@
@@ -422,15 +422,64 @@
return this.tabContainer.visibleTabs;
}
+ zenHandleTabMove(...args) {
+ return this.#handleTabMove(...args);
+ }
+
+ get _numVisiblePinTabsWithoutCollapsed() {
+ let i = 0;
+ for (let item of this.tabContainer.ariaFocusableItems) {
@@ -65,7 +69,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
set selectedTab(val) {
if (
gSharedTabWarning.willShowSharedTabWarning(val) ||
@@ -578,6 +623,7 @@
@@ -578,6 +627,7 @@
this.tabpanels.appendChild(panel);
let tab = this.tabs[0];
@@ -73,7 +77,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
tab.linkedPanel = uniqueId;
this._selectedTab = tab;
this._selectedBrowser = browser;
@@ -863,9 +909,13 @@
@@ -863,9 +913,13 @@
}
this.showTab(aTab);
@@ -88,7 +92,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
aTab.setAttribute("pinned", "true");
this._updateTabBarForPinnedTabs();
@@ -878,11 +928,15 @@
@@ -878,11 +932,15 @@
}
this.#handleTabMove(aTab, () => {
@@ -105,7 +109,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
});
aTab.style.marginInlineStart = "";
@@ -1060,6 +1114,8 @@
@@ -1060,6 +1118,8 @@
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
@@ -114,7 +118,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (
aIconURL &&
!aLoadingPrincipal &&
@@ -1070,6 +1126,9 @@
@@ -1070,6 +1130,9 @@
);
return;
}
@@ -124,7 +128,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
let browser = this.getBrowserForTab(aTab);
browser.mIconURL = aIconURL;
@@ -1319,6 +1378,7 @@
@@ -1319,6 +1382,7 @@
if (!this._previewMode) {
newTab.recordTimeFromUnloadToReload();
newTab.updateLastAccessed();
@@ -132,7 +136,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
oldTab.updateLastAccessed();
// if this is the foreground window, update the last-seen timestamps.
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
@@ -1471,6 +1531,9 @@
@@ -1471,6 +1535,9 @@
}
let activeEl = document.activeElement;
@@ -142,7 +146,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
// If focus is on the old tab, move it to the new tab.
if (activeEl == oldTab) {
newTab.focus();
@@ -1794,7 +1857,8 @@
@@ -1794,7 +1861,8 @@
}
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
@@ -152,7 +156,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
return false;
}
@@ -1902,7 +1966,7 @@
@@ -1902,7 +1970,7 @@
newIndex = this.selectedTab._tPos + 1;
}
@@ -161,7 +165,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (this.isTabGroupLabel(targetTab)) {
throw new Error(
"Replacing a tab group label with a tab is not supported"
@@ -2166,6 +2230,7 @@
@@ -2166,6 +2234,7 @@
uriIsAboutBlank,
userContextId,
skipLoad,
@@ -169,7 +173,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
} = {}) {
let b = document.createXULElement("browser");
// Use the JSM global to create the permanentKey, so that if the
@@ -2239,8 +2304,7 @@
@@ -2239,8 +2308,7 @@
// we use a different attribute name for this?
b.setAttribute("name", name);
}
@@ -179,7 +183,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
b.setAttribute("transparent", "true");
}
@@ -2405,7 +2469,7 @@
@@ -2405,7 +2473,7 @@
let panel = this.getPanel(browser);
let uniqueId = this._generateUniquePanelID();
@@ -188,7 +192,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
aTab.linkedPanel = uniqueId;
// Inject the <browser> into the DOM if necessary.
@@ -2464,8 +2528,8 @@
@@ -2464,8 +2532,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) {
@@ -199,7 +203,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
} else {
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
}
@@ -2629,7 +2693,6 @@
@@ -2629,7 +2697,6 @@
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
tabIndex: tab._tPos + 1,
userContextId: tab.userContextId,
@@ -207,7 +211,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
focusUrlBar: true,
});
resolve(this.selectedBrowser);
@@ -2709,6 +2772,8 @@
@@ -2709,6 +2776,8 @@
schemelessInput,
hasValidUserGestureActivation = false,
textDirectiveUserActivation = false,
@@ -216,7 +220,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
} = {}
) {
// all callers of addTab that pass a params object need to pass
@@ -2719,6 +2784,12 @@
@@ -2719,6 +2788,12 @@
);
}
@@ -229,7 +233,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (!UserInteraction.running("browser.tabs.opening", window)) {
UserInteraction.start("browser.tabs.opening", "initting", window);
}
@@ -2782,6 +2853,19 @@
@@ -2782,6 +2857,19 @@
noInitialLabel,
skipBackgroundNotify,
});
@@ -249,7 +253,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (insertTab) {
// Insert the tab into the tab container in the correct position.
this.#insertTabAtIndex(t, {
@@ -2790,6 +2874,7 @@
@@ -2790,6 +2878,7 @@
ownerTab,
openerTab,
pinned,
@@ -257,7 +261,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
bulkOrderedOpen,
tabGroup: tabGroup ?? openerTab?.group,
});
@@ -2808,6 +2893,7 @@
@@ -2808,6 +2897,7 @@
openWindowInfo,
skipLoad,
triggeringRemoteType,
@@ -265,7 +269,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
}));
if (focusUrlBar) {
@@ -2928,6 +3014,12 @@
@@ -2928,6 +3018,12 @@
}
}
@@ -278,7 +282,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
// Additionally send pinned tab events
if (pinned) {
this.#notifyPinnedStatus(t);
@@ -3016,10 +3108,10 @@
@@ -3016,10 +3112,10 @@
isAdoptingGroup = false,
isUserTriggered = false,
telemetryUserCreateSource = "unknown",
@@ -290,7 +294,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
}
if (!color) {
@@ -3040,9 +3132,14 @@
@@ -3040,9 +3136,14 @@
label,
isAdoptingGroup
);
@@ -307,7 +311,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
);
group.addTabs(tabs);
@@ -3163,7 +3260,7 @@
@@ -3163,7 +3264,7 @@
}
this.#handleTabMove(tab, () =>
@@ -316,7 +320,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
);
}
@@ -3365,6 +3462,7 @@
@@ -3365,6 +3466,7 @@
openWindowInfo,
skipLoad,
triggeringRemoteType,
@@ -324,7 +328,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
}
) {
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
@@ -3434,6 +3532,7 @@
@@ -3434,6 +3536,7 @@
openWindowInfo,
name,
skipLoad,
@@ -332,7 +336,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
});
}
@@ -3621,7 +3720,7 @@
@@ -3621,7 +3724,7 @@
// Add a new tab if needed.
if (!tab) {
let createLazyBrowser =
@@ -341,7 +345,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
let url = "about:blank";
if (tabData.entries?.length) {
@@ -3658,8 +3757,10 @@
@@ -3658,8 +3761,10 @@
insertTab: false,
skipLoad: true,
preferredRemoteType,
@@ -353,7 +357,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (select) {
tabToSelect = tab;
}
@@ -3671,7 +3772,8 @@
@@ -3671,7 +3776,8 @@
this.pinTab(tab);
// Then ensure all the tab open/pinning information is sent.
this._fireTabOpen(tab, {});
@@ -363,7 +367,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
let { groupId } = tabData;
const tabGroup = tabGroupWorkingData.get(groupId);
// if a tab refers to a tab group we don't know, skip any group
@@ -3685,7 +3787,10 @@
@@ -3685,7 +3791,10 @@
tabGroup.stateData.id,
tabGroup.stateData.color,
tabGroup.stateData.collapsed,
@@ -375,7 +379,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
);
tabsFragment.appendChild(tabGroup.node);
}
@@ -3730,9 +3835,23 @@
@@ -3730,9 +3839,23 @@
// to remove the old selected tab.
if (tabToSelect) {
let leftoverTab = this.selectedTab;
@@ -391,15 +395,22 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
+ gZenWorkspaces._initialTab._shouldRemove = true;
+ }
+ }
+ }
}
+ else {
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
}
+ }
+ this._hasAlreadyInitializedZenSessionStore = true;
if (tabs.length > 1 || !tabs[0].selected) {
this._updateTabsAfterInsert();
@@ -3927,7 +4046,7 @@
@@ -3923,11 +4046,14 @@
if (ownerTab) {
tab.owner = ownerTab;
}
+ if (!tab.pinned && tabGroup?.isZenFolder && !Services.prefs.getBoolPref('zen.folders.owned-tabs-in-folder')) {
+ tabGroup = null;
+ }
// Ensure we have an index if one was not provided.
if (typeof elementIndex != "number" && typeof tabIndex != "number") {
// Move the new tab after another tab if needed, to the end otherwise.
@@ -408,7 +419,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (
!bulkOrderedOpen &&
((openerTab &&
@@ -3939,7 +4058,7 @@
@@ -3939,7 +4065,7 @@
let lastRelatedTab =
openerTab && this._lastRelatedTabMap.get(openerTab);
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
@@ -417,7 +428,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
tabGroup = previousTab.group;
}
if (
@@ -3950,7 +4069,7 @@
@@ -3950,7 +4076,7 @@
) {
elementIndex = Infinity;
} else if (previousTab.visible) {
@@ -426,7 +437,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
} else if (previousTab == FirefoxViewHandler.tab) {
elementIndex = 0;
}
@@ -3978,14 +4097,14 @@
@@ -3978,14 +4104,14 @@
}
// Ensure index is within bounds.
if (tab.pinned) {
@@ -445,7 +456,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (pinned && !itemAfter?.pinned) {
itemAfter = null;
@@ -3996,7 +4115,7 @@
@@ -3996,7 +4122,7 @@
this.tabContainer._invalidateCachedTabs();
@@ -454,7 +465,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
// Place at the front of, or between tabs in, the same tab group
this.tabContainer.insertBefore(tab, itemAfter);
@@ -4032,6 +4151,7 @@
@@ -4032,6 +4158,7 @@
if (pinned) {
this._updateTabBarForPinnedTabs();
}
@@ -462,7 +473,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
TabBarVisibility.update();
}
@@ -4321,6 +4441,9 @@
@@ -4321,6 +4448,9 @@
return;
}
@@ -472,7 +483,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
this.removeTabs(selectedTabs, { isUserTriggered, telemetrySource });
}
@@ -4582,6 +4705,7 @@
@@ -4582,6 +4712,7 @@
telemetrySource,
} = {}
) {
@@ -480,7 +491,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
// can be considered equivalent to closing the window.
if (
@@ -4671,6 +4795,7 @@
@@ -4671,6 +4802,7 @@
if (lastToClose) {
this.removeTab(lastToClose, aParams);
}
@@ -488,7 +499,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
} catch (e) {
console.error(e);
}
@@ -4709,6 +4834,12 @@
@@ -4709,6 +4841,12 @@
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
}
@@ -501,7 +512,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
// Handle requests for synchronously removing an already
// asynchronously closing tab.
if (!animate && aTab.closing) {
@@ -4723,6 +4854,9 @@
@@ -4723,6 +4861,9 @@
// state).
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
let isLastTab = this.#isLastTabInWindow(aTab);
@@ -511,7 +522,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (
!this._beginRemoveTab(aTab, {
closeWindowFastpath: true,
@@ -4905,7 +5039,7 @@
@@ -4905,7 +5046,7 @@
closeWindowWithLastTab != null
? closeWindowWithLastTab
: !window.toolbar.visible ||
@@ -520,7 +531,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (closeWindow) {
// We've already called beforeunload on all the relevant tabs if we get here,
@@ -4929,6 +5063,7 @@
@@ -4929,6 +5070,7 @@
newTab = true;
}
@@ -528,7 +539,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
aTab._endRemoveArgs = [closeWindow, newTab];
// swapBrowsersAndCloseOther will take care of closing the window without animation.
@@ -4969,13 +5104,7 @@
@@ -4969,13 +5111,7 @@
aTab._mouseleave();
if (newTab) {
@@ -543,7 +554,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
} else {
TabBarVisibility.update();
}
@@ -5108,6 +5237,7 @@
@@ -5108,6 +5244,7 @@
this.tabs[i]._tPos = i;
}
@@ -551,7 +562,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (!this._windowIsClosing) {
// update tab close buttons state
this.tabContainer._updateCloseButtons();
@@ -5320,6 +5450,7 @@
@@ -5320,6 +5457,7 @@
}
let excludeTabs = new Set(aExcludeTabs);
@@ -559,7 +570,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
// If this tab has a successor, it should be selectable, since
// hiding or closing a tab removes that tab as a successor.
@@ -5332,13 +5463,13 @@
@@ -5332,13 +5470,13 @@
!excludeTabs.has(aTab.owner) &&
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
) {
@@ -575,7 +586,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
);
let tab = this.tabContainer.findNextTab(aTab, {
@@ -5354,7 +5485,7 @@
@@ -5354,7 +5492,7 @@
}
if (tab) {
@@ -584,7 +595,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
}
// If no qualifying visible tab was found, see if there is a tab in
@@ -5375,7 +5506,7 @@
@@ -5375,7 +5513,7 @@
});
}
@@ -593,7 +604,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
}
_blurTab(aTab) {
@@ -5777,10 +5908,10 @@
@@ -5777,10 +5915,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
}
@@ -606,7 +617,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
aTab.selected ||
aTab.closing ||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
@@ -5839,6 +5970,7 @@
@@ -5839,6 +5977,7 @@
* @param {MozTabbrowserTab|MozTabbrowserTabGroup|MozTabbrowserTabGroup.labelElement} aTab
*/
replaceTabWithWindow(aTab, aOptions) {
@@ -614,7 +625,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (this.tabs.length == 1) {
return null;
}
@@ -5972,7 +6104,7 @@
@@ -5972,7 +6111,7 @@
* `true` if element is a `<tab-group>`
*/
isTabGroup(element) {
@@ -623,16 +634,18 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
}
/**
@@ -6049,7 +6181,7 @@
@@ -6048,8 +6187,8 @@
}
// Don't allow mixing pinned and unpinned tabs.
if (this.isTab(element) && element.pinned) {
- if (this.isTab(element) && element.pinned) {
- tabIndex = Math.min(tabIndex, this.pinnedTabCount - 1);
+ if (element.pinned) {
+ tabIndex = element.hasAttribute('zen-essential') ? Math.min(tabIndex, this._numZenEssentials - 1) : Math.min(Math.max(tabIndex, this._numZenEssentials), this.pinnedTabCount - 1);
} else {
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
}
@@ -6075,10 +6207,16 @@
@@ -6075,10 +6214,16 @@
this.#handleTabMove(
element,
() => {
@@ -651,7 +664,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
neighbor.after(element);
} else {
@@ -6136,22 +6274,23 @@
@@ -6136,23 +6281,28 @@
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
if (this.isTabGroupLabel(targetElement)) {
targetElement = targetElement.group;
@@ -679,9 +692,14 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
- targetElement = this.tabs[this.pinnedTabCount - 1];
+ targetElement = this.tabsWithoutGlance[this.pinnedTabCount - 1];
moveBefore = false;
+ if (!this.visibleTabs.includes(targetElement)) {
+ targetElement = gZenWorkspaces.pinnedTabsContainer.querySelector('.pinned-tabs-container-separator')
+ moveBefore = true;
+ }
} else if (!element.pinned && targetElement && targetElement.pinned) {
// If the caller asks to move an unpinned element next to a pinned
@@ -6165,14 +6304,34 @@
// tab, move the unpinned element to be the first unpinned element
@@ -6165,14 +6315,34 @@
// 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.
@@ -717,7 +735,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
element.pinned
? this.tabContainer.pinnedTabsContainer
: this.tabContainer;
@@ -6181,7 +6340,7 @@
@@ -6181,7 +6351,7 @@
element,
() => {
if (moveBefore) {
@@ -726,7 +744,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
} else if (targetElement) {
targetElement.after(element);
} else {
@@ -6227,10 +6386,10 @@
@@ -6227,10 +6397,10 @@
* @param {TabMetricsContext} [metricsContext]
*/
moveTabToGroup(aTab, aGroup, metricsContext) {
@@ -739,7 +757,24 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
return;
}
if (aTab.group && aTab.group.id === aGroup.id) {
@@ -6324,6 +6483,10 @@
@@ -6261,6 +6431,7 @@
let state = {
tabIndex: tab._tPos,
+ workspaceId: tab.getAttribute("zen-workspace-id")
};
if (tab.visible) {
state.elementIndex = tab.elementIndex;
@@ -6287,7 +6458,7 @@
let changedTabGroup =
previousTabState.tabGroupId != currentTabState.tabGroupId;
- if (changedPosition || changedTabGroup) {
+ if (changedPosition || changedTabGroup || (previousTabState.workspaceId != currentTabState.workspaceId)) {
tab.dispatchEvent(
new CustomEvent("TabMove", {
bubbles: true,
@@ -6324,6 +6495,10 @@
moveActionCallback();
@@ -750,7 +785,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
// Clear tabs cache after moving nodes because the order of tabs may have
// changed.
this.tabContainer._invalidateCachedTabs();
@@ -7221,7 +7384,7 @@
@@ -7221,7 +7396,7 @@
// preventDefault(). It will still raise the window if appropriate.
break;
}
@@ -759,7 +794,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
window.focus();
aEvent.preventDefault();
break;
@@ -8166,6 +8329,7 @@
@@ -8166,6 +8341,7 @@
aWebProgress.isTopLevel
) {
this.mTab.setAttribute("busy", "true");
@@ -767,7 +802,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
gBrowser._tabAttrModified(this.mTab, ["busy"]);
this.mTab._notselectedsinceload = !this.mTab.selected;
}
@@ -9157,7 +9321,7 @@ var TabContextMenu = {
@@ -9157,7 +9333,7 @@ var TabContextMenu = {
);
contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !this.multiselected;
@@ -776,7 +811,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..4adabe030bfb322db1a9c95f71eb1adc
// Build Ask Chat items
TabContextMenu.GenAI.buildTabMenu(
document.getElementById("context_askChat"),
@@ -9476,6 +9640,7 @@ var TabContextMenu = {
@@ -9476,6 +9652,7 @@ var TabContextMenu = {
)
);
} else {

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
index caea196b22b4689f55780a528661d87b52f4e728..729848f1d3856bc4a5225e1a83cc10ef22819ca1 100644
index caea196b22b4689f55780a528661d87b52f4e728..725a2dfb10216df3e63d7980e2f1c99bf10038d7 100644
--- a/browser/components/tabbrowser/content/tabgroup.js
+++ b/browser/components/tabbrowser/content/tabgroup.js
@@ -13,10 +13,12 @@
@@ -166,16 +166,15 @@ index caea196b22b4689f55780a528661d87b52f4e728..729848f1d3856bc4a5225e1a83cc10ef
}
/**
@@ -373,7 +443,7 @@
*/
@@ -374,7 +444,6 @@
addTabs(tabs, metricsContext) {
for (let tab of tabs) {
- if (tab.pinned) {
+ if (tab.pinned !== this.pinned) {
tab.ownerGlobal.gBrowser.unpinTab(tab);
if (tab.pinned) {
- tab.ownerGlobal.gBrowser.unpinTab(tab);
}
let tabToMove =
@@ -437,7 +507,7 @@
this.ownerGlobal === tab.ownerGlobal
@@ -437,7 +506,7 @@
*/
on_click(event) {
let isToggleElement =
@@ -184,7 +183,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..729848f1d3856bc4a5225e1a83cc10ef
event.target === this.#overflowCountLabel;
if (isToggleElement && event.button === 0) {
event.preventDefault();
@@ -470,5 +540,6 @@
@@ -470,5 +539,6 @@
}
}

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c3b65f80b 100644
index e2b27db6c13278defea3bcc7606a8da54e7d001c..3033f5c98c94cf4b048432dfee72e20f4d8e37b6 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -332,7 +332,7 @@
@@ -19,7 +19,17 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
} else if (
event.originalTarget.closest("scrollbox") &&
!Services.prefs.getBoolPref(
@@ -686,7 +685,7 @@
@@ -449,6 +448,9 @@
}
on_keydown(event) {
+ if (document.documentElement.getAttribute('zen-renaming-tab') === 'true') {
+ return;
+ }
let { altKey, shiftKey } = event;
let [accel, nonAccel] =
AppConstants.platform == "macosx"
@@ -686,7 +688,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,7 +38,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let tabsPerRow = 0;
let position = RTL_UI
? window.windowUtils.getBoundsWithoutFlushing(
@@ -851,7 +850,7 @@
@@ -851,7 +853,7 @@
let dropEffect = this.getDropEffectForTabDrag(event);
let isMovingInTabStrip = !fromTabList && dropEffect == "move";
let collapseTabGroupDuringDrag =
@@ -37,7 +47,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
tab._dragData = {
offsetX: this.verticalMode
@@ -861,7 +860,7 @@
@@ -861,7 +863,7 @@
? event.screenY - window.screenY - tabOffset
: event.screenY - window.screenY,
scrollPos:
@@ -46,15 +56,15 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
? this.pinnedTabsContainer.scrollPosition
: this.arrowScrollbox.scrollPosition,
screenX: event.screenX,
@@ -886,6 +885,7 @@
if (tab.multiselected) {
@@ -887,6 +889,7 @@
this.#moveTogetherSelectedTabs(tab);
} else if (collapseTabGroupDuringDrag) {
+ gZenFolders.collapseVisibleTab(tab.group);
tab.group.collapsed = true;
+ gZenFolders.collapseVisibleTab(tab.group);
}
}
@@ -932,6 +932,10 @@
@@ -932,6 +935,10 @@
}
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
@@ -65,18 +75,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
if (
(dropEffect == "move" || dropEffect == "copy") &&
document == draggedTab.ownerDocument &&
@@ -1059,7 +1063,9 @@
isTabGroupLabel(draggedTab) &&
draggedTab._dragData?.expandGroupOnDrop
) {
- draggedTab.group.collapsed = false;
+ const isActive = draggedTab.group.hasAttribute("has-active");
+ draggedTab.group.collapsed = isActive;
+ if (isActive) gZenFolders.expandVisibleTab(draggedTab.group);
}
}
@@ -1095,6 +1101,18 @@
@@ -1095,6 +1102,18 @@
this._tabDropIndicator.hidden = true;
event.stopPropagation();
@@ -95,7 +94,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
if (draggedTab && dropEffect == "copy") {
let duplicatedDraggedTab;
let duplicatedTabs = [];
@@ -1119,8 +1137,9 @@
@@ -1119,8 +1138,9 @@
let translateOffsetY = oldTranslateY % tabHeight;
let newTranslateX = oldTranslateX - translateOffsetX;
let newTranslateY = oldTranslateY - translateOffsetY;
@@ -107,7 +106,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
if (this.#isContainerVerticalPinnedGrid(draggedTab)) {
// Update both translate axis for pinned vertical expanded tabs
@@ -1136,8 +1155,8 @@
@@ -1136,8 +1156,8 @@
}
} else {
let tabs = this.ariaFocusableItems.slice(
@@ -118,7 +117,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
);
let size = this.verticalMode ? "height" : "width";
let screenAxis = this.verticalMode ? "screenY" : "screenX";
@@ -1178,11 +1197,9 @@
@@ -1178,11 +1198,9 @@
}
let shouldPin =
@@ -132,7 +131,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let shouldTranslate =
!gReduceMotion &&
!shouldCreateGroupOnDrop &&
@@ -1195,6 +1212,7 @@
@@ -1195,6 +1213,7 @@
(oldTranslateY && oldTranslateY != newTranslateY);
} else if (this.verticalMode) {
shouldTranslate &&= oldTranslateY && oldTranslateY != newTranslateY;
@@ -140,7 +139,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
} else {
shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX;
}
@@ -1376,6 +1394,7 @@
@@ -1376,6 +1395,7 @@
let nextItem = this.ariaFocusableItems[newIndex];
let tabGroup = isTab(nextItem) && nextItem.group;
@@ -148,7 +147,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
gBrowser.loadTabs(urls, {
inBackground,
replace,
@@ -1408,6 +1427,17 @@
@@ -1408,6 +1428,17 @@
this.finishMoveTogetherSelectedTabs(draggedTab);
this.finishAnimateTabMove();
@@ -166,7 +165,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
this.#expandGroupOnDrop(draggedTab);
this.#resetTabsAfterDrop(draggedTab.ownerDocument);
@@ -1577,7 +1607,6 @@
@@ -1577,7 +1608,6 @@
this.toggleAttribute("overflow", true);
this._updateCloseButtons();
@@ -174,7 +173,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
document
.getElementById("tab-preview-panel")
@@ -1635,7 +1664,7 @@
@@ -1635,7 +1665,7 @@
}
get newTabButton() {
@@ -183,7 +182,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
}
get verticalMode() {
@@ -1651,6 +1680,7 @@
@@ -1651,6 +1681,7 @@
}
get overflowing() {
@@ -191,7 +190,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
return this.hasAttribute("overflow");
}
@@ -1659,26 +1689,54 @@
@@ -1659,26 +1690,54 @@
if (this.#allTabs) {
return this.#allTabs;
}
@@ -253,7 +252,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
}
/**
@@ -1745,32 +1803,27 @@
@@ -1745,32 +1804,27 @@
let elementIndex = 0;
@@ -295,7 +294,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
return this.#focusableItems;
}
@@ -1778,6 +1831,7 @@
@@ -1778,6 +1832,7 @@
_invalidateCachedTabs() {
this.#allTabs = null;
this._invalidateCachedVisibleTabs();
@@ -303,7 +302,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
}
_invalidateCachedVisibleTabs() {
@@ -1793,8 +1847,8 @@
@@ -1793,8 +1848,8 @@
#isContainerVerticalPinnedGrid(tab) {
return (
this.verticalMode &&
@@ -314,7 +313,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
!this.expandOnHover
);
}
@@ -1810,7 +1864,7 @@
@@ -1810,7 +1865,7 @@
if (node == null) {
// We have a container for non-tab elements at the end of the scrollbox.
@@ -323,7 +322,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
}
node.before(tab);
@@ -1905,7 +1959,7 @@
@@ -1905,7 +1960,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.
@@ -332,7 +331,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
const newTab2 = this.newTabButton;
const newTabVertical = document.getElementById(
"vertical-tabs-newtab-button"
@@ -2000,10 +2054,12 @@
@@ -2000,10 +2055,12 @@
_handleTabSelect(aInstant) {
let selectedTab = this.selectedItem;
@@ -345,7 +344,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
selectedTab._notselectedsinceload = false;
}
@@ -2140,6 +2196,16 @@
@@ -2140,6 +2197,16 @@
when the tab is first selected to be dragged.
*/
#updateTabStylesOnDrag(tab) {
@@ -362,7 +361,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let isPinned = tab.pinned;
let numPinned = gBrowser.pinnedTabCount;
let allTabs = this.ariaFocusableItems;
@@ -2398,7 +2464,7 @@
@@ -2398,7 +2465,7 @@
return;
}
@@ -371,7 +370,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let directionX = screenX > dragData.animLastScreenX;
let directionY = screenY > dragData.animLastScreenY;
@@ -2407,6 +2473,8 @@
@@ -2407,6 +2474,8 @@
let { width: tabWidth, height: tabHeight } =
draggedTab.getBoundingClientRect();
@@ -380,7 +379,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let shiftSizeX = tabWidth * movingTabs.length;
let shiftSizeY = tabHeight;
dragData.tabWidth = tabWidth;
@@ -2443,8 +2511,8 @@
@@ -2443,8 +2512,8 @@
let lastBoundX =
lastTabInRow.screenX +
lastTabInRow.getBoundingClientRect().width -
@@ -391,7 +390,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
translateX = Math.min(Math.max(translateX, firstBoundX), lastBoundX);
translateY = Math.min(Math.max(translateY, firstBoundY), lastBoundY);
@@ -2560,7 +2628,7 @@
@@ -2560,7 +2629,7 @@
}
dragData.animDropElementIndex = newIndex;
@@ -400,7 +399,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
dragData.dropBefore = newIndex < tabs.length;
// Shift background tabs to leave a gap where the dragged tab
@@ -2593,13 +2661,18 @@
@@ -2593,13 +2662,18 @@
this.#clearDragOverCreateGroupTimer();
@@ -423,7 +422,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
if (this.#rtlMode) {
tabs.reverse();
@@ -2610,7 +2683,7 @@
@@ -2610,7 +2684,7 @@
let screenAxis = this.verticalMode ? "screenY" : "screenX";
let size = this.verticalMode ? "height" : "width";
let translateAxis = this.verticalMode ? "translateY" : "translateX";
@@ -432,7 +431,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let translateX = event.screenX - dragData.screenX;
let translateY = event.screenY - dragData.screenY;
@@ -2620,10 +2693,16 @@
@@ -2620,10 +2694,16 @@
dragData.translateY = translateY;
// Move the dragged tab based on the mouse position.
@@ -451,7 +450,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let endEdge = ele => ele[screenAxis] + bounds(ele)[size];
let lastMovingTabScreen = endEdge(lastMovingTab);
let firstMovingTabScreen = firstMovingTab[screenAxis];
@@ -2632,6 +2711,7 @@
@@ -2632,6 +2712,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;
@@ -459,7 +458,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
// Center the tab under the cursor if the tab is not under the cursor while dragging
if (
@@ -2649,6 +2729,9 @@
@@ -2649,6 +2730,9 @@
// Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement;
}
@@ -469,7 +468,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
item.style.transform = `${translateAxis}(${translate}px)`;
}
@@ -2786,6 +2869,9 @@
@@ -2786,6 +2870,9 @@
break;
}
let element = tabs[mid];
@@ -479,7 +478,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let elementForSize = isTabGroupLabel(element)
? element.parentElement
: element;
@@ -2805,6 +2891,8 @@
@@ -2805,6 +2892,8 @@
};
let dropElement = getOverlappedElement();
@@ -488,7 +487,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
let newDropElementIndex;
if (dropElement) {
@@ -2869,7 +2957,10 @@
@@ -2869,7 +2958,10 @@
let shouldCreateGroupOnDrop;
let dropBefore;
if (dropElement) {
@@ -500,7 +499,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
? dropElement.parentElement
: dropElement;
@@ -2889,7 +2980,7 @@
@@ -2889,7 +2981,7 @@
? Services.prefs.getIntPref(
"browser.tabs.dragDrop.moveOverThresholdPercent"
) / 100
@@ -509,7 +508,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
moveOverThreshold = Math.min(1, Math.max(0, moveOverThreshold));
let shouldMoveOver = overlapPercent > moveOverThreshold;
if (logicalForward && shouldMoveOver) {
@@ -2921,44 +3012,21 @@
@@ -2921,44 +3013,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.
@@ -559,7 +558,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
// When dragging tab(s) over an ungrouped tab, signal to the user
// that dropping the tab(s) will create a new tab group.
shouldCreateGroupOnDrop =
@@ -2968,12 +3036,6 @@
@@ -2968,12 +3037,6 @@
overlapPercent > dragOverGroupingThreshold;
if (shouldCreateGroupOnDrop) {
@@ -572,7 +571,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
} else {
this.removeAttribute("movingtab-createGroup");
document
@@ -3000,19 +3062,14 @@
@@ -3000,19 +3063,14 @@
dropElement = dropElementGroup;
colorCode = undefined;
} else if (isTabGroupLabel(dropElement)) {
@@ -600,7 +599,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
}
this.#setDragOverGroupColor(colorCode);
this.toggleAttribute("movingtab-ungroup", !colorCode);
@@ -3030,19 +3087,28 @@
@@ -3030,19 +3088,28 @@
dragData.dropElement = dropElement;
dragData.dropBefore = dropBefore;
dragData.animDropElementIndex = newDropElementIndex;
@@ -631,7 +630,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
}
item.style.transform = transform;
}
@@ -3095,12 +3161,14 @@
@@ -3095,12 +3162,14 @@
);
}
@@ -648,7 +647,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
for (let item of this.ariaFocusableItems) {
if (isTabGroupLabel(item)) {
@@ -3108,6 +3176,18 @@
@@ -3108,6 +3177,18 @@
item = item.parentElement;
}
item.style.transform = "";
@@ -667,7 +666,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
item.removeAttribute("dragover-createGroup");
}
this.removeAttribute("movingtab-createGroup");
@@ -3129,16 +3209,15 @@
@@ -3129,16 +3210,15 @@
tab.style.left = "";
tab.style.top = "";
tab.style.maxWidth = "";
@@ -686,7 +685,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
}
let periphery = draggedTabDocument.getElementById(
"tabbrowser-arrowscrollbox-periphery"
@@ -3211,7 +3290,7 @@
@@ -3211,7 +3291,7 @@
let postTransitionCleanup = () => {
movingTab._moveTogetherSelectedTabsData.animate = false;
};
@@ -695,7 +694,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
postTransitionCleanup();
} else {
let onTransitionEnd = transitionendEvent => {
@@ -3384,7 +3463,7 @@
@@ -3384,7 +3464,7 @@
}
_notifyBackgroundTab(aTab) {
@@ -704,7 +703,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
return;
}
@@ -3493,7 +3572,10 @@
@@ -3493,7 +3573,10 @@
#getDragTarget(event, { ignoreSides = false } = {}) {
let { target } = event;
while (target) {
@@ -716,7 +715,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..016d58789918235cc3a41f33ee402c2c
break;
}
target = target.parentNode;
@@ -3510,6 +3592,9 @@
@@ -3510,6 +3593,9 @@
return null;
}
}

View File

@@ -582,7 +582,9 @@ groupbox h2 {
#dataCollectionGroup,
#websiteAdvertisingCategory,
#websiteAdvertisingGroup,
#helpButton {
#helpButton,
#support-firefox,
.mission-message {
display: none !important;
}
@@ -596,3 +598,9 @@ groupbox h2 {
display: none;
}
}
@media -moz-pref('zen.urlbar.replace-newtab') {
#category-home {
display: none !important;
}
}

View File

@@ -2,6 +2,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg width="24" height="24" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.25 7C10.25 6.30964 10.8097 5.75 11.5 5.75C12.1904 5.75 12.75 6.30964 12.75 7V9.74469L14.8375 8.44C15.4229 8.07411 16.1941 8.25208 16.56 8.8375C16.9259 9.42292 16.7479 10.1941 16.1625 10.56L13.8585 12L16.1625 13.44C16.7479 13.8059 16.9259 14.5771 16.56 15.1625C16.1941 15.7479 15.4229 15.9259 14.8375 15.56L12.75 14.2553V17C12.75 17.6904 12.1904 18.25 11.5 18.25C10.8097 18.25 10.25 17.6904 10.25 17V14.2553L8.16251 15.56C7.57709 15.9259 6.8059 15.7479 6.44002 15.1625C6.07413 14.5771 6.2521 13.8059 6.83752 13.44L9.14152 12L6.83752 10.56C6.2521 10.1941 6.07413 9.42292 6.44002 8.8375C6.8059 8.25208 7.57709 8.07411 8.16251 8.44L10.25 9.74469V7Z" fill="context-fill" fill-opacity="context-fill-opacity"/>
</svg>

View File

@@ -35,7 +35,8 @@
#stop-button,
.close-icon,
.zen-glance-sidebar-close,
.zen-theme-picker-custom-list-item-remove {
.zen-theme-picker-custom-list-item-remove,
#appMenu-quit-button2 {
list-style-image: url('close.svg') !important;
}
@@ -343,6 +344,7 @@
}
#identity-popup[connection='chrome'] .identity-popup-security-connection {
list-style-image: url('chrome://branding/content/icon48.png') !important;
filter: grayscale(1);
}