Update dependencies and modify branding for stable release

This commit is contained in:
mr. M
2024-12-30 23:19:11 +01:00
parent aa72ea805f
commit a389621cf1
18 changed files with 194 additions and 178 deletions

View File

@@ -5,11 +5,11 @@ index eb2d8670874bd5bcaf9253caafb98444cb8cfcd9..51e6c01c279e0105ec8ac08df0763027
@@ -2,7 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-<toolbox id="navigator-toolbox">
+<toolbox id="navigator-toolbox" persist="width style">
-<toolbox id="navigator-toolbox" class="browser-toolbox-background">
+<toolbox id="navigator-toolbox" class="browser-toolbox-background" persist="width style">
<script src="chrome://browser/content/navigator-toolbox.js" />
<!-- Menu -->
@@ -19,7 +19,7 @@
<spacer flex="1" skipintoolbarset="true" style="order: 1000;"/>
@@ -21,9 +21,9 @@ index eb2d8670874bd5bcaf9253caafb98444cb8cfcd9..51e6c01c279e0105ec8ac08df0763027
class="browser-toolbar browser-titlebar"
fullscreentoolbar="true"
@@ -32,7 +32,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/>
@@ -36,7 +36,7 @@ index eb2d8670874bd5bcaf9253caafb98444cb8cfcd9..51e6c01c279e0105ec8ac08df0763027
+ hidden="true"
cui-areatype="toolbar"
removable="true"/>
@@ -55,9 +56,14 @@
# significantly, there is an optimization in
# DisplayPortUtils::MaybeCreateDisplayPortInFirstScrollFrameEncountered based
@@ -81,5 +81,5 @@ index eb2d8670874bd5bcaf9253caafb98444cb8cfcd9..51e6c01c279e0105ec8ac08df0763027
#include titlebar-items.inc.xhtml
+#endif
</toolbar>
<toolbar id="PersonalToolbar"

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..04a65485a3493fd42b2a58523123f1392ed9c3b2 100644
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427b1d934e3 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -19,48 +19,42 @@ index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..04a65485a3493fd42b2a58523123f139
const kSpecialWidgetPfx = "customizableui-special-";
@@ -307,13 +308,14 @@ var CustomizableUIInternal = {
@@ -307,13 +308,11 @@ var CustomizableUIInternal = {
"spring",
"urlbar-container",
"spring",
- "save-to-pocket-button",
- "downloads-button",
+// "downloads-button",
+// "downloads-button",
AppConstants.MOZ_DEV_EDITION ? "developer-button" : null,
- "fxa-toolbar-menu-button",
+ "wrapper-sidebar-button",
lazy.resetPBMToolbarButtonEnabled ? "reset-pbm-toolbar-button" : null,
].filter(name => name);
-
+ lazy.ZenCustomizableUI.startup(this);
+
this.registerArea(
CustomizableUI.AREA_NAVBAR,
{
@@ -322,7 +324,7 @@ var CustomizableUIInternal = {
@@ -321,7 +320,6 @@ var CustomizableUIInternal = {
overflowable: true,
defaultPlacements: navbarPlacements,
verticalTabsDefaultPlacements: [
"firefox-view-button",
- "new-tab-button",
+// "new-tab-button",
- "firefox-view-button",
"alltabs-button",
],
defaultCollapsed: false,
@@ -347,10 +349,10 @@ var CustomizableUIInternal = {
@@ -346,10 +344,7 @@ var CustomizableUIInternal = {
{
type: CustomizableUI.TYPE_TOOLBAR,
defaultPlacements: [
- "firefox-view-button",
+// "firefox-view-button",
"tabbrowser-tabs",
- "new-tab-button",
- "alltabs-button",
+// "new-tab-button",
+// "alltabs-button",
],
verticalTabsDefaultPlacements: [],
defaultCollapsed: null,
@@ -413,6 +415,7 @@ var CustomizableUIInternal = {
@@ -412,6 +407,7 @@ var CustomizableUIInternal = {
CustomizableUI.AREA_NAVBAR,
CustomizableUI.AREA_BOOKMARKS,
CustomizableUI.AREA_TABSTRIP,
@@ -68,7 +62,7 @@ index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..04a65485a3493fd42b2a58523123f139
]);
if (AppConstants.platform != "macosx") {
toolbars.add(CustomizableUI.AREA_MENUBAR);
@@ -1128,6 +1131,9 @@ var CustomizableUIInternal = {
@@ -1127,6 +1123,9 @@ var CustomizableUIInternal = {
placements = gPlacements.get(area);
}
@@ -78,7 +72,7 @@ index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..04a65485a3493fd42b2a58523123f139
// For toolbars that need it, mark as dirty.
let defaultPlacements = areaProperties.get("defaultPlacements");
if (
@@ -3603,7 +3609,7 @@ var CustomizableUIInternal = {
@@ -3609,7 +3608,7 @@ var CustomizableUIInternal = {
}
},
@@ -87,7 +81,7 @@ index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..04a65485a3493fd42b2a58523123f139
for (let [areaId, areaNodes] of gBuildAreas) {
let placements = gPlacements.get(areaId);
let isFirstChangedToolbar = true;
@@ -3614,7 +3620,7 @@ var CustomizableUIInternal = {
@@ -3620,7 +3619,7 @@ var CustomizableUIInternal = {
if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
let defaultCollapsed = area.get("defaultCollapsed");
let win = areaNode.ownerGlobal;
@@ -96,7 +90,7 @@ index 45d0e0e4872eeabf87862dbadfee1dc211ed7bed..04a65485a3493fd42b2a58523123f139
win.setToolbarVisibility(
areaNode,
typeof defaultCollapsed == "string"
@@ -4572,6 +4578,7 @@ export var CustomizableUI = {
@@ -4583,6 +4582,7 @@ export var CustomizableUI = {
unregisterArea(aName, aDestroyPlacements) {
CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);
},

View File

@@ -1,11 +0,0 @@
diff --git a/browser/components/newtab/content-src/components/CustomizeMenu/_CustomizeMenu.scss b/browser/components/newtab/content-src/components/CustomizeMenu/_CustomizeMenu.scss
index f534b8701b79fe3f0045c7b10f0db8ab5bbf5e8a..faf92fd8884b1f5d96a049ccdbd5e30ba2fca30a 100644
--- a/browser/components/newtab/content-src/components/CustomizeMenu/_CustomizeMenu.scss
+++ b/browser/components/newtab/content-src/components/CustomizeMenu/_CustomizeMenu.scss
@@ -242,3 +242,5 @@
outline: 0;
box-shadow: $shadow-focus;
}
+
+@import 'zenNewTabGlobals';
\ No newline at end of file

View File

@@ -1,5 +0,0 @@
.customize-menu[role='dialog'] {
margin: 10px;
border-radius: 7px;
height: -moz-fit-content;
}

View File

@@ -4,8 +4,8 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -402,11 +402,26 @@
return count;
},
}
+ get _numVisiblePinTabs() {
+ let i = 0;
+ for (let tab of this.tabs) {
@@ -17,7 +17,7 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
+ }
+ }
+ return i;
+ },
+ }
+
get pinnedTabCount() {
- for (var i = 0; i < this.tabs.length; i++) {
@@ -30,20 +30,20 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
+ i++;
}
return i;
},
}
@@ -800,7 +815,7 @@
this.showTab(aTab);
if (this.tabContainer.verticalMode) {
let wasFocused = document.activeElement == this.selectedTab;
let oldPosition = aTab._tPos;
- this.verticalPinnedTabsContainer.appendChild(aTab);
+ aTab.hasAttribute("zen-essential") ? document.getElementById("zen-essentials-container").appendChild(aTab) : this.verticalPinnedTabsContainer.appendChild(aTab);
this._updateAfterMoveTabTo(aTab, oldPosition, wasFocused);
this._handleTabMove(aTab, () =>
- this.verticalPinnedTabsContainer.appendChild(aTab)
+ aTab.hasAttribute("zen-essential") ? document.getElementById("zen-essentials-container").appendChild(aTab) : this.verticalPinnedTabsContainer.appendChild(aTab);
);
} else {
this.moveTabTo(aTab, this.pinnedTabCount);
@@ -1047,6 +1062,7 @@
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
+ try {
if (
aIconURL &&
@@ -55,7 +55,7 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
+ } catch (e) {
+ console.warn(e);
+ }
let browser = this.getBrowserForTab(aTab);
browser.mIconURL = aIconURL;
@@ -1286,6 +1305,7 @@
@@ -67,13 +67,13 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
// if this is the foreground window, update the last-seen timestamps.
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
@@ -2371,7 +2391,7 @@
let panel = this.getPanel(browser);
let uniqueId = this._generateUniquePanelID();
- panel.id = uniqueId;
+ if (!panel.id?.startsWith("zen-")) panel.id = uniqueId;
aTab.linkedPanel = uniqueId;
// Inject the <browser> into the DOM if necessary.
@@ -2431,7 +2451,7 @@
// hasSiblings=false on both the existing browser and the new browser.
@@ -87,7 +87,7 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
@@ -2651,6 +2671,12 @@
);
}
+ let hasZenDefaultUserContextId = false;
+ let zenForcedWorkspaceId = undefined;
+ if (typeof ZenWorkspaces !== "undefined") {
@@ -113,7 +113,7 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
@@ -2862,6 +2894,13 @@
}
}
+ requestAnimationFrame(() => {
+ t.setAttribute("zen-initial-fadein", "true");
+ setTimeout(() => {
@@ -150,7 +150,7 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
} else {
@@ -3355,6 +3411,9 @@
restoreTabsLazily && !select && !tabData.pinned;
let url = "about:blank";
+
+ gZenPinnedTabManager.resetPinnedTabData(tabData);
@@ -161,7 +161,7 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
@@ -3391,6 +3450,21 @@
preferredRemoteType,
});
+ if (tabData.zenWorkspace) {
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
+ }
@@ -187,22 +187,22 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
-
tab.initialize();
}
@@ -3992,6 +4065,10 @@
return;
}
+ for (tab of selectedTabs) {
+ gZenPinnedTabManager._removePinnedAttributes(tab, true);
+ }
+
this.removeTabs(selectedTabs);
},
}
@@ -4309,6 +4386,13 @@
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
}
+ if (ZenWorkspaces.workspaceEnabled) {
+ let newTab = ZenWorkspaces.handleTabBeforeClose(aTab);
+ if (newTab) {
@@ -216,7 +216,7 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
@@ -4324,6 +4408,10 @@
// state).
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
+ if (aTab.hasAttribute("zen-glance-tab")) {
+ gZenGlanceManager.closeGlance();
+ return;
@@ -225,18 +225,18 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
!this._beginRemoveTab(aTab, {
closeWindowFastpath: true,
@@ -4472,7 +4560,7 @@
var closeWindow = false;
var newTab = false;
- if (aTab.visible && this.visibleTabs.length == 1) {
+ if (aTab.visible && this.visibleTabs.length == 1 && !aTab._closingGlance) {
!!this.tabsInCollapsedTabGroups.length;
if (
aTab.visible &&
- this.visibleTabs.length == 1 &&
+ this.visibleTabs.length == 1 && !aTab._closingGlance
!anyRemainingTabsInCollapsedTabGroups
) {
closeWindow =
closeWindowWithLastTab != null
? closeWindowWithLastTab
@@ -5265,10 +5353,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
},
}
- hideTab(aTab, aSource) {
+ hideTab(aTab, aSource, forZenWorkspaces = false) {
if (
@@ -270,7 +270,7 @@ index fec3dc8129a4d235fdd05e0390145a02064ebaa5..65f0675f558bda9a1d02335418ffb92b
- tabsToMove[0] == visibleTabs[gBrowser.pinnedTabCount];
+ tabsToMove[0] == visibleTabs[gBrowser._numVisiblePinTabs];
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
document.getElementById("context_openTabInWindow").disabled =
@@ -8376,6 +8465,7 @@ var TabContextMenu = {
if (this.contextTab.multiselected) {

View File

@@ -14,14 +14,14 @@ index f9e256b143786c18ba85859ca1b11182ab23f1aa..f60a8850305f1d7c2eadb6ac6996302f
@@ -918,7 +918,7 @@
let postTransitionCleanup = () => {
tab.removeAttribute("tabdrop-samewindow");
- this._finishAnimateTabMove();
+ this._finishAnimateTabMove(true);
if (dropIndex !== false) {
gBrowser.moveTabTo(tab, dropIndex);
if (incrementDropIndex) {
@@ -928,7 +928,7 @@
gBrowser.syncThrobberAnimations(tab);
};
- if (gReduceMotion) {
@@ -40,30 +40,30 @@ index f9e256b143786c18ba85859ca1b11182ab23f1aa..f60a8850305f1d7c2eadb6ac6996302f
delete draggedTab._dragData;
return;
@@ -1328,7 +1329,7 @@
}
}
- this.#allTabs = [...verticalPinnedTabsContainer.children, ...children];
+ this.#allTabs = [...document.getElementById("zen-essentials-container").children, ...verticalPinnedTabsContainer.children, ...children];
this.#allTabs = [
- ...this.verticalPinnedTabsContainer.children,
+ ...document.getElementById("zen-essentials-container").children, ...verticalPinnedTabsContainer.children,
...children,
];
return this.#allTabs;
}
@@ -1520,10 +1521,12 @@
_handleTabSelect(aInstant) {
let selectedTab = this.selectedItem;
- if (this.overflowing) {
- this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant);
- }
+ this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant);
+ if (!aInstant && Services.prefs.getBoolPref('zen.view.compact')
+ && Services.prefs.getBoolPref('zen.view.compact.toolbar-flash-popup')) {
+ gZenCompactModeManager.flashSidebar();
+ }
selectedTab._notselectedsinceload = false;
}
@@ -1571,7 +1574,7 @@
if (isEndTab && !this._hasTabTempMaxWidth) {
return;
@@ -88,7 +88,7 @@ index f9e256b143786c18ba85859ca1b11182ab23f1aa..f60a8850305f1d7c2eadb6ac6996302f
);
- let numPinned = gBrowser.pinnedTabCount;
+ let numPinned = gBrowser._numVisiblePinTabs;
if (gBrowser.pinnedTabCount !== verticalTabsContainer.children.length) {
let tabs = this.visibleTabs;
for (let i = 0; i < numPinned; i++) {
@@ -97,28 +97,28 @@ index f9e256b143786c18ba85859ca1b11182ab23f1aa..f60a8850305f1d7c2eadb6ac6996302f
+ tabs[i].hasAttribute("zen-essential") ? document.getElementById("zen-essentials-container").appendChild(tabs[i]) : verticalTabsContainer.appendChild(tabs[i]);
}
}
@@ -1681,7 +1684,7 @@
_positionPinnedTabs() {
let tabs = this.visibleTabs;
- let numPinned = gBrowser.pinnedTabCount;
+ let numPinned = gBrowser._numVisiblePinTabs;
let absPositionHorizontalTabs =
this.overflowing && tabs.length > numPinned && numPinned > 0;
@@ -1762,7 +1765,7 @@
return;
}
- let tabs = this.visibleTabs.slice(0, gBrowser.pinnedTabCount);
+ let tabs = this.visibleTabs.slice(0, gBrowser._numVisiblePinTabs);
let directionX = screenX > dragData.animLastScreenX;
let directionY = screenY > dragData.animLastScreenY;
@@ -1948,7 +1951,7 @@
}
let pinned = draggedTab.pinned;
- let numPinned = gBrowser.pinnedTabCount;
+ let numPinned = gBrowser._numVisiblePinTabs;
@@ -128,11 +128,11 @@ index f9e256b143786c18ba85859ca1b11182ab23f1aa..f60a8850305f1d7c2eadb6ac6996302f
@@ -2140,8 +2143,8 @@
);
}
- _finishAnimateTabMove() {
- if (!this.hasAttribute("movingtab")) {
+ _finishAnimateTabMove(always = false) {
+ if (!this.hasAttribute("movingtab") && !always) {
return;
}

View File

@@ -1,5 +1,5 @@
diff --git a/browser/themes/BuiltInThemeConfig.sys.mjs b/browser/themes/BuiltInThemeConfig.sys.mjs
index f738f7f1e37d20d9d9158f052572334714475107..f4b0e9a7077076f2fbe8ac17fa6aadf586c6b37c 100644
index 4e5a4f1795c18241d9143d159f7d040142e728d4..f4b0e9a7077076f2fbe8ac17fa6aadf586c6b37c 100644
--- a/browser/themes/BuiltInThemeConfig.sys.mjs
+++ b/browser/themes/BuiltInThemeConfig.sys.mjs
@@ -33,13 +33,6 @@ export const BuiltInThemeConfig = new Map([
@@ -9,7 +9,7 @@ index f738f7f1e37d20d9d9158f052572334714475107..f4b0e9a7077076f2fbe8ac17fa6aadf5
- [
- "firefox-alpenglow@mozilla.org",
- {
- version: "1.4",
- version: "1.5",
- path: "resource://builtin-themes/alpenglow/",
- },
- ],

View File

@@ -1,36 +0,0 @@
diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
index 08bc078c2572fb218b435e580ef71be2586989c3..3d173cfcfe80e978683df760c132307f97d73ae6 100644
--- a/browser/themes/shared/browser-shared.css
+++ b/browser/themes/shared/browser-shared.css
@@ -163,6 +163,31 @@ body {
border-bottom-color: var(--chrome-content-separator-color);
}
+
+ :root[customizing] & {
+ border-bottom-style: none;
+ }
+
+ :root[lwtheme] & {
+ background-image: var(--lwt-additional-images);
+ background-repeat: var(--lwt-background-tiling);
+ background-position: var(--lwt-background-alignment);
+ background-color: var(--lwt-accent-color);
+ color: inherit;
+
+ &:-moz-window-inactive {
+ background-color: var(--lwt-accent-color-inactive, var(--lwt-accent-color));
+ }
+ }
+
+ /* When a theme defines both theme_frame and additional_backgrounds, show
+ the latter atop the former. */
+ :root[lwtheme-image] & {
+ background-image: var(--lwt-header-image), var(--lwt-additional-images);
+ background-repeat: no-repeat, var(--lwt-background-tiling);
+ background-position: right top, var(--lwt-background-alignment);
+ }
+
:root[customizing] & {
border-bottom-style: none;
}

View File

@@ -1,13 +0,0 @@
diff --git a/browser/themes/shared/preferences/preferences.css b/browser/themes/shared/preferences/preferences.css
index 8f2652f030b9990de83bbffb891f2a52731f478b..322d7e43a516f80de5964b0e25a455c8806fef1a 100644
--- a/browser/themes/shared/preferences/preferences.css
+++ b/browser/themes/shared/preferences/preferences.css
@@ -33,7 +33,7 @@
display: flex;
flex-direction: column;
- --main-pane-width: 664px;
+ --main-pane-width: 750px;
}
/*

View File

@@ -1,11 +1,11 @@
diff --git a/toolkit/content/widgets/browser-custom-element.js b/toolkit/content/widgets/browser-custom-element.js
index 887f59c742c7cb540773f18ce680e1e5b6fd5314..0431d97412b69a9f33042fcc885edb1115a79716 100644
index a531577a29212cdb9e745b88e17fe4177be76635..ae976ecef71d0d659fa6a1d6fea60f5270073544 100644
--- a/toolkit/content/widgets/browser-custom-element.js
+++ b/toolkit/content/widgets/browser-custom-element.js
@@ -411,11 +411,11 @@
}
set docShellIsActive(val) {
@@ -556,11 +556,11 @@
if (!this.browsingContext) {
return;
}
- this.browsingContext.isActive = val;
+ this.browsingContext.isActive = val || this.zenModeActive;
if (this.isRemoteBrowser) {