From 7fdef3b40f1477e93bf2ac5596435b477e1e878f Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Tue, 28 Oct 2025 19:36:57 +0100 Subject: [PATCH] chore: Updated to Firefox `144.0.2`, b=no-bug, c=l10n, tabs, workspaces --- README.md | 4 +- build/firefox-cache/l10n-last-commit-hash | 2 +- src/browser/themes/shared/zen-icons/icons.css | 6 ++- .../ff-145-tahoe-upgrade.patch | 36 --------------- src/zen/tabs/zen-tabs/vertical-tabs.css | 17 +++++-- src/zen/workspaces/ZenWorkspaces.mjs | 45 ++++++++++++++++--- surfer.json | 4 +- 7 files changed, 61 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index f9166612c..aa71c3917 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne ### Firefox Versions -- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `144.0`! 🚀 -- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 144.0`! +- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `144.0.2`! 🚀 +- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 144.0.2`! ### Contributing diff --git a/build/firefox-cache/l10n-last-commit-hash b/build/firefox-cache/l10n-last-commit-hash index 34eb47c39..26d328f6d 100644 --- a/build/firefox-cache/l10n-last-commit-hash +++ b/build/firefox-cache/l10n-last-commit-hash @@ -1 +1 @@ -16e978d10b8a1c49267e8f1574f52c3e0d5089ae \ No newline at end of file +860c37a26622f61c74c7cbb93f7e0ae759fcbfe1 \ No newline at end of file diff --git a/src/browser/themes/shared/zen-icons/icons.css b/src/browser/themes/shared/zen-icons/icons.css index dd9b5451c..082e5b7c8 100644 --- a/src/browser/themes/shared/zen-icons/icons.css +++ b/src/browser/themes/shared/zen-icons/icons.css @@ -394,7 +394,11 @@ } .zen-workspace-close-unpinned-tabs-button { - list-style-image: url('dart-down.svg') !important; + list-style-image: url('dart-down.svg'); + + &:not([can-close='true']) .toolbarbutton-icon { + display: none; + } } .zen-workspace-actions-reorder-icon, diff --git a/src/firefox-patches/ff-145-tahoe-upgrade.patch b/src/firefox-patches/ff-145-tahoe-upgrade.patch index 9caa99615..ff27f9aca 100644 --- a/src/firefox-patches/ff-145-tahoe-upgrade.patch +++ b/src/firefox-patches/ff-145-tahoe-upgrade.patch @@ -197,42 +197,6 @@ index fc1e28206ac2..1661476a75f0 100644 /* * AlertNotificationOrigin indicates from which corner of the * screen alerts slide in, and from which direction (horizontal/vertical). -diff --git a/widget/cocoa/nsCocoaFeatures.h b/widget/cocoa/nsCocoaFeatures.h -index dfad59dfe676..1a2389fda02c 100644 ---- a/widget/cocoa/nsCocoaFeatures.h -+++ b/widget/cocoa/nsCocoaFeatures.h -@@ -22,6 +22,7 @@ class nsCocoaFeatures { - static bool OnMontereyOrLater(); - static bool OnVenturaOrLater(); - static bool OnSonomaOrLater(); -+ static bool OnTahoeOrLater(); - - static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, - int32_t aBugFix = 0); -diff --git a/widget/cocoa/nsCocoaFeatures.mm b/widget/cocoa/nsCocoaFeatures.mm -index 509bdbd3fbe3..b70b9c6bbed3 100644 ---- a/widget/cocoa/nsCocoaFeatures.mm -+++ b/widget/cocoa/nsCocoaFeatures.mm -@@ -27,6 +27,7 @@ - #define MACOS_VERSION_12_0_HEX 0x000C0000 - #define MACOS_VERSION_13_0_HEX 0x000D0000 - #define MACOS_VERSION_14_0_HEX 0x000E0000 -+#define MACOS_VERSION_26_0_HEX 0x001A0000 - - #include "nsCocoaFeatures.h" - #include "nsCocoaUtils.h" -@@ -186,6 +187,11 @@ static int intAtStringIndex(NSArray* array, int index) { - return (macOSVersion() >= MACOS_VERSION_14_0_HEX); - } - -+/* static */ bool nsCocoaFeatures::OnTahoeOrLater() { -+ // See comments above regarding SYSTEM_VERSION_COMPAT. -+ return (macOSVersion() >= MACOS_VERSION_26_0_HEX); -+} -+ - /* static */ bool nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, - int32_t aMinor, - int32_t aBugFix) { diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h index 38aca9f32590..9484ef078900 100644 --- a/widget/cocoa/nsCocoaWindow.h diff --git a/src/zen/tabs/zen-tabs/vertical-tabs.css b/src/zen/tabs/zen-tabs/vertical-tabs.css index 240e16eb5..258ea20f6 100644 --- a/src/zen/tabs/zen-tabs/vertical-tabs.css +++ b/src/zen/tabs/zen-tabs/vertical-tabs.css @@ -130,12 +130,14 @@ Pinned Tabs Separator ========================================================================== */ .pinned-tabs-container-separator { - height: 24px; + height: 22px; + padding-bottom: 2px; border: none; - width: 98%; + width: 100%; transition: height 0.08s ease-in-out, - opacity 0.08s ease-in-out; + padding 0.08s ease-in-out, + opacity 0.06s ease-in-out; overflow: hidden; position: relative; opacity: 1; @@ -155,13 +157,15 @@ #tabbrowser-tabs[movingtab] & { transition: height 0.08s ease-in-out, - opacity 0.08s ease-in-out, + padding 0.08s ease-in-out, + opacity 0.06s ease-in-out, transform 0.1s ease-in-out; } .zen-workspace-pinned-tabs-section[hide-separator] & { height: 0px; opacity: 0; + padding-bottom: 0px; } & toolbarbutton { @@ -195,6 +199,11 @@ & .toolbarbutton-icon { width: 10px; transition: transform 0.15s ease-in-out; + transform: translateY(0px); + + @starting-style { + transform: translateY(-2px); + } } &:active:hover .toolbarbutton-icon { diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 6ee9386ff..45e12adfc 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -1483,15 +1483,37 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature { }); } - unpinnedTabsInWorkspace(workspaceID) { + #unpinnedTabsInWorkspace(workspaceID) { return Array.from(this.allStoredTabs).filter( (tab) => tab.getAttribute('zen-workspace-id') === workspaceID && tab.visible && !tab.pinned ); } + #getClosableTabs(tabs) { + const remainingTabs = tabs.filter((tab) => { + const attributes = ['selected', 'multiselected', 'pictureinpicture', 'soundplaying']; + for (const attr of attributes) { + if (tab.hasAttribute(attr)) { + return false; + } + } + const browser = tab.linkedBrowser; + if ( + window.webrtcUI.browserHasStreams(browser) || + browser?.browsingContext?.currentWindowGlobal?.hasActivePeerConnections() + ) { + return false; + } + return true; + }); + if (remainingTabs.length === 0) { + return tabs; // If no tabs are safe to close, return all to force close + } + return remainingTabs; + } + #deleteAllUnpinnedTabsInWorkspace(tabs) { gBrowser.removeTabs(tabs, { - animate: false, closeWindowWithLastTab: false, }); } @@ -2480,7 +2502,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature { } // Only animate if it's from an event let animateContainer = target && target.target instanceof EventTarget; - if (target?.type === 'TabClose') { + if (target?.type === 'TabClose' || target?.type === 'TabOpened') { animateContainer = target.target.pinned; } await this.onPinnedTabsResize( @@ -2503,6 +2525,15 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature { if (shouldHideSeparator) { pinnedContainer.setAttribute('hide-separator', 'true'); } else { + const workspaceID = pinnedContainer.getAttribute('zen-workspace-id'); + const tabs = this.#unpinnedTabsInWorkspace(workspaceID); + const closableTabs = this.#getClosableTabs(tabs); + const button = pinnedContainer.querySelector('.zen-workspace-close-unpinned-tabs-button'); + if (tabs.length === closableTabs.length) { + button.setAttribute('can-close', 'true'); + } else { + button.removeAttribute('can-close'); + } pinnedContainer.removeAttribute('hide-separator'); } } @@ -2669,11 +2700,11 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature { async closeAllUnpinnedTabs() { const workspaceId = this.#contextMenuData?.workspaceId || this.activeWorkspace; - const unpinnedTabs = await this.unpinnedTabsInWorkspace(workspaceId); + const unpinnedTabs = this.#unpinnedTabsInWorkspace(workspaceId); + const closableTabs = this.#getClosableTabs(unpinnedTabs); - if (!unpinnedTabs.length) return; - - this.#deleteAllUnpinnedTabsInWorkspace(unpinnedTabs); + if (!closableTabs.length) return; + this.#deleteAllUnpinnedTabsInWorkspace(closableTabs); const restoreClosedTabsShortcut = gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand( 'History:RestoreLastClosedTabOrWindowOrSession' diff --git a/surfer.json b/surfer.json index c224008c8..a45c167bc 100644 --- a/surfer.json +++ b/surfer.json @@ -5,8 +5,8 @@ "binaryName": "zen", "version": { "product": "firefox", - "version": "144.0", - "candidate": "144.0" + "version": "144.0.2", + "candidate": "144.0.2" }, "buildOptions": { "generateBranding": true