Merge branch 'download-animation' of https://github.com/BrielOtero/desktop into download-animation

This commit is contained in:
Mr. M
2025-04-27 09:21:36 +02:00
145 changed files with 56451 additions and 1609 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/actors/WebRTCParent.sys.mjs b/browser/actors/WebRTCParent.sys.mjs
index be66de4a1ef044341c2e1d6953806550897df45a..ff6ef3511076b25e00ca4d0189f666ec7aa94fe8 100644
index 40e3a057a1d4b2f9bcfb73fa5ff96b2555865434..a92bed06766dd930bd336d56cd9ddcf3c6c0eeca 100644
--- a/browser/actors/WebRTCParent.sys.mjs
+++ b/browser/actors/WebRTCParent.sys.mjs
@@ -152,6 +152,7 @@ export class WebRTCParent extends JSWindowActorParent {

View File

@@ -1,8 +1,8 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index 78572e5480a6137c5b7de89c489956f5d68ef698..1c72fe9a5419e211dea25271113981aeda46ec66 100644
index 89b8b830e8f53582dd9910b0172098d31a8d8967..51bdc847823cb95f811b7e9d2d864b9aacf0e364 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -3363,3 +3363,5 @@ pref("toolkit.contentRelevancy.enabled", false);
@@ -3375,3 +3375,5 @@ pref("toolkit.contentRelevancy.enabled", false);
pref("toolkit.contentRelevancy.ingestEnabled", false);
// Pref to enable extra logging for the content relevancy feature
pref("toolkit.contentRelevancy.log", false);

View File

@@ -31,6 +31,7 @@ pref("browser.privateWindowSeparation.enabled", false);
// Mica
pref("widget.windows.mica", true);
pref("widget.windows.mica.popups", true);
pref("widget.windows.mica.toplevel-backdrop", 2);
#endif
pref('browser.newtabpage.activity-stream.newtabWallpapers.enabled', true);
@@ -142,10 +143,6 @@ pref('zen.view.experimental-rounded-view', false);
pref('zen.view.experimental-rounded-view', true);
#endif
#ifdef XP_WIN
pref('zen.widget.windows.acrylic', true);
#endif
// Glance
pref('zen.glance.enabled', true);
pref('zen.glance.hold-duration', 300); // in ms
@@ -205,7 +202,6 @@ pref('zen.downloads.download-animation-duration', 1210); // ms
pref('zen.startup.smooth-scroll-in-tabs', true);
// Zen Workspaces
pref('zen.workspaces.disabled_for_testing', false);
pref('zen.workspaces.hide-default-container-indicator', true);
pref('zen.workspaces.force-container-workspace', false);
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', false);
@@ -341,11 +337,7 @@ pref("network.predictor.enable-hover-on-ssl", true);
pref("network.http.speculative-parallel-limit", 10);
pref("network.http.rcwn.enabled", false);
// Enable Browser Toolbox, Ctrl+Shift+Alt+I for debugging and modifying UI
pref("devtools.debugger.remote-enabled", false);
pref("devtools.chrome.enabled", true);
// Disable firefox's revamp
// Disable Firefox's revamp
pref("sidebar.revamp", false, locked);
pref("sidebar.verticalTabs", false, locked);
@@ -460,10 +452,6 @@ pref("browser.ml.chat.sidebar", false);
pref("browser.ml.enable", false);
// ---- Experimental settings to try make zen faster
pref("gfx.canvas.accelerated.cache-items", 32768);
pref("gfx.canvas.accelerated.cache-size", 256);
pref("gfx.content.skia-font-cache-size", 80);
pref("media.memory_cache_max_size", 1048576);
pref("media.cache_readahead_limit", 9000);
pref("media.cache_resume_threshold", 3600);
@@ -478,4 +466,5 @@ pref("layers.gpu-process.enabled", true);
// Picture-in-picture
pref("media.videocontrols.picture-in-picture.video-toggle.enabled", true);
pref("media.videocontrols.picture-in-picture.enable-when-switching-tabs.enabled", true);
// TODO: Enable once we have a proper settings page
pref("media.videocontrols.picture-in-picture.enable-when-switching-tabs.enabled", false);

View File

@@ -1,14 +1,14 @@
diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml
index 2ca8bdd2674fb4addf3bbf94ff17abc5c93c6293..dd965d8d190e8cdacbeb3d80995ad1a906e64079 100644
index 7d7e8697f02f90d4f336c9ab0a73a89848e0c21c..d113b439888d26629ce5f6b5d35f8fa12249774b 100644
--- a/browser/base/content/browser-box.inc.xhtml
+++ b/browser/base/content/browser-box.inc.xhtml
@@ -26,7 +26,13 @@
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
<box id="after-splitter"></box>
</div>
@@ -23,7 +23,13 @@
<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"/>
+<vbox flex="1" id="zen-appcontent-wrapper">
+<html:div id="zen-appcontent-navbar-container"></html:div>
+<hbox id="zen-tabbox-wrapper" flex="1">
+ <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
<tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"/>

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index b89846a1103827b7e65c0b6c9197e80761e3f5c0..cc7205765244738743db92bfcafc1f288919ae0d 100644
index ea79d296e7dd0f8fd812b0677a252af5cf7ad26e..bd95ef5d6b99399c859af1cf71d9d62477f4ac2b 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -33,6 +33,7 @@ ChromeUtils.defineESModuleGetters(this, {
@@ -10,7 +10,7 @@ index b89846a1103827b7e65c0b6c9197e80761e3f5c0..cc7205765244738743db92bfcafc1f28
DevToolsSocketStatus:
"resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
@@ -2698,6 +2699,11 @@ var XULBrowserWindow = {
@@ -2338,6 +2339,11 @@ var XULBrowserWindow = {
AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser);
TranslationsParent.onLocationChange(gBrowser.selectedBrowser);
@@ -22,7 +22,7 @@ index b89846a1103827b7e65c0b6c9197e80761e3f5c0..cc7205765244738743db92bfcafc1f28
PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser);
if (!gMultiProcessBrowser) {
@@ -5194,7 +5200,7 @@ function switchToTabHavingURI(
@@ -4814,7 +4820,7 @@ function switchToTabHavingURI(
ignoreQueryString || replaceQueryString,
ignoreFragmentWhenComparing
);
@@ -31,7 +31,7 @@ index b89846a1103827b7e65c0b6c9197e80761e3f5c0..cc7205765244738743db92bfcafc1f28
for (let i = 0; i < browsers.length; i++) {
let browser = browsers[i];
let browserCompare = cleanURL(
@@ -5235,7 +5241,7 @@ function switchToTabHavingURI(
@@ -4857,7 +4863,7 @@ function switchToTabHavingURI(
}
if (!doAdopt) {

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
index 0d0a559a6473149b50f4bf18d059e86907c4acd3..25ad798eb26f04262d069fdaf1f3fb00adec9807 100644
index 51a25aaa5558e6e17246d54a7ed95d5ddf3ecdab..b49984c8711fc9f5f19f0cf6ecca07a8cca0d125 100644
--- a/browser/base/content/browser.xhtml
+++ b/browser/base/content/browser.xhtml
@@ -26,6 +26,7 @@
@@ -10,35 +10,28 @@ index 0d0a559a6473149b50f4bf18d059e86907c4acd3..25ad798eb26f04262d069fdaf1f3fb00
persist="screenX screenY width height sizemode"
data-l10n-sync="true">
<head>
@@ -104,6 +105,8 @@
@@ -104,8 +105,11 @@
<title data-l10n-id="browser-main-window-default-title"></title>
+#include zen-preloaded.inc.xhtml
+
# 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.
@@ -148,6 +151,7 @@
window.addEventListener("DOMContentLoaded",
gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true });
</script>
<script src="chrome://browser/content/global-scripts.js"></script>
<script src="chrome://browser/content/browser-main.js"></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)
@@ -169,9 +173,11 @@
@@ -127,9 +131,12 @@
</vbox>
</html:template>
-#include navigator-toolbox.inc.xhtml
-
-#include browser-box.inc.xhtml
+ <hbox id="zen-main-app-wrapper" flex="1" persist="zen-compact-mode">
+ <vbox id="zen-toast-container"></vbox>
+ #include navigator-toolbox.inc.xhtml
+ #include browser-box.inc.xhtml
+ </hbox>
+<hbox id="zen-main-app-wrapper" flex="1" persist="zen-compact-mode">
+ <vbox id="zen-toast-container"></vbox>
#include navigator-toolbox.inc.xhtml
#include browser-box.inc.xhtml
+</hbox>
<html:template id="customizationPanel">
<box id="customization-container" flex="1" hidden="true"><![CDATA[

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
index feb9e4ef7e872b4cfbf0d55f24a34db275951c66..3ce9b9919ff736885b8aa8943bbbce3c5d0f33a6 100644
index 00c8976d3e258c0875d7da2f3ec823d8907a84c9..b5735712aaa7c2ae2baa4b858e735413b130ca94 100644
--- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -2,7 +2,7 @@
@@ -11,46 +11,29 @@ index feb9e4ef7e872b4cfbf0d55f24a34db275951c66..3ce9b9919ff736885b8aa8943bbbce3c
<script src="chrome://browser/content/navigator-toolbox.js" />
<!-- Menu -->
@@ -17,9 +17,8 @@
@@ -17,9 +17,9 @@
#include browser-menubar.inc
</toolbaritem>
<spacer flex="1" skipintoolbarset="true" style="order: 1000;"/>
-#include titlebar-items.inc.xhtml
</toolbar>
-
+<hbox id="titlebar">
<toolbar id="TabsToolbar"
class="browser-toolbar browser-titlebar"
fullscreentoolbar="true"
@@ -32,7 +31,7 @@
<hbox class="titlebar-spacer" type="pre-tabs"/>
- <hbox flex="1" align="end" class="toolbar-items">
+ <hbox flex="1" align="start" class="toolbar-items">
<toolbartabstop/>
<hbox id="TabsToolbar-customization-target" flex="1">
<toolbarbutton id="firefox-view-button"
@@ -40,6 +39,7 @@
data-l10n-id="toolbar-button-firefox-view-2"
role="button"
aria-pressed="false"
+ hidden="true"
cui-areatype="toolbar"
removable="true"/>
@@ -50,6 +50,10 @@
tooltip="tabbrowser-tab-tooltip"
orient="horizontal"
stopwatchid="FX_TAB_CLICK_MS">
+<html:div id="zen-essentials-container" skipintoolbarset="true"></html:div>
stopwatchid="tabClick">
+<html:div id="zen-essentials-wrapper" skipintoolbarset="true"></html:div>
+<hbox id="zen-current-workspace-indicator-container"></hbox>
+<html:div id="zen-tabs-wrapper">
+<html:div id="zen-browser-tabs-container">
<hbox class="tab-drop-indicator" hidden="true"/>
<html:span id="tab-drag-empty-feedback" role="presentation"/>
# If the name (tabbrowser-arrowscrollbox) or structure of this changes
# significantly, there is an optimization in
@@ -75,6 +79,8 @@
@@ -76,6 +80,8 @@
tooltip="dynamic-shortcut-tooltip"
data-l10n-id="tabs-toolbar-new-tab"/>
<html:span id="tabbrowser-tab-a11y-desc" hidden="true"/>
@@ -59,7 +42,7 @@ index feb9e4ef7e872b4cfbf0d55f24a34db275951c66..3ce9b9919ff736885b8aa8943bbbce3c
</tabs>
<toolbarbutton id="new-tab-button"
@@ -100,10 +106,10 @@
@@ -101,9 +107,10 @@
#include private-browsing-indicator.inc.xhtml
<toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/>
@@ -67,20 +50,7 @@ index feb9e4ef7e872b4cfbf0d55f24a34db275951c66..3ce9b9919ff736885b8aa8943bbbce3c
+#include zen-sidebar-icons.inc.xhtml
</toolbar>
-
+</hbox>
<toolbar id="nav-bar"
class="browser-toolbar chromeclass-location"
data-l10n-id="navbar-accessible"
@@ -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
<toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/>
-#include titlebar-items.inc.xhtml
</toolbar>
<toolbar id="PersonalToolbar"

View File

@@ -1,16 +1,11 @@
diff --git a/browser/base/content/nsContextMenu.sys.mjs b/browser/base/content/nsContextMenu.sys.mjs
index 94d3c2bb401c2e4246340a6c2d63c9d3561ff5e1..62c599f78748e708c8f36c05935822e8808996b5 100644
index 3bd0ee8af8b696161d18fd2a978f9e25972ed3ad..9e602a942271bd54231dc66363f8db51aea9e78a 100644
--- a/browser/base/content/nsContextMenu.sys.mjs
+++ b/browser/base/content/nsContextMenu.sys.mjs
@@ -1109,6 +1109,13 @@ export class nsContextMenu {
@@ -1111,6 +1111,8 @@ export class nsContextMenu {
!this.isSecureAboutPage()
);
+ this.showItem(
+ "context-zenAddToWebPanel",
+ this.onLink && !this.onMailtoLink && !this.onTelLink
+ );
+
+ this.showItem("context-zenSplitLink", this.onLink && !this.onMailtoLink && !this.onTelLink);
+
let canNotStrip =

View File

@@ -30,11 +30,11 @@
# Scripts used all over the browser
<script>
Services.scriptloader.loadSubScript("chrome://browser/content/ZenUIManager.mjs", this);
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/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);

View File

@@ -53,7 +53,6 @@
content/browser/zen-components/ZenPinnedTabManager.mjs (../../zen/tabs/ZenPinnedTabManager.mjs)
content/browser/zen-styles/zen-tabs.css (../../zen/tabs/zen-tabs.css)
* content/browser/zen-styles/zen-tabs/vertical-tabs.css (../../zen/tabs/zen-tabs/vertical-tabs.css)
content/browser/zen-styles/zen-tabs/horizontal-tabs.css (../../zen/tabs/zen-tabs/horizontal-tabs.css)
content/browser/zen-components/ZenGlanceManager.mjs (../../zen/glance/ZenGlanceManager.mjs)
content/browser/zen-styles/zen-glance.css (../../zen/glance/zen-glance.css)

View File

@@ -2,6 +2,9 @@
<command id="cmd_zenCompactModeToggle" />
<command id="cmd_zenCompactModeShowSidebar" />
<command id="cmd_zenCompactModeShowToolbar" />
<command id="cmd_zenCompactModeHideSidebar" />
<command id="cmd_zenCompactModeHideToolbar" />
<command id="cmd_zenCompactModeHideBoth" />
<command id="cmd_zenWorkspaceForward" />
<command id="cmd_zenWorkspaceBackward" />
@@ -11,6 +14,7 @@
<command id="cmd_zenSplitViewHorizontal" />
<command id="cmd_zenSplitViewUnsplit" />
<command id="cmd_zenSplitViewLinkInNewTab" />
<command id="cmd_zenSplitViewContextMenu" />
<!-- Workspace commands -->
<command id="cmd_zenWorkspaceSwitch1" />

View File

@@ -1,5 +1,5 @@
<panel flip="side" type="arrow" orient="vertical" id="PanelUI-zen-gradient-generator" position="bottomright topright" mainview="true" side="left" onpopuphidden="gZenThemePicker.handlePanelClose();" onpopupshowing="gZenThemePicker.handlePanelOpen();">
<panel flip="side" type="arrow" orient="vertical" id="PanelUI-zen-gradient-generator" position="bottomright topright" mainview="true" side="left">
<panelmultiview id="PanelUI-zen-gradient-generator-multiview" mainViewId="PanelUI-zen-gradient-generator-view">
<panelview id="PanelUI-zen-gradient-generator-view" class="PanelUI-subView zen-theme-picker" role="document" mainview-with-header="true" has-custom-header="true">
<hbox>
@@ -34,7 +34,7 @@
<hbox id="PanelUI-zen-gradient-colors-wrapper">
<vbox flex="1">
<label data-l10n-id="zen-panel-ui-gradient-generator-opacity-text"></label>
<html:input type="range" min="0" max="1" value="0.5" step="0.05" oninput="gZenThemePicker.onOpacityChange(event);" id="PanelUI-zen-gradient-generator-opacity" />
<html:input type="range" min="0" max="1" value="0.5" step="0.05" id="PanelUI-zen-gradient-generator-opacity" />
</vbox>
<vbox id="PanelUI-zen-gradient-generator-texture-wrapper">
</vbox>
@@ -45,7 +45,7 @@
<label data-l10n-id="zen-panel-ui-gradient-generator-custom-color"></label>
<hbox>
<html:input type="text" placeholder="#000000" id="PanelUI-zen-gradient-generator-custom-input" />
<toolbarbutton id="PanelUI-zen-gradient-generator-color-custom-add" class="subviewbutton" oncommand="gZenThemePicker.addCustomColor();" data-l10n-id="zen-panel-ui-gradient-generator-custom-color-add">
<toolbarbutton id="PanelUI-zen-gradient-generator-color-custom-add" class="subviewbutton" data-l10n-id="zen-panel-ui-gradient-generator-custom-color-add">
<image></image>
</toolbarbutton>
</hbox>
@@ -57,16 +57,16 @@
</panelmultiview>
</panel>
<panel flip="slide" type="arrow" orient="vertical" id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left" onpopuphidden="ZenWorkspaces.handlePanelHidden();">
<panel flip="slide" type="arrow" orient="vertical" id="PanelUI-zen-workspaces" position="bottomright topright" mainview="true" side="left">
<panelmultiview id="PanelUI-zen-workspaces-multiview" mainViewId="PanelUI-zen-workspaces-view">
<panelview id="PanelUI-zen-workspaces-view" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true" closemenu="none">
<vbox>
<hbox>
<h3 data-l10n-id="zen-panel-ui-workspaces-text" id="PanelUI-zen-workspaces-header"></h3>
<toolbarbutton id="PanelUI-zen-workspaces-reorder-mode" oncommand="ZenWorkspaces.toggleReorderMode();" class="subviewbutton">
<toolbarbutton id="PanelUI-zen-workspaces-reorder-mode" class="subviewbutton">
<image></image>
</toolbarbutton>
<toolbarbutton id="PanelUI-zen-workspaces-new" oncommand="ZenWorkspaces.openSaveDialog();" class="subviewbutton">
<toolbarbutton id="PanelUI-zen-workspaces-new" class="subviewbutton">
<image></image>
</toolbarbutton>
</hbox>
@@ -78,14 +78,14 @@
<vbox class="PanelUI-zen-workspaces-user-create">
<h1 data-l10n-id="zen-panel-ui-workspaces-create-text"></h1>
<hbox class="PanelUI-zen-workspaces-creation-wraper">
<hbox class="PanelUI-zen-workspaces-icons-container create" onclick="ZenWorkspaces.onWorkspaceIconContainerClick(event);"></hbox>
<html:input autofocus="true" id="PanelUI-zen-workspaces-create-input" type="text" placeholder="Enter workspace name" oninput="ZenWorkspaces.onWorkspaceCreationNameChange(this);" />
<hbox class="PanelUI-zen-workspaces-icons-container create"></hbox>
<html:input autofocus="true" id="PanelUI-zen-workspaces-create-input" type="text" placeholder="Enter workspace name" />
</hbox>
</vbox>
<html:moz-button-group class="panel-footer" id="PanelUI-zen-workspaces-create-footer">
<button disabled="true" default="true" slot="primary" id="PanelUI-zen-workspaces-create-save" oncommand="ZenWorkspaces.saveWorkspaceFromCreate();" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-create-save">
<button disabled="true" default="true" slot="primary" id="PanelUI-zen-workspaces-create-save" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-create-save">
</button>
<button id="PanelUI-zen-workspaces-create-cancel" oncommand="ZenWorkspaces.closeWorkspacesSubView();" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-create-cancel">
<button id="PanelUI-zen-workspaces-create-cancel" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-create-cancel">
</button>
</html:moz-button-group>
</panelview>
@@ -93,43 +93,39 @@
<vbox class="PanelUI-zen-workspaces-user-create">
<h1 data-l10n-id="zen-panel-ui-workspaces-edit-text"></h1>
<hbox class="PanelUI-zen-workspaces-creation-wraper">
<hbox class="PanelUI-zen-workspaces-icons-container edit" onclick="ZenWorkspaces.onWorkspaceIconContainerClick(event);"></hbox>
<html:input autofocus="true" id="PanelUI-zen-workspaces-edit-input" type="text" placeholder="Enter workspace name" oninput="ZenWorkspaces.onWorkspaceEditChange();" />
<hbox class="PanelUI-zen-workspaces-icons-container edit"></hbox>
<html:input autofocus="true" id="PanelUI-zen-workspaces-edit-input" type="text" placeholder="Enter workspace name" />
</hbox>
</vbox>
<html:moz-button-group class="panel-footer" id="PanelUI-zen-workspaces-edit-footer">
<button disabled="true" default="true" slot="primary" id="PanelUI-zen-workspaces-edit-save" oncommand="ZenWorkspaces.saveWorkspaceFromEdit();" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-edit-save">
<button disabled="true" default="true" slot="primary" id="PanelUI-zen-workspaces-edit-save" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-edit-save">
</button>
<button id="PanelUI-zen-workspaces-edit-cancel" oncommand="ZenWorkspaces.closeWorkspacesSubView();" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-edit-cancel">
<button id="PanelUI-zen-workspaces-edit-cancel" class="footer-button" data-l10n-id="zen-panel-ui-workspaces-edit-cancel">
</button>
</html:moz-button-group>
</panelview>
<panelview id="PanelUI-zen-workspaces-icon-picker" class="PanelUI-subView" role="document" mainview-with-header="true" has-custom-header="true">
<vbox id="PanelUI-zen-workspaces-icon-picker-wrapper">
<html:div id="PanelUI-zen-workspaces-icon-search-bar">
<html:input autofocus="true" type="text" id="PanelUI-zen-workspaces-icon-search-input" oninput="ZenWorkspaces.conductSearch();"/>
<html:input autofocus="true" type="text" id="PanelUI-zen-workspaces-icon-search-input"/>
</html:div>
</vbox>
</panelview>
</panelmultiview>
</panel>
<menupopup id="zenWorkspaceActionsMenu"
onpopupshowing="ZenWorkspaces.updateContextMenu(this);"
onpopuphidden="if (event.target == this) ZenWorkspaces.onContextMenuClose();">
<menuitem id="context_zenOpenWorkspace" oncommand="ZenWorkspaces.openWorkspace();" data-l10n-id="zen-workspaces-panel-context-open"/>
<menupopup id="zenWorkspaceActionsMenu">
<menuitem id="context_zenOpenWorkspace" data-l10n-id="zen-workspaces-panel-context-open"/>
<menuseparator/>
<menuitem id="context_zenSetAsDefaultWorkspace" oncommand="ZenWorkspaces.setDefaultWorkspace();" data-l10n-id="zen-workspaces-panel-context-set-default"/>
<menuitem id="context_zenEditWorkspace" oncommand="ZenWorkspaces.contextEdit(event);" data-l10n-id="zen-workspaces-panel-context-edit"/>
<menuitem id="context_zenEditWorkspace" data-l10n-id="zen-workspaces-panel-context-edit"/>
<menu id="context_zenWorkspacesOpenInContainerTab"
data-l10n-id="zen-workspaces-panel-context-open-in-container-tab"
selection-type="single"
node-type="link"
hide-if-private-browsing="true"
hide-if-usercontext-disabled="true">
<menupopup oncommand="ZenWorkspaces.contextChangeContainerTab(event);"
onpopupshowing="return ZenWorkspaces.createContainerTabMenu(event);" />
<menupopup />
</menu>
<menuseparator/>
<menuitem id="context_zenDeleteWorkspace" oncommand="ZenWorkspaces.contextDelete(event);" data-l10n-id="zen-workspaces-panel-context-delete"/>
<menuitem id="context_zenDeleteWorkspace" data-l10n-id="zen-workspaces-panel-context-delete"/>
</menupopup>

View File

@@ -8,6 +8,6 @@
skipintoolbarset="true"
context="toolbar-context-menu"
mode="icons">
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" data-l10n-id="sidebar-zen-expand" cui-areatype="toolbar" oncommand="gZenVerticalTabsManager.toggleExpand();"></toolbarbutton>
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" command="cmd_zenToggleSidebar" data-l10n-id="sidebar-zen-expand" cui-areatype="toolbar"></toolbarbutton>
<toolbarbutton id="zen-workspaces-button" class="chromeclass-toolbar-additional" overflows="false" removable="false"></toolbarbutton>
</toolbar>

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
index 824c5df20ee13af7af2ce8657506f6f3f457aafc..6ef49535676325768497c1804f91c9e93959199a 100644
index 4401c78d34007fa7481f8b8eeb070d17110821ae..064f14a7adf4ce1b98d58302998272444466c3ee 100644
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -103,3 +103,5 @@ browser.jar:
@@ -105,3 +105,5 @@ browser.jar:
# L10n resources and overrides.
% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/BrowserContentHandler.sys.mjs b/browser/components/BrowserContentHandler.sys.mjs
index 7747d90981aea9437bf2d9cf46ec17be0b9ad64c..656d640da0efeb59a4037bb450e0cb1f69dda0ba 100644
index 5911b276fdc9889d3cb61bac3d302ec5239e4a90..a405f8a0204e98fa9de08f1cd7b6761f0fc6198e 100644
--- a/browser/components/BrowserContentHandler.sys.mjs
+++ b/browser/components/BrowserContentHandler.sys.mjs
@@ -1270,6 +1270,7 @@ function maybeRecordToHandleTelemetry(uri, isLaunch) {

View File

@@ -1,20 +1,19 @@
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
index b8b6d30f0b3c968a8615ca601e06e50261d0dae6..5c2b718b902aed2ef8d7a4b622ba882ee937c655 100644
index a6a7f9165aece774c3f1c15f7e352b11a4bf90f4..a4b6124b85f099c6f12d297fc26f2040370c337c 100644
--- a/browser/components/BrowserGlue.sys.mjs
+++ b/browser/components/BrowserGlue.sys.mjs
@@ -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",
});
@@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
XPCOMUtils.defineLazyServiceGetters(lazy, {
@@ -1896,7 +1897,7 @@ BrowserGlue.prototype = {
lazy.TabCrashHandler.init();
ChromeUtils.defineESModuleGetters(lazy, {
+ gZenUIMigration: "chrome://browser/content/zen-components/ZenUIMigration.mjs",
AboutHomeStartupCache: "resource:///modules/AboutHomeStartupCache.sys.mjs",
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs",
@@ -1886,6 +1887,7 @@ BrowserGlue.prototype = {
lazy.ProcessHangMonitor.init();
-
+ lazy.gZenUIMigration.init(this._isNewProfile, aWindow);
// A channel for "remote troubleshooting" code...
let channel = new lazy.WebChannel(

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d16ee46c8 100644
index 91088fab1759b9af908912648d28daa5938a29c9..3f52ee8cd77ac171fd2cbf355ade1371e57d0db5 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -19,7 +19,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
const kSpecialWidgetPfx = "customizableui-special-";
@@ -317,13 +318,11 @@ var CustomizableUIInternal = {
@@ -338,13 +339,11 @@ var CustomizableUIInternal = {
"vertical-spacer",
"urlbar-container",
"spring",
@@ -35,7 +35,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
this.registerArea(
CustomizableUI.AREA_NAVBAR,
{
@@ -331,7 +330,6 @@ var CustomizableUIInternal = {
@@ -352,7 +351,6 @@ var CustomizableUIInternal = {
overflowable: true,
defaultPlacements: navbarPlacements,
verticalTabsDefaultPlacements: [
@@ -43,7 +43,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
"alltabs-button",
],
defaultCollapsed: false,
@@ -356,10 +354,7 @@ var CustomizableUIInternal = {
@@ -377,10 +375,7 @@ var CustomizableUIInternal = {
{
type: CustomizableUI.TYPE_TOOLBAR,
defaultPlacements: [
@@ -54,7 +54,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
],
verticalTabsDefaultPlacements: [],
defaultCollapsed: null,
@@ -422,6 +417,7 @@ var CustomizableUIInternal = {
@@ -462,6 +457,7 @@ var CustomizableUIInternal = {
CustomizableUI.AREA_NAVBAR,
CustomizableUI.AREA_BOOKMARKS,
CustomizableUI.AREA_TABSTRIP,
@@ -62,7 +62,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
]);
if (AppConstants.platform != "macosx") {
toolbars.add(CustomizableUI.AREA_MENUBAR);
@@ -1151,6 +1147,9 @@ var CustomizableUIInternal = {
@@ -1262,6 +1258,9 @@ var CustomizableUIInternal = {
placements = gPlacements.get(area);
}
@@ -72,7 +72,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
// For toolbars that need it, mark as dirty.
let defaultPlacements = areaProperties.get("defaultPlacements");
if (
@@ -1564,7 +1563,7 @@ var CustomizableUIInternal = {
@@ -1769,7 +1768,7 @@ var CustomizableUIInternal = {
lazy.log.info(
"Widget " + aWidgetId + " not found, unable to remove from " + aArea
);
@@ -81,7 +81,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
}
this.notifyDOMChange(widgetNode, null, container, true, () => {
@@ -1574,7 +1573,7 @@ var CustomizableUIInternal = {
@@ -1779,7 +1778,7 @@ var CustomizableUIInternal = {
// We also need to remove the panel context menu if it's there:
this.ensureButtonContextMenu(widgetNode);
if (gPalette.has(aWidgetId) || this.isSpecialWidget(aWidgetId)) {
@@ -90,7 +90,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
} else {
window.gNavToolbox.palette.appendChild(widgetNode);
}
@@ -1704,16 +1703,16 @@ var CustomizableUIInternal = {
@@ -1947,16 +1946,16 @@ var CustomizableUIInternal = {
elem.setAttribute("skipintoolbarset", "true");
}
}
@@ -110,18 +110,18 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
// Handle initial state of vertical tabs.
if (isVerticalTabs) {
// Show the vertical tabs toolbar
@@ -1873,6 +1872,10 @@ var CustomizableUIInternal = {
},
insertWidgetBefore(aNode, aNextNode, aContainer, aArea) {
+ if (aArea === CustomizableUI.AREA_NAVBAR && aNode.ownerGlobal.gZenVerticalTabsManager._hasSetSingleToolbar) {
@@ -2198,6 +2197,10 @@ var CustomizableUIInternal = {
* The identifier string of the area that aNode is being inserted into.
*/
insertWidgetBefore(aNode, aNextNode, aContainer, aAreaId) {
+ if (aAreaId === CustomizableUI.AREA_NAVBAR && aNode.ownerGlobal.gZenVerticalTabsManager._hasSetSingleToolbar) {
+ aContainer = aNode.ownerDocument.getElementById("zen-sidebar-top-buttons-customization-target");
+ aArea = "zen-sidebar-top-buttons";
+ aAreaId = "zen-sidebar-top-buttons";
+ }
this.notifyDOMChange(aNode, aNextNode, aContainer, false, () => {
this.setLocationAttributes(aNode, aArea);
this.setLocationAttributes(aNode, aAreaId);
aContainer.insertBefore(aNode, aNextNode);
@@ -2744,7 +2747,6 @@ var CustomizableUIInternal = {
@@ -3321,7 +3324,6 @@ var CustomizableUIInternal = {
if (!this.isWidgetRemovable(aWidgetId)) {
return;
}
@@ -129,16 +129,16 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
let placements = gPlacements.get(oldPlacement.area);
let position = placements.indexOf(aWidgetId);
if (position != -1) {
@@ -3735,7 +3737,7 @@ var CustomizableUIInternal = {
}
},
@@ -4556,7 +4558,7 @@ var CustomizableUIInternal = {
* For all registered areas, builds those areas to reflect the current
* placement state of all widgets.
*/
- _rebuildRegisteredAreas() {
+ _rebuildRegisteredAreas(zenDontRebuildCollapsed = false) {
for (let [areaId, areaNodes] of gBuildAreas) {
let placements = gPlacements.get(areaId);
let isFirstChangedToolbar = true;
@@ -3746,7 +3748,7 @@ var CustomizableUIInternal = {
@@ -4567,7 +4569,7 @@ var CustomizableUIInternal = {
if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
let defaultCollapsed = area.get("defaultCollapsed");
let win = areaNode.ownerGlobal;
@@ -147,7 +147,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
win.setToolbarVisibility(
areaNode,
typeof defaultCollapsed == "string"
@@ -4923,6 +4925,7 @@ export var CustomizableUI = {
@@ -5858,6 +5860,7 @@ export var CustomizableUI = {
unregisterArea(aName, aDestroyPlacements) {
CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);
},
@@ -155,7 +155,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
/**
* Add a widget to an area.
* If the area to which you try to add is not known to CustomizableUI,
@@ -6916,11 +6919,11 @@ class OverflowableToolbar {
@@ -7905,11 +7908,11 @@ class OverflowableToolbar {
parseFloat(style.paddingLeft) -
parseFloat(style.paddingRight) -
toolbarChildrenWidth;
@@ -169,7 +169,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
});
lazy.log.debug(
@@ -6930,7 +6933,8 @@ class OverflowableToolbar {
@@ -7919,7 +7922,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);
@@ -179,7 +179,7 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
return { isOverflowing, targetContentWidth, totalAvailWidth };
}
@@ -7024,7 +7028,7 @@ class OverflowableToolbar {
@@ -8013,7 +8017,7 @@ class OverflowableToolbar {
}
}
if (!inserted) {
@@ -188,13 +188,12 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
}
child.removeAttribute("cui-anchorid");
child.removeAttribute("overflowedItem");
@@ -7186,6 +7190,9 @@ class OverflowableToolbar {
* @param {MouseEvent} aEvent the click event.
*/
#onClickDefaultListButton(aEvent) {
+ if (aEvent.view.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') {
+ return;
+ }
if (this.#defaultListButton.open) {
this.#defaultListButton.open = false;
lazy.PanelMultiView.hidePopup(this.#defaultListPanel);
@@ -8358,7 +8362,7 @@ class OverflowableToolbar {
break;
}
case "mousedown": {
- if (aEvent.button != 0) {
+ if (aEvent.button != 0 || this.#toolbar.id == "zen-sidebar-top-buttons") { // Fix https://github.com/zen-browser/desktop/issues/7718
break;
}
if (aEvent.target == this.#defaultListButton) {

View File

@@ -1,9 +1,9 @@
diff --git a/browser/components/customizableui/CustomizeMode.sys.mjs b/browser/components/customizableui/CustomizeMode.sys.mjs
index c9bdc165ff9afc8c3e43ed2cda0612b32a55450f..34f8af56753e2a898f49247036d47973c70543a9 100644
index 619bb2af5a3a0995fc93fa040696dd2854848ab5..bbc6bad906e9ccaf668ca99f4a0411f564ef1e56 100644
--- a/browser/components/customizableui/CustomizeMode.sys.mjs
+++ b/browser/components/customizableui/CustomizeMode.sys.mjs
@@ -357,7 +357,7 @@ CustomizeMode.prototype = {
this._transitioning = true;
@@ -500,7 +500,7 @@ export class CustomizeMode {
this.#transitioning = true;
let customizer = document.getElementById("customization-container");
- let browser = document.getElementById("browser");
@@ -11,7 +11,7 @@ index c9bdc165ff9afc8c3e43ed2cda0612b32a55450f..34f8af56753e2a898f49247036d47973
browser.hidden = true;
customizer.hidden = false;
@@ -488,7 +488,7 @@ CustomizeMode.prototype = {
@@ -637,7 +637,7 @@ export class CustomizeMode {
}
let customizer = document.getElementById("customization-container");
@@ -20,9 +20,9 @@ index c9bdc165ff9afc8c3e43ed2cda0612b32a55450f..34f8af56753e2a898f49247036d47973
customizer.hidden = true;
browser.hidden = false;
@@ -2397,6 +2397,20 @@ CustomizeMode.prototype = {
@@ -3125,6 +3125,20 @@ export class CustomizeMode {
if (makeSpaceImmediately) {
aItem.setAttribute("notransition", "true");
aDraggedOverItem.setAttribute("notransition", "true");
}
+ if (aItem.parentElement.id === "TabsToolbar-customization-target") {
+ // We change the border values so we can properly implement the native vertical tabs
@@ -38,6 +38,6 @@ index c9bdc165ff9afc8c3e43ed2cda0612b32a55450f..34f8af56753e2a898f49247036d47973
+ aItem.style.borderBottomStyle = "solid";
+ }
+ }
aItem.style[prop] = borderWidth + "px";
aItem.style.removeProperty(otherProp);
aDraggedOverItem.style[prop] = borderWidth + "px";
aDraggedOverItem.style.removeProperty(otherProp);
if (makeSpaceImmediately) {

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/ToolbarContextMenu.sys.mjs b/browser/components/customizableui/ToolbarContextMenu.sys.mjs
index af22f766a052372a68faca139161cccbf0d768f0..199591ca0609e8902e84a87baf50acc29f84ee3a 100644
index b88b0166fb99bc3d44a2e05798650b8ad6ab9a46..2e66c8294f0ef4f91ae160bd55b7417b55e9f5b2 100644
--- a/browser/components/customizableui/ToolbarContextMenu.sys.mjs
+++ b/browser/components/customizableui/ToolbarContextMenu.sys.mjs
@@ -240,8 +240,8 @@ export var ToolbarContextMenu = {

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js
index 010d0813557efd6d5a3a84ea589989f6e9ff195a..e26cc1be1f56919e6ec5f2432854b284837671ac 100644
index ec52437dba30633a374299a46c856e1df05dec0e..48617e32d56c3b3f525557ddeac6297555c48c04 100644
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -515,8 +515,7 @@ const PanelUI = {
@@ -12,7 +12,7 @@ index 010d0813557efd6d5a3a84ea589989f6e9ff195a..e26cc1be1f56919e6ec5f2432854b284
.appendChild(tempPanel);
let multiView = document.createXULElement("panelmultiview");
@@ -960,7 +959,7 @@ const PanelUI = {
@@ -957,7 +956,7 @@ const PanelUI = {
el.removeAttribute("data-lazy-l10n-id");
});

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/places/PlacesUIUtils.sys.mjs b/browser/components/places/PlacesUIUtils.sys.mjs
index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..baaf34536f557c69fce3cc43e6f12658514db39f 100644
index 1f5e163bae58f3f1cac750ca32846cc8a80bd2ca..16034842b4ca5295aa3c9237db55035ecc4016d2 100644
--- a/browser/components/places/PlacesUIUtils.sys.mjs
+++ b/browser/components/places/PlacesUIUtils.sys.mjs
@@ -58,6 +58,7 @@ class BookmarkState {
@@ -59,6 +59,7 @@ class BookmarkState {
info,
tags = "",
keyword = "",
@@ -10,7 +10,7 @@ index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..baaf34536f557c69fce3cc43e6f12658
isFolder = false,
children = [],
autosave = false,
@@ -82,12 +83,18 @@ class BookmarkState {
@@ -83,12 +84,18 @@ class BookmarkState {
keyword,
parentGuid: info.parentGuid,
index,
@@ -29,7 +29,7 @@ index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..baaf34536f557c69fce3cc43e6f12658
/**
* Save edited title for the bookmark
*
@@ -181,6 +188,14 @@ class BookmarkState {
@@ -182,6 +189,14 @@ class BookmarkState {
"BookmarkState::createBookmark"
);
this._guid = results?.[0];
@@ -44,7 +44,7 @@ index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..baaf34536f557c69fce3cc43e6f12658
return this._guid;
}
@@ -214,6 +229,14 @@ class BookmarkState {
@@ -215,6 +230,14 @@ class BookmarkState {
"BookmarkState::save::createFolder"
);
this._guid = results[0];
@@ -59,7 +59,7 @@ index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..baaf34536f557c69fce3cc43e6f12658
return this._guid;
}
@@ -300,11 +323,97 @@ class BookmarkState {
@@ -301,11 +324,97 @@ class BookmarkState {
await lazy.PlacesTransactions.batch(transactions, "BookmarkState::save");
}
@@ -157,7 +157,7 @@ index fbdd6a34b12d4d957f7a2d9d95df0bfd65ba3f61..baaf34536f557c69fce3cc43e6f12658
/**
* Append transactions to update tags by given information.
*
@@ -902,8 +1011,15 @@ export var PlacesUIUtils = {
@@ -903,8 +1012,15 @@ export var PlacesUIUtils = {
aNode,
aWhere,
aWindow,

View File

@@ -1,10 +1,10 @@
diff --git a/browser/components/preferences/jar.mn b/browser/components/preferences/jar.mn
index 3b60d18e483bc3c4e9b4309f0dc1e4231b7116b1..e5b679b25941a7f1ed52db9fa3f7740a7220b9e4 100644
index 118709048e7de13f6ac10d0047e446b72303428f..c8cc2d7ee551b96be668a7844dab1db5abc9d684 100644
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/jar.mn
@@ -23,3 +23,5 @@ browser.jar:
content/browser/preferences/more-from-mozilla-qr-code-simple-cn.svg
content/browser/preferences/web-appearance-dark.svg
content/browser/preferences/web-appearance-light.svg
@@ -26,3 +26,5 @@ browser.jar:
content/browser/preferences/widgets/setting-control.mjs (widgets/setting-control/setting-control.mjs)
content/browser/preferences/widgets/setting-group.mjs (widgets/setting-group/setting-group.mjs)
content/browser/preferences/widgets/setting-group.css (widgets/setting-group/setting-group.css)
+
+ content/browser/preferences/zen-settings.js

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
index 8f6f78419a0876ebe6d0967a88ef03e464dbbd23..9339085014b797033c4ee1ed2e40f2506d1e9797 100644
index aa339be9ba94ed776fa25f2d72f9e6b25dc86cd3..4c6c725942b3d6f2a42938d444ac7645526623cc 100644
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -218,7 +218,7 @@ function getBundleForLocales(newLocales) {
@@ -389,7 +389,7 @@ function getBundleForLocales(newLocales) {
])
);
return new Localization(

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index 6386773b287ca6d06a0abe928850c5bb465828ed..b3459a2abcac5f21a5b24189ec1dc88e24626687 100644
index e4746e3408e68273126e6d2baf5afcf80721674b..e478aaf6bfefa6acd9062aeb3e4709ca0d5d779c 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -118,6 +118,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {

View File

@@ -1,30 +1,29 @@
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
index 951af951598c3edc9bc431dd106e68d006ec4316..eb420d6c5ea346639eee531805aabbe7726c7769 100644
index 43be2b6ac84827bd13723e0211a3ade401934591..513584d7e720451efdb87350ac07d8b2590c1705 100644
--- a/browser/components/preferences/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml
@@ -43,6 +43,8 @@
/>
@@ -44,6 +44,8 @@
<link rel="stylesheet" href="chrome://browser/skin/preferences/privacy.css" />
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-group.css" />
+#include zen-preferences-links.xhtml
+
<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/browser.ftl"/>
<!-- Used by fontbuilder.js -->
@@ -98,6 +100,12 @@
@@ -105,6 +107,11 @@
<hbox flex="1">
<vbox class="navigation">
+ <search-textbox
+ id="searchInput"
+ data-l10n-id="search-input-box2"
+ data-l10n-attrs="placeholder, style"
+ />
+
+ id="searchInput"
+ data-l10n-id="search-input-box2"
+ data-l10n-attrs="placeholder, style"
+ />
<!-- category list -->
<richlistbox id="categories" data-l10n-id="category-list" data-l10n-attrs="aria-label">
<richlistitem id="category-general"
@@ -111,6 +119,50 @@
@@ -117,6 +124,50 @@
<label class="category-name" flex="1" data-l10n-id="pane-general-title"></label>
</richlistitem>
@@ -75,21 +74,19 @@ index 951af951598c3edc9bc431dd106e68d006ec4316..eb420d6c5ea346639eee531805aabbe7
<richlistitem id="category-home"
class="category"
value="paneHome"
@@ -229,11 +281,13 @@
@@ -228,11 +279,6 @@
<html:a href="about:policies" target="_blank" data-l10n-id="managed-notice"/>
</hbox>
</hbox>
+#if 0
<search-textbox
id="searchInput"
data-l10n-id="search-input-box2"
data-l10n-attrs="placeholder, style"
/>
+#endif
- <search-textbox
- id="searchInput"
- data-l10n-id="search-input-box2"
- data-l10n-attrs="placeholder, style"
- />
</hbox>
</hbox>
<vbox id="mainPrefPane">
@@ -247,6 +301,10 @@
@@ -246,6 +292,10 @@
#include sync.inc.xhtml
#include experimental.inc.xhtml
#include moreFromMozilla.inc.xhtml

View File

@@ -170,7 +170,6 @@ var gZenMarketplaceManager = {
for (const theme of Object.values(themes).sort((a, b) => a.name.localeCompare(b.name))) {
const sanitizedName = `theme-${theme.name?.replaceAll(/\s/g, '-')?.replaceAll(/[^A-z_-]+/g, '')}`;
const isThemeEnabled = theme.enabled === undefined || theme.enabled;
const fragment = window.MozXULElement.parseXULToFragment(`
<vbox class="zenThemeMarketplaceItem">
<vbox class="zenThemeMarketplaceItemContent">
@@ -181,6 +180,7 @@ var gZenMarketplaceManager = {
</vbox>
<hbox class="zenThemeMarketplaceItemActions">
${theme.preferences ? `<button id="zenThemeMarketplaceItemConfigureButton-${sanitizedName}" class="zenThemeMarketplaceItemConfigureButton" hidden="true"></button>` : ''}
${theme.homepage ? `<button id="zenThemeMarketplaceItemHomePageLink-${sanitizedName}" class="zenThemeMarketplaceItemHomepageButton" zen-theme-id="${theme.id}"></button>` : ''}
<button class="zenThemeMarketplaceItemUninstallButton" data-l10n-id="zen-theme-marketplace-remove-button" zen-theme-id="${theme.id}"></button>
</hbox>
</vbox>
@@ -274,6 +274,16 @@ var gZenMarketplaceManager = {
await this.removeTheme(event.target.getAttribute('zen-theme-id'));
});
if (theme.homepage) {
const homepageButton = fragment.querySelector('.zenThemeMarketplaceItemHomepageButton');
homepageButton.addEventListener('click', () => {
// open the homepage url in a new tab
const url = theme.homepage;
window.open(url, '_blank');
});
}
if (theme.preferences) {
fragment.querySelector('.zenThemeMarketplaceItemConfigureButton').addEventListener('click', () => {
dialog.showModal();
@@ -1024,4 +1034,9 @@ Preferences.addAll([
type: 'bool',
default: true,
},
{
id: 'media.videocontrols.picture-in-picture.enabled',
type: 'bool',
default: true,
},
]);

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/search/SearchOneOffs.sys.mjs b/browser/components/search/SearchOneOffs.sys.mjs
index 4810eca0825f9a6f07f242e804de2edb7bd697d8..fd4e7661c93be528c2766e27fe22403d3d495292 100644
index c1f8fd1225cfc47c2e171361aa6069d3cbaf3afb..b32a2cf621022a500a2efc7777b4379347dcf353 100644
--- a/browser/components/search/SearchOneOffs.sys.mjs
+++ b/browser/components/search/SearchOneOffs.sys.mjs
@@ -443,7 +443,7 @@ export class SearchOneOffs {
@@ -444,7 +444,7 @@ export class SearchOneOffs {
// For the search-bar, always show the one-off buttons where there is an
// option to add an engine.
let addEngineNeeded = isSearchBar && addEngines.length;

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 6e2973abf428b110bfc553522723f327ee84c028..cf707b1aace542b4b42468bbaaffd047669c8c94 100644
index 5633e5032f5d50c70512187d27e045b579978927..7604adcd38308c38c7c62d16aa29c860a7726649 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -3186,7 +3186,7 @@ var SessionStoreInternal = {
@@ -3202,7 +3202,7 @@ var SessionStoreInternal = {
if (!isPrivateWindow && tabState.isPrivate) {
return;
}
@@ -11,7 +11,7 @@ index 6e2973abf428b110bfc553522723f327ee84c028..cf707b1aace542b4b42468bbaaffd047
return;
}
@@ -3895,6 +3895,8 @@ var SessionStoreInternal = {
@@ -3911,6 +3911,8 @@ var SessionStoreInternal = {
Math.min(tabState.index, tabState.entries.length)
);
tabState.pinned = false;
@@ -20,7 +20,7 @@ index 6e2973abf428b110bfc553522723f327ee84c028..cf707b1aace542b4b42468bbaaffd047
if (inBackground === false) {
aWindow.gBrowser.selectedTab = newTab;
@@ -5399,14 +5401,15 @@ var SessionStoreInternal = {
@@ -5416,14 +5418,15 @@ var SessionStoreInternal = {
}
let tabbrowser = aWindow.gBrowser;
@@ -38,7 +38,7 @@ index 6e2973abf428b110bfc553522723f327ee84c028..cf707b1aace542b4b42468bbaaffd047
continue;
}
let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab));
@@ -5425,7 +5428,7 @@ var SessionStoreInternal = {
@@ -5442,7 +5445,7 @@ var SessionStoreInternal = {
// We don't store the Firefox View tab in Session Store, so if it was the last selected "tab" when
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
// since it's only inserted into the tab strip after it's selected).
@@ -47,7 +47,7 @@ index 6e2973abf428b110bfc553522723f327ee84c028..cf707b1aace542b4b42468bbaaffd047
selectedIndex = 1;
winData.title = tabbrowser.tabs[0].label;
}
@@ -5582,6 +5585,7 @@ var SessionStoreInternal = {
@@ -5599,6 +5602,7 @@ var SessionStoreInternal = {
winData.tabs,
winData.groups ?? []
);
@@ -55,7 +55,7 @@ index 6e2973abf428b110bfc553522723f327ee84c028..cf707b1aace542b4b42468bbaaffd047
this._log.debug(
`restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs`
);
@@ -6130,8 +6134,23 @@ var SessionStoreInternal = {
@@ -6148,8 +6152,23 @@ var SessionStoreInternal = {
// Most of tabData has been restored, now continue with restoring
// attributes that may trigger external events.

View File

@@ -1,13 +1,13 @@
diff --git a/browser/components/sidebar/browser-sidebar.js b/browser/components/sidebar/browser-sidebar.js
index 371190c058fa1eed91dc91b58608c934100e3a1b..440fe6fb403c3e78b3bfe68fb747d000b4a27521 100644
index 178c05099b671c4ec8d4c225955e65cff73824e2..6abb0ee2d4be94f997ee8d4bc755a393d9759099 100644
--- a/browser/components/sidebar/browser-sidebar.js
+++ b/browser/components/sidebar/browser-sidebar.js
@@ -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;
});
@@ -729,7 +729,7 @@ var SidebarController = {
setPosition() {
// First reset all ordinals to match DOM ordering.
let contentArea = document.getElementById("tabbrowser-tabbox");
- let browser = document.getElementById("browser");
+ let browser = document.getElementById("tabbrowser-tabbox");
[...browser.children].forEach((node, i) => {
node.style.order = i + 1;
});

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/browser-ctrlTab.js b/browser/components/tabbrowser/content/browser-ctrlTab.js
index 6753641cb579032306453be3f5054d7bc7661e8c..e0eda8d77637334ca30ee1842057cb43b4af2c21 100644
index 6753641cb579032306453be3f5054d7bc7661e8c..436ee8940c8a73d238a7aed10768a0a752a3f119 100644
--- a/browser/components/tabbrowser/content/browser-ctrlTab.js
+++ b/browser/components/tabbrowser/content/browser-ctrlTab.js
@@ -252,7 +252,7 @@ var ctrlTab = {
@@ -20,6 +20,15 @@ index 6753641cb579032306453be3f5054d7bc7661e8c..e0eda8d77637334ca30ee1842057cb43
return;
}
@@ -483,7 +483,7 @@ var ctrlTab = {
},
open: function ctrlTab_open() {
- if (this.isOpen) {
+ if (this.isOpen || !this.tabCount) {
return;
}
@@ -761,7 +761,7 @@ var ctrlTab = {
_initRecentlyUsedTabs() {
this._recentlyUsedTabs = Array.prototype.filter.call(

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
index fc3a9730b394341843cfa9f559a792acb34c7d29..18d5fdb6e3368e21c68269c48cf22ac96fd868da 100644
index dc92771ebc65095dfebbddc238ee6d4fffd897bf..ae9120f7cc8989cf625ac101d053d82582e32009 100644
--- a/browser/components/tabbrowser/content/tab.js
+++ b/browser/components/tabbrowser/content/tab.js
@@ -16,6 +16,7 @@
@@ -21,6 +21,7 @@
<hbox class="tab-group-line"/>
</vbox>
<hbox class="tab-content" align="center">
@@ -10,7 +10,7 @@ index fc3a9730b394341843cfa9f559a792acb34c7d29..18d5fdb6e3368e21c68269c48cf22ac9
<stack class="tab-icon-stack">
<hbox class="tab-throbber"/>
<hbox class="tab-icon-pending"/>
@@ -32,8 +33,10 @@
@@ -37,8 +38,10 @@
<hbox class="tab-secondary-label">
<label class="tab-icon-sound-label tab-icon-sound-pip-label" data-l10n-id="browser-tab-audio-pip" role="presentation"/>
</hbox>
@@ -21,7 +21,7 @@ index fc3a9730b394341843cfa9f559a792acb34c7d29..18d5fdb6e3368e21c68269c48cf22ac9
</hbox>
</stack>
`;
@@ -167,7 +170,7 @@
@@ -175,7 +178,7 @@
}
set _visuallySelected(val) {
@@ -30,7 +30,7 @@ index fc3a9730b394341843cfa9f559a792acb34c7d29..18d5fdb6e3368e21c68269c48cf22ac9
return;
}
@@ -203,7 +206,7 @@
@@ -211,7 +214,7 @@
}
get visible() {
@@ -39,7 +39,7 @@ index fc3a9730b394341843cfa9f559a792acb34c7d29..18d5fdb6e3368e21c68269c48cf22ac9
}
get hidden() {
@@ -274,7 +277,7 @@
@@ -282,7 +285,7 @@
return false;
}
@@ -48,7 +48,7 @@ index fc3a9730b394341843cfa9f559a792acb34c7d29..18d5fdb6e3368e21c68269c48cf22ac9
}
get lastAccessed() {
@@ -446,6 +449,8 @@
@@ -454,6 +457,8 @@
this.style.MozUserFocus = "ignore";
} else if (
event.target.classList.contains("tab-close-button") ||
@@ -57,15 +57,15 @@ index fc3a9730b394341843cfa9f559a792acb34c7d29..18d5fdb6e3368e21c68269c48cf22ac9
event.target.classList.contains("tab-icon-overlay") ||
event.target.classList.contains("tab-audio-button")
) {
@@ -544,6 +549,7 @@
if (this.multiselected) {
gBrowser.removeMultiSelectedTabs();
@@ -554,6 +559,7 @@
telemetrySource: lazy.TabMetrics.METRIC_SOURCE.TAB_STRIP,
});
} else {
+ gZenPinnedTabManager._removePinnedAttributes(this, true);
gBrowser.removeTab(this, {
animate: true,
triggeringEvent: event,
@@ -553,6 +559,14 @@
@@ -564,6 +570,14 @@
// (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true;
}
@@ -80,7 +80,7 @@ index fc3a9730b394341843cfa9f559a792acb34c7d29..18d5fdb6e3368e21c68269c48cf22ac9
}
on_dblclick(event) {
@@ -576,6 +590,8 @@
@@ -587,6 +601,8 @@
animate: true,
triggeringEvent: event,
});

View File

@@ -1,22 +1,13 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69f8d324d1 100644
index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66f0137ad2 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -424,11 +424,67 @@
@@ -415,11 +415,58 @@
return this.tabContainer.visibleTabs;
}
+ get _numVisiblePinTabs() {
+ let i = 0;
+ for (let tab of this.tabs) {
+ if (!tab.pinned && !tab.hasAttribute("zen-glance-tab")) {
+ break;
+ }
+ if (!tab.hidden) {
+ i += !tab.hasAttribute("zen-glance-tab");
+ }
+ }
+ return i;
+ zenInsertTabAtIndex(...args) {
+ return this.#insertTabAtElementIndex(...args);
+ }
+
+ get _numVisiblePinTabsWithoutCollapsed() {
@@ -72,15 +63,15 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
}
return i;
}
@@ -558,6 +614,7 @@
@@ -571,6 +618,7 @@
this.tabpanels.appendChild(panel);
let tab = this.tabs[0];
+ ZenWorkspaces.handleInitialTab(tab, (!remoteType || remoteType === E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE) && !Services.prefs.getBoolPref('zen.workspaces.disable_empty_state_for_testing', false));
+ ZenWorkspaces.handleInitialTab(tab, (!remoteType || remoteType === E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE) && !gZenUIManager.testingEnabled);
tab.linkedPanel = uniqueId;
this._selectedTab = tab;
this._selectedBrowser = browser;
@@ -823,11 +880,13 @@
@@ -836,11 +884,13 @@
}
this.showTab(aTab);
@@ -90,14 +81,14 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
+ if (this.tabContainer.verticalMode && !handled) {
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)
+ aTab.hasAttribute("zen-essential") ? ZenWorkspaces.getEssentialsSection(aTab).appendChild(aTab) : this.verticalPinnedTabsContainer.insertBefore(aTab, this.verticalPinnedTabsContainer.lastChild)
);
- } else {
+ } else if (!handled) {
this.moveTabTo(aTab, this.pinnedTabCount, { forceStandaloneTab: true });
}
aTab.setAttribute("pinned", "true");
@@ -841,12 +900,15 @@
this.moveTabTo(aTab, {
tabIndex: this.pinnedTabCount,
forceUngrouped: true,
@@ -857,12 +907,15 @@
}
if (this.tabContainer.verticalMode) {
@@ -113,8 +104,8 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
+ }
});
} else {
this.moveTabTo(aTab, this.pinnedTabCount - 1, {
@@ -1029,6 +1091,8 @@
this.moveTabTo(aTab, {
@@ -1046,6 +1099,8 @@
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
@@ -123,7 +114,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
if (
aIconURL &&
!aLoadingPrincipal &&
@@ -1039,6 +1103,9 @@
@@ -1056,6 +1111,9 @@
);
return;
}
@@ -133,7 +124,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
let browser = this.getBrowserForTab(aTab);
browser.mIconURL = aIconURL;
@@ -1287,6 +1354,7 @@
@@ -1305,6 +1363,7 @@
if (!this._previewMode) {
newTab.recordTimeFromUnloadToReload();
newTab.updateLastAccessed();
@@ -141,7 +132,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
oldTab.updateLastAccessed();
// if this is the foreground window, update the last-seen timestamps.
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
@@ -1439,6 +1507,9 @@
@@ -1457,6 +1516,9 @@
}
let activeEl = document.activeElement;
@@ -151,7 +142,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
// If focus is on the old tab, move it to the new tab.
if (activeEl == oldTab) {
newTab.focus();
@@ -1762,7 +1833,8 @@
@@ -1780,7 +1842,8 @@
}
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
@@ -161,16 +152,16 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
return false;
}
@@ -1865,7 +1937,7 @@
@@ -1888,7 +1951,7 @@
newIndex = this.selectedTab._tPos + 1;
}
- if (replace) {
+ if (replace && !(!targetTab && this.selectedTab?.hasAttribute('zen-empty-tab'))) {
let browser;
if (targetTab) {
browser = this.getBrowserForTab(targetTab);
@@ -2122,6 +2194,7 @@
if (this.isTabGroupLabel(targetTab)) {
throw new Error(
"Replacing a tab group label with a tab is not supported"
@@ -2152,6 +2215,7 @@
uriIsAboutBlank,
userContextId,
skipLoad,
@@ -178,7 +169,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
} = {}) {
let b = document.createXULElement("browser");
// Use the JSM global to create the permanentKey, so that if the
@@ -2195,8 +2268,7 @@
@@ -2225,8 +2289,7 @@
// we use a different attribute name for this?
b.setAttribute("name", name);
}
@@ -188,7 +179,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
b.setAttribute("transparent", "true");
}
@@ -2373,7 +2445,7 @@
@@ -2391,7 +2454,7 @@
let panel = this.getPanel(browser);
let uniqueId = this._generateUniquePanelID();
@@ -197,7 +188,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
aTab.linkedPanel = uniqueId;
// Inject the <browser> into the DOM if necessary.
@@ -2432,8 +2504,8 @@
@@ -2450,8 +2513,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) {
@@ -208,7 +199,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
} else {
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
}
@@ -2655,6 +2727,7 @@
@@ -2679,6 +2742,7 @@
schemelessInput,
hasValidUserGestureActivation = false,
textDirectiveUserActivation = false,
@@ -216,7 +207,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
} = {}
) {
// all callers of addTab that pass a params object need to pass
@@ -2665,6 +2738,12 @@
@@ -2689,6 +2753,12 @@
);
}
@@ -229,7 +220,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
if (!UserInteraction.running("browser.tabs.opening", window)) {
UserInteraction.start("browser.tabs.opening", "initting", window);
}
@@ -2728,6 +2807,16 @@
@@ -2752,6 +2822,16 @@
noInitialLabel,
skipBackgroundNotify,
});
@@ -244,17 +235,17 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
+ t.setAttribute("zen-empty-tab", "true");
+ }
if (insertTab) {
// insert the tab into the tab container in the correct position
this._insertTabAtIndex(t, {
@@ -2752,6 +2841,7 @@
initialBrowsingContextGroupId,
if (typeof index == "number") {
elementIndex = this.#tabIndexToElementIndex(index);
@@ -2779,6 +2859,7 @@
openWindowInfo,
skipLoad,
triggeringRemoteType,
+ _forZenEmptyTab,
}));
if (focusUrlBar) {
@@ -2871,6 +2961,9 @@
@@ -2898,6 +2979,9 @@
}
}
@@ -264,7 +255,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
// Additionally send pinned tab events
if (pinned) {
this._notifyPinnedStatus(t);
@@ -2891,12 +2984,15 @@
@@ -2945,12 +3029,15 @@
* @param {string} [label=]
* @returns {MozTabbrowserTabGroup}
*/
@@ -281,15 +272,15 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
return group;
}
@@ -2937,6 +3033,7 @@
@@ -2993,6 +3080,7 @@
insertBefore = null,
isUserCreated = false,
isUserTriggered = false,
telemetryUserCreateSource = "unknown",
+ forSplitView = false,
} = {}
) {
if (!tabs?.length) {
@@ -2951,7 +3048,12 @@
@@ -3011,7 +3099,12 @@
id = `${Date.now()}-${Math.round(Math.random() * 100)}`;
}
let group = this._createTabGroup(id, color, false, label);
@@ -303,15 +294,15 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
group,
insertBefore?.group ?? insertBefore
);
@@ -3268,6 +3370,7 @@
initialBrowsingContextGroupId,
@@ -3342,6 +3435,7 @@
openWindowInfo,
skipLoad,
triggeringRemoteType,
+ _forZenEmptyTab
}
) {
// If we don't have a preferred remote type, and we have a remote
@@ -3331,6 +3434,7 @@
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
@@ -3411,6 +3505,7 @@
openWindowInfo,
name,
skipLoad,
@@ -319,7 +310,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
});
}
@@ -3509,6 +3613,27 @@
@@ -3589,6 +3684,27 @@
) {
tabWasReused = true;
tab = this.selectedTab;
@@ -347,12 +338,11 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
if (!tabData.pinned) {
this.unpinTab(tab);
} else {
@@ -3557,8 +3682,28 @@
@@ -3637,7 +3753,27 @@
skipLoad: true,
preferredRemoteType,
});
-
- if (select) {
+ if (tabData.zenWorkspace) {
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
+ }
@@ -374,22 +364,10 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
+ if (tabData.zenPinnedEntry) {
+ tab.setAttribute("zen-pinned-entry", tabData.zenPinnedEntry);
+ }
+ if (select && !tabData.pinned) {
if (select) {
tabToSelect = tab;
}
}
@@ -3570,8 +3715,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) {
- tab._tPos = this.pinnedTabCount;
- this.tabContainer.insertBefore(tab, this.tabs[this.pinnedTabCount]);
+ tab._tPos = this._numVisiblePinTabs;
+ this.tabContainer.insertBefore(tab, this.tabs[this._numVisiblePinTabs]);
tab.toggleAttribute("pinned", true);
this.tabContainer._invalidateCachedTabs();
// Then ensure all the tab open/pinning information is sent.
@@ -3581,7 +3726,8 @@
@@ -3661,7 +3797,8 @@
// needs calling:
shouldUpdateForPinnedTabs = true;
}
@@ -399,7 +377,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
let { groupId } = tabData;
const tabGroup = tabGroupWorkingData.get(groupId);
// if a tab refers to a tab group we don't know, skip any group
@@ -3595,7 +3741,10 @@
@@ -3675,7 +3812,10 @@
tabGroup.stateData.id,
tabGroup.stateData.color,
tabGroup.stateData.collapsed,
@@ -411,7 +389,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
);
tabsFragment.appendChild(tabGroup.node);
}
@@ -3646,6 +3795,9 @@
@@ -3726,6 +3866,9 @@
this.selectedTab = tabToSelect;
this.removeTab(leftoverTab);
}
@@ -421,7 +399,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
if (tabs.length > 1 || !tabs[0].selected) {
this._updateTabsAfterInsert();
@@ -3830,7 +3982,7 @@
@@ -3912,7 +4055,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.
@@ -430,7 +408,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
if (
!bulkOrderedOpen &&
((openerTab &&
@@ -3876,18 +4028,18 @@
@@ -3958,18 +4101,18 @@
// Ensure index is within bounds.
if (tab.pinned) {
@@ -440,38 +418,38 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
+ index = Math.min(index, tab.hasAttribute("zen-essential") ? this._numZenEssentials : this.pinnedTabCount);
} else {
index = Math.max(index, this.pinnedTabCount);
index = Math.min(index, this.tabs.length);
index = Math.min(index, this.tabContainer.ariaFocusableItems.length);
}
/** @type {MozTabbrowserTab|undefined} */
- let tabAfter = this.tabs.at(index);
+ let tabAfter = this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).at(index);
- let itemAfter = this.tabContainer.ariaFocusableItems.at(index);
+ let itemAfter = this.tabContainer.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).at(index);
this.tabContainer._invalidateCachedTabs();
- if (tabGroup) {
+ if (tabGroup && !tabGroup.hasAttribute("split-view-group")) {
if (tabAfter && tabAfter.group == tabGroup) {
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
// Place at the front of, or between tabs in, the same tab group
this.tabContainer.insertBefore(tab, tabAfter);
@@ -4199,6 +4351,9 @@
this.tabContainer.insertBefore(tab, itemAfter);
@@ -4290,6 +4433,9 @@
return;
}
+ for (let tab of selectedTabs) {
+ gZenPinnedTabManager._removePinnedAttributes(tab, true);
+ }
this.removeTabs(selectedTabs);
this.removeTabs(selectedTabs, { telemetrySource });
}
@@ -4450,6 +4605,7 @@
skipGroupCheck = false,
@@ -4542,6 +4688,7 @@
telemetrySource,
} = {}
) {
+ tabs = tabs.filter(tab => !tab.hasAttribute("zen-empty-tab"));
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
// can be considered equivalent to closing the window.
if (
@@ -4533,6 +4689,7 @@
@@ -4626,6 +4773,7 @@
if (lastToClose) {
this.removeTab(lastToClose, aParams);
}
@@ -479,16 +457,16 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
} catch (e) {
console.error(e);
}
@@ -4556,6 +4713,7 @@
skipSessionStore,
@@ -4650,6 +4798,7 @@
telemetrySource,
} = {}
) {
+ gZenUIManager.saveScrollbarState();
if (UserInteraction.running("browser.tabs.opening", window)) {
UserInteraction.finish("browser.tabs.opening", window);
}
@@ -4572,6 +4730,12 @@
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
@@ -4663,6 +4812,12 @@
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
}
+ if (ZenWorkspaces.workspaceEnabled) {
@@ -500,7 +478,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
// Handle requests for synchronously removing an already
// asynchronously closing tab.
if (!animate && aTab.closing) {
@@ -4586,7 +4750,9 @@
@@ -4677,7 +4832,9 @@
// frame created for it (for example, by updating the visually selected
// state).
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
@@ -511,32 +489,16 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
if (
!this._beginRemoveTab(aTab, {
closeWindowFastpath: true,
@@ -4600,7 +4766,6 @@
TelemetryStopwatch.cancel("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
return;
}
-
let lockTabSizing =
!this.tabContainer.verticalMode &&
!aTab.pinned &&
@@ -4739,14 +4904,14 @@
!!this.tabsInCollapsedTabGroups.length;
if (
aTab.visible &&
- this.visibleTabs.length == 1 &&
+ this.visibleTabs.length == 1 && !aTab._closingGlance &&
!anyRemainingTabsInCollapsedTabGroups
) {
closeWindow =
@@ -4840,7 +4997,7 @@
closeWindowWithLastTab != null
? closeWindowWithLastTab
: !window.toolbar.visible ||
- Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
+ Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") && !ZenWorkspaces._isClosingWindow && !ZenWorkspaces._removedByStartupPage;
+ Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") && !ZenWorkspaces._isClosingWindow && !ZenWorkspaces._removedByStartupPage;
if (closeWindow) {
// We've already called beforeunload on all the relevant tabs if we get here,
@@ -4770,6 +4935,7 @@
@@ -4864,6 +5021,7 @@
newTab = true;
}
@@ -544,7 +506,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
aTab._endRemoveArgs = [closeWindow, newTab];
// swapBrowsersAndCloseOther will take care of closing the window without animation.
@@ -4810,9 +4976,7 @@
@@ -4903,9 +5061,7 @@
aTab._mouseleave();
if (newTab) {
@@ -555,7 +517,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
} else {
TabBarVisibility.update();
}
@@ -4941,6 +5105,8 @@
@@ -5034,6 +5190,8 @@
this.tabs[i]._tPos = i;
}
@@ -564,7 +526,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
if (!this._windowIsClosing) {
if (wasPinned) {
this.tabContainer._positionPinnedTabs();
@@ -5064,8 +5230,8 @@
@@ -5159,8 +5317,8 @@
return closedCount;
}
@@ -575,7 +537,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
if (unloadBlocked) {
return;
}
@@ -5159,13 +5325,13 @@
@@ -5260,13 +5418,13 @@
!excludeTabs.has(aTab.owner) &&
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
) {
@@ -591,7 +553,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
);
let tab = this.tabContainer.findNextTab(aTab, {
@@ -5181,7 +5347,7 @@
@@ -5282,7 +5440,7 @@
}
if (tab) {
@@ -600,7 +562,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
}
// If no qualifying visible tab was found, see if there is a tab in
@@ -5202,7 +5368,7 @@
@@ -5303,7 +5461,7 @@
});
}
@@ -609,7 +571,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
}
_blurTab(aTab) {
@@ -5599,10 +5765,10 @@
@@ -5704,10 +5862,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
}
@@ -622,69 +584,68 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
aTab.selected ||
aTab.closing ||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
@@ -5838,7 +6004,7 @@
moveTabTo(aTab, aIndex, { forceStandaloneTab = false } = {}) {
// Don't allow mixing pinned and unpinned tabs.
if (aTab.pinned) {
- aIndex = Math.min(aIndex, this.pinnedTabCount - 1);
+ aIndex = aTab.hasAttribute('zen-essential') ? Math.min(aIndex, this._numZenEssentials - 1) : Math.min(aIndex, this.pinnedTabCount - 1);
} else {
aIndex = Math.max(aIndex, this.pinnedTabCount);
}
@@ -5848,10 +6014,17 @@
@@ -6001,7 +6159,7 @@
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;
// Don't allow mixing pinned and unpinned tabs.
if (this.isTab(element) && element.pinned) {
- tabIndex = Math.min(tabIndex, this.pinnedTabCount - 1);
+ tabIndex = element.hasAttribute('zen-essential') ? Math.min(tabIndex, this._numZenEssentials - 1) : Math.min(tabIndex, this.pinnedTabCount - 1);
} else {
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
}
@@ -6028,9 +6186,16 @@
element,
() => {
let neighbor = this.tabs[tabIndex];
- if (forceUngrouped && neighbor.group) {
+ const _tPos = element._tPos;
+ if ((forceUngrouped && neighbor?.group) || neighbor?.group?.hasAttribute("split-view-group")) {
neighbor = neighbor.group;
}
+ if (element.group?.hasAttribute("split-view-group")) {
+ element = element.group;
+ }
+ if (element.group?.hasAttribute("split-view-group") && neighbor == element.group) {
+ return;
+ }
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
neighbor.after(element);
} else {
@@ -6099,7 +6264,9 @@
targetElement = targetElement.group;
}
- if (neighbor && aIndex > aTab._tPos) {
+ if (aTab.group?.hasAttribute("split-view-group")) {
+ aTab = aTab.group;
+ }
+ if (aTab.group?.hasAttribute("split-view-group") && neighbor == aTab.group) {
+ return;
+ }
+ if (neighbor && aIndex >= _tPos) {
neighbor.after(aTab);
} else {
this.tabContainer.insertBefore(aTab, neighbor);
@@ -5901,13 +6074,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 (element.group?.hasAttribute("split-view-group")) {
+ element = element.group;
+ }
// Don't allow mixing pinned and unpinned tabs.
if (element.pinned && !targetElement?.pinned) {
targetElement = this.tabs[this.pinnedTabCount - 1];
@@ -6109,7 +6276,13 @@
moveBefore = true;
}
+ if (targetElement?.group?.hasAttribute("split-view-group")) {
+ targetElement = targetElement.group;
+ }
let getContainer = () => {
+ if (tab.hasAttribute("zen-essential")) {
+ return document.getElementById("zen-essentials-container");
+ if (element.hasAttribute("zen-essential")) {
+ return ZenWorkspaces.getEssentialsSection(element);
+ }
if (tab.pinned && this.tabContainer.verticalMode) {
if (element.pinned && this.tabContainer.verticalMode) {
return this.tabContainer.verticalPinnedTabsContainer;
}
@@ -5937,7 +6119,7 @@
}
moveTabToGroup(aTab, aGroup) {
@@ -6169,7 +6342,7 @@
if (!this.isTab(aTab)) {
throw new Error("Can only move a tab into a tab group");
}
- if (aTab.pinned) {
+ if (aTab.pinned != !!aGroup.pinned) {
return;
}
if (aTab.group && aTab.group.id === aGroup.id) {
@@ -5961,6 +6143,10 @@
@@ -6263,6 +6436,10 @@
moveActionCallback();
@@ -695,16 +656,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
// Clear tabs cache after moving nodes because the order of tabs may have
// changed.
this.tabContainer._invalidateCachedTabs();
@@ -6015,7 +6201,7 @@
createLazyBrowser,
};
- let numPinned = this.pinnedTabCount;
+ let numPinned = this._numVisiblePinTabs;
if (aIndex < numPinned || (aTab.pinned && aIndex == numPinned)) {
params.pinned = true;
}
@@ -6765,7 +6951,7 @@
@@ -7080,7 +7257,7 @@
// preventDefault(). It will still raise the window if appropriate.
break;
}
@@ -713,7 +665,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
window.focus();
aEvent.preventDefault();
break;
@@ -7671,6 +7857,7 @@
@@ -7981,6 +8158,7 @@
aWebProgress.isTopLevel
) {
this.mTab.setAttribute("busy", "true");
@@ -721,7 +673,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
gBrowser._tabAttrModified(this.mTab, ["busy"]);
this.mTab._notselectedsinceload = !this.mTab.selected;
}
@@ -8640,7 +8827,7 @@ var TabContextMenu = {
@@ -8954,7 +9132,7 @@ var TabContextMenu = {
);
contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !this.multiselected;
@@ -730,20 +682,11 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69
// Move Tab items
let contextMoveTabOptions = document.getElementById(
"context_moveTabOptions"
@@ -8674,7 +8861,7 @@ var TabContextMenu = {
let isFirstTab =
!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 =
@@ -8904,6 +9091,7 @@ var TabContextMenu = {
if (this.contextTab.multiselected) {
gBrowser.removeMultiSelectedTabs();
@@ -9223,6 +9401,7 @@ var TabContextMenu = {
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP,
});
} else {
+ gZenPinnedTabManager._removePinnedAttributes(this.contextTab, true);
gBrowser.removeTab(this.contextTab, { animate: true });
}
},
gBrowser.removeTab(this.contextTab, {
animate: true,
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP,

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc977c8415 100644
index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..2885d896c4026278dfcb309f12230d6f86275ada 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -93,7 +93,7 @@
@@ -83,7 +83,7 @@
};
this.arrowScrollbox._canScrollToElement = element => {
if (isTab(element)) {
@@ -11,7 +11,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
}
return true;
};
@@ -347,7 +347,7 @@
@@ -342,7 +342,7 @@
// and we're not hitting the scroll buttons.
if (
event.button != 0 ||
@@ -20,7 +20,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
event.composedTarget.localName == "toolbarbutton"
) {
return;
@@ -396,6 +396,7 @@
@@ -391,6 +391,7 @@
// Reset the "ignored click" flag
target._ignoredCloseButtonClicks = false;
}
@@ -28,8 +28,8 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
}
/* Protects from close-tab-button errant doubleclick:
@@ -693,7 +694,7 @@
if (this.#isContainerVerticalPinnedExpanded(tab)) {
@@ -692,7 +693,7 @@
if (this.#isContainerVerticalPinnedGrid(tab)) {
// In expanded vertical mode, the max number of pinned tabs per row is dynamic
// Set this before adjusting dragged tab's position
- let pinnedTabs = this.visibleTabs.slice(0, gBrowser.pinnedTabCount);
@@ -37,7 +37,16 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let tabsPerRow = 0;
let position = 0;
for (let pinnedTab of pinnedTabs) {
@@ -899,6 +900,10 @@
@@ -764,7 +765,7 @@
} else if (isTabGroupLabel(tab) && !tab.group.collapsed) {
this._lockTabSizing();
this.#keepTabSizeLocked = true;
- tab.group.collapsed = true;
+ tab.group.collapsed = !tab.group.hasAttribute("split-view-group");
expandGroupOnDrop = true;
}
}
@@ -913,6 +914,10 @@
}
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
@@ -47,8 +56,8 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
+ }
if (
(effects == "move" || effects == "copy") &&
this == draggedTab.container &&
@@ -1012,6 +1017,18 @@
document == draggedTab.ownerDocument &&
@@ -1069,6 +1074,18 @@
this._tabDropIndicator.hidden = true;
event.stopPropagation();
@@ -60,14 +69,14 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
+ let moved = gZenPinnedTabManager.moveToAnotherTabContainerIfNecessary(event, movingTabs);
+
+ if (moved) {
+ this._finishMoveTogetherSelectedTabs(draggedTab);
+ this.finishMoveTogetherSelectedTabs(draggedTab);
+ return;
+ }
+ }
if (draggedTab && dropEffect == "copy") {
// copy the dropped tab (wherever it's from)
let newIndex = this._getDropIndex(event);
@@ -1050,10 +1067,11 @@
let duplicatedDraggedTab;
let duplicatedTabs = [];
@@ -1108,10 +1125,11 @@
}
} else {
let isPinned = draggedTab.pinned;
@@ -83,8 +92,8 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
);
let size = this.verticalMode ? "height" : "width";
let screenAxis = this.verticalMode ? "screenY" : "screenX";
@@ -1129,7 +1147,7 @@
tab.removeAttribute("tabdrop-samewindow");
@@ -1203,7 +1221,7 @@
item.removeAttribute("tabdrop-samewindow");
resolve();
};
- if (gReduceMotion) {
@@ -92,22 +101,19 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
postTransitionCleanup();
} else {
let onTransitionEnd = transitionendEvent => {
@@ -1246,7 +1264,7 @@
return;
}
}
-
@@ -1327,6 +1345,7 @@
let nextItem = this.ariaFocusableItems[newIndex];
let tabGroup = isTab(nextItem) && nextItem.group;
+ if (gZenViewSplitter.handleTabDrop(event, urls, replace, inBackground)) return;
gBrowser.loadTabs(urls, {
inBackground,
replace,
@@ -1276,13 +1294,25 @@
return;
}
- this._finishMoveTogetherSelectedTabs(draggedTab);
this._finishAnimateTabMove();
@@ -1359,6 +1378,17 @@
this.finishMoveTogetherSelectedTabs(draggedTab);
this.finishAnimateTabMove();
+
+ if (!dt.mozUserCancelled && dt.dropEffect == "none" && !this._isCustomizing) {
+ const moved = gZenViewSplitter.moveTabToSplitView(event, draggedTab);
+ if (moved) {
@@ -118,18 +124,10 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
+ if (gZenViewSplitter._lastOpenedTab) gZenViewSplitter._lastOpenedTab._visuallySelected = false;
+ }
+
+ this._finishMoveTogetherSelectedTabs(draggedTab);
+
this.#expandGroupOnDrop(draggedTab);
if (
dt.mozUserCancelled ||
dt.dropEffect != "none" ||
- this._isCustomizing
+ this._isCustomizing ||
+ draggedTab.pinned
) {
delete draggedTab._dragData;
return;
@@ -1504,7 +1534,7 @@
@@ -1582,7 +1612,7 @@
}
get newTabButton() {
@@ -138,7 +136,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
}
get verticalMode() {
@@ -1524,29 +1554,41 @@
@@ -1606,29 +1636,41 @@
if (this.#allTabs) {
return this.#allTabs;
}
@@ -158,7 +156,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
this.#allTabs = [
- ...this.verticalPinnedTabsContainer.children,
+ ...document.getElementById("zen-essentials-container").children, ...this.verticalPinnedTabsContainer.children,
+ ...ZenWorkspaces.getCurrentEssentialsContainer().children, ...this.verticalPinnedTabsContainer.children,
...children,
];
+ const lastPinnedTabIdx = gBrowser.pinnedTabCount;
@@ -188,7 +186,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
}
/**
@@ -1566,7 +1608,7 @@
@@ -1648,7 +1690,7 @@
*/
get visibleTabs() {
if (!this.#visibleTabs) {
@@ -197,7 +195,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
}
return this.#visibleTabs;
}
@@ -1601,23 +1643,18 @@
@@ -1683,23 +1725,18 @@
}
let elementIndex = 0;
@@ -213,7 +211,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let focusableItems = [];
- for (let child of children) {
+ for (let child of [...document.getElementById("zen-essentials-container").children, ...verticalPinnedTabsContainer.children, ...children]) {
+ for (let child of [...ZenWorkspaces.getCurrentEssentialsContainer().children, ...verticalPinnedTabsContainer.children, ...children]) {
if (isTab(child) && child.visible) {
child.elementIndex = elementIndex++;
focusableItems.push(child);
@@ -225,8 +223,15 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
visibleTabsInGroup.forEach(tab => {
tab.elementIndex = elementIndex++;
@@ -1627,10 +1664,7 @@
@@ -1707,12 +1744,14 @@
focusableItems.push(...visibleTabsInGroup);
}
}
+ let glanceTab = child.querySelector("tab[zen-glance-tab]");
+ if (isTab(child) && glanceTab) {
+ glanceTab.elementIndex = elementIndex++;
+ focusableItems.push(glanceTab);
+ }
}
- this.#focusableItems = [
@@ -237,7 +242,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
return this.#focusableItems;
}
@@ -1638,6 +1672,7 @@
@@ -1720,6 +1759,7 @@
_invalidateCachedTabs() {
this.#allTabs = null;
this._invalidateCachedVisibleTabs();
@@ -245,18 +250,18 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
}
_invalidateCachedVisibleTabs() {
@@ -1652,8 +1687,8 @@
#isContainerVerticalPinnedExpanded(tab) {
@@ -1734,8 +1774,8 @@
#isContainerVerticalPinnedGrid(tab) {
return (
this.verticalMode &&
- tab.hasAttribute("pinned") &&
- this.hasAttribute("expanded")
- this.hasAttribute("expanded") &&
+ (tab.hasAttribute("zen-essential")) &&
+ (this.hasAttribute("expanded") || document.documentElement.hasAttribute("zen-sidebar-expanded"))
+ (this.hasAttribute("expanded") || document.documentElement.hasAttribute("zen-sidebar-expanded")) &&
!this.expandOnHover
);
}
@@ -1668,7 +1703,7 @@
@@ -1751,7 +1791,7 @@
if (node == null) {
// We have a container for non-tab elements at the end of the scrollbox.
@@ -265,7 +270,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
}
node.before(tab);
@@ -1763,7 +1798,7 @@
@@ -1846,7 +1886,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.
@@ -274,16 +279,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
const newTab2 = this.newTabButton;
const newTabVertical = document.getElementById(
"vertical-tabs-newtab-button"
@@ -1846,7 +1881,7 @@
let rect = ele => {
return window.windowUtils.getBoundsWithoutFlushing(ele);
};
- let tab = this.visibleTabs[gBrowser.pinnedTabCount];
+ let tab = this.visibleTabs[gBrowser._numVisiblePinTabs];
if (tab && rect(tab).width <= this._tabClipWidth) {
this.setAttribute("closebuttons", "activetab");
} else {
@@ -1858,10 +1893,12 @@
@@ -1941,10 +1981,12 @@
_handleTabSelect(aInstant) {
let selectedTab = this.selectedItem;
@@ -296,34 +292,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
selectedTab._notselectedsinceload = false;
}
@@ -1873,7 +1910,7 @@
return;
}
- let tabs = this.visibleTabs;
+ let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab"));
if (!tabs.length) {
return;
}
@@ -1909,7 +1946,7 @@
if (isEndTab && !this._hasTabTempMaxWidth) {
return;
}
- let numPinned = gBrowser.pinnedTabCount;
+ let numPinned = gBrowser._numVisiblePinTabs;
// 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.
@@ -1924,7 +1961,7 @@
let tabsToReset = [];
for (let i = numPinned; i < tabs.length; i++) {
let tab = tabs[i];
- tab.style.setProperty("max-width", aTabWidth, "important");
+ //tab.style.setProperty("max-width", aTabWidth, "important");
if (!isEndTab) {
// keep tabs the same width
tab.style.transition = "none";
@@ -1990,16 +2027,15 @@
@@ -2085,16 +2127,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.
@@ -337,16 +306,16 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
- let tabs = this.visibleTabs;
+ if (!ZenWorkspaces._hasInitializedTabsStrip) return;
+ let count = ZenWorkspaces.makeSurePinTabIsInCorrectPosition();
+ if (gBrowser.pinnedTabCount !== (verticalTabsContainer.children.length - count - 1 + document.getElementById("zen-essentials-container").children.length)) {
+ if (gBrowser.pinnedTabCount !== (verticalTabsContainer.children.length - count - 1 + ZenWorkspaces.getCurrentEssentialsContainer().children.length)) {
+ let tabs = this.allTabs.filter(tab => !tab.hasAttribute("zen-glance-tab"));
for (let i = 0; i < numPinned; i++) {
tabs[i].style.marginInlineStart = "";
- verticalTabsContainer.appendChild(tabs[i]);
+ tabs[i].hasAttribute("zen-essential") ? document.getElementById("zen-essentials-container").appendChild(tabs[i].group?.hasAttribute("split-view-group") ? tabs[i].group : tabs[i]) : verticalTabsContainer.insertBefore(tabs[i].group?.hasAttribute("split-view-group") ? tabs[i].group : tabs[i], verticalTabsContainer.lastChild);
+ tabs[i].hasAttribute("zen-essential") ? ZenWorkspaces.getCurrentEssentialsContainer().appendChild(tabs[i].group?.hasAttribute("split-view-group") ? tabs[i].group : tabs[i]) : verticalTabsContainer.insertBefore(tabs[i].group?.hasAttribute("split-view-group") ? tabs[i].group : tabs[i], verticalTabsContainer.lastChild);
}
}
@@ -2007,9 +2043,7 @@
@@ -2102,9 +2143,7 @@
}
_resetVerticalPinnedTabs() {
@@ -357,18 +326,16 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
if (!verticalTabsContainer.children.length) {
return;
@@ -2022,8 +2056,8 @@
@@ -2117,7 +2156,7 @@
}
_positionPinnedTabs() {
- let tabs = this.visibleTabs;
- let numPinned = gBrowser.pinnedTabCount;
+ let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab"));
+ let numPinned = gBrowser._numVisiblePinTabs;
let numPinned = gBrowser.pinnedTabCount;
let absPositionHorizontalTabs =
this.overflowing && tabs.length > numPinned && numPinned > 0;
@@ -2032,7 +2066,7 @@
@@ -2127,7 +2166,7 @@
if (this.verticalMode) {
this._updateVerticalPinnedTabs();
@@ -377,7 +344,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let layoutData = this._pinnedTabsLayoutCache;
let uiDensity = document.documentElement.getAttribute("uidensity");
if (!layoutData || layoutData.uiDensity != uiDensity) {
@@ -2104,7 +2138,7 @@
@@ -2191,7 +2230,7 @@
return;
}
@@ -386,7 +353,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let directionX = screenX > dragData.animLastScreenX;
let directionY = screenY > dragData.animLastScreenY;
@@ -2112,7 +2146,7 @@
@@ -2199,7 +2238,7 @@
dragData.animLastScreenX = screenX;
let { width: tabWidth, height: tabHeight } =
@@ -395,14 +362,16 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let shiftSizeX = tabWidth * movingTabs.length;
let shiftSizeY = tabHeight;
dragData.tabWidth = tabWidth;
@@ -2296,11 +2330,15 @@
@@ -2374,12 +2413,16 @@
this.#clearDragOverCreateGroupTimer();
let isPinned = draggedTab.pinned;
- let isPinned = draggedTab.pinned;
- let numPinned = gBrowser.pinnedTabCount;
- let tabs = this.ariaFocusableItems.slice(
- isPinned ? 0 : numPinned,
- isPinned ? numPinned : undefined
+ let isPinned = draggedTab?.group ? draggedTab.group.pinned : draggedTab.pinned;
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
+ let essential = draggedTab.hasAttribute("zen-essential");
+ let tabs = this.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
@@ -415,7 +384,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
if (this.#rtlMode) {
tabs.reverse();
@@ -2314,7 +2352,7 @@
@@ -2393,7 +2436,7 @@
let size = this.verticalMode ? "height" : "width";
let translateAxis = this.verticalMode ? "translateY" : "translateX";
let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft";
@@ -424,7 +393,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let translateX = event.screenX - dragData.screenX;
let translateY = event.screenY - dragData.screenY;
@@ -2328,6 +2366,12 @@
@@ -2407,10 +2450,19 @@
let lastTab = tabs.at(-1);
let lastMovingTab = movingTabs.at(-1);
let firstMovingTab = movingTabs[0];
@@ -437,20 +406,24 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let endEdge = ele => ele[screenAxis] + bounds(ele)[size];
let lastMovingTabScreen = endEdge(lastMovingTab);
let firstMovingTabScreen = firstMovingTab[screenAxis];
@@ -2348,7 +2392,11 @@
translate = Math.min(Math.max(translate, firstBound), lastBound);
for (let tab of movingTabs) {
- tab.style.transform = `${translateAxis}(${translate}px)`;
+ if (tab.group?.hasAttribute("split-view-group")) {
+ tab.group.style.transform = `${translateAxis}(${translate}px)`;
+ } else {
+ tab.style.transform = `${translateAxis}(${translate}px)`;
let shiftSize = lastMovingTabScreen - firstMovingTabScreen;
+ if (firstMovingTab.hasAttribute("split-view-group")) {
+ shiftSize += 5; // A hack to allow more space for the group
+ }
let translate = screen - dragData[screenAxis];
if (!isPinned) {
translate +=
@@ -2431,6 +2483,9 @@
// 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 = `${translateAxis}(${translate}px)`;
}
dragData.translatePos = translate;
@@ -2485,6 +2533,9 @@
@@ -2568,6 +2623,9 @@
break;
}
let element = tabs[mid];
@@ -460,7 +433,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let elementForSize = isTabGroupLabel(element)
? element.parentElement
: element;
@@ -2507,6 +2558,10 @@
@@ -2590,6 +2648,10 @@
if (!dropElement) {
dropElement = this.ariaFocusableItems[oldDropElementIndex];
}
@@ -471,7 +444,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
let newDropElementIndex = dropElement
? dropElement.elementIndex
: oldDropElementIndex;
@@ -2515,7 +2570,7 @@
@@ -2598,7 +2660,7 @@
let shouldCreateGroupOnDrop;
let dropBefore;
if (dropElement) {
@@ -480,11 +453,11 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
? dropElement.parentElement
: dropElement;
@@ -2566,12 +2621,12 @@
@@ -2660,12 +2722,12 @@
}
}
- if (gBrowser._tabGroupsEnabled && !isPinned) {
- if (gBrowser._tabGroupsEnabled && isTab(draggedTab) && !isPinned) {
+ if (true) {
let dragOverGroupingThreshold = 1 - moveOverThreshold;
@@ -495,7 +468,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
dropElement != draggedTab &&
isTab(dropElement) &&
!dropElement?.group &&
@@ -2639,7 +2694,7 @@
@@ -2735,7 +2797,7 @@
// Shift background tabs to leave a gap where the dragged tab
// would currently be dropped.
for (let item of tabs) {
@@ -504,7 +477,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
continue;
}
@@ -2648,6 +2703,9 @@
@@ -2744,6 +2806,9 @@
if (isTabGroupLabel(item)) {
// Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement;
@@ -514,19 +487,19 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
}
item.style.transform = transform;
}
@@ -2697,8 +2755,9 @@
@@ -2796,8 +2861,9 @@
);
}
- _finishAnimateTabMove() {
- if (!this.hasAttribute("movingtab")) {
+ _finishAnimateTabMove(always = false) {
- finishAnimateTabMove() {
- if (!this.#isMovingTab()) {
+ finishAnimateTabMove(always = false) {
+ gZenPinnedTabManager.removeTabContainersDragoverClass();
+ if (!this.hasAttribute("movingtab") && !always) {
+ if (!this.#isMovingTab() && !always) {
return;
}
@@ -2711,6 +2770,12 @@
@@ -2809,6 +2875,12 @@
item = item.parentElement;
}
item.style.transform = "";
@@ -539,7 +512,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
item.removeAttribute("dragover-createGroup");
}
this.removeAttribute("movingtab-createGroup");
@@ -2754,7 +2819,7 @@
@@ -2855,7 +2927,7 @@
let postTransitionCleanup = () => {
movingTab._moveTogetherSelectedTabsData.animate = false;
};
@@ -548,7 +521,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
postTransitionCleanup();
} else {
let onTransitionEnd = transitionendEvent => {
@@ -2924,7 +2989,7 @@
@@ -3028,7 +3100,7 @@
}
_notifyBackgroundTab(aTab) {
@@ -557,3 +530,13 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc
return;
}
@@ -3154,6 +3226,9 @@
return null;
}
}
+ if (target?.group?.hasAttribute("split-view-group")) {
+ target = target.group.labelElement;
+ }
return target;
}

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862f1d17b8d 100644
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..100f96cb58499dbae490b3772effef0f79aec75b 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);
@@ -16,7 +16,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
const SEARCH_BUTTON_CLASS = "urlbar-search-button";
@@ -348,7 +355,11 @@ export class UrlbarInput {
@@ -349,7 +356,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 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
this._suppressPrimaryAdjustment = false;
}
@@ -424,6 +435,10 @@ export class UrlbarInput {
@@ -425,6 +436,10 @@ export class UrlbarInput {
hideSearchTerms = false,
isSameDocument = false
) {
@@ -39,7 +39,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
// We only need to update the searchModeUI on tab switch conditionally
// as we only persist searchMode with ScotchBonnet enabled.
if (
@@ -697,8 +712,11 @@ export class UrlbarInput {
@@ -698,8 +713,11 @@ export class UrlbarInput {
return;
}
}
@@ -52,7 +52,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
}
/**
@@ -1092,7 +1110,11 @@ export class UrlbarInput {
@@ -1093,7 +1111,11 @@ export class UrlbarInput {
}
if (!this.#providesSearchMode(result)) {
@@ -65,7 +65,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
}
this.controller.recordSelectedResult(event, result);
@@ -2124,6 +2146,10 @@ export class UrlbarInput {
@@ -2125,6 +2147,10 @@ export class UrlbarInput {
await this.#updateLayoutBreakoutDimensions();
}
@@ -76,7 +76,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
startLayoutExtend() {
if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
// Do not expand if the Urlbar does not support being expanded or it is
@@ -2146,6 +2172,11 @@ export class UrlbarInput {
@@ -2147,6 +2173,11 @@ export class UrlbarInput {
this.setAttribute("breakout-extend", "true");
@@ -88,7 +88,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
// 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")) {
@@ -2165,6 +2196,19 @@ export class UrlbarInput {
@@ -2166,6 +2197,19 @@ export class UrlbarInput {
return;
}
@@ -108,7 +108,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
this.removeAttribute("breakout-extend");
this.#updateTextboxPosition();
}
@@ -2997,7 +3041,7 @@ export class UrlbarInput {
@@ -2998,7 +3042,7 @@ export class UrlbarInput {
*/
_trimValue(val) {
let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
@@ -117,7 +117,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
: val;
// Only trim value if the directionality doesn't change to RTL and we're not
// showing a strikeout https protocol.
@@ -3367,6 +3411,10 @@ export class UrlbarInput {
@@ -3368,6 +3412,10 @@ export class UrlbarInput {
}
reuseEmpty = true;
}
@@ -128,7 +128,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
if (
where == "tab" &&
reuseEmpty &&
@@ -3374,6 +3422,9 @@ export class UrlbarInput {
@@ -3375,6 +3423,9 @@ export class UrlbarInput {
) {
where = "current";
}
@@ -138,7 +138,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
return where;
}
@@ -3625,7 +3676,7 @@ export class UrlbarInput {
@@ -3626,7 +3677,7 @@ export class UrlbarInput {
pasteAndGo.setAttribute("anonid", "paste-and-go");
pasteAndGo.addEventListener("command", () => {
this._suppressStartQuery = true;
@@ -147,7 +147,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
this.select();
this.window.goDoCommand("cmd_paste");
this.setResultForCurrentValue(null);
@@ -3638,7 +3689,6 @@ export class UrlbarInput {
@@ -3639,7 +3690,6 @@ export class UrlbarInput {
contextMenu.addEventListener("popupshowing", () => {
// Close the results pane when the input field contextual menu is open,
// because paste and go doesn't want a result selection.
@@ -155,7 +155,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
let controller =
this.document.commandDispatcher.getControllerForCommand("cmd_paste");
@@ -4048,6 +4098,11 @@ export class UrlbarInput {
@@ -4053,6 +4103,11 @@ export class UrlbarInput {
}
_on_click(event) {
@@ -167,7 +167,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
if (
event.target == this.inputField ||
event.target == this._inputContainer ||
@@ -4119,7 +4174,7 @@ export class UrlbarInput {
@@ -4124,7 +4179,7 @@ export class UrlbarInput {
}
}
@@ -176,7 +176,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
this.view.autoOpen({ event });
} else {
if (this._untrimOnFocusAfterKeydown) {
@@ -4159,9 +4214,12 @@ export class UrlbarInput {
@@ -4164,9 +4219,12 @@ export class UrlbarInput {
}
_on_mousedown(event) {
@@ -190,7 +190,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862
if (
event.target != this.inputField &&
@@ -4171,8 +4229,8 @@ export class UrlbarInput {
@@ -4176,8 +4234,8 @@ export class UrlbarInput {
break;
}

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/urlbar/UrlbarView.sys.mjs b/browser/components/urlbar/UrlbarView.sys.mjs
index 0e6724f590490354cc4d4bde5176556f7e4b4a7c..bffc52488443d62de46abe5cbdac4504831c4a09 100644
index d5382623595de8daed8cd13ea2eb2de329a4bd92..8e160e0bb5a1cd626753feba2008a24e3bbd84cd 100644
--- a/browser/components/urlbar/UrlbarView.sys.mjs
+++ b/browser/components/urlbar/UrlbarView.sys.mjs
@@ -610,7 +610,7 @@ export class UrlbarView {
@@ -609,7 +609,7 @@ export class UrlbarView {
!this.input.value ||
this.input.getAttribute("pageproxystate") == "valid"
) {

View File

@@ -1,13 +0,0 @@
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"

View File

@@ -1,8 +1,8 @@
diff --git a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
index df9d63c2713b4237d8acca93f108d5c788caed8d..a80cc02fdec6e1056d26a6b5a1cdc1a602e5cf2a 100644
index a325becabddda511204fc5bd2022edc332cdde7c..6bb29b21f1e6c1d6ea3d38d50f01148e0a51f0d7 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 = () => [
@@ -52,7 +52,7 @@ const PREFS_BEFORE_SECTIONS = () => [
titleString: "home-prefs-shortcuts-header",
descString: "home-prefs-shortcuts-description",
get nestedPrefs() {

View File

@@ -1,8 +1,8 @@
diff --git a/browser/extensions/newtab/lib/ActivityStream.sys.mjs b/browser/extensions/newtab/lib/ActivityStream.sys.mjs
index b3d89213ec27151f05e9990d5a55c6e81ce3655f..3c485f616fa2daba62aacbdde2dfb3122e244821 100644
index 14183ad7165dc91126b4409b26f669409c4e9905..be979225b89b193b9e9c8903de5740dc04a8999f 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([
@@ -215,7 +215,7 @@ export const PREFS_CONFIG = new Map([
"showSponsoredTopSites",
{
title: "Show sponsored top sites",

View File

@@ -1,8 +1,8 @@
diff --git a/browser/modules/URILoadingHelper.sys.mjs b/browser/modules/URILoadingHelper.sys.mjs
index c4428df9e1c43ba7a1dfefa2d55316023325d2db..191bc513862d5247e338c683b11ae891ab914479 100644
index 14bf18132eaee8a0c8fe6e108ac423de91a7d3e2..fa616654fdf8a29d59889227780a98f0f9dc9a20 100644
--- a/browser/modules/URILoadingHelper.sys.mjs
+++ b/browser/modules/URILoadingHelper.sys.mjs
@@ -510,7 +510,7 @@ export const URILoadingHelper = {
@@ -516,7 +516,7 @@ export const URILoadingHelper = {
// page. If a load request bounces off for the currently selected tab,
// we'll open a new tab instead.
let tab = w.gBrowser.getTabForBrowser(targetBrowser);

View File

@@ -1,5 +1,5 @@
diff --git a/browser/themes/BuiltInThemeConfig.sys.mjs b/browser/themes/BuiltInThemeConfig.sys.mjs
index 4e5a4f1795c18241d9143d159f7d040142e728d4..f4b0e9a7077076f2fbe8ac17fa6aadf586c6b37c 100644
index 081187147736f56abfe5866a69e00ac13a8dd940..9a980fe858c1a77af7634037aebc332d237e9c11 100644
--- a/browser/themes/BuiltInThemeConfig.sys.mjs
+++ b/browser/themes/BuiltInThemeConfig.sys.mjs
@@ -33,13 +33,6 @@ export const BuiltInThemeConfig = new Map([

View File

@@ -470,10 +470,33 @@ groupbox h2 {
align-items: center;
}
.zenThemeMarketplaceItemHomepageButton {
width: 30px;
min-width: 0;
position: relative;
cursor: pointer;
&::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 18px;
height: 18px;
background-image: url('chrome://browser/skin/home.svg');
background-repeat: no-repeat;
background-size: cover;
fill: currentColor;
-moz-context-properties: fill, fill-opacity;
}
}
.zenThemeMarketplaceItemConfigureButton {
width: 30px;
min-width: 0;
position: relative;
cursor: pointer;
&::before {
content: '';

View File

@@ -1,5 +1,5 @@
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52c16c5227 100644
index 6ca85d9d4d593271fe49138ea736bd96651c05f5..192acb662eaeaeb67df890de4c9681952b078526 100644
--- a/browser/themes/shared/tabbrowser/tabs.css
+++ b/browser/themes/shared/tabbrowser/tabs.css
@@ -32,7 +32,7 @@
@@ -11,7 +11,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
--tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent);
--tab-selected-textcolor: var(--toolbar-color);
--tab-selected-bgcolor: var(--toolbar-bgcolor);
@@ -214,8 +214,7 @@
@@ -210,8 +210,7 @@
}
#tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > &[pinned] {
@@ -20,16 +20,16 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
+
}
#tabbrowser-tabs[movingtab] &:is([selected], [multiselected]) {
@@ -254,7 +253,6 @@
#tabbrowser-tabs[movingtab] &:is(:active, [multiselected]) {
@@ -257,7 +256,6 @@
}
:root:not([uidensity=compact]) &[pinned] {
:root:not([uidensity=compact], [sidebar-expand-on-hover]) &[pinned] {
- padding: 0 10px;
}
&:is([selected], [multiselected]) {
@@ -268,6 +266,7 @@
@@ -271,6 +269,7 @@
border-radius: inherit;
position: relative;
overflow: hidden;
@@ -37,7 +37,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
&::before {
position: absolute;
@@ -442,6 +441,7 @@
@@ -458,6 +457,7 @@
.tab-icon-image {
-moz-context-properties: fill, stroke;
fill: currentColor;
@@ -45,7 +45,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
/* Apply crisp rendering for favicons at exactly 2dppx resolution */
@media (resolution: 2dppx) {
@@ -523,7 +523,7 @@
@@ -557,7 +557,7 @@
z-index: 1; /* Overlay tab title */
#tabbrowser-tabs[orient=vertical] & {
@@ -54,7 +54,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
}
&[crashed] {
@@ -531,7 +531,7 @@
@@ -565,7 +565,7 @@
}
#tabbrowser-tabs[orient="vertical"]:not([expanded]) &:not([crashed]),
@@ -63,7 +63,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
&[soundplaying] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg");
}
@@ -561,7 +561,7 @@
@@ -595,7 +595,7 @@
background-image: linear-gradient(var(--audio-overlay-extra-background)),
linear-gradient(var(--toolbox-bgcolor));
-moz-context-properties: fill;
@@ -72,44 +72,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
color-scheme: var(--tab-selected-color-scheme);
border-radius: var(--border-radius-circle);
@@ -593,7 +593,7 @@
}
#tabbrowser-tabs[orient="vertical"]:not([expanded]) &:is([soundplaying], [muted], [activemedia-blocked]),
- &[pinned]:is([soundplaying], [muted], [activemedia-blocked]),
+ &:is([soundplaying], [muted], [activemedia-blocked]),
&[crashed] {
display: revert;
}
@@ -607,7 +607,7 @@
--button-min-height-small: 24px;
--button-border-radius: var(--border-radius-small);
- #tabbrowser-tabs:is([orient="vertical"][expanded], [orient="horizontal"]) &:not([pinned]):not([crashed]) {
+ #tabbrowser-tabs:is([orient="horizontal"]) &:not([pinned]):not([crashed]) {
&:is([soundplaying], [muted], [activemedia-blocked]) {
display: block;
}
@@ -638,14 +638,14 @@
}
&[textoverflow] {
- &[labeldirection=ltr]:not([pinned]),
- &:not([labeldirection], [pinned]):-moz-locale-dir(ltr) {
+ &[labeldirection=ltr],
+ &:not([labeldirection]):-moz-locale-dir(ltr) {
direction: ltr;
mask-image: linear-gradient(to left, transparent, black var(--tab-label-mask-size));
}
- &[labeldirection=rtl]:not([pinned]),
- &:not([labeldirection], [pinned]):-moz-locale-dir(rtl) {
+ &[labeldirection=rtl],
+ &:not([labeldirection]):-moz-locale-dir(rtl) {
direction: rtl;
mask-image: linear-gradient(to right, transparent, black var(--tab-label-mask-size));
}
@@ -1201,7 +1201,7 @@
@@ -1362,7 +1362,7 @@ tab-group {
}
}
@@ -118,7 +81,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
#vertical-tabs-newtab-button {
appearance: none;
min-height: var(--tab-min-height);
@@ -1212,7 +1212,7 @@
@@ -1373,7 +1373,7 @@ tab-group {
margin-inline: var(--tab-inner-inline-margin);
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
@@ -127,7 +90,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
}
&:hover {
@@ -1236,7 +1236,7 @@
@@ -1397,7 +1397,7 @@ tab-group {
* flex container. #tabs-newtab-button is a child of the arrowscrollbox where
* we don't want a gap (between tabs), so we have to add some margin.
*/
@@ -136,15 +99,16 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
margin-block: var(--tab-block-margin);
}
@@ -1260,7 +1260,6 @@
}
@@ -1471,8 +1471,6 @@ tab-group {
}
#vertical-pinned-tabs-container {
- --tab-inline-padding: calc((calc(var(--tab-collapsed-background-width) + 2 * var(--tab-pinned-margin-inline-expanded) - var(--icon-size-default)) / 2));
display: none;
grid-template-columns: repeat(auto-fit, minmax(var(--tab-pinned-min-width-expanded), auto));
overflow-y: auto;
@@ -1480,7 +1479,7 @@
:root:not([sidebar-expand-on-hover]) & {
- --tab-inline-padding: calc((var(--tab-collapsed-background-width) + 2 *
- var(--tab-pinned-margin-inline-expanded) - var(--icon-size-default)) / 2);
/* stylelint-disable-next-line media-query-no-invalid */
@media not -moz-pref("sidebar.visibility", "expand-on-hover") {
/* We need these rules to apply at all times when the sidebar.visibility
@@ -1717,7 +1715,7 @@ tab-group {
toolbarbutton:not(#firefox-view-button),
toolbarpaletteitem:not(#wrapper-firefox-view-button)
) ~ #tabbrowser-tabs {
@@ -153,7 +117,7 @@ index bafbb39aac37843e3b6dceb0e81304af51e186cc..92b4fd725118150634ab2ae0a24efb52
padding-inline-start: calc(var(--tab-overflow-pinned-tabs-width) + 2px);
margin-inline-start: 2px;
}
@@ -1514,7 +1513,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
@@ -1751,7 +1749,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
list-style-image: url(chrome://global/skin/icons/plus.svg);
}

View File

@@ -24,10 +24,6 @@
list-style-image: url('move-tab.svg') !important;
}
.zen-tab-unsplit-button {
list-style-image: url('unpin.svg') !important;
}
#forward-button,
#zen-sidebar-web-panel-forward {
list-style-image: url('forward.svg') !important;
@@ -63,9 +59,7 @@
list-style-image: url('sidebars-right.svg') !important;
}
#context_zenSplitTabs,
#context-zenAddToWebPanel {
/* TODO: Add split view icon */
#context_zenSplitTabs {
--menu-image: url('sidebars-right.svg') !important;
}
@@ -168,10 +162,6 @@
--menu-image: url('open.svg') !important;
}
#context_zenSetAsDefaultWorkspace {
--menu-image: url('bookmark-hollow.svg') !important;
}
#context_zenEditWorkspace,
#zenToolbarThemePicker {
--menu-image: url('edit-theme.svg') !important;
@@ -271,7 +261,8 @@
#restore-button,
#fullscreen-button,
#zen-glance-sidebar-open,
#appMenu-fullscreen-button2 {
#appMenu-fullscreen-button2,
.zen-tab-unsplit-button {
list-style-image: url('fullscreen.svg') !important;
}

View File

@@ -1,20 +1,13 @@
diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css
index 9af78803f0005a2b89e1c73f52153ed4d9e3154a..b63dc3d050144f048ac6a326acd57cc85fa8a3a7 100644
index 3e75a5f366e76acf4b9457a510b58b0cb8af580f..4962151f34ff52e8d009b82a9a12da99c4745a7a 100644
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -40,14 +40,13 @@
* override these on the tabs toolbar because the accent color is
* arbitrary, so the hardcoded colors from browser-custom-colors might
* not provide sufficient contrast. */
- --toolbarbutton-icon-fill: currentColor;
--toolbarbutton-hover-background: color-mix(in srgb, currentColor 17%, transparent);
--toolbarbutton-active-background: color-mix(in srgb, currentColor 30%, transparent);
@@ -57,7 +57,7 @@
}
}
&[sizemode="normal"] #navigator-toolbox {
- border-top: .5px solid ActiveBorder;
+ /* border-top: .5px solid ActiveBorder; Zen: Remove annoying top border, dont remove */
- &[sizemode="normal"] #navigator-toolbox {
+ &[sizemode="normal"] #browser {
border-top: .5px solid ActiveBorder;
&:-moz-window-inactive {
border-top-color: InactiveBorder;
}