mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-04 11:04:39 +00:00
chore: Updated to Firefox 144.0.2, b=no-bug, c=l10n, tabs, workspaces
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
16e978d10b8a1c49267e8f1574f52c3e0d5089ae
|
||||
860c37a26622f61c74c7cbb93f7e0ae759fcbfe1
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user