mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-22 15:25:35 +00:00
chore: Sync upstream Firefox to version 147.0, p=#11822
* chore: Sync upstream to `Firefox 147.0` * chore: Continued migration, b=no-bug, c=tests * chore: Finish migration without testing, b=no-bug, c=scripts, tabs, media, common, split-view * feat: Finish migration, b=no-bug, c=common, compact-mode, split-view, workspaces * feat: Finish basic migration, b=no-bug, c=kbs, common, folders * feat: Update surfer, b=no-bug, c=scripts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
|
||||
index 5dcbb1705625746afd7c57b7a6044c4fa2f00afd..c0872057ec65fe8ebdb2f81e47198dec5d6f0faf 100644
|
||||
index 8acc1e5a97f769dc76d30ca0534f28b0a4511ab5..bd54169f976d3abe7d122b0efc0fa0d0626179eb 100644
|
||||
--- a/browser/components/BrowserGlue.sys.mjs
|
||||
+++ b/browser/components/BrowserGlue.sys.mjs
|
||||
@@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
diff --git a/browser/components/aboutlogins/content/components/login-list.css b/browser/components/aboutlogins/content/components/login-list.css
|
||||
index e8d2077ca425d9a2b924aa6ac6ba8ada36b76615..95a8ab3dcff832f16068b6739526e8e29f0b4e26 100644
|
||||
--- a/browser/components/aboutlogins/content/components/login-list.css
|
||||
+++ b/browser/components/aboutlogins/content/components/login-list.css
|
||||
@@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
:host {
|
||||
- border-inline-end: 1px solid var(--in-content-border-color);
|
||||
+ border: 1px solid var(--in-content-border-color);
|
||||
background-color: var(--background-color-box);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -162,3 +162,8 @@ ol {
|
||||
font-size: 0.85em;
|
||||
color: var(--text-color-deemphasized);
|
||||
}
|
||||
+
|
||||
+:host {
|
||||
+ border-radius: 5px;
|
||||
+ margin: 10px;
|
||||
+}
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/asrouter/modules/FeatureCallout.sys.mjs b/browser/components/asrouter/modules/FeatureCallout.sys.mjs
|
||||
index 4ea9c9e88a1831dad7e42ebd8d0dd507102e8280..316aa626e525f05caac7f315e0ea7ae9d822b6af 100644
|
||||
index 80dd8b5e357acc9decea6cf621c4868d547a0eb3..8a5fea6ed1a62a5930bafffcbbde3ce3292e42a1 100644
|
||||
--- a/browser/components/asrouter/modules/FeatureCallout.sys.mjs
|
||||
+++ b/browser/components/asrouter/modules/FeatureCallout.sys.mjs
|
||||
@@ -777,6 +777,7 @@ export class FeatureCallout {
|
||||
@@ -778,6 +778,7 @@ export class FeatureCallout {
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js
|
||||
index d6393080aa8aff6c0f7b2043fd408b6f6249d0c4..bf37b46c4743b7619393c730720204380635666a 100644
|
||||
index d016811caa6c1ecc947fd705f6e1b27e3b5a12a5..89f2a9ec9ebd80e744ed0118e1b3c164151cf2b8 100644
|
||||
--- a/browser/components/customizableui/content/panelUI.js
|
||||
+++ b/browser/components/customizableui/content/panelUI.js
|
||||
@@ -608,10 +608,12 @@ const PanelUI = {
|
||||
@@ -619,10 +619,12 @@ const PanelUI = {
|
||||
if (hasKids && !this.navbar.hasAttribute("nonemptyoverflow")) {
|
||||
this.navbar.setAttribute("nonemptyoverflow", "true");
|
||||
this.overflowPanel.setAttribute("hasfixeditems", "true");
|
||||
@@ -15,7 +15,7 @@ index d6393080aa8aff6c0f7b2043fd408b6f6249d0c4..bf37b46c4743b7619393c73072020438
|
||||
}
|
||||
},
|
||||
|
||||
@@ -959,7 +961,7 @@ const PanelUI = {
|
||||
@@ -970,7 +972,7 @@ const PanelUI = {
|
||||
el.removeAttribute("data-lazy-l10n-id");
|
||||
});
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
diff --git a/browser/components/preferences/jar.mn b/browser/components/preferences/jar.mn
|
||||
index 7c5f6e9053f119a790f83a68c75ee11a6c172d98..cb0e1386318e8a8df24dfbbf8430d0a09fe07d16 100644
|
||||
index 5e53352fdbd25d2aed40d0117c3ad7072b9acf8c..0f400864ba7cc850d212ddeeefb71a06376e845f 100644
|
||||
--- a/browser/components/preferences/jar.mn
|
||||
+++ b/browser/components/preferences/jar.mn
|
||||
@@ -37,3 +37,5 @@ browser.jar:
|
||||
content/browser/preferences/widgets/security-privacy-card.mjs (widgets/security-privacy/security-privacy-card/security-privacy-card.mjs)
|
||||
content/browser/preferences/widgets/security-privacy-card.css (widgets/security-privacy/security-privacy-card/security-privacy-card.css)
|
||||
@@ -42,3 +42,5 @@ browser.jar:
|
||||
content/browser/preferences/widgets/sync-device-name.mjs (widgets/sync-device-name/sync-device-name.mjs)
|
||||
content/browser/preferences/widgets/sync-engines-list.mjs (widgets/sync-engine-list/sync-engines-list.mjs)
|
||||
content/browser/preferences/widgets/sync-engines-list.css (widgets/sync-engine-list/sync-engines-list.css)
|
||||
+
|
||||
+ content/browser/preferences/zen-settings.js
|
||||
\ No newline at end of file
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
|
||||
index bfddd91e6b524f2ebced985f5d12a4963e5c6075..7e80c0a293aae6356e53d9c9760017290e97ffa0 100644
|
||||
index d218a04e0ab44e6a55e368566c97df95e939565b..59f038e59fe1a8554a8b112c5ac33e700b71c79c 100644
|
||||
--- a/browser/components/preferences/main.inc.xhtml
|
||||
+++ b/browser/components/preferences/main.inc.xhtml
|
||||
@@ -141,7 +141,8 @@
|
||||
@@ -48,7 +48,8 @@
|
||||
<!-- Browser layout -->
|
||||
<groupbox data-category="paneGeneral"
|
||||
data-subcategory="layout"
|
||||
@@ -12,7 +12,7 @@ index bfddd91e6b524f2ebced985f5d12a4963e5c6075..7e80c0a293aae6356e53d9c976001729
|
||||
<label><html:h2 data-l10n-id="browser-layout-header"/></label>
|
||||
<radiogroup id="browserLayoutRadioGroup" preference="sidebar.verticalTabs">
|
||||
<radio id="browserLayoutHorizontalTabs" data-l10n-id="browser-layout-horizontal-tabs" value="false"/>
|
||||
@@ -346,6 +347,7 @@
|
||||
@@ -253,6 +254,7 @@
|
||||
languages-customize-add.label,
|
||||
" />
|
||||
</hbox>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
|
||||
index a184086f10d6a919c8125ab5d7728319256b3b73..7c826000ccdc8a55a12a08bdc2c547d886e5610c 100644
|
||||
index 6f99cbf973d414ffd4036d17740abe963629db37..520dcce0adb06c5ebfee8c76f72f7d7b40e106da 100644
|
||||
--- a/browser/components/preferences/main.js
|
||||
+++ b/browser/components/preferences/main.js
|
||||
@@ -1117,6 +1117,11 @@ let SETTINGS_CONFIG = {
|
||||
@@ -1729,6 +1729,11 @@ SettingGroupManager.registerGroups({
|
||||
id: "browserRestoreSession",
|
||||
l10nId: "startup-restore-windows-and-tabs",
|
||||
},
|
||||
@@ -14,7 +14,7 @@ index a184086f10d6a919c8125ab5d7728319256b3b73..7c826000ccdc8a55a12a08bdc2c547d8
|
||||
{
|
||||
id: "windowsLaunchOnLogin",
|
||||
l10nId: "windows-launch-on-login",
|
||||
@@ -1700,7 +1705,7 @@ function getBundleForLocales(newLocales) {
|
||||
@@ -3133,7 +3138,7 @@ function getBundleForLocales(newLocales) {
|
||||
])
|
||||
);
|
||||
return new Localization(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
|
||||
index a0e16b375f0ad7ef58bf68d7574453ef37d4557f..2d5b5a0715b5ed8ebe592eebea0219a6cde17b52 100644
|
||||
index 7d6835b8636f771943b8081b7d56f579812026c2..97227eec4baeffd39b23ed6194ce7fa108c3b862 100644
|
||||
--- a/browser/components/preferences/preferences.js
|
||||
+++ b/browser/components/preferences/preferences.js
|
||||
@@ -118,6 +118,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
|
||||
@@ -124,6 +124,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
|
||||
styleSheets: [
|
||||
"chrome://browser/skin/preferences/dialog.css",
|
||||
"chrome://browser/skin/preferences/preferences.css",
|
||||
@@ -10,7 +10,7 @@ index a0e16b375f0ad7ef58bf68d7574453ef37d4557f..2d5b5a0715b5ed8ebe592eebea0219a6
|
||||
],
|
||||
resizeCallback: async ({ title, frame }) => {
|
||||
// Search within main document and highlight matched keyword.
|
||||
@@ -225,6 +226,10 @@ function init_all() {
|
||||
@@ -344,6 +345,10 @@ function init_all() {
|
||||
register_module("paneSearch", gSearchPane);
|
||||
register_module("panePrivacy", gPrivacyPane);
|
||||
register_module("paneContainers", gContainersPane);
|
||||
@@ -19,5 +19,5 @@ index a0e16b375f0ad7ef58bf68d7574453ef37d4557f..2d5b5a0715b5ed8ebe592eebea0219a6
|
||||
+ register_module("paneZenCKS", gZenCKSSettings);
|
||||
+ register_module("paneZenMarketplace", gZenMarketplaceManager);
|
||||
|
||||
for (let [subPane, config] of Object.entries(CONFIG_PANES)) {
|
||||
subPane = friendlyPrefCategoryNameToInternalName(subPane);
|
||||
for (let [id, config] of Object.entries(CONFIG_PANES)) {
|
||||
SettingPaneManager.registerPane(id, config);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
|
||||
index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d102b4fe0 100644
|
||||
index a1aec823d6266d69ff02aa8523d2da999a0871b9..559f2ea12e53dd19f24e7953db4388456b97f02c 100644
|
||||
--- a/browser/components/preferences/preferences.xhtml
|
||||
+++ b/browser/components/preferences/preferences.xhtml
|
||||
@@ -45,6 +45,8 @@
|
||||
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-group.css" />
|
||||
@@ -46,6 +46,8 @@
|
||||
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-pane.css" />
|
||||
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-control.css" />
|
||||
|
||||
+#include zen-preferences-links.xhtml
|
||||
@@ -11,7 +11,7 @@ index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d
|
||||
<link rel="localization" href="branding/brand.ftl"/>
|
||||
<link rel="localization" href="browser/browser.ftl"/>
|
||||
<!-- Used by fontbuilder.js -->
|
||||
@@ -113,6 +115,11 @@
|
||||
@@ -115,6 +117,11 @@
|
||||
<hbox flex="1">
|
||||
|
||||
<vbox class="navigation">
|
||||
@@ -23,7 +23,7 @@ index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d
|
||||
<!-- category list -->
|
||||
<richlistbox id="categories" data-l10n-id="category-list" data-l10n-attrs="aria-label">
|
||||
<richlistitem id="category-general"
|
||||
@@ -125,6 +132,50 @@
|
||||
@@ -127,6 +134,50 @@
|
||||
<label class="category-name" flex="1" data-l10n-id="pane-general-title"></label>
|
||||
</richlistitem>
|
||||
|
||||
@@ -74,7 +74,7 @@ index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d
|
||||
<richlistitem id="category-home"
|
||||
class="category"
|
||||
value="paneHome"
|
||||
@@ -236,11 +287,6 @@
|
||||
@@ -242,11 +293,6 @@
|
||||
<html:a href="about:policies" target="_blank" data-l10n-id="managed-notice"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
@@ -86,7 +86,7 @@ index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d
|
||||
</hbox>
|
||||
</hbox>
|
||||
<vbox id="mainPrefPane">
|
||||
@@ -254,6 +300,10 @@
|
||||
@@ -260,6 +306,10 @@
|
||||
#include sync.inc.xhtml
|
||||
#include experimental.inc.xhtml
|
||||
#include moreFromMozilla.inc.xhtml
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/screenshots/overlay/overlay.css b/browser/components/screenshots/overlay/overlay.css
|
||||
index ee2740fc48e9b70fe17b0f27b60053209516dbbf..cc0270e0eb28c3e60216460b02d62111abb970de 100644
|
||||
index 43a5d2109ad107ce1c79eef7cb8635bc1fa813f7..c1e5648d0e71826119bda1bc18c5d16886bab8fd 100644
|
||||
--- a/browser/components/screenshots/overlay/overlay.css
|
||||
+++ b/browser/components/screenshots/overlay/overlay.css
|
||||
@@ -196,6 +196,9 @@
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/search/SearchUIUtils.sys.mjs b/browser/components/search/SearchUIUtils.sys.mjs
|
||||
index 15fdb0cd7664c2b49977902d7f4c7a117d82cf15..6aedbc18de6604b63b2586e7d9745a4c4e7e38ae 100644
|
||||
index 65daa1402a52e252360386e60471f726c1387bb3..be8f588316a8a4d7f33a324bf11f9e1f19def32d 100644
|
||||
--- a/browser/components/search/SearchUIUtils.sys.mjs
|
||||
+++ b/browser/components/search/SearchUIUtils.sys.mjs
|
||||
@@ -434,7 +434,7 @@ export var SearchUIUtils = {
|
||||
@@ -444,7 +444,7 @@ export var SearchUIUtils = {
|
||||
triggeringSearchEngine: engine.name,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionFile.sys.mjs b/browser/components/sessionstore/SessionFile.sys.mjs
|
||||
index 31140cb8be3b529a0952ca8dc55165690b0e2120..605c9e0aa84da0a2d3171a0573e8cd95e27bd0c4 100644
|
||||
index 5580838acd72bf0e1189d367984859529d89f5b4..e5fa6076a9cc6ada016ccc4e129cad455010a522 100644
|
||||
--- a/browser/components/sessionstore/SessionFile.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionFile.sys.mjs
|
||||
@@ -22,6 +22,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -10,7 +10,7 @@ index 31140cb8be3b529a0952ca8dc55165690b0e2120..605c9e0aa84da0a2d3171a0573e8cd95
|
||||
});
|
||||
|
||||
const PREF_UPGRADE_BACKUP = "browser.sessionstore.upgradeBackup.latestBuildID";
|
||||
@@ -380,7 +381,7 @@ var SessionFileInternal = {
|
||||
@@ -381,7 +382,7 @@ var SessionFileInternal = {
|
||||
this._readOrigin = result.origin;
|
||||
|
||||
result.noFilesFound = noFilesFound;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStartup.sys.mjs b/browser/components/sessionstore/SessionStartup.sys.mjs
|
||||
index be23213ae9ec7e59358a17276c6c3764d38d9996..229bb1346f9349892acb1e9e05109b28f5a5b45f 100644
|
||||
index 86600ffb5178599ab23270a964064ca657a3283f..ffb22990e7d9e1b79f276fe5c1eb38f2b869a57b 100644
|
||||
--- a/browser/components/sessionstore/SessionStartup.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStartup.sys.mjs
|
||||
@@ -40,6 +40,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -28,7 +28,7 @@ index be23213ae9ec7e59358a17276c6c3764d38d9996..229bb1346f9349892acb1e9e05109b28
|
||||
if (this._initialState == null) {
|
||||
// No valid session found.
|
||||
this._sessionType = this.NO_SESSION;
|
||||
@@ -335,12 +338,7 @@ export var SessionStartup = {
|
||||
@@ -336,12 +339,7 @@ export var SessionStartup = {
|
||||
isAutomaticRestoreEnabled() {
|
||||
if (this._resumeSessionEnabled === null) {
|
||||
this._resumeSessionEnabled =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a6376050311377 100644
|
||||
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..959e73ab86bdb78203e3aed0c939c1b9acbe4897 100644
|
||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
@@ -127,6 +127,9 @@ const TAB_EVENTS = [
|
||||
@@ -20,7 +20,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
});
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "blankURI", () => {
|
||||
@@ -1238,10 +1242,7 @@ var SessionStoreInternal = {
|
||||
@@ -1261,10 +1265,7 @@ var SessionStoreInternal = {
|
||||
*/
|
||||
get willAutoRestore() {
|
||||
return (
|
||||
@@ -32,7 +32,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1911,6 +1912,9 @@ var SessionStoreInternal = {
|
||||
@@ -1934,6 +1935,9 @@ var SessionStoreInternal = {
|
||||
case "TabPinned":
|
||||
case "TabUnpinned":
|
||||
case "SwapDocShells":
|
||||
@@ -42,7 +42,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
this.saveStateDelayed(win);
|
||||
break;
|
||||
case "TabGroupCreate":
|
||||
@@ -2020,6 +2024,10 @@ var SessionStoreInternal = {
|
||||
@@ -2044,6 +2048,10 @@ var SessionStoreInternal = {
|
||||
this._windows[aWindow.__SSi].isTaskbarTab = true;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
let tabbrowser = aWindow.gBrowser;
|
||||
|
||||
// add tab change listeners to all already existing tabs
|
||||
@@ -2107,6 +2115,7 @@ var SessionStoreInternal = {
|
||||
@@ -2131,6 +2139,7 @@ var SessionStoreInternal = {
|
||||
null,
|
||||
"sessionstore-one-or-no-tab-restored"
|
||||
);
|
||||
@@ -61,7 +61,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
this._deferredAllWindowsRestored.resolve();
|
||||
}
|
||||
// this window was opened by _openWindowWithState
|
||||
@@ -2151,7 +2160,6 @@ var SessionStoreInternal = {
|
||||
@@ -2175,7 +2184,6 @@ var SessionStoreInternal = {
|
||||
if (closedWindowState) {
|
||||
let newWindowState;
|
||||
if (
|
||||
@@ -69,7 +69,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
!lazy.SessionStartup.willRestore()
|
||||
) {
|
||||
// We want to split the window up into pinned tabs and unpinned tabs.
|
||||
@@ -2215,6 +2223,15 @@ var SessionStoreInternal = {
|
||||
@@ -2239,6 +2247,15 @@ var SessionStoreInternal = {
|
||||
});
|
||||
this._shouldRestoreLastSession = false;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
|
||||
if (this._restoreLastWindow && aWindow.toolbar.visible) {
|
||||
// always reset (if not a popup window)
|
||||
@@ -2465,7 +2482,7 @@ var SessionStoreInternal = {
|
||||
@@ -2491,7 +2508,7 @@ var SessionStoreInternal = {
|
||||
// 2) Flush the window.
|
||||
// 3) When the flush is complete, revisit our decision to store the window
|
||||
// in _closedWindows, and add/remove as necessary.
|
||||
@@ -94,7 +94,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
this.maybeSaveClosedWindow(winData, isLastWindow);
|
||||
}
|
||||
|
||||
@@ -2486,7 +2503,7 @@ var SessionStoreInternal = {
|
||||
@@ -2512,7 +2529,7 @@ var SessionStoreInternal = {
|
||||
|
||||
// Save non-private windows if they have at
|
||||
// least one saveable tab or are the last window.
|
||||
@@ -103,7 +103,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
this.maybeSaveClosedWindow(winData, isLastWindow);
|
||||
|
||||
if (!isLastWindow && winData.closedId > -1) {
|
||||
@@ -2582,6 +2599,7 @@ var SessionStoreInternal = {
|
||||
@@ -2608,6 +2625,7 @@ var SessionStoreInternal = {
|
||||
let alreadyStored = winIndex != -1;
|
||||
// If sidebar command is truthy, i.e. sidebar is open, store sidebar settings
|
||||
let shouldStore = hasSaveableTabs || isLastWindow;
|
||||
@@ -111,7 +111,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
|
||||
if (shouldStore && !alreadyStored) {
|
||||
let index = this._closedWindows.findIndex(win => {
|
||||
@@ -3373,7 +3391,7 @@ var SessionStoreInternal = {
|
||||
@@ -3408,7 +3426,7 @@ var SessionStoreInternal = {
|
||||
if (!isPrivateWindow && tabState.isPrivate) {
|
||||
return;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4089,6 +4107,12 @@ var SessionStoreInternal = {
|
||||
@@ -4129,6 +4147,12 @@ var SessionStoreInternal = {
|
||||
Math.min(tabState.index, tabState.entries.length)
|
||||
);
|
||||
tabState.pinned = false;
|
||||
@@ -133,7 +133,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
|
||||
if (inBackground === false) {
|
||||
aWindow.gBrowser.selectedTab = newTab;
|
||||
@@ -4525,6 +4549,7 @@ var SessionStoreInternal = {
|
||||
@@ -4565,6 +4589,7 @@ var SessionStoreInternal = {
|
||||
// Append the tab if we're opening into a different window,
|
||||
tabIndex: aSource == aTargetWindow ? pos : Infinity,
|
||||
pinned: state.pinned,
|
||||
@@ -141,7 +141,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
userContextId: state.userContextId,
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
@@ -5374,7 +5399,7 @@ var SessionStoreInternal = {
|
||||
@@ -5414,7 +5439,7 @@ var SessionStoreInternal = {
|
||||
|
||||
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
|
||||
let tab = tabbrowser.tabs[i];
|
||||
@@ -150,7 +150,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
removableTabs.push(tab);
|
||||
}
|
||||
}
|
||||
@@ -5483,7 +5508,7 @@ var SessionStoreInternal = {
|
||||
@@ -5525,7 +5550,7 @@ var SessionStoreInternal = {
|
||||
|
||||
// collect the data for all windows
|
||||
for (ix in this._windows) {
|
||||
@@ -159,7 +159,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
// window data is still in _statesToRestore
|
||||
continue;
|
||||
}
|
||||
@@ -5625,11 +5650,12 @@ var SessionStoreInternal = {
|
||||
@@ -5668,11 +5693,12 @@ var SessionStoreInternal = {
|
||||
}
|
||||
|
||||
let tabbrowser = aWindow.gBrowser;
|
||||
@@ -173,7 +173,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
// update the internal state data for this window
|
||||
for (let tab of tabs) {
|
||||
if (tab == aWindow.FirefoxViewHandler.tab) {
|
||||
@@ -5640,6 +5666,9 @@ var SessionStoreInternal = {
|
||||
@@ -5683,6 +5709,9 @@ var SessionStoreInternal = {
|
||||
tabsData.push(tabData);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
// update tab group state for this window
|
||||
winData.groups = [];
|
||||
for (let tabGroup of aWindow.gBrowser.tabGroups) {
|
||||
@@ -5652,7 +5681,7 @@ var SessionStoreInternal = {
|
||||
@@ -5695,7 +5724,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,
|
||||
// since it's only inserted into the tab strip after it's selected).
|
||||
if (aWindow.FirefoxViewHandler.tab?.selected) {
|
||||
@@ -192,7 +192,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
winData.title = tabbrowser.tabs[0].label;
|
||||
}
|
||||
winData.selected = selectedIndex;
|
||||
@@ -5765,8 +5794,8 @@ var SessionStoreInternal = {
|
||||
@@ -5810,8 +5839,8 @@ var SessionStoreInternal = {
|
||||
// selectTab represents.
|
||||
let selectTab = 0;
|
||||
if (overwriteTabs) {
|
||||
@@ -203,7 +203,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
selectTab = Math.min(selectTab, winData.tabs.length);
|
||||
}
|
||||
|
||||
@@ -5788,6 +5817,7 @@ var SessionStoreInternal = {
|
||||
@@ -5833,6 +5862,7 @@ var SessionStoreInternal = {
|
||||
if (overwriteTabs) {
|
||||
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
|
||||
if (!tabbrowser.tabs[i].selected) {
|
||||
@@ -211,7 +211,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
tabbrowser.removeTab(tabbrowser.tabs[i]);
|
||||
}
|
||||
}
|
||||
@@ -5821,6 +5851,12 @@ var SessionStoreInternal = {
|
||||
@@ -5866,6 +5896,12 @@ var SessionStoreInternal = {
|
||||
savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id)
|
||||
);
|
||||
}
|
||||
@@ -224,7 +224,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
|
||||
// Move the originally open tabs to the end.
|
||||
if (initialTabs) {
|
||||
@@ -6372,6 +6408,25 @@ var SessionStoreInternal = {
|
||||
@@ -6419,6 +6455,25 @@ var SessionStoreInternal = {
|
||||
|
||||
// Most of tabData has been restored, now continue with restoring
|
||||
// attributes that may trigger external events.
|
||||
@@ -250,7 +250,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
|
||||
if (tabData.pinned) {
|
||||
tabbrowser.pinTab(tab);
|
||||
@@ -7290,7 +7345,7 @@ var SessionStoreInternal = {
|
||||
@@ -7343,7 +7398,7 @@ var SessionStoreInternal = {
|
||||
|
||||
let groupsToSave = new Map();
|
||||
for (let tIndex = 0; tIndex < window.tabs.length; ) {
|
||||
@@ -259,7 +259,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
|
||||
// Adjust window.selected
|
||||
if (tIndex + 1 < window.selected) {
|
||||
window.selected -= 1;
|
||||
@@ -7305,7 +7360,7 @@ var SessionStoreInternal = {
|
||||
@@ -7358,7 +7413,7 @@ var SessionStoreInternal = {
|
||||
);
|
||||
// We don't want to increment tIndex here.
|
||||
continue;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sidebar/browser-sidebar.js b/browser/components/sidebar/browser-sidebar.js
|
||||
index 220c3c83fa09daaec433803a4655a20114a137a6..1ef8adc3ecfa61839bb993f7fc090133bffe77db 100644
|
||||
index bd6db85732e6e99ca51ce9c4c1a7d469199cf8cb..6c7859c1014baf4e343714ef797cf558d065e189 100644
|
||||
--- a/browser/components/sidebar/browser-sidebar.js
|
||||
+++ b/browser/components/sidebar/browser-sidebar.js
|
||||
@@ -793,7 +793,7 @@ var SidebarController = {
|
||||
@@ -8,6 +8,6 @@ index 220c3c83fa09daaec433803a4655a20114a137a6..1ef8adc3ecfa61839bb993f7fc090133
|
||||
let contentArea = document.getElementById("tabbrowser-tabbox");
|
||||
- let browser = document.getElementById("browser");
|
||||
+ let browser = document.getElementById("tabbrowser-tabbox");
|
||||
[...browser.children].forEach((node, i) => {
|
||||
node.style.order = i + 1;
|
||||
[...browser.children].forEach((node, i, children) => {
|
||||
node.style.order = this._positionStart ? i + 1 : children.length - i;
|
||||
});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
|
||||
index bcd7689e9d68ef8b171c327188174334c4271e21..0a95e1137fdf4b63e0d841776ad934da1a513c6f 100644
|
||||
index 9c5e92fbd555d328ce09c0cf0ff8078584f68478..2af7a428bc830d8c12b3d3c0af375c97e6942994 100644
|
||||
--- a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
|
||||
+++ b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
|
||||
@@ -938,6 +938,7 @@ export class AsyncTabSwitcher {
|
||||
@@ -939,6 +939,7 @@ export class AsyncTabSwitcher {
|
||||
this.tabbrowser._printPreviewBrowsers.has(browser) ||
|
||||
this.tabbrowser.splitViewBrowsers.includes(browser) ||
|
||||
lazy.PictureInPicture.isOriginatingBrowser(browser)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/TabUnloader.sys.mjs b/browser/components/tabbrowser/TabUnloader.sys.mjs
|
||||
index 2a3fcbe9dfb6328cabba891697990e2467973f6e..22fdaaefa71b3c37cbccbd7ae4db044b1057f1f2 100644
|
||||
index aefccef39f0b81176a5710a794e8a5e2650d6507..e073c65790df6d55e827a4f4596199f4f1a99a57 100644
|
||||
--- a/browser/components/tabbrowser/TabUnloader.sys.mjs
|
||||
+++ b/browser/components/tabbrowser/TabUnloader.sys.mjs
|
||||
@@ -52,7 +52,7 @@ let CRITERIA_WEIGHT = 1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/TabsList.sys.mjs b/browser/components/tabbrowser/TabsList.sys.mjs
|
||||
index b394a980869d5e5df01b6afdd81e0f41c090e6ec..236c99db0dfa5ebcba50d55c1e4eb6ab7b8110b2 100644
|
||||
index 400a69449e6477da754b06530eef7c15ea9ad887..7dd22f481dade16286533acffc2c2321d4c34b41 100644
|
||||
--- a/browser/components/tabbrowser/TabsList.sys.mjs
|
||||
+++ b/browser/components/tabbrowser/TabsList.sys.mjs
|
||||
@@ -87,7 +87,7 @@ class TabsListBase {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/browser-ctrlTab.js b/browser/components/tabbrowser/content/browser-ctrlTab.js
|
||||
index 958728cde19dd7cc24692baa89e11fcab816ab82..32e2b6af2536133f170bd5e14c47392ded8440eb 100644
|
||||
index 3330dc133c120e7fbeecd2a36c71f9dfba60b3fb..0243cdfe67e5eb3f68fc7cde66bb3809e79bd6c3 100644
|
||||
--- a/browser/components/tabbrowser/content/browser-ctrlTab.js
|
||||
+++ b/browser/components/tabbrowser/content/browser-ctrlTab.js
|
||||
@@ -249,7 +249,8 @@ var ctrlTab = {
|
||||
@@ -252,7 +252,8 @@ var ctrlTab = {
|
||||
},
|
||||
|
||||
get tabList() {
|
||||
@@ -12,7 +12,7 @@ index 958728cde19dd7cc24692baa89e11fcab816ab82..32e2b6af2536133f170bd5e14c47392d
|
||||
},
|
||||
|
||||
init: function ctrlTab_init() {
|
||||
@@ -460,7 +461,7 @@ var ctrlTab = {
|
||||
@@ -457,7 +458,7 @@ var ctrlTab = {
|
||||
// If the tab is hidden, don't add it to the list unless it's selected
|
||||
// (Normally hidden tabs would be unhidden when selected, but that doesn't
|
||||
// happen for Firefox View).
|
||||
@@ -21,7 +21,7 @@ index 958728cde19dd7cc24692baa89e11fcab816ab82..32e2b6af2536133f170bd5e14c47392d
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -484,7 +485,7 @@ var ctrlTab = {
|
||||
@@ -481,7 +482,7 @@ var ctrlTab = {
|
||||
},
|
||||
|
||||
open: function ctrlTab_open() {
|
||||
@@ -30,7 +30,7 @@ index 958728cde19dd7cc24692baa89e11fcab816ab82..32e2b6af2536133f170bd5e14c47392d
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -763,7 +764,7 @@ var ctrlTab = {
|
||||
@@ -751,7 +752,7 @@ var ctrlTab = {
|
||||
_initRecentlyUsedTabs() {
|
||||
this._recentlyUsedTabs = Array.prototype.filter.call(
|
||||
gBrowser.tabs,
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
diff --git a/browser/components/tabbrowser/content/drag-and-drop.js b/browser/components/tabbrowser/content/drag-and-drop.js
|
||||
index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129da99905f 100644
|
||||
index 57800333445ec7850742145527e04ae8d504b0bb..3a5015c391c594c94aa77a7ff9b08762d36276f6 100644
|
||||
--- a/browser/components/tabbrowser/content/drag-and-drop.js
|
||||
+++ b/browser/components/tabbrowser/content/drag-and-drop.js
|
||||
@@ -32,6 +32,9 @@
|
||||
@@ -35,6 +35,9 @@
|
||||
* @returns {MozTabbrowserTab|vbox}
|
||||
*/
|
||||
const elementToMove = element => {
|
||||
+ if (element.group?.hasAttribute("split-view-group")) {
|
||||
+ return element.group;
|
||||
+ }
|
||||
if (isTab(element)) {
|
||||
if (isTab(element) || isSplitViewWrapper(element)) {
|
||||
return element;
|
||||
}
|
||||
@@ -112,6 +115,9 @@
|
||||
@@ -115,6 +118,9 @@
|
||||
}
|
||||
|
||||
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||
@@ -22,7 +22,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
if (
|
||||
(dropEffect == "move" || dropEffect == "copy") &&
|
||||
document == draggedTab.ownerDocument &&
|
||||
@@ -130,10 +136,6 @@
|
||||
@@ -133,10 +139,6 @@
|
||||
|
||||
// Pinned tabs in expanded vertical mode are on a grid format and require
|
||||
// different logic to drag and drop.
|
||||
@@ -33,7 +33,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
this._animateTabMove(event);
|
||||
return;
|
||||
}
|
||||
@@ -266,6 +268,15 @@
|
||||
@@ -269,6 +271,15 @@
|
||||
|
||||
this._tabDropIndicator.hidden = true;
|
||||
event.stopPropagation();
|
||||
@@ -49,7 +49,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
if (draggedTab && dropEffect == "copy") {
|
||||
let duplicatedDraggedTab;
|
||||
let duplicatedTabs = [];
|
||||
@@ -291,8 +302,9 @@
|
||||
@@ -294,8 +305,9 @@
|
||||
let translateOffsetY = oldTranslateY % tabHeight;
|
||||
let newTranslateX = oldTranslateX - translateOffsetX;
|
||||
let newTranslateY = oldTranslateY - translateOffsetY;
|
||||
@@ -61,10 +61,10 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
|
||||
if (this._isContainerVerticalPinnedGrid(draggedTab)) {
|
||||
// Update both translate axis for pinned vertical expanded tabs
|
||||
@@ -308,8 +320,8 @@
|
||||
@@ -311,8 +323,8 @@
|
||||
}
|
||||
} else {
|
||||
let tabs = this._tabbrowserTabs.ariaFocusableItems.slice(
|
||||
let tabs = this._tabbrowserTabs.dragAndDropElements.slice(
|
||||
- isPinned ? 0 : numPinned,
|
||||
- isPinned ? numPinned : undefined
|
||||
+ isPinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned,
|
||||
@@ -72,7 +72,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
);
|
||||
let size = this._tabbrowserTabs.verticalMode ? "height" : "width";
|
||||
let screenAxis = this._tabbrowserTabs.verticalMode
|
||||
@@ -362,11 +374,13 @@
|
||||
@@ -365,11 +377,13 @@
|
||||
this._dragToPinPromoCard,
|
||||
];
|
||||
let shouldPin =
|
||||
@@ -86,7 +86,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
isTab(draggedTab) &&
|
||||
draggedTab.pinned &&
|
||||
this._tabbrowserTabs.arrowScrollbox.contains(event.target);
|
||||
@@ -384,6 +398,7 @@
|
||||
@@ -387,6 +401,7 @@
|
||||
(oldTranslateY && oldTranslateY != newTranslateY);
|
||||
} else if (this._tabbrowserTabs.verticalMode) {
|
||||
shouldTranslate &&= oldTranslateY && oldTranslateY != newTranslateY;
|
||||
@@ -94,7 +94,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
} else {
|
||||
shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX;
|
||||
}
|
||||
@@ -440,7 +455,7 @@
|
||||
@@ -443,7 +458,7 @@
|
||||
item.removeAttribute("tabdrop-samewindow");
|
||||
resolve();
|
||||
};
|
||||
@@ -103,15 +103,15 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -581,6 +596,7 @@
|
||||
@@ -584,6 +599,7 @@
|
||||
|
||||
let nextItem = this._tabbrowserTabs.ariaFocusableItems[newIndex];
|
||||
let nextItem = this._tabbrowserTabs.dragAndDropElements[newIndex];
|
||||
let tabGroup = isTab(nextItem) && nextItem.group;
|
||||
+ if (gZenViewSplitter.handleTabDrop(event, urls, replace, inBackground)) return;
|
||||
gBrowser.loadTabs(urls, {
|
||||
inBackground,
|
||||
replace,
|
||||
@@ -618,7 +634,16 @@
|
||||
@@ -621,7 +637,16 @@
|
||||
this._expandGroupOnDrop(draggedTab);
|
||||
}
|
||||
this._resetTabsAfterDrop(draggedTab.ownerDocument);
|
||||
@@ -129,7 +129,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
if (
|
||||
dt.mozUserCancelled ||
|
||||
dt.dropEffect != "none" ||
|
||||
@@ -822,7 +847,10 @@
|
||||
@@ -825,7 +850,10 @@
|
||||
_getDragTarget(event, { ignoreSides = false } = {}) {
|
||||
let { target } = event;
|
||||
while (target) {
|
||||
@@ -141,7 +141,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
break;
|
||||
}
|
||||
target = target.parentNode;
|
||||
@@ -839,14 +867,17 @@
|
||||
@@ -842,14 +870,17 @@
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
!this._tabbrowserTabs.expandOnHover
|
||||
);
|
||||
}
|
||||
@@ -877,7 +908,8 @@
|
||||
@@ -880,7 +911,8 @@
|
||||
isTabGroupLabel(draggedTab) &&
|
||||
draggedTab._dragData?.expandGroupOnDrop
|
||||
) {
|
||||
@@ -171,7 +171,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1055,7 +1087,6 @@
|
||||
@@ -1058,7 +1090,6 @@
|
||||
// using updateDragImage. On Linux, we can use a panel.
|
||||
if (platform == "win" || platform == "macosx") {
|
||||
captureListener = function () {
|
||||
@@ -179,7 +179,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
};
|
||||
} else {
|
||||
// Create a panel to use it in setDragImage
|
||||
@@ -1093,7 +1124,6 @@
|
||||
@@ -1096,7 +1127,6 @@
|
||||
);
|
||||
dragImageOffset = dragImageOffset * scale;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
|
||||
// _dragData.offsetX/Y give the coordinates that the mouse should be
|
||||
// positioned relative to the corner of the new window created upon
|
||||
@@ -1112,7 +1142,7 @@
|
||||
@@ -1115,7 +1145,7 @@
|
||||
let dropEffect = this.getDropEffectForTabDrag(event);
|
||||
let isMovingInTabStrip = !fromTabList && dropEffect == "move";
|
||||
let collapseTabGroupDuringDrag =
|
||||
@@ -196,7 +196,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
|
||||
tab._dragData = {
|
||||
offsetX: this._tabbrowserTabs.verticalMode
|
||||
@@ -1122,7 +1152,7 @@
|
||||
@@ -1125,7 +1155,7 @@
|
||||
? event.screenY - window.screenY - tabOffset
|
||||
: event.screenY - window.screenY,
|
||||
scrollPos:
|
||||
@@ -205,7 +205,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
? this._tabbrowserTabs.pinnedTabsContainer.scrollPosition
|
||||
: this._tabbrowserTabs.arrowScrollbox.scrollPosition,
|
||||
screenX: event.screenX,
|
||||
@@ -1149,6 +1179,7 @@
|
||||
@@ -1152,6 +1182,7 @@
|
||||
|
||||
if (collapseTabGroupDuringDrag) {
|
||||
tab.group.collapsed = true;
|
||||
@@ -213,31 +213,31 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1173,6 +1204,7 @@
|
||||
@@ -1176,6 +1207,7 @@
|
||||
if (tabStripItemElement.hasAttribute("dragtarget")) {
|
||||
return;
|
||||
}
|
||||
+ return;
|
||||
let isPinned = tab.pinned;
|
||||
let numPinned = gBrowser.pinnedTabCount;
|
||||
let allTabs = this._tabbrowserTabs.ariaFocusableItems;
|
||||
@@ -1598,7 +1630,6 @@
|
||||
let dragAndDropElements = this._tabbrowserTabs.dragAndDropElements;
|
||||
@@ -1601,7 +1633,6 @@
|
||||
|
||||
for (let item of this._tabbrowserTabs.ariaFocusableItems) {
|
||||
for (let item of this._tabbrowserTabs.dragAndDropElements) {
|
||||
item = elementToMove(item);
|
||||
- item.style.transform = "";
|
||||
item.removeAttribute("multiselected-move-together");
|
||||
delete item._moveTogetherSelectedTabsData;
|
||||
}
|
||||
@@ -2426,7 +2457,6 @@
|
||||
for (let item of this._tabbrowserTabs.ariaFocusableItems) {
|
||||
@@ -2429,7 +2460,6 @@
|
||||
for (let item of this._tabbrowserTabs.dragAndDropElements) {
|
||||
this._resetGroupTarget(item);
|
||||
item = elementToMove(item);
|
||||
- item.style.transform = "";
|
||||
}
|
||||
this._tabbrowserTabs.removeAttribute("movingtab-group");
|
||||
this._tabbrowserTabs.removeAttribute("movingtab-ungroup");
|
||||
@@ -2457,17 +2487,14 @@
|
||||
@@ -2460,17 +2490,14 @@
|
||||
tab.style.left = "";
|
||||
tab.style.top = "";
|
||||
tab.style.maxWidth = "";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
|
||||
index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d83bee7390 100644
|
||||
index 6528da245d922e2ccdb59cbf8106055bc34d1e74..1cd3395961a80e3b48582794b5b5365c9b8386b3 100644
|
||||
--- a/browser/components/tabbrowser/content/tab.js
|
||||
+++ b/browser/components/tabbrowser/content/tab.js
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -10,18 +10,19 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
<stack class="tab-icon-stack">
|
||||
<hbox class="tab-throbber"/>
|
||||
<hbox class="tab-icon-pending"/>
|
||||
@@ -37,8 +38,10 @@
|
||||
@@ -38,9 +39,11 @@
|
||||
<hbox class="tab-secondary-label">
|
||||
<label class="tab-icon-sound-label tab-icon-sound-pip-label" data-l10n-id="browser-tab-audio-pip" role="presentation"/>
|
||||
</hbox>
|
||||
+ <label class="tab-reset-pin-label" data-l10n-id="tab-reset-pin-label" role="presentation"/>
|
||||
</vbox>
|
||||
<image class="tab-note-icon" role="presentation"/>
|
||||
<image class="tab-close-button close-icon" role="button" data-l10n-id="tabbrowser-close-tabs-button" data-l10n-args='{"tabCount": 1}' keyNav="false"/>
|
||||
+ <image class="tab-reset-button reset-icon" role="button" data-l10n-id="tabbrowser-unload-tab-button" data-l10n-args='{"tabCount": 1}' keyNav="false"/>
|
||||
</hbox>
|
||||
</stack>
|
||||
`;
|
||||
@@ -84,7 +87,7 @@
|
||||
@@ -86,7 +89,7 @@
|
||||
".tab-content":
|
||||
"pinned,selected=visuallyselected,multiselected,titlechanged,attention",
|
||||
".tab-icon-stack":
|
||||
@@ -30,7 +31,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
".tab-throbber":
|
||||
"fadein,pinned,busy,progress,selected=visuallyselected",
|
||||
".tab-icon-pending":
|
||||
@@ -93,9 +96,9 @@
|
||||
@@ -95,9 +98,9 @@
|
||||
"src=image,requestcontextid,fadein,pinned,selected=visuallyselected,busy,crashed,sharing,pictureinpicture,pending,discarded",
|
||||
".tab-sharing-icon-overlay": "sharing,selected=visuallyselected,pinned",
|
||||
".tab-icon-overlay":
|
||||
@@ -42,7 +43,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
".tab-label-container":
|
||||
"pinned,selected=visuallyselected,labeldirection",
|
||||
".tab-label":
|
||||
@@ -186,7 +189,7 @@
|
||||
@@ -188,7 +191,7 @@
|
||||
}
|
||||
|
||||
set _visuallySelected(val) {
|
||||
@@ -51,7 +52,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -222,11 +225,21 @@
|
||||
@@ -224,11 +227,21 @@
|
||||
}
|
||||
|
||||
get visible() {
|
||||
@@ -78,7 +79,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
}
|
||||
|
||||
get hidden() {
|
||||
@@ -305,7 +318,7 @@
|
||||
@@ -307,7 +320,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -87,7 +88,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
}
|
||||
|
||||
get lastAccessed() {
|
||||
@@ -382,7 +395,18 @@
|
||||
@@ -384,7 +397,18 @@
|
||||
}
|
||||
|
||||
get group() {
|
||||
@@ -107,7 +108,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
}
|
||||
|
||||
get splitview() {
|
||||
@@ -473,6 +497,8 @@
|
||||
@@ -489,6 +513,8 @@
|
||||
this.style.MozUserFocus = "ignore";
|
||||
} else if (
|
||||
event.target.classList.contains("tab-close-button") ||
|
||||
@@ -116,7 +117,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
event.target.classList.contains("tab-icon-overlay") ||
|
||||
event.target.classList.contains("tab-audio-button")
|
||||
) {
|
||||
@@ -527,6 +553,10 @@
|
||||
@@ -543,6 +569,10 @@
|
||||
this.style.MozUserFocus = "";
|
||||
}
|
||||
|
||||
@@ -127,7 +128,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
on_click(event) {
|
||||
if (event.button != 0) {
|
||||
return;
|
||||
@@ -587,6 +617,14 @@
|
||||
@@ -603,6 +633,14 @@
|
||||
// (see tabbrowser-tabs 'click' handler).
|
||||
gBrowser.tabContainer._blockDblClick = true;
|
||||
}
|
||||
@@ -142,7 +143,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
|
||||
}
|
||||
|
||||
on_dblclick(event) {
|
||||
@@ -610,6 +648,8 @@
|
||||
@@ -626,6 +664,8 @@
|
||||
animate: true,
|
||||
triggeringEvent: event,
|
||||
});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078ef3b1fca 100644
|
||||
index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..f3966d85049735538b24424f42d4a690eaf7bbec 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -386,6 +386,7 @@
|
||||
@@ -398,6 +398,7 @@
|
||||
* @type {MozBrowser[]}
|
||||
*/
|
||||
get splitViewBrowsers() {
|
||||
@@ -10,7 +10,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
const browsers = [];
|
||||
if (this.#activeSplitView) {
|
||||
for (const tab of this.#activeSplitView.tabs) {
|
||||
@@ -450,15 +451,66 @@
|
||||
@@ -462,15 +463,66 @@
|
||||
return this.tabContainer.visibleTabs;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
set selectedTab(val) {
|
||||
if (
|
||||
gSharedTabWarning.willShowSharedTabWarning(val) ||
|
||||
@@ -534,6 +586,10 @@
|
||||
@@ -546,6 +598,10 @@
|
||||
userContextId = parseInt(tabArgument.getAttribute("usercontextid"), 10);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (tabArgument && tabArgument.linkedBrowser) {
|
||||
remoteType = tabArgument.linkedBrowser.remoteType;
|
||||
initialBrowsingContextGroupId =
|
||||
@@ -613,6 +669,7 @@
|
||||
@@ -625,6 +681,7 @@
|
||||
this.tabpanels.appendChild(panel);
|
||||
|
||||
let tab = this.tabs[0];
|
||||
@@ -98,7 +98,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
tab.linkedPanel = uniqueId;
|
||||
this._selectedTab = tab;
|
||||
this._selectedBrowser = browser;
|
||||
@@ -898,13 +955,18 @@
|
||||
@@ -912,13 +969,18 @@
|
||||
}
|
||||
|
||||
this.showTab(aTab);
|
||||
@@ -118,7 +118,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
aTab.setAttribute("pinned", "true");
|
||||
this._updateTabBarForPinnedTabs();
|
||||
@@ -917,11 +979,18 @@
|
||||
@@ -931,11 +993,18 @@
|
||||
}
|
||||
|
||||
this.#handleTabMove(aTab, () => {
|
||||
@@ -138,7 +138,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
});
|
||||
|
||||
aTab.style.marginInlineStart = "";
|
||||
@@ -1098,6 +1167,9 @@
|
||||
@@ -1112,6 +1181,9 @@
|
||||
|
||||
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
|
||||
|
||||
@@ -148,7 +148,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (
|
||||
aIconURL &&
|
||||
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
|
||||
@@ -1107,6 +1179,9 @@
|
||||
@@ -1121,6 +1193,9 @@
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
let browser = this.getBrowserForTab(aTab);
|
||||
browser.mIconURL = aIconURL;
|
||||
@@ -1379,7 +1454,6 @@
|
||||
@@ -1393,7 +1468,6 @@
|
||||
|
||||
// Preview mode should not reset the owner
|
||||
if (!this._previewMode && !oldTab.selected) {
|
||||
@@ -166,7 +166,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
}
|
||||
|
||||
let lastRelatedTab = this._lastRelatedTabMap.get(oldTab);
|
||||
@@ -1470,6 +1544,7 @@
|
||||
@@ -1484,6 +1558,7 @@
|
||||
if (!this._previewMode) {
|
||||
newTab.recordTimeFromUnloadToReload();
|
||||
newTab.updateLastAccessed();
|
||||
@@ -174,7 +174,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
oldTab.updateLastAccessed();
|
||||
// if this is the foreground window, update the last-seen timestamps.
|
||||
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
|
||||
@@ -1622,6 +1697,9 @@
|
||||
@@ -1636,6 +1711,9 @@
|
||||
}
|
||||
|
||||
let activeEl = document.activeElement;
|
||||
@@ -184,7 +184,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
// If focus is on the old tab, move it to the new tab.
|
||||
if (activeEl == oldTab) {
|
||||
newTab.focus();
|
||||
@@ -1945,6 +2023,11 @@
|
||||
@@ -1959,6 +2037,11 @@
|
||||
}
|
||||
|
||||
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
|
||||
@@ -196,7 +196,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (!aLabel || aLabel.includes("about:reader?")) {
|
||||
return false;
|
||||
}
|
||||
@@ -2053,7 +2136,7 @@
|
||||
@@ -2067,7 +2150,7 @@
|
||||
newIndex = this.selectedTab._tPos + 1;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (this.isTabGroupLabel(targetTab)) {
|
||||
throw new Error(
|
||||
"Replacing a tab group label with a tab is not supported"
|
||||
@@ -2328,6 +2411,7 @@
|
||||
@@ -2342,6 +2425,7 @@
|
||||
uriIsAboutBlank,
|
||||
userContextId,
|
||||
skipLoad,
|
||||
@@ -213,7 +213,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
} = {}) {
|
||||
let b = document.createXULElement("browser");
|
||||
// Use the JSM global to create the permanentKey, so that if the
|
||||
@@ -2401,8 +2485,7 @@
|
||||
@@ -2415,8 +2499,7 @@
|
||||
// we use a different attribute name for this?
|
||||
b.setAttribute("name", name);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
b.setAttribute("transparent", "true");
|
||||
}
|
||||
|
||||
@@ -2567,7 +2650,7 @@
|
||||
@@ -2581,7 +2664,7 @@
|
||||
|
||||
let panel = this.getPanel(browser);
|
||||
let uniqueId = this._generateUniquePanelID();
|
||||
@@ -232,7 +232,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
aTab.linkedPanel = uniqueId;
|
||||
|
||||
// Inject the <browser> into the DOM if necessary.
|
||||
@@ -2626,8 +2709,8 @@
|
||||
@@ -2640,8 +2723,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) {
|
||||
@@ -243,7 +243,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
} else {
|
||||
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
||||
}
|
||||
@@ -2814,7 +2897,6 @@
|
||||
@@ -2828,7 +2911,6 @@
|
||||
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
|
||||
tabIndex: tab._tPos + 1,
|
||||
userContextId: tab.userContextId,
|
||||
@@ -251,7 +251,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
focusUrlBar: true,
|
||||
});
|
||||
resolve(this.selectedBrowser);
|
||||
@@ -2923,6 +3005,9 @@
|
||||
@@ -2938,6 +3020,9 @@
|
||||
schemelessInput,
|
||||
hasValidUserGestureActivation = false,
|
||||
textDirectiveUserActivation = false,
|
||||
@@ -261,7 +261,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
} = {}
|
||||
) {
|
||||
// all callers of addTab that pass a params object need to pass
|
||||
@@ -2933,10 +3018,17 @@
|
||||
@@ -2948,10 +3033,17 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
// If we're opening a foreground tab, set the owner by default.
|
||||
ownerTab ??= inBackground ? null : this.selectedTab;
|
||||
|
||||
@@ -2944,6 +3036,7 @@
|
||||
@@ -2959,6 +3051,7 @@
|
||||
if (this.selectedTab.owner) {
|
||||
this.selectedTab.owner = null;
|
||||
}
|
||||
@@ -287,7 +287,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
// Find the tab that opened this one, if any. This is used for
|
||||
// determining positioning, and inherited attributes such as the
|
||||
@@ -2996,6 +3089,21 @@
|
||||
@@ -3011,6 +3104,21 @@
|
||||
noInitialLabel,
|
||||
skipBackgroundNotify,
|
||||
});
|
||||
@@ -309,7 +309,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (insertTab) {
|
||||
// Insert the tab into the tab container in the correct position.
|
||||
this.#insertTabAtIndex(t, {
|
||||
@@ -3004,6 +3112,7 @@
|
||||
@@ -3019,6 +3127,7 @@
|
||||
ownerTab,
|
||||
openerTab,
|
||||
pinned,
|
||||
@@ -317,7 +317,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
bulkOrderedOpen,
|
||||
tabGroup: tabGroup ?? openerTab?.group,
|
||||
});
|
||||
@@ -3022,6 +3131,7 @@
|
||||
@@ -3037,6 +3146,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
triggeringRemoteType,
|
||||
@@ -325,7 +325,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
}));
|
||||
|
||||
if (focusUrlBar) {
|
||||
@@ -3146,6 +3256,12 @@
|
||||
@@ -3161,6 +3271,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,19 +338,25 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this.#notifyPinnedStatus(t);
|
||||
@@ -3349,10 +3465,10 @@
|
||||
@@ -3375,6 +3491,7 @@
|
||||
isAdoptingGroup = false,
|
||||
isUserTriggered = false,
|
||||
telemetryUserCreateSource = "unknown",
|
||||
+ forSplitView = false,
|
||||
} = {}
|
||||
) {
|
||||
if (!tabs?.length) {
|
||||
- throw new Error("Cannot create tab group with zero tabs");
|
||||
if (
|
||||
@@ -3385,9 +3502,6 @@
|
||||
!this.isSplitViewWrapper(tabOrSplitView)
|
||||
)
|
||||
) {
|
||||
- throw new Error(
|
||||
- "Cannot create tab group with zero tabs or split views"
|
||||
- );
|
||||
}
|
||||
|
||||
if (!color) {
|
||||
@@ -3373,9 +3489,14 @@
|
||||
@@ -3408,9 +3522,14 @@
|
||||
label,
|
||||
isAdoptingGroup
|
||||
);
|
||||
@@ -358,16 +364,16 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
+ if (forSplitView) {
|
||||
+ group.setAttribute('split-view-group', true);
|
||||
+ }
|
||||
+ group.essential = tabs.some(tab => tab.hasAttribute("essential"));
|
||||
+ group.pinned = group.essential || tabs.some(tab => tab.pinned);
|
||||
+ group.essential = tabsAndSplitViews.some(tab => tab.hasAttribute("essential"));
|
||||
+ group.pinned = group.essential || tabsAndSplitViews.some(tab => tab.pinned);
|
||||
+ if (forSplitView && !insertBefore?.group?.isZenFolder) insertBefore = insertBefore?.group ?? insertBefore;
|
||||
+ insertBefore.before(
|
||||
group,
|
||||
- insertBefore?.group ?? insertBefore
|
||||
);
|
||||
group.addTabs(tabs);
|
||||
group.addTabs(tabsAndSplitViews);
|
||||
|
||||
@@ -3496,7 +3617,7 @@
|
||||
@@ -3531,7 +3650,7 @@
|
||||
}
|
||||
|
||||
this.#handleTabMove(tab, () =>
|
||||
@@ -376,7 +382,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3698,6 +3819,7 @@
|
||||
@@ -3746,6 +3865,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
triggeringRemoteType,
|
||||
@@ -384,7 +390,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
}
|
||||
) {
|
||||
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
|
||||
@@ -3767,6 +3889,7 @@
|
||||
@@ -3815,6 +3935,7 @@
|
||||
openWindowInfo,
|
||||
name,
|
||||
skipLoad,
|
||||
@@ -392,7 +398,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3955,7 +4078,7 @@
|
||||
@@ -4003,7 +4124,7 @@
|
||||
// Add a new tab if needed.
|
||||
if (!tab) {
|
||||
let createLazyBrowser =
|
||||
@@ -401,7 +407,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
let url = "about:blank";
|
||||
if (tabData.entries?.length) {
|
||||
@@ -3992,8 +4115,10 @@
|
||||
@@ -4040,8 +4161,10 @@
|
||||
insertTab: false,
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
@@ -413,7 +419,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -4005,7 +4130,8 @@
|
||||
@@ -4053,7 +4176,8 @@
|
||||
this.pinTab(tab);
|
||||
// Then ensure all the tab open/pinning information is sent.
|
||||
this._fireTabOpen(tab, {});
|
||||
@@ -423,7 +429,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
let { groupId } = tabData;
|
||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||
// if a tab refers to a tab group we don't know, skip any group
|
||||
@@ -4019,7 +4145,10 @@
|
||||
@@ -4067,7 +4191,10 @@
|
||||
tabGroup.stateData.id,
|
||||
tabGroup.stateData.color,
|
||||
tabGroup.stateData.collapsed,
|
||||
@@ -435,7 +441,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
);
|
||||
tabsFragment.appendChild(tabGroup.node);
|
||||
}
|
||||
@@ -4064,9 +4193,23 @@
|
||||
@@ -4112,9 +4239,23 @@
|
||||
// to remove the old selected tab.
|
||||
if (tabToSelect) {
|
||||
let leftoverTab = this.selectedTab;
|
||||
@@ -451,15 +457,15 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
+ gZenWorkspaces._initialTab._shouldRemove = true;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+ }
|
||||
+ else {
|
||||
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
|
||||
+ }
|
||||
}
|
||||
+ this._hasAlreadyInitializedZenSessionStore = true;
|
||||
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
this._updateTabsAfterInsert();
|
||||
@@ -4257,11 +4400,14 @@
|
||||
@@ -4305,11 +4446,14 @@
|
||||
if (ownerTab) {
|
||||
tab.owner = ownerTab;
|
||||
}
|
||||
@@ -475,7 +481,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -4273,7 +4419,7 @@
|
||||
@@ -4321,7 +4465,7 @@
|
||||
let lastRelatedTab =
|
||||
openerTab && this._lastRelatedTabMap.get(openerTab);
|
||||
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
|
||||
@@ -484,16 +490,16 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
tabGroup = previousTab.group;
|
||||
}
|
||||
if (
|
||||
@@ -4284,7 +4430,7 @@
|
||||
) {
|
||||
elementIndex = Infinity;
|
||||
@@ -4337,7 +4481,7 @@
|
||||
previousTab.splitview
|
||||
) + 1;
|
||||
} else if (previousTab.visible) {
|
||||
- elementIndex = previousTab.elementIndex + 1;
|
||||
+ elementIndex = (typeof previousTab.elementIndex === 'undefined') ? elementIndex : (previousTab.elementIndex + 1);
|
||||
} else if (previousTab == FirefoxViewHandler.tab) {
|
||||
elementIndex = 0;
|
||||
}
|
||||
@@ -4312,14 +4458,14 @@
|
||||
@@ -4365,14 +4509,14 @@
|
||||
}
|
||||
// Ensure index is within bounds.
|
||||
if (tab.pinned) {
|
||||
@@ -512,16 +518,16 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
if (pinned && !itemAfter?.pinned) {
|
||||
itemAfter = null;
|
||||
@@ -4330,7 +4476,7 @@
|
||||
@@ -4385,7 +4529,7 @@
|
||||
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
|
||||
- if (tabGroup) {
|
||||
+ if (tabGroup && !tabGroup.hasAttribute("split-view-group")) {
|
||||
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
|
||||
// Place at the front of, or between tabs in, the same tab group
|
||||
this.tabContainer.insertBefore(tab, itemAfter);
|
||||
@@ -4358,7 +4504,11 @@
|
||||
if (
|
||||
(this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
|
||||
this.isSplitViewWrapper(itemAfter)
|
||||
@@ -4416,7 +4560,11 @@
|
||||
const tabContainer = pinned
|
||||
? this.tabContainer.pinnedTabsContainer
|
||||
: this.tabContainer;
|
||||
@@ -532,8 +538,8 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
+ }
|
||||
}
|
||||
|
||||
this._updateTabsAfterInsert();
|
||||
@@ -4366,6 +4516,7 @@
|
||||
if (tab.group?.collapsed) {
|
||||
@@ -4431,6 +4579,7 @@
|
||||
if (pinned) {
|
||||
this._updateTabBarForPinnedTabs();
|
||||
}
|
||||
@@ -541,7 +547,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -4916,6 +5067,7 @@
|
||||
@@ -4983,6 +5132,7 @@
|
||||
telemetrySource,
|
||||
} = {}
|
||||
) {
|
||||
@@ -549,7 +555,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||
// can be considered equivalent to closing the window.
|
||||
if (
|
||||
@@ -5005,6 +5157,7 @@
|
||||
@@ -5072,6 +5222,7 @@
|
||||
if (lastToClose) {
|
||||
this.removeTab(lastToClose, aParams);
|
||||
}
|
||||
@@ -557,7 +563,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
@@ -5043,6 +5196,12 @@
|
||||
@@ -5110,6 +5261,12 @@
|
||||
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
|
||||
}
|
||||
|
||||
@@ -570,7 +576,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
// Handle requests for synchronously removing an already
|
||||
// asynchronously closing tab.
|
||||
if (!animate && aTab.closing) {
|
||||
@@ -5057,6 +5216,9 @@
|
||||
@@ -5124,6 +5281,9 @@
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
let isLastTab = this.#isLastTabInWindow(aTab);
|
||||
@@ -580,7 +586,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -5105,7 +5267,13 @@
|
||||
@@ -5172,7 +5332,13 @@
|
||||
// We're not animating, so we can cancel the animation stopwatch.
|
||||
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
|
||||
aTab._closeTimeAnimTimerId = null;
|
||||
@@ -595,7 +601,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5239,7 +5407,7 @@
|
||||
@@ -5306,7 +5472,7 @@
|
||||
closeWindowWithLastTab != null
|
||||
? closeWindowWithLastTab
|
||||
: !window.toolbar.visible ||
|
||||
@@ -604,7 +610,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -5263,6 +5431,7 @@
|
||||
@@ -5330,6 +5496,7 @@
|
||||
|
||||
newTab = true;
|
||||
}
|
||||
@@ -612,7 +618,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||
|
||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||
@@ -5303,13 +5472,7 @@
|
||||
@@ -5370,13 +5537,7 @@
|
||||
aTab._mouseleave();
|
||||
|
||||
if (newTab) {
|
||||
@@ -627,7 +633,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
} else {
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -5442,6 +5605,7 @@
|
||||
@@ -5509,6 +5670,7 @@
|
||||
this.tabs[i]._tPos = i;
|
||||
}
|
||||
|
||||
@@ -635,7 +641,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (!this._windowIsClosing) {
|
||||
// update tab close buttons state
|
||||
this.tabContainer._updateCloseButtons();
|
||||
@@ -5663,6 +5827,7 @@
|
||||
@@ -5732,6 +5894,7 @@
|
||||
}
|
||||
|
||||
let excludeTabs = new Set(aExcludeTabs);
|
||||
@@ -643,7 +649,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
// If this tab has a successor, it should be selectable, since
|
||||
// hiding or closing a tab removes that tab as a successor.
|
||||
@@ -5675,13 +5840,13 @@
|
||||
@@ -5744,13 +5907,13 @@
|
||||
!excludeTabs.has(aTab.owner) &&
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||
) {
|
||||
@@ -659,7 +665,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
);
|
||||
|
||||
let tab = this.tabContainer.findNextTab(aTab, {
|
||||
@@ -5697,7 +5862,7 @@
|
||||
@@ -5766,7 +5929,7 @@
|
||||
}
|
||||
|
||||
if (tab) {
|
||||
@@ -668,7 +674,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
}
|
||||
|
||||
// If no qualifying visible tab was found, see if there is a tab in
|
||||
@@ -5718,7 +5883,7 @@
|
||||
@@ -5787,7 +5950,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -677,7 +683,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
}
|
||||
|
||||
_blurTab(aTab) {
|
||||
@@ -5729,7 +5894,7 @@
|
||||
@@ -5798,7 +5961,7 @@
|
||||
* @returns {boolean}
|
||||
* False if swapping isn't permitted, true otherwise.
|
||||
*/
|
||||
@@ -686,7 +692,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
// Do not allow transfering a private tab to a non-private window
|
||||
// and vice versa.
|
||||
if (
|
||||
@@ -5783,6 +5948,7 @@
|
||||
@@ -5852,6 +6015,7 @@
|
||||
// fire the beforeunload event in the process. Close the other
|
||||
// window if this was its last tab.
|
||||
if (
|
||||
@@ -694,7 +700,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
!remoteBrowser._beginRemoveTab(aOtherTab, {
|
||||
adoptedByTab: aOurTab,
|
||||
closeWindowWithLastTab: true,
|
||||
@@ -5794,7 +5960,7 @@
|
||||
@@ -5863,7 +6027,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.
|
||||
@@ -703,7 +709,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (closeWindow) {
|
||||
let win = aOtherTab.ownerGlobal;
|
||||
win.windowUtils.suppressAnimation(true);
|
||||
@@ -5918,11 +6084,13 @@
|
||||
@@ -5987,11 +6151,13 @@
|
||||
}
|
||||
|
||||
// Finish tearing down the tab that's going away.
|
||||
@@ -717,7 +723,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
this.setTabTitle(aOurTab);
|
||||
|
||||
@@ -6124,10 +6292,10 @@
|
||||
@@ -6193,10 +6359,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -730,7 +736,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -6185,7 +6353,8 @@
|
||||
@@ -6254,7 +6420,8 @@
|
||||
*
|
||||
* @param {MozTabbrowserTab|MozTabbrowserTabGroup|MozTabbrowserTabGroup.labelElement} aTab
|
||||
*/
|
||||
@@ -740,7 +746,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (this.tabs.length == 1) {
|
||||
return null;
|
||||
}
|
||||
@@ -6209,12 +6378,14 @@
|
||||
@@ -6278,12 +6445,14 @@
|
||||
}
|
||||
|
||||
// tell a new window to take the "dropped" tab
|
||||
@@ -756,7 +762,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6319,7 +6490,7 @@
|
||||
@@ -6388,7 +6557,7 @@
|
||||
* `true` if element is a `<tab-group>`
|
||||
*/
|
||||
isTabGroup(element) {
|
||||
@@ -765,7 +771,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6404,8 +6575,8 @@
|
||||
@@ -6473,8 +6642,8 @@
|
||||
}
|
||||
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
@@ -776,7 +782,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
} else {
|
||||
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -6431,10 +6602,16 @@
|
||||
@@ -6500,10 +6669,16 @@
|
||||
this.#handleTabMove(
|
||||
element,
|
||||
() => {
|
||||
@@ -795,7 +801,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
||||
neighbor.after(element);
|
||||
} else {
|
||||
@@ -6492,23 +6669,31 @@
|
||||
@@ -6561,23 +6736,31 @@
|
||||
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
|
||||
if (this.isTabGroupLabel(targetElement)) {
|
||||
targetElement = targetElement.group;
|
||||
@@ -833,7 +839,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
} 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
|
||||
@@ -6521,14 +6706,34 @@
|
||||
@@ -6590,14 +6773,34 @@
|
||||
// move the tab group right before the first unpinned tab.
|
||||
// 4. Moving a tab group and the first unpinned tab is grouped:
|
||||
// move the tab group right before the first unpinned tab's tab group.
|
||||
@@ -869,7 +875,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
element.pinned
|
||||
? this.tabContainer.pinnedTabsContainer
|
||||
: this.tabContainer;
|
||||
@@ -6537,7 +6742,7 @@
|
||||
@@ -6606,7 +6809,7 @@
|
||||
element,
|
||||
() => {
|
||||
if (moveBefore) {
|
||||
@@ -878,10 +884,10 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
} else if (targetElement) {
|
||||
targetElement.after(element);
|
||||
} else {
|
||||
@@ -6607,10 +6812,10 @@
|
||||
@@ -6676,10 +6879,10 @@
|
||||
* @param {TabMetricsContext} [metricsContext]
|
||||
*/
|
||||
moveTabToGroup(aTab, aGroup, metricsContext) {
|
||||
moveTabToExistingGroup(aTab, aGroup, metricsContext) {
|
||||
- if (!this.isTab(aTab)) {
|
||||
+ if (!this.isTab(aTab) && !aTab.hasAttribute('split-view-group')) {
|
||||
throw new Error("Can only move a tab into a tab group");
|
||||
@@ -891,7 +897,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
return;
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
@@ -6656,6 +6861,7 @@
|
||||
@@ -6751,6 +6954,7 @@
|
||||
|
||||
let state = {
|
||||
tabIndex: tab._tPos,
|
||||
@@ -899,7 +905,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
};
|
||||
if (tab.visible) {
|
||||
state.elementIndex = tab.elementIndex;
|
||||
@@ -6682,7 +6888,7 @@
|
||||
@@ -6777,7 +6981,7 @@
|
||||
let changedTabGroup =
|
||||
previousTabState.tabGroupId != currentTabState.tabGroupId;
|
||||
|
||||
@@ -908,7 +914,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
tab.dispatchEvent(
|
||||
new CustomEvent("TabMove", {
|
||||
bubbles: true,
|
||||
@@ -6723,6 +6929,10 @@
|
||||
@@ -6818,6 +7022,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
@@ -919,7 +925,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -6815,6 +7025,8 @@
|
||||
@@ -6910,6 +7118,8 @@
|
||||
params.userContextId = aTab.getAttribute("usercontextid");
|
||||
}
|
||||
let newTab = this.addWebTab("about:blank", params);
|
||||
@@ -928,7 +934,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
let newBrowser = this.getBrowserForTab(newTab);
|
||||
|
||||
aTab.container.tabDragAndDrop.finishAnimateTabMove();
|
||||
@@ -7623,7 +7835,7 @@
|
||||
@@ -7718,7 +7928,7 @@
|
||||
// preventDefault(). It will still raise the window if appropriate.
|
||||
break;
|
||||
}
|
||||
@@ -937,7 +943,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
@@ -7640,7 +7852,6 @@
|
||||
@@ -7735,7 +7945,6 @@
|
||||
}
|
||||
case "TabGroupCollapse":
|
||||
aEvent.target.tabs.forEach(tab => {
|
||||
@@ -945,7 +951,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
});
|
||||
break;
|
||||
case "TabGroupCreateByUser":
|
||||
@@ -7800,7 +8011,9 @@
|
||||
@@ -7895,7 +8104,9 @@
|
||||
|
||||
let filter = this._tabFilters.get(tab);
|
||||
if (filter) {
|
||||
@@ -955,7 +961,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
|
||||
let listener = this._tabListeners.get(tab);
|
||||
if (listener) {
|
||||
@@ -8589,6 +8802,7 @@
|
||||
@@ -8698,6 +8909,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -963,7 +969,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -8670,6 +8884,7 @@
|
||||
@@ -8778,6 +8990,7 @@
|
||||
// known defaults. Note we use the original URL since about:newtab
|
||||
// redirects to a prerendered page.
|
||||
const shouldRemoveFavicon =
|
||||
@@ -971,7 +977,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
|
||||
!this.mBrowser.mIconURL &&
|
||||
!ignoreBlank &&
|
||||
!(originalLocation.spec in FAVICON_DEFAULTS);
|
||||
@@ -9623,7 +9838,7 @@ var TabContextMenu = {
|
||||
@@ -9803,7 +10016,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !this.multiselected;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
|
||||
index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607fb699424 100644
|
||||
index 9abf115062e7c86196d7cb6b8ac82a9bb63b5a65..150b0266c979bcfec84e0c1975f91bee3c507b39 100644
|
||||
--- a/browser/components/tabbrowser/content/tabgroup.js
|
||||
+++ b/browser/components/tabbrowser/content/tabgroup.js
|
||||
@@ -14,11 +14,11 @@
|
||||
@@ -188,15 +188,15 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -553,7 +631,6 @@
|
||||
addTabs(tabs, metricsContext) {
|
||||
for (let tab of tabs) {
|
||||
if (tab.pinned) {
|
||||
- tab.ownerGlobal.gBrowser.unpinTab(tab);
|
||||
}
|
||||
let tabToMove =
|
||||
this.ownerGlobal === tab.ownerGlobal
|
||||
@@ -616,7 +693,7 @@
|
||||
@@ -560,7 +638,6 @@
|
||||
);
|
||||
} else {
|
||||
if (tabOrSplitView.pinned) {
|
||||
- tabOrSplitView.ownerGlobal.gBrowser.unpinTab(tabOrSplitView);
|
||||
}
|
||||
let tabToMove =
|
||||
this.ownerGlobal === tabOrSplitView.ownerGlobal
|
||||
@@ -625,7 +702,7 @@
|
||||
*/
|
||||
on_click(event) {
|
||||
let isToggleElement =
|
||||
@@ -205,7 +205,7 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
|
||||
event.target === this.#overflowCountLabel;
|
||||
if (isToggleElement && event.button === 0) {
|
||||
event.preventDefault();
|
||||
@@ -687,5 +764,6 @@
|
||||
@@ -696,5 +773,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f202dadef8 100644
|
||||
index a61b4e7af40f1404bf3555a7011c6211de917635..bb3c822ad14c4ebf0b8792665ff8242f97e501d9 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -235,7 +235,7 @@
|
||||
@@ -240,7 +240,7 @@
|
||||
true
|
||||
)
|
||||
? new window.TabStacking(this)
|
||||
@@ -11,7 +11,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
this.tabDragAndDrop.init();
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
@@ -453,7 +453,7 @@
|
||||
// and we're not hitting the scroll buttons.
|
||||
if (
|
||||
event.button != 0 ||
|
||||
@@ -20,7 +20,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
event.composedTarget.localName == "toolbarbutton"
|
||||
) {
|
||||
return;
|
||||
@@ -517,7 +517,6 @@
|
||||
@@ -534,7 +534,6 @@
|
||||
});
|
||||
}
|
||||
} else if (isTabGroupLabel(event.target)) {
|
||||
@@ -28,7 +28,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
} else if (
|
||||
event.originalTarget.closest("scrollbox") &&
|
||||
!Services.prefs.getBoolPref(
|
||||
@@ -553,6 +552,9 @@
|
||||
@@ -570,6 +569,9 @@
|
||||
}
|
||||
|
||||
on_keydown(event) {
|
||||
@@ -38,7 +38,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
let { altKey, shiftKey } = event;
|
||||
let [accel, nonAccel] =
|
||||
AppConstants.platform == "macosx"
|
||||
@@ -747,7 +749,6 @@
|
||||
@@ -764,7 +766,6 @@
|
||||
this._updateCloseButtons();
|
||||
|
||||
if (!this.#animatingGroups.size) {
|
||||
@@ -46,7 +46,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
}
|
||||
|
||||
document
|
||||
@@ -808,7 +809,7 @@
|
||||
@@ -825,7 +826,7 @@
|
||||
}
|
||||
|
||||
get newTabButton() {
|
||||
@@ -55,7 +55,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
}
|
||||
|
||||
get verticalMode() {
|
||||
@@ -824,6 +825,7 @@
|
||||
@@ -841,6 +842,7 @@
|
||||
}
|
||||
|
||||
get overflowing() {
|
||||
@@ -63,7 +63,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
return this.hasAttribute("overflow");
|
||||
}
|
||||
|
||||
@@ -837,29 +839,56 @@
|
||||
@@ -854,29 +856,56 @@
|
||||
if (pinnedChildren?.at(-1)?.id == "pinned-tabs-container-periphery") {
|
||||
pinnedChildren.pop();
|
||||
}
|
||||
@@ -93,7 +93,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
+ } else if (tab.classList.contains("zen-tab-group-start")) {
|
||||
+ tabs.splice(i, 1);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+ };
|
||||
+ expandTabs(pinnedTabs);
|
||||
+ expandTabs(unpinnedChildren);
|
||||
@@ -114,7 +114,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
+ // remove the separator from the list
|
||||
+ allTabs.splice(i, 1);
|
||||
+ i--;
|
||||
}
|
||||
+ }
|
||||
+ i++;
|
||||
}
|
||||
-
|
||||
@@ -130,42 +130,55 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -926,17 +955,10 @@
|
||||
|
||||
let elementIndex = 0;
|
||||
@@ -944,29 +973,28 @@
|
||||
return this.#focusableItems;
|
||||
}
|
||||
|
||||
- let unpinnedChildren = Array.from(this.arrowScrollbox.children);
|
||||
- let pinnedChildren = Array.from(this.pinnedTabsContainer.children);
|
||||
+ let elementIndex = 0;
|
||||
+ let children = gZenWorkspaces.tabboxChildrenWithoutEmpty;
|
||||
|
||||
let focusableItems = [];
|
||||
- for (let child of pinnedChildren) {
|
||||
- if (isTab(child)) {
|
||||
- child.elementIndex = elementIndex++;
|
||||
- focusableItems.push(child);
|
||||
- }
|
||||
- }
|
||||
- for (let child of unpinnedChildren) {
|
||||
+ for (let child of [...gZenWorkspaces.getCurrentEssentialsContainer().children, ...(gZenWorkspaces.activeWorkspaceElement?.hasCollapsedPinnedTabs ? [] : this.pinnedTabsContainer.children), ...children]) {
|
||||
if (isTab(child) && child.visible) {
|
||||
child.elementIndex = elementIndex++;
|
||||
focusableItems.push(child);
|
||||
@@ -944,11 +966,13 @@
|
||||
child.labelElement.elementIndex = elementIndex++;
|
||||
} else if (isTabGroup(child)) {
|
||||
focusableItems.push(child.labelElement);
|
||||
|
||||
-
|
||||
- let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
|
||||
+ if (!child.hasAttribute("split-view-group")) {
|
||||
+ let visibleTabsInGroup = child.childGroupsAndTabs.filter(tab => tab.visible);
|
||||
visibleTabsInGroup.forEach(tab => {
|
||||
tab.elementIndex = elementIndex++;
|
||||
});
|
||||
+
|
||||
focusableItems.push(...visibleTabsInGroup);
|
||||
+ }
|
||||
} else if (child.tagName == "tab-split-view-wrapper") {
|
||||
let visibleTabsInSplitView = child.tabs.filter(tab => tab.visible);
|
||||
visibleTabsInSplitView.forEach(tab => {
|
||||
@@ -992,6 +1016,7 @@
|
||||
focusableItems.push(...visibleTabsInSplitView);
|
||||
}
|
||||
}
|
||||
-
|
||||
+ focusableItems.forEach(item => {
|
||||
+ item.elementIndex = elementIndex++;
|
||||
+ });
|
||||
this.#focusableItems = focusableItems;
|
||||
|
||||
return this.#focusableItems;
|
||||
@@ -979,6 +1007,7 @@
|
||||
* focusable (ex, we don't want the splitview container to be focusable, only its children).
|
||||
*/
|
||||
get dragAndDropElements() {
|
||||
+ return this.ariaFocusableItems;
|
||||
if (this.#dragAndDropElements) {
|
||||
return this.#dragAndDropElements;
|
||||
}
|
||||
@@ -1050,6 +1079,7 @@
|
||||
_invalidateCachedTabs() {
|
||||
this.#allTabs = null;
|
||||
this._invalidateCachedVisibleTabs();
|
||||
@@ -173,7 +186,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
}
|
||||
|
||||
_invalidateCachedVisibleTabs() {
|
||||
@@ -1095,7 +1120,7 @@
|
||||
@@ -1154,7 +1184,7 @@
|
||||
|
||||
if (node == null) {
|
||||
// We have a container for non-tab elements at the end of the scrollbox.
|
||||
@@ -182,7 +195,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
}
|
||||
|
||||
node.before(tab);
|
||||
@@ -1193,7 +1218,7 @@
|
||||
@@ -1252,7 +1282,7 @@
|
||||
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
|
||||
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
|
||||
// Attach the long click popup to all of them.
|
||||
@@ -191,7 +204,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
const newTab2 = this.newTabButton;
|
||||
const newTabVertical = document.getElementById(
|
||||
"vertical-tabs-newtab-button"
|
||||
@@ -1294,8 +1319,10 @@
|
||||
@@ -1353,8 +1383,10 @@
|
||||
*/
|
||||
_handleTabSelect(aInstant) {
|
||||
let selectedTab = this.selectedItem;
|
||||
@@ -202,7 +215,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
selectedTab._notselectedsinceload = false;
|
||||
}
|
||||
|
||||
@@ -1304,7 +1331,7 @@
|
||||
@@ -1363,7 +1395,7 @@
|
||||
* @param {boolean} [shouldScrollInstantly=false]
|
||||
*/
|
||||
#ensureTabIsVisible(tab, shouldScrollInstantly = false) {
|
||||
@@ -211,7 +224,7 @@ index 6b6c04599fe80983d13d2069ca62b99d8ad70271..ebe4818a71b37e8b7cd2937f72cc60f2
|
||||
if (arrowScrollbox?.overflowing) {
|
||||
arrowScrollbox.ensureElementIsVisible(tab, shouldScrollInstantly);
|
||||
}
|
||||
@@ -1437,7 +1464,7 @@
|
||||
@@ -1496,7 +1528,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarController.sys.mjs b/browser/components/urlbar/UrlbarController.sys.mjs
|
||||
index 09c1a7d4e156fe5e606f097277420333efe88976..f31e183e7b92c616d81dae509ef0448c4d507cc7 100644
|
||||
index dc8ca021feff9e5c623dd2e9b3e3a8d6f55aa461..b6382bdcfef0cf6c2975fdb6f1a3c9b5c53f81af 100644
|
||||
--- a/browser/components/urlbar/UrlbarController.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarController.sys.mjs
|
||||
@@ -296,7 +296,6 @@ export class UrlbarController {
|
||||
@@ -302,7 +302,6 @@ export class UrlbarController {
|
||||
const isMac = AppConstants.platform == "macosx";
|
||||
// Handle readline/emacs-style navigation bindings on Mac.
|
||||
if (
|
||||
@@ -10,7 +10,7 @@ index 09c1a7d4e156fe5e606f097277420333efe88976..f31e183e7b92c616d81dae509ef0448c
|
||||
this.view.isOpen &&
|
||||
event.ctrlKey &&
|
||||
(event.key == "n" || event.key == "p")
|
||||
@@ -445,6 +444,8 @@ export class UrlbarController {
|
||||
@@ -451,6 +450,8 @@ export class UrlbarController {
|
||||
});
|
||||
}
|
||||
event.preventDefault();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarPrefs.sys.mjs b/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
index 0cc0db4889d66872bce2aa775a79a4c68e8cec51..604106e328843b3a6eb0922cc8663474ddb008f4 100644
|
||||
index 41e8aa0ee37fef0d24d41f2c4e776c39ed3895f6..293e993175bbbd67fa1541db6b9419b687de7fcd 100644
|
||||
--- a/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
@@ -763,6 +763,7 @@ function makeResultGroups({ showSearchSuggestionsFirst }) {
|
||||
@@ -759,6 +759,7 @@ function makeResultGroups({ showSearchSuggestionsFirst }) {
|
||||
*/
|
||||
let rootGroup = {
|
||||
children: [
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
|
||||
index 15dd29152cf349b5ed23f1bae0a74a8d7dbe4c3d..f44f5dd87f778f432b0028969ca5732305c98915 100644
|
||||
index 3a9cb4735185691df021157e42f8b9cc93f14aa1..00d7eaf3177d27df1e0db5303405ce28f3031d34 100644
|
||||
--- a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
|
||||
@@ -883,6 +883,7 @@ export class Query {
|
||||
@@ -893,6 +893,7 @@ export class Query {
|
||||
if (
|
||||
result.heuristic &&
|
||||
this.context.searchMode &&
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
index 7e9ede3dae5c2099c45e0221ad1cb8ebd622fc39..f82db27dbd07961ad6af7dbe2cb5d79e5f7a9828 100644
|
||||
index b97fa81cef276e4bb22414b7c182e00b4bb835dc..1f489eceead0aa331ace59281cb777db5e635366 100644
|
||||
--- a/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
@@ -79,6 +79,7 @@ export var UrlbarUtils = {
|
||||
@@ -81,6 +81,7 @@ export var UrlbarUtils = {
|
||||
RESTRICT_SEARCH_KEYWORD: "restrictSearchKeyword",
|
||||
SUGGESTED_INDEX: "suggestedIndex",
|
||||
TAIL_SUGGESTION: "tailSuggestion",
|
||||
@@ -10,7 +10,7 @@ index 7e9ede3dae5c2099c45e0221ad1cb8ebd622fc39..f82db27dbd07961ad6af7dbe2cb5d79e
|
||||
}),
|
||||
|
||||
// Defines provider types.
|
||||
@@ -138,6 +139,7 @@ export var UrlbarUtils = {
|
||||
@@ -140,6 +141,7 @@ export var UrlbarUtils = {
|
||||
OTHER_NETWORK: 6,
|
||||
ADDON: 7,
|
||||
ACTIONS: 8,
|
||||
@@ -18,7 +18,7 @@ index 7e9ede3dae5c2099c45e0221ad1cb8ebd622fc39..f82db27dbd07961ad6af7dbe2cb5d79e
|
||||
}),
|
||||
|
||||
// Per-result exposure telemetry.
|
||||
@@ -549,6 +551,8 @@ export var UrlbarUtils = {
|
||||
@@ -552,6 +554,8 @@ export var UrlbarUtils = {
|
||||
return this.RESULT_GROUP.HEURISTIC_FALLBACK;
|
||||
case "UrlbarProviderHistoryUrlHeuristic":
|
||||
return this.RESULT_GROUP.HEURISTIC_HISTORY_URL;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
|
||||
index 307b3cac259c05e616cf7d5eb1ce50a146550cd9..72252a6363154b6c5f926bf2acf3282e8396d2ad 100644
|
||||
index 3a8c233dd1e05c070e497ec9877e65b9d8a3e87b..dd2a7aac6945331a3a50a0d7f6d62aeda396b560 100644
|
||||
--- a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
|
||||
@@ -76,7 +76,7 @@ export class UrlbarValueFormatter {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarView.sys.mjs b/browser/components/urlbar/UrlbarView.sys.mjs
|
||||
index c58bc4871fbfb5ca924df822a09d783f21db616a..68fd73055d30ec4f4128fb8639369f07b167955a 100644
|
||||
index 6d6cc27e203a5799683a4e6eae1007ff30a69cd0..953c5cd09bcfd832d8ad11016977509f55935eb7 100644
|
||||
--- a/browser/components/urlbar/UrlbarView.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarView.sys.mjs
|
||||
@@ -620,7 +620,7 @@ export class UrlbarView {
|
||||
@@ -618,7 +618,7 @@ export class UrlbarView {
|
||||
!this.input.value ||
|
||||
this.input.getAttribute("pageproxystate") == "valid"
|
||||
) {
|
||||
@@ -11,7 +11,7 @@ index c58bc4871fbfb5ca924df822a09d783f21db616a..68fd73055d30ec4f4128fb8639369f07
|
||||
// Try to reuse the cached top-sites context. If it's not cached, then
|
||||
// there will be a gap of time between when the input is focused and
|
||||
// when the view opens that can be perceived as flicker.
|
||||
@@ -2855,6 +2855,8 @@ export class UrlbarView {
|
||||
@@ -2852,6 +2852,8 @@ export class UrlbarView {
|
||||
if (row?.hasAttribute("row-selectable")) {
|
||||
row?.toggleAttribute("selected", true);
|
||||
}
|
||||
@@ -24,7 +24,7 @@ index c58bc4871fbfb5ca924df822a09d783f21db616a..68fd73055d30ec4f4128fb8639369f07
|
||||
}
|
||||
|
||||
#enableOrDisableRowWrap() {
|
||||
- let wrap = getBoundsWithoutFlushing(this.input.textbox).width < 650;
|
||||
- let wrap = getBoundsWithoutFlushing(this.input).width < 650;
|
||||
+ let wrap = false;
|
||||
this.#rows.toggleAttribute("wrap", wrap);
|
||||
this.oneOffSearchButtons?.container.toggleAttribute("wrap", wrap);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f5f45accf 100644
|
||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs
|
||||
index edb0482f0bfb22c70a585b0770e5b0437983779e..545f65db4fe8b807b388d5552842cd9e56a72eb3 100644
|
||||
--- a/browser/components/urlbar/content/UrlbarInput.mjs
|
||||
+++ b/browser/components/urlbar/content/UrlbarInput.mjs
|
||||
@@ -68,6 +68,13 @@ const lazy = XPCOMUtils.declareLazy({
|
||||
logger: () => lazy.UrlbarUtils.getLogger({ prefix: "Input" }),
|
||||
});
|
||||
@@ -13,10 +13,10 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
+ 'default'
|
||||
+);
|
||||
+
|
||||
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
|
||||
|
||||
const UNLIMITED_MAX_RESULTS = 99;
|
||||
@@ -445,7 +452,16 @@ export class UrlbarInput {
|
||||
|
||||
let getBoundsWithoutFlushing = element =>
|
||||
@@ -630,7 +637,16 @@ export class UrlbarInput extends HTMLElement {
|
||||
// See _on_select(). HTMLInputElement.select() dispatches a "select"
|
||||
// event but does not set the primary selection.
|
||||
this._suppressPrimaryAdjustment = true;
|
||||
@@ -33,10 +33,10 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
this._suppressPrimaryAdjustment = false;
|
||||
}
|
||||
|
||||
@@ -521,6 +537,10 @@ export class UrlbarInput {
|
||||
@@ -704,6 +720,10 @@ export class UrlbarInput extends HTMLElement {
|
||||
hideSearchTerms = false,
|
||||
isSameDocument = false
|
||||
) {
|
||||
isSameDocument = false,
|
||||
} = {}) {
|
||||
+ if (this.hasAttribute("zen-newtab")) {
|
||||
+ return;
|
||||
+ }
|
||||
@@ -44,7 +44,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
if (!this.#isAddressbar) {
|
||||
throw new Error(
|
||||
"Cannot set URI for UrlbarInput that is not an address bar"
|
||||
@@ -798,8 +818,16 @@ export class UrlbarInput {
|
||||
@@ -985,8 +1005,16 @@ export class UrlbarInput extends HTMLElement {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1215,7 +1243,11 @@ export class UrlbarInput {
|
||||
@@ -1405,7 +1433,11 @@ export class UrlbarInput extends HTMLElement {
|
||||
}
|
||||
|
||||
if (!this.#providesSearchMode(result)) {
|
||||
@@ -75,7 +75,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
}
|
||||
|
||||
if (isCanonized) {
|
||||
@@ -2335,6 +2367,32 @@ export class UrlbarInput {
|
||||
@@ -2529,6 +2561,32 @@ export class UrlbarInput extends HTMLElement {
|
||||
await this.#updateLayoutBreakoutDimensions();
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
startLayoutExtend() {
|
||||
if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
|
||||
// Do not expand if the Urlbar does not support being expanded or it is
|
||||
@@ -2349,6 +2407,13 @@ export class UrlbarInput {
|
||||
@@ -2543,6 +2601,13 @@ export class UrlbarInput extends HTMLElement {
|
||||
|
||||
this.setAttribute("breakout-extend", "true");
|
||||
|
||||
@@ -122,7 +122,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
// Enable the animation only after the first extend call to ensure it
|
||||
// doesn't run when opening a new window.
|
||||
if (!this.hasAttribute("breakout-extend-animate")) {
|
||||
@@ -2368,6 +2433,24 @@ export class UrlbarInput {
|
||||
@@ -2562,6 +2627,24 @@ export class UrlbarInput extends HTMLElement {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
this.removeAttribute("breakout-extend");
|
||||
this.#updateTextboxPosition();
|
||||
}
|
||||
@@ -2398,7 +2481,7 @@ export class UrlbarInput {
|
||||
@@ -2592,7 +2675,7 @@ export class UrlbarInput extends HTMLElement {
|
||||
forceUnifiedSearchButtonAvailable = false
|
||||
) {
|
||||
let prevState = this.getAttribute("pageproxystate");
|
||||
@@ -156,12 +156,12 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
this.setAttribute("pageproxystate", state);
|
||||
this._inputContainer.setAttribute("pageproxystate", state);
|
||||
this._identityBox?.setAttribute("pageproxystate", state);
|
||||
@@ -2635,10 +2718,12 @@ export class UrlbarInput {
|
||||
@@ -2846,10 +2929,12 @@ export class UrlbarInput extends HTMLElement {
|
||||
return;
|
||||
}
|
||||
this.textbox.style.top = px(
|
||||
this.style.top = px(
|
||||
+ this.window.gZenVerticalTabsManager._hasSetSingleToolbar ?
|
||||
this.textbox.parentNode.getBoxQuads({
|
||||
this.parentNode.getBoxQuads({
|
||||
ignoreTransforms: true,
|
||||
flush: false,
|
||||
})[0].p1.y
|
||||
@@ -169,19 +169,19 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2698,9 +2783,10 @@ export class UrlbarInput {
|
||||
@@ -2908,9 +2993,10 @@ export class UrlbarInput extends HTMLElement {
|
||||
return;
|
||||
}
|
||||
|
||||
+ this.window.gZenVerticalTabsManager.recalculateURLBarHeight();
|
||||
this.textbox.parentNode.style.setProperty(
|
||||
this.parentNode.style.setProperty(
|
||||
"--urlbar-container-height",
|
||||
- px(getBoundsWithoutFlushing(this.textbox.parentNode).height)
|
||||
+ px(getBoundsWithoutFlushing(this.textbox.parentNode).height + 8)
|
||||
- px(getBoundsWithoutFlushing(this.parentNode).height)
|
||||
+ px(getBoundsWithoutFlushing(this.parentNode).height + 8)
|
||||
);
|
||||
this.textbox.style.setProperty(
|
||||
this.style.setProperty(
|
||||
"--urlbar-height",
|
||||
@@ -3134,6 +3220,7 @@ export class UrlbarInput {
|
||||
@@ -3344,6 +3430,7 @@ export class UrlbarInput extends HTMLElement {
|
||||
}
|
||||
|
||||
_toggleActionOverride(event) {
|
||||
@@ -189,7 +189,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
if (
|
||||
event.keyCode == KeyEvent.DOM_VK_SHIFT ||
|
||||
event.keyCode == KeyEvent.DOM_VK_ALT ||
|
||||
@@ -3237,8 +3324,8 @@ export class UrlbarInput {
|
||||
@@ -3447,8 +3534,8 @@ export class UrlbarInput extends HTMLElement {
|
||||
if (!this.#isAddressbar) {
|
||||
return val;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
: val;
|
||||
// Only trim value if the directionality doesn't change to RTL and we're not
|
||||
// showing a strikeout https protocol.
|
||||
@@ -3544,6 +3631,7 @@ export class UrlbarInput {
|
||||
@@ -3754,6 +3841,7 @@ export class UrlbarInput extends HTMLElement {
|
||||
resultDetails = null,
|
||||
browser = this.window.gBrowser.selectedBrowser
|
||||
) {
|
||||
@@ -208,7 +208,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
if (this.#isAddressbar) {
|
||||
this.#prepareAddressbarLoad(
|
||||
url,
|
||||
@@ -3651,6 +3739,10 @@ export class UrlbarInput {
|
||||
@@ -3861,6 +3949,10 @@ export class UrlbarInput extends HTMLElement {
|
||||
}
|
||||
reuseEmpty = true;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
if (
|
||||
where == "tab" &&
|
||||
reuseEmpty &&
|
||||
@@ -3658,6 +3750,9 @@ export class UrlbarInput {
|
||||
@@ -3868,6 +3960,9 @@ export class UrlbarInput extends HTMLElement {
|
||||
) {
|
||||
where = "current";
|
||||
}
|
||||
@@ -229,7 +229,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
return where;
|
||||
}
|
||||
|
||||
@@ -3909,6 +4004,7 @@ export class UrlbarInput {
|
||||
@@ -4122,6 +4217,7 @@ export class UrlbarInput extends HTMLElement {
|
||||
this.setResultForCurrentValue(null);
|
||||
this.handleCommand();
|
||||
this.controller.clearLastQueryContextCache();
|
||||
@@ -237,7 +237,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
|
||||
this._suppressStartQuery = false;
|
||||
});
|
||||
@@ -3916,7 +4012,6 @@ export class UrlbarInput {
|
||||
@@ -4129,7 +4225,6 @@ export class UrlbarInput extends HTMLElement {
|
||||
contextMenu.addEventListener("popupshowing", () => {
|
||||
// Close the results pane when the input field contextual menu is open,
|
||||
// because paste and go doesn't want a result selection.
|
||||
@@ -245,7 +245,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
|
||||
let controller =
|
||||
this.document.commandDispatcher.getControllerForCommand("cmd_paste");
|
||||
@@ -4026,7 +4121,11 @@ export class UrlbarInput {
|
||||
@@ -4239,7 +4334,11 @@ export class UrlbarInput extends HTMLElement {
|
||||
if (!engineName && !source && !this.hasAttribute("searchmode")) {
|
||||
return;
|
||||
}
|
||||
@@ -258,27 +258,27 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
if (this._searchModeIndicatorTitle) {
|
||||
this._searchModeIndicatorTitle.textContent = "";
|
||||
this._searchModeIndicatorTitle.removeAttribute("data-l10n-id");
|
||||
@@ -4338,6 +4437,7 @@ export class UrlbarInput {
|
||||
@@ -4549,6 +4648,7 @@ export class UrlbarInput extends HTMLElement {
|
||||
|
||||
this.document.l10n.setAttributes(
|
||||
this.inputField,
|
||||
+ this.window.gZenVerticalTabsManager._hasSetSingleToolbar ? 'zen-singletoolbar-urlbar-placeholder-with-name' :
|
||||
l10nId,
|
||||
l10nId == "urlbar-placeholder-with-name" ? { name } : undefined
|
||||
);
|
||||
@@ -4449,6 +4549,11 @@ export class UrlbarInput {
|
||||
l10nId == "urlbar-placeholder-with-name"
|
||||
? { name: engineName }
|
||||
@@ -4662,6 +4762,11 @@ export class UrlbarInput extends HTMLElement {
|
||||
}
|
||||
|
||||
_on_click(event) {
|
||||
+ if (event.target == this.inputField) {
|
||||
+ event.zenOriginalTarget = this.textbox;
|
||||
+ event.zenOriginalTarget = this;
|
||||
+ this._on_mousedown(event);
|
||||
+ }
|
||||
+
|
||||
if (
|
||||
event.target == this.inputField ||
|
||||
event.target == this._inputContainer
|
||||
@@ -4521,7 +4626,7 @@ export class UrlbarInput {
|
||||
switch (event.target) {
|
||||
case this.inputField:
|
||||
case this._inputContainer:
|
||||
@@ -4740,7 +4845,7 @@ export class UrlbarInput extends HTMLElement {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,13 +287,13 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
this.view.autoOpen({ event });
|
||||
} else {
|
||||
if (this._untrimOnFocusAfterKeydown) {
|
||||
@@ -4561,9 +4666,16 @@ export class UrlbarInput {
|
||||
@@ -4780,9 +4885,16 @@ export class UrlbarInput extends HTMLElement {
|
||||
}
|
||||
|
||||
_on_mousedown(event) {
|
||||
- switch (event.currentTarget) {
|
||||
+ switch (event.zenOriginalTarget || event.currentTarget) {
|
||||
case this.textbox: {
|
||||
case this: {
|
||||
this._mousedownOnUrlbarDescendant = true;
|
||||
+ const isProbablyFloating =
|
||||
+ (this.zenUrlbarBehavior == "floating-on-type" &&
|
||||
@@ -302,10 +302,10 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
+ if (event.type != "click" && isProbablyFloating || event.type == "click" && !isProbablyFloating) {
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
if (
|
||||
event.target != this.inputField &&
|
||||
@@ -4574,6 +4686,10 @@ export class UrlbarInput {
|
||||
event.composedTarget != this.inputField &&
|
||||
event.composedTarget != this._inputContainer
|
||||
@@ -4792,6 +4904,10 @@ export class UrlbarInput extends HTMLElement {
|
||||
|
||||
this.focusedViaMousedown = !this.focused;
|
||||
this._preventClickSelectsAll = this.focused;
|
||||
@@ -316,7 +316,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
|
||||
// Keep the focus status, since the attribute may be changed
|
||||
// upon calling this.focus().
|
||||
@@ -4609,7 +4725,7 @@ export class UrlbarInput {
|
||||
@@ -4827,7 +4943,7 @@ export class UrlbarInput extends HTMLElement {
|
||||
}
|
||||
// Don't close the view when clicking on a tab; we may want to keep the
|
||||
// view open on tab switch, and the TabSelect event arrived earlier.
|
||||
@@ -325,7 +325,7 @@ index 6ad064710da20f7a13fda3517780c2f38b3d2865..58a01eef024d8b9992068a6a5b7be68f
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4930,7 +5046,7 @@ export class UrlbarInput {
|
||||
@@ -5155,7 +5271,7 @@ export class UrlbarInput extends HTMLElement {
|
||||
// When we are in actions search mode we can show more results so
|
||||
// increase the limit.
|
||||
let maxResults =
|
||||
Reference in New Issue
Block a user