mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Merge pull request #6867 from zen-browser/update-firefox-137
Update to firefox 137.0
This commit is contained in:
2
.github/workflows/windows-release-build.yml
vendored
2
.github/workflows/windows-release-build.yml
vendored
@@ -177,7 +177,7 @@ jobs:
|
||||
if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
|
||||
run: |
|
||||
cd engine/
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.81
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.82
|
||||
source $HOME/.cargo/env
|
||||
if test "${{ matrix.arch }}" = "aarch64"; then
|
||||
rustup target add aarch64-pc-windows-msvc
|
||||
|
@@ -1 +1 @@
|
||||
e234130176d2813fec2397bbf3a313909565006e
|
||||
6c9732d1c3b969818a320c60f02e8339822ac08e
|
@@ -8,7 +8,6 @@ ac_add_options --with-l10n-base="${topsrcdir}/browser/locales"
|
||||
|
||||
export MOZ_USER_DIR="${name}"
|
||||
export MOZ_APP_BASENAME=Zen
|
||||
export MOZ_APP_PROFILE=${binName}
|
||||
export MOZ_BRANDING_DIRECTORY=${brandingDir}
|
||||
export MOZ_OFFICIAL_BRANDING_DIRECTORY=${brandingDir}
|
||||
|
||||
|
2
l10n
2
l10n
Submodule l10n updated: 778cb128c6...4094426d24
@@ -27,18 +27,18 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zen-browser/core.git"
|
||||
"url": "git+https://github.com/zen-browser/desktop.git"
|
||||
},
|
||||
"hooks": {
|
||||
"pre-commit": "npm run prepare"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"license": "MPL-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zen-browser/core/issues"
|
||||
"url": "https://github.com/zen-browser/desktop/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zen-browser/core#readme",
|
||||
"homepage": "https://github.com/zen-browser/desktop#readme",
|
||||
"dependencies": {
|
||||
"@zen-browser/surfer": "^1.10.5"
|
||||
},
|
||||
|
@@ -193,7 +193,6 @@ pref('zen.sidebar.use-google-favicons', true);
|
||||
// Zen Split View
|
||||
pref('zen.splitView.enable-tab-drop', true);
|
||||
pref('zen.splitView.min-resize-width', 7);
|
||||
pref('zen.splitView.change-on-hover', false);
|
||||
pref('zen.splitView.rearrange-hover-size', 24);
|
||||
|
||||
// Startup flags
|
||||
|
@@ -65,7 +65,11 @@ var gZenUIManager = {
|
||||
tabs.style.removeProperty('flex');
|
||||
tabs.style.maxHeight = height + 'px';
|
||||
gZenVerticalTabsManager.actualWindowButtons.removeAttribute('zen-has-hover');
|
||||
gURLBar.updateLayoutBreakout();
|
||||
try {
|
||||
gURLBar.zenUpdateLayoutBreakout();
|
||||
} catch (error) {
|
||||
console.error('Error updating layout breakout:', error);
|
||||
}
|
||||
},
|
||||
|
||||
get tabsWrapper() {
|
||||
@@ -642,7 +646,11 @@ var gZenVerticalTabsManager = {
|
||||
if (!isSingleToolbar) {
|
||||
document.getElementById('urlbar').style.setProperty('--urlbar-height', '32px');
|
||||
} else {
|
||||
gURLBar.updateLayoutBreakout();
|
||||
try {
|
||||
gURLBar.zenUpdateLayoutBreakout();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Always move the splitter next to the sidebar
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
|
||||
index 53e4616a99b7826453d5b6dea027184d90bc73f7..90c9fe5683411cf3087bebd3d0941decf6d23e89 100644
|
||||
index c64980810570fcea84e33fdc2d66ac42a79f4e46..b7198e810a7510fa82cc6801cfd01c88a08d42c1 100644
|
||||
--- a/browser/base/content/aboutDialog.xhtml
|
||||
+++ b/browser/base/content/aboutDialog.xhtml
|
||||
@@ -34,6 +34,7 @@
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
<html:link rel="localization" href="branding/brand.ftl"/>
|
||||
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
|
||||
@@ -10,7 +10,7 @@ index 53e4616a99b7826453d5b6dea027184d90bc73f7..90c9fe5683411cf3087bebd3d0941dec
|
||||
</linkset>
|
||||
|
||||
<html:div id="aboutDialogContainer">
|
||||
@@ -124,21 +125,23 @@
|
||||
@@ -125,21 +126,23 @@
|
||||
</description>
|
||||
</vbox>
|
||||
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
|
||||
@@ -30,8 +30,8 @@ index 53e4616a99b7826453d5b6dea027184d90bc73f7..90c9fe5683411cf3087bebd3d0941dec
|
||||
<vbox id="bottomBox">
|
||||
<hbox pack="center">
|
||||
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="bottomLinks-license"/>
|
||||
- <label is="text-link" class="bottom-link" href="https://www.mozilla.org/about/legal/terms/firefox/" data-l10n-id="bottomLinks-rights"/>
|
||||
- <label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/firefox/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-id="bottomLinks-privacy"/>
|
||||
- <label is="text-link" class="bottom-link" href="https://www.mozilla.org/about/legal/terms/firefox/" data-l10n-id="bottom-links-terms"/>
|
||||
- <label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/firefox/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-id="bottom-links-privacy"/>
|
||||
+ <label is="text-link" class="bottom-link" href="about:rights" data-l10n-id="bottomLinks-rights"/>
|
||||
+ <label is="text-link" class="bottom-link" href="https://www.zen-browser.app/privacy-policy/" data-l10n-id="bottomLinks-privacy"/>
|
||||
</hbox>
|
||||
|
@@ -1,17 +1,17 @@
|
||||
diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml
|
||||
index 7d7e8697f02f90d4f336c9ab0a73a89848e0c21c..2fd19f3b43db4bdd99e65fecd1481f80d4541a7a 100644
|
||||
index 2ca8bdd2674fb4addf3bbf94ff17abc5c93c6293..49c772ae71e6b3793ff806d22197d3028ff4385f 100644
|
||||
--- a/browser/base/content/browser-box.inc.xhtml
|
||||
+++ b/browser/base/content/browser-box.inc.xhtml
|
||||
@@ -23,7 +23,14 @@
|
||||
<browser id="sidebar" autoscroll="false" disablehistory="true" disablefullscreen="true" tooltip="aHTMLTooltip"/>
|
||||
</vbox>
|
||||
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
|
||||
@@ -26,7 +26,14 @@
|
||||
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
|
||||
<box id="after-splitter"></box>
|
||||
</div>
|
||||
+#include zen-sidebar-panel.inc.xhtml
|
||||
+<vbox flex="1" id="zen-appcontent-wrapper">
|
||||
+<html:div id="zen-appcontent-navbar-container"></html:div>
|
||||
+<hbox id="zen-tabbox-wrapper" flex="1">
|
||||
<tabbox id="tabbrowser-tabbox" flex="1" tabcontainer="tabbrowser-tabs">
|
||||
+ #include zen-tabbrowser-elements.inc.xhtml
|
||||
+#include zen-tabbrowser-elements.inc.xhtml
|
||||
<tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"/>
|
||||
</tabbox>
|
||||
</hbox>
|
||||
|
@@ -1,36 +1,17 @@
|
||||
diff --git a/browser/base/content/browser-init.js b/browser/base/content/browser-init.js
|
||||
index 63100defacf66c6b3232b9e0a783a5fd14e3a46a..398d685b142a47a85619dfc55772ea98ccfad445 100644
|
||||
index 3d5173315812589c0b79beec5f0419fc37cb8868..c4216db9e414fbbaead6ecd89b40366b0d8a50c1 100644
|
||||
--- a/browser/base/content/browser-init.js
|
||||
+++ b/browser/base/content/browser-init.js
|
||||
@@ -162,13 +162,15 @@ var gBrowserInit = {
|
||||
elem.setAttribute("skipintoolbarset", "true");
|
||||
}
|
||||
}
|
||||
+ ZenCustomizableUI.init(window);
|
||||
for (let area of CustomizableUI.areas) {
|
||||
let type = CustomizableUI.getAreaType(area);
|
||||
- if (type == CustomizableUI.TYPE_TOOLBAR) {
|
||||
+ if (type == CustomizableUI.TYPE_TOOLBAR && !area.startsWith("zen-")) {
|
||||
let node = document.getElementById(area);
|
||||
CustomizableUI.registerToolbarNode(node);
|
||||
}
|
||||
}
|
||||
+ ZenCustomizableUI.registerToolbarNodes(window);
|
||||
if (isVerticalTabs) {
|
||||
// Show the vertical tabs toolbar
|
||||
setToolbarVisibility(
|
||||
@@ -287,6 +289,10 @@ var gBrowserInit = {
|
||||
gPrivateBrowsingUI.init();
|
||||
BrowserSearch.init();
|
||||
BrowserPageActions.init();
|
||||
+
|
||||
+Services.scriptloader.loadSubScript("chrome://browser/content/ZenStartup.mjs", window);
|
||||
+Services.scriptloader.loadSubScript("chrome://browser/content/zenThemeModifier.js", window);
|
||||
+
|
||||
if (gToolbarKeyNavEnabled) {
|
||||
ToolbarKeyboardNavigator.init();
|
||||
}
|
||||
@@ -365,6 +371,7 @@ var gBrowserInit = {
|
||||
@@ -175,6 +175,8 @@ var gBrowserInit = {
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
+ Services.scriptloader.loadSubScript("chrome://browser/content/ZenStartup.mjs", window);
|
||||
+ Services.scriptloader.loadSubScript("chrome://browser/content/zenThemeModifier.js", window);
|
||||
gBrowser.addEventListener("DOMUpdateBlockedPopups", e =>
|
||||
PopupBlockerObserver.handleEvent(e)
|
||||
);
|
||||
@@ -310,6 +312,7 @@ var gBrowserInit = {
|
||||
TelemetryTimestamps.add("delayedStartupStarted");
|
||||
|
||||
this._cancelDelayedStartup();
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
|
||||
index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..22dcf304591290d7a1b60f01998b6cf4782c0cdc 100644
|
||||
index b89846a1103827b7e65c0b6c9197e80761e3f5c0..cc7205765244738743db92bfcafc1f288919ae0d 100644
|
||||
--- a/browser/base/content/browser.js
|
||||
+++ b/browser/base/content/browser.js
|
||||
@@ -32,6 +32,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
||||
@@ -33,6 +33,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
||||
ContextualIdentityService:
|
||||
"resource://gre/modules/ContextualIdentityService.sys.mjs",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||
@@ -10,7 +10,7 @@ index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..22dcf304591290d7a1b60f01998b6cf4
|
||||
DevToolsSocketStatus:
|
||||
"resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
||||
@@ -3440,6 +3441,11 @@ var XULBrowserWindow = {
|
||||
@@ -2698,6 +2699,11 @@ var XULBrowserWindow = {
|
||||
AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser);
|
||||
TranslationsParent.onLocationChange(gBrowser.selectedBrowser);
|
||||
|
||||
@@ -22,27 +22,7 @@ index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..22dcf304591290d7a1b60f01998b6cf4
|
||||
PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser);
|
||||
|
||||
if (!gMultiProcessBrowser) {
|
||||
@@ -4435,7 +4441,7 @@ nsBrowserAccess.prototype = {
|
||||
// Passing a null-URI to only create the content window,
|
||||
// and pass true for aSkipLoad to prevent loading of
|
||||
// about:blank
|
||||
- return this.getContentWindowOrOpenURIInFrame(
|
||||
+ let res = this.getContentWindowOrOpenURIInFrame(
|
||||
null,
|
||||
aParams,
|
||||
aWhere,
|
||||
@@ -4443,6 +4449,10 @@ nsBrowserAccess.prototype = {
|
||||
aName,
|
||||
true
|
||||
);
|
||||
+ if (typeof window.gZenGlanceManager !== "undefined" && window.toolbar.visible) {
|
||||
+ window.gZenGlanceManager.onTabOpen(res, aURI);
|
||||
+ }
|
||||
+ return res;
|
||||
},
|
||||
|
||||
openURIInFrame: function browser_openURIInFrame(
|
||||
@@ -6351,7 +6361,7 @@ function switchToTabHavingURI(
|
||||
@@ -5194,7 +5200,7 @@ function switchToTabHavingURI(
|
||||
ignoreQueryString || replaceQueryString,
|
||||
ignoreFragmentWhenComparing
|
||||
);
|
||||
@@ -51,7 +31,7 @@ index 019b168c1aeae7e1c97a3ae58c99a48a27f54134..22dcf304591290d7a1b60f01998b6cf4
|
||||
for (let i = 0; i < browsers.length; i++) {
|
||||
let browser = browsers[i];
|
||||
let browserCompare = cleanURL(
|
||||
@@ -6392,7 +6402,7 @@ function switchToTabHavingURI(
|
||||
@@ -5235,7 +5241,7 @@ function switchToTabHavingURI(
|
||||
}
|
||||
|
||||
if (!doAdopt) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
||||
index 68849f5093cd8ab99ab0747d972799eaf3ad7e22..3b4e6a179ab7b71859f832709778c326a39cffda 100644
|
||||
index 0d0a559a6473149b50f4bf18d059e86907c4acd3..a5a48ba1d50b3bf74dec3f3d371a76228e246a9e 100644
|
||||
--- a/browser/base/content/browser.xhtml
|
||||
+++ b/browser/base/content/browser.xhtml
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -10,7 +10,7 @@ index 68849f5093cd8ab99ab0747d972799eaf3ad7e22..3b4e6a179ab7b71859f832709778c326
|
||||
persist="screenX screenY width height sizemode"
|
||||
data-l10n-sync="true">
|
||||
<head>
|
||||
@@ -100,6 +101,8 @@
|
||||
@@ -104,6 +105,8 @@
|
||||
|
||||
<title data-l10n-id="browser-main-window-default-title"></title>
|
||||
|
||||
@@ -19,15 +19,15 @@ index 68849f5093cd8ab99ab0747d972799eaf3ad7e22..3b4e6a179ab7b71859f832709778c326
|
||||
# All JS files which are needed by browser.xhtml and other top level windows to
|
||||
# support MacOS specific features *must* go into the global-scripts.inc file so
|
||||
# that they can be shared with macWindow.inc.xhtml.
|
||||
@@ -169,6 +172,7 @@
|
||||
});
|
||||
});
|
||||
@@ -148,6 +151,7 @@
|
||||
window.addEventListener("DOMContentLoaded",
|
||||
gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true });
|
||||
</script>
|
||||
+#include zen-assets.inc.xhtml
|
||||
</head>
|
||||
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
# All sets except for popupsets (commands, keys, and stringbundles)
|
||||
@@ -190,9 +194,13 @@
|
||||
@@ -169,9 +173,13 @@
|
||||
</vbox>
|
||||
</html:template>
|
||||
|
||||
|
@@ -1,19 +1,19 @@
|
||||
diff --git a/browser/base/content/main-popupset.inc.xhtml b/browser/base/content/main-popupset.inc.xhtml
|
||||
index 959c523b21c642f29353b9de37b3ce6b5505b01b..4cd26ea85ad4905bade71dcd470b8678079787bd 100644
|
||||
index 198c188e074b7062169764fb7d81c692d3a2bdae..b412a3c1fabdc6470b4ea9e7be34c426cc76aafd 100644
|
||||
--- a/browser/base/content/main-popupset.inc.xhtml
|
||||
+++ b/browser/base/content/main-popupset.inc.xhtml
|
||||
@@ -206,6 +206,10 @@
|
||||
@@ -201,6 +201,10 @@
|
||||
hidden="true"
|
||||
tabspecific="true"
|
||||
aria-labelledby="editBookmarkPanelTitle">
|
||||
+ <html:div id="zenEditBookmarkPanelFaviconContainer">
|
||||
+ <html:img id="zenEditBookmarkPanelFavicon"/>
|
||||
+ </html:div>
|
||||
+ <vbox>
|
||||
+ <html:div id="zenEditBookmarkPanelFaviconContainer">
|
||||
+ <html:img id="zenEditBookmarkPanelFavicon"/>
|
||||
+ </html:div>
|
||||
+ <vbox>
|
||||
<box class="panel-header">
|
||||
<html:h1>
|
||||
<html:span id="editBookmarkPanelTitle"/>
|
||||
@@ -231,6 +235,7 @@
|
||||
@@ -226,6 +230,7 @@
|
||||
class="footer-button"/>
|
||||
</html:moz-button-group>
|
||||
</vbox>
|
||||
@@ -21,21 +21,7 @@ index 959c523b21c642f29353b9de37b3ce6b5505b01b..4cd26ea85ad4905bade71dcd470b8678
|
||||
</panel>
|
||||
</html:template>
|
||||
|
||||
@@ -426,11 +431,13 @@
|
||||
observes="cmd_CustomizeToolbars"
|
||||
class="viewCustomizeToolbar"
|
||||
data-lazy-l10n-id="toolbar-context-menu-view-customize-toolbar-2"/>
|
||||
+#if 0
|
||||
<menuseparator id="sidebarRevampSeparator"/>
|
||||
<menuitem id="toolbar-context-toggle-vertical-tabs"
|
||||
data-lazy-l10n-id="toolbar-context-turn-on-vertical-tabs"/>
|
||||
<menuitem id="toolbar-context-customize-sidebar"
|
||||
data-lazy-l10n-id="toolbar-context-customize-sidebar"/>
|
||||
+#endif
|
||||
<menuseparator contexttype="fullscreen"/>
|
||||
<menuitem id="toolbar-context-full-screen-autohide"
|
||||
class="fullscreen-context-autohide"
|
||||
@@ -565,6 +572,8 @@
|
||||
@@ -567,6 +572,8 @@
|
||||
|
||||
#include popup-notifications.inc.xhtml
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
index a0a382643a2f74b6d789f3641ef300eed202d5e9..a962e155f1452362a2a35df89c8f56e1c0d9968c 100644
|
||||
index feb9e4ef7e872b4cfbf0d55f24a34db275951c66..3ce9b9919ff736885b8aa8943bbbce3c5d0f33a6 100644
|
||||
--- a/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
@@ -2,7 +2,7 @@
|
||||
@@ -11,20 +11,18 @@ index a0a382643a2f74b6d789f3641ef300eed202d5e9..a962e155f1452362a2a35df89c8f56e1
|
||||
<script src="chrome://browser/content/navigator-toolbox.js" />
|
||||
|
||||
<!-- Menu -->
|
||||
@@ -17,9 +17,11 @@
|
||||
@@ -17,9 +17,8 @@
|
||||
#include browser-menubar.inc
|
||||
</toolbaritem>
|
||||
<spacer flex="1" skipintoolbarset="true" style="order: 1000;"/>
|
||||
+#if 0
|
||||
#include titlebar-items.inc.xhtml
|
||||
+#endif
|
||||
-#include titlebar-items.inc.xhtml
|
||||
</toolbar>
|
||||
-
|
||||
+<hbox id="titlebar">
|
||||
<toolbar id="TabsToolbar"
|
||||
class="browser-toolbar browser-titlebar"
|
||||
fullscreentoolbar="true"
|
||||
@@ -32,7 +34,7 @@
|
||||
@@ -32,7 +31,7 @@
|
||||
|
||||
<hbox class="titlebar-spacer" type="pre-tabs"/>
|
||||
|
||||
@@ -33,18 +31,15 @@ index a0a382643a2f74b6d789f3641ef300eed202d5e9..a962e155f1452362a2a35df89c8f56e1
|
||||
<toolbartabstop/>
|
||||
<hbox id="TabsToolbar-customization-target" flex="1">
|
||||
<toolbarbutton id="firefox-view-button"
|
||||
@@ -40,9 +42,9 @@
|
||||
@@ -40,6 +39,7 @@
|
||||
data-l10n-id="toolbar-button-firefox-view-2"
|
||||
role="button"
|
||||
aria-pressed="false"
|
||||
+ hidden="true"
|
||||
cui-areatype="toolbar"
|
||||
removable="true"/>
|
||||
-
|
||||
<tabs id="tabbrowser-tabs"
|
||||
is="tabbrowser-tabs"
|
||||
aria-multiselectable="true"
|
||||
@@ -50,6 +52,10 @@
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
tooltip="tabbrowser-tab-tooltip"
|
||||
orient="horizontal"
|
||||
stopwatchid="FX_TAB_CLICK_MS">
|
||||
@@ -55,16 +50,7 @@ index a0a382643a2f74b6d789f3641ef300eed202d5e9..a962e155f1452362a2a35df89c8f56e1
|
||||
<hbox class="tab-drop-indicator" hidden="true"/>
|
||||
# If the name (tabbrowser-arrowscrollbox) or structure of this changes
|
||||
# significantly, there is an optimization in
|
||||
@@ -57,7 +63,7 @@
|
||||
# the current structure that we may want to revisit.
|
||||
<html:div id="vertical-pinned-tabs-container" tabindex="-1"></html:div>
|
||||
<html:div id="vertical-pinned-tabs-container-separator"></html:div>
|
||||
- <arrowscrollbox id="tabbrowser-arrowscrollbox" orient="horizontal" flex="1" clicktoscroll="" scrolledtostart="" scrolledtoend="">
|
||||
+ <arrowscrollbox id="tabbrowser-arrowscrollbox" orient="vertical" flex="1" clicktoscroll="" scrolledtostart="" scrolledtoend="">
|
||||
<tab is="tabbrowser-tab" class="tabbrowser-tab" selected="true" visuallyselected="" fadein=""/>
|
||||
<hbox id="tabbrowser-arrowscrollbox-periphery">
|
||||
<toolbartabstop/>
|
||||
@@ -75,6 +81,8 @@
|
||||
@@ -75,6 +79,8 @@
|
||||
tooltip="dynamic-shortcut-tooltip"
|
||||
data-l10n-id="tabs-toolbar-new-tab"/>
|
||||
<html:span id="tabbrowser-tab-a11y-desc" hidden="true"/>
|
||||
@@ -73,33 +59,28 @@ index a0a382643a2f74b6d789f3641ef300eed202d5e9..a962e155f1452362a2a35df89c8f56e1
|
||||
</tabs>
|
||||
|
||||
<toolbarbutton id="new-tab-button"
|
||||
@@ -100,11 +108,12 @@
|
||||
@@ -100,10 +106,10 @@
|
||||
#include private-browsing-indicator.inc.xhtml
|
||||
<toolbarbutton id="content-analysis-indicator"
|
||||
class="toolbarbutton-1 content-analysis-indicator-icon"/>
|
||||
-
|
||||
+#if 0
|
||||
#include titlebar-items.inc.xhtml
|
||||
-
|
||||
+#endif
|
||||
<toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/>
|
||||
|
||||
-#include titlebar-items.inc.xhtml
|
||||
+#include zen-sidebar-icons.inc.xhtml
|
||||
|
||||
</toolbar>
|
||||
-
|
||||
+</hbox>
|
||||
<toolbar id="nav-bar"
|
||||
class="browser-toolbar chromeclass-location"
|
||||
data-l10n-id="navbar-accessible"
|
||||
@@ -490,10 +499,12 @@
|
||||
@@ -489,10 +495,10 @@
|
||||
consumeanchor="PanelUI-button"
|
||||
data-l10n-id="appmenu-menu-button-closed2"/>
|
||||
</toolbaritem>
|
||||
+#include titlebar-items.inc.xhtml
|
||||
<hbox class="titlebar-spacer" type="post-tabs"/>
|
||||
#include private-browsing-indicator.inc.xhtml
|
||||
-
|
||||
+#if 0
|
||||
#include titlebar-items.inc.xhtml
|
||||
+#endif
|
||||
<toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/>
|
||||
-#include titlebar-items.inc.xhtml
|
||||
</toolbar>
|
||||
|
||||
<toolbar id="PersonalToolbar"
|
||||
|
@@ -30,20 +30,22 @@
|
||||
</linkset>
|
||||
|
||||
# Scripts used all over the browser
|
||||
<script src="chrome://browser/content/zen-components/ZenFolders.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenThemesCommon.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenThemesImporter.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenCompactMode.mjs" />
|
||||
<script src="chrome://browser/content/ZenUIManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenSidebarManager.mjs"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenTabUnloader.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenGlanceManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenMediaController.mjs" />
|
||||
<script>
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenFolders.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesCommon.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesImporter.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCompactMode.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/ZenUIManager.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenSidebarManager.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenTabUnloader.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenPinnedTabManager.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenGradientGenerator.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenViewSplitter.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenGlanceManager.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenMediaController.mjs", this);
|
||||
|
||||
# Unimportant scripts
|
||||
<script src="chrome://browser/content/zen-components/ZenRices.mjs" />
|
||||
// Unimportant scripts
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenRices.mjs", this);
|
||||
</script>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.experimental-rounded-view') {
|
||||
@media -moz-pref('zen.view.experimental-rounded-view') {
|
||||
#tabbrowser-tabpanels {
|
||||
mix-blend-mode: multiply;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
@@ -52,7 +52,7 @@
|
||||
transition: background-color var(--inactive-window-transition);
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.theme.gradient') {
|
||||
@media -moz-pref('zen.theme.gradient') {
|
||||
&[animating='true']::after {
|
||||
background: var(--zen-main-browser-background-old);
|
||||
backdrop-filter: blur(5px);
|
||||
@@ -61,7 +61,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (not (-moz-windows-mica)) and (-moz-bool-pref: 'zen.view.grey-out-inactive-windows') {
|
||||
@media (not (-moz-windows-mica)) and -moz-pref('zen.view.grey-out-inactive-windows') {
|
||||
transition: color var(--inactive-window-transition);
|
||||
:root:not([zen-welcome-stage]) &:-moz-window-inactive {
|
||||
color: var(--toolbox-textcolor-inactive);
|
||||
@@ -173,7 +173,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.widget.mac.mono-window-controls') {
|
||||
@media -moz-pref('zen.widget.mac.mono-window-controls') {
|
||||
.titlebar-buttonbox-container {
|
||||
/* Draw 3 dots as background to represent the window controls,
|
||||
all with the same cololr as the titlebar */
|
||||
|
@@ -8,7 +8,7 @@
|
||||
:root[zen-compact-mode='true']:not([customizing]):not([inDOMFullscreen='true']) {
|
||||
%include zen-tabs/vertical-tabs-topbuttons-fix.css
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') or (-moz-bool-pref: 'zen.view.use-single-toolbar') {
|
||||
@media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') {
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
|
||||
* we need to adjust the top-padding of the toolbox to account for the
|
||||
* extra toolbar height. */
|
||||
@media not (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
@media not -moz-pref('zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) #navigator-toolbox:not([animate='true']) {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
@@ -121,7 +121,7 @@
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-sidebar') {
|
||||
@media -moz-pref('zen.view.compact.color-sidebar') {
|
||||
background: var(--zen-main-browser-background-toolbar) !important;
|
||||
background-attachment: fixed !important;
|
||||
background-size: 2000px !important; /* Dont ask me why */
|
||||
@@ -285,7 +285,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
@media -moz-pref('zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) {
|
||||
& #navigator-toolbox {
|
||||
top: 0;
|
||||
@@ -337,7 +337,7 @@
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
|
||||
@media -moz-pref('zen.view.compact.color-toolbar') {
|
||||
background-attachment: fixed;
|
||||
background: var(--zen-main-browser-background-toolbar);
|
||||
background-size: 100% 2000px;
|
||||
|
@@ -56,7 +56,7 @@
|
||||
#tabbrowser-tabpanels:has(> [zen-split='true']),
|
||||
#zen-splitview-overlay {
|
||||
:root:not([zen-compact-mode='true']):not([customizing]) & {
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
@media -moz-pref('zen.view.compact.hide-toolbar') {
|
||||
& {
|
||||
margin-top: calc(var(--zen-split-column-gap) * -1);
|
||||
}
|
||||
|
@@ -61,7 +61,9 @@ tab-group[split-view-group] {
|
||||
|
||||
& .tab-content {
|
||||
min-width: 0;
|
||||
justify-content: unset !important;
|
||||
:root[zen-sidebar-expanded='true'] & {
|
||||
justify-content: unset !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,8 +122,7 @@ tab-group[split-view-group] .tabbrowser-tab {
|
||||
}
|
||||
|
||||
tab-group[split-view-group] .tab-group-label-container {
|
||||
display: none;
|
||||
width: 100%;
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
tab-group[split-view-group] .tab-close-button {
|
||||
|
@@ -296,7 +296,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media not (-moz-bool-pref: 'zen.theme.gradient.show-custom-colors') {
|
||||
@media not -moz-pref('zen.theme.gradient.show-custom-colors') {
|
||||
#PanelUI-zen-gradient-generator-custom-colors {
|
||||
display: none !important;
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.workspaces.hide-default-container-indicator') {
|
||||
@media -moz-pref('zen.workspaces.hide-default-container-indicator') {
|
||||
.tabbrowser-tab[zenDefaultUserContextId='true'] .tab-context-line {
|
||||
display: none !important;
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
@media not (-moz-bool-pref: 'zen.tabs.vertical') {
|
||||
@media not -moz-pref('zen.tabs.vertical') {
|
||||
:root #browser {
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
height: var(--zen-toolbar-height);
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.hide-window-controls') {
|
||||
@media -moz-pref('zen.view.hide-window-controls') {
|
||||
& {
|
||||
transition:
|
||||
height 0.15s ease,
|
||||
@@ -24,7 +24,7 @@ height: var(--zen-toolbar-height);
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.experimental-no-window-controls') {
|
||||
@media -moz-pref('zen.view.experimental-no-window-controls') {
|
||||
&:has(#PersonalToolbar[collapsed='true']) {
|
||||
max-height: 0 !important;
|
||||
overflow: hidden;
|
||||
|
@@ -19,7 +19,7 @@
|
||||
height: var(--zen-toolbar-height);
|
||||
}
|
||||
|
||||
@media (-moz-platform: macos) and (not (-moz-bool-pref: 'zen.view.mac.show-three-dot-menu')) {
|
||||
@media (-moz-platform: macos) and (not -moz-pref('zen.view.mac.show-three-dot-menu')) {
|
||||
&:not([customizing]) #PanelUI-button:not([open]):not([panelopen]) {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.tabs.vertical') {
|
||||
@media -moz-pref('zen.tabs.vertical') {
|
||||
:root:not([zen-window-buttons-reversed='true']) {
|
||||
& .titlebar-buttonbox-container {
|
||||
margin-left: auto;
|
||||
@@ -294,7 +294,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.tabs.dim-pending') {
|
||||
@media -moz-pref('zen.tabs.dim-pending') {
|
||||
&[pending='true'] .tab-icon-image {
|
||||
opacity: 0.5;
|
||||
}
|
||||
@@ -734,7 +734,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (-moz-bool-pref: 'zen.view.sidebar-collapsed.hide-mute-button') {
|
||||
@media -moz-pref('zen.view.sidebar-collapsed.hide-mute-button') {
|
||||
& .tab-icon-overlay:is([soundplaying], [muted]):not([selected]) {
|
||||
display: none !important;
|
||||
:is(
|
||||
@@ -992,7 +992,7 @@
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.tabs.show-newtab-vertical') {
|
||||
@media -moz-pref('zen.tabs.show-newtab-vertical') {
|
||||
#tabs-newtab-button {
|
||||
display: flex !important;
|
||||
transition: scale 0.1s ease;
|
||||
@@ -1018,11 +1018,11 @@
|
||||
--zen-colors-border: var(--zen-colors-tertiary);
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.show-newtab-button-top') {
|
||||
@media -moz-pref('zen.view.show-newtab-button-top') {
|
||||
order: -1;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.show-newtab-button-border-top') and (not (-moz-bool-pref: 'zen.view.show-newtab-button-top')) {
|
||||
@media -moz-pref('zen.view.show-newtab-button-border-top') and (not -moz-pref('zen.view.show-newtab-button-top')) {
|
||||
#tabbrowser-arrowscrollbox:has(tab:not([hidden])) & {
|
||||
margin-top: 15px;
|
||||
position: relative;
|
||||
@@ -1101,7 +1101,7 @@
|
||||
background: var(--tab-selected-bgcolor);
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.theme.essentials-favicon-bg') {
|
||||
@media -moz-pref('zen.theme.essentials-favicon-bg') {
|
||||
&[visuallyselected] > .tab-stack > .tab-background {
|
||||
&::after {
|
||||
content: "";
|
||||
|
@@ -163,7 +163,7 @@
|
||||
@media (-moz-windows-mica) or (-moz-platform: macos) {
|
||||
background: transparent;
|
||||
--zen-themed-toolbar-bg-transparent: transparent;
|
||||
@media (-moz-bool-pref: 'zen.widget.windows.acrylic') {
|
||||
@media -moz-pref('zen.widget.windows.acrylic') {
|
||||
--zen-themed-toolbar-bg-transparent: color-mix(in srgb, var(--zen-themed-toolbar-bg) 35%, transparent 65%);
|
||||
}
|
||||
}
|
||||
|
@@ -464,7 +464,7 @@ button.popup-notification-dropmarker {
|
||||
}
|
||||
}
|
||||
|
||||
@media not (-moz-bool-pref: 'zen.urlbar.show-protections-icon') {
|
||||
@media not -moz-pref('zen.urlbar.show-protections-icon') {
|
||||
#tracking-protection-icon-container {
|
||||
display: none !important;
|
||||
}
|
||||
|
@@ -483,7 +483,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator') {
|
||||
@media not -moz-pref('zen.workspaces.show-workspace-indicator') {
|
||||
#zen-current-workspace-indicator-container {
|
||||
display: none !important;
|
||||
}
|
||||
|
@@ -9,6 +9,8 @@
|
||||
document.addEventListener('TabUngrouped', this.#onTabUngrouped.bind(this));
|
||||
document.addEventListener('TabGroupRemoved', this.#onTabGroupRemoved.bind(this));
|
||||
document.addEventListener('TabGroupCreate', this.#onTabGroupCreate.bind(this));
|
||||
document.addEventListener('TabPinned', this.#onTabPinned.bind(this));
|
||||
document.addEventListener('TabUnpinned', this.#onTabUnpinned.bind(this));
|
||||
}
|
||||
|
||||
#onTabGrouped(event) {
|
||||
@@ -49,6 +51,22 @@
|
||||
|
||||
#onTabGroupRemoved(event) {}
|
||||
|
||||
#onTabPinned(event) {
|
||||
const tab = event.target;
|
||||
const group = tab.group;
|
||||
if (group && group.hasAttribute('split-view-group')) {
|
||||
group.pinned = true;
|
||||
}
|
||||
}
|
||||
|
||||
#onTabUnpinned(event) {
|
||||
const tab = event.target;
|
||||
const group = tab.group;
|
||||
if (group && group.hasAttribute('split-view-group')) {
|
||||
group.pinned = false;
|
||||
}
|
||||
}
|
||||
|
||||
expandGroupTabs(group) {
|
||||
for (const tab of group.tabs.reverse()) {
|
||||
gBrowser.ungroupTab(tab);
|
||||
|
@@ -61,7 +61,6 @@ class SplitNode extends SplitLeafNode {
|
||||
|
||||
class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
currentView = -1;
|
||||
canChangeTabOnHover = false;
|
||||
_data = [];
|
||||
_tabBrowserPanel = null;
|
||||
__modifierElement = null;
|
||||
@@ -78,7 +77,8 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
MAX_TABS = 4;
|
||||
|
||||
init() {
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, 'canChangeTabOnHover', 'zen.splitView.change-on-hover', false);
|
||||
this.handleTabEvent = this._handleTabEvent.bind(this);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, 'minResizeWidth', 'zen.splitView.min-resize-width', 7);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, '_edgeHoverSize', 'zen.splitView.rearrange-edge-hover-size', 24);
|
||||
|
||||
@@ -225,6 +225,14 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
this._hasAnimated = true;
|
||||
for (const tab of gBrowser.tabs) {
|
||||
tab.style.removeProperty('transform');
|
||||
if (tab.group) {
|
||||
tab.group.style.removeProperty('transform');
|
||||
}
|
||||
}
|
||||
// Add a min width to all the browser elements to prevent them from resizing
|
||||
for (const browser of gBrowser.browsers) {
|
||||
const width = browser.getBoundingClientRect().width;
|
||||
browser.style.minWidth = `${width}px`;
|
||||
}
|
||||
const panelsWidth = gBrowser.tabbox.getBoundingClientRect().width;
|
||||
const halfWidth = panelsWidth / 2;
|
||||
@@ -769,7 +777,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
this._removeHeader(container);
|
||||
this.resetContainerStyle(container);
|
||||
container.removeEventListener('mousedown', this.handleTabEvent);
|
||||
container.removeEventListener('mouseover', this.handleTabEvent);
|
||||
if (!forUnsplit) {
|
||||
tab.linkedBrowser.docShellIsActive = false;
|
||||
}
|
||||
@@ -994,6 +1001,10 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this._sessionRestoring) {
|
||||
return;
|
||||
}
|
||||
this.activateSplitView(splitData);
|
||||
}
|
||||
|
||||
@@ -1026,13 +1037,13 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
* Deactivates the split view.
|
||||
*/
|
||||
deactivateCurrentSplitView() {
|
||||
this.setTabsDocShellState(this._data[this.currentView].tabs, false);
|
||||
for (const tab of this._data[this.currentView].tabs) {
|
||||
const container = tab.linkedBrowser.closest('.browserSidebarContainer');
|
||||
this.resetContainerStyle(container);
|
||||
}
|
||||
this.removeSplitters();
|
||||
this.tabBrowserPanel.removeAttribute('zen-split-view');
|
||||
this.setTabsDocShellState(this._data[this.currentView].tabs, false);
|
||||
this.updateSplitViewButton(true);
|
||||
this.currentView = -1;
|
||||
this.toggleWrapperDisplay(false);
|
||||
@@ -1057,10 +1068,10 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
|
||||
this.tabBrowserPanel.setAttribute('zen-split-view', 'true');
|
||||
|
||||
this.setTabsDocShellState(splitData.tabs, true);
|
||||
this.updateSplitViewButton(false);
|
||||
this.applyGridToTabs(splitData.tabs);
|
||||
this.applyGridLayout(splitData.layoutTree);
|
||||
this.setTabsDocShellState(splitData.tabs, true);
|
||||
this.toggleWrapperDisplay(true);
|
||||
}
|
||||
|
||||
@@ -1152,7 +1163,9 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
const nodeRootPosition = splitNode.positionToRoot;
|
||||
if (!splitNode.children) {
|
||||
const browserContainer = splitNode.tab.linkedBrowser.closest('.browserSidebarContainer');
|
||||
browserContainer.style.inset = `${nodeRootPosition.top}% ${nodeRootPosition.right}% ${nodeRootPosition.bottom}% ${nodeRootPosition.left}%`;
|
||||
window.requestAnimationFrame(() => {
|
||||
browserContainer.style.inset = `${nodeRootPosition.top}% ${nodeRootPosition.right}% ${nodeRootPosition.bottom}% ${nodeRootPosition.left}%`;
|
||||
});
|
||||
this._tabToSplitNode.set(splitNode.tab, splitNode);
|
||||
return;
|
||||
}
|
||||
@@ -1183,11 +1196,13 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
|
||||
if (i < splittersNeeded) {
|
||||
const splitter = currentSplitters[i];
|
||||
if (splitNode.direction === 'column') {
|
||||
splitter.style.inset = `${100 - childRootPosition.bottom}% ${childRootPosition.right}% 0% ${childRootPosition.left}%`;
|
||||
} else {
|
||||
splitter.style.inset = `${childRootPosition.top}% 0% ${childRootPosition.bottom}% ${100 - childRootPosition.right}%`;
|
||||
}
|
||||
window.requestAnimationFrame(() => {
|
||||
if (splitNode.direction === 'column') {
|
||||
splitter.style.inset = `${100 - childRootPosition.bottom}% ${childRootPosition.right}% 0% ${childRootPosition.left}%`;
|
||||
} else {
|
||||
splitter.style.inset = `${childRootPosition.top}% 0% ${childRootPosition.bottom}% ${100 - childRootPosition.right}%`;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1247,9 +1262,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
* @param {Element} container - The container element.
|
||||
*/
|
||||
styleContainer(container) {
|
||||
container.setAttribute('zen-split-anim', 'true');
|
||||
container.addEventListener('mousedown', this.handleTabEvent);
|
||||
container.addEventListener('mouseover', this.handleTabEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1257,8 +1270,8 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
*
|
||||
* @param {Event} event - The event.
|
||||
*/
|
||||
handleTabEvent = (event) => {
|
||||
if (this.rearrangeViewEnabled || (event.type === 'mouseover' && !this.canChangeTabOnHover)) {
|
||||
_handleTabEvent = (event) => {
|
||||
if (this.rearrangeViewEnabled) {
|
||||
return;
|
||||
}
|
||||
const container = event.currentTarget.closest('.browserSidebarContainer');
|
||||
@@ -1346,8 +1359,8 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
browser.addEventListener('dragstart', this.onBrowserDragStart);
|
||||
browser.addEventListener('dragend', this.onBrowserDragEnd);
|
||||
} else {
|
||||
browser.removeAttribute('zen-split');
|
||||
browser.removeAttribute('style');
|
||||
// browser.removeAttribute('zen-split');
|
||||
// browser.removeAttribute('style');
|
||||
|
||||
browser.removeEventListener('dragstart', this.onBrowserDragStart);
|
||||
browser.removeEventListener('dragend', this.onBrowserDragEnd);
|
||||
@@ -1537,6 +1550,9 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
gBrowser.selectedTab = this._draggingTab;
|
||||
this._draggingTab = null;
|
||||
}
|
||||
for (const browser of gBrowser.browsers) {
|
||||
browser.removeAttribute('style');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1755,7 +1771,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
}
|
||||
|
||||
onAfterWorkspaceSessionRestore() {
|
||||
if (this.currentView >= 0) {
|
||||
if (this.currentView >= 0 && !gBrowser.selectedTab.pinned) {
|
||||
// Activate all browsers in the split view
|
||||
this.currentView = -1;
|
||||
this.onLocationChange(gBrowser.selectedTab.linkedBrowser);
|
||||
|
@@ -1,19 +1,20 @@
|
||||
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
|
||||
index b888a753a7f23a9800fe04da51a4e6b898314ff2..a6a01cf035253b05ea7b20b434cf2002ff115d96 100644
|
||||
index b8b6d30f0b3c968a8615ca601e06e50261d0dae6..5c2b718b902aed2ef8d7a4b622ba882ee937c655 100644
|
||||
--- a/browser/components/BrowserGlue.sys.mjs
|
||||
+++ b/browser/components/BrowserGlue.sys.mjs
|
||||
@@ -121,6 +121,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -106,6 +106,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
WindowsGPOParser: "resource://gre/modules/policies/WindowsGPOParser.sys.mjs",
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
+ gZenUIMigration: "chrome://browser/content/zen-components/ZenUIMigration.mjs",
|
||||
});
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
@@ -1951,6 +1952,7 @@ BrowserGlue.prototype = {
|
||||
|
||||
lazy.UrlbarPrefs.updateFirefoxSuggestScenario();
|
||||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||
@@ -1896,7 +1897,7 @@ BrowserGlue.prototype = {
|
||||
lazy.TabCrashHandler.init();
|
||||
|
||||
lazy.ProcessHangMonitor.init();
|
||||
-
|
||||
+ lazy.gZenUIMigration.init(this._isNewProfile, aWindow);
|
||||
// A channel for "remote troubleshooting" code...
|
||||
let channel = new lazy.WebChannel(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded349732ffc6 100644
|
||||
index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..20248e5c0e38d4de3349687157b6aeb40339488d 100644
|
||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -90,7 +90,27 @@ index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded34
|
||||
} else {
|
||||
window.gNavToolbox.palette.appendChild(widgetNode);
|
||||
}
|
||||
@@ -2678,7 +2677,6 @@ var CustomizableUIInternal = {
|
||||
@@ -1704,16 +1703,16 @@ var CustomizableUIInternal = {
|
||||
elem.setAttribute("skipintoolbarset", "true");
|
||||
}
|
||||
}
|
||||
-
|
||||
+ lazy.ZenCustomizableUI.init(aWindow);
|
||||
// Now register all the toolbars
|
||||
for (let area of CustomizableUI.areas) {
|
||||
let type = CustomizableUI.getAreaType(area);
|
||||
- if (type == CustomizableUI.TYPE_TOOLBAR) {
|
||||
+ if (type == CustomizableUI.TYPE_TOOLBAR && !area.startsWith("zen-")) {
|
||||
let node = document.getElementById(area);
|
||||
this.registerToolbarNode(node);
|
||||
}
|
||||
}
|
||||
-
|
||||
+ lazy.ZenCustomizableUI.registerToolbarNodes(aWindow);
|
||||
// Handle initial state of vertical tabs.
|
||||
if (isVerticalTabs) {
|
||||
// Show the vertical tabs toolbar
|
||||
@@ -2744,7 +2743,6 @@ var CustomizableUIInternal = {
|
||||
if (!this.isWidgetRemovable(aWidgetId)) {
|
||||
return;
|
||||
}
|
||||
@@ -98,7 +118,7 @@ index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded34
|
||||
let placements = gPlacements.get(oldPlacement.area);
|
||||
let position = placements.indexOf(aWidgetId);
|
||||
if (position != -1) {
|
||||
@@ -3669,7 +3667,7 @@ var CustomizableUIInternal = {
|
||||
@@ -3735,7 +3733,7 @@ var CustomizableUIInternal = {
|
||||
}
|
||||
},
|
||||
|
||||
@@ -107,7 +127,7 @@ index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded34
|
||||
for (let [areaId, areaNodes] of gBuildAreas) {
|
||||
let placements = gPlacements.get(areaId);
|
||||
let isFirstChangedToolbar = true;
|
||||
@@ -3680,7 +3678,7 @@ var CustomizableUIInternal = {
|
||||
@@ -3746,7 +3744,7 @@ var CustomizableUIInternal = {
|
||||
if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
|
||||
let defaultCollapsed = area.get("defaultCollapsed");
|
||||
let win = areaNode.ownerGlobal;
|
||||
@@ -116,7 +136,7 @@ index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded34
|
||||
win.setToolbarVisibility(
|
||||
areaNode,
|
||||
typeof defaultCollapsed == "string"
|
||||
@@ -4857,6 +4855,7 @@ export var CustomizableUI = {
|
||||
@@ -4923,6 +4921,7 @@ export var CustomizableUI = {
|
||||
unregisterArea(aName, aDestroyPlacements) {
|
||||
CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);
|
||||
},
|
||||
@@ -124,7 +144,7 @@ index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded34
|
||||
/**
|
||||
* Add a widget to an area.
|
||||
* If the area to which you try to add is not known to CustomizableUI,
|
||||
@@ -6840,11 +6839,11 @@ class OverflowableToolbar {
|
||||
@@ -6916,11 +6915,11 @@ class OverflowableToolbar {
|
||||
parseFloat(style.paddingLeft) -
|
||||
parseFloat(style.paddingRight) -
|
||||
toolbarChildrenWidth;
|
||||
@@ -138,7 +158,7 @@ index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded34
|
||||
});
|
||||
|
||||
lazy.log.debug(
|
||||
@@ -6854,7 +6853,8 @@ class OverflowableToolbar {
|
||||
@@ -6930,7 +6929,8 @@ class OverflowableToolbar {
|
||||
// If the target has min-width: 0, their children might actually overflow
|
||||
// it, so check for both cases explicitly.
|
||||
let targetContentWidth = Math.max(targetWidth, targetChildrenWidth);
|
||||
@@ -148,7 +168,7 @@ index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded34
|
||||
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
||||
}
|
||||
|
||||
@@ -6948,7 +6948,7 @@ class OverflowableToolbar {
|
||||
@@ -7024,7 +7024,7 @@ class OverflowableToolbar {
|
||||
}
|
||||
}
|
||||
if (!inserted) {
|
||||
@@ -157,7 +177,7 @@ index 8eab0f9181c19c68a0a2daf0f819b3ae82ed92bc..092107b377ec4f7bc9ae86c817cded34
|
||||
}
|
||||
child.removeAttribute("cui-anchorid");
|
||||
child.removeAttribute("overflowedItem");
|
||||
@@ -7110,6 +7110,9 @@ class OverflowableToolbar {
|
||||
@@ -7186,6 +7186,9 @@ class OverflowableToolbar {
|
||||
* @param {MouseEvent} aEvent the click event.
|
||||
*/
|
||||
#onClickDefaultListButton(aEvent) {
|
||||
|
@@ -1,22 +1,13 @@
|
||||
diff --git a/browser/components/customizableui/ToolbarContextMenu.sys.mjs b/browser/components/customizableui/ToolbarContextMenu.sys.mjs
|
||||
index 9879487f9ed9ddf825f5fb5c1467ddbd7fbe7a32..9e2565fafe0f5f9afa6065c9f4f522fec745db2a 100644
|
||||
index af22f766a052372a68faca139161cccbf0d768f0..ceff0576321f880c71ce301e537f4d03ccca8a73 100644
|
||||
--- a/browser/components/customizableui/ToolbarContextMenu.sys.mjs
|
||||
+++ b/browser/components/customizableui/ToolbarContextMenu.sys.mjs
|
||||
@@ -237,17 +237,6 @@ export var ToolbarContextMenu = {
|
||||
// autohide item's checked state to mirror the autohide pref.
|
||||
showFullScreenViewContextMenuItems(popup);
|
||||
|
||||
- let toggleVerticalTabsItem = document.getElementById(
|
||||
- "toolbar-context-toggle-vertical-tabs"
|
||||
- );
|
||||
- document.l10n.setAttributes(
|
||||
- toggleVerticalTabsItem,
|
||||
- gBrowser.tabContainer?.verticalMode
|
||||
- ? "toolbar-context-turn-off-vertical-tabs"
|
||||
- : "toolbar-context-turn-on-vertical-tabs"
|
||||
- );
|
||||
- document.getElementById("toolbar-context-customize-sidebar").hidden =
|
||||
- !gBrowser.tabContainer?.verticalMode;
|
||||
|
||||
// View -> Toolbars menu doesn't have the moveToPanel or removeFromToolbar items.
|
||||
if (!moveToPanel || !removeFromToolbar) {
|
||||
@@ -241,7 +241,7 @@ export var ToolbarContextMenu = {
|
||||
let sidebarRevampEnabled = Services.prefs.getBoolPref("sidebar.revamp");
|
||||
let showSidebarActions =
|
||||
["tabbrowser-tabs", "sidebar-button"].includes(toolbarItem?.id) ||
|
||||
- toolbarItem?.localName == "toolbarspring";
|
||||
+ toolbarItem?.localName == "toolbarspring" && false;
|
||||
let toggleVerticalTabsItem = document.getElementById(
|
||||
"toolbar-context-toggle-vertical-tabs"
|
||||
);
|
||||
|
@@ -1,13 +0,0 @@
|
||||
diff --git a/browser/components/newtab/content-src/components/CustomizeMenu/ContentSection/ContentSection.jsx b/browser/components/newtab/content-src/components/CustomizeMenu/ContentSection/ContentSection.jsx
|
||||
index 57ed935e93198bb50555d119080552934c49e428..21e8fb35501091d448502dbd0c53ee01ce8b7bc0 100644
|
||||
--- a/browser/components/newtab/content-src/components/CustomizeMenu/ContentSection/ContentSection.jsx
|
||||
+++ b/browser/components/newtab/content-src/components/CustomizeMenu/ContentSection/ContentSection.jsx
|
||||
@@ -153,7 +153,7 @@ export class ContentSection extends React.PureComponent {
|
||||
data-l10n-args='{"num": 4}'
|
||||
/>
|
||||
</select>
|
||||
- {mayHaveSponsoredTopSites && (
|
||||
+ {false && (
|
||||
<div className="check-wrapper" role="presentation">
|
||||
<input
|
||||
id="sponsored-shortcuts"
|
@@ -1,12 +0,0 @@
|
||||
diff --git a/browser/components/newtab/data/content/abouthomecache/page.html.template b/browser/components/newtab/data/content/abouthomecache/page.html.template
|
||||
index 60898ed6b82ec298198cb9529387f4efd8561cc1..fbd93ccc7ee3619415192164a55f5fcbfd387a51 100644
|
||||
--- a/browser/components/newtab/data/content/abouthomecache/page.html.template
|
||||
+++ b/browser/components/newtab/data/content/abouthomecache/page.html.template
|
||||
@@ -32,6 +32,7 @@
|
||||
<link rel="stylesheet" href="chrome://global/skin/design-system/tokens-brand.css">
|
||||
<link rel="stylesheet" href="chrome://browser/content/contentSearchUI.css" />
|
||||
<link rel="stylesheet" href="chrome://activity-stream/content/css/activity-stream.css" />
|
||||
+ <script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
<!-- Cached: {{ CACHE_TIME }} -->
|
||||
<body class="activity-stream">
|
@@ -1,13 +0,0 @@
|
||||
diff --git a/browser/components/newtab/lib/ActivityStream.sys.mjs b/browser/components/newtab/lib/ActivityStream.sys.mjs
|
||||
index f46e8aadf053c1a567642cda5f728534c81c8223..9ba13e5988a1fbcbc0502bba46fe6cfa3c647d85 100644
|
||||
--- a/browser/components/newtab/lib/ActivityStream.sys.mjs
|
||||
+++ b/browser/components/newtab/lib/ActivityStream.sys.mjs
|
||||
@@ -127,7 +127,7 @@ export const PREFS_CONFIG = new Map([
|
||||
"showSponsoredTopSites",
|
||||
{
|
||||
title: "Show sponsored top sites",
|
||||
- value: true,
|
||||
+ value: false,
|
||||
},
|
||||
],
|
||||
[
|
@@ -1,10 +1,10 @@
|
||||
diff --git a/browser/components/places/jar.mn b/browser/components/places/jar.mn
|
||||
index 7334914664484267ccf80eeeb2917c2001a1acaf..e0636a13798d6fbf41cbf69e51e460822b00ab1a 100644
|
||||
index e12c6bbf449f062fd22ef260909b539857f52c6a..2dcc143109de015e4c9d486b83119ae1122d2e71 100644
|
||||
--- a/browser/components/places/jar.mn
|
||||
+++ b/browser/components/places/jar.mn
|
||||
@@ -25,3 +25,5 @@ browser.jar:
|
||||
content/browser/places/interactionsViewer.css (metadataViewer/interactionsViewer.css)
|
||||
content/browser/places/interactionsViewer.html (metadataViewer/interactionsViewer.html)
|
||||
content/browser/places/interactionsViewer.js (metadataViewer/interactionsViewer.js)
|
||||
#endif
|
||||
+ content/browser/places/zenNewWebPanel.xhtml (content/zenNewWebPanel.xhtml)
|
||||
+ content/browser/places/zenNewWebPanel.js (content/zenNewWebPanel.js)
|
||||
|
@@ -949,11 +949,6 @@ Preferences.addAll([
|
||||
type: 'bool',
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
id: 'zen.splitView.change-on-hover',
|
||||
type: 'bool',
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
id: 'zen.tab-unloader.timeout-minutes',
|
||||
type: 'int',
|
||||
|
@@ -208,20 +208,4 @@
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<hbox id="zenSplitViewCategory"
|
||||
class="subcategory"
|
||||
hidden="true"
|
||||
data-category="paneZenLooks">
|
||||
<html:h1 data-l10n-id="zen-split-view-title"/>
|
||||
</hbox>
|
||||
|
||||
<groupbox id="zenSplitViewGroup" data-category="paneZenLooks" hidden="true" class="highlighting-group">
|
||||
<label><html:h2 data-l10n-id="zen-split-view-header"/></label>
|
||||
<description class="description-deemphasized" data-l10n-id="zen-split-view-description" />
|
||||
|
||||
<checkbox id="zenLooksAndFeelSplitViewChangeOnHover"
|
||||
data-l10n-id="zen-split-view-change-on-hover"
|
||||
preference="zen.splitView.change-on-hover"/>
|
||||
</groupbox>
|
||||
|
||||
</html:template>
|
||||
|
@@ -1,14 +1,14 @@
|
||||
diff --git a/browser/components/sessionstore/TabGroupState.sys.mjs b/browser/components/sessionstore/TabGroupState.sys.mjs
|
||||
index 2406837c67d8ff590aa0db6c75ede81e53097506..b69fb7862cd76c891ef61e29aca8c10bab2f5d7e 100644
|
||||
index 934326aefc80479a2ca2ee9e376375f117512b4d..db840ead9ab53849f8f1f33864972347d43f9398 100644
|
||||
--- a/browser/components/sessionstore/TabGroupState.sys.mjs
|
||||
+++ b/browser/components/sessionstore/TabGroupState.sys.mjs
|
||||
@@ -66,6 +66,9 @@ class _TabGroupState {
|
||||
name: tabGroup.label,
|
||||
color: tabGroup.color,
|
||||
collapsed: tabGroup.collapsed,
|
||||
@@ -62,6 +62,9 @@ class _TabGroupState {
|
||||
*/
|
||||
collect(tabGroup) {
|
||||
return {
|
||||
+ pinned: tabGroup.pinned,
|
||||
+ essential: tabGroup.essential,
|
||||
+ splitView: tabGroup.hasAttribute("split-view-group"),
|
||||
};
|
||||
}
|
||||
|
||||
id: tabGroup.id,
|
||||
name: tabGroup.label,
|
||||
color: tabGroup.color,
|
||||
|
@@ -1,22 +1,13 @@
|
||||
diff --git a/browser/components/sidebar/browser-sidebar.js b/browser/components/sidebar/browser-sidebar.js
|
||||
index 1937a01b9940c79782cc2ad002b09ea5938b89e0..a702e8c520fad651a98615215f94657b7e1c58eb 100644
|
||||
index 371190c058fa1eed91dc91b58608c934100e3a1b..440fe6fb403c3e78b3bfe68fb747d000b4a27521 100644
|
||||
--- a/browser/components/sidebar/browser-sidebar.js
|
||||
+++ b/browser/components/sidebar/browser-sidebar.js
|
||||
@@ -671,7 +671,7 @@ var SidebarController = {
|
||||
*/
|
||||
setPosition() {
|
||||
// First reset all ordinals to match DOM ordering.
|
||||
- let browser = document.getElementById("browser");
|
||||
+ let browser = document.getElementById("tabbrowser-tabbox");
|
||||
[...browser.children].forEach((node, i) => {
|
||||
node.style.order = i + 1;
|
||||
});
|
||||
@@ -681,7 +681,7 @@ var SidebarController = {
|
||||
// DOM ordering is: sidebar-main | launcher-splitter | sidebar-box | splitter | tabbrowser-tabbox |
|
||||
// Want to display as: | tabbrowser-tabbox | splitter | sidebar-box | launcher-splitter | sidebar-main
|
||||
// So we just swap box and tabbrowser-tabbox ordering and move sidebar-main to the end
|
||||
- let tabbox = document.getElementById("tabbrowser-tabbox");
|
||||
+ let tabbox = document.getElementById("tabbrowser-tabpanels");
|
||||
let boxOrdinal = this._box.style.order;
|
||||
this._box.style.order = tabbox.style.order;
|
||||
|
||||
@@ -718,7 +718,7 @@ var SidebarController = {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
- let browser = document.getElementById("browser");
|
||||
+ let browser = document.getElementById("tabbrowser-tabbox");
|
||||
[...browser.children].forEach((node, i) => {
|
||||
node.style.order = i + 1;
|
||||
});
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7409d0582 100644
|
||||
index 5f406ea5d09273c9b70b84eee24c6267f88692f8..82926278b2f71b8251b06bde6f62bcdc885cb760 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -412,11 +412,50 @@
|
||||
@@ -424,11 +424,67 @@
|
||||
return this.tabContainer.visibleTabs;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,23 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
+ get _numVisiblePinTabsWithoutCollapsed() {
|
||||
+ let i = 0;
|
||||
+ for (let item of this.tabContainer.ariaFocusableItems) {
|
||||
+ if (!!item?.classList?.contains("tab-group-label") && item.closest("tab-group").pinned) {
|
||||
+ i += 1;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (!item.pinned && !item.hasAttribute("zen-glance-tab")) {
|
||||
+ break;
|
||||
+ }
|
||||
+ if ((!item.group?.hasAttribute("split-view-group") && !item.group?.collapsed) && !item.hidden) {
|
||||
+ i += !item.hasAttribute("zen-glance-tab");
|
||||
+ }
|
||||
+ }
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
+ get _numZenEssentials() {
|
||||
+ let i = 0;
|
||||
+ for (let tab of this.tabs) {
|
||||
@@ -55,7 +72,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
}
|
||||
return i;
|
||||
}
|
||||
@@ -546,6 +585,7 @@
|
||||
@@ -558,6 +614,7 @@
|
||||
this.tabpanels.appendChild(panel);
|
||||
|
||||
let tab = this.tabs[0];
|
||||
@@ -63,16 +80,15 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
tab.linkedPanel = uniqueId;
|
||||
this._selectedTab = tab;
|
||||
this._selectedBrowser = browser;
|
||||
@@ -811,12 +851,13 @@
|
||||
@@ -823,11 +880,13 @@
|
||||
}
|
||||
|
||||
this.showTab(aTab);
|
||||
- this.ungroupTab(aTab);
|
||||
- if (this.tabContainer.verticalMode) {
|
||||
+ const handled = gZenFolders.handleTabPin(aTab);
|
||||
+ if (!handled) this.ungroupTab(aTab);
|
||||
+ if (this.tabContainer.verticalMode && !handled) {
|
||||
this._handleTabMove(aTab, () =>
|
||||
this.#handleTabMove(aTab, () =>
|
||||
- this.verticalPinnedTabsContainer.appendChild(aTab)
|
||||
+ aTab.hasAttribute("zen-essential") ? document.getElementById("zen-essentials-container").appendChild(aTab) : this.verticalPinnedTabsContainer.insertBefore(aTab, this.verticalPinnedTabsContainer.lastChild)
|
||||
);
|
||||
@@ -81,12 +97,12 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
this.moveTabTo(aTab, this.pinnedTabCount, { forceStandaloneTab: true });
|
||||
}
|
||||
aTab.setAttribute("pinned", "true");
|
||||
@@ -830,12 +871,15 @@
|
||||
@@ -841,12 +900,15 @@
|
||||
}
|
||||
|
||||
if (this.tabContainer.verticalMode) {
|
||||
+ const handled = gZenFolders.handleTabUnpin(aTab);
|
||||
this._handleTabMove(aTab, () => {
|
||||
this.#handleTabMove(aTab, () => {
|
||||
// we remove this attribute first, so that allTabs represents
|
||||
// the moving of a tab from the vertical pinned tabs container
|
||||
// and back into arrowscrollbox.
|
||||
@@ -98,7 +114,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
});
|
||||
} else {
|
||||
this.moveTabTo(aTab, this.pinnedTabCount - 1, {
|
||||
@@ -1018,6 +1062,8 @@
|
||||
@@ -1029,6 +1091,8 @@
|
||||
|
||||
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
|
||||
|
||||
@@ -107,7 +123,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (
|
||||
aIconURL &&
|
||||
!aLoadingPrincipal &&
|
||||
@@ -1028,6 +1074,9 @@
|
||||
@@ -1039,6 +1103,9 @@
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -117,7 +133,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
|
||||
let browser = this.getBrowserForTab(aTab);
|
||||
browser.mIconURL = aIconURL;
|
||||
@@ -1273,6 +1322,7 @@
|
||||
@@ -1287,6 +1354,7 @@
|
||||
if (!this._previewMode) {
|
||||
newTab.recordTimeFromUnloadToReload();
|
||||
newTab.updateLastAccessed();
|
||||
@@ -125,7 +141,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
oldTab.updateLastAccessed();
|
||||
// if this is the foreground window, update the last-seen timestamps.
|
||||
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
|
||||
@@ -1425,6 +1475,9 @@
|
||||
@@ -1439,6 +1507,9 @@
|
||||
}
|
||||
|
||||
let activeEl = document.activeElement;
|
||||
@@ -135,7 +151,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
// If focus is on the old tab, move it to the new tab.
|
||||
if (activeEl == oldTab) {
|
||||
newTab.focus();
|
||||
@@ -1748,7 +1801,7 @@
|
||||
@@ -1762,7 +1833,7 @@
|
||||
}
|
||||
|
||||
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
|
||||
@@ -144,7 +160,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1851,7 +1904,7 @@
|
||||
@@ -1865,7 +1936,7 @@
|
||||
newIndex = this.selectedTab._tPos + 1;
|
||||
}
|
||||
|
||||
@@ -153,7 +169,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
let browser;
|
||||
if (targetTab) {
|
||||
browser = this.getBrowserForTab(targetTab);
|
||||
@@ -2108,6 +2161,7 @@
|
||||
@@ -2122,6 +2193,7 @@
|
||||
uriIsAboutBlank,
|
||||
userContextId,
|
||||
skipLoad,
|
||||
@@ -161,7 +177,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
} = {}) {
|
||||
let b = document.createXULElement("browser");
|
||||
// Use the JSM global to create the permanentKey, so that if the
|
||||
@@ -2181,8 +2235,7 @@
|
||||
@@ -2195,8 +2267,7 @@
|
||||
// we use a different attribute name for this?
|
||||
b.setAttribute("name", name);
|
||||
}
|
||||
@@ -171,7 +187,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
b.setAttribute("transparent", "true");
|
||||
}
|
||||
|
||||
@@ -2347,7 +2400,7 @@
|
||||
@@ -2373,7 +2444,7 @@
|
||||
|
||||
let panel = this.getPanel(browser);
|
||||
let uniqueId = this._generateUniquePanelID();
|
||||
@@ -180,7 +196,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
aTab.linkedPanel = uniqueId;
|
||||
|
||||
// Inject the <browser> into the DOM if necessary.
|
||||
@@ -2406,8 +2459,8 @@
|
||||
@@ -2432,8 +2503,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) {
|
||||
@@ -191,7 +207,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
} else {
|
||||
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
||||
}
|
||||
@@ -2629,6 +2682,7 @@
|
||||
@@ -2655,6 +2726,7 @@
|
||||
schemelessInput,
|
||||
hasValidUserGestureActivation = false,
|
||||
textDirectiveUserActivation = false,
|
||||
@@ -199,7 +215,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
} = {}
|
||||
) {
|
||||
// all callers of addTab that pass a params object need to pass
|
||||
@@ -2639,6 +2693,12 @@
|
||||
@@ -2665,6 +2737,12 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -212,7 +228,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (!UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.start("browser.tabs.opening", "initting", window);
|
||||
}
|
||||
@@ -2702,6 +2762,15 @@
|
||||
@@ -2728,6 +2806,15 @@
|
||||
noInitialLabel,
|
||||
skipBackgroundNotify,
|
||||
});
|
||||
@@ -228,7 +244,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (insertTab) {
|
||||
// insert the tab into the tab container in the correct position
|
||||
this._insertTabAtIndex(t, {
|
||||
@@ -2726,6 +2795,7 @@
|
||||
@@ -2752,6 +2839,7 @@
|
||||
initialBrowsingContextGroupId,
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
@@ -236,7 +252,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
}));
|
||||
|
||||
if (focusUrlBar) {
|
||||
@@ -2845,6 +2915,9 @@
|
||||
@@ -2871,6 +2959,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +262,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this._notifyPinnedStatus(t);
|
||||
@@ -2865,12 +2938,15 @@
|
||||
@@ -2891,12 +2982,15 @@
|
||||
* @param {string} [label=]
|
||||
* @returns {MozTabbrowserTabGroup}
|
||||
*/
|
||||
@@ -263,15 +279,15 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
return group;
|
||||
}
|
||||
|
||||
@@ -2904,6 +2980,7 @@
|
||||
label = "",
|
||||
@@ -2937,6 +3031,7 @@
|
||||
insertBefore = null,
|
||||
showCreateUI = false,
|
||||
isUserCreated = false,
|
||||
telemetryUserCreateSource = "unknown",
|
||||
+ forSplitView = false,
|
||||
} = {}
|
||||
) {
|
||||
if (!tabs?.length) {
|
||||
@@ -2918,7 +2995,12 @@
|
||||
@@ -2951,7 +3046,12 @@
|
||||
id = `${Date.now()}-${Math.round(Math.random() * 100)}`;
|
||||
}
|
||||
let group = this._createTabGroup(id, color, false, label);
|
||||
@@ -285,7 +301,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
group,
|
||||
insertBefore?.group ?? insertBefore
|
||||
);
|
||||
@@ -3126,6 +3208,7 @@
|
||||
@@ -3268,6 +3368,7 @@
|
||||
initialBrowsingContextGroupId,
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
@@ -293,7 +309,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
}
|
||||
) {
|
||||
// If we don't have a preferred remote type, and we have a remote
|
||||
@@ -3189,6 +3272,7 @@
|
||||
@@ -3331,6 +3432,7 @@
|
||||
openWindowInfo,
|
||||
name,
|
||||
skipLoad,
|
||||
@@ -301,7 +317,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3367,6 +3451,27 @@
|
||||
@@ -3509,6 +3611,27 @@
|
||||
) {
|
||||
tabWasReused = true;
|
||||
tab = this.selectedTab;
|
||||
@@ -329,7 +345,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (!tabData.pinned) {
|
||||
this.unpinTab(tab);
|
||||
} else {
|
||||
@@ -3380,6 +3485,7 @@
|
||||
@@ -3522,6 +3645,7 @@
|
||||
restoreTabsLazily && !select && !tabData.pinned;
|
||||
|
||||
let url = "about:blank";
|
||||
@@ -337,7 +353,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (tabData.entries?.length) {
|
||||
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
||||
// Ensure the index is in bounds.
|
||||
@@ -3415,7 +3521,27 @@
|
||||
@@ -3557,7 +3681,27 @@
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
});
|
||||
@@ -366,7 +382,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -3428,8 +3554,8 @@
|
||||
@@ -3570,8 +3714,8 @@
|
||||
// inserted in the DOM. If the tab is not yet in the DOM,
|
||||
// just insert it in the right place from the start.
|
||||
if (!tab.parentNode) {
|
||||
@@ -377,7 +393,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
tab.toggleAttribute("pinned", true);
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
// Then ensure all the tab open/pinning information is sent.
|
||||
@@ -3439,7 +3565,8 @@
|
||||
@@ -3581,7 +3725,8 @@
|
||||
// needs calling:
|
||||
shouldUpdateForPinnedTabs = true;
|
||||
}
|
||||
@@ -387,7 +403,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
let { groupId } = tabData;
|
||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||
// if a tab refers to a tab group we don't know, skip any group
|
||||
@@ -3453,7 +3580,10 @@
|
||||
@@ -3595,7 +3740,10 @@
|
||||
tabGroup.stateData.id,
|
||||
tabGroup.stateData.color,
|
||||
tabGroup.stateData.collapsed,
|
||||
@@ -399,7 +415,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
);
|
||||
tabsFragment.appendChild(tabGroup.node);
|
||||
}
|
||||
@@ -3504,6 +3634,9 @@
|
||||
@@ -3646,6 +3794,9 @@
|
||||
this.selectedTab = tabToSelect;
|
||||
this.removeTab(leftoverTab);
|
||||
}
|
||||
@@ -409,7 +425,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
this._updateTabsAfterInsert();
|
||||
@@ -3693,7 +3826,7 @@
|
||||
@@ -3830,7 +3981,7 @@
|
||||
// Ensure we have an index if one was not provided.
|
||||
if (typeof index != "number") {
|
||||
// Move the new tab after another tab if needed, to the end otherwise.
|
||||
@@ -418,7 +434,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -3736,18 +3869,18 @@
|
||||
@@ -3876,18 +4027,18 @@
|
||||
|
||||
// Ensure index is within bounds.
|
||||
if (tab.pinned) {
|
||||
@@ -441,7 +457,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (tabAfter && tabAfter.group == tabGroup) {
|
||||
// Place at the front of, or between tabs in, the same tab group
|
||||
this.tabContainer.insertBefore(tab, tabAfter);
|
||||
@@ -4059,6 +4192,9 @@
|
||||
@@ -4199,6 +4350,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -451,7 +467,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
this.removeTabs(selectedTabs);
|
||||
}
|
||||
|
||||
@@ -4391,6 +4527,7 @@
|
||||
@@ -4556,6 +4710,7 @@
|
||||
skipSessionStore,
|
||||
} = {}
|
||||
) {
|
||||
@@ -459,7 +475,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.finish("browser.tabs.opening", window);
|
||||
}
|
||||
@@ -4407,6 +4544,12 @@
|
||||
@@ -4572,6 +4727,12 @@
|
||||
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||
}
|
||||
|
||||
@@ -472,7 +488,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
// Handle requests for synchronously removing an already
|
||||
// asynchronously closing tab.
|
||||
if (!animate && aTab.closing) {
|
||||
@@ -4421,7 +4564,9 @@
|
||||
@@ -4586,7 +4747,9 @@
|
||||
// frame created for it (for example, by updating the visually selected
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
@@ -483,7 +499,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -4435,7 +4580,6 @@
|
||||
@@ -4600,7 +4763,6 @@
|
||||
TelemetryStopwatch.cancel("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||
return;
|
||||
}
|
||||
@@ -491,7 +507,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
let lockTabSizing =
|
||||
!this.tabContainer.verticalMode &&
|
||||
!aTab.pinned &&
|
||||
@@ -4574,14 +4718,14 @@
|
||||
@@ -4739,14 +4901,14 @@
|
||||
!!this.tabsInCollapsedTabGroups.length;
|
||||
if (
|
||||
aTab.visible &&
|
||||
@@ -508,7 +524,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -4605,6 +4749,7 @@
|
||||
@@ -4770,6 +4932,7 @@
|
||||
|
||||
newTab = true;
|
||||
}
|
||||
@@ -516,7 +532,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||
|
||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||
@@ -4645,9 +4790,7 @@
|
||||
@@ -4810,9 +4973,7 @@
|
||||
aTab._mouseleave();
|
||||
|
||||
if (newTab) {
|
||||
@@ -527,7 +543,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
} else {
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -4776,6 +4919,8 @@
|
||||
@@ -4941,6 +5102,8 @@
|
||||
this.tabs[i]._tPos = i;
|
||||
}
|
||||
|
||||
@@ -536,7 +552,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (!this._windowIsClosing) {
|
||||
if (wasPinned) {
|
||||
this.tabContainer._positionPinnedTabs();
|
||||
@@ -4994,7 +5139,7 @@
|
||||
@@ -5159,7 +5322,7 @@
|
||||
!excludeTabs.has(aTab.owner) &&
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||
) {
|
||||
@@ -545,7 +561,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
}
|
||||
|
||||
// Try to find a remaining tab that comes after the given tab
|
||||
@@ -5016,7 +5161,7 @@
|
||||
@@ -5181,7 +5344,7 @@
|
||||
}
|
||||
|
||||
if (tab) {
|
||||
@@ -554,7 +570,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
}
|
||||
|
||||
// If no qualifying visible tab was found, see if there is a tab in
|
||||
@@ -5434,10 +5579,10 @@
|
||||
@@ -5599,10 +5762,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -567,8 +583,8 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -5675,7 +5820,7 @@
|
||||
|
||||
@@ -5838,7 +6001,7 @@
|
||||
moveTabTo(aTab, aIndex, { forceStandaloneTab = false } = {}) {
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (aTab.pinned) {
|
||||
- aIndex = Math.min(aIndex, this.pinnedTabCount - 1);
|
||||
@@ -576,16 +592,16 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
} else {
|
||||
aIndex = Math.max(aIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -5685,10 +5830,17 @@
|
||||
@@ -5848,10 +6011,17 @@
|
||||
|
||||
this._handleTabMove(aTab, () => {
|
||||
this.#handleTabMove(aTab, () => {
|
||||
let neighbor = this.tabs[aIndex];
|
||||
- if (forceStandaloneTab && neighbor.group) {
|
||||
+ const _tPos = aTab._tPos;
|
||||
+ if ((forceStandaloneTab && neighbor.group) || neighbor.group?.hasAttribute("split-view-group")) {
|
||||
neighbor = neighbor.group;
|
||||
}
|
||||
- if (neighbor && aIndex >= aTab._tPos) {
|
||||
- if (neighbor && aIndex > aTab._tPos) {
|
||||
+ if (aTab.group?.hasAttribute("split-view-group")) {
|
||||
+ aTab = aTab.group;
|
||||
+ }
|
||||
@@ -596,7 +612,31 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
neighbor.after(aTab);
|
||||
} else {
|
||||
this.tabContainer.insertBefore(aTab, neighbor);
|
||||
@@ -5697,7 +5849,7 @@
|
||||
@@ -5901,13 +6071,22 @@
|
||||
* Bug 1955388 - prevent pinned tabs from commingling with non-pinned tabs
|
||||
* when there are hidden tabs present
|
||||
*/
|
||||
+ if (tab.group?.hasAttribute("split-view-group")) {
|
||||
+ tab = tab.group;
|
||||
+ }
|
||||
+
|
||||
if (tab.pinned && !targetElement?.pinned) {
|
||||
// prevent pinned tab from being dragged past a non-pinned tab
|
||||
targetElement = this.tabs[this.pinnedTabCount - 1];
|
||||
moveBefore = false;
|
||||
}
|
||||
-
|
||||
+ if (targetElement?.group?.hasAttribute("split-view-group")) {
|
||||
+ targetElement = targetElement.group;
|
||||
+ }
|
||||
let getContainer = () => {
|
||||
+ if (tab.hasAttribute("zen-essential")) {
|
||||
+ return document.getElementById("zen-essentials-container");
|
||||
+ }
|
||||
if (tab.pinned && this.tabContainer.verticalMode) {
|
||||
return this.tabContainer.verticalPinnedTabsContainer;
|
||||
}
|
||||
@@ -5937,7 +6116,7 @@
|
||||
}
|
||||
|
||||
moveTabToGroup(aTab, aGroup) {
|
||||
@@ -605,7 +645,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
return;
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
@@ -5721,6 +5873,10 @@
|
||||
@@ -5961,6 +6140,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
@@ -616,7 +656,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -5771,7 +5927,7 @@
|
||||
@@ -6015,7 +6198,7 @@
|
||||
createLazyBrowser,
|
||||
};
|
||||
|
||||
@@ -625,7 +665,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
if (aIndex < numPinned || (aTab.pinned && aIndex == numPinned)) {
|
||||
params.pinned = true;
|
||||
}
|
||||
@@ -6513,7 +6669,7 @@
|
||||
@@ -6765,7 +6948,7 @@
|
||||
// preventDefault(). It will still raise the window if appropriate.
|
||||
break;
|
||||
}
|
||||
@@ -634,7 +674,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
@@ -7415,6 +7571,7 @@
|
||||
@@ -7671,6 +7854,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -642,25 +682,25 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -8381,7 +8538,7 @@ var TabContextMenu = {
|
||||
@@ -8640,7 +8824,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !multiselectionContext;
|
||||
!this.contextTab.pinned || !this.multiselected;
|
||||
-
|
||||
+ gZenPinnedTabManager.updatePinnedTabContextMenu(this.contextTab);
|
||||
// Move Tab items
|
||||
let contextMoveTabOptions = document.getElementById(
|
||||
"context_moveTabOptions"
|
||||
@@ -8414,7 +8571,7 @@ var TabContextMenu = {
|
||||
let contextMoveTabToStart = document.getElementById("context_moveToStart");
|
||||
@@ -8674,7 +8858,7 @@ var TabContextMenu = {
|
||||
let isFirstTab =
|
||||
tabsToMove[0] == visibleTabs[0] ||
|
||||
- tabsToMove[0] == visibleTabs[gBrowser.pinnedTabCount];
|
||||
+ tabsToMove[0] == visibleTabs[gBrowser._numVisiblePinTabs];
|
||||
!this.contextTabs[0].group &&
|
||||
(this.contextTabs[0] == visibleTabs[0] ||
|
||||
- this.contextTabs[0] == visibleTabs[gBrowser.pinnedTabCount]);
|
||||
+ this.contextTabs[0] == visibleTabs[gBrowser._numVisiblePinTabs]);
|
||||
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
|
||||
|
||||
document.getElementById("context_openTabInWindow").disabled =
|
||||
@@ -8647,6 +8804,7 @@ var TabContextMenu = {
|
||||
@@ -8904,6 +9088,7 @@ var TabContextMenu = {
|
||||
if (this.contextTab.multiselected) {
|
||||
gBrowser.removeMultiSelectedTabs();
|
||||
} else {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d734668f2a 100644
|
||||
index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..bf956639f7d17d6d652f3b2d6cb174904b5b5da9 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -94,7 +94,7 @@
|
||||
@@ -93,7 +93,7 @@
|
||||
};
|
||||
this.arrowScrollbox._canScrollToElement = element => {
|
||||
if (isTab(element)) {
|
||||
@@ -11,7 +11,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@@ -339,7 +339,7 @@
|
||||
@@ -347,7 +347,7 @@
|
||||
// and we're not hitting the scroll buttons.
|
||||
if (
|
||||
event.button != 0 ||
|
||||
@@ -20,7 +20,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
event.composedTarget.localName == "toolbarbutton"
|
||||
) {
|
||||
return;
|
||||
@@ -388,6 +388,7 @@
|
||||
@@ -396,6 +396,7 @@
|
||||
// Reset the "ignored click" flag
|
||||
target._ignoredCloseButtonClicks = false;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
|
||||
/* Protects from close-tab-button errant doubleclick:
|
||||
@@ -683,7 +684,7 @@
|
||||
@@ -693,7 +694,7 @@
|
||||
if (this.#isContainerVerticalPinnedExpanded(tab)) {
|
||||
// In expanded vertical mode, the max number of pinned tabs per row is dynamic
|
||||
// Set this before adjusting dragged tab's position
|
||||
@@ -37,7 +37,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
let tabsPerRow = 0;
|
||||
let position = 0;
|
||||
for (let pinnedTab of pinnedTabs) {
|
||||
@@ -883,6 +884,10 @@
|
||||
@@ -899,6 +900,10 @@
|
||||
}
|
||||
|
||||
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||
@@ -48,7 +48,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
if (
|
||||
(effects == "move" || effects == "copy") &&
|
||||
this == draggedTab.container &&
|
||||
@@ -996,6 +1001,18 @@
|
||||
@@ -1012,6 +1017,18 @@
|
||||
|
||||
this._tabDropIndicator.hidden = true;
|
||||
event.stopPropagation();
|
||||
@@ -67,41 +67,32 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
if (draggedTab && dropEffect == "copy") {
|
||||
// copy the dropped tab (wherever it's from)
|
||||
let newIndex = this._getDropIndex(event);
|
||||
@@ -1034,10 +1051,11 @@
|
||||
@@ -1050,10 +1067,11 @@
|
||||
}
|
||||
} else {
|
||||
let pinned = draggedTab.pinned;
|
||||
let isPinned = draggedTab.pinned;
|
||||
- let numPinned = gBrowser.pinnedTabCount;
|
||||
- let tabs = this.visibleTabs.slice(
|
||||
- pinned ? 0 : numPinned,
|
||||
- pinned ? numPinned : undefined
|
||||
+ let numPinned = gBrowser._numVisiblePinTabs;
|
||||
- let tabs = this.ariaFocusableItems.slice(
|
||||
- isPinned ? 0 : numPinned,
|
||||
- isPinned ? numPinned : undefined
|
||||
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
|
||||
+ let essential = draggedTab.hasAttribute("zen-essential");
|
||||
+ let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
|
||||
+ pinned ? (essential ? 0 : gBrowser._numZenVisibleEssentials) : numPinned,
|
||||
+ pinned ? (essential ? gBrowser._numZenVisibleEssentials : numPinned) : undefined
|
||||
+ let tabs = this.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
|
||||
+ isPinned ? (essential ? 0 : gBrowser._numZenVisibleEssentials) : numPinned,
|
||||
+ isPinned ? (essential ? gBrowser._numZenVisibleEssentials : numPinned) : undefined
|
||||
);
|
||||
let size = this.verticalMode ? "height" : "width";
|
||||
let screenAxis = this.verticalMode ? "screenY" : "screenX";
|
||||
@@ -1114,7 +1132,7 @@
|
||||
let postTransitionCleanup = () => {
|
||||
@@ -1129,7 +1147,7 @@
|
||||
tab.removeAttribute("tabdrop-samewindow");
|
||||
|
||||
- this._finishAnimateTabMove();
|
||||
+ this._finishAnimateTabMove(true);
|
||||
if (dropIndex !== false) {
|
||||
gBrowser.moveTabTo(tab, dropIndex);
|
||||
if (!directionForward) {
|
||||
@@ -1122,7 +1140,7 @@
|
||||
}
|
||||
}
|
||||
resolve();
|
||||
};
|
||||
- if (gReduceMotion) {
|
||||
+ if (true || gReduceMotion) {
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -1249,7 +1267,7 @@
|
||||
@@ -1246,7 +1264,7 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -110,7 +101,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
gBrowser.loadTabs(urls, {
|
||||
inBackground,
|
||||
replace,
|
||||
@@ -1279,13 +1297,23 @@
|
||||
@@ -1276,13 +1294,23 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -136,7 +127,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
) {
|
||||
delete draggedTab._dragData;
|
||||
return;
|
||||
@@ -1517,7 +1545,7 @@
|
||||
@@ -1504,7 +1532,7 @@
|
||||
}
|
||||
|
||||
get newTabButton() {
|
||||
@@ -145,7 +136,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
|
||||
get verticalMode() {
|
||||
@@ -1537,29 +1565,41 @@
|
||||
@@ -1524,29 +1552,41 @@
|
||||
if (this.#allTabs) {
|
||||
return this.#allTabs;
|
||||
}
|
||||
@@ -195,7 +186,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1579,7 +1619,7 @@
|
||||
@@ -1566,7 +1606,7 @@
|
||||
*/
|
||||
get visibleTabs() {
|
||||
if (!this.#visibleTabs) {
|
||||
@@ -204,28 +195,47 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
return this.#visibleTabs;
|
||||
}
|
||||
@@ -1613,10 +1653,8 @@
|
||||
return this.#focusableItems;
|
||||
@@ -1601,23 +1641,18 @@
|
||||
}
|
||||
|
||||
let elementIndex = 0;
|
||||
- let verticalPinnedTabsContainer = document.getElementById(
|
||||
- "vertical-pinned-tabs-container"
|
||||
- );
|
||||
- for (let i = 0; i < verticalPinnedTabsContainer.childElementCount; i++) {
|
||||
- verticalPinnedTabsContainer.children[i].elementIndex = elementIndex++;
|
||||
- }
|
||||
- let children = Array.from(this.arrowScrollbox.children);
|
||||
+ let verticalPinnedTabsContainer = this.verticalPinnedTabsContainer;
|
||||
+ let verticalPinnedTabsContainer = this.verticalPinnedTabsContainer
|
||||
+ let children = ZenWorkspaces.tabboxChildrenWithoutEmpty;
|
||||
|
||||
let focusableItems = [];
|
||||
for (let child of children) {
|
||||
@@ -1632,6 +1670,7 @@
|
||||
- for (let child of children) {
|
||||
+ for (let child of [...document.getElementById("zen-essentials-container").children, ...verticalPinnedTabsContainer.children, ...children]) {
|
||||
if (isTab(child) && child.visible) {
|
||||
child.elementIndex = elementIndex++;
|
||||
focusableItems.push(child);
|
||||
} else if (isTabGroup(child)) {
|
||||
child.labelElement.elementIndex = elementIndex++;
|
||||
focusableItems.push(child.labelElement);
|
||||
- if (!child.collapsed) {
|
||||
+ if (!child.collapsed && !child.hasAttribute("split-view-group")) {
|
||||
let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
|
||||
visibleTabsInGroup.forEach(tab => {
|
||||
tab.elementIndex = elementIndex++;
|
||||
@@ -1627,10 +1662,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
this.#focusableItems = [
|
||||
+ ...document.getElementById("zen-essentials-container").children,
|
||||
...verticalPinnedTabsContainer.children,
|
||||
...focusableItems,
|
||||
];
|
||||
@@ -1642,6 +1681,7 @@
|
||||
- this.#focusableItems = [
|
||||
- ...verticalPinnedTabsContainer.children,
|
||||
- ...focusableItems,
|
||||
- ];
|
||||
+ this.#focusableItems = focusableItems;
|
||||
|
||||
return this.#focusableItems;
|
||||
}
|
||||
@@ -1638,6 +1670,7 @@
|
||||
_invalidateCachedTabs() {
|
||||
this.#allTabs = null;
|
||||
this._invalidateCachedVisibleTabs();
|
||||
@@ -233,7 +243,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
|
||||
_invalidateCachedVisibleTabs() {
|
||||
@@ -1656,8 +1696,8 @@
|
||||
@@ -1652,8 +1685,8 @@
|
||||
#isContainerVerticalPinnedExpanded(tab) {
|
||||
return (
|
||||
this.verticalMode &&
|
||||
@@ -244,7 +254,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1672,7 +1712,7 @@
|
||||
@@ -1668,7 +1701,7 @@
|
||||
|
||||
if (node == null) {
|
||||
// We have a container for non-tab elements at the end of the scrollbox.
|
||||
@@ -253,7 +263,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
|
||||
node.before(tab);
|
||||
@@ -1772,7 +1812,7 @@
|
||||
@@ -1763,7 +1796,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.
|
||||
@@ -262,7 +272,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
const newTab2 = this.newTabButton;
|
||||
const newTabVertical = document.getElementById(
|
||||
"vertical-tabs-newtab-button"
|
||||
@@ -1855,7 +1895,7 @@
|
||||
@@ -1846,7 +1879,7 @@
|
||||
let rect = ele => {
|
||||
return window.windowUtils.getBoundsWithoutFlushing(ele);
|
||||
};
|
||||
@@ -271,7 +281,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
if (tab && rect(tab).width <= this._tabClipWidth) {
|
||||
this.setAttribute("closebuttons", "activetab");
|
||||
} else {
|
||||
@@ -1867,10 +1907,12 @@
|
||||
@@ -1858,10 +1891,12 @@
|
||||
|
||||
_handleTabSelect(aInstant) {
|
||||
let selectedTab = this.selectedItem;
|
||||
@@ -284,7 +294,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
selectedTab._notselectedsinceload = false;
|
||||
}
|
||||
|
||||
@@ -1882,7 +1924,7 @@
|
||||
@@ -1873,7 +1908,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -293,7 +303,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
if (!tabs.length) {
|
||||
return;
|
||||
}
|
||||
@@ -1918,7 +1960,7 @@
|
||||
@@ -1909,7 +1944,7 @@
|
||||
if (isEndTab && !this._hasTabTempMaxWidth) {
|
||||
return;
|
||||
}
|
||||
@@ -302,7 +312,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
// Force tabs to stay the same width, unless we're closing the last tab,
|
||||
// which case we need to let them expand just enough so that the overall
|
||||
// tabbar width is the same.
|
||||
@@ -1933,7 +1975,7 @@
|
||||
@@ -1924,7 +1959,7 @@
|
||||
let tabsToReset = [];
|
||||
for (let i = numPinned; i < tabs.length; i++) {
|
||||
let tab = tabs[i];
|
||||
@@ -311,7 +321,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
if (!isEndTab) {
|
||||
// keep tabs the same width
|
||||
tab.style.transition = "none";
|
||||
@@ -1999,16 +2041,15 @@
|
||||
@@ -1990,16 +2025,15 @@
|
||||
// Move pinned tabs to another container when the tabstrip is toggled to vertical
|
||||
// and when session restore code calls _positionPinnedTabs; update styling whenever
|
||||
// the number of pinned tabs changes.
|
||||
@@ -334,7 +344,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2016,9 +2057,7 @@
|
||||
@@ -2007,9 +2041,7 @@
|
||||
}
|
||||
|
||||
_resetVerticalPinnedTabs() {
|
||||
@@ -345,7 +355,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
|
||||
if (!verticalTabsContainer.children.length) {
|
||||
return;
|
||||
@@ -2031,8 +2070,8 @@
|
||||
@@ -2022,8 +2054,8 @@
|
||||
}
|
||||
|
||||
_positionPinnedTabs() {
|
||||
@@ -356,7 +366,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
let absPositionHorizontalTabs =
|
||||
this.overflowing && tabs.length > numPinned && numPinned > 0;
|
||||
|
||||
@@ -2041,7 +2080,7 @@
|
||||
@@ -2032,7 +2064,7 @@
|
||||
|
||||
if (this.verticalMode) {
|
||||
this._updateVerticalPinnedTabs();
|
||||
@@ -365,7 +375,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
let layoutData = this._pinnedTabsLayoutCache;
|
||||
let uiDensity = document.documentElement.getAttribute("uidensity");
|
||||
if (!layoutData || layoutData.uiDensity != uiDensity) {
|
||||
@@ -2113,7 +2152,7 @@
|
||||
@@ -2104,7 +2136,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -374,7 +384,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
|
||||
let directionX = screenX > dragData.animLastScreenX;
|
||||
let directionY = screenY > dragData.animLastScreenY;
|
||||
@@ -2121,7 +2160,7 @@
|
||||
@@ -2112,7 +2144,7 @@
|
||||
dragData.animLastScreenX = screenX;
|
||||
|
||||
let { width: tabWidth, height: tabHeight } =
|
||||
@@ -383,23 +393,40 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
let shiftSizeX = tabWidth * movingTabs.length;
|
||||
let shiftSizeY = tabHeight;
|
||||
dragData.tabWidth = tabWidth;
|
||||
@@ -2296,10 +2335,11 @@
|
||||
}
|
||||
@@ -2296,11 +2328,15 @@
|
||||
this.#clearDragOverCreateGroupTimer();
|
||||
|
||||
let pinned = draggedTab.pinned;
|
||||
let isPinned = draggedTab.pinned;
|
||||
- let numPinned = gBrowser.pinnedTabCount;
|
||||
- let tabs = this.visibleTabs.slice(
|
||||
- pinned ? 0 : numPinned,
|
||||
- pinned ? numPinned : undefined
|
||||
+ let numPinned = gBrowser._numVisiblePinTabs;
|
||||
- let tabs = this.ariaFocusableItems.slice(
|
||||
- isPinned ? 0 : numPinned,
|
||||
- isPinned ? numPinned : undefined
|
||||
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
|
||||
+ let essential = draggedTab.hasAttribute("zen-essential");
|
||||
+ let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
|
||||
+ pinned ? (essential ? 0 : gBrowser._numZenVisibleEssentials) : numPinned,
|
||||
+ pinned ? (essential ? gBrowser._numZenVisibleEssentials : numPinned) : undefined
|
||||
+ let tabs = this.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
|
||||
+ isPinned ? (essential ? 0 : gBrowser._numZenVisibleEssentials) : numPinned,
|
||||
+ isPinned ? (essential ? gBrowser._numZenVisibleEssentials : numPinned) : undefined
|
||||
);
|
||||
+ if (draggedTab.group?.hasAttribute("split-view-group")) {
|
||||
+ draggedTab = draggedTab.group.labelElement;
|
||||
+ }
|
||||
|
||||
if (this.#rtlMode) {
|
||||
@@ -2348,7 +2388,11 @@
|
||||
tabs.reverse();
|
||||
@@ -2328,6 +2364,12 @@
|
||||
let lastTab = tabs.at(-1);
|
||||
let lastMovingTab = movingTabs.at(-1);
|
||||
let firstMovingTab = movingTabs[0];
|
||||
+ if (lastMovingTab.group?.hasAttribute("split-view-group")) {
|
||||
+ lastMovingTab = lastMovingTab.group;
|
||||
+ }
|
||||
+ if (firstMovingTab.group?.hasAttribute("split-view-group")) {
|
||||
+ firstMovingTab = firstMovingTab.group;
|
||||
+ }
|
||||
let endEdge = ele => ele[screenAxis] + bounds(ele)[size];
|
||||
let lastMovingTabScreen = endEdge(lastMovingTab);
|
||||
let firstMovingTabScreen = firstMovingTab[screenAxis];
|
||||
@@ -2348,7 +2390,11 @@
|
||||
translate = Math.min(Math.max(translate, firstBound), lastBound);
|
||||
|
||||
for (let tab of movingTabs) {
|
||||
@@ -412,25 +439,71 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
}
|
||||
|
||||
dragData.translatePos = translate;
|
||||
@@ -2484,12 +2528,16 @@
|
||||
@@ -2379,7 +2425,7 @@
|
||||
let getTabShift = (item, dropElementIndex) => {
|
||||
if (
|
||||
item.elementIndex < draggedTab.elementIndex &&
|
||||
- item.elementIndex >= dropElementIndex
|
||||
+ item.elementIndex + !!item.closest("tab-group")?.hasAttribute("split-view-group") >= dropElementIndex
|
||||
) {
|
||||
return this.#rtlMode ? -shiftSize : shiftSize;
|
||||
}
|
||||
@@ -2485,6 +2531,9 @@
|
||||
break;
|
||||
}
|
||||
let element = tabs[mid];
|
||||
+ if (element?.group?.hasAttribute("split-view-group")) {
|
||||
+ element = element.group.labelElement;
|
||||
+ }
|
||||
let elementForSize = isTabGroupLabel(element)
|
||||
? element.parentElement
|
||||
: element;
|
||||
@@ -2507,6 +2556,10 @@
|
||||
if (!dropElement) {
|
||||
dropElement = this.ariaFocusableItems[oldDropElementIndex];
|
||||
}
|
||||
+ if (dropElement?.group?.hasAttribute("split-view-group")) {
|
||||
+ // We focus the group label element, not the group itself.
|
||||
+ dropElement = dropElement.group.labelElement;
|
||||
+ }
|
||||
let newDropElementIndex = dropElement
|
||||
? dropElement.elementIndex
|
||||
: oldDropElementIndex;
|
||||
@@ -2566,12 +2619,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (gBrowser._tabGroupsEnabled && !isPinned) {
|
||||
+ if (true) {
|
||||
let dragOverGroupingThreshold = 1 - moveOverThreshold;
|
||||
|
||||
// When dragging tab(s) over an ungrouped tab, signal to the user
|
||||
// that dropping the tab(s) will create a new tab group.
|
||||
- shouldCreateGroupOnDrop =
|
||||
+ shouldCreateGroupOnDrop = false &&
|
||||
dropElement != draggedTab &&
|
||||
isTab(dropElement) &&
|
||||
!dropElement?.group &&
|
||||
@@ -2639,7 +2692,7 @@
|
||||
// Shift background tabs to leave a gap where the dragged tab
|
||||
// would currently be dropped.
|
||||
for (let tab of tabs) {
|
||||
- if (tab == draggedTab) {
|
||||
+ if (tab == draggedTab || (tab.group?.hasAttribute("split-view-group") && tab.group == draggedTab.group)) {
|
||||
for (let item of tabs) {
|
||||
- if (item == draggedTab) {
|
||||
+ if (item == draggedTab || (item.group?.hasAttribute("split-view-group") && item.group == draggedTab.group)) {
|
||||
continue;
|
||||
}
|
||||
let shift = getTabShift(tab, newIndex);
|
||||
let transform = shift ? `${translateAxis}(${shift}px)` : "";
|
||||
+ if (tab.group?.hasAttribute("split-view-group")) {
|
||||
+ tab.group.style.transform = transform;
|
||||
+ } else {
|
||||
tab.style.transform = transform;
|
||||
+ }
|
||||
if (tab.group?.tabs[0] == tab) {
|
||||
tab.group.style.setProperty(
|
||||
"--tabgroup-dragover-transform",
|
||||
@@ -2541,8 +2589,9 @@
|
||||
|
||||
@@ -2648,6 +2701,9 @@
|
||||
if (isTabGroupLabel(item)) {
|
||||
// Shift the `.tab-group-label-container` to shift the label element.
|
||||
item = item.parentElement;
|
||||
+ if (item.parentElement?.hasAttribute("split-view-group")) {
|
||||
+ item = item.parentElement;
|
||||
+ }
|
||||
}
|
||||
item.style.transform = transform;
|
||||
}
|
||||
@@ -2697,8 +2753,9 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -442,16 +515,21 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2553,6 +2602,7 @@
|
||||
tab.style.transform = "";
|
||||
if (tab.group) {
|
||||
tab.group.style.removeProperty("--tabgroup-dragover-transform");
|
||||
+ tab.group.style.transform = "";
|
||||
@@ -2711,6 +2768,12 @@
|
||||
item = item.parentElement;
|
||||
}
|
||||
tab.removeAttribute("dragover-createGroup");
|
||||
item.style.transform = "";
|
||||
+ if (item.closest("tab-group")?.hasAttribute("split-view-group")) item.closest("tab-group").style.transform = "";
|
||||
+ if (item.closest("tab-group")?.hasAttribute("split-view-group")) {
|
||||
+ for (let tab of item.closest("tab-group").tabs) {
|
||||
+ tab.style.transform = "";
|
||||
+ }
|
||||
+ }
|
||||
item.removeAttribute("dragover-createGroup");
|
||||
}
|
||||
@@ -2604,7 +2654,7 @@
|
||||
movingTab._moveTogetherSelectedTabsData.newIndex = movingTabNewIndex;
|
||||
this.removeAttribute("movingtab-createGroup");
|
||||
@@ -2754,7 +2817,7 @@
|
||||
let postTransitionCleanup = () => {
|
||||
movingTab._moveTogetherSelectedTabsData.animate = false;
|
||||
};
|
||||
- if (gReduceMotion) {
|
||||
@@ -459,19 +537,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d7
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -2707,9 +2757,9 @@
|
||||
function newIndex(aTab, index) {
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (aTab.pinned) {
|
||||
- return Math.min(index, gBrowser.pinnedTabCount - 1);
|
||||
+ return Math.min(index, gBrowser._numVisiblePinTabs - 1);
|
||||
}
|
||||
- return Math.max(index, gBrowser.pinnedTabCount);
|
||||
+ return Math.max(index, gBrowser._numVisiblePinTabs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2793,7 +2843,7 @@
|
||||
@@ -2924,7 +2987,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b62e85eed4 100644
|
||||
index 6de4c2ac873b1424abee118a143ac377f26beb80..3b41d52c8e00860ce9913a334f15f70e1db08a7c 100644
|
||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
@@ -16,7 +16,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
|
||||
const SEARCH_BUTTON_CLASS = "urlbar-search-button";
|
||||
|
||||
@@ -349,7 +356,11 @@ export class UrlbarInput {
|
||||
@@ -348,7 +355,11 @@ export class UrlbarInput {
|
||||
// See _on_select(). HTMLInputElement.select() dispatches a "select"
|
||||
// event but does not set the primary selection.
|
||||
this._suppressPrimaryAdjustment = true;
|
||||
@@ -28,7 +28,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
this._suppressPrimaryAdjustment = false;
|
||||
}
|
||||
|
||||
@@ -425,6 +436,10 @@ export class UrlbarInput {
|
||||
@@ -424,6 +435,10 @@ export class UrlbarInput {
|
||||
hideSearchTerms = false,
|
||||
isSameDocument = false
|
||||
) {
|
||||
@@ -39,7 +39,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
// We only need to update the searchModeUI on tab switch conditionally
|
||||
// as we only persist searchMode with ScotchBonnet enabled.
|
||||
if (
|
||||
@@ -698,8 +713,11 @@ export class UrlbarInput {
|
||||
@@ -697,8 +712,11 @@ export class UrlbarInput {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -943,6 +961,10 @@ export class UrlbarInput {
|
||||
@@ -937,6 +955,10 @@ export class UrlbarInput {
|
||||
// Nullify search mode before setURI so it won't try to restore it.
|
||||
this.searchMode = null;
|
||||
this.setURI(null, true, false, true);
|
||||
@@ -63,7 +63,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
if (this.value && this.focused) {
|
||||
this.select();
|
||||
}
|
||||
@@ -1098,7 +1120,11 @@ export class UrlbarInput {
|
||||
@@ -1092,7 +1114,11 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
if (!this.#providesSearchMode(result)) {
|
||||
@@ -76,7 +76,18 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
}
|
||||
|
||||
this.controller.recordSelectedResult(event, result);
|
||||
@@ -2157,6 +2183,11 @@ export class UrlbarInput {
|
||||
@@ -2124,6 +2150,10 @@ export class UrlbarInput {
|
||||
await this.#updateLayoutBreakoutDimensions();
|
||||
}
|
||||
|
||||
+ async zenUpdateLayoutBreakout() {
|
||||
+ await this.#updateLayoutBreakout();
|
||||
+ }
|
||||
+
|
||||
startLayoutExtend() {
|
||||
if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
|
||||
// Do not expand if the Urlbar does not support being expanded or it is
|
||||
@@ -2146,6 +2176,11 @@ export class UrlbarInput {
|
||||
|
||||
this.setAttribute("breakout-extend", "true");
|
||||
|
||||
@@ -88,7 +99,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
// 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")) {
|
||||
@@ -2176,6 +2207,11 @@ export class UrlbarInput {
|
||||
@@ -2165,6 +2200,11 @@ export class UrlbarInput {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -100,7 +111,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
this.removeAttribute("breakout-extend");
|
||||
this.#updateTextboxPosition();
|
||||
}
|
||||
@@ -2998,7 +3034,7 @@ export class UrlbarInput {
|
||||
@@ -2997,7 +3037,7 @@ export class UrlbarInput {
|
||||
*/
|
||||
_trimValue(val) {
|
||||
let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
|
||||
@@ -109,7 +120,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
: val;
|
||||
// Only trim value if the directionality doesn't change to RTL and we're not
|
||||
// showing a strikeout https protocol.
|
||||
@@ -3365,7 +3401,7 @@ export class UrlbarInput {
|
||||
@@ -3359,7 +3399,7 @@ export class UrlbarInput {
|
||||
} else {
|
||||
where = lazy.BrowserUtils.whereToOpenLink(event, false, false);
|
||||
}
|
||||
@@ -118,7 +129,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
if (where == "current") {
|
||||
where = "tab";
|
||||
} else if (where == "tab") {
|
||||
@@ -3380,6 +3416,9 @@ export class UrlbarInput {
|
||||
@@ -3374,6 +3414,9 @@ export class UrlbarInput {
|
||||
) {
|
||||
where = "current";
|
||||
}
|
||||
@@ -128,7 +139,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
return where;
|
||||
}
|
||||
|
||||
@@ -3921,6 +3960,11 @@ export class UrlbarInput {
|
||||
@@ -4048,6 +4091,11 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
_on_click(event) {
|
||||
@@ -140,7 +151,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
if (
|
||||
event.target == this.inputField ||
|
||||
event.target == this._inputContainer ||
|
||||
@@ -3992,7 +4036,7 @@ export class UrlbarInput {
|
||||
@@ -4119,7 +4167,7 @@ export class UrlbarInput {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +160,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
this.view.autoOpen({ event });
|
||||
} else {
|
||||
if (this._untrimOnFocusAfterKeydown) {
|
||||
@@ -4032,9 +4076,12 @@ export class UrlbarInput {
|
||||
@@ -4159,9 +4207,12 @@ export class UrlbarInput {
|
||||
}
|
||||
|
||||
_on_mousedown(event) {
|
||||
@@ -163,7 +174,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b6
|
||||
|
||||
if (
|
||||
event.target != this.inputField &&
|
||||
@@ -4044,8 +4091,8 @@ export class UrlbarInput {
|
||||
@@ -4171,8 +4222,8 @@ export class UrlbarInput {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,13 @@
|
||||
diff --git a/browser/extensions/newtab/content-src/components/CustomizeMenu/ContentSection/ContentSection.jsx b/browser/extensions/newtab/content-src/components/CustomizeMenu/ContentSection/ContentSection.jsx
|
||||
index dcf192d0ab7323d69f1bf505971e57c98ad4397d..a4d88304786af35030391f71bc99eee6cf7c1a64 100644
|
||||
--- a/browser/extensions/newtab/content-src/components/CustomizeMenu/ContentSection/ContentSection.jsx
|
||||
+++ b/browser/extensions/newtab/content-src/components/CustomizeMenu/ContentSection/ContentSection.jsx
|
||||
@@ -188,7 +188,7 @@ export class ContentSection extends React.PureComponent {
|
||||
data-l10n-args='{"num": 4}'
|
||||
/>
|
||||
</select>
|
||||
- {mayHaveSponsoredTopSites && (
|
||||
+ {false && (
|
||||
<div className="check-wrapper" role="presentation">
|
||||
<input
|
||||
id="sponsored-shortcuts"
|
@@ -1,7 +1,7 @@
|
||||
diff --git a/browser/components/newtab/lib/AboutPreferences.sys.mjs b/browser/components/newtab/lib/AboutPreferences.sys.mjs
|
||||
index 33f7ecdaeb7074c7633dd229a4446f2a8ed4b247..f422a9bfb9694b190e84e81a430a509b4ab8c986 100644
|
||||
--- a/browser/components/newtab/lib/AboutPreferences.sys.mjs
|
||||
+++ b/browser/components/newtab/lib/AboutPreferences.sys.mjs
|
||||
diff --git a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
|
||||
index df9d63c2713b4237d8acca93f108d5c788caed8d..a80cc02fdec6e1056d26a6b5a1cdc1a602e5cf2a 100644
|
||||
--- a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
|
||||
+++ b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
|
||||
@@ -34,7 +34,7 @@ const PREFS_BEFORE_SECTIONS = () => [
|
||||
titleString: "home-prefs-shortcuts-header",
|
||||
descString: "home-prefs-shortcuts-description",
|
@@ -0,0 +1,13 @@
|
||||
diff --git a/browser/extensions/newtab/lib/ActivityStream.sys.mjs b/browser/extensions/newtab/lib/ActivityStream.sys.mjs
|
||||
index b3d89213ec27151f05e9990d5a55c6e81ce3655f..3c485f616fa2daba62aacbdde2dfb3122e244821 100644
|
||||
--- a/browser/extensions/newtab/lib/ActivityStream.sys.mjs
|
||||
+++ b/browser/extensions/newtab/lib/ActivityStream.sys.mjs
|
||||
@@ -214,7 +214,7 @@ export const PREFS_CONFIG = new Map([
|
||||
"showSponsoredTopSites",
|
||||
{
|
||||
title: "Show sponsored top sites",
|
||||
- value: true,
|
||||
+ value: false,
|
||||
},
|
||||
],
|
||||
[
|
24
src/browser/modules/BrowserDOMWindow-sys-mjs.patch
Normal file
24
src/browser/modules/BrowserDOMWindow-sys-mjs.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff --git a/browser/modules/BrowserDOMWindow.sys.mjs b/browser/modules/BrowserDOMWindow.sys.mjs
|
||||
index 2bc4918c15b5ea80e486db66d20bb9668b9e29c0..3800a3807f11c5f65ce0d602a775f95037f5dcf8 100644
|
||||
--- a/browser/modules/BrowserDOMWindow.sys.mjs
|
||||
+++ b/browser/modules/BrowserDOMWindow.sys.mjs
|
||||
@@ -362,7 +362,7 @@ export class BrowserDOMWindow {
|
||||
// Passing a null-URI to only create the content window,
|
||||
// and pass true for aSkipLoad to prevent loading of
|
||||
// about:blank
|
||||
- return this.getContentWindowOrOpenURIInFrame(
|
||||
+ let res = this.getContentWindowOrOpenURIInFrame(
|
||||
null,
|
||||
aParams,
|
||||
aWhere,
|
||||
@@ -370,6 +370,10 @@ export class BrowserDOMWindow {
|
||||
aName,
|
||||
true
|
||||
);
|
||||
+ if (typeof this.win?.gZenGlanceManager !== "undefined" && this.win.toolbar.visible) {
|
||||
+ this.win.gZenGlanceManager.onTabOpen(res, aURI);
|
||||
+ }
|
||||
+ return res;
|
||||
}
|
||||
|
||||
openURIInFrame(aURI, aParams, aWhere, aFlags, aName) {
|
@@ -1,37 +0,0 @@
|
||||
diff --git a/browser/themes/addons/dark/manifest.json b/browser/themes/addons/dark/manifest.json
|
||||
index bfebde683d00b0acf26509139a0f662029d37c72..976b553f49e40b7ed02743d79ccc102fccffcf6f 100644
|
||||
--- a/browser/themes/addons/dark/manifest.json
|
||||
+++ b/browser/themes/addons/dark/manifest.json
|
||||
@@ -7,10 +7,10 @@
|
||||
}
|
||||
},
|
||||
|
||||
- "name": "Dark",
|
||||
+ "name": "Zen Dark",
|
||||
"description": "A theme with a dark color scheme.",
|
||||
- "author": "Mozilla",
|
||||
+ "author": "Zen",
|
||||
"version": "1.3.2",
|
||||
|
||||
"icons": { "32": "icon.svg" },
|
||||
|
||||
@@ -58,7 +58,8 @@
|
||||
"color_scheme": "dark",
|
||||
"panel_active": "color-mix(in srgb, currentColor 14%, transparent)",
|
||||
"toolbar_field_icon_opacity": "1",
|
||||
- "zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)"
|
||||
+ "zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)",
|
||||
+ "zen_main_browser_background": "var(--zen-themed-toolbar-bg)"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -82,7 +83,8 @@
|
||||
"properties": {
|
||||
"panel_active": "--arrowpanel-dimmed-further",
|
||||
"toolbar_field_icon_opacity": "--urlbar-icon-fill-opacity",
|
||||
- "zap_gradient": "--panel-separator-zap-gradient"
|
||||
+ "zap_gradient": "--panel-separator-zap-gradient",
|
||||
+ "zen_main_browser_background": "--zen-main-browser-background"
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
diff --git a/browser/themes/addons/light/manifest.json b/browser/themes/addons/light/manifest.json
|
||||
index d490f8f08d203ded55b65fe1a19be105b61ee6c0..eb4349e939b979b3a4d7c525ee0c0f9a53079d4a 100644
|
||||
--- a/browser/themes/addons/light/manifest.json
|
||||
+++ b/browser/themes/addons/light/manifest.json
|
||||
@@ -7,10 +7,10 @@
|
||||
}
|
||||
},
|
||||
|
||||
- "name": "Light",
|
||||
+ "name": "Zen Light",
|
||||
"description": "A theme with a light color scheme.",
|
||||
- "author": "Mozilla",
|
||||
+ "author": "Zen",
|
||||
"version": "1.3",
|
||||
|
||||
"icons": { "32": "icon.svg" },
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
"panel_active": "color-mix(in srgb, currentColor 20%, transparent)",
|
||||
"panel_active_darker": "color-mix(in srgb, currentColor 27%, transparent)",
|
||||
"toolbar_field_icon_opacity": "0.72",
|
||||
- "zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)"
|
||||
+ "zap_gradient": "linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%)",
|
||||
+ "zen_main_browser_background": "var(--zen-themed-toolbar-bg)"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -86,7 +87,8 @@
|
||||
"panel_active": "--arrowpanel-dimmed-further",
|
||||
"panel_active_darker": "--panel-item-active-bgcolor",
|
||||
"toolbar_field_icon_opacity": "--urlbar-icon-fill-opacity",
|
||||
- "zap_gradient": "--panel-separator-zap-gradient"
|
||||
+ "zap_gradient": "--panel-separator-zap-gradient",
|
||||
+ "zen_main_browser_background": "--zen-main-browser-background"
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
|
||||
index dc95772553ef7130c27c1122178ff99028b601f2..81f7dbb40c35168376ca84eebfa9fba8d314cb90 100644
|
||||
index 5c9891e5ed4b865ed4ecc98d794a239b0f96a8f9..e13bf7277edeb49ebbb12cf9359ac6193bb47ebd 100644
|
||||
--- a/browser/themes/linux/browser.css
|
||||
+++ b/browser/themes/linux/browser.css
|
||||
@@ -42,21 +42,25 @@
|
||||
@@ -17,7 +17,7 @@ index dc95772553ef7130c27c1122178ff99028b601f2..81f7dbb40c35168376ca84eebfa9fba8
|
||||
}
|
||||
|
||||
/* stylelint-disable-next-line media-query-no-invalid */
|
||||
@media (-moz-bool-pref: "widget.gtk.rounded-bottom-corners.enabled") {
|
||||
@media -moz-pref("widget.gtk.rounded-bottom-corners.enabled") {
|
||||
- #navigator-toolbox {
|
||||
+ #zen-main-app-wrapper {
|
||||
/* The body clip below covers this. */
|
||||
|
@@ -181,7 +181,7 @@ groupbox h2 {
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.use-single-toolbar') {
|
||||
@media -moz-pref('zen.view.use-single-toolbar') {
|
||||
#zen-compact-mode-styles-form {
|
||||
display: none;
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git a/build/moz.build b/build/moz.build
|
||||
index 7bf9c501db06d38f924c26372d4243d448af8d81..90b02a99af90c40cea7d90c20ce1bac3d8c109a8 100644
|
||||
index ad78395c33bba4f6a7bd73bae2a3b6e0658ed59e..a3ba1001a60b764c9ef1c824917fe4d5b81ed0b2 100644
|
||||
--- a/build/moz.build
|
||||
+++ b/build/moz.build
|
||||
@@ -91,7 +91,7 @@ if CONFIG["MOZ_APP_BASENAME"]:
|
||||
@@ -90,7 +90,7 @@ if CONFIG["MOZ_APP_BASENAME"]:
|
||||
if CONFIG[var]:
|
||||
appini_defines[var] = True
|
||||
|
||||
|
@@ -1,17 +1,24 @@
|
||||
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
|
||||
index a9863858f9a28b2c633edd9689d4379203eef1e6..7ac24baf70727a2a9be428c6f98763f312a0969b 100644
|
||||
index 85974462e5ce2b7dbf85bd5c79f09b3db5c25915..428a245cdf58d959256aa3c975687f31aed16b05 100644
|
||||
--- a/modules/libpref/init/StaticPrefList.yaml
|
||||
+++ b/modules/libpref/init/StaticPrefList.yaml
|
||||
@@ -18305,7 +18305,7 @@
|
||||
@@ -18462,13 +18462,13 @@
|
||||
# Whether we use the mica backdrop. Off by default for now.
|
||||
- name: widget.windows.mica
|
||||
type: bool
|
||||
- value: false
|
||||
+ value: true
|
||||
mirror: once
|
||||
#endif
|
||||
mirror: always
|
||||
|
||||
@@ -18418,6 +18418,26 @@
|
||||
# Whether we use the mica backdrop for popups. Off by default for now.
|
||||
- name: widget.windows.mica.popups
|
||||
type: RelaxedAtomicBool
|
||||
- value: false
|
||||
+ value: true
|
||||
mirror: always
|
||||
|
||||
# Whether we expand the client area into the taskbar hidden edge on maximized
|
||||
@@ -18594,6 +18594,26 @@
|
||||
mirror: always
|
||||
#endif
|
||||
|
||||
|
@@ -1,8 +1,24 @@
|
||||
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
|
||||
index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b7dc639db 100644
|
||||
index e5e517635d639f43de064fdc81a33090c28ca786..67ce7a27d93c3c6f9c8045c2d5796b85bf059113 100644
|
||||
--- a/toolkit/moz.configure
|
||||
+++ b/toolkit/moz.configure
|
||||
@@ -81,10 +81,13 @@ option(
|
||||
@@ -22,6 +22,7 @@ def check_moz_app_id(moz_app_id, build_project):
|
||||
|
||||
project_flag(
|
||||
env="MOZ_APP_VENDOR",
|
||||
+ default="Zen Team",
|
||||
nargs=1,
|
||||
help='Used for application.ini\'s "Vendor" field, which also impacts profile location and user-visible fields',
|
||||
)
|
||||
@@ -35,6 +36,7 @@ project_flag(
|
||||
|
||||
project_flag(
|
||||
"MOZ_APP_PROFILE",
|
||||
+ default="zen",
|
||||
nargs=1,
|
||||
help='Used for application.ini\'s "Profile" field, which controls profile location',
|
||||
)
|
||||
@@ -87,10 +89,13 @@ option(
|
||||
)
|
||||
set_config("MOZ_INCLUDE_SOURCE_INFO", True, when="MOZ_INCLUDE_SOURCE_INFO")
|
||||
|
||||
@@ -17,7 +33,7 @@ index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b
|
||||
help="Set distribution-specific id",
|
||||
)
|
||||
set_config("MOZ_DISTRIBUTION_ID", depends("--with-distribution-id")(lambda v: v[0]))
|
||||
@@ -869,9 +872,9 @@ set_define("MOZ_AV1", av1)
|
||||
@@ -881,9 +886,9 @@ set_config("MOZ_SYSTEM_AV1", True, when="--with-system-av1")
|
||||
option("--disable-jxl", help="Disable jxl image support")
|
||||
|
||||
|
||||
@@ -30,7 +46,7 @@ index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b
|
||||
return True
|
||||
|
||||
|
||||
@@ -2012,7 +2015,7 @@ set_define("A11Y_LOG", True, when=a11y_log)
|
||||
@@ -2019,7 +2024,7 @@ set_define("A11Y_LOG", True, when=a11y_log)
|
||||
# ==============================================================
|
||||
@depends(milestone)
|
||||
def require_signing(milestone):
|
||||
|
@@ -5,45 +5,26 @@ index 648c65a9c21dc0e670b50c82cbfb237a68a951d9..ba20bfdd8e6b9cc985977d06e166147e
|
||||
@@ -21,8 +21,8 @@ panel {
|
||||
--panel-border-color: ThreeDShadow;
|
||||
--panel-width: initial;
|
||||
|
||||
|
||||
- --panel-shadow-margin: 0px;
|
||||
- --panel-shadow: 0 0 var(--panel-shadow-margin) hsla(0,0%,0%,.2);
|
||||
+ --panel-shadow-margin: 10px !important;
|
||||
+ --panel-shadow: var(--zen-big-shadow);
|
||||
-moz-window-input-region-margin: var(--panel-shadow-margin);
|
||||
margin: calc(-1 * var(--panel-shadow-margin));
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@ panel {
|
||||
--background-color-canvas: var(--panel-background);
|
||||
|
||||
|
||||
@media (-moz-platform: linux) {
|
||||
- --panel-border-radius: 8px;
|
||||
- --panel-padding-block: 3px;
|
||||
|
||||
|
||||
@media (prefers-contrast) {
|
||||
--panel-border-color: color-mix(in srgb, currentColor 60%, transparent);
|
||||
@@ -49,18 +47,6 @@ panel {
|
||||
--panel-border-radius: 0px !important;
|
||||
}
|
||||
|
||||
- @media (-moz-platform: macos) {
|
||||
- appearance: auto;
|
||||
- -moz-default-appearance: menupopup;
|
||||
- /* We set the default background here, rather than on ::part(content),
|
||||
- * because otherwise it'd interfere with the native look. Non-native-looking
|
||||
- * popups should get their background via --panel-background */
|
||||
- background-color: Menu;
|
||||
- --panel-background: none;
|
||||
- --panel-border-color: transparent;
|
||||
- /* This should be kept in sync with GetMenuMaskImage() */
|
||||
- --panel-border-radius: 6px;
|
||||
- }
|
||||
|
||||
&::part(content) {
|
||||
display: flex;
|
||||
@@ -198,7 +184,6 @@ panel:where([type="arrow"]) {
|
||||
}
|
||||
|
||||
|
||||
&[animating] {
|
||||
- pointer-events: none;
|
||||
}
|
||||
|
12
src/widget/windows/WinUtils-cpp.patch
Normal file
12
src/widget/windows/WinUtils-cpp.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp
|
||||
index 598c96cbb5cd06a986a5793ebe9c5438d419d4a9..de1317749e6a6dd7df644818970d7706a51e6c14 100644
|
||||
--- a/widget/windows/WinUtils.cpp
|
||||
+++ b/widget/windows/WinUtils.cpp
|
||||
@@ -2007,6 +2007,7 @@ bool WinUtils::GetTimezoneName(wchar_t* aBuffer) {
|
||||
static constexpr nsLiteralCString kMicaPrefs[] = {
|
||||
"widget.windows.mica"_ns,
|
||||
"widget.windows.mica.popups"_ns,
|
||||
+ "zen.widget.windows.acrylic"_ns,
|
||||
};
|
||||
|
||||
static BOOL CALLBACK UpdateMicaInHwnd(HWND aHwnd, LPARAM aLParam) {
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
|
||||
index 209fa7536df662e24bc6739b7ac9f911fba70ff0..321bb19cf7996a4632110e0099585d7e4ca4ca8a 100644
|
||||
index d2863d5fd9ce5cedc88253a07cb061a660d42e61..28e63f8bb0b6c8d3b5655b285ea1040ea426616d 100644
|
||||
--- a/widget/windows/nsWindow.cpp
|
||||
+++ b/widget/windows/nsWindow.cpp
|
||||
@@ -165,6 +165,7 @@
|
||||
@@ -10,12 +10,12 @@ index 209fa7536df662e24bc6739b7ac9f911fba70ff0..321bb19cf7996a4632110e0099585d7e
|
||||
#include "nsNativeAppSupportWin.h"
|
||||
|
||||
#include "nsIGfxInfo.h"
|
||||
@@ -2535,7 +2536,7 @@ void nsWindow::SetMicaBackdrop(bool aEnabled) {
|
||||
|
||||
// Enable Mica Alt Material if available.
|
||||
const DWM_SYSTEMBACKDROP_TYPE type =
|
||||
- aEnabled ? DWMSBT_TABBEDWINDOW : DWMSBT_AUTO;
|
||||
+ aEnabled ? (StaticPrefs::zen_widget_windows_acrylic_AtStartup() ? DWMSBT_TRANSIENTWINDOW : DWMSBT_TABBEDWINDOW) : DWMSBT_AUTO;
|
||||
DwmSetWindowAttribute(mWnd, DWMWA_SYSTEMBACKDROP_TYPE, &type, sizeof type);
|
||||
}
|
||||
|
||||
@@ -2546,7 +2547,7 @@ void nsWindow::UpdateMicaBackdrop(bool aForce) {
|
||||
if (!useBackdrop) {
|
||||
return DWMSBT_AUTO;
|
||||
}
|
||||
- return IsPopup() ? DWMSBT_TRANSIENTWINDOW : DWMSBT_TABBEDWINDOW;
|
||||
+ return IsPopup() ? DWMSBT_TRANSIENTWINDOW : (StaticPrefs::zen_widget_windows_acrylic_AtStartup() ? DWMSBT_TRANSIENTWINDOW : DWMSBT_TABBEDWINDOW);
|
||||
}();
|
||||
::DwmSetWindowAttribute(mWnd, DWMWA_SYSTEMBACKDROP_TYPE, &backdrop,
|
||||
sizeof backdrop);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
"version": {
|
||||
"product": "firefox",
|
||||
"version": "136.0.4",
|
||||
"candidate": "136.0.4"
|
||||
"candidate": "137.0"
|
||||
},
|
||||
"buildOptions": {
|
||||
"generateBranding": true
|
||||
|
Reference in New Issue
Block a user