mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-10 02:49:33 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a685738db4 | ||
|
|
70f19e6d3d | ||
|
|
312ad69d65 | ||
|
|
5d10922d91 | ||
|
|
44f7616238 | ||
|
|
dc3ff8b1c9 | ||
|
|
06392af296 | ||
|
|
87220f71f4 | ||
|
|
84ba80bc11 | ||
|
|
e59e37fcbb |
@@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
|
||||
|
||||
### Firefox Versions
|
||||
|
||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.3`! 🚀
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.3`!
|
||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.4`! 🚀
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.4`!
|
||||
|
||||
### Contributing
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
b223f3727a037a7b8a0f36f34bfe8c4622a7f387
|
||||
3985a970489e32fc751e1b80abf4d5534c905e45
|
||||
@@ -6,13 +6,13 @@ zen-folders-search-placeholder =
|
||||
.placeholder = Search { $folder-name }...
|
||||
|
||||
zen-folders-panel-rename-folder =
|
||||
.label = Rename Folder
|
||||
.label = Rename Folder…
|
||||
|
||||
zen-folders-panel-unpack-folder =
|
||||
.label = Unpack Folder
|
||||
|
||||
zen-folders-new-subfolder =
|
||||
.label = New Subfolder
|
||||
.label = New Subfolder…
|
||||
|
||||
zen-folders-panel-delete-folder =
|
||||
.label = Delete Folder
|
||||
@@ -21,7 +21,7 @@ zen-folders-panel-convert-folder-to-space =
|
||||
.label = Convert folder to Space
|
||||
|
||||
zen-folders-panel-change-folder-space =
|
||||
.label = Change Space...
|
||||
.label = Change Space
|
||||
|
||||
zen-folders-unload-all-tooltip =
|
||||
.tooltiptext = Unload active in this folder
|
||||
|
||||
@@ -30,12 +30,12 @@ tab-context-zen-replace-pinned-url-with-current =
|
||||
.label = Replace with Current URL
|
||||
.accesskey = C
|
||||
tab-context-zen-edit-pinned-url =
|
||||
.label = Edit...
|
||||
.label = Edit…
|
||||
.accesskey = E
|
||||
tab-context-zen-edit-title =
|
||||
.label = Change Label...
|
||||
.label = Change Label…
|
||||
tab-context-zen-edit-icon =
|
||||
.label = Change Icon...
|
||||
.label = Change Icon…
|
||||
|
||||
zen-themes-corrupted = Your { -brand-short-name } mods file is corrupted. They have been reset to the default theme.
|
||||
zen-shortcuts-corrupted = Your { -brand-short-name } shortcuts file is corrupted. They have been reset to the default shortcuts.
|
||||
|
||||
@@ -20,7 +20,7 @@ zen-toolbar-context-compact-mode-hide-both =
|
||||
.accesskey = H
|
||||
|
||||
zen-toolbar-context-move-to-folder =
|
||||
.label = Move to Folder...
|
||||
.label = Move to Folder
|
||||
.accesskey = M
|
||||
|
||||
zen-toolbar-context-new-folder =
|
||||
@@ -31,7 +31,7 @@ sidebar-zen-expand =
|
||||
.label = Expand Sidebar
|
||||
|
||||
sidebar-zen-create-new =
|
||||
.label = Create New...
|
||||
.label = Create New
|
||||
|
||||
tabbrowser-unload-tab-button =
|
||||
.tooltiptext =
|
||||
|
||||
@@ -24,10 +24,10 @@ zen-workspaces-panel-context-delete =
|
||||
.accesskey = D
|
||||
|
||||
zen-workspaces-panel-change-name =
|
||||
.label = Change Name
|
||||
.label = Change Name…
|
||||
|
||||
zen-workspaces-panel-change-icon =
|
||||
.label = Change Icon
|
||||
.label = Change Icon…
|
||||
|
||||
zen-workspaces-panel-context-default-profile =
|
||||
.label = Set Profile
|
||||
@@ -42,7 +42,7 @@ zen-workspaces-how-to-reorder-title = How to reorder spaces
|
||||
zen-workspaces-how-to-reorder-desc = Drag the space icons at the bottom of the sidebar to reorder them
|
||||
|
||||
zen-workspaces-change-theme =
|
||||
.label = Edit Theme
|
||||
.label = Edit Theme…
|
||||
|
||||
zen-workspaces-panel-context-open =
|
||||
.label = Open Workspace
|
||||
@@ -72,7 +72,7 @@ zen-workspace-creation-name =
|
||||
.placeholder = Space Name
|
||||
|
||||
zen-move-tab-to-workspace-button =
|
||||
.label = Move To...
|
||||
.label = Move To
|
||||
.tooltiptext = Move all tabs in this window to a Space
|
||||
|
||||
zen-workspaces-panel-context-reorder =
|
||||
|
||||
@@ -23,3 +23,6 @@
|
||||
|
||||
- name: browser.ml.linkPreview.enabled
|
||||
value: false
|
||||
|
||||
- name: browser.preferences.aiControls
|
||||
value: false
|
||||
|
||||
@@ -10,7 +10,7 @@ index 57add34d876fb885275f1147209c6fbeee367a7c..be0ab43b299317c0022a5e719f47a070
|
||||
],
|
||||
resizeCallback: async ({ title, frame }) => {
|
||||
// Search within main document and highlight matched keyword.
|
||||
@@ -437,6 +438,8 @@ const CONFIG_PANES = Object.freeze({
|
||||
@@ -437,6 +437,8 @@ const CONFIG_PANES = Object.freeze({
|
||||
tabsBrowsing: {
|
||||
l10nId: "tabs-browsing-section",
|
||||
groupIds: [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d83330c265dfc 100644
|
||||
index 08b5b56e069d038d72c87355920c4ce8a55ed805..209c0ddc0297adb8340180c58de07ae107790751 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -511,6 +511,7 @@
|
||||
@@ -109,7 +109,13 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
tab.linkedPanel = uniqueId;
|
||||
this._selectedTab = tab;
|
||||
this._selectedBrowser = browser;
|
||||
@@ -1131,13 +1192,18 @@
|
||||
@@ -1126,18 +1187,24 @@
|
||||
aTab,
|
||||
{ telemetrySource = this.TabMetrics.METRIC_SOURCE.UNKNOWN } = {}
|
||||
) {
|
||||
+ aTab = gZenGlanceManager.getTabOrGlanceParent(aTab);
|
||||
if (aTab.pinned || aTab == FirefoxViewHandler.tab) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.showTab(aTab);
|
||||
@@ -129,7 +135,13 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
aTab.setAttribute("pinned", "true");
|
||||
this._updateTabBarForPinnedTabs();
|
||||
@@ -1150,11 +1216,19 @@
|
||||
@@ -1145,16 +1212,25 @@
|
||||
}
|
||||
|
||||
unpinTab(aTab) {
|
||||
+ aTab = gZenGlanceManager.getTabOrGlanceParent(aTab);
|
||||
if (!aTab.pinned) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.#handleTabMove(aTab, () => {
|
||||
@@ -150,7 +162,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
});
|
||||
|
||||
aTab.style.marginInlineStart = "";
|
||||
@@ -1369,6 +1443,9 @@
|
||||
@@ -1369,6 +1445,9 @@
|
||||
|
||||
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
|
||||
|
||||
@@ -160,7 +172,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (
|
||||
aIconURL &&
|
||||
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
|
||||
@@ -1378,6 +1455,9 @@
|
||||
@@ -1378,6 +1457,9 @@
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -170,7 +182,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
let browser = this.getBrowserForTab(aTab);
|
||||
browser.mIconURL = aIconURL;
|
||||
@@ -1700,7 +1780,6 @@
|
||||
@@ -1700,7 +1782,6 @@
|
||||
|
||||
// Preview mode should not reset the owner
|
||||
if (!this._previewMode && !oldTab.selected) {
|
||||
@@ -178,7 +190,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
let lastRelatedTab = this._lastRelatedTabMap.get(oldTab);
|
||||
@@ -1791,6 +1870,7 @@
|
||||
@@ -1791,6 +1872,7 @@
|
||||
if (!this._previewMode) {
|
||||
newTab.recordTimeFromUnloadToReload();
|
||||
newTab.updateLastAccessed();
|
||||
@@ -186,7 +198,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
oldTab.updateLastAccessed();
|
||||
// if this is the foreground window, update the last-seen timestamps.
|
||||
if (this.documentGlobal == BrowserWindowTracker.getTopWindow()) {
|
||||
@@ -2005,6 +2085,9 @@
|
||||
@@ -2005,6 +2087,9 @@
|
||||
}
|
||||
|
||||
let activeEl = document.activeElement;
|
||||
@@ -196,7 +208,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
// If focus is on the old tab, move it to the new tab.
|
||||
if (activeEl == oldTab) {
|
||||
newTab.focus();
|
||||
@@ -2043,7 +2126,7 @@
|
||||
@@ -2043,7 +2128,7 @@
|
||||
// Focus the location bar if it was previously focused for that tab.
|
||||
// In full screen mode, only bother making the location bar visible
|
||||
// if the tab is a blank one.
|
||||
@@ -205,7 +217,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
let selectURL = () => {
|
||||
if (this._asyncTabSwitching) {
|
||||
// Set _awaitingSetURI flag to suppress popup notification
|
||||
@@ -2331,7 +2414,12 @@
|
||||
@@ -2331,7 +2416,12 @@
|
||||
return this._setTabLabel(aTab, aLabel);
|
||||
}
|
||||
|
||||
@@ -219,7 +231,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (!aLabel || (isURL && /^about:reader\?url=/.test(aLabel))) {
|
||||
return false;
|
||||
}
|
||||
@@ -2457,7 +2545,7 @@
|
||||
@@ -2457,7 +2547,7 @@
|
||||
newIndex = this.selectedTab._tPos + 1;
|
||||
}
|
||||
|
||||
@@ -228,7 +240,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (this.isTabGroupLabel(targetTab)) {
|
||||
throw new Error(
|
||||
"Replacing a tab group label with a tab is not supported"
|
||||
@@ -2737,6 +2825,7 @@
|
||||
@@ -2737,6 +2827,7 @@
|
||||
uriIsAboutBlank,
|
||||
userContextId,
|
||||
skipLoad,
|
||||
@@ -236,7 +248,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} = {}) {
|
||||
let b = document.createXULElement("browser");
|
||||
// Use the JSM global to create the permanentKey, so that if the
|
||||
@@ -2810,8 +2899,7 @@
|
||||
@@ -2810,8 +2901,7 @@
|
||||
// we use a different attribute name for this?
|
||||
b.setAttribute("name", name);
|
||||
}
|
||||
@@ -246,7 +258,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
b.setAttribute("transparent", "true");
|
||||
}
|
||||
|
||||
@@ -2981,7 +3069,7 @@
|
||||
@@ -2981,7 +3071,7 @@
|
||||
|
||||
let panel = this.getPanel(browser);
|
||||
let uniqueId = this._generateUniquePanelID();
|
||||
@@ -255,7 +267,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
aTab.linkedPanel = uniqueId;
|
||||
|
||||
// Inject the <browser> into the DOM if necessary.
|
||||
@@ -3041,8 +3129,8 @@
|
||||
@@ -3041,8 +3131,8 @@
|
||||
// If we transitioned from one browser to two browsers, we need to set
|
||||
// hasSiblings=false on both the existing browser and the new browser.
|
||||
if (this.tabs.length == 2) {
|
||||
@@ -266,7 +278,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} else {
|
||||
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
||||
}
|
||||
@@ -3227,7 +3315,6 @@
|
||||
@@ -3227,7 +3317,6 @@
|
||||
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
|
||||
tabIndex: tab._tPos + 1,
|
||||
userContextId: tab.userContextId,
|
||||
@@ -274,7 +286,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
focusUrlBar: true,
|
||||
});
|
||||
resolve(this.selectedBrowser);
|
||||
@@ -3337,6 +3424,10 @@
|
||||
@@ -3337,6 +3426,10 @@
|
||||
schemelessInput,
|
||||
hasValidUserGestureActivation = false,
|
||||
textDirectiveUserActivation = false,
|
||||
@@ -285,7 +297,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} = {}
|
||||
) {
|
||||
// all callers of addTab that pass a params object need to pass
|
||||
@@ -3347,10 +3438,25 @@
|
||||
@@ -3347,10 +3440,25 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -311,7 +323,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
// If we're opening a foreground tab, set the owner by default.
|
||||
ownerTab ??= inBackground ? null : this.selectedTab;
|
||||
|
||||
@@ -3358,6 +3464,7 @@
|
||||
@@ -3358,6 +3466,7 @@
|
||||
if (this.selectedTab.owner) {
|
||||
this.selectedTab.owner = null;
|
||||
}
|
||||
@@ -319,7 +331,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
// Find the tab that opened this one, if any. This is used for
|
||||
// determining positioning, and inherited attributes such as the
|
||||
@@ -3410,6 +3517,22 @@
|
||||
@@ -3410,6 +3519,22 @@
|
||||
noInitialLabel,
|
||||
skipBackgroundNotify,
|
||||
});
|
||||
@@ -342,7 +354,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (insertTab) {
|
||||
// Insert the tab into the tab container in the correct position.
|
||||
this.#insertTabAtIndex(t, {
|
||||
@@ -3418,6 +3541,7 @@
|
||||
@@ -3418,6 +3543,7 @@
|
||||
ownerTab,
|
||||
openerTab,
|
||||
pinned,
|
||||
@@ -350,7 +362,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
bulkOrderedOpen,
|
||||
tabGroup: tabGroup ?? openerTab?.group,
|
||||
});
|
||||
@@ -3436,6 +3560,7 @@
|
||||
@@ -3436,6 +3562,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
triggeringRemoteType,
|
||||
@@ -358,7 +370,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}));
|
||||
|
||||
if (focusUrlBar) {
|
||||
@@ -3560,6 +3685,12 @@
|
||||
@@ -3560,6 +3687,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +383,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this.#notifyPinnedStatus(t);
|
||||
@@ -3570,6 +3701,15 @@
|
||||
@@ -3570,6 +3703,15 @@
|
||||
if (!inBackground) {
|
||||
this.selectedTab = t;
|
||||
}
|
||||
@@ -387,7 +399,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -3802,6 +3942,7 @@
|
||||
@@ -3802,6 +3944,7 @@
|
||||
isAdoptingGroup = false,
|
||||
isUserTriggered = false,
|
||||
telemetryUserCreateSource = "unknown",
|
||||
@@ -395,7 +407,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} = {}
|
||||
) {
|
||||
if (
|
||||
@@ -3812,9 +3953,6 @@
|
||||
@@ -3812,9 +3955,6 @@
|
||||
!this.isSplitViewWrapper(tabOrSplitView)
|
||||
)
|
||||
) {
|
||||
@@ -405,7 +417,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
if (!color) {
|
||||
@@ -3835,9 +3973,14 @@
|
||||
@@ -3835,9 +3975,14 @@
|
||||
label,
|
||||
isAdoptingGroup
|
||||
);
|
||||
@@ -422,7 +434,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
);
|
||||
group.addTabs(tabsAndSplitViews);
|
||||
|
||||
@@ -3958,7 +4101,7 @@
|
||||
@@ -3958,7 +4103,7 @@
|
||||
}
|
||||
|
||||
this.#handleTabMove(tab, () =>
|
||||
@@ -431,7 +443,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4044,6 +4187,7 @@
|
||||
@@ -4044,6 +4189,7 @@
|
||||
color: group.color,
|
||||
insertBefore: newTabs[0],
|
||||
isAdoptingGroup: true,
|
||||
@@ -439,7 +451,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4254,6 +4398,7 @@
|
||||
@@ -4254,6 +4400,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
triggeringRemoteType,
|
||||
@@ -447,7 +459,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
) {
|
||||
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
|
||||
@@ -4323,6 +4468,7 @@
|
||||
@@ -4323,6 +4470,7 @@
|
||||
openWindowInfo,
|
||||
name,
|
||||
skipLoad,
|
||||
@@ -455,7 +467,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4536,9 +4682,9 @@
|
||||
@@ -4536,9 +4684,9 @@
|
||||
}
|
||||
|
||||
// Add a new tab if needed.
|
||||
@@ -467,7 +479,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
let url = "about:blank";
|
||||
if (tabData.entries?.length) {
|
||||
@@ -4575,8 +4721,10 @@
|
||||
@@ -4575,8 +4723,10 @@
|
||||
insertTab: false,
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
@@ -479,7 +491,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -4598,7 +4746,8 @@
|
||||
@@ -4598,7 +4748,8 @@
|
||||
this.pinTab(tab);
|
||||
// Then ensure all the tab open/pinning information is sent.
|
||||
this._fireTabOpen(tab, {});
|
||||
@@ -489,7 +501,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
let { groupId } = tabData;
|
||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||
// if a tab refers to a tab group we don't know, skip any group
|
||||
@@ -4618,7 +4767,10 @@
|
||||
@@ -4618,7 +4769,10 @@
|
||||
tabGroup.stateData.id,
|
||||
tabGroup.stateData.color,
|
||||
tabGroup.stateData.collapsed,
|
||||
@@ -501,7 +513,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
);
|
||||
tabsFragment.appendChild(tabGroup.node);
|
||||
}
|
||||
@@ -4673,9 +4825,21 @@
|
||||
@@ -4673,9 +4827,21 @@
|
||||
// to remove the old selected tab.
|
||||
if (tabToSelect) {
|
||||
let leftoverTab = this.selectedTab;
|
||||
@@ -523,7 +535,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
this._updateTabsAfterInsert();
|
||||
@@ -4866,11 +5030,17 @@
|
||||
@@ -4866,11 +5032,17 @@
|
||||
if (ownerTab) {
|
||||
tab.owner = ownerTab;
|
||||
}
|
||||
@@ -542,7 +554,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -4882,7 +5052,7 @@
|
||||
@@ -4882,7 +5054,7 @@
|
||||
let lastRelatedTab =
|
||||
openerTab && this._lastRelatedTabMap.get(openerTab);
|
||||
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
|
||||
@@ -551,7 +563,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
tabGroup = previousTab.group;
|
||||
}
|
||||
if (
|
||||
@@ -4898,7 +5068,7 @@
|
||||
@@ -4898,7 +5070,7 @@
|
||||
previousTab.splitview
|
||||
) + 1;
|
||||
} else if (previousTab.visible) {
|
||||
@@ -560,7 +572,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} else if (previousTab == FirefoxViewHandler.tab) {
|
||||
elementIndex = 0;
|
||||
}
|
||||
@@ -4926,14 +5096,14 @@
|
||||
@@ -4926,14 +5098,14 @@
|
||||
}
|
||||
// Ensure index is within bounds.
|
||||
if (tab.pinned) {
|
||||
@@ -579,7 +591,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
if (pinned && !itemAfter?.pinned) {
|
||||
itemAfter = null;
|
||||
@@ -4950,7 +5120,7 @@
|
||||
@@ -4950,7 +5122,7 @@
|
||||
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
|
||||
@@ -588,7 +600,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (
|
||||
(this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
|
||||
this.isSplitViewWrapper(itemAfter)
|
||||
@@ -4981,7 +5151,11 @@
|
||||
@@ -4981,7 +5153,11 @@
|
||||
const tabContainer = pinned
|
||||
? this.tabContainer.pinnedTabsContainer
|
||||
: this.tabContainer;
|
||||
@@ -600,7 +612,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
if (tab.group?.collapsed) {
|
||||
@@ -4996,6 +5170,7 @@
|
||||
@@ -4996,6 +5172,7 @@
|
||||
if (pinned) {
|
||||
this._updateTabBarForPinnedTabs();
|
||||
}
|
||||
@@ -608,7 +620,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -5544,6 +5719,7 @@
|
||||
@@ -5544,6 +5721,7 @@
|
||||
telemetrySource,
|
||||
} = {}
|
||||
) {
|
||||
@@ -616,7 +628,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||
// can be considered equivalent to closing the window.
|
||||
if (
|
||||
@@ -5633,6 +5809,7 @@
|
||||
@@ -5633,6 +5811,7 @@
|
||||
if (lastToClose) {
|
||||
this.removeTab(lastToClose, aParams);
|
||||
}
|
||||
@@ -624,7 +636,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
@@ -5678,6 +5855,14 @@
|
||||
@@ -5678,6 +5857,14 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -639,7 +651,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
let isVisibleTab = aTab.visible;
|
||||
// We have to sample the tab width now, since _beginRemoveTab might
|
||||
// end up modifying the DOM in such a way that aTab gets a new
|
||||
@@ -5685,6 +5870,9 @@
|
||||
@@ -5685,6 +5872,9 @@
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
let isLastTab = this.#isLastTabInWindow(aTab);
|
||||
@@ -649,7 +661,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -5696,13 +5884,14 @@
|
||||
@@ -5696,13 +5886,14 @@
|
||||
telemetrySource,
|
||||
})
|
||||
) {
|
||||
@@ -665,7 +677,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
let lockTabSizing =
|
||||
!this.tabContainer.verticalMode &&
|
||||
!aTab.pinned &&
|
||||
@@ -5733,7 +5922,13 @@
|
||||
@@ -5733,7 +5924,13 @@
|
||||
// We're not animating, so we can cancel the animation stopwatch.
|
||||
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
|
||||
aTab._closeTimeAnimTimerId = null;
|
||||
@@ -680,7 +692,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5867,7 +6062,7 @@
|
||||
@@ -5867,7 +6064,7 @@
|
||||
closeWindowWithLastTab != null
|
||||
? closeWindowWithLastTab
|
||||
: !window.toolbar.visible ||
|
||||
@@ -689,7 +701,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -5891,6 +6086,7 @@
|
||||
@@ -5891,6 +6088,7 @@
|
||||
|
||||
newTab = true;
|
||||
}
|
||||
@@ -697,7 +709,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||
|
||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||
@@ -5931,13 +6127,7 @@
|
||||
@@ -5931,13 +6129,7 @@
|
||||
aTab._mouseleave();
|
||||
|
||||
if (newTab) {
|
||||
@@ -712,7 +724,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} else {
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -6070,6 +6260,7 @@
|
||||
@@ -6070,6 +6262,7 @@
|
||||
this.tabs[i]._tPos = i;
|
||||
}
|
||||
|
||||
@@ -720,7 +732,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (!this._windowIsClosing) {
|
||||
// update tab close buttons state
|
||||
this.tabContainer._updateCloseButtons();
|
||||
@@ -6255,6 +6446,7 @@
|
||||
@@ -6255,6 +6448,7 @@
|
||||
memory_after: await getTotalMemoryUsage(),
|
||||
time_to_unload_in_ms: timeElapsed,
|
||||
});
|
||||
@@ -728,7 +740,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6300,6 +6492,7 @@
|
||||
@@ -6300,6 +6494,7 @@
|
||||
}
|
||||
|
||||
let excludeTabs = new Set(aExcludeTabs);
|
||||
@@ -736,7 +748,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
// If this tab has a successor, it should be selectable, since
|
||||
// hiding or closing a tab removes that tab as a successor.
|
||||
@@ -6312,15 +6505,22 @@
|
||||
@@ -6312,15 +6507,22 @@
|
||||
!excludeTabs.has(aTab.owner) &&
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||
) {
|
||||
@@ -761,7 +773,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
let tab = this.tabContainer.findNextTab(aTab, {
|
||||
direction: 1,
|
||||
filter: _tab => remainingTabs.includes(_tab),
|
||||
@@ -6334,7 +6534,7 @@
|
||||
@@ -6334,7 +6536,7 @@
|
||||
}
|
||||
|
||||
if (tab) {
|
||||
@@ -770,7 +782,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
// If no qualifying visible tab was found, see if there is a tab in
|
||||
@@ -6355,7 +6555,7 @@
|
||||
@@ -6355,7 +6557,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -779,7 +791,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
_blurTab(aTab) {
|
||||
@@ -6366,7 +6566,7 @@
|
||||
@@ -6366,7 +6568,7 @@
|
||||
* @returns {boolean}
|
||||
* False if swapping isn't permitted, true otherwise.
|
||||
*/
|
||||
@@ -788,7 +800,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
// Do not allow transfering a private tab to a non-private window
|
||||
// and vice versa.
|
||||
if (
|
||||
@@ -6420,6 +6620,7 @@
|
||||
@@ -6420,6 +6622,7 @@
|
||||
// fire the beforeunload event in the process. Close the other
|
||||
// window if this was its last tab.
|
||||
if (
|
||||
@@ -796,7 +808,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
!remoteBrowser._beginRemoveTab(aOtherTab, {
|
||||
adoptedByTab: aOurTab,
|
||||
closeWindowWithLastTab: true,
|
||||
@@ -6431,7 +6632,7 @@
|
||||
@@ -6431,7 +6634,7 @@
|
||||
// If this is the last tab of the window, hide the window
|
||||
// immediately without animation before the docshell swap, to avoid
|
||||
// about:blank being painted.
|
||||
@@ -805,7 +817,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (closeWindow) {
|
||||
let win = aOtherTab.documentGlobal;
|
||||
win.windowUtils.suppressAnimation(true);
|
||||
@@ -6565,11 +6766,13 @@
|
||||
@@ -6565,11 +6768,13 @@
|
||||
}
|
||||
|
||||
// Finish tearing down the tab that's going away.
|
||||
@@ -819,7 +831,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
this.setTabTitle(aOurTab);
|
||||
|
||||
@@ -6771,10 +6974,10 @@
|
||||
@@ -6771,10 +6976,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -832,7 +844,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -6834,7 +7037,8 @@
|
||||
@@ -6834,7 +7039,8 @@
|
||||
* @param {object} [aOptions={}]
|
||||
* Key-value pairs that will be serialized into the features string.
|
||||
*/
|
||||
@@ -842,7 +854,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
if (this.tabs.length == 1) {
|
||||
return null;
|
||||
}
|
||||
@@ -6851,7 +7055,7 @@
|
||||
@@ -6851,7 +7057,7 @@
|
||||
// tell a new window to take the "dropped" tab
|
||||
let args = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
|
||||
args.appendElement(aTab.splitview ?? aTab);
|
||||
@@ -851,7 +863,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
private: PrivateBrowsingUtils.isWindowPrivate(window),
|
||||
features: Object.entries(aOptions)
|
||||
.map(([key, value]) => `${key}=${value}`)
|
||||
@@ -6859,6 +7063,8 @@
|
||||
@@ -6859,6 +7065,8 @@
|
||||
openerWindow: window,
|
||||
args,
|
||||
});
|
||||
@@ -860,7 +872,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6971,7 +7177,7 @@
|
||||
@@ -6971,7 +7179,7 @@
|
||||
* `true` if element is a `<tab-group>`
|
||||
*/
|
||||
isTabGroup(element) {
|
||||
@@ -869,7 +881,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7056,8 +7262,8 @@
|
||||
@@ -7056,8 +7264,8 @@
|
||||
}
|
||||
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
@@ -880,7 +892,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} else {
|
||||
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -7103,8 +7309,8 @@
|
||||
@@ -7103,8 +7311,8 @@
|
||||
this.#handleTabMove(
|
||||
element,
|
||||
() => {
|
||||
@@ -891,7 +903,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
neighbor = neighbor.group;
|
||||
}
|
||||
if (neighbor?.splitview) {
|
||||
@@ -7115,6 +7321,12 @@
|
||||
@@ -7115,6 +7323,12 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -904,7 +916,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
if (movingForwards && neighbor) {
|
||||
neighbor.after(element);
|
||||
@@ -7173,23 +7385,31 @@
|
||||
@@ -7173,23 +7387,31 @@
|
||||
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
|
||||
if (this.isTabGroupLabel(targetElement)) {
|
||||
targetElement = targetElement.group;
|
||||
@@ -942,7 +954,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
} else if (!element.pinned && targetElement && targetElement.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
|
||||
@@ -7202,12 +7422,35 @@
|
||||
@@ -7202,12 +7424,35 @@
|
||||
// move the tab group right before the first unpinned tab.
|
||||
// 4. Moving a tab group and the first unpinned tab is grouped:
|
||||
// move the tab group right before the first unpinned tab's tab group.
|
||||
@@ -979,7 +991,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
// We want to include the splitview wrapper if it's the targetElement, but
|
||||
// not in the case where we want to reverse tabs within the same splitview.
|
||||
@@ -7216,6 +7459,7 @@
|
||||
@@ -7216,6 +7461,7 @@
|
||||
}
|
||||
|
||||
let getContainer = () =>
|
||||
@@ -987,7 +999,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
element.pinned
|
||||
? this.tabContainer.pinnedTabsContainer
|
||||
: this.tabContainer;
|
||||
@@ -7224,11 +7468,15 @@
|
||||
@@ -7224,11 +7470,15 @@
|
||||
element,
|
||||
() => {
|
||||
if (moveBefore) {
|
||||
@@ -1004,7 +1016,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
},
|
||||
metricsContext
|
||||
@@ -7302,11 +7550,15 @@
|
||||
@@ -7302,11 +7552,15 @@
|
||||
* @param {TabMetricsContext} [metricsContext]
|
||||
*/
|
||||
moveTabToExistingGroup(aTab, aGroup, metricsContext) {
|
||||
@@ -1023,7 +1035,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
return;
|
||||
@@ -7378,6 +7630,7 @@
|
||||
@@ -7378,6 +7632,7 @@
|
||||
|
||||
let state = {
|
||||
tabIndex: tab._tPos,
|
||||
@@ -1031,7 +1043,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
};
|
||||
if (tab.visible) {
|
||||
state.elementIndex = tab.elementIndex;
|
||||
@@ -7409,7 +7662,7 @@
|
||||
@@ -7409,7 +7664,7 @@
|
||||
let changedSplitView =
|
||||
previousTabState.splitViewId != currentTabState.splitViewId;
|
||||
|
||||
@@ -1040,7 +1052,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
tab.dispatchEvent(
|
||||
new CustomEvent("TabMove", {
|
||||
bubbles: true,
|
||||
@@ -7456,6 +7709,10 @@
|
||||
@@ -7456,6 +7711,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
@@ -1051,7 +1063,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -7506,7 +7763,22 @@
|
||||
@@ -7506,7 +7765,22 @@
|
||||
* @returns {object}
|
||||
* The new tab in the current window, null if the tab couldn't be adopted.
|
||||
*/
|
||||
@@ -1075,7 +1087,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
// 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
|
||||
// windows). We also ensure that the tab we create to swap into has
|
||||
@@ -7549,6 +7821,8 @@
|
||||
@@ -7549,6 +7823,8 @@
|
||||
}
|
||||
params.skipLoad = true;
|
||||
let newTab = this.addWebTab("about:blank", params);
|
||||
@@ -1084,7 +1096,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
aTab.container.tabDragAndDrop.finishAnimateTabMove();
|
||||
|
||||
@@ -8259,7 +8533,7 @@
|
||||
@@ -8259,7 +8535,7 @@
|
||||
// preventDefault(). It will still raise the window if appropriate.
|
||||
return;
|
||||
}
|
||||
@@ -1093,7 +1105,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
@@ -8276,7 +8550,6 @@
|
||||
@@ -8276,7 +8552,6 @@
|
||||
|
||||
on_TabGroupCollapse(aEvent) {
|
||||
aEvent.target.tabs.forEach(tab => {
|
||||
@@ -1101,7 +1113,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8630,7 +8903,9 @@
|
||||
@@ -8630,7 +8905,9 @@
|
||||
|
||||
let filter = this._tabFilters.get(tab);
|
||||
if (filter) {
|
||||
@@ -1111,7 +1123,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
|
||||
let listener = this._tabListeners.get(tab);
|
||||
if (listener) {
|
||||
@@ -9435,6 +9710,7 @@
|
||||
@@ -9435,6 +9712,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -1119,7 +1131,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -9515,6 +9791,7 @@
|
||||
@@ -9515,6 +9793,7 @@
|
||||
// known defaults. Note we use the original URL since about:newtab
|
||||
// redirects to a prerendered page.
|
||||
const shouldRemoveFavicon =
|
||||
@@ -1127,7 +1139,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
!this.mBrowser.mIconURL &&
|
||||
!ignoreBlank &&
|
||||
!(originalLocation.spec in FAVICON_DEFAULTS);
|
||||
@@ -9689,13 +9966,6 @@
|
||||
@@ -9689,13 +9968,6 @@
|
||||
this.mBrowser.originalURI = aRequest.originalURI;
|
||||
}
|
||||
|
||||
@@ -1141,7 +1153,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..87f41c8583c26f364530def5bd5d8333
|
||||
}
|
||||
|
||||
let userContextId = this.mBrowser.getAttribute("usercontextid") || 0;
|
||||
@@ -10587,7 +10857,8 @@ var TabContextMenu = {
|
||||
@@ -10587,7 +10859,8 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !this.multiselected;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d85a930686 100644
|
||||
index aa7c67f2bfaa3f15d592a14b527a8721dfc9bc6f..d2fe012796ea3a5be05090a732011b3cf92b78be 100644
|
||||
--- a/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
@@ -109,6 +109,8 @@ export var UrlbarUtils = {
|
||||
RESTRICT_SEARCH_KEYWORD: "restrictSearchKeyword",
|
||||
@@ -110,6 +110,8 @@ export var UrlbarUtils = {
|
||||
SEMANTIC_HISTORY: "semanticHistory",
|
||||
SUGGESTED_INDEX: "suggestedIndex",
|
||||
TAIL_SUGGESTION: "tailSuggestion",
|
||||
+ ZEN_ACTION: "zenAction",
|
||||
@@ -11,7 +11,7 @@ index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d8
|
||||
}),
|
||||
|
||||
// Defines provider types.
|
||||
@@ -170,6 +172,8 @@ export var UrlbarUtils = {
|
||||
@@ -171,6 +173,8 @@ export var UrlbarUtils = {
|
||||
OTHER_NETWORK: 6,
|
||||
ADDON: 7,
|
||||
ACTIONS: 8,
|
||||
@@ -20,7 +20,7 @@ index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d8
|
||||
}),
|
||||
|
||||
// Per-result exposure telemetry.
|
||||
@@ -319,6 +323,14 @@ export var UrlbarUtils = {
|
||||
@@ -320,6 +324,14 @@ export var UrlbarUtils = {
|
||||
telemetryLabel: "actions",
|
||||
uiLabel: "urlbar-searchmode-actions2",
|
||||
},
|
||||
@@ -35,7 +35,7 @@ index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d8
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -611,6 +623,12 @@ export var UrlbarUtils = {
|
||||
@@ -612,6 +624,12 @@ export var UrlbarUtils = {
|
||||
return this.RESULT_GROUP.HEURISTIC_FALLBACK;
|
||||
case "UrlbarProviderHistoryUrlHeuristic":
|
||||
return this.RESULT_GROUP.HEURISTIC_HISTORY_URL;
|
||||
|
||||
@@ -486,8 +486,6 @@ groupbox h2 {
|
||||
#tabGroupSuggestions,
|
||||
#web-appearance-manage-themes-link,
|
||||
#setting-control-sidebarChatbotFieldset,
|
||||
#aiControlsDescription,
|
||||
#category-ai-features,
|
||||
#setting-control-supportFirefox,
|
||||
.mission-message,
|
||||
html|setting-group:is([data-subcategory="layout"], [groupid="support"]) {
|
||||
|
||||
@@ -1579,6 +1579,7 @@ window.gZenVerticalTabsManager = {
|
||||
overflowElements.appendChild(child);
|
||||
} else {
|
||||
const element = document.getElementById("page-action-buttons");
|
||||
child.setAttribute("context", "toolbar-context-menu");
|
||||
element.before(child);
|
||||
}
|
||||
return;
|
||||
@@ -1612,7 +1613,9 @@ window.gZenVerticalTabsManager = {
|
||||
// it will reset to the original name anyway
|
||||
if (hasChanged || (this._tabEdited.zenStaticLabel && newName)) {
|
||||
this._tabEdited.zenStaticLabel = newName;
|
||||
gBrowser._setTabLabel(this._tabEdited, newName);
|
||||
gBrowser._setTabLabel(this._tabEdited, newName, {
|
||||
_zenChangeLabelFlag: true,
|
||||
});
|
||||
gZenUIManager.showToast("zen-tabs-renamed");
|
||||
} else {
|
||||
delete this._tabEdited.zenStaticLabel;
|
||||
@@ -1708,7 +1711,8 @@ window.gZenVerticalTabsManager = {
|
||||
this._tabEdited.after(input);
|
||||
}
|
||||
input.focus();
|
||||
input.select();
|
||||
input.setSelectionRange(0, input.value.length, "backward");
|
||||
input.scrollLeft = 0;
|
||||
|
||||
input.addEventListener("blur", this._renameTabHalt);
|
||||
},
|
||||
|
||||
@@ -115,7 +115,9 @@ document.addEventListener(
|
||||
});
|
||||
break;
|
||||
case "cmd_zenTogglePinTab": {
|
||||
const currentTab = gBrowser.selectedTab;
|
||||
const currentTab = gZenGlanceManager.getTabOrGlanceParent(
|
||||
gBrowser.selectedTab
|
||||
);
|
||||
if (currentTab && !currentTab.hasAttribute("zen-empty-tab")) {
|
||||
if (currentTab.pinned) {
|
||||
gBrowser.unpinTab(currentTab);
|
||||
|
||||
@@ -51,6 +51,10 @@
|
||||
--zen-toolbox-max-width: 74px !important;
|
||||
--zen-compact-float: var(--zen-element-separation);
|
||||
|
||||
@media (-moz-mac-tahoe-theme) {
|
||||
--zen-compact-mode-no-padding-radius-fix: -2px;
|
||||
}
|
||||
|
||||
:root[zen-no-padding='true'] & {
|
||||
--zen-compact-float: 10px;
|
||||
--zen-compact-top-toolbar-hidden-fix: var(--zen-compact-float);
|
||||
|
||||
@@ -85,8 +85,7 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
|
||||
menuitem.addEventListener("command", () =>
|
||||
this.openGlance({
|
||||
url: gContextMenu.linkURL,
|
||||
triggeringPrincipal:
|
||||
Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
triggeringPrincipal: gContextMenu.principal,
|
||||
})
|
||||
);
|
||||
|
||||
@@ -354,6 +353,28 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
|
||||
return this.#lastLinkClickData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether a glance load is permitted for its triggering principal.
|
||||
*
|
||||
* @param {object} data - Glance data including URL and triggeringPrincipal
|
||||
* @returns {boolean} Whether the load is allowed
|
||||
*/
|
||||
#isGlanceLoadAllowed(data) {
|
||||
const { url, triggeringPrincipal } = data ?? {};
|
||||
if (typeof url !== "string" || !url.length || !triggeringPrincipal) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
Services.scriptSecurityManager.checkLoadURIStrWithPrincipal(
|
||||
triggeringPrincipal,
|
||||
url
|
||||
);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a glance overlay with the specified data
|
||||
*
|
||||
@@ -371,6 +392,13 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
|
||||
return Promise.resolve(this.#currentTab);
|
||||
}
|
||||
|
||||
// Existing-tab glances perform no navigation and are exempt; for fresh
|
||||
// loads, refuse any URL the triggering principal isn't allowed to load
|
||||
// (e.g. a web page linking to file://).
|
||||
if (!existingTab && !this.#isGlanceLoadAllowed(data)) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
if (!data.height || !data.width) {
|
||||
data = {
|
||||
...data,
|
||||
|
||||
@@ -245,10 +245,6 @@ class nsZenSpaceRoutingManager {
|
||||
if (targetWorkspace) {
|
||||
workspaces.moveTabToWorkspace(newTab, targetWorkspace.uuid);
|
||||
|
||||
if (inBackground) {
|
||||
return;
|
||||
}
|
||||
|
||||
const mostRecentWindow =
|
||||
Services.wm.getMostRecentWindow("navigator:browser");
|
||||
const isOriginatingWindow = win === mostRecentWindow;
|
||||
@@ -256,7 +252,10 @@ class nsZenSpaceRoutingManager {
|
||||
win.gZenWorkspaces.lastSelectedWorkspaceTabs[
|
||||
targetWorkspace.uuid
|
||||
] = newTab;
|
||||
await win.gZenWorkspaces.changeWorkspace(targetWorkspace);
|
||||
|
||||
if (!inBackground) {
|
||||
await win.gZenWorkspaces.changeWorkspace(targetWorkspace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,8 +182,8 @@ class nsZenWorkspaceCreation extends MozXULElement {
|
||||
this.onProfileCommand.bind(this)
|
||||
);
|
||||
this.profilesPopup.addEventListener(
|
||||
"popupshown",
|
||||
this.onProfilePopupShown.bind(this)
|
||||
"popupshowing",
|
||||
this.onProfilePopupShowing.bind(this)
|
||||
);
|
||||
this.profilesPopup.addEventListener(
|
||||
"command",
|
||||
@@ -296,7 +296,7 @@ class nsZenWorkspaceCreation extends MozXULElement {
|
||||
this.profilesPopup.openPopup(event.target, "after_start");
|
||||
}
|
||||
|
||||
onProfilePopupShown(event) {
|
||||
onProfilePopupShowing(event) {
|
||||
return window.createUserContextMenu(event, {
|
||||
isContextMenu: true,
|
||||
showDefaultTab: true,
|
||||
|
||||
@@ -1229,7 +1229,11 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
const newTab = this.openAndSwitchToTab(url, {
|
||||
skipRoute: true,
|
||||
inBackground: false,
|
||||
triggeringPrincipal: window.gContextMenu.principal,
|
||||
});
|
||||
if (!newTab) {
|
||||
return;
|
||||
}
|
||||
this.splitTabs([currentTab, newTab], undefined, 1);
|
||||
}
|
||||
|
||||
@@ -1979,9 +1983,24 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
* @returns {tab} The tab that was opened
|
||||
*/
|
||||
openAndSwitchToTab(url, options) {
|
||||
const triggeringPrincipal = options?.triggeringPrincipal;
|
||||
if (!triggeringPrincipal) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
Services.scriptSecurityManager.checkLoadURIStrWithPrincipal(
|
||||
triggeringPrincipal,
|
||||
url
|
||||
);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
const parentWindow = window.parent;
|
||||
const targetWindow = parentWindow || window;
|
||||
const tab = targetWindow.gBrowser.addTrustedTab(url, options);
|
||||
const tab = targetWindow.gBrowser.addTab(url, {
|
||||
...options,
|
||||
triggeringPrincipal,
|
||||
});
|
||||
targetWindow.gBrowser.selectedTab = tab;
|
||||
return tab;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
"binaryName": "zen",
|
||||
"version": {
|
||||
"product": "firefox",
|
||||
"version": "152.0.3",
|
||||
"candidate": "152.0.3",
|
||||
"version": "152.0.4",
|
||||
"candidate": "152.0.4",
|
||||
"candidateBuild": 1
|
||||
},
|
||||
"buildOptions": {
|
||||
@@ -20,7 +20,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.21.4b",
|
||||
"displayVersion": "1.21.5b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user