Compare commits

..

No commits in common. "dev" and "new-share-api" have entirely different histories.

225 changed files with 3931 additions and 4632 deletions

View file

@ -5,9 +5,6 @@ on:
- cron: '59 4 * * 2' - cron: '59 4 * * 2'
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
jobs: jobs:
check_candidates: check_candidates:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -10,9 +10,6 @@ on:
branches: branches:
- dev - dev
permissions:
contents: read
jobs: jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -1,7 +1,4 @@
name: Monthly issue metrics name: Monthly issue metrics
permissions:
contents: write
issues: read
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:

View file

@ -1,6 +1,4 @@
name: macOS Release Build name: macOS Release Build
permissions:
contents: read
on: on:
workflow_call: workflow_call:

View file

@ -1,6 +1,4 @@
name: Pull request test name: Pull request test
permissions:
contents: read
on: on:
pull_request: pull_request:

View file

@ -1,8 +1,5 @@
name: Windows PGO Builds name: Windows PGO Builds
permissions:
contents: read
on: on:
workflow_call: workflow_call:
inputs: inputs:

View file

@ -1,8 +1,5 @@
name: Windows Release Build name: Windows Release Build
permissions:
contents: read
on: on:
workflow_call: workflow_call:
inputs: inputs:

View file

@ -9,8 +9,6 @@ engine/
**/*.svg **/*.svg
**/*.inc.css
surfer.json surfer.json
src/browser/app/profile/*.js src/browser/app/profile/*.js
@ -28,6 +26,4 @@ src/zen/tabs/zen-tabs.css
src/zen/compact-mode/zen-compact-mode.css src/zen/compact-mode/zen-compact-mode.css
src/zen/common/ZenEmojies.mjs src/zen/common/ZenEmojies.mjs
src/zen/workspaces/zen-workspaces.css
*.inc *.inc

31
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,31 @@
{
"files.associations": {
"*.inc": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"functional": "cpp",
"array": "cpp",
"*.tcc": "cpp",
"memory": "cpp",
"future": "cpp",
"istream": "cpp",
"tuple": "cpp",
"utility": "cpp",
"variant": "cpp",
"compare": "cpp",
"thread": "cpp",
"string": "cpp",
"string_view": "cpp",
"span": "cpp",
"vector": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"optional": "cpp",
"format": "cpp",
"ratio": "cpp",
"system_error": "cpp",
"regex": "cpp",
"type_traits": "cpp"
},
"git.ignoreLimitWarning": true
}

View file

@ -1 +0,0 @@
https://zen-browser.app/funding.json

View file

@ -1,4 +1,3 @@
<!-- TODO: Get a job -->
<img src="./docs/assets/zen-dark.svg" width="100px" align="left"> <img src="./docs/assets/zen-dark.svg" width="100px" align="left">
### `Zen Browser` ### `Zen Browser`
@ -29,9 +28,9 @@
## 🖥️ Compatibility ## 🖥️ Compatibility
Zen is currently built using Firefox version `139.0`! 🚀 Zen is currently built using Firefox version `138.0.1`! 🚀
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 139.0`! - [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 138.0.1`!
- Check out the latest [release notes](https://zen-browser.app/release-notes)! - 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! - 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!

View file

@ -1,5 +0,0 @@
# Security Policy
## Reporting a Vulnerability
Please report security vulnerabilities [here](https://github.com/zen-browser/desktop/security/advisories/new)

View file

@ -1 +1 @@
da30619f3ea895b356ded705b8dff9e4f271198f 8113a66aeeec42dca9739c7b742a3408cb5b7cf7

View file

@ -30,8 +30,8 @@ Start-Job -Name "DownloadGitl10n" -ScriptBlock {
Start-Job -Name "SurferInit" -ScriptBlock { Start-Job -Name "SurferInit" -ScriptBlock {
param($PWD) param($PWD)
cd $PWD cd $PWD
surfer -- ci --brand release
npm run import -- --verbose npm run import -- --verbose
npm run surfer -- ci --brand release
} -Verbose -ArgumentList $PWD -Debug } -Verbose -ArgumentList $PWD -Debug
echo "Downloading artifacts info" echo "Downloading artifacts info"

2
l10n

@ -1 +1 @@
Subproject commit ebecb32da8929e4f14f9a20f40acb9dab401101c Subproject commit 102a19cdee3cee5e6f963902f1546e61a0283954

8
package-lock.json generated
View file

@ -9,7 +9,7 @@
"version": "1.0.0", "version": "1.0.0",
"license": "MPL-2.0", "license": "MPL-2.0",
"dependencies": { "dependencies": {
"@zen-browser/surfer": "^1.11.13" "@zen-browser/surfer": "^1.11.12"
}, },
"devDependencies": { "devDependencies": {
"@babel/preset-typescript": "^7.27.0", "@babel/preset-typescript": "^7.27.0",
@ -817,9 +817,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@zen-browser/surfer": { "node_modules/@zen-browser/surfer": {
"version": "1.11.13", "version": "1.11.12",
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.11.13.tgz", "resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.11.12.tgz",
"integrity": "sha512-D0TyunAWYtTdJkuUkYeOc6VBXzE9aoDs58kWu/Oi/aU3vd8IbqXPbZZfYwj5FWPWDReMrJUNkkKAEdbL44y9aw==", "integrity": "sha512-wny52xOFvZe5aPXxLVxEcAzDNEiWWoDiCZFlzsNxkyQ5Lw6vzqroMWpjQPJwBRJOc/JssgiXMdd1uwl2LLnovQ==",
"license": "MPL-2.0", "license": "MPL-2.0",
"dependencies": { "dependencies": {
"@resvg/resvg-js": "^1.4.0", "@resvg/resvg-js": "^1.4.0",

View file

@ -8,7 +8,7 @@
"scripts": { "scripts": {
"build": "surfer build", "build": "surfer build",
"build:ui": "surfer build --ui", "build:ui": "surfer build --ui",
"start": "cd engine && ./mach run --noprofile", "start": "cd engine && ./mach run --noprofile --marionette",
"import": "surfer import", "import": "surfer import",
"export": "surfer export", "export": "surfer export",
"init": "npm run download && npm run bootstrap && npm run import", "init": "npm run download && npm run bootstrap && npm run import",
@ -23,9 +23,7 @@
"lint": "npx prettier . --check && autopep8 --diff scripts/ src/", "lint": "npx prettier . --check && autopep8 --diff scripts/ src/",
"prepare": "husky", "prepare": "husky",
"reset-ff": "surfer reset", "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": { "repository": {
"type": "git", "type": "git",
@ -42,7 +40,7 @@
}, },
"homepage": "https://github.com/zen-browser/desktop#readme", "homepage": "https://github.com/zen-browser/desktop#readme",
"dependencies": { "dependencies": {
"@zen-browser/surfer": "^1.11.13" "@zen-browser/surfer": "^1.11.12"
}, },
"devDependencies": { "devDependencies": {
"@babel/preset-typescript": "^7.27.0", "@babel/preset-typescript": "^7.27.0",

View file

@ -38,7 +38,7 @@ def get_rc_response() -> Optional[str]:
for tag_dict in data["tags"]: for tag_dict in data["tags"]:
tag = tag_dict["tag"] tag = tag_dict["tag"]
if (tag.startswith("FIREFOX") and tag.endswith("_BUILD1") if (tag.startswith("FIREFOX") and tag.endswith("_BUILD1")
and "ESR" not in tag and "b" not in tag and "ANDROID" not in tag): and "ESR" not in tag and "b" not in tag):
return (tag.replace("FIREFOX_", "").replace("_BUILD1", return (tag.replace("FIREFOX_", "").replace("_BUILD1",
"").replace("_", ".")) "").replace("_", "."))
except (FileNotFoundError, json.JSONDecodeError) as e: except (FileNotFoundError, json.JSONDecodeError) as e:

View file

@ -1,45 +0,0 @@
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()

View file

@ -1,8 +1,8 @@
diff --git a/Cargo.lock b/Cargo.lock diff --git a/Cargo.lock b/Cargo.lock
index f7ebed9b2a71da90c5751cfd5d5f018cc8b73612..96e881c7782198f1e58be2578f167c7079a8191e 100644 index 38508fffccbce801a02d4a4211f368674307c4d3..5ce56c36da2e242ad81621c2032eb68dcd26e960 100644
--- a/Cargo.lock --- a/Cargo.lock
+++ b/Cargo.lock +++ b/Cargo.lock
@@ -4014,8 +4014,6 @@ dependencies = [ @@ -3931,8 +3931,6 @@ dependencies = [
[[package]] [[package]]
name = "mime_guess" name = "mime_guess"
version = "2.0.4" version = "2.0.4"

View file

@ -1,8 +1,8 @@
diff --git a/Cargo.toml b/Cargo.toml diff --git a/Cargo.toml b/Cargo.toml
index 8c6b99bc629ec26e01ab3746f2ae46174bfaa0b1..5791c7470923c7c15986089b40357ce80365e942 100644 index d3d529b487f80d4b4f3bfa13cdd3f62946352db8..b35a9e0e3339d48d1cd0cab7b22d030f330e40d1 100644
--- a/Cargo.toml --- a/Cargo.toml
+++ b/Cargo.toml +++ b/Cargo.toml
@@ -233,6 +233,9 @@ rure = { path = "third_party/rust/rure" } @@ -217,6 +217,9 @@ rure = { path = "third_party/rust/rure" }
# Patch `plist` to work with `indexmap` 2.* # Patch `plist` to work with `indexmap` 2.*
plist = { path = "third_party/rust/plist" } plist = { path = "third_party/rust/plist" }

View file

@ -1,5 +1,5 @@
diff --git a/browser/actors/WebRTCParent.sys.mjs b/browser/actors/WebRTCParent.sys.mjs diff --git a/browser/actors/WebRTCParent.sys.mjs b/browser/actors/WebRTCParent.sys.mjs
index 4ed2dd19207fc38b9e5cc22ea2947aba94b2f5ad..ffc88d62dc46683399c68cdfd35f1b1efde70902 100644 index 40e3a057a1d4b2f9bcfb73fa5ff96b2555865434..a92bed06766dd930bd336d56cd9ddcf3c6c0eeca 100644
--- a/browser/actors/WebRTCParent.sys.mjs --- a/browser/actors/WebRTCParent.sys.mjs
+++ b/browser/actors/WebRTCParent.sys.mjs +++ b/browser/actors/WebRTCParent.sys.mjs
@@ -152,6 +152,7 @@ export class WebRTCParent extends JSWindowActorParent { @@ -152,6 +152,7 @@ export class WebRTCParent extends JSWindowActorParent {

View file

@ -9,14 +9,10 @@ pref("browser.tabs.closeWindowWithLastTab", false);
pref("browser.tabs.loadBookmarksInTabs", false); pref("browser.tabs.loadBookmarksInTabs", false);
pref("browser.tabs.hoverPreview.enabled", false); pref("browser.tabs.hoverPreview.enabled", false);
pref("browser.tabs.dragdrop.moveOverThresholdPercent", 50); pref("browser.tabs.dragdrop.moveOverThresholdPercent", 50);
pref("browser.tabs.unloadTabInContextMenu", true);
pref("browser.tabs.fadeOutExplicitlyUnloadedTabs", true);
pref('browser.toolbars.bookmarks.visibility', 'never'); pref('browser.toolbars.bookmarks.visibility', 'never');
pref("browser.bookmarks.openInTabClosesMenu", false); pref("browser.bookmarks.openInTabClosesMenu", false);
pref("browser.menu.showViewImageInfo", true); pref("browser.menu.showViewImageInfo", true);
pref("findbar.highlightAll", true); pref("findbar.highlightAll", true);
pref("layout.word_select.eat_space_to_next_word", false); pref("layout.word_select.eat_space_to_next_word", false);
// Better Windows theming // Better Windows theming

View file

@ -8,4 +8,3 @@ pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false); pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
pref("browser.preferences.moreFromMozilla", false, locked); pref("browser.preferences.moreFromMozilla", false, locked);
pref("browser.aboutwelcome.enabled", false); pref("browser.aboutwelcome.enabled", false);
pref("browser.contentblocking.report.show_mobile_app", false, locked);

View file

@ -19,20 +19,13 @@ pref('zen.view.show-newtab-button-top', true);
pref('zen.mediacontrols.enabled', true); pref('zen.mediacontrols.enabled', true);
// Exposure:
pref('zen.haptic-feedback.enabled', true);
pref('zen.mods.auto-update-days', 20); // In days
#ifdef MOZILLA_OFFICIAL #ifdef MOZILLA_OFFICIAL
pref('zen.mods.auto-update', true);
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked); pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
pref('zen.injections.match-urls', 'https://zen-browser.app/*,https://share.zen-browser.app/*', locked); pref('zen.injections.match-urls', 'https://zen-browser.app/*,https://share.zen-browser.app/*', locked);
#else #else
pref('zen.mods.auto-update', false);
pref('zen.rice.api.url', "http://localhost", locked); pref('zen.rice.api.url', "http://localhost", locked);
pref('zen.injections.match-urls', 'http://localhost/*', locked); pref('zen.injections.match-urls', 'http://localhost/*', locked);
#endif #endif
pref('zen.rice.share.notice.accepted', false); pref('zen.rice.share.notice.accepted', false);
#ifdef XP_MACOSX #ifdef XP_MACOSX
@ -41,12 +34,6 @@ pref('zen.theme.border-radius', 10); // In pixels
pref('zen.theme.border-radius', 8); // In pixels pref('zen.theme.border-radius', 8); // In pixels
#endif #endif
#ifdef XP_MACOSX
pref('zen.theme.acrylic-elements', false);
#else
pref('zen.theme.acrylic-elements', false);
#endif
pref('zen.theme.color-prefs.use-workspace-colors', true); pref('zen.theme.color-prefs.use-workspace-colors', true);
pref('zen.view.compact.hide-tabbar', true); pref('zen.view.compact.hide-tabbar', true);
@ -68,6 +55,14 @@ pref('zen.urlbar.show-domain-only-in-sidebar', true);
pref('zen.urlbar.hide-one-offs', true); pref('zen.urlbar.hide-one-offs', true);
pref('zen.urlbar.enable-overrides', false); 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 // Glance
pref('zen.glance.enabled', true); pref('zen.glance.enabled', true);
pref('zen.glance.hold-duration', 300); // in ms pref('zen.glance.hold-duration', 300); // in ms
@ -95,12 +90,18 @@ pref('zen.view.grey-out-inactive-windows', true);
pref('zen.view.hide-window-controls', true); pref('zen.view.hide-window-controls', true);
pref('zen.view.experimental-no-window-controls', false); pref('zen.view.experimental-no-window-controls', false);
pref('zen.tabs.dim-pending', true);
pref('zen.keyboard.shortcuts.enabled', true); pref('zen.keyboard.shortcuts.enabled', true);
pref('zen.keyboard.shortcuts.version', 0); // Empty string means default shortcuts pref('zen.keyboard.shortcuts.version', 0); // Empty string means default shortcuts
pref('zen.keyboard.shortcuts.disable-mainkeyset-clear', false); // for debugging pref('zen.keyboard.shortcuts.disable-mainkeyset-clear', false); // for debugging
pref('zen.themes.updated-value-observer', false); 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.debug', false);
pref('zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url', false); pref('zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url', false);
pref('zen.pinned-tab-manager.close-shortcut-behavior', 'reset-unload-switch'); pref('zen.pinned-tab-manager.close-shortcut-behavior', 'reset-unload-switch');

View file

@ -1,8 +1,8 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index beced8067e6c8b5c8cf8e3f6060ba259ec9a294d..33a264e7f9cf97944da3888bdb957fa6e7c4c346 100644 index 89b8b830e8f53582dd9910b0172098d31a8d8967..51bdc847823cb95f811b7e9d2d864b9aacf0e364 100644
--- a/browser/app/profile/firefox.js --- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js
@@ -3398,3 +3398,5 @@ pref("toolkit.contentRelevancy.enabled", false); @@ -3375,3 +3375,5 @@ pref("toolkit.contentRelevancy.enabled", false);
pref("toolkit.contentRelevancy.ingestEnabled", false); pref("toolkit.contentRelevancy.ingestEnabled", false);
// Pref to enable extra logging for the content relevancy feature // Pref to enable extra logging for the content relevancy feature
pref("toolkit.contentRelevancy.log", false); pref("toolkit.contentRelevancy.log", false);

View file

@ -12,19 +12,6 @@ pref("gfx.canvas.accelerated", true);
pref("media.hardware-video-decoding.enabled", true); pref("media.hardware-video-decoding.enabled", true);
pref("layers.gpu-process.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: // Prefetching:
pref("network.dns.disablePrefetch", false); pref("network.dns.disablePrefetch", false);
pref("network.prefetch-next", true); pref("network.prefetch-next", true);

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js
index f6e1391baf12abb91c85a95107bb3923118746c0..cac04aa288e8a305d0c8b28e0c919abce87658e5 100644 index f6e1391baf12abb91c85a95107bb3923118746c0..76c7b75a4e29056110f1631a50047c4ddd8b1f4a 100644
--- a/browser/base/content/aboutDialog.js --- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js +++ b/browser/base/content/aboutDialog.js
@@ -52,7 +52,7 @@ function init() { @@ -52,7 +52,7 @@ function init() {
@ -20,18 +20,3 @@ index f6e1391baf12abb91c85a95107bb3923118746c0..cac04aa288e8a305d0c8b28e0c919abc
versionIdKey += "-nightly"; versionIdKey += "-nightly";
let buildID = Services.appinfo.appBuildID; let buildID = Services.appinfo.appBuildID;
let year = buildID.slice(0, 4); let year = buildID.slice(0, 4);
@@ -125,14 +125,6 @@ function init() {
window.close();
});
if (AppConstants.MOZ_UPDATER) {
- document
- .getElementById("aboutDialogHelpLink")
- .addEventListener("click", () => {
- openHelpLink("firefox-help");
- });
- document
- .getElementById("submit-feedback")
- .addEventListener("click", openFeedbackPage);
document
.getElementById("checkForUpdatesButton")
.addEventListener("command", () => {

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
index c64980810570fcea84e33fdc2d66ac42a79f4e46..6ef9bf4b88f0a0539d833f662c4dd890fd1fde93 100644 index c64980810570fcea84e33fdc2d66ac42a79f4e46..b7198e810a7510fa82cc6801cfd01c88a08d42c1 100644
--- a/browser/base/content/aboutDialog.xhtml --- a/browser/base/content/aboutDialog.xhtml
+++ b/browser/base/content/aboutDialog.xhtml +++ b/browser/base/content/aboutDialog.xhtml
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
@ -10,18 +10,7 @@ index c64980810570fcea84e33fdc2d66ac42a79f4e46..6ef9bf4b88f0a0539d833f662c4dd890
</linkset> </linkset>
<html:div id="aboutDialogContainer"> <html:div id="aboutDialogContainer">
@@ -102,10 +103,6 @@ @@ -125,21 +126,23 @@
<label id="version" class="update"/>
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
</hbox>
- <description class="text-blurb">
- <label id="aboutDialogHelpLink" is="text-link" data-l10n-id="aboutdialog-help-user"/>
- <label id="submit-feedback" is="text-link" data-l10n-id="aboutdialog-submit-feedback"/>
- </description>
</vbox>
#endif
</hbox>
@@ -125,21 +122,17 @@
</description> </description>
</vbox> </vbox>
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2"> <description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
@ -29,10 +18,12 @@ index c64980810570fcea84e33fdc2d66ac42a79f4e46..6ef9bf4b88f0a0539d833f662c4dd890
+ <label is="text-link" href="https://github.com/zen-browser/desktop" data-l10n-name="community-mozillaLink"/> + <label is="text-link" href="https://github.com/zen-browser/desktop" data-l10n-name="community-mozillaLink"/>
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/> <label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
</description> </description>
- <description class="text-blurb" id="contributeDesc" data-l10n-id="helpus"> +#if 0
- <label is="text-link" href="https://foundation.mozilla.org/?form=firefox-about" data-l10n-name="helpus-donateLink"/> <description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
- <label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/> <label is="text-link" href="https://foundation.mozilla.org/?form=firefox-about" data-l10n-name="helpus-donateLink"/>
- </description> <label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
</description>
+#endif
</vbox> </vbox>
</vbox> </vbox>
</hbox> </hbox>

View file

@ -0,0 +1,15 @@
diff --git a/browser/base/content/appmenu-viewcache.inc.xhtml b/browser/base/content/appmenu-viewcache.inc.xhtml
index 3c5c4f29b1de25a4ce17089502f2251a27e5c7f5..dfa3260ed3c2bb6067745696fbf103c7e56c639a 100644
--- a/browser/base/content/appmenu-viewcache.inc.xhtml
+++ b/browser/base/content/appmenu-viewcache.inc.xhtml
@@ -421,6 +421,10 @@
class="subviewbutton"
data-l10n-id="appmenu-customizetoolbar"
command="cmd_CustomizeToolbars"/>
+ <toolbarbutton id="appmenu-zen-share-rice"
+ class="subviewbutton"
+ data-l10n-id="appmenu-zen-share-rice"
+ oncommand="gZenThemePicker.shareTheme()" />
<toolbarseparator/>
<html:h2 id="appmenu-developer-tools"
data-l10n-id="appmenu-developer-tools-subheader"

View file

@ -1,35 +1,8 @@
diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js
index 73593191936cc345ee8e2c28cb251dc13f4c2fd4..e6c459c1ebc60a1f3930a55e212570f696bf07a0 100644 index 992d07daaef1abc4554a43aa654888f66963c575..73e620b70b7ed14e9d140e875c2cd5f5ac31456b 100644
--- a/browser/base/content/browser-addons.js --- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js +++ b/browser/base/content/browser-addons.js
@@ -735,7 +735,7 @@ var gXPInstallObserver = { @@ -2105,18 +2105,20 @@ var gUnifiedExtensions = {
persistent: true,
hideClose: true,
popupOptions: {
- position: "bottomright topright",
+ position: gZenUIManager.panelUIPosition,
},
};
@@ -942,7 +942,7 @@ var gXPInstallObserver = {
hideClose: true,
timeout: Date.now() + 30000,
popupOptions: {
- position: "bottomright topright",
+ position: gZenUIManager.panelUIPosition,
},
};
@@ -2125,7 +2125,7 @@ var gUnifiedExtensions = {
panel.hidden = false;
PanelMultiView.openPopup(panel, this._button, {
- position: "bottomright topright",
+ position: gZenUIManager.panelUIPosition,
triggerEvent: aEvent,
});
}
@@ -2294,18 +2294,20 @@ var gUnifiedExtensions = {
this._maybeMoveWidgetNodeBack(widgetId); this._maybeMoveWidgetNodeBack(widgetId);
} }

View file

@ -1,15 +1,13 @@
diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml
index 7d7e8697f02f90d4f336c9ab0a73a89848e0c21c..64e950106dd05b443ce72107613ac9cc405d56ea 100644 index 7d7e8697f02f90d4f336c9ab0a73a89848e0c21c..d113b439888d26629ce5f6b5d35f8fa12249774b 100644
--- a/browser/base/content/browser-box.inc.xhtml --- a/browser/base/content/browser-box.inc.xhtml
+++ b/browser/base/content/browser-box.inc.xhtml +++ b/browser/base/content/browser-box.inc.xhtml
@@ -23,7 +23,15 @@ @@ -23,7 +23,13 @@
<browser id="sidebar" autoscroll="false" disablehistory="true" disablefullscreen="true" tooltip="aHTMLTooltip"/> <browser id="sidebar" autoscroll="false" disablehistory="true" disablefullscreen="true" tooltip="aHTMLTooltip"/>
</vbox> </vbox>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/> <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
+<vbox flex="1" id="zen-appcontent-wrapper"> +<vbox flex="1" id="zen-appcontent-wrapper">
+ <html:div id="zen-appcontent-navbar-wrapper"> + <html:div id="zen-appcontent-navbar-container"></html:div>
+ <html:div id="zen-appcontent-navbar-container"></html:div>
+ </html:div>
+ <hbox id="zen-tabbox-wrapper" flex="1"> + <hbox id="zen-tabbox-wrapper" flex="1">
<tabbox id="tabbrowser-tabbox" flex="1" tabcontainer="tabbrowser-tabs"> <tabbox id="tabbrowser-tabbox" flex="1" tabcontainer="tabbrowser-tabs">
+#include zen-tabbrowser-elements.inc.xhtml +#include zen-tabbrowser-elements.inc.xhtml

View file

@ -15,7 +15,7 @@ index 3d5173315812589c0b79beec5f0419fc37cb8868..c4216db9e414fbbaead6ecd89b40366b
TelemetryTimestamps.add("delayedStartupStarted"); TelemetryTimestamps.add("delayedStartupStarted");
this._cancelDelayedStartup(); this._cancelDelayedStartup();
+ gZenWorkspaces.afterLoadInit(); + ZenWorkspaces.afterLoadInit();
gBrowser.addEventListener( gBrowser.addEventListener(
"PermissionStateChange", "PermissionStateChange",

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 6d664917a5a3bb1cea8a747e42e8bc0065ec999e..5059293ebfa29d646455b7a3505bd6eae408ba64 100644 index ea79d296e7dd0f8fd812b0677a252af5cf7ad26e..bd95ef5d6b99399c859af1cf71d9d62477f4ac2b 100644
--- a/browser/base/content/browser.js --- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js +++ b/browser/base/content/browser.js
@@ -33,6 +33,7 @@ ChromeUtils.defineESModuleGetters(this, { @@ -33,6 +33,7 @@ ChromeUtils.defineESModuleGetters(this, {
@ -10,32 +10,33 @@ index 6d664917a5a3bb1cea8a747e42e8bc0065ec999e..5059293ebfa29d646455b7a3505bd6ea
DevToolsSocketStatus: DevToolsSocketStatus:
"resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs", "resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs", DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
@@ -2340,6 +2341,10 @@ var XULBrowserWindow = { @@ -2338,6 +2339,11 @@ var XULBrowserWindow = {
AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser); AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser);
TranslationsParent.onLocationChange(gBrowser.selectedBrowser); TranslationsParent.onLocationChange(gBrowser.selectedBrowser);
+ gZenViewSplitter.onLocationChange(gBrowser.selectedBrowser); + gZenViewSplitter.onLocationChange(gBrowser.selectedBrowser);
+ gZenWorkspaces.onLocationChange(gBrowser.selectedBrowser); + ZenWorkspaces.onLocationChange(gBrowser.selectedBrowser);
+ gZenTabUnloader.onLocationChange(gBrowser.selectedBrowser);
+ gZenPinnedTabManager.onLocationChange(gBrowser.selectedBrowser); + gZenPinnedTabManager.onLocationChange(gBrowser.selectedBrowser);
+ +
PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser); PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser);
if (!gMultiProcessBrowser) { if (!gMultiProcessBrowser) {
@@ -4816,7 +4821,7 @@ function switchToTabHavingURI( @@ -4814,7 +4820,7 @@ function switchToTabHavingURI(
ignoreQueryString || replaceQueryString, ignoreQueryString || replaceQueryString,
ignoreFragmentWhenComparing ignoreFragmentWhenComparing
); );
- let browsers = aWindow.gBrowser.browsers; - let browsers = aWindow.gBrowser.browsers;
+ let browsers = aWindow.gZenWorkspaces.allUsedBrowsers; + let browsers = aWindow.ZenWorkspaces.allUsedBrowsers;
for (let i = 0; i < browsers.length; i++) { for (let i = 0; i < browsers.length; i++) {
let browser = browsers[i]; let browser = browsers[i];
let browserCompare = cleanURL( let browserCompare = cleanURL(
@@ -4859,7 +4864,7 @@ function switchToTabHavingURI( @@ -4857,7 +4863,7 @@ function switchToTabHavingURI(
} }
if (!doAdopt) { if (!doAdopt) {
- aWindow.gBrowser.tabContainer.selectedIndex = i; - aWindow.gBrowser.tabContainer.selectedIndex = i;
+ aWindow.gZenWorkspaces.switchIfNeeded(browser, i); + aWindow.ZenWorkspaces.switchIfNeeded(browser, i);
} }
return true; return true;

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
index 8f8c5536cb6e54300897180ca3f950974c60e930..79305485631f14712d8b2674f477b641ec53fcd6 100644 index 51a25aaa5558e6e17246d54a7ed95d5ddf3ecdab..08809c25c01d159a9903f1921936b178d51f9875 100644
--- a/browser/base/content/browser.xhtml --- a/browser/base/content/browser.xhtml
+++ b/browser/base/content/browser.xhtml +++ b/browser/base/content/browser.xhtml
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
@ -10,7 +10,7 @@ index 8f8c5536cb6e54300897180ca3f950974c60e930..79305485631f14712d8b2674f477b641
persist="screenX screenY width height sizemode" persist="screenX screenY width height sizemode"
data-l10n-sync="true"> data-l10n-sync="true">
<head> <head>
@@ -105,8 +106,11 @@ @@ -104,8 +105,11 @@
<title data-l10n-id="browser-main-window-default-title"></title> <title data-l10n-id="browser-main-window-default-title"></title>
@ -22,7 +22,7 @@ index 8f8c5536cb6e54300897180ca3f950974c60e930..79305485631f14712d8b2674f477b641
</head> </head>
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
# All sets except for popupsets (commands, keys, and stringbundles) # All sets except for popupsets (commands, keys, and stringbundles)
@@ -128,9 +132,11 @@ @@ -127,9 +131,11 @@
</vbox> </vbox>
</html:template> </html:template>

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
index 00c8976d3e258c0875d7da2f3ec823d8907a84c9..cc61d5a845b5ce22a61f5a1aab8b280b2bcdf101 100644 index 00c8976d3e258c0875d7da2f3ec823d8907a84c9..b5735712aaa7c2ae2baa4b858e735413b130ca94 100644
--- a/browser/base/content/navigator-toolbox.inc.xhtml --- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml +++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
@ -22,24 +22,27 @@ index 00c8976d3e258c0875d7da2f3ec823d8907a84c9..cc61d5a845b5ce22a61f5a1aab8b280b
<toolbar id="TabsToolbar" <toolbar id="TabsToolbar"
class="browser-toolbar browser-titlebar" class="browser-toolbar browser-titlebar"
fullscreentoolbar="true" fullscreentoolbar="true"
@@ -50,6 +50,8 @@ @@ -50,6 +50,10 @@
tooltip="tabbrowser-tab-tooltip" tooltip="tabbrowser-tab-tooltip"
orient="horizontal" orient="horizontal"
stopwatchid="tabClick"> stopwatchid="tabClick">
+<html:div id="zen-essentials" skipintoolbarset="true"></html:div> +<html:div id="zen-essentials-wrapper" skipintoolbarset="true"></html:div>
+<hbox id="zen-current-workspace-indicator-container"></hbox>
+<html:div id="zen-tabs-wrapper"> +<html:div id="zen-tabs-wrapper">
+<html:div id="zen-browser-tabs-container">
<hbox class="tab-drop-indicator" hidden="true"/> <hbox class="tab-drop-indicator" hidden="true"/>
<html:span id="tab-drag-empty-feedback" role="presentation"/> <html:span id="tab-drag-empty-feedback" role="presentation"/>
# If the name (tabbrowser-arrowscrollbox) or structure of this changes # If the name (tabbrowser-arrowscrollbox) or structure of this changes
@@ -76,6 +78,7 @@ @@ -76,6 +80,8 @@
tooltip="dynamic-shortcut-tooltip" tooltip="dynamic-shortcut-tooltip"
data-l10n-id="tabs-toolbar-new-tab"/> data-l10n-id="tabs-toolbar-new-tab"/>
<html:span id="tabbrowser-tab-a11y-desc" hidden="true"/> <html:span id="tabbrowser-tab-a11y-desc" hidden="true"/>
+</html:div>
+</html:div> +</html:div>
</tabs> </tabs>
<toolbarbutton id="new-tab-button" <toolbarbutton id="new-tab-button"
@@ -101,9 +104,10 @@ @@ -101,9 +107,10 @@
#include private-browsing-indicator.inc.xhtml #include private-browsing-indicator.inc.xhtml
<toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/> <toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/>

View file

@ -29,15 +29,19 @@
</linkset> </linkset>
# Scripts used all over the browser # Scripts used all over the browser
<script src="chrome://browser/content/ZenUIManager.mjs"></script> <script>
<script src="chrome://browser/content/zen-components/ZenFolders.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/ZenUIManager.mjs", this);
<script src="chrome://browser/content/zen-components/ZenMods.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenFolders.mjs", this);
<script src="chrome://browser/content/zen-components/ZenCompactMode.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesCommon.mjs", this);
<script src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesImporter.mjs", this);
<script src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCompactMode.mjs", this);
<script src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenTabUnloader.mjs", this);
<script src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs", this);
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs", this);
<script src="chrome://browser/content/zen-components/ZenGlanceManager.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenPinnedTabManager.mjs", this);
<script src="chrome://browser/content/zen-components/ZenMediaController.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenGradientGenerator.mjs", this);
<script src="chrome://browser/content/zen-components/ZenDownloadAnimation.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenViewSplitter.mjs", this);
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenGlanceManager.mjs", this);
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenMediaController.mjs", this);
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenDownloadAnimation.mjs", this);
</script>

View file

@ -9,7 +9,6 @@
content/browser/ZenCustomizableUI.sys.mjs (../../zen/common/ZenCustomizableUI.sys.mjs) content/browser/ZenCustomizableUI.sys.mjs (../../zen/common/ZenCustomizableUI.sys.mjs)
content/browser/zen-components/ZenUIMigration.mjs (../../zen/common/ZenUIMigration.mjs) content/browser/zen-components/ZenUIMigration.mjs (../../zen/common/ZenUIMigration.mjs)
content/browser/zen-components/ZenCommonUtils.mjs (../../zen/common/ZenCommonUtils.mjs) content/browser/zen-components/ZenCommonUtils.mjs (../../zen/common/ZenCommonUtils.mjs)
content/browser/zen-components/ZenSessionStore.mjs (../../zen/common/ZenSessionStore.mjs)
content/browser/zen-styles/zen-theme.css (../../zen/common/styles/zen-theme.css) content/browser/zen-styles/zen-theme.css (../../zen/common/styles/zen-theme.css)
content/browser/zen-styles/zen-buttons.css (../../zen/common/styles/zen-buttons.css) content/browser/zen-styles/zen-buttons.css (../../zen/common/styles/zen-buttons.css)
@ -35,19 +34,21 @@
content/browser/zen-components/ZenViewSplitter.mjs (../../zen/split-view/ZenViewSplitter.mjs) content/browser/zen-components/ZenViewSplitter.mjs (../../zen/split-view/ZenViewSplitter.mjs)
content/browser/zen-styles/zen-decks.css (../../zen/split-view/zen-decks.css) content/browser/zen-styles/zen-decks.css (../../zen/split-view/zen-decks.css)
content/browser/zen-components/ZenMods.mjs (../../zen/mods/ZenMods.mjs) content/browser/zen-components/ZenThemesCommon.mjs (../../zen/mods/ZenThemesCommon.mjs)
content/browser/zen-components/ZenThemesImporter.mjs (../../zen/mods/ZenThemesImporter.mjs)
content/browser/zen-components/actors/ZenThemeMarketplaceParent.sys.mjs (../../zen/mods/actors/ZenThemeMarketplaceParent.sys.mjs)
content/browser/zen-components/actors/ZenThemeMarketplaceChild.sys.mjs (../../zen/mods/actors/ZenThemeMarketplaceChild.sys.mjs)
content/browser/zen-components/ZenWorkspaceIcons.mjs (../../zen/workspaces/ZenWorkspaceIcons.mjs)
content/browser/zen-components/ZenWorkspace.mjs (../../zen/workspaces/ZenWorkspace.mjs)
content/browser/zen-components/ZenWorkspaces.mjs (../../zen/workspaces/ZenWorkspaces.mjs) content/browser/zen-components/ZenWorkspaces.mjs (../../zen/workspaces/ZenWorkspaces.mjs)
content/browser/zen-components/ZenWorkspacesStorage.mjs (../../zen/workspaces/ZenWorkspacesStorage.mjs) content/browser/zen-components/ZenWorkspacesStorage.mjs (../../zen/workspaces/ZenWorkspacesStorage.mjs)
content/browser/zen-components/ZenWorkspacesSync.mjs (../../zen/workspaces/ZenWorkspacesSync.mjs) content/browser/zen-components/ZenWorkspacesSync.mjs (../../zen/workspaces/ZenWorkspacesSync.mjs)
content/browser/zen-components/ZenGradientGenerator.mjs (../../zen/workspaces/ZenGradientGenerator.mjs) content/browser/zen-components/ZenGradientGenerator.mjs (../../zen/workspaces/ZenGradientGenerator.mjs)
* content/browser/zen-styles/zen-workspaces.css (../../zen/workspaces/zen-workspaces.css) content/browser/zen-styles/zen-workspaces.css (../../zen/workspaces/zen-workspaces.css)
content/browser/zen-styles/zen-gradient-generator.css (../../zen/workspaces/zen-gradient-generator.css) content/browser/zen-styles/zen-gradient-generator.css (../../zen/workspaces/zen-gradient-generator.css)
content/browser/zen-components/ZenKeyboardShortcuts.mjs (../../zen/kbs/ZenKeyboardShortcuts.mjs) content/browser/zen-components/ZenKeyboardShortcuts.mjs (../../zen/kbs/ZenKeyboardShortcuts.mjs)
content/browser/zen-components/ZenTabUnloader.mjs (../../zen/tabs/ZenTabUnloader.mjs)
content/browser/zen-components/ZenPinnedTabsStorage.mjs (../../zen/tabs/ZenPinnedTabsStorage.mjs) content/browser/zen-components/ZenPinnedTabsStorage.mjs (../../zen/tabs/ZenPinnedTabsStorage.mjs)
content/browser/zen-components/ZenPinnedTabManager.mjs (../../zen/tabs/ZenPinnedTabManager.mjs) content/browser/zen-components/ZenPinnedTabManager.mjs (../../zen/tabs/ZenPinnedTabManager.mjs)
* content/browser/zen-styles/zen-tabs.css (../../zen/tabs/zen-tabs.css) * content/browser/zen-styles/zen-tabs.css (../../zen/tabs/zen-tabs.css)
@ -55,6 +56,8 @@
content/browser/zen-components/ZenGlanceManager.mjs (../../zen/glance/ZenGlanceManager.mjs) content/browser/zen-components/ZenGlanceManager.mjs (../../zen/glance/ZenGlanceManager.mjs)
content/browser/zen-styles/zen-glance.css (../../zen/glance/zen-glance.css) content/browser/zen-styles/zen-glance.css (../../zen/glance/zen-glance.css)
content/browser/zen-components/actors/ZenGlanceChild.sys.mjs (../../zen/glance/actors/ZenGlanceChild.sys.mjs)
content/browser/zen-components/actors/ZenGlanceParent.sys.mjs (../../zen/glance/actors/ZenGlanceParent.sys.mjs)
content/browser/zen-components/ZenFolders.mjs (../../zen/folders/ZenFolders.mjs) content/browser/zen-components/ZenFolders.mjs (../../zen/folders/ZenFolders.mjs)
content/browser/zen-styles/zen-folders.css (../../zen/folders/zen-folders.css) content/browser/zen-styles/zen-folders.css (../../zen/folders/zen-folders.css)
@ -70,7 +73,7 @@
content/browser/zen-styles/zen-download-box-animation.css (../../zen/downloads/zen-download-box-animation.css) content/browser/zen-styles/zen-download-box-animation.css (../../zen/downloads/zen-download-box-animation.css)
# Images # Images
content/browser/zen-images/gradient.png (../../zen/images/gradient.png) content/browser/zen-images/gradient.png (../../zen/images/gradient.png)
content/browser/zen-images/brand-header.svg (../../zen/images/brand-header.svg) content/browser/zen-images/brand-header.svg (../../zen/images/brand-header.svg)
content/browser/zen-images/layouts/collapsed.png (../../zen/images/layouts/collapsed.png) content/browser/zen-images/layouts/collapsed.png (../../zen/images/layouts/collapsed.png)
@ -82,7 +85,7 @@
content/browser/zen-images/downloads/download.svg (../../zen/images/downloads/download.svg) content/browser/zen-images/downloads/download.svg (../../zen/images/downloads/download.svg)
content/browser/zen-images/downloads/archive.svg (../../zen/images/downloads/archive.svg) content/browser/zen-images/downloads/archive.svg (../../zen/images/downloads/archive.svg)
# Fonts # Fonts
content/browser/zen-fonts/JunicodeVF-Italic.woff2 (../../zen/fonts/JunicodeVF-Italic.woff2) content/browser/zen-fonts/JunicodeVF-Italic.woff2 (../../zen/fonts/JunicodeVF-Italic.woff2)
content/browser/zen-fonts/JunicodeVF-Roman.woff2 (../../zen/fonts/JunicodeVF-Roman.woff2) content/browser/zen-fonts/JunicodeVF-Roman.woff2 (../../zen/fonts/JunicodeVF-Roman.woff2)
@ -100,4 +103,4 @@
content/browser/zen-images/favicons/slack.ico (../../zen/images/favicons/slack.ico) content/browser/zen-images/favicons/slack.ico (../../zen/images/favicons/slack.ico)
content/browser/zen-images/favicons/reddit.ico (../../zen/images/favicons/reddit.ico) content/browser/zen-images/favicons/reddit.ico (../../zen/images/favicons/reddit.ico)
content/browser/zen-images/favicons/x.ico (../../zen/images/favicons/x.ico) content/browser/zen-images/favicons/x.ico (../../zen/images/favicons/x.ico)
content/browser/zen-images/favicons/trello.ico (../../zen/images/favicons/trello.ico) content/browser/zen-images/favicons/trello.ico (../../zen/images/favicons/trello.ico)

View file

@ -43,6 +43,10 @@
<command id="cmd_zenCopyCurrentURL" /> <command id="cmd_zenCopyCurrentURL" />
<command id="cmd_zenCopyCurrentURLMarkdown" /> <command id="cmd_zenCopyCurrentURLMarkdown" />
<command id="cmd_zenUnloadTab" />
<command id="cmd_zenPreventUnloadTab" />
<command id="cmd_zenIgnoreUnloadTab" />
</commandset> </commandset>
<keyset id="zenKeyset"></keyset> <keyset id="zenKeyset"></keyset>

View file

@ -1,13 +1,11 @@
# This needs to be here, before all the other scripts, because it's used before # This needs to be here, before all the other scripts, because it's used before
# the window is fully loaded. # the window is fully loaded.
# Make sure they are loaded before the global-scripts.inc file. # Make sure they are loaded before the global-scripts.inc file.
<script type="text/javascript" src="chrome://browser/content/zen-sets.js"></script> <script type="text/javascript">
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenCommonUtils.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-sets.js", this);
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCommonUtils.mjs", this);
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspaceIcons.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs", this);
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspace.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspaces.mjs", this);
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspaces.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesSync.mjs", this);
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspacesSync.mjs"></script> Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenActorsManager.mjs", this);
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenActorsManager.mjs"></script> </script>
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenSessionStore.mjs"></script>

View file

@ -2,12 +2,12 @@
<toolbar brighttext="true" <toolbar brighttext="true"
id="zen-sidebar-bottom-buttons" id="zen-sidebar-bottom-buttons"
fullscreentoolbar="true" fullscreentoolbar="true"
class="browser-toolbar customization-target" class="browser-toolbar customization-target zen-dont-hide-on-fullscreen"
data-l10n-id="tabs-toolbar" data-l10n-id="tabs-toolbar"
customizable="true" customizable="true"
skipintoolbarset="true" skipintoolbarset="true"
context="toolbar-context-menu" context="toolbar-context-menu"
mode="icons"> mode="icons">
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" command="cmd_zenToggleSidebar" data-l10n-id="sidebar-zen-expand"></toolbarbutton> <toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" command="cmd_zenToggleSidebar" data-l10n-id="sidebar-zen-expand"></toolbarbutton>
<zen-workspace-icons id="zen-workspaces-button" overflows="false" removable="false"></zen-workspace-icons> <toolbarbutton id="zen-workspaces-button" class="chromeclass-toolbar-additional" overflows="false" removable="false"></toolbarbutton>
</toolbar> </toolbar>

View file

@ -1,9 +1,9 @@
diff --git a/browser/base/moz.build b/browser/base/moz.build diff --git a/browser/base/moz.build b/browser/base/moz.build
index 9da444880c4dbf188443d43e8d0a71d98311a2b7..3a654be6f78931e92479b30de6f0a6e50da81908 100644 index 636e0841786735a63ddea00e819c0b6f0b8a5d4d..62e4531bd19caf098fd76c69b213fa32d62546a6 100644
--- a/browser/base/moz.build --- a/browser/base/moz.build
+++ b/browser/base/moz.build +++ b/browser/base/moz.build
@@ -81,3 +81,5 @@ DEFINES["MOZ_APP_VERSION_DISPLAY"] = CONFIG["MOZ_APP_VERSION_DISPLAY"] @@ -87,3 +87,5 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk"):
DEFINES["APP_LICENSE_BLOCK"] = "%s/content/overrides/app-license.html" % SRCDIR DEFINES["MENUBAR_CAN_AUTOHIDE"] = 1
JAR_MANIFESTS += ["jar.mn"] JAR_MANIFESTS += ["jar.mn"]
+ +

View file

@ -1,8 +1,8 @@
diff --git a/browser/components/BrowserContentHandler.sys.mjs b/browser/components/BrowserContentHandler.sys.mjs diff --git a/browser/components/BrowserContentHandler.sys.mjs b/browser/components/BrowserContentHandler.sys.mjs
index e72feb538c0dc182211945a66e51bcea73d3d4a0..b4d9115873b7af414043c53fb817b611b78ec58f 100644 index 5911b276fdc9889d3cb61bac3d302ec5239e4a90..a405f8a0204e98fa9de08f1cd7b6761f0fc6198e 100644
--- a/browser/components/BrowserContentHandler.sys.mjs --- a/browser/components/BrowserContentHandler.sys.mjs
+++ b/browser/components/BrowserContentHandler.sys.mjs +++ b/browser/components/BrowserContentHandler.sys.mjs
@@ -1281,6 +1281,7 @@ function maybeRecordToHandleTelemetry(uri, isLaunch) { @@ -1270,6 +1270,7 @@ function maybeRecordToHandleTelemetry(uri, isLaunch) {
".avif", ".avif",
".htm", ".htm",
".html", ".html",

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
index cebca6d017a0c3fc8eff7a38f987726324789e69..73a24df91bec368f2f27c538b37d57595e18c599 100644 index a6a7f9165aece774c3f1c15f7e352b11a4bf90f4..a4b6124b85f099c6f12d297fc26f2040370c337c 100644
--- a/browser/components/BrowserGlue.sys.mjs --- a/browser/components/BrowserGlue.sys.mjs
+++ b/browser/components/BrowserGlue.sys.mjs +++ b/browser/components/BrowserGlue.sys.mjs
@@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; @@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
@ -10,7 +10,7 @@ index cebca6d017a0c3fc8eff7a38f987726324789e69..73a24df91bec368f2f27c538b37d5759
AboutHomeStartupCache: "resource:///modules/AboutHomeStartupCache.sys.mjs", AboutHomeStartupCache: "resource:///modules/AboutHomeStartupCache.sys.mjs",
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs", AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs", AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs",
@@ -881,6 +882,7 @@ BrowserGlue.prototype = { @@ -1886,6 +1887,7 @@ BrowserGlue.prototype = {
lazy.ProcessHangMonitor.init(); lazy.ProcessHangMonitor.init();

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index 5bb6be19f7f855b129aac921af1ed5cfc63d732b..41230a61f3088a234903dcc10abd361efac34729 100644 index 91088fab1759b9af908912648d28daa5938a29c9..d420e7a2b1d66ad2bd7699cc580e180ab45a793d 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs --- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, { @@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizeMode.sys.mjs b/browser/components/customizableui/CustomizeMode.sys.mjs diff --git a/browser/components/customizableui/CustomizeMode.sys.mjs b/browser/components/customizableui/CustomizeMode.sys.mjs
index 619bb2af5a3a0995fc93fa040696dd2854848ab5..14ad5f6122971a0a0dc20d22acdc073f84965dad 100644 index 619bb2af5a3a0995fc93fa040696dd2854848ab5..bbc6bad906e9ccaf668ca99f4a0411f564ef1e56 100644
--- a/browser/components/customizableui/CustomizeMode.sys.mjs --- a/browser/components/customizableui/CustomizeMode.sys.mjs
+++ b/browser/components/customizableui/CustomizeMode.sys.mjs +++ b/browser/components/customizableui/CustomizeMode.sys.mjs
@@ -500,7 +500,7 @@ export class CustomizeMode { @@ -500,7 +500,7 @@ export class CustomizeMode {
@ -20,15 +20,7 @@ index 619bb2af5a3a0995fc93fa040696dd2854848ab5..14ad5f6122971a0a0dc20d22acdc073f
customizer.hidden = true; customizer.hidden = true;
browser.hidden = false; browser.hidden = false;
@@ -1173,6 +1173,7 @@ export class CustomizeMode { @@ -3125,6 +3125,20 @@ export class CustomizeMode {
return (
aNode.localName == "toolbarbutton" ||
aNode.localName == "toolbaritem" ||
+ aNode.localName == "zen-workspace-icons" ||
aNode.localName == "toolbarseparator" ||
aNode.localName == "toolbarspring" ||
aNode.localName == "toolbarspacer"
@@ -3125,6 +3126,20 @@ export class CustomizeMode {
if (makeSpaceImmediately) { if (makeSpaceImmediately) {
aDraggedOverItem.setAttribute("notransition", "true"); aDraggedOverItem.setAttribute("notransition", "true");
} }

View file

@ -1,8 +1,8 @@
diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js
index 689205034d9df67ff1fe0ebbf4a3481a5f414391..2626b7286deb51f66b6ccbbc32d510139cacb109 100644 index ec52437dba30633a374299a46c856e1df05dec0e..48617e32d56c3b3f525557ddeac6297555c48c04 100644
--- a/browser/components/customizableui/content/panelUI.js --- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js +++ b/browser/components/customizableui/content/panelUI.js
@@ -516,8 +516,7 @@ const PanelUI = { @@ -515,8 +515,7 @@ const PanelUI = {
tempPanel.setAttribute("animate", "false"); tempPanel.setAttribute("animate", "false");
} }
tempPanel.setAttribute("context", ""); tempPanel.setAttribute("context", "");
@ -12,7 +12,7 @@ index 689205034d9df67ff1fe0ebbf4a3481a5f414391..2626b7286deb51f66b6ccbbc32d51013
.appendChild(tempPanel); .appendChild(tempPanel);
let multiView = document.createXULElement("panelmultiview"); let multiView = document.createXULElement("panelmultiview");
@@ -959,7 +958,7 @@ const PanelUI = { @@ -957,7 +956,7 @@ const PanelUI = {
el.removeAttribute("data-lazy-l10n-id"); el.removeAttribute("data-lazy-l10n-id");
}); });

View file

@ -1,8 +1,8 @@
diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js
index 517ea0079c12941a844a4f9e4ba694c6411887ee..510ab14dfa2178c332c9862d6a01b75bd12dfe3b 100644 index b47f0510e32d788dfe7c3109474c4512c9900d4a..49697125a2998bbd50d87c54e2c5974baaf9a7e2 100644
--- a/browser/components/extensions/parent/ext-tabs.js --- a/browser/components/extensions/parent/ext-tabs.js
+++ b/browser/components/extensions/parent/ext-tabs.js +++ b/browser/components/extensions/parent/ext-tabs.js
@@ -482,6 +482,7 @@ this.tabs = class extends ExtensionAPIPersistent { @@ -468,6 +468,7 @@ this.tabs = class extends ExtensionAPIPersistent {
} }
let tab = tabManager.getWrapper(event.originalTarget); let tab = tabManager.getWrapper(event.originalTarget);
@ -10,11 +10,3 @@ index 517ea0079c12941a844a4f9e4ba694c6411887ee..510ab14dfa2178c332c9862d6a01b75b
let changeInfo = {}; let changeInfo = {};
for (let prop of needed) { for (let prop of needed) {
@@ -836,6 +837,7 @@ this.tabs = class extends ExtensionAPIPersistent {
});
}
+ window.gZenCompactModeManager._nextTimeWillBeActive = active;
let nativeTab = window.gBrowser.addTab(url, options);
if (active) {

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/places/PlacesUIUtils.sys.mjs b/browser/components/places/PlacesUIUtils.sys.mjs diff --git a/browser/components/places/PlacesUIUtils.sys.mjs b/browser/components/places/PlacesUIUtils.sys.mjs
index c7c5c28e1ea6d05094ed9fe751c6b50ab9645370..72f1038aa37b0951a1e78331ee317f714e5b6e8b 100644 index 1f5e163bae58f3f1cac750ca32846cc8a80bd2ca..16034842b4ca5295aa3c9237db55035ecc4016d2 100644
--- a/browser/components/places/PlacesUIUtils.sys.mjs --- a/browser/components/places/PlacesUIUtils.sys.mjs
+++ b/browser/components/places/PlacesUIUtils.sys.mjs +++ b/browser/components/places/PlacesUIUtils.sys.mjs
@@ -59,6 +59,7 @@ class BookmarkState { @@ -59,6 +59,7 @@ class BookmarkState {
@ -157,12 +157,20 @@ index c7c5c28e1ea6d05094ed9fe751c6b50ab9645370..72f1038aa37b0951a1e78331ee317f71
/** /**
* Append transactions to update tags by given information. * Append transactions to update tags by given information.
* *
@@ -903,7 +1012,7 @@ export var PlacesUIUtils = { @@ -903,8 +1012,15 @@ export var PlacesUIUtils = {
aNode, aNode,
aWhere, aWhere,
aWindow, aWindow,
- { aPrivate = false, userContextId = 0 } = {} - { aPrivate = false, userContextId = 0 } = {}
+ { aPrivate = false, userContextId = undefined } = {} + { aPrivate = false, userContextId = undefined } = {}
) { ) {
+ if (typeof userContextId == "undefined") {
+ try {
+ let browserWindow = getBrowserWindow(aWindow);
+ userContextId = browserWindow.ZenWorkspaces.getDefaultContainer();
+ } catch {}
+ }
+
if ( if (
aNode && aNode &&
lazy.PlacesUtils.nodeIsURI(aNode) &&

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js
index ad138a38340e8e8510d395f46c30ec4121d731bb..52beaa66395e2b240a7122936cd4d2452b386724 100644 index ad138a38340e8e8510d395f46c30ec4121d731bb..9294f05633acbe560df003333b7ef7d9a12a2a11 100644
--- a/browser/components/places/content/browserPlacesViews.js --- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js +++ b/browser/components/places/content/browserPlacesViews.js
@@ -330,12 +330,23 @@ class PlacesViewBase { @@ -330,12 +330,23 @@ class PlacesViewBase {
@ -13,7 +13,7 @@ index ad138a38340e8e8510d395f46c30ec4121d731bb..52beaa66395e2b240a7122936cd4d245
+ let child = resultNode.getChild(i); + let child = resultNode.getChild(i);
+ // Skip nodes that don't belong in current workspace + // Skip nodes that don't belong in current workspace
+ if (PlacesUtils.nodeIsURI(child) || PlacesUtils.containerTypes.includes(child.type)) { + if (PlacesUtils.nodeIsURI(child) || PlacesUtils.containerTypes.includes(child.type)) {
+ if (typeof gZenWorkspaces !== 'undefined' && gZenWorkspaces.isBookmarkInAnotherWorkspace(child)) { + if (typeof ZenWorkspaces !== 'undefined' && ZenWorkspaces.isBookmarkInAnotherWorkspace(child)) {
+ continue; + continue;
+ } + }
+ } + }
@ -52,7 +52,7 @@ index ad138a38340e8e8510d395f46c30ec4121d731bb..52beaa66395e2b240a7122936cd4d245
+ for (let i = 0; i < cc; i++) { + for (let i = 0; i < cc; i++) {
+ let child = this._resultNode.getChild(i); + let child = this._resultNode.getChild(i);
+ if (PlacesUtils.nodeIsURI(child) || PlacesUtils.containerTypes.includes(child.type)) { + if (PlacesUtils.nodeIsURI(child) || PlacesUtils.containerTypes.includes(child.type)) {
+ if (!(typeof gZenWorkspaces !== 'undefined' && gZenWorkspaces.isBookmarkInAnotherWorkspace(child))) { + if (!(typeof ZenWorkspaces !== 'undefined' && ZenWorkspaces.isBookmarkInAnotherWorkspace(child))) {
+ visibleNodes.push(child); + visibleNodes.push(child);
+ } + }
+ } else { + } else {

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
index 2116a8a3b5746b79280f2d73b5e29b01c7a15993..448269adeab747fd2da419509e6923eefbb87d8a 100644 index aa339be9ba94ed776fa25f2d72f9e6b25dc86cd3..4c6c725942b3d6f2a42938d444ac7645526623cc 100644
--- a/browser/components/preferences/main.js --- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js +++ b/browser/components/preferences/main.js
@@ -389,7 +389,7 @@ function getBundleForLocales(newLocales) { @@ -389,7 +389,7 @@ function getBundleForLocales(newLocales) {

View file

@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index 6a575e3148de0c73f7ab7ff9afbd3ff179bce313..b7c2f2818358b7b6b6fc62b298dc67a66ebd9e3b 100644 index e4746e3408e68273126e6d2baf5afcf80721674b..e478aaf6bfefa6acd9062aeb3e4709ca0d5d779c 100644
--- a/browser/components/preferences/preferences.js --- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js +++ b/browser/components/preferences/preferences.js
@@ -117,6 +117,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () { @@ -118,6 +118,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
styleSheets: [ styleSheets: [
"chrome://browser/skin/preferences/dialog.css", "chrome://browser/skin/preferences/dialog.css",
"chrome://browser/skin/preferences/preferences.css", "chrome://browser/skin/preferences/preferences.css",
@ -10,7 +10,7 @@ index 6a575e3148de0c73f7ab7ff9afbd3ff179bce313..b7c2f2818358b7b6b6fc62b298dc67a6
], ],
resizeCallback: async ({ title, frame }) => { resizeCallback: async ({ title, frame }) => {
// Search within main document and highlight matched keyword. // Search within main document and highlight matched keyword.
@@ -196,6 +197,10 @@ function init_all() { @@ -197,6 +198,10 @@ function init_all() {
register_module("paneSearch", gSearchPane); register_module("paneSearch", gSearchPane);
register_module("panePrivacy", gPrivacyPane); register_module("panePrivacy", gPrivacyPane);
register_module("paneContainers", gContainersPane); register_module("paneContainers", gContainersPane);

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
index b3b128cb5eb8c005c642965a8c8e5e68bf756e77..6e128d45c983b267e349b08097c56380dd04be3d 100644 index 43be2b6ac84827bd13723e0211a3ade401934591..513584d7e720451efdb87350ac07d8b2590c1705 100644
--- a/browser/components/preferences/preferences.xhtml --- a/browser/components/preferences/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml +++ b/browser/components/preferences/preferences.xhtml
@@ -44,6 +44,8 @@ @@ -44,6 +44,8 @@
@ -11,7 +11,7 @@ index b3b128cb5eb8c005c642965a8c8e5e68bf756e77..6e128d45c983b267e349b08097c56380
<link rel="localization" href="branding/brand.ftl"/> <link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/browser.ftl"/> <link rel="localization" href="browser/browser.ftl"/>
<!-- Used by fontbuilder.js --> <!-- Used by fontbuilder.js -->
@@ -104,6 +106,11 @@ @@ -105,6 +107,11 @@
<hbox flex="1"> <hbox flex="1">
<vbox class="navigation"> <vbox class="navigation">
@ -23,7 +23,7 @@ index b3b128cb5eb8c005c642965a8c8e5e68bf756e77..6e128d45c983b267e349b08097c56380
<!-- category list --> <!-- category list -->
<richlistbox id="categories" data-l10n-id="category-list" data-l10n-attrs="aria-label"> <richlistbox id="categories" data-l10n-id="category-list" data-l10n-attrs="aria-label">
<richlistitem id="category-general" <richlistitem id="category-general"
@@ -116,6 +123,50 @@ @@ -117,6 +124,50 @@
<label class="category-name" flex="1" data-l10n-id="pane-general-title"></label> <label class="category-name" flex="1" data-l10n-id="pane-general-title"></label>
</richlistitem> </richlistitem>
@ -74,7 +74,7 @@ index b3b128cb5eb8c005c642965a8c8e5e68bf756e77..6e128d45c983b267e349b08097c56380
<richlistitem id="category-home" <richlistitem id="category-home"
class="category" class="category"
value="paneHome" value="paneHome"
@@ -227,11 +278,6 @@ @@ -228,11 +279,6 @@
<html:a href="about:policies" target="_blank" data-l10n-id="managed-notice"/> <html:a href="about:policies" target="_blank" data-l10n-id="managed-notice"/>
</hbox> </hbox>
</hbox> </hbox>
@ -86,7 +86,7 @@ index b3b128cb5eb8c005c642965a8c8e5e68bf756e77..6e128d45c983b267e349b08097c56380
</hbox> </hbox>
</hbox> </hbox>
<vbox id="mainPrefPane"> <vbox id="mainPrefPane">
@@ -245,6 +291,10 @@ @@ -246,6 +292,10 @@
#include sync.inc.xhtml #include sync.inc.xhtml
#include experimental.inc.xhtml #include experimental.inc.xhtml
#include moreFromMozilla.inc.xhtml #include moreFromMozilla.inc.xhtml

View file

@ -14,37 +14,30 @@ var gZenMarketplaceManager = {
return; return;
} }
if (!window.gZenMods) {
window.gZenMods = ZenMultiWindowFeature.currentBrowser.gZenMods;
}
header.appendChild(this._initDisableAll()); header.appendChild(this._initDisableAll());
this._initImportExport(); this._initImportExport();
this.__hasInitializedEvents = true; this.__hasInitializedEvents = true;
await this._buildModsList(); await this._buildThemesList();
Services.prefs.addObserver(gZenMods.updatePref, this); Services.prefs.addObserver(this.updatePref, this);
const checkForUpdateClick = (event) => { const checkForUpdateClick = (event) => {
if (event.target === checkForUpdates) { if (event.target === checkForUpdates) {
event.preventDefault(); event.preventDefault();
this._checkForThemeUpdates(event); this._checkForThemeUpdates(event);
} }
}; };
checkForUpdates.addEventListener('click', checkForUpdateClick); checkForUpdates.addEventListener('click', checkForUpdateClick);
document.addEventListener('ZenModsMarketplace:CheckForUpdatesFinished', (event) => { document.addEventListener('ZenThemeMarketplace:CheckForUpdatesFinished', (event) => {
checkForUpdates.disabled = false; checkForUpdates.disabled = false;
const updates = event.detail.updates; const updates = event.detail.updates;
const success = document.getElementById('zenThemeMarketplaceUpdatesSuccess'); const success = document.getElementById('zenThemeMarketplaceUpdatesSuccess');
const error = document.getElementById('zenThemeMarketplaceUpdatesFailure'); const error = document.getElementById('zenThemeMarketplaceUpdatesFailure');
if (updates) { if (updates) {
success.hidden = false; success.hidden = false;
error.hidden = true; error.hidden = true;
@ -55,16 +48,13 @@ var gZenMarketplaceManager = {
}); });
window.addEventListener('unload', () => { window.addEventListener('unload', () => {
Services.prefs.removeObserver(gZenMods.updatePref, this); Services.prefs.removeObserver(this.updatePref, this);
this.__hasInitializedEvents = false; this.__hasInitializedEvents = false;
document.removeEventListener('ZenThemeMarketplace:CheckForUpdatesFinished', this);
document.removeEventListener('ZenModsMarketplace:CheckForUpdatesFinished', this); document.removeEventListener('ZenCheckForThemeUpdates', this);
document.removeEventListener('ZenCheckForModUpdates', this);
checkForUpdates.removeEventListener('click', checkForUpdateClick); checkForUpdates.removeEventListener('click', checkForUpdateClick);
this.themesList.innerHTML = '';
this.modsList.innerHTML = ''; this._doNotRebuildThemesList = false;
this._doNotRebuildModsList = false;
}); });
}, },
@ -73,32 +63,36 @@ var gZenMarketplaceManager = {
const exportButton = document.getElementById('zenThemeMarketplaceExport'); const exportButton = document.getElementById('zenThemeMarketplaceExport');
if (importButton) { if (importButton) {
importButton.addEventListener('click', this._importThemes.bind(this)); importButton.addEventListener('click', async () => {
await this._importThemes();
});
} }
if (exportButton) { if (exportButton) {
exportButton.addEventListener('click', this._exportThemes.bind(this)); exportButton.addEventListener('click', async () => {
await this._exportThemes();
});
} }
}, },
_initDisableAll() { _initDisableAll() {
const areModsDisabled = Services.prefs.getBoolPref('zen.themes.disable-all', false); const areThemesDisabled = Services.prefs.getBoolPref('zen.themes.disable-all', false);
const browser = ZenMultiWindowFeature.currentBrowser; const browser = ZenThemesCommon.currentBrowser;
const mozToggle = document.createElement('moz-toggle'); const mozToggle = document.createElement('moz-toggle');
mozToggle.className = mozToggle.className =
'zenThemeMarketplaceItemPreferenceToggle zenThemeMarketplaceDisableAllToggle'; 'zenThemeMarketplaceItemPreferenceToggle zenThemeMarketplaceDisableAllToggle';
mozToggle.pressed = !areModsDisabled; mozToggle.pressed = !areThemesDisabled;
browser.document.l10n.setAttributes( browser.document.l10n.setAttributes(
mozToggle, mozToggle,
`zen-theme-disable-all-${!areModsDisabled ? 'enabled' : 'disabled'}` `zen-theme-disable-all-${!areThemesDisabled ? 'enabled' : 'disabled'}`
); );
mozToggle.addEventListener('toggle', async (event) => { mozToggle.addEventListener('toggle', async (event) => {
const { pressed = false } = event.target || {}; const { pressed = false } = event.target || {};
this.modsList.style.display = pressed ? '' : 'none'; this.themesList.style.display = pressed ? '' : 'none';
Services.prefs.setBoolPref('zen.themes.disable-all', !pressed); Services.prefs.setBoolPref('zen.themes.disable-all', !pressed);
browser.document.l10n.setAttributes( browser.document.l10n.setAttributes(
mozToggle, mozToggle,
@ -106,65 +100,91 @@ var gZenMarketplaceManager = {
); );
}); });
if (areModsDisabled) { if (areThemesDisabled) {
this.modsList.style.display = 'none'; this.themesList.style.display = 'none';
} }
return mozToggle; return mozToggle;
}, },
async observe() { async observe() {
await this._buildModsList(); ZenThemesCommon.resetThemesCache();
await this._buildThemesList();
}, },
_checkForThemeUpdates(event) { _checkForThemeUpdates(event) {
// Send a message to the child to check for theme updates. // Send a message to the child to check for theme updates.
event.target.disabled = true; event.target.disabled = true;
// send an event that will be listened by the child process. // send an event that will be listened by the child process.
document.dispatchEvent(new CustomEvent('ZenCheckForModUpdates')); document.dispatchEvent(new CustomEvent('ZenCheckForThemeUpdates'));
}, },
get modsList() { get updatePref() {
if (!this._modsList) { return 'zen.themes.updated-value-observer';
this._modsList = document.getElementById('zenThemeMarketplaceList'); },
triggerThemeUpdate() {
Services.prefs.setBoolPref(this.updatePref, !Services.prefs.getBoolPref(this.updatePref));
},
get themesList() {
if (!this._themesList) {
this._themesList = document.getElementById('zenThemeMarketplaceList');
} }
return this._modsList; return this._themesList;
}, },
async removeMod(modId) { async removeTheme(themeId) {
await gZenMods.removeMod(modId); const themePath = ZenThemesCommon.getThemeFolder(themeId);
gZenMods.triggerModsUpdate(); console.info(`[ZenThemeMarketplaceParent:settings]: Removing theme ${themePath}`);
await IOUtils.remove(themePath, { recursive: true, ignoreAbsent: true });
const themes = await ZenThemesCommon.getThemes();
delete themes[themeId];
await IOUtils.writeJSON(ZenThemesCommon.themesDataFile, themes);
this.triggerThemeUpdate();
}, },
async disableMod(modId) { async disableTheme(themeId) {
await gZenMods.disableMod(modId); const themes = await ZenThemesCommon.getThemes();
const theme = themes[themeId];
this._doNotRebuildModsList = true; console.log(`[ZenThemeMarketplaceParent:settings]: Disabling theme ${theme.name}`);
gZenMods.triggerModsUpdate();
theme.enabled = false;
await IOUtils.writeJSON(ZenThemesCommon.themesDataFile, themes);
this._doNotRebuildThemesList = true;
this.triggerThemeUpdate();
}, },
async enableMod(modId) { async enableTheme(themeId) {
await gZenMods.enableMod(modId); const themes = await ZenThemesCommon.getThemes();
const theme = themes[themeId];
this._doNotRebuildModsList = true; console.log(`[ZenThemeMarketplaceParent:settings]: Enabling theme ${theme.name}`);
gZenMods.triggerModsUpdate();
theme.enabled = true;
await IOUtils.writeJSON(ZenThemesCommon.themesDataFile, themes);
this._doNotRebuildThemesList = true;
this.triggerThemeUpdate();
}, },
_triggerBuildUpdateWithoutRebuild() { _triggerBuildUpdateWithoutRebuild() {
this._doNotRebuildModsList = true; this._doNotRebuildThemesList = true;
gZenMods.triggerModsUpdate(); this.triggerThemeUpdate();
}, },
async _importThemes() { async _importThemes() {
const errorBox = document.getElementById('zenThemeMarketplaceImportFailure'); const errorBox = document.getElementById('zenThemeMarketplaceImportFailure');
const successBox = document.getElementById('zenThemeMarketplaceImportSuccess'); const successBox = document.getElementById('zenThemeMarketplaceImportSuccess');
successBox.hidden = true; successBox.hidden = true;
errorBox.hidden = true; errorBox.hidden = true;
const input = document.createElement('input'); const input = document.createElement('input');
input.type = 'file'; input.type = 'file';
input.accept = '.json'; input.accept = '.json';
input.style.display = 'none'; input.style.display = 'none';
@ -172,52 +192,37 @@ var gZenMarketplaceManager = {
input.setAttribute('accept', '.json'); input.setAttribute('accept', '.json');
let timeout; let timeout;
const filePromise = new Promise((resolve) => { const filePromise = new Promise((resolve) => {
input.addEventListener('change', (event) => { input.addEventListener('change', (event) => {
if (timeout) { if (timeout) clearTimeout(timeout);
clearTimeout(timeout);
}
const file = event.target.files[0]; const file = event.target.files[0];
resolve(file); resolve(file);
}); });
timeout = setTimeout(() => { timeout = setTimeout(() => {
console.warn('[ZenSettings:ZenMods]: Import timeout reached, aborting.'); console.warn('[ZenThemeMarketplaceParent:settings]: Import timeout reached, aborting.');
resolve(null); resolve(null);
}, 60000); }, 60000);
}); });
input.addEventListener('cancel', () => {
console.warn('[ZenSettings:ZenMods]: Import cancelled by user.');
clearTimeout(timeout);
});
input.click(); input.click();
try { try {
const file = await filePromise; const file = await filePromise;
if (!file) { if (!file) {
return; return;
} }
const content = await file.text(); const content = await file.text();
const mods = JSON.parse(content); const themes = JSON.parse(content);
for (const theme of Object.values(themes)) {
for (const mod of Object.values(mods)) { theme.themeId = theme.id;
mod.modId = mod.id; window.ZenInstallTheme(theme);
await window.ZenInstallMod(mod);
} }
} catch (error) { } catch (error) {
console.error('[ZenSettings:ZenMods]: Error while importing mods:', error); console.error('[ZenThemeMarketplaceParent:settings]: Error while importing themes:', error);
errorBox.hidden = false; errorBox.hidden = false;
} } finally {
if (input) input.remove();
if (input) {
input.remove();
} }
}, },
@ -228,54 +233,51 @@ var gZenMarketplaceManager = {
successBox.hidden = true; successBox.hidden = true;
errorBox.hidden = true; errorBox.hidden = true;
let temporalAnchor, temporalUrl; let a, url;
try { try {
const mods = await gZenMods.getMods(); const themes = await ZenThemesCommon.getThemes();
const modsJson = JSON.stringify(mods, null, 2); const themesJson = JSON.stringify(themes, null, 2);
const blob = new Blob([modsJson], { type: 'application/json' }); const blob = new Blob([themesJson], { type: 'application/json' });
url = URL.createObjectURL(blob);
temporalUrl = URL.createObjectURL(blob);
// Creating a link to download the JSON file // Creating a link to download the JSON file
temporalAnchor = document.createElement('a'); a = document.createElement('a');
temporalAnchor.href = temporalUrl; a.href = url;
temporalAnchor.download = 'zen-mods-export.json'; a.download = 'zen-themes-export.json';
document.body.appendChild(temporalAnchor);
temporalAnchor.click();
temporalAnchor.remove();
document.body.appendChild(a);
a.click();
a.remove();
successBox.hidden = false; successBox.hidden = false;
} catch (error) { } catch (error) {
console.error('[ZenSettings:ZenMods]: Error while exporting mods:', error); console.error('[ZenThemeMarketplaceParent:settings]: Error while exporting themes:', error);
errorBox.hidden = false; errorBox.hidden = false;
} } finally {
if (a) {
if (temporalAnchor) { a.remove();
temporalAnchor.remove(); }
} if (url) {
URL.revokeObjectURL(url);
if (temporalUrl) { }
URL.revokeObjectURL(temporalUrl);
} }
}, },
async _buildModsList() { async _buildThemesList() {
if (!this.modsList) { if (!this.themesList) {
return; return;
} }
if (this._doNotRebuildModsList) { if (this._doNotRebuildThemesList) {
this._doNotRebuildModsList = false; this._doNotRebuildThemesList = false;
return; return;
} }
const mods = await gZenMods.getMods(); const themes = await ZenThemesCommon.getThemes();
const browser = ZenMultiWindowFeature.currentBrowser; const browser = ZenMultiWindowFeature.currentBrowser;
const modList = document.createElement('div'); const themeList = document.createElement('div');
for (const mod of Object.values(mods).sort((a, b) => a.name.localeCompare(b.name))) { for (const theme of Object.values(themes).sort((a, b) => a.name.localeCompare(b.name))) {
const sanitizedName = gZenMods.sanitizeModName(mod.name); const sanitizedName = `theme-${theme.name?.replaceAll(/\s/g, '-')?.replaceAll(/[^A-z_-]+/g, '')}`;
const isModEnabled = mod.enabled === undefined || mod.enabled; const isThemeEnabled = theme.enabled === undefined || theme.enabled;
const fragment = window.MozXULElement.parseXULToFragment(` const fragment = window.MozXULElement.parseXULToFragment(`
<vbox class="zenThemeMarketplaceItem"> <vbox class="zenThemeMarketplaceItem">
<vbox class="zenThemeMarketplaceItemContent"> <vbox class="zenThemeMarketplaceItemContent">
@ -285,14 +287,14 @@ var gZenMarketplaceManager = {
<description class="description-deemphasized zenThemeMarketplaceItemDescription"></description> <description class="description-deemphasized zenThemeMarketplaceItemDescription"></description>
</vbox> </vbox>
<hbox class="zenThemeMarketplaceItemActions"> <hbox class="zenThemeMarketplaceItemActions">
${mod.preferences ? `<button id="zenThemeMarketplaceItemConfigureButton-${sanitizedName}" class="zenThemeMarketplaceItemConfigureButton" hidden="true"></button>` : ''} ${theme.preferences ? `<button id="zenThemeMarketplaceItemConfigureButton-${sanitizedName}" class="zenThemeMarketplaceItemConfigureButton" hidden="true"></button>` : ''}
${mod.homepage ? `<button id="zenThemeMarketplaceItemHomePageLink-${sanitizedName}" class="zenThemeMarketplaceItemHomepageButton" zen-mod-id="${mod.id}"></button>` : ''} ${theme.homepage ? `<button id="zenThemeMarketplaceItemHomePageLink-${sanitizedName}" class="zenThemeMarketplaceItemHomepageButton" zen-theme-id="${theme.id}"></button>` : ''}
<button class="zenThemeMarketplaceItemUninstallButton" data-l10n-id="zen-theme-marketplace-remove-button" zen-mod-id="${mod.id}"></button> <button class="zenThemeMarketplaceItemUninstallButton" data-l10n-id="zen-theme-marketplace-remove-button" zen-theme-id="${theme.id}"></button>
</hbox> </hbox>
</vbox> </vbox>
`); `);
const modName = `${mod.name} (v${mod.version ?? '1.0.0'})`; const themeName = `${theme.name} (v${theme.version || '1.0.0'})`;
const base = fragment.querySelector('.zenThemeMarketplaceItem'); const base = fragment.querySelector('.zenThemeMarketplaceItem');
const baseHeader = fragment.querySelector('#zenThemeMarketplaceItemContentHeader'); const baseHeader = fragment.querySelector('#zenThemeMarketplaceItemContentHeader');
@ -307,7 +309,7 @@ var gZenMarketplaceManager = {
mainDialogDiv.className = 'zenThemeMarketplaceItemPreferenceDialog'; mainDialogDiv.className = 'zenThemeMarketplaceItemPreferenceDialog';
headerDiv.className = 'zenThemeMarketplaceItemPreferenceDialogTopBar'; headerDiv.className = 'zenThemeMarketplaceItemPreferenceDialogTopBar';
headerTitle.textContent = modName; headerTitle.textContent = themeName;
browser.document.l10n.setAttributes(headerTitle, 'zen-theme-marketplace-theme-header-title', { browser.document.l10n.setAttributes(headerTitle, 'zen-theme-marketplace-theme-header-title', {
name: sanitizedName, name: sanitizedName,
}); });
@ -318,10 +320,10 @@ var gZenMarketplaceManager = {
contentDiv.className = 'zenThemeMarketplaceItemPreferenceDialogContent'; contentDiv.className = 'zenThemeMarketplaceItemPreferenceDialogContent';
mozToggle.className = 'zenThemeMarketplaceItemPreferenceToggle'; mozToggle.className = 'zenThemeMarketplaceItemPreferenceToggle';
mozToggle.pressed = isModEnabled; mozToggle.pressed = isThemeEnabled;
browser.document.l10n.setAttributes( browser.document.l10n.setAttributes(
mozToggle, mozToggle,
`zen-theme-marketplace-toggle-${isModEnabled ? 'enabled' : 'disabled'}-button` `zen-theme-marketplace-toggle-${isThemeEnabled ? 'enabled' : 'disabled'}-button`
); );
baseHeader.appendChild(mozToggle); baseHeader.appendChild(mozToggle);
@ -339,34 +341,34 @@ var gZenMarketplaceManager = {
}); });
mozToggle.addEventListener('toggle', async (event) => { mozToggle.addEventListener('toggle', async (event) => {
const modId = event.target const themeId = event.target
.closest('.zenThemeMarketplaceItem') .closest('.zenThemeMarketplaceItem')
.querySelector('.zenThemeMarketplaceItemUninstallButton') .querySelector('.zenThemeMarketplaceItemUninstallButton')
.getAttribute('zen-mod-id'); .getAttribute('zen-theme-id');
event.target.setAttribute('disabled', true); event.target.setAttribute('disabled', true);
if (!event.target.hasAttribute('pressed')) { if (!event.target.hasAttribute('pressed')) {
await this.disableMod(modId); await this.disableTheme(themeId);
browser.document.l10n.setAttributes( browser.document.l10n.setAttributes(
mozToggle, mozToggle,
'zen-theme-marketplace-toggle-disabled-button' 'zen-theme-marketplace-toggle-disabled-button'
); );
if (mod.preferences) { if (theme.preferences) {
document document
.getElementById(`zenThemeMarketplaceItemConfigureButton-${sanitizedName}`) .getElementById(`zenThemeMarketplaceItemConfigureButton-${sanitizedName}`)
.setAttribute('hidden', true); .setAttribute('hidden', true);
} }
} else { } else {
await this.enableMod(modId); await this.enableTheme(themeId);
browser.document.l10n.setAttributes( browser.document.l10n.setAttributes(
mozToggle, mozToggle,
'zen-theme-marketplace-toggle-enabled-button' 'zen-theme-marketplace-toggle-enabled-button'
); );
if (mod.preferences) { if (theme.preferences) {
document document
.getElementById(`zenThemeMarketplaceItemConfigureButton-${sanitizedName}`) .getElementById(`zenThemeMarketplaceItemConfigureButton-${sanitizedName}`)
.removeAttribute('hidden'); .removeAttribute('hidden');
@ -378,8 +380,8 @@ var gZenMarketplaceManager = {
}, 400); }, 400);
}); });
fragment.querySelector('.zenThemeMarketplaceItemTitle').textContent = modName; fragment.querySelector('.zenThemeMarketplaceItemTitle').textContent = themeName;
fragment.querySelector('.zenThemeMarketplaceItemDescription').textContent = mod.description; fragment.querySelector('.zenThemeMarketplaceItemDescription').textContent = theme.description;
fragment fragment
.querySelector('.zenThemeMarketplaceItemUninstallButton') .querySelector('.zenThemeMarketplaceItemUninstallButton')
.addEventListener('click', async (event) => { .addEventListener('click', async (event) => {
@ -391,34 +393,34 @@ var gZenMarketplaceManager = {
return; return;
} }
await this.removeMod(event.target.getAttribute('zen-mod-id')); await this.removeTheme(event.target.getAttribute('zen-theme-id'));
}); });
if (mod.homepage) { if (theme.homepage) {
const homepageButton = fragment.querySelector('.zenThemeMarketplaceItemHomepageButton'); const homepageButton = fragment.querySelector('.zenThemeMarketplaceItemHomepageButton');
homepageButton.addEventListener('click', () => { homepageButton.addEventListener('click', () => {
// open the homepage url in a new tab // open the homepage url in a new tab
const url = mod.homepage; const url = theme.homepage;
window.open(url, '_blank'); window.open(url, '_blank');
}); });
} }
if (mod.preferences) { if (theme.preferences) {
fragment fragment
.querySelector('.zenThemeMarketplaceItemConfigureButton') .querySelector('.zenThemeMarketplaceItemConfigureButton')
.addEventListener('click', () => { .addEventListener('click', () => {
dialog.showModal(); dialog.showModal();
}); });
if (isModEnabled) { if (isThemeEnabled) {
fragment fragment
.querySelector('.zenThemeMarketplaceItemConfigureButton') .querySelector('.zenThemeMarketplaceItemConfigureButton')
.removeAttribute('hidden'); .removeAttribute('hidden');
} }
} }
const preferences = await gZenMods.getModPreferences(mod); const preferences = await ZenThemesCommon.getThemePreferences(theme);
if (preferences.length > 0) { if (preferences.length > 0) {
const preferencesWrapper = document.createXULElement('vbox'); const preferencesWrapper = document.createXULElement('vbox');
@ -470,7 +472,7 @@ var gZenMarketplaceManager = {
if (!['string', 'number'].includes(valueType)) { if (!['string', 'number'].includes(valueType)) {
console.log( console.log(
`[ZenSettings:ZenMods]: Warning, invalid data type received (${valueType}), skipping.` `[ZenThemeMarketplaceParent:settings]: Warning, invalid data type received (${valueType}), skipping.`
); );
continue; continue;
} }
@ -582,7 +584,7 @@ var gZenMarketplaceManager = {
input.addEventListener( input.addEventListener(
'change', 'change',
gZenMods.debounce((event) => { ZenThemesCommon.debounce((event) => {
const value = event.target.value; const value = event.target.value;
Services.prefs.setStringPref(property, value); Services.prefs.setStringPref(property, value);
@ -616,18 +618,18 @@ var gZenMarketplaceManager = {
default: default:
console.log( console.log(
`[ZenSettings:ZenMods]: Warning, unknown preference type received (${type}), skipping.` `[ZenThemeMarketplaceParent:settings]: Warning, unknown preference type received (${type}), skipping.`
); );
continue; continue;
} }
} }
contentDiv.appendChild(preferencesWrapper); contentDiv.appendChild(preferencesWrapper);
} }
modList.appendChild(fragment); themeList.appendChild(fragment);
} }
this.modsList.replaceChildren(...modList.children); this.themesList.replaceChildren(...themeList.children);
modList.remove(); themeList.remove();
}, },
}; };
@ -635,19 +637,6 @@ const kZenExtendedSidebar = 'zen.view.sidebar-expanded';
const kZenSingleToolbar = 'zen.view.use-single-toolbar'; const kZenSingleToolbar = 'zen.view.use-single-toolbar';
var gZenLooksAndFeel = { var gZenLooksAndFeel = {
kZenColors: [
'#aac7ff',
'#74d7cb',
'#a0d490',
'#dec663',
'#ffb787',
'#dec1b1',
'#ffb1c0',
'#ddbfc3',
'#f6b0ea',
'#d4bbff',
],
init() { init() {
if (this.__hasInitialized) return; if (this.__hasInitialized) return;
this.__hasInitialized = true; this.__hasInitialized = true;
@ -749,8 +738,7 @@ var gZenLooksAndFeel = {
_initializeColorPicker(accentColor) { _initializeColorPicker(accentColor) {
let elem = document.getElementById('zenLooksAndFeelColorOptions'); let elem = document.getElementById('zenLooksAndFeelColorOptions');
elem.innerHTML = ''; elem.innerHTML = '';
for (let color of ZenThemesCommon.kZenColors) {
for (let color of this.kZenColors) {
let colorElemParen = document.createElement('div'); let colorElemParen = document.createElement('div');
let colorElem = document.createElement('div'); let colorElem = document.createElement('div');
colorElemParen.classList.add('zenLooksAndFeelColorOptionParen'); colorElemParen.classList.add('zenLooksAndFeelColorOptionParen');
@ -774,7 +762,7 @@ var gZenLooksAndFeel = {
}, },
_getInitialAccentColor() { _getInitialAccentColor() {
return Services.prefs.getStringPref('zen.theme.accent-color', this.kZenColors[0]); return Services.prefs.getStringPref('zen.theme.accent-color', ZenThemesCommon.kZenColors[0]);
}, },
}; };
@ -993,9 +981,6 @@ var gZenCKSSettings = {
sibling.remove(); sibling.remove();
} }
} }
if (target.classList.contains(`${ZEN_CKS_INPUT_FIELD_CLASS}-not-set`)) {
target.label = 'Not set';
}
}); });
const groupElem = wrapper.querySelector(`[data-group="${ZEN_CKS_GROUP_PREFIX}-${group}"]`); const groupElem = wrapper.querySelector(`[data-group="${ZEN_CKS_GROUP_PREFIX}-${group}"]`);
@ -1053,7 +1038,6 @@ var gZenCKSSettings = {
shortcut = shortcut.replace(/Ctrl|Control|Shift|Alt|Option|Cmd|Meta/, ''); // Remove all modifiers shortcut = shortcut.replace(/Ctrl|Control|Shift|Alt|Option|Cmd|Meta/, ''); // Remove all modifiers
if (shortcut == 'Tab' && !modifiersActive) { if (shortcut == 'Tab' && !modifiersActive) {
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-not-set`);
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-editing`); input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-editing`);
this._latestValidKey = null; this._latestValidKey = null;
return; return;
@ -1081,9 +1065,6 @@ var gZenCKSSettings = {
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-editing`); input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-editing`);
this._editDone(this._latestValidKey, this._latestModifier); this._editDone(this._latestValidKey, this._latestModifier);
if (this.name == 'Not set') {
input.classList.add(`${ZEN_CKS_INPUT_FIELD_CLASS}-not-set`);
}
this._latestValidKey = null; this._latestValidKey = null;
this._latestModifier = null; this._latestModifier = null;
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-invalid`); input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-invalid`);
@ -1105,10 +1086,6 @@ var gZenCKSSettings = {
this._latestValidKey = null; this._latestValidKey = null;
this._latestModifier = null; this._latestModifier = null;
this._hasSafed = true; this._hasSafed = true;
const sibling = input.nextElementSibling;
if (sibling && sibling.classList.contains(`${ZEN_CKS_CLASS_BASE}-conflict`)) {
sibling.remove();
}
return; return;
} }
@ -1232,9 +1209,4 @@ Preferences.addAll([
type: 'bool', type: 'bool',
default: false, default: false,
}, },
{
id: 'zen.mods.auto-update',
type: 'bool',
default: true,
},
]); ]);

View file

@ -1,4 +1,5 @@
<script src="chrome://browser/content/zen-components/ZenCommonUtils.mjs" defer=""/> <script src="chrome://browser/content/zen-components/ZenCommonUtils.mjs" defer=""/>
<script src="chrome://browser/content/zen-components/ZenThemesCommon.mjs" defer=""/>
<html:template id="template-paneZenMarketplace"> <html:template id="template-paneZenMarketplace">
<hbox id="ZenMarketplaceCategory" <hbox id="ZenMarketplaceCategory"
class="subcategory" class="subcategory"
@ -20,10 +21,6 @@
<button id="zenThemeMarketplaceCheckForUpdates" data-l10n-id="zen-theme-marketplace-check-for-updates-button" /> <button id="zenThemeMarketplaceCheckForUpdates" data-l10n-id="zen-theme-marketplace-check-for-updates-button" />
</hbox> </hbox>
<checkbox id="zenWorkspacesForceContainerTabsToWorkspace"
data-l10n-id="zen-themes-auto-update"
preference="zen.mods.auto-update"/>
<description class="description-deemphasized" data-l10n-id="zen-theme-marketplace-updates-success" hidden="true" id="zenThemeMarketplaceUpdatesSuccess" /> <description class="description-deemphasized" data-l10n-id="zen-theme-marketplace-updates-success" hidden="true" id="zenThemeMarketplaceUpdatesSuccess" />
<description class="description-deemphasized" data-l10n-id="zen-theme-marketplace-updates-failure" hidden="true" id="zenThemeMarketplaceUpdatesFailure" /> <description class="description-deemphasized" data-l10n-id="zen-theme-marketplace-updates-failure" hidden="true" id="zenThemeMarketplaceUpdatesFailure" />

View file

@ -31,6 +31,26 @@
<html:h1 data-l10n-id="pane-zen-tabs-unloader-title"/> <html:h1 data-l10n-id="pane-zen-tabs-unloader-title"/>
</hbox> </hbox>
<groupbox id="zenTabsUnloadGroup" data-category="paneZenTabManagement" hidden="true" class="highlighting-group">
<label><html:h2 data-l10n-id="zen-tabs-unloader-header"/></label>
<description class="description-deemphasized" data-l10n-id="zen-tabs-unloader-description" />
<checkbox id="zenTabsUnloadActivate"
data-l10n-id="zen-tabs-unloader-enabled"
preference="zen.tab-unloader.enabled"/>
<label><html:h2 data-l10n-id="zen-tabs-unloader-unload-delay"/></label>
<hbox id="zenTabsUnloadDelayContainer">
<description class="description-deemphasized" data-l10n-id="zen-tabs-unloader-unload-delay-description" />
<html:input id="zenTabsUnloadDelay"
type="number"
min="1"
max="1000"
preference="zen.tab-unloader.timeout-minutes"/>
</hbox>
</groupbox>
<hbox id="zenPinnedTabsManagerCategory" <hbox id="zenPinnedTabsManagerCategory"
class="subcategory" class="subcategory"
hidden="true" hidden="true"

View file

@ -1,13 +0,0 @@
diff --git a/browser/components/search/SearchUIUtils.sys.mjs b/browser/components/search/SearchUIUtils.sys.mjs
index ecebaad93acfc9eb7dfd9d9f56fec2e1a4abe392..8bb1348b3258dbc518d23ec39181a81f87fc8c1e 100644
--- a/browser/components/search/SearchUIUtils.sys.mjs
+++ b/browser/components/search/SearchUIUtils.sys.mjs
@@ -403,7 +403,7 @@ export var SearchUIUtils = {
triggeringSearchEngine: engine.name,
},
});
-
+ window.gZenGlanceManager?.onSearchSelectCommand(where);
return { engine, url: submission.uri };
},

View file

@ -1,8 +1,8 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d634dadd4d 100644 index 5633e5032f5d50c70512187d27e045b579978927..6b9e56cb62a4812925ff812763ea9b0e6a478202 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs --- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs +++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -2088,7 +2088,6 @@ var SessionStoreInternal = { @@ -2081,7 +2081,6 @@ var SessionStoreInternal = {
if (closedWindowState) { if (closedWindowState) {
let newWindowState; let newWindowState;
if ( if (
@ -10,7 +10,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d6
!lazy.SessionStartup.willRestore() !lazy.SessionStartup.willRestore()
) { ) {
// We want to split the window up into pinned tabs and unpinned tabs. // We want to split the window up into pinned tabs and unpinned tabs.
@@ -2303,11 +2302,9 @@ var SessionStoreInternal = { @@ -2296,11 +2295,9 @@ var SessionStoreInternal = {
tabbrowser.selectedTab.label; tabbrowser.selectedTab.label;
} }
@ -22,7 +22,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d6
// Store the window's close date to figure out when each individual tab // Store the window's close date to figure out when each individual tab
// was closed. This timestamp should allow re-arranging data based on how // was closed. This timestamp should allow re-arranging data based on how
@@ -3216,7 +3213,7 @@ var SessionStoreInternal = { @@ -3202,7 +3199,7 @@ var SessionStoreInternal = {
if (!isPrivateWindow && tabState.isPrivate) { if (!isPrivateWindow && tabState.isPrivate) {
return; return;
} }
@ -31,19 +31,17 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d6
return; return;
} }
@@ -3925,6 +3922,11 @@ var SessionStoreInternal = { @@ -3911,6 +3908,9 @@ var SessionStoreInternal = {
Math.min(tabState.index, tabState.entries.length) Math.min(tabState.index, tabState.entries.length)
); );
tabState.pinned = false; tabState.pinned = false;
+ tabState.zenEssential = false; + tabState.zenEssential = false;
+ tabState.zenPinnedId = null; + tabState.zenPinnedId = null;
+ tabState.zenIsGlance = false;
+ tabState.zenGlanceId = null;
+ tabState.zenHasStaticLabel = false; + tabState.zenHasStaticLabel = false;
if (inBackground === false) { if (inBackground === false) {
aWindow.gBrowser.selectedTab = newTab; aWindow.gBrowser.selectedTab = newTab;
@@ -5239,7 +5241,7 @@ var SessionStoreInternal = { @@ -5225,7 +5225,7 @@ var SessionStoreInternal = {
} }
let workspaceID = aWindow.getWorkspaceID(); let workspaceID = aWindow.getWorkspaceID();
@ -52,12 +50,12 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d6
winData.workspaceID = workspaceID; winData.workspaceID = workspaceID;
} }
}, },
@@ -5430,14 +5432,15 @@ var SessionStoreInternal = { @@ -5416,14 +5416,15 @@ var SessionStoreInternal = {
} }
let tabbrowser = aWindow.gBrowser; let tabbrowser = aWindow.gBrowser;
- let tabs = tabbrowser.tabs; - let tabs = tabbrowser.tabs;
+ let tabs = aWindow.gZenWorkspaces.allStoredTabs; + let tabs = aWindow.ZenWorkspaces.allStoredTabs;
/** @type {WindowStateData} */ /** @type {WindowStateData} */
let winData = this._windows[aWindow.__SSi]; let winData = this._windows[aWindow.__SSi];
let tabsData = (winData.tabs = []); let tabsData = (winData.tabs = []);
@ -70,29 +68,16 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d6
continue; continue;
} }
let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab)); let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab));
@@ -5456,8 +5459,8 @@ var SessionStoreInternal = { @@ -5442,7 +5443,7 @@ var SessionStoreInternal = {
// We don't store the Firefox View tab in Session Store, so if it was the last selected "tab" when // We don't store the Firefox View tab in Session Store, so if it was the last selected "tab" when
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab, // a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
// since it's only inserted into the tab strip after it's selected). // since it's only inserted into the tab strip after it's selected).
- if (aWindow.FirefoxViewHandler.tab?.selected) { - if (aWindow.FirefoxViewHandler.tab?.selected) {
- selectedIndex = 1;
+ if (aWindow.FirefoxViewHandler.tab?.selected || tabbrowser.selectedTab.hasAttribute("zen-empty-tab")) { + if (aWindow.FirefoxViewHandler.tab?.selected || tabbrowser.selectedTab.hasAttribute("zen-empty-tab")) {
+ selectedIndex = 0; selectedIndex = 1;
winData.title = tabbrowser.tabs[0].label; winData.title = tabbrowser.tabs[0].label;
} }
winData.selected = selectedIndex; @@ -5599,6 +5600,7 @@ var SessionStoreInternal = {
@@ -5569,8 +5572,8 @@ var SessionStoreInternal = {
// selectTab represents.
let selectTab = 0;
if (overwriteTabs) {
- selectTab = parseInt(winData.selected || 1, 10);
- selectTab = Math.max(selectTab, 1);
+ selectTab = parseInt(winData.selected || 0, 10);
+ selectTab = Math.max(selectTab, 0);
selectTab = Math.min(selectTab, winData.tabs.length);
}
@@ -5613,6 +5616,7 @@ var SessionStoreInternal = {
winData.tabs, winData.tabs,
winData.groups ?? [] winData.groups ?? []
); );
@ -100,13 +85,12 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d6
this._log.debug( this._log.debug(
`restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs` `restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs`
); );
@@ -6162,6 +6166,22 @@ var SessionStoreInternal = { @@ -6148,8 +6150,23 @@ var SessionStoreInternal = {
// Most of tabData has been restored, now continue with restoring // Most of tabData has been restored, now continue with restoring
// attributes that may trigger external events. // attributes that may trigger external events.
+ if (tabData.zenEssential) { + if (tabData.zenEssential) {
+ tab.setAttribute("zen-essential", "true"); + tab.setAttribute("zen-essential", "true");
+ tabData.pinned = true; // Essential tabs are always pinned.
+ } + }
+ if (tabData.zenIsEmpty) { + if (tabData.zenIsEmpty) {
+ tab.setAttribute("zen-empty-tab", "true"); + tab.setAttribute("zen-empty-tab", "true");
@ -121,5 +105,8 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d6
+ tab.setAttribute("zenDefaultUserContextId", true); + tab.setAttribute("zenDefaultUserContextId", true);
+ } + }
if (tabData.pinned) { - if (tabData.pinned) {
+ if (tabData.pinned || tabData.zenEssential) {
tabbrowser.pinTab(tab); tabbrowser.pinTab(tab);
} else {
tabbrowser.unpinTab(tab);

View file

@ -1,8 +1,8 @@
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
index 8f7ed557e6aa61e7e16ed4a8d785ad5fe651b3d8..76f4cf5aef30cb580ef0295fe6928b5a6a362f4b 100644 index 8f7ed557e6aa61e7e16ed4a8d785ad5fe651b3d8..254849e13f7566029dc780c45e376e0f0d427cb5 100644
--- a/browser/components/sessionstore/TabState.sys.mjs --- a/browser/components/sessionstore/TabState.sys.mjs
+++ b/browser/components/sessionstore/TabState.sys.mjs +++ b/browser/components/sessionstore/TabState.sys.mjs
@@ -84,6 +84,18 @@ class _TabState { @@ -84,6 +84,16 @@ class _TabState {
tabData.groupId = tab.group.id; tabData.groupId = tab.group.id;
} }
@ -15,8 +15,6 @@ index 8f7ed557e6aa61e7e16ed4a8d785ad5fe651b3d8..76f4cf5aef30cb580ef0295fe6928b5a
+ tabData.zenPinnedIcon = tab.getAttribute("zen-pinned-icon"); + tabData.zenPinnedIcon = tab.getAttribute("zen-pinned-icon");
+ tabData.zenIsEmpty = tab.hasAttribute("zen-empty-tab"); + tabData.zenIsEmpty = tab.hasAttribute("zen-empty-tab");
+ tabData.zenHasStaticLabel = tab.hasAttribute("zen-has-static-label"); + tabData.zenHasStaticLabel = tab.hasAttribute("zen-has-static-label");
+ tabData.zenGlanceId = tab.getAttribute("glance-id");
+ tabData.zenIsGlance = tab.hasAttribute("zen-glance-tab");
+ +
tabData.searchMode = tab.ownerGlobal.gURLBar.getSearchMode(browser, true); tabData.searchMode = tab.ownerGlobal.gURLBar.getSearchMode(browser, true);

View file

@ -1,13 +0,0 @@
diff --git a/browser/components/tabbrowser/TabUnloader.sys.mjs b/browser/components/tabbrowser/TabUnloader.sys.mjs
index 44846cc902fd3fc17d12be38ac9abccb47a12f23..c715c7cf47486066b3fd6f92bf78bc8a720759bc 100644
--- a/browser/components/tabbrowser/TabUnloader.sys.mjs
+++ b/browser/components/tabbrowser/TabUnloader.sys.mjs
@@ -52,7 +52,7 @@ let CRITERIA_WEIGHT = 1;
*/
let DefaultTabUnloaderMethods = {
isNonDiscardable(tab, weight) {
- if (tab.undiscardable || tab.selected) {
+ if (tab.undiscardable || tab.selected || tab.zenModeActive) {
return weight;
}

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b107efb855 100644 index dc92771ebc65095dfebbddc238ee6d4fffd897bf..ae9120f7cc8989cf625ac101d053d82582e32009 100644
--- a/browser/components/tabbrowser/content/tab.js --- a/browser/components/tabbrowser/content/tab.js
+++ b/browser/components/tabbrowser/content/tab.js +++ b/browser/components/tabbrowser/content/tab.js
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
@ -21,7 +21,7 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
</hbox> </hbox>
</stack> </stack>
`; `;
@@ -180,7 +183,7 @@ @@ -175,7 +178,7 @@
} }
set _visuallySelected(val) { set _visuallySelected(val) {
@ -30,7 +30,7 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
return; return;
} }
@@ -216,7 +219,7 @@ @@ -211,7 +214,7 @@
} }
get visible() { get visible() {
@ -39,7 +39,7 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
} }
get hidden() { get hidden() {
@@ -287,7 +290,7 @@ @@ -282,7 +285,7 @@
return false; return false;
} }
@ -48,7 +48,7 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
} }
get lastAccessed() { get lastAccessed() {
@@ -459,6 +462,8 @@ @@ -454,6 +457,8 @@
this.style.MozUserFocus = "ignore"; this.style.MozUserFocus = "ignore";
} else if ( } else if (
event.target.classList.contains("tab-close-button") || event.target.classList.contains("tab-close-button") ||
@ -57,18 +57,7 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
event.target.classList.contains("tab-icon-overlay") || event.target.classList.contains("tab-icon-overlay") ||
event.target.classList.contains("tab-audio-button") event.target.classList.contains("tab-audio-button")
) { ) {
@@ -513,6 +518,10 @@ @@ -554,6 +559,7 @@
this.style.MozUserFocus = "";
}
+ get glanceTab() {
+ return this.querySelector("tab[zen-glance-tab]");
+ }
+
on_click(event) {
if (event.button != 0) {
return;
@@ -559,6 +568,7 @@
telemetrySource: lazy.TabMetrics.METRIC_SOURCE.TAB_STRIP, telemetrySource: lazy.TabMetrics.METRIC_SOURCE.TAB_STRIP,
}); });
} else { } else {
@ -76,7 +65,7 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
gBrowser.removeTab(this, { gBrowser.removeTab(this, {
animate: true, animate: true,
triggeringEvent: event, triggeringEvent: event,
@@ -569,6 +579,14 @@ @@ -564,6 +570,14 @@
// (see tabbrowser-tabs 'click' handler). // (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true; gBrowser.tabContainer._blockDblClick = true;
} }
@ -91,7 +80,7 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
} }
on_dblclick(event) { on_dblclick(event) {
@@ -592,6 +610,8 @@ @@ -587,6 +601,8 @@
animate: true, animate: true,
triggeringEvent: event, triggeringEvent: event,
}); });

View file

@ -1,11 +1,15 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b598a513c2 100644 index 6dece2b9d0462d90a28e75350ce983d87816ef73..e54e815b04c311464ed53364007d99bb6c1a0cf3 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js --- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -413,11 +413,41 @@ @@ -415,11 +415,45 @@
return this.tabContainer.visibleTabs; return this.tabContainer.visibleTabs;
} }
+ zenInsertTabAtIndex(...args) {
+ return this.#insertTabAtElementIndex(...args);
+ }
+
+ get _numVisiblePinTabsWithoutCollapsed() { + get _numVisiblePinTabsWithoutCollapsed() {
+ let i = 0; + let i = 0;
+ for (let item of this.tabContainer.ariaFocusableItems) { + for (let item of this.tabContainer.ariaFocusableItems) {
@ -46,15 +50,15 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
} }
return i; return i;
} }
@@ -569,6 +599,7 @@ @@ -571,6 +605,7 @@
this.tabpanels.appendChild(panel); this.tabpanels.appendChild(panel);
let tab = this.tabs[0]; let tab = this.tabs[0];
+ gZenWorkspaces.handleInitialTab(tab, (!remoteType || remoteType === E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE) && !gZenUIManager.testingEnabled); + ZenWorkspaces.handleInitialTab(tab, (!remoteType || remoteType === E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE) && !gZenUIManager.testingEnabled);
tab.linkedPanel = uniqueId; tab.linkedPanel = uniqueId;
this._selectedTab = tab; this._selectedTab = tab;
this._selectedBrowser = browser; this._selectedBrowser = browser;
@@ -834,11 +865,13 @@ @@ -836,11 +871,13 @@
} }
this.showTab(aTab); this.showTab(aTab);
@ -64,14 +68,14 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
+ if (this.tabContainer.verticalMode && !handled) { + if (this.tabContainer.verticalMode && !handled) {
this.#handleTabMove(aTab, () => this.#handleTabMove(aTab, () =>
- this.verticalPinnedTabsContainer.appendChild(aTab) - this.verticalPinnedTabsContainer.appendChild(aTab)
+ aTab.hasAttribute("zen-essential") ? gZenWorkspaces.getEssentialsSection(aTab).appendChild(aTab) : this.verticalPinnedTabsContainer.insertBefore(aTab, this.verticalPinnedTabsContainer.lastChild) + aTab.hasAttribute("zen-essential") ? ZenWorkspaces.getEssentialsSection(aTab).appendChild(aTab) : this.verticalPinnedTabsContainer.insertBefore(aTab, this.verticalPinnedTabsContainer.lastChild)
); );
- } else { - } else {
+ } else if (!handled) { + } else if (!handled) {
this.moveTabTo(aTab, { this.moveTabTo(aTab, {
tabIndex: this.pinnedTabCount, tabIndex: this.pinnedTabCount,
forceUngrouped: true, forceUngrouped: true,
@@ -855,12 +888,15 @@ @@ -857,12 +894,15 @@
} }
if (this.tabContainer.verticalMode) { if (this.tabContainer.verticalMode) {
@ -83,12 +87,12 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
aTab.removeAttribute("pinned"); aTab.removeAttribute("pinned");
- this.tabContainer.arrowScrollbox.prepend(aTab); - this.tabContainer.arrowScrollbox.prepend(aTab);
+ if (!handled) { + if (!handled) {
+ gZenWorkspaces.activeWorkspaceStrip.prepend(aTab); + ZenWorkspaces.activeWorkspaceStrip.prepend(aTab);
+ } + }
}); });
} else { } else {
this.moveTabTo(aTab, { this.moveTabTo(aTab, {
@@ -1044,6 +1080,8 @@ @@ -1046,6 +1086,8 @@
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"]; let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
@ -97,7 +101,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
if ( if (
aIconURL && aIconURL &&
!aLoadingPrincipal && !aLoadingPrincipal &&
@@ -1054,6 +1092,9 @@ @@ -1056,6 +1098,9 @@
); );
return; return;
} }
@ -107,7 +111,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
let browser = this.getBrowserForTab(aTab); let browser = this.getBrowserForTab(aTab);
browser.mIconURL = aIconURL; browser.mIconURL = aIconURL;
@@ -1303,6 +1344,7 @@ @@ -1305,6 +1350,7 @@
if (!this._previewMode) { if (!this._previewMode) {
newTab.recordTimeFromUnloadToReload(); newTab.recordTimeFromUnloadToReload();
newTab.updateLastAccessed(); newTab.updateLastAccessed();
@ -115,7 +119,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
oldTab.updateLastAccessed(); oldTab.updateLastAccessed();
// if this is the foreground window, update the last-seen timestamps. // if this is the foreground window, update the last-seen timestamps.
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) { if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
@@ -1455,6 +1497,9 @@ @@ -1457,6 +1503,9 @@
} }
let activeEl = document.activeElement; let activeEl = document.activeElement;
@ -125,7 +129,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
// If focus is on the old tab, move it to the new tab. // If focus is on the old tab, move it to the new tab.
if (activeEl == oldTab) { if (activeEl == oldTab) {
newTab.focus(); newTab.focus();
@@ -1778,7 +1823,8 @@ @@ -1780,7 +1829,8 @@
} }
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) { _setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
@ -135,7 +139,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
return false; return false;
} }
@@ -1886,7 +1932,7 @@ @@ -1888,7 +1938,7 @@
newIndex = this.selectedTab._tPos + 1; newIndex = this.selectedTab._tPos + 1;
} }
@ -144,7 +148,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
if (this.isTabGroupLabel(targetTab)) { if (this.isTabGroupLabel(targetTab)) {
throw new Error( throw new Error(
"Replacing a tab group label with a tab is not supported" "Replacing a tab group label with a tab is not supported"
@@ -2150,6 +2196,7 @@ @@ -2152,6 +2202,7 @@
uriIsAboutBlank, uriIsAboutBlank,
userContextId, userContextId,
skipLoad, skipLoad,
@ -152,7 +156,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
} = {}) { } = {}) {
let b = document.createXULElement("browser"); let b = document.createXULElement("browser");
// Use the JSM global to create the permanentKey, so that if the // Use the JSM global to create the permanentKey, so that if the
@@ -2223,8 +2270,7 @@ @@ -2225,8 +2276,7 @@
// we use a different attribute name for this? // we use a different attribute name for this?
b.setAttribute("name", name); b.setAttribute("name", name);
} }
@ -162,7 +166,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
b.setAttribute("transparent", "true"); b.setAttribute("transparent", "true");
} }
@@ -2389,7 +2435,7 @@ @@ -2391,7 +2441,7 @@
let panel = this.getPanel(browser); let panel = this.getPanel(browser);
let uniqueId = this._generateUniquePanelID(); let uniqueId = this._generateUniquePanelID();
@ -171,7 +175,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
aTab.linkedPanel = uniqueId; aTab.linkedPanel = uniqueId;
// Inject the <browser> into the DOM if necessary. // Inject the <browser> into the DOM if necessary.
@@ -2448,8 +2494,8 @@ @@ -2450,8 +2500,8 @@
// If we transitioned from one browser to two browsers, we need to set // If we transitioned from one browser to two browsers, we need to set
// hasSiblings=false on both the existing browser and the new browser. // hasSiblings=false on both the existing browser and the new browser.
if (this.tabs.length == 2) { if (this.tabs.length == 2) {
@ -182,7 +186,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
} else { } else {
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1; aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
} }
@@ -2680,6 +2726,7 @@ @@ -2679,6 +2729,7 @@
schemelessInput, schemelessInput,
hasValidUserGestureActivation = false, hasValidUserGestureActivation = false,
textDirectiveUserActivation = false, textDirectiveUserActivation = false,
@ -190,20 +194,20 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
} = {} } = {}
) { ) {
// all callers of addTab that pass a params object need to pass // all callers of addTab that pass a params object need to pass
@@ -2690,6 +2737,12 @@ @@ -2689,6 +2740,12 @@
); );
} }
+ let hasZenDefaultUserContextId = false; + let hasZenDefaultUserContextId = false;
+ let zenForcedWorkspaceId = undefined; + let zenForcedWorkspaceId = undefined;
+ if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) { + if (typeof ZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
+ [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal, allowInheritPrincipal); + [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = ZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal, allowInheritPrincipal);
+ } + }
+ +
if (!UserInteraction.running("browser.tabs.opening", window)) { if (!UserInteraction.running("browser.tabs.opening", window)) {
UserInteraction.start("browser.tabs.opening", "initting", window); UserInteraction.start("browser.tabs.opening", "initting", window);
} }
@@ -2753,6 +2806,16 @@ @@ -2752,6 +2809,16 @@
noInitialLabel, noInitialLabel,
skipBackgroundNotify, skipBackgroundNotify,
}); });
@ -218,9 +222,9 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
+ t.setAttribute("zen-empty-tab", "true"); + t.setAttribute("zen-empty-tab", "true");
+ } + }
if (insertTab) { if (insertTab) {
// Insert the tab into the tab container in the correct position. if (typeof index == "number") {
// For now, we support `index` as an alias for `tabIndex`. elementIndex = this.#tabIndexToElementIndex(index);
@@ -2783,6 +2846,7 @@ @@ -2779,6 +2846,7 @@
openWindowInfo, openWindowInfo,
skipLoad, skipLoad,
triggeringRemoteType, triggeringRemoteType,
@ -228,7 +232,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
})); }));
if (focusUrlBar) { if (focusUrlBar) {
@@ -2902,6 +2966,12 @@ @@ -2898,6 +2966,12 @@
} }
} }
@ -241,22 +245,35 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
// Additionally send pinned tab events // Additionally send pinned tab events
if (pinned) { if (pinned) {
this._notifyPinnedStatus(t); this._notifyPinnedStatus(t);
@@ -2990,10 +3060,10 @@ @@ -2945,12 +3019,15 @@
isAdoptingGroup = false, * @param {string} [label=]
* @returns {MozTabbrowserTabGroup}
*/
- _createTabGroup(id, color, collapsed, label = "") {
+ _createTabGroup(id, color, collapsed, label = "", pinned = false, essential = false, splitViewGroup = false) {
let group = document.createXULElement("tab-group", { is: "tab-group" });
group.id = id;
group.collapsed = collapsed;
group.color = color;
group.label = label;
+ group.pinned = pinned;
+ group.essential = essential;
+ if (splitViewGroup) group.setAttribute('split-view-group', true);
return group;
}
@@ -2993,6 +3070,7 @@
insertBefore = null,
isUserTriggered = false, isUserTriggered = false,
telemetryUserCreateSource = "unknown", telemetryUserCreateSource = "unknown",
+ forSplitView = false, + forSplitView = false,
} = {} } = {}
) { ) {
if (!tabs?.length) { if (!tabs?.length) {
- throw new Error("Cannot create tab group with zero tabs"); @@ -3011,7 +3089,12 @@
id = `${Date.now()}-${Math.round(Math.random() * 100)}`;
} }
let group = this._createTabGroup(id, color, false, label);
if (!color) {
@@ -3014,7 +3084,12 @@
label,
isAdoptingGroup
);
- this.tabContainer.insertBefore( - this.tabContainer.insertBefore(
+ if (forSplitView) { + if (forSplitView) {
+ group.setAttribute('split-view-group', true); + group.setAttribute('split-view-group', true);
@ -267,7 +284,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
group, group,
insertBefore?.group ?? insertBefore insertBefore?.group ?? insertBefore
); );
@@ -3303,6 +3378,7 @@ @@ -3342,6 +3425,7 @@
openWindowInfo, openWindowInfo,
skipLoad, skipLoad,
triggeringRemoteType, triggeringRemoteType,
@ -275,7 +292,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
} }
) { ) {
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and // If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
@@ -3372,6 +3448,7 @@ @@ -3411,6 +3495,7 @@
openWindowInfo, openWindowInfo,
name, name,
skipLoad, skipLoad,
@ -283,7 +300,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
}); });
} }
@@ -3560,7 +3637,7 @@ @@ -3599,7 +3684,7 @@
// Add a new tab if needed. // Add a new tab if needed.
if (!tab) { if (!tab) {
let createLazyBrowser = let createLazyBrowser =
@ -292,17 +309,37 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
let url = "about:blank"; let url = "about:blank";
if (tabData.entries?.length) { if (tabData.entries?.length) {
@@ -3598,7 +3675,8 @@ @@ -3637,7 +3722,29 @@
skipLoad: true, skipLoad: true,
preferredRemoteType, preferredRemoteType,
}); });
-
+ tab._originalUrl = url; + tab._originalUrl = url;
+ gZenSessionStore.restoreInitialTabData(tab, tabData);
+ if (tabData.zenWorkspace) {
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
+ }
+ if (tabData.zenPinnedId) {
+ tab.setAttribute("zen-pin-id", tabData.zenPinnedId);
+ }
+ if (tabData.zenIsEmpty) {
+ tab.setAttribute("zen-empty-tab", "true");
+ }
+ if (tabData.zenHasStaticLabel) {
+ tab.setAttribute("zen-has-static-label", "true");
+ }
+ if (tabData.zenEssential) {
+ tab.setAttribute("zen-essential", "true");
+ }
+ if (tabData.zenDefaultUserContextId) {
+ tab.setAttribute("zenDefaultUserContextId", "true");
+ }
+ if (tabData.zenPinnedEntry) {
+ tab.setAttribute("zen-pinned-entry", tabData.zenPinnedEntry);
+ }
if (select) { if (select) {
tabToSelect = tab; tabToSelect = tab;
} }
@@ -3622,7 +3700,8 @@ @@ -3661,7 +3768,8 @@
// needs calling: // needs calling:
shouldUpdateForPinnedTabs = true; shouldUpdateForPinnedTabs = true;
} }
@ -312,7 +349,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
let { groupId } = tabData; let { groupId } = tabData;
const tabGroup = tabGroupWorkingData.get(groupId); const tabGroup = tabGroupWorkingData.get(groupId);
// if a tab refers to a tab group we don't know, skip any group // if a tab refers to a tab group we don't know, skip any group
@@ -3636,7 +3715,10 @@ @@ -3675,7 +3783,10 @@
tabGroup.stateData.id, tabGroup.stateData.id,
tabGroup.stateData.color, tabGroup.stateData.color,
tabGroup.stateData.collapsed, tabGroup.stateData.collapsed,
@ -324,45 +361,45 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
); );
tabsFragment.appendChild(tabGroup.node); tabsFragment.appendChild(tabGroup.node);
} }
@@ -3684,8 +3766,16 @@ @@ -3723,8 +3834,16 @@
// to remove the old selected tab. // to remove the old selected tab.
if (tabToSelect) { if (tabToSelect) {
let leftoverTab = this.selectedTab; let leftoverTab = this.selectedTab;
- this.selectedTab = tabToSelect; - this.selectedTab = tabToSelect;
- this.removeTab(leftoverTab); - this.removeTab(leftoverTab);
+ gZenWorkspaces._tabToRemoveForEmpty = leftoverTab; + ZenWorkspaces._tabToRemoveForEmpty = leftoverTab;
+ if (Services.prefs.getBoolPref("zen.workspaces.continue-where-left-off")) { + if (Services.prefs.getBoolPref("zen.workspaces.continue-where-left-off")) {
+ gZenWorkspaces._tabToSelect = selectTab - 1; + ZenWorkspaces._tabToSelect = selectTab - 1;
+ } + }
+ if (gZenWorkspaces._initialTab && !gZenVerticalTabsManager._canReplaceNewTab) { + if (ZenWorkspaces._initialTab && !gZenVerticalTabsManager._canReplaceNewTab) {
+ gZenWorkspaces._initialTab._shouldRemove = true; + ZenWorkspaces._initialTab._shouldRemove = true;
+ } + }
+ } + }
+ else { + else {
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab; + ZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
} }
if (tabs.length > 1 || !tabs[0].selected) { if (tabs.length > 1 || !tabs[0].selected) {
@@ -3881,7 +3971,7 @@ @@ -3912,7 +4031,7 @@
// Ensure we have an index if one was not provided. // Ensure we have an index if one was not provided.
if (typeof elementIndex != "number" && typeof tabIndex != "number") { if (typeof index != "number") {
// Move the new tab after another tab if needed, to the end otherwise. // Move the new tab after another tab if needed, to the end otherwise.
- elementIndex = Infinity; - index = Infinity;
+ elementIndex = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this._numVisiblePinTabsWithoutCollapsed : Infinity; + index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this._numVisiblePinTabsWithoutCollapsed : Infinity;
if ( if (
!bulkOrderedOpen && !bulkOrderedOpen &&
((openerTab && ((openerTab &&
@@ -3904,7 +3994,7 @@ @@ -3935,7 +4054,7 @@
) { ) {
elementIndex = Infinity; index = Infinity;
} else if (previousTab.visible) { } else if (previousTab.visible) {
- elementIndex = previousTab.elementIndex + 1; - index = previousTab.elementIndex + 1;
+ elementIndex = (typeof previousTab.elementIndex === 'undefined') ? index : (previousTab.elementIndex + 1); + index = (typeof previousTab.elementIndex === 'undefined') ? index : (previousTab.elementIndex + 1);
} else if (previousTab == FirefoxViewHandler.tab) { } else if (previousTab == FirefoxViewHandler.tab) {
elementIndex = 0; index = 0;
} }
@@ -3932,14 +4022,14 @@ @@ -3958,18 +4077,18 @@
}
// Ensure index is within bounds. // Ensure index is within bounds.
if (tab.pinned) { if (tab.pinned) {
- index = Math.max(index, 0); - index = Math.max(index, 0);
@ -372,16 +409,12 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
} else { } else {
- index = Math.max(index, this.pinnedTabCount); - index = Math.max(index, this.pinnedTabCount);
+ index = Math.max(index, this._numVisiblePinTabsWithoutCollapsed); + index = Math.max(index, this._numVisiblePinTabsWithoutCollapsed);
index = Math.min(index, allItems.length); index = Math.min(index, this.tabContainer.ariaFocusableItems.length);
} }
/** @type {MozTabbrowserTab|undefined} */ /** @type {MozTabbrowserTab|undefined} */
- let itemAfter = allItems.at(index); - let itemAfter = this.tabContainer.ariaFocusableItems.at(index);
+ let itemAfter = gZenGlanceManager.getTabOrGlanceParent(allItems.at(index)); + let itemAfter = this.tabContainer.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).at(index);
// Prevent a flash of unstyled content by setting up the tab content
// and inherited attributes before appending it (see Bug 1592054):
@@ -3947,7 +4037,7 @@
this.tabContainer._invalidateCachedTabs(); this.tabContainer._invalidateCachedTabs();
- if (tabGroup) { - if (tabGroup) {
@ -389,7 +422,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) { if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
// Place at the front of, or between tabs in, the same tab group // Place at the front of, or between tabs in, the same tab group
this.tabContainer.insertBefore(tab, itemAfter); this.tabContainer.insertBefore(tab, itemAfter);
@@ -4268,6 +4358,9 @@ @@ -4290,6 +4409,9 @@
return; return;
} }
@ -399,7 +432,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
this.removeTabs(selectedTabs, { telemetrySource }); this.removeTabs(selectedTabs, { telemetrySource });
} }
@@ -4520,6 +4613,7 @@ @@ -4542,6 +4664,7 @@
telemetrySource, telemetrySource,
} = {} } = {}
) { ) {
@ -407,7 +440,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs // When 'closeWindowWithLastTab' pref is enabled, closing all tabs
// can be considered equivalent to closing the window. // can be considered equivalent to closing the window.
if ( if (
@@ -4604,6 +4698,7 @@ @@ -4626,6 +4749,7 @@
if (lastToClose) { if (lastToClose) {
this.removeTab(lastToClose, aParams); this.removeTab(lastToClose, aParams);
} }
@ -415,12 +448,20 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
} catch (e) { } catch (e) {
console.error(e); console.error(e);
} }
@@ -4641,6 +4736,12 @@ @@ -4650,6 +4774,7 @@
telemetrySource,
} = {}
) {
+ gZenUIManager.saveScrollbarState();
if (UserInteraction.running("browser.tabs.opening", window)) {
UserInteraction.finish("browser.tabs.opening", window);
}
@@ -4663,6 +4788,12 @@
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start(); aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
} }
+ if (gZenWorkspaces.workspaceEnabled) { + if (ZenWorkspaces.workspaceEnabled) {
+ let newTab = gZenWorkspaces.handleTabBeforeClose(aTab, closeWindowWithLastTab); + let newTab = ZenWorkspaces.handleTabBeforeClose(aTab, closeWindowWithLastTab);
+ if (newTab) { + if (newTab) {
+ this.selectedTab = newTab; + this.selectedTab = newTab;
+ } + }
@ -428,7 +469,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
// Handle requests for synchronously removing an already // Handle requests for synchronously removing an already
// asynchronously closing tab. // asynchronously closing tab.
if (!animate && aTab.closing) { if (!animate && aTab.closing) {
@@ -4655,7 +4756,9 @@ @@ -4677,7 +4808,9 @@
// frame created for it (for example, by updating the visually selected // frame created for it (for example, by updating the visually selected
// state). // state).
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width; let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
@ -439,86 +480,97 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
if ( if (
!this._beginRemoveTab(aTab, { !this._beginRemoveTab(aTab, {
closeWindowFastpath: true, closeWindowFastpath: true,
@@ -4821,7 +4924,7 @@ @@ -4840,7 +4973,7 @@
closeWindowWithLastTab != null closeWindowWithLastTab != null
? closeWindowWithLastTab ? closeWindowWithLastTab
: !window.toolbar.visible || : !window.toolbar.visible ||
- Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab"); - Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
+ Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") && !gZenWorkspaces._isClosingWindow && !gZenWorkspaces._removedByStartupPage; + Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") && !ZenWorkspaces._isClosingWindow && !ZenWorkspaces._removedByStartupPage;
if (closeWindow) { if (closeWindow) {
// We've already called beforeunload on all the relevant tabs if we get here, // We've already called beforeunload on all the relevant tabs if we get here,
@@ -4845,6 +4948,7 @@ @@ -4864,6 +4997,7 @@
newTab = true; newTab = true;
} }
+ gZenWorkspaces._removedByStartupPage = false; + ZenWorkspaces._removedByStartupPage = false;
aTab._endRemoveArgs = [closeWindow, newTab]; aTab._endRemoveArgs = [closeWindow, newTab];
// swapBrowsersAndCloseOther will take care of closing the window without animation. // swapBrowsersAndCloseOther will take care of closing the window without animation.
@@ -4885,9 +4989,7 @@ @@ -4903,9 +5037,7 @@
aTab._mouseleave(); aTab._mouseleave();
if (newTab) { if (newTab) {
- this.addTrustedTab(BROWSER_NEW_TAB_URL, { - this.addTrustedTab(BROWSER_NEW_TAB_URL, {
- skipAnimation: true, - skipAnimation: true,
- }); - });
+ gZenWorkspaces.selectEmptyTab(BROWSER_NEW_TAB_URL); + ZenWorkspaces.selectEmptyTab(BROWSER_NEW_TAB_URL);
} else { } else {
TabBarVisibility.update(); TabBarVisibility.update();
} }
@@ -5016,6 +5118,8 @@ @@ -5034,6 +5166,8 @@
this.tabs[i]._tPos = i; this.tabs[i]._tPos = i;
} }
+ gZenWorkspaces.updateTabsContainers(); + ZenWorkspaces.updateTabsContainers();
+ +
if (!this._windowIsClosing) { if (!this._windowIsClosing) {
if (wasPinned) { if (wasPinned) {
this.tabContainer._positionPinnedTabs(); this.tabContainer._positionPinnedTabs();
@@ -5230,6 +5334,7 @@ @@ -5159,8 +5293,8 @@
return closedCount;
}
- async explicitUnloadTabs(tabs) {
- let unloadBlocked = await this.runBeforeUnloadForTabs(tabs);
+ async explicitUnloadTabs(tabs, skipPermitUnload = false) {
+ let unloadBlocked = skipPermitUnload ? false : await this.runBeforeUnloadForTabs(tabs);
if (unloadBlocked) {
return;
}
@@ -5248,6 +5382,7 @@
} }
let excludeTabs = new Set(aExcludeTabs); let excludeTabs = new Set(aExcludeTabs);
+ gZenWorkspaces.getTabsToExclude(aTab).forEach(tab => excludeTabs.add(tab)); + ZenWorkspaces.getTabsToExclude(aTab).forEach(tab => excludeTabs.add(tab));
// If this tab has a successor, it should be selectable, since // If this tab has a successor, it should be selectable, since
// hiding or closing a tab removes that tab as a successor. // hiding or closing a tab removes that tab as a successor.
@@ -5242,13 +5347,13 @@ @@ -5260,13 +5395,13 @@
!excludeTabs.has(aTab.owner) && !excludeTabs.has(aTab.owner) &&
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose") Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
) { ) {
- return aTab.owner; - return aTab.owner;
+ return gZenWorkspaces.findTabToBlur(aTab.owner); + return ZenWorkspaces.findTabToBlur(aTab.owner);
} }
// Try to find a remaining tab that comes after the given tab // Try to find a remaining tab that comes after the given tab
let remainingTabs = Array.prototype.filter.call( let remainingTabs = Array.prototype.filter.call(
this.visibleTabs, this.visibleTabs,
- tab => !excludeTabs.has(tab) - tab => !excludeTabs.has(tab)
+ tab => !excludeTabs.has(tab) && gZenWorkspaces._shouldChangeToTab(tab) + tab => !excludeTabs.has(tab) && ZenWorkspaces._shouldChangeToTab(tab)
); );
let tab = this.tabContainer.findNextTab(aTab, { let tab = this.tabContainer.findNextTab(aTab, {
@@ -5264,7 +5369,7 @@ @@ -5282,7 +5417,7 @@
} }
if (tab) { if (tab) {
- return tab; - return tab;
+ return gZenWorkspaces.findTabToBlur(tab); + return ZenWorkspaces.findTabToBlur(tab);
} }
// If no qualifying visible tab was found, see if there is a tab in // If no qualifying visible tab was found, see if there is a tab in
@@ -5285,7 +5390,7 @@ @@ -5303,7 +5438,7 @@
}); });
} }
- return tab; - return tab;
+ return gZenWorkspaces.findTabToBlur(tab); + return ZenWorkspaces.findTabToBlur(tab);
} }
_blurTab(aTab) { _blurTab(aTab) {
@@ -5686,10 +5791,10 @@ @@ -5704,10 +5839,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy"); SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
} }
@ -531,22 +583,21 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
aTab.selected || aTab.selected ||
aTab.closing || aTab.closing ||
// Tabs that are sharing the screen, microphone or camera cannot be hidden. // Tabs that are sharing the screen, microphone or camera cannot be hidden.
@@ -5986,7 +6091,7 @@ @@ -6001,7 +6136,7 @@
// Don't allow mixing pinned and unpinned tabs. // Don't allow mixing pinned and unpinned tabs.
if (this.isTab(element) && element.pinned) { if (this.isTab(element) && element.pinned) {
- tabIndex = Math.min(tabIndex, this.pinnedTabCount - 1); - tabIndex = Math.min(tabIndex, this.pinnedTabCount - 1);
+ tabIndex = element.hasAttribute('zen-essential') ? Math.min(tabIndex, this._numZenEssentials - 1) : Math.min(Math.max(tabIndex, this._numZenEssentials), this.pinnedTabCount - 1); + tabIndex = element.hasAttribute('zen-essential') ? Math.min(tabIndex, this._numZenEssentials - 1) : Math.min(tabIndex, this.pinnedTabCount - 1);
} else { } else {
tabIndex = Math.max(tabIndex, this.pinnedTabCount); tabIndex = Math.max(tabIndex, this.pinnedTabCount);
} }
@@ -6012,10 +6117,16 @@ @@ -6028,9 +6163,16 @@
this.#handleTabMove(
element, element,
() => { () => {
- let neighbor = this.tabs[tabIndex]; let neighbor = this.tabs[tabIndex];
- if (forceUngrouped && neighbor?.group) { - if (forceUngrouped && neighbor.group) {
+ let neighbor = gZenGlanceManager.getTabOrGlanceParent(this.tabs[tabIndex]); + const _tPos = element._tPos;
+ if ((forceUngrouped && neighbor?.group) || neighbor?.group?.hasAttribute("split-view-group")) { + if ((forceUngrouped && neighbor?.group) || neighbor?.group?.hasAttribute("split-view-group")) {
neighbor = neighbor.group; neighbor = neighbor.group;
} }
@ -559,7 +610,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
if (neighbor && this.isTab(element) && tabIndex > element._tPos) { if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
neighbor.after(element); neighbor.after(element);
} else { } else {
@@ -6084,17 +6195,29 @@ @@ -6099,7 +6241,9 @@
targetElement = targetElement.group; targetElement = targetElement.group;
} }
} }
@ -568,32 +619,23 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
+ element = element.group; + element = element.group;
+ } + }
// Don't allow mixing pinned and unpinned tabs. // Don't allow mixing pinned and unpinned tabs.
- if (element.pinned && !targetElement?.pinned) { if (element.pinned && !targetElement?.pinned) {
- targetElement = this.tabs[this.pinnedTabCount - 1]; targetElement = this.tabs[this.pinnedTabCount - 1];
+ if (element.hasAttribute('zen-essential') && !targetElement?.hasAttribute('zen-essential')) { @@ -6109,7 +6253,13 @@
+ targetElement = this.tabs.filter(tab => !tab.hasAttribute('zen-glance-tab'))[this._numZenEssentials - 1];
+ moveBefore = false;
+ } else if (element.pinned && !targetElement?.pinned) {
+ targetElement = this.tabs.filter(tab => !tab.hasAttribute('zen-glance-tab'))[this.pinnedTabCount - 1];
moveBefore = false;
} else if (!element.pinned && targetElement && targetElement.pinned) {
- targetElement = this.tabs[this.pinnedTabCount];
+ targetElement = this.tabs.filter(tab => !tab.hasAttribute('zen-glance-tab'))[this.pinnedTabCount];
moveBefore = true; moveBefore = true;
} }
+ if (targetElement?.group?.hasAttribute("split-view-group")) { + if (targetElement?.group?.hasAttribute("split-view-group")) {
+ targetElement = targetElement.group; + targetElement = targetElement.group;
+ } + }
+ targetElement = gZenGlanceManager.getTabOrGlanceParent(targetElement);
let getContainer = () => { let getContainer = () => {
+ if (element.hasAttribute("zen-essential")) { + if (element.hasAttribute("zen-essential")) {
+ return gZenWorkspaces.getEssentialsSection(element); + return ZenWorkspaces.getEssentialsSection(element);
+ } + }
if (element.pinned && this.tabContainer.verticalMode) { if (element.pinned && this.tabContainer.verticalMode) {
return this.tabContainer.verticalPinnedTabsContainer; return this.tabContainer.verticalPinnedTabsContainer;
} }
@@ -6154,7 +6277,7 @@ @@ -6169,7 +6319,7 @@
if (!this.isTab(aTab)) { if (!this.isTab(aTab)) {
throw new Error("Can only move a tab into a tab group"); throw new Error("Can only move a tab into a tab group");
} }
@ -602,27 +644,27 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
return; return;
} }
if (aTab.group && aTab.group.id === aGroup.id) { if (aTab.group && aTab.group.id === aGroup.id) {
@@ -6248,6 +6371,10 @@ @@ -6263,6 +6413,10 @@
moveActionCallback(); moveActionCallback();
+ gZenWorkspaces._makeSureEmptyTabIsLast(); + ZenWorkspaces._makeSureEmptyTabIsLast();
+ gZenViewSplitter._maybeRemoveFakeBrowser(false); + gZenViewSplitter._maybeRemoveFakeBrowser(false);
+ gZenViewSplitter._canDrop = false; + gZenViewSplitter._canDrop = false;
+ +
// Clear tabs cache after moving nodes because the order of tabs may have // Clear tabs cache after moving nodes because the order of tabs may have
// changed. // changed.
this.tabContainer._invalidateCachedTabs(); this.tabContainer._invalidateCachedTabs();
@@ -7145,7 +7272,7 @@ @@ -7080,7 +7234,7 @@
// preventDefault(). It will still raise the window if appropriate. // preventDefault(). It will still raise the window if appropriate.
break; break;
} }
- this.selectedTab = tab; - this.selectedTab = tab;
+ gZenWorkspaces.switchTabIfNeeded(tab); + ZenWorkspaces.switchTabIfNeeded(tab);
window.focus(); window.focus();
aEvent.preventDefault(); aEvent.preventDefault();
break; break;
@@ -8044,6 +8171,7 @@ @@ -7981,6 +8135,7 @@
aWebProgress.isTopLevel aWebProgress.isTopLevel
) { ) {
this.mTab.setAttribute("busy", "true"); this.mTab.setAttribute("busy", "true");
@ -630,7 +672,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
gBrowser._tabAttrModified(this.mTab, ["busy"]); gBrowser._tabAttrModified(this.mTab, ["busy"]);
this.mTab._notselectedsinceload = !this.mTab.selected; this.mTab._notselectedsinceload = !this.mTab.selected;
} }
@@ -9009,7 +9137,7 @@ var TabContextMenu = { @@ -8954,7 +9109,7 @@ var TabContextMenu = {
); );
contextUnpinSelectedTabs.hidden = contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !this.multiselected; !this.contextTab.pinned || !this.multiselected;
@ -639,7 +681,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..14f5bc046f2e54109bd3fd0402a8f8b5
// Move Tab items // Move Tab items
let contextMoveTabOptions = document.getElementById( let contextMoveTabOptions = document.getElementById(
"context_moveTabOptions" "context_moveTabOptions"
@@ -9278,6 +9406,7 @@ var TabContextMenu = { @@ -9223,6 +9378,7 @@ var TabContextMenu = {
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP, telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP,
}); });
} else { } else {

View file

@ -1,13 +0,0 @@
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
index 6dc774ea335b0c5dba7dcf76cdb23728faae1343..b0b9ef236c2e8517db4bcf3270596456bbefe11d 100644
--- a/browser/components/tabbrowser/content/tabgroup.js
+++ b/browser/components/tabbrowser/content/tabgroup.js
@@ -301,7 +301,7 @@
*/
addTabs(tabs, metricsContext) {
for (let tab of tabs) {
- if (tab.pinned) {
+ if (tab.pinned !== this.pinned) {
tab.ownerGlobal.gBrowser.unpinTab(tab);
}
let tabToMove =

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c574dfc103 100644 index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..1a3aa415d08379b00960de398808e771c299f2ca 100644
--- a/browser/components/tabbrowser/content/tabs.js --- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js +++ b/browser/components/tabbrowser/content/tabs.js
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
@ -11,33 +11,33 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
} }
return true; return true;
}; };
@@ -293,6 +293,7 @@ @@ -342,7 +342,7 @@
on_TabGroupCollapse(event) {
this._invalidateCachedVisibleTabs();
this._unlockTabSizing();
+ return;
// If the user's selected tab is in the collapsing group, kick them off
// the tab. If no tabs exist outside the group, create a new one and
@@ -349,7 +350,7 @@
// and we're not hitting the scroll buttons. // and we're not hitting the scroll buttons.
if ( if (
event.button != 0 || event.button != 0 ||
- event.target != this.arrowScrollbox || - event.target != this.arrowScrollbox ||
+ !event.target.classList.contains("zen-workspace-normal-tabs-section") || + event.target != document.getElementById("zen-tabs-wrapper") ||
event.composedTarget.localName == "toolbarbutton" event.composedTarget.localName == "toolbarbutton"
) { ) {
return; return;
@@ -699,7 +700,7 @@ @@ -391,6 +391,7 @@
// Reset the "ignored click" flag
target._ignoredCloseButtonClicks = false;
}
+ gZenUIManager.saveScrollbarState();
}
/* Protects from close-tab-button errant doubleclick:
@@ -692,7 +693,7 @@
if (this.#isContainerVerticalPinnedGrid(tab)) { if (this.#isContainerVerticalPinnedGrid(tab)) {
// In expanded vertical mode, the max number of pinned tabs per row is dynamic // In expanded vertical mode, the max number of pinned tabs per row is dynamic
// Set this before adjusting dragged tab's position // Set this before adjusting dragged tab's position
- let pinnedTabs = this.visibleTabs.slice(0, gBrowser.pinnedTabCount); - let pinnedTabs = this.visibleTabs.slice(0, gBrowser.pinnedTabCount);
+ let pinnedTabs = this.ariaFocusableItems.slice(0, gBrowser._numZenEssentials); + let pinnedTabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(0, gBrowser._numZenEssentials);
let tabsPerRow = 0; let tabsPerRow = 0;
let position = 0; let position = 0;
for (let pinnedTab of pinnedTabs) { for (let pinnedTab of pinnedTabs) {
@@ -772,7 +773,7 @@ @@ -764,7 +765,7 @@
} else if (isTabGroupLabel(tab) && !tab.group.collapsed) { } else if (isTabGroupLabel(tab) && !tab.group.collapsed) {
this._lockTabSizing(); this._lockTabSizing();
this.#keepTabSizeLocked = true; this.#keepTabSizeLocked = true;
@ -46,16 +46,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
expandGroupOnDrop = true; expandGroupOnDrop = true;
} }
} }
@@ -868,7 +869,7 @@ @@ -913,6 +914,10 @@
? event.screenY - window.screenY - tabOffset
: event.screenY - window.screenY,
scrollPos:
- this.verticalMode && tab.pinned
+ this.verticalMode && tab.pinned && false
? this.verticalPinnedTabsContainer.scrollPosition
: this.arrowScrollbox.scrollPosition,
screenX: event.screenX,
@@ -921,6 +922,10 @@
} }
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0); let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
@ -66,7 +57,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
if ( if (
(effects == "move" || effects == "copy") && (effects == "move" || effects == "copy") &&
document == draggedTab.ownerDocument && document == draggedTab.ownerDocument &&
@@ -1077,6 +1082,18 @@ @@ -1069,6 +1074,18 @@
this._tabDropIndicator.hidden = true; this._tabDropIndicator.hidden = true;
event.stopPropagation(); event.stopPropagation();
@ -85,38 +76,32 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
if (draggedTab && dropEffect == "copy") { if (draggedTab && dropEffect == "copy") {
let duplicatedDraggedTab; let duplicatedDraggedTab;
let duplicatedTabs = []; let duplicatedTabs = [];
@@ -1116,10 +1133,11 @@ @@ -1108,10 +1125,11 @@
} }
} else { } else {
let isPinned = draggedTab.pinned; let isPinned = draggedTab.pinned;
- let numPinned = gBrowser.pinnedTabCount; - let numPinned = gBrowser.pinnedTabCount;
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed; - let tabs = this.ariaFocusableItems.slice(
+ let essential = draggedTab.hasAttribute("zen-essential");
let tabs = this.ariaFocusableItems.slice(
- isPinned ? 0 : numPinned, - isPinned ? 0 : numPinned,
- isPinned ? numPinned : undefined - isPinned ? numPinned : undefined
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
+ let essential = draggedTab.hasAttribute("zen-essential");
+ let tabs = this.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
+ isPinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned, + isPinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned,
+ isPinned ? (essential ? gBrowser._numZenEssentials : numPinned) : undefined + isPinned ? (essential ? gBrowser._numZenEssentials : numPinned) : undefined
); );
let size = this.verticalMode ? "height" : "width"; let size = this.verticalMode ? "height" : "width";
let screenAxis = this.verticalMode ? "screenY" : "screenX"; let screenAxis = this.verticalMode ? "screenY" : "screenX";
@@ -1135,8 +1153,14 @@ @@ -1203,7 +1221,7 @@
(lastMovingTabScreen + tabSize); item.removeAttribute("tabdrop-samewindow");
resolve();
if (this.verticalMode) { };
+ if (oldTranslateY > 0 && translateOffsetY > tabHeight / 2) { - if (gReduceMotion) {
+ newTranslateY += tabHeight; + if (true || gReduceMotion) {
+ } postTransitionCleanup();
+ if (oldTranslateY < 0 && -translateOffsetY > tabHeight / 2) { } else {
+ newTranslateY -= tabHeight; let onTransitionEnd = transitionendEvent => {
+ } @@ -1327,6 +1345,7 @@
newTranslateY = Math.min(
- Math.max(oldTranslateY, firstBound),
+ Math.max(newTranslateY, firstBound),
lastBound
);
} else {
@@ -1337,6 +1361,7 @@
let nextItem = this.ariaFocusableItems[newIndex]; let nextItem = this.ariaFocusableItems[newIndex];
let tabGroup = isTab(nextItem) && nextItem.group; let tabGroup = isTab(nextItem) && nextItem.group;
@ -124,7 +109,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
gBrowser.loadTabs(urls, { gBrowser.loadTabs(urls, {
inBackground, inBackground,
replace, replace,
@@ -1369,6 +1394,17 @@ @@ -1359,6 +1378,17 @@
this.finishMoveTogetherSelectedTabs(draggedTab); this.finishMoveTogetherSelectedTabs(draggedTab);
this.finishAnimateTabMove(); this.finishAnimateTabMove();
@ -142,21 +127,21 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
this.#expandGroupOnDrop(draggedTab); this.#expandGroupOnDrop(draggedTab);
if ( if (
@@ -1597,7 +1633,7 @@ @@ -1582,7 +1612,7 @@
} }
get newTabButton() { get newTabButton() {
- return this.querySelector("#tabs-newtab-button"); - return this.querySelector("#tabs-newtab-button");
+ return gZenWorkspaces.activeWorkspaceStrip.querySelector("#tabs-newtab-button"); + return ZenWorkspaces.activeWorkspaceStrip.querySelector("#tabs-newtab-button");
} }
get verticalMode() { get verticalMode() {
@@ -1621,29 +1657,54 @@ @@ -1606,29 +1636,41 @@
if (this.#allTabs) { if (this.#allTabs) {
return this.#allTabs; return this.#allTabs;
} }
- let children = Array.from(this.arrowScrollbox.children); - let children = Array.from(this.arrowScrollbox.children);
+ let children = gZenWorkspaces.tabboxChildren; + let children = ZenWorkspaces.tabboxChildren;
// remove arrowScrollbox periphery element // remove arrowScrollbox periphery element
children.pop(); children.pop();
@ -166,55 +151,51 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
- for (let i = children.length - 1; i >= 0; i--) { - for (let i = children.length - 1; i >= 0; i--) {
- if (children[i].tagName == "tab-group") { - if (children[i].tagName == "tab-group") {
- children.splice(i, 1, ...children[i].tabs); - children.splice(i, 1, ...children[i].tabs);
+ const pinnedTabs = [...gZenWorkspaces.getCurrentEssentialsContainer().children, ...this.verticalPinnedTabsContainer.children]; - }
+ const expandTabs = (tabs) => { - }
+ for (let i = tabs.length - 1; i >= 0; i--) {
+ const tab = tabs[i]; this.#allTabs = [
+ if (isTabGroup(tab)) {
+ // remove the group from the list
+ tabs.splice(i, 1);
+ // add the tabs in the group to the list
+ tabs.splice(i, 0, ...tab.tabs);
+ }
}
}
-
- this.#allTabs = [
- ...this.verticalPinnedTabsContainer.children, - ...this.verticalPinnedTabsContainer.children,
+ expandTabs(pinnedTabs); + ...ZenWorkspaces.getCurrentEssentialsContainer().children, ...this.verticalPinnedTabsContainer.children,
+ expandTabs(children);
+ const allTabs = [
+ ...pinnedTabs,
...children, ...children,
]; ];
+ const lastPinnedTabIdx = pinnedTabs.length - 1; + const lastPinnedTabIdx = gBrowser.pinnedTabCount;
+ let i = 0; + for (let i = 0; i < this.#allTabs.length; i++) {
+ for (const tab of [...allTabs]) {
+ // add glance tabs (tabs inside tabs) to the list + // add glance tabs (tabs inside tabs) to the list
+ const glanceTab = tab.glanceTab; + const glanceTab = this.#allTabs[i].querySelector("tab[zen-glance-tab]");
+ if (glanceTab) { + if (glanceTab) {
+ // insert right after the parent tab. note: it must be inserted before + // insert right after the parent tab. note: it must be inserted before
+ // the last pinned tab so it can be inserted in the correct order + // the last pinned tab so it can be inserted in the correct order
+ allTabs.splice(Math.max(i++ + 1, lastPinnedTabIdx), 0, glanceTab); + this.#allTabs.splice(Math.max(i + 1, lastPinnedTabIdx), 0, glanceTab);
+ } else if (tab.classList.contains("vertical-pinned-tabs-container-separator")) { + i++;
+ } else if (this.#allTabs[i].classList.contains("vertical-pinned-tabs-container-separator")) {
+ // remove the separator from the list + // remove the separator from the list
+ allTabs.splice(i, 1); + this.#allTabs.splice(i, 1);
+ i--; + i--;
+ } else if (this.#allTabs[i].tagName == "tab-group") {
+ this.#allTabs.splice(i, 1, ...this.#allTabs[i].tabs);
+ } + }
+ i++;
+ } + }
+ this.#allTabs = allTabs;
return this.#allTabs; return this.#allTabs;
} }
get allGroups() { get allGroups() {
let children = Array.from(this.arrowScrollbox.children); let children = Array.from(this.arrowScrollbox.children);
- return children.filter(node => node.tagName == "tab-group"); - return children.filter(node => node.tagName == "tab-group");
+ return gZenWorkspaces.allTabGroups; + return ZenWorkspaces.allTabGroups;
} }
/** /**
@@ -1698,23 +1759,18 @@ @@ -1648,7 +1690,7 @@
*/
get visibleTabs() {
if (!this.#visibleTabs) {
- this.#visibleTabs = this.openTabs.filter(tab => tab.visible);
+ this.#visibleTabs = this.openTabs.filter(tab => tab.visible && !tab.hasAttribute("zen-empty-tab"));
}
return this.#visibleTabs;
}
@@ -1683,23 +1725,18 @@
} }
let elementIndex = 0; let elementIndex = 0;
@ -226,11 +207,11 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
- } - }
- let children = Array.from(this.arrowScrollbox.children); - let children = Array.from(this.arrowScrollbox.children);
+ let verticalPinnedTabsContainer = this.verticalPinnedTabsContainer + let verticalPinnedTabsContainer = this.verticalPinnedTabsContainer
+ let children = gZenWorkspaces.tabboxChildrenWithoutEmpty; + let children = ZenWorkspaces.tabboxChildrenWithoutEmpty;
let focusableItems = []; let focusableItems = [];
- for (let child of children) { - for (let child of children) {
+ for (let child of [...gZenWorkspaces.getCurrentEssentialsContainer().children, ...verticalPinnedTabsContainer.children, ...children]) { + for (let child of [...ZenWorkspaces.getCurrentEssentialsContainer().children, ...verticalPinnedTabsContainer.children, ...children]) {
if (isTab(child) && child.visible) { if (isTab(child) && child.visible) {
child.elementIndex = elementIndex++; child.elementIndex = elementIndex++;
focusableItems.push(child); focusableItems.push(child);
@ -242,8 +223,15 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
let visibleTabsInGroup = child.tabs.filter(tab => tab.visible); let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
visibleTabsInGroup.forEach(tab => { visibleTabsInGroup.forEach(tab => {
tab.elementIndex = elementIndex++; tab.elementIndex = elementIndex++;
@@ -1724,10 +1780,7 @@ @@ -1707,12 +1744,14 @@
focusableItems.push(...visibleTabsInGroup);
}
} }
+ let glanceTab = child.querySelector("tab[zen-glance-tab]");
+ if (isTab(child) && glanceTab) {
+ glanceTab.elementIndex = elementIndex++;
+ focusableItems.push(glanceTab);
+ }
} }
- this.#focusableItems = [ - this.#focusableItems = [
@ -254,15 +242,15 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
return this.#focusableItems; return this.#focusableItems;
} }
@@ -1735,6 +1788,7 @@ @@ -1720,6 +1759,7 @@
_invalidateCachedTabs() { _invalidateCachedTabs() {
this.#allTabs = null; this.#allTabs = null;
this._invalidateCachedVisibleTabs(); this._invalidateCachedVisibleTabs();
+ gZenWorkspaces._allStoredTabs = null; + ZenWorkspaces._allStoredTabs = null;
} }
_invalidateCachedVisibleTabs() { _invalidateCachedVisibleTabs() {
@@ -1749,8 +1803,8 @@ @@ -1734,8 +1774,8 @@
#isContainerVerticalPinnedGrid(tab) { #isContainerVerticalPinnedGrid(tab) {
return ( return (
this.verticalMode && this.verticalMode &&
@ -273,25 +261,25 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
!this.expandOnHover !this.expandOnHover
); );
} }
@@ -1766,7 +1820,7 @@ @@ -1751,7 +1791,7 @@
if (node == null) { if (node == null) {
// We have a container for non-tab elements at the end of the scrollbox. // We have a container for non-tab elements at the end of the scrollbox.
- node = this.arrowScrollbox.lastChild; - node = this.arrowScrollbox.lastChild;
+ node = gZenWorkspaces.activeWorkspaceStrip.lastChild; + node = ZenWorkspaces.activeWorkspaceStrip.lastChild;
} }
node.before(tab); node.before(tab);
@@ -1861,7 +1915,7 @@ @@ -1846,7 +1886,7 @@
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and // There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs); // for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
// Attach the long click popup to all of them. // Attach the long click popup to all of them.
- const newTab = document.getElementById("new-tab-button"); - const newTab = document.getElementById("new-tab-button");
+ const newTab = gZenWorkspaces.activeWorkspaceStrip.querySelector("#tabs-newtab-button"); + const newTab = ZenWorkspaces.activeWorkspaceStrip.querySelector("#tabs-newtab-button");
const newTab2 = this.newTabButton; const newTab2 = this.newTabButton;
const newTabVertical = document.getElementById( const newTabVertical = document.getElementById(
"vertical-tabs-newtab-button" "vertical-tabs-newtab-button"
@@ -1956,10 +2010,12 @@ @@ -1941,10 +1981,12 @@
_handleTabSelect(aInstant) { _handleTabSelect(aInstant) {
let selectedTab = this.selectedItem; let selectedTab = this.selectedItem;
@ -304,53 +292,89 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
selectedTab._notselectedsinceload = false; selectedTab._notselectedsinceload = false;
} }
@@ -2132,6 +2188,7 @@ @@ -2085,16 +2127,15 @@
// Move pinned tabs to another container when the tabstrip is toggled to vertical
// and when session restore code calls _positionPinnedTabs; update styling whenever
// the number of pinned tabs changes.
- let verticalTabsContainer = document.getElementById(
- "vertical-pinned-tabs-container"
- );
+ let verticalTabsContainer = this.verticalPinnedTabsContainer;
let numPinned = gBrowser.pinnedTabCount;
-
- if (gBrowser.pinnedTabCount !== verticalTabsContainer.children.length) {
- let tabs = this.visibleTabs;
+ if (!ZenWorkspaces._hasInitializedTabsStrip) return;
+ let count = ZenWorkspaces.makeSurePinTabIsInCorrectPosition();
+ if (gBrowser.pinnedTabCount !== (verticalTabsContainer.children.length - count - 1 + ZenWorkspaces.getCurrentEssentialsContainer().children.length)) {
+ let tabs = this.allTabs.filter(tab => !tab.hasAttribute("zen-glance-tab"));
for (let i = 0; i < numPinned; i++) {
tabs[i].style.marginInlineStart = "";
- verticalTabsContainer.appendChild(tabs[i]);
+ tabs[i].hasAttribute("zen-essential") ? ZenWorkspaces.getCurrentEssentialsContainer().appendChild(tabs[i].group?.hasAttribute("split-view-group") ? tabs[i].group : tabs[i]) : verticalTabsContainer.insertBefore(tabs[i].group?.hasAttribute("split-view-group") ? tabs[i].group : tabs[i], verticalTabsContainer.lastChild);
}
}
@@ -2102,9 +2143,7 @@
}
_resetVerticalPinnedTabs() {
- let verticalTabsContainer = document.getElementById(
- "vertical-pinned-tabs-container"
- );
+ let verticalTabsContainer = this.verticalPinnedTabsContainer;
if (!verticalTabsContainer.children.length) {
return;
@@ -2117,7 +2156,7 @@
} }
_positionPinnedTabs() { _positionPinnedTabs() {
+ if (true) return; - let tabs = this.visibleTabs;
let tabs = this.visibleTabs; + let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab"));
let numPinned = gBrowser.pinnedTabCount; let numPinned = gBrowser.pinnedTabCount;
let absPositionHorizontalTabs = let absPositionHorizontalTabs =
@@ -2206,7 +2263,7 @@ this.overflowing && tabs.length > numPinned && numPinned > 0;
@@ -2127,7 +2166,7 @@
if (this.verticalMode) {
this._updateVerticalPinnedTabs();
- } else if (absPositionHorizontalTabs) {
+ } else if (absPositionHorizontalTabs && false) {
let layoutData = this._pinnedTabsLayoutCache;
let uiDensity = document.documentElement.getAttribute("uidensity");
if (!layoutData || layoutData.uiDensity != uiDensity) {
@@ -2191,7 +2230,7 @@
return; return;
} }
- let tabs = this.visibleTabs.slice(0, gBrowser.pinnedTabCount); - let tabs = this.visibleTabs.slice(0, gBrowser.pinnedTabCount);
+ let tabs = this.ariaFocusableItems.slice(0, gBrowser._numZenEssentials); + let tabs = this.visibleTabs.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(0, gBrowser._numZenEssentials);
let directionX = screenX > dragData.animLastScreenX; let directionX = screenX > dragData.animLastScreenX;
let directionY = screenY > dragData.animLastScreenY; let directionY = screenY > dragData.animLastScreenY;
@@ -2215,6 +2272,8 @@ @@ -2199,7 +2238,7 @@
dragData.animLastScreenX = screenX;
let { width: tabWidth, height: tabHeight } = let { width: tabWidth, height: tabHeight } =
draggedTab.getBoundingClientRect(); - draggedTab.getBoundingClientRect();
+ tabWidth += 4; // Add 4px to account for the gap + (draggedTab.group?.hasAttribute("split-view-group") ? draggedTab.group : draggedTab).getBoundingClientRect();
+ tabHeight += 4;
let shiftSizeX = tabWidth * movingTabs.length; let shiftSizeX = tabWidth * movingTabs.length;
let shiftSizeY = tabHeight; let shiftSizeY = tabHeight;
dragData.tabWidth = tabWidth; dragData.tabWidth = tabWidth;
@@ -2244,7 +2303,7 @@ @@ -2374,12 +2413,16 @@
let translateX = screenX - dragData.screenX;
let translateY = screenY - dragData.screenY;
translateY +=
- this.verticalPinnedTabsContainer.scrollPosition - dragData.scrollPos;
+ dragData.scrollPos;
let firstBoundX = firstTabInRow.screenX - firstMovingTabScreenX;
let firstBoundY = firstTabInRow.screenY - firstMovingTabScreenY;
let lastBoundX =
@@ -2389,12 +2448,16 @@
this.#clearDragOverCreateGroupTimer(); this.#clearDragOverCreateGroupTimer();
- let isPinned = draggedTab.pinned; - let isPinned = draggedTab.pinned;
- let numPinned = gBrowser.pinnedTabCount; - let numPinned = gBrowser.pinnedTabCount;
- let tabs = this.ariaFocusableItems.slice(
- isPinned ? 0 : numPinned,
- isPinned ? numPinned : undefined
+ let isPinned = draggedTab?.group ? draggedTab.group.pinned : draggedTab.pinned; + let isPinned = draggedTab?.group ? draggedTab.group.pinned : draggedTab.pinned;
+ let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed; + let numPinned = gBrowser._numVisiblePinTabsWithoutCollapsed;
+ let essential = draggedTab.hasAttribute("zen-essential"); + let essential = draggedTab.hasAttribute("zen-essential");
let tabs = this.ariaFocusableItems.slice( + let tabs = this.ariaFocusableItems.filter(tab => !tab.hasAttribute("zen-glance-tab")).slice(
- isPinned ? 0 : numPinned,
- isPinned ? numPinned : undefined
+ isPinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned, + isPinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned,
+ isPinned ? (essential ? gBrowser._numZenEssentials : numPinned) : undefined + isPinned ? (essential ? gBrowser._numZenEssentials : numPinned) : undefined
); );
@ -360,7 +384,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
if (this.#rtlMode) { if (this.#rtlMode) {
tabs.reverse(); tabs.reverse();
@@ -2408,7 +2471,7 @@ @@ -2393,7 +2436,7 @@
let size = this.verticalMode ? "height" : "width"; let size = this.verticalMode ? "height" : "width";
let translateAxis = this.verticalMode ? "translateY" : "translateX"; let translateAxis = this.verticalMode ? "translateY" : "translateX";
let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft"; let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft";
@ -369,7 +393,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
let translateX = event.screenX - dragData.screenX; let translateX = event.screenX - dragData.screenX;
let translateY = event.screenY - dragData.screenY; let translateY = event.screenY - dragData.screenY;
@@ -2422,12 +2485,21 @@ @@ -2407,10 +2450,19 @@
let lastTab = tabs.at(-1); let lastTab = tabs.at(-1);
let lastMovingTab = movingTabs.at(-1); let lastMovingTab = movingTabs.at(-1);
let firstMovingTab = movingTabs[0]; let firstMovingTab = movingTabs[0];
@ -387,12 +411,9 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
+ shiftSize += 5; // A hack to allow more space for the group + shiftSize += 5; // A hack to allow more space for the group
+ } + }
let translate = screen - dragData[screenAxis]; let translate = screen - dragData[screenAxis];
- if (!isPinned) { if (!isPinned) {
+ if (true) {
translate += translate +=
this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos; @@ -2431,6 +2483,9 @@
} else if (isPinned && this.verticalMode) {
@@ -2446,6 +2518,9 @@
// Shift the `.tab-group-label-container` to shift the label element. // Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement; item = item.parentElement;
} }
@ -402,7 +423,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
item.style.transform = `${translateAxis}(${translate}px)`; item.style.transform = `${translateAxis}(${translate}px)`;
} }
@@ -2583,6 +2658,9 @@ @@ -2568,6 +2623,9 @@
break; break;
} }
let element = tabs[mid]; let element = tabs[mid];
@ -412,7 +433,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
let elementForSize = isTabGroupLabel(element) let elementForSize = isTabGroupLabel(element)
? element.parentElement ? element.parentElement
: element; : element;
@@ -2605,6 +2683,10 @@ @@ -2590,6 +2648,10 @@
if (!dropElement) { if (!dropElement) {
dropElement = this.ariaFocusableItems[oldDropElementIndex]; dropElement = this.ariaFocusableItems[oldDropElementIndex];
} }
@ -423,7 +444,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
let newDropElementIndex = dropElement let newDropElementIndex = dropElement
? dropElement.elementIndex ? dropElement.elementIndex
: oldDropElementIndex; : oldDropElementIndex;
@@ -2613,7 +2695,7 @@ @@ -2598,7 +2660,7 @@
let shouldCreateGroupOnDrop; let shouldCreateGroupOnDrop;
let dropBefore; let dropBefore;
if (dropElement) { if (dropElement) {
@ -432,7 +453,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
? dropElement.parentElement ? dropElement.parentElement
: dropElement; : dropElement;
@@ -2675,12 +2757,12 @@ @@ -2660,12 +2722,12 @@
} }
} }
@ -447,16 +468,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
dropElement != draggedTab && dropElement != draggedTab &&
isTab(dropElement) && isTab(dropElement) &&
!dropElement?.group && !dropElement?.group &&
@@ -2720,7 +2802,7 @@ @@ -2735,7 +2797,7 @@
// Dropping right before the tab group.
dropElement = dropElementGroup;
colorCode = undefined;
- } else if (dropElementGroup.collapsed) {
+ } else if (dropElement?.group?.hasAttribute("split-view-group")) {
// Dropping right after the collapsed tab group.
dropElement = dropElementGroup;
colorCode = undefined;
@@ -2750,7 +2832,7 @@
// Shift background tabs to leave a gap where the dragged tab // Shift background tabs to leave a gap where the dragged tab
// would currently be dropped. // would currently be dropped.
for (let item of tabs) { for (let item of tabs) {
@ -465,7 +477,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
continue; continue;
} }
@@ -2759,6 +2841,9 @@ @@ -2744,6 +2806,9 @@
if (isTabGroupLabel(item)) { if (isTabGroupLabel(item)) {
// Shift the `.tab-group-label-container` to shift the label element. // Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement; item = item.parentElement;
@ -475,7 +487,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
} }
item.style.transform = transform; item.style.transform = transform;
} }
@@ -2811,8 +2896,9 @@ @@ -2796,8 +2861,9 @@
); );
} }
@ -487,7 +499,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
return; return;
} }
@@ -2824,6 +2910,12 @@ @@ -2809,6 +2875,12 @@
item = item.parentElement; item = item.parentElement;
} }
item.style.transform = ""; item.style.transform = "";
@ -500,7 +512,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
item.removeAttribute("dragover-createGroup"); item.removeAttribute("dragover-createGroup");
} }
this.removeAttribute("movingtab-createGroup"); this.removeAttribute("movingtab-createGroup");
@@ -2870,7 +2962,7 @@ @@ -2855,7 +2927,7 @@
let postTransitionCleanup = () => { let postTransitionCleanup = () => {
movingTab._moveTogetherSelectedTabsData.animate = false; movingTab._moveTogetherSelectedTabsData.animate = false;
}; };
@ -509,7 +521,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
postTransitionCleanup(); postTransitionCleanup();
} else { } else {
let onTransitionEnd = transitionendEvent => { let onTransitionEnd = transitionendEvent => {
@@ -3043,7 +3135,7 @@ @@ -3028,7 +3100,7 @@
} }
_notifyBackgroundTab(aTab) { _notifyBackgroundTab(aTab) {
@ -518,7 +530,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..de8b1ecf7cb844f6cf3e66a41b6024c5
return; return;
} }
@@ -3169,6 +3261,9 @@ @@ -3154,6 +3226,9 @@
return null; return null;
} }
} }

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640dac8ab56 100644 index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..66ef8de0d2a767376740ca57d75b5372cc11ed40 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs --- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs +++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
@ -16,7 +16,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history"; const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
const SEARCH_BUTTON_CLASS = "urlbar-search-button"; const SEARCH_BUTTON_CLASS = "urlbar-search-button";
@@ -355,7 +362,16 @@ export class UrlbarInput { @@ -349,7 +356,16 @@ export class UrlbarInput {
// See _on_select(). HTMLInputElement.select() dispatches a "select" // See _on_select(). HTMLInputElement.select() dispatches a "select"
// event but does not set the primary selection. // event but does not set the primary selection.
this._suppressPrimaryAdjustment = true; this._suppressPrimaryAdjustment = true;
@ -33,7 +33,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
this._suppressPrimaryAdjustment = false; this._suppressPrimaryAdjustment = false;
} }
@@ -431,6 +447,10 @@ export class UrlbarInput { @@ -425,6 +441,10 @@ export class UrlbarInput {
hideSearchTerms = false, hideSearchTerms = false,
isSameDocument = false isSameDocument = false
) { ) {
@ -44,7 +44,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
// We only need to update the searchModeUI on tab switch conditionally // We only need to update the searchModeUI on tab switch conditionally
// as we only persist searchMode with ScotchBonnet enabled. // as we only persist searchMode with ScotchBonnet enabled.
if ( if (
@@ -735,8 +755,16 @@ export class UrlbarInput { @@ -698,8 +718,16 @@ export class UrlbarInput {
return; return;
} }
} }
@ -62,7 +62,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
} }
/** /**
@@ -1142,7 +1170,11 @@ export class UrlbarInput { @@ -1093,7 +1121,11 @@ export class UrlbarInput {
} }
if (!this.#providesSearchMode(result)) { if (!this.#providesSearchMode(result)) {
@ -74,8 +74,8 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
+ } + }
} }
if (isCanonized) { this.controller.recordSelectedResult(event, result);
@@ -2191,6 +2223,10 @@ export class UrlbarInput { @@ -2125,6 +2157,10 @@ export class UrlbarInput {
await this.#updateLayoutBreakoutDimensions(); await this.#updateLayoutBreakoutDimensions();
} }
@ -86,7 +86,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
startLayoutExtend() { startLayoutExtend() {
if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) { if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
// Do not expand if the Urlbar does not support being expanded or it is // Do not expand if the Urlbar does not support being expanded or it is
@@ -2205,6 +2241,12 @@ export class UrlbarInput { @@ -2147,6 +2183,12 @@ export class UrlbarInput {
this.setAttribute("breakout-extend", "true"); this.setAttribute("breakout-extend", "true");
@ -99,7 +99,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
// Enable the animation only after the first extend call to ensure it // Enable the animation only after the first extend call to ensure it
// doesn't run when opening a new window. // doesn't run when opening a new window.
if (!this.hasAttribute("breakout-extend-animate")) { if (!this.hasAttribute("breakout-extend-animate")) {
@@ -2224,6 +2266,24 @@ export class UrlbarInput { @@ -2166,6 +2208,24 @@ export class UrlbarInput {
return; return;
} }
@ -124,7 +124,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
this.removeAttribute("breakout-extend"); this.removeAttribute("breakout-extend");
this.#updateTextboxPosition(); this.#updateTextboxPosition();
} }
@@ -2553,7 +2613,7 @@ export class UrlbarInput { @@ -2485,7 +2545,7 @@ export class UrlbarInput {
this.textbox.parentNode.style.setProperty( this.textbox.parentNode.style.setProperty(
"--urlbar-container-height", "--urlbar-container-height",
@ -133,7 +133,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
); );
this.textbox.style.setProperty( this.textbox.style.setProperty(
"--urlbar-height", "--urlbar-height",
@@ -2968,6 +3028,7 @@ export class UrlbarInput { @@ -2900,6 +2960,7 @@ export class UrlbarInput {
} }
_toggleActionOverride(event) { _toggleActionOverride(event) {
@ -141,7 +141,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
if ( if (
event.keyCode == KeyEvent.DOM_VK_SHIFT || event.keyCode == KeyEvent.DOM_VK_SHIFT ||
event.keyCode == KeyEvent.DOM_VK_ALT || event.keyCode == KeyEvent.DOM_VK_ALT ||
@@ -3069,7 +3130,7 @@ export class UrlbarInput { @@ -2998,7 +3059,7 @@ export class UrlbarInput {
*/ */
_trimValue(val) { _trimValue(val) {
let trimmedValue = lazy.UrlbarPrefs.get("trimURLs") let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
@ -150,7 +150,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
: val; : val;
// Only trim value if the directionality doesn't change to RTL and we're not // Only trim value if the directionality doesn't change to RTL and we're not
// showing a strikeout https protocol. // showing a strikeout https protocol.
@@ -3439,6 +3500,10 @@ export class UrlbarInput { @@ -3368,6 +3429,10 @@ export class UrlbarInput {
} }
reuseEmpty = true; reuseEmpty = true;
} }
@ -161,7 +161,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
if ( if (
where == "tab" && where == "tab" &&
reuseEmpty && reuseEmpty &&
@@ -3446,6 +3511,9 @@ export class UrlbarInput { @@ -3375,6 +3440,9 @@ export class UrlbarInput {
) { ) {
where = "current"; where = "current";
} }
@ -171,7 +171,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
return where; return where;
} }
@@ -3703,6 +3771,7 @@ export class UrlbarInput { @@ -3632,6 +3700,7 @@ export class UrlbarInput {
this.setResultForCurrentValue(null); this.setResultForCurrentValue(null);
this.handleCommand(); this.handleCommand();
this.controller.clearLastQueryContextCache(); this.controller.clearLastQueryContextCache();
@ -179,7 +179,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
this._suppressStartQuery = false; this._suppressStartQuery = false;
}); });
@@ -3710,7 +3779,6 @@ export class UrlbarInput { @@ -3639,7 +3708,6 @@ export class UrlbarInput {
contextMenu.addEventListener("popupshowing", () => { contextMenu.addEventListener("popupshowing", () => {
// Close the results pane when the input field contextual menu is open, // Close the results pane when the input field contextual menu is open,
// because paste and go doesn't want a result selection. // because paste and go doesn't want a result selection.
@ -187,7 +187,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
let controller = let controller =
this.document.commandDispatcher.getControllerForCommand("cmd_paste"); this.document.commandDispatcher.getControllerForCommand("cmd_paste");
@@ -4136,6 +4204,11 @@ export class UrlbarInput { @@ -4053,6 +4121,11 @@ export class UrlbarInput {
} }
_on_click(event) { _on_click(event) {
@ -199,7 +199,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
if ( if (
event.target == this.inputField || event.target == this.inputField ||
event.target == this._inputContainer || event.target == this._inputContainer ||
@@ -4207,7 +4280,7 @@ export class UrlbarInput { @@ -4124,7 +4197,7 @@ export class UrlbarInput {
} }
} }
@ -208,7 +208,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
this.view.autoOpen({ event }); this.view.autoOpen({ event });
} else { } else {
if (this._untrimOnFocusAfterKeydown) { if (this._untrimOnFocusAfterKeydown) {
@@ -4247,9 +4320,16 @@ export class UrlbarInput { @@ -4164,9 +4237,16 @@ export class UrlbarInput {
} }
_on_mousedown(event) { _on_mousedown(event) {
@ -226,7 +226,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
if ( if (
event.target != this.inputField && event.target != this.inputField &&
@@ -4261,6 +4341,10 @@ export class UrlbarInput { @@ -4178,6 +4258,10 @@ export class UrlbarInput {
this.focusedViaMousedown = !this.focused; this.focusedViaMousedown = !this.focused;
this._preventClickSelectsAll = this.focused; this._preventClickSelectsAll = this.focused;
@ -237,7 +237,7 @@ index 0c5145c3d31862bd2c6b5ed2faa88f02425ffde1..1cf86995514b2c00360f6ed681f0c640
// Keep the focus status, since the attribute may be changed // Keep the focus status, since the attribute may be changed
// upon calling this.focus(). // upon calling this.focus().
@@ -4301,7 +4385,7 @@ export class UrlbarInput { @@ -4218,7 +4302,7 @@ export class UrlbarInput {
} }
// Don't close the view when clicking on a tab; we may want to keep the // Don't close the view when clicking on a tab; we may want to keep the
// view open on tab switch, and the TabSelect event arrived earlier. // view open on tab switch, and the TabSelect event arrived earlier.

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs diff --git a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
index 899e808c5f8cf14577404e3d1766fe967b32b065..82854a04edc21ac4552d06d6ba45c4714b5ef5cb 100644 index b1481a11ef..925f0dc34b 100644
--- a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs --- a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
+++ b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs +++ b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
@@ -35,6 +35,8 @@ const QUERYINDEX_SWITCHTAB = 9; @@ -35,6 +35,8 @@ const QUERYINDEX_SWITCHTAB = 9;
@ -9,14 +9,14 @@ index 899e808c5f8cf14577404e3d1766fe967b32b065..82854a04edc21ac4552d06d6ba45c471
+const QUERYINDEX_PINNEDTITLE = 13; +const QUERYINDEX_PINNEDTITLE = 13;
+const QUERYINDEX_PINNEDURL = 14; +const QUERYINDEX_PINNEDURL = 14;
// This SQL query fragment provides the following: // Constants to support an alternative frecency algorithm.
// - whether the entry is bookmarked (QUERYINDEX_BOOKMARKED) const PAGES_USE_ALT_FRECENCY = Services.prefs.getBoolPref(
@@ -56,11 +58,14 @@ const SQL_BOOKMARK_TAGS_FRAGMENT = `EXISTS(SELECT 1 FROM moz_bookmarks WHERE fk @@ -65,11 +67,14 @@ const SQL_BOOKMARK_TAGS_FRAGMENT = `EXISTS(SELECT 1 FROM moz_bookmarks WHERE fk
// condition once, and avoid evaluating "btitle" and "tags" when it is false. // condition once, and avoid evaluating "btitle" and "tags" when it is false.
function defaultQuery(conditions = "") { function defaultQuery(conditions = "") {
let query = `SELECT :query_type, h.url, h.title, ${SQL_BOOKMARK_TAGS_FRAGMENT}, let query = `SELECT :query_type, h.url, h.title, ${SQL_BOOKMARK_TAGS_FRAGMENT},
- h.visit_count, h.typed, h.id, t.open_count, ${lazy.PAGES_FRECENCY_FIELD}, t.userContextId, h.last_visit_date - h.visit_count, h.typed, h.id, t.open_count, ${PAGES_FRECENCY_FIELD}, t.userContextId, h.last_visit_date
+ h.visit_count, h.typed, h.id, t.open_count, ${lazy.PAGES_FRECENCY_FIELD}, t.userContextId, h.last_visit_date, + h.visit_count, h.typed, h.id, t.open_count, ${PAGES_FRECENCY_FIELD}, t.userContextId, h.last_visit_date,
+ zp.title AS pinned_title, zp.url AS pinned_url + zp.title AS pinned_title, zp.url AS pinned_url
FROM moz_places h FROM moz_places h
LEFT JOIN moz_openpages_temp t LEFT JOIN moz_openpages_temp t
@ -26,8 +26,8 @@ index 899e808c5f8cf14577404e3d1766fe967b32b065..82854a04edc21ac4552d06d6ba45c471
+ ON zp.url = h.url + ON zp.url = h.url
WHERE ( WHERE (
(:switchTabsEnabled AND t.open_count > 0) OR (:switchTabsEnabled AND t.open_count > 0) OR
${lazy.PAGES_FRECENCY_FIELD} <> 0 ${PAGES_FRECENCY_FIELD} <> 0
@@ -74,7 +79,7 @@ function defaultQuery(conditions = "") { @@ -83,7 +88,7 @@ function defaultQuery(conditions = "") {
:matchBehavior, :searchBehavior, NULL) :matchBehavior, :searchBehavior, NULL)
ELSE ELSE
AUTOCOMPLETE_MATCH(:searchString, h.url, AUTOCOMPLETE_MATCH(:searchString, h.url,
@ -36,7 +36,7 @@ index 899e808c5f8cf14577404e3d1766fe967b32b065..82854a04edc21ac4552d06d6ba45c471
h.visit_count, h.typed, h.visit_count, h.typed,
0, t.open_count, 0, t.open_count,
:matchBehavior, :searchBehavior, NULL) :matchBehavior, :searchBehavior, NULL)
@@ -1130,11 +1135,14 @@ Search.prototype = { @@ -1132,11 +1137,14 @@ Search.prototype = {
let lastVisit = lastVisitPRTime let lastVisit = lastVisitPRTime
? lazy.PlacesUtils.toDate(lastVisitPRTime).getTime() ? lazy.PlacesUtils.toDate(lastVisitPRTime).getTime()
: undefined; : undefined;

View file

@ -1,12 +0,0 @@
diff --git a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
index dfa91b76ad3890ceadb1b1b5d7a63b7074fbb776..6369fa1cdb242de32338bbce6debcdab2a04ca02 100644
--- a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
+++ b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
@@ -585,6 +585,7 @@ export class UrlbarValueFormatter {
this.window.requestAnimationFrame(() => {
if (instance == this._resizeInstance) {
this.#ensureFormattedHostVisible();
+ this._formatURL();
}
});
}, 100);

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarView.sys.mjs b/browser/components/urlbar/UrlbarView.sys.mjs diff --git a/browser/components/urlbar/UrlbarView.sys.mjs b/browser/components/urlbar/UrlbarView.sys.mjs
index e17f3d34367d6567c89f632b6d1ce537608a6829..7528dfb0abc8ea8d9315591cd529a341b4c3962a 100644 index d5382623595de8daed8cd13ea2eb2de329a4bd92..c3b5d1bad0bf4e1c5a5875a83751cfa96cdf1510 100644
--- a/browser/components/urlbar/UrlbarView.sys.mjs --- a/browser/components/urlbar/UrlbarView.sys.mjs
+++ b/browser/components/urlbar/UrlbarView.sys.mjs +++ b/browser/components/urlbar/UrlbarView.sys.mjs
@@ -609,7 +609,7 @@ export class UrlbarView { @@ -609,7 +609,7 @@ export class UrlbarView {

View file

@ -1,8 +1,8 @@
diff --git a/browser/extensions/newtab/lib/ActivityStream.sys.mjs b/browser/extensions/newtab/lib/ActivityStream.sys.mjs diff --git a/browser/extensions/newtab/lib/ActivityStream.sys.mjs b/browser/extensions/newtab/lib/ActivityStream.sys.mjs
index a00011de585a40b91d33364a04c6bf5c86145ecd..f98b6d11519a80aff307513fd77361179f9914a4 100644 index 14183ad7165dc91126b4409b26f669409c4e9905..be979225b89b193b9e9c8903de5740dc04a8999f 100644
--- a/browser/extensions/newtab/lib/ActivityStream.sys.mjs --- a/browser/extensions/newtab/lib/ActivityStream.sys.mjs
+++ b/browser/extensions/newtab/lib/ActivityStream.sys.mjs +++ b/browser/extensions/newtab/lib/ActivityStream.sys.mjs
@@ -228,7 +228,7 @@ export const PREFS_CONFIG = new Map([ @@ -215,7 +215,7 @@ export const PREFS_CONFIG = new Map([
"showSponsoredTopSites", "showSponsoredTopSites",
{ {
title: "Show sponsored top sites", title: "Show sponsored top sites",

View file

@ -1,8 +1,8 @@
diff --git a/browser/locales/en-US/installer/custom.properties b/browser/locales/en-US/installer/custom.properties diff --git a/browser/locales/en-US/installer/custom.properties b/browser/locales/en-US/installer/custom.properties
index 8c33192e589de1d819cbb21c31cec0480ed4c85e..9db296363303c153dc05ad9e85493f1197bb1efd 100644 index a9dc6fb90caa50a9ba9ec63a6cd90b4d8dcc2bc0..48d11c0c5a3b926d2d29c30d1ca8630941514210 100644
--- a/browser/locales/en-US/installer/custom.properties --- a/browser/locales/en-US/installer/custom.properties
+++ b/browser/locales/en-US/installer/custom.properties +++ b/browser/locales/en-US/installer/custom.properties
@@ -73,7 +73,7 @@ STATUS_INSTALL_APP=Installing $BrandShortName @@ -77,7 +77,7 @@ STATUS_INSTALL_LANG=Installing Language Files (${AB_CD})
STATUS_UNINSTALL_MAIN=Uninstalling $BrandShortName STATUS_UNINSTALL_MAIN=Uninstalling $BrandShortName
STATUS_CLEANUP=A Little Housekeeping STATUS_CLEANUP=A Little Housekeeping

View file

@ -1,8 +1,8 @@
diff --git a/browser/modules/ExtensionsUI.sys.mjs b/browser/modules/ExtensionsUI.sys.mjs diff --git a/browser/modules/ExtensionsUI.sys.mjs b/browser/modules/ExtensionsUI.sys.mjs
index 9734d95742035dbe6f608ad3cdaaefc6ed5b83bc..9a7bbb272025e84968d3173faca259f558746c5e 100644 index 3f74e47bf7602fa800d1cf3034ec67055cc792b6..e700b88d1aee80c946e234f89f695a31d71ff608 100644
--- a/browser/modules/ExtensionsUI.sys.mjs --- a/browser/modules/ExtensionsUI.sys.mjs
+++ b/browser/modules/ExtensionsUI.sys.mjs +++ b/browser/modules/ExtensionsUI.sys.mjs
@@ -466,7 +466,7 @@ export var ExtensionsUI = { @@ -436,7 +436,7 @@ export var ExtensionsUI = {
eventCallback, eventCallback,
removeOnDismissal: true, removeOnDismissal: true,
popupOptions: { popupOptions: {

View file

@ -1,8 +1,8 @@
diff --git a/browser/themes/BuiltInThemeConfig.sys.mjs b/browser/themes/BuiltInThemeConfig.sys.mjs diff --git a/browser/themes/BuiltInThemeConfig.sys.mjs b/browser/themes/BuiltInThemeConfig.sys.mjs
index a5361f1f0ec57f575f8d76e118ff762dc7547501..db5c5eb2059b4ceef3911fd807bf985408859d1a 100644 index 081187147736f56abfe5866a69e00ac13a8dd940..9a980fe858c1a77af7634037aebc332d237e9c11 100644
--- a/browser/themes/BuiltInThemeConfig.sys.mjs --- a/browser/themes/BuiltInThemeConfig.sys.mjs
+++ b/browser/themes/BuiltInThemeConfig.sys.mjs +++ b/browser/themes/BuiltInThemeConfig.sys.mjs
@@ -33,11 +33,4 @@ export const BuiltInThemeConfig = new Map([ @@ -33,13 +33,6 @@ export const BuiltInThemeConfig = new Map([
path: "resource://builtin-themes/dark/", path: "resource://builtin-themes/dark/",
}, },
], ],
@ -13,4 +13,6 @@ index a5361f1f0ec57f575f8d76e118ff762dc7547501..db5c5eb2059b4ceef3911fd807bf9854
- path: "resource://builtin-themes/alpenglow/", - path: "resource://builtin-themes/alpenglow/",
- }, - },
- ], - ],
]); [
"2022red-colorway@mozilla.org",
{

View file

@ -0,0 +1,22 @@
diff --git a/browser/themes/addons/jar.mn b/browser/themes/addons/jar.mn
index 69bb3000d6d2d249d1d77262dc2a0057d0318308..bbed04a6b6f11c582e17e08201db260b9ed496b7 100644
--- a/browser/themes/addons/jar.mn
+++ b/browser/themes/addons/jar.mn
@@ -5,8 +5,8 @@
browser.jar:
% resource builtin-themes %content/builtin-themes/
- content/builtin-themes/alpenglow (alpenglow/*.svg)
- content/builtin-themes/alpenglow/manifest.json (alpenglow/manifest.json)
+# content/builtin-themes/alpenglow (alpenglow/*.svg)
+# content/builtin-themes/alpenglow/manifest.json (alpenglow/manifest.json)
content/builtin-themes/dark (dark/*.svg)
content/builtin-themes/dark (dark/*.css)
@@ -100,3 +100,5 @@ browser.jar:
content/builtin-themes/colorways/2022innovator/balanced/manifest.json (colorways/2022-independent-voices/innovator/balanced/manifest.json)
content/builtin-themes/colorways/2022innovator/bold (colorways/2022-independent-voices/innovator/bold/*.svg)
content/builtin-themes/colorways/2022innovator/bold/manifest.json (colorways/2022-independent-voices/innovator/bold/manifest.json)
+
+#include zen-addons.inc.mn
\ No newline at end of file

View file

@ -0,0 +1 @@

View file

@ -1,18 +1,20 @@
diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
index 195cf888a61893cc9b0015e07e27bce94ec9d409..5f4cb6a1922730e8a0f1e9ad04169fb092917938 100644 index 5c9891e5ed4b865ed4ecc98d794a239b0f96a8f9..e13bf7277edeb49ebbb12cf9359ac6193bb47ebd 100644
--- a/browser/themes/linux/browser.css --- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css
@@ -42,7 +42,8 @@ @@ -42,21 +42,25 @@
-moz-default-appearance: -moz-window-decorations; -moz-default-appearance: -moz-window-decorations;
appearance: auto; appearance: auto;
- #navigator-toolbox, - #navigator-toolbox,
- dialog::backdrop {
+ #zen-main-app-wrapper, + #zen-main-app-wrapper,
+ #zen-browser-background, + dialog::backdrop,
dialog::backdrop { + #browser::after,
+ #browser::before {
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius); border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius); border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
@@ -50,13 +51,14 @@ }
/* stylelint-disable-next-line media-query-no-invalid */ /* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("widget.gtk.rounded-bottom-corners.enabled") { @media -moz-pref("widget.gtk.rounded-bottom-corners.enabled") {
@ -25,7 +27,8 @@ index 195cf888a61893cc9b0015e07e27bce94ec9d409..5f4cb6a1922730e8a0f1e9ad04169fb0
body, body,
- dialog::backdrop { - dialog::backdrop {
+ dialog::backdrop, + dialog::backdrop,
+ #zen-browser-background { + #browser::after,
+ #browser::before {
/* Use an uniform clip to allow WebRender to optimize it better */ /* Use an uniform clip to allow WebRender to optimize it better */
border-radius: env(-moz-gtk-csd-titlebar-radius); border-radius: env(-moz-gtk-csd-titlebar-radius);
} }

View file

@ -1,5 +1,5 @@
diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css
index 9f795cd5b67b12ed4e6d0838d6e0b8e1048f6e50..e9d9326f174a25140113de40f4c57e8bc67677ff 100644 index 7fc76bc82bd5d6311442b85a76d885dcfb6d753d..61b1b3ac8241c4f12e4ca8966a7ac1fae0eb41ee 100644
--- a/browser/themes/osx/browser.css --- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css +++ b/browser/themes/osx/browser.css
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@

View file

@ -0,0 +1,24 @@
diff --git a/browser/themes/shared/customizableui/panelUI-shared.css b/browser/themes/shared/customizableui/panelUI-shared.css
index bdbfd3521b4921f7d6d44623181019a8263b5825..e69b1fb9ee7e553f1183f7a52f9104d6f99d4288 100644
--- a/browser/themes/shared/customizableui/panelUI-shared.css
+++ b/browser/themes/shared/customizableui/panelUI-shared.css
@@ -18,7 +18,7 @@
--menu-panel-width-wide: 29em;
--arrowpanel-menuitem-margin-block: 0;
- --arrowpanel-menuitem-margin-inline: 8px;
+ --arrowpanel-menuitem-margin-inline: 4px;
--arrowpanel-menuitem-margin: var(--arrowpanel-menuitem-margin-block) var(--arrowpanel-menuitem-margin-inline);
--arrowpanel-menuitem-padding-block: 8px;
--arrowpanel-menuitem-padding-inline: 8px;
@@ -819,8 +819,8 @@ toolbarbutton[constrain-size="true"][cui-areatype="panel"] > .toolbarbutton-badg
/* Firefox Account Toolbar Panel */
#fxa-avatar-image {
- width: 16px;
- height: 16px;
+ width: 20px;
+ height: 20px;
}
:root {

View file

@ -380,7 +380,7 @@ groupbox h2 {
} }
.zenCKSOption-unsafed { .zenCKSOption-unsafed {
color: light-dark(orange, yellow); color: yellow;
margin-left: 10px; margin-left: 10px;
margin-top: 5px; margin-top: 5px;
} }
@ -390,7 +390,7 @@ groupbox h2 {
} }
.zenCKSOption-input.zenCKSOption-input-unsafed { .zenCKSOption-input.zenCKSOption-input-unsafed {
border-color: light-dark(orange, yellow); border-color: yellow;
} }
.zenCKSOption-input.zenCKSOption-input-valid { .zenCKSOption-input.zenCKSOption-input-valid {

View file

@ -0,0 +1,13 @@
diff --git a/browser/themes/shared/tabbrowser/fullscreen-and-pointerlock.css b/browser/themes/shared/tabbrowser/fullscreen-and-pointerlock.css
index 787e3153e2e07b383445e94aa9e25177eb49c929..a017e4c003f6c3b9af7c226c637b37aea6baa7e5 100644
--- a/browser/themes/shared/tabbrowser/fullscreen-and-pointerlock.css
+++ b/browser/themes/shared/tabbrowser/fullscreen-and-pointerlock.css
@@ -7,7 +7,7 @@
:root[inDOMFullscreen] #sidebar-box,
:root[inDOMFullscreen] #sidebar-main,
:root[inDOMFullscreen] #sidebar-splitter,
-:root[inFullscreen]:not([macOSNativeFullscreen]) toolbar:not([fullscreentoolbar=true]),
+:root[inFullscreen]:not([macOSNativeFullscreen]) toolbar:not([fullscreentoolbar=true]):not(.zen-dont-hide-on-fullscreen),
:root[inFullscreen] .global-notificationbox {
visibility: collapse;
}

View file

@ -1,8 +1,8 @@
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d20e129f8b 100644 index 6ca85d9d4d593271fe49138ea736bd96651c05f5..192acb662eaeaeb67df890de4c9681952b078526 100644
--- a/browser/themes/shared/tabbrowser/tabs.css --- a/browser/themes/shared/tabbrowser/tabs.css
+++ b/browser/themes/shared/tabbrowser/tabs.css +++ b/browser/themes/shared/tabbrowser/tabs.css
@@ -33,7 +33,7 @@ @@ -32,7 +32,7 @@
--tab-block-margin: 4px; --tab-block-margin: 4px;
--tab-icon-end-margin: 5.5px; --tab-icon-end-margin: 5.5px;
--tab-label-line-height: 1.7; --tab-label-line-height: 1.7;
@ -11,7 +11,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
--tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent); --tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent);
--tab-selected-textcolor: var(--toolbar-color); --tab-selected-textcolor: var(--toolbar-color);
--tab-selected-bgcolor: var(--toolbar-bgcolor); --tab-selected-bgcolor: var(--toolbar-bgcolor);
@@ -211,8 +211,7 @@ @@ -210,8 +210,7 @@
} }
#tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > &[pinned] { #tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > &[pinned] {
@ -21,7 +21,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
} }
#tabbrowser-tabs[movingtab] &:is(:active, [multiselected]) { #tabbrowser-tabs[movingtab] &:is(:active, [multiselected]) {
@@ -258,7 +257,6 @@ @@ -257,7 +256,6 @@
} }
:root:not([uidensity=compact], [sidebar-expand-on-hover]) &[pinned] { :root:not([uidensity=compact], [sidebar-expand-on-hover]) &[pinned] {
@ -29,7 +29,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
} }
&:is([selected], [multiselected]) { &:is([selected], [multiselected]) {
@@ -272,6 +270,7 @@ @@ -271,6 +269,7 @@
border-radius: inherit; border-radius: inherit;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@ -37,34 +37,15 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
&::before { &::before {
position: absolute; position: absolute;
@@ -459,14 +458,11 @@ @@ -458,6 +457,7 @@
.tab-icon-image { .tab-icon-image {
-moz-context-properties: fill, stroke; -moz-context-properties: fill, stroke;
fill: currentColor; fill: currentColor;
+ border-radius: 4px; + border-radius: 4px;
/* stylelint-disable-next-line media-query-no-invalid */ /* Apply crisp rendering for favicons at exactly 2dppx resolution */
@media -moz-pref("browser.tabs.fadeOutUnloadedTabs") { @media (resolution: 2dppx) {
&[pending] { @@ -557,7 +557,7 @@
- filter: grayscale(100%);
- @media (prefers-color-scheme: dark) {
- filter: grayscale(100%) invert();
- }
opacity: 0.5;
/* Fade the favicon out */
transition-property: filter, opacity;
@@ -483,10 +479,6 @@
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("browser.tabs.fadeOutExplicitlyUnloadedTabs") {
&[pending][discarded] {
- filter: grayscale(100%);
- @media (prefers-color-scheme: dark) {
- filter: grayscale(100%) invert();
- }
opacity: 0.5;
/* Fade the favicon out */
transition-property: filter, opacity;
@@ -559,7 +551,7 @@
z-index: 1; /* Overlay tab title */ z-index: 1; /* Overlay tab title */
#tabbrowser-tabs[orient=vertical] & { #tabbrowser-tabs[orient=vertical] & {
@ -73,7 +54,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
} }
&[crashed] { &[crashed] {
@@ -567,7 +559,7 @@ @@ -565,7 +565,7 @@
} }
#tabbrowser-tabs[orient="vertical"]:not([expanded]) &:not([crashed]), #tabbrowser-tabs[orient="vertical"]:not([expanded]) &:not([crashed]),
@ -82,7 +63,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
&[soundplaying] { &[soundplaying] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg"); list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg");
} }
@@ -597,7 +589,7 @@ @@ -595,7 +595,7 @@
background-image: linear-gradient(var(--audio-overlay-extra-background)), background-image: linear-gradient(var(--audio-overlay-extra-background)),
linear-gradient(var(--toolbox-bgcolor)); linear-gradient(var(--toolbox-bgcolor));
-moz-context-properties: fill; -moz-context-properties: fill;
@ -91,7 +72,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
color-scheme: var(--tab-selected-color-scheme); color-scheme: var(--tab-selected-color-scheme);
border-radius: var(--border-radius-circle); border-radius: var(--border-radius-circle);
@@ -1365,7 +1357,7 @@ tab-group { @@ -1362,7 +1362,7 @@ tab-group {
} }
} }
@ -100,7 +81,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
#vertical-tabs-newtab-button { #vertical-tabs-newtab-button {
appearance: none; appearance: none;
min-height: var(--tab-min-height); min-height: var(--tab-min-height);
@@ -1376,7 +1368,7 @@ tab-group { @@ -1373,7 +1373,7 @@ tab-group {
margin-inline: var(--tab-inner-inline-margin); margin-inline: var(--tab-inner-inline-margin);
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text { #tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
@ -109,7 +90,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
} }
&:hover { &:hover {
@@ -1400,7 +1392,7 @@ tab-group { @@ -1397,7 +1397,7 @@ tab-group {
* flex container. #tabs-newtab-button is a child of the arrowscrollbox where * flex container. #tabs-newtab-button is a child of the arrowscrollbox where
* we don't want a gap (between tabs), so we have to add some margin. * we don't want a gap (between tabs), so we have to add some margin.
*/ */
@ -118,7 +99,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
margin-block: var(--tab-block-margin); margin-block: var(--tab-block-margin);
} }
@@ -1474,8 +1466,6 @@ tab-group { @@ -1471,8 +1471,6 @@ tab-group {
} }
:root:not([sidebar-expand-on-hover]) & { :root:not([sidebar-expand-on-hover]) & {
@ -127,15 +108,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
/* stylelint-disable-next-line media-query-no-invalid */ /* stylelint-disable-next-line media-query-no-invalid */
@media not -moz-pref("sidebar.visibility", "expand-on-hover") { @media not -moz-pref("sidebar.visibility", "expand-on-hover") {
/* We need these rules to apply at all times when the sidebar.visibility /* We need these rules to apply at all times when the sidebar.visibility
@@ -1585,7 +1575,6 @@ tab-group { @@ -1717,7 +1715,7 @@ tab-group {
&:not([expanded]) {
.tabbrowser-tab[pinned] {
- width: var(--tab-collapsed-width);
}
.tab-background {
@@ -1716,7 +1705,7 @@ tab-group {
toolbarbutton:not(#firefox-view-button), toolbarbutton:not(#firefox-view-button),
toolbarpaletteitem:not(#wrapper-firefox-view-button) toolbarpaletteitem:not(#wrapper-firefox-view-button)
) ~ #tabbrowser-tabs { ) ~ #tabbrowser-tabs {
@ -144,7 +117,7 @@ index 5b9ad123d819c6ef068acd427416957a1d0939fe..311caa27ee268c95215d459be02a93d2
padding-inline-start: calc(var(--tab-overflow-pinned-tabs-width) + 2px); padding-inline-start: calc(var(--tab-overflow-pinned-tabs-width) + 2px);
margin-inline-start: 2px; margin-inline-start: 2px;
} }
@@ -1750,7 +1739,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button { @@ -1751,7 +1749,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
list-style-image: url(chrome://global/skin/icons/plus.svg); list-style-image: url(chrome://global/skin/icons/plus.svg);
} }

View file

@ -1,8 +1,8 @@
diff --git a/browser/themes/shared/toolbarbuttons.css b/browser/themes/shared/toolbarbuttons.css diff --git a/browser/themes/shared/toolbarbuttons.css b/browser/themes/shared/toolbarbuttons.css
index d84326072652a48d7fc9b61c585fb00ac4b506ab..c91654eb852460721cf7e45623fb471027f06d90 100644 index 26b58ee104a432a359ba2667d2e49a9231e81fef..7cb950e7b3fcb6f599e9cb645ea24a515e2cc491 100644
--- a/browser/themes/shared/toolbarbuttons.css --- a/browser/themes/shared/toolbarbuttons.css
+++ b/browser/themes/shared/toolbarbuttons.css +++ b/browser/themes/shared/toolbarbuttons.css
@@ -249,7 +249,7 @@ toolbar[brighttext] .toolbaritem-combined-buttons > separator { @@ -218,7 +218,7 @@ toolbar[brighttext] .toolbaritem-combined-buttons > separator {
#nav-bar-overflow-button { #nav-bar-overflow-button {
list-style-image: url("chrome://global/skin/icons/chevron.svg"); list-style-image: url("chrome://global/skin/icons/chevron.svg");
@ -11,7 +11,7 @@ index d84326072652a48d7fc9b61c585fb00ac4b506ab..c91654eb852460721cf7e45623fb4710
display: none; display: none;
} }
@@ -459,7 +459,7 @@ toolbarbutton.bookmark-item:not(.subviewbutton) { @@ -428,7 +428,7 @@ toolbarbutton.bookmark-item:not(.subviewbutton) {
*/ */
align-items: stretch; align-items: stretch;
> .toolbarbutton-icon { > .toolbarbutton-icon {

View file

@ -1,5 +1,5 @@
diff --git a/browser/themes/shared/urlbar-searchbar.css b/browser/themes/shared/urlbar-searchbar.css diff --git a/browser/themes/shared/urlbar-searchbar.css b/browser/themes/shared/urlbar-searchbar.css
index 23661cf489d97cdbd6d4c66de199fd9dc0c8475f..2677dc60a92cebe014c817414a6067be9543cf98 100644 index e237ee9edea85c1d2ef22f988df6b22755e343e6..b06fc06686a7a969e924ad0df662dec937b3c70d 100644
--- a/browser/themes/shared/urlbar-searchbar.css --- a/browser/themes/shared/urlbar-searchbar.css
+++ b/browser/themes/shared/urlbar-searchbar.css +++ b/browser/themes/shared/urlbar-searchbar.css
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
@ -11,18 +11,14 @@ index 23661cf489d97cdbd6d4c66de199fd9dc0c8475f..2677dc60a92cebe014c817414a6067be
--urlbar-margin-inline: 5px; --urlbar-margin-inline: 5px;
--urlbar-padding-block: 4px; --urlbar-padding-block: 4px;
} }
@@ -303,10 +303,14 @@ @@ -292,7 +292,9 @@
}
#urlbar[breakout][breakout-extend] { #urlbar[breakout][breakout-extend] {
height: auto; - margin-left: calc(-1 * var(--urlbar-margin-inline));
+ :root:not([zen-single-toolbar='true']) { + :root:not([zen-single-toolbar='true']) {
margin-left: calc(-1 * var(--urlbar-margin-inline)); + margin-left: calc(-1 * var(--urlbar-margin-inline));
+ } + }
+ align-items: center;
width: calc(var(--urlbar-width) + 2 * var(--urlbar-margin-inline)); width: calc(var(--urlbar-width) + 2 * var(--urlbar-margin-inline));
> .urlbar-input-container { > .urlbar-input-container {
+ align-items: center;
height: var(--urlbar-container-height);
padding-block: calc((var(--urlbar-container-height) - var(--urlbar-height)) / 2 + var(--urlbar-container-padding));
padding-inline: calc(var(--urlbar-margin-inline) + var(--urlbar-container-padding));

View file

@ -60,6 +60,18 @@
list-style-image: url('sidebars-right.svg') !important; list-style-image: url('sidebars-right.svg') !important;
} }
#context_zenSplitTabs {
--menu-image: url('sidebars-right.svg') !important;
}
#context-zen-change-workspace-tab {
--menu-image: url('move-tab.svg') !important;
}
#context-zenSplitLink {
--menu-image: url('split.svg') !important;
}
#sidebar-button:-moz-locale-dir(ltr):not([positionend]), #sidebar-button:-moz-locale-dir(ltr):not([positionend]),
#sidebar-button:-moz-locale-dir(rtl)[positionend] { #sidebar-button:-moz-locale-dir(rtl)[positionend] {
list-style-image: url('chrome://browser/skin/sidebars.svg') !important; list-style-image: url('chrome://browser/skin/sidebars.svg') !important;
@ -121,10 +133,6 @@
list-style-image: url('tab.svg') !important; list-style-image: url('tab.svg') !important;
} }
#context-navigation > menuitem {
padding: 4px;
}
#history-panelmenu, #history-panelmenu,
.urlbarView-row[source='history'] .urlbarView-row[source='history']
> .urlbarView-row-inner > .urlbarView-row-inner
@ -165,6 +173,15 @@
list-style-image: url('open.svg') !important; list-style-image: url('open.svg') !important;
} }
#context_zenOpenWorkspace {
--menu-image: url('open.svg') !important;
}
#context_zenEditWorkspace,
#zenToolbarThemePicker {
--menu-image: url('edit-theme.svg') !important;
}
#add-ons-button, #add-ons-button,
#appMenu-extensions-themes-button, #appMenu-extensions-themes-button,
#unified-extensions-button { #unified-extensions-button {
@ -286,11 +303,6 @@
list-style-image: url('home.svg') !important; list-style-image: url('home.svg') !important;
} }
#toggle_toolbar-menubar,
#appMenu_menu_openHelp {
display: none;
}
#library-button { #library-button {
list-style-image: url('library.svg') !important; list-style-image: url('library.svg') !important;
} }
@ -414,6 +426,7 @@
list-style-image: url('customize.svg') !important; list-style-image: url('customize.svg') !important;
} }
#appmenu-zen-share-rice,
#zen-copy-current-url-button { #zen-copy-current-url-button {
list-style-image: url('share.svg'); list-style-image: url('share.svg');
} }
@ -435,11 +448,6 @@
#zen-glance-sidebar-split { #zen-glance-sidebar-split {
list-style-image: url('split.svg'); list-style-image: url('split.svg');
&[disabled='true'] {
opacity: 0.5;
cursor: not-allowed;
}
} }
#sidebar-box[sidebarcommand='viewTabsSidebar'] #sidebar-box[sidebarcommand='viewTabsSidebar']
@ -628,6 +636,371 @@
list-style-image: url('manage.svg') !important; list-style-image: url('manage.svg') !important;
} }
/* Context Menu Icons */
#context-video-pictureinpicture:not([checked='true']) .menu-iconic-icon {
list-style-image: url('media-pip.svg') !important;
}
#context-media-loop:not([checked='true']) .menu-iconic-icon {
list-style-image: url('media-loop.svg') !important;
}
:not(:not(menubar) > menu, #ContentSelectDropdown)
> menupopup
> menuitem:not(
.menuitem-iconic,
[type='checkbox'],
[type='radio'],
.in-menulist,
.in-menulist menuitem,
.unified-nav-current
),
:not(:not(menubar) > menu, #ContentSelectDropdown)
> menupopup
> menu:not(
.menu-iconic,
[type='checkbox'],
[type='radio'],
.in-menulist,
.in-menulist menu,
.unified-nav-current
),
#toggle_toolbar-menubar,
#PanelUI-history toolbarbutton,
#unified-extensions-context-menu menuitem {
background-image: var(--menu-image) !important;
background-size: 16px !important;
background-position: var(--fp-contextmenu-menuitem-padding-inline) center !important;
background-repeat: no-repeat !important;
-moz-context-properties: fill, fill-opacity !important;
fill: currentColor !important;
}
@media not (-moz-platform: windows) {
menu > .menu-iconic-text,
menuitem > .menu-iconic-text {
padding-inline-start: var(--fp-contextmenu-menuicon-margin-inline) !important;
}
}
#context-savepage {
--menu-image: url('save.svg');
}
#context-selectall,
.textbox-contextmenu menuitem[cmd*='selectAll'],
#context_selectAllTabs,
#toolbar-context-selectAllTabs {
--menu-image: url('edit-select-all.svg');
}
#context-undo,
.textbox-contextmenu menuitem[cmd*='undo'],
#context_undoCloseTab,
#toolbar-context-undoCloseTab {
--menu-image: url('edit-undo.svg');
}
#toggle_toolbar-menubar {
--menu-image: url('menu-bar.svg');
}
#context-redo,
.textbox-contextmenu menuitem[cmd*='redo'] {
--menu-image: url('edit-redo.svg');
}
#context-copy,
.textbox-contextmenu menuitem[cmd*='copy'],
.textbox-contextmenu #strip-on-share,
#placesContext_copy {
--menu-image: url('edit-copy.svg');
}
#context-paste,
.textbox-contextmenu menuitem[cmd*='paste'],
#placesContext_paste_group {
--menu-image: url('edit-paste.svg');
}
#context-cut,
.textbox-contextmenu menuitem[cmd*='cut'],
#placesContext_cut {
--menu-image: url('edit-cut.svg');
}
#context-delete,
.customize-context-removeExtension,
.unified-extensions-context-menu-remove-extension,
.textbox-contextmenu menuitem[cmd*='delete'],
menuitem[id='placesContext_deleteBookmark'],
menuitem[id='placesContext_deleteFolder'],
menuitem[id='placesContext_delete'],
menuitem[id='placesContext_delete_history'],
menuitem[id='placesContext_deleteHost'],
#context_zenDeleteWebPanel,
#context_zenDeleteWorkspace {
--menu-image: url('edit-delete.svg');
}
#paste-and-go {
--menu-image: url('paste-and-go.svg');
}
#context-print-selection {
--menu-image: url('print.svg');
}
#context-take-screenshot {
--menu-image: url('screenshot.svg');
}
#context-viewsource {
--menu-image: url('source-code.svg');
}
#context-inspect-a11y {
--menu-image: url('accessibility.svg');
}
#context-inspect {
--menu-image: url('inspect.svg');
}
#context-searchselect {
--menu-image: url('search-glass.svg');
}
#context-viewimage {
--menu-image: url('image-open.svg');
}
#context-viewimageinfo {
--menu-image: url('info.svg');
}
#context-saveimage,
#context-video-saveimage {
--menu-image: url('image-save.svg');
}
#context-savevideo {
--menu-image: url('video-save.svg');
}
#context-viewvideo {
--menu-image: url('video-open.svg');
}
#context-saveaudio {
--menu-image: url('audio-save.svg');
}
#context-copyimage-contents {
--menu-image: url('image-copy.svg');
}
#context-copyimage,
#context-copyvideourl,
#context-copylink,
#context-stripOnShareLink,
#context_zenOpenNewTabWebPanel,
#context-pdfjs-copy {
--menu-image: url('link.svg');
}
#context-openlinkincurrent {
--menu-image: url('ext-link.svg');
}
#context-viewsource,
#context-viewframesource,
#context-viewpartialsource-selection {
--menu-image: url('source-code.svg');
}
#context-sendimage,
#context-sendvideo,
#context-sendaudio {
--menu-image: url('mail.svg');
}
#context-setDesktopBackground,
.viewCustomizeToolbar {
--menu-image: url('customize.svg');
}
#context-reloadimage,
#context_reloadTab,
#context_reloadSelectedTabs,
#toolbar-context-reloadSelectedTab,
#toolbar-context-reloadSelectedTabs,
#context_zen-reset-pinned-tab {
--menu-image: url('reload.svg');
}
#context-sendlinktodevice,
#context_sendTabToDevice,
#context-sendpagetodevice {
--menu-image: url('send-to-device.svg');
}
#context-openlinkintab,
#context-openlinkincontainertab,
#context_zenWorkspacesOpenInContainerTab,
#context_zenWebPanelContextInContainer,
menuitem[id='placesContext_open:newtab'],
menuitem[id='placesContext_openLinks:tabs'],
menuitem[id='placesContext_openBookmarkLinks:tabs'],
menuitem[id='placesContext_openBookmarkContainer:tabs'] {
--menu-image: url('tab.svg');
}
#context_openANewTab,
#toolbar-context-openANewTab {
--menu-image: url('new-tab-image.svg');
}
#context-openlinkinusercontext-menu,
menu[id='placesContext_open:newcontainertab'],
menu[id='placesContext_openContainer:tabs'] {
--menu-image: url('container-tab.svg');
}
#context-openlink,
menuitem[id='placesContext_open:newwindow'] {
--menu-image: url('window.svg');
}
#context-openlinkprivate,
menuitem[id='placesContext_open:newprivatewindow'] {
--menu-image: url('private-window.svg');
}
#context-savelink {
--menu-image: url('downloads.svg');
}
#spell-add-to-dictionary {
--menu-image: url('add-to-dictionary.svg');
}
#manage-saved-logins {
--menu-image: url('passwords.svg');
}
#context-media-play,
#context_playTab,
#context_playSelectedTabs {
--menu-image: url('media-play.svg');
}
#context-media-pause {
--menu-image: url('media-pause.svg');
}
#context-media-mute,
#context_toggleMuteTab,
#context_toggleMuteSelectedTabs,
#context_zenToggleMuteWebPanel {
--menu-image: url('media-mute.svg');
}
#context-media-unmute,
#context_toggleMuteTab[muted],
#context_toggleMuteSelectedTabs[muted],
#context_zenToggleMuteWebPanel[muted] {
--menu-image: url('media-unmute.svg');
}
#context-media-playbackrate {
--menu-image: url('media-speed.svg');
}
#context-video-fullscreen {
--menu-image: url('fullscreen.svg');
}
#context-leave-dom-fullscreen,
menuitem[contexttype='fullscreen'][label*='Exit'] {
--menu-image: url('fullscreen-exit.svg');
}
#context-media-hidecontrols,
#context-media-showcontrols {
--menu-image: url('permissions.svg');
}
#context_pinTab,
#context_unpinTab,
#context_pinSelectedTabs,
#context_unpinSelectedTabs,
.customize-context-moveToPanel,
#context_zen-replace-pinned-url-with-current {
--menu-image: url('pin.svg');
}
#context_zen-add-essential {
--menu-image: url('essential-add.svg');
}
#context_zen-remove-essential {
--menu-image: url('essential-remove.svg');
}
.customize-context-removeFromToolbar {
--menu-image: url('unpin.svg');
}
#zen-sidebar-web-panel-pinned[pinned='true'] {
list-style-image: url('pin.svg') !important;
}
#zen-sidebar-web-panel-pinned {
list-style-image: url('unpin.svg') !important;
}
#context_duplicateTab,
#context_duplicateTabs {
--menu-image: url('duplicate-tab.svg');
}
#zen-context-menu-compact-mode {
--menu-image: url('sidebar.svg');
}
#context_bookmarkTab,
#context_bookmarkSelectedTabs,
#toggle_PersonalToolbar,
#context-bookmarklink,
#toolbar-context-bookmarkSelectedTab,
#toolbar-context-bookmarkSelectedTabs {
--menu-image: url('bookmark-hollow.svg');
}
menuitem[id='placesContext_show_bookmark:info'],
menuitem[id='placesContext_show_folder:info'],
menuitem[id='placesContext_show:info'] {
--menu-image: url('edit.svg');
}
menuitem[id='placesContext_showAllBookmarks'],
#BMB_bookmarksShowAllTop,
#BMB_bookmarksShowAll,
.customize-context-manageExtension,
.unified-extensions-context-menu-manage-extension {
--menu-image: url('manage.svg');
}
#BMB_viewBookmarksSidebar {
--menu-image: url('chrome://browser/skin/sidebars.svg');
}
#BMB_searchBookmarks {
--menu-image: url('search-page.svg');
}
#appMenuRecentlyClosedTabs { #appMenuRecentlyClosedTabs {
list-style-image: url('container-tab.svg') !important; list-style-image: url('container-tab.svg') !important;
} }
@ -648,12 +1021,58 @@
list-style-image: url('manage.svg') !important; list-style-image: url('manage.svg') !important;
} }
menuitem[id='placesContext_new:bookmark'],
menuitem[id='placesContext_new:folder'],
menuitem[id='placesContext_new:separator'] {
--menu-image: url('plus.svg');
}
#context-savelinktopocket,
#context-pocket {
--menu-image: url('pocket-outline.svg');
}
#context_moveTabOptions {
--menu-image: url('move-tab.svg');
}
.share-tab-url-item {
--menu-image: url('share.svg');
}
#context_reopenInContainer {
--menu-image: url('container-tab.svg');
}
#context_closeTab {
--menu-image: url('close.svg');
}
#context_closeTabOptions {
--menu-image: url('close-all.svg');
}
#context_zenUnloadTab,
#context_zenUnloadWebPanel,
#context_zenTabActions {
--menu-image: url('close-all.svg');
}
.customize-context-reportExtension,
.unified-extensions-context-menu-report-extension {
--menu-image: url('report.svg');
}
/* FIX header icons for the app menu sub menus (eg. fx account, history...) */ /* FIX header icons for the app menu sub menus (eg. fx account, history...) */
.panel-header > h1 { .panel-header > h1 {
text-align: left; text-align: left;
margin-left: 8px !important; margin-left: 8px !important;
} }
.wordmark::after {
content: 'Plus' !important;
}
/* header icons for the app menu sub menus (eg. fx account, history...) */ /* header icons for the app menu sub menus (eg. fx account, history...) */
.panel-header > h1 > span::before { .panel-header > h1 > span::before {
content: ''; content: '';
@ -698,10 +1117,67 @@
--fp-enabled: 1; --fp-enabled: 1;
} }
@media not (-moz-platform: linux) {
.unified-extensions-context-menu-pin-to-toolbar {
--menu-image: url('pin.svg');
}
}
.unified-extensions-context-menu-move-widget-down {
--menu-image: url('arrow-down.svg');
}
.unified-extensions-context-menu-move-widget-up {
--menu-image: url('arrow-up.svg');
}
#alltabs-button { #alltabs-button {
list-style-image: url('chrome://browser/skin/tabs.svg') !important; list-style-image: url('chrome://browser/skin/tabs.svg') !important;
} }
:not(:not(menubar) > menu, #ContentSelectDropdown)
> menupopup
> menuitem:not(
.menuitem-iconic,
[type='checkbox'],
[type='radio'],
.in-menulist,
.in-menulist menuitem,
.unified-nav-current
),
:not(:not(menubar) > menu, #ContentSelectDropdown)
> menupopup
> menu:not(
.menu-iconic,
[type='checkbox'],
[type='radio'],
.in-menulist,
.in-menulist menu,
.unified-nav-current
),
:not(:not(menubar) > menu, #ContentSelectDropdown) > menupopup > menucaption {
padding-inline-start: calc(
var(--fp-contextmenu-menuitem-padding-inline) + 16px +
var(--fp-contextmenu-menuicon-margin-inline)
) !important;
}
menupopup > menuitem:is([type='checkbox']) .menu-iconic-left {
--menu-image: none !important;
margin-inline-start: 4px;
@media not (-moz-platform: windows) {
margin-inline-end: 0;
padding-inline-end: 0;
}
}
@media (-moz-platform: windows) {
menupopup > menuitem[checked='true'] {
padding-inline-start: 6px;
}
}
#toolbar-context-toggle-vertical-tabs, #toolbar-context-toggle-vertical-tabs,
#toolbar-context-customize-sidebar, #toolbar-context-customize-sidebar,
#sidebarRevampSeparator { #sidebarRevampSeparator {

View file

@ -1,12 +1,21 @@
diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css
index 007aec91e089a1d2df20235890b268b820b0a529..ac0592cbcec62ffefb58b491dff48749852f2d88 100644 index 3e75a5f366e76acf4b9457a510b58b0cb8af580f..99b5712d533e99f3bb3f13c1485e771ab66731cd 100644
--- a/browser/themes/windows/browser.css --- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css +++ b/browser/themes/windows/browser.css
@@ -31,7 +31,6 @@ @@ -34,7 +34,6 @@
/* stylelint-disable-next-line media-query-no-invalid */ /* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("widget.windows.mica.toplevel-backdrop", 2) { @media -moz-pref("widget.windows.mica.toplevel-backdrop", 2) {
/* For acrylic, do the same we do for popups to guarantee some contrast */ /* For acrylic, do the same we do for popups to guarantee some contrast */
- background-color: light-dark(rgba(255, 255, 255, .6), rgba(0, 0, 0, .6)); - background-color: light-dark(rgba(255, 255, 255, .6), rgba(0, 0, 0, .6));
}
}
}
@@ -57,7 +56,7 @@
}
} }
}
- &[sizemode="normal"] #navigator-toolbox {
+ &[sizemode="normal"] #browser {
border-top: .5px solid ActiveBorder;
&:-moz-window-inactive {
border-top-color: InactiveBorder;

View file

@ -1,8 +1,8 @@
diff --git a/build/moz.build b/build/moz.build diff --git a/build/moz.build b/build/moz.build
index f7a912ec35dd089ea9a7e712765e954854f55cb3..a84534efbc7662f81573a4a80bc045e0a6d2ed3e 100644 index ad78395c33bba4f6a7bd73bae2a3b6e0658ed59e..a3ba1001a60b764c9ef1c824917fe4d5b81ed0b2 100644
--- a/build/moz.build --- a/build/moz.build
+++ b/build/moz.build +++ b/build/moz.build
@@ -89,7 +89,7 @@ if CONFIG["MOZ_APP_BASENAME"]: @@ -90,7 +90,7 @@ if CONFIG["MOZ_APP_BASENAME"]:
if CONFIG[var]: if CONFIG[var]:
appini_defines[var] = True appini_defines[var] = True

View file

@ -1,5 +1,5 @@
diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py
index 6017810c873f6be5a5d133dc9386f7cd8879e81b..6d399e0c8135d2c27157c81d75515de04c39f1d7 100755 index c59efbdc5382da897dcac31da7039cdc92e1d7dc..9b14add5b0c5afec5b7efc7f9df7d04d3169fc80 100755
--- a/build/pgo/profileserver.py --- a/build/pgo/profileserver.py
+++ b/build/pgo/profileserver.py +++ b/build/pgo/profileserver.py
@@ -18,7 +18,13 @@ from mozprofile import FirefoxProfile, Preferences @@ -18,7 +18,13 @@ from mozprofile import FirefoxProfile, Preferences

View file

@ -1,5 +1,5 @@
diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp
index 77491402cb2921ad52c028ee8fe940636cbe3cf1..e93265e1bb96a07a6d9a66074f191cb8c16fa37a 100644 index e95ff966b34576439c745aa206ff534a835c956f..5691cb2baa76b7cd543bb030b7c8d3028359bc4c 100644
--- a/docshell/base/nsAboutRedirector.cpp --- a/docshell/base/nsAboutRedirector.cpp
+++ b/docshell/base/nsAboutRedirector.cpp +++ b/docshell/base/nsAboutRedirector.cpp
@@ -108,7 +108,7 @@ static const RedirEntry kRedirMap[] = { @@ -108,7 +108,7 @@ static const RedirEntry kRedirMap[] = {

View file

@ -1,8 +1,8 @@
diff --git a/dom/base/use_counter_metrics.yaml b/dom/base/use_counter_metrics.yaml diff --git a/dom/base/use_counter_metrics.yaml b/dom/base/use_counter_metrics.yaml
index 6d2b80297f728af4e6b363e09dac4244d9ffd312..03ca7d1c7f27430923f146a3d3a708a09e351948 100644 index 58755773c26952b79df258dd8f55147c77db9c5f..041bd3fe99303621733cd3543e196b6a03950526 100644
--- a/dom/base/use_counter_metrics.yaml --- a/dom/base/use_counter_metrics.yaml
+++ b/dom/base/use_counter_metrics.yaml +++ b/dom/base/use_counter_metrics.yaml
@@ -21527,6 +21527,22 @@ use.counter.css.page: @@ -21402,6 +21402,22 @@ use.counter.css.page:
send_in_pings: send_in_pings:
- use-counters - use-counters
@ -25,7 +25,7 @@ index 6d2b80297f728af4e6b363e09dac4244d9ffd312..03ca7d1c7f27430923f146a3d3a708a0
css_transform_origin: css_transform_origin:
type: counter type: counter
description: > description: >
@@ -33497,6 +33513,22 @@ use.counter.css.doc: @@ -33372,6 +33388,22 @@ use.counter.css.doc:
send_in_pings: send_in_pings:
- use-counters - use-counters

View file

@ -1,8 +1,8 @@
diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
index add22d0f3c462eae3d5b5140779ff7a4e25f9321..7653df83680ee0e6c765432b1539fe1c90bfae35 100644 index 677a2f25b16f4cf724b57d86a2b83acf40ec6164..e06f85366866c1cc99d27bc10cbebf2cb986e5cb 100644
--- a/dom/html/HTMLMediaElement.cpp --- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp
@@ -452,6 +452,7 @@ class HTMLMediaElement::MediaControlKeyListener final @@ -455,6 +455,7 @@ class HTMLMediaElement::MediaControlKeyListener final
// audible state. Therefore, in that case we would noitfy the audible state // audible state. Therefore, in that case we would noitfy the audible state
// when media starts playing. // when media starts playing.
if (mState == MediaPlaybackState::ePlayed) { if (mState == MediaPlaybackState::ePlayed) {
@ -10,8 +10,8 @@ index add22d0f3c462eae3d5b5140779ff7a4e25f9321..7653df83680ee0e6c765432b1539fe1c
NotifyAudibleStateChanged(mIsOwnerAudible NotifyAudibleStateChanged(mIsOwnerAudible
? MediaAudibleState::eAudible ? MediaAudibleState::eAudible
: MediaAudibleState::eInaudible); : MediaAudibleState::eInaudible);
@@ -6955,6 +6956,9 @@ void HTMLMediaElement::FireTimeUpdate(TimeupdateType aType) { @@ -6967,6 +6968,9 @@ void HTMLMediaElement::FireTimeUpdate(TimeupdateType aType) {
QueueTask(std::move(runner)); DispatchAsyncEvent(std::move(runner));
mQueueTimeUpdateRunnerTime = TimeStamp::Now(); mQueueTimeUpdateRunnerTime = TimeStamp::Now();
mLastCurrentTime = CurrentTime(); mLastCurrentTime = CurrentTime();
+ if (aType == TimeupdateType::eMandatory) { + if (aType == TimeupdateType::eMandatory) {

View file

@ -1,8 +1,8 @@
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index 51f63f998e47aa4b1dffc3cacdb0a698b33b4623..0387738ce1f29b5db4a5d03a3b2f5f3a91011125 100644 index b3bec3821582d48c79cd88a4efe5c7bae1fd42e6..0bb81a8b0fa9478c894f80cfa81fd04c67fdd79f 100644
--- a/dom/script/ScriptLoader.cpp --- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp +++ b/dom/script/ScriptLoader.cpp
@@ -2679,6 +2679,36 @@ void ScriptLoader::CalculateBytecodeCacheFlag(ScriptLoadRequest* aRequest) { @@ -2670,6 +2670,36 @@ void ScriptLoader::CalculateBytecodeCacheFlag(ScriptLoadRequest* aRequest) {
hasFetchCountMin = false; hasFetchCountMin = false;
break; break;
} }

View file

@ -1,8 +1,8 @@
diff --git a/gfx/wr/webrender/src/picture.rs b/gfx/wr/webrender/src/picture.rs diff --git a/gfx/wr/webrender/src/picture.rs b/gfx/wr/webrender/src/picture.rs
index 3b0671ec8ffb8cbd0843e18569a948203c2b9cfe..77d4953cc9bf07d38efd26f4fe95e465b244598c 100644 index 7a811bc074959e0f0e7e25603acc4bf50edce4dc..4954cd9b2b3c9efdbe32343152c877186751ec26 100644
--- a/gfx/wr/webrender/src/picture.rs --- a/gfx/wr/webrender/src/picture.rs
+++ b/gfx/wr/webrender/src/picture.rs +++ b/gfx/wr/webrender/src/picture.rs
@@ -8027,7 +8027,12 @@ fn get_relative_scale_offset( @@ -7957,7 +7957,12 @@ fn get_relative_scale_offset(
CoordinateSpaceMapping::Local => ScaleOffset::identity(), CoordinateSpaceMapping::Local => ScaleOffset::identity(),
CoordinateSpaceMapping::ScaleOffset(scale_offset) => scale_offset, CoordinateSpaceMapping::ScaleOffset(scale_offset) => scale_offset,
CoordinateSpaceMapping::Transform(m) => { CoordinateSpaceMapping::Transform(m) => {

View file

@ -1,8 +1,8 @@
diff --git a/image/decoders/nsJXLDecoder.h b/image/decoders/nsJXLDecoder.h diff --git a/image/decoders/nsJXLDecoder.h b/image/decoders/nsJXLDecoder.h
index 0b723878aefdc5a37c2cffb72a561f859ad79cdf..6d39326dbefa9a85cc02b426de5c9f9149fe612d 100644 index 6cde7456ca03f79e74401c1d215b9d50453ebf41..2f593ca3b70100c600b86e753d7a458c83b4f15c 100644
--- a/image/decoders/nsJXLDecoder.h --- a/image/decoders/nsJXLDecoder.h
+++ b/image/decoders/nsJXLDecoder.h +++ b/image/decoders/nsJXLDecoder.h
@@ -46,6 +46,18 @@ class nsJXLDecoder final : public Decoder { @@ -48,6 +48,18 @@ class nsJXLDecoder final : public Decoder {
Vector<uint8_t> mBuffer; Vector<uint8_t> mBuffer;
Vector<uint8_t> mOutBuffer; Vector<uint8_t> mOutBuffer;
JxlBasicInfo mInfo{}; JxlBasicInfo mInfo{};

View file

@ -1,8 +1,8 @@
diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp
index fe05efa67f97e0d8cc327a4744a225ed5c6132c9..cce0dfb537fa1735b8e7ff67684d373a3081a527 100644 index 0fff882bd3b643e3ab59cfaada984bef0ae7fee4..71e981251fa9395cbb14927d9bd3473c1e18a2cb 100644
--- a/layout/generic/nsIFrame.cpp --- a/layout/generic/nsIFrame.cpp
+++ b/layout/generic/nsIFrame.cpp +++ b/layout/generic/nsIFrame.cpp
@@ -11810,6 +11810,11 @@ gfx::Matrix nsIFrame::ComputeWidgetTransform() const { @@ -11721,6 +11721,11 @@ gfx::Matrix nsIFrame::ComputeWidgetTransform() const {
gfx::Matrix4x4 matrix = nsStyleTransformMatrix::ReadTransforms( gfx::Matrix4x4 matrix = nsStyleTransformMatrix::ReadTransforms(
uiReset->mMozWindowTransform, refBox, float(appUnitsPerDevPixel)); uiReset->mMozWindowTransform, refBox, float(appUnitsPerDevPixel));

View file

@ -1,8 +1,8 @@
diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp
index 8f587542ad248f7c0183e1787c81f37170c7ba54..3b213204e0faabb7ad8988872c8b39c776b87d73 100644 index f89bade8099183baa55b38ccc3c77c7ba9f1a290..8ada58a7965e7f2c9375d8b9bf64a5c78d80bf3f 100644
--- a/layout/style/nsStyleStruct.cpp --- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp
@@ -3229,6 +3229,9 @@ nsStyleUIReset::nsStyleUIReset() @@ -3204,6 +3204,9 @@ nsStyleUIReset::nsStyleUIReset()
mWindowShadow(StyleWindowShadow::Auto), mWindowShadow(StyleWindowShadow::Auto),
mWindowOpacity(1.0), mWindowOpacity(1.0),
mMozWindowInputRegionMargin(StyleLength::Zero()), mMozWindowInputRegionMargin(StyleLength::Zero()),
@ -12,7 +12,7 @@ index 8f587542ad248f7c0183e1787c81f37170c7ba54..3b213204e0faabb7ad8988872c8b39c7
mTransitions( mTransitions(
nsStyleAutoArray<StyleTransition>::WITH_SINGLE_INITIAL_ELEMENT), nsStyleAutoArray<StyleTransition>::WITH_SINGLE_INITIAL_ELEMENT),
mTransitionTimingFunctionCount(1), mTransitionTimingFunctionCount(1),
@@ -3272,6 +3275,7 @@ nsStyleUIReset::nsStyleUIReset(const nsStyleUIReset& aSource) @@ -3247,6 +3250,7 @@ nsStyleUIReset::nsStyleUIReset(const nsStyleUIReset& aSource)
mWindowOpacity(aSource.mWindowOpacity), mWindowOpacity(aSource.mWindowOpacity),
mMozWindowInputRegionMargin(aSource.mMozWindowInputRegionMargin), mMozWindowInputRegionMargin(aSource.mMozWindowInputRegionMargin),
mMozWindowTransform(aSource.mMozWindowTransform), mMozWindowTransform(aSource.mMozWindowTransform),

View file

@ -1,8 +1,8 @@
diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h
index 1c6e2b5a3d4a0ca2b5ef50a84c220958885ce3e3..d74f5558ab70c53fc2649f0f3ab40a456c3e1c6a 100644 index 472c15a359ecd7ad0834d479f1acc53b4527f5ac..9f8377ab507b5883b92621160987a97e0be80014 100644
--- a/layout/style/nsStyleStruct.h --- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h
@@ -2003,6 +2003,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUIReset { @@ -1876,6 +1876,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUIReset {
// The margin of the window region that should be transparent to events. // The margin of the window region that should be transparent to events.
mozilla::StyleLength mMozWindowInputRegionMargin; mozilla::StyleLength mMozWindowInputRegionMargin;
mozilla::StyleTransform mMozWindowTransform; mozilla::StyleTransform mMozWindowTransform;

View file

@ -1,8 +1,8 @@
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
index c3b88faf0b3294a143139487d3dac1127b84bd4f..7fdb31b61ced2e1f9131396ed88f1216ce7c5b1f 100644 index a8ba391326f811ae80510585a3c6ab8d7579f739..5e4569032d4c62e59065262f7069663f9acadad1 100644
--- a/modules/libpref/init/StaticPrefList.yaml --- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml
@@ -18839,6 +18839,7 @@ @@ -18804,6 +18804,7 @@
mirror: always mirror: always
#endif #endif

View file

@ -11,8 +11,3 @@
value: 1 value: 1
mirror: always mirror: always
#endif #endif
- name: zen.haptic-feedback.enabled
type: bool
value: true
mirror: always

View file

@ -1,8 +1,8 @@
diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build
index 4e60ca2b579aa3e02c7769fd966e36d297dd0068..24dbb5de95d4f7dbec354c30f9b2c4d64384225e 100644 index a83080d963322d7baa581f1ca61f93d42bb5a938..0741be2ffc5449be829af7f6067d1abcdc86d155 100644
--- a/netwerk/protocol/http/moz.build --- a/netwerk/protocol/http/moz.build
+++ b/netwerk/protocol/http/moz.build +++ b/netwerk/protocol/http/moz.build
@@ -222,7 +222,7 @@ LOCAL_INCLUDES += [ @@ -223,7 +223,7 @@ LOCAL_INCLUDES += [
"/netwerk/url-classifier", "/netwerk/url-classifier",
] ]

View file

@ -0,0 +1,13 @@
diff --git a/old-configure.in b/old-configure.in
index 036734708f20d658248a8b5b3a6d8adc2530a878..4e1f0d96cd355cc1195b58548b29c1a5d6bedaa8 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -89,7 +89,7 @@ dnl Mac bundle identifier (based on MOZ_APP_DISPLAYNAME)
if test -z "$MOZ_MACBUNDLE_ID"; then
MOZ_MACBUNDLE_ID=`echo $MOZ_APP_DISPLAYNAME | tr 'A-Z' 'a-z' | tr -dc 'a-z-'`
fi
-MOZ_MACBUNDLE_ID=${MOZ_DISTRIBUTION_ID}.${MOZ_MACBUNDLE_ID}
+MOZ_MACBUNDLE_ID=app.zen-browser.zen
if test "$MOZ_DEBUG"; then
MOZ_MACBUNDLE_ID=${MOZ_MACBUNDLE_ID}debug
fi

View file

@ -1,5 +1,5 @@
diff --git a/toolkit/actors/PictureInPictureChild.sys.mjs b/toolkit/actors/PictureInPictureChild.sys.mjs diff --git a/toolkit/actors/PictureInPictureChild.sys.mjs b/toolkit/actors/PictureInPictureChild.sys.mjs
index e4dea54a29e2a1575d76091061781a504da38465..d5248eebdd018feca7bb9d5ee3284d6f253a4b35 100644 index 7ae1aa58bbaeab7a1835a3ea8328735d4f4ecfb1..9d0679dde3c031c2459c09ffbc157f32bc7d003a 100644
--- a/toolkit/actors/PictureInPictureChild.sys.mjs --- a/toolkit/actors/PictureInPictureChild.sys.mjs
+++ b/toolkit/actors/PictureInPictureChild.sys.mjs +++ b/toolkit/actors/PictureInPictureChild.sys.mjs
@@ -291,6 +291,7 @@ export class PictureInPictureLauncherChild extends JSWindowActorChild { @@ -291,6 +291,7 @@ export class PictureInPictureLauncherChild extends JSWindowActorChild {

Some files were not shown because too many files have changed in this diff Show more