mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-07 23:00:01 +02:00
fix: enhance tab unloading logic with permitUnload check and update candidate version and update to firefox 136.0.2
This commit is contained in:
parent
ad04961d19
commit
025f994c62
8 changed files with 28 additions and 12 deletions
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
## 🖥️ Compatibility
|
## 🖥️ Compatibility
|
||||||
|
|
||||||
Zen is currently built using Firefox version `136.0.1`! 🚀
|
Zen is currently built using Firefox version `136.0.2`! 🚀
|
||||||
|
|
||||||
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 136.0`!
|
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 136.0`!
|
||||||
- Check out the latest [release notes](https://zen-browser.app/release-notes)!
|
- Check out the latest [release notes](https://zen-browser.app/release-notes)!
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
6ad0ab3c43a6208d8bcd997b40e802fccd48ba0a
|
6013afe489c3d5e19c5f0d0f6c3f94b91f5bd7d1
|
|
@ -64,6 +64,12 @@ def update_l10n_last_commit_hash():
|
||||||
if not os.path.exists("firefox-cache"):
|
if not os.path.exists("firefox-cache"):
|
||||||
os.mkdir("firefox-cache")
|
os.mkdir("firefox-cache")
|
||||||
os.system("cat l10n-temp/.git/refs/heads/main > firefox-cache/l10n-last-commit-hash")
|
os.system("cat l10n-temp/.git/refs/heads/main > firefox-cache/l10n-last-commit-hash")
|
||||||
|
# Remove new line character
|
||||||
|
data = ""
|
||||||
|
with open("firefox-cache/l10n-last-commit-hash", "r") as f:
|
||||||
|
data = f.read()
|
||||||
|
with open("firefox-cache/l10n-last-commit-hash", "w") as f:
|
||||||
|
f.write(data.strip())
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("Exiting...")
|
print("Exiting...")
|
||||||
shutil.rmtree("l10n-temp")
|
shutil.rmtree("l10n-temp")
|
||||||
|
|
|
@ -360,7 +360,11 @@ menuitem {
|
||||||
& .zen-toast {
|
& .zen-toast {
|
||||||
padding: 0.9rem 0.8rem;
|
padding: 0.9rem 0.8rem;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background: linear-gradient(170deg, var(--zen-primary-color) -40%, color-mix(in srgb, var(--zen-primary-color) 85%, #0f0f0f 15%));
|
background: linear-gradient(
|
||||||
|
170deg,
|
||||||
|
var(--zen-primary-color) -40%,
|
||||||
|
color-mix(in srgb, var(--zen-primary-color) 85%, #0f0f0f 15%)
|
||||||
|
);
|
||||||
color: var(--button-primary-color);
|
color: var(--button-primary-color);
|
||||||
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
|
||||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
|
|
@ -269,7 +269,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#tabbrowser-tabs:not([movingtab]) & .tab-content > image:active {
|
#tabbrowser-tabs:not([movingtab]) & .tab-content > image:active {
|
||||||
scale: var(--zen-active-tab-scale);
|
scale: 0.92;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .tab-icon-image {
|
& .tab-icon-image {
|
||||||
|
|
|
@ -510,6 +510,10 @@
|
||||||
case 'unload-switch':
|
case 'unload-switch':
|
||||||
case 'reset-switch':
|
case 'reset-switch':
|
||||||
case 'switch':
|
case 'switch':
|
||||||
|
let { permitUnload } = selectedTab.linkedBrowser?.permitUnload();
|
||||||
|
if (!permitUnload) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this._handleTabSwitch(selectedTab);
|
this._handleTabSwitch(selectedTab);
|
||||||
if (behavior.includes('reset')) {
|
if (behavior.includes('reset')) {
|
||||||
this._resetTabToStoredState(selectedTab);
|
this._resetTabToStoredState(selectedTab);
|
||||||
|
@ -520,8 +524,7 @@
|
||||||
}
|
}
|
||||||
// Do not unload about:* pages
|
// Do not unload about:* pages
|
||||||
if (!selectedTab.linkedBrowser?.currentURI.spec.startsWith('about:')) {
|
if (!selectedTab.linkedBrowser?.currentURI.spec.startsWith('about:')) {
|
||||||
gBrowser.explicitUnloadTabs([selectedTab]);
|
gZenTabUnloader.explicitUnloadTabs([selectedTab], { permitUnload });
|
||||||
selectedTab.removeAttribute('linkedpanel');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -235,9 +235,9 @@
|
||||||
this.explicitUnloadTabs(tabs);
|
this.explicitUnloadTabs(tabs);
|
||||||
}
|
}
|
||||||
|
|
||||||
explicitUnloadTabs(tabs) {
|
explicitUnloadTabs(tabs, extraArgs = {}) {
|
||||||
for (let i = 0; i < tabs.length; i++) {
|
for (let i = 0; i < tabs.length; i++) {
|
||||||
if (this.canUnloadTab(tabs[i], Date.now(), this.intervalUnloader.excludedUrls, true)) {
|
if (this.canUnloadTab(tabs[i], Date.now(), this.intervalUnloader.excludedUrls, true, extraArgs)) {
|
||||||
this.unload(tabs[i]);
|
this.unload(tabs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
canUnloadTab(tab, currentTimestamp, excludedUrls, ignoreTimestamp = false) {
|
canUnloadTab(tab, currentTimestamp, excludedUrls, ignoreTimestamp = false, extraArgs = {}) {
|
||||||
if (
|
if (
|
||||||
(tab.pinned && !ignoreTimestamp) ||
|
(tab.pinned && !ignoreTimestamp) ||
|
||||||
tab.selected ||
|
tab.selected ||
|
||||||
|
@ -271,6 +271,9 @@
|
||||||
tab.attention ||
|
tab.attention ||
|
||||||
tab.hasAttribute('glance-id') ||
|
tab.hasAttribute('glance-id') ||
|
||||||
tab.linkedBrowser?.zenModeActive ||
|
tab.linkedBrowser?.zenModeActive ||
|
||||||
|
(typeof extraArgs.permitUnload === 'undefined'
|
||||||
|
? !tab.linkedBrowser?.permitUnload()?.permitUnload
|
||||||
|
: !extraArgs.permitUnload) ||
|
||||||
(tab.pictureinpicture && !ignoreTimestamp) ||
|
(tab.pictureinpicture && !ignoreTimestamp) ||
|
||||||
(tab.soundPlaying && !ignoreTimestamp) ||
|
(tab.soundPlaying && !ignoreTimestamp) ||
|
||||||
(tab.zenIgnoreUnload && !ignoreTimestamp) ||
|
(tab.zenIgnoreUnload && !ignoreTimestamp) ||
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"binaryName": "zen",
|
"binaryName": "zen",
|
||||||
"version": {
|
"version": {
|
||||||
"product": "firefox",
|
"product": "firefox",
|
||||||
"version": "136.0.1",
|
"version": "136.0.2",
|
||||||
"candidate": "136.0.1"
|
"candidate": "136.0.2"
|
||||||
},
|
},
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"generateBranding": true
|
"generateBranding": true
|
||||||
|
@ -53,4 +53,4 @@
|
||||||
"licenseType": "MPL-2.0"
|
"licenseType": "MPL-2.0"
|
||||||
},
|
},
|
||||||
"updateHostname": "updates.zen-browser.app"
|
"updateHostname": "updates.zen-browser.app"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue