1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 20:39:59 +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:
mr. m 2025-03-18 15:46:13 +01:00
parent ad04961d19
commit 025f994c62
No known key found for this signature in database
GPG key ID: 419302196C23B258
8 changed files with 28 additions and 12 deletions

View file

@ -28,7 +28,7 @@
## 🖥️ 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`!
- Check out the latest [release notes](https://zen-browser.app/release-notes)!

View file

@ -1 +1 @@
6ad0ab3c43a6208d8bcd997b40e802fccd48ba0a
6013afe489c3d5e19c5f0d0f6c3f94b91f5bd7d1

View file

@ -64,6 +64,12 @@ def update_l10n_last_commit_hash():
if not os.path.exists("firefox-cache"):
os.mkdir("firefox-cache")
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:
print("Exiting...")
shutil.rmtree("l10n-temp")

View file

@ -360,7 +360,11 @@ menuitem {
& .zen-toast {
padding: 0.9rem 0.8rem;
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);
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
border: 1px solid rgba(0, 0, 0, 0.1);

View file

@ -269,7 +269,7 @@
}
#tabbrowser-tabs:not([movingtab]) & .tab-content > image:active {
scale: var(--zen-active-tab-scale);
scale: 0.92;
}
& .tab-icon-image {

View file

@ -510,6 +510,10 @@
case 'unload-switch':
case 'reset-switch':
case 'switch':
let { permitUnload } = selectedTab.linkedBrowser?.permitUnload();
if (!permitUnload) {
return;
}
this._handleTabSwitch(selectedTab);
if (behavior.includes('reset')) {
this._resetTabToStoredState(selectedTab);
@ -520,8 +524,7 @@
}
// Do not unload about:* pages
if (!selectedTab.linkedBrowser?.currentURI.spec.startsWith('about:')) {
gBrowser.explicitUnloadTabs([selectedTab]);
selectedTab.removeAttribute('linkedpanel');
gZenTabUnloader.explicitUnloadTabs([selectedTab], { permitUnload });
}
}
break;

View file

@ -235,9 +235,9 @@
this.explicitUnloadTabs(tabs);
}
explicitUnloadTabs(tabs) {
explicitUnloadTabs(tabs, extraArgs = {}) {
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]);
}
}
@ -259,7 +259,7 @@
}
}
canUnloadTab(tab, currentTimestamp, excludedUrls, ignoreTimestamp = false) {
canUnloadTab(tab, currentTimestamp, excludedUrls, ignoreTimestamp = false, extraArgs = {}) {
if (
(tab.pinned && !ignoreTimestamp) ||
tab.selected ||
@ -271,6 +271,9 @@
tab.attention ||
tab.hasAttribute('glance-id') ||
tab.linkedBrowser?.zenModeActive ||
(typeof extraArgs.permitUnload === 'undefined'
? !tab.linkedBrowser?.permitUnload()?.permitUnload
: !extraArgs.permitUnload) ||
(tab.pictureinpicture && !ignoreTimestamp) ||
(tab.soundPlaying && !ignoreTimestamp) ||
(tab.zenIgnoreUnload && !ignoreTimestamp) ||

View file

@ -5,8 +5,8 @@
"binaryName": "zen",
"version": {
"product": "firefox",
"version": "136.0.1",
"candidate": "136.0.1"
"version": "136.0.2",
"candidate": "136.0.2"
},
"buildOptions": {
"generateBranding": true
@ -53,4 +53,4 @@
"licenseType": "MPL-2.0"
},
"updateHostname": "updates.zen-browser.app"
}
}