mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 01:16:35 +00:00
Update dependencies and modify branding for stable release
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
@@ -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
|
@@ -1,5 +0,0 @@
|
||||
.customize-menu[role='dialog'] {
|
||||
margin: 10px;
|
||||
border-radius: 7px;
|
||||
height: -moz-fit-content;
|
||||
}
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user