diff --git a/README.md b/README.md index db459c12c..80b4ad75b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Zen is currently built using Firefox version `138.0.4`! 🚀 -- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 138.0.4`! +- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 139.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/build/firefox-cache/l10n-last-commit-hash b/build/firefox-cache/l10n-last-commit-hash index 5ec4a514c..714d02686 100644 --- a/build/firefox-cache/l10n-last-commit-hash +++ b/build/firefox-cache/l10n-last-commit-hash @@ -1 +1 @@ -f5fd58c29d2c9bfcc5dcfc8f4abbe69016e13b44 \ No newline at end of file +82a08ea3ce2d17f21f3d45f4b5607a37590b0158 \ No newline at end of file diff --git a/l10n b/l10n index 102a19cde..644474b8c 160000 --- a/l10n +++ b/l10n @@ -1 +1 @@ -Subproject commit 102a19cdee3cee5e6f963902f1546e61a0283954 +Subproject commit 644474b8c92e306288d835698eb6714081a650d8 diff --git a/package.json b/package.json index 09926cc0b..49f629c73 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,9 @@ "lint": "npx prettier . --check && autopep8 --diff scripts/ src/", "prepare": "husky", "reset-ff": "surfer reset", - "surfer": "surfer" + "surfer": "surfer", + "test": "python3 scripts/run_tests.py", + "test:dbg": "python3 scripts/run_tests.py --jsdebugger --debug-on-failure" }, "repository": { "type": "git", diff --git a/scripts/run_tests.py b/scripts/run_tests.py new file mode 100644 index 000000000..5f6ceaece --- /dev/null +++ b/scripts/run_tests.py @@ -0,0 +1,45 @@ +import os +import sys +import subprocess +from pathlib import Path + + +def main(): + project_root = Path(__file__).resolve().parent.parent + package_json = project_root / 'package.json' + + # Ensure script is run from project root + if not package_json.exists(): + print("Please run this script from the root of the project", file=sys.stderr) + sys.exit(1) + + args = sys.argv[1:] + path = "" + for arg in args: + if not arg.startswith("--"): + path = arg + break + + # Collect any additional arguments + other_args = [arg for arg in args if arg != path] + + engine_dir = project_root / 'engine' + os.chdir(engine_dir) + + def run_mach_with_paths(test_paths): + command = ['./mach', 'mochitest'] + other_args + test_paths + subprocess.run(command, check=True) + + if path in ("", "all"): + test_dirs = [p for p in Path("zen/tests").iterdir() if p.is_dir()] + test_paths = [str(p) for p in test_dirs] + run_mach_with_paths(test_paths) + else: + run_mach_with_paths([f"zen/tests/{path}"]) + + # Return to original directory + os.chdir(project_root) + + +if __name__ == "__main__": + main() diff --git a/src/Cargo-lock.patch b/src/Cargo-lock.patch index 14a1afd67..269e99681 100644 --- a/src/Cargo-lock.patch +++ b/src/Cargo-lock.patch @@ -1,8 +1,8 @@ diff --git a/Cargo.lock b/Cargo.lock -index 38508fffccbce801a02d4a4211f368674307c4d3..5ce56c36da2e242ad81621c2032eb68dcd26e960 100644 +index f7ebed9b2a71da90c5751cfd5d5f018cc8b73612..96e881c7782198f1e58be2578f167c7079a8191e 100644 --- a/Cargo.lock +++ b/Cargo.lock -@@ -3931,8 +3931,6 @@ dependencies = [ +@@ -4014,8 +4014,6 @@ dependencies = [ [[package]] name = "mime_guess" version = "2.0.4" diff --git a/src/Cargo-toml.patch b/src/Cargo-toml.patch index 841496923..2ac15f242 100644 --- a/src/Cargo-toml.patch +++ b/src/Cargo-toml.patch @@ -1,8 +1,8 @@ diff --git a/Cargo.toml b/Cargo.toml -index d3d529b487f80d4b4f3bfa13cdd3f62946352db8..b35a9e0e3339d48d1cd0cab7b22d030f330e40d1 100644 +index 8c6b99bc629ec26e01ab3746f2ae46174bfaa0b1..5791c7470923c7c15986089b40357ce80365e942 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -217,6 +217,9 @@ rure = { path = "third_party/rust/rure" } +@@ -233,6 +233,9 @@ rure = { path = "third_party/rust/rure" } # Patch `plist` to work with `indexmap` 2.* plist = { path = "third_party/rust/plist" } diff --git a/src/browser/actors/WebRTCParent-sys-mjs.patch b/src/browser/actors/WebRTCParent-sys-mjs.patch index 19e78d204..4b6a910a5 100644 --- a/src/browser/actors/WebRTCParent-sys-mjs.patch +++ b/src/browser/actors/WebRTCParent-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/actors/WebRTCParent.sys.mjs b/browser/actors/WebRTCParent.sys.mjs -index 40e3a057a1d4b2f9bcfb73fa5ff96b2555865434..a92bed06766dd930bd336d56cd9ddcf3c6c0eeca 100644 +index 4ed2dd19207fc38b9e5cc22ea2947aba94b2f5ad..ffc88d62dc46683399c68cdfd35f1b1efde70902 100644 --- a/browser/actors/WebRTCParent.sys.mjs +++ b/browser/actors/WebRTCParent.sys.mjs @@ -152,6 +152,7 @@ export class WebRTCParent extends JSWindowActorParent { diff --git a/src/browser/app/profile/browser.inc b/src/browser/app/profile/browser.inc index 5eec1f692..9774e4fdd 100644 --- a/src/browser/app/profile/browser.inc +++ b/src/browser/app/profile/browser.inc @@ -9,6 +9,9 @@ pref("browser.tabs.closeWindowWithLastTab", false); pref("browser.tabs.loadBookmarksInTabs", false); pref("browser.tabs.hoverPreview.enabled", false); pref("browser.tabs.dragdrop.moveOverThresholdPercent", 50); +pref("browser.tabs.unloadTabInContextMenu", true); +pref("browser.tabs.fadeOutExplicitlyUnloadedTabs", true); + pref('browser.toolbars.bookmarks.visibility', 'never'); pref("browser.bookmarks.openInTabClosesMenu", false); pref("browser.menu.showViewImageInfo", true); diff --git a/src/browser/app/profile/features.inc b/src/browser/app/profile/features.inc index 83993709f..c9d70b809 100644 --- a/src/browser/app/profile/features.inc +++ b/src/browser/app/profile/features.inc @@ -64,14 +64,6 @@ pref('zen.urlbar.show-domain-only-in-sidebar', true); pref('zen.urlbar.hide-one-offs', true); pref('zen.urlbar.enable-overrides', false); -// Exoerimental: Apply a blend mode to the websites so they can render rounded corners -// IMPORTANT: Remove once firefox 139 is released -#ifdef XP_MACOSX -pref('zen.view.experimental-rounded-view', false); -#else -pref('zen.view.experimental-rounded-view', true); -#endif - // Glance pref('zen.glance.enabled', true); pref('zen.glance.hold-duration', 300); // in ms @@ -99,18 +91,12 @@ pref('zen.view.grey-out-inactive-windows', true); pref('zen.view.hide-window-controls', true); pref('zen.view.experimental-no-window-controls', false); -pref('zen.tabs.dim-pending', true); - pref('zen.keyboard.shortcuts.enabled', true); pref('zen.keyboard.shortcuts.version', 0); // Empty string means default shortcuts pref('zen.keyboard.shortcuts.disable-mainkeyset-clear', false); // for debugging pref('zen.themes.updated-value-observer', false); -pref('zen.tab-unloader.enabled', true); -pref('zen.tab-unloader.timeout-minutes', 40); -pref('zen.tab-unloader.excluded-urls', "example.com,example.org"); - pref('zen.pinned-tab-manager.debug', false); pref('zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url', false); pref('zen.pinned-tab-manager.close-shortcut-behavior', 'reset-unload-switch'); diff --git a/src/browser/app/profile/firefox-js.patch b/src/browser/app/profile/firefox-js.patch index 714b3a3c4..edf869d4e 100644 --- a/src/browser/app/profile/firefox-js.patch +++ b/src/browser/app/profile/firefox-js.patch @@ -1,8 +1,8 @@ diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js -index eda8312b0edd34ed22c94c224167680ac6c9c459..56de47f79c553dab2676e127f5320e352b7d3a77 100644 +index beced8067e6c8b5c8cf8e3f6060ba259ec9a294d..33a264e7f9cf97944da3888bdb957fa6e7c4c346 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js -@@ -3377,3 +3377,5 @@ pref("toolkit.contentRelevancy.enabled", false); +@@ -3398,3 +3398,5 @@ pref("toolkit.contentRelevancy.enabled", false); pref("toolkit.contentRelevancy.ingestEnabled", false); // Pref to enable extra logging for the content relevancy feature pref("toolkit.contentRelevancy.log", false); diff --git a/src/browser/app/profile/performance.inc b/src/browser/app/profile/performance.inc index 58dda0f30..e590308e7 100644 --- a/src/browser/app/profile/performance.inc +++ b/src/browser/app/profile/performance.inc @@ -12,6 +12,19 @@ pref("gfx.canvas.accelerated", true); pref("media.hardware-video-decoding.enabled", true); pref("layers.gpu-process.enabled", true); +#ifdef XP_MACOSX +// Pref to control the reponse taken on macOS when the OS is under memory +// pressure. Changes to the pref take effect immediately. Browser restart not +// required. The pref value is a bitmask: +// 0x0: No response (other than recording for telemetry, crash reporting) +// 0x1: Use the tab unloading feature to reduce memory use. Requires that +// the above "browser.tabs.unloadOnLowMemory" pref be set to true for tab +// unloading to occur. +// 0x2: Issue the internal "memory-pressure" notification to reduce memory use +// 0x3: Both 0x1 and 0x2. +pref("browser.lowMemoryResponseMask", 3); +#endif + // Prefetching: pref("network.dns.disablePrefetch", false); pref("network.prefetch-next", true); diff --git a/src/browser/base/content/browser-js.patch b/src/browser/base/content/browser-js.patch index 6fb2a10e9..7baa95e01 100644 --- a/src/browser/base/content/browser-js.patch +++ b/src/browser/base/content/browser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js -index ea79d296e7dd0f8fd812b0677a252af5cf7ad26e..08568d90f888cc262a23ffaa72e985e7c3463b93 100644 +index 6d664917a5a3bb1cea8a747e42e8bc0065ec999e..5059293ebfa29d646455b7a3505bd6eae408ba64 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -33,6 +33,7 @@ ChromeUtils.defineESModuleGetters(this, { @@ -10,19 +10,18 @@ index ea79d296e7dd0f8fd812b0677a252af5cf7ad26e..08568d90f888cc262a23ffaa72e985e7 DevToolsSocketStatus: "resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs", DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs", -@@ -2338,6 +2339,11 @@ var XULBrowserWindow = { +@@ -2340,6 +2341,10 @@ var XULBrowserWindow = { AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser); TranslationsParent.onLocationChange(gBrowser.selectedBrowser); + gZenViewSplitter.onLocationChange(gBrowser.selectedBrowser); + gZenWorkspaces.onLocationChange(gBrowser.selectedBrowser); -+ gZenTabUnloader.onLocationChange(gBrowser.selectedBrowser); + gZenPinnedTabManager.onLocationChange(gBrowser.selectedBrowser); + PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser); if (!gMultiProcessBrowser) { -@@ -4814,7 +4820,7 @@ function switchToTabHavingURI( +@@ -4816,7 +4821,7 @@ function switchToTabHavingURI( ignoreQueryString || replaceQueryString, ignoreFragmentWhenComparing ); @@ -31,7 +30,7 @@ index ea79d296e7dd0f8fd812b0677a252af5cf7ad26e..08568d90f888cc262a23ffaa72e985e7 for (let i = 0; i < browsers.length; i++) { let browser = browsers[i]; let browserCompare = cleanURL( -@@ -4857,7 +4863,7 @@ function switchToTabHavingURI( +@@ -4859,7 +4864,7 @@ function switchToTabHavingURI( } if (!doAdopt) { diff --git a/src/browser/base/content/browser-xhtml.patch b/src/browser/base/content/browser-xhtml.patch index d0cb0ab80..223335125 100644 --- a/src/browser/base/content/browser-xhtml.patch +++ b/src/browser/base/content/browser-xhtml.patch @@ -1,5 +1,5 @@ diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml -index 51a25aaa5558e6e17246d54a7ed95d5ddf3ecdab..08809c25c01d159a9903f1921936b178d51f9875 100644 +index 8f8c5536cb6e54300897180ca3f950974c60e930..79305485631f14712d8b2674f477b641ec53fcd6 100644 --- a/browser/base/content/browser.xhtml +++ b/browser/base/content/browser.xhtml @@ -26,6 +26,7 @@ @@ -10,7 +10,7 @@ index 51a25aaa5558e6e17246d54a7ed95d5ddf3ecdab..08809c25c01d159a9903f1921936b178 persist="screenX screenY width height sizemode" data-l10n-sync="true">
-@@ -104,8 +105,11 @@ +@@ -105,8 +106,11 @@