mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-02 10:04:37 +00:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5efe62739 | ||
|
|
e34ed3e882 | ||
|
|
658e35ebde | ||
|
|
1176f5ac8b | ||
|
|
4de01a9bc9 | ||
|
|
35a9a9ea2a | ||
|
|
e78e2488ff | ||
|
|
1c23ad92b3 | ||
|
|
32ba6ef81b | ||
|
|
a8559f84c1 | ||
|
|
0e07f65bc0 | ||
|
|
4046dd01a1 | ||
|
|
e51592898e | ||
|
|
9afbd1befd | ||
|
|
ccc1e998da | ||
|
|
3a51b36a05 | ||
|
|
e05cb0e0dc | ||
|
|
a892721306 | ||
|
|
950f6dfb66 | ||
|
|
9b6937650d | ||
|
|
2c63376782 | ||
|
|
f5356dbcb6 | ||
|
|
45ecacfb04 | ||
|
|
4327684f9f | ||
|
|
8997a24996 | ||
|
|
5a6a565b0f | ||
|
|
d39fff2e4a | ||
|
|
ab12e72cc5 | ||
|
|
8a2e015048 | ||
|
|
83de087b0b | ||
|
|
5dea28a3cb | ||
|
|
956841a76e | ||
|
|
3f03ffb27b | ||
|
|
5b685bc26d | ||
|
|
6b255eabec | ||
|
|
1da0bed725 | ||
|
|
a806bc7d0f | ||
|
|
e0484d6fd6 | ||
|
|
60a9463708 | ||
|
|
f476a62144 | ||
|
|
acd75771e1 | ||
|
|
0d2667432c | ||
|
|
9d70b1a9f6 | ||
|
|
7af6cae278 | ||
|
|
51f7202b93 | ||
|
|
c6c2a2fe5a | ||
|
|
116d70d08a | ||
|
|
fdf453d34e | ||
|
|
404fe069cd |
@@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
|
|||||||
|
|
||||||
### Firefox Versions
|
### Firefox Versions
|
||||||
|
|
||||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `147.0.1`! 🚀
|
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `147.0.2`! 🚀
|
||||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 147.0.1`!
|
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 147.0.2`!
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
783b222b1b93fb9e8c52eb57558ef7f07bca6e7e
|
7712a9ac90683965f71be525fe2827467632715d
|
||||||
@@ -20,7 +20,6 @@ finish-args:
|
|||||||
- --socket=cups
|
- --socket=cups
|
||||||
- --persist=.zen
|
- --persist=.zen
|
||||||
- --env=DICPATH=/usr/share/hunspell
|
- --env=DICPATH=/usr/share/hunspell
|
||||||
- --filesystem=xdg-config/gtk-3.0:ro
|
|
||||||
- --filesystem=xdg-download:rw
|
- --filesystem=xdg-download:rw
|
||||||
- --filesystem=/run/.heim_org.h5l.kcm-socket
|
- --filesystem=/run/.heim_org.h5l.kcm-socket
|
||||||
- --filesystem=xdg-run/speech-dispatcher:ro
|
- --filesystem=xdg-run/speech-dispatcher:ro
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ function SignAndPackage($name) {
|
|||||||
$env:WIN32_REDIST_DIR="$PWD\win-cross\vs2022\VC\Redist\MSVC\14.38.33135\x64\Microsoft.VC143.CRT"
|
$env:WIN32_REDIST_DIR="$PWD\win-cross\vs2022\VC\Redist\MSVC\14.38.33135\x64\Microsoft.VC143.CRT"
|
||||||
}
|
}
|
||||||
|
|
||||||
$env:MAR="..\\build\\winsign\\mar.exe"
|
$env:MAR="..\\build\\windows\\mar.exe"
|
||||||
if ($name -eq "arm64") {
|
if ($name -eq "arm64") {
|
||||||
$env:SURFER_COMPAT="aarch64"
|
$env:SURFER_COMPAT="aarch64"
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ category-zen-workspaces =
|
|||||||
.tooltiptext = { pane-zen-tabs-title }
|
.tooltiptext = { pane-zen-tabs-title }
|
||||||
pane-settings-workspaces-title = Workspaces
|
pane-settings-workspaces-title = Workspaces
|
||||||
|
|
||||||
zen-tabs-unloader-enabled =
|
zen-tabs-select-recently-used-on-close =
|
||||||
.label = Enable Tab Unloader
|
.label = When closing a tab, switch to the most recently used tab instead of the next tab
|
||||||
|
|
||||||
zen-tabs-close-on-back-with-no-history =
|
zen-tabs-close-on-back-with-no-history =
|
||||||
.label = Close tab and switch to its owner tab (or most recently used tab) when going back with no history
|
.label = Close tab and switch to its owner tab (or most recently used tab) when going back with no history
|
||||||
|
|||||||
@@ -23,4 +23,4 @@ zen-menubar-appearance-dark =
|
|||||||
.label = Dark
|
.label = Dark
|
||||||
|
|
||||||
zen-menubar-new-unsynced-window =
|
zen-menubar-new-unsynced-window =
|
||||||
.label = New Blank Window
|
.label = New blank window
|
||||||
@@ -6,7 +6,10 @@
|
|||||||
value: true
|
value: true
|
||||||
|
|
||||||
- name: zen.session-store.log
|
- name: zen.session-store.log
|
||||||
value: "@IS_TWILIGHT@"
|
value: true
|
||||||
|
|
||||||
- name: zen.session-store.restore-unsynced-windows
|
- name: zen.session-store.restore-unsynced-windows
|
||||||
value: true
|
value: true
|
||||||
|
|
||||||
|
- name: browser.sessionstore.max_windows_undo
|
||||||
|
value: 2
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
value: true
|
value: true
|
||||||
|
|
||||||
- name: zen.workspaces.dnd-switch-padding
|
- name: zen.workspaces.dnd-switch-padding
|
||||||
value: 4
|
value: 5
|
||||||
|
|
||||||
- name: zen.workspaces.debug
|
- name: zen.workspaces.debug
|
||||||
value: "@cond"
|
value: "@cond"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
value: 20 # Percentage of folder height to trigger dragover
|
value: 20 # Percentage of folder height to trigger dragover
|
||||||
|
|
||||||
- name: zen.tabs.dnd-switch-space-delay
|
- name: zen.tabs.dnd-switch-space-delay
|
||||||
value: 1000 # milliseconds
|
value: 800 # milliseconds
|
||||||
|
|
||||||
- name: zen.ctrlTab.show-pending-tabs
|
- name: zen.ctrlTab.show-pending-tabs
|
||||||
value: false
|
value: false
|
||||||
|
|||||||
@@ -1193,6 +1193,11 @@ Preferences.addAll([
|
|||||||
type: "bool",
|
type: "bool",
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "zen.tabs.select-recently-used-on-close",
|
||||||
|
type: "bool",
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Preferences.addSetting({
|
Preferences.addSetting({
|
||||||
|
|||||||
@@ -37,15 +37,10 @@
|
|||||||
class="description-deemphasized"
|
class="description-deemphasized"
|
||||||
data-l10n-id="zen-tabs-cycle-by-attribute-warning"
|
data-l10n-id="zen-tabs-cycle-by-attribute-warning"
|
||||||
hidden="true"/>
|
hidden="true"/>
|
||||||
|
<checkbox data-l10n-id="zen-tabs-select-recently-used-on-close"
|
||||||
|
preference="zen.tabs.select-recently-used-on-close"/>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<hbox id="zenTabsUnloadCategory"
|
|
||||||
class="subcategory"
|
|
||||||
hidden="true"
|
|
||||||
data-category="paneZenTabManagement">
|
|
||||||
<html:h1 data-l10n-id="pane-zen-tabs-unloader-title"/>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
<hbox id="zenPinnedTabsManagerCategory"
|
<hbox id="zenPinnedTabsManagerCategory"
|
||||||
class="subcategory"
|
class="subcategory"
|
||||||
hidden="true"
|
hidden="true"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||||
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2e8fe19ff 100644
|
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..2f63071f78782dbc30bde25b3bcaa96faedf6f0b 100644
|
||||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||||
@@ -127,6 +127,9 @@ const TAB_EVENTS = [
|
@@ -127,6 +127,9 @@ const TAB_EVENTS = [
|
||||||
@@ -54,6 +54,15 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
let tabbrowser = aWindow.gBrowser;
|
let tabbrowser = aWindow.gBrowser;
|
||||||
|
|
||||||
// add tab change listeners to all already existing tabs
|
// add tab change listeners to all already existing tabs
|
||||||
|
@@ -2076,7 +2085,7 @@ var SessionStoreInternal = {
|
||||||
|
let isTaskbarTab = this._windows[aWindow.__SSi].isTaskbarTab;
|
||||||
|
// A regular window is not a private window, taskbar tab window, or popup window
|
||||||
|
let isRegularWindow =
|
||||||
|
- !isPrivateWindow && !isTaskbarTab && aWindow.toolbar.visible;
|
||||||
|
+ !isPrivateWindow && !isTaskbarTab && aWindow.toolbar.visible && !this._windows[aWindow.__SSi].isZenUnsynced;
|
||||||
|
|
||||||
|
// perform additional initialization when the first window is loading
|
||||||
|
if (lazy.RunState.isStopped) {
|
||||||
@@ -2131,6 +2140,7 @@ var SessionStoreInternal = {
|
@@ -2131,6 +2140,7 @@ var SessionStoreInternal = {
|
||||||
null,
|
null,
|
||||||
"sessionstore-one-or-no-tab-restored"
|
"sessionstore-one-or-no-tab-restored"
|
||||||
@@ -95,36 +104,56 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
|
|
||||||
TAB_EVENTS.forEach(function (aEvent) {
|
TAB_EVENTS.forEach(function (aEvent) {
|
||||||
tabbrowser.tabContainer.removeEventListener(aEvent, this, true);
|
tabbrowser.tabContainer.removeEventListener(aEvent, this, true);
|
||||||
@@ -2491,7 +2509,7 @@ var SessionStoreInternal = {
|
@@ -2434,7 +2452,7 @@ var SessionStoreInternal = {
|
||||||
|
|
||||||
|
let isLastRegularWindow =
|
||||||
|
Object.values(this._windows).filter(
|
||||||
|
- wData => !wData.isPrivate && !wData.isTaskbarTab
|
||||||
|
+ wData => !wData.isPrivate && !wData.isTaskbarTab && !wData.isZenUnsynced
|
||||||
|
).length == 1;
|
||||||
|
this._log.debug(
|
||||||
|
`onClose, closing window isLastRegularWindow? ${isLastRegularWindow}`
|
||||||
|
@@ -2491,8 +2509,8 @@ var SessionStoreInternal = {
|
||||||
// 2) Flush the window.
|
// 2) Flush the window.
|
||||||
// 3) When the flush is complete, revisit our decision to store the window
|
// 3) When the flush is complete, revisit our decision to store the window
|
||||||
// in _closedWindows, and add/remove as necessary.
|
// in _closedWindows, and add/remove as necessary.
|
||||||
- if (!winData.isPrivate && !winData.isTaskbarTab) {
|
- if (!winData.isPrivate && !winData.isTaskbarTab) {
|
||||||
|
- this.maybeSaveClosedWindow(winData, isLastWindow);
|
||||||
+ if (!winData.isPrivate && !winData.isTaskbarTab && !winData.isZenUnsynced) {
|
+ if (!winData.isPrivate && !winData.isTaskbarTab && !winData.isZenUnsynced) {
|
||||||
this.maybeSaveClosedWindow(winData, isLastWindow);
|
+ this.maybeSaveClosedWindow(winData, isLastWindow, isLastRegularWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2512,7 +2530,8 @@ var SessionStoreInternal = {
|
completionPromise = lazy.TabStateFlusher.flushWindow(aWindow).then(() => {
|
||||||
|
@@ -2512,8 +2530,9 @@ var SessionStoreInternal = {
|
||||||
|
|
||||||
// Save non-private windows if they have at
|
// Save non-private windows if they have at
|
||||||
// least one saveable tab or are the last window.
|
// least one saveable tab or are the last window.
|
||||||
- if (!winData.isPrivate && !winData.isTaskbarTab) {
|
- if (!winData.isPrivate && !winData.isTaskbarTab) {
|
||||||
|
- this.maybeSaveClosedWindow(winData, isLastWindow);
|
||||||
+ lazy.ZenWindowSync.on_WindowCloseAndBrowserFlushed(browsers);
|
+ lazy.ZenWindowSync.on_WindowCloseAndBrowserFlushed(browsers);
|
||||||
+ if (!winData.isPrivate && !winData.isTaskbarTab && !winData.isZenUnsynced) {
|
+ if (!winData.isPrivate && !winData.isTaskbarTab && !winData.isZenUnsynced) {
|
||||||
this.maybeSaveClosedWindow(winData, isLastWindow);
|
+ this.maybeSaveClosedWindow(winData, isLastWindow, isLastRegularWindow);
|
||||||
|
|
||||||
if (!isLastWindow && winData.closedId > -1) {
|
if (!isLastWindow && winData.closedId > -1) {
|
||||||
@@ -2608,6 +2627,9 @@ var SessionStoreInternal = {
|
this._addClosedAction(
|
||||||
|
@@ -2589,7 +2608,7 @@ var SessionStoreInternal = {
|
||||||
|
* to call this method again asynchronously (for example, after
|
||||||
|
* a window flush).
|
||||||
|
*/
|
||||||
|
- maybeSaveClosedWindow(winData, isLastWindow) {
|
||||||
|
+ maybeSaveClosedWindow(winData, isLastWindow, isLastRegularWindow = false) {
|
||||||
|
// Make sure SessionStore is still running, and make sure that we
|
||||||
|
// haven't chosen to forget this window.
|
||||||
|
if (
|
||||||
|
@@ -2606,6 +2625,7 @@ var SessionStoreInternal = {
|
||||||
|
// _closedWindows from a previous call to this function.
|
||||||
|
let winIndex = this._closedWindows.indexOf(winData);
|
||||||
let alreadyStored = winIndex != -1;
|
let alreadyStored = winIndex != -1;
|
||||||
|
+ lazy.ZenSessionStore.maybeSaveClosedWindow(winData, isLastRegularWindow);
|
||||||
// If sidebar command is truthy, i.e. sidebar is open, store sidebar settings
|
// If sidebar command is truthy, i.e. sidebar is open, store sidebar settings
|
||||||
let shouldStore = hasSaveableTabs || isLastWindow;
|
let shouldStore = hasSaveableTabs || isLastWindow;
|
||||||
+ lazy.ZenSessionStore.maybeSaveClosedWindow(winData, isLastWindow);
|
|
||||||
+ // TODO: Do we want to store closed Zen windows? All of them are synced anyways
|
|
||||||
+ shouldStore = false;
|
|
||||||
|
|
||||||
if (shouldStore && !alreadyStored) {
|
@@ -3408,7 +3428,7 @@ var SessionStoreInternal = {
|
||||||
let index = this._closedWindows.findIndex(win => {
|
|
||||||
@@ -3408,7 +3430,7 @@ var SessionStoreInternal = {
|
|
||||||
if (!isPrivateWindow && tabState.isPrivate) {
|
if (!isPrivateWindow && tabState.isPrivate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -133,7 +162,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4129,6 +4151,12 @@ var SessionStoreInternal = {
|
@@ -4129,6 +4149,12 @@ var SessionStoreInternal = {
|
||||||
Math.min(tabState.index, tabState.entries.length)
|
Math.min(tabState.index, tabState.entries.length)
|
||||||
);
|
);
|
||||||
tabState.pinned = false;
|
tabState.pinned = false;
|
||||||
@@ -146,7 +175,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
|
|
||||||
if (inBackground === false) {
|
if (inBackground === false) {
|
||||||
aWindow.gBrowser.selectedTab = newTab;
|
aWindow.gBrowser.selectedTab = newTab;
|
||||||
@@ -4565,6 +4593,8 @@ var SessionStoreInternal = {
|
@@ -4565,6 +4591,8 @@ var SessionStoreInternal = {
|
||||||
// Append the tab if we're opening into a different window,
|
// Append the tab if we're opening into a different window,
|
||||||
tabIndex: aSource == aTargetWindow ? pos : Infinity,
|
tabIndex: aSource == aTargetWindow ? pos : Infinity,
|
||||||
pinned: state.pinned,
|
pinned: state.pinned,
|
||||||
@@ -155,7 +184,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
userContextId: state.userContextId,
|
userContextId: state.userContextId,
|
||||||
skipLoad: true,
|
skipLoad: true,
|
||||||
preferredRemoteType,
|
preferredRemoteType,
|
||||||
@@ -5414,7 +5444,7 @@ var SessionStoreInternal = {
|
@@ -5414,7 +5442,7 @@ var SessionStoreInternal = {
|
||||||
|
|
||||||
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
|
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
|
||||||
let tab = tabbrowser.tabs[i];
|
let tab = tabbrowser.tabs[i];
|
||||||
@@ -164,7 +193,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
removableTabs.push(tab);
|
removableTabs.push(tab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5525,7 +5555,7 @@ var SessionStoreInternal = {
|
@@ -5525,7 +5553,7 @@ var SessionStoreInternal = {
|
||||||
|
|
||||||
// collect the data for all windows
|
// collect the data for all windows
|
||||||
for (ix in this._windows) {
|
for (ix in this._windows) {
|
||||||
@@ -173,7 +202,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
// window data is still in _statesToRestore
|
// window data is still in _statesToRestore
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -5668,11 +5698,12 @@ var SessionStoreInternal = {
|
@@ -5668,11 +5696,12 @@ var SessionStoreInternal = {
|
||||||
}
|
}
|
||||||
|
|
||||||
let tabbrowser = aWindow.gBrowser;
|
let tabbrowser = aWindow.gBrowser;
|
||||||
@@ -187,7 +216,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
// update the internal state data for this window
|
// update the internal state data for this window
|
||||||
for (let tab of tabs) {
|
for (let tab of tabs) {
|
||||||
if (tab == aWindow.FirefoxViewHandler.tab) {
|
if (tab == aWindow.FirefoxViewHandler.tab) {
|
||||||
@@ -5683,6 +5714,9 @@ var SessionStoreInternal = {
|
@@ -5683,6 +5712,9 @@ var SessionStoreInternal = {
|
||||||
tabsData.push(tabData);
|
tabsData.push(tabData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,7 +226,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
// update tab group state for this window
|
// update tab group state for this window
|
||||||
winData.groups = [];
|
winData.groups = [];
|
||||||
for (let tabGroup of aWindow.gBrowser.tabGroups) {
|
for (let tabGroup of aWindow.gBrowser.tabGroups) {
|
||||||
@@ -5695,7 +5729,7 @@ var SessionStoreInternal = {
|
@@ -5695,7 +5727,7 @@ var SessionStoreInternal = {
|
||||||
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
|
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
|
||||||
// since it's only inserted into the tab strip after it's selected).
|
// since it's only inserted into the tab strip after it's selected).
|
||||||
if (aWindow.FirefoxViewHandler.tab?.selected) {
|
if (aWindow.FirefoxViewHandler.tab?.selected) {
|
||||||
@@ -206,7 +235,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
winData.title = tabbrowser.tabs[0].label;
|
winData.title = tabbrowser.tabs[0].label;
|
||||||
}
|
}
|
||||||
winData.selected = selectedIndex;
|
winData.selected = selectedIndex;
|
||||||
@@ -5810,8 +5844,8 @@ var SessionStoreInternal = {
|
@@ -5810,8 +5842,8 @@ var SessionStoreInternal = {
|
||||||
// selectTab represents.
|
// selectTab represents.
|
||||||
let selectTab = 0;
|
let selectTab = 0;
|
||||||
if (overwriteTabs) {
|
if (overwriteTabs) {
|
||||||
@@ -217,7 +246,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
selectTab = Math.min(selectTab, winData.tabs.length);
|
selectTab = Math.min(selectTab, winData.tabs.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5833,6 +5867,7 @@ var SessionStoreInternal = {
|
@@ -5833,6 +5865,7 @@ var SessionStoreInternal = {
|
||||||
if (overwriteTabs) {
|
if (overwriteTabs) {
|
||||||
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
|
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
|
||||||
if (!tabbrowser.tabs[i].selected) {
|
if (!tabbrowser.tabs[i].selected) {
|
||||||
@@ -225,7 +254,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
tabbrowser.removeTab(tabbrowser.tabs[i]);
|
tabbrowser.removeTab(tabbrowser.tabs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5866,6 +5901,12 @@ var SessionStoreInternal = {
|
@@ -5866,6 +5899,12 @@ var SessionStoreInternal = {
|
||||||
savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id)
|
savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -238,7 +267,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
|
|
||||||
// Move the originally open tabs to the end.
|
// Move the originally open tabs to the end.
|
||||||
if (initialTabs) {
|
if (initialTabs) {
|
||||||
@@ -6419,6 +6460,25 @@ var SessionStoreInternal = {
|
@@ -6419,6 +6458,25 @@ var SessionStoreInternal = {
|
||||||
|
|
||||||
// Most of tabData has been restored, now continue with restoring
|
// Most of tabData has been restored, now continue with restoring
|
||||||
// attributes that may trigger external events.
|
// attributes that may trigger external events.
|
||||||
@@ -264,7 +293,17 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
|
|
||||||
if (tabData.pinned) {
|
if (tabData.pinned) {
|
||||||
tabbrowser.pinTab(tab);
|
tabbrowser.pinTab(tab);
|
||||||
@@ -7343,7 +7403,7 @@ var SessionStoreInternal = {
|
@@ -6567,6 +6625,9 @@ var SessionStoreInternal = {
|
||||||
|
aWindow.gURLBar.readOnly = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ if (aWinData.isZenUnsynced) {
|
||||||
|
+ this._windows[aWindow.__SSi].isZenUnsynced = true;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
let promiseParts = Promise.withResolvers();
|
||||||
|
aWindow.setTimeout(() => {
|
||||||
|
@@ -7343,7 +7404,7 @@ var SessionStoreInternal = {
|
||||||
|
|
||||||
let groupsToSave = new Map();
|
let groupsToSave = new Map();
|
||||||
for (let tIndex = 0; tIndex < window.tabs.length; ) {
|
for (let tIndex = 0; tIndex < window.tabs.length; ) {
|
||||||
@@ -273,7 +312,7 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..cd350d9e787c1ef0d1dffcb7d872b9c2
|
|||||||
// Adjust window.selected
|
// Adjust window.selected
|
||||||
if (tIndex + 1 < window.selected) {
|
if (tIndex + 1 < window.selected) {
|
||||||
window.selected -= 1;
|
window.selected -= 1;
|
||||||
@@ -7358,7 +7418,7 @@ var SessionStoreInternal = {
|
@@ -7358,7 +7419,7 @@ var SessionStoreInternal = {
|
||||||
);
|
);
|
||||||
// We don't want to increment tIndex here.
|
// We don't want to increment tIndex here.
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a1417570d4f1266 100644
|
index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..7f759f43a4aa1e0d96f8003a50c5df269ec4a131 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
@@ -398,6 +398,7 @@
|
@@ -398,6 +398,7 @@
|
||||||
@@ -119,7 +119,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
aTab.setAttribute("pinned", "true");
|
aTab.setAttribute("pinned", "true");
|
||||||
this._updateTabBarForPinnedTabs();
|
this._updateTabBarForPinnedTabs();
|
||||||
@@ -931,11 +994,18 @@
|
@@ -931,11 +994,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#handleTabMove(aTab, () => {
|
this.#handleTabMove(aTab, () => {
|
||||||
@@ -133,13 +133,14 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
// and back into arrowscrollbox.
|
// and back into arrowscrollbox.
|
||||||
aTab.removeAttribute("pinned");
|
aTab.removeAttribute("pinned");
|
||||||
- this.tabContainer.arrowScrollbox.prepend(aTab);
|
- this.tabContainer.arrowScrollbox.prepend(aTab);
|
||||||
|
+ aTab.removeAttribute("zen-essential");
|
||||||
+ if (!handled) {
|
+ if (!handled) {
|
||||||
+ gZenWorkspaces.activeWorkspaceStrip.prepend(aTab);
|
+ gZenWorkspaces.activeWorkspaceStrip.prepend(aTab);
|
||||||
+ }
|
+ }
|
||||||
});
|
});
|
||||||
|
|
||||||
aTab.style.marginInlineStart = "";
|
aTab.style.marginInlineStart = "";
|
||||||
@@ -1112,6 +1182,9 @@
|
@@ -1112,6 +1183,9 @@
|
||||||
|
|
||||||
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
|
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
|
||||||
|
|
||||||
@@ -149,7 +150,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (
|
if (
|
||||||
aIconURL &&
|
aIconURL &&
|
||||||
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
|
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
|
||||||
@@ -1121,6 +1194,9 @@
|
@@ -1121,6 +1195,9 @@
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -159,7 +160,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
let browser = this.getBrowserForTab(aTab);
|
let browser = this.getBrowserForTab(aTab);
|
||||||
browser.mIconURL = aIconURL;
|
browser.mIconURL = aIconURL;
|
||||||
@@ -1393,7 +1469,6 @@
|
@@ -1393,7 +1470,6 @@
|
||||||
|
|
||||||
// Preview mode should not reset the owner
|
// Preview mode should not reset the owner
|
||||||
if (!this._previewMode && !oldTab.selected) {
|
if (!this._previewMode && !oldTab.selected) {
|
||||||
@@ -167,7 +168,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}
|
}
|
||||||
|
|
||||||
let lastRelatedTab = this._lastRelatedTabMap.get(oldTab);
|
let lastRelatedTab = this._lastRelatedTabMap.get(oldTab);
|
||||||
@@ -1484,6 +1559,7 @@
|
@@ -1484,6 +1560,7 @@
|
||||||
if (!this._previewMode) {
|
if (!this._previewMode) {
|
||||||
newTab.recordTimeFromUnloadToReload();
|
newTab.recordTimeFromUnloadToReload();
|
||||||
newTab.updateLastAccessed();
|
newTab.updateLastAccessed();
|
||||||
@@ -175,7 +176,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
oldTab.updateLastAccessed();
|
oldTab.updateLastAccessed();
|
||||||
// if this is the foreground window, update the last-seen timestamps.
|
// if this is the foreground window, update the last-seen timestamps.
|
||||||
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
|
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
|
||||||
@@ -1636,6 +1712,9 @@
|
@@ -1636,6 +1713,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let activeEl = document.activeElement;
|
let activeEl = document.activeElement;
|
||||||
@@ -185,7 +186,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
// If focus is on the old tab, move it to the new tab.
|
// If focus is on the old tab, move it to the new tab.
|
||||||
if (activeEl == oldTab) {
|
if (activeEl == oldTab) {
|
||||||
newTab.focus();
|
newTab.focus();
|
||||||
@@ -1959,6 +2038,11 @@
|
@@ -1959,6 +2039,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
|
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
|
||||||
@@ -197,7 +198,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (!aLabel || aLabel.includes("about:reader?")) {
|
if (!aLabel || aLabel.includes("about:reader?")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2067,7 +2151,7 @@
|
@@ -2067,7 +2152,7 @@
|
||||||
newIndex = this.selectedTab._tPos + 1;
|
newIndex = this.selectedTab._tPos + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +207,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (this.isTabGroupLabel(targetTab)) {
|
if (this.isTabGroupLabel(targetTab)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Replacing a tab group label with a tab is not supported"
|
"Replacing a tab group label with a tab is not supported"
|
||||||
@@ -2342,6 +2426,7 @@
|
@@ -2342,6 +2427,7 @@
|
||||||
uriIsAboutBlank,
|
uriIsAboutBlank,
|
||||||
userContextId,
|
userContextId,
|
||||||
skipLoad,
|
skipLoad,
|
||||||
@@ -214,7 +215,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} = {}) {
|
} = {}) {
|
||||||
let b = document.createXULElement("browser");
|
let b = document.createXULElement("browser");
|
||||||
// Use the JSM global to create the permanentKey, so that if the
|
// Use the JSM global to create the permanentKey, so that if the
|
||||||
@@ -2415,8 +2500,7 @@
|
@@ -2415,8 +2501,7 @@
|
||||||
// we use a different attribute name for this?
|
// we use a different attribute name for this?
|
||||||
b.setAttribute("name", name);
|
b.setAttribute("name", name);
|
||||||
}
|
}
|
||||||
@@ -224,7 +225,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
b.setAttribute("transparent", "true");
|
b.setAttribute("transparent", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2581,7 +2665,7 @@
|
@@ -2581,7 +2666,7 @@
|
||||||
|
|
||||||
let panel = this.getPanel(browser);
|
let panel = this.getPanel(browser);
|
||||||
let uniqueId = this._generateUniquePanelID();
|
let uniqueId = this._generateUniquePanelID();
|
||||||
@@ -233,7 +234,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
aTab.linkedPanel = uniqueId;
|
aTab.linkedPanel = uniqueId;
|
||||||
|
|
||||||
// Inject the <browser> into the DOM if necessary.
|
// Inject the <browser> into the DOM if necessary.
|
||||||
@@ -2640,8 +2724,8 @@
|
@@ -2640,8 +2725,8 @@
|
||||||
// If we transitioned from one browser to two browsers, we need to set
|
// If we transitioned from one browser to two browsers, we need to set
|
||||||
// hasSiblings=false on both the existing browser and the new browser.
|
// hasSiblings=false on both the existing browser and the new browser.
|
||||||
if (this.tabs.length == 2) {
|
if (this.tabs.length == 2) {
|
||||||
@@ -244,7 +245,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} else {
|
} else {
|
||||||
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
||||||
}
|
}
|
||||||
@@ -2828,7 +2912,6 @@
|
@@ -2828,7 +2913,6 @@
|
||||||
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
|
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
|
||||||
tabIndex: tab._tPos + 1,
|
tabIndex: tab._tPos + 1,
|
||||||
userContextId: tab.userContextId,
|
userContextId: tab.userContextId,
|
||||||
@@ -252,7 +253,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
focusUrlBar: true,
|
focusUrlBar: true,
|
||||||
});
|
});
|
||||||
resolve(this.selectedBrowser);
|
resolve(this.selectedBrowser);
|
||||||
@@ -2938,6 +3021,9 @@
|
@@ -2938,6 +3022,9 @@
|
||||||
schemelessInput,
|
schemelessInput,
|
||||||
hasValidUserGestureActivation = false,
|
hasValidUserGestureActivation = false,
|
||||||
textDirectiveUserActivation = false,
|
textDirectiveUserActivation = false,
|
||||||
@@ -262,7 +263,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
// all callers of addTab that pass a params object need to pass
|
// all callers of addTab that pass a params object need to pass
|
||||||
@@ -2948,10 +3034,17 @@
|
@@ -2948,10 +3035,17 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +281,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
// If we're opening a foreground tab, set the owner by default.
|
// If we're opening a foreground tab, set the owner by default.
|
||||||
ownerTab ??= inBackground ? null : this.selectedTab;
|
ownerTab ??= inBackground ? null : this.selectedTab;
|
||||||
|
|
||||||
@@ -2959,6 +3052,7 @@
|
@@ -2959,6 +3053,7 @@
|
||||||
if (this.selectedTab.owner) {
|
if (this.selectedTab.owner) {
|
||||||
this.selectedTab.owner = null;
|
this.selectedTab.owner = null;
|
||||||
}
|
}
|
||||||
@@ -288,7 +289,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
// Find the tab that opened this one, if any. This is used for
|
// Find the tab that opened this one, if any. This is used for
|
||||||
// determining positioning, and inherited attributes such as the
|
// determining positioning, and inherited attributes such as the
|
||||||
@@ -3011,6 +3105,22 @@
|
@@ -3011,6 +3106,22 @@
|
||||||
noInitialLabel,
|
noInitialLabel,
|
||||||
skipBackgroundNotify,
|
skipBackgroundNotify,
|
||||||
});
|
});
|
||||||
@@ -311,7 +312,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (insertTab) {
|
if (insertTab) {
|
||||||
// Insert the tab into the tab container in the correct position.
|
// Insert the tab into the tab container in the correct position.
|
||||||
this.#insertTabAtIndex(t, {
|
this.#insertTabAtIndex(t, {
|
||||||
@@ -3019,6 +3129,7 @@
|
@@ -3019,6 +3130,7 @@
|
||||||
ownerTab,
|
ownerTab,
|
||||||
openerTab,
|
openerTab,
|
||||||
pinned,
|
pinned,
|
||||||
@@ -319,7 +320,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
bulkOrderedOpen,
|
bulkOrderedOpen,
|
||||||
tabGroup: tabGroup ?? openerTab?.group,
|
tabGroup: tabGroup ?? openerTab?.group,
|
||||||
});
|
});
|
||||||
@@ -3037,6 +3148,7 @@
|
@@ -3037,6 +3149,7 @@
|
||||||
openWindowInfo,
|
openWindowInfo,
|
||||||
skipLoad,
|
skipLoad,
|
||||||
triggeringRemoteType,
|
triggeringRemoteType,
|
||||||
@@ -327,7 +328,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
if (focusUrlBar) {
|
if (focusUrlBar) {
|
||||||
@@ -3161,6 +3273,12 @@
|
@@ -3161,6 +3274,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +341,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
// Additionally send pinned tab events
|
// Additionally send pinned tab events
|
||||||
if (pinned) {
|
if (pinned) {
|
||||||
this.#notifyPinnedStatus(t);
|
this.#notifyPinnedStatus(t);
|
||||||
@@ -3375,6 +3493,7 @@
|
@@ -3375,6 +3494,7 @@
|
||||||
isAdoptingGroup = false,
|
isAdoptingGroup = false,
|
||||||
isUserTriggered = false,
|
isUserTriggered = false,
|
||||||
telemetryUserCreateSource = "unknown",
|
telemetryUserCreateSource = "unknown",
|
||||||
@@ -348,7 +349,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
if (
|
if (
|
||||||
@@ -3385,9 +3504,6 @@
|
@@ -3385,9 +3505,6 @@
|
||||||
!this.isSplitViewWrapper(tabOrSplitView)
|
!this.isSplitViewWrapper(tabOrSplitView)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
@@ -358,7 +359,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!color) {
|
if (!color) {
|
||||||
@@ -3408,9 +3524,14 @@
|
@@ -3408,9 +3525,14 @@
|
||||||
label,
|
label,
|
||||||
isAdoptingGroup
|
isAdoptingGroup
|
||||||
);
|
);
|
||||||
@@ -375,7 +376,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
);
|
);
|
||||||
group.addTabs(tabsAndSplitViews);
|
group.addTabs(tabsAndSplitViews);
|
||||||
|
|
||||||
@@ -3531,7 +3652,7 @@
|
@@ -3531,7 +3653,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#handleTabMove(tab, () =>
|
this.#handleTabMove(tab, () =>
|
||||||
@@ -384,7 +385,15 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3746,6 +3867,7 @@
|
@@ -3599,6 +3721,7 @@
|
||||||
|
color: group.color,
|
||||||
|
insertBefore: newTabs[0],
|
||||||
|
isAdoptingGroup: true,
|
||||||
|
+ forSplitView: group.hasAttribute('split-view-group'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -3746,6 +3869,7 @@
|
||||||
openWindowInfo,
|
openWindowInfo,
|
||||||
skipLoad,
|
skipLoad,
|
||||||
triggeringRemoteType,
|
triggeringRemoteType,
|
||||||
@@ -392,7 +401,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
|
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
|
||||||
@@ -3815,6 +3937,7 @@
|
@@ -3815,6 +3939,7 @@
|
||||||
openWindowInfo,
|
openWindowInfo,
|
||||||
name,
|
name,
|
||||||
skipLoad,
|
skipLoad,
|
||||||
@@ -400,7 +409,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4003,7 +4126,7 @@
|
@@ -4003,7 +4128,7 @@
|
||||||
// Add a new tab if needed.
|
// Add a new tab if needed.
|
||||||
if (!tab) {
|
if (!tab) {
|
||||||
let createLazyBrowser =
|
let createLazyBrowser =
|
||||||
@@ -409,7 +418,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
let url = "about:blank";
|
let url = "about:blank";
|
||||||
if (tabData.entries?.length) {
|
if (tabData.entries?.length) {
|
||||||
@@ -4040,8 +4163,10 @@
|
@@ -4040,8 +4165,10 @@
|
||||||
insertTab: false,
|
insertTab: false,
|
||||||
skipLoad: true,
|
skipLoad: true,
|
||||||
preferredRemoteType,
|
preferredRemoteType,
|
||||||
@@ -421,7 +430,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (select) {
|
if (select) {
|
||||||
tabToSelect = tab;
|
tabToSelect = tab;
|
||||||
}
|
}
|
||||||
@@ -4053,7 +4178,8 @@
|
@@ -4053,7 +4180,8 @@
|
||||||
this.pinTab(tab);
|
this.pinTab(tab);
|
||||||
// Then ensure all the tab open/pinning information is sent.
|
// Then ensure all the tab open/pinning information is sent.
|
||||||
this._fireTabOpen(tab, {});
|
this._fireTabOpen(tab, {});
|
||||||
@@ -431,7 +440,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
let { groupId } = tabData;
|
let { groupId } = tabData;
|
||||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||||
// if a tab refers to a tab group we don't know, skip any group
|
// if a tab refers to a tab group we don't know, skip any group
|
||||||
@@ -4067,7 +4193,10 @@
|
@@ -4067,7 +4195,10 @@
|
||||||
tabGroup.stateData.id,
|
tabGroup.stateData.id,
|
||||||
tabGroup.stateData.color,
|
tabGroup.stateData.color,
|
||||||
tabGroup.stateData.collapsed,
|
tabGroup.stateData.collapsed,
|
||||||
@@ -443,7 +452,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
);
|
);
|
||||||
tabsFragment.appendChild(tabGroup.node);
|
tabsFragment.appendChild(tabGroup.node);
|
||||||
}
|
}
|
||||||
@@ -4112,9 +4241,23 @@
|
@@ -4112,9 +4243,23 @@
|
||||||
// to remove the old selected tab.
|
// to remove the old selected tab.
|
||||||
if (tabToSelect) {
|
if (tabToSelect) {
|
||||||
let leftoverTab = this.selectedTab;
|
let leftoverTab = this.selectedTab;
|
||||||
@@ -459,15 +468,15 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
+ gZenWorkspaces._initialTab._shouldRemove = true;
|
+ gZenWorkspaces._initialTab._shouldRemove = true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
}
|
+ }
|
||||||
+ else {
|
+ else {
|
||||||
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
|
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
|
||||||
+ }
|
}
|
||||||
+ this._hasAlreadyInitializedZenSessionStore = true;
|
+ this._hasAlreadyInitializedZenSessionStore = true;
|
||||||
|
|
||||||
if (tabs.length > 1 || !tabs[0].selected) {
|
if (tabs.length > 1 || !tabs[0].selected) {
|
||||||
this._updateTabsAfterInsert();
|
this._updateTabsAfterInsert();
|
||||||
@@ -4305,11 +4448,14 @@
|
@@ -4305,11 +4450,14 @@
|
||||||
if (ownerTab) {
|
if (ownerTab) {
|
||||||
tab.owner = ownerTab;
|
tab.owner = ownerTab;
|
||||||
}
|
}
|
||||||
@@ -483,7 +492,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (
|
if (
|
||||||
!bulkOrderedOpen &&
|
!bulkOrderedOpen &&
|
||||||
((openerTab &&
|
((openerTab &&
|
||||||
@@ -4321,7 +4467,7 @@
|
@@ -4321,7 +4469,7 @@
|
||||||
let lastRelatedTab =
|
let lastRelatedTab =
|
||||||
openerTab && this._lastRelatedTabMap.get(openerTab);
|
openerTab && this._lastRelatedTabMap.get(openerTab);
|
||||||
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
|
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
|
||||||
@@ -492,7 +501,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
tabGroup = previousTab.group;
|
tabGroup = previousTab.group;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
@@ -4337,7 +4483,7 @@
|
@@ -4337,7 +4485,7 @@
|
||||||
previousTab.splitview
|
previousTab.splitview
|
||||||
) + 1;
|
) + 1;
|
||||||
} else if (previousTab.visible) {
|
} else if (previousTab.visible) {
|
||||||
@@ -501,7 +510,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} else if (previousTab == FirefoxViewHandler.tab) {
|
} else if (previousTab == FirefoxViewHandler.tab) {
|
||||||
elementIndex = 0;
|
elementIndex = 0;
|
||||||
}
|
}
|
||||||
@@ -4365,14 +4511,14 @@
|
@@ -4365,14 +4513,14 @@
|
||||||
}
|
}
|
||||||
// Ensure index is within bounds.
|
// Ensure index is within bounds.
|
||||||
if (tab.pinned) {
|
if (tab.pinned) {
|
||||||
@@ -520,7 +529,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
if (pinned && !itemAfter?.pinned) {
|
if (pinned && !itemAfter?.pinned) {
|
||||||
itemAfter = null;
|
itemAfter = null;
|
||||||
@@ -4385,7 +4531,7 @@
|
@@ -4385,7 +4533,7 @@
|
||||||
|
|
||||||
this.tabContainer._invalidateCachedTabs();
|
this.tabContainer._invalidateCachedTabs();
|
||||||
|
|
||||||
@@ -529,7 +538,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (
|
if (
|
||||||
(this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
|
(this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
|
||||||
this.isSplitViewWrapper(itemAfter)
|
this.isSplitViewWrapper(itemAfter)
|
||||||
@@ -4416,7 +4562,11 @@
|
@@ -4416,7 +4564,11 @@
|
||||||
const tabContainer = pinned
|
const tabContainer = pinned
|
||||||
? this.tabContainer.pinnedTabsContainer
|
? this.tabContainer.pinnedTabsContainer
|
||||||
: this.tabContainer;
|
: this.tabContainer;
|
||||||
@@ -541,7 +550,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tab.group?.collapsed) {
|
if (tab.group?.collapsed) {
|
||||||
@@ -4431,6 +4581,7 @@
|
@@ -4431,6 +4583,7 @@
|
||||||
if (pinned) {
|
if (pinned) {
|
||||||
this._updateTabBarForPinnedTabs();
|
this._updateTabBarForPinnedTabs();
|
||||||
}
|
}
|
||||||
@@ -549,7 +558,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
TabBarVisibility.update();
|
TabBarVisibility.update();
|
||||||
}
|
}
|
||||||
@@ -4983,6 +5134,7 @@
|
@@ -4983,6 +5136,7 @@
|
||||||
telemetrySource,
|
telemetrySource,
|
||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
@@ -557,7 +566,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||||
// can be considered equivalent to closing the window.
|
// can be considered equivalent to closing the window.
|
||||||
if (
|
if (
|
||||||
@@ -5072,6 +5224,7 @@
|
@@ -5072,6 +5226,7 @@
|
||||||
if (lastToClose) {
|
if (lastToClose) {
|
||||||
this.removeTab(lastToClose, aParams);
|
this.removeTab(lastToClose, aParams);
|
||||||
}
|
}
|
||||||
@@ -565,7 +574,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
@@ -5110,6 +5263,12 @@
|
@@ -5110,6 +5265,12 @@
|
||||||
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
|
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -578,7 +587,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
// Handle requests for synchronously removing an already
|
// Handle requests for synchronously removing an already
|
||||||
// asynchronously closing tab.
|
// asynchronously closing tab.
|
||||||
if (!animate && aTab.closing) {
|
if (!animate && aTab.closing) {
|
||||||
@@ -5124,6 +5283,9 @@
|
@@ -5124,6 +5285,9 @@
|
||||||
// state).
|
// state).
|
||||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||||
let isLastTab = this.#isLastTabInWindow(aTab);
|
let isLastTab = this.#isLastTabInWindow(aTab);
|
||||||
@@ -588,7 +597,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (
|
if (
|
||||||
!this._beginRemoveTab(aTab, {
|
!this._beginRemoveTab(aTab, {
|
||||||
closeWindowFastpath: true,
|
closeWindowFastpath: true,
|
||||||
@@ -5172,7 +5334,13 @@
|
@@ -5172,7 +5336,13 @@
|
||||||
// We're not animating, so we can cancel the animation stopwatch.
|
// We're not animating, so we can cancel the animation stopwatch.
|
||||||
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
|
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
|
||||||
aTab._closeTimeAnimTimerId = null;
|
aTab._closeTimeAnimTimerId = null;
|
||||||
@@ -603,7 +612,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5306,7 +5474,7 @@
|
@@ -5306,7 +5476,7 @@
|
||||||
closeWindowWithLastTab != null
|
closeWindowWithLastTab != null
|
||||||
? closeWindowWithLastTab
|
? closeWindowWithLastTab
|
||||||
: !window.toolbar.visible ||
|
: !window.toolbar.visible ||
|
||||||
@@ -612,7 +621,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
if (closeWindow) {
|
if (closeWindow) {
|
||||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||||
@@ -5330,6 +5498,7 @@
|
@@ -5330,6 +5500,7 @@
|
||||||
|
|
||||||
newTab = true;
|
newTab = true;
|
||||||
}
|
}
|
||||||
@@ -620,7 +629,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||||
|
|
||||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||||
@@ -5370,13 +5539,7 @@
|
@@ -5370,13 +5541,7 @@
|
||||||
aTab._mouseleave();
|
aTab._mouseleave();
|
||||||
|
|
||||||
if (newTab) {
|
if (newTab) {
|
||||||
@@ -635,7 +644,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} else {
|
} else {
|
||||||
TabBarVisibility.update();
|
TabBarVisibility.update();
|
||||||
}
|
}
|
||||||
@@ -5509,6 +5672,7 @@
|
@@ -5509,6 +5674,7 @@
|
||||||
this.tabs[i]._tPos = i;
|
this.tabs[i]._tPos = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -643,7 +652,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (!this._windowIsClosing) {
|
if (!this._windowIsClosing) {
|
||||||
// update tab close buttons state
|
// update tab close buttons state
|
||||||
this.tabContainer._updateCloseButtons();
|
this.tabContainer._updateCloseButtons();
|
||||||
@@ -5732,6 +5896,7 @@
|
@@ -5732,6 +5898,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let excludeTabs = new Set(aExcludeTabs);
|
let excludeTabs = new Set(aExcludeTabs);
|
||||||
@@ -651,7 +660,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
// If this tab has a successor, it should be selectable, since
|
// If this tab has a successor, it should be selectable, since
|
||||||
// hiding or closing a tab removes that tab as a successor.
|
// hiding or closing a tab removes that tab as a successor.
|
||||||
@@ -5744,15 +5909,22 @@
|
@@ -5744,15 +5911,22 @@
|
||||||
!excludeTabs.has(aTab.owner) &&
|
!excludeTabs.has(aTab.owner) &&
|
||||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||||
) {
|
) {
|
||||||
@@ -676,7 +685,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
let tab = this.tabContainer.findNextTab(aTab, {
|
let tab = this.tabContainer.findNextTab(aTab, {
|
||||||
direction: 1,
|
direction: 1,
|
||||||
filter: _tab => remainingTabs.includes(_tab),
|
filter: _tab => remainingTabs.includes(_tab),
|
||||||
@@ -5766,7 +5938,7 @@
|
@@ -5766,7 +5940,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tab) {
|
if (tab) {
|
||||||
@@ -685,7 +694,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If no qualifying visible tab was found, see if there is a tab in
|
// If no qualifying visible tab was found, see if there is a tab in
|
||||||
@@ -5787,7 +5959,7 @@
|
@@ -5787,7 +5961,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -694,7 +703,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}
|
}
|
||||||
|
|
||||||
_blurTab(aTab) {
|
_blurTab(aTab) {
|
||||||
@@ -5798,7 +5970,7 @@
|
@@ -5798,7 +5972,7 @@
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
* False if swapping isn't permitted, true otherwise.
|
* False if swapping isn't permitted, true otherwise.
|
||||||
*/
|
*/
|
||||||
@@ -703,7 +712,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
// Do not allow transfering a private tab to a non-private window
|
// Do not allow transfering a private tab to a non-private window
|
||||||
// and vice versa.
|
// and vice versa.
|
||||||
if (
|
if (
|
||||||
@@ -5852,6 +6024,7 @@
|
@@ -5852,6 +6026,7 @@
|
||||||
// fire the beforeunload event in the process. Close the other
|
// fire the beforeunload event in the process. Close the other
|
||||||
// window if this was its last tab.
|
// window if this was its last tab.
|
||||||
if (
|
if (
|
||||||
@@ -711,7 +720,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
!remoteBrowser._beginRemoveTab(aOtherTab, {
|
!remoteBrowser._beginRemoveTab(aOtherTab, {
|
||||||
adoptedByTab: aOurTab,
|
adoptedByTab: aOurTab,
|
||||||
closeWindowWithLastTab: true,
|
closeWindowWithLastTab: true,
|
||||||
@@ -5863,7 +6036,7 @@
|
@@ -5863,7 +6038,7 @@
|
||||||
// If this is the last tab of the window, hide the window
|
// If this is the last tab of the window, hide the window
|
||||||
// immediately without animation before the docshell swap, to avoid
|
// immediately without animation before the docshell swap, to avoid
|
||||||
// about:blank being painted.
|
// about:blank being painted.
|
||||||
@@ -720,7 +729,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (closeWindow) {
|
if (closeWindow) {
|
||||||
let win = aOtherTab.ownerGlobal;
|
let win = aOtherTab.ownerGlobal;
|
||||||
win.windowUtils.suppressAnimation(true);
|
win.windowUtils.suppressAnimation(true);
|
||||||
@@ -5987,11 +6160,13 @@
|
@@ -5987,11 +6162,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finish tearing down the tab that's going away.
|
// Finish tearing down the tab that's going away.
|
||||||
@@ -734,7 +743,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
this.setTabTitle(aOurTab);
|
this.setTabTitle(aOurTab);
|
||||||
|
|
||||||
@@ -6193,10 +6368,10 @@
|
@@ -6193,10 +6370,10 @@
|
||||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -747,7 +756,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
aTab.selected ||
|
aTab.selected ||
|
||||||
aTab.closing ||
|
aTab.closing ||
|
||||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||||
@@ -6254,7 +6429,8 @@
|
@@ -6254,7 +6431,8 @@
|
||||||
*
|
*
|
||||||
* @param {MozTabbrowserTab|MozTabbrowserTabGroup|MozTabbrowserTabGroup.labelElement} aTab
|
* @param {MozTabbrowserTab|MozTabbrowserTabGroup|MozTabbrowserTabGroup.labelElement} aTab
|
||||||
*/
|
*/
|
||||||
@@ -757,7 +766,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (this.tabs.length == 1) {
|
if (this.tabs.length == 1) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -6278,12 +6454,14 @@
|
@@ -6278,12 +6456,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// tell a new window to take the "dropped" tab
|
// tell a new window to take the "dropped" tab
|
||||||
@@ -773,7 +782,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6388,7 +6566,7 @@
|
@@ -6388,7 +6568,7 @@
|
||||||
* `true` if element is a `<tab-group>`
|
* `true` if element is a `<tab-group>`
|
||||||
*/
|
*/
|
||||||
isTabGroup(element) {
|
isTabGroup(element) {
|
||||||
@@ -782,7 +791,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6473,8 +6651,8 @@
|
@@ -6473,8 +6653,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't allow mixing pinned and unpinned tabs.
|
// Don't allow mixing pinned and unpinned tabs.
|
||||||
@@ -793,7 +802,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} else {
|
} else {
|
||||||
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
||||||
}
|
}
|
||||||
@@ -6500,10 +6678,16 @@
|
@@ -6500,10 +6680,16 @@
|
||||||
this.#handleTabMove(
|
this.#handleTabMove(
|
||||||
element,
|
element,
|
||||||
() => {
|
() => {
|
||||||
@@ -812,7 +821,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
||||||
neighbor.after(element);
|
neighbor.after(element);
|
||||||
} else {
|
} else {
|
||||||
@@ -6561,23 +6745,31 @@
|
@@ -6561,23 +6747,31 @@
|
||||||
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
|
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
|
||||||
if (this.isTabGroupLabel(targetElement)) {
|
if (this.isTabGroupLabel(targetElement)) {
|
||||||
targetElement = targetElement.group;
|
targetElement = targetElement.group;
|
||||||
@@ -850,7 +859,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} else if (!element.pinned && targetElement && targetElement.pinned) {
|
} else if (!element.pinned && targetElement && targetElement.pinned) {
|
||||||
// If the caller asks to move an unpinned element next to a pinned
|
// If the caller asks to move an unpinned element next to a pinned
|
||||||
// tab, move the unpinned element to be the first unpinned element
|
// tab, move the unpinned element to be the first unpinned element
|
||||||
@@ -6590,14 +6782,34 @@
|
@@ -6590,14 +6784,34 @@
|
||||||
// move the tab group right before the first unpinned tab.
|
// move the tab group right before the first unpinned tab.
|
||||||
// 4. Moving a tab group and the first unpinned tab is grouped:
|
// 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.
|
// move the tab group right before the first unpinned tab's tab group.
|
||||||
@@ -886,7 +895,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
element.pinned
|
element.pinned
|
||||||
? this.tabContainer.pinnedTabsContainer
|
? this.tabContainer.pinnedTabsContainer
|
||||||
: this.tabContainer;
|
: this.tabContainer;
|
||||||
@@ -6606,7 +6818,7 @@
|
@@ -6606,7 +6820,7 @@
|
||||||
element,
|
element,
|
||||||
() => {
|
() => {
|
||||||
if (moveBefore) {
|
if (moveBefore) {
|
||||||
@@ -895,7 +904,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
} else if (targetElement) {
|
} else if (targetElement) {
|
||||||
targetElement.after(element);
|
targetElement.after(element);
|
||||||
} else {
|
} else {
|
||||||
@@ -6676,10 +6888,10 @@
|
@@ -6676,10 +6890,10 @@
|
||||||
* @param {TabMetricsContext} [metricsContext]
|
* @param {TabMetricsContext} [metricsContext]
|
||||||
*/
|
*/
|
||||||
moveTabToExistingGroup(aTab, aGroup, metricsContext) {
|
moveTabToExistingGroup(aTab, aGroup, metricsContext) {
|
||||||
@@ -908,7 +917,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||||
@@ -6751,6 +6963,7 @@
|
@@ -6751,6 +6965,7 @@
|
||||||
|
|
||||||
let state = {
|
let state = {
|
||||||
tabIndex: tab._tPos,
|
tabIndex: tab._tPos,
|
||||||
@@ -916,7 +925,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
};
|
};
|
||||||
if (tab.visible) {
|
if (tab.visible) {
|
||||||
state.elementIndex = tab.elementIndex;
|
state.elementIndex = tab.elementIndex;
|
||||||
@@ -6777,7 +6990,7 @@
|
@@ -6777,7 +6992,7 @@
|
||||||
let changedTabGroup =
|
let changedTabGroup =
|
||||||
previousTabState.tabGroupId != currentTabState.tabGroupId;
|
previousTabState.tabGroupId != currentTabState.tabGroupId;
|
||||||
|
|
||||||
@@ -925,7 +934,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
tab.dispatchEvent(
|
tab.dispatchEvent(
|
||||||
new CustomEvent("TabMove", {
|
new CustomEvent("TabMove", {
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
@@ -6818,6 +7031,10 @@
|
@@ -6818,6 +7033,10 @@
|
||||||
|
|
||||||
moveActionCallback();
|
moveActionCallback();
|
||||||
|
|
||||||
@@ -936,11 +945,11 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||||
// changed.
|
// changed.
|
||||||
this.tabContainer._invalidateCachedTabs();
|
this.tabContainer._invalidateCachedTabs();
|
||||||
@@ -6869,6 +7086,19 @@
|
@@ -6869,6 +7088,18 @@
|
||||||
* The new tab in the current window, null if the tab couldn't be adopted.
|
* The new tab in the current window, null if the tab couldn't be adopted.
|
||||||
*/
|
*/
|
||||||
adoptTab(aTab, { elementIndex, tabIndex, selectTab = false } = {}) {
|
adoptTab(aTab, { elementIndex, tabIndex, selectTab = false } = {}) {
|
||||||
+ if (window.gZenWorkspaces.currentWindowIsSyncing === aTab.ownerGlobal.gZenWorkspaces.currentWindowIsSyncing) {
|
+ if (window.gZenWorkspaces.currentWindowIsSyncing && aTab.ownerGlobal.gZenWorkspaces?.currentWindowIsSyncing) {
|
||||||
+ const tabId = aTab.id;
|
+ const tabId = aTab.id;
|
||||||
+ const thisTab = window.gZenWindowSync.getItemFromWindow(window, tabId);
|
+ const thisTab = window.gZenWindowSync.getItemFromWindow(window, tabId);
|
||||||
+ if (thisTab) {
|
+ if (thisTab) {
|
||||||
@@ -951,12 +960,11 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
+ }
|
+ }
|
||||||
+ return thisTab;
|
+ return thisTab;
|
||||||
+ }
|
+ }
|
||||||
+ return;
|
|
||||||
+ }
|
+ }
|
||||||
// Swap the dropped tab with a new one we create and then close
|
// Swap the dropped tab with a new one we create and then close
|
||||||
// it in the other window (making it seem to have moved between
|
// it in the other window (making it seem to have moved between
|
||||||
// windows). We also ensure that the tab we create to swap into has
|
// windows). We also ensure that the tab we create to swap into has
|
||||||
@@ -6910,6 +7140,8 @@
|
@@ -6910,6 +7141,8 @@
|
||||||
params.userContextId = aTab.getAttribute("usercontextid");
|
params.userContextId = aTab.getAttribute("usercontextid");
|
||||||
}
|
}
|
||||||
let newTab = this.addWebTab("about:blank", params);
|
let newTab = this.addWebTab("about:blank", params);
|
||||||
@@ -965,7 +973,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
let newBrowser = this.getBrowserForTab(newTab);
|
let newBrowser = this.getBrowserForTab(newTab);
|
||||||
|
|
||||||
aTab.container.tabDragAndDrop.finishAnimateTabMove();
|
aTab.container.tabDragAndDrop.finishAnimateTabMove();
|
||||||
@@ -7718,7 +7950,7 @@
|
@@ -7718,7 +7951,7 @@
|
||||||
// preventDefault(). It will still raise the window if appropriate.
|
// preventDefault(). It will still raise the window if appropriate.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -974,7 +982,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
window.focus();
|
window.focus();
|
||||||
aEvent.preventDefault();
|
aEvent.preventDefault();
|
||||||
break;
|
break;
|
||||||
@@ -7735,7 +7967,6 @@
|
@@ -7735,7 +7968,6 @@
|
||||||
}
|
}
|
||||||
case "TabGroupCollapse":
|
case "TabGroupCollapse":
|
||||||
aEvent.target.tabs.forEach(tab => {
|
aEvent.target.tabs.forEach(tab => {
|
||||||
@@ -982,7 +990,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "TabGroupCreateByUser":
|
case "TabGroupCreateByUser":
|
||||||
@@ -7895,7 +8126,9 @@
|
@@ -7895,7 +8127,9 @@
|
||||||
|
|
||||||
let filter = this._tabFilters.get(tab);
|
let filter = this._tabFilters.get(tab);
|
||||||
if (filter) {
|
if (filter) {
|
||||||
@@ -992,7 +1000,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
|
|
||||||
let listener = this._tabListeners.get(tab);
|
let listener = this._tabListeners.get(tab);
|
||||||
if (listener) {
|
if (listener) {
|
||||||
@@ -8698,6 +8931,7 @@
|
@@ -8698,6 +8932,7 @@
|
||||||
aWebProgress.isTopLevel
|
aWebProgress.isTopLevel
|
||||||
) {
|
) {
|
||||||
this.mTab.setAttribute("busy", "true");
|
this.mTab.setAttribute("busy", "true");
|
||||||
@@ -1000,7 +1008,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||||
}
|
}
|
||||||
@@ -8778,6 +9012,7 @@
|
@@ -8778,6 +9013,7 @@
|
||||||
// known defaults. Note we use the original URL since about:newtab
|
// known defaults. Note we use the original URL since about:newtab
|
||||||
// redirects to a prerendered page.
|
// redirects to a prerendered page.
|
||||||
const shouldRemoveFavicon =
|
const shouldRemoveFavicon =
|
||||||
@@ -1008,7 +1016,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..9c1fa86151f3d5896c45fef31a141757
|
|||||||
!this.mBrowser.mIconURL &&
|
!this.mBrowser.mIconURL &&
|
||||||
!ignoreBlank &&
|
!ignoreBlank &&
|
||||||
!(originalLocation.spec in FAVICON_DEFAULTS);
|
!(originalLocation.spec in FAVICON_DEFAULTS);
|
||||||
@@ -9803,7 +10038,7 @@ var TabContextMenu = {
|
@@ -9803,7 +10039,7 @@ var TabContextMenu = {
|
||||||
);
|
);
|
||||||
contextUnpinSelectedTabs.hidden =
|
contextUnpinSelectedTabs.hidden =
|
||||||
!this.contextTab.pinned || !this.multiselected;
|
!this.contextTab.pinned || !this.multiselected;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css
|
diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css
|
||||||
index b00139d7af878326ff303c08d5ddd47501b8c7db..52bad3e978004f3322f3d504cbd663e7b620b69f 100644
|
index b00139d7af878326ff303c08d5ddd47501b8c7db..7361a5e98d6ea372f6fdc583d90044d276cfb81b 100644
|
||||||
--- a/browser/themes/shared/tabbrowser/content-area.css
|
--- a/browser/themes/shared/tabbrowser/content-area.css
|
||||||
+++ b/browser/themes/shared/tabbrowser/content-area.css
|
+++ b/browser/themes/shared/tabbrowser/content-area.css
|
||||||
@@ -90,7 +90,6 @@
|
@@ -90,7 +90,6 @@
|
||||||
@@ -32,7 +32,7 @@ index b00139d7af878326ff303c08d5ddd47501b8c7db..52bad3e978004f3322f3d504cbd663e7
|
|||||||
.dialogOverlay[topmost="true"],
|
.dialogOverlay[topmost="true"],
|
||||||
#window-modal-dialog::backdrop {
|
#window-modal-dialog::backdrop {
|
||||||
- background-color: var(--dialog-backdrop-color);
|
- background-color: var(--dialog-backdrop-color);
|
||||||
+ background-color: light-dark(rgba(255, 255, 255, .2), rgba(0, 0, 0, .2));
|
+ background-color: light-dark(rgba(255, 255, 255, .3), rgba(0, 0, 0, .3));
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialogOverlay[hideContent="true"][topmost="true"] {
|
.dialogOverlay[hideContent="true"][topmost="true"] {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export class nsZenMenuBar {
|
|||||||
this.#initViewMenu();
|
this.#initViewMenu();
|
||||||
this.#initSpacesMenu();
|
this.#initSpacesMenu();
|
||||||
this.#initAppMenu();
|
this.#initAppMenu();
|
||||||
|
this.#hideWindowRestoreMenus();
|
||||||
}
|
}
|
||||||
|
|
||||||
#initViewMenu() {
|
#initViewMenu() {
|
||||||
@@ -121,4 +122,15 @@ export class nsZenMenuBar {
|
|||||||
command="cmd_zenNewNavigatorUnsynced"/>`)
|
command="cmd_zenNewNavigatorUnsynced"/>`)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#hideWindowRestoreMenus() {
|
||||||
|
if (!Services.prefs.getBoolPref("zen.window-sync.enabled", true)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const itemsToHide = ["appMenuRecentlyClosedWindows", "historyUndoWindowMenu"];
|
||||||
|
for (const id of itemsToHide) {
|
||||||
|
const element = PanelMultiView.getViewNode(document, id);
|
||||||
|
element.setAttribute("hidden", "true");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ class ZenStartup {
|
|||||||
await delayedStartupPromise;
|
await delayedStartupPromise;
|
||||||
await SessionStore.promiseAllWindowsRestored;
|
await SessionStore.promiseAllWindowsRestored;
|
||||||
delete gZenUIManager.promiseInitialized;
|
delete gZenUIManager.promiseInitialized;
|
||||||
this.#initSearchBar();
|
|
||||||
gZenCompactModeManager.init();
|
gZenCompactModeManager.init();
|
||||||
// Fix for https://github.com/zen-browser/desktop/issues/7605, specially in compact mode
|
// Fix for https://github.com/zen-browser/desktop/issues/7605, specially in compact mode
|
||||||
if (gURLBar.hasAttribute("breakout-extend")) {
|
if (gURLBar.hasAttribute("breakout-extend")) {
|
||||||
@@ -154,11 +153,6 @@ class ZenStartup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#initSearchBar() {
|
|
||||||
// Only focus the url bar
|
|
||||||
gURLBar.focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
#checkForWelcomePage() {
|
#checkForWelcomePage() {
|
||||||
if (!Services.prefs.getBoolPref("zen.welcome-screen.seen", false)) {
|
if (!Services.prefs.getBoolPref("zen.welcome-screen.seen", false)) {
|
||||||
Services.prefs.setBoolPref("zen.welcome-screen.seen", true);
|
Services.prefs.setBoolPref("zen.welcome-screen.seen", true);
|
||||||
|
|||||||
@@ -891,8 +891,8 @@ window.gZenVerticalTabsManager = {
|
|||||||
marginBottom: isLastItem() ? ["0px", "0px"] : [transform, "0px"],
|
marginBottom: isLastItem() ? ["0px", "0px"] : [transform, "0px"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: 0.11,
|
duration: 0.075,
|
||||||
easing: "ease-out",
|
easing: "easeOut",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {})
|
.then(() => {})
|
||||||
@@ -913,8 +913,8 @@ window.gZenVerticalTabsManager = {
|
|||||||
filter: ["blur(1px)", "blur(0px)"],
|
filter: ["blur(1px)", "blur(0px)"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: 0.11,
|
duration: 0.075,
|
||||||
easing: "ease-out",
|
easing: "easeOut",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {})
|
.then(() => {})
|
||||||
@@ -949,7 +949,7 @@ window.gZenVerticalTabsManager = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: 0.075,
|
duration: 0.075,
|
||||||
easing: "ease-out",
|
easing: "easeOut",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -1362,7 +1362,7 @@ window.gZenVerticalTabsManager = {
|
|||||||
// Check if name is blank, reset if so
|
// Check if name is blank, reset if so
|
||||||
// Always remove, so we can always rename and if it's empty,
|
// Always remove, so we can always rename and if it's empty,
|
||||||
// it will reset to the original name anyway
|
// it will reset to the original name anyway
|
||||||
if (hasChanged) {
|
if (hasChanged || (this._tabEdited.zenStaticLabel && newName)) {
|
||||||
this._tabEdited.zenStaticLabel = newName;
|
this._tabEdited.zenStaticLabel = newName;
|
||||||
gBrowser._setTabLabel(this._tabEdited, newName);
|
gBrowser._setTabLabel(this._tabEdited, newName);
|
||||||
gZenUIManager.showToast("zen-tabs-renamed");
|
gZenUIManager.showToast("zen-tabs-renamed");
|
||||||
|
|||||||
@@ -61,6 +61,9 @@
|
|||||||
|
|
||||||
.zen-pseudo-browser-image {
|
.zen-pseudo-browser-image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
transform: scale(1);
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
|
|
||||||
--zen-toolbar-element-bg: light-dark(
|
--zen-toolbar-element-bg: light-dark(
|
||||||
color-mix(in oklch, var(--toolbox-textcolor) 10%, transparent),
|
color-mix(in oklch, var(--toolbox-textcolor) 10%, transparent),
|
||||||
color-mix(in oklch, var(--toolbox-textcolor) 12.5%, transparent)
|
color-mix(in oklch, var(--toolbox-textcolor) 15%, transparent)
|
||||||
);
|
);
|
||||||
|
|
||||||
--zen-toolbar-element-bg-hover: light-dark(
|
--zen-toolbar-element-bg-hover: light-dark(
|
||||||
|
|||||||
@@ -743,6 +743,10 @@ window.gZenCompactModeManager = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._isTabBeingDragged) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.hoverableElements[i].keepHoverDuration) {
|
if (this.hoverableElements[i].keepHoverDuration) {
|
||||||
this.flashElement(
|
this.flashElement(
|
||||||
target,
|
target,
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#zen-dragover-background {
|
#zen-dragover-background {
|
||||||
width: calc(100% - var(--zen-toolbox-padding) * 2 - 5px);
|
width: calc(100% - var(--zen-toolbox-padding) * 2 - 5px);
|
||||||
left: unset;
|
left: unset;
|
||||||
|
transform: translateY(-4px);
|
||||||
}
|
}
|
||||||
|
|
||||||
#zen-tabbox-wrapper {
|
#zen-tabbox-wrapper {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
!element ||
|
!element ||
|
||||||
element.closest(".zen-current-workspace-indicator") ||
|
element.closest(".zen-current-workspace-indicator") ||
|
||||||
element.hasAttribute("split-view-group") ||
|
element.hasAttribute("split-view-group") ||
|
||||||
|
element.classList.contains("zen-drop-target") ||
|
||||||
isEssentialsPromo(element)
|
isEssentialsPromo(element)
|
||||||
) {
|
) {
|
||||||
return element;
|
return element;
|
||||||
@@ -52,6 +53,9 @@
|
|||||||
if (isTabGroupLabel(element)) {
|
if (isTabGroupLabel(element)) {
|
||||||
return element.closest(".tab-group-label-container");
|
return element.closest(".tab-group-label-container");
|
||||||
}
|
}
|
||||||
|
if (gBrowser.isTabGroup(element)) {
|
||||||
|
return element.labelContainerElement;
|
||||||
|
}
|
||||||
throw new Error(`Element "${element.tagName}" is not expected to move`);
|
throw new Error(`Element "${element.tagName}" is not expected to move`);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -101,7 +105,7 @@
|
|||||||
|
|
||||||
startTabDrag(event, tab, ...args) {
|
startTabDrag(event, tab, ...args) {
|
||||||
this.ZenDragAndDropService.onDragStart(1);
|
this.ZenDragAndDropService.onDragStart(1);
|
||||||
|
gZenCompactModeManager._isTabBeingDragged = true;
|
||||||
super.startTabDrag(event, tab, ...args);
|
super.startTabDrag(event, tab, ...args);
|
||||||
const dt = event.dataTransfer;
|
const dt = event.dataTransfer;
|
||||||
if (isTabGroupLabel(tab)) {
|
if (isTabGroupLabel(tab)) {
|
||||||
@@ -111,11 +115,9 @@
|
|||||||
const { offsetX, offsetY } = this.#getDragImageOffset(event, tab, draggingTabs);
|
const { offsetX, offsetY } = this.#getDragImageOffset(event, tab, draggingTabs);
|
||||||
const dragImage = this.#createDragImageForTabs(draggingTabs);
|
const dragImage = this.#createDragImageForTabs(draggingTabs);
|
||||||
this.originalDragImageArgs = [dragImage, offsetX, offsetY];
|
this.originalDragImageArgs = [dragImage, offsetX, offsetY];
|
||||||
dt.updateDragImage(...this.originalDragImageArgs);
|
dt.setDragImage(...this.originalDragImageArgs);
|
||||||
if (tab.hasAttribute("zen-essential")) {
|
if (tab.hasAttribute("zen-essential")) {
|
||||||
setTimeout(() => {
|
tab.style.visibility = "hidden";
|
||||||
tab.style.visibility = "hidden";
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,18 +127,28 @@
|
|||||||
);
|
);
|
||||||
const tabRect = window.windowUtils.getBoundsWithoutFlushing(movingTabs[0]);
|
const tabRect = window.windowUtils.getBoundsWithoutFlushing(movingTabs[0]);
|
||||||
const wrapper = document.createElement("div");
|
const wrapper = document.createElement("div");
|
||||||
|
let movingTabsCount = Math.min(movingTabs.length, 3);
|
||||||
wrapper.style.width = tabRect.width + "px";
|
wrapper.style.width = tabRect.width + "px";
|
||||||
wrapper.style.height = tabRect.height * movingTabs.length + "px";
|
wrapper.style.height = tabRect.height * movingTabsCount + "px";
|
||||||
wrapper.style.position = "fixed";
|
wrapper.style.position = "fixed";
|
||||||
wrapper.style.top = "-9999px";
|
wrapper.style.top = "-9999px";
|
||||||
periphery.appendChild(wrapper);
|
periphery.appendChild(wrapper);
|
||||||
for (let i = 0; i < movingTabs.length; i++) {
|
for (let i = 0; i < movingTabsCount; i++) {
|
||||||
const tab = movingTabs[i];
|
const tab = movingTabs[i];
|
||||||
const tabClone = tab.cloneNode(true);
|
const tabClone = tab.cloneNode(true);
|
||||||
if (tab.hasAttribute("zen-essential")) {
|
if (tab.hasAttribute("zen-essential")) {
|
||||||
const rect = tab.getBoundingClientRect();
|
const rect = tab.getBoundingClientRect();
|
||||||
tabClone.style.minWidth = tabClone.style.maxWidth = `${rect.width}px`;
|
tabClone.style.minWidth = tabClone.style.maxWidth = `${rect.width}px`;
|
||||||
tabClone.style.minHeight = tabClone.style.maxHeight = `${rect.height}px`;
|
tabClone.style.minHeight = tabClone.style.maxHeight = `${rect.height}px`;
|
||||||
|
if (tabClone.hasAttribute("visuallyselected")) {
|
||||||
|
tabClone.style.transform = "translate(-50%, -50%)";
|
||||||
|
}
|
||||||
|
} else if (AppConstants.platform !== "macosx") {
|
||||||
|
// On windows and linux, we still don't add some extra opaqueness
|
||||||
|
// for the tab to be more visible. This is a hacky workaround.
|
||||||
|
// TODO: Make windows and linux DnD use nsZenDragAndDrop::mDragImageOpacity
|
||||||
|
tabClone.style.colorScheme = "light";
|
||||||
|
tabClone.style.color = "black";
|
||||||
}
|
}
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
tabClone.style.transform = `translate(${i * 4}px, -${i * (tabRect.height - 4)}px)`;
|
tabClone.style.transform = `translate(${i * 4}px, -${i * (tabRect.height - 4)}px)`;
|
||||||
@@ -150,6 +162,13 @@
|
|||||||
const label = tabClone.textLabel;
|
const label = tabClone.textLabel;
|
||||||
const tabLabelParentWidth = label.parentElement.getBoundingClientRect().width;
|
const tabLabelParentWidth = label.parentElement.getBoundingClientRect().width;
|
||||||
label.textContent = label.textContent.slice(0, Math.floor(tabLabelParentWidth / 6));
|
label.textContent = label.textContent.slice(0, Math.floor(tabLabelParentWidth / 6));
|
||||||
|
} else if (gBrowser.isTabGroup(tabClone) && tabClone.hasAttribute("split-view-group")) {
|
||||||
|
let tabs = tab.tabs;
|
||||||
|
for (let j = 0; j < tabs.length; j++) {
|
||||||
|
const tabInGroup = tabs[j];
|
||||||
|
const tabInGroupClone = tabInGroup.cloneNode(true);
|
||||||
|
tabClone.appendChild(tabInGroupClone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.#maybeCreateDragImageDot(movingTabs, wrapper);
|
this.#maybeCreateDragImageDot(movingTabs, wrapper);
|
||||||
@@ -197,12 +216,7 @@
|
|||||||
? dragData.screenY
|
? dragData.screenY
|
||||||
: dragData.screenX;
|
: dragData.screenX;
|
||||||
let allTabs = this._tabbrowserTabs.ariaFocusableItems;
|
let allTabs = this._tabbrowserTabs.ariaFocusableItems;
|
||||||
let numEssentials = gBrowser._numZenEssentials;
|
let tabs = allTabs;
|
||||||
let isEssential = draggedTab.hasAttribute("zen-essential");
|
|
||||||
let tabs = allTabs.slice(
|
|
||||||
isEssential ? 0 : numEssentials,
|
|
||||||
isEssential ? numEssentials : undefined
|
|
||||||
);
|
|
||||||
if (!tabs.length) {
|
if (!tabs.length) {
|
||||||
tabs = [...movingTabs];
|
tabs = [...movingTabs];
|
||||||
}
|
}
|
||||||
@@ -235,7 +249,9 @@
|
|||||||
dragData.translateY = translateY;
|
dragData.translateY = translateY;
|
||||||
|
|
||||||
// Move the dragged tab based on the mouse position.
|
// Move the dragged tab based on the mouse position.
|
||||||
let periphery = document.getElementById("tabbrowser-arrowscrollbox-periphery");
|
let periphery = gZenWorkspaces.activeWorkspaceElement.querySelector(
|
||||||
|
"#tabbrowser-arrowscrollbox-periphery"
|
||||||
|
);
|
||||||
let lastMovingTab = movingTabs.at(-1);
|
let lastMovingTab = movingTabs.at(-1);
|
||||||
let firstMovingTab = movingTabs[0];
|
let firstMovingTab = movingTabs[0];
|
||||||
let endEdge = (ele) => ele[screenAxis] + bounds(ele)[size];
|
let endEdge = (ele) => ele[screenAxis] + bounds(ele)[size];
|
||||||
@@ -452,9 +468,7 @@
|
|||||||
// 4) we just started dragging and the `oldDropElementIndex` has its default
|
// 4) we just started dragging and the `oldDropElementIndex` has its default
|
||||||
// valuë of `movingTabs[0].elementIndex`. In this case, the drop element
|
// valuë of `movingTabs[0].elementIndex`. In this case, the drop element
|
||||||
// shouldn't be a moving tab, so keep it `undefined`.
|
// shouldn't be a moving tab, so keep it `undefined`.
|
||||||
let lastPossibleDropElement = this._rtlMode
|
let lastPossibleDropElement = this._rtlMode ? tabs.find((t) => t != draggedTab) : undefined;
|
||||||
? tabs.find((t) => t != draggedTab)
|
|
||||||
: tabs.findLast((t) => t != draggedTab);
|
|
||||||
let maxElementIndexForDropElement = lastPossibleDropElement?.elementIndex;
|
let maxElementIndexForDropElement = lastPossibleDropElement?.elementIndex;
|
||||||
if (Number.isInteger(maxElementIndexForDropElement)) {
|
if (Number.isInteger(maxElementIndexForDropElement)) {
|
||||||
let index = Math.min(oldDropElementIndex, maxElementIndexForDropElement);
|
let index = Math.min(oldDropElementIndex, maxElementIndexForDropElement);
|
||||||
@@ -521,7 +535,7 @@
|
|||||||
|
|
||||||
[dropBefore, dropElement] = this.#applyDragoverIndicator(
|
[dropBefore, dropElement] = this.#applyDragoverIndicator(
|
||||||
event,
|
event,
|
||||||
tabs,
|
dropElement,
|
||||||
movingTabs,
|
movingTabs,
|
||||||
draggedTab
|
draggedTab
|
||||||
) ?? [dropBefore, dropElement];
|
) ?? [dropBefore, dropElement];
|
||||||
@@ -608,12 +622,30 @@
|
|||||||
if (!this.#changeSpaceTimer) {
|
if (!this.#changeSpaceTimer) {
|
||||||
this.#changeSpaceTimer = setTimeout(() => {
|
this.#changeSpaceTimer = setTimeout(() => {
|
||||||
this.clearDragOverVisuals();
|
this.clearDragOverVisuals();
|
||||||
dt.updateDragImage(...this.originalDragImageArgs);
|
gZenWorkspaces
|
||||||
gZenWorkspaces.changeWorkspaceShortcut(
|
.changeWorkspaceShortcut(isNearLeftEdge ? -1 : 1, false, /* Disable wrapping */ true)
|
||||||
isNearLeftEdge ? -1 : 1,
|
.then((spaceChanged) => {
|
||||||
false,
|
if (AppConstants.platform !== "macosx") {
|
||||||
/* Disable wrapping */ true
|
// See the hack in #createDragImageForTabs for more details which
|
||||||
);
|
// explains why we need to do this on non-macOS platforms.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let tabs = this.originalDragImageArgs[0].children;
|
||||||
|
const { isDarkMode, isExplicitMode } =
|
||||||
|
gZenThemePicker.getGradientForWorkspace(spaceChanged);
|
||||||
|
for (let tab of tabs) {
|
||||||
|
if (isExplicitMode) {
|
||||||
|
tab.style.colorScheme = isDarkMode ? "dark" : "light";
|
||||||
|
} else {
|
||||||
|
tab.style.colorScheme = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
dt.updateDragImage(...this.originalDragImageArgs);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
this.#changeSpaceTimer = null;
|
this.#changeSpaceTimer = null;
|
||||||
}, this._dndSwitchSpaceDelay);
|
}, this._dndSwitchSpaceDelay);
|
||||||
}
|
}
|
||||||
@@ -646,6 +678,7 @@
|
|||||||
clientX < 0 || clientX > innerWidth || clientY < 0 || clientY > innerHeight;
|
clientX < 0 || clientX > innerWidth || clientY < 0 || clientY > innerHeight;
|
||||||
if (isOutOfWindow && !this.#isOutOfWindow) {
|
if (isOutOfWindow && !this.#isOutOfWindow) {
|
||||||
this.#isOutOfWindow = true;
|
this.#isOutOfWindow = true;
|
||||||
|
gZenViewSplitter.onBrowserDragEndToSplit(event, true);
|
||||||
this.#maybeClearVerticalPinnedGridDragOver();
|
this.#maybeClearVerticalPinnedGridDragOver();
|
||||||
this.clearSpaceSwitchTimer();
|
this.clearSpaceSwitchTimer();
|
||||||
this.clearDragOverVisuals();
|
this.clearDragOverVisuals();
|
||||||
@@ -678,25 +711,28 @@
|
|||||||
|
|
||||||
handle_drop(event) {
|
handle_drop(event) {
|
||||||
this.clearSpaceSwitchTimer();
|
this.clearSpaceSwitchTimer();
|
||||||
|
gZenFolders.highlightGroupOnDragOver(null);
|
||||||
super.handle_drop(event);
|
super.handle_drop(event);
|
||||||
this.#maybeClearVerticalPinnedGridDragOver();
|
this.#maybeClearVerticalPinnedGridDragOver();
|
||||||
const dt = event.dataTransfer;
|
const dt = event.dataTransfer;
|
||||||
const activeWorkspace = gZenWorkspaces.activeWorkspace;
|
const activeWorkspace = gZenWorkspaces.activeWorkspace;
|
||||||
let draggedTab = dt.mozGetDataAt(TAB_DROP_TYPE, 0);
|
let draggedTab = dt.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||||
if (
|
if (draggedTab.ownerGlobal === window) {
|
||||||
isTab(draggedTab) &&
|
if (
|
||||||
!draggedTab.hasAttribute("zen-essential") &&
|
isTab(draggedTab) &&
|
||||||
draggedTab.getAttribute("zen-workspace-id") != activeWorkspace
|
!draggedTab.hasAttribute("zen-essential") &&
|
||||||
) {
|
draggedTab.getAttribute("zen-workspace-id") != activeWorkspace
|
||||||
const movingTabs = draggedTab._dragData?.movingTabs || [draggedTab];
|
) {
|
||||||
for (let tab of movingTabs) {
|
const movingTabs = draggedTab._dragData?.movingTabs || [draggedTab];
|
||||||
tab.setAttribute("zen-workspace-id", activeWorkspace);
|
for (let tab of movingTabs) {
|
||||||
|
tab.setAttribute("zen-workspace-id", activeWorkspace);
|
||||||
|
}
|
||||||
|
gBrowser.selectedTab = draggedTab;
|
||||||
|
}
|
||||||
|
if (isTabGroupLabel(draggedTab)) {
|
||||||
|
draggedTab = draggedTab.group;
|
||||||
|
gZenFolders.changeFolderToSpace(draggedTab, activeWorkspace, { hasDndSwitch: true });
|
||||||
}
|
}
|
||||||
gBrowser.selectedTab = draggedTab;
|
|
||||||
}
|
|
||||||
if (isTabGroupLabel(draggedTab)) {
|
|
||||||
draggedTab = draggedTab.group;
|
|
||||||
gZenFolders.changeFolderToSpace(draggedTab, activeWorkspace, { hasDndSwitch: true });
|
|
||||||
}
|
}
|
||||||
gZenWorkspaces.updateTabsContainers();
|
gZenWorkspaces.updateTabsContainers();
|
||||||
}
|
}
|
||||||
@@ -705,7 +741,10 @@
|
|||||||
if (isTabGroupLabel(dropElement)) {
|
if (isTabGroupLabel(dropElement)) {
|
||||||
dropElement = dropElement.group;
|
dropElement = dropElement.group;
|
||||||
}
|
}
|
||||||
if (isTabGroupLabel(draggedTab)) {
|
if (
|
||||||
|
isTabGroupLabel(draggedTab) ||
|
||||||
|
(isTab(draggedTab) && draggedTab.group?.hasAttribute("split-view-group"))
|
||||||
|
) {
|
||||||
draggedTab = draggedTab.group;
|
draggedTab = draggedTab.group;
|
||||||
}
|
}
|
||||||
for (let item of this._tabbrowserTabs.ariaFocusableItems) {
|
for (let item of this._tabbrowserTabs.ariaFocusableItems) {
|
||||||
@@ -817,6 +856,9 @@
|
|||||||
if (currentEssenialContainer?.essentialsPromo) {
|
if (currentEssenialContainer?.essentialsPromo) {
|
||||||
currentEssenialContainer.essentialsPromo.remove();
|
currentEssenialContainer.essentialsPromo.remove();
|
||||||
}
|
}
|
||||||
|
// We also call it here to ensure we clear any highlight if the drop happened
|
||||||
|
// outside of a valid drop target.
|
||||||
|
gZenFolders.highlightGroupOnDragOver(null);
|
||||||
this.ZenDragAndDropService.onDragEnd();
|
this.ZenDragAndDropService.onDragEnd();
|
||||||
super.handle_dragend(event);
|
super.handle_dragend(event);
|
||||||
this.#removeDragOverBackground();
|
this.#removeDragOverBackground();
|
||||||
@@ -833,6 +875,10 @@
|
|||||||
this._tempDragImageParent.remove();
|
this._tempDragImageParent.remove();
|
||||||
delete this._tempDragImageParent;
|
delete this._tempDragImageParent;
|
||||||
}
|
}
|
||||||
|
delete gZenCompactModeManager._isTabBeingDragged;
|
||||||
|
if (dt.dropEffect !== "move") {
|
||||||
|
gZenCompactModeManager._clearAllHoverStates();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#applyDragOverBackground(element) {
|
#applyDragOverBackground(element) {
|
||||||
@@ -872,35 +918,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line complexity
|
// eslint-disable-next-line complexity
|
||||||
#applyDragoverIndicator(event, tabs, movingTabs, draggedTab) {
|
#applyDragoverIndicator(event, dropElement, movingTabs, draggedTab) {
|
||||||
const separation = 4;
|
const separation = 4;
|
||||||
const dropZoneSelector =
|
const dropZoneSelector = ":is(.zen-drop-target)";
|
||||||
":is(.tabbrowser-tab, .zen-drop-target, .tab-group-label, tab-group[split-view-group])";
|
|
||||||
let shouldPlayHapticFeedback = false;
|
let shouldPlayHapticFeedback = false;
|
||||||
let showIndicatorUnderNewTabButton = false;
|
let showIndicatorUnderNewTabButton = false;
|
||||||
let dropBefore = false;
|
let dropBefore = false;
|
||||||
let dropElement = event.target.closest(dropZoneSelector);
|
let dropElementFromEvent = event.target.closest(dropZoneSelector);
|
||||||
if (!dropElement) {
|
dropElement = dropElementFromEvent || dropElement;
|
||||||
if (event.target.classList.contains("zen-workspace-empty-space")) {
|
if (!dropElementFromEvent) {
|
||||||
dropElement = this._tabbrowserTabs.ariaFocusableItems.at(-1);
|
let hoveringPeriphery = !!event.target.closest("#tabbrowser-arrowscrollbox-periphery");
|
||||||
|
if (event.target.classList.contains("zen-workspace-empty-space") || hoveringPeriphery) {
|
||||||
|
let lastTab = gBrowser.tabs.at(-1);
|
||||||
|
dropElement =
|
||||||
|
(hoveringPeriphery && Services.prefs.getBoolPref("zen.view.show-newtab-button-top")
|
||||||
|
? this._tabbrowserTabs.ariaFocusableItems.at(
|
||||||
|
gBrowser._numVisiblePinTabsWithoutCollapsed
|
||||||
|
)
|
||||||
|
: this._tabbrowserTabs.ariaFocusableItems.at(-1)) || lastTab;
|
||||||
// Only if there are no normal tabs to drop after
|
// Only if there are no normal tabs to drop after
|
||||||
showIndicatorUnderNewTabButton =
|
showIndicatorUnderNewTabButton = lastTab.hasAttribute("zen-empty-tab");
|
||||||
gBrowser.tabs[gBrowser.tabs.length - 1].hasAttribute("zen-empty-tab");
|
|
||||||
} else {
|
|
||||||
const numEssentials = gBrowser._numZenEssentials;
|
|
||||||
const numPinned = gBrowser.pinnedTabCount - numEssentials;
|
|
||||||
const tabToUse =
|
|
||||||
event.target.closest(dropZoneSelector) || draggedTab._dragData?.dropElement;
|
|
||||||
if (!tabToUse) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const isPinned = tabToUse.pinned;
|
|
||||||
const relativeTabs = tabs.slice(
|
|
||||||
isPinned ? 0 : numPinned,
|
|
||||||
isPinned ? numPinned : undefined
|
|
||||||
);
|
|
||||||
const draggedTabRect = elementToMove(tabToUse).getBoundingClientRect();
|
|
||||||
dropElement = event.clientY > draggedTabRect.top ? relativeTabs.at(-1) : relativeTabs[0];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dropElement = elementToMove(dropElement);
|
dropElement = elementToMove(dropElement);
|
||||||
@@ -909,24 +946,47 @@
|
|||||||
shouldPlayHapticFeedback = this.#lastDropTarget !== null;
|
shouldPlayHapticFeedback = this.#lastDropTarget !== null;
|
||||||
this.#removeDragOverBackground();
|
this.#removeDragOverBackground();
|
||||||
}
|
}
|
||||||
let isZenFolder = dropElement.parentElement?.isZenFolder;
|
if (!dropElement) {
|
||||||
|
let dragData = draggedTab._dragData;
|
||||||
|
dropElement = dragData.dropElement;
|
||||||
|
dropBefore = dragData.dropBefore;
|
||||||
|
}
|
||||||
|
if (!dropElement) {
|
||||||
|
this.clearDragOverVisuals();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (dropElement.hasAttribute("zen-empty-tab") && dropElement.group) {
|
||||||
|
let secondTab = dropElement.group.tabs[1];
|
||||||
|
dropElement = secondTab || dropElement.group.labelContainerElement;
|
||||||
|
if (secondTab) {
|
||||||
|
dropBefore = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let possibleFolderElement = dropElement.parentElement;
|
||||||
|
let isZenFolder = possibleFolderElement?.isZenFolder;
|
||||||
let canHightlightGroup =
|
let canHightlightGroup =
|
||||||
gZenFolders.highlightGroupOnDragOver(dropElement.parentElement, movingTabs) || !isZenFolder;
|
gZenFolders.highlightGroupOnDragOver(possibleFolderElement, movingTabs) || !isZenFolder;
|
||||||
let rect = window.windowUtils.getBoundsWithoutFlushing(dropElement);
|
let rect = window.windowUtils.getBoundsWithoutFlushing(dropElement);
|
||||||
const overlapPercent = (event.clientY - rect.top) / rect.height;
|
const overlapPercent = (event.clientY - rect.top) / rect.height;
|
||||||
// We wan't to leave a small threshold (20% for example) so we can drag tabs below and above
|
// We wan't to leave a small threshold (20% for example) so we can drag tabs below and above
|
||||||
// a folder label without dragging into the folder.
|
// a folder label without dragging into the folder.
|
||||||
let threshold = Services.prefs.getIntPref("zen.tabs.folder-dragover-threshold-percent") / 100;
|
let threshold = Services.prefs.getIntPref("zen.tabs.folder-dragover-threshold-percent") / 100;
|
||||||
let dropIntoFolder =
|
let dropIntoFolder =
|
||||||
isZenFolder && (overlapPercent < threshold || overlapPercent > 1 - threshold);
|
isZenFolder &&
|
||||||
|
(overlapPercent < threshold ||
|
||||||
|
(overlapPercent > 1 - threshold &&
|
||||||
|
(possibleFolderElement.collapsed ||
|
||||||
|
possibleFolderElement.childGroupsAndTabs.length < 2)));
|
||||||
if (
|
if (
|
||||||
isTabGroupLabel(draggedTab) &&
|
isTabGroupLabel(draggedTab) &&
|
||||||
draggedTab.group?.isZenFolder &&
|
draggedTab.group?.isZenFolder &&
|
||||||
(isTab(dropElement) || dropElement.hasAttribute("split-view-group")) &&
|
(((isTab(dropElement) || dropElement.hasAttribute("split-view-group")) &&
|
||||||
(!dropElement.pinned || dropElement.hasAttribute("zen-essential"))
|
(!dropElement.pinned || dropElement.hasAttribute("zen-essential"))) ||
|
||||||
|
showIndicatorUnderNewTabButton)
|
||||||
) {
|
) {
|
||||||
|
dropElement = null;
|
||||||
this.clearDragOverVisuals();
|
this.clearDragOverVisuals();
|
||||||
return null;
|
return [dropElement, dropBefore];
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
isTab(dropElement) ||
|
isTab(dropElement) ||
|
||||||
@@ -941,7 +1001,7 @@
|
|||||||
let top = 0;
|
let top = 0;
|
||||||
threshold =
|
threshold =
|
||||||
Services.prefs.getIntPref("browser.tabs.dragDrop.moveOverThresholdPercent") / 100;
|
Services.prefs.getIntPref("browser.tabs.dragDrop.moveOverThresholdPercent") / 100;
|
||||||
if (overlapPercent > threshold) {
|
if (overlapPercent > threshold || showIndicatorUnderNewTabButton) {
|
||||||
top = Math.round(rect.top + rect.height) + "px";
|
top = Math.round(rect.top + rect.height) + "px";
|
||||||
dropBefore = false;
|
dropBefore = false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1038,43 +1038,47 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
|
|||||||
const tabFolderWorkingData = new Map();
|
const tabFolderWorkingData = new Map();
|
||||||
|
|
||||||
for (const folderData of data) {
|
for (const folderData of data) {
|
||||||
const workingData = {
|
try {
|
||||||
stateData: folderData,
|
const workingData = {
|
||||||
node: null,
|
stateData: folderData,
|
||||||
containingTabsFragment: document.createDocumentFragment(),
|
node: null,
|
||||||
};
|
containingTabsFragment: document.createDocumentFragment(),
|
||||||
tabFolderWorkingData.set(folderData.id, workingData);
|
};
|
||||||
|
tabFolderWorkingData.set(folderData.id, workingData);
|
||||||
|
|
||||||
const oldGroup = document.getElementById(folderData.id);
|
const oldGroup = document.getElementById(folderData.id);
|
||||||
folderData.emptyTabIds.forEach((id) => {
|
folderData.emptyTabIds.forEach((id) => {
|
||||||
oldGroup?.querySelector(`tab[id="${id}"]`)?.setAttribute("zen-empty-tab", true);
|
oldGroup?.querySelector(`tab[id="${id}"]`)?.setAttribute("zen-empty-tab", true);
|
||||||
});
|
});
|
||||||
if (gBrowser.isTabGroup(oldGroup)) {
|
if (gBrowser.isTabGroup(oldGroup)) {
|
||||||
if (!folderData.splitViewGroup) {
|
if (!folderData.splitViewGroup) {
|
||||||
const folder = this._createFolderNode({
|
const folder = this._createFolderNode({
|
||||||
id: folderData.id,
|
id: folderData.id,
|
||||||
label: folderData.name,
|
label: folderData.name,
|
||||||
collapsed: folderData.collapsed,
|
collapsed: folderData.collapsed,
|
||||||
pinned: folderData.pinned,
|
pinned: folderData.pinned,
|
||||||
saveOnWindowClose: folderData.saveOnWindowClose,
|
saveOnWindowClose: folderData.saveOnWindowClose,
|
||||||
workspaceId: folderData.workspaceId,
|
workspaceId: folderData.workspaceId,
|
||||||
});
|
});
|
||||||
folder.setAttribute("id", folderData.id);
|
folder.setAttribute("id", folderData.id);
|
||||||
workingData.node = folder;
|
workingData.node = folder;
|
||||||
oldGroup.before(folder);
|
oldGroup.before(folder);
|
||||||
} else {
|
} else {
|
||||||
workingData.node = oldGroup;
|
workingData.node = oldGroup;
|
||||||
}
|
}
|
||||||
while (oldGroup.tabs.length) {
|
while (oldGroup.tabs.length) {
|
||||||
const tab = oldGroup.tabs[0];
|
const tab = oldGroup.tabs[0];
|
||||||
if (folderData.workspaceId) {
|
if (folderData.workspaceId) {
|
||||||
tab.setAttribute("zen-workspace-id", folderData.workspaceId);
|
tab.setAttribute("zen-workspace-id", folderData.workspaceId);
|
||||||
|
}
|
||||||
|
workingData.containingTabsFragment.appendChild(tab);
|
||||||
|
}
|
||||||
|
if (!folderData.splitViewGroup) {
|
||||||
|
oldGroup.remove();
|
||||||
}
|
}
|
||||||
workingData.containingTabsFragment.appendChild(tab);
|
|
||||||
}
|
|
||||||
if (!folderData.splitViewGroup) {
|
|
||||||
oldGroup.remove();
|
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Error restoring Zen Folders session data:", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1134,11 +1138,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
|
|||||||
* @param {MozTabbrowserTabGroup|undefined|null} folder The folder to highlight, or null to clear highlight.
|
* @param {MozTabbrowserTabGroup|undefined|null} folder The folder to highlight, or null to clear highlight.
|
||||||
* @param {Array<MozTabbrowserTab>|null} movingTabs The tabs being moved.
|
* @param {Array<MozTabbrowserTab>|null} movingTabs The tabs being moved.
|
||||||
*/
|
*/
|
||||||
highlightGroupOnDragOver(folder, movingTabs) {
|
highlightGroupOnDragOver(folder, movingTabs = null) {
|
||||||
if (folder === this.#lastHighlightedGroup) {
|
if (folder === this.#lastHighlightedGroup) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const tab = movingTabs ? movingTabs[0] : null;
|
|
||||||
if (this.#lastHighlightedGroup && this.#lastHighlightedGroup !== folder) {
|
if (this.#lastHighlightedGroup && this.#lastHighlightedGroup !== folder) {
|
||||||
if (this.#lastHighlightedGroup.collapsed) {
|
if (this.#lastHighlightedGroup.collapsed) {
|
||||||
this.updateFolderIcon(this.#lastHighlightedGroup, "close");
|
this.updateFolderIcon(this.#lastHighlightedGroup, "close");
|
||||||
@@ -1148,7 +1151,6 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
|
|||||||
if (
|
if (
|
||||||
folder?.isZenFolder &&
|
folder?.isZenFolder &&
|
||||||
(!folder.hasAttribute("split-view-group") || !folder.hasAttribute("selected")) &&
|
(!folder.hasAttribute("split-view-group") || !folder.hasAttribute("selected")) &&
|
||||||
folder !== tab?.group &&
|
|
||||||
!(
|
!(
|
||||||
folder.level >= this.#ZEN_MAX_SUBFOLDERS &&
|
folder.level >= this.#ZEN_MAX_SUBFOLDERS &&
|
||||||
movingTabs?.some((t) => gBrowser.isTabGroupLabel(t))
|
movingTabs?.some((t) => gBrowser.isTabGroupLabel(t))
|
||||||
|
|||||||
@@ -123,11 +123,11 @@ zen-folder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&[state="open"] .back {
|
&[state="open"] .back {
|
||||||
transform: skewX(16deg) translate(-2px, 3.4px) scale(0.85);
|
transform: skewX(16deg) translate(-4px, 2px) scale(0.85);
|
||||||
}
|
}
|
||||||
|
|
||||||
&[state="open"] :is(.front, .dots, .icon) {
|
&[state="open"] :is(.front, .dots, .icon) {
|
||||||
transform: skewX(-16deg) translate(11.1px, 3.4px) scale(0.85);
|
transform: skewX(-16deg) translate(8px, 2px) scale(0.85);
|
||||||
}
|
}
|
||||||
|
|
||||||
& .icon {
|
& .icon {
|
||||||
|
|||||||
@@ -640,7 +640,6 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
|
|||||||
left: [],
|
left: [],
|
||||||
width: [],
|
width: [],
|
||||||
height: [],
|
height: [],
|
||||||
transform: [],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const steps = this.#ARC_CONFIG.ARC_STEPS;
|
const steps = this.#ARC_CONFIG.ARC_STEPS;
|
||||||
@@ -674,7 +673,6 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
|
|||||||
const y =
|
const y =
|
||||||
startPosition.y + distanceY * eased + arcDirection * arcHeight * (1 - (2 * eased - 1) ** 2);
|
startPosition.y + distanceY * eased + arcDirection * arcHeight * (1 - (2 * eased - 1) ** 2);
|
||||||
|
|
||||||
sequence.transform.push(`translate(-50%, -50%)`);
|
|
||||||
sequence.top.push(`${y}px`);
|
sequence.top.push(`${y}px`);
|
||||||
sequence.left.push(`${x}px`);
|
sequence.left.push(`${x}px`);
|
||||||
sequence.width.push(`${currentWidth}px`);
|
sequence.width.push(`${currentWidth}px`);
|
||||||
|
|||||||
@@ -506,6 +506,10 @@ class KeyShortcut {
|
|||||||
return this.#disabled;
|
return this.#disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setDisabled(value) {
|
||||||
|
this.#disabled = value;
|
||||||
|
}
|
||||||
|
|
||||||
isReserved() {
|
isReserved() {
|
||||||
return this.#reserved;
|
return this.#reserved;
|
||||||
}
|
}
|
||||||
@@ -796,6 +800,10 @@ class nsZenKeyboardShortcutsLoader {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let parsed = KeyShortcut.parseFromXHTML(key, { group: "devTools" });
|
let parsed = KeyShortcut.parseFromXHTML(key, { group: "devTools" });
|
||||||
|
// Move "inspector" shortcut to use "L" key instead of "I"
|
||||||
|
if (parsed.getID() == "key_inspector" || parsed.getID() == "key_inspectorMac") {
|
||||||
|
parsed.setNewBinding("L");
|
||||||
|
}
|
||||||
newShortcutList.push(parsed);
|
newShortcutList.push(parsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1105,26 +1113,34 @@ class nsZenKeyboardShortcutsVersioner {
|
|||||||
|
|
||||||
if (version < 15) {
|
if (version < 15) {
|
||||||
// Migrate from version 13 to 14
|
// Migrate from version 13 to 14
|
||||||
// Add shortcut to open a new unsynced window: Default accelt+option+N (Ctrl+Alt+N on non-macOS)
|
// Add shortcut to open a new unsynced window: Default accelt+shift+N
|
||||||
data.push(
|
data.push(
|
||||||
new KeyShortcut(
|
new KeyShortcut(
|
||||||
"zen-new-unsynced-window",
|
"zen-new-unsynced-window",
|
||||||
"N",
|
"N",
|
||||||
"",
|
"",
|
||||||
ZEN_OTHER_SHORTCUTS_GROUP,
|
ZEN_OTHER_SHORTCUTS_GROUP,
|
||||||
AppConstants.platform === "win"
|
nsKeyShortcutModifiers.fromObject({ accel: true, shift: true }),
|
||||||
? nsKeyShortcutModifiers.fromObject({ alt: true })
|
|
||||||
: nsKeyShortcutModifiers.fromObject({ accel: true, alt: true }),
|
|
||||||
"cmd_zenNewNavigatorUnsynced",
|
"cmd_zenNewNavigatorUnsynced",
|
||||||
"zen-new-unsynced-window-shortcut"
|
"zen-new-unsynced-window-shortcut"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// Also, change the default for new empty split from + to * on mac
|
// Also, change the default for new empty split from + to * on mac
|
||||||
|
// and disable the "Restore closed window" shortcut by default due to conflicts
|
||||||
|
let emptySplitFound = false,
|
||||||
|
undoCloseWindowFound = false;
|
||||||
for (let shortcut of data) {
|
for (let shortcut of data) {
|
||||||
if (shortcut.getID() == "zen-new-empty-split-view" && AppConstants.platform == "macosx") {
|
if (shortcut.getID() == "zen-new-empty-split-view" && AppConstants.platform == "macosx") {
|
||||||
if (shortcut.getKeyName() == "+") {
|
if (shortcut.getKeyName() == "+") {
|
||||||
shortcut.setNewBinding("*");
|
shortcut.setNewBinding("*");
|
||||||
}
|
}
|
||||||
|
emptySplitFound = true;
|
||||||
|
} else if (shortcut.getID() == "key_undoCloseWindow") {
|
||||||
|
shortcut.shouldBeEmpty = true;
|
||||||
|
shortcut.setDisabled(true);
|
||||||
|
undoCloseWindowFound = true;
|
||||||
|
}
|
||||||
|
if (emptySplitFound && undoCloseWindowFound) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export class nsZenSessionManager {
|
|||||||
compression: "lz4",
|
compression: "lz4",
|
||||||
backupFile,
|
backupFile,
|
||||||
});
|
});
|
||||||
|
this.log("Session file path:", this.#file.path);
|
||||||
this.#deferredBackupTask = new lazy.DeferredTask(async () => {
|
this.#deferredBackupTask = new lazy.DeferredTask(async () => {
|
||||||
await this.#createBackupsIfNeeded();
|
await this.#createBackupsIfNeeded();
|
||||||
}, REGENERATION_DEBOUNCE_RATE_MS);
|
}, REGENERATION_DEBOUNCE_RATE_MS);
|
||||||
@@ -150,6 +151,19 @@ export class nsZenSessionManager {
|
|||||||
folderIcon: row.getResultByName("folder_icon"),
|
folderIcon: row.getResultByName("folder_icon"),
|
||||||
isFolderCollapsed: Boolean(row.getResultByName("is_folder_collapsed")),
|
isFolderCollapsed: Boolean(row.getResultByName("is_folder_collapsed")),
|
||||||
}));
|
}));
|
||||||
|
try {
|
||||||
|
data.recoveryData = await IOUtils.readJSON(
|
||||||
|
PathUtils.join(
|
||||||
|
Services.dirsvc.get("ProfD", Ci.nsIFile).path,
|
||||||
|
"sessionstore-backups",
|
||||||
|
"recovery.jsonlz4"
|
||||||
|
),
|
||||||
|
{ decompress: true }
|
||||||
|
);
|
||||||
|
this.log("Recovered recovery data from sessionstore-backups");
|
||||||
|
} catch {
|
||||||
|
/* ignore errors reading recovery data */
|
||||||
|
}
|
||||||
this._migrationData = data;
|
this._migrationData = data;
|
||||||
} catch {
|
} catch {
|
||||||
/* ignore errors during migration */
|
/* ignore errors during migration */
|
||||||
@@ -165,6 +179,7 @@ export class nsZenSessionManager {
|
|||||||
async readFile() {
|
async readFile() {
|
||||||
let fileExists = await IOUtils.exists(this.#storeFilePath);
|
let fileExists = await IOUtils.exists(this.#storeFilePath);
|
||||||
if (!fileExists) {
|
if (!fileExists) {
|
||||||
|
this.log("Session file does not exist, running migration", this.#storeFilePath);
|
||||||
this._shouldRunMigration = true;
|
this._shouldRunMigration = true;
|
||||||
}
|
}
|
||||||
this.init();
|
this.init();
|
||||||
@@ -181,6 +196,7 @@ export class nsZenSessionManager {
|
|||||||
}
|
}
|
||||||
this.#sidebar = this.#file.data || {};
|
this.#sidebar = this.#file.data || {};
|
||||||
if (!this.#sidebar.spaces?.length && !this._shouldRunMigration) {
|
if (!this.#sidebar.spaces?.length && !this._shouldRunMigration) {
|
||||||
|
this.log("No spaces data found in session file, running migration", this.#sidebar);
|
||||||
// If we have no spaces data, we should run migration
|
// If we have no spaces data, we should run migration
|
||||||
// to restore them from the database. Note we also do a
|
// to restore them from the database. Note we also do a
|
||||||
// check if we already planned to run migration for optimization.
|
// check if we already planned to run migration for optimization.
|
||||||
@@ -189,6 +205,13 @@ export class nsZenSessionManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get #shouldRestoreOnlyPinned() {
|
||||||
|
return (
|
||||||
|
Services.prefs.getIntPref("browser.startup.page", 1) !== BROWSER_STARTUP_RESUME_SESSION ||
|
||||||
|
lazy.PrivateBrowsingUtils.permanentPrivateBrowsing
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the session file is read. Restores the sidebar data
|
* Called when the session file is read. Restores the sidebar data
|
||||||
* into all windows.
|
* into all windows.
|
||||||
@@ -197,15 +220,22 @@ export class nsZenSessionManager {
|
|||||||
* The initial session state read from the session file.
|
* The initial session state read from the session file.
|
||||||
*/
|
*/
|
||||||
onFileRead(initialState) {
|
onFileRead(initialState) {
|
||||||
if (!lazy.gWindowSyncEnabled) {
|
|
||||||
return initialState;
|
|
||||||
}
|
|
||||||
// For the first time after migration, we restore the tabs
|
// For the first time after migration, we restore the tabs
|
||||||
// That where going to be restored by SessionStore. The sidebar
|
// That where going to be restored by SessionStore. The sidebar
|
||||||
// object will always be empty after migration because we haven't
|
// object will always be empty after migration because we haven't
|
||||||
// gotten the opportunity to save the session yet.
|
// gotten the opportunity to save the session yet.
|
||||||
if (this._shouldRunMigration) {
|
if (this._shouldRunMigration) {
|
||||||
this.#runStateMigration(initialState);
|
initialState = this.#runStateMigration(initialState);
|
||||||
|
}
|
||||||
|
if (!lazy.gWindowSyncEnabled) {
|
||||||
|
if (initialState?.windows?.length && this.#shouldRestoreOnlyPinned) {
|
||||||
|
this.log("Window sync disabled, restoring only pinned tabs");
|
||||||
|
for (let i = 0; i < initialState.windows.length; i++) {
|
||||||
|
let winData = initialState.windows[i];
|
||||||
|
winData.tabs = (winData.tabs || []).filter((tab) => tab.pinned);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return initialState;
|
||||||
}
|
}
|
||||||
// If there are no windows, we create an empty one. By default,
|
// If there are no windows, we create an empty one. By default,
|
||||||
// firefox would create simply a new empty window, but we want
|
// firefox would create simply a new empty window, but we want
|
||||||
@@ -215,14 +245,15 @@ export class nsZenSessionManager {
|
|||||||
if (!initialState?.windows?.length) {
|
if (!initialState?.windows?.length) {
|
||||||
this.log("No windows found in initial state, creating an empty one");
|
this.log("No windows found in initial state, creating an empty one");
|
||||||
initialState ||= {};
|
initialState ||= {};
|
||||||
initialState.windows = this._shouldRunMigration ? [] : [{}];
|
initialState.windows = [
|
||||||
|
{
|
||||||
|
tabs: [],
|
||||||
|
},
|
||||||
|
];
|
||||||
}
|
}
|
||||||
// When we don't have browser.startup.page set to resume session,
|
// When we don't have browser.startup.page set to resume session,
|
||||||
// we only want to restore the pinned tabs into the new windows.
|
// we only want to restore the pinned tabs into the new windows.
|
||||||
const shouldRestoreOnlyPinned =
|
if (this.#shouldRestoreOnlyPinned && this.#sidebar?.tabs) {
|
||||||
Services.prefs.getIntPref("browser.startup.page", 1) !== BROWSER_STARTUP_RESUME_SESSION ||
|
|
||||||
lazy.PrivateBrowsingUtils.permanentPrivateBrowsing;
|
|
||||||
if (shouldRestoreOnlyPinned && this.#sidebar?.tabs) {
|
|
||||||
this.log("Restoring only pinned tabs into windows");
|
this.log("Restoring only pinned tabs into windows");
|
||||||
const sidebar = this.#sidebar;
|
const sidebar = this.#sidebar;
|
||||||
sidebar.tabs = (sidebar.tabs || []).filter((tab) => tab.pinned);
|
sidebar.tabs = (sidebar.tabs || []).filter((tab) => tab.pinned);
|
||||||
@@ -249,9 +280,9 @@ export class nsZenSessionManager {
|
|||||||
}
|
}
|
||||||
this.#restoreWindowData(winData);
|
this.#restoreWindowData(winData);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (initialState) {
|
||||||
this.log("Saving windata state after migration");
|
this.log("Saving windata state after migration");
|
||||||
this.saveState(initialState);
|
this.saveState(Cu.cloneInto(initialState, {}));
|
||||||
}
|
}
|
||||||
delete this._shouldRunMigration;
|
delete this._shouldRunMigration;
|
||||||
return initialState;
|
return initialState;
|
||||||
@@ -272,8 +303,19 @@ export class nsZenSessionManager {
|
|||||||
* @param {object} initialState
|
* @param {object} initialState
|
||||||
* The initial session state read from the session file.
|
* The initial session state read from the session file.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line complexity
|
||||||
#runStateMigration(initialState) {
|
#runStateMigration(initialState) {
|
||||||
this.log("Restoring tabs from Places DB after migration", initialState, this._migrationData);
|
this.log(
|
||||||
|
"Restoring tabs from Places DB after migration",
|
||||||
|
initialState,
|
||||||
|
initialState?.lastSessionState,
|
||||||
|
this._migrationData
|
||||||
|
);
|
||||||
|
if (!initialState?.windows?.length && this._migrationData?.recoveryData) {
|
||||||
|
this.log("Using recovery data for migration");
|
||||||
|
initialState = this._migrationData.recoveryData;
|
||||||
|
}
|
||||||
|
delete this._migrationData?.recoveryData;
|
||||||
// Restore spaces into the sidebar object if we don't
|
// Restore spaces into the sidebar object if we don't
|
||||||
// have any yet.
|
// have any yet.
|
||||||
if (!this.#sidebar.spaces?.length) {
|
if (!this.#sidebar.spaces?.length) {
|
||||||
@@ -282,6 +324,12 @@ export class nsZenSessionManager {
|
|||||||
spaces: this._migrationData?.spaces || [],
|
spaces: this._migrationData?.spaces || [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
!initialState?.windows?.length &&
|
||||||
|
(initialState?.lastSessionState || initialState?.deferredInitialState)
|
||||||
|
) {
|
||||||
|
initialState = { ...(initialState.lastSessionState || initialState.deferredInitialState) };
|
||||||
|
}
|
||||||
// There might be cases where there are no windows in the
|
// There might be cases where there are no windows in the
|
||||||
// initial state, for example if the user had 'restore previous
|
// initial state, for example if the user had 'restore previous
|
||||||
// session' disabled before migration. In that case, we try
|
// session' disabled before migration. In that case, we try
|
||||||
@@ -295,6 +343,14 @@ export class nsZenSessionManager {
|
|||||||
this.log("Restoring tabs from last closed normal window");
|
this.log("Restoring tabs from last closed normal window");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!initialState?.windows?.length) {
|
||||||
|
initialState ||= {};
|
||||||
|
initialState.windows = [
|
||||||
|
{
|
||||||
|
tabs: [],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
for (const winData of initialState?.windows || []) {
|
for (const winData of initialState?.windows || []) {
|
||||||
winData.spaces = this._migrationData?.spaces || [];
|
winData.spaces = this._migrationData?.spaces || [];
|
||||||
if (winData.tabs) {
|
if (winData.tabs) {
|
||||||
@@ -309,9 +365,17 @@ export class nsZenSessionManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Save the state to the sidebar object so that it gets written
|
return initialState;
|
||||||
// to the session file.
|
}
|
||||||
delete this._migrationData;
|
|
||||||
|
/**
|
||||||
|
* Determines if a given window data object is saveable.
|
||||||
|
*
|
||||||
|
* @param {object} aWinData - The window data object to check.
|
||||||
|
* @returns {boolean} True if the window is saveable, false otherwise.
|
||||||
|
*/
|
||||||
|
#isWindowSaveable(aWinData) {
|
||||||
|
return !aWinData.isPopup && !aWinData.isTaskbarTab && !aWinData.isZenUnsynced;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -321,8 +385,8 @@ export class nsZenSessionManager {
|
|||||||
*/
|
*/
|
||||||
saveState(state) {
|
saveState(state) {
|
||||||
let windows = state?.windows || [];
|
let windows = state?.windows || [];
|
||||||
windows = windows.filter((win) => !win.isPopup && !win.isTaskbarTab && !win.isZenUnsynced);
|
windows = windows.filter((win) => this.#isWindowSaveable(win));
|
||||||
if (!windows.length || !lazy.gWindowSyncEnabled) {
|
if (!windows.length) {
|
||||||
// Don't save (or even collect) anything in permanent private
|
// Don't save (or even collect) anything in permanent private
|
||||||
// browsing mode. We also don't want to save if there are no windows.
|
// browsing mode. We also don't want to save if there are no windows.
|
||||||
return;
|
return;
|
||||||
@@ -502,7 +566,7 @@ export class nsZenSessionManager {
|
|||||||
* Whether this new window is being restored from a closed window.
|
* Whether this new window is being restored from a closed window.
|
||||||
*/
|
*/
|
||||||
restoreNewWindow(aWindow, SessionStoreInternal, fromClosedWindow = false) {
|
restoreNewWindow(aWindow, SessionStoreInternal, fromClosedWindow = false) {
|
||||||
if (aWindow.gZenWorkspaces?.privateWindowOrDisabled || !lazy.gWindowSyncEnabled) {
|
if (aWindow.gZenWorkspaces?.privateWindowOrDisabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.log("Restoring new window with Zen session data");
|
this.log("Restoring new window with Zen session data");
|
||||||
@@ -520,6 +584,10 @@ export class nsZenSessionManager {
|
|||||||
this.#restoreWindowData(newWindow);
|
this.#restoreWindowData(newWindow);
|
||||||
}
|
}
|
||||||
newWindow.tabs = this.#filterUnusedTabs(newWindow.tabs || []);
|
newWindow.tabs = this.#filterUnusedTabs(newWindow.tabs || []);
|
||||||
|
if (!lazy.gWindowSyncEnabled) {
|
||||||
|
// Don't bring over any unpinned tabs if window sync is disabled.
|
||||||
|
newWindow.tabs = newWindow.tabs.filter((tab) => tab.pinned);
|
||||||
|
}
|
||||||
|
|
||||||
// These are window-specific from the previous window state that
|
// These are window-specific from the previous window state that
|
||||||
// we don't want to restore into the new window. Otherwise, new
|
// we don't want to restore into the new window. Otherwise, new
|
||||||
|
|||||||
@@ -10,17 +10,17 @@ const lazy = {};
|
|||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||||
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
|
||||||
TabStateFlusher: "resource:///modules/sessionstore/TabStateFlusher.sys.mjs",
|
TabStateFlusher: "resource:///modules/sessionstore/TabStateFlusher.sys.mjs",
|
||||||
// eslint-disable-next-line mozilla/valid-lazy
|
// eslint-disable-next-line mozilla/valid-lazy
|
||||||
ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
|
ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
|
||||||
TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs",
|
TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs",
|
||||||
|
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyPreferenceGetter(lazy, "gWindowSyncEnabled", "zen.window-sync.enabled");
|
XPCOMUtils.defineLazyPreferenceGetter(lazy, "gWindowSyncEnabled", "zen.window-sync.enabled", true);
|
||||||
XPCOMUtils.defineLazyPreferenceGetter(lazy, "gShouldLog", "zen.window-sync.log", true);
|
XPCOMUtils.defineLazyPreferenceGetter(lazy, "gShouldLog", "zen.window-sync.log", true);
|
||||||
|
|
||||||
const OBSERVING = ["browser-window-before-show"];
|
const OBSERVING = ["browser-window-before-show", "sessionstore-windows-restored"];
|
||||||
const INSTANT_EVENTS = ["SSWindowClosing"];
|
const INSTANT_EVENTS = ["SSWindowClosing"];
|
||||||
const UNSYNCED_WINDOW_EVENTS = ["TabOpen"];
|
const UNSYNCED_WINDOW_EVENTS = ["TabOpen"];
|
||||||
const EVENTS = [
|
const EVENTS = [
|
||||||
@@ -140,16 +140,13 @@ class nsZenWindowSync {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
if (!lazy.gWindowSyncEnabled || this.#initialized) {
|
if (this.#initialized) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.#initialized = true;
|
this.#initialized = true;
|
||||||
for (let topic of OBSERVING) {
|
for (let topic of OBSERVING) {
|
||||||
Services.obs.addObserver(this, topic);
|
Services.obs.addObserver(this, topic);
|
||||||
}
|
}
|
||||||
lazy.SessionStore.promiseAllWindowsRestored.then(() => {
|
|
||||||
this.#onSessionStoreInitialized();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uninit() {
|
uninit() {
|
||||||
@@ -176,6 +173,13 @@ class nsZenWindowSync {
|
|||||||
* @param {Window} aWindow - The browser window that is about to be shown.
|
* @param {Window} aWindow - The browser window that is about to be shown.
|
||||||
*/
|
*/
|
||||||
#onWindowBeforeShow(aWindow) {
|
#onWindowBeforeShow(aWindow) {
|
||||||
|
if (
|
||||||
|
aWindow.gZenWindowSync ||
|
||||||
|
aWindow.document.documentElement.hasAttribute("zen-unsynced-window")
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.log("Setting up window sync for window", aWindow);
|
||||||
// There are 2 possibilities to know if we are trying to open
|
// There are 2 possibilities to know if we are trying to open
|
||||||
// a new *unsynced* window:
|
// a new *unsynced* window:
|
||||||
// 1. We are passing `zen-unsynced` in the window arguments.
|
// 1. We are passing `zen-unsynced` in the window arguments.
|
||||||
@@ -221,6 +225,7 @@ class nsZenWindowSync {
|
|||||||
// that didn't have this feature.
|
// that didn't have this feature.
|
||||||
await this.#runOnAllWindowsAsync(null, async (aWindow) => {
|
await this.#runOnAllWindowsAsync(null, async (aWindow) => {
|
||||||
const { gZenWorkspaces } = aWindow;
|
const { gZenWorkspaces } = aWindow;
|
||||||
|
this.#onWindowBeforeShow(aWindow);
|
||||||
await gZenWorkspaces.promiseInitialized;
|
await gZenWorkspaces.promiseInitialized;
|
||||||
for (let tab of gZenWorkspaces.allStoredTabs) {
|
for (let tab of gZenWorkspaces.allStoredTabs) {
|
||||||
if (!tab.id) {
|
if (!tab.id) {
|
||||||
@@ -288,6 +293,10 @@ class nsZenWindowSync {
|
|||||||
this.#onWindowBeforeShow(aSubject);
|
this.#onWindowBeforeShow(aSubject);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "sessionstore-windows-restored": {
|
||||||
|
this.#onSessionStoreInitialized();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,6 +309,9 @@ class nsZenWindowSync {
|
|||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!lazy.gWindowSyncEnabled && !UNSYNCED_WINDOW_EVENTS.includes(aEvent.type)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (INSTANT_EVENTS.includes(aEvent.type)) {
|
if (INSTANT_EVENTS.includes(aEvent.type)) {
|
||||||
this.#handleNextEvent(aEvent);
|
this.#handleNextEvent(aEvent);
|
||||||
return;
|
return;
|
||||||
@@ -505,7 +517,11 @@ class nsZenWindowSync {
|
|||||||
*/
|
*/
|
||||||
#moveItemToMatchOriginal(aOriginalItem, aTargetItem, aWindow, { isEssential, isPinned }) {
|
#moveItemToMatchOriginal(aOriginalItem, aTargetItem, aWindow, { isEssential, isPinned }) {
|
||||||
const { gBrowser, gZenWorkspaces } = aWindow;
|
const { gBrowser, gZenWorkspaces } = aWindow;
|
||||||
const originalSibling = aOriginalItem.previousElementSibling;
|
let originalSibling = aOriginalItem.previousElementSibling;
|
||||||
|
if (originalSibling?.classList.contains("space-fake-collapsible-start")) {
|
||||||
|
// Skip space fake elements.
|
||||||
|
originalSibling = originalSibling.previousElementSibling;
|
||||||
|
}
|
||||||
let isFirstTab = true;
|
let isFirstTab = true;
|
||||||
if (gBrowser.isTabGroup(originalSibling) || gBrowser.isTab(originalSibling)) {
|
if (gBrowser.isTabGroup(originalSibling) || gBrowser.isTab(originalSibling)) {
|
||||||
isFirstTab =
|
isFirstTab =
|
||||||
@@ -577,7 +593,17 @@ class nsZenWindowSync {
|
|||||||
* @param {object} aOtherTab - The tab in the other window.
|
* @param {object} aOtherTab - The tab in the other window.
|
||||||
*/
|
*/
|
||||||
async #swapBrowserDocShellsAsync(aOurTab, aOtherTab) {
|
async #swapBrowserDocShellsAsync(aOurTab, aOtherTab) {
|
||||||
let promise = this.#maybeFlushTabState(aOurTab);
|
if (!this.#canSwapBrowsers(aOurTab, aOtherTab)) {
|
||||||
|
this.log(
|
||||||
|
`Cannot swap browsers between tabs ${aOurTab.id} and ${aOtherTab.id} due to process mismatch`
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (aOtherTab.closing) {
|
||||||
|
this.log(`Cannot swap browsers, other tab ${aOtherTab.id} is closing`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let promise = this.#maybeFlushTabState(aOtherTab);
|
||||||
await this.#styleSwapedBrowsers(
|
await this.#styleSwapedBrowsers(
|
||||||
aOurTab,
|
aOurTab,
|
||||||
aOtherTab,
|
aOtherTab,
|
||||||
@@ -626,6 +652,27 @@ class nsZenWindowSync {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if two tabs can have their browsers swapped.
|
||||||
|
*
|
||||||
|
* @param {object} aOurTab - The tab in the current window.
|
||||||
|
* @param {object} aOtherTab - The tab in the other window.
|
||||||
|
* @returns {boolean} True if the tabs can be swapped, false otherwise.
|
||||||
|
*/
|
||||||
|
#canSwapBrowsers(aOurTab, aOtherTab) {
|
||||||
|
// In this case, the other tab is most likely discarded or pending.
|
||||||
|
// We *shouldn't* care about this scenario since the remoteness should be
|
||||||
|
// the same anyways.
|
||||||
|
if (!aOurTab.linkedBrowser || !aOtherTab.linkedBrowser) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Can't swap between chrome and content processes.
|
||||||
|
if (aOurTab.linkedBrowser.isRemoteBrowser != aOtherTab.linkedBrowser.isRemoteBrowser) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swaps the browser docshells between two tabs.
|
* Swaps the browser docshells between two tabs.
|
||||||
*
|
*
|
||||||
@@ -638,19 +685,32 @@ class nsZenWindowSync {
|
|||||||
*/
|
*/
|
||||||
#swapBrowserDocShellsInner(aOurTab, aOtherTab, { focus = true, onClose = false } = {}) {
|
#swapBrowserDocShellsInner(aOurTab, aOtherTab, { focus = true, onClose = false } = {}) {
|
||||||
// Can't swap between chrome and content processes.
|
// Can't swap between chrome and content processes.
|
||||||
if (aOurTab.linkedBrowser.isRemoteBrowser != aOtherTab.linkedBrowser.isRemoteBrowser) {
|
if (!this.#canSwapBrowsers(aOurTab, aOtherTab)) {
|
||||||
|
this.log(
|
||||||
|
`Cannot swap browsers between tabs ${aOurTab.id} and ${aOtherTab.id} due to process mismatch`
|
||||||
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// See https://github.com/zen-browser/desktop/issues/11851, swapping the browsers
|
// See https://github.com/zen-browser/desktop/issues/11851, swapping the browsers
|
||||||
// don't seem to update the state's cache properly, leading to issues when restoring
|
// don't seem to update the state's cache properly, leading to issues when restoring
|
||||||
// the session later on.
|
// the session later on.
|
||||||
let tabStateEntries = this.#getTabEntriesFromCache(aOurTab);
|
let tabStateEntries = this.#getTabEntriesFromCache(aOtherTab);
|
||||||
|
const setStateToTab = () => {
|
||||||
|
if (!tabStateEntries?.entries.length) {
|
||||||
|
this.log(`Error: No tab state entries found for tab ${aOurTab.id} during swap`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lazy.TabStateCache.update(aOurTab.linkedBrowser.permanentKey, {
|
||||||
|
history: tabStateEntries,
|
||||||
|
});
|
||||||
|
};
|
||||||
// Running `swapBrowsersAndCloseOther` doesn't expect us to use the tab after
|
// Running `swapBrowsersAndCloseOther` doesn't expect us to use the tab after
|
||||||
// the operation, so it doesn't really care about cleaning up the other tab.
|
// the operation, so it doesn't really care about cleaning up the other tab.
|
||||||
// We need to make a new tab progress listener for the other tab after the swap.
|
// We need to make a new tab progress listener for the other tab after the swap.
|
||||||
this.#withRestoreTabProgressListener(
|
this.#withRestoreTabProgressListener(
|
||||||
aOtherTab,
|
aOtherTab,
|
||||||
() => {
|
() => {
|
||||||
|
setStateToTab();
|
||||||
this.log(`Swapping docshells between windows for tab ${aOurTab.id}`);
|
this.log(`Swapping docshells between windows for tab ${aOurTab.id}`);
|
||||||
aOurTab.ownerGlobal.gBrowser.swapBrowsersAndCloseOther(aOurTab, aOtherTab, false);
|
aOurTab.ownerGlobal.gBrowser.swapBrowsersAndCloseOther(aOurTab, aOtherTab, false);
|
||||||
// Since we are moving progress listeners around, there's a chance that we
|
// Since we are moving progress listeners around, there's a chance that we
|
||||||
@@ -701,13 +761,7 @@ class nsZenWindowSync {
|
|||||||
// we would start receiving invalid history changes from the the incorrect
|
// we would start receiving invalid history changes from the the incorrect
|
||||||
// browser view that was just swapped out.
|
// browser view that was just swapped out.
|
||||||
return this.#maybeFlushTabState(aOurTab).finally(() => {
|
return this.#maybeFlushTabState(aOurTab).finally(() => {
|
||||||
if (!tabStateEntries?.entries.length) {
|
setStateToTab();
|
||||||
this.log(`Error: No tab state entries found for tab ${aOtherTab.id} during swap`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lazy.TabStateCache.update(aOurTab.linkedBrowser.permanentKey, {
|
|
||||||
history: tabStateEntries,
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -905,7 +959,7 @@ class nsZenWindowSync {
|
|||||||
if (aTab.linkedBrowser) {
|
if (aTab.linkedBrowser) {
|
||||||
cachedState = lazy.TabStateCache.get(aTab.linkedBrowser.permanentKey);
|
cachedState = lazy.TabStateCache.get(aTab.linkedBrowser.permanentKey);
|
||||||
}
|
}
|
||||||
return cachedState?.history?.entries ? cachedState.history : { entries: [] };
|
return cachedState?.history?.entries ? Cu.cloneInto(cachedState.history, {}) : { entries: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1007,20 +1061,37 @@ class nsZenWindowSync {
|
|||||||
moveAllTabsToWindow(true);
|
moveAllTabsToWindow(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the initial pinned tab image for all windows if not already set.
|
||||||
|
*
|
||||||
|
* @param {object} aTab - The tab to update the image for.
|
||||||
|
*/
|
||||||
|
#maybeEditAllTabsEntryImage(aTab) {
|
||||||
|
if (!aTab?._zenPinnedInitialState || aTab._zenPinnedInitialState.image) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let image = aTab.getAttribute("image") || aTab.ownerGlobal.gBrowser.getIcon(aTab);
|
||||||
|
this.#runOnAllWindows(null, (win) => {
|
||||||
|
const targetTab = this.getItemFromWindow(win, aTab.id);
|
||||||
|
if (targetTab) {
|
||||||
|
targetTab._zenPinnedInitialState.image = image;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* Mark: Event Handlers */
|
/* Mark: Event Handlers */
|
||||||
|
|
||||||
on_TabOpen(aEvent) {
|
on_TabOpen(aEvent) {
|
||||||
const tab = aEvent.target;
|
const tab = aEvent.target;
|
||||||
const window = tab.ownerGlobal;
|
const window = tab.ownerGlobal;
|
||||||
const isUnsyncedWindow = window.gZenWorkspaces.privateWindowOrDisabled;
|
const isUnsyncedWindow = window.gZenWorkspaces.privateWindowOrDisabled;
|
||||||
|
|
||||||
if (tab.id) {
|
if (tab.id) {
|
||||||
// This tab was opened as part of a sync operation.
|
// This tab was opened as part of a sync operation.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tab._zenContentsVisible = true;
|
tab._zenContentsVisible = true;
|
||||||
tab.id = this.#newTabSyncId;
|
tab.id = this.#newTabSyncId;
|
||||||
if (isUnsyncedWindow) {
|
if (isUnsyncedWindow || !lazy.gWindowSyncEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.#runOnAllWindows(window, (win) => {
|
this.#runOnAllWindows(window, (win) => {
|
||||||
@@ -1045,6 +1116,7 @@ class nsZenWindowSync {
|
|||||||
// No need to sync icon changes for tabs that aren't active in this window.
|
// No need to sync icon changes for tabs that aren't active in this window.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.#maybeEditAllTabsEntryImage(aEvent.target);
|
||||||
return this.#delegateGenericSyncEvent(aEvent, SYNC_FLAG_ICON);
|
return this.#delegateGenericSyncEvent(aEvent, SYNC_FLAG_ICON);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1103,6 +1175,9 @@ class nsZenWindowSync {
|
|||||||
}
|
}
|
||||||
|
|
||||||
on_focus(aEvent) {
|
on_focus(aEvent) {
|
||||||
|
if (typeof aEvent.target !== "object") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const { ownerGlobal: window } = aEvent.target;
|
const { ownerGlobal: window } = aEvent.target;
|
||||||
if (
|
if (
|
||||||
!window?.gBrowser ||
|
!window?.gBrowser ||
|
||||||
@@ -1258,7 +1333,11 @@ class nsZenWindowSync {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return this.#onTabSwitchOrWindowFocus(window, null, /* ignoreSameTab = */ true);
|
return new Promise((resolve) => {
|
||||||
|
lazy.setTimeout(() => {
|
||||||
|
this.#onTabSwitchOrWindowFocus(window, null, /* ignoreSameTab = */ true).finally(resolve);
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1354,10 +1354,15 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Apply grid to tabs first to set zen-split attribute on containers
|
||||||
|
// before setting zen-split-view on parents. This prevents the black flash
|
||||||
|
// caused by CSS rules that hide containers without zen-split attribute
|
||||||
|
// when the parent has zen-split-view attribute.
|
||||||
|
this.applyGridToTabs(splitData.tabs);
|
||||||
|
|
||||||
this.tabBrowserPanel.setAttribute("zen-split-view", "true");
|
this.tabBrowserPanel.setAttribute("zen-split-view", "true");
|
||||||
document.getElementById("tabbrowser-tabbox").setAttribute("zen-split-view", "true");
|
document.getElementById("tabbrowser-tabbox").setAttribute("zen-split-view", "true");
|
||||||
|
|
||||||
this.applyGridToTabs(splitData.tabs);
|
|
||||||
this.applyGridLayout(splitData.layoutTree);
|
this.applyGridLayout(splitData.layoutTree);
|
||||||
this.setTabsDocShellState(splitData.tabs, true);
|
this.setTabsDocShellState(splitData.tabs, true);
|
||||||
this.toggleWrapperDisplay(true);
|
this.toggleWrapperDisplay(true);
|
||||||
@@ -1403,6 +1408,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
|||||||
tab.setAttribute("split-view", "true");
|
tab.setAttribute("split-view", "true");
|
||||||
const container = tab.linkedBrowser?.closest(".browserSidebarContainer");
|
const container = tab.linkedBrowser?.closest(".browserSidebarContainer");
|
||||||
container.setAttribute("is-zen-split", "true");
|
container.setAttribute("is-zen-split", "true");
|
||||||
|
// Set zen-split early to prevent visibility flash when switching workspaces.
|
||||||
|
// The CSS rule for [is-zen-split]:not([zen-split]) sets visibility:hidden,
|
||||||
|
// so we must set zen-split before the parent zen-split-view attribute is applied.
|
||||||
|
container.setAttribute("zen-split", "true");
|
||||||
if (!container?.querySelector(".zen-tab-rearrange-button")) {
|
if (!container?.querySelector(".zen-tab-rearrange-button")) {
|
||||||
// insert a header into the container
|
// insert a header into the container
|
||||||
const header = this._createHeader(container);
|
const header = this._createHeader(container);
|
||||||
@@ -2084,45 +2093,53 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
|||||||
this._sessionRestoring = true;
|
this._sessionRestoring = true;
|
||||||
|
|
||||||
for (const groupData of data) {
|
for (const groupData of data) {
|
||||||
const group = document.getElementById(groupData.groupId);
|
try {
|
||||||
if (!gBrowser.isTabGroup(group)) {
|
const group = document.getElementById(groupData.groupId);
|
||||||
continue;
|
if (!gBrowser.isTabGroup(group)) {
|
||||||
}
|
continue;
|
||||||
|
|
||||||
// Backwards compatibility
|
|
||||||
group.setAttribute("split-view-group", "true");
|
|
||||||
if (!groupData?.layoutTree) {
|
|
||||||
this.splitTabs(group.tabs, group.gridType);
|
|
||||||
delete this._sessionRestoring;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const deserializeNode = (nodeData) => {
|
|
||||||
if (nodeData.type === "leaf") {
|
|
||||||
const tab = document.getElementById(nodeData.tabId);
|
|
||||||
if (!tab) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return new nsSplitLeafNode(tab, nodeData.sizeInParent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const splitter = new nsSplitNode(nodeData.direction, nodeData.sizeInParent);
|
// Backwards compatibility
|
||||||
splitter._children = [];
|
group.setAttribute("split-view-group", "true");
|
||||||
|
if (!groupData?.layoutTree) {
|
||||||
for (const childData of nodeData.children) {
|
this.splitTabs(group.tabs, group.gridType);
|
||||||
const childNode = deserializeNode(childData);
|
delete this._sessionRestoring;
|
||||||
if (childNode) {
|
return;
|
||||||
childNode.parent = splitter;
|
|
||||||
splitter._children.push(childNode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return splitter;
|
const deserializeNode = (nodeData) => {
|
||||||
};
|
if (nodeData.type === "leaf") {
|
||||||
|
const tab = document.getElementById(nodeData.tabId);
|
||||||
|
if (!tab) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new nsSplitLeafNode(tab, nodeData.sizeInParent);
|
||||||
|
}
|
||||||
|
|
||||||
const layout = deserializeNode(groupData.layoutTree);
|
const splitter = new nsSplitNode(nodeData.direction, nodeData.sizeInParent);
|
||||||
const splitData = this.splitTabs(group.tabs, groupData.gridType, -1);
|
splitter._children = [];
|
||||||
splitData.layoutTree = layout;
|
|
||||||
|
for (const childData of nodeData.children) {
|
||||||
|
const childNode = deserializeNode(childData);
|
||||||
|
if (childNode) {
|
||||||
|
childNode.parent = splitter;
|
||||||
|
splitter._children.push(childNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return splitter;
|
||||||
|
};
|
||||||
|
|
||||||
|
const layout = deserializeNode(groupData.layoutTree);
|
||||||
|
const splitData = this.splitTabs(group.tabs, groupData.gridType, -1);
|
||||||
|
if (splitData) {
|
||||||
|
splitData.layoutTree = layout;
|
||||||
|
} else {
|
||||||
|
gBrowser.removeTabGroup(group);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Error restoring split view session data:", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete this._sessionRestoring;
|
delete this._sessionRestoring;
|
||||||
|
|||||||
@@ -76,6 +76,17 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
|||||||
this._zenClickEventListener = this._onTabClick.bind(this);
|
this._zenClickEventListener = this._onTabClick.bind(this);
|
||||||
|
|
||||||
gZenWorkspaces._resolvePinnedInitialized();
|
gZenWorkspaces._resolvePinnedInitialized();
|
||||||
|
if (lazy.zenPinnedTabRestorePinnedTabsToPinnedUrl) {
|
||||||
|
gZenWorkspaces.promiseInitialized.then(() => {
|
||||||
|
for (const tab of gZenWorkspaces.allStoredTabs) {
|
||||||
|
try {
|
||||||
|
this.resetPinnedTab(tab);
|
||||||
|
} catch (ex) {
|
||||||
|
console.error("Error restoring pinned tab:", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log(message) {
|
log(message) {
|
||||||
@@ -162,7 +173,7 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
|||||||
this._resetTabToStoredState(tab);
|
this._resetTabToStoredState(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
async replacePinnedUrlWithCurrent(tab = undefined) {
|
replacePinnedUrlWithCurrent(tab = undefined) {
|
||||||
tab ??= TabContextMenu.contextTab;
|
tab ??= TabContextMenu.contextTab;
|
||||||
if (!tab || !tab.pinned) {
|
if (!tab || !tab.pinned) {
|
||||||
return;
|
return;
|
||||||
@@ -560,6 +571,16 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
|||||||
);
|
);
|
||||||
const essentialTabsTarget = event.target.closest(".zen-essentials-container");
|
const essentialTabsTarget = event.target.closest(".zen-essentials-container");
|
||||||
const tabsTarget = !pinnedTabsTarget;
|
const tabsTarget = !pinnedTabsTarget;
|
||||||
|
let currentEssenialContainer = gZenWorkspaces.getCurrentEssentialsContainer();
|
||||||
|
if (currentEssenialContainer?.essentialsPromo) {
|
||||||
|
currentEssenialContainer.essentialsPromo.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
movingTabs = movingTabs.filter((tab) =>
|
||||||
|
gBrowser.isTabGroupLabel(tab) && tab.group?.isZenFolder
|
||||||
|
? !tabsTarget && !essentialTabsTarget
|
||||||
|
: true
|
||||||
|
);
|
||||||
|
|
||||||
// TODO: Solve the issue of adding a tab between two groups
|
// TODO: Solve the issue of adding a tab between two groups
|
||||||
// Remove group labels from the moving tabs and replace it
|
// Remove group labels from the moving tabs and replace it
|
||||||
@@ -582,7 +603,10 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
|||||||
let isRegularTabs = false;
|
let isRegularTabs = false;
|
||||||
// Check for essentials container
|
// Check for essentials container
|
||||||
if (essentialTabsTarget) {
|
if (essentialTabsTarget) {
|
||||||
if (!draggedTab.hasAttribute("zen-essential") && !draggedTab?.group) {
|
if (
|
||||||
|
!draggedTab.hasAttribute("zen-essential") &&
|
||||||
|
!draggedTab?.group?.hasAttribute("split-view-group")
|
||||||
|
) {
|
||||||
moved = true;
|
moved = true;
|
||||||
isVertical = false;
|
isVertical = false;
|
||||||
hasActuallyMoved = this.addToEssentials(draggedTab);
|
hasActuallyMoved = this.addToEssentials(draggedTab);
|
||||||
@@ -651,7 +675,6 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return moved;
|
return moved;
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
console.error("Error moving tabs:", ex);
|
console.error("Error moving tabs:", ex);
|
||||||
|
|||||||
@@ -296,7 +296,7 @@
|
|||||||
border-bottom: 0px solid transparent !important;
|
border-bottom: 0px solid transparent !important;
|
||||||
|
|
||||||
--tab-block-margin: 2px;
|
--tab-block-margin: 2px;
|
||||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.12));
|
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.18));
|
||||||
--tab-selected-shadow: 0 1px 1px 1px light-dark(rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.05)) !important;
|
--tab-selected-shadow: 0 1px 1px 1px light-dark(rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.05)) !important;
|
||||||
grid-gap: 0 !important;
|
grid-gap: 0 !important;
|
||||||
|
|
||||||
@@ -496,6 +496,11 @@
|
|||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tabbrowser-tabs {
|
||||||
|
--toolbarbutton-inner-padding: 10px !important;
|
||||||
|
--tab-icon-end-margin: var(--toolbarbutton-inner-padding) !important;
|
||||||
|
}
|
||||||
|
|
||||||
& .tab-audio-button {
|
& .tab-audio-button {
|
||||||
margin-inline-start: -4px;
|
margin-inline-start: -4px;
|
||||||
margin-inline-end: 2px;
|
margin-inline-end: 2px;
|
||||||
@@ -665,7 +670,7 @@
|
|||||||
.tab-sharing-icon-overlay,
|
.tab-sharing-icon-overlay,
|
||||||
.tab-icon-overlay {
|
.tab-icon-overlay {
|
||||||
margin-inline-end: var(--toolbarbutton-inner-padding) !important;
|
margin-inline-end: var(--toolbarbutton-inner-padding) !important;
|
||||||
margin-inline-start: calc(var(--toolbarbutton-inner-padding) / 4) !important;
|
margin-inline-start: calc(var(--toolbarbutton-inner-padding) / 3) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -929,7 +934,7 @@
|
|||||||
height: calc(100% - var(--tab-block-margin) * 2);
|
height: calc(100% - var(--tab-block-margin) * 2);
|
||||||
margin-left: calc(-1 * var(--tab-inline-padding) + var(--tab-block-margin));
|
margin-left: calc(-1 * var(--tab-inline-padding) + var(--tab-block-margin));
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
padding: 0 calc(var(--toolbarbutton-inner-padding) - 2px) 0 calc(var(--toolbarbutton-inner-padding) / 4 + var(--tab-inline-padding) - 2px);
|
padding: 0 calc(var(--toolbarbutton-inner-padding) - 2px) 0 calc(var(--toolbarbutton-inner-padding) / 3 + var(--tab-inline-padding) - 2px);
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-top-left-radius: var(--border-radius-medium);
|
border-top-left-radius: var(--border-radius-medium);
|
||||||
width: unset;
|
width: unset;
|
||||||
|
|||||||
@@ -682,6 +682,13 @@ async function testFileAccessWindowsOnly() {
|
|||||||
let tests = [];
|
let tests = [];
|
||||||
|
|
||||||
let extDir = GetPerUserExtensionDir();
|
let extDir = GetPerUserExtensionDir();
|
||||||
|
// We used to unconditionally create this directory from Firefox, but that
|
||||||
|
// was dropped in bug 2001887. The value of this directory is questionable;
|
||||||
|
// the test was added in Firefox 56 (bug 1403744) to cover legacy add-ons,
|
||||||
|
// but legacy add-on support was discontinued in Firefox 57, and we stopped
|
||||||
|
// sideloading add-ons from this directory on all builds except ESR in
|
||||||
|
// Firefox 74 (bug 1602840).
|
||||||
|
await IOUtils.makeDirectory(extDir.path);
|
||||||
tests.push({
|
tests.push({
|
||||||
desc: "per-user extensions dir",
|
desc: "per-user extensions dir",
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ add_setup(async function setup() {
|
|||||||
const xdgConfigHome = Services.env.get("XDG_CONFIG_HOME");
|
const xdgConfigHome = Services.env.get("XDG_CONFIG_HOME");
|
||||||
Assert.greater(xdgConfigHome.length, 1, "XDG_CONFIG_HOME is defined");
|
Assert.greater(xdgConfigHome.length, 1, "XDG_CONFIG_HOME is defined");
|
||||||
|
|
||||||
|
// Verify the profile directory is inside XDG_CONFIG_HOME
|
||||||
|
const profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
|
||||||
|
Assert.ok(
|
||||||
|
profileDir.path.startsWith(xdgConfigHome),
|
||||||
|
`Profile directory (${profileDir.path}) should be inside XDG_CONFIG_HOME (${xdgConfigHome})`
|
||||||
|
);
|
||||||
|
|
||||||
// If it is there, do actual testing
|
// If it is there, do actual testing
|
||||||
sanityChecks();
|
sanityChecks();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,11 +12,14 @@ support-files = [
|
|||||||
"browser_content_sandbox_utils.js",
|
"browser_content_sandbox_utils.js",
|
||||||
"browser_content_sandbox_fs_tests.js",
|
"browser_content_sandbox_fs_tests.js",
|
||||||
]
|
]
|
||||||
# .config needs to exists for the sandbox to properly add it
|
test-directories = [
|
||||||
test-directories = ["/tmp/.xdg_default_test", "/tmp/.xdg_default_test/.config"]
|
"/tmp/.xdg_default_test",
|
||||||
|
"/tmp/.xdg_default_test/.config/mozilla/firefox/xdg_default_profile",
|
||||||
|
]
|
||||||
environment = [
|
environment = [
|
||||||
"HOME=/tmp/.xdg_default_test",
|
"HOME=/tmp/.xdg_default_test",
|
||||||
]
|
]
|
||||||
|
profile-path = "/tmp/.xdg_default_test/.config/mozilla/firefox/xdg_default_profile"
|
||||||
|
|
||||||
["browser_content_sandbox_fs_xdg_default.js"]
|
["browser_content_sandbox_fs_xdg_default.js"]
|
||||||
run-if = ["os == 'linux'"]
|
run-if = ["os == 'linux'"]
|
||||||
|
|||||||
@@ -12,12 +12,17 @@ support-files = [
|
|||||||
"browser_content_sandbox_utils.js",
|
"browser_content_sandbox_utils.js",
|
||||||
"browser_content_sandbox_fs_tests.js",
|
"browser_content_sandbox_fs_tests.js",
|
||||||
]
|
]
|
||||||
test-directories = ["/tmp/.xdg_mozLegacyHome_test/.config", "/tmp/.xdg_config_home_test"]
|
test-directories = [
|
||||||
|
"/tmp/.xdg_mozLegacyHome_test/.config",
|
||||||
|
"/tmp/.xdg_config_home_test",
|
||||||
|
"/tmp/.xdg_mozLegacyHome_test/.mozilla/firefox/xdg_mozLegacyHome_profile",
|
||||||
|
]
|
||||||
environment = [
|
environment = [
|
||||||
"XDG_CONFIG_HOME=/tmp/.xdg_config_home_test",
|
"XDG_CONFIG_HOME=/tmp/.xdg_config_home_test",
|
||||||
"HOME=/tmp/.xdg_mozLegacyHome_test",
|
"HOME=/tmp/.xdg_mozLegacyHome_test",
|
||||||
"MOZ_LEGACY_HOME=1",
|
"MOZ_LEGACY_HOME=1",
|
||||||
]
|
]
|
||||||
|
profile-path = "/tmp/.xdg_mozLegacyHome_test/.mozilla/firefox/xdg_mozLegacyHome_profile"
|
||||||
|
|
||||||
["browser_content_sandbox_fs_xdg_mozLegacyHome.js"]
|
["browser_content_sandbox_fs_xdg_mozLegacyHome.js"]
|
||||||
run-if = ["os == 'linux'"]
|
run-if = ["os == 'linux'"]
|
||||||
|
|||||||
@@ -11,11 +11,15 @@ support-files = [
|
|||||||
"browser_content_sandbox_utils.js",
|
"browser_content_sandbox_utils.js",
|
||||||
"browser_content_sandbox_fs_tests.js",
|
"browser_content_sandbox_fs_tests.js",
|
||||||
]
|
]
|
||||||
test-directories = "/tmp/.xdg_config_home_test"
|
test-directories = [
|
||||||
|
"/tmp/.xdg_config_home_test",
|
||||||
|
"/tmp/.xdg_config_home_test/mozilla/firefox/xdg_config_home_profile",
|
||||||
|
]
|
||||||
environment = [
|
environment = [
|
||||||
"XDG_CONFIG_HOME=/tmp/.xdg_config_home_test",
|
"XDG_CONFIG_HOME=/tmp/.xdg_config_home_test",
|
||||||
"MOZ_LEGACY_HOME=0",
|
"MOZ_LEGACY_HOME=0",
|
||||||
]
|
]
|
||||||
|
profile-path = "/tmp/.xdg_config_home_test/mozilla/firefox/xdg_config_home_profile"
|
||||||
|
|
||||||
["browser_content_sandbox_fs_xdg_xdgConfigHome.js"]
|
["browser_content_sandbox_fs_xdg_xdgConfigHome.js"]
|
||||||
run-if = [
|
run-if = [
|
||||||
|
|||||||
@@ -1348,7 +1348,8 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getToolbarColor(isDarkMode = false) {
|
getToolbarColor(isDarkMode = false) {
|
||||||
return isDarkMode ? [255, 255, 255, 0.6] : [0, 0, 0, 0.6]; // Default toolbar
|
const opacity = 0.8;
|
||||||
|
return isDarkMode ? [255, 255, 255, opacity] : [0, 0, 0, opacity]; // Default toolbar
|
||||||
}
|
}
|
||||||
|
|
||||||
onWorkspaceChange(workspace, skipUpdate = false, theme = null) {
|
onWorkspaceChange(workspace, skipUpdate = false, theme = null) {
|
||||||
|
|||||||
@@ -6,6 +6,12 @@
|
|||||||
|
|
||||||
import { nsZenThemePicker } from "chrome://browser/content/zen-components/ZenGradientGenerator.mjs";
|
import { nsZenThemePicker } from "chrome://browser/content/zen-components/ZenGradientGenerator.mjs";
|
||||||
|
|
||||||
|
const lazy = {};
|
||||||
|
|
||||||
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Zen Spaces manager. This class is mainly responsible for the UI
|
* Zen Spaces manager. This class is mainly responsible for the UI
|
||||||
* and user interactions but it also contains some logic to manage
|
* and user interactions but it also contains some logic to manage
|
||||||
@@ -801,7 +807,7 @@ class nsZenWorkspaces {
|
|||||||
chromeFlags & Ci.nsIWebBrowserChrome.CHROME_MENUBAR;
|
chromeFlags & Ci.nsIWebBrowserChrome.CHROME_MENUBAR;
|
||||||
return this._shouldHaveWorkspaces;
|
return this._shouldHaveWorkspaces;
|
||||||
}
|
}
|
||||||
return this._shouldHaveWorkspaces;
|
return this._shouldHaveWorkspaces && !document.documentElement.hasAttribute("taskbartab");
|
||||||
}
|
}
|
||||||
|
|
||||||
get isPrivateWindow() {
|
get isPrivateWindow() {
|
||||||
@@ -888,6 +894,13 @@ class nsZenWorkspaces {
|
|||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
const spacesFromStore = aWinData.spaces || [];
|
const spacesFromStore = aWinData.spaces || [];
|
||||||
|
if (
|
||||||
|
!this.privateWindowOrDisabled &&
|
||||||
|
spacesFromStore.length === 0 &&
|
||||||
|
lazy.ZenSessionStore._migrationData
|
||||||
|
) {
|
||||||
|
spacesFromStore.push(...lazy.ZenSessionStore._migrationData.spaces);
|
||||||
|
}
|
||||||
this._workspaceCache = spacesFromStore.length
|
this._workspaceCache = spacesFromStore.length
|
||||||
? [...spacesFromStore]
|
? [...spacesFromStore]
|
||||||
: [this.#createWorkspaceData("Space", undefined)];
|
: [this.#createWorkspaceData("Space", undefined)];
|
||||||
@@ -1031,11 +1044,17 @@ class nsZenWorkspaces {
|
|||||||
delete this._initialTab;
|
delete this._initialTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gZenVerticalTabsManager._canReplaceNewTab && showed) {
|
// Wait for the next event loop to ensure that the startup focus logic by
|
||||||
BrowserCommands.openTab();
|
// firefox has finished doing it's thing.
|
||||||
} else if (!showed) {
|
setTimeout(() => {
|
||||||
gBrowser.selectedBrowser.focus();
|
setTimeout(() => {
|
||||||
}
|
if (gZenVerticalTabsManager._canReplaceNewTab && showed) {
|
||||||
|
BrowserCommands.openTab();
|
||||||
|
} else if (!showed) {
|
||||||
|
gBrowser.selectedBrowser.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!gZenVerticalTabsManager._canReplaceNewTab &&
|
!gZenVerticalTabsManager._canReplaceNewTab &&
|
||||||
@@ -2739,6 +2758,7 @@ class nsZenWorkspaces {
|
|||||||
|
|
||||||
let nextWorkspace = workspaces[targetIndex];
|
let nextWorkspace = workspaces[targetIndex];
|
||||||
await this.changeWorkspace(nextWorkspace, { whileScrolling });
|
await this.changeWorkspace(nextWorkspace, { whileScrolling });
|
||||||
|
return nextWorkspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
#initializeWorkspaceTabContextMenus() {
|
#initializeWorkspaceTabContextMenus() {
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
|
|
||||||
/* Mark workspaces indicator */
|
/* Mark workspaces indicator */
|
||||||
.zen-current-workspace-indicator {
|
.zen-current-workspace-indicator {
|
||||||
--indicator-gap: 10px;
|
--indicator-gap: calc(var(--toolbarbutton-inner-padding) - 1px);
|
||||||
padding: calc(2px + var(--tab-inline-padding) + var(--zen-toolbox-padding));
|
padding: calc(2px + var(--tab-inline-padding) + var(--zen-toolbox-padding));
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -208,8 +208,14 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
fill-opacity: 0.6;
|
fill-opacity: 0.6;
|
||||||
-moz-context-properties: fill-opacity, fill;
|
-moz-context-properties: fill-opacity, fill;
|
||||||
fill: currentColor;
|
fill: var(--toolbox-textcolor);
|
||||||
font-size: 14px;
|
font-size: 16px;
|
||||||
|
padding-top: 2px;
|
||||||
|
color: light-dark(rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.8));
|
||||||
|
|
||||||
|
& img {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
&[zen-emoji-open='true']::before {
|
&[zen-emoji-open='true']::before {
|
||||||
border: 1px dashed light-dark(rgba(0, 0, 0, .5), rgba(255, 255, 255, .5));
|
border: 1px dashed light-dark(rgba(0, 0, 0, .5), rgba(255, 255, 255, .5));
|
||||||
@@ -225,19 +231,19 @@
|
|||||||
|
|
||||||
@media (-moz-platform: windows) {
|
@media (-moz-platform: windows) {
|
||||||
& img {
|
& img {
|
||||||
margin-bottom: -4px;
|
margin-bottom: -2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.zen-current-workspace-indicator-name {
|
.zen-current-workspace-indicator-name {
|
||||||
display: flex;
|
display: block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
|
white-space: nowrap;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
align-items: center;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
:root[zen-unsynced-window] & {
|
:root[zen-unsynced-window] & {
|
||||||
|
|||||||
10
surfer.json
10
surfer.json
@@ -5,8 +5,8 @@
|
|||||||
"binaryName": "zen",
|
"binaryName": "zen",
|
||||||
"version": {
|
"version": {
|
||||||
"product": "firefox",
|
"product": "firefox",
|
||||||
"version": "147.0.1",
|
"version": "147.0.2",
|
||||||
"candidate": "147.0.1",
|
"candidate": "147.0.2",
|
||||||
"candidateBuild": 1
|
"candidateBuild": 1
|
||||||
},
|
},
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"brandShortName": "Zen",
|
"brandShortName": "Zen",
|
||||||
"brandFullName": "Zen Browser",
|
"brandFullName": "Zen Browser",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.18b",
|
"displayVersion": "1.18.3b",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
},
|
},
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"brandShortName": "Twilight",
|
"brandShortName": "Twilight",
|
||||||
"brandFullName": "Zen Twilight",
|
"brandFullName": "Zen Twilight",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.18t",
|
"displayVersion": "1.19t",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
}
|
}
|
||||||
@@ -54,4 +54,4 @@
|
|||||||
"licenseType": "MPL-2.0"
|
"licenseType": "MPL-2.0"
|
||||||
},
|
},
|
||||||
"updateHostname": "updates.zen-browser.app"
|
"updateHostname": "updates.zen-browser.app"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user