From c66899741a35aeaf035250e8f9356ab54efd5a4b Mon Sep 17 00:00:00 2001 From: K1ngfish3r Date: Sat, 30 Nov 2024 17:04:39 +0500 Subject: [PATCH 001/134] Update build.yml Signed-off-by: K1ngfish3r --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b037f71a..b2bb32048 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -252,14 +252,14 @@ jobs: - name: Compress run: | cd engine - tar --use-compress-program=zstd -hcf ../zen.source.tar.gz * + tar --use-compress-program=zstd -hcf ../zen.source.tar.zst * cd .. - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: zen.source.tar.gz - path: ./zen.source.tar.gz + name: zen.source.tar.zst + path: ./zen.source.tar.zst windows-step-1: name: Windows build step 1 (PGO build) @@ -466,7 +466,7 @@ jobs: uses: marvinpinto/action-automatic-releases@master with: files: | - zen.source.tar.gz + zen.source.tar.zst zen.linux-generic.tar.bz2 zen.linux-specific.tar.bz2 zen.linux-aarch64.tar.bz2 @@ -509,7 +509,7 @@ jobs: prerelease: false title: 'Alpha build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})' files: | - zen.source.tar.gz + zen.source.tar.zst zen.linux-generic.tar.bz2 zen.linux-specific.tar.bz2 zen.linux-aarch64.tar.bz2 From 24fec75821e939c486d53fb93ab138af930a9ca5 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 31 Dec 2024 19:03:20 +0100 Subject: [PATCH 002/134] Add entitlements for SmartCardServices and WebAuthn support in codesign configuration --- build/codesign/browser.developer.entitlements.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index 90d8e7cc2..98dc54ba4 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -28,5 +28,15 @@ for native messaging webextension helper applications launched by Firefox which rely on Apple Events to signal other processes. --> com.apple.security.automation.apple-events + + + com.apple.security.smartcard + + + com.apple.application-identifier + H36NPCN86W.app.zen-browser.zen + + + com.apple.developer.web-browser.public-key-credential From 9bf6b6ec4a32206a20ca5110f1520267ed8f555e Mon Sep 17 00:00:00 2001 From: Pavel Zolotarevskiy Date: Fri, 3 Jan 2025 21:15:31 +0300 Subject: [PATCH 003/134] fix: don't flash compact sidebar when opening glance Flashing the sidebar when opening glance is unnecessary, as the user explicitly opens the glance tab so there are no new information presented to the user in the sidebar. On the other hand, the sidebar partially covers the glance tab, meaning that the user has to wait for a while before seeing the tab content, which breaks the flow. Closes #3351 Signed-off-by: Pavel Zolotarevskiy --- src/browser/components/tabbrowser/content/tabs-js.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/browser/components/tabbrowser/content/tabs-js.patch b/src/browser/components/tabbrowser/content/tabs-js.patch index a8fc8e2b2..972d9c315 100644 --- a/src/browser/components/tabbrowser/content/tabs-js.patch +++ b/src/browser/components/tabbrowser/content/tabs-js.patch @@ -76,7 +76,8 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..93be23da305a5e2e51bff1c5b5f28743 - } + this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant); -+ if (!aInstant && Services.prefs.getBoolPref('zen.view.compact') ++ if (!aInstant && !gZenGlanceManager.animatingOpen ++ && Services.prefs.getBoolPref('zen.view.compact') + && Services.prefs.getBoolPref('zen.view.compact.toolbar-flash-popup')) { + gZenCompactModeManager.flashSidebar(); + } From f93f4985b330529ac50d28714b5c10acce312042 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheff@users.noreply.github.com> Date: Sat, 4 Jan 2025 12:47:51 +0100 Subject: [PATCH 004/134] Update build.yml Signed-off-by: mr. m <91018726+mr-cheff@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed6f484a3..4137573fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" - exit 1 + #exit 1 else echo ">>> Branch matches" fi From 0e45e0a84366269e19dc13bcda46a8c3d9dff66d Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheff@users.noreply.github.com> Date: Sat, 4 Jan 2025 12:49:08 +0100 Subject: [PATCH 005/134] Update build.yml Signed-off-by: mr. m <91018726+mr-cheff@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4137573fa..ed6f484a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" - #exit 1 + exit 1 else echo ">>> Branch matches" fi From f1a16f2eb2706873362b98001a8773b3a39f30be Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 10:37:42 +0100 Subject: [PATCH 006/134] Adjust CSS for Zen icons to improve layout on Windows platform --- src/browser/themes/shared/zen-icons/icons.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/browser/themes/shared/zen-icons/icons.css b/src/browser/themes/shared/zen-icons/icons.css index 230089869..040572cea 100644 --- a/src/browser/themes/shared/zen-icons/icons.css +++ b/src/browser/themes/shared/zen-icons/icons.css @@ -1117,6 +1117,15 @@ menuitem[id='placesContext_new:separator'] { menupopup > menuitem:is([type='checkbox']) .menu-iconic-left { --menu-image: none !important; margin-inline-start: 4px; - margin-inline-end: 0; - padding-inline-end: 0; + + @media not (-moz-platform: windows) { + margin-inline-end: 0; + padding-inline-end: 0; + } +} + +@media (-moz-platform: windows) { + menupopup > menuitem[checked="true"] { + padding-inline-start: 6px; + } } From a16040073f6f711977e431eadea674e19d9c836f Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 15:55:17 +0100 Subject: [PATCH 007/134] Fix CSS syntax for checked menu items in Windows platform --- src/browser/themes/shared/zen-icons/icons.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/themes/shared/zen-icons/icons.css b/src/browser/themes/shared/zen-icons/icons.css index 040572cea..bcd1f08a5 100644 --- a/src/browser/themes/shared/zen-icons/icons.css +++ b/src/browser/themes/shared/zen-icons/icons.css @@ -1125,7 +1125,7 @@ menupopup > menuitem:is([type='checkbox']) .menu-iconic-left { } @media (-moz-platform: windows) { - menupopup > menuitem[checked="true"] { + menupopup > menuitem[checked='true'] { padding-inline-start: 6px; } } From 9aa0ac9396a28b43fe1d646056708508e4f8c44f Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 16:57:47 +0100 Subject: [PATCH 008/134] Refactor Zen browser settings and URL bar behavior for improved performance and interaction --- src/browser/app/profile/zen-browser.js | 23 ++++++++++--------- .../urlbar/UrlbarInput-sys-mjs.patch | 6 ++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index b8eb0069d..cace923ac 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -228,15 +228,6 @@ pref("browser.xul.error_pages.expert_bad_cert", true); pref("security.tls.enable_0rtt_data", false); pref("network.http.http3.enable_0rtt", false); -// Media -pref("media.memory_cache_max_size", 1048576); -pref("media.cache_readahead_limit", 9000); -pref("media.cache_resume_threshold", 3600); -pref("media.memory_caches_combined_limit_kb", 2560000); - -// Image decoding -pref("image.mem.decode_bytes_at_a_time", 32768); - // Network pref("network.http.max-urgent-start-excessive-connections-per-host", 5); pref("network.dnsCacheExpiration", 3600); @@ -322,8 +313,6 @@ pref('browser.newtabpage.activity-stream.system.showWeather', true); // Enable experimental settings page (Used for Zen Labs) pref('browser.preferences.experimental', true); -// Jang's personal speedups (Thanks to Jang for these!) - // Prefetching: pref("network.dns.disablePrefetch", false); pref("network.prefetch-next", true); @@ -429,3 +418,15 @@ pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false); pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false); pref("browser.preferences.moreFromMozilla", false, locked); pref("browser.aboutwelcome.enabled", false); + +// ---- Experimental settings to try make zen faster +pref("gfx.canvas.accelerated.cache-items", 32768); +pref("gfx.canvas.accelerated.cache-size", 4096); +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); +pref("media.memory_caches_combined_limit_kb", 2560000); + +pref("image.mem.decode_bytes_at_a_time", 32768); diff --git a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch index 699763ba2..a223738e4 100644 --- a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch +++ b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs -index 3ab07e5864b3bb200608e7f619645f92ade129fe..12fe08c48d5ca9f00253e0aa6ebbc867ff471c83 100644 +index 3ab07e5864b3bb200608e7f619645f92ade129fe..0f9722f985abca2fdd4ea0265c020fc4228f2565 100644 --- a/browser/components/urlbar/UrlbarInput.sys.mjs +++ b/browser/components/urlbar/UrlbarInput.sys.mjs @@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -22,10 +22,10 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..12fe08c48d5ca9f00253e0aa6ebbc867 + if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) { + this.setAttribute("zen-floating-urlbar", "true"); -+ this.classList.add("zen-floating-urlbar"); ++ this.textbox.classList.add("zen-floating-urlbar"); + } else { + this.removeAttribute("zen-floating-urlbar"); -+ this.classList.remove("zen-floating-urlbar"); ++ this.textbox.classList.remove("zen-floating-urlbar"); + } // Enable the animation only after the first extend call to ensure it // doesn't run when opening a new window. From 6291e6516597b8d667c2c71ca14267e6fd91a760 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheff@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:03:10 +0100 Subject: [PATCH 009/134] Revert "fix: don't flash compact sidebar when opening glance" --- src/browser/components/tabbrowser/content/tabs-js.patch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/browser/components/tabbrowser/content/tabs-js.patch b/src/browser/components/tabbrowser/content/tabs-js.patch index 172e488e1..d7b754e4a 100644 --- a/src/browser/components/tabbrowser/content/tabs-js.patch +++ b/src/browser/components/tabbrowser/content/tabs-js.patch @@ -94,8 +94,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 - } + this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant); -+ if (!aInstant && !gZenGlanceManager.animatingOpen -+ && Services.prefs.getBoolPref('zen.view.compact') ++ if (!aInstant && Services.prefs.getBoolPref('zen.view.compact') + && Services.prefs.getBoolPref('zen.view.compact.toolbar-flash-popup')) { + gZenCompactModeManager.flashSidebar(); + } From 76cc2fdb25040fc2ad3a8d5d4188bef15c6dade4 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 17:21:22 +0100 Subject: [PATCH 010/134] Refactor compact mode initialization and sidebar flashing logic for improved performance --- src/browser/base/content/ZenStartup.mjs | 6 +-- .../base/zen-components/ZenCompactMode.mjs | 24 ++++++++++- .../tabbrowser/content/tabs-js.patch | 40 ++++++++----------- 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/src/browser/base/content/ZenStartup.mjs b/src/browser/base/content/ZenStartup.mjs index 35f3e7ea3..f868916ce 100644 --- a/src/browser/base/content/ZenStartup.mjs +++ b/src/browser/base/content/ZenStartup.mjs @@ -37,10 +37,10 @@ false ); - ZenWorkspaces.init(); - gZenUIManager.init(); - gZenVerticalTabsManager.init(); gZenCompactModeManager.init(); + ZenWorkspaces.init(); + gZenVerticalTabsManager.init(); + gZenUIManager.init(); document.l10n.setAttributes(document.getElementById('tabs-newtab-button'), 'tabs-toolbar-new-tab'); } catch (e) { diff --git a/src/browser/base/zen-components/ZenCompactMode.mjs b/src/browser/base/zen-components/ZenCompactMode.mjs index 4f6ff01d4..7a9ae835f 100644 --- a/src/browser/base/zen-components/ZenCompactMode.mjs +++ b/src/browser/base/zen-components/ZenCompactMode.mjs @@ -7,13 +7,27 @@ XPCOMUtils.defineLazyPreferenceGetter( 800 ); +XPCOMUtils.defineLazyPreferenceGetter( + lazyCompactMode, + 'COMPACT_MODE_FLASH_ENABLED', + 'zen.view.compact.toolbar-flash-popup', + true +); + var gZenCompactModeManager = { _flashTimeouts: {}, _evenListeners: [], _removeHoverFrames: {}, init() { - Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this)); + XPCOMUtils.defineLazyPreferenceGetter( + lazyCompactMode, + 'COMPACT_MODE_ENABLED', + 'zen.view.compact', + true, + this._updateEvent.bind(this) + ); + Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', this._disableTabsOnHoverIfConflict.bind(this)); Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this)); @@ -27,7 +41,7 @@ var gZenCompactModeManager = { }, get prefefence() { - return Services.prefs.getBoolPref('zen.view.compact'); + return lazyCompactMode.COMPACT_MODE_ENABLED; }, set preference(value) { @@ -50,6 +64,12 @@ var gZenCompactModeManager = { return this._sidebar; }, + flashSidebarIfNecessary(aInstant = false) { + if (!aInstant && this.prefefence && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager.animatingOpen) { + this.flashSidebar(); + } + }, + addContextMenu() { const fragment = window.MozXULElement.parseXULToFragment(` diff --git a/src/browser/components/tabbrowser/content/tabs-js.patch b/src/browser/components/tabbrowser/content/tabs-js.patch index d7b754e4a..bca2bd1f3 100644 --- a/src/browser/components/tabbrowser/content/tabs-js.patch +++ b/src/browser/components/tabbrowser/content/tabs-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js -index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75b5f49782 100644 +index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..63e55af47b30d49e8636d43cae41622626906f16 100644 --- a/browser/components/tabbrowser/content/tabs.js +++ b/browser/components/tabbrowser/content/tabs.js @@ -649,7 +649,7 @@ @@ -85,23 +85,15 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 if (tab && rect(tab).width <= this._tabClipWidth) { this.setAttribute("closebuttons", "activetab"); } else { -@@ -1790,10 +1792,12 @@ +@@ -1794,6 +1796,7 @@ + this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant); + } - _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(); -+ } ++ gZenCompactModeManager.flashSidebarIfNecessary(aInstant); selectedTab._notselectedsinceload = false; } -@@ -1841,7 +1845,7 @@ +@@ -1841,7 +1844,7 @@ if (isEndTab && !this._hasTabTempMaxWidth) { return; } @@ -110,7 +102,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 // 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. -@@ -1856,7 +1860,7 @@ +@@ -1856,7 +1859,7 @@ let tabsToReset = []; for (let i = numPinned; i < tabs.length; i++) { let tab = tabs[i]; @@ -119,7 +111,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 if (!isEndTab) { // keep tabs the same width tab.style.transition = "none"; -@@ -1922,13 +1926,13 @@ +@@ -1922,13 +1925,13 @@ let verticalTabsContainer = document.getElementById( "vertical-pinned-tabs-container" ); @@ -135,7 +127,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 } } -@@ -1952,7 +1956,7 @@ +@@ -1952,7 +1955,7 @@ _positionPinnedTabs() { let tabs = this.visibleTabs; @@ -144,7 +136,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 let absPositionHorizontalTabs = this.overflowing && tabs.length > numPinned && numPinned > 0; -@@ -2033,7 +2037,7 @@ +@@ -2033,7 +2036,7 @@ return; } @@ -153,7 +145,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 let directionX = screenX > dragData.animLastScreenX; let directionY = screenY > dragData.animLastScreenY; -@@ -2221,9 +2225,9 @@ +@@ -2221,9 +2224,9 @@ } let pinned = draggedTab.pinned; @@ -165,7 +157,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 pinned ? numPinned : undefined ); -@@ -2456,8 +2460,8 @@ +@@ -2456,8 +2459,8 @@ ); } @@ -176,7 +168,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 return; } -@@ -2622,9 +2626,9 @@ +@@ -2622,9 +2625,9 @@ function newIndex(aTab, index) { // Don't allow mixing pinned and unpinned tabs. if (aTab.pinned) { @@ -188,7 +180,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 } } -@@ -2726,12 +2730,14 @@ +@@ -2726,12 +2729,14 @@ selectedTab = { left: selectedTab.left, right: selectedTab.right, @@ -204,7 +196,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 selectedTab, ]; }) -@@ -2748,8 +2754,11 @@ +@@ -2748,8 +2753,11 @@ delete this._lastTabToScrollIntoView; // Is the new tab already completely visible? if ( @@ -218,7 +210,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..8b594d9d13b60c51c6f9306e28178e75 ) { return; } -@@ -2757,21 +2766,29 @@ +@@ -2757,21 +2765,29 @@ if (this.arrowScrollbox.smoothScroll) { // Can we make both the new tab and the selected tab completely visible? if ( From 22a0884203bdd53eeb81aaf07d560eb0411db999 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 18:17:54 +0100 Subject: [PATCH 011/134] Refactor CSS styles for zen-browser-container to improve layout consistency and shadow effects --- .../base/content/zen-styles/zen-browser-container.css | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/browser/base/content/zen-styles/zen-browser-container.css b/src/browser/base/content/zen-styles/zen-browser-container.css index 69eee4f2f..9afaef709 100644 --- a/src/browser/base/content/zen-styles/zen-browser-container.css +++ b/src/browser/base/content/zen-styles/zen-browser-container.css @@ -14,16 +14,15 @@ transform 0.1s ease-in-out, opacity 0.1s ease-in-out; - box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)); overflow: hidden; - margin: 1px; :root[zen-right-side='true'] & { margin-left: var(--zen-element-separation); } - :root[zen-no-padding='true'] &:not([zen-split='true']) { - border-radius: 0 !important; + :root:not([zen-no-padding='true']) & { + margin: 1px; + box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5)); } } From 21dde671debf265d358901d6a44fe7c252a26a8a Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 20:10:20 +0100 Subject: [PATCH 012/134] Enable GPU acceleration by default and adjust compact mode CSS for improved layout --- src/browser/app/profile/zen-browser.js | 5 +++++ src/browser/base/content/zen-styles/zen-compact-mode.css | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index cace923ac..e5477e7e8 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -430,3 +430,8 @@ pref("media.cache_resume_threshold", 3600); pref("media.memory_caches_combined_limit_kb", 2560000); pref("image.mem.decode_bytes_at_a_time", 32768); + +// Enable GPU by default +pref("gfx.canvas.accelerated", true); +pref("media.hardware-video-decoding.enabled", true); +pref("layers.gpu-process.enabled", true); diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 7970e3bcd..433cd7d01 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -60,8 +60,8 @@ :root[zen-single-toolbar='true'] & { top: var(--zen-element-separation); - & #nav-bar { - margin-left: calc(var(--zen-toolbox-padding) / 2) !important; + &:not([zen-right-side='true']) #nav-bar { + margin-left: 0 !important; } } } From 75cbb0eeb2fe7bdc2f92317cf4e641c2f5b5090e Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 20:22:30 +0100 Subject: [PATCH 013/134] Add macOS specific preference for greyed-out inactive windows --- src/browser/app/profile/zen-browser.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index e5477e7e8..cb4672dcb 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -145,7 +145,12 @@ pref('zen.view.use-single-toolbar', true); pref('zen.view.sidebar-expanded', true); pref('zen.view.sidebar-collapsed.hide-mute-button', true); pref('zen.view.experimental-force-window-controls-left', false); + +#ifdef XP_MACOSX +pref('zen.view.grey-out-inactive-windows', false); +#else pref('zen.view.grey-out-inactive-windows', true); +#endif pref('zen.view.hide-window-controls', true); pref('zen.view.experimental-no-window-controls', false); From f20b70c35d46e895ca2a2506d796a1fd9ac383d7 Mon Sep 17 00:00:00 2001 From: zabojeb Date: Sun, 5 Jan 2025 23:34:49 +0300 Subject: [PATCH 014/134] Make workspaces icons randomly use only non-flag emojis --- src/browser/base/zen-components/ZenWorkspaces.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index d7f6c8aca..cadb7c986 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -621,7 +621,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { let parentPanel = document.getElementById('PanelUI-zen-workspaces-multiview'); // randomly select an icon - let icon = this._kIcons[Math.floor(Math.random() * this._kIcons.length)]; + let icon = this._kIcons[Math.floor(Math.random() * (this._kIcons.length - 257))]; this._workspaceCreateInput.textContent = ''; this._workspaceCreateInput.value = ''; this._workspaceCreateInput.setAttribute('data-initial-value', ''); From 136a0ecbf7daaa6b21982aa810703fde9d53964e Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 22:11:00 +0100 Subject: [PATCH 015/134] Remove redundant animation frame call for tab container in ZenWorkspaces --- src/browser/base/zen-components/ZenWorkspaces.mjs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index d7f6c8aca..6b83df4f5 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -1274,6 +1274,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { await this._performWorkspaceChange(window, onInit); } finally { this._inChangingWorkspace = false; + this.tabContainer.removeAttribute('dont-animate-tabs'); } } @@ -1304,6 +1305,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { workspaces.workspaces.findIndex((w) => w.uuid === previousWorkspace.uuid) < workspaces.workspaces.findIndex((w) => w.uuid === window.uuid); gBrowser.tabContainer.setAttribute('zen-workspace-animation', isNextWorkspace ? 'next' : 'previous'); + this.tabContainer.removeAttribute('dont-animate-tabs'); this._animatingChange = true; setTimeout(() => { this._animatingChange = false; @@ -1339,9 +1341,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { gBrowser.hideTab(tab, undefined, true); } } - window.requestAnimationFrame(() => { - this.tabContainer.removeAttribute('dont-animate-tabs'); - }); return visibleTabs; } From 4e720eb4d28f4679ce421e36ea6a5de995c8f3f2 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 22:17:57 +0100 Subject: [PATCH 016/134] Update URL bar behavior to use 'zen-compact-mode-ignore' class for improved floating logic --- src/browser/components/urlbar/UrlbarInput-sys-mjs.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch index a223738e4..de100fb40 100644 --- a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch +++ b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs -index 3ab07e5864b3bb200608e7f619645f92ade129fe..0f9722f985abca2fdd4ea0265c020fc4228f2565 100644 +index 3ab07e5864b3bb200608e7f619645f92ade129fe..19efe7e6b78a1ba87c93f39ca8bde5046312b0a9 100644 --- a/browser/components/urlbar/UrlbarInput.sys.mjs +++ b/browser/components/urlbar/UrlbarInput.sys.mjs @@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -22,10 +22,10 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..0f9722f985abca2fdd4ea0265c020fc4 + if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) { + this.setAttribute("zen-floating-urlbar", "true"); -+ this.textbox.classList.add("zen-floating-urlbar"); ++ this.textbox.classList.add("zen-compact-mode-ignore"); + } else { + this.removeAttribute("zen-floating-urlbar"); -+ this.textbox.classList.remove("zen-floating-urlbar"); ++ this.textbox.classList.remove("zen-compact-mode-ignore"); + } // Enable the animation only after the first extend call to ensure it // doesn't run when opening a new window. From bb96eb1a8d12ad03a2ec0b4894e047d47330cab6 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 5 Jan 2025 22:42:12 +0100 Subject: [PATCH 017/134] Add zenKeyset definition and update URL bar behavior for floating logic --- src/browser/base/content/browser-sets-inc.patch | 9 +++++++++ .../base/zen-components/ZenKeyboardShortcuts.mjs | 6 +----- .../components/urlbar/UrlbarInput-sys-mjs.patch | 12 +++++------- 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 src/browser/base/content/browser-sets-inc.patch diff --git a/src/browser/base/content/browser-sets-inc.patch b/src/browser/base/content/browser-sets-inc.patch new file mode 100644 index 000000000..c4bb1bffb --- /dev/null +++ b/src/browser/base/content/browser-sets-inc.patch @@ -0,0 +1,9 @@ +diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc +index 493c593d66883082c2a4df87c4706f919ea675f8..aaaa833b64b0fd890aa2a0794eaeb7e41f002f06 100644 +--- a/browser/base/content/browser-sets.inc ++++ b/browser/base/content/browser-sets.inc +@@ -393,3 +393,4 @@ + internal="true"/> + #endif + ++ diff --git a/src/browser/base/zen-components/ZenKeyboardShortcuts.mjs b/src/browser/base/zen-components/ZenKeyboardShortcuts.mjs index 2231912ed..d0400ec7d 100644 --- a/src/browser/base/zen-components/ZenKeyboardShortcuts.mjs +++ b/src/browser/base/zen-components/ZenKeyboardShortcuts.mjs @@ -995,11 +995,7 @@ var gZenKeyboardShortcutsManager = { return browser.gZenKeyboardShortcutsManager._zenKeyset; } - browser.gZenKeyboardShortcutsManager._zenKeyset = browser.document.createXULElement('keyset'); - browser.gZenKeyboardShortcutsManager._zenKeyset.id = ZEN_KEYSET_ID; - - const mainKeyset = browser.document.getElementById(ZEN_MAIN_KEYSET_ID); - mainKeyset.after(browser.gZenKeyboardShortcutsManager._zenKeyset); + throw new Error('Zen keyset not found'); } return browser.gZenKeyboardShortcutsManager._zenKeyset; }, diff --git a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch index de100fb40..5cefe55f6 100644 --- a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch +++ b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs -index 3ab07e5864b3bb200608e7f619645f92ade129fe..19efe7e6b78a1ba87c93f39ca8bde5046312b0a9 100644 +index 3ab07e5864b3bb200608e7f619645f92ade129fe..31085d82271b0259cd69ec9691ea5f33fe29e19e 100644 --- a/browser/components/urlbar/UrlbarInput.sys.mjs +++ b/browser/components/urlbar/UrlbarInput.sys.mjs @@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -16,21 +16,19 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..19efe7e6b78a1ba87c93f39ca8bde504 const DEFAULT_FORM_HISTORY_NAME = "searchbar-history"; const SEARCH_BUTTON_CLASS = "urlbar-search-button"; -@@ -2152,6 +2159,13 @@ export class UrlbarInput { +@@ -2152,6 +2159,11 @@ export class UrlbarInput { this.setAttribute("breakout-extend", "true"); + if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) { + this.setAttribute("zen-floating-urlbar", "true"); -+ this.textbox.classList.add("zen-compact-mode-ignore"); + } else { + this.removeAttribute("zen-floating-urlbar"); -+ this.textbox.classList.remove("zen-compact-mode-ignore"); + } // 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")) { -@@ -3875,6 +3889,11 @@ export class UrlbarInput { +@@ -3875,6 +3887,11 @@ export class UrlbarInput { } _on_click(event) { @@ -42,7 +40,7 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..19efe7e6b78a1ba87c93f39ca8bde504 if ( event.target == this.inputField || event.target == this._inputContainer || -@@ -3986,9 +4005,12 @@ export class UrlbarInput { +@@ -3986,9 +4003,12 @@ export class UrlbarInput { } _on_mousedown(event) { @@ -56,7 +54,7 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..19efe7e6b78a1ba87c93f39ca8bde504 if ( event.target != this.inputField && -@@ -3998,8 +4020,8 @@ export class UrlbarInput { +@@ -3998,8 +4018,8 @@ export class UrlbarInput { break; } From b9f0d39d1c3d46a48d679ebd814ff9a7c8b0b4b4 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 00:46:17 +0100 Subject: [PATCH 018/134] Refactor workspace icon handling and improve animation state management --- src/browser/app/profile/zen-browser.js | 2 -- src/browser/base/zen-components/ZenCompactMode.mjs | 2 +- .../base/zen-components/ZenGlanceManager.mjs | 13 +++++++++---- src/browser/base/zen-components/ZenWorkspaces.mjs | 9 +++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index cb4672dcb..93ff88714 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -202,8 +202,6 @@ pref('zen.workspaces.swipe-actions', true); pref('zen.workspaces.wrap-around-navigation', true); pref('zen.workspaces.natural-scroll', false); pref('zen.workspaces.scroll-modifier-key','ctrl'); // can be ctrl, alt, shift, or a meta key -pref('zen.workspaces.icons', '["⌚","⌛","⏪","⏫","⏬","⏰","⏳","⚽","⚾","⛄","⛅","⛎","⛔","⛪","⛲","⛳","⛵","⛺","⛽","✅","✊","✋","✨","❌","❎","❓","⭐","⭕","🀄","🃏","🆎","🆑","🆒","🆓","🆔","🆕","🆖","🆗","🆘","🆙","🆚","🈁","🈚","🈯","🈲","🈳","🈴","🈵","🈶","🈸","🈹","🈺","🉐","🉑","🌀","🌁","🌂","🌃","🌄","🌅","🌆","🌇","🌈","🌉","🌊","🌋","🌌","🌍","🌎","🌏","🌐","🌑","🌒","🌓","🌔","🌕","🌖","🌗","🌘","🌙","🌚","🌛","🌜","🌝","🌞","🌟","🌠","🌭","🌮","🌯","🌰","🌱","🌲","🌳","🌴","🌵","🌷","🌸","🌹","🌺","🌻","🌼","🌽","🌾","🌿","🍀","🍁","🍂","🍃","🍄","🍅","🍆","🍇","🍈","🍉","🍊","🍋","🍌","🍍","🍎","🍏","🍐","🍑","🍒","🍓","🍔","🍕","🍖","🍗","🍘","🍙","🍚","🍛","🍜","🍝","🍞","🍟","🍠","🍡","🍢","🍣","🍤","🍥","🍦","🍧","🍨","🍩","🍪","🍫","🍬","🍭","🍮","🍯","🍰","🍱","🍲","🍳","🍴","🍵","🍶","🍷","🍸","🍹","🍺","🍻","🍼","🍾","🍿","🎀","🎁","🎂","🎃","🎄","🎅","🎆","🎇","🎈","🎉","🎊","🎋","🎌","🎍","🎎","🎏","🎐","🎑","🎒","🎓","🎠","🎡","🎢","🎣","🎤","🎥","🎦","🎧","🎨","🎩","🎪","🎫","🎬","🎭","🎮","🎯","🎰","🎱","🎲","🎳","🎴","🎵","🎶","🎷","🎸","🎹","🎺","🎻","🎼","🎽","🎾","🎿","🏀","🏁","🏂","🏃","🏄","🏅","🏆","🏇","🏈","🏉","🏊","🏏","🏐","🏑","🏒","🏓","🏠","🏡","🏢","🏣","🏤","🏥","🏦","🏧","🏨","🏩","🏪","🏫","🏬","🏭","🏮","🏯","🏰","🏴","🏸","🏹","🏺","🏻","🏼","🏽","🏾","🏿","🐀","🐁","🐂","🐃","🐄","🐅","🐆","🐇","🐈","🐉","🐊","🐋","🐌","🐍","🐎","🐏","🐐","🐑","🐒","🐓","🐔","🐕","🐖","🐗","🐘","🐙","🐚","🐛","🐜","🐝","🐞","🐟","🐠","🐡","🐢","🐣","🐤","🐥","🐦","🐧","🐨","🐩","🐪","🐫","🐬","🐭","🐮","🐯","🐰","🐱","🐲","🐳","🐴","🐵","🐶","🐷","🐸","🐹","🐺","🐻","🐼","🐽","🐾","👀","👂","👃","👄","👅","👆","👇","👈","👉","👊","👋","👌","👍","👎","👏","👐","👑","👒","👓","👔","👕","👖","👗","👘","👙","👚","👛","👜","👝","👞","👟","👠","👡","👢","👣","👤","👥","👦","👧","👨","👩","👪","👫","👬","👭","👮","👯","👰","👱","👲","👳","👴","👵","👶","👷","👸","👹","👺","👻","👼","👽","👾","👿","💀","💁","💂","💃","💄","💅","💆","💇","💈","💉","💊","💋","💌","💍","💎","💏","💐","💑","💒","💓","💔","💕","💖","💗","💘","💙","💚","💛","💜","💝","💞","💟","💠","💡","💢","💣","💤","💥","💦","💧","💨","💩","💪","💫","💬","💭","💮","💯","💰","💱","💲","💳","💴","💵","💶","💷","💸","💹","💺","💻","💼","💽","💾","💿","📀","📁","📂","📃","📄","📅","📆","📇","📈","📉","📊","📋","📌","📍","📎","📏","📐","📑","📒","📓","📔","📕","📖","📗","📘","📙","📚","📛","📜","📝","📞","📟","📠","📡","📢","📣","📤","📥","📦","📧","📨","📩","📪","📫","📬","📭","📮","📯","📰","📱","📲","📳","📴","📵","📶","📷","📸","📹","📺","📻","📼","📿","🔀","🔁","🔂","🔃","🔄","🔅","🔆","🔇","🔈","🔉","🔊","🔋","🔌","🔍","🔎","🔏","🔐","🔑","🔒","🔓","🔔","🔕","🔖","🔗","🔘","🔙","🔚","🔛","🔜","🔝","🔞","🔟","🔠","🔡","🔢","🔣","🔤","🔥","🔦","🔧","🔨","🔩","🔪","🔫","🔬","🔭","🔮","🔯","🔰","🔱","🔲","🔳","🔴","🔵","🔶","🔷","🔸","🔹","🔺","🔻","🔼","🔽","🕋","🕌","🕍","🕎","🕐","🕑","🕒","🕓","🕔","🕕","🕖","🕗","🕘","🕙","🕚","🕛","🕜","🕝","🕞","🕟","🕠","🕡","🕢","🕣","🕤","🕥","🕦","🕧","🖕","🖖","🗻","🗼","🗽","🗾","🗿","😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😯","😰","😱","😲","😳","😴","😵","😶","😷","😸","😹","😺","😻","😼","😽","😾","😿","🙀","🙁","🙂","🙃","🙄","🙅","🙆","🙇","🙈","🙉","🙊","🙋","🙌","🙍","🙎","🙏","🚀","🚁","🚂","🚃","🚄","🚅","🚆","🚇","🚈","🚉","🚊","🚋","🚌","🚍","🚎","🚏","🚐","🚑","🚒","🚓","🚔","🚕","🚖","🚗","🚘","🚙","🚚","🚛","🚜","🚝","🚞","🚟","🚠","🚡","🚢","🚣","🚤","🚥","🚦","🚧","🚨","🚩","🚪","🚫","🚬","🚭","🚮","🚯","🚰","🚱","🚲","🚳","🚴","🚵","🚶","🚷","🚸","🚹","🚺","🚻","🚼","🚽","🚾","🚿","🛀","🛁","🛂","🛃","🛄","🛅","🛌","🛐","🛫","🛬","🤐","🤑","🤒","🤓","🤔","🤕","🤖","🤗","🤘","🦀","🦁","🦂","🦃","🦄","🧀","🇦🇨","🇦🇩","🇦🇪","🇦🇫","🇦🇬","🇦🇮","🇦🇱","🇦🇲","🇦🇴","🇦🇶","🇦🇷","🇦🇸","🇦🇹","🇦🇺","🇦🇼","🇦🇽","🇦🇿","🇧🇦","🇧🇧","🇧🇩","🇧🇪","🇧🇫","🇧🇬","🇧🇭","🇧🇮","🇧🇯","🇧🇱","🇧🇲","🇧🇳","🇧🇴","🇧🇶","🇧🇷","🇧🇸","🇧🇹","🇧🇻","🇧🇼","🇧🇾","🇧🇿","🇨🇦","🇨🇨","🇨🇩","🇨🇫","🇨🇬","🇨🇭","🇨🇮","🇨🇰","🇨🇱","🇨🇲","🇨🇳","🇨🇴","🇨🇵","🇨🇷","🇨🇺","🇨🇻","🇨🇼","🇨🇽","🇨🇾","🇨🇿","🇩🇪","🇩🇬","🇩🇯","🇩🇰","🇩🇲","🇩🇴","🇩🇿","🇪🇦","🇪🇨","🇪🇪","🇪🇬","🇪🇭","🇪🇷","🇪🇸","🇪🇹","🇪🇺","🇫🇮","🇫🇯","🇫🇰","🇫🇲","🇫🇴","🇫🇷","🇬🇦","🇬🇧","🇬🇩","🇬🇪","🇬🇫","🇬🇬","🇬🇭","🇬🇮","🇬🇱","🇬🇲","🇬🇳","🇬🇵","🇬🇶","🇬🇷","🇬🇸","🇬🇹","🇬🇺","🇬🇼","🇬🇾","🇭🇰","🇭🇲","🇭🇳","🇭🇷","🇭🇹","🇭🇺","🇮🇨","🇮🇩","🇮🇪","🇮🇱","🇮🇲","🇮🇳","🇮🇴","🇮🇶","🇮🇷","🇮🇸","🇮🇹","🇯🇪","🇯🇲","🇯🇴","🇯🇵","🇰🇪","🇰🇬","🇰🇭","🇰🇮","🇰🇲","🇰🇳","🇰🇵","🇰🇷","🇰🇼","🇰🇾","🇰🇿","🇱🇦","🇱🇧","🇱🇨","🇱🇮","🇱🇰","🇱🇷","🇱🇸","🇱🇹","🇱🇺","🇱🇻","🇱🇾","🇲🇦","🇲🇨","🇲🇩","🇲🇪","🇲🇫","🇲🇬","🇲🇭","🇲🇰","🇲🇱","🇲🇲","🇲🇳","🇲🇴","🇲🇵","🇲🇶","🇲🇷","🇲🇸","🇲🇹","🇲🇺","🇲🇻","🇲🇼","🇲🇽","🇲🇾","🇲🇿","🇳🇦","🇳🇨","🇳🇪","🇳🇫","🇳🇬","🇳🇮","🇳🇱","🇳🇴","🇳🇵","🇳🇷","🇳🇺","🇳🇿","🇴🇲","🇵🇦","🇵🇪","🇵🇫","🇵🇬","🇵🇭","🇵🇰","🇵🇱","🇵🇲","🇵🇳","🇵🇷","🇵🇸","🇵🇹","🇵🇼","🇵🇾","🇶🇦","🇷🇪","🇷🇴","🇷🇸","🇷🇺","🇷🇼","🇸🇦","🇸🇧","🇸🇨","🇸🇩","🇸🇪","🇸🇬","🇸🇭","🇸🇮","🇸🇯","🇸🇰","🇸🇱","🇸🇲","🇸🇳","🇸🇴","🇸🇷","🇸🇸","🇸🇹","🇸🇻","🇸🇽","🇸🇾","🇸🇿","🇹🇦","🇹🇨","🇹🇩","🇹🇫","🇹🇬","🇹🇭","🇹🇯","🇹🇰","🇹🇱","🇹🇲","🇹🇳","🇹🇴","🇹🇷","🇹🇹","🇹🇻","🇹🇼","🇹🇿","🇺🇦","🇺🇬","🇺🇲","🇺🇸","🇺🇾","🇺🇿","🇻🇦","🇻🇨","🇻🇪","🇻🇬","🇻🇮","🇻🇳","🇻🇺","🇼🇫","🇼🇸","🇽🇰","🇾🇪","🇾🇹","🇿🇦","🇿🇲","🇿🇼"]'); -pref('services.sync.prefs.sync.zen.workspaces.icons', true); pref('services.sync.engine.workspaces', false); pref('zen.essentials.enabled', true); pref('zen.workspaces.container-specific-essentials-enabled', false); diff --git a/src/browser/base/zen-components/ZenCompactMode.mjs b/src/browser/base/zen-components/ZenCompactMode.mjs index 7a9ae835f..b6d89d6b1 100644 --- a/src/browser/base/zen-components/ZenCompactMode.mjs +++ b/src/browser/base/zen-components/ZenCompactMode.mjs @@ -65,7 +65,7 @@ var gZenCompactModeManager = { }, flashSidebarIfNecessary(aInstant = false) { - if (!aInstant && this.prefefence && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager.animatingOpen) { + if (!aInstant && this.prefefence && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager._animating) { this.flashSidebar(); } }, diff --git a/src/browser/base/zen-components/ZenGlanceManager.mjs b/src/browser/base/zen-components/ZenGlanceManager.mjs index 3a8d8d35a..847123425 100644 --- a/src/browser/base/zen-components/ZenGlanceManager.mjs +++ b/src/browser/base/zen-components/ZenGlanceManager.mjs @@ -3,7 +3,7 @@ #currentBrowser = null; #currentTab = null; - #animating = false; + _animating = false; init() { document.documentElement.setAttribute('zen-glance-uuid', gZenUIManager.generateUuidv4()); @@ -86,6 +86,8 @@ const currentTab = gBrowser.selectedTab; this.animatingOpen = true; + this._animating = true; + const browserElement = this.createBrowserElement(url, currentTab); this.overlay = browserElement.closest('.browserSidebarContainer'); @@ -107,18 +109,17 @@ this.overlay.removeAttribute('fade-out'); this.browserWrapper.setAttribute('animate', true); - this.#animating = true; setTimeout(() => { this.browserWrapper.setAttribute('animate-end', true); this.browserWrapper.setAttribute('has-finished-animation', true); - this.#animating = false; + this._animating = false; this.animatingOpen = false; }, 500); }); } closeGlance({ noAnimation = false, onTabClose = false } = {}) { - if (this.#animating || !this.#currentBrowser || this.animatingOpen || this._duringOpening) { + if (this._animating || !this.#currentBrowser || this.animatingOpen || this._duringOpening) { return; } @@ -130,6 +131,8 @@ return; } + this._animating = true; + gBrowser._insertTabAtIndex(this.#currentTab, { index: this.currentParentTab._tPos + 1, }); @@ -195,6 +198,8 @@ this.lastCurrentTab = null; this._duringOpening = false; + + this._animating = false; }, 400); }); }); diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 6b83df4f5..7beb4a536 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -463,10 +463,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { return tab; } - _kIcons = JSON.parse(Services.prefs.getStringPref('zen.workspaces.icons')).map((icon) => - typeof Intl.Segmenter !== 'undefined' ? new Intl.Segmenter().segment(icon).containing().segment : Array.from(icon)[0] - ); - searchIcons(input, icons) { input = input.toLowerCase(); @@ -543,7 +539,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { let container = document.getElementById('PanelUI-zen-workspaces-icon-picker-wrapper'); let searchInput = document.getElementById('PanelUI-zen-workspaces-icon-search-input'); searchInput.value = ''; - for (let icon of this._kIcons) { + for (let iconData of this.emojis) { + const icon = iconData[0]; let button = document.createXULElement('toolbarbutton'); button.className = 'toolbarbutton-1 workspace-icon-button'; button.setAttribute('label', icon); @@ -621,7 +618,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { let parentPanel = document.getElementById('PanelUI-zen-workspaces-multiview'); // randomly select an icon - let icon = this._kIcons[Math.floor(Math.random() * this._kIcons.length)]; + let icon = this.emojis[Math.floor(Math.random() * this.emojis.length)][0]; this._workspaceCreateInput.textContent = ''; this._workspaceCreateInput.value = ''; this._workspaceCreateInput.setAttribute('data-initial-value', ''); From 8a695bc1e208cca78ab48daab0dd23d4df2e11e4 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 12:20:29 +0100 Subject: [PATCH 019/134] Enhance zen animations with improved scaling and add macOS-specific animation variant --- .../base/content/zen-styles/zen-animations.css | 13 ++++++++++++- .../base/content/zen-styles/zen-panel-ui.css | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/browser/base/content/zen-styles/zen-animations.css b/src/browser/base/content/zen-styles/zen-animations.css index 14ec72705..05341ea00 100644 --- a/src/browser/base/content/zen-styles/zen-animations.css +++ b/src/browser/base/content/zen-styles/zen-animations.css @@ -9,7 +9,18 @@ } 60% { - transform: scale3d(1.01, 1.01, 1.01); + transform: scale3d(1.02, 1.02, 1.02); + } + + to { + opacity: 1; + transform: scale3d(1, 1, 1); + } +} + +@keyframes zen-jello-animation-alt { + 0% { + transform: scale3d(0.8, 0.8, 0.8); } to { diff --git a/src/browser/base/content/zen-styles/zen-panel-ui.css b/src/browser/base/content/zen-styles/zen-panel-ui.css index 39edad6bc..2aac0b79e 100644 --- a/src/browser/base/content/zen-styles/zen-panel-ui.css +++ b/src/browser/base/content/zen-styles/zen-panel-ui.css @@ -5,6 +5,10 @@ */ panel[type='arrow'][animate][animate='open']::part(content) { animation: zen-jello-animation 0.35s ease; + + @media (-moz-platform: macos) { + animation: zen-jello-animation-alt 0.35s ease; + } } panel[type='arrow'][animate]:not([animate='open'])::part(content) { From 501fd5943ed42d69775ec77c8fa5b00490a238f2 Mon Sep 17 00:00:00 2001 From: mr-cheff Date: Mon, 6 Jan 2025 11:23:49 +0000 Subject: [PATCH 020/134] Update monthly issue metrics --- .../2024_2024-12-01..2024-12-31.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/issue-metrics/2024_2024-12-01..2024-12-31.md b/docs/issue-metrics/2024_2024-12-01..2024-12-31.md index cc07fe7c6..03425300c 100644 --- a/docs/issue-metrics/2024_2024-12-01..2024-12-31.md +++ b/docs/issue-metrics/2024_2024-12-01..2024-12-31.md @@ -2,13 +2,13 @@ | Metric | Average | Median | 90th percentile | | --- | --- | --- | ---: | -| Time to first response | 1 day, 10:53:14 | 5:38:18 | 3 days, 13:56:56 | -| Time to close | 3 days, 13:05:55 | 1 day, 5:00:17 | 10 days, 5:43:20 | +| Time to first response | 2 days, 2:25:52 | 6:06:45 | 4 days, 23:54:11 | +| Time to close | 4 days, 10:13:09 | 1 day, 7:06:20 | 11 days, 18:39:59 | | Metric | Count | | --- | ---: | -| Number of items that remain open | 304 | -| Number of items closed | 267 | +| Number of items that remain open | 293 | +| Number of items closed | 278 | | Total number of items created | 571 | | Title | URL | Time to first response | Time to close | @@ -63,7 +63,7 @@ | Some toolbar buttons stay colored after clicking on them but their panels don't open | https://github.com/zen-browser/desktop/issues/4032 | None | None | | The browser has stopped opening. | https://github.com/zen-browser/desktop/issues/4031 | 2 days, 6:02:42 | 3 days, 20:59:18 | | Startup error | https://github.com/zen-browser/desktop/issues/4029 | 4 days, 7:59:19 | None | -| Ctrl+Shift+C stopped working | https://github.com/zen-browser/desktop/issues/4028 | 2 days, 4:35:14 | 4 days, 3:39:28 | +| Devtool shortcuts aren't being able to be customized | https://github.com/zen-browser/desktop/issues/4028 | 2 days, 4:35:14 | 6 days, 7:02:43 | | At start all bookmarks automatically opens | https://github.com/zen-browser/desktop/issues/4026 | None | None | | Sponsored suggestions are still enabled | https://github.com/zen-browser/desktop/issues/4020 | 14:48:28 | None | | Windows chrome not looking right | https://github.com/zen-browser/desktop/issues/4017 | 4:53:33 | 5:02:49 | @@ -76,7 +76,7 @@ | mouse/keyboard click does not work after some tab switch / window minimize | https://github.com/zen-browser/desktop/issues/4008 | None | None | | Theme resets to default/accent colors on startup | https://github.com/zen-browser/desktop/issues/4007 | 1 day, 16:54:17 | None | | Remove browser padding mod not working | https://github.com/zen-browser/desktop/issues/4005 | 1 day, 8:07:50 | 1 day, 8:07:50 | -| A bunch of error 0x80040111's when starting zen | https://github.com/zen-browser/desktop/issues/4004 | 1 day, 10:18:21 | None | +| A bunch of error 0x80040111's when starting zen | https://github.com/zen-browser/desktop/issues/4004 | 1 day, 10:18:21 | 9 days, 9:15:34 | | hover margin on tab bar is too big until you resize it manually | https://github.com/zen-browser/desktop/issues/4002 | 1 day, 16:46:24 | None | | (UI) Firefox sidebar overlaps with page content | https://github.com/zen-browser/desktop/issues/4001 | None | None | | Unable to view bookmarks toolbar | https://github.com/zen-browser/desktop/issues/4000 | 5:31:10 | 16:20:24 | @@ -92,7 +92,7 @@ | Zen doesn't remember entered data on webpages when clicking "go back" button | https://github.com/zen-browser/desktop/issues/3989 | None | None | | Unexpected text appears when selecting wallpapers and typing. | https://github.com/zen-browser/desktop/issues/3988 | 2 days, 14:37:23 | 2 days, 14:37:23 | | [BUG] Extension Expands Vertically on Each Usage | https://github.com/zen-browser/desktop/issues/3987 | 0:03:27 | 2 days, 2:35:47 | -| Pinning (or unpinning) extensions cause toolbar to break in compact mode | https://github.com/zen-browser/desktop/issues/3986 | None | None | +| Pinning (or unpinning) extensions cause toolbar to break in compact mode | https://github.com/zen-browser/desktop/issues/3986 | 8 days, 15:29:08 | None | | Weird behavior on MacOS when Zen is in fullscreen | https://github.com/zen-browser/desktop/issues/3985 | 0:54:00 | None | | Title bar buttons on Linux | https://github.com/zen-browser/desktop/issues/3984 | None | None | | Playback Issue After Long Pauses in Videos: Requires Refresh to Fix | https://github.com/zen-browser/desktop/issues/3981 | None | None | @@ -157,10 +157,10 @@ | Default shortcut for "Copy current URL" overridden by element inspector | https://github.com/zen-browser/desktop/issues/3894 | 0:04:46 | 0:32:12 | | Default Firefox Window Control buttons used instead of custom Zen icons | https://github.com/zen-browser/desktop/issues/3893 | 0:18:50 | 11 days, 18:08:37 | | Flightradar24 has botched information when hovering an airport | https://github.com/zen-browser/desktop/issues/3892 | None | 7:23:49 | -| Crash when playing videos | https://github.com/zen-browser/desktop/issues/3891 | None | None | +| Crash when playing videos | https://github.com/zen-browser/desktop/issues/3891 | 16 days, 23:26:14 | None | | Sidebar goes black | https://github.com/zen-browser/desktop/issues/3890 | 2:18:33 | None | | Dark theme not respected | https://github.com/zen-browser/desktop/issues/3889 | 10:06:12 | None | -| Mod default preferences not displayed correctly until reopening the settings page or browser restart | https://github.com/zen-browser/desktop/issues/3887 | None | None | +| Mod default preferences not displayed correctly until reopening the settings page or browser restart | https://github.com/zen-browser/desktop/issues/3887 | 15 days, 6:11:30 | 16 days, 2:04:56 | | Bookmarks stop working. Impossible to add and manage | https://github.com/zen-browser/desktop/issues/3886 | 7:47:27 | 8:06:47 | | [Bug] Wrong Title For Tab Bar & Top Bar | https://github.com/zen-browser/desktop/issues/3885 | None | 18:00:09 | | Settings lay-out looks odd on half-screen | https://github.com/zen-browser/desktop/issues/3884 | None | None | @@ -268,7 +268,7 @@ | Cannot close browser window when Tab bar is on right and minimised state | https://github.com/zen-browser/desktop/issues/3743 | 15:42:59 | None | | Left bar unnecessary empty space / settings update | https://github.com/zen-browser/desktop/issues/3742 | 1 day, 3:18:43 | None | | side bar opens up when ctrl + tabbing (compact mode) | https://github.com/zen-browser/desktop/issues/3741 | 1:20:34 | 5:11:01 | -| MacOS traffic lights visual bug in Compact mode | https://github.com/zen-browser/desktop/issues/3740 | None | None | +| MacOS traffic lights visual bug in Compact mode | https://github.com/zen-browser/desktop/issues/3740 | 20 days, 8:33:17 | 20 days, 8:33:17 | | Hard-coded orange accent colour in many places | https://github.com/zen-browser/desktop/issues/3739 | None | None | | Popover doesn't automatically close when losing focus (video demo) | https://github.com/zen-browser/desktop/issues/3737 | None | 9:32:27 | | Isn't userChrome.css supposed to be the last stylesheet loaded? | https://github.com/zen-browser/desktop/issues/3736 | None | None | @@ -412,11 +412,11 @@ | Mouse back button occasionally fails to go back a page, tries switching workspaces instead | https://github.com/zen-browser/desktop/issues/3564 | None | None | | Weird Spacing In Sidebar | https://github.com/zen-browser/desktop/issues/3563 | 0:59:49 | None | | Browser view padding | https://github.com/zen-browser/desktop/issues/3562 | 1:58:05 | None | -| Changing mod string preferences sometimes results in missing characters | https://github.com/zen-browser/desktop/issues/3558 | None | None | +| Changing mod string preferences sometimes results in missing characters | https://github.com/zen-browser/desktop/issues/3558 | None | 24 days, 6:15:07 | | Rounded corners only showing on overscroll on "release notes" page | https://github.com/zen-browser/desktop/issues/3557 | None | None | | Missing options in "Show in compact view" in settings. | https://github.com/zen-browser/desktop/issues/3556 | 5:59:42 | 17 days, 15:15:02 | | Text completely distorted | https://github.com/zen-browser/desktop/issues/3555 | 5:41:26 | None | -| Application freezes when interacting with the address bar | https://github.com/zen-browser/desktop/issues/3552 | None | None | +| Application freezes when interacting with the address bar | https://github.com/zen-browser/desktop/issues/3552 | 22 days, 11:37:39 | None | | Tab right click stops working after using "Change Tab to Workspace" | https://github.com/zen-browser/desktop/issues/3549 | 7:57:32 | None | | Need some help! not sure if this is the right place?? | https://github.com/zen-browser/desktop/issues/3548 | None | None | | Windows "Show accent color on title bars and window borders" option looks broken with new titlebar | https://github.com/zen-browser/desktop/issues/3546 | 0:39:49 | 9 days, 14:07:17 | @@ -499,7 +499,7 @@ | Bookmarks don't get fully deleted from places.sqlite | https://github.com/zen-browser/desktop/issues/3444 | None | None | | When Workspaces are enabled browser.tabs.closeWindowWithLastTab set to true does not work (macOS) | https://github.com/zen-browser/desktop/issues/3443 | None | None | | Logging on Google does not prompt security key popup to login | https://github.com/zen-browser/desktop/issues/3442 | 11:20:10 | 21 days, 12:51:05 | -| Zen breaks when all keybinds are assigned to "not set" | https://github.com/zen-browser/desktop/issues/3441 | 7 days, 8:26:47 | None | +| Zen breaks when all keybinds are assigned to "not set" | https://github.com/zen-browser/desktop/issues/3441 | 7 days, 8:26:47 | 25 days, 14:43:17 | | After the new twilight update "Toggle Sidebar's Width" hotkey is not there | https://github.com/zen-browser/desktop/issues/3440 | 5 days, 19:37:46 | 6 days, 16:41:34 | | "Open previous windows and tabs" issue with MacOS Spaces | https://github.com/zen-browser/desktop/issues/3439 | 7 days, 18:19:48 | None | | "Keyboard shortcuts" page can show an outdated state between restarts | https://github.com/zen-browser/desktop/issues/3438 | None | None | @@ -521,7 +521,7 @@ | Choose app dialog window not listing any apps except Zen itself | https://github.com/zen-browser/desktop/issues/3418 | None | None | | No privacy | https://github.com/zen-browser/desktop/issues/3417 | None | None | | The page goes black, and upon attempting to reload, nothing is displayed | https://github.com/zen-browser/desktop/issues/3413 | None | None | -| Can't move the cursor with arrows from my keyboard when i'm in a field | https://github.com/zen-browser/desktop/issues/3412 | None | None | +| Can't move the cursor with arrows from my keyboard when i'm in a field | https://github.com/zen-browser/desktop/issues/3412 | 27 days, 22:13:16 | 30 days, 20:23:42 | | Essentials and pinned tabs still don't retain favicons after reset | https://github.com/zen-browser/desktop/issues/3411 | None | 4 days, 6:01:13 | | Unload tabs can't click and crash the browser | https://github.com/zen-browser/desktop/issues/3410 | None | None | | Rounded corners & fluorescent RGB-style lighting around the perimeter on full screen Youtube. Goes away in Private window? | https://github.com/zen-browser/desktop/issues/3409 | None | 0:06:16 | @@ -534,10 +534,10 @@ | `npm run build` failed | https://github.com/zen-browser/desktop/issues/3401 | None | None | | New URL in sidebar layout makes browser unusable | https://github.com/zen-browser/desktop/issues/3400 | 3 days, 16:54:29 | 4 days, 2:15:00 | | CSS not loading or something | https://github.com/zen-browser/desktop/issues/3399 | None | None | -| Unnecessary empty space in tab | https://github.com/zen-browser/desktop/issues/3398 | None | None | +| Unnecessary empty space in tab | https://github.com/zen-browser/desktop/issues/3398 | None | 31 days, 12:18:50 | | The window control buttons are duplicated on top of each other | https://github.com/zen-browser/desktop/issues/3395 | 2:08:07 | 3 days, 20:39:23 | -| Customizing Toolbar | https://github.com/zen-browser/desktop/issues/3394 | None | None | -| Keyboard shortcuts not resetting to default values | https://github.com/zen-browser/desktop/issues/3390 | None | None | +| Customizing Toolbar | https://github.com/zen-browser/desktop/issues/3394 | 28 days, 20:55:35 | 28 days, 20:55:35 | +| Keyboard shortcuts not resetting to default values | https://github.com/zen-browser/desktop/issues/3390 | None | 30 days, 21:31:32 | | Possible Memory Leak - Zen won't leave the Taskbar after hours of use | https://github.com/zen-browser/desktop/issues/3389 | None | None | | Can't switch to Tab. Possibly because Tab has a modal dialog. | https://github.com/zen-browser/desktop/issues/3386 | 1 day, 3:55:33 | None | | The option to hide autofill from the browser does not work with iCloud passwords | https://github.com/zen-browser/desktop/issues/3384 | None | None | @@ -553,16 +553,16 @@ | Open/close sidebar icon is confusing | https://github.com/zen-browser/desktop/issues/3370 | None | None | | Tab Management - Workspaces - Display workspaces as an icon strip bug | https://github.com/zen-browser/desktop/issues/3369 | None | None | | Google meet not loading | https://github.com/zen-browser/desktop/issues/3368 | 16:55:47 | None | -| Workspace icon highlight on hover is uneven | https://github.com/zen-browser/desktop/issues/3367 | None | None | +| Workspace icon highlight on hover is uneven | https://github.com/zen-browser/desktop/issues/3367 | 30 days, 0:55:16 | 30 days, 0:55:16 | | The main UI's background doesn't follow the theme sometimes | https://github.com/zen-browser/desktop/issues/3366 | None | None | | Shortcut Settings Typo | https://github.com/zen-browser/desktop/issues/3365 | None | None | -| Video image freezes when we move the progress video bar, and only the audio is playing | https://github.com/zen-browser/desktop/issues/3363 | None | None | +| Video image freezes when we move the progress video bar, and only the audio is playing | https://github.com/zen-browser/desktop/issues/3363 | 31 days, 7:22:57 | None | | ClickTrades Webpage not loading | https://github.com/zen-browser/desktop/issues/3362 | None | None | | When switch workspaces, the current-focused tab sometimes also show in the new workspace | https://github.com/zen-browser/desktop/issues/3357 | 3:34:51 | 9 days, 17:41:38 | | Toggle Floating Sidebar keyboard shortcut not working | https://github.com/zen-browser/desktop/issues/3356 | 6 days, 13:00:18 | None | | Workspace icon still shows on compact mode even when flag is disabled. | https://github.com/zen-browser/desktop/issues/3355 | 20 days, 3:42:54 | 20 days, 3:42:39 | | Moving tab across workspace and then right-clicking on it does not render a menu | https://github.com/zen-browser/desktop/issues/3353 | 2 days, 14:33:51 | 18 days, 16:47:56 | -| Glance in compact view opens tabs bar | https://github.com/zen-browser/desktop/issues/3351 | None | None | +| Glance in compact view opens tabs bar | https://github.com/zen-browser/desktop/issues/3351 | 31 days, 13:55:54 | 33 days, 15:15:20 | | Dev Tools Context Menus Broken | https://github.com/zen-browser/desktop/issues/3350 | None | None | | Stuck in toolbar customizing mode | https://github.com/zen-browser/desktop/issues/3349 | None | None | | Top Bar Padding Increasing in Compact Mode (Twilight) | https://github.com/zen-browser/desktop/issues/3348 | 9:32:10 | 6 days, 22:39:00 | From edb6dc9248d01913e13118d8b0bede4cb0a22407 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 12:59:34 +0100 Subject: [PATCH 021/134] Update CI workflows to conditionally use optimized runners and adjust LTO settings based on release branch --- .github/workflows/linux-release-build.yml | 3 ++- .github/workflows/macos-release-build.yml | 12 ++---------- .github/workflows/windows-release-build.yml | 3 ++- configs/common/mozconfig | 10 ++++++++-- configs/linux/mozconfig | 11 ++++------- configs/macos/mozconfig | 4 ++-- configs/windows/mozconfig | 7 ++----- 7 files changed, 22 insertions(+), 28 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 50ce86cb8..0cf3afbf7 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ubuntu-latest + runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: @@ -125,6 +125,7 @@ jobs: - name: Build env: SURFER_COMPAT: ${{ matrix.arch }} + ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} continue-on-error: true run: | export SURFER_PLATFORM="linux" diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index 324c70bf7..610047713 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -15,7 +15,7 @@ on: jobs: mac-build: name: Build macOS - ${{ matrix.arch }} - runs-on: macos-14 + runs-on: ${{ inputs.release-branch == 'release' && 'warp-macos-14-arm64-6x' || 'macos-14' }} strategy: fail-fast: false @@ -115,15 +115,7 @@ jobs: - name: Build Zen env: SURFER_COMPAT: ${{ matrix.arch }} - run: | - export SURFER_PLATFORM="darwin" - if test "${{ matrix.arch }}" = "x86_64"; then - export ZEN_DISABLE_LTO=1 - fi - sh .github/workflows/src/release-build.sh - - - name: Rebuild Zen if failed - if: failure() + ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} run: | export SURFER_PLATFORM="darwin" sh .github/workflows/src/release-build.sh diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 5d78f442b..b195cdac9 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -22,7 +22,7 @@ on: jobs: windows-build: name: Build Windows - ${{ matrix.arch }} - runs-on: ubuntu-latest + runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false @@ -156,6 +156,7 @@ jobs: if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} env: SURFER_COMPAT: ${{ matrix.arch }} + ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} run: | set -x dos2unix configs/windows/mozconfig diff --git a/configs/common/mozconfig b/configs/common/mozconfig index a01e78de6..a5956b9dd 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -54,8 +54,14 @@ if test "$ZEN_RELEASE"; then ac_add_options --disable-default-browser-agent if ! test "$ZEN_DISABLE_LTO"; then - export MOZ_LTO=cross,thin - ac_add_options --enable-lto=cross,thin + # only enable full LTO when ZEN_RELEASE_BRANCH is 'release' + if test "$ZEN_RELEASE_BRANCH" = "release"; then + export MOZ_LTO=cross,full + ac_add_options --enable-lto=cross,full + else + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin + fi fi ac_add_options --enable-jemalloc diff --git a/configs/linux/mozconfig b/configs/linux/mozconfig index 90382e702..024972c0c 100644 --- a/configs/linux/mozconfig +++ b/configs/linux/mozconfig @@ -16,13 +16,10 @@ if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options MOZ_PGO=1 # Optimization flags for SURFER_COMPAT - ac_add_options --enable-optimize="-O3 -march=x86-64" + ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -Qvec -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf" - export CFLAGS="$CFLAGS -O3 -ffp-contract=fast -march=x86-64" - export CPPFLAGS="$CPPFLAGS -O3 -ffp-contract=fast -march=x86-64" - export CXXFLAGS="$CXXFLAGS -O3 -flto=thin -ffp-contract=fast -march=x86-64" - export LDFLAGS="$LDFLAGS -Wl,-O3 -Wl,-mllvm,-fp-contract=fast -march=x86-64" - export RUSTFLAGS="$RUSTFLAGS -C target-cpu=x86-64 -C codegen-units=1 -Clink-args=--icf=safe" + export LDFLAGS="$LDFLAGS -Wl,-O3" + export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe" elif test "$SURFER_COMPAT" = "aarch64"; then ac_add_options --target=aarch64-linux-gnu @@ -32,7 +29,7 @@ elif test "$SURFER_COMPAT" = "aarch64"; then export CPPFLAGS="$CPPFLAGS -O3" export CXXFLAGS="$CXXFLAGS -O3" export LDFLAGS="$LDFLAGS -Wl,-O3" - export RUSTFLAGS="$RUSTFLAGS -C codegen-units=1 -Clink-args=--icf=safe" + export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe" fi export VERBOSE=1 diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 3bed43a1c..0adf87e96 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -21,7 +21,7 @@ if test "$SURFER_COMPAT" = "x86_64"; then export CPPFLAGS="-O3 -march=nehalem" export CXXFLAGS="-O3 -march=nehalem" export LDFLAGS="-Wl,-O3 -march=nehalem" - export RUSTFLAGS="-Ctarget-cpu=nehalem -C codegen-units=1" + export RUSTFLAGS="-Ctarget-cpu=nehalem" else ac_add_options --target=aarch64-apple-darwin @@ -34,7 +34,7 @@ else export CPPFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1" export CXXFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1" export LDFLAGS="-Wl,-O3 -march=armv8.3-a+simd -mcpu=apple-m1" - export RUSTFLAGS="-C target-feature=+v8.3a -C codegen-units=1 -Ctarget-cpu=apple-m1" + export RUSTFLAGS="-C target-feature=+v8.3a -Ctarget-cpu=apple-m1" fi export VERBOSE=1 diff --git a/configs/windows/mozconfig b/configs/windows/mozconfig index aa4336271..b7331b26e 100644 --- a/configs/windows/mozconfig +++ b/configs/windows/mozconfig @@ -32,11 +32,8 @@ if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-pc-windows-msvc ac_add_options --enable-eme=widevine - ac_add_options --enable-optimize="-O3 -w -ftree-vectorize" + ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -Qvec -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf" - export CFLAGS="-O3 -Qvec -w" - export CPPFLAGS="-O3 -Qvec -w" - export CXXFLAGS="-O3 -Qvec -w" export LDFLAGS="-Wl,-O3" export RUSTFLAGS="-Clink-args=--icf=safe" elif test "$SURFER_COMPAT" = "aarch64"; then @@ -49,7 +46,7 @@ elif test "$SURFER_COMPAT" = "aarch64"; then export CPPFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55" export CXXFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55" export LDFLAGS="-Wl,-O2 -march=armv8.2-a+simd -mtune=cortex-a55" - export RUSTFLAGS="-C target-feature=+v8.2a -C codegen-units=1 -Ctarget-cpu=cortex-a55" + export RUSTFLAGS="-C target-feature=+v8.2a -Ctarget-cpu=cortex-a55" fi #export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" From c06e51641ecee3d6ebfdd875a1513ac244868903 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 13:00:38 +0100 Subject: [PATCH 022/134] Comment out exit on branch mismatch in CI workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37a257f7f..09a9cc062 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" - exit 1 + #exit 1 else echo ">>> Branch matches" fi From 3e34d123c0da2f47d3f92f94142aba457a841285 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 13:00:53 +0100 Subject: [PATCH 023/134] Re-enable exit on branch mismatch in CI workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09a9cc062..37a257f7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" - #exit 1 + exit 1 else echo ">>> Branch matches" fi From 88548eda8892f5e32ede1a9e93c88d94326adc14 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 14:06:08 +0100 Subject: [PATCH 024/134] Refactor Zen Compact Mode styles and preference handling --- .../base/content/zen-styles/zen-compact-mode.css | 2 +- src/browser/base/zen-components/ZenCompactMode.mjs | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 433cd7d01..687fb35c3 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -128,7 +128,7 @@ #navigator-toolbox[movingtab], #navigator-toolbox:has(.tabbrowser-tab:active), #navigator-toolbox:has( - *:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore) + *:is([panelopen='true'], [open], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore) ) { &:not([animate='true']) { transition: diff --git a/src/browser/base/zen-components/ZenCompactMode.mjs b/src/browser/base/zen-components/ZenCompactMode.mjs index b6d89d6b1..e551edee4 100644 --- a/src/browser/base/zen-components/ZenCompactMode.mjs +++ b/src/browser/base/zen-components/ZenCompactMode.mjs @@ -20,14 +20,6 @@ var gZenCompactModeManager = { _removeHoverFrames: {}, init() { - XPCOMUtils.defineLazyPreferenceGetter( - lazyCompactMode, - 'COMPACT_MODE_ENABLED', - 'zen.view.compact', - true, - this._updateEvent.bind(this) - ); - Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', this._disableTabsOnHoverIfConflict.bind(this)); Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this)); @@ -41,7 +33,7 @@ var gZenCompactModeManager = { }, get prefefence() { - return lazyCompactMode.COMPACT_MODE_ENABLED; + return Services.prefs.getBoolPref('zen.view.compact'); }, set preference(value) { From fa3d3420f6acf8f27a7db9f0994985c3d1251c62 Mon Sep 17 00:00:00 2001 From: Thibault Molleman Date: Mon, 6 Jan 2025 14:27:49 +0100 Subject: [PATCH 025/134] Added collapsable header for about:support in issue template --- .github/ISSUE_TEMPLATE/bug_report.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b0d2951a2..38f737d85 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -69,4 +69,13 @@ body: attributes: label: Data from about:support if applicable (click on the "Copy text to clipboard" button) description: Please copy and paste about:support data if you think it might be relevant. This will help us understand your environment. + value: | +
+ about:support + + + ``` + Select this line and paste your about:support clipboard + ``` +
render: shell From 49ce111c33046774b727b34f5a36b1b3431fc2f8 Mon Sep 17 00:00:00 2001 From: Thibault Molleman Date: Mon, 6 Jan 2025 14:30:48 +0100 Subject: [PATCH 026/134] removed render as shell because otherwise you'd get double code blocks --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 38f737d85..45e06096f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -78,4 +78,3 @@ body: Select this line and paste your about:support clipboard ``` - render: shell From 0b91608bbe6e1b104e0dd06af5ed1a20432605e3 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 17:36:39 +0100 Subject: [PATCH 027/134] Add observer for compact view preference and adjust animation timeout --- src/browser/base/zen-components/ZenCompactMode.mjs | 1 + src/browser/base/zen-components/ZenWorkspaces.mjs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/browser/base/zen-components/ZenCompactMode.mjs b/src/browser/base/zen-components/ZenCompactMode.mjs index e551edee4..00b4cd028 100644 --- a/src/browser/base/zen-components/ZenCompactMode.mjs +++ b/src/browser/base/zen-components/ZenCompactMode.mjs @@ -20,6 +20,7 @@ var gZenCompactModeManager = { _removeHoverFrames: {}, init() { + Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this)); Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', this._disableTabsOnHoverIfConflict.bind(this)); Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this)); diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 003f07686..3a38fac43 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -1307,7 +1307,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { setTimeout(() => { this._animatingChange = false; gBrowser.tabContainer.removeAttribute('zen-workspace-animation'); - }, 500); + }, 600); } } From d0911cd0c7cd9523582410775e928ad0c46578cc Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 17:52:36 +0100 Subject: [PATCH 028/134] Refactor CSS for Zen Compact Mode to improve nav-bar margin handling --- src/browser/base/content/zen-styles/zen-compact-mode.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 687fb35c3..85c13a98e 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -59,13 +59,13 @@ :root[zen-single-toolbar='true'] & { top: var(--zen-element-separation); - - &:not([zen-right-side='true']) #nav-bar { - margin-left: 0 !important; - } } } + &:not([zen-right-side='true']) #nav-bar { + margin-left: 0 !important; + } + & #urlbar[open] { top: 0 !important; } From ee965e4b74ecae8d1e2f9e8c69ee25e6b9923712 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 18:57:06 +0100 Subject: [PATCH 029/134] Update Git configuration and improve release build scripts for consistency --- .github/workflows/linux-release-build.yml | 14 +++----------- .github/workflows/macos-release-build.yml | 2 +- .github/workflows/src/release-build.sh | 4 ++-- .github/workflows/windows-release-build.yml | 2 +- .../base/content/zen-styles/zen-compact-mode.css | 2 +- src/testing/profiles/profileserver/user-js.patch | 5 ++--- 6 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 0cf3afbf7..9c54d911e 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -42,8 +42,8 @@ jobs: - name: Setup Git run: | - git config --global user.email "mauro-balades@users.noreply.github.com" - git config --global user.name "mauro-balades" + git config --global user.email "mr-cheff@users.noreply.github.com" + git config --global user.name "mr-cheff" - name: Install system dependencies run: | @@ -129,15 +129,7 @@ jobs: continue-on-error: true run: | export SURFER_PLATFORM="linux" - sh .github/workflows/src/release-build.sh - - - name: Build again if it failed - if: failure() - env: - SURFER_COMPAT: ${{ matrix.arch }} - run: | - export SURFER_PLATFORM="linux" - sh .github/workflows/src/release-build.sh + bash .github/workflows/src/release-build.sh - name: Package env: diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index 610047713..97cc38ac4 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -118,7 +118,7 @@ jobs: ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} run: | export SURFER_PLATFORM="darwin" - sh .github/workflows/src/release-build.sh + bash .github/workflows/src/release-build.sh - name: Import APPLE DEVELOPER ID CERTIFICATE for .app uses: Apple-Actions/import-codesign-certs@v3 diff --git a/.github/workflows/src/release-build.sh b/.github/workflows/src/release-build.sh index 809032a9a..f5d5b55b6 100644 --- a/.github/workflows/src/release-build.sh +++ b/.github/workflows/src/release-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -xe if command -v apt-get &> /dev/null; then sudo apt-get update @@ -9,7 +9,7 @@ fi ulimit -n 4096 -if ! command -v Xvfb &> /dev/null; then +if command -v Xvfb &> /dev/null; then if ! test "$ZEN_CROSS_COMPILING"; then Xvfb :2 -screen 0 1024x768x24 & export LLVM_PROFDATA=$HOME/.mozbuild/clang/bin/llvm-profdata diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index b195cdac9..1a76b4dac 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -165,7 +165,7 @@ jobs: if test ${{ inputs.generate-gpo }} = true; then export ZEN_GA_GENERATE_PROFILE=1 fi - sh .github/workflows/src/release-build.sh + bash .github/workflows/src/release-build.sh - name: Package if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 85c13a98e..841eeec7a 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -128,7 +128,7 @@ #navigator-toolbox[movingtab], #navigator-toolbox:has(.tabbrowser-tab:active), #navigator-toolbox:has( - *:is([panelopen='true'], [open], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore) + *:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore) ) { &:not([animate='true']) { transition: diff --git a/src/testing/profiles/profileserver/user-js.patch b/src/testing/profiles/profileserver/user-js.patch index 3967e6da4..ca1c18fcd 100644 --- a/src/testing/profiles/profileserver/user-js.patch +++ b/src/testing/profiles/profileserver/user-js.patch @@ -1,15 +1,14 @@ diff --git a/testing/profiles/profileserver/user.js b/testing/profiles/profileserver/user.js -index 19ff7d474f6d22d2d386764e2e6942ce6a324470..40d1906bdebd08510014fd6124be17052248e748 100644 +index 19ff7d474f6d22d2d386764e2e6942ce6a324470..62fd56e53bc1cb7b688395badc97820d97a7c767 100644 --- a/testing/profiles/profileserver/user.js +++ b/testing/profiles/profileserver/user.js -@@ -8,3 +8,11 @@ +@@ -8,3 +8,10 @@ user_pref("dom.timeout.enable_budget_timer_throttling", false); // Turn off update user_pref("app.update.disabledForTesting", true); + +// zen: +// Disable some of zen's features to better match the default Firefox experience -+user_pref("zen.workspaces.enabled", false); +user_pref("zen.welcome-screen.enabled", false); +user_pref("zen.tab-unloader.enabled", false); +user_pref("zen.watermark.enabled", false); From 57b2adb81f90c2647e1b4c2d84d3175c17600ccf Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 19:00:09 +0100 Subject: [PATCH 030/134] Update Linux release build workflow to use architecture matrix for runner selection --- .github/workflows/linux-release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 9c54d911e..564c295cd 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ matrix.arch == 'x86_64' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: From 6db088328b2bc0d710e8f7df0e96f819a4967000 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 19:00:36 +0100 Subject: [PATCH 031/134] Update Linux release build workflow to use release branch input for runner selection --- .github/workflows/linux-release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 564c295cd..9c54d911e 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ matrix.arch == 'x86_64' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: From 4124a3c8fe7105111fef5927d1dba257fe13fd2a Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 19:26:26 +0100 Subject: [PATCH 032/134] Update Linux and Windows build workflows to use architecture-specific runners and add dynamic port allocation in profileserver.py --- .github/workflows/linux-release-build.yml | 2 +- .github/workflows/windows-release-build.yml | 2 +- src/build/pgo/profileserver-py.patch | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/build/pgo/profileserver-py.patch diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 9c54d911e..564c295cd 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ matrix.arch == 'x86_64' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 1a76b4dac..c19521f05 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -22,7 +22,7 @@ on: jobs: windows-build: name: Build Windows - ${{ matrix.arch }} - runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-6x' || 'ubuntu-latest' }} strategy: fail-fast: false diff --git a/src/build/pgo/profileserver-py.patch b/src/build/pgo/profileserver-py.patch new file mode 100644 index 000000000..cf162035a --- /dev/null +++ b/src/build/pgo/profileserver-py.patch @@ -0,0 +1,19 @@ +diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py +index 31556cc9ae1a44a04e300083f7be4dc908cc3794..23ef1d8f5b30068ffdddc3c9cb6cd45e64d93071 100755 +--- a/build/pgo/profileserver.py ++++ b/build/pgo/profileserver.py +@@ -18,7 +18,13 @@ from mozprofile import FirefoxProfile, Preferences + from mozprofile.permissions import ServerLocations + from mozrunner import CLI, FirefoxRunner + +-PORT = 8888 ++import socket ++def find_free_port(): ++ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: ++ s.bind(('', 0)) ++ return s.getsockname()[1] ++ ++PORT = find_free_port() + + PATH_MAPPINGS = { + "/webkit/PerformanceTests": "third_party/webkit/PerformanceTests", From 0333413505b9527ff1c488bb9849403c71bd8bdd Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 19:26:58 +0100 Subject: [PATCH 033/134] Update Linux release build workflow to use release branch input for runner selection --- .github/workflows/linux-release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 564c295cd..9c54d911e 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ matrix.arch == 'x86_64' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: From 6c4af27ec6f48f99279813689d838030693588e6 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 20:01:52 +0100 Subject: [PATCH 034/134] Update Linux release build workflow and improve package installation; add checks for window.docShell in ZenUIManager --- .github/workflows/linux-release-build.yml | 2 +- .github/workflows/src/release-build.sh | 6 ++++-- src/browser/base/content/ZenUIManager.mjs | 4 +++- src/testing/profiles/profileserver/user-js.patch | 5 +++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 9c54d911e..564c295cd 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ matrix.arch == 'x86_64' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/src/release-build.sh b/.github/workflows/src/release-build.sh index f5d5b55b6..5e98894f4 100644 --- a/.github/workflows/src/release-build.sh +++ b/.github/workflows/src/release-build.sh @@ -3,8 +3,10 @@ set -xe if command -v apt-get &> /dev/null; then - sudo apt-get update - sudo apt-get install -y xvfb + sudo add-apt-repository ppa:kisak/kisak-mesa + sudo apt update + sudo apt upgrade + sudo apt-get install -y xvfb libnvidia-egl-wayland1 mesa-utils libgl1-mesa-dri fi ulimit -n 4096 diff --git a/src/browser/base/content/ZenUIManager.mjs b/src/browser/base/content/ZenUIManager.mjs index 959fc9ad6..6e3fbd5d3 100644 --- a/src/browser/base/content/ZenUIManager.mjs +++ b/src/browser/base/content/ZenUIManager.mjs @@ -256,7 +256,9 @@ var gZenVerticalTabsManager = { try { this._updateMaxWidth(); - window.docShell.treeOwner.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIAppWindow).rollupAllPopups(); + if (window.docShell) { + window.docShell.treeOwner.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIAppWindow).rollupAllPopups(); + } const topButtons = document.getElementById('zen-sidebar-top-buttons'); const isCompactMode = this._prefsCompactMode && !forCustomizableMode; diff --git a/src/testing/profiles/profileserver/user-js.patch b/src/testing/profiles/profileserver/user-js.patch index ca1c18fcd..3967e6da4 100644 --- a/src/testing/profiles/profileserver/user-js.patch +++ b/src/testing/profiles/profileserver/user-js.patch @@ -1,14 +1,15 @@ diff --git a/testing/profiles/profileserver/user.js b/testing/profiles/profileserver/user.js -index 19ff7d474f6d22d2d386764e2e6942ce6a324470..62fd56e53bc1cb7b688395badc97820d97a7c767 100644 +index 19ff7d474f6d22d2d386764e2e6942ce6a324470..40d1906bdebd08510014fd6124be17052248e748 100644 --- a/testing/profiles/profileserver/user.js +++ b/testing/profiles/profileserver/user.js -@@ -8,3 +8,10 @@ +@@ -8,3 +8,11 @@ user_pref("dom.timeout.enable_budget_timer_throttling", false); // Turn off update user_pref("app.update.disabledForTesting", true); + +// zen: +// Disable some of zen's features to better match the default Firefox experience ++user_pref("zen.workspaces.enabled", false); +user_pref("zen.welcome-screen.enabled", false); +user_pref("zen.tab-unloader.enabled", false); +user_pref("zen.watermark.enabled", false); From cd34782bd5ba67e9eddcf3e70c99288693770958 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 20:02:20 +0100 Subject: [PATCH 035/134] Update Linux release build workflow to use release branch input for runner selection --- .github/workflows/linux-release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 564c295cd..9c54d911e 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ matrix.arch == 'x86_64' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: From 9b8b9f5e14cef9b121f11602fb8c7e4a044e3e20 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 20:07:17 +0100 Subject: [PATCH 036/134] Update release build script to enhance Xvfb configuration by adding -nolisten tcp and -noreset options --- .github/workflows/linux-release-build.yml | 2 +- .github/workflows/src/release-build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 9c54d911e..564c295cd 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ matrix.arch == 'x86_64' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/src/release-build.sh b/.github/workflows/src/release-build.sh index 5e98894f4..54531b196 100644 --- a/.github/workflows/src/release-build.sh +++ b/.github/workflows/src/release-build.sh @@ -13,7 +13,7 @@ ulimit -n 4096 if command -v Xvfb &> /dev/null; then if ! test "$ZEN_CROSS_COMPILING"; then - Xvfb :2 -screen 0 1024x768x24 & + Xvfb :2 -nolisten tcp -noreset -screen 0 1024x768x24 & export LLVM_PROFDATA=$HOME/.mozbuild/clang/bin/llvm-profdata export DISPLAY=:2 fi From cbc342ce1aaa0b3b8ede931df3e9e0b54910d3c6 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 20:07:43 +0100 Subject: [PATCH 037/134] Update Linux release build workflow to use release branch input for runner selection --- .github/workflows/linux-release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 564c295cd..9c54d911e 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ matrix.arch == 'x86_64' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: From 344cf8379c6d95fe53356c8b470e98c86fe3f1d4 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Mon, 6 Jan 2025 21:01:52 +0100 Subject: [PATCH 038/134] Update Git configuration and CODEOWNERS to reflect new user details --- .github/workflows/linux-release-build.yml | 4 ++-- .github/workflows/windows-profile-build.yml | 4 ++-- CODEOWNERS | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 9c54d911e..8b73de2be 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -42,8 +42,8 @@ jobs: - name: Setup Git run: | - git config --global user.email "mr-cheff@users.noreply.github.com" - git config --global user.name "mr-cheff" + git config --global user.email "mauro-balades@users.noreply.github.com" + git config --global user.name "mauro-balades" - name: Install system dependencies run: | diff --git a/.github/workflows/windows-profile-build.yml b/.github/workflows/windows-profile-build.yml index 5c5e9b574..b7ea736b1 100644 --- a/.github/workflows/windows-profile-build.yml +++ b/.github/workflows/windows-profile-build.yml @@ -38,8 +38,8 @@ jobs: - name: Setup Git run: | - git config --global user.email "mr-cheff@users.noreply.github.com" - git config --global user.name "mr-cheff" + git config --global user.email "mauro-balades@users.noreply.github.com" + git config --global user.name "mauro-balades" - name: Setup pnpm run: npm install -g pnpm diff --git a/CODEOWNERS b/CODEOWNERS index 64c09c8d3..5f964be1d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @mr-cheff +* @mauro-balades From c51b2f3267058d663bc7e5e81118ddfc2a6afb9f Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:14:21 +0100 Subject: [PATCH 039/134] Update build.yml Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed6f484a3..fb80ff48e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" - exit 1 + #exit 1 else echo ">>> Branch matches" fi From 9bfd96a9dd9d282d0d67f6e090b43cead2aeb0b8 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:14:40 +0100 Subject: [PATCH 040/134] Update build.yml Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb80ff48e..ed6f484a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" - #exit 1 + exit 1 else echo ">>> Branch matches" fi From dcfe4464b678c4db74ad984dc67b9e767877e3de Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Tue, 7 Jan 2025 01:20:35 +0100 Subject: [PATCH 041/134] Fixed twilight deployment key Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a59e2a89..cf72f4a15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -512,7 +512,7 @@ jobs: title: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})' draft: false prerelease: true - repo_token: ${{ github.token }} + repo_token: ${{ secrets.DEPLOY_KEY }} env: GITHUB_REPOSITORY: ${{ github.repository }} From e27f5581461db1abf012054bbcc630c80cfa15ba Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:31:48 +0100 Subject: [PATCH 042/134] Refactor codesign process and update build configuration --- .github/workflows/build.yml | 2 +- build/codesign/codesign.bash | 8 +++++++- configs/macos/mozconfig | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed6f484a3..85d475eca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" - exit 1 + # exit 1 else echo ">>> Branch matches" fi diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 7dce57163..f75357125 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -150,6 +150,12 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Validate codesign -vvv --deep --strict "${BUNDLE}" +echo "Showing up app entitlements" +codesign -d --entitlements :- "${BUNDLE}" + +echo "Verifying app" +codesign --verify --deep --strict "${BUNDLE}" + # Create a DMG if [ ! -z "${OUTPUT_DMG_FILE}" ]; then DISK_IMAGE_DIR=`mktemp -d` @@ -166,4 +172,4 @@ if [ ! -z "${OUTPUT_DMG_FILE}" ]; then rm ${TEMP_FILE} rm ${TEMP_DMG} rm -rf "${DISK_IMAGE_DIR}" -fi \ No newline at end of file +fi diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 3bed43a1c..009e98069 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -7,8 +7,8 @@ export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" if test "$ZEN_RELEASE"; then - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 + #export MOZ_PGO=1 + #ac_add_options MOZ_PGO=1 fi if test "$SURFER_COMPAT" = "x86_64"; then From c2b77d96fbf2acc393ff7f56da76da66e7fc2d1b Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:32:27 +0100 Subject: [PATCH 043/134] Remove webauthn support from browser entitlements --- build/codesign/browser.developer.entitlements.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index 98dc54ba4..f8f054ac5 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -36,7 +36,5 @@ com.apple.application-identifier H36NPCN86W.app.zen-browser.zen - - com.apple.developer.web-browser.public-key-credential From 8da63bc3c6fb66396ae98915047a455bb4fec973 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:32:40 +0100 Subject: [PATCH 044/134] Update browser entitlements for passkey support --- build/codesign/browser.developer.entitlements.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index f8f054ac5..f6aaa688e 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -34,7 +34,9 @@ com.apple.application-identifier - H36NPCN86W.app.zen-browser.zen + app.zen-browser.zen + + com.apple.developer.web-browser.public-key-credential From 99f774a2f810ae65695e2210a2e29dba9ebda111 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:34:37 +0100 Subject: [PATCH 045/134] Update application identifier in browser entitlements --- build/codesign/browser.developer.entitlements.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index f6aaa688e..f8f054ac5 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -34,9 +34,7 @@ com.apple.application-identifier - app.zen-browser.zen + H36NPCN86W.app.zen-browser.zen - - com.apple.developer.web-browser.public-key-credential From 3359d3969cae696ba54665051fe3eca3abcebde4 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:34:54 +0100 Subject: [PATCH 046/134] Update application identifier and add passkey support in entitlements --- build/codesign/browser.developer.entitlements.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index f8f054ac5..f6aaa688e 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -34,7 +34,9 @@ com.apple.application-identifier - H36NPCN86W.app.zen-browser.zen + app.zen-browser.zen + + com.apple.developer.web-browser.public-key-credential From 1152699be6e977cfbbaecbae455bcfa874125193 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:43:12 +0100 Subject: [PATCH 047/134] Update application identifier in browser entitlements and remove fetch-depth from build workflow --- .github/workflows/build.yml | 1 - build/codesign/browser.developer.entitlements.xml | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85d475eca..13aefe293 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,6 @@ jobs: with: submodules: recursive token: ${{ secrets.DEPLOY_KEY }} - fetch-depth: 0 - name: Check if correct branch run: | diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index f6aaa688e..a84597ab2 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -29,12 +29,10 @@ Firefox which rely on Apple Events to signal other processes. --> com.apple.security.automation.apple-events - - com.apple.security.smartcard com.apple.application-identifier - app.zen-browser.zen + H36NPCN86W.app.zen-browser.zen com.apple.developer.web-browser.public-key-credential From 8770178c9b705708c38df5bf296b105587a256af Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:55:38 +0100 Subject: [PATCH 048/134] Remove PGO configuration from macOS mozconfig --- configs/macos/mozconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 009e98069..3ae6a3b34 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,10 +6,7 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - #export MOZ_PGO=1 - #ac_add_options MOZ_PGO=1 -fi + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 81de13e251f8760338ecb5a312db36a5e026b343 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:55:38 +0100 Subject: [PATCH 049/134] Add SmartCard support and remove platform passkey entitlement from browser entitlements --- build/codesign/browser.developer.entitlements.xml | 4 ++-- configs/macos/mozconfig | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index a84597ab2..f8f054ac5 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -29,12 +29,12 @@ Firefox which rely on Apple Events to signal other processes. --> com.apple.security.automation.apple-events + + com.apple.security.smartcard com.apple.application-identifier H36NPCN86W.app.zen-browser.zen - - com.apple.developer.web-browser.public-key-credential diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 009e98069..3ae6a3b34 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,10 +6,7 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - #export MOZ_PGO=1 - #ac_add_options MOZ_PGO=1 -fi + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 8e953abe9441df8564b009440bf0f80087a90f3a Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 11:56:28 +0100 Subject: [PATCH 050/134] Update application identifier and add WebAuthn support in entitlements --- build/codesign/browser.developer.entitlements.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index f8f054ac5..f6aaa688e 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -34,7 +34,9 @@ com.apple.application-identifier - H36NPCN86W.app.zen-browser.zen + app.zen-browser.zen + + com.apple.developer.web-browser.public-key-credential From d26e51c434a1a34b641c1517b8fe983a63218448 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 12:08:30 +0100 Subject: [PATCH 051/134] Update application identifier in developer entitlements --- build/codesign/browser.developer.entitlements.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index f6aaa688e..98dc54ba4 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -34,7 +34,7 @@ com.apple.application-identifier - app.zen-browser.zen + H36NPCN86W.app.zen-browser.zen com.apple.developer.web-browser.public-key-credential From 16c76723feaa0e16750ed00ed963d372b1848173 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 12:43:31 +0100 Subject: [PATCH 052/134] Update subproject commit and fix localization label for unsaved state --- l10n | 2 +- src/browser/components/preferences/zen-settings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/l10n b/l10n index d444262fd..38c1700d8 160000 --- a/l10n +++ b/l10n @@ -1 +1 @@ -Subproject commit d444262fdb32071eb995c5266ad4fe8846f650f1 +Subproject commit 38c1700d8b40d200e4ffef94c480f96dba86ec39 diff --git a/src/browser/components/preferences/zen-settings.js b/src/browser/components/preferences/zen-settings.js index 45f2493ff..36a0c03fd 100644 --- a/src/browser/components/preferences/zen-settings.js +++ b/src/browser/components/preferences/zen-settings.js @@ -860,7 +860,7 @@ var gZenCKSSettings = { if (!target.nextElementSibling) { target.after( window.MozXULElement.parseXULToFragment(` - + `) ); target.value = 'Not set'; From a0481737aae45b993ac1443d38c47a870448dde7 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 12:52:28 +0100 Subject: [PATCH 053/134] Update default user application directory to 'Zen' for specific targets (https://github.com/zen-browser/desktop/issues/349) --- src/toolkit/moz-configure.patch | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/toolkit/moz-configure.patch b/src/toolkit/moz-configure.patch index f3cd4394e..d6f8ff73e 100644 --- a/src/toolkit/moz-configure.patch +++ b/src/toolkit/moz-configure.patch @@ -1,5 +1,5 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure -index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b7dc639db 100644 +index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..b1dd5bd9c28c95c69486b9803c76279af01459bd 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -81,10 +81,13 @@ option( @@ -39,3 +39,14 @@ index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b option( +@@ -3535,8 +3538,8 @@ with only_when(compile_environment): + @depends(target) + def default_user_appdir(target): + if target.kernel in ("WINNT", "Darwin"): +- return "Mozilla" +- return ".mozilla" ++ return "Zen" ++ return ".zen" + + option( + "--with-user-appdir", From c915fe63b67bb4c74a6e48064b0cae99e8a497d2 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 13:49:03 +0100 Subject: [PATCH 054/134] Remove platform passkey entitlement from developer entitlements --- build/codesign/browser.developer.entitlements.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index 98dc54ba4..f8f054ac5 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -36,7 +36,5 @@ com.apple.application-identifier H36NPCN86W.app.zen-browser.zen - - com.apple.developer.web-browser.public-key-credential From 795e71a27a2f33bc2591ff4fbf1fb6f82ffaf586 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 14:20:53 +0100 Subject: [PATCH 055/134] Add provisioning profile import and update surfer dependency to 1.8.7 --- .github/workflows/macos-release-build.yml | 3 +++ build/codesign/browser.developer.entitlements.xml | 2 ++ build/codesign/codesign.bash | 5 +++++ package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index b4503d765..a41f21cdf 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -134,6 +134,9 @@ jobs: p12-file-base64: ${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }} p12-password: ${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }} + - name: Import provisioning profile for .app + run: echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > zen.provisionprofile + - name: Package env: SURFER_COMPAT: ${{ matrix.arch }} diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index f8f054ac5..98dc54ba4 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -36,5 +36,7 @@ com.apple.application-identifier H36NPCN86W.app.zen-browser.zen + + com.apple.developer.web-browser.public-key-credential diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index f75357125..3cc64edcc 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -38,6 +38,7 @@ usage () echo " -i " echo " -b " echo " -p " + echo " -f " echo " [-o ]" exit -1 } @@ -62,6 +63,7 @@ while getopts "a:i:b:o:p:" opt; do i ) IDENTITY=$OPTARG ;; b ) BROWSER_ENTITLEMENTS_FILE=$OPTARG ;; p ) PLUGINCONTAINER_ENTITLEMENTS_FILE=$OPTARG ;; + f ) PROVISIONING_PROFILE=$OPTARG ;; o ) OUTPUT_DMG_FILE=$OPTARG ;; \? ) usage; exit -1 ;; esac @@ -104,6 +106,7 @@ fi echo "-------------------------------------------------------------------------" echo "bundle: $BUNDLE" echo "identity: $IDENTITY" +echo "Provisioning profile: $PROVISIONING_PROFILE" echo "browser entitlements file: $BROWSER_ENTITLEMENTS_FILE" echo "plugin-container entitlements file: $PLUGINCONTAINER_ENTITLEMENTS_FILE" echo "output dmg file (optional): $OUTPUT_DMG_FILE" @@ -127,6 +130,7 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Sign zen main executable codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ +--provisioning-profile ${PROVISIONING_PROFILE} \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} \ "${BUNDLE}"/Contents/MacOS/zen @@ -140,6 +144,7 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" {} \; # Sign the main bundle codesign --force -o runtime --verbose --sign "$IDENTITY" \ +--provisioning-profile ${PROVISIONING_PROFILE} \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} "${BUNDLE}" # Sign the plugin-container bundle with deep diff --git a/package.json b/package.json index 5d096bd61..b7467103b 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.8.2" + "@zen-browser/surfer": "^1.8.7" }, "devDependencies": { "husky": "^9.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da596b154..af3ab6f60 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.8.2 - version: 1.8.2 + specifier: ^1.8.7 + version: 1.8.7 devDependencies: husky: specifier: ^9.1.5 @@ -119,8 +119,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.8.2': - resolution: {integrity: sha512-6odt1j7haMFjOffz+nt4+AWXJC8X3DW+ha7+nVdvqD6/mBiTtT8LnDQ0COQbZt0FMBTNB9nRlglm1jtHCOzE6g==} + '@zen-browser/surfer@1.8.7': + resolution: {integrity: sha512-enQDB2Btnviw3BlAadi288QcN+UpY9R4OSUdubybHvC7pfOC4+LVzI9FSvsXXeUoyMj1q19RSz3R+XW1jK9eqQ==} hasBin: true ansi-escapes@7.0.0: @@ -1003,7 +1003,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.8.2': + '@zen-browser/surfer@1.8.7': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From 57b16da239ee906a47f8b704d2902bc2392861df Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 14:30:19 +0100 Subject: [PATCH 056/134] Update surfer dependency to version 1.8.8 --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b7467103b..5ba82f4ba 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.8.7" + "@zen-browser/surfer": "^1.8.8" }, "devDependencies": { "husky": "^9.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af3ab6f60..bbc613319 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.8.7 - version: 1.8.7 + specifier: ^1.8.8 + version: 1.8.8 devDependencies: husky: specifier: ^9.1.5 @@ -119,8 +119,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.8.7': - resolution: {integrity: sha512-enQDB2Btnviw3BlAadi288QcN+UpY9R4OSUdubybHvC7pfOC4+LVzI9FSvsXXeUoyMj1q19RSz3R+XW1jK9eqQ==} + '@zen-browser/surfer@1.8.8': + resolution: {integrity: sha512-5Wei4QMwBeWUipXYcdbGHqCimiDiSoW43SNZ4tT9HXpHI++/ft6xdq0R0cOB5v/7QTCfHG63eAvVpOOL80K7Ig==} hasBin: true ansi-escapes@7.0.0: @@ -1003,7 +1003,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.8.7': + '@zen-browser/surfer@1.8.8': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From e84e774fcf75a85ace9473a9f5e8206ded53cf94 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 16:35:39 +0100 Subject: [PATCH 057/134] Update surfer dependency to version 1.8.9 and clean up provisioning profile references --- .github/workflows/macos-release-build.yml | 2 +- build/codesign/codesign.bash | 5 ----- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index a41f21cdf..7a11f82d0 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -135,7 +135,7 @@ jobs: p12-password: ${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }} - name: Import provisioning profile for .app - run: echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > zen.provisionprofile + run: echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > "zen.provisionprofile" - name: Package env: diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 3cc64edcc..f75357125 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -38,7 +38,6 @@ usage () echo " -i " echo " -b " echo " -p " - echo " -f " echo " [-o ]" exit -1 } @@ -63,7 +62,6 @@ while getopts "a:i:b:o:p:" opt; do i ) IDENTITY=$OPTARG ;; b ) BROWSER_ENTITLEMENTS_FILE=$OPTARG ;; p ) PLUGINCONTAINER_ENTITLEMENTS_FILE=$OPTARG ;; - f ) PROVISIONING_PROFILE=$OPTARG ;; o ) OUTPUT_DMG_FILE=$OPTARG ;; \? ) usage; exit -1 ;; esac @@ -106,7 +104,6 @@ fi echo "-------------------------------------------------------------------------" echo "bundle: $BUNDLE" echo "identity: $IDENTITY" -echo "Provisioning profile: $PROVISIONING_PROFILE" echo "browser entitlements file: $BROWSER_ENTITLEMENTS_FILE" echo "plugin-container entitlements file: $PLUGINCONTAINER_ENTITLEMENTS_FILE" echo "output dmg file (optional): $OUTPUT_DMG_FILE" @@ -130,7 +127,6 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Sign zen main executable codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ ---provisioning-profile ${PROVISIONING_PROFILE} \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} \ "${BUNDLE}"/Contents/MacOS/zen @@ -144,7 +140,6 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" {} \; # Sign the main bundle codesign --force -o runtime --verbose --sign "$IDENTITY" \ ---provisioning-profile ${PROVISIONING_PROFILE} \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} "${BUNDLE}" # Sign the plugin-container bundle with deep diff --git a/package.json b/package.json index 5ba82f4ba..9f624a728 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.8.8" + "@zen-browser/surfer": "^1.8.9" }, "devDependencies": { "husky": "^9.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbc613319..26a3f11bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.8.8 - version: 1.8.8 + specifier: ^1.8.9 + version: 1.8.9 devDependencies: husky: specifier: ^9.1.5 @@ -119,8 +119,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.8.8': - resolution: {integrity: sha512-5Wei4QMwBeWUipXYcdbGHqCimiDiSoW43SNZ4tT9HXpHI++/ft6xdq0R0cOB5v/7QTCfHG63eAvVpOOL80K7Ig==} + '@zen-browser/surfer@1.8.9': + resolution: {integrity: sha512-zIYQvfMJHiK+a3J2BMlUeYgijuRhUwVDyYhMPdVE7awpNJljSF3WM8HJVnl3jbB3b16dA9uvTQU/asiBbIC4kQ==} hasBin: true ansi-escapes@7.0.0: @@ -1003,7 +1003,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.8.8': + '@zen-browser/surfer@1.8.9': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From 049a0f872913e57db911a575f46a2993590ea8e8 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 16:49:36 +0100 Subject: [PATCH 058/134] Add preserve-metadata option to codesign for zen executable and main bundle --- build/codesign/codesign.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index f75357125..f5ddafb7b 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -127,6 +127,7 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Sign zen main executable codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ +--preserve-metadata=identifier,entitlements,requirements \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} \ "${BUNDLE}"/Contents/MacOS/zen @@ -140,6 +141,7 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" {} \; # Sign the main bundle codesign --force -o runtime --verbose --sign "$IDENTITY" \ +--preserve-metadata=identifier,entitlements,requirements \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} "${BUNDLE}" # Sign the plugin-container bundle with deep From d9813e2b03705abd47ac20ba262fb15a3d51b3ef Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 16:53:18 +0100 Subject: [PATCH 059/134] Remove preserve-metadata option from codesign for zen executable and main bundle --- build/codesign/codesign.bash | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index f5ddafb7b..f75357125 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -127,7 +127,6 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Sign zen main executable codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ ---preserve-metadata=identifier,entitlements,requirements \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} \ "${BUNDLE}"/Contents/MacOS/zen @@ -141,7 +140,6 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" {} \; # Sign the main bundle codesign --force -o runtime --verbose --sign "$IDENTITY" \ ---preserve-metadata=identifier,entitlements,requirements \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} "${BUNDLE}" # Sign the plugin-container bundle with deep From 3aaed105cc5e9c9e30aaf7ebf3008eb756e73b1e Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 17:58:57 +0100 Subject: [PATCH 060/134] Update Firefox version to 134.0 and dependency to @zen-browser/surfer 1.9.1 --- README.md | 2 +- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- .../components/tabbrowser/content/tabs-js.patch | 6 +++--- surfer.json | 8 +++++--- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index f5141bcd6..d1d61fd8a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ ## 🖥️ Compatibility -Zen is currently built using firefox version `133.0.3`! 🚀 +Zen is currently built using firefox version `134.0`! 🚀 - Check out the latest [release notes](https://zen-browser.app/release-notes)! - Part of our mission is to keep Zen up-to-date with the latest version of Firefox, so you can enjoy the latest features and security updates! diff --git a/package.json b/package.json index bd6aeea65..c35e29044 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.8.6" + "@zen-browser/surfer": "^1.9.1" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0ee98a356..dffa952cf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.8.6 - version: 1.8.6(glob@7.2.3) + specifier: ^1.9.1 + version: 1.9.1(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.8.6': - resolution: {integrity: sha512-S/zGDRlMROdUqy6i6ZzhB8llMFi08XBJ2ypSQjwDKfiCtCB3oUGMPx7ahzI79cY0mvuTLpr5/NERKlR7Wq9nkA==} + '@zen-browser/surfer@1.9.1': + resolution: {integrity: sha512-IM3ru9bzcLdeB995s7pHVZRlvJZ399IkUHNe16UYV95YCTtlJDEkkepbvz/oHXZGjDUnx43ip9kQqTZit69/1g==} hasBin: true ansi-escapes@7.0.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.8.6(glob@7.2.3)': + '@zen-browser/surfer@1.9.1(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 diff --git a/src/browser/components/tabbrowser/content/tabs-js.patch b/src/browser/components/tabbrowser/content/tabs-js.patch index bca2bd1f3..c33b0871b 100644 --- a/src/browser/components/tabbrowser/content/tabs-js.patch +++ b/src/browser/components/tabbrowser/content/tabs-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js -index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..63e55af47b30d49e8636d43cae41622626906f16 100644 +index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..f578fe9da3c502289c6a3e3a0ba17de6e747e80f 100644 --- a/browser/components/tabbrowser/content/tabs.js +++ b/browser/components/tabbrowser/content/tabs.js @@ -649,7 +649,7 @@ @@ -219,7 +219,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..63e55af47b30d49e8636d43cae416226 - tabRect.right - selectedRect.left, - selectedRect.right - tabRect.left - ) <= scrollRect.width -+ !selectedRect || this.verticalMode ++ !selectedRect || (this.verticalMode + ? Math.max( + tabRect.bottom - selectedRect.top, + selectedRect.bottom - tabRect.top @@ -227,7 +227,7 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..63e55af47b30d49e8636d43cae416226 + : Math.max( + tabRect.right - selectedRect.left, + selectedRect.right - tabRect.left -+ ) <= scrollRect.width ++ ) <= scrollRect.width) ) { this.arrowScrollbox.ensureElementIsVisible(tabToScrollIntoView); return; diff --git a/surfer.json b/surfer.json index 2b08484fc..6774318c8 100644 --- a/surfer.json +++ b/surfer.json @@ -5,7 +5,7 @@ "binaryName": "zen", "version": { "product": "firefox", - "version": "133.0.3", + "version": "134.0", "candidate": "134.0" }, "buildOptions": { @@ -47,8 +47,10 @@ } }, "license": { - "ignoredFiles": [".*\\.json"], + "ignoredFiles": [ + ".*\\.json" + ], "licenseType": "MPL-2.0" }, "updateHostname": "updates.zen-browser.app" -} +} \ No newline at end of file From cfe3ea22dd59f98718de8d555b04e22fe3b9b814 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 18:04:18 +0100 Subject: [PATCH 061/134] Bump display version from 1.6t to 1.7t in surfer.json --- surfer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/surfer.json b/surfer.json index 6774318c8..e67832829 100644 --- a/surfer.json +++ b/surfer.json @@ -39,7 +39,7 @@ "brandShortName": "Zen", "brandFullName": "Zen Twilight", "release": { - "displayVersion": "1.6t", + "displayVersion": "1.7t", "github": { "repo": "zen-browser/desktop" } @@ -53,4 +53,4 @@ "licenseType": "MPL-2.0" }, "updateHostname": "updates.zen-browser.app" -} \ No newline at end of file +} From e868d8a67f169c076c6ed3c3a4a606093b93a855 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 19:01:44 +0100 Subject: [PATCH 062/134] Update surfer dependency to version 1.9.2 and modify codesign script --- build/codesign/codesign.bash | 2 +- l10n | 2 +- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index f75357125..dc1f9131b 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -126,7 +126,7 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ "${BUNDLE}"/Contents/MacOS/updater.app # Sign zen main executable -codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ +codesign --force -o runtime --verbose --sign "$IDENTITY" \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} \ "${BUNDLE}"/Contents/MacOS/zen diff --git a/l10n b/l10n index c1a9c6b43..38c1700d8 160000 --- a/l10n +++ b/l10n @@ -1 +1 @@ -Subproject commit c1a9c6b43bc5648858d95d585f16fff508b44d5a +Subproject commit 38c1700d8b40d200e4ffef94c480f96dba86ec39 diff --git a/package.json b/package.json index 9f624a728..d6aef5eeb 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.8.9" + "@zen-browser/surfer": "^1.9.2" }, "devDependencies": { "husky": "^9.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 26a3f11bb..ed3e69ad1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.8.9 - version: 1.8.9 + specifier: ^1.9.2 + version: 1.9.2 devDependencies: husky: specifier: ^9.1.5 @@ -119,8 +119,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.8.9': - resolution: {integrity: sha512-zIYQvfMJHiK+a3J2BMlUeYgijuRhUwVDyYhMPdVE7awpNJljSF3WM8HJVnl3jbB3b16dA9uvTQU/asiBbIC4kQ==} + '@zen-browser/surfer@1.9.2': + resolution: {integrity: sha512-QysaMuuESQfLySWBQSHsr6ezEBJUdcIx2kpY21gc+NjGxz4RyPnlBbZ5AxL2Ws98YYer6+0b761umidqWLAv/g==} hasBin: true ansi-escapes@7.0.0: @@ -1003,7 +1003,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.8.9': + '@zen-browser/surfer@1.9.2': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From 0191bf42794afb81db2c26aebe24b3b8033163a5 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 19:04:01 +0100 Subject: [PATCH 063/134] Remove thin LTO option from mozconfig for release builds --- configs/common/mozconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/configs/common/mozconfig b/configs/common/mozconfig index a5956b9dd..f986a3d04 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -58,9 +58,6 @@ if test "$ZEN_RELEASE"; then if test "$ZEN_RELEASE_BRANCH" = "release"; then export MOZ_LTO=cross,full ac_add_options --enable-lto=cross,full - else - export MOZ_LTO=cross,thin - ac_add_options --enable-lto=cross,thin fi fi From 3d61e4ed68fdfcdd0d6279794e41b1b7bf985fdc Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 19:07:32 +0100 Subject: [PATCH 064/134] Add --deep option to codesign for zen main executable and clean up validation steps --- build/codesign/codesign.bash | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index dc1f9131b..3ecb5047b 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -126,7 +126,7 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ "${BUNDLE}"/Contents/MacOS/updater.app # Sign zen main executable -codesign --force -o runtime --verbose --sign "$IDENTITY" \ +codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} \ "${BUNDLE}"/Contents/MacOS/zen @@ -150,12 +150,6 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Validate codesign -vvv --deep --strict "${BUNDLE}" -echo "Showing up app entitlements" -codesign -d --entitlements :- "${BUNDLE}" - -echo "Verifying app" -codesign --verify --deep --strict "${BUNDLE}" - # Create a DMG if [ ! -z "${OUTPUT_DMG_FILE}" ]; then DISK_IMAGE_DIR=`mktemp -d` From 4c5279e5eb1ec03b5048ea2e872d81ed312c17f5 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 19:15:28 +0100 Subject: [PATCH 065/134] Update @zen-browser/surfer dependency to version 1.9.2 and clean up surfer.json --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- surfer.json | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index c35e29044..47eb6d9ec 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.1" + "@zen-browser/surfer": "^1.9.2" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dffa952cf..c44b933a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.9.1 - version: 1.9.1(glob@7.2.3) + specifier: ^1.9.2 + version: 1.9.2(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.9.1': - resolution: {integrity: sha512-IM3ru9bzcLdeB995s7pHVZRlvJZ399IkUHNe16UYV95YCTtlJDEkkepbvz/oHXZGjDUnx43ip9kQqTZit69/1g==} + '@zen-browser/surfer@1.9.2': + resolution: {integrity: sha512-QysaMuuESQfLySWBQSHsr6ezEBJUdcIx2kpY21gc+NjGxz4RyPnlBbZ5AxL2Ws98YYer6+0b761umidqWLAv/g==} hasBin: true ansi-escapes@7.0.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.9.1(glob@7.2.3)': + '@zen-browser/surfer@1.9.2(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 diff --git a/surfer.json b/surfer.json index e67832829..634e05290 100644 --- a/surfer.json +++ b/surfer.json @@ -47,9 +47,7 @@ } }, "license": { - "ignoredFiles": [ - ".*\\.json" - ], + "ignoredFiles": [".*\\.json"], "licenseType": "MPL-2.0" }, "updateHostname": "updates.zen-browser.app" From 70cbc6033bb173b4a1f6cb7b27f961ee0fcf204e Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 20:41:17 +0100 Subject: [PATCH 066/134] Sort themes by name in Zen settings and update CSS for category hover state --- .../components/preferences/zen-settings.js | 2 +- .../shared/in-content/common-shared-css.patch | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/browser/components/preferences/zen-settings.js b/src/browser/components/preferences/zen-settings.js index 36a0c03fd..fff56e035 100644 --- a/src/browser/components/preferences/zen-settings.js +++ b/src/browser/components/preferences/zen-settings.js @@ -167,7 +167,7 @@ var gZenMarketplaceManager = { const browser = ZenMultiWindowFeature.currentBrowser; const themeList = document.createElement('div'); - for (const theme of Object.values(themes)) { + 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; diff --git a/src/toolkit/themes/shared/in-content/common-shared-css.patch b/src/toolkit/themes/shared/in-content/common-shared-css.patch index 671d51a86..0b2bba3c6 100644 --- a/src/toolkit/themes/shared/in-content/common-shared-css.patch +++ b/src/toolkit/themes/shared/in-content/common-shared-css.patch @@ -1,5 +1,5 @@ diff --git a/toolkit/themes/shared/in-content/common-shared.css b/toolkit/themes/shared/in-content/common-shared.css -index 646a11b699a0b34204cd766836678bfc17e8548e..3fc584bc42d7c3acbd7cb2d86d7fa013c1f2406d 100644 +index 38e13e0436ee3a2d722f2fc6e11ecafd122fb4eb..c0f985f7e0e74f7050ef91fb9d460d4880d389e4 100644 --- a/toolkit/themes/shared/in-content/common-shared.css +++ b/toolkit/themes/shared/in-content/common-shared.css @@ -5,6 +5,8 @@ @@ -11,7 +11,7 @@ index 646a11b699a0b34204cd766836678bfc17e8548e..3fc584bc42d7c3acbd7cb2d86d7fa013 @namespace html "http://www.w3.org/1999/xhtml"; @namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; -@@ -54,7 +56,7 @@ +@@ -53,7 +55,7 @@ --in-content-table-border-color: var(--in-content-box-border-color); --in-content-table-header-background: var(--in-content-primary-button-background); --in-content-table-header-color: var(--in-content-primary-button-text-color); @@ -20,7 +20,7 @@ index 646a11b699a0b34204cd766836678bfc17e8548e..3fc584bc42d7c3acbd7cb2d86d7fa013 --dialog-warning-text-color: var(--red-60); -@@ -740,7 +742,6 @@ html|*#categories { +@@ -737,7 +739,6 @@ html|*#categories { color: inherit; margin-inline-start: 34px; padding-inline: 10px; @@ -28,7 +28,15 @@ index 646a11b699a0b34204cd766836678bfc17e8548e..3fc584bc42d7c3acbd7cb2d86d7fa013 } html|*#categories > html|*.category { -@@ -777,7 +778,8 @@ html|*#categories > html|*.category:dir(rtl) { +@@ -767,14 +768,15 @@ html|*#categories > html|*.category:dir(rtl) { + + #categories > .category:hover:active { + background-color: var(--in-content-button-background-active); +- color: var(--in-content-button-text-color-active); ++ color: var(--in-content-button-text-color-active) !important; + border-color: var(--in-content-button-border-color-active); + } + @media not (forced-colors) { #categories > .category[selected], #categories > .category.selected { @@ -38,7 +46,7 @@ index 646a11b699a0b34204cd766836678bfc17e8548e..3fc584bc42d7c3acbd7cb2d86d7fa013 } #categories > .category[selected]:not(:hover) { -@@ -839,7 +841,7 @@ html|*#categories[last-input-type="mouse"] > html|button.category:focus-visible +@@ -836,7 +838,7 @@ html|*#categories[last-input-type="mouse"] > html|button.category:focus-visible fill-opacity: 1; } @@ -47,7 +55,7 @@ index 646a11b699a0b34204cd766836678bfc17e8548e..3fc584bc42d7c3acbd7cb2d86d7fa013 :root { --in-content-sidebar-width: 118px; } -@@ -1219,7 +1221,7 @@ xul|*.sidebar-footer-link { +@@ -1216,7 +1218,7 @@ xul|*.sidebar-footer-link { user-select: none; } From 379ccdf33d26314138ba2ab3470c3838d08b0f56 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 20:42:30 +0100 Subject: [PATCH 067/134] Update surfer dependency to version 1.9.3 and resolve merge conflicts in lock file --- package.json | 2 +- pnpm-lock.yaml | 24 +++++------------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 47eb6d9ec..d42c3a8c6 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.2" + "@zen-browser/surfer": "^1.9.3" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 100289f93..4f496916d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,13 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': -<<<<<<< HEAD - specifier: ^1.9.2 - version: 1.9.2 -======= - specifier: ^1.9.1 - version: 1.9.1(glob@7.2.3) ->>>>>>> 34e5e6c151ccf30add3f477cc243a84f4648e558 + specifier: ^1.9.3 + version: 1.9.3(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -127,13 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} -<<<<<<< HEAD - '@zen-browser/surfer@1.9.2': - resolution: {integrity: sha512-QysaMuuESQfLySWBQSHsr6ezEBJUdcIx2kpY21gc+NjGxz4RyPnlBbZ5AxL2Ws98YYer6+0b761umidqWLAv/g==} -======= - '@zen-browser/surfer@1.9.1': - resolution: {integrity: sha512-IM3ru9bzcLdeB995s7pHVZRlvJZ399IkUHNe16UYV95YCTtlJDEkkepbvz/oHXZGjDUnx43ip9kQqTZit69/1g==} ->>>>>>> 34e5e6c151ccf30add3f477cc243a84f4648e558 + '@zen-browser/surfer@1.9.3': + resolution: {integrity: sha512-D53XK4/jQcgJKHESjixezCazYTw7orN3Bnogv5RzITRvm79ftYtzSvkrdNwMsmoTJRro8am7VvBLIDfsj2UBeA==} hasBin: true ansi-escapes@7.0.0: @@ -1046,11 +1036,7 @@ snapshots: '@types/node@17.0.45': {} -<<<<<<< HEAD - '@zen-browser/surfer@1.9.2': -======= - '@zen-browser/surfer@1.9.1(glob@7.2.3)': ->>>>>>> 34e5e6c151ccf30add3f477cc243a84f4648e558 + '@zen-browser/surfer@1.9.3(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From a962533301c17fe1248e0aea4e7836e03db84597 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 20:44:08 +0100 Subject: [PATCH 068/134] Update @zen-browser/surfer dependency to version 1.9.3 in package.json and pnpm-lock.yaml --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 47eb6d9ec..d42c3a8c6 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.2" + "@zen-browser/surfer": "^1.9.3" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c44b933a4..4f496916d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.9.2 - version: 1.9.2(glob@7.2.3) + specifier: ^1.9.3 + version: 1.9.3(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.9.2': - resolution: {integrity: sha512-QysaMuuESQfLySWBQSHsr6ezEBJUdcIx2kpY21gc+NjGxz4RyPnlBbZ5AxL2Ws98YYer6+0b761umidqWLAv/g==} + '@zen-browser/surfer@1.9.3': + resolution: {integrity: sha512-D53XK4/jQcgJKHESjixezCazYTw7orN3Bnogv5RzITRvm79ftYtzSvkrdNwMsmoTJRro8am7VvBLIDfsj2UBeA==} hasBin: true ansi-escapes@7.0.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.9.2(glob@7.2.3)': + '@zen-browser/surfer@1.9.3(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From fbd81f431e307e266b52a7d8b1d04037612131d0 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 21:46:28 +0100 Subject: [PATCH 069/134] Update subproject commit reference in l10n --- l10n | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n b/l10n index 38c1700d8..1abc46f17 160000 --- a/l10n +++ b/l10n @@ -1 +1 @@ -Subproject commit 38c1700d8b40d200e4ffef94c480f96dba86ec39 +Subproject commit 1abc46f17d90b4e38af88539944d4a664568ec4c From 18b64c399945dcea879afc0e60fd7e1d62c8d787 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 22:36:04 +0100 Subject: [PATCH 070/134] Update surfer dependency to version 1.9.4, adjust provisioning profile handling, and clean up codesign script --- .github/workflows/macos-release-build.yml | 8 +++++++- build/codesign/codesign.bash | 3 +++ l10n | 2 +- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index cf7dfb6f5..a4f1772ba 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -127,7 +127,9 @@ jobs: p12-password: ${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }} - name: Import provisioning profile for .app - run: echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > "zen.provisionprofile" + run: | + echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > ./engine/Zen_Browser.provisionprofile + ls -la - name: Package env: @@ -142,6 +144,10 @@ jobs: run: | mv ./dist/output.mar macos-${{ matrix.arch }}.mar + - name: Remove sensitive information + run: | + rm -f ./engine/Zen_Browser.provisionprofile + - name: Sign .dmg run: | set -ex diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 3ecb5047b..62d987197 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -111,6 +111,9 @@ echo "-------------------------------------------------------------------------" set -x +# move Zen_Browser.provisionprofile to the Contents directory +cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile + # Clear extended attributes which cause codesign to fail xattr -cr "${BUNDLE}" diff --git a/l10n b/l10n index 38c1700d8..1abc46f17 160000 --- a/l10n +++ b/l10n @@ -1 +1 @@ -Subproject commit 38c1700d8b40d200e4ffef94c480f96dba86ec39 +Subproject commit 1abc46f17d90b4e38af88539944d4a664568ec4c diff --git a/package.json b/package.json index d42c3a8c6..2721e24a8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.3" + "@zen-browser/surfer": "^1.9.4" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4f496916d..dace21688 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.9.3 - version: 1.9.3(glob@7.2.3) + specifier: ^1.9.4 + version: 1.9.4(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.9.3': - resolution: {integrity: sha512-D53XK4/jQcgJKHESjixezCazYTw7orN3Bnogv5RzITRvm79ftYtzSvkrdNwMsmoTJRro8am7VvBLIDfsj2UBeA==} + '@zen-browser/surfer@1.9.4': + resolution: {integrity: sha512-/HqhTAf67Br+gtIzgEk76vGRZqwW6zX2CV9MTvnoMSXAZaB5rxDBhMI3zvqB5Bl/Sz0akGc6K9u82KbF9W9DtQ==} hasBin: true ansi-escapes@7.0.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.9.3(glob@7.2.3)': + '@zen-browser/surfer@1.9.4(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From dd33e152fc5dbd7df1d0ada98c07f0afc5111e2a Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 22:36:53 +0100 Subject: [PATCH 071/134] Update @zen-browser/surfer dependency to version 1.9.4 in package.json and pnpm-lock.yaml --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d42c3a8c6..2721e24a8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.3" + "@zen-browser/surfer": "^1.9.4" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4f496916d..dace21688 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.9.3 - version: 1.9.3(glob@7.2.3) + specifier: ^1.9.4 + version: 1.9.4(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.9.3': - resolution: {integrity: sha512-D53XK4/jQcgJKHESjixezCazYTw7orN3Bnogv5RzITRvm79ftYtzSvkrdNwMsmoTJRro8am7VvBLIDfsj2UBeA==} + '@zen-browser/surfer@1.9.4': + resolution: {integrity: sha512-/HqhTAf67Br+gtIzgEk76vGRZqwW6zX2CV9MTvnoMSXAZaB5rxDBhMI3zvqB5Bl/Sz0akGc6K9u82KbF9W9DtQ==} hasBin: true ansi-escapes@7.0.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.9.3(glob@7.2.3)': + '@zen-browser/surfer@1.9.4(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From 6207d5ebf508111e74163eee5d370a471a5372e1 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Tue, 7 Jan 2025 22:37:39 +0100 Subject: [PATCH 072/134] Update build.yml Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc11faae7..9b0719122 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,7 +76,7 @@ jobs: fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" - # exit 1 + exit 1 else echo ">>> Branch matches" fi From dce081ce62975abbb18170d39e87ee1aa728b7cd Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Tue, 7 Jan 2025 22:38:07 +0100 Subject: [PATCH 073/134] Discard changes to configs/common/mozconfig --- configs/common/mozconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/common/mozconfig b/configs/common/mozconfig index f986a3d04..a5956b9dd 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -58,6 +58,9 @@ if test "$ZEN_RELEASE"; then if test "$ZEN_RELEASE_BRANCH" = "release"; then export MOZ_LTO=cross,full ac_add_options --enable-lto=cross,full + else + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin fi fi From 697532d5b49b48a7694b9c9ebe813c4de1926e35 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Tue, 7 Jan 2025 22:38:12 +0100 Subject: [PATCH 074/134] Discard changes to configs/macos/mozconfig --- configs/macos/mozconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 27ccde12f..0adf87e96 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,7 +6,10 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" - +if test "$ZEN_RELEASE"; then + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 +fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 2fc67fae1875d73fd5a05ab4b1451657c7e1c53f Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 22:42:55 +0100 Subject: [PATCH 075/134] Update build workflow to map 'release' branch to 'stable' --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf72f4a15..7367bec0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,6 +74,8 @@ jobs: branch="${{ inputs.update_branch }}" if [[ $branch == "twilight" ]]; then branch="dev" + elif [[ $branch == "release" ]]; then + branch="stable" fi if [[ $(git branch --show-current) != $branch ]]; then echo ">>> Branch mismatch" From 5c00c8f1ab8db25c408d89c7dfdc0e46a8bccac2 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 22:48:55 +0100 Subject: [PATCH 076/134] Add conditional checks for aarch64 architecture in Windows release build workflow --- .github/workflows/windows-release-build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index c19521f05..0d8b096fd 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -32,6 +32,7 @@ jobs: steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main + if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} with: tool-cache: false @@ -62,6 +63,7 @@ jobs: run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }} - name: Download Firefox and dependencies + if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} run: pnpm surfer download - name: win-cross Cache @@ -81,7 +83,7 @@ jobs: core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Setup for Windows - if: steps.cache-win-cross.outputs.cache-hit != 'true' + if: steps.cache-win-cross.outputs.cache-hit != 'true' && !(inputs.generate-gpo && matrix.arch == 'aarch64') run: | set -x mkdir -p ~/win-cross @@ -95,6 +97,7 @@ jobs: ./mach python --virtualenv build taskcluster/scripts/misc/get_vs.py build/vs/vs2022.yaml ~/win-cross/vs2022 - name: Bootstrap + if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} run: | set -x cd engine/ @@ -113,6 +116,7 @@ jobs: ls ~/win-cross/vs2022 || true - name: Setup Rust + if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} run: | cd engine/ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.79 @@ -129,11 +133,13 @@ jobs: echo "export MOZ_WINDOWS_RS_DIR=$(pwd)/windows-0.58.0" >> ../configs/common/mozconfig - name: Import + if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} env: SURFER_COMPAT: ${{ matrix.arch }} run: pnpm surfer import --verbose - name: Build language packs + if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} run: sh scripts/download-language-packs.sh - name: Download artifact (if use profdata) From 3ecd92912554bae2f4f6a8dd01a7089ceb81f74f Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 22:52:46 +0100 Subject: [PATCH 077/134] Update Windows build workflows to use warp-windows-latest-x64-8x for release branch --- .github/workflows/windows-profile-build.yml | 2 +- .github/workflows/windows-release-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-profile-build.yml b/.github/workflows/windows-profile-build.yml index b7ea736b1..89d8aca42 100644 --- a/.github/workflows/windows-profile-build.yml +++ b/.github/workflows/windows-profile-build.yml @@ -25,7 +25,7 @@ jobs: matrix: arch: [x86_64, aarch64] - runs-on: windows-latest + runs-on: ${{ inputs.release-branch == 'release' && 'warp-windows-latest-x64-8x' || 'windows-latest' }} steps: - name: Checkout repository diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 0d8b096fd..b8de19429 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -22,7 +22,7 @@ on: jobs: windows-build: name: Build Windows - ${{ matrix.arch }} - runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-6x' || 'ubuntu-latest' }} + runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} strategy: fail-fast: false From 98fa56eed5ac0c44880f394246a18b4c8e09fafe Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 23:04:49 +0100 Subject: [PATCH 078/134] Enhance Windows build workflow by adding additional dependencies for improved compatibility --- .github/workflows/windows-release-build.yml | 44 ++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index b8de19429..814684a20 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -93,7 +93,49 @@ jobs: tar --zstd -xvf wine.tar.zst -C ~/win-cross rm wine.tar.zst echo Setup Visual Studio - sudo apt install -y msitools python3-pip + sudo apt-get update + sudo apt-get install -y msitools python3-pip autoconf \ + autoconf2.13 \ + automake \ + bison \ + build-essential \ + cabextract \ + curl \ + clang-13 \ + cmake \ + flex \ + gawk \ + gcc-multilib \ + git \ + gnupg \ + jq \ + libbz2-dev \ + libexpat1-dev \ + libffi-dev \ + libncursesw5-dev \ + libsqlite3-dev \ + libssl-dev \ + libtool \ + libucl-dev \ + libxml2-dev \ + lld-13 \ + msitools \ + ninja-build \ + openssh-client \ + p7zip-full \ + pkg-config \ + procps \ + python3-requests \ + python3-toml \ + scons \ + subversion \ + tar \ + unzip \ + uuid \ + uuid-dev \ + wget \ + zip \ + zlib1g-dev ./mach python --virtualenv build taskcluster/scripts/misc/get_vs.py build/vs/vs2022.yaml ~/win-cross/vs2022 - name: Bootstrap From 203163de43477638011a4cd94796bb978bb94f48 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 23:12:20 +0100 Subject: [PATCH 079/134] Refactor Windows build workflow by removing unnecessary dependencies --- .github/workflows/windows-release-build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 814684a20..5ebe0762e 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -94,14 +94,13 @@ jobs: rm wine.tar.zst echo Setup Visual Studio sudo apt-get update - sudo apt-get install -y msitools python3-pip autoconf \ + sudo apt-get install -y python3-pip autoconf \ autoconf2.13 \ automake \ bison \ build-essential \ cabextract \ curl \ - clang-13 \ cmake \ flex \ gawk \ @@ -118,7 +117,6 @@ jobs: libtool \ libucl-dev \ libxml2-dev \ - lld-13 \ msitools \ ninja-build \ openssh-client \ From 2d4f9d4d7b7f34adc9b8e774dbcf074995b7fc82 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Tue, 7 Jan 2025 23:53:17 +0100 Subject: [PATCH 080/134] Disable PGO for aarch64 builds when ZEN_GA_DISABLE_PGO flag is set in Windows build configuration --- .github/workflows/windows-release-build.yml | 1 + configs/windows/mozconfig | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 5ebe0762e..366c98faf 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -217,6 +217,7 @@ jobs: if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} env: SURFER_COMPAT: ${{ matrix.arch }} + ZEN_GA_DISABLE_PGO: true run: | set -x export SURFER_PLATFORM="win32" diff --git a/configs/windows/mozconfig b/configs/windows/mozconfig index b7331b26e..e1ddf0e42 100644 --- a/configs/windows/mozconfig +++ b/configs/windows/mozconfig @@ -58,9 +58,13 @@ if test "$ZEN_CROSS_COMPILING"; then mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0" ac_add_options --enable-profile-generate=cross elif test "$SURFER_COMPAT" = "x86_64"; then - # Dont use PGO on aarch64 builds - ac_add_options --enable-profile-use=cross - ac_add_options --with-pgo-profile-path=$(echo ~)/artifact/merged.profdata - ac_add_options --with-pgo-jarlog=$(echo ~)/artifact/en-US.log + # Dont use PGO on aarch64 builds and the ZEN_GA_DISABLE_PGO flag is not set + if test "$ZEN_GA_DISABLE_PGO"; then + echo "PGO is disabled" + else + ac_add_options --enable-profile-use=cross + ac_add_options --with-pgo-profile-path=$(echo ~)/artifact/merged.profdata + ac_add_options --with-pgo-jarlog=$(echo ~)/artifact/en-US.log + fi fi fi From 73f932fadec587c58ba00d3fb37b5a92d8b8ae47 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 00:15:05 +0100 Subject: [PATCH 081/134] Update Linux and Windows build workflows to use warp-ubuntu-latest-x64-16x for release branch --- .github/workflows/linux-release-build.yml | 2 +- .github/workflows/windows-release-build.yml | 2 +- configs/windows/mozconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 8b73de2be..337abd447 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-16x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 366c98faf..4fbb1542f 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -22,7 +22,7 @@ on: jobs: windows-build: name: Build Windows - ${{ matrix.arch }} - runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }} + runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-16x' || 'ubuntu-latest' }} strategy: fail-fast: false diff --git a/configs/windows/mozconfig b/configs/windows/mozconfig index e1ddf0e42..136c530e7 100644 --- a/configs/windows/mozconfig +++ b/configs/windows/mozconfig @@ -60,7 +60,7 @@ if test "$ZEN_CROSS_COMPILING"; then elif test "$SURFER_COMPAT" = "x86_64"; then # Dont use PGO on aarch64 builds and the ZEN_GA_DISABLE_PGO flag is not set if test "$ZEN_GA_DISABLE_PGO"; then - echo "PGO is disabled" + export ZEN_DUMMY=1 else ac_add_options --enable-profile-use=cross ac_add_options --with-pgo-profile-path=$(echo ~)/artifact/merged.profdata From c7a80d5c6e3f06871fde206ac3b67a10c1b46c7a Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:36:14 +0000 Subject: [PATCH 082/134] =?UTF-8?q?Actualizar=20la=20configuraci=C3=B3n=20?= =?UTF-8?q?de=20compilaci=C3=B3n=20de=20macOS=20y=20las=20dependencias=20d?= =?UTF-8?q?e=20@zen-browser/surfer=20a=20la=20versi=C3=B3n=201.9.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/macos-release-build.yml | 2 +- build/codesign/codesign.bash | 7 ++++--- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index a4f1772ba..411f16e57 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -15,7 +15,7 @@ on: jobs: mac-build: name: Build macOS - ${{ matrix.arch }} - runs-on: ${{ inputs.release-branch == 'release' && 'warp-macos-14-arm64-6x' || 'macos-14' }} + runs-on: ${{ inputs.release-branch == 'release' && 'warp-macos-14-arm64-8x' || 'macos-14' }} strategy: fail-fast: false diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 62d987197..ff0e4acfe 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -111,9 +111,6 @@ echo "-------------------------------------------------------------------------" set -x -# move Zen_Browser.provisionprofile to the Contents directory -cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile - # Clear extended attributes which cause codesign to fail xattr -cr "${BUNDLE}" @@ -141,6 +138,10 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ find "${BUNDLE}"/Contents/Resources/gmp-clearkey -type f -exec \ codesign --force -o runtime --verbose --sign "$IDENTITY" {} \; + +# move Zen_Browser.provisionprofile to the Contents directory +cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile + # Sign the main bundle codesign --force -o runtime --verbose --sign "$IDENTITY" \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} "${BUNDLE}" diff --git a/package.json b/package.json index 2721e24a8..6d4dbb205 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.4" + "@zen-browser/surfer": "^1.9.5" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dace21688..5347afb31 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.9.4 - version: 1.9.4(glob@7.2.3) + specifier: ^1.9.5 + version: 1.9.5(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.9.4': - resolution: {integrity: sha512-/HqhTAf67Br+gtIzgEk76vGRZqwW6zX2CV9MTvnoMSXAZaB5rxDBhMI3zvqB5Bl/Sz0akGc6K9u82KbF9W9DtQ==} + '@zen-browser/surfer@1.9.5': + resolution: {integrity: sha512-daM+h1XP4OlIhMuN5aRIrkbau6w6vtNFH9Ezw2fZwZTgUvTiTQEJ2Ih4/Nghr/1CNUq24200X/aGUNyM7ix2DQ==} hasBin: true ansi-escapes@7.0.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.9.4(glob@7.2.3)': + '@zen-browser/surfer@1.9.5(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From 59f9b9967e85af6ed5e0fbafade397f77b28fc2b Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:39:30 +0000 Subject: [PATCH 083/134] =?UTF-8?q?Agregar=20carga=20de=20configuraci?= =?UTF-8?q?=C3=B3n=20de=20CI=20para=20Surfer=20en=20el=20flujo=20de=20trab?= =?UTF-8?q?ajo=20de=20compilaci=C3=B3n=20de=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/windows-profile-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/windows-profile-build.yml b/.github/workflows/windows-profile-build.yml index 89d8aca42..d31f00031 100644 --- a/.github/workflows/windows-profile-build.yml +++ b/.github/workflows/windows-profile-build.yml @@ -47,6 +47,9 @@ jobs: - name: Install Surfer run: npm i -g @zen-browser/surfer + - name: Load Surfer CI setup + run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }} + - name: Download artifact if: ${{ matrix.arch == 'x86_64' }} uses: actions/download-artifact@v4 From f7f87131cdb78c3db5ff953966de098b79980ae1 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:17:24 +0000 Subject: [PATCH 084/134] =?UTF-8?q?Deshabilitar=20la=20opci=C3=B3n=20de=20?= =?UTF-8?q?espacios=20de=20trabajo=20para=20pruebas=20y=20ajustar=20la=20c?= =?UTF-8?q?onfiguraci=C3=B3n=20de=20preferencias=20relacionadas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/browser/app/profile/zen-browser.js | 2 +- .../content/zen-styles/zen-workspaces.css | 2 +- .../base/zen-components/ZenWorkspaces.mjs | 16 +-------- .../components/preferences/zen-settings.js | 19 ---------- .../preferences/zenTabsManagement.inc.xhtml | 36 ++++++++----------- .../profiles/profileserver/user-js.patch | 2 +- 6 files changed, 19 insertions(+), 58 deletions(-) diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index 93ff88714..3dcd11da4 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -190,7 +190,7 @@ pref('zen.splitView.rearrange-hover-size', 24); pref('zen.startup.smooth-scroll-in-tabs', true); // Zen Workspaces -pref('zen.workspaces.enabled', true, locked); +pref('zen.workspaces.disabled_for_testing', false); pref('zen.workspaces.hide-deactivated-workspaces', false); pref('zen.workspaces.hide-default-container-indicator', true); pref('zen.workspaces.individual-pinned-tabs', true); diff --git a/src/browser/base/content/zen-styles/zen-workspaces.css b/src/browser/base/content/zen-styles/zen-workspaces.css index 708135d0e..d63d2587c 100644 --- a/src/browser/base/content/zen-styles/zen-workspaces.css +++ b/src/browser/base/content/zen-styles/zen-workspaces.css @@ -479,7 +479,7 @@ } } -@media (not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator')) or (not (-moz-bool-pref: 'zen.workspaces.enabled')) { +@media not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator') { #zen-current-workspace-indicator { display: none !important; } diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 3a38fac43..23039588e 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -309,7 +309,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { get workspaceEnabled() { if (typeof this._workspaceEnabled === 'undefined') { - this._workspaceEnabled = Services.prefs.getBoolPref('zen.workspaces.enabled', false) && this.shouldHaveWorkspaces; + this._workspaceEnabled = (!Services.prefs.getBoolPref('zen.workspaces.disabled_for_testing', false)) && this.shouldHaveWorkspaces; return this._workspaceEnabled; } return this._workspaceEnabled; @@ -368,21 +368,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { return this._workspaceCache; } - async onWorkspacesEnabledChanged() { - if (this.workspaceEnabled) { - throw Error("Shoud've had reloaded the window"); - } else { - this._workspaceCache = null; - document.getElementById('zen-workspaces-button')?.remove(); - for (let tab of gBrowser.tabs) { - gBrowser.showTab(tab); - } - } - } - async initializeWorkspaces() { - Services.prefs.addObserver('zen.workspaces.enabled', this.onWorkspacesEnabledChanged.bind(this)); - await this.initializeWorkspacesButton(); if (this.workspaceEnabled) { this._initializeWorkspaceCreationIcons(); diff --git a/src/browser/components/preferences/zen-settings.js b/src/browser/components/preferences/zen-settings.js index fff56e035..214bffc03 100644 --- a/src/browser/components/preferences/zen-settings.js +++ b/src/browser/components/preferences/zen-settings.js @@ -672,29 +672,15 @@ var gZenWorkspacesSettings = { } }, }; - Services.prefs.addObserver('zen.workspaces.enabled', this); Services.prefs.addObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener); Services.prefs.addObserver('zen.glance.enabled', tabsUnloaderPrefListener); // We can use the same listener for both prefs Services.prefs.addObserver('zen.glance.activation-method', tabsUnloaderPrefListener); window.addEventListener('unload', () => { - Services.prefs.removeObserver('zen.workspaces.enabled', this); Services.prefs.removeObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener); Services.prefs.removeObserver('zen.glance.enabled', tabsUnloaderPrefListener); Services.prefs.removeObserver('zen.glance.activation-method', tabsUnloaderPrefListener); }); }, - - async observe(subject, topic, data) { - await this.onWorkspaceChange(Services.prefs.getBoolPref('zen.workspaces.enabled')); - }, - - async onWorkspaceChange(checked) { - let buttonIndex = await confirmRestartPrompt(true, 1, true, false); - if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) { - Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart); - return; - } - }, }; const ZEN_CKS_CLASS_BASE = 'zenCKSOption'; @@ -1007,11 +993,6 @@ Preferences.addAll([ type: 'bool', default: true, }, - { - id: 'zen.workspaces.enabled', - type: 'bool', - default: true, - }, { id: 'zen.theme.pill-button', type: 'bool', diff --git a/src/browser/components/preferences/zenTabsManagement.inc.xhtml b/src/browser/components/preferences/zenTabsManagement.inc.xhtml index c04dd8a55..490ffef07 100644 --- a/src/browser/components/preferences/zenTabsManagement.inc.xhtml +++ b/src/browser/components/preferences/zenTabsManagement.inc.xhtml @@ -17,27 +17,21 @@ - - - - - - - - - + + + + + Date: Wed, 8 Jan 2025 12:19:20 +0000 Subject: [PATCH 085/134] Formatted the project --- src/browser/base/zen-components/ZenWorkspaces.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 23039588e..572f205a5 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -309,7 +309,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { get workspaceEnabled() { if (typeof this._workspaceEnabled === 'undefined') { - this._workspaceEnabled = (!Services.prefs.getBoolPref('zen.workspaces.disabled_for_testing', false)) && this.shouldHaveWorkspaces; + this._workspaceEnabled = + !Services.prefs.getBoolPref('zen.workspaces.disabled_for_testing', false) && this.shouldHaveWorkspaces; return this._workspaceEnabled; } return this._workspaceEnabled; From d7c8bc246b57ea2b1a6f6098f18964692c8ca1b4 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:44:49 +0100 Subject: [PATCH 086/134] Update codesign.bash Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- build/codesign/codesign.bash | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index ff0e4acfe..d6bdf9b14 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -138,10 +138,6 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ find "${BUNDLE}"/Contents/Resources/gmp-clearkey -type f -exec \ codesign --force -o runtime --verbose --sign "$IDENTITY" {} \; - -# move Zen_Browser.provisionprofile to the Contents directory -cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile - # Sign the main bundle codesign --force -o runtime --verbose --sign "$IDENTITY" \ --entitlements ${BROWSER_ENTITLEMENTS_FILE} "${BUNDLE}" @@ -154,6 +150,9 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Validate codesign -vvv --deep --strict "${BUNDLE}" +# move Zen_Browser.provisionprofile to the Contents directory +cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile + # Create a DMG if [ ! -z "${OUTPUT_DMG_FILE}" ]; then DISK_IMAGE_DIR=`mktemp -d` From 604d0da2d5a9475f25af4ea508af91d4f4abd816 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:09:08 +0000 Subject: [PATCH 087/134] =?UTF-8?q?Actualizar=20la=20dependencia=20de=20@z?= =?UTF-8?q?en-browser/surfer=20a=20la=20versi=C3=B3n=201.9.6=20y=20agregar?= =?UTF-8?q?=20la=20funcionalidad=20de=20"staple"=20en=20el=20script=20de?= =?UTF-8?q?=20codesign?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/codesign/codesign.bash | 3 + package.json | 2 +- pnpm-lock.yaml | 126 +++++++++++++++++------------------ 3 files changed, 67 insertions(+), 64 deletions(-) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index d6bdf9b14..79e3945e4 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -153,6 +153,9 @@ codesign -vvv --deep --strict "${BUNDLE}" # move Zen_Browser.provisionprofile to the Contents directory cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile +# Staple the ticket +xcrun stapler staple "${BUNDLE}" --verbose || exit 0 + # Create a DMG if [ ! -z "${OUTPUT_DMG_FILE}" ]; then DISK_IMAGE_DIR=`mktemp -d` diff --git a/package.json b/package.json index 6d4dbb205..4b54c05d6 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.5" + "@zen-browser/surfer": "^1.9.6" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5347afb31..8d98b70ea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.9.5 - version: 1.9.5(glob@7.2.3) + specifier: ^1.9.6 + version: 1.9.6(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.9.5': - resolution: {integrity: sha512-daM+h1XP4OlIhMuN5aRIrkbau6w6vtNFH9Ezw2fZwZTgUvTiTQEJ2Ih4/Nghr/1CNUq24200X/aGUNyM7ix2DQ==} + '@zen-browser/surfer@1.9.6': + resolution: {integrity: sha512-UdtxmgQ+ft03cD8YMqRMwrXf3Lj1OUN1vWPcZxJYLnI41N2UXGlpiOg7U/q4pEC/YNRkJnywiqAaCRJ1n1J8ZQ==} hasBin: true ansi-escapes@7.0.0: @@ -152,8 +152,8 @@ packages: asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} - async-compat@1.5.1: - resolution: {integrity: sha512-itH7HB0C7nzX7ynpIJYEJqpvuXmfWXXbzDrTfJOJJ3fJfgNTGgZUqKVYUT3U17zhceZiTdPdtiUQQns2F3RRCQ==} + async-compat@1.6.1: + resolution: {integrity: sha512-8ggRAJiUews+8pjzG/fQ0O9QOPxHFa3DGvvMoH67rukjIiRL7AVGcaUSkA6ecZYlDvyom7zet7zy1ZFjRliuqw==} engines: {node: '>=0.8'} async-icns@1.0.2: @@ -207,8 +207,8 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - call-once-fn@1.0.1: - resolution: {integrity: sha512-/MIar5BYO3zAwe0QZCFsr89R6vn6BWiS3BCG2IyCUobkY3rAKK5r+elC3TWdBQW4q6A8aNjS5CDTmtUnAIOa7g==} + call-once-fn@1.0.6: + resolution: {integrity: sha512-zBcRjl/aFJEJqNSNw0gtzi4ZtDLBqPqIbU8qyXv5M2biF2nYHqcpIXOWo6ZhhDAQDkr9WgXQnLLyXQJvWm5AMg==} engines: {node: '>=0.8'} chalk@4.1.2: @@ -270,8 +270,8 @@ packages: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} - core-js-pure@3.39.0: - resolution: {integrity: sha512-7fEcWwKI4rJinnK+wLTezeg2smbFFdSBP6E2kQZNbnzM2s1rpKQ6aaRteZSSg7FLU3P0HGGVo/gbpfanU36urg==} + core-js-pure@3.40.0: + resolution: {integrity: sha512-AtDzVIgRrmRKQai62yuSIN5vNiQjcJakJb4fbhVw3ehxx7Lohphvw9SGNWKhLFqSxC4ilD0g/L1huAYFQU3Q6A==} core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -337,12 +337,12 @@ packages: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} - extract-base-iterator@1.2.1: - resolution: {integrity: sha512-6paYzxwwx215Zj29ZhoCw2wnaGnU8kPPIzth0U71JwZCo9oR5sGUBWQd6Da5YIWmUZKsadCULxr2dRAzhTmKIA==} + extract-base-iterator@1.2.10: + resolution: {integrity: sha512-xdSKIpRrB+AqUJByl1pIOAyHs2vUfA4pL05SiB/9ZhC4AYS4G9a5TNmKEfY6KKeoPw5eFLoQ/9hVUUq5BIguFA==} engines: {node: '>=0.8'} - fast-extract@1.3.1: - resolution: {integrity: sha512-4er0iCszwwY1JX1SfYHQKuoPTmu6ISIG8W4gD8/jHkB7/Ws9i0ZNu+48BpalV+GGsushMvllTFk8txLBGbpYGg==} + fast-extract@1.3.10: + resolution: {integrity: sha512-XrV3AQLlaW4sDMSOwcBRDBMaEdJKgXT2EhtsqTufdZWWNN2b8zmRSGee/VV/vurO0agKoEVCyxja2DmkBzv6lg==} engines: {node: '>=0.8'} peerDependencies: lzma-native: '*' @@ -369,8 +369,8 @@ packages: debug: optional: true - fs-access-compat@1.0.3: - resolution: {integrity: sha512-bIT52oDQuazHSEnu17+MnRGVTTtLpMluu9Zuv25RhJ+iVWrTX95aXK+9yEsQ1ZaIRCWeHjx1IgR38QH/8psWKQ==} + fs-access-compat@1.1.4: + resolution: {integrity: sha512-Qvy38V5JTnQT9pDulL2HBDiuZ1XbA3IHLJrHZpsP2gcBocflwnrbIcRd/dcH+ax55JEqqc8N1ARpaxITlp7hMg==} engines: {node: '>=0.8'} fs-constants@1.0.0: @@ -588,8 +588,8 @@ packages: mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} - mock-require-lazy@1.0.1: - resolution: {integrity: sha512-Sv05IW2MuG7C+gVTHirqF8cbqAM8MeMEIKU3MIQDA1pyXKnv0AGa/3l0iwXk/i+81OoFzt+iU0p8DdphV2Ejww==} + mock-require-lazy@1.0.6: + resolution: {integrity: sha512-+0sOddS06fxFPJEDulH1Qssavf7D8UWa54Z6LQFuKwWwKwXLIU2JHnNt9Qi449LkqrKtNVa0rHhAzoJCZxvTgg==} engines: {node: '>=0.8'} modern-async@1.1.5: @@ -717,8 +717,8 @@ packages: pumpify@2.0.1: resolution: {integrity: sha512-m7KOje7jZxrmutanlkS1daj1dS6z6BgslzOXmcSEpIlCxM3VJH7lG5QLeck/6hgF6F4crFf01UtQmNsJfweTAw==} - queue-cb@1.4.4: - resolution: {integrity: sha512-WHT/6s0nK/TB6/tlCi30NGNh8mQrCVmQAH5Hq/ZLaYFTjKVfsIKmfftJYAHXfGJ2FlRlVSAJjFBbSvSGJriCAw==} + queue-cb@1.4.10: + resolution: {integrity: sha512-Hi3ZvXvKhrmxJhn6FhwsyW/Dd6OFZy2RWPXrAxQFw0jDnoiOzx2edkarCr5RpR6no7nZ+O4if59M/2HKzFy3hw==} engines: {node: '>=0.8'} rc@1.2.8: @@ -828,8 +828,8 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - stack-base-iterator@1.1.5: - resolution: {integrity: sha512-wFnKvg6qFFCQBvpBqa4SWnDGIVziYu8A2ATQqcvYwdi774efdRHzXarjW88vaTy2fLbuVVH0g361UfOEJHWmCA==} + stack-base-iterator@1.1.11: + resolution: {integrity: sha512-c9f/rUFy/GJCEn0kx7gqIM/LByOrvOAq4I0cEVeahcmSGFfFa2xAto6/RcjApT0qbz/+IrA0OCM7CHnSiVDrOw==} engines: {node: '>=0.8'} stream-shift@1.0.3: @@ -880,8 +880,8 @@ packages: tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} - tar-iterator@1.2.2: - resolution: {integrity: sha512-cFr12lmqNsIBFT++9QJSPNdOXndBU3XyWOx6UDq+2AipKA865i/RKIc+kbHv1i5Ko60+rYSI+/5PPMCQP3fP+g==} + tar-iterator@1.2.9: + resolution: {integrity: sha512-sHgC+mJjn5n4v1YDQsFyGUg8Up6byOWV8QjQh/ZOYSOVkmg5q9ivpTgIKJrQOUihivsh+4pQlY5gMmXyH4AyOg==} engines: {node: '>=0.8'} tar-stream-compat@2.1.5: @@ -892,8 +892,8 @@ packages: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} - temp-suffix@0.1.1: - resolution: {integrity: sha512-wcluXJ6A8HhyhEOOTXHPKV9TRTcL7vwmnfrWTZn7c7zrFp16trP1lfpsxaKN52pToFNByQ+y3zsJC8JlDAaKrg==} + temp-suffix@0.1.6: + resolution: {integrity: sha512-oxSvTMUHbFUEbCIQGJa221DvtpA1oNSlthyGjPJ/yiAum8JgE/Nu4jHh7osM7IKHPomRDCmxmYdTuX442EuZKg==} engines: {node: '>=0.8'} through2@2.0.5: @@ -957,8 +957,8 @@ packages: engines: {node: '>= 14'} hasBin: true - zip-iterator@1.2.1: - resolution: {integrity: sha512-56+76FbbgsQySl8wAh9W7SCaSyzFQK3xjL1+6tzai5ER+f7mSVpU9wKgPk+N9ZJ/5xTJqg5Z2rUe9d7SxrbgFQ==} + zip-iterator@1.2.7: + resolution: {integrity: sha512-hLYAZigng8q3AWJyNJgiUAokV/NXYBXgLeYt+PnkcXMES9syJwiLCBJ1qvoBEip97E5/H0T5OwpZcCrx91FE8A==} engines: {node: '>=0.8'} zip@1.2.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.9.5(glob@7.2.3)': + '@zen-browser/surfer@1.9.6(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 @@ -1045,7 +1045,7 @@ snapshots: cli-progress: 3.12.0 commander: 6.2.1 execa: 5.1.1 - fast-extract: 1.3.1(glob@7.2.3) + fast-extract: 1.3.10(glob@7.2.3) fs-extra: 10.1.0 ini: 3.0.1 is-apple-silicon: https://codeload.github.com/trickypr/is-apple-silicon/tar.gz/5f75501a1d7566ba9f94174b6825d7bd9d302b6a @@ -1085,7 +1085,7 @@ snapshots: asap@2.0.6: {} - async-compat@1.5.1: + async-compat@1.6.1: dependencies: is-error: 2.2.2 is-promise: 4.0.0 @@ -1153,7 +1153,7 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - call-once-fn@1.0.1: {} + call-once-fn@1.0.6: {} chalk@4.1.2: dependencies: @@ -1208,7 +1208,7 @@ snapshots: dependencies: safe-buffer: 5.2.1 - core-js-pure@3.39.0: {} + core-js-pure@3.40.0: {} core-util-is@1.0.3: {} @@ -1277,43 +1277,43 @@ snapshots: expand-template@2.0.3: {} - extract-base-iterator@1.2.1(glob@7.2.3): + extract-base-iterator@1.2.10(glob@7.2.3): dependencies: - fs-access-compat: 1.0.3 + fs-access-compat: 1.1.4 graceful-fs: 4.2.11 is-absolute: 1.0.0 lodash.compact: 3.0.1 mkdirp-classic: 0.5.3 object-assign: 4.1.1 - queue-cb: 1.4.4 + queue-cb: 1.4.10 rimraf2: 2.8.2(glob@7.2.3) - stack-base-iterator: 1.1.5 + stack-base-iterator: 1.1.11 transitivePeerDependencies: - glob - fast-extract@1.3.1(glob@7.2.3): + fast-extract@1.3.10(glob@7.2.3): dependencies: bl: 3.0.1 buffer-v6-polyfill: 1.0.5 - call-once-fn: 1.0.1 + call-once-fn: 1.0.6 content-disposition: 0.5.4 end-of-stream: 1.4.4 flush-write-stream: 2.0.0 lodash.throttle: 4.1.1 mkdirp-classic: 0.5.3 - mock-require-lazy: 1.0.1 + mock-require-lazy: 1.0.6 next-tick: 1.1.0 progress-stream: 2.0.0 pumpify: 2.0.1 - queue-cb: 1.4.4 + queue-cb: 1.4.10 readable-stream: 2.3.8 require_optional: 1.0.1 rimraf2: 2.8.2(glob@7.2.3) signal-exit: 3.0.7 - tar-iterator: 1.2.2(glob@7.2.3) - temp-suffix: 0.1.1 + tar-iterator: 1.2.9(glob@7.2.3) + temp-suffix: 0.1.6 unbzip2-stream: 1.4.3 - zip-iterator: 1.2.1(glob@7.2.3) + zip-iterator: 1.2.7(glob@7.2.3) transitivePeerDependencies: - glob @@ -1330,7 +1330,7 @@ snapshots: follow-redirects@1.15.9: {} - fs-access-compat@1.0.3: {} + fs-access-compat@1.1.4: {} fs-constants@1.0.0: {} @@ -1515,14 +1515,14 @@ snapshots: mkdirp-classic@0.5.3: {} - mock-require-lazy@1.0.1: + mock-require-lazy@1.0.6: dependencies: get-caller-file: 2.0.5 normalize-path: 3.0.0 modern-async@1.1.5: dependencies: - core-js-pure: 3.39.0 + core-js-pure: 3.40.0 nanoassert: 2.0.0 mount-dmg@1.0.1: @@ -1640,7 +1640,7 @@ snapshots: inherits: 2.0.4 pump: 3.0.2 - queue-cb@1.4.4: {} + queue-cb@1.4.10: {} rc@1.2.8: dependencies: @@ -1752,11 +1752,11 @@ snapshots: sprintf-js@1.0.3: {} - stack-base-iterator@1.1.5: + stack-base-iterator@1.1.11: dependencies: asap: 2.0.6 - async-compat: 1.5.1 - call-once-fn: 1.0.1 + async-compat: 1.6.1 + call-once-fn: 1.0.6 fifo: 2.4.1 stream-shift@1.0.3: {} @@ -1808,16 +1808,16 @@ snapshots: pump: 3.0.2 tar-stream: 2.2.0 - tar-iterator@1.2.2(glob@7.2.3): + tar-iterator@1.2.9(glob@7.2.3): dependencies: - call-once-fn: 1.0.1 + call-once-fn: 1.0.6 end-of-stream: 1.4.4 - extract-base-iterator: 1.2.1(glob@7.2.3) - fs-access-compat: 1.0.3 + extract-base-iterator: 1.2.10(glob@7.2.3) + fs-access-compat: 1.1.4 lifecycle: 1.0.4 lodash.compact: 3.0.1 mkdirp-classic: 0.5.3 - queue-cb: 1.4.4 + queue-cb: 1.4.10 rimraf2: 2.8.2(glob@7.2.3) tar-stream-compat: 2.1.5 transitivePeerDependencies: @@ -1840,7 +1840,7 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - temp-suffix@0.1.1: + temp-suffix@0.1.6: dependencies: imurmurhash: 0.1.4 @@ -1902,22 +1902,22 @@ snapshots: yaml@2.6.1: {} - zip-iterator@1.2.1(glob@7.2.3): + zip-iterator@1.2.7(glob@7.2.3): dependencies: buffer-v6-polyfill: 1.0.5 - call-once-fn: 1.0.1 + call-once-fn: 1.0.6 end-of-stream: 1.4.4 - extract-base-iterator: 1.2.1(glob@7.2.3) - fs-access-compat: 1.0.3 + extract-base-iterator: 1.2.10(glob@7.2.3) + fs-access-compat: 1.1.4 lifecycle: 1.0.4 lodash.compact: 3.0.1 mkdirp-classic: 0.5.3 os-shim: 0.1.3 - queue-cb: 1.4.4 + queue-cb: 1.4.10 readable-stream: 2.3.8 rimraf2: 2.8.2(glob@7.2.3) short-hash: 1.0.0 - temp-suffix: 0.1.1 + temp-suffix: 0.1.6 zip: 1.2.0 transitivePeerDependencies: - glob From b94e4dcff1a0798ae6fc56dd1124b7376699b836 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 16:26:30 +0100 Subject: [PATCH 088/134] Remove MOZ_OPTIMIZE settings and override LTO settings in mozconfig for Linux and Windows --- configs/common/mozconfig | 4 ---- configs/linux/mozconfig | 4 ++++ configs/windows/mozconfig | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configs/common/mozconfig b/configs/common/mozconfig index a5956b9dd..83f5f361a 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -70,10 +70,6 @@ if test "$ZEN_RELEASE"; then MOZILLA_OFFICIAL=1 export MOZILLA_OFFICIAL=1 - mk_add_options MOZ_OPTIMIZE=2 - MOZ_OPTIMIZE=2 - export MOZ_OPTIMIZE=2 - export OPT_LEVEL="3" ac_add_options OPT_LEVEL="3" diff --git a/configs/linux/mozconfig b/configs/linux/mozconfig index 024972c0c..11df2433d 100644 --- a/configs/linux/mozconfig +++ b/configs/linux/mozconfig @@ -25,6 +25,10 @@ elif test "$SURFER_COMPAT" = "aarch64"; then ac_add_options --enable-optimize="-O3" + # override LTO settings + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin + export CFLAGS="$CFLAGS -O3" export CPPFLAGS="$CPPFLAGS -O3" export CXXFLAGS="$CXXFLAGS -O3" diff --git a/configs/windows/mozconfig b/configs/windows/mozconfig index 136c530e7..cee2f9b26 100644 --- a/configs/windows/mozconfig +++ b/configs/windows/mozconfig @@ -42,6 +42,10 @@ elif test "$SURFER_COMPAT" = "aarch64"; then ac_add_options --enable-optimize="-O2 -mtune=cortex-a55 -march=armv8.2-a+simd" + # override LTO settings + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin + export CFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55" export CPPFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55" export CXXFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55" From a14220c12d1355266a17f5ab9fde09bce253813b Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:55:07 +0100 Subject: [PATCH 089/134] Update linux-release-build.yml Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- .github/workflows/linux-release-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 337abd447..b2474e41a 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,7 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-16x' || 'ubuntu-latest' }} + runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-16x' || 'self-hosted' }} strategy: fail-fast: false matrix: From c003a2594b6d7620d0c7b486f35362c20210f9de Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 17:20:40 +0100 Subject: [PATCH 090/134] Update build configurations for Linux and Windows to optimize architecture-specific settings --- .github/workflows/linux-release-build.yml | 3 ++- .github/workflows/windows-release-build.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index b2474e41a..61850526f 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -16,7 +16,8 @@ jobs: build-linux: permissions: contents: write - runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-16x' || 'self-hosted' }} + # aarch64 does not need full 16x + runs-on: ${{ (inputs.release-branch == 'release' && matrix.arch == 'x86_64') && 'warp-ubuntu-latest-x64-16x' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 4fbb1542f..89086ee9f 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -22,7 +22,8 @@ on: jobs: windows-build: name: Build Windows - ${{ matrix.arch }} - runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-16x' || 'ubuntu-latest' }} + # aarch64 does not need full 16x, and we also dont use full LTO when generating GPO + runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-gpo && matrix.arch == 'x86_64') && 'warp-ubuntu-latest-x64-16x' || 'ubuntu-latest' }} strategy: fail-fast: false From e9936865d976449d298b4821187a97506be3d2ce Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 17:54:50 +0100 Subject: [PATCH 091/134] Add ZEN_GA_DISABLE_PGO environment variable to disable PGO and update codesign script for verbose output --- .github/workflows/linux-release-build.yml | 1 + .github/workflows/macos-release-build.yml | 2 ++ build/codesign/codesign.bash | 2 +- configs/linux/mozconfig | 8 ++++++-- configs/macos/mozconfig | 8 ++++++-- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 61850526f..cc82e6e4e 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -135,6 +135,7 @@ jobs: - name: Package env: SURFER_COMPAT: ${{ matrix.arch }} + ZEN_GA_DISABLE_PGO: true run: | export SURFER_PLATFORM="linux" export ZEN_RELEASE=1 diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index 411f16e57..a07dd802e 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -134,6 +134,7 @@ jobs: - name: Package env: SURFER_COMPAT: ${{ matrix.arch }} + ZEN_GA_DISABLE_PGO: true run: | export SURFER_PLATFORM="darwin" export MACOS_APPLE_DEVELOPER_ID="${{ secrets.macOS_AppleDeveloperId }}" @@ -158,6 +159,7 @@ jobs: --apple-id "${{ secrets.macOS_AppleAccountId }}" \ --team-id "${{ secrets.macOS_AppleDeveloperIdTeamId }}" \ --password "${{ secrets.macOS_AppleDeveloperIdPassword }}" \ + --verbose \ --wait xcrun stapler staple "zen.macos-${{ matrix.arch }}.dmg" diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 79e3945e4..2fc6c5142 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -154,7 +154,7 @@ codesign -vvv --deep --strict "${BUNDLE}" cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile # Staple the ticket -xcrun stapler staple "${BUNDLE}" --verbose || exit 0 +xcrun stapler staple --verbose "${BUNDLE}" || exit 0 # Create a DMG if [ ! -z "${OUTPUT_DMG_FILE}" ]; then diff --git a/configs/linux/mozconfig b/configs/linux/mozconfig index 11df2433d..cdabe9862 100644 --- a/configs/linux/mozconfig +++ b/configs/linux/mozconfig @@ -12,8 +12,12 @@ if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --enable-eme=widevine # Enable Profile Guided Optimization - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi # Optimization flags for SURFER_COMPAT ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -Qvec -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf" diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 0adf87e96..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -7,8 +7,12 @@ export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" if test "$ZEN_RELEASE"; then - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi fi if test "$SURFER_COMPAT" = "x86_64"; then From 301490a3418b868d74421803699aae10a719f8fc Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 17:57:45 +0100 Subject: [PATCH 092/134] Add input parameter for release creation in twilight-release-schedule workflow --- .github/workflows/twilight-release-schedule.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/twilight-release-schedule.yml b/.github/workflows/twilight-release-schedule.yml index 110ec1147..bf2c3c7d2 100644 --- a/.github/workflows/twilight-release-schedule.yml +++ b/.github/workflows/twilight-release-schedule.yml @@ -4,6 +4,12 @@ on: schedule: - cron: '0 23 * * *' workflow_dispatch: + inputs: + create_release: + description: 'Whether to do a release' + required: false + type: boolean + default: true jobs: twilight-release-schedule: @@ -12,7 +18,7 @@ jobs: secrets: inherit uses: ./.github/workflows/build.yml with: - create_release: true + create_release: ${{ github.event_name != 'workflow_dispatch' && true || inputs.create_release }} update_branch: twilight update_version: false From 46c8d6d3e4eed3f896f1d6ee2b9312d6694d41e2 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 18:01:50 +0100 Subject: [PATCH 093/134] Update macOS build configuration and override LTO settings in mozconfig --- .github/workflows/macos-release-build.yml | 2 +- configs/macos/mozconfig | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index a07dd802e..80c7863e1 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -15,7 +15,7 @@ on: jobs: mac-build: name: Build macOS - ${{ matrix.arch }} - runs-on: ${{ inputs.release-branch == 'release' && 'warp-macos-14-arm64-8x' || 'macos-14' }} + runs-on: ${{ inputs.release-branch == 'release' && 'warp-macos-14-arm64-6x' || 'macos-14' }} strategy: fail-fast: false diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 7528354cf..2d36fe246 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,6 +6,10 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" +# override LTO settings, for now... +export MOZ_LTO=cross,thin +ac_add_options --enable-lto=cross,thin + if test "$ZEN_RELEASE"; then if test "$ZEN_GA_DISABLE_PGO"; then export ZEN_DUMMY=1 From 6c9fb9b3bbcf370036f79229279efbeafe9280a7 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 21:19:23 +0100 Subject: [PATCH 094/134] Refactor build configurations to standardize runner environments and update LTO settings in mozconfig --- .github/workflows/linux-release-build.yml | 2 +- .github/workflows/macos-release-build.yml | 2 +- .github/workflows/windows-profile-build.yml | 2 +- .github/workflows/windows-release-build.yml | 2 +- configs/common/mozconfig | 5 +++-- configs/macos/mozconfig | 4 ---- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index cc82e6e4e..8aeae6c55 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -17,7 +17,7 @@ jobs: permissions: contents: write # aarch64 does not need full 16x - runs-on: ${{ (inputs.release-branch == 'release' && matrix.arch == 'x86_64') && 'warp-ubuntu-latest-x64-16x' || 'ubuntu-latest' }} + runs-on: ${{ (inputs.release-branch == 'release' && matrix.arch == 'x86_64') && 'ubuntu-latest' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index 80c7863e1..8ee2d1eed 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -15,7 +15,7 @@ on: jobs: mac-build: name: Build macOS - ${{ matrix.arch }} - runs-on: ${{ inputs.release-branch == 'release' && 'warp-macos-14-arm64-6x' || 'macos-14' }} + runs-on: ${{ inputs.release-branch == 'release' && 'macos-14' || 'macos-14' }} strategy: fail-fast: false diff --git a/.github/workflows/windows-profile-build.yml b/.github/workflows/windows-profile-build.yml index d31f00031..97a18017c 100644 --- a/.github/workflows/windows-profile-build.yml +++ b/.github/workflows/windows-profile-build.yml @@ -25,7 +25,7 @@ jobs: matrix: arch: [x86_64, aarch64] - runs-on: ${{ inputs.release-branch == 'release' && 'warp-windows-latest-x64-8x' || 'windows-latest' }} + runs-on: ${{ inputs.release-branch == 'release' && 'windows-latest' || 'windows-latest' }} steps: - name: Checkout repository diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 89086ee9f..b7d00dcf7 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -23,7 +23,7 @@ jobs: windows-build: name: Build Windows - ${{ matrix.arch }} # aarch64 does not need full 16x, and we also dont use full LTO when generating GPO - runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-gpo && matrix.arch == 'x86_64') && 'warp-ubuntu-latest-x64-16x' || 'ubuntu-latest' }} + runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-gpo && matrix.arch == 'x86_64') && 'ubuntu-latest' || 'ubuntu-latest' }} strategy: fail-fast: false diff --git a/configs/common/mozconfig b/configs/common/mozconfig index 83f5f361a..4500516eb 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -56,8 +56,9 @@ if test "$ZEN_RELEASE"; then if ! test "$ZEN_DISABLE_LTO"; then # only enable full LTO when ZEN_RELEASE_BRANCH is 'release' if test "$ZEN_RELEASE_BRANCH" = "release"; then - export MOZ_LTO=cross,full - ac_add_options --enable-lto=cross,full + # TODO: make it "full" once we have the resources to build it + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin else export MOZ_LTO=cross,thin ac_add_options --enable-lto=cross,thin diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 2d36fe246..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,10 +6,6 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -# override LTO settings, for now... -export MOZ_LTO=cross,thin -ac_add_options --enable-lto=cross,thin - if test "$ZEN_RELEASE"; then if test "$ZEN_GA_DISABLE_PGO"; then export ZEN_DUMMY=1 From f55c5346599af61bdd863c68439b90abd3d12f90 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 21:30:44 +0100 Subject: [PATCH 095/134] Remove unnecessary entitlements and comment out provisioning profile copy in codesign script --- build/codesign/browser.developer.entitlements.xml | 10 ---------- build/codesign/codesign.bash | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index 98dc54ba4..90d8e7cc2 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -28,15 +28,5 @@ for native messaging webextension helper applications launched by Firefox which rely on Apple Events to signal other processes. --> com.apple.security.automation.apple-events - - - com.apple.security.smartcard - - - com.apple.application-identifier - H36NPCN86W.app.zen-browser.zen - - - com.apple.developer.web-browser.public-key-credential diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 2fc6c5142..1265139b5 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -151,7 +151,7 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ codesign -vvv --deep --strict "${BUNDLE}" # move Zen_Browser.provisionprofile to the Contents directory -cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile +# cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile # Staple the ticket xcrun stapler staple --verbose "${BUNDLE}" || exit 0 From 5ea8fd169c57fe586252e8ea570b375a5fca4b74 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 21:33:21 +0100 Subject: [PATCH 096/134] Add entitlements for SmartCardServices and WebAuthn support; update codesign script to copy provisioning profile --- build/codesign/browser.developer.entitlements.xml | 10 ++++++++++ build/codesign/codesign.bash | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index 90d8e7cc2..98dc54ba4 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -28,5 +28,15 @@ for native messaging webextension helper applications launched by Firefox which rely on Apple Events to signal other processes. --> com.apple.security.automation.apple-events + + + com.apple.security.smartcard + + + com.apple.application-identifier + H36NPCN86W.app.zen-browser.zen + + + com.apple.developer.web-browser.public-key-credential diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 1265139b5..2fc6c5142 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -151,7 +151,7 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ codesign -vvv --deep --strict "${BUNDLE}" # move Zen_Browser.provisionprofile to the Contents directory -# cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile +cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile # Staple the ticket xcrun stapler staple --verbose "${BUNDLE}" || exit 0 From 335fb757ab0caa8a6d11b6480132dbc825ebea91 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 22:39:46 +0100 Subject: [PATCH 097/134] Add distribution ID for Zen Browser in mozconfig --- configs/common/mozconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/common/mozconfig b/configs/common/mozconfig index 4500516eb..9d55df0dd 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -13,6 +13,8 @@ export MOZ_APP_DISPLAYNAME="${name}" export MOZ_BRANDING_DIRECTORY=${brandingDir} export MOZ_OFFICIAL_BRANDING_DIRECTORY=${brandingDir} +ac_add_options --with-distribution-id=app.zen-browser + # Uncomment if builds are too resource hungry # mk_add_options MOZ_MAKE_FLAGS="-j4" # ac_add_options --enable-linker=gold From 62f41722589a8546720a4200cffb027b55bd3cc9 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 23:21:11 +0100 Subject: [PATCH 098/134] Update CFBundleIdentifier in Info.plist for Zen Browser --- .../app/macbuild/Contents/Info-plist-in.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/browser/app/macbuild/Contents/Info-plist-in.patch diff --git a/src/browser/app/macbuild/Contents/Info-plist-in.patch b/src/browser/app/macbuild/Contents/Info-plist-in.patch new file mode 100644 index 000000000..d683c6419 --- /dev/null +++ b/src/browser/app/macbuild/Contents/Info-plist-in.patch @@ -0,0 +1,13 @@ +diff --git a/browser/app/macbuild/Contents/Info.plist.in b/browser/app/macbuild/Contents/Info.plist.in +index 73b400d58fd25ac13132f1a3fe3ea619e4f4e4f9..ee90ce7ac67bd9aa7bbc2a656843875afb985591 100644 +--- a/browser/app/macbuild/Contents/Info.plist.in ++++ b/browser/app/macbuild/Contents/Info.plist.in +@@ -191,7 +191,7 @@ + CFBundleIconFile + firefox.icns + CFBundleIdentifier +- @MOZ_MACBUNDLE_ID@ ++ app.zen-browser.zen + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName From 0e5107181caba2d9ffa5c946e7e141bc369a6665 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 23:21:32 +0100 Subject: [PATCH 099/134] Remove PGO configuration for Zen Browser in mozconfig --- configs/macos/mozconfig | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 7528354cf..27ccde12f 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,14 +6,7 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - if test "$ZEN_GA_DISABLE_PGO"; then - export ZEN_DUMMY=1 - else - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 - fi -fi + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 2309e1085fd068e1a8e96bfbbd6f6cb9bc57419b Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 23:21:42 +0100 Subject: [PATCH 100/134] Add conditional PGO configuration for Zen Browser in mozconfig --- configs/macos/mozconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 27ccde12f..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,7 +6,14 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" - +if test "$ZEN_RELEASE"; then + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi +fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From ec5b4abab992049043636090fe038b217823e86b Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 23:25:46 +0100 Subject: [PATCH 101/134] Remove conditional PGO configuration for Zen Browser in mozconfig --- configs/macos/mozconfig | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 7528354cf..27ccde12f 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,14 +6,7 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - if test "$ZEN_GA_DISABLE_PGO"; then - export ZEN_DUMMY=1 - else - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 - fi -fi + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 62e165b9ac7469487e3735dce43475ad74925ff8 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 23:26:03 +0100 Subject: [PATCH 102/134] Add conditional PGO configuration for Zen Browser in mozconfig --- configs/macos/mozconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 27ccde12f..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,7 +6,14 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" - +if test "$ZEN_RELEASE"; then + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi +fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 6d6f3751e3c869010a83c60551070df7379e2321 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Wed, 8 Jan 2025 23:52:19 +0100 Subject: [PATCH 103/134] Refactor PGO configuration in mozconfig and update MAC bundle identifier in old-configure.in --- configs/macos/mozconfig | 9 +-------- src/old-configure-in.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 src/old-configure-in.patch diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 7528354cf..27ccde12f 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,14 +6,7 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - if test "$ZEN_GA_DISABLE_PGO"; then - export ZEN_DUMMY=1 - else - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 - fi -fi + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin diff --git a/src/old-configure-in.patch b/src/old-configure-in.patch new file mode 100644 index 000000000..ef93907c4 --- /dev/null +++ b/src/old-configure-in.patch @@ -0,0 +1,13 @@ +diff --git a/old-configure.in b/old-configure.in +index 036734708f20d658248a8b5b3a6d8adc2530a878..4e1f0d96cd355cc1195b58548b29c1a5d6bedaa8 100644 +--- a/old-configure.in ++++ b/old-configure.in +@@ -89,7 +89,7 @@ dnl Mac bundle identifier (based on MOZ_APP_DISPLAYNAME) + if test -z "$MOZ_MACBUNDLE_ID"; then + MOZ_MACBUNDLE_ID=`echo $MOZ_APP_DISPLAYNAME | tr 'A-Z' 'a-z' | tr -dc 'a-z-'` + fi +-MOZ_MACBUNDLE_ID=${MOZ_DISTRIBUTION_ID}.${MOZ_MACBUNDLE_ID} ++MOZ_MACBUNDLE_ID=app.zen-browser.zen + if test "$MOZ_DEBUG"; then + MOZ_MACBUNDLE_ID=${MOZ_MACBUNDLE_ID}debug + fi From d294ebb872f811269b501b4f84721d533b744bee Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 00:09:18 +0100 Subject: [PATCH 104/134] Add conditional PGO configuration for Zen Browser in macos mozconfig --- configs/macos/mozconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 27ccde12f..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,7 +6,14 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" - +if test "$ZEN_RELEASE"; then + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi +fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 66c8d003d90874bd333fce69cc282ab24a42cd30 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Thu, 9 Jan 2025 08:30:10 +0100 Subject: [PATCH 105/134] Update codesign.bash Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- build/codesign/codesign.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 2fc6c5142..bba6ec2d5 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -111,6 +111,9 @@ echo "-------------------------------------------------------------------------" set -x +# move Zen_Browser.provisionprofile to the Contents directory +cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile + # Clear extended attributes which cause codesign to fail xattr -cr "${BUNDLE}" @@ -119,6 +122,7 @@ xattr -cr "${BUNDLE}" codesign --force -o runtime --verbose --sign "$IDENTITY" \ "${BUNDLE}/Contents/Library/LaunchServices/org.mozilla.updater" \ "${BUNDLE}/Contents/MacOS/XUL" \ +"${BUNDLE}"/Contents/embedded.provisionprofile \ "${BUNDLE}/Contents/MacOS/pingsender" \ "${BUNDLE}/Contents/MacOS/*.dylib" \ @@ -150,9 +154,6 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Validate codesign -vvv --deep --strict "${BUNDLE}" -# move Zen_Browser.provisionprofile to the Contents directory -cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile - # Staple the ticket xcrun stapler staple --verbose "${BUNDLE}" || exit 0 From c613abc5fc99d23a57695819d4632304834c5fe8 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:04:10 +0000 Subject: [PATCH 106/134] =?UTF-8?q?Actualizar=20configuraci=C3=B3n=20de=20?= =?UTF-8?q?compilaci=C3=B3n=20de=20macOS:=20eliminar=20PGO=20condicional?= =?UTF-8?q?=20y=20ajustar=20opciones=20de=20xcrun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/macos-release-build.yml | 3 ++- configs/macos/mozconfig | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index 8ee2d1eed..3ad6a35e3 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -159,7 +159,8 @@ jobs: --apple-id "${{ secrets.macOS_AppleAccountId }}" \ --team-id "${{ secrets.macOS_AppleDeveloperIdTeamId }}" \ --password "${{ secrets.macOS_AppleDeveloperIdPassword }}" \ - --verbose \ + --no-s3-acceleration \ + --verbose \ --wait xcrun stapler staple "zen.macos-${{ matrix.arch }}.dmg" diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 7528354cf..e2a70ac5d 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,14 +6,6 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - if test "$ZEN_GA_DISABLE_PGO"; then - export ZEN_DUMMY=1 - else - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 - fi -fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From a40a91c0a7b2b3ab76a2e506484bbf660573f880 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:04:39 +0000 Subject: [PATCH 107/134] Fixed macos PGO --- configs/macos/mozconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index e2a70ac5d..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,6 +6,14 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" +if test "$ZEN_RELEASE"; then + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi +fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From c41f4392ca277bd2d36cde34e1f572e1ba25b86c Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:06:39 +0000 Subject: [PATCH 108/134] Fixed macos licensing --- .github/workflows/macos-release-build.yml | 3 +++ build/codesign/codesign.bash | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index 3ad6a35e3..e3bb85823 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -135,6 +135,9 @@ jobs: env: SURFER_COMPAT: ${{ matrix.arch }} ZEN_GA_DISABLE_PGO: true + MACOS_APPLE_ACCOUNT_ID: ${{ secrets.macOS_AppleAccountId }} + MACOS_APPLE_DEVELOPER_ID_TEAM_ID: ${{ secrets.macOS_AppleDeveloperIdTeamId }} + MACOS_APPLE_DEVELOPER_ID_PASSWORD: ${{ secrets.macOS_AppleDeveloperIdPassword }} run: | export SURFER_PLATFORM="darwin" export MACOS_APPLE_DEVELOPER_ID="${{ secrets.macOS_AppleDeveloperId }}" diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index bba6ec2d5..25c078824 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -155,6 +155,14 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ codesign -vvv --deep --strict "${BUNDLE}" # Staple the ticket +xcrun notarytool submit "${BUNDLE}" \ + --apple-id "${MACOS_APPLE_ACCOUNT_ID}" \ + --team-id "${MACOS_APPLE_DEVELOPER_ID_TEAM_ID}" \ + --password "${MACOS_APPLE_DEVELOPER_ID_PASSWORD}" \ + --no-s3-acceleration \ + --verbose \ + --wait + xcrun stapler staple --verbose "${BUNDLE}" || exit 0 # Create a DMG From 88c0d896a5c44d7ad121ae349c526732b25fcbe2 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:35:15 +0000 Subject: [PATCH 109/134] Fixed file globs for macos --- build/codesign/codesign.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 25c078824..77eabf62f 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -31,6 +31,8 @@ # $ open ~/Nightly.app # +shopt -s globstar + usage () { echo "Usage: $0 " From 2b0c6c6f7347c8b79ccb76393e3313d9819eaa69 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 16:53:18 +0100 Subject: [PATCH 110/134] Update codesigning process and bump @zen-browser/surfer dependency to 1.9.7 --- build/codesign/codesign.bash | 7 +++++-- configs/macos/mozconfig | 9 --------- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 77eabf62f..7b68b9b04 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -125,8 +125,11 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" \ "${BUNDLE}/Contents/Library/LaunchServices/org.mozilla.updater" \ "${BUNDLE}/Contents/MacOS/XUL" \ "${BUNDLE}"/Contents/embedded.provisionprofile \ -"${BUNDLE}/Contents/MacOS/pingsender" \ -"${BUNDLE}/Contents/MacOS/*.dylib" \ +"${BUNDLE}/Contents/MacOS/pingsender" + +# Sign every ${BUNDLE}/Contents/MacOS/*.dylib +find "${BUNDLE}"/Contents/MacOS -type f -name "*.dylib" -exec \ +codesign --force -o runtime --verbose --sign "$IDENTITY" {} \; codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ "${BUNDLE}"/Contents/MacOS/updater.app diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 7528354cf..756678b2c 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,15 +6,6 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - if test "$ZEN_GA_DISABLE_PGO"; then - export ZEN_DUMMY=1 - else - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 - fi -fi - if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin diff --git a/package.json b/package.json index 4b54c05d6..449df1c02 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.6" + "@zen-browser/surfer": "^1.9.7" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d98b70ea..74a9e0991 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.9.6 - version: 1.9.6(glob@7.2.3) + specifier: ^1.9.7 + version: 1.9.7(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.9.6': - resolution: {integrity: sha512-UdtxmgQ+ft03cD8YMqRMwrXf3Lj1OUN1vWPcZxJYLnI41N2UXGlpiOg7U/q4pEC/YNRkJnywiqAaCRJ1n1J8ZQ==} + '@zen-browser/surfer@1.9.7': + resolution: {integrity: sha512-81A5nrdvB+BqpVHs/+AqtNwwQxeHqEdVpjEcLutKGw72vukGrqE+Iie3wPP2Zb8SeBHPGkAXGj2LyudeSBX+0g==} hasBin: true ansi-escapes@7.0.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.9.6(glob@7.2.3)': + '@zen-browser/surfer@1.9.7(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From eb330dc48435e07d7b3d9f1c91eb5e3118c63468 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 19:07:48 +0100 Subject: [PATCH 111/134] Add conditional PGO support for Zen release builds in macOS mozconfig --- .../codesign/browser.developer.entitlements.xml | 2 -- build/codesign/codesign.bash | 16 +--------------- configs/macos/mozconfig | 1 + 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index 98dc54ba4..f8f054ac5 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -36,7 +36,5 @@ com.apple.application-identifier H36NPCN86W.app.zen-browser.zen - - com.apple.developer.web-browser.public-key-credential diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 7b68b9b04..739150fc8 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -31,8 +31,6 @@ # $ open ~/Nightly.app # -shopt -s globstar - usage () { echo "Usage: $0 " @@ -114,7 +112,7 @@ echo "-------------------------------------------------------------------------" set -x # move Zen_Browser.provisionprofile to the Contents directory -cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile +#cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile # Clear extended attributes which cause codesign to fail xattr -cr "${BUNDLE}" @@ -124,7 +122,6 @@ xattr -cr "${BUNDLE}" codesign --force -o runtime --verbose --sign "$IDENTITY" \ "${BUNDLE}/Contents/Library/LaunchServices/org.mozilla.updater" \ "${BUNDLE}/Contents/MacOS/XUL" \ -"${BUNDLE}"/Contents/embedded.provisionprofile \ "${BUNDLE}/Contents/MacOS/pingsender" # Sign every ${BUNDLE}/Contents/MacOS/*.dylib @@ -159,17 +156,6 @@ codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ # Validate codesign -vvv --deep --strict "${BUNDLE}" -# Staple the ticket -xcrun notarytool submit "${BUNDLE}" \ - --apple-id "${MACOS_APPLE_ACCOUNT_ID}" \ - --team-id "${MACOS_APPLE_DEVELOPER_ID_TEAM_ID}" \ - --password "${MACOS_APPLE_DEVELOPER_ID_PASSWORD}" \ - --no-s3-acceleration \ - --verbose \ - --wait - -xcrun stapler staple --verbose "${BUNDLE}" || exit 0 - # Create a DMG if [ ! -z "${OUTPUT_DMG_FILE}" ]; then DISK_IMAGE_DIR=`mktemp -d` diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 756678b2c..e2a70ac5d 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,6 +6,7 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 81b1ee1bf6a6645693c9fc538a749830bfece3ef Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 19:13:14 +0100 Subject: [PATCH 112/134] Add PGO configuration for Zen release builds in macOS mozconfig --- configs/macos/mozconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index e2a70ac5d..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,6 +6,14 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" +if test "$ZEN_RELEASE"; then + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi +fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From be4e05f1e5566128bafe0a5ffc5cc0ce96acbdef Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 19:27:20 +0100 Subject: [PATCH 113/134] Add WebAuthn support and improve codesigning process for macOS --- build/codesign/browser.developer.entitlements.xml | 2 ++ build/codesign/codesign.bash | 6 +++++- configs/macos/mozconfig | 9 --------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index f8f054ac5..98dc54ba4 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -36,5 +36,7 @@ com.apple.application-identifier H36NPCN86W.app.zen-browser.zen + + com.apple.developer.web-browser.public-key-credential diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 739150fc8..74104451b 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -122,11 +122,15 @@ xattr -cr "${BUNDLE}" codesign --force -o runtime --verbose --sign "$IDENTITY" \ "${BUNDLE}/Contents/Library/LaunchServices/org.mozilla.updater" \ "${BUNDLE}/Contents/MacOS/XUL" \ +"${BUNDLE}"/Contents/embedded.provisionprofile \ "${BUNDLE}/Contents/MacOS/pingsender" # Sign every ${BUNDLE}/Contents/MacOS/*.dylib find "${BUNDLE}"/Contents/MacOS -type f -name "*.dylib" -exec \ -codesign --force -o runtime --verbose --sign "$IDENTITY" {} \; +codesign --force --verbose --sign "$IDENTITY" {} \; + +find "${BUNDLE}"/Contents/MacOS -type f -name "*.dylib" -exec \ +codesign -vvv --strict --deep --verbose {} \; codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \ "${BUNDLE}"/Contents/MacOS/updater.app diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 7528354cf..756678b2c 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,15 +6,6 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - if test "$ZEN_GA_DISABLE_PGO"; then - export ZEN_DUMMY=1 - else - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 - fi -fi - if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 2d3727670ccbd505b2f16e979bbb31f265719d1e Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 19:32:27 +0100 Subject: [PATCH 114/134] Add conditional PGO support for Zen release builds in macOS mozconfig --- configs/macos/mozconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 756678b2c..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,6 +6,15 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" +if test "$ZEN_RELEASE"; then + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi +fi + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From a679bcc6691a003904ce9c8d3d477b00bd048e4e Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 21:17:28 +0100 Subject: [PATCH 115/134] Refactor codesigning script and clean up PGO configuration in macOS mozconfig --- build/codesign/codesign.bash | 2 +- configs/macos/mozconfig | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 74104451b..1c22f4d58 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -112,7 +112,7 @@ echo "-------------------------------------------------------------------------" set -x # move Zen_Browser.provisionprofile to the Contents directory -#cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile +cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile # Clear extended attributes which cause codesign to fail xattr -cr "${BUNDLE}" diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 7528354cf..e2a70ac5d 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,14 +6,6 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" -if test "$ZEN_RELEASE"; then - if test "$ZEN_GA_DISABLE_PGO"; then - export ZEN_DUMMY=1 - else - export MOZ_PGO=1 - ac_add_options MOZ_PGO=1 - fi -fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From 87153390c81bd747a0dd2c5d08e19b70ee7226ae Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 21:18:05 +0100 Subject: [PATCH 116/134] Add conditional PGO support for Zen release builds in macOS mozconfig --- configs/macos/mozconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index e2a70ac5d..7528354cf 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -6,6 +6,14 @@ ac_add_options --enable-eme=widevine export MOZ_MACBUNDLE_ID=${appId} export MOZ_MACBUNDLE_NAME="Zen Browser.app" +if test "$ZEN_RELEASE"; then + if test "$ZEN_GA_DISABLE_PGO"; then + export ZEN_DUMMY=1 + else + export MOZ_PGO=1 + ac_add_options MOZ_PGO=1 + fi +fi if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin From a3c78e238746dcd7fec0550ec77ffc4447fdd30c Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 9 Jan 2025 21:18:53 +0100 Subject: [PATCH 117/134] Remove WebAuthn entitlement and comment out provisioning profile copy in codesign script --- build/codesign/browser.developer.entitlements.xml | 3 --- build/codesign/codesign.bash | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/build/codesign/browser.developer.entitlements.xml b/build/codesign/browser.developer.entitlements.xml index 98dc54ba4..7722dd8df 100644 --- a/build/codesign/browser.developer.entitlements.xml +++ b/build/codesign/browser.developer.entitlements.xml @@ -35,8 +35,5 @@ com.apple.application-identifier H36NPCN86W.app.zen-browser.zen - - - com.apple.developer.web-browser.public-key-credential diff --git a/build/codesign/codesign.bash b/build/codesign/codesign.bash index 1c22f4d58..74104451b 100644 --- a/build/codesign/codesign.bash +++ b/build/codesign/codesign.bash @@ -112,7 +112,7 @@ echo "-------------------------------------------------------------------------" set -x # move Zen_Browser.provisionprofile to the Contents directory -cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile +#cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile # Clear extended attributes which cause codesign to fail xattr -cr "${BUNDLE}" From 859ff6c0888566939f74e9c194b5d0bb3ad6adc6 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Fri, 10 Jan 2025 00:53:56 +0100 Subject: [PATCH 118/134] Update @zen-browser/surfer dependency to version 1.9.8 in package.json and pnpm-lock.yaml --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 449df1c02..2a79e5d32 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/zen-browser/core#readme", "dependencies": { - "@zen-browser/surfer": "^1.9.7" + "@zen-browser/surfer": "^1.9.8" }, "devDependencies": { "husky": "^9.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 74a9e0991..048b7a1e0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@zen-browser/surfer': - specifier: ^1.9.7 - version: 1.9.7(glob@7.2.3) + specifier: ^1.9.8 + version: 1.9.8(glob@7.2.3) devDependencies: husky: specifier: ^9.1.7 @@ -122,8 +122,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@zen-browser/surfer@1.9.7': - resolution: {integrity: sha512-81A5nrdvB+BqpVHs/+AqtNwwQxeHqEdVpjEcLutKGw72vukGrqE+Iie3wPP2Zb8SeBHPGkAXGj2LyudeSBX+0g==} + '@zen-browser/surfer@1.9.8': + resolution: {integrity: sha512-dx4ouPDB7bg+eWR+NNuhdroR0JyZ+bWlxpAFskl9TiR3cvr1qtmZG9bYSF27nLNOUSWgKNamjevP785B08Cxjg==} hasBin: true ansi-escapes@7.0.0: @@ -1036,7 +1036,7 @@ snapshots: '@types/node@17.0.45': {} - '@zen-browser/surfer@1.9.7(glob@7.2.3)': + '@zen-browser/surfer@1.9.8(glob@7.2.3)': dependencies: '@resvg/resvg-js': 1.4.0 async-icns: 1.0.2 From ed7735e3b8705838cbaabdec1325d7a8818d1b50 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:29:09 +0100 Subject: [PATCH 119/134] Update build.yml Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b26c95a4..adad0a404 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -386,7 +386,7 @@ jobs: if [ "${{ inputs.update_branch }}" = "twilight" ]; then sed -i -e 's/Name=Zen Browser/Name=Zen Twilight/g' AppDir/zen.desktop - sed -i -e 's/StartupWMClass=zen-release/StartupWMClass=zen-twilight/g' AppDir/zen.desktop + sed -i -e 's/StartupWMClass=zen/StartupWMClass=zen-twilight/g' AppDir/zen.desktop fi APPDIR=AppDir From 18f84476ef685279dab5620e4e565b227e97ece1 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mauro-balades@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:30:07 +0100 Subject: [PATCH 120/134] Update zen.desktop Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com> --- AppDir/zen.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppDir/zen.desktop b/AppDir/zen.desktop index e9279001f..948030426 100644 --- a/AppDir/zen.desktop +++ b/AppDir/zen.desktop @@ -5,7 +5,7 @@ Exec=zen %u Icon=zen Type=Application MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json; -StartupWMClass=zen-release +StartupWMClass=zen Categories=Network;WebBrowser; StartupNotify=true Terminal=false From a035b6f1c656e1aea4823886f9eb92baeed0cf47 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 14:24:55 +0100 Subject: [PATCH 121/134] Fixed urlbar being below the tabs visually (closes https://github.com/zen-browser/desktop/issues/4276) --- src/browser/base/content/zen-styles/zen-urlbar.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/browser/base/content/zen-styles/zen-urlbar.css b/src/browser/base/content/zen-styles/zen-urlbar.css index 170f06e5e..f6330a83d 100644 --- a/src/browser/base/content/zen-styles/zen-urlbar.css +++ b/src/browser/base/content/zen-styles/zen-urlbar.css @@ -360,6 +360,7 @@ button.popup-notification-dropmarker { } #urlbar[open] { + z-index: 2; --urlbar-margin-inline: 5px !important; & #identity-box { From a5d1537b75906527c91f001648a0ff4e63fcac55 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 14:31:29 +0100 Subject: [PATCH 122/134] Add TODO comment to handle user preferences for tab opening behavior --- src/browser/base/zen-components/ZenWorkspaces.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 572f205a5..cc1c0c765 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -425,6 +425,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { return null; } + // TODO: handle different actions depending on the user preference const shouldOpenNewTabIfLastUnpinnedTabIsClosed = this.shouldOpenNewTabIfLastUnpinnedTabIsClosed; let tabs = gBrowser.tabs.filter( From e01af2fe97bfff91cf4fd84bebdaf54e22f15e65 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 14:35:57 +0100 Subject: [PATCH 123/134] Fixed closing the last tab of a workspace not opening a new tab when `zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed` is set to true --- src/browser/base/zen-components/ZenWorkspaces.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index cc1c0c765..a7ebc8f96 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -430,7 +430,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { let tabs = gBrowser.tabs.filter( (t) => - t.getAttribute('zen-workspace-id') === workspaceID && + (t.getAttribute('zen-workspace-id') === workspaceID || t.hasAttribute("zen-essential")) && (!shouldOpenNewTabIfLastUnpinnedTabIsClosed || !t.pinned || t.getAttribute('pending') !== 'true') ); From 89811606279eb30a0482a00173f9f1b89e0fb781 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 14:49:28 +0100 Subject: [PATCH 124/134] Implement logic to close window when last tab is closed based on user preference --- .../base/zen-components/ZenWorkspaces.mjs | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index a7ebc8f96..0dfdf4fcb 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -415,6 +415,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { indicator.addEventListener('click', th); } + shouldCloseWindow() { + return !window.toolbar.visible || Services.prefs.getBoolPref('browser.tabs.closeWindowWithLastTab'); + } + handleTabBeforeClose(tab) { if (!this.workspaceEnabled || this.__contextIsDelete) { return null; @@ -425,16 +429,30 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { return null; } - // TODO: handle different actions depending on the user preference - const shouldOpenNewTabIfLastUnpinnedTabIsClosed = this.shouldOpenNewTabIfLastUnpinnedTabIsClosed; - let tabs = gBrowser.tabs.filter( (t) => - (t.getAttribute('zen-workspace-id') === workspaceID || t.hasAttribute("zen-essential")) && - (!shouldOpenNewTabIfLastUnpinnedTabIsClosed || !t.pinned || t.getAttribute('pending') !== 'true') + (t.getAttribute('zen-workspace-id') === workspaceID || t.hasAttribute('zen-essential')) && + (!this.shouldOpenNewTabIfLastUnpinnedTabIsClosed || !t.pinned || t.getAttribute('pending') !== 'true') ); + const shouldCloseWindow = this.shouldCloseWindow(); if (tabs.length === 1 && tabs[0] === tab) { + if (shouldCloseWindow) { + // We've already called beforeunload on all the relevant tabs if we get here, + // so avoid calling it again: + window.skipNextCanClose = true; + + // Closing the tab and replacing it with a blank one is notably slower + // than closing the window right away. If the caller opts in, take + // the fast path. + if (!gBrowser._removingTabs.size) { + // This call actually closes the window, unless the user + // cancels the operation. We are finished here in both cases. + gBrowser._windowIsClosing = window.closeWindow(true, window.warnAboutClosingWindow, 'close-last-tab'); + return null; + } + return null; + } let newTab = this._createNewTabForWorkspace({ uuid: workspaceID }); return newTab; } From 70cd0f90c786dc7d060c9248025887e21cdd35b3 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 16:10:55 +0100 Subject: [PATCH 125/134] Fixed weird margins on the browser view when having right sided tabs --- src/browser/base/content/zen-styles/zen-browser-ui.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/base/content/zen-styles/zen-browser-ui.css b/src/browser/base/content/zen-styles/zen-browser-ui.css index 3b03740e0..f669bef87 100644 --- a/src/browser/base/content/zen-styles/zen-browser-ui.css +++ b/src/browser/base/content/zen-styles/zen-browser-ui.css @@ -141,7 +141,7 @@ margin-right: 0; } - &:not([zen-no-padding='true']) #zen-tabbox-wrapper { + &:not([zen-no-padding='true'], [zen-right-side='true']) #zen-tabbox-wrapper { margin-left: 1px; } } From 8562cfb813423cc17ca28f03e79b1043bde65099 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 16:50:00 +0100 Subject: [PATCH 126/134] Refactor tab closing logic to handle new tab creation when closing the last unpinned tab and prevent reentrancy issues during window closure --- .../base/zen-components/ZenWorkspaces.mjs | 21 ++++++++++--------- .../tabbrowser/content/tabbrowser-js.patch | 12 +++++++++-- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 0dfdf4fcb..b217a2b60 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -429,11 +429,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { return null; } - let tabs = gBrowser.tabs.filter( - (t) => - (t.getAttribute('zen-workspace-id') === workspaceID || t.hasAttribute('zen-essential')) && - (!this.shouldOpenNewTabIfLastUnpinnedTabIsClosed || !t.pinned || t.getAttribute('pending') !== 'true') - ); + let tabs = gBrowser.visibleTabs; + let tabsPinned = tabs.filter((t) => !this.shouldOpenNewTabIfLastUnpinnedTabIsClosed || !t.pinned); const shouldCloseWindow = this.shouldCloseWindow(); if (tabs.length === 1 && tabs[0] === tab) { @@ -448,13 +445,17 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { if (!gBrowser._removingTabs.size) { // This call actually closes the window, unless the user // cancels the operation. We are finished here in both cases. - gBrowser._windowIsClosing = window.closeWindow(true, window.warnAboutClosingWindow, 'close-last-tab'); - return null; + this._isClosingWindow = true; + // Inside a setTimeout to avoid reentrancy issues. + setTimeout(() => { + document.getElementById('cmd_closeWindow').doCommand(); + }, 100); + return this._createNewTabForWorkspace({ uuid: workspaceID }); } return null; } - let newTab = this._createNewTabForWorkspace({ uuid: workspaceID }); - return newTab; + } else if (tabsPinned.length === 1 && tabsPinned[0] === tab) { + return this._createNewTabForWorkspace({ uuid: workspaceID }); } return null; @@ -1543,7 +1544,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { } async onLocationChange(browser) { - if (!this.workspaceEnabled || this._inChangingWorkspace) { + if (!this.workspaceEnabled || this._inChangingWorkspace || this._isClosingWindow) { return; } diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index 954adf14b..361106684 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index ce68c339f35416574b7bc7ebf8c93378f653242b..46d25e4381eaae71f3aec1025788684c593a60c7 100644 +index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b6878d4d394 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -409,11 +409,39 @@ @@ -237,7 +237,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..46d25e4381eaae71f3aec1025788684c if ( !this._beginRemoveTab(aTab, { closeWindowFastpath: true, -@@ -4556,7 +4657,7 @@ +@@ -4556,14 +4657,14 @@ !!this.tabsInCollapsedTabGroups.length; if ( aTab.visible && @@ -246,6 +246,14 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..46d25e4381eaae71f3aec1025788684c !anyRemainingTabsInCollapsedTabGroups ) { closeWindow = + closeWindowWithLastTab != null + ? closeWindowWithLastTab + : !window.toolbar.visible || +- Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab"); ++ Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") && !ZenWorkspaces._isClosingWindow; + + if (closeWindow) { + // We've already called beforeunload on all the relevant tabs if we get here, @@ -5411,10 +5512,10 @@ SessionStore.deleteCustomTabValue(aTab, "hiddenBy"); } From 097404b3d1e9a9960d416afdfed388486ff4f7d6 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 17:25:42 +0100 Subject: [PATCH 127/134] Refactor tab animation logic to improve workspace transitions and remove unused CSS animations --- .../content/zen-styles/zen-animations.css | 22 ------- .../zen-styles/zen-tabs/vertical-tabs.css | 17 ----- .../zen-components/ZenGradientGenerator.mjs | 2 +- .../base/zen-components/ZenWorkspaces.mjs | 66 +++++++++++++++---- 4 files changed, 53 insertions(+), 54 deletions(-) diff --git a/src/browser/base/content/zen-styles/zen-animations.css b/src/browser/base/content/zen-styles/zen-animations.css index 05341ea00..09b31494c 100644 --- a/src/browser/base/content/zen-styles/zen-animations.css +++ b/src/browser/base/content/zen-styles/zen-animations.css @@ -100,28 +100,6 @@ } } -@keyframes zen-slide-in { - from { - transform: translateX(-150%); - opacity: 0; - } - to { - transform: translateX(0); - opacity: 1; - } -} - -@keyframes zen-slide-in-reverse { - from { - transform: translateX(150%); - opacity: 0; - } - to { - transform: translateX(0); - opacity: 1; - } -} - @keyframes zen-deck-fadeIn { 0% { transform: scale(0.9); diff --git a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css index 3842d0db9..10cabe683 100644 --- a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css +++ b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css @@ -242,23 +242,6 @@ & .tabbrowser-tab { transition: scale 0.07s ease; #tabbrowser-tabs &:not([zen-essential='true']) { - #tabbrowser-tabs[zen-workspace-animation='previous'] & { - animation: zen-slide-in; - } - - #tabbrowser-tabs[zen-workspace-animation='next'] & { - animation: zen-slide-in-reverse; - } - - #tabbrowser-tabs[zen-workspace-animation] & { - opacity: 0; - transform: translateX(-100%); - animation-delay: 0.2s; - animation-fill-mode: forwards; - animation-duration: 0.2s; - animation-timing-function: ease; - } - #tabbrowser-tabs[dont-animate-tabs] & { opacity: 0; } diff --git a/src/browser/base/zen-components/ZenGradientGenerator.mjs b/src/browser/base/zen-components/ZenGradientGenerator.mjs index 15b22e43b..24b1c53d0 100644 --- a/src/browser/base/zen-components/ZenGradientGenerator.mjs +++ b/src/browser/base/zen-components/ZenGradientGenerator.mjs @@ -658,7 +658,7 @@ setTimeout(() => { // Reactivate the transition after the animation appWrapper.removeAttribute('post-animating'); - }); + }, 100); }, 700); }); } diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index b217a2b60..6540a7b19 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -1292,6 +1292,19 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { // Refresh tab cache this.tabContainer._invalidateCachedTabs(); + let animationDirection; + if (previousWorkspace && !onInit && !this._animatingChange) { + animationDirection = ( + workspaces.workspaces.findIndex((w) => w.uuid === previousWorkspace.uuid) < + workspaces.workspaces.findIndex((w) => w.uuid === window.uuid) + ) ? 'right' : 'left'; + } + if (animationDirection) { + // Animate tabs out of view before changing workspace, therefor we + // need to animate in the opposite direction + await this._animateTabs(animationDirection === 'left' ? 'right' : 'left', true); + } + // First pass: Handle tab visibility and workspace ID assignment const visibleTabs = this._processTabVisibility(window.uuid, containerId, workspaces); @@ -1301,23 +1314,48 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { // Update UI and state await this._updateWorkspaceState(window, onInit); - // Animate acordingly - if (previousWorkspace && !this._animatingChange) { - // we want to know if we are moving forward or backward in sense of animation - let isNextWorkspace = - onInit || - workspaces.workspaces.findIndex((w) => w.uuid === previousWorkspace.uuid) < - workspaces.workspaces.findIndex((w) => w.uuid === window.uuid); - gBrowser.tabContainer.setAttribute('zen-workspace-animation', isNextWorkspace ? 'next' : 'previous'); - this.tabContainer.removeAttribute('dont-animate-tabs'); - this._animatingChange = true; - setTimeout(() => { - this._animatingChange = false; - gBrowser.tabContainer.removeAttribute('zen-workspace-animation'); - }, 600); + if (animationDirection) { + await this._animateTabs(animationDirection); } } + async _animateTabs(direction, out = false) { + const tabs = gBrowser.visibleTabs.filter((tab) => !tab.hasAttribute('zen-essential')); + return new Promise((resolve) => { + let count = 0; + const onAnimationEnd = () => { + count++; + if (count >= tabs.length) { + resolve(); + } + }; + this.tabContainer.removeAttribute('dont-animate-tabs'); + if (out) { + for (let tab of tabs) { + tab.animate([ + { transform: 'translateX(0)' }, + { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, + ], { + duration: 150, + easing: 'ease', + fill: 'both', + }).onfinish = onAnimationEnd; + } + return; + } + for (let tab of tabs) { + tab.animate([ + { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, + { transform: 'translateX(0)' }, + ], { + duration: 150, + easing: 'ease', + fill: 'both', + }).onfinish = onAnimationEnd; + } + }); + } + _processTabVisibility(workspaceUuid, containerId, workspaces) { const visibleTabs = new Set(); const lastSelectedTab = this._lastSelectedWorkspaceTabs[workspaceUuid]; From 1f43997088451241fa44c6b66d13f40ce2f3aec8 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 17:35:50 +0100 Subject: [PATCH 128/134] Workspace switching animations are now context aware --- .../base/zen-components/ZenWorkspaces.mjs | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 6540a7b19..70e076f0c 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -391,7 +391,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { activeWorkspace = workspaces.workspaces[0]; this.activeWorkspace = activeWorkspace?.uuid; } - await this.changeWorkspace(activeWorkspace, true); + await this.changeWorkspace(activeWorkspace, { onInit: true }); } try { if (activeWorkspace) { @@ -1267,7 +1267,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { this._changeListeners.push(func); } - async changeWorkspace(window, onInit = false) { + async changeWorkspace(window, ...args) { if (!this.workspaceEnabled || this._inChangingWorkspace) { return; } @@ -1275,14 +1275,14 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { await SessionStore.promiseInitialized; this._inChangingWorkspace = true; try { - await this._performWorkspaceChange(window, onInit); + await this._performWorkspaceChange(window, ...args); } finally { this._inChangingWorkspace = false; this.tabContainer.removeAttribute('dont-animate-tabs'); } } - async _performWorkspaceChange(window, onInit) { + async _performWorkspaceChange(window, { onInit = false, explicitAnimationDirection = undefined } = {}) { const previousWorkspace = await this.getActiveWorkspace(); this.activeWorkspace = window.uuid; @@ -1294,10 +1294,12 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { let animationDirection; if (previousWorkspace && !onInit && !this._animatingChange) { - animationDirection = ( - workspaces.workspaces.findIndex((w) => w.uuid === previousWorkspace.uuid) < + animationDirection = + explicitAnimationDirection ?? + (workspaces.workspaces.findIndex((w) => w.uuid === previousWorkspace.uuid) < workspaces.workspaces.findIndex((w) => w.uuid === window.uuid) - ) ? 'right' : 'left'; + ? 'right' + : 'left'); } if (animationDirection) { // Animate tabs out of view before changing workspace, therefor we @@ -1332,10 +1334,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { this.tabContainer.removeAttribute('dont-animate-tabs'); if (out) { for (let tab of tabs) { - tab.animate([ - { transform: 'translateX(0)' }, - { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, - ], { + tab.animate([{ transform: 'translateX(0)' }, { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }], { duration: 150, easing: 'ease', fill: 'both', @@ -1344,10 +1343,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { return; } for (let tab of tabs) { - tab.animate([ - { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, - { transform: 'translateX(0)' }, - ], { + tab.animate([{ transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, { transform: 'translateX(0)' }], { duration: 150, easing: 'ease', fill: 'both', @@ -1721,7 +1717,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { } let nextWorkspace = workspaces.workspaces[targetIndex]; - await this.changeWorkspace(nextWorkspace); + await this.changeWorkspace(nextWorkspace, { explicitAnimationDirection: offset > 0 ? 'right' : 'left' }); } _initializeWorkspaceTabContextMenus() { From 50a48cdf241eece8a17e39d79b5659259fc005ed Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 17:48:06 +0100 Subject: [PATCH 129/134] Add conditional check for branch verification in build workflow --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index adad0a404..a16ec8328 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,6 +65,7 @@ jobs: token: ${{ secrets.DEPLOY_KEY }} - name: Check if correct branch + if: ${{ inputs.create_release }} run: | echo "Checking if we are on the correct branch" git branch From 1710ebae195c27bfab73d853fd86f0553adab426 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 21:33:06 +0100 Subject: [PATCH 130/134] Add motion animation support and refine UI transitions for workspace interactions --- src/browser/base/content/ZenUIManager.mjs | 4 +++ .../base/content/zen-assets.jar.inc.mn | 1 + .../content/zen-styles/zen-animations.css | 32 ------------------- .../base/content/zen-styles/zen-glance.css | 4 +-- .../base/content/zen-styles/zen-theme.css | 2 +- .../base/content/zen-vendor/motion.min.mjs | 7 ++++ .../base/zen-components/ZenGlanceManager.mjs | 26 +++++++++++---- .../base/zen-components/ZenWorkspaces.mjs | 4 +-- 8 files changed, 36 insertions(+), 44 deletions(-) create mode 100644 src/browser/base/content/zen-vendor/motion.min.mjs diff --git a/src/browser/base/content/ZenUIManager.mjs b/src/browser/base/content/ZenUIManager.mjs index 6e3fbd5d3..c0bbd8957 100644 --- a/src/browser/base/content/ZenUIManager.mjs +++ b/src/browser/base/content/ZenUIManager.mjs @@ -8,6 +8,10 @@ var gZenUIManager = { XPCOMUtils.defineLazyPreferenceGetter(this, 'sidebarHeightThrottle', 'zen.view.sidebar-height-throttle', 500); XPCOMUtils.defineLazyPreferenceGetter(this, 'contentElementSeparation', 'zen.theme.content-element-separation', 0); + ChromeUtils.defineLazyGetter(this, 'motion', () => { + return ChromeUtils.importESModule('chrome://browser/content/zen-vendor/motion.min.mjs', { global: "current" }); + }); + new ResizeObserver(gZenCommonActions.throttle(this.updateTabsToolbar.bind(this), this.sidebarHeightThrottle)).observe( document.getElementById('tabbrowser-tabs') ); diff --git a/src/browser/base/content/zen-assets.jar.inc.mn b/src/browser/base/content/zen-assets.jar.inc.mn index 1db5d1874..11ae40418 100644 --- a/src/browser/base/content/zen-assets.jar.inc.mn +++ b/src/browser/base/content/zen-assets.jar.inc.mn @@ -75,3 +75,4 @@ # JS Vendor content/browser/zen-vendor/tsparticles.confetti.bundle.min.js (content/zen-vendor/tsparticles.confetti.bundle.min.js) + content/browser/zen-vendor/motion.min.mjs (content/zen-vendor/motion.min.mjs) diff --git a/src/browser/base/content/zen-styles/zen-animations.css b/src/browser/base/content/zen-styles/zen-animations.css index 09b31494c..78fa7cfe1 100644 --- a/src/browser/base/content/zen-styles/zen-animations.css +++ b/src/browser/base/content/zen-styles/zen-animations.css @@ -252,38 +252,6 @@ } } -@keyframes zen-glance-content-animation { - /* make the box appear from initial width/height and x/y coordinates */ - 0% { - opacity: 0; - top: 50%; - left: 50%; - transform: translate(-50%, -50%) translateZ(0); - width: 0%; - height: 0%; - } - - 80% { - /* make the box grow to full width/height */ - opacity: 1; - transform: translate(-50%, -50%) translateZ(0); - top: 50%; - left: 50%; - width: 87%; - height: 102%; - } - - 100% { - /* make the box shrink to final width/height and x/y coordinates */ - transform: translate(-50%, -50%) translateZ(0); - opacity: 1; - width: 85%; - height: 100%; - top: 50%; - left: 50%; - } -} - @keyframes zen-glance-content-animation-out { 0% { /* make the box shrink to final width/height and x/y coordinates */ diff --git a/src/browser/base/content/zen-styles/zen-glance.css b/src/browser/base/content/zen-styles/zen-glance.css index 03396a3a7..ce2e4e2f0 100644 --- a/src/browser/base/content/zen-styles/zen-glance.css +++ b/src/browser/base/content/zen-styles/zen-glance.css @@ -105,7 +105,6 @@ height: 100%; opacity: 1; transition: opacity 0.2s ease-in-out; - transition-delay: 0.1s; } &[animate-full='true'] { @@ -118,7 +117,8 @@ } &[animate='true'] { - animation: zen-glance-content-animation 0.4s ease-in-out forwards; + position: absolute; + transform: translate(-50%, -50%); &:not([animate-end='true']) { pointer-events: none; diff --git a/src/browser/base/content/zen-styles/zen-theme.css b/src/browser/base/content/zen-styles/zen-theme.css index e311ca693..ca1bcc4e3 100644 --- a/src/browser/base/content/zen-styles/zen-theme.css +++ b/src/browser/base/content/zen-styles/zen-theme.css @@ -103,7 +103,7 @@ --zen-button-border-radius: 5px; --zen-button-padding: 0.6rem 1.2rem; - --zen-toolbar-element-bg: light-dark(rgba(255, 255, 255, 0.4), rgba(170, 170, 170, 0.2)); + --zen-toolbar-element-bg: light-dark(rgba(255, 255, 255, 0.65), rgba(170, 170, 170, 0.2)); /* Toolbar */ --zen-toolbar-height: 38px; diff --git a/src/browser/base/content/zen-vendor/motion.min.mjs b/src/browser/base/content/zen-vendor/motion.min.mjs new file mode 100644 index 000000000..915552945 --- /dev/null +++ b/src/browser/base/content/zen-vendor/motion.min.mjs @@ -0,0 +1,7 @@ +/** + * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.37.0. + * Original file: /npm/motion@11.17.0/dist/es/motion/lib/index.mjs + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +const t=!1;function e(){return t}const n=t=>t;let s=n;const i=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const o=r((()=>void 0!==window.ScrollTimeline));class a{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>"finished"in t?t.finished:t)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;no()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;ee[t]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class l extends a{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}const u=t=>1e3*t,c=t=>t/1e3,h=2e4;function d(t){let e=0;let n=t.next(e);for(;!n.done&&e=h?1/0:e}const p=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;en>e?e:n{const s=e*o,i=s*t,r=s-n,a=R(e,o),l=Math.exp(-i);return C-r/a*l},r=e=>{const s=e*o*t,r=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=R(Math.pow(e,2),o);return(-i(e)+C>0?-1:1)*((r-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;nvoid 0!==t[e]))}function L(t=S,e=T){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:m,mass:x,duration:M,velocity:P,isResolvedFromDuration:k}=function(t){let e={velocity:b,stiffness:y,damping:v,mass:w,isResolvedFromDuration:!1,...t};if(!D(t,I)&&D(t,B))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),i=s*s,r=2*f(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:w,stiffness:i,damping:r}}else{const n=E(t);e={...e,...n,mass:w},e.isResolvedFromDuration=!0}return e}({...n,velocity:-c(n.velocity||0)}),F=P||0,C=m/(2*Math.sqrt(l*x)),O=o-r,L=c(Math.sqrt(l/x)),W=Math.abs(O)<5;let N;if(s||(s=W?A.granular:A.default),i||(i=W?V.granular:V.default),C<1){const t=R(L,C);N=e=>{const n=Math.exp(-C*L*e);return o-n*((F+C*L*O)/t*Math.sin(t*e)+O*Math.cos(t*e))}}else if(1===C)N=t=>o-Math.exp(-L*t)*(O+(F+L*O)*t);else{const t=L*Math.sqrt(C*C-1);N=e=>{const n=Math.exp(-C*L*e),s=Math.min(t*e,300);return o-n*((F+C*L*O)*Math.sinh(s)+t*O*Math.cosh(s))/t}}const K={calculatedDuration:k&&M||null,next:t=>{const e=N(t);if(k)a.done=t>=M;else{let n=0;C<1&&(n=0===t?u(F):g(N,t,e));const r=Math.abs(n)<=s,l=Math.abs(o-e)<=i;a.done=r&&l}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(d(K),h),e=p((e=>K.next(t*e).value),t,30);return t+"ms "+e}};return K}function W(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(d(s),h);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:c(i)}}function N(t){return"function"==typeof t}const K=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},$=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return $(t)?t[K(0,t.length,e)]:t}const z=(t,e,n)=>t+(e-t)*n;function H(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=i(0,e,s);t.push(z(n,1,r))}}function U(t){const e=[0];return H(e,t.length-1),e}const Y=t=>Boolean(t&&t.getVelocity);function q(t,e,n){var s;if(t instanceof Element)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function X(t){return"object"==typeof t&&!Array.isArray(t)}function G(t,e,n,s){return"string"==typeof t&&X(e)?q(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Z(t,e,n){return t*(e+1)}function _(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}function J(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Q(t,e,n,s,i,r){!function(t,e,n){for(let s=0;se&&i.at"number"==typeof t,at=t=>t.every(ot),lt=new WeakMap;function ut(t,e){return t?t[e]||t.default||t:void 0}const ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ht=new Set(ct),dt=new Set(["width","height","top","left","right","bottom",...ct]),pt=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t,ft=!1;const mt=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:gt,cancel:yt,state:vt,steps:wt}=function(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=mt.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){r.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,i=!1,o=!1)=>{const a=o&&s?e:n;return i&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{o=t,s?i=!0:(s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(t)))}};return l}(r),t)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:mt.reduce(((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(p)),a.schedule(e,r,o)),e}),{}),cancel:t=>{for(let e=0;e(void 0===bt&&Tt.set(vt.isProcessing||ft?vt.timestamp:performance.now()),bt),set:t=>{bt=t,queueMicrotask(xt)}};class St{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>J(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i{const n=Tt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Tt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new St);const n=this.events[t].add(e);return"change"===t?()=>{n(),gt.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Tt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return m(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new At(t,e)}function Mt(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function Pt(t,e,n,s){if("function"==typeof e){const[i,r]=Mt(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Mt(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function kt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function Ft(t,e){const n=function(t,e,n){const s=t.getProps();return Pt(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){kt(t,e,pt(r[e]))}}function Ct(t,e){const n=t.getValue("willChange");if(s=n,Boolean(Y(s)&&s.add))return n.add(e);var s}const Et=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ot="data-"+Et("framerAppearId");function Rt(t){return t.props[Ot]}function Bt(t,e){t.timeline=e,t.onfinish=null}const It=t=>Array.isArray(t)&&"number"==typeof t[0],Dt={linearEasing:void 0};function Lt(t,e){const n=r(t);return()=>{var t;return null!==(t=Dt[e])&&void 0!==t?t:n()}}const Wt=Lt((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing");function Nt(t){return Boolean("function"==typeof t&&Wt()||!t||"string"==typeof t&&(t in $t||Wt())||It(t)||Array.isArray(t)&&t.every(Nt))}const Kt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,$t={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kt([0,.65,.55,1]),circOut:Kt([.55,0,1,.45]),backIn:Kt([.31,.01,.66,-.59]),backOut:Kt([.33,1.53,.69,.99])};function jt(t,e){return t?"function"==typeof t&&Wt()?p(t,e):It(t)?Kt(t):Array.isArray(t)?t.map((t=>jt(t,e)||$t.easeOut)):$t[t]:void 0}const zt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Ht(t,e,s,i){if(t===e&&s===i)return n;const r=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=zt(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:zt(r(t),e,i)}const Ut=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Yt=t=>e=>1-t(1-e),qt=Ht(.33,1.53,.69,.99),Xt=Yt(qt),Gt=Ut(Xt),Zt=t=>(t*=2)<1?.5*Xt(t):.5*(2-Math.pow(2,-10*(t-1))),_t=t=>1-Math.sin(Math.acos(t)),Jt=Yt(_t),Qt=Ut(_t),te=t=>/^0[^.\s]+$/u.test(t);const ee={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ne={...ee,transform:t=>f(0,1,t)},se={...ee,default:1},ie=t=>Math.round(1e5*t)/1e5,re=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const oe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ae=(t,e)=>n=>Boolean("string"==typeof n&&oe.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),le=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(re);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ue={...ee,transform:t=>Math.round((t=>f(0,255,t))(t))},ce={test:ae("rgb","red"),parse:le("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ue.transform(t)+", "+ue.transform(e)+", "+ue.transform(n)+", "+ie(ne.transform(s))+")"};const he={test:ae("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:ce.transform},de=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pe=de("deg"),fe=de("%"),me=de("px"),ge=de("vh"),ye=de("vw"),ve={...fe,parse:t=>fe.parse(t)/100,transform:t=>fe.transform(100*t)},we={test:ae("hsl","hue"),parse:le("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+fe.transform(ie(e))+", "+fe.transform(ie(n))+", "+ie(ne.transform(s))+")"},be={test:t=>ce.test(t)||he.test(t)||we.test(t),parse:t=>ce.test(t)?ce.parse(t):we.test(t)?we.parse(t):he.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ce.transform(t):we.transform(t)},xe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Te="number",Se="color",Ae=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ve(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Ae,(t=>(be.test(t)?(s.color.push(r),i.push(Se),n.push(be.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push(Te),n.push(parseFloat(t))),++r,"${}"))).split("${}");return{values:n,split:o,indexes:s,types:i}}function Me(t){return Ve(t).values}function Pe(t){const{split:e,types:n}=Ve(t),s=e.length;return t=>{let i="";for(let r=0;r"number"==typeof t?0:t;const Fe={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(re))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(xe))||void 0===n?void 0:n.length)||0)>0},parse:Me,createTransformer:Pe,getAnimatableNone:function(t){const e=Me(t);return Pe(t)(e.map(ke))}},Ce=new Set(["brightness","contrast","saturate","opacity"]);function Ee(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(re)||[];if(!s)return t;const i=n.replace(s,"");let r=Ce.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Oe=/\b([a-z-]*)\(.*?\)/gu,Re={...Fe,getAnimatableNone:t=>{const e=t.match(Oe);return e?e.map(Ee).join(" "):t}},Be={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,radius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,backgroundPositionX:me,backgroundPositionY:me},Ie={rotate:pe,rotateX:pe,rotateY:pe,rotateZ:pe,scale:se,scaleX:se,scaleY:se,scaleZ:se,skew:pe,skewX:pe,skewY:pe,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:ne,originX:ve,originY:ve,originZ:me},De={...ee,transform:Math.round},Le={...Be,...Ie,zIndex:De,size:me,fillOpacity:ne,strokeOpacity:ne,numOctaves:De},We={...Le,color:be,backgroundColor:be,outlineColor:be,fill:be,stroke:be,borderColor:be,borderTopColor:be,borderRightColor:be,borderBottomColor:be,borderLeftColor:be,filter:Re,WebkitFilter:Re},Ne=t=>We[t];function Ke(t,e){let n=Ne(t);return n!==Re&&(n=Fe),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const $e=new Set(["auto","none","0"]);const je=t=>t===ee||t===me,ze=(t,e)=>parseFloat(t.split(", ")[e]),He=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return ze(i[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?ze(e[1],t):0}},Ue=new Set(["x","y","z"]),Ye=ct.filter((t=>!Ue.has(t)));const qe={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:He(4,13),y:He(5,14)};qe.translateX=qe.x,qe.translateY=qe.y;const Xe=new Set;let Ge=!1,Ze=!1;function _e(){if(Ze){const t=Array.from(Xe).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Ye.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Ze=!1,Ge=!1,Xe.forEach((t=>t.complete())),Xe.clear()}function Je(){Xe.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Ze=!0)}))}class Qe{constructor(t,e,n,s,i,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Xe.add(this),Ge||(Ge=!0,gt.read(Je),gt.resolveKeyframes(_e))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),en=t=>e=>"string"==typeof e&&e.startsWith(t),nn=en("--"),sn=en("var(--"),rn=t=>!!sn(t)&&on.test(t.split("/*")[0].trim()),on=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,an=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ln(t,e,n=1){const[s,i]=function(t){const e=an.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${null!=n?n:s}`,i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return tn(t)?parseFloat(t):t}return rn(i)?ln(i,e,n+1):i}const un=t=>e=>e.test(t),cn=[ee,me,fe,pe,ye,ge,{test:t=>"auto"===t,parse:t=>t}],hn=t=>cn.find(un(t));class dn extends Qe{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}const pn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Fe.test(t)&&"0"!==t||t.startsWith("url(")));function fn(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=pn(i,e),a=pn(r,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;nnull!==t;function gn(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(mn),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}class yn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Tt.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Je(),_e()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Tt.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!fn(t,n,s,i)){if(!r)return null==a||a(gn(t,this.options,e)),null==o||o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function vn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function wn(t,e){return n=>n>0?e:t}const bn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},xn=[he,ce,we];function Tn(t){const e=(n=t,xn.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===we&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=vn(a,s,t+1/3),r=vn(a,s,t),o=vn(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}(s)),s}const Sn=(t,e)=>{const n=Tn(t),s=Tn(e);if(!n||!s)return wn(t,e);const i={...n};return t=>(i.red=bn(n.red,s.red,t),i.green=bn(n.green,s.green,t),i.blue=bn(n.blue,s.blue,t),i.alpha=z(n.alpha,s.alpha,t),ce.transform(i))},An=(t,e)=>n=>e(t(n)),Vn=(...t)=>t.reduce(An),Mn=new Set(["none","hidden"]);function Pn(t,e){return n=>z(t,e,n)}function kn(t){return"number"==typeof t?Pn:"string"==typeof t?rn(t)?wn:be.test(t)?Sn:En:Array.isArray(t)?Fn:"object"==typeof t?be.test(t)?Sn:Cn:wn}function Fn(t,e){const n=[...t],s=n.length,i=t.map(((t,n)=>kn(t)(t,e[n])));return t=>{for(let e=0;e{for(const e in s)n[e]=s[e](t);return n}}const En=(t,e)=>{const n=Fe.createTransformer(e),s=Ve(t),i=Ve(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Mn.has(t)&&!i.values.length||Mn.has(e)&&!s.values.length?function(t,e){return Mn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Vn(Fn(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;rvoid 0===a?l:void 0===l||Math.abs(a-t)-f*Math.exp(-t/s),w=t=>y+v(t),b=t=>{const e=v(t),n=w(t);d.done=Math.abs(e)<=u,d.value=d.done?y:n};let x,T;const S=t=>{var e;(e=d.value,void 0!==a&&el)&&(x=t,T=L({keyframes:[d.value,p(d.value)],velocity:g(w,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==x||(e=!0,b(t),S(t)),void 0!==x&&t>=x?T.next(t-x):(!e&&b(t),d)}}}const Bn=Ht(.42,0,1,1),In=Ht(0,0,.58,1),Dn=Ht(.42,0,.58,1),Ln={linear:n,easeIn:Bn,easeInOut:Dn,easeOut:In,circIn:_t,circInOut:Qt,circOut:Jt,backIn:Xt,backInOut:Gt,backOut:qt,anticipate:Zt},Wn=t=>{if(It(t)){s(4===t.length);const[e,n,i,r]=t;return Ht(e,n,i,r)}return"string"==typeof t?Ln[t]:t};function Nn(t,e,{clamp:r=!0,ease:o,mixer:a}={}){const l=t.length;if(s(l===e.length),1===l)return()=>e[0];if(2===l&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=function(t,e,s){const i=[],r=s||On,o=t.length-1;for(let s=0;s{if(u&&n1)for(;sd(f(t[0],t[l-1],e)):d}function Kn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=$(s)?s.map(Wn):Wn(s),r={done:!1,value:e[0]},o=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:U(e),t),a=Nn(o,e,{ease:Array.isArray(i)?i:(l=e,u=i,l.map((()=>u||Dn)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}const $n=t=>{const e=({timestamp:e})=>t(e);return{start:()=>gt.update(e,!0),stop:()=>yt(e),now:()=>vt.isProcessing?vt.timestamp:Tt.now()}},jn={decay:Rn,inertia:Rn,tween:Kn,keyframes:Kn,spring:L},zn=t=>t/100;class Hn extends yn{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||Qe;this.resolver=new r(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=this.options,o=N(e)?e:jn[e]||Kn;let a,l;o!==Kn&&"number"!=typeof t[0]&&(a=Vn(zn,On(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=d(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let w=this.currentTime,b=i;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(b=r)),w=f(0,1,n)*c}const x=v?{done:!1,value:a[0]}:b.next(w);o&&(x.value=o(x.value));let{done:T}=x;v||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return S&&void 0!==s&&(x.value=gn(a,this.options,s)),g&&g(x.value),S&&this.finish(),x}get duration(){const{resolved:t}=this;return t?c(t.calculatedDuration):0}get time(){return c(this.currentTime)}set time(t){t=u(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=c(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=$n,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Un=new Set(["opacity","clipPath","filter","transform"]);function Yn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=jt(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}const qn=r((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Xn={anticipate:Zt,backInOut:Gt,circInOut:Qt};class Gn extends yn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new dn(i,((t,e)=>this.onKeyframesResolved(t,e)),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:i,ease:r,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var c;if("string"==typeof r&&Wt()&&r in Xn&&(r=Xn[r]),N((c=this.options).type)||"spring"===c.type||!Nt(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new Hn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),s=c.duration,i=c.times,r=c.ease,o="keyframes"}const h=Yn(a.owner.current,l,t,{...this.options,duration:s,times:i,ease:r});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(Bt(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;a.set(gn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:s,times:i,type:o,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return c(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return c(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=u(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return n;const{animation:s}=e;Bt(s,t)}else this.pendingTimeline=t;return n}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:r,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...c}=this.options,h=new Hn({...c,keyframes:n,duration:s,type:i,ease:r,times:o,isGenerator:!0}),d=u(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;return qn()&&n&&Un.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const Zn={type:"spring",stiffness:500,damping:25,restSpeed:10},_n={type:"keyframes",duration:.8},Jn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qn=(t,{keyframes:e})=>e.length>2?_n:ht.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Zn:Jn;const ts=(t,e,n,s={},i,r)=>o=>{const a=ut(s,t)||{},c=a.delay||s.delay||0;let{elapsed:h=0}=s;h-=u(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(d={...d,...Qn(t,d)}),d.duration&&(d.duration=u(d.duration)),d.repeatDelay&&(d.repeatDelay=u(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(p=!0)),p&&!r&&void 0!==e.get()){const t=gn(d.keyframes,a);if(void 0!==t)return gt.update((()=>{d.onUpdate(t),d.onComplete()})),new l([])}return!r&&Gn.supports(d)?new Gn(d):new Hn(d)};function es({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function ns(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(r=t.latestValues[e])&&void 0!==r?r:null),i=l[e];if(void 0===i||c&&es(c,e))continue;const a={delay:n,...ut(o||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=Rt(t);if(n){const t=window.MotionHandoffAnimation(n,e,gt);null!==t&&(a.startTime=t,h=!0)}}Ct(t,e),s.start(ts(e,s,i,t.shouldReduceMotion&&dt.has(e)?{type:!1}:a,t,h));const d=s.animation;d&&u.push(d)}return a&&Promise.all(u).then((()=>{gt.update((()=>{a&&Ft(t,a)}))})),u}const ss=()=>({x:{min:0,max:0},y:{min:0,max:0}}),is={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},rs={};for(const t in is)rs[t]={isEnabled:e=>is[t].some((t=>!!e[t]))};const os="undefined"!=typeof window,as={current:null},ls={current:!1};const us=[...cn,be,Fe];const cs=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function hs(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||cs.some((e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e])));var e}const ds=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ps{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qe,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Tt.now();this.renderScheduledAtthis.bindToMotionValue(e,t))),ls.current||function(){if(ls.current=!0,os)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>as.current=t.matches;t.addListener(e),e()}else as.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||as.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){lt.delete(this.current),this.projection&&this.projection.unmount(),yt(this.notifyUpdate),yt(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=ht.has(t),s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&>.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{s(),i(),r&&r(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in rs){const e=rs[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Vt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(tn(s)||te(s))?s=parseFloat(s):(i=s,!us.find(un(i))&&Fe.test(e)&&(s=Ke(t,e))),this.setBaseTarget(t,Y(s)?s.get():s)),Y(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=Pt(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Y(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new St),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class fs extends ps{constructor(){super(...arguments),this.KeyframeResolver=dn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Y(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const ms=(t,e)=>e&&"number"==typeof t?e.transform(t):t,gs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ys=ct.length;function vs(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(ht.has(t))o=!0;else if(nn(t))i[t]=n;else{const e=ms(n,Le[t]);t.startsWith("origin")?(a=!0,r[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r{const l=it(t),{delay:c=0,times:h=U(l),type:d="keyframes",repeat:m,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:x}=n;const T="function"==typeof c?c(i,a):c,S=l.length,A=N(d)?d:null==r?void 0:r[d];if(S<=2&&A){let t=100;if(2===S&&at(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...w};void 0!==x&&(e.duration=u(x));const n=W(e,t,A);b=n.ease,x=n.duration}null!=x||(x=o);const V=p+T;1===h.length&&0===h[0]&&(h[1]=1);const M=h.length-l.length;if(M>0&&H(h,M),1===l.length&&l.unshift(null),m){x=Z(x,m);const t=[...l],e=[...h];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s{for(const r in t){const o=t[r];o.sort(et);const l=[],u=[],c=[];for(let t=0;t{s.push(...Rs(n,t,e))})),s}function Is(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&r.some(Array.isArray)?Bs(e,n,t):Rs(e,n,s,t);const o=new l(i);return t&&t.animations.push(o),o}}const Ds=Is();class Ls{constructor(t){this.animation=t}get duration(){var t,e,n;const s=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return c(Number(s))}get time(){var t;return this.animation?c((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=u(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t;this.animation&&(null===(t=this.animation.effect)||void 0===t||t.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&Bt(this.animation,t),n}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}function Ws(t,e,n){t.style.setProperty(`--${e}`,n)}function Ns(t,e,n){t.style[e]=n}const Ks=r((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),$s=new WeakMap;const js="easeOut";function zs(t){const e=$s.get(t)||new Map;return $s.set(t,e),$s.get(t)}class Hs extends Ls{constructor(t,e,n,i){const r=e.startsWith("--");s("string"!=typeof i.type);const o=zs(t).get(e);o&&o.stop();if(Array.isArray(n)||(n=[n]),function(t,e,n){for(let s=0;se.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e])),N(i.type)){const t=W(i,100,i.type);i.ease=Wt()?t.ease:js,i.duration=u(t.duration),i.type="keyframes"}else i.ease=i.ease||js;const a=()=>{this.setValue(t,e,gn(n,i)),this.cancel(),this.resolveFinishedPromise()},l=()=>{this.setValue=r?Ws:Ns,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{var n;return null===(n=$s.get(t))||void 0===n?void 0:n.delete(e)}};qn()?(super(Yn(t,e,n,i)),l(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=a,zs(t).set(e,this)):(super(),l(),a())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const Us=t=>function(e,n,s){return new l(function(t,e,n,s){const i=q(t,s),r=i.length,o=[];for(let t=0;t{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return gt.update(s,!0),()=>yt(s)}const Xs=new WeakMap;let Gs;function Zs({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=Xs.get(t))||void 0===s||s.forEach((s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})}))}function _s(t){t.forEach(Zs)}function Js(t,e){Gs||"undefined"!=typeof ResizeObserver&&(Gs=new ResizeObserver(_s));const n=q(t);return n.forEach((t=>{let n=Xs.get(t);n||(n=new Set,Xs.set(t,n)),n.add(e),null==Gs||Gs.observe(t)})),()=>{n.forEach((t=>{const n=Xs.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Gs||Gs.unobserve(t)}))}}const Qs=new Set;let ti;function ei(t){return Qs.add(t),ti||(ti=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Qs.forEach((t=>t(e)))},window.addEventListener("resize",ti)),()=>{Qs.delete(t),!Qs.size&&ti&&(ti=void 0)}}const ni={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function si(t,e,n,s){const r=n[e],{length:o,position:a}=ni[e],l=r.current,u=n.time;r.current=t[`scroll${a}`],r.scrollLength=t[`scroll${o}`]-t[`client${o}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=i(0,r.scrollLength,r.current);const c=s-u;r.velocity=c>50?0:m(r.current-l,c)}const ii={start:0,center:.5,end:1};function ri(t,e,n=0){let s=0;if(t in ii&&(t=ii[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const oi=[0,0];function ai(t,e,n,s){let i=Array.isArray(t)?t:oi,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,ii[t]?t:"0"]),r=ri(i[0],n,s),o=ri(i[1],e),r-o}const li={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ui={x:0,y:0};function ci(t,e,n){const{offset:s=li.All}=n,{target:i=t,axis:r="y"}=n,o="y"===r?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(i,t):ui,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=s.length;for(let t=0;tfunction(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){si(t,"x",e,n),si(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&ci(t,n,s)},notify:()=>e(n)}}const di=new WeakMap,pi=new WeakMap,fi=new WeakMap,mi=t=>t===document.documentElement?window:t;function gi(t,{container:e=document.documentElement,...n}={}){let s=fi.get(e);s||(s=new Set,fi.set(e,s));const i=hi(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!di.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(vt.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{gt.read(t,!1,!0),gt.read(n,!1,!0),gt.update(i,!1,!0)};di.set(e,a);const l=mi(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&pi.set(e,(o=a,"function"==typeof(r=e)?ei(r):Js(r,o))),l.addEventListener("scroll",a,{passive:!0})}var r,o;const a=di.get(e);return gt.read(a,!1,!0),()=>{var t;yt(a);const n=fi.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=di.get(e);di.delete(e),s&&(mi(e).removeEventListener("scroll",s),null===(t=pi.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const yi=new Map;function vi({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),yi.has(e)||yi.set(e,{});const s=yi.get(e);return s[n]||(s[n]=o()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=gi((t=>{s.value=100*t[n].progress}),{container:e,axis:n});return{currentTime:s,cancel:i}}({source:e,axis:n})),s[n]}function wi(t){return t&&(t.target||t.offset)}function bi(t,{axis:e="y",...s}={}){const i={axis:e,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||wi(e)?gi((n=>{t(n[e.axis].progress,n)}),e):qs(t,vi(e))}(t,i):function(t,e){if(t.flatten(),wi(e))return t.pause(),gi((n=>{t.time=t.duration*n[e.axis].progress}),e);{const s=vi(e);return t.attachTimeline?t.attachTimeline(s,(t=>(t.pause(),qs((e=>{t.time=t.duration*e}),s)))):n}}(t,i)}const xi={some:0,all:1};function Ti(t,e,{root:n,margin:s,amount:i="some"}={}){const r=q(t),o=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))}))}),{root:n,rootMargin:s,threshold:"number"==typeof i?i:xi[i]});return r.forEach((t=>a.observe(t))),()=>a.disconnect()}function Si(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(s):Math.ceil(s);return f(0,1,i/t)}}function Ai(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=Wn(s)(l/e)*e}return e+l}}function Vi(t,e){return function(t,e){const n=Tt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(yt(s),t(r-e))};return gt.read(s,!0),()=>yt(s)}(t,u(e))}const Mi=(t,e)=>Math.abs(t-e);function Pi(t,e){const n=Mi(t.x,e.x),s=Mi(t.y,e.y);return Math.sqrt(n**2+s**2)}function ki(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=Nn(i,r,{mixer:(l=r[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a}const Fi=gt,Ci=mt.reduce(((t,e)=>(t[e]=t=>yt(t),t)),{});export{At as MotionValue,Ds as animate,Ys as animateMini,Zt as anticipate,Xt as backIn,Gt as backInOut,qt as backOut,yt as cancelFrame,Ci as cancelSync,_t as circIn,Qt as circInOut,Jt as circOut,f as clamp,Is as createScopedAnimate,Ht as cubicBezier,Vi as delay,Mi as distance,Pi as distance2D,Bn as easeIn,Dn as easeInOut,In as easeOut,gt as frame,vt as frameData,wt as frameSteps,Ti as inView,Rn as inertia,Nn as interpolate,s as invariant,e as isDragActive,Kn as keyframes,Ut as mirrorEasing,On as mix,Vt as motionValue,n as noop,Vn as pipe,i as progress,Yt as reverseEasing,bi as scroll,gi as scrollInfo,L as spring,Ai as stagger,Si as steps,Fi as sync,Tt as time,ki as transform,K as wrap};export default null; diff --git a/src/browser/base/zen-components/ZenGlanceManager.mjs b/src/browser/base/zen-components/ZenGlanceManager.mjs index 847123425..a5c56c353 100644 --- a/src/browser/base/zen-components/ZenGlanceManager.mjs +++ b/src/browser/base/zen-components/ZenGlanceManager.mjs @@ -102,19 +102,30 @@ window.requestAnimationFrame(() => { this.quickOpenGlance(); - this.browserWrapper.style.setProperty('--initial-x', `${initialX}px`); - this.browserWrapper.style.setProperty('--initial-y', `${initialY}px`); - this.browserWrapper.style.setProperty('--initial-width', initialWidth + 'px'); - this.browserWrapper.style.setProperty('--initial-height', initialHeight + 'px'); - this.overlay.removeAttribute('fade-out'); this.browserWrapper.setAttribute('animate', true); - setTimeout(() => { + this.browserWrapper.style.top = `${initialY}px`; + this.browserWrapper.style.left = `${initialX}px`; + this.browserWrapper.style.width = `${initialWidth}px`; + this.browserWrapper.style.height = `${initialHeight}px`; + gZenUIManager.motion.animate(this.browserWrapper, { + top: [`${initialY}px`, '50%'], + left: [`${initialX}px`, '50%'], + width: [`${initialWidth}px`, '85%'], + height: [`${initialHeight}px`, '100%'], + opacity: [.8, 1], + }, { + duration: .5, + ease: "easeIn", + type: "spring", + bounce: 0.25 + }).then(() => { + this.browserWrapper.removeAttribute('animate'); this.browserWrapper.setAttribute('animate-end', true); this.browserWrapper.setAttribute('has-finished-animation', true); this._animating = false; this.animatingOpen = false; - }, 500); + }); }); } @@ -286,6 +297,7 @@ this.animatingFullOpen = true; this.currentParentTab._visuallySelected = false; + this.browserWrapper.removeAttribute('style'); this.browserWrapper.removeAttribute('has-finished-animation'); this.browserWrapper.setAttribute('animate-full', true); this.#currentTab.removeAttribute('zen-glance-tab'); diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 70e076f0c..435839145 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -1335,7 +1335,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { if (out) { for (let tab of tabs) { tab.animate([{ transform: 'translateX(0)' }, { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }], { - duration: 150, + duration: 100, easing: 'ease', fill: 'both', }).onfinish = onAnimationEnd; @@ -1344,7 +1344,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { } for (let tab of tabs) { tab.animate([{ transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, { transform: 'translateX(0)' }], { - duration: 150, + duration: 100, easing: 'ease', fill: 'both', }).onfinish = onAnimationEnd; From 619f979232151180606533482d1f56817ee0d35a Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 21:59:49 +0100 Subject: [PATCH 131/134] Enhance animation logic for workspace transitions and refine CSS styles --- .prettierignore | 2 + src/browser/base/content/ZenUIManager.mjs | 2 +- .../content/zen-styles/zen-compact-mode.css | 5 ++- .../zen-styles/zen-tabs/vertical-tabs.css | 1 + .../base/zen-components/ZenGlanceManager.mjs | 42 +++++++++++-------- .../base/zen-components/ZenWorkspaces.mjs | 39 +++++++++-------- 6 files changed, 53 insertions(+), 38 deletions(-) diff --git a/.prettierignore b/.prettierignore index 839364df1..30d5deeee 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,6 +4,8 @@ engine/ **/*.xhtml **/*.inc.xhtml **/*.bundle.min.js +**/*.min.js +**/*.min.mjs **/*.svg diff --git a/src/browser/base/content/ZenUIManager.mjs b/src/browser/base/content/ZenUIManager.mjs index c0bbd8957..80436baeb 100644 --- a/src/browser/base/content/ZenUIManager.mjs +++ b/src/browser/base/content/ZenUIManager.mjs @@ -9,7 +9,7 @@ var gZenUIManager = { XPCOMUtils.defineLazyPreferenceGetter(this, 'contentElementSeparation', 'zen.theme.content-element-separation', 0); ChromeUtils.defineLazyGetter(this, 'motion', () => { - return ChromeUtils.importESModule('chrome://browser/content/zen-vendor/motion.min.mjs', { global: "current" }); + return ChromeUtils.importESModule('chrome://browser/content/zen-vendor/motion.min.mjs', { global: 'current' }); }); new ResizeObserver(gZenCommonActions.throttle(this.updateTabsToolbar.bind(this), this.sidebarHeightThrottle)).observe( diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 841eeec7a..3285129b7 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -131,9 +131,10 @@ *:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore) ) { &:not([animate='true']) { + --zen-compact-mode-func: cubic-bezier(.53,1.28,.43,1.03); transition: - left 0.25s ease, - right 0.25s ease; + left 0.35s var(--zen-compact-mode-func), + right 0.35s var(--zen-compact-mode-func); opacity: 1; left: -1px; diff --git a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css index 10cabe683..4a5cc4bd7 100644 --- a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css +++ b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css @@ -223,6 +223,7 @@ #tabbrowser-tabs { margin-inline-start: 0 !important; padding-inline-start: 0 !important; + overflow-x: hidden; --tab-inner-inline-margin: 0; diff --git a/src/browser/base/zen-components/ZenGlanceManager.mjs b/src/browser/base/zen-components/ZenGlanceManager.mjs index a5c56c353..224a242ab 100644 --- a/src/browser/base/zen-components/ZenGlanceManager.mjs +++ b/src/browser/base/zen-components/ZenGlanceManager.mjs @@ -108,24 +108,30 @@ this.browserWrapper.style.left = `${initialX}px`; this.browserWrapper.style.width = `${initialWidth}px`; this.browserWrapper.style.height = `${initialHeight}px`; - gZenUIManager.motion.animate(this.browserWrapper, { - top: [`${initialY}px`, '50%'], - left: [`${initialX}px`, '50%'], - width: [`${initialWidth}px`, '85%'], - height: [`${initialHeight}px`, '100%'], - opacity: [.8, 1], - }, { - duration: .5, - ease: "easeIn", - type: "spring", - bounce: 0.25 - }).then(() => { - this.browserWrapper.removeAttribute('animate'); - this.browserWrapper.setAttribute('animate-end', true); - this.browserWrapper.setAttribute('has-finished-animation', true); - this._animating = false; - this.animatingOpen = false; - }); + gZenUIManager.motion + .animate( + this.browserWrapper, + { + top: [`${initialY}px`, '50%'], + left: [`${initialX}px`, '50%'], + width: [`${initialWidth}px`, '85%'], + height: [`${initialHeight}px`, '100%'], + opacity: [0.8, 1], + }, + { + duration: 0.5, + ease: 'easeIn', + type: 'spring', + bounce: 0.25, + } + ) + .then(() => { + this.browserWrapper.removeAttribute('animate'); + this.browserWrapper.setAttribute('animate-end', true); + this.browserWrapper.setAttribute('has-finished-animation', true); + this._animating = false; + this.animatingOpen = false; + }); }); } diff --git a/src/browser/base/zen-components/ZenWorkspaces.mjs b/src/browser/base/zen-components/ZenWorkspaces.mjs index 435839145..c84c654d9 100644 --- a/src/browser/base/zen-components/ZenWorkspaces.mjs +++ b/src/browser/base/zen-components/ZenWorkspaces.mjs @@ -1321,33 +1321,38 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { } } + _animateElement(element, direction, out = false, callback) { + if (out) { + element.animate([{ transform: 'translateX(0)' }, { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }], { + duration: 100, + easing: 'ease', + fill: 'both', + }).onfinish = callback; + return; + } + element.animate([{ transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, { transform: 'translateX(0)' }], { + duration: 100, + easing: 'ease', + fill: 'both', + }).onfinish = callback; + } + async _animateTabs(direction, out = false) { const tabs = gBrowser.visibleTabs.filter((tab) => !tab.hasAttribute('zen-essential')); return new Promise((resolve) => { let count = 0; const onAnimationEnd = () => { count++; - if (count >= tabs.length) { + // +1 for the workspace indicator tab + if (count >= tabs.length + 1) { resolve(); } }; this.tabContainer.removeAttribute('dont-animate-tabs'); - if (out) { - for (let tab of tabs) { - tab.animate([{ transform: 'translateX(0)' }, { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }], { - duration: 100, - easing: 'ease', - fill: 'both', - }).onfinish = onAnimationEnd; - } - return; - } - for (let tab of tabs) { - tab.animate([{ transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, { transform: 'translateX(0)' }], { - duration: 100, - easing: 'ease', - fill: 'both', - }).onfinish = onAnimationEnd; + // Also animate the workspace indicator label + this._animateElement(document.getElementById('zen-current-workspace-indicator'), direction, out, () => onAnimationEnd()); + for (const tab of tabs) { + this._animateElement(tab, direction, out, () => onAnimationEnd()); } }); } From e26ff172c895961ec6e40eb15292533d304b3fc1 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 22:54:04 +0100 Subject: [PATCH 132/134] Add tab icon change handling and enhance tab background styles --- .../content/zen-styles/zen-compact-mode.css | 108 +++++++++++++++++- .../zen-styles/zen-tabs/vertical-tabs.css | 31 +++++ .../zen-components/ZenPinnedTabManager.mjs | 8 ++ .../tabbrowser/content/tabbrowser-js.patch | 45 ++++---- 4 files changed, 167 insertions(+), 25 deletions(-) diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 3285129b7..b5120ef17 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -131,10 +131,112 @@ *:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore) ) { &:not([animate='true']) { - --zen-compact-mode-func: cubic-bezier(.53,1.28,.43,1.03); + --zen-compact-mode-func: linear( + 0 0%, + 0.003726 1%, + 0.014319 2%, + 0.030937 3%, + 0.052788 4%, + 0.079129 5%, + 0.109269 6%, + 0.142564 7.000000000000001%, + 0.17842 8%, + 0.21629 9%, + 0.255672 10%, + 0.296112 11%, + 0.337194 12%, + 0.378548 13%, + 0.419841 14.000000000000002%, + 0.460779 15%, + 0.501101 16%, + 0.540581 17%, + 0.579024 18%, + 0.616265 19%, + 0.652166 20%, + 0.686613 21%, + 0.719517 22%, + 0.750808 23%, + 0.780437 24%, + 0.808374 25%, + 0.834601 26%, + 0.859118 27%, + 0.881936 28.000000000000004%, + 0.903077 28.999999999999996%, + 0.922574 30%, + 0.940466 31%, + 0.956802 32%, + 0.971635 33%, + 0.985025 34%, + 0.997033 35%, + 1.007727 36%, + 1.017174 37%, + 1.025444 38%, + 1.032608 39%, + 1.038736 40%, + 1.043899 41%, + 1.048166 42%, + 1.051606 43%, + 1.054286 44%, + 1.056272 45%, + 1.057625 46%, + 1.058406 47%, + 1.058673 48%, + 1.058482 49%, + 1.057884 50%, + 1.056931 51%, + 1.055667 52%, + 1.054137 53%, + 1.052381 54%, + 1.050438 55.00000000000001%, + 1.048343 56.00000000000001%, + 1.046128 56.99999999999999%, + 1.043822 57.99999999999999%, + 1.041452 59%, + 1.039044 60%, + 1.036618 61%, + 1.034194 62%, + 1.03179 63%, + 1.029422 64%, + 1.027102 65%, + 1.024842 66%, + 1.022652 67%, + 1.020541 68%, + 1.018514 69%, + 1.016577 70%, + 1.014735 71%, + 1.01299 72%, + 1.011345 73%, + 1.0098 74%, + 1.008355 75%, + 1.00701 76%, + 1.005763 77%, + 1.004613 78%, + 1.003557 79%, + 1.002593 80%, + 1.001717 81%, + 1.000926 82%, + 1.000217 83%, + 0.999584 84%, + 0.999026 85%, + 0.998536 86%, + 0.998112 87%, + 0.997748 88%, + 0.997442 89%, + 0.997188 90%, + 0.996984 91%, + 0.996824 92%, + 0.996705 93%, + 0.996623 94%, + 0.996575 95%, + 0.996558 96%, + 0.996567 97%, + 0.996601 98%, + 0.996656 99%, + 0.996729 100% + ); transition: - left 0.35s var(--zen-compact-mode-func), - right 0.35s var(--zen-compact-mode-func); + left 0.25s var(--zen-compact-mode-func), + right 0.25s var(--zen-compact-mode-func); opacity: 1; left: -1px; diff --git a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css index 4a5cc4bd7..58e573579 100644 --- a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css +++ b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css @@ -947,6 +947,37 @@ & .tab-icon-overlay { margin-inline-end: 0 !important; } + + &[selected] .tab-background { + &::after { + content: ""; + inset: -50%; + filter: blur(15px); + position: absolute; + background-size: 100% 100%; + background-clip: padding-box; + background-image: var(--zen-tab-icon); + z-index: -1; + } + + background: transparent; + overflow: hidden; + + &::before { + background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.80)); + margin: 2px; + border-radius: calc(var(--tab-border-radius) - 2px); + position: absolute; + inset: 0; + z-index: 0; + content: ""; + transition: background 0.2s ease-in-out; + } + } + + &[selected]:hover .tab-background::before { + background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.85)); + } } diff --git a/src/browser/base/zen-components/ZenPinnedTabManager.mjs b/src/browser/base/zen-components/ZenPinnedTabManager.mjs index 3f25b098d..a4f4a467a 100644 --- a/src/browser/base/zen-components/ZenPinnedTabManager.mjs +++ b/src/browser/base/zen-components/ZenPinnedTabManager.mjs @@ -68,6 +68,13 @@ await this._refreshPinnedTabs(newWorkspace, { init: onInit }); } + onTabIconChanged(tab, url = null) { + const iconUrl = url ?? tab.iconImage.src; + if (tab.hasAttribute('zen-essential')) { + tab.querySelector('.tab-background').style.setProperty('--zen-tab-icon', `url(${iconUrl})`); + } + } + get enabled() { if (typeof this._enabled === 'undefined') { this._enabled = !( @@ -544,6 +551,7 @@ gBrowser.unpinTab(tab); } gBrowser.pinTab(tab); + this.onTabIconChanged(tab); } } diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index 361106684..fb735b872 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b6878d4d394 100644 +index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54da793e76 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -409,11 +409,39 @@ @@ -53,15 +53,16 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 ); } else { this.moveTabTo(aTab, this.pinnedTabCount); -@@ -1052,6 +1080,7 @@ +@@ -1052,6 +1080,8 @@ let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"]; + try { ++ gZenPinnedTabManager.onTabIconChanged(aTab, aIconURL); if ( aIconURL && !aLoadingPrincipal && -@@ -1062,6 +1091,9 @@ +@@ -1062,6 +1092,9 @@ ); return; } @@ -71,7 +72,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 let browser = this.getBrowserForTab(aTab); browser.mIconURL = aIconURL; -@@ -1291,6 +1323,7 @@ +@@ -1291,6 +1324,7 @@ if (!this._previewMode) { newTab.recordTimeFromUnloadToReload(); newTab.updateLastAccessed(); @@ -79,7 +80,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 oldTab.updateLastAccessed(); // if this is the foreground window, update the last-seen timestamps. if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) { -@@ -2374,7 +2407,7 @@ +@@ -2374,7 +2408,7 @@ let panel = this.getPanel(browser); let uniqueId = this._generateUniquePanelID(); @@ -88,7 +89,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 aTab.linkedPanel = uniqueId; // Inject the into the DOM if necessary. -@@ -2434,7 +2467,7 @@ +@@ -2434,7 +2468,7 @@ // hasSiblings=false on both the existing browser and the new browser. if (this.tabs.length == 2) { this.tabs[0].linkedBrowser.browsingContext.hasSiblings = true; @@ -97,7 +98,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 } else { aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1; } -@@ -2666,6 +2699,12 @@ +@@ -2666,6 +2700,12 @@ ); } @@ -110,7 +111,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 if (!UserInteraction.running("browser.tabs.opening", window)) { UserInteraction.start("browser.tabs.opening", "initting", window); } -@@ -2735,6 +2774,12 @@ +@@ -2735,6 +2775,12 @@ noInitialLabel, skipBackgroundNotify, }); @@ -123,7 +124,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 if (insertTab) { // insert the tab into the tab container in the correct position this._insertTabAtIndex(t, { -@@ -2878,6 +2923,13 @@ +@@ -2878,6 +2924,13 @@ } } @@ -137,7 +138,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 // Additionally send pinned tab events if (pinned) { this._notifyPinnedStatus(t); -@@ -3389,6 +3441,23 @@ +@@ -3389,6 +3442,23 @@ ) { tabWasReused = true; tab = this.selectedTab; @@ -161,7 +162,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 if (!tabData.pinned) { this.unpinTab(tab); } else { -@@ -3402,6 +3471,9 @@ +@@ -3402,6 +3472,9 @@ restoreTabsLazily && !select && !tabData.pinned; let url = "about:blank"; @@ -171,7 +172,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 if (tabData.entries?.length) { let activeIndex = (tabData.index || tabData.entries.length) - 1; // Ensure the index is in bounds. -@@ -3438,6 +3510,21 @@ +@@ -3438,6 +3511,21 @@ preferredRemoteType, }); @@ -193,7 +194,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 if (select) { tabToSelect = tab; } -@@ -3491,7 +3578,6 @@ +@@ -3491,7 +3579,6 @@ this.tabContainer._invalidateCachedTabs(); } } @@ -201,7 +202,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 tab.initialize(); } -@@ -4070,6 +4156,10 @@ +@@ -4070,6 +4157,10 @@ return; } @@ -212,7 +213,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 this.removeTabs(selectedTabs); } -@@ -4389,6 +4479,13 @@ +@@ -4389,6 +4480,13 @@ TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab); } @@ -226,7 +227,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 // Handle requests for synchronously removing an already // asynchronously closing tab. if (!animate && aTab.closing) { -@@ -4404,6 +4501,10 @@ +@@ -4404,6 +4502,10 @@ // state). let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width; @@ -237,7 +238,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 if ( !this._beginRemoveTab(aTab, { closeWindowFastpath: true, -@@ -4556,14 +4657,14 @@ +@@ -4556,14 +4658,14 @@ !!this.tabsInCollapsedTabGroups.length; if ( aTab.visible && @@ -254,7 +255,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 if (closeWindow) { // We've already called beforeunload on all the relevant tabs if we get here, -@@ -5411,10 +5512,10 @@ +@@ -5411,10 +5513,10 @@ SessionStore.deleteCustomTabValue(aTab, "hiddenBy"); } @@ -267,7 +268,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 aTab.selected || aTab.closing || // Tabs that are sharing the screen, microphone or camera cannot be hidden. -@@ -7384,6 +7485,7 @@ +@@ -7384,6 +7486,7 @@ aWebProgress.isTopLevel ) { this.mTab.setAttribute("busy", "true"); @@ -275,7 +276,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 gBrowser._tabAttrModified(this.mTab, ["busy"]); this.mTab._notselectedsinceload = !this.mTab.selected; gBrowser.syncThrobberAnimations(this.mTab); -@@ -8344,7 +8446,7 @@ var TabContextMenu = { +@@ -8344,7 +8447,7 @@ var TabContextMenu = { ); contextUnpinSelectedTabs.hidden = !this.contextTab.pinned || !multiselectionContext; @@ -284,7 +285,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 // Move Tab items let contextMoveTabOptions = document.getElementById( "context_moveTabOptions" -@@ -8378,7 +8480,7 @@ var TabContextMenu = { +@@ -8378,7 +8481,7 @@ var TabContextMenu = { let contextMoveTabToStart = document.getElementById("context_moveToStart"); let isFirstTab = tabsToMove[0] == visibleTabs[0] || @@ -293,7 +294,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..07e3f7fcdb3e219c523201929cf07b68 contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent; document.getElementById("context_openTabInWindow").disabled = -@@ -8607,6 +8709,7 @@ var TabContextMenu = { +@@ -8607,6 +8710,7 @@ var TabContextMenu = { if (this.contextTab.multiselected) { gBrowser.removeMultiSelectedTabs(); } else { From 37092f0359c2457ffc203bf8e8195d69a8b700c2 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 23:40:58 +0100 Subject: [PATCH 133/134] Refine CSS transition timing and update animation function for compact mode --- .../content/zen-styles/zen-compact-mode.css | 204 +++++++++--------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index b5120ef17..d1a754cf9 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -133,110 +133,110 @@ &:not([animate='true']) { --zen-compact-mode-func: linear( 0 0%, - 0.003726 1%, - 0.014319 2%, - 0.030937 3%, - 0.052788 4%, - 0.079129 5%, - 0.109269 6%, - 0.142564 7.000000000000001%, - 0.17842 8%, - 0.21629 9%, - 0.255672 10%, - 0.296112 11%, - 0.337194 12%, - 0.378548 13%, - 0.419841 14.000000000000002%, - 0.460779 15%, - 0.501101 16%, - 0.540581 17%, - 0.579024 18%, - 0.616265 19%, - 0.652166 20%, - 0.686613 21%, - 0.719517 22%, - 0.750808 23%, - 0.780437 24%, - 0.808374 25%, - 0.834601 26%, - 0.859118 27%, - 0.881936 28.000000000000004%, - 0.903077 28.999999999999996%, - 0.922574 30%, - 0.940466 31%, - 0.956802 32%, - 0.971635 33%, - 0.985025 34%, - 0.997033 35%, - 1.007727 36%, - 1.017174 37%, - 1.025444 38%, - 1.032608 39%, - 1.038736 40%, - 1.043899 41%, - 1.048166 42%, - 1.051606 43%, - 1.054286 44%, - 1.056272 45%, - 1.057625 46%, - 1.058406 47%, - 1.058673 48%, - 1.058482 49%, - 1.057884 50%, - 1.056931 51%, - 1.055667 52%, - 1.054137 53%, - 1.052381 54%, - 1.050438 55.00000000000001%, - 1.048343 56.00000000000001%, - 1.046128 56.99999999999999%, - 1.043822 57.99999999999999%, - 1.041452 59%, - 1.039044 60%, - 1.036618 61%, - 1.034194 62%, - 1.03179 63%, - 1.029422 64%, - 1.027102 65%, - 1.024842 66%, - 1.022652 67%, - 1.020541 68%, - 1.018514 69%, - 1.016577 70%, - 1.014735 71%, - 1.01299 72%, - 1.011345 73%, - 1.0098 74%, - 1.008355 75%, - 1.00701 76%, - 1.005763 77%, - 1.004613 78%, - 1.003557 79%, - 1.002593 80%, - 1.001717 81%, - 1.000926 82%, - 1.000217 83%, - 0.999584 84%, - 0.999026 85%, - 0.998536 86%, - 0.998112 87%, - 0.997748 88%, - 0.997442 89%, - 0.997188 90%, - 0.996984 91%, - 0.996824 92%, - 0.996705 93%, - 0.996623 94%, - 0.996575 95%, - 0.996558 96%, - 0.996567 97%, - 0.996601 98%, - 0.996656 99%, - 0.996729 100% + 0.002958 1%, + 0.01137 2%, + 0.024581 3%, + 0.041981 4%, + 0.063001 5%, + 0.087118 6%, + 0.113846 7.000000000000001%, + 0.14274 8%, + 0.173391 9%, + 0.205425 10%, + 0.238504 11%, + 0.272318 12%, + 0.30659 13%, + 0.341071 14.000000000000002%, + 0.375535 15%, + 0.409787 16%, + 0.44365 17%, + 0.476971 18%, + 0.509618 19%, + 0.541476 20%, + 0.572448 21%, + 0.602453 22%, + 0.631425 23%, + 0.65931 24%, + 0.686067 25%, + 0.711668 26%, + 0.736092 27%, + 0.759328 28.000000000000004%, + 0.781375 28.999999999999996%, + 0.802235 30%, + 0.821921 31%, + 0.840449 32%, + 0.857841 33%, + 0.874121 34%, + 0.88932 35%, + 0.903469 36%, + 0.916603 37%, + 0.928759 38%, + 0.939975 39%, + 0.950291 40%, + 0.959747 41%, + 0.968385 42%, + 0.976244 43%, + 0.983366 44%, + 0.989792 45%, + 0.995562 46%, + 1.000716 47%, + 1.005292 48%, + 1.009328 49%, + 1.01286 50%, + 1.015925 51%, + 1.018556 52%, + 1.020787 53%, + 1.022648 54%, + 1.024172 55.00000000000001%, + 1.025385 56.00000000000001%, + 1.026316 56.99999999999999%, + 1.026991 57.99999999999999%, + 1.027434 59%, + 1.027669 60%, + 1.027717 61%, + 1.027599 62%, + 1.027334 63%, + 1.02694 64%, + 1.026433 65%, + 1.025829 66%, + 1.025143 67%, + 1.024388 68%, + 1.023575 69%, + 1.022715 70%, + 1.02182 71%, + 1.020898 72%, + 1.019957 73%, + 1.019005 74%, + 1.018048 75%, + 1.017094 76%, + 1.016146 77%, + 1.015211 78%, + 1.014291 79%, + 1.013391 80%, + 1.012513 81%, + 1.01166 82%, + 1.010835 83%, + 1.010039 84%, + 1.009273 85%, + 1.008538 86%, + 1.007836 87%, + 1.007166 88%, + 1.00653 89%, + 1.005926 90%, + 1.005355 91%, + 1.004817 92%, + 1.00431 93%, + 1.003835 94%, + 1.003391 95%, + 1.002976 96%, + 1.002591 97%, + 1.002233 98%, + 1.001902 99%, + 1.001597 100% ); transition: - left 0.25s var(--zen-compact-mode-func), - right 0.25s var(--zen-compact-mode-func); + left 0.3125s var(--zen-compact-mode-func), + right 0.3125s var(--zen-compact-mode-func); opacity: 1; left: -1px; From c93263ccea010af1d021ff03902bd7db4b8a3472 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sat, 11 Jan 2025 23:53:59 +0100 Subject: [PATCH 134/134] Add support for essentials favicon background in tab styles --- src/browser/app/profile/zen-browser.js | 1 + .../zen-styles/zen-tabs/vertical-tabs.css | 54 ++++++++++--------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/browser/app/profile/zen-browser.js b/src/browser/app/profile/zen-browser.js index 3dcd11da4..6da43313e 100644 --- a/src/browser/app/profile/zen-browser.js +++ b/src/browser/app/profile/zen-browser.js @@ -85,6 +85,7 @@ pref('zen.theme.accent-color', "#ffb787"); pref('zen.theme.content-element-separation', 6); // In pixels pref('zen.theme.pill-button', false); pref('zen.theme.gradient', true); +pref('zen.theme.essentials-favicon-bg', true); pref('zen.tabs.show-newtab-vertical', true); pref('zen.view.show-newtab-button-border-top', true); diff --git a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css index 58e573579..63acad020 100644 --- a/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css +++ b/src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css @@ -948,36 +948,38 @@ margin-inline-end: 0 !important; } - &[selected] .tab-background { - &::after { - content: ""; - inset: -50%; - filter: blur(15px); - position: absolute; - background-size: 100% 100%; - background-clip: padding-box; - background-image: var(--zen-tab-icon); - z-index: -1; + @media (-moz-bool-pref: 'zen.theme.essentials-favicon-bg') { + &[selected] .tab-background { + &::after { + content: ""; + inset: -50%; + filter: blur(15px); + position: absolute; + background-size: 100% 100%; + background-clip: padding-box; + background-image: var(--zen-tab-icon); + z-index: -1; + } + + background: transparent; + overflow: hidden; + + &::before { + background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.80)); + margin: 2px; + border-radius: calc(var(--tab-border-radius) - 2px); + position: absolute; + inset: 0; + z-index: 0; + content: ""; + transition: background 0.2s ease-in-out; + } } - background: transparent; - overflow: hidden; - - &::before { - background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.80)); - margin: 2px; - border-radius: calc(var(--tab-border-radius) - 2px); - position: absolute; - inset: 0; - z-index: 0; - content: ""; - transition: background 0.2s ease-in-out; + &[selected]:hover .tab-background::before { + background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.85)); } } - - &[selected]:hover .tab-background::before { - background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.85)); - } }