diff --git a/.github/workflows/macos-universal-release-build.yml b/.github/workflows/macos-universal-release-build.yml
index b4fea39a0..762a92a6d 100644
--- a/.github/workflows/macos-universal-release-build.yml
+++ b/.github/workflows/macos-universal-release-build.yml
@@ -60,7 +60,7 @@ jobs:
brew install watchman
- cargo install apple-codesign
+ cargo install apple-codesign --locked --force
- name: Force usage of gnu-tar
run: |
diff --git a/.github/workflows/src/release-build.sh b/.github/workflows/src/release-build.sh
index fbccedce2..d3e9720e6 100644
--- a/.github/workflows/src/release-build.sh
+++ b/.github/workflows/src/release-build.sh
@@ -8,10 +8,28 @@ if command -v apt-get &> /dev/null; then
sudo apt-get install -y xvfb libnvidia-egl-wayland1 mesa-utils libgl1-mesa-dri
fi
+if ! test "$ZEN_CROSS_COMPILING" && test "$(uname -s)" = "Linux"; then
+ if test -d "$HOME/.mozbuild/clang/bin"; then
+ export CC="$HOME/.mozbuild/clang/bin/clang"
+ export CXX="$HOME/.mozbuild/clang/bin/clang++"
+ else
+ export CC=clang
+ export CXX=clang++
+ fi
+fi
+
mkdir -p ~/.zen-keys
-echo "$ZEN_SAFEBROWSING_API_KEY" > ~/.zen-keys/safebrowsing.dat
-echo "$ZEN_MOZILLA_API_KEY" > ~/.zen-keys/mozilla.dat
-echo "$ZEN_GOOGLE_LOCATION_SERVICE_API_KEY" > ~/.zen-keys/google_location_service.dat
+if test "$ZEN_SAFEBROWSING_API_KEY"; then
+ echo "$ZEN_SAFEBROWSING_API_KEY" > ~/.zen-keys/safebrowsing.dat
+fi
+
+if test "$ZEN_MOZILLA_API_KEY"; then
+ echo "$ZEN_MOZILLA_API_KEY" > ~/.zen-keys/mozilla.dat
+fi
+
+if test "$ZEN_GOOGLE_LOCATION_SERVICE_API_KEY"; then
+ echo "$ZEN_GOOGLE_LOCATION_SERVICE_API_KEY" > ~/.zen-keys/google_location_service.dat
+fi
. $HOME/.cargo/env
diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml
index e4bca9156..e2662de21 100644
--- a/.github/workflows/sync-upstream.yml
+++ b/.github/workflows/sync-upstream.yml
@@ -129,7 +129,7 @@ jobs:
token: ${{ secrets.DEPLOY_KEY }}
commit-message: "chore: Sync upstream to `Firefox ${{ steps.build-data.outputs.version }}`"
branch: "chore/upstream-sync"
- title: "no-bug: Sync upstream Firefox to version ${{ steps.build-data.outputs.version }}"
+ title: "no-bug: Sync upstream Firefox to version `${{ steps.build-data.outputs.version }}`"
body: |
This PR syncs the upstream Firefox to version ${{ steps.build-data.outputs.version }}.
diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml
index d2570dbfd..2f385cd30 100644
--- a/.github/workflows/windows-release-build.yml
+++ b/.github/workflows/windows-release-build.yml
@@ -154,7 +154,7 @@ jobs:
zlib1g-dev \
aria2
echo Setup wine
- aria2c "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-1.toolchains.v3.linux64-wine.latest/artifacts/public%2Fbuild%2Fwine.tar.zst" -o wine.tar.zst
+ aria2c "https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/dQz_aHy8Rl-Lt0xf2WlrMw/artifacts/public/build/wine.tar.zst" -o wine.tar.zst
tar --zstd -xf wine.tar.zst -C ~/win-cross
rm wine.tar.zst
echo Setup Visual Studio
@@ -234,7 +234,8 @@ jobs:
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }}
ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }}
- ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
+ # Firefox doesn't support location service for Windows
+ # ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
run: |
set -x
dos2unix configs/windows/mozconfig
diff --git a/README.md b/README.md
index cb51a0f61..37cc122a9 100644
--- a/README.md
+++ b/README.md
@@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
### Firefox Versions
-- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `151.0.2`! 🚀
-- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 151.0.2`!
+- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.1`! 🚀
+- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.1`!
### Contributing
diff --git a/build/firefox-cache/l10n-last-commit-hash b/build/firefox-cache/l10n-last-commit-hash
index 7bcc95dc3..3ee1d9289 100644
--- a/build/firefox-cache/l10n-last-commit-hash
+++ b/build/firefox-cache/l10n-last-commit-hash
@@ -1 +1 @@
-05272df13c2e4f435b4e0a706715f302b09ef829
\ No newline at end of file
+2960f4c1ce58d289d3b9ec885695f0017d2636ab
\ No newline at end of file
diff --git a/configs/linux/mozconfig b/configs/linux/mozconfig
index 9816e7580..c959a8eec 100644
--- a/configs/linux/mozconfig
+++ b/configs/linux/mozconfig
@@ -2,15 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-# Setting the compiler based on the existence of clang bin directory
-if test -d "$HOME/.mozbuild/clang/bin"; then
- export CC="$HOME/.mozbuild/clang/bin/clang"
- export CXX="$HOME/.mozbuild/clang/bin/clang++"
-else
- export CC=clang
- export CXX=clang++
-fi
-
if test "$ZEN_RELEASE"; then
if test "$SURFER_COMPAT" = "x86_64"; then
ac_add_options --target=x86_64-pc-linux
diff --git a/configs/windows/mozconfig b/configs/windows/mozconfig
index 065ed1291..5e599b0e6 100644
--- a/configs/windows/mozconfig
+++ b/configs/windows/mozconfig
@@ -16,9 +16,9 @@ if test "$ZEN_CROSS_COMPILING"; then
CROSS_COMPILE=1
if test "$SURFER_COMPAT" = "aarch64"; then
- export WIN32_REDIST_DIR="$(echo ~)/win-cross/vs2026/VC/Redist/MSVC/14.50.35710/arm64/Microsoft.VC145.CRT"
+ export WIN32_REDIST_DIR="$WINSYSROOT/VC/Redist/MSVC/14.50.35710/arm64/Microsoft.VC145.CRT"
else
- export WIN32_REDIST_DIR="$(echo ~)/win-cross/vs2026/VC/Redist/MSVC/14.50.35710/x64/Microsoft.VC145.CRT"
+ export WIN32_REDIST_DIR="$WINSYSROOT/VC/Redist/MSVC/14.50.35710/x64/Microsoft.VC145.CRT"
fi
fi
diff --git a/crowdin.yml b/crowdin.yml
index ad29d0395..e8b87dbd1 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -24,3 +24,5 @@ files:
translation: browser/browser/zen-library.ftl
- source: en-US/browser/browser/zen-boosts.ftl
translation: browser/browser/zen-boosts.ftl
+ - source: en-US/browser/browser/zen-space-routing.ftl
+ translation: browser/browser/zen-space-routing.ftl
diff --git a/locales/ar/browser/browser/zen-boosts.ftl b/locales/ar/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/ar/browser/browser/zen-boosts.ftl
+++ b/locales/ar/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/bg/browser/browser/zen-boosts.ftl b/locales/bg/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/bg/browser/browser/zen-boosts.ftl
+++ b/locales/bg/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/bs/browser/browser/zen-boosts.ftl b/locales/bs/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/bs/browser/browser/zen-boosts.ftl
+++ b/locales/bs/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/ca/browser/browser/zen-boosts.ftl b/locales/ca/browser/browser/zen-boosts.ftl
index 588c417b0..80e72030a 100644
--- a/locales/ca/browser/browser/zen-boosts.ftl
+++ b/locales/ca/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Trieu el selector
zen-boost-css-inspector =
.tooltiptext = Obre l'inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brillantor
-zen-bootst-color-original-saturation = Saturació original
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brillantor
+zen-boost-color-original-saturation = Saturació original
zen-add-zap-helper = Feu clic als elements de la pàgina per amagar-los
zen-remove-zap-helper = ← Feu clic per mostrar
zen-select-this = Insereix un selector per a això
diff --git a/locales/cs/browser/browser/zen-boosts.ftl b/locales/cs/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/cs/browser/browser/zen-boosts.ftl
+++ b/locales/cs/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/cy/browser/browser/zen-boosts.ftl b/locales/cy/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/cy/browser/browser/zen-boosts.ftl
+++ b/locales/cy/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/da/browser/browser/zen-boosts.ftl b/locales/da/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/da/browser/browser/zen-boosts.ftl
+++ b/locales/da/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/de/browser/browser/zen-boosts.ftl b/locales/de/browser/browser/zen-boosts.ftl
index 21d9907ab..3dc0465ed 100644
--- a/locales/de/browser/browser/zen-boosts.ftl
+++ b/locales/de/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Selektor auswählen
zen-boost-css-inspector =
.tooltiptext = Inspektor öffnen
-zen-bootst-color-contrast = Kontrast
-zen-bootst-color-brightness = Helligkeit
-zen-bootst-color-original-saturation = Ausgangssättigung
+zen-boost-color-contrast = Kontrast
+zen-boost-color-brightness = Helligkeit
+zen-boost-color-original-saturation = Ausgangssättigung
zen-add-zap-helper = Klicke auf Elemente auf der Seite, um sie mit Zap zu markieren
zen-remove-zap-helper = ← Erneut klicken zum Wiederherstellen
zen-select-this = Selektor für dieses Element einfügen
diff --git a/locales/el/browser/browser/zen-boosts.ftl b/locales/el/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/el/browser/browser/zen-boosts.ftl
+++ b/locales/el/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/en-GB/browser/browser/zen-boosts.ftl b/locales/en-GB/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/en-GB/browser/browser/zen-boosts.ftl
+++ b/locales/en-GB/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/en-US/browser/browser/zen-boosts.ftl b/locales/en-US/browser/browser/zen-boosts.ftl
index 07e32431c..55da47677 100644
--- a/locales/en-US/browser/browser/zen-boosts.ftl
+++ b/locales/en-US/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/en-US/browser/browser/zen-space-routing.ftl b/locales/en-US/browser/browser/zen-space-routing.ftl
new file mode 100644
index 000000000..a960e8895
--- /dev/null
+++ b/locales/en-US/browser/browser/zen-space-routing.ftl
@@ -0,0 +1,27 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+zen-space-routing-settings =
+ .label = Space Routing Settings
+zen-space-routing-rulepanel-placeholder = Routes let you choose where specific sites open inside Zen. For example, you can route YouTube links to always open inside your Personal space.
+zen-space-routing-dialog-title = Space Routing Settings
+zen-space-routing-external-default = Default route for external links
+zen-space-routing-new-route = New Route
+zen-space-routing-open-in-space = Open in Space
+zen-space-routing-most-recent-space = Most recent Space
+zen-space-routing-close-button =
+ .aria-label = Close
+ .tooltiptext = Close
+
+zen-space-routing-contains =
+ .label = Contains
+zen-space-routing-equal-to =
+ .label = Is Equal To
+zen-space-routing-regex =
+ .label = RegEx
+
+zen-space-routing-open-in = Open In
+zen-space-routing-url = URL
+
+zen-space-routing-tab-routed-toast = New tab opened in { $targetWorkspace }
diff --git a/locales/es-ES/browser/browser/zen-boosts.ftl b/locales/es-ES/browser/browser/zen-boosts.ftl
index 3af79691b..1542ac34f 100644
--- a/locales/es-ES/browser/browser/zen-boosts.ftl
+++ b/locales/es-ES/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Escoger selector
zen-boost-css-inspector =
.tooltiptext = Abrir inspector
-zen-bootst-color-contrast = Contraste
-zen-bootst-color-brightness = Brillo
-zen-bootst-color-original-saturation = Saturación original
+zen-boost-color-contrast = Contraste
+zen-boost-color-brightness = Brillo
+zen-boost-color-original-saturation = Saturación original
zen-add-zap-helper = Haga clic en los elementos de la página para borrarlos
zen-remove-zap-helper = ← Clic para deshacer
zen-select-this = Insertar selector para esto
diff --git a/locales/et/browser/browser/zen-boosts.ftl b/locales/et/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/et/browser/browser/zen-boosts.ftl
+++ b/locales/et/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/eu/browser/browser/zen-boosts.ftl b/locales/eu/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/eu/browser/browser/zen-boosts.ftl
+++ b/locales/eu/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/fa/browser/browser/zen-boosts.ftl b/locales/fa/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/fa/browser/browser/zen-boosts.ftl
+++ b/locales/fa/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/fi/browser/browser/zen-boosts.ftl b/locales/fi/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/fi/browser/browser/zen-boosts.ftl
+++ b/locales/fi/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/fr/browser/browser/zen-boosts.ftl b/locales/fr/browser/browser/zen-boosts.ftl
index d06ad7610..0cae8d22a 100644
--- a/locales/fr/browser/browser/zen-boosts.ftl
+++ b/locales/fr/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Choisir le sélecteur
zen-boost-css-inspector =
.tooltiptext = Ouvrir l'inspecteur
-zen-bootst-color-contrast = Contraste
-zen-bootst-color-brightness = Luminosité
-zen-bootst-color-original-saturation = Saturation originale
+zen-boost-color-contrast = Contraste
+zen-boost-color-brightness = Luminosité
+zen-boost-color-original-saturation = Saturation originale
zen-add-zap-helper = Cliquez sur des éléments de la page pour les zapper
zen-remove-zap-helper = ← Cliquez pour démasquer
zen-select-this = Insérer un sélecteur pour ceci
diff --git a/locales/ga-IE/browser/browser/zen-boosts.ftl b/locales/ga-IE/browser/browser/zen-boosts.ftl
index 2491bae48..7477614f0 100644
--- a/locales/ga-IE/browser/browser/zen-boosts.ftl
+++ b/locales/ga-IE/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Roghnóir Roghnaigh
zen-boost-css-inspector =
.tooltiptext = Oscail an Cigire
-zen-bootst-color-contrast = Codarsnacht
-zen-bootst-color-brightness = Gile
-zen-bootst-color-original-saturation = Sáithiú Bunaidh
+zen-boost-color-contrast = Codarsnacht
+zen-boost-color-brightness = Gile
+zen-boost-color-original-saturation = Sáithiú Bunaidh
zen-add-zap-helper = Cliceáil ar eilimintí ar an leathanach chun iad a Zapáil
zen-remove-zap-helper = ← Cliceáil chun Dízipáil
zen-select-this = Cuir roghnóir isteach don seo
diff --git a/locales/he/browser/browser/zen-boosts.ftl b/locales/he/browser/browser/zen-boosts.ftl
index 3f9d31f62..66a825ec5 100644
--- a/locales/he/browser/browser/zen-boosts.ftl
+++ b/locales/he/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = ניגודיות
-zen-bootst-color-brightness = בהירות
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = ניגודיות
+zen-boost-color-brightness = בהירות
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/hu/browser/browser/zen-boosts.ftl b/locales/hu/browser/browser/zen-boosts.ftl
index 0437ff86a..30caaedb0 100644
--- a/locales/hu/browser/browser/zen-boosts.ftl
+++ b/locales/hu/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Vizsgáló megnyitása
-zen-bootst-color-contrast = Kontraszt
-zen-bootst-color-brightness = Fényerő
-zen-bootst-color-original-saturation = Eredeti szaturáció
+zen-boost-color-contrast = Kontraszt
+zen-boost-color-brightness = Fényerő
+zen-boost-color-original-saturation = Eredeti szaturáció
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/id/browser/browser/zen-boosts.ftl b/locales/id/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/id/browser/browser/zen-boosts.ftl
+++ b/locales/id/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/is/browser/browser/zen-boosts.ftl b/locales/is/browser/browser/zen-boosts.ftl
index 52a18cd59..7cc8d4b91 100644
--- a/locales/is/browser/browser/zen-boosts.ftl
+++ b/locales/is/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Veljari
zen-boost-css-inspector =
.tooltiptext = Opna rýni
-zen-bootst-color-contrast = Birtuskil
-zen-bootst-color-brightness = Birtustig
-zen-bootst-color-original-saturation = Upprunaleg litmettun
+zen-boost-color-contrast = Birtuskil
+zen-boost-color-brightness = Birtustig
+zen-boost-color-original-saturation = Upprunaleg litmettun
zen-add-zap-helper = Smelltu á atriði á síðunni til að einangra þau (zap)
zen-remove-zap-helper = ← Smelltu til að taka úr einangrun
zen-select-this = Setja inn veljara fyrir þetta
diff --git a/locales/it/browser/browser/zen-boosts.ftl b/locales/it/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/it/browser/browser/zen-boosts.ftl
+++ b/locales/it/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/ja/browser/browser/zen-boosts.ftl b/locales/ja/browser/browser/zen-boosts.ftl
index 5a5586994..6172b8b53 100644
--- a/locales/ja/browser/browser/zen-boosts.ftl
+++ b/locales/ja/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = セレクターを選択
zen-boost-css-inspector =
.tooltiptext = インスペクタを開く
-zen-bootst-color-contrast = コントラスト
-zen-bootst-color-brightness = 明るさ
-zen-bootst-color-original-saturation = 元の彩度
+zen-boost-color-contrast = コントラスト
+zen-boost-color-brightness = 明るさ
+zen-boost-color-original-saturation = 元の彩度
zen-add-zap-helper = Zap にページ上の要素をクリックします
zen-remove-zap-helper = ←クリックして解除
zen-select-this = このセレクターを挿入
diff --git a/locales/ko/browser/browser/zen-boosts.ftl b/locales/ko/browser/browser/zen-boosts.ftl
index 1b49b35d9..057fbe3b0 100644
--- a/locales/ko/browser/browser/zen-boosts.ftl
+++ b/locales/ko/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = 선택자 선택
zen-boost-css-inspector =
.tooltiptext = 검사기 열기
-zen-bootst-color-contrast = 대비
-zen-bootst-color-brightness = 밝기
-zen-bootst-color-original-saturation = 원본 채도
+zen-boost-color-contrast = 대비
+zen-boost-color-brightness = 밝기
+zen-boost-color-original-saturation = 원본 채도
zen-add-zap-helper = 페이지 내의 요소를 클릭해서 날려버리세요
zen-remove-zap-helper = ← 클릭하여 되살리기
zen-select-this = 이 요소의 선택자 삽입
diff --git a/locales/lt/browser/browser/zen-boosts.ftl b/locales/lt/browser/browser/zen-boosts.ftl
index 8a1c758ec..60b7619e8 100644
--- a/locales/lt/browser/browser/zen-boosts.ftl
+++ b/locales/lt/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Kontrastas
-zen-bootst-color-brightness = Šviesumas
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Kontrastas
+zen-boost-color-brightness = Šviesumas
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/nb/browser/browser/zen-boosts.ftl b/locales/nb/browser/browser/zen-boosts.ftl
index 658411d08..6831beb05 100644
--- a/locales/nb/browser/browser/zen-boosts.ftl
+++ b/locales/nb/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Velgselektor
zen-boost-css-inspector =
.tooltiptext = Åpne inspektør
-zen-bootst-color-contrast = Kontrast
-zen-bootst-color-brightness = Lysstyrke
-zen-bootst-color-original-saturation = Opprinnelig fargemetning
+zen-boost-color-contrast = Kontrast
+zen-boost-color-brightness = Lysstyrke
+zen-boost-color-original-saturation = Opprinnelig fargemetning
zen-add-zap-helper = Klikk elementer på siden for å Zappe dem
zen-remove-zap-helper = ← Klikk for å avzappe
zen-select-this = Sett inn slektor for dette
diff --git a/locales/nl/browser/browser/zen-boosts.ftl b/locales/nl/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/nl/browser/browser/zen-boosts.ftl
+++ b/locales/nl/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/nn-NO/browser/browser/zen-boosts.ftl b/locales/nn-NO/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/nn-NO/browser/browser/zen-boosts.ftl
+++ b/locales/nn-NO/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/pl/browser/browser/zen-boosts.ftl b/locales/pl/browser/browser/zen-boosts.ftl
index 7d1e3f33a..c2d9a4519 100644
--- a/locales/pl/browser/browser/zen-boosts.ftl
+++ b/locales/pl/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Wybierz selektor
zen-boost-css-inspector =
.tooltiptext = Otwórz Inspektor
-zen-bootst-color-contrast = Kontrast
-zen-bootst-color-brightness = Jasność
-zen-bootst-color-original-saturation = Oryginalne nasycenie
+zen-boost-color-contrast = Kontrast
+zen-boost-color-brightness = Jasność
+zen-boost-color-original-saturation = Oryginalne nasycenie
zen-add-zap-helper = Kliknij elementy na stronie, aby je ukryć
zen-remove-zap-helper = ← Kliknij, aby cofnąć ukrycie
zen-select-this = Wstaw selektor dla tego elementu
diff --git a/locales/pt-BR/browser/browser/zen-boosts.ftl b/locales/pt-BR/browser/browser/zen-boosts.ftl
index 6ae7e53e6..cf906da64 100644
--- a/locales/pt-BR/browser/browser/zen-boosts.ftl
+++ b/locales/pt-BR/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Ferramenta de Seleção
zen-boost-css-inspector =
.tooltiptext = Abrir Inspetor
-zen-bootst-color-contrast = Contraste
-zen-bootst-color-brightness = Brilho
-zen-bootst-color-original-saturation = Saturação Original
+zen-boost-color-contrast = Contraste
+zen-boost-color-brightness = Brilho
+zen-boost-color-original-saturation = Saturação Original
zen-add-zap-helper = Clique em elementos da página para dar um Zap neles
zen-remove-zap-helper = Clique para Deszapar
zen-select-this = Inserir seletor para isto
diff --git a/locales/pt-PT/browser/browser/zen-boosts.ftl b/locales/pt-PT/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/pt-PT/browser/browser/zen-boosts.ftl
+++ b/locales/pt-PT/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/ro/browser/browser/zen-boosts.ftl b/locales/ro/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/ro/browser/browser/zen-boosts.ftl
+++ b/locales/ro/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/ru/browser/browser/zen-boosts.ftl b/locales/ru/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/ru/browser/browser/zen-boosts.ftl
+++ b/locales/ru/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/sk/browser/browser/zen-boosts.ftl b/locales/sk/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/sk/browser/browser/zen-boosts.ftl
+++ b/locales/sk/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/sv-SE/browser/browser/zen-boosts.ftl b/locales/sv-SE/browser/browser/zen-boosts.ftl
index c010d0a98..ac1f44bc4 100644
--- a/locales/sv-SE/browser/browser/zen-boosts.ftl
+++ b/locales/sv-SE/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Välj väljare
zen-boost-css-inspector =
.tooltiptext = Öppna inspektör
-zen-bootst-color-contrast = Kontrast
-zen-bootst-color-brightness = Ljusstyrka
-zen-bootst-color-original-saturation = Ursprunglig mättnad
+zen-boost-color-contrast = Kontrast
+zen-boost-color-brightness = Ljusstyrka
+zen-boost-color-original-saturation = Ursprunglig mättnad
zen-add-zap-helper = Klicka på element på sidan för att zappa dem
zen-remove-zap-helper = ← Klicka för att avzappa
zen-select-this = Infoga väljare för detta
diff --git a/locales/th/browser/browser/zen-boosts.ftl b/locales/th/browser/browser/zen-boosts.ftl
index 7211fa124..eb42026a7 100644
--- a/locales/th/browser/browser/zen-boosts.ftl
+++ b/locales/th/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Pick Selector
zen-boost-css-inspector =
.tooltiptext = Open Inspector
-zen-bootst-color-contrast = Contrast
-zen-bootst-color-brightness = Brightness
-zen-bootst-color-original-saturation = Original Saturation
+zen-boost-color-contrast = Contrast
+zen-boost-color-brightness = Brightness
+zen-boost-color-original-saturation = Original Saturation
zen-add-zap-helper = Click elements on the page to Zap them
zen-remove-zap-helper = ← Click to Unzap
zen-select-this = Insert selector for this
diff --git a/locales/tr/browser/browser/zen-boosts.ftl b/locales/tr/browser/browser/zen-boosts.ftl
index 7c78e7c03..5e5e94f13 100644
--- a/locales/tr/browser/browser/zen-boosts.ftl
+++ b/locales/tr/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Seçici seç
zen-boost-css-inspector =
.tooltiptext = Denetleyiciyi aç
-zen-bootst-color-contrast = Kontrast
-zen-bootst-color-brightness = Parlaklık
-zen-bootst-color-original-saturation = Orijinal doygunluk
+zen-boost-color-contrast = Kontrast
+zen-boost-color-brightness = Parlaklık
+zen-boost-color-original-saturation = Orijinal doygunluk
zen-add-zap-helper = Sayfadaki ögelere tıklayarak onları Zap ile kaldırın
zen-remove-zap-helper = ← Unzap için tıklayın
zen-select-this = Bu öge için seçici ekle
diff --git a/locales/uk/browser/browser/zen-boosts.ftl b/locales/uk/browser/browser/zen-boosts.ftl
index 3e5c35c98..37e88193d 100644
--- a/locales/uk/browser/browser/zen-boosts.ftl
+++ b/locales/uk/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Вибір селектора
zen-boost-css-inspector =
.tooltiptext = Відкрити інспектора
-zen-bootst-color-contrast = Контраст
-zen-bootst-color-brightness = Яскравість
-zen-bootst-color-original-saturation = Оригінальна насиченість
+zen-boost-color-contrast = Контраст
+zen-boost-color-brightness = Яскравість
+zen-boost-color-original-saturation = Оригінальна насиченість
zen-add-zap-helper = Клацніть на елементи на сторінці, щоби сховати їх
zen-remove-zap-helper = ← Клацніть, аби знову показати
zen-select-this = Вставити селектор для цього
diff --git a/locales/vi/browser/browser/zen-boosts.ftl b/locales/vi/browser/browser/zen-boosts.ftl
index 734f49741..a29a84583 100644
--- a/locales/vi/browser/browser/zen-boosts.ftl
+++ b/locales/vi/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = Chọn phần tử
zen-boost-css-inspector =
.tooltiptext = Mở trình kiểm tra
-zen-bootst-color-contrast = Độ tương phản
-zen-bootst-color-brightness = Độ sáng
-zen-bootst-color-original-saturation = Độ bão hòa gốc
+zen-boost-color-contrast = Độ tương phản
+zen-boost-color-brightness = Độ sáng
+zen-boost-color-original-saturation = Độ bão hòa gốc
zen-add-zap-helper = Nhấp vào các phần tử trên trang để Khử chúng
zen-remove-zap-helper = ← Nhấp để khôi phục
zen-select-this = Nhập bộ chọn cho phần tử này
diff --git a/locales/zh-CN/browser/browser/zen-boosts.ftl b/locales/zh-CN/browser/browser/zen-boosts.ftl
index be617b8c7..650ea1dc6 100644
--- a/locales/zh-CN/browser/browser/zen-boosts.ftl
+++ b/locales/zh-CN/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = 选取选择器
zen-boost-css-inspector =
.tooltiptext = 打开查看器
-zen-bootst-color-contrast = 对比度
-zen-bootst-color-brightness = 亮度
-zen-bootst-color-original-saturation = 初始饱和度
+zen-boost-color-contrast = 对比度
+zen-boost-color-brightness = 亮度
+zen-boost-color-original-saturation = 初始饱和度
zen-add-zap-helper = 点击页面上的元素以将其屏蔽
zen-remove-zap-helper = ← 点击以取消屏蔽
zen-select-this = 插入此元素的选择器
diff --git a/locales/zh-TW/browser/browser/zen-boosts.ftl b/locales/zh-TW/browser/browser/zen-boosts.ftl
index d9fefbb04..a195f6411 100644
--- a/locales/zh-TW/browser/browser/zen-boosts.ftl
+++ b/locales/zh-TW/browser/browser/zen-boosts.ftl
@@ -29,9 +29,9 @@ zen-boost-css-picker =
.tooltiptext = 汲取選擇器
zen-boost-css-inspector =
.tooltiptext = 開啟檢測器
-zen-bootst-color-contrast = 對比
-zen-bootst-color-brightness = 亮度
-zen-bootst-color-original-saturation = 飽和度
+zen-boost-color-contrast = 對比
+zen-boost-color-brightness = 亮度
+zen-boost-color-original-saturation = 飽和度
zen-add-zap-helper = 選擇要 Zap的元素
zen-remove-zap-helper = ← 按此取消zap
zen-select-this = 加入此元素的選擇器
diff --git a/package-lock.json b/package-lock.json
index c0703a8f6..1224e4955 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,14 +19,6 @@
"typescript": "^5.9.3"
}
},
- "engine/tools/lint/eslint/eslint-plugin-spidermonkey-js": {
- "extraneous": true,
- "license": "MPL-2.0",
- "devDependencies": {},
- "engines": {
- "node": ">=6.9.1"
- }
- },
"node_modules/@ampproject/remapping": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
@@ -1923,17 +1915,17 @@
}
},
"node_modules/form-data": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
- "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",
+ "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
- "hasown": "^2.0.2",
- "mime-types": "^2.1.12"
+ "hasown": "^2.0.4",
+ "mime-types": "^2.1.35"
},
"engines": {
"node": ">= 6"
@@ -2169,9 +2161,9 @@
"license": "ISC"
},
"node_modules/hasown": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2390,10 +2382,20 @@
"license": "MIT"
},
"node_modules/js-yaml": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
- "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
+ "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
"dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/puzrin"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/nodeca"
+ }
+ ],
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
@@ -4223,14 +4225,6 @@
"engines": {
"node": ">=0.8"
}
- },
- "tools/eslint-plugin-spidermonkey-js": {
- "extraneous": true,
- "license": "MPL-2.0",
- "devDependencies": {},
- "engines": {
- "node": ">=6.9.1"
- }
}
}
}
diff --git a/package.json b/package.json
index 6e7fd8fd0..c62853c08 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"surfer": "surfer",
"test": "python3 scripts/run_tests.py",
"test:dbg": "python3 scripts/run_tests.py --jsdebugger --debug-on-failure",
- "test:gtest": "cd engine && ./mach gtest",
+ "test:gtest": "cd engine && ./mach gtest Zen*",
"ffprefs": "cd tools/ffprefs && cargo run --bin ffprefs -- ../../",
"lc": "surfer license-check",
"lc:fix": "surfer license-check --fix",
diff --git a/prefs/firefox/browser.yaml b/prefs/firefox/browser.yaml
index 341577cac..4545795c6 100644
--- a/prefs/firefox/browser.yaml
+++ b/prefs/firefox/browser.yaml
@@ -94,3 +94,8 @@
# See gh-12985 for details on the following preferences
- name: browser.search.widget.new
value: true
+
+# Disabled from https://searchfox.org/firefox-main/rev/d6bfff43852356ca98af848b4705d37f8d41856f/modules/libpref/init/StaticPrefList.yaml#2008
+# Only enabled for windows, doesn't really fit inside Zen.
+- name: browser.startup.preXulSkeletonUI
+ value: false
diff --git a/prefs/zen/windows.yaml b/prefs/zen/windows.yaml
index effae25bb..0ed3660dd 100644
--- a/prefs/zen/windows.yaml
+++ b/prefs/zen/windows.yaml
@@ -7,10 +7,6 @@
value: true
condition: "defined(XP_WIN)"
-- name: widget.windows.mica.popups
- value: true
- condition: "defined(XP_WIN)"
-
# 1 = DWMSBT_MAINWINDOW
# 2 = DWMSBT_TRANSIENTWINDOW (default, also used for popups)
# 3 = DWMSBT_TABBEDWINDOW
diff --git a/src/-prettierignore.patch b/src/-prettierignore.patch
index d844969ee..ed444531d 100644
--- a/src/-prettierignore.patch
+++ b/src/-prettierignore.patch
@@ -1,8 +1,8 @@
diff --git a/.prettierignore b/.prettierignore
-index de2efe413e5696a3b8d0467a3a9e668dfadd8a1a..01c76d8e639d5630fca9cccb55d415fc4e903e91 100644
+index 949896ff064ae0b54b6a657ea074bc88e12820f7..5249f420972667bece4d85fe8d35073afaebeb8a 100644
--- a/.prettierignore
+++ b/.prettierignore
-@@ -1805,3 +1805,12 @@ tools/ts/test/baselines/
+@@ -1803,3 +1803,12 @@ tools/ts/test/baselines/
try_task_config.json
xpcom/idl-parser/xpidl/fixtures/xpctest.d.json
**/package-lock.json
diff --git a/src/browser/actors/EncryptedMediaParent-sys-mjs.patch b/src/browser/actors/EncryptedMediaParent-sys-mjs.patch
index 74f9f5d19..36ac8cdeb 100644
--- a/src/browser/actors/EncryptedMediaParent-sys-mjs.patch
+++ b/src/browser/actors/EncryptedMediaParent-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/actors/EncryptedMediaParent.sys.mjs b/browser/actors/EncryptedMediaParent.sys.mjs
-index 492dce93d3cc7c6ec16db047c9e47b175ef3a0fe..757e5543e0e6900c414db6d7a96d511608c1e50a 100644
+index 8bdeba9b8803354e23a3881147fee6a6af94a63b..61c8407df1fbebcc36481ad2169a9c103b4faed5 100644
--- a/browser/actors/EncryptedMediaParent.sys.mjs
+++ b/browser/actors/EncryptedMediaParent.sys.mjs
@@ -199,6 +199,7 @@ export class EncryptedMediaParent extends JSWindowActorParent {
diff --git a/src/browser/actors/WebRTCParent-sys-mjs.patch b/src/browser/actors/WebRTCParent-sys-mjs.patch
index 46e7f96b7..08d42ab63 100644
--- a/src/browser/actors/WebRTCParent-sys-mjs.patch
+++ b/src/browser/actors/WebRTCParent-sys-mjs.patch
@@ -1,12 +1,12 @@
diff --git a/browser/actors/WebRTCParent.sys.mjs b/browser/actors/WebRTCParent.sys.mjs
-index b743bd83529c4cd01a6bc820967186dbe41b6144..e24c48bac0f4ae3d4b26087b7e0cac7910019d0e 100644
+index 98b10b1d789c20b3463de4f703af102f6908318b..29534480fbeda6d66cb9dab81afdaed8d8a5c565 100644
--- a/browser/actors/WebRTCParent.sys.mjs
+++ b/browser/actors/WebRTCParent.sys.mjs
@@ -152,6 +152,7 @@ export class WebRTCParent extends JSWindowActorParent {
- let tabbrowser = browser.ownerGlobal.gBrowser;
+ let tabbrowser = browser.documentGlobal.gBrowser;
if (tabbrowser) {
-+ browser.ownerGlobal.gZenMediaController.updateMediaSharing(state);
++ browser.documentGlobal.gZenMediaController.updateMediaSharing(state);
tabbrowser.updateBrowserSharing(browser, {
webRTC: state,
});
diff --git a/src/browser/base/content/aboutDialog-xhtml.patch b/src/browser/base/content/aboutDialog-xhtml.patch
index 1145f64d5..333a28ed3 100644
--- a/src/browser/base/content/aboutDialog-xhtml.patch
+++ b/src/browser/base/content/aboutDialog-xhtml.patch
@@ -1,5 +1,5 @@
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
-index c64980810570fcea84e33fdc2d66ac42a79f4e46..aa629ebb38a9aa74048fe3fc759f716fad57d6f3 100644
+index 3ffd464b960a4299a7dd0cd87e4fc2f781b9d593..ef9f42d1f0196902b4af31f4496891fcd6319831 100644
--- a/browser/base/content/aboutDialog.xhtml
+++ b/browser/base/content/aboutDialog.xhtml
@@ -102,10 +102,6 @@
diff --git a/src/browser/base/content/browser-addons-js.patch b/src/browser/base/content/browser-addons-js.patch
index 8ab878b64..92d2ed624 100644
--- a/src/browser/base/content/browser-addons-js.patch
+++ b/src/browser/base/content/browser-addons-js.patch
@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js
-index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05f45bce08 100644
+index 56acad9b7c21c07842f901d24525a97a0ba20217..829054218dc6fbb14fe034546e8da62b12516eae 100644
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -1060,7 +1060,7 @@ var gXPInstallObserver = {
@@ -20,7 +20,7 @@ index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05
},
};
-@@ -2209,7 +2209,7 @@ var gUnifiedExtensions = {
+@@ -2214,7 +2214,7 @@ var gUnifiedExtensions = {
// If the new ID is not added in NOTIFICATION_IDS, consider handling the case
// in the "PopupNotificationsBeforeAnchor" handler elsewhere in this file.
getPopupAnchorID(aBrowser, aWindow) {
@@ -29,7 +29,7 @@ index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05
const attr = anchorID + "popupnotificationanchor";
if (!aBrowser[attr]) {
-@@ -2220,7 +2220,7 @@ var gUnifiedExtensions = {
+@@ -2225,7 +2225,7 @@ var gUnifiedExtensions = {
anchorID
// Anchor on the toolbar icon to position the popup right below the
// button.
@@ -38,7 +38,7 @@ index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05
}
return anchorID;
-@@ -2545,7 +2545,7 @@ var gUnifiedExtensions = {
+@@ -2550,7 +2550,7 @@ var gUnifiedExtensions = {
requestAnimationFrame(() => this.updateAttention());
},
@@ -47,7 +47,7 @@ index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05
// A list of extension widget IDs (possibly empty).
let widgetIDs;
-@@ -2559,7 +2559,7 @@ var gUnifiedExtensions = {
+@@ -2564,7 +2564,7 @@ var gUnifiedExtensions = {
}
// The list of overflowed extensions in the extensions panel.
@@ -56,7 +56,7 @@ index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05
"#overflowed-extensions-list"
);
-@@ -2660,37 +2660,41 @@ var gUnifiedExtensions = {
+@@ -2665,37 +2665,41 @@ var gUnifiedExtensions = {
);
template.replaceWith(template.content);
this._panel = document.getElementById("unified-extensions-panel");
@@ -123,7 +123,7 @@ index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05
if (!CustomizationHandler.isCustomizing()) {
if (aEvent) {
if (
-@@ -2712,6 +2716,7 @@ var gUnifiedExtensions = {
+@@ -2717,6 +2721,7 @@ var gUnifiedExtensions = {
// and no alternative content is available for display in the panel.
const policies = this.getActivePolicies();
if (
@@ -131,7 +131,7 @@ index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05
policies.length &&
!this.hasExtensionsInPanel(policies) &&
!this.isPrivateWindowMissingExtensionsWithoutPBMAccess() &&
-@@ -2727,32 +2732,30 @@ var gUnifiedExtensions = {
+@@ -2732,32 +2737,30 @@ var gUnifiedExtensions = {
this.blocklistAttentionInfo =
await AddonManager.getBlocklistAttentionInfo();
@@ -170,7 +170,7 @@ index 853d3c9dd9dd806d49a3c5a44304dd7370f0c90e..ea927b05213981fbfa5494d8d22bce05
triggerEvent: aEvent,
});
}
-@@ -2947,18 +2950,20 @@ var gUnifiedExtensions = {
+@@ -2952,18 +2955,20 @@ var gUnifiedExtensions = {
this._maybeMoveWidgetNodeBack(widgetId);
}
diff --git a/src/browser/base/content/browser-box-inc-xhtml.patch b/src/browser/base/content/browser-box-inc-xhtml.patch
index 6f5f7ee91..e807e8553 100644
--- a/src/browser/base/content/browser-box-inc-xhtml.patch
+++ b/src/browser/base/content/browser-box-inc-xhtml.patch
@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml
-index d58fcdf99843d110b708f3fbf9fb317787fadfcf..cfc2aad902641609c3804e615c4cb66ce65299b7 100644
+index 31cd4f927c273573b38021f84417101c57377902..f293e1c61d3b7a80b7dc472d927893f0439d6af9 100644
--- a/browser/base/content/browser-box.inc.xhtml
+++ b/browser/base/content/browser-box.inc.xhtml
@@ -3,12 +3,22 @@
@@ -10,7 +10,7 @@ index d58fcdf99843d110b708f3fbf9fb317787fadfcf..cfc2aad902641609c3804e615c4cb66c
+
+
+
-
+
@@ -22,7 +22,7 @@ index d58fcdf99843d110b708f3fbf9fb317787fadfcf..cfc2aad902641609c3804e615c4cb66c
+
+
+
-
diff --git a/src/browser/components/preferences/jar-mn.patch b/src/browser/components/preferences/jar-mn.patch
index 5afab00b9..da20fdc1f 100644
--- a/src/browser/components/preferences/jar-mn.patch
+++ b/src/browser/components/preferences/jar-mn.patch
@@ -1,10 +1,12 @@
diff --git a/browser/components/preferences/jar.mn b/browser/components/preferences/jar.mn
-index 78e38f98c1f69df31459fd4b6a119c93f6509c02..33abd46566146272da9f561e11ffa290d7000111 100644
+index aec7888f59eeb5dbffc62b861fe223159ac42586..a593f3015469c11c762ae01465964251a77ddb45 100644
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/jar.mn
-@@ -54,3 +54,5 @@ browser.jar:
- content/browser/preferences/widgets/sync-device-name.mjs (widgets/sync-device-name/sync-device-name.mjs)
- content/browser/preferences/widgets/sync-engines-list.mjs (widgets/sync-engine-list/sync-engines-list.mjs)
+@@ -69,5 +69,7 @@ browser.jar:
content/browser/preferences/widgets/sync-engines-list.css (widgets/sync-engine-list/sync-engines-list.css)
+ content/browser/preferences/widgets/update-information.mjs (widgets/update-information/update-information.mjs)
+ content/browser/preferences/widgets/update-information.css (widgets/update-information/update-information.css)
+
+ content/browser/preferences/zen-settings.js
+ content/browser/preferences/widgets/update-state.mjs (widgets/update-state/update-state.mjs)
+ content/browser/preferences/widgets/update-state.css (widgets/update-state/update-state.css)
diff --git a/src/browser/components/preferences/main-inc-xhtml.patch b/src/browser/components/preferences/main-inc-xhtml.patch
index d39e60b2c..18b787517 100644
--- a/src/browser/components/preferences/main-inc-xhtml.patch
+++ b/src/browser/components/preferences/main-inc-xhtml.patch
@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
-index 6b96ff01e43087f8c609df17204441616b7013f3..df85ec789c54146b3a702169f33adf36c11b85da 100644
+index f6badc31b612c9198c56bb06751e9bbc4a0dd54b..5f9eca1ad0795ac38c02449c91e9f61bf6661252 100644
--- a/browser/components/preferences/main.inc.xhtml
+++ b/browser/components/preferences/main.inc.xhtml
-@@ -96,6 +96,7 @@
+@@ -98,6 +98,7 @@
languages-customize-add.label,
" />
diff --git a/src/browser/components/preferences/main-js.patch b/src/browser/components/preferences/main-js.patch
index 0b7dde0dd..e5053ab79 100644
--- a/src/browser/components/preferences/main-js.patch
+++ b/src/browser/components/preferences/main-js.patch
@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
-index 6f4cb34d1639ac76a6d4ca40f0d33ae6fb6bf565..1f336a09d6f2e367effdf26e8baf58b5686d252d 100644
+index c86e54bb6f5e00d9d7bdd81154857a5be97f909c..4035f6a667a361ad106e816a172342724a770435 100644
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
-@@ -2537,6 +2537,11 @@ function createStartupConfig(hidden = false) {
+@@ -643,6 +643,11 @@ function createStartupConfig(hidden = false) {
id: "browserRestoreSession",
l10nId: "startup-restore-windows-and-tabs",
},
@@ -14,16 +14,16 @@ index 6f4cb34d1639ac76a6d4ca40f0d33ae6fb6bf565..1f336a09d6f2e367effdf26e8baf58b5
{
id: "windowsLaunchOnLogin",
l10nId: "windows-launch-on-login",
-@@ -2578,7 +2583,7 @@ function createStartupConfig(hidden = false) {
+@@ -690,7 +695,7 @@ function createStartupConfig(hidden = false) {
SettingGroupManager.registerGroups({
defaultBrowser: createDefaultBrowserConfig(),
startup: createStartupConfig(
-- Services.prefs.getBoolPref("browser.settings-redesign.enabled", false)
+- Services.prefs.getBoolPref("browser-settings-redesign.enabled", false)
+ false
),
- zoom: {
- l10nId: "preferences-zoom-header2",
-@@ -3393,7 +3398,7 @@ function getBundleForLocales(newLocales) {
+ });
+
+@@ -743,7 +748,7 @@ function getBundleForLocales(newLocales) {
])
);
return new Localization(
diff --git a/src/browser/components/preferences/preferences-js.patch b/src/browser/components/preferences/preferences-js.patch
index cc43e40ca..95f557a56 100644
--- a/src/browser/components/preferences/preferences-js.patch
+++ b/src/browser/components/preferences/preferences-js.patch
@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
-index 9d13733318e7a147adee1e44f96570c94f4948df..fb625d8da021dc0cebd7a14ca47446a0632e8e7a 100644
+index 57add34d876fb885275f1147209c6fbeee367a7c..be0ab43b299317c0022a5e719f47a070c1574714 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
-@@ -121,6 +121,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
+@@ -132,6 +132,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
styleSheets: [
"chrome://browser/skin/preferences/dialog.css",
"chrome://browser/skin/preferences/preferences.css",
@@ -10,7 +10,25 @@ index 9d13733318e7a147adee1e44f96570c94f4948df..fb625d8da021dc0cebd7a14ca47446a0
],
resizeCallback: async ({ title, frame }) => {
// Search within main document and highlight matched keyword.
-@@ -398,6 +399,10 @@ function init_all() {
+@@ -437,6 +438,8 @@ const CONFIG_PANES = Object.freeze({
+ tabsBrowsing: {
+ l10nId: "tabs-browsing-section",
+ groupIds: [
++ "defaultBrowserHome",
++ "startupHome",
+ "browserLayout",
+ "tabs",
+ "pageNavigation",
+@@ -477,7 +480,7 @@ function register_module(categoryName, categoryObject) {
+ }
+ this._initted = true;
+ let template = document.getElementById("template-" + categoryName);
+- if (template && !srdSectionPrefs.all) {
++ if (template && (!srdSectionPrefs.all || categoryName.startsWith("paneZen"))) {
+ // Replace the template element with the nodes inside of it.
+ template.replaceWith(template.content);
+
+@@ -522,6 +525,10 @@ function init_all() {
register_module("paneSearch", gSearchPane);
register_module("panePrivacy", gPrivacyPane);
register_module("paneContainers", gContainersPane);
@@ -19,5 +37,17 @@ index 9d13733318e7a147adee1e44f96570c94f4948df..fb625d8da021dc0cebd7a14ca47446a0
+ register_module("paneZenCKS", gZenCKSSettings);
+ register_module("paneZenMarketplace", gZenMarketplaceManager);
- if (ExperimentAPI.labsEnabled) {
- // Set hidden based on previous load's hidden value or if Nimbus is
+ // Restore the cached Firefox Labs nav button visibility so it shows
+ // immediately when recipes are expected to be available, before
+@@ -651,9 +658,9 @@ async function gotoPref(
+ let redesignEnabled = srdSectionPrefs.all;
+ let categories = document.getElementById("categories");
+ const kDefaultCategoryInternalName = redesignEnabled
+- ? "paneSync"
++ ? "paneTabsBrowsing"
+ : "paneGeneral";
+- const kDefaultCategory = redesignEnabled ? "sync" : "general";
++ const kDefaultCategory = redesignEnabled ? "tabsBrowsing" : "general";
+ let hash = document.location.hash;
+ let category = aCategory || hash.substring(1) || kDefaultCategoryInternalName;
+
diff --git a/src/browser/components/preferences/preferences-xhtml.patch b/src/browser/components/preferences/preferences-xhtml.patch
index f8d7c6b7e..dccd50ec5 100644
--- a/src/browser/components/preferences/preferences-xhtml.patch
+++ b/src/browser/components/preferences/preferences-xhtml.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
-index 3c4b3225c672bcb172e7f946bc5f98d424e21e84..d10824470c564b6631333f197de897c21ccc19f5 100644
+index 9760a4a35b0b3bd21edec07a70c10bccc23e4a09..9f22146c259ea5b45005be660bfcb9ea2c1297ee 100644
--- a/browser/components/preferences/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml
@@ -42,6 +42,8 @@
@@ -11,7 +11,7 @@ index 3c4b3225c672bcb172e7f946bc5f98d424e21e84..d10824470c564b6631333f197de897c2
-@@ -126,6 +128,26 @@
+@@ -121,6 +123,26 @@
iconsrc="chrome://browser/skin/preferences/category-general.svg"
data-l10n-id="pane-general-title">
@@ -35,12 +35,12 @@ index 3c4b3225c672bcb172e7f946bc5f98d424e21e84..d10824470c564b6631333f197de897c2
+ iconsrc="chrome://mozapps/skin/extensions/category-themes.svg"
+ data-l10n-id="pane-zen-marketplace-title">
+
- {
+ this._currentActionID = null;
const target = event.target;
target.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-editing`);
if (!this._hasSafed) {
@@ -1048,6 +1050,7 @@ var gZenCKSSettings = {
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-not-set`);
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-editing`);
this._latestValidKey = null;
+ this._currentActionID = null;
return;
} else if (shortcut == "Escape" && !modifiersActive) {
const { hasConflicts, conflictShortcut } = gZenKeyboardShortcutsManager.checkForConflicts(
diff --git a/src/browser/components/search/SearchOneOffs-sys-mjs.patch b/src/browser/components/search/SearchOneOffs-sys-mjs.patch
index ed2cd3169..5b62f950e 100644
--- a/src/browser/components/search/SearchOneOffs-sys-mjs.patch
+++ b/src/browser/components/search/SearchOneOffs-sys-mjs.patch
@@ -1,8 +1,8 @@
diff --git a/browser/components/search/SearchOneOffs.sys.mjs b/browser/components/search/SearchOneOffs.sys.mjs
-index 6317d8e22342bf50c82e5b526253d43406e74428..f233584b4a863309f71806cf7a3ee8e06f043429 100644
+index ca79f060e2104a56b42b9d813efb3567e183153e..7936263cc7d2796e1ec20dcfd1f14b2add568a64 100644
--- a/browser/components/search/SearchOneOffs.sys.mjs
+++ b/browser/components/search/SearchOneOffs.sys.mjs
-@@ -482,7 +482,7 @@ export class SearchOneOffs {
+@@ -481,7 +481,7 @@ export class SearchOneOffs {
// For the search-bar, always show the one-off buttons where there is an
// option to add an engine.
let addEngineNeeded = isSearchBar && addEngines.length;
diff --git a/src/browser/components/sessionstore/SessionStore-sys-mjs.patch b/src/browser/components/sessionstore/SessionStore-sys-mjs.patch
index cffcf3b1a..02f1ac127 100644
--- a/src/browser/components/sessionstore/SessionStore-sys-mjs.patch
+++ b/src/browser/components/sessionstore/SessionStore-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
-index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea30f7d70a 100644
+index 183543c5f29ff4c879d3058e4c09faf376a69cb7..ab482c32cc697ccef82bf0aeaa0e3a1db40aecce 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -129,6 +129,9 @@ const TAB_EVENTS = [
@@ -21,7 +21,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
});
ChromeUtils.defineLazyGetter(lazy, "blankURI", () => {
-@@ -1291,10 +1296,7 @@ var SessionStoreInternal = {
+@@ -1287,10 +1292,7 @@ var SessionStoreInternal = {
*/
get willAutoRestore() {
return (
@@ -33,7 +33,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
);
},
-@@ -1970,6 +1972,9 @@ var SessionStoreInternal = {
+@@ -1965,6 +1967,9 @@ var SessionStoreInternal = {
case "TabPinned":
case "TabUnpinned":
case "SwapDocShells":
@@ -43,7 +43,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
this.saveStateDelayed(win);
break;
case "TabGroupCreate":
-@@ -2083,6 +2088,10 @@ var SessionStoreInternal = {
+@@ -2074,6 +2079,10 @@ var SessionStoreInternal = {
this._windows[aWindow.__SSi].isTaskbarTab = true;
}
@@ -54,7 +54,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
if (lazy.AIWindow.isAIWindowActiveAndEnabled(aWindow)) {
this._windows[aWindow.__SSi].isAIWindow = true;
}
-@@ -2119,7 +2128,7 @@ var SessionStoreInternal = {
+@@ -2110,7 +2119,7 @@ var SessionStoreInternal = {
let isTaskbarTab = this._windows[aWindow.__SSi].isTaskbarTab;
// A regular window is not a private window, taskbar tab window, or popup window
let isRegularWindow =
@@ -63,7 +63,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// perform additional initialization when the first window is loading
if (lazy.RunState.isStopped) {
-@@ -2131,7 +2140,7 @@ var SessionStoreInternal = {
+@@ -2122,7 +2131,7 @@ var SessionStoreInternal = {
// to disk to NOW() to enforce a full interval before the next write.
lazy.SessionSaver.updateLastSaveTime();
@@ -72,7 +72,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
this._log.debug(
"initializeWindow, the window is private or a web app. Saving SessionStartup.state for possibly restoring later"
);
-@@ -2173,6 +2182,7 @@ var SessionStoreInternal = {
+@@ -2164,6 +2173,7 @@ var SessionStoreInternal = {
null,
"sessionstore-one-or-no-tab-restored"
);
@@ -80,7 +80,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
this._deferredAllWindowsRestored.resolve();
}
// this window was opened by _openWindowWithState
-@@ -2222,7 +2232,6 @@ var SessionStoreInternal = {
+@@ -2213,7 +2223,6 @@ var SessionStoreInternal = {
if (closedWindowState) {
let newWindowState;
if (
@@ -88,7 +88,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
!lazy.SessionStartup.willRestore()
) {
// We want to split the window up into pinned tabs and unpinned tabs.
-@@ -2258,6 +2267,7 @@ var SessionStoreInternal = {
+@@ -2249,6 +2258,7 @@ var SessionStoreInternal = {
}
if (newWindowState) {
@@ -96,7 +96,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// Ensure that the window state isn't hidden
this._restoreCount = 1;
let state = { windows: [newWindowState] };
-@@ -2286,6 +2296,15 @@ var SessionStoreInternal = {
+@@ -2277,6 +2287,15 @@ var SessionStoreInternal = {
});
this._shouldRestoreLastSession = false;
}
@@ -112,7 +112,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
if (this._restoreLastWindow && aWindow.toolbar.visible) {
// always reset (if not a popup window)
-@@ -2436,7 +2455,7 @@ var SessionStoreInternal = {
+@@ -2427,7 +2446,7 @@ var SessionStoreInternal = {
var tabbrowser = aWindow.gBrowser;
@@ -121,7 +121,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
TAB_EVENTS.forEach(function (aEvent) {
tabbrowser.tabContainer.removeEventListener(aEvent, this, true);
-@@ -2487,7 +2506,7 @@ var SessionStoreInternal = {
+@@ -2478,7 +2497,7 @@ var SessionStoreInternal = {
let isLastRegularWindow =
Object.values(this._windows).filter(
@@ -130,7 +130,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
).length == 1;
this._log.debug(
`onClose, closing window isLastRegularWindow? ${isLastRegularWindow}`
-@@ -2544,8 +2563,8 @@ var SessionStoreInternal = {
+@@ -2535,8 +2554,8 @@ var SessionStoreInternal = {
// 2) Flush the window.
// 3) When the flush is complete, revisit our decision to store the window
// in _closedWindows, and add/remove as necessary.
@@ -141,7 +141,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
}
completionPromise = lazy.TabStateFlusher.flushWindow(aWindow).then(() => {
-@@ -2565,8 +2584,9 @@ var SessionStoreInternal = {
+@@ -2556,8 +2575,9 @@ var SessionStoreInternal = {
// Save non-private windows if they have at
// least one saveable tab or are the last window.
@@ -153,7 +153,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
if (!isLastWindow && winData.closedId > -1) {
this._addClosedAction(
-@@ -2642,7 +2662,7 @@ var SessionStoreInternal = {
+@@ -2633,7 +2653,7 @@ var SessionStoreInternal = {
* to call this method again asynchronously (for example, after
* a window flush).
*/
@@ -162,7 +162,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// Make sure SessionStore is still running, and make sure that we
// haven't chosen to forget this window.
if (
-@@ -2659,6 +2679,7 @@ var SessionStoreInternal = {
+@@ -2650,6 +2670,7 @@ var SessionStoreInternal = {
// _closedWindows from a previous call to this function.
let winIndex = this._closedWindows.indexOf(winData);
let alreadyStored = winIndex != -1;
@@ -170,7 +170,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// If sidebar command is truthy, i.e. sidebar is open, store sidebar settings
let shouldStore = hasSaveableTabs || isLastWindow;
-@@ -3480,7 +3501,7 @@ var SessionStoreInternal = {
+@@ -3467,7 +3488,7 @@ var SessionStoreInternal = {
if (!isPrivateWindow && tabState.isPrivate) {
return;
}
@@ -179,7 +179,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
return;
}
-@@ -4220,6 +4241,12 @@ var SessionStoreInternal = {
+@@ -4206,6 +4227,12 @@ var SessionStoreInternal = {
Math.min(tabState.index, tabState.entries.length)
);
tabState.pinned = false;
@@ -192,7 +192,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
if (inBackground === false) {
aWindow.gBrowser.selectedTab = newTab;
-@@ -4656,6 +4683,8 @@ var SessionStoreInternal = {
+@@ -4642,6 +4669,8 @@ var SessionStoreInternal = {
// Append the tab if we're opening into a different window,
tabIndex: aSource == aTargetWindow ? pos : Infinity,
pinned: state.pinned,
@@ -201,7 +201,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
userContextId: state.userContextId,
skipLoad: true,
preferredRemoteType,
-@@ -5160,9 +5189,10 @@ var SessionStoreInternal = {
+@@ -5146,9 +5175,10 @@ var SessionStoreInternal = {
if (activePageData.title && activePageData.title != activePageData.url) {
win.gBrowser.setInitialTabTitle(tab, activePageData.title, {
isContentTitle: true,
@@ -213,7 +213,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
}
}
-@@ -5527,7 +5557,7 @@ var SessionStoreInternal = {
+@@ -5513,7 +5543,7 @@ var SessionStoreInternal = {
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
let tab = tabbrowser.tabs[i];
@@ -222,7 +222,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
removableTabs.push(tab);
}
}
-@@ -5640,7 +5670,7 @@ var SessionStoreInternal = {
+@@ -5626,7 +5656,7 @@ var SessionStoreInternal = {
// collect the data for all windows
for (ix in this._windows) {
@@ -231,7 +231,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// window data is still in _statesToRestore
continue;
}
-@@ -5784,11 +5814,12 @@ var SessionStoreInternal = {
+@@ -5770,11 +5800,12 @@ var SessionStoreInternal = {
}
let tabbrowser = aWindow.gBrowser;
@@ -245,7 +245,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// update the internal state data for this window
for (let tab of tabs) {
if (tab == aWindow.FirefoxViewHandler.tab) {
-@@ -5799,6 +5830,9 @@ var SessionStoreInternal = {
+@@ -5785,6 +5816,9 @@ var SessionStoreInternal = {
tabsData.push(tabData);
}
@@ -255,7 +255,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// update tab group state for this window
winData.groups = [];
for (let tabGroup of aWindow.gBrowser.tabGroups) {
-@@ -5815,7 +5849,7 @@ var SessionStoreInternal = {
+@@ -5801,7 +5835,7 @@ var SessionStoreInternal = {
// 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).
if (aWindow.FirefoxViewHandler.tab?.selected) {
@@ -264,7 +264,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
winData.title = tabbrowser.tabs[0].label;
}
winData.selected = selectedIndex;
-@@ -6017,8 +6051,8 @@ var SessionStoreInternal = {
+@@ -6003,8 +6037,8 @@ var SessionStoreInternal = {
// selectTab represents.
let selectTab = 0;
if (overwriteTabs) {
@@ -275,7 +275,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
selectTab = Math.min(selectTab, winData.tabs.length);
}
-@@ -6040,6 +6074,7 @@ var SessionStoreInternal = {
+@@ -6026,6 +6060,7 @@ var SessionStoreInternal = {
if (overwriteTabs) {
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
if (!tabbrowser.tabs[i].selected) {
@@ -283,7 +283,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
tabbrowser.removeTab(tabbrowser.tabs[i]);
}
}
-@@ -6074,6 +6109,12 @@ var SessionStoreInternal = {
+@@ -6060,6 +6095,12 @@ var SessionStoreInternal = {
savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id)
);
}
@@ -296,7 +296,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// Move the originally open tabs to the end.
if (initialTabs) {
-@@ -6640,6 +6681,25 @@ var SessionStoreInternal = {
+@@ -6626,6 +6667,25 @@ var SessionStoreInternal = {
// Most of tabData has been restored, now continue with restoring
// attributes that may trigger external events.
@@ -322,7 +322,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
if (tabData.pinned) {
tabbrowser.pinTab(tab);
-@@ -6807,6 +6867,9 @@ var SessionStoreInternal = {
+@@ -6793,6 +6853,9 @@ var SessionStoreInternal = {
aWindow.gURLBar.readOnly = false;
}
}
@@ -332,7 +332,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
let promiseParts = Promise.withResolvers();
aWindow.setTimeout(() => {
-@@ -7602,7 +7665,7 @@ var SessionStoreInternal = {
+@@ -7588,7 +7651,7 @@ var SessionStoreInternal = {
let groupsToSave = new Map();
for (let tIndex = 0; tIndex < window.tabs.length; ) {
@@ -341,7 +341,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// Adjust window.selected
if (tIndex + 1 < window.selected) {
window.selected -= 1;
-@@ -7617,7 +7680,7 @@ var SessionStoreInternal = {
+@@ -7603,7 +7666,7 @@ var SessionStoreInternal = {
);
// We don't want to increment tIndex here.
continue;
@@ -350,7 +350,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
// Convert any open groups into saved groups.
let groupStateToSave = window.groups.find(
groupState => groupState.id == window.tabs[tIndex].groupId
-@@ -8076,7 +8139,6 @@ var SessionStoreInternal = {
+@@ -8062,7 +8125,6 @@ var SessionStoreInternal = {
timer.initWithCallback(
function () {
if (beats <= 0) {
@@ -358,7 +358,7 @@ index 95f4960c3d8a2a4ca9bce24bcc54971877ee55ca..5bef8eeeb7cc26c930e3884e6eede6ea
Glean.sessionRestore.shutdownFlushAllOutcomes.timed_out.add(1);
deferred.resolve();
}
-@@ -8554,6 +8616,7 @@ var SessionStoreInternal = {
+@@ -8540,6 +8602,7 @@ var SessionStoreInternal = {
if (
!savedTabGroupState.tabs.length ||
this.getSavedTabGroup(savedTabGroupState.id)
diff --git a/src/browser/components/sessionstore/TabState-sys-mjs.patch b/src/browser/components/sessionstore/TabState-sys-mjs.patch
index a0916b716..ea08f3598 100644
--- a/src/browser/components/sessionstore/TabState-sys-mjs.patch
+++ b/src/browser/components/sessionstore/TabState-sys-mjs.patch
@@ -1,8 +1,8 @@
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
-index eb24c3ffdd2cfb33379aca993af5171fdb91ac2c..15d3fbff397df23f112355e22ca5dba5bf29528f 100644
+index 4ba4dda363b602cb6f4445ef056f2f9abb1b0e1e..6b4b407e05e26faca69d9d7ac6f31510620898fe 100644
--- a/browser/components/sessionstore/TabState.sys.mjs
+++ b/browser/components/sessionstore/TabState.sys.mjs
-@@ -99,7 +99,25 @@ class _TabState {
+@@ -99,10 +99,28 @@ class _TabState {
}
}
@@ -21,8 +21,11 @@ index eb24c3ffdd2cfb33379aca993af5171fdb91ac2c..15d3fbff397df23f112355e22ca5dba5
+ tabData._zenIsActiveTab = tab._zenContentsVisible;
+ tabData.zenLiveFolderItemId = tab.getAttribute("zen-live-folder-item-id");
+
- tabData.searchMode = tab.ownerGlobal.gURLBar.getSearchMode(browser, true);
-+ if (tabData.searchMode?.source === tab.ownerGlobal.UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS) {
+ tabData.searchMode = tab.documentGlobal.gURLBar.getSearchMode(
+ browser,
+ true
+ );
++ if (tabData.searchMode?.source === tab.documentGlobal.UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS) {
+ delete tabData.searchMode;
+ }
diff --git a/src/browser/components/sidebar/browser-sidebar-js.patch b/src/browser/components/sidebar/browser-sidebar-js.patch
index 15a387fdb..a2bfcec8a 100644
--- a/src/browser/components/sidebar/browser-sidebar-js.patch
+++ b/src/browser/components/sidebar/browser-sidebar-js.patch
@@ -1,8 +1,8 @@
diff --git a/browser/components/sidebar/browser-sidebar.js b/browser/components/sidebar/browser-sidebar.js
-index 2c13f19ec4f962ce3ecaface0ae5d00c50ca913f..eb696819a1af4cfae6352fc5696fd95590bed342 100644
+index ef7b67413392840720c8f09b6f22b0413ccf4435..ebbc15722ffb410050dd1923e8bb49d8cd5b6a9e 100644
--- a/browser/components/sidebar/browser-sidebar.js
+++ b/browser/components/sidebar/browser-sidebar.js
-@@ -834,7 +834,7 @@ var SidebarController = {
+@@ -850,7 +850,7 @@ var SidebarController = {
setPosition() {
// First reset all ordinals to match DOM ordering.
let contentArea = document.getElementById("tabbrowser-tabbox");
diff --git a/src/browser/components/tabbrowser/AsyncTabSwitcher-sys-mjs.patch b/src/browser/components/tabbrowser/AsyncTabSwitcher-sys-mjs.patch
index 74ffbfe55..c65a76f11 100644
--- a/src/browser/components/tabbrowser/AsyncTabSwitcher-sys-mjs.patch
+++ b/src/browser/components/tabbrowser/AsyncTabSwitcher-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
-index eebff0f59df42d3ef075f3eea1bd9269c47ba80d..6ab43a810f4cb61eedc02bb42026f6b5e282e785 100644
+index 577e27598597de27116153be1ad149facd721e41..eeca455aad8323ef24957af076f131cb70d66e7d 100644
--- a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
+++ b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
@@ -938,6 +938,7 @@ export class AsyncTabSwitcher {
diff --git a/src/browser/components/tabbrowser/TabsList-sys-mjs.patch b/src/browser/components/tabbrowser/TabsList-sys-mjs.patch
index 1815399e6..d86a33845 100644
--- a/src/browser/components/tabbrowser/TabsList-sys-mjs.patch
+++ b/src/browser/components/tabbrowser/TabsList-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/TabsList.sys.mjs b/browser/components/tabbrowser/TabsList.sys.mjs
-index 4de5139f404fab227874f626bda27e2a32cf87a0..7574e6db1606c72e8da3141d4a8deec727376af8 100644
+index 58f91dd9f80aa34ff8d8095cbaf5ae7a6c8dc1e1..c4c9ad5d93053f5fc726a0b10fa8d56c6bbc4003 100644
--- a/browser/components/tabbrowser/TabsList.sys.mjs
+++ b/browser/components/tabbrowser/TabsList.sys.mjs
@@ -87,7 +87,7 @@ class TabsListBase {
diff --git a/src/browser/components/tabbrowser/content/drag-and-drop-js.patch b/src/browser/components/tabbrowser/content/drag-and-drop-js.patch
index c928d9446..7e219803a 100644
--- a/src/browser/components/tabbrowser/content/drag-and-drop-js.patch
+++ b/src/browser/components/tabbrowser/content/drag-and-drop-js.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/drag-and-drop.js b/browser/components/tabbrowser/content/drag-and-drop.js
-index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c85280e74993 100644
+index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b15a030046 100644
--- a/browser/components/tabbrowser/content/drag-and-drop.js
+++ b/browser/components/tabbrowser/content/drag-and-drop.js
@@ -35,6 +35,9 @@
@@ -159,7 +159,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
if (
dt.mozUserCancelled ||
dt.dropEffect != "none" ||
-@@ -918,11 +938,10 @@
+@@ -927,11 +947,10 @@
return this.#getHorizontalScrollboxDragTarget(event, ignoreSides);
}
while (target) {
@@ -175,7 +175,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
break;
}
target = target.parentNode;
-@@ -952,6 +971,9 @@
+@@ -961,6 +980,9 @@
return null;
}
}
@@ -185,7 +185,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
return target;
}
-@@ -1011,7 +1033,8 @@
+@@ -1014,7 +1036,8 @@
isTabGroupLabel(draggedTab) &&
draggedTab._dragData?.expandGroupOnDrop
) {
@@ -195,7 +195,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
}
}
-@@ -1195,7 +1218,6 @@
+@@ -1206,7 +1229,6 @@
// using updateDragImage. On Linux, we can use a panel.
if (platform == "win" || platform == "macosx") {
captureListener = function () {
@@ -203,7 +203,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
};
} else {
// Create a panel to use it in setDragImage
-@@ -1233,7 +1255,6 @@
+@@ -1244,7 +1266,6 @@
);
dragImageOffset = dragImageOffset * scale;
}
@@ -211,7 +211,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
// _dragData.offsetX/Y give the coordinates that the mouse should be
// positioned relative to the corner of the new window created upon
-@@ -1252,7 +1273,7 @@
+@@ -1263,7 +1284,7 @@
let dropEffect = this.getDropEffectForTabDrag(event);
let isMovingInTabStrip = !fromTabList && dropEffect == "move";
let collapseTabGroupDuringDrag =
@@ -220,7 +220,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
tab._dragData = {
offsetX: this._tabbrowserTabs.verticalMode
-@@ -1262,7 +1283,7 @@
+@@ -1273,7 +1294,7 @@
? event.screenY - window.screenY - tabOffset
: event.screenY - window.screenY,
scrollPos:
@@ -229,7 +229,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
? this._tabbrowserTabs.pinnedTabsContainer.scrollPosition
: this._tabbrowserTabs.arrowScrollbox.scrollPosition,
screenX: event.screenX,
-@@ -1309,6 +1330,7 @@
+@@ -1320,6 +1341,7 @@
if (tabStripItemElement.hasAttribute("dragtarget")) {
return;
}
@@ -237,7 +237,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
let isPinned = tab.pinned;
let dragAndDropElements = this._tabbrowserTabs.dragAndDropElements;
let isGrid = this._tabbrowserTabs.isContainerVerticalPinnedGrid(tab);
-@@ -1675,23 +1697,6 @@
+@@ -1686,23 +1708,6 @@
// Slide the relevant tabs to their new position.
// non-moving tabs adjust for RTL
@@ -261,7 +261,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
// moving tabs don't adjust for RTL
for (let item of selectedElements) {
if (
-@@ -1740,7 +1745,6 @@
+@@ -1751,7 +1756,6 @@
for (let item of this._tabbrowserTabs.dragAndDropElements) {
delete item._moveTogetherSelectedTabsData;
item = elementToMove(item);
@@ -269,7 +269,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
item.removeAttribute("multiselected-move-together");
}
}
-@@ -2587,7 +2591,6 @@
+@@ -2598,7 +2602,6 @@
tab.style.top = "";
tab.style.maxWidth = "";
tab.style.pointerEvents = "";
@@ -277,7 +277,7 @@ index ea4f83fad1757f073ea1bbe5c93a4ebe5ecc0abe..904e604e28c96757fabf0dd3a749c852
tab.removeAttribute("small-stack");
tab.removeAttribute("big-stack");
}
-@@ -2596,11 +2599,9 @@
+@@ -2607,11 +2610,9 @@
)) {
label.style.width = "";
label.style.maxWidth = "";
diff --git a/src/browser/components/tabbrowser/content/tab-js.patch b/src/browser/components/tabbrowser/content/tab-js.patch
index c759abcab..a1aad36c5 100644
--- a/src/browser/components/tabbrowser/content/tab-js.patch
+++ b/src/browser/components/tabbrowser/content/tab-js.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
-index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d645641cd 100644
+index 8f2ebf3a0bd4e2af01cf41024b16bd491e8ed961..27721e26c3cd8cb066b462dedfa4ce785ca5c2c3 100644
--- a/browser/components/tabbrowser/content/tab.js
+++ b/browser/components/tabbrowser/content/tab.js
@@ -21,6 +21,7 @@
@@ -10,10 +10,10 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
-@@ -38,9 +39,11 @@
-
-
-
+@@ -35,9 +36,11 @@
+ pack="center"
+ flex="1">
+
+
@@ -22,7 +22,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
`;
-@@ -87,7 +90,7 @@
+@@ -84,7 +87,7 @@
".tab-content":
"pinned,selected=visuallyselected,multiselected,titlechanged,attention",
".tab-icon-stack":
@@ -31,7 +31,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
".tab-throbber":
"fadein,pinned,busy,progress,selected=visuallyselected",
".tab-icon-pending":
-@@ -96,9 +99,9 @@
+@@ -93,9 +96,9 @@
"src=image,requestcontextid,fadein,pinned,selected=visuallyselected,busy,crashed,sharing,pictureinpicture,pending,discarded",
".tab-sharing-icon-overlay": "sharing,selected=visuallyselected,pinned",
".tab-icon-overlay":
@@ -43,7 +43,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
".tab-label-container":
"pinned,selected=visuallyselected,labeldirection",
".tab-label":
-@@ -189,7 +192,7 @@
+@@ -184,7 +187,7 @@
}
set _visuallySelected(val) {
@@ -52,7 +52,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
return;
}
-@@ -225,11 +228,25 @@
+@@ -220,11 +223,25 @@
}
get visible() {
@@ -83,7 +83,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}
get hidden() {
-@@ -308,7 +325,7 @@
+@@ -303,7 +320,7 @@
return false;
}
@@ -92,7 +92,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}
get lastAccessed() {
-@@ -393,7 +410,18 @@
+@@ -388,7 +405,18 @@
}
get group() {
@@ -112,7 +112,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}
get splitview() {
-@@ -475,6 +503,10 @@
+@@ -470,6 +498,10 @@
}
}
@@ -123,7 +123,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
// If the previous target wasn't part of this tab then this is a mouseenter event.
if (!this.contains(event.relatedTarget)) {
this._mouseenter();
-@@ -504,6 +536,7 @@
+@@ -499,6 +531,7 @@
if (!this.contains(event.relatedTarget)) {
this._mouseleave();
}
@@ -131,7 +131,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}
on_dragstart(event) {
-@@ -538,6 +571,8 @@
+@@ -533,6 +566,8 @@
this.style.MozUserFocus = "ignore";
} else if (
event.target.classList.contains("tab-close-button") ||
@@ -140,7 +140,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
event.target.classList.contains("tab-icon-overlay") ||
event.target.classList.contains("tab-audio-button")
) {
-@@ -572,7 +607,7 @@
+@@ -567,7 +602,7 @@
}
} else if (
event.altKey &&
@@ -149,7 +149,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
) {
eventMaySelectTab = false;
} else if (!this.selected && this.multiselected) {
-@@ -597,6 +632,10 @@
+@@ -592,6 +627,10 @@
this.style.MozUserFocus = "";
}
@@ -160,7 +160,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
on_click(event) {
if (event.button != 0) {
return;
-@@ -620,14 +659,31 @@
+@@ -615,14 +654,31 @@
trigger: "alt_click",
});
}
@@ -193,7 +193,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
gBrowser.multiSelectedTabsCount > 0 &&
!event.target.classList.contains("tab-close-button") &&
!event.target.classList.contains("tab-icon-overlay") &&
-@@ -639,8 +695,9 @@
+@@ -634,8 +690,9 @@
}
if (
@@ -205,7 +205,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
) {
if (this.activeMediaBlocked) {
if (this.multiselected) {
-@@ -658,7 +715,7 @@
+@@ -653,7 +710,7 @@
return;
}
@@ -214,7 +214,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
if (this.multiselected) {
gBrowser.removeMultiSelectedTabs(
lazy.TabMetrics.userTriggeredContext(
-@@ -678,6 +735,14 @@
+@@ -673,6 +730,14 @@
// (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true;
}
@@ -229,7 +229,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}
on_dblclick(event) {
-@@ -701,6 +766,8 @@
+@@ -696,6 +761,8 @@
animate: true,
triggeringEvent: event,
});
diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch
index e2458ba13..3fb2d5bd7 100644
--- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch
+++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch
@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
-index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88f4eec282 100644
+index 08b5b56e069d038d72c87355920c4ce8a55ed805..555ffd4772d9d4903491fdff9f3682852f8a52bd 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
-@@ -502,6 +502,7 @@
+@@ -511,6 +511,7 @@
* @type {MozBrowser[]}
*/
get splitViewBrowsers() {
@@ -10,7 +10,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
const browsers = [];
if (this.#activeSplitView) {
for (const tab of this.#activeSplitView.tabs) {
-@@ -575,15 +576,66 @@
+@@ -584,15 +585,66 @@
return this.tabContainer.visibleTabs;
}
@@ -79,7 +79,17 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
set selectedTab(val) {
if (
gSharedTabWarning.willShowSharedTabWarning(val) ||
-@@ -659,6 +711,10 @@
+@@ -601,6 +653,9 @@
+ ) {
+ return;
+ }
++ if (gZenWorkspaces.onBeforeTabSelect(val)) {
++ return;
++ }
+ // Update the tab
+ this.tabbox.selectedTab = val;
+ }
+@@ -668,6 +723,10 @@
userContextId = parseInt(tabArgument.getAttribute("usercontextid"), 10);
}
@@ -90,7 +100,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (tabArgument && tabArgument.linkedBrowser) {
remoteType = tabArgument.linkedBrowser.remoteType;
initialBrowsingContextGroupId =
-@@ -751,6 +807,8 @@
+@@ -760,6 +819,8 @@
this.tabpanels.appendChild(panel);
let tab = this.tabs[0];
@@ -99,7 +109,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
tab.linkedPanel = uniqueId;
this._selectedTab = tab;
this._selectedBrowser = browser;
-@@ -1121,13 +1179,18 @@
+@@ -1131,13 +1192,18 @@
}
this.showTab(aTab);
@@ -119,7 +129,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
aTab.setAttribute("pinned", "true");
this._updateTabBarForPinnedTabs();
-@@ -1140,11 +1203,19 @@
+@@ -1150,11 +1216,19 @@
}
this.#handleTabMove(aTab, () => {
@@ -140,7 +150,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
});
aTab.style.marginInlineStart = "";
-@@ -1321,6 +1392,9 @@
+@@ -1369,6 +1443,9 @@
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
@@ -150,7 +160,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (
aIconURL &&
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
-@@ -1330,6 +1404,9 @@
+@@ -1378,6 +1455,9 @@
);
return;
}
@@ -160,7 +170,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
let browser = this.getBrowserForTab(aTab);
browser.mIconURL = aIconURL;
-@@ -1652,7 +1729,6 @@
+@@ -1700,7 +1780,6 @@
// Preview mode should not reset the owner
if (!this._previewMode && !oldTab.selected) {
@@ -168,15 +178,15 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
let lastRelatedTab = this._lastRelatedTabMap.get(oldTab);
-@@ -1743,6 +1819,7 @@
+@@ -1791,6 +1870,7 @@
if (!this._previewMode) {
newTab.recordTimeFromUnloadToReload();
newTab.updateLastAccessed();
+ newTab.removeAttribute("unread");
oldTab.updateLastAccessed();
// if this is the foreground window, update the last-seen timestamps.
- if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
-@@ -1957,6 +2034,9 @@
+ if (this.documentGlobal == BrowserWindowTracker.getTopWindow()) {
+@@ -2005,6 +2085,9 @@
}
let activeEl = document.activeElement;
@@ -186,7 +196,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// If focus is on the old tab, move it to the new tab.
if (activeEl == oldTab) {
newTab.focus();
-@@ -1995,7 +2075,7 @@
+@@ -2043,7 +2126,7 @@
// Focus the location bar if it was previously focused for that tab.
// In full screen mode, only bother making the location bar visible
// if the tab is a blank one.
@@ -195,7 +205,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
let selectURL = () => {
if (this._asyncTabSwitching) {
// Set _awaitingSetURI flag to suppress popup notification
-@@ -2283,7 +2363,12 @@
+@@ -2331,7 +2414,12 @@
return this._setTabLabel(aTab, aLabel);
}
@@ -209,7 +219,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (!aLabel || (isURL && /^about:reader\?url=/.test(aLabel))) {
return false;
}
-@@ -2408,7 +2493,7 @@
+@@ -2457,7 +2545,7 @@
newIndex = this.selectedTab._tPos + 1;
}
@@ -218,7 +228,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (this.isTabGroupLabel(targetTab)) {
throw new Error(
"Replacing a tab group label with a tab is not supported"
-@@ -2685,6 +2770,7 @@
+@@ -2737,6 +2825,7 @@
uriIsAboutBlank,
userContextId,
skipLoad,
@@ -226,7 +236,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
} = {}) {
let b = document.createXULElement("browser");
// Use the JSM global to create the permanentKey, so that if the
-@@ -2758,8 +2844,7 @@
+@@ -2810,8 +2899,7 @@
// we use a different attribute name for this?
b.setAttribute("name", name);
}
@@ -236,7 +246,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
b.setAttribute("transparent", "true");
}
-@@ -2929,7 +3014,7 @@
+@@ -2981,7 +3069,7 @@
let panel = this.getPanel(browser);
let uniqueId = this._generateUniquePanelID();
@@ -245,7 +255,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
aTab.linkedPanel = uniqueId;
// Inject the into the DOM if necessary.
-@@ -2989,8 +3074,8 @@
+@@ -3041,8 +3129,8 @@
// If we transitioned from one browser to two browsers, we need to set
// hasSiblings=false on both the existing browser and the new browser.
if (this.tabs.length == 2) {
@@ -256,7 +266,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
} else {
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
}
-@@ -3175,7 +3260,6 @@
+@@ -3227,7 +3315,6 @@
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
tabIndex: tab._tPos + 1,
userContextId: tab.userContextId,
@@ -264,24 +274,33 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
focusUrlBar: true,
});
resolve(this.selectedBrowser);
-@@ -3285,6 +3369,9 @@
+@@ -3337,6 +3424,10 @@
schemelessInput,
hasValidUserGestureActivation = false,
textDirectiveUserActivation = false,
+ _forZenEmptyTab,
+ essential,
+ zenWorkspaceId,
++ skipRoute = false,
} = {}
) {
// all callers of addTab that pass a params object need to pass
-@@ -3295,10 +3382,17 @@
+@@ -3347,10 +3438,25 @@
);
}
++ const beforeRouteResult = window.gZenSpaceRoutingManager.onBeforeAddTab(uriString, { skipRoute, pinned, tabGroup, fromExternal }, window);
++ if (beforeRouteResult.shouldEarlyExit) {
++ return null;
++ }
++
+ let hasZenDefaultUserContextId = false;
+ let zenForcedWorkspaceId = undefined;
-+ if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
-+ [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal);
++ if (beforeRouteResult.isRouteFound && typeof userContextId !== "undefined") {
++ userContextId = beforeRouteResult.userContextId;
++ hasZenDefaultUserContextId = true;
++ } else if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
++ [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal, triggeringPrincipal);
+ }
+
if (!UserInteraction.running("browser.tabs.opening", window)) {
@@ -292,7 +311,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// If we're opening a foreground tab, set the owner by default.
ownerTab ??= inBackground ? null : this.selectedTab;
-@@ -3306,6 +3400,7 @@
+@@ -3358,6 +3464,7 @@
if (this.selectedTab.owner) {
this.selectedTab.owner = null;
}
@@ -300,7 +319,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// Find the tab that opened this one, if any. This is used for
// determining positioning, and inherited attributes such as the
-@@ -3358,6 +3453,22 @@
+@@ -3410,6 +3517,22 @@
noInitialLabel,
skipBackgroundNotify,
});
@@ -323,7 +342,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (insertTab) {
// Insert the tab into the tab container in the correct position.
this.#insertTabAtIndex(t, {
-@@ -3366,6 +3477,7 @@
+@@ -3418,6 +3541,7 @@
ownerTab,
openerTab,
pinned,
@@ -331,7 +350,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
bulkOrderedOpen,
tabGroup: tabGroup ?? openerTab?.group,
});
-@@ -3384,6 +3496,7 @@
+@@ -3436,6 +3560,7 @@
openWindowInfo,
skipLoad,
triggeringRemoteType,
@@ -339,7 +358,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}));
if (focusUrlBar) {
-@@ -3508,6 +3621,12 @@
+@@ -3560,6 +3685,12 @@
}
}
@@ -347,12 +366,28 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
+ gZenVerticalTabsManager.animateItemOpen(t);
+ }
+ if (typeof window.gZenCompactModeManager !== "undefined" && !skipLoad && insertTab) {
-+ gZenCompactModeManager._onTabOpen(t, inBackground);
++ gZenCompactModeManager._onTabOpen(t, inBackground, beforeRouteResult);
+ }
// Additionally send pinned tab events
if (pinned) {
this.#notifyPinnedStatus(t);
-@@ -3750,6 +3869,7 @@
+@@ -3570,6 +3701,15 @@
+ if (!inBackground) {
+ this.selectedTab = t;
+ }
++
++ window.gZenSpaceRoutingManager.onAfterAddTab(
++ uriString,
++ t,
++ { skipRoute: skipRoute || _forZenEmptyTab, fromExternal, pinned, tabGroup, inBackground },
++ window,
++ beforeRouteResult,
++ );
++
+ return t;
+ }
+
+@@ -3802,6 +3942,7 @@
isAdoptingGroup = false,
isUserTriggered = false,
telemetryUserCreateSource = "unknown",
@@ -360,7 +395,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
} = {}
) {
if (
-@@ -3760,9 +3880,6 @@
+@@ -3812,9 +3953,6 @@
!this.isSplitViewWrapper(tabOrSplitView)
)
) {
@@ -370,7 +405,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
if (!color) {
-@@ -3783,9 +3900,14 @@
+@@ -3835,9 +3973,14 @@
label,
isAdoptingGroup
);
@@ -387,7 +422,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
);
group.addTabs(tabsAndSplitViews);
-@@ -3906,7 +4028,7 @@
+@@ -3958,7 +4101,7 @@
}
this.#handleTabMove(tab, () =>
@@ -396,7 +431,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
);
}
-@@ -3990,6 +4112,7 @@
+@@ -4044,6 +4187,7 @@
color: group.color,
insertBefore: newTabs[0],
isAdoptingGroup: true,
@@ -404,7 +439,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
});
}
-@@ -4200,6 +4323,7 @@
+@@ -4254,6 +4398,7 @@
openWindowInfo,
skipLoad,
triggeringRemoteType,
@@ -412,7 +447,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
) {
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
-@@ -4269,6 +4393,7 @@
+@@ -4323,6 +4468,7 @@
openWindowInfo,
name,
skipLoad,
@@ -420,7 +455,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
});
}
-@@ -4482,9 +4607,9 @@
+@@ -4536,9 +4682,9 @@
}
// Add a new tab if needed.
@@ -432,7 +467,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
let url = "about:blank";
if (tabData.entries?.length) {
-@@ -4521,8 +4646,10 @@
+@@ -4575,8 +4721,10 @@
insertTab: false,
skipLoad: true,
preferredRemoteType,
@@ -444,7 +479,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (select) {
tabToSelect = tab;
}
-@@ -4544,7 +4671,8 @@
+@@ -4598,7 +4746,8 @@
this.pinTab(tab);
// Then ensure all the tab open/pinning information is sent.
this._fireTabOpen(tab, {});
@@ -454,7 +489,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
let { groupId } = tabData;
const tabGroup = tabGroupWorkingData.get(groupId);
// if a tab refers to a tab group we don't know, skip any group
-@@ -4564,7 +4692,10 @@
+@@ -4618,7 +4767,10 @@
tabGroup.stateData.id,
tabGroup.stateData.color,
tabGroup.stateData.collapsed,
@@ -466,7 +501,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
);
tabsFragment.appendChild(tabGroup.node);
}
-@@ -4619,9 +4750,21 @@
+@@ -4673,9 +4825,21 @@
// to remove the old selected tab.
if (tabToSelect) {
let leftoverTab = this.selectedTab;
@@ -488,7 +523,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (tabs.length > 1 || !tabs[0].selected) {
this._updateTabsAfterInsert();
-@@ -4812,11 +4955,14 @@
+@@ -4866,11 +5030,14 @@
if (ownerTab) {
tab.owner = ownerTab;
}
@@ -504,7 +539,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (
!bulkOrderedOpen &&
((openerTab &&
-@@ -4828,7 +4974,7 @@
+@@ -4882,7 +5049,7 @@
let lastRelatedTab =
openerTab && this._lastRelatedTabMap.get(openerTab);
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
@@ -513,7 +548,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
tabGroup = previousTab.group;
}
if (
-@@ -4844,7 +4990,7 @@
+@@ -4898,7 +5065,7 @@
previousTab.splitview
) + 1;
} else if (previousTab.visible) {
@@ -522,7 +557,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
} else if (previousTab == FirefoxViewHandler.tab) {
elementIndex = 0;
}
-@@ -4872,14 +5018,14 @@
+@@ -4926,14 +5093,14 @@
}
// Ensure index is within bounds.
if (tab.pinned) {
@@ -541,7 +576,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (pinned && !itemAfter?.pinned) {
itemAfter = null;
-@@ -4896,7 +5042,7 @@
+@@ -4950,7 +5117,7 @@
this.tabContainer._invalidateCachedTabs();
@@ -550,7 +585,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (
(this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
this.isSplitViewWrapper(itemAfter)
-@@ -4927,7 +5073,11 @@
+@@ -4981,7 +5148,11 @@
const tabContainer = pinned
? this.tabContainer.pinnedTabsContainer
: this.tabContainer;
@@ -562,7 +597,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
if (tab.group?.collapsed) {
-@@ -4942,6 +5092,7 @@
+@@ -4996,6 +5167,7 @@
if (pinned) {
this._updateTabBarForPinnedTabs();
}
@@ -570,7 +605,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
TabBarVisibility.update();
}
-@@ -5490,6 +5641,7 @@
+@@ -5544,6 +5716,7 @@
telemetrySource,
} = {}
) {
@@ -578,7 +613,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
// can be considered equivalent to closing the window.
if (
-@@ -5579,6 +5731,7 @@
+@@ -5633,6 +5806,7 @@
if (lastToClose) {
this.removeTab(lastToClose, aParams);
}
@@ -586,7 +621,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
} catch (e) {
console.error(e);
}
-@@ -5624,6 +5777,14 @@
+@@ -5678,6 +5852,14 @@
return;
}
@@ -601,7 +636,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
let isVisibleTab = aTab.visible;
// We have to sample the tab width now, since _beginRemoveTab might
// end up modifying the DOM in such a way that aTab gets a new
-@@ -5631,6 +5792,9 @@
+@@ -5685,6 +5867,9 @@
// state).
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
let isLastTab = this.#isLastTabInWindow(aTab);
@@ -611,7 +646,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (
!this._beginRemoveTab(aTab, {
closeWindowFastpath: true,
-@@ -5642,13 +5806,14 @@
+@@ -5696,13 +5881,14 @@
telemetrySource,
})
) {
@@ -627,7 +662,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
let lockTabSizing =
!this.tabContainer.verticalMode &&
!aTab.pinned &&
-@@ -5679,7 +5844,13 @@
+@@ -5733,7 +5919,13 @@
// We're not animating, so we can cancel the animation stopwatch.
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
aTab._closeTimeAnimTimerId = null;
@@ -642,7 +677,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
return;
}
-@@ -5813,7 +5984,7 @@
+@@ -5867,7 +6059,7 @@
closeWindowWithLastTab != null
? closeWindowWithLastTab
: !window.toolbar.visible ||
@@ -651,7 +686,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (closeWindow) {
// We've already called beforeunload on all the relevant tabs if we get here,
-@@ -5837,6 +6008,7 @@
+@@ -5891,6 +6083,7 @@
newTab = true;
}
@@ -659,7 +694,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
aTab._endRemoveArgs = [closeWindow, newTab];
// swapBrowsersAndCloseOther will take care of closing the window without animation.
-@@ -5877,13 +6049,7 @@
+@@ -5931,13 +6124,7 @@
aTab._mouseleave();
if (newTab) {
@@ -674,7 +709,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
} else {
TabBarVisibility.update();
}
-@@ -6016,6 +6182,7 @@
+@@ -6070,6 +6257,7 @@
this.tabs[i]._tPos = i;
}
@@ -682,7 +717,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (!this._windowIsClosing) {
// update tab close buttons state
this.tabContainer._updateCloseButtons();
-@@ -6201,6 +6368,7 @@
+@@ -6255,6 +6443,7 @@
memory_after: await getTotalMemoryUsage(),
time_to_unload_in_ms: timeElapsed,
});
@@ -690,7 +725,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
/**
-@@ -6246,6 +6414,7 @@
+@@ -6300,6 +6489,7 @@
}
let excludeTabs = new Set(aExcludeTabs);
@@ -698,7 +733,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// If this tab has a successor, it should be selectable, since
// hiding or closing a tab removes that tab as a successor.
-@@ -6258,15 +6427,22 @@
+@@ -6312,15 +6502,22 @@
!excludeTabs.has(aTab.owner) &&
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
) {
@@ -723,7 +758,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
let tab = this.tabContainer.findNextTab(aTab, {
direction: 1,
filter: _tab => remainingTabs.includes(_tab),
-@@ -6280,7 +6456,7 @@
+@@ -6334,7 +6531,7 @@
}
if (tab) {
@@ -732,7 +767,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
// If no qualifying visible tab was found, see if there is a tab in
-@@ -6301,7 +6477,7 @@
+@@ -6355,7 +6552,7 @@
});
}
@@ -741,7 +776,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
_blurTab(aTab) {
-@@ -6312,7 +6488,7 @@
+@@ -6366,7 +6563,7 @@
* @returns {boolean}
* False if swapping isn't permitted, true otherwise.
*/
@@ -750,7 +785,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// Do not allow transfering a private tab to a non-private window
// and vice versa.
if (
-@@ -6366,6 +6542,7 @@
+@@ -6420,6 +6617,7 @@
// fire the beforeunload event in the process. Close the other
// window if this was its last tab.
if (
@@ -758,22 +793,22 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
!remoteBrowser._beginRemoveTab(aOtherTab, {
adoptedByTab: aOurTab,
closeWindowWithLastTab: true,
-@@ -6377,7 +6554,7 @@
+@@ -6431,7 +6629,7 @@
// If this is the last tab of the window, hide the window
// immediately without animation before the docshell swap, to avoid
// about:blank being painted.
- let [closeWindow] = aOtherTab._endRemoveArgs;
+ let [closeWindow] = !zenCloseOther ? [false] : aOtherTab._endRemoveArgs;
if (closeWindow) {
- let win = aOtherTab.ownerGlobal;
+ let win = aOtherTab.documentGlobal;
win.windowUtils.suppressAnimation(true);
-@@ -6511,11 +6688,13 @@
+@@ -6565,11 +6763,13 @@
}
// Finish tearing down the tab that's going away.
+ if (zenCloseOther) {
if (closeWindow) {
- aOtherTab.ownerGlobal.close();
+ aOtherTab.documentGlobal.close();
} else {
remoteBrowser._endRemoveTab(aOtherTab);
}
@@ -781,7 +816,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
this.setTabTitle(aOurTab);
-@@ -6717,10 +6896,10 @@
+@@ -6771,10 +6971,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
}
@@ -794,7 +829,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
aTab.selected ||
aTab.closing ||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
-@@ -6780,7 +6959,8 @@
+@@ -6834,7 +7034,8 @@
* @param {object} [aOptions={}]
* Key-value pairs that will be serialized into the features string.
*/
@@ -804,7 +839,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (this.tabs.length == 1) {
return null;
}
-@@ -6797,7 +6977,7 @@
+@@ -6851,7 +7052,7 @@
// tell a new window to take the "dropped" tab
let args = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
args.appendElement(aTab.splitview ?? aTab);
@@ -813,7 +848,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
private: PrivateBrowsingUtils.isWindowPrivate(window),
features: Object.entries(aOptions)
.map(([key, value]) => `${key}=${value}`)
-@@ -6805,6 +6985,8 @@
+@@ -6859,6 +7060,8 @@
openerWindow: window,
args,
});
@@ -822,7 +857,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
/**
-@@ -6917,7 +7099,7 @@
+@@ -6971,7 +7174,7 @@
* `true` if element is a ``
*/
isTabGroup(element) {
@@ -831,7 +866,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
/**
-@@ -7002,8 +7184,8 @@
+@@ -7056,8 +7259,8 @@
}
// Don't allow mixing pinned and unpinned tabs.
@@ -842,7 +877,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
} else {
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
}
-@@ -7049,8 +7231,8 @@
+@@ -7103,8 +7306,8 @@
this.#handleTabMove(
element,
() => {
@@ -853,7 +888,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
neighbor = neighbor.group;
}
if (neighbor?.splitview) {
-@@ -7061,6 +7243,12 @@
+@@ -7115,6 +7318,12 @@
return;
}
}
@@ -866,7 +901,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
if (movingForwards && neighbor) {
neighbor.after(element);
-@@ -7119,23 +7307,31 @@
+@@ -7173,23 +7382,31 @@
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
if (this.isTabGroupLabel(targetElement)) {
targetElement = targetElement.group;
@@ -904,7 +939,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
} else if (!element.pinned && targetElement && targetElement.pinned) {
// If the caller asks to move an unpinned element next to a pinned
// tab, move the unpinned element to be the first unpinned element
-@@ -7148,12 +7344,35 @@
+@@ -7202,12 +7419,35 @@
// move the tab group right before the first unpinned tab.
// 4. Moving a tab group and the first unpinned tab is grouped:
// move the tab group right before the first unpinned tab's tab group.
@@ -941,7 +976,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// We want to include the splitview wrapper if it's the targetElement, but
// not in the case where we want to reverse tabs within the same splitview.
-@@ -7162,6 +7381,7 @@
+@@ -7216,6 +7456,7 @@
}
let getContainer = () =>
@@ -949,7 +984,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
element.pinned
? this.tabContainer.pinnedTabsContainer
: this.tabContainer;
-@@ -7170,11 +7390,15 @@
+@@ -7224,11 +7465,15 @@
element,
() => {
if (moveBefore) {
@@ -966,7 +1001,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
},
metricsContext
-@@ -7248,11 +7472,15 @@
+@@ -7302,11 +7547,15 @@
* @param {TabMetricsContext} [metricsContext]
*/
moveTabToExistingGroup(aTab, aGroup, metricsContext) {
@@ -985,7 +1020,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
if (aTab.group && aTab.group.id === aGroup.id) {
return;
-@@ -7324,6 +7552,7 @@
+@@ -7378,6 +7627,7 @@
let state = {
tabIndex: tab._tPos,
@@ -993,7 +1028,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
};
if (tab.visible) {
state.elementIndex = tab.elementIndex;
-@@ -7355,7 +7584,7 @@
+@@ -7409,7 +7659,7 @@
let changedSplitView =
previousTabState.splitViewId != currentTabState.splitViewId;
@@ -1002,7 +1037,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
tab.dispatchEvent(
new CustomEvent("TabMove", {
bubbles: true,
-@@ -7402,6 +7631,10 @@
+@@ -7456,6 +7706,10 @@
moveActionCallback();
@@ -1013,13 +1048,13 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// Clear tabs cache after moving nodes because the order of tabs may have
// changed.
this.tabContainer._invalidateCachedTabs();
-@@ -7452,7 +7685,22 @@
+@@ -7506,7 +7760,22 @@
* @returns {object}
* The new tab in the current window, null if the tab couldn't be adopted.
*/
- adoptTab(aTab, { elementIndex, tabIndex, selectTab = false } = {}) {
+ adoptTab(aTab, { elementIndex, tabIndex, selectTab = false, spaceId = null } = {}) {
-+ if (window.gZenWorkspaces.currentWindowIsSyncing && aTab.ownerGlobal.gZenWorkspaces?.currentWindowIsSyncing) {
++ if (window.gZenWorkspaces.currentWindowIsSyncing && aTab.documentGlobal.gZenWorkspaces?.currentWindowIsSyncing) {
+ const tabId = aTab.id;
+ const thisTab = window.gZenWindowSync.getItemFromWindow(window, tabId);
+ if (thisTab) {
@@ -1037,7 +1072,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
// Swap the dropped tab with a new one we create and then close
// it in the other window (making it seem to have moved between
// windows). We also ensure that the tab we create to swap into has
-@@ -7495,6 +7743,8 @@
+@@ -7549,6 +7818,8 @@
}
params.skipLoad = true;
let newTab = this.addWebTab("about:blank", params);
@@ -1046,7 +1081,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
aTab.container.tabDragAndDrop.finishAnimateTabMove();
-@@ -8205,7 +8455,7 @@
+@@ -8259,7 +8530,7 @@
// preventDefault(). It will still raise the window if appropriate.
return;
}
@@ -1055,7 +1090,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
window.focus();
aEvent.preventDefault();
}
-@@ -8222,7 +8472,6 @@
+@@ -8276,7 +8547,6 @@
on_TabGroupCollapse(aEvent) {
aEvent.target.tabs.forEach(tab => {
@@ -1063,7 +1098,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
});
}
-@@ -8556,7 +8805,9 @@
+@@ -8630,7 +8900,9 @@
let filter = this._tabFilters.get(tab);
if (filter) {
@@ -1073,7 +1108,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
let listener = this._tabListeners.get(tab);
if (listener) {
-@@ -9359,6 +9610,7 @@
+@@ -9435,6 +9707,7 @@
aWebProgress.isTopLevel
) {
this.mTab.setAttribute("busy", "true");
@@ -1081,7 +1116,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
gBrowser._tabAttrModified(this.mTab, ["busy"]);
this.mTab._notselectedsinceload = !this.mTab.selected;
}
-@@ -9439,6 +9691,7 @@
+@@ -9515,6 +9788,7 @@
// known defaults. Note we use the original URL since about:newtab
// redirects to a prerendered page.
const shouldRemoveFavicon =
@@ -1089,7 +1124,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
!this.mBrowser.mIconURL &&
!ignoreBlank &&
!(originalLocation.spec in FAVICON_DEFAULTS);
-@@ -9613,13 +9866,6 @@
+@@ -9689,13 +9963,6 @@
this.mBrowser.originalURI = aRequest.originalURI;
}
@@ -1103,7 +1138,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..146b1559b8430773bd4ec173a8f4fe88
}
let userContextId = this.mBrowser.getAttribute("usercontextid") || 0;
-@@ -10507,7 +10753,8 @@ var TabContextMenu = {
+@@ -10587,7 +10854,8 @@ var TabContextMenu = {
);
contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !this.multiselected;
diff --git a/src/browser/components/tabbrowser/content/tabgroup-js.patch b/src/browser/components/tabbrowser/content/tabgroup-js.patch
index 60b9eafae..98e1d9fe6 100644
--- a/src/browser/components/tabbrowser/content/tabgroup-js.patch
+++ b/src/browser/components/tabbrowser/content/tabgroup-js.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
-index d1be14df27d76a191eaff05502c030fd68c46738..e9b5e90e39b594a6119081c8d707fb4a064fea9b 100644
+index e78fa0dec83424c0059c081f83fda0d23bdb5a94..a7de584d9029ff9e55d809d50377593e398ee999 100644
--- a/browser/components/tabbrowser/content/tabgroup.js
+++ b/browser/components/tabbrowser/content/tabgroup.js
@@ -14,11 +14,11 @@
@@ -49,7 +49,7 @@ index d1be14df27d76a191eaff05502c030fd68c46738..e9b5e90e39b594a6119081c8d707fb4a
// Similar to above, always set up TabSelect listener, as this gets
// removed in disconnectedCallback
- this.ownerGlobal.addEventListener("TabSelect", this);
+ this.documentGlobal.addEventListener("TabSelect", this);
this.addEventListener("SplitViewTabChange", this);
- if (this._initialized) {
@@ -129,7 +129,7 @@ index d1be14df27d76a191eaff05502c030fd68c46738..e9b5e90e39b594a6119081c8d707fb4a
}
get color() {
-@@ -317,6 +348,9 @@
+@@ -335,6 +366,9 @@
}
set collapsed(val) {
@@ -139,7 +139,7 @@ index d1be14df27d76a191eaff05502c030fd68c46738..e9b5e90e39b594a6119081c8d707fb4a
if (!!val == this.collapsed) {
return;
}
-@@ -403,7 +437,6 @@
+@@ -421,7 +455,6 @@
tabGroupName,
})
.then(result => {
@@ -147,7 +147,7 @@ index d1be14df27d76a191eaff05502c030fd68c46738..e9b5e90e39b594a6119081c8d707fb4a
});
}
-@@ -478,13 +511,68 @@
+@@ -496,13 +529,68 @@
* @returns {MozTabbrowserTab[]}
*/
get tabs() {
@@ -221,15 +221,15 @@ index d1be14df27d76a191eaff05502c030fd68c46738..e9b5e90e39b594a6119081c8d707fb4a
}
/**
-@@ -592,7 +680,6 @@
+@@ -610,7 +698,6 @@
);
} else {
if (tabOrSplitView.pinned) {
-- tabOrSplitView.ownerGlobal.gBrowser.unpinTab(tabOrSplitView);
+- tabOrSplitView.documentGlobal.gBrowser.unpinTab(tabOrSplitView);
}
let tabToMove =
- this.ownerGlobal === tabOrSplitView.ownerGlobal
-@@ -661,7 +748,7 @@
+ this.documentGlobal === tabOrSplitView.documentGlobal
+@@ -679,7 +766,7 @@
*/
on_click(event) {
let isToggleElement =
@@ -238,7 +238,7 @@ index d1be14df27d76a191eaff05502c030fd68c46738..e9b5e90e39b594a6119081c8d707fb4a
event.target === this.#overflowCountLabel;
if (isToggleElement && event.button === 0) {
event.preventDefault();
-@@ -740,5 +827,6 @@
+@@ -758,5 +845,6 @@
}
}
diff --git a/src/browser/components/tabbrowser/content/tabs-js.patch b/src/browser/components/tabbrowser/content/tabs-js.patch
index c1222edd0..167f6b882 100644
--- a/src/browser/components/tabbrowser/content/tabs-js.patch
+++ b/src/browser/components/tabbrowser/content/tabs-js.patch
@@ -1,8 +1,23 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
-index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c56982d1aa 100644
+index 568f3a7cc7051ff8cb569f6bcb8018a5212f7072..b9a1cfe3a4a5035d9b06b0b3826a97c52cfcb39e 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
-@@ -230,7 +230,7 @@
+@@ -197,8 +197,12 @@
+ XPCOMUtils.defineLazyPreferenceGetter(
+ this,
+ "_sidebarPositionStart",
+- "sidebar.position_start",
+- true
++ "zen.tabs.vertical.right-side",
++ true,
++ null,
++ newValue => {
++ return !newValue;
++ }
+ );
+
+ if (gMultiProcessBrowser) {
+@@ -220,7 +224,7 @@
this.tooltip = "tabbrowser-tab-tooltip";
@@ -11,7 +26,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
this.tabDragAndDrop.init();
}
-@@ -454,7 +454,7 @@
+@@ -444,7 +448,7 @@
// and we're not hitting the scroll buttons.
if (
event.button != 0 ||
@@ -20,7 +35,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
event.composedTarget.localName == "toolbarbutton"
) {
return;
-@@ -535,7 +535,6 @@
+@@ -525,7 +529,6 @@
});
}
} else if (isTabGroupLabel(event.target)) {
@@ -28,7 +43,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
} else if (
event.originalTarget.closest("scrollbox") &&
!Services.prefs.getBoolPref(
-@@ -571,6 +570,9 @@
+@@ -561,6 +564,9 @@
}
on_keydown(event) {
@@ -38,7 +53,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
let { altKey, shiftKey } = event;
let [accel, nonAccel] =
AppConstants.platform == "macosx"
-@@ -765,7 +767,6 @@
+@@ -755,7 +761,6 @@
this._updateCloseButtons();
if (!this.#animatingGroups.size) {
@@ -46,7 +61,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
}
document
-@@ -832,7 +833,7 @@
+@@ -822,7 +827,7 @@
}
get newTabButton() {
@@ -55,7 +70,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
}
get verticalMode() {
-@@ -848,6 +849,7 @@
+@@ -838,6 +843,7 @@
}
get overflowing() {
@@ -63,7 +78,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
return this.hasAttribute("overflow");
}
-@@ -861,29 +863,56 @@
+@@ -851,29 +857,56 @@
if (pinnedChildren?.at(-1)?.id == "pinned-tabs-container-periphery") {
pinnedChildren.pop();
}
@@ -93,7 +108,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
+ } else if (!isTab(tab)) {
+ tabs.splice(i, 1);
+ }
- }
++ }
+ };
+ expandTabs(pinnedTabs);
+ expandTabs(unpinnedChildren);
@@ -114,7 +129,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
+ // remove the separator from the list
+ allTabs.splice(i, 1);
+ i--;
-+ }
+ }
+ i++;
}
-
@@ -130,7 +145,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
}
get allSplitViews() {
-@@ -968,29 +997,28 @@
+@@ -958,29 +991,28 @@
return this.#focusableItems;
}
@@ -170,7 +185,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
this.#focusableItems = focusableItems;
return this.#focusableItems;
-@@ -1003,6 +1031,7 @@
+@@ -993,6 +1025,7 @@
* focusable (ex, we don't want the splitview container to be focusable, only its children).
*/
get dragAndDropElements() {
@@ -178,7 +193,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
if (this.#dragAndDropElements) {
return this.#dragAndDropElements;
}
-@@ -1073,6 +1102,7 @@
+@@ -1063,6 +1096,7 @@
_invalidateCachedTabs() {
this.#allTabs = null;
this._invalidateCachedVisibleTabs();
@@ -186,7 +201,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
}
_invalidateCachedVisibleTabs() {
-@@ -1092,7 +1122,8 @@
+@@ -1082,7 +1116,8 @@
isContainerVerticalPinnedGrid(tab) {
return (
@@ -196,7 +211,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
this.verticalMode &&
this.hasAttribute("expanded") &&
!this.expandOnHover
-@@ -1186,7 +1217,7 @@
+@@ -1176,7 +1211,7 @@
if (node == null) {
// We have a container for non-tab elements at the end of the scrollbox.
@@ -205,7 +220,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
}
node.before(tab);
-@@ -1281,7 +1312,7 @@
+@@ -1271,7 +1306,7 @@
// 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);
// Attach the long click popup to all of them.
@@ -214,7 +229,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
const newTab2 = this.newTabButton;
const newTabVertical = document.getElementById(
"vertical-tabs-newtab-button"
-@@ -1386,8 +1417,10 @@
+@@ -1376,8 +1411,10 @@
*/
_handleTabSelect(aInstant) {
let selectedTab = this.selectedItem;
@@ -225,7 +240,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
selectedTab._notselectedsinceload = false;
}
-@@ -1396,7 +1429,7 @@
+@@ -1386,7 +1423,7 @@
* @param {boolean} [shouldScrollInstantly=false]
*/
#ensureTabIsVisible(tab, shouldScrollInstantly = false) {
@@ -234,7 +249,7 @@ index a2db42fba8d1f1d9df1dc295adb64be3f5885d50..2dd43fe4898badeaf9bc669502ead2c5
if (arrowScrollbox?.overflowing) {
arrowScrollbox.ensureElementIsVisible(tab, shouldScrollInstantly);
}
-@@ -1523,7 +1556,7 @@
+@@ -1513,7 +1550,7 @@
}
_notifyBackgroundTab(aTab) {
diff --git a/src/browser/components/urlbar/UrlbarController-sys-mjs.patch b/src/browser/components/urlbar/UrlbarController-sys-mjs.patch
index 916f7e3c2..3db64fc48 100644
--- a/src/browser/components/urlbar/UrlbarController-sys-mjs.patch
+++ b/src/browser/components/urlbar/UrlbarController-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarController.sys.mjs b/browser/components/urlbar/UrlbarController.sys.mjs
-index bb0189fbfc91b3fc3b399b077a35f7b60a3f985f..c4dd60c6fb6d7eb2288a033708836f9983530e2c 100644
+index a05894d593e4149097c473822a38f87b2220625f..1660106c2a6548920fdffd2656e5a1f12c2d548b 100644
--- a/browser/components/urlbar/UrlbarController.sys.mjs
+++ b/browser/components/urlbar/UrlbarController.sys.mjs
@@ -305,7 +305,6 @@ export class UrlbarController {
@@ -10,7 +10,7 @@ index bb0189fbfc91b3fc3b399b077a35f7b60a3f985f..c4dd60c6fb6d7eb2288a033708836f99
this.view.isOpen &&
event.ctrlKey &&
(event.key == "n" || event.key == "p")
-@@ -456,6 +455,8 @@ export class UrlbarController {
+@@ -494,6 +493,8 @@ export class UrlbarController {
});
}
event.preventDefault();
diff --git a/src/browser/components/urlbar/UrlbarProvidersManager-sys-mjs.patch b/src/browser/components/urlbar/UrlbarProvidersManager-sys-mjs.patch
index 6b958bbdf..83a3c92b0 100644
--- a/src/browser/components/urlbar/UrlbarProvidersManager-sys-mjs.patch
+++ b/src/browser/components/urlbar/UrlbarProvidersManager-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
-index d9048a3b8b1f18745c01e40e12f529db3cfaa79e..1ba124a710fcf734ea11f7ccfd4f2f6ebe53e7d2 100644
+index 8de151f473ac6b95bc606251f78a4bede093ee0c..dbd302259c54b0196a370b9ff12ba0dcf1545272 100644
--- a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
+++ b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
@@ -913,6 +913,7 @@ export class Query {
diff --git a/src/browser/components/urlbar/UrlbarUtils-sys-mjs.patch b/src/browser/components/urlbar/UrlbarUtils-sys-mjs.patch
index 819a57f9f..00a3df9e5 100644
--- a/src/browser/components/urlbar/UrlbarUtils-sys-mjs.patch
+++ b/src/browser/components/urlbar/UrlbarUtils-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs
-index 62367c5a77614e5973791abacd068b39e0f3ab34..c930943b5bfa8a2e6dee43f0ec7a10274a7c7638 100644
+index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d85a930686 100644
--- a/browser/components/urlbar/UrlbarUtils.sys.mjs
+++ b/browser/components/urlbar/UrlbarUtils.sys.mjs
@@ -109,6 +109,8 @@ export var UrlbarUtils = {
diff --git a/src/browser/components/urlbar/UrlbarValueFormatter-sys-mjs.patch b/src/browser/components/urlbar/UrlbarValueFormatter-sys-mjs.patch
index e979e94fa..432482c51 100644
--- a/src/browser/components/urlbar/UrlbarValueFormatter-sys-mjs.patch
+++ b/src/browser/components/urlbar/UrlbarValueFormatter-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
-index 344a9a5b969e679040a650dad311c7413f52bbbd..24111cef5e476253f4e69c4d99f6f220bfd8cd7e 100644
+index 8def83509f097ba034b9d94ae00d2ee474ec2d30..ebdb84b9af928b132b848bd4c5bb506d813e5e06 100644
--- a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
+++ b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
@@ -77,7 +77,7 @@ export class UrlbarValueFormatter {
@@ -30,7 +30,7 @@ index 344a9a5b969e679040a650dad311c7413f52bbbd..24111cef5e476253f4e69c4d99f6f220
// Make sure the host is always visible. Since it is aligned on
// the first strong directional character, we set scrollLeft
// appropriately to ensure the domain stays visible in case of an
-@@ -371,7 +383,7 @@ export class UrlbarValueFormatter {
+@@ -381,7 +393,7 @@ export class UrlbarValueFormatter {
* @returns {boolean}
* True if formatting was applied and false if not.
*/
@@ -39,7 +39,7 @@ index 344a9a5b969e679040a650dad311c7413f52bbbd..24111cef5e476253f4e69c4d99f6f220
let urlMetaData = this.#getUrlMetaData();
if (!urlMetaData) {
return false;
-@@ -640,6 +652,7 @@ export class UrlbarValueFormatter {
+@@ -650,6 +662,7 @@ export class UrlbarValueFormatter {
this.#window.requestAnimationFrame(() => {
if (instance == this.#resizeInstance) {
this.#ensureFormattedHostVisible();
diff --git a/src/browser/components/urlbar/content/UrlbarInput-mjs.patch b/src/browser/components/urlbar/content/UrlbarInput-mjs.patch
index 6bdf7f30b..5066ab005 100644
--- a/src/browser/components/urlbar/content/UrlbarInput-mjs.patch
+++ b/src/browser/components/urlbar/content/UrlbarInput-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs
-index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e6463b45191 100644
+index 0fba59d62af9d3cd05bfee2cf84cd8b7cf9bfd6e..3997a5109267f378b59aa6510cbacd07ed57bd36 100644
--- a/browser/components/urlbar/content/UrlbarInput.mjs
+++ b/browser/components/urlbar/content/UrlbarInput.mjs
@@ -98,6 +98,13 @@ const lazy = XPCOMUtils.declareLazy({
@@ -16,7 +16,7 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
const UNLIMITED_MAX_RESULTS = 99;
let getBoundsWithoutFlushing = element =>
-@@ -743,7 +750,16 @@ ${
+@@ -770,7 +777,16 @@ ${
// See _on_select(). HTMLInputElement.select() dispatches a "select"
// event but does not set the primary selection.
this._suppressPrimaryAdjustment = true;
@@ -27,13 +27,13 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
+ zenToolbox.hasAttribute("zen-user-show")
+ ));
this.inputField.select();
-+ this.document.ownerGlobal.setTimeout(() => {
++ this.document.documentGlobal.setTimeout(() => {
+ this.window.document.documentElement.removeAttribute("supress-primary-adjustment");
+ }, 0);
this._suppressPrimaryAdjustment = false;
}
-@@ -817,6 +833,10 @@ ${
+@@ -844,6 +860,10 @@ ${
hideSearchTerms = false,
isSameDocument = false,
} = {}) {
@@ -44,11 +44,10 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
if (!this.#isAddressbar) {
throw new Error(
"Cannot set URI for UrlbarInput that is not an address bar"
-@@ -1106,8 +1126,16 @@ ${
- return;
- }
+@@ -1138,7 +1158,16 @@ ${
+ this.searchModeSwitcher?.updateSearchIcon();
}
--
+
+ const zenToolbox = this.document.getElementById("navigator-toolbox");
+ this.window.document.documentElement.setAttribute("supress-primary-adjustment", !(
+ zenToolbox.hasAttribute("zen-has-hover") ||
@@ -56,13 +55,13 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
+ zenToolbox.hasAttribute("zen-user-show")
+ ));
this.handleNavigation({ event });
-+ this.document.ownerGlobal.setTimeout(() => {
++ this.document.documentGlobal.setTimeout(() => {
+ this.window.document.documentElement.removeAttribute("supress-primary-adjustment");
+ }, 100);
}
/**
-@@ -1551,7 +1579,11 @@ ${
+@@ -1627,7 +1656,11 @@ ${
}
if (!this.#providesSearchMode(result)) {
@@ -75,7 +74,7 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
}
if (isCanonized) {
-@@ -2858,6 +2890,42 @@ ${
+@@ -2936,6 +2969,42 @@ ${
await this.#updateLayoutBreakoutDimensions();
}
@@ -126,7 +125,7 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
this.#updateTextboxPosition();
- this.setAttribute("breakout-extend", "true");
+ this.toggleAttribute("breakout-extend", true);
+ this.window.gZenUIManager.onUrlbarOpen();
+ if (this.zenUrlbarBehavior == 'float' || (this.zenUrlbarBehavior == 'floating-on-type' && !this.focusedViaMousedown)) {
@@ -144,9 +143,11 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
+ if (this._zenHandleUrlbarClose) {
+ this._zenHandleUrlbarClose();
-+ } else if (!this._untrimmedValue || this.searchMode) {
++ } else if (!this._untrimmedValue || (this.#isAddressbar && (this.searchMode || this.window.gZenVerticalTabsManager._hasSetSingleToolbar))) {
+ // Restore the current page URL when the urlbar is empty on blur
-+ this.handleRevert();
++ this.window.requestAnimationFrame(() => {
++ this.handleRevert();
++ });
+ }
+
+ // Arc like URLbar: Blur the input on exit
@@ -157,7 +158,7 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
+ zenToolbox.hasAttribute("zen-user-show")
+ ));
+ this.window.gBrowser.selectedBrowser.focus();
-+ this.document.ownerGlobal.setTimeout(() => {
++ this.document.documentGlobal.setTimeout(() => {
+ this.window.document.documentElement.removeAttribute("supress-primary-adjustment");
+ }, 100);
+ this.window.gZenUIManager.onUrlbarClose();
@@ -180,6 +181,7 @@ index d6615ec5a29f3e3327ac4171f3fc5d9a69bd09fe..e1128b0d7f5accfd48af27f99e3b2e64
@@ -3031,10 +3129,12 @@ export class UrlbarInput extends HTMLElement {
return;
}
+
this.style.top = px(
+ this.window.gZenVerticalTabsManager._hasSetSingleToolbar ?
this.parentNode.getBoxQuads({
diff --git a/src/browser/extensions/newtab/lib/ActivityStream-sys-mjs.patch b/src/browser/extensions/newtab/lib/ActivityStream-sys-mjs.patch
index cfb764b41..52a3b6699 100644
--- a/src/browser/extensions/newtab/lib/ActivityStream-sys-mjs.patch
+++ b/src/browser/extensions/newtab/lib/ActivityStream-sys-mjs.patch
@@ -1,8 +1,8 @@
diff --git a/browser/extensions/newtab/lib/ActivityStream.sys.mjs b/browser/extensions/newtab/lib/ActivityStream.sys.mjs
-index edb61ebece92f53d6edc8522c0dfea01159121dc..fd57751828254ebf9b05af13c26afa55ffa7ed00 100644
+index d88bc01e9a085f2970f4a80bdce94e06d8dcb693..a3dc7795deda5df2a354803a338c63e85a424bc0 100644
--- a/browser/extensions/newtab/lib/ActivityStream.sys.mjs
+++ b/browser/extensions/newtab/lib/ActivityStream.sys.mjs
-@@ -347,7 +347,7 @@ export const PREFS_CONFIG = new Map([
+@@ -353,7 +353,7 @@ export const PREFS_CONFIG = new Map([
"showSponsoredTopSites",
{
title: "Show sponsored top sites",
diff --git a/src/browser/installer/package-manifest-in.patch b/src/browser/installer/package-manifest-in.patch
index f07fcc3ac..c39a77575 100644
--- a/src/browser/installer/package-manifest-in.patch
+++ b/src/browser/installer/package-manifest-in.patch
@@ -1,8 +1,8 @@
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
-index 36eafe35063f02fe3d4acaab24a08dc1b7b0ae24..b6bf327bf286de5246e5c50d89519d16d5771caf 100644
+index 83e52b260c380b8a4fdcb9146c36a048adffba68..f55844c294bc0a0e648fd6fc09f63218c9b71de2 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
-@@ -386,9 +386,9 @@ bin/libfreebl_64int_3.so
+@@ -390,9 +390,9 @@ bin/libfreebl_64int_3.so
;
#ifdef MOZ_CRASHREPORTER
#ifdef XP_MACOSX
diff --git a/src/browser/installer/windows/nsis/installer-nsi.patch b/src/browser/installer/windows/nsis/installer-nsi.patch
index 970db92b2..1ccd45b8d 100644
--- a/src/browser/installer/windows/nsis/installer-nsi.patch
+++ b/src/browser/installer/windows/nsis/installer-nsi.patch
@@ -1,5 +1,5 @@
diff --git a/browser/installer/windows/nsis/installer.nsi b/browser/installer/windows/nsis/installer.nsi
-index 36fbee18edd138036c23ee77806f47cd10efce55..f70893700c54bdbc6d6fc5b760fd9a3654eb39e7 100755
+index 785e5ccfba55a98390652a61be9dbdef1e4815eb..cba2c3bb3b2e5bcbe8ba58a40bc9bc145df81fdd 100755
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -845,7 +845,7 @@ Section "-InstallEndCleanup"
diff --git a/src/browser/installer/windows/nsis/uninstaller-nsi.patch b/src/browser/installer/windows/nsis/uninstaller-nsi.patch
index abb8fc3e7..ad4d6025a 100644
--- a/src/browser/installer/windows/nsis/uninstaller-nsi.patch
+++ b/src/browser/installer/windows/nsis/uninstaller-nsi.patch
@@ -1,7 +1,7 @@
diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi
old mode 100755
new mode 100644
-index 0e2f7fa874b865b2a354c5ca612c5714f6ac5b69..0b1182279336972705bc3ff47e69353b997eb1bd
+index becbb0f70c84eb7f2d9bff5a3aedcbb7a78a61cf..05835d2088ab631316a25a9f0728898bd7998d8d
--- a/browser/installer/windows/nsis/uninstaller.nsi
+++ b/browser/installer/windows/nsis/uninstaller.nsi
@@ -516,6 +516,7 @@ Section "Uninstall"
diff --git a/src/browser/modules/BrowserWindowTracker-sys-mjs.patch b/src/browser/modules/BrowserWindowTracker-sys-mjs.patch
index bd6f5cd91..bc7b841a3 100644
--- a/src/browser/modules/BrowserWindowTracker-sys-mjs.patch
+++ b/src/browser/modules/BrowserWindowTracker-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/browser/modules/BrowserWindowTracker.sys.mjs b/browser/modules/BrowserWindowTracker.sys.mjs
-index 9aecab66d8f23fac9f16cea2120a5fe903ae1122..692f2bfe3899a58925789503a6bb2a547cdbf7f3 100644
+index 7e2f1d2b9ca10bd48fa1a0cd1f175a99b4169b90..505d6fc5110b99c73a0054abbe098c154227cf50 100644
--- a/browser/modules/BrowserWindowTracker.sys.mjs
+++ b/browser/modules/BrowserWindowTracker.sys.mjs
@@ -330,6 +330,7 @@ export const BrowserWindowTracker = {
diff --git a/src/browser/modules/ExtensionsUI-sys-mjs.patch b/src/browser/modules/ExtensionsUI-sys-mjs.patch
index 0fe9f96f4..8035e51e4 100644
--- a/src/browser/modules/ExtensionsUI-sys-mjs.patch
+++ b/src/browser/modules/ExtensionsUI-sys-mjs.patch
@@ -1,8 +1,8 @@
diff --git a/browser/modules/ExtensionsUI.sys.mjs b/browser/modules/ExtensionsUI.sys.mjs
-index 5251697341bf94f3ca6c877d87a6fe5f4debf03a..71d9247a669cea2135e6f0b76b2c10a869bf35bc 100644
+index 95a4b6e40bd568c3ea5003b648b0acbf96bbb725..6ab8a658721aa6470d482dc958e4b3ac78f49f44 100644
--- a/browser/modules/ExtensionsUI.sys.mjs
+++ b/browser/modules/ExtensionsUI.sys.mjs
-@@ -500,7 +500,7 @@ export var ExtensionsUI = {
+@@ -502,7 +502,7 @@ export var ExtensionsUI = {
eventCallback,
removeOnDismissal: true,
popupOptions: {
diff --git a/src/browser/modules/URILoadingHelper-sys-mjs.patch b/src/browser/modules/URILoadingHelper-sys-mjs.patch
index 82ac3592b..24980e837 100644
--- a/src/browser/modules/URILoadingHelper-sys-mjs.patch
+++ b/src/browser/modules/URILoadingHelper-sys-mjs.patch
@@ -1,8 +1,8 @@
diff --git a/browser/modules/URILoadingHelper.sys.mjs b/browser/modules/URILoadingHelper.sys.mjs
-index bd2e54e914b171df9b8bcc7dcbc2388e9641f6c6..8b3cb6542bea3fb89e47adc93cb13f94447450e2 100644
+index b60820ef0cc62c27a8bab127218d625012153791..04cdd58ed4426af802f2868310140a8a33ec092b 100644
--- a/browser/modules/URILoadingHelper.sys.mjs
+++ b/browser/modules/URILoadingHelper.sys.mjs
-@@ -228,6 +228,7 @@ function openInWindow(url, params, sourceWindow) {
+@@ -231,6 +231,7 @@ function openInWindow(url, params, sourceWindow) {
features,
sa
);
@@ -10,7 +10,7 @@ index bd2e54e914b171df9b8bcc7dcbc2388e9641f6c6..8b3cb6542bea3fb89e47adc93cb13f94
}
function openInCurrentTab(targetBrowser, url, uriObj, params) {
-@@ -545,7 +546,7 @@ export const URILoadingHelper = {
+@@ -548,7 +549,7 @@ export const URILoadingHelper = {
// page. If a load request bounces off for the currently selected tab,
// we'll open a new tab instead.
let tab = w.gBrowser.getTabForBrowser(targetBrowser);
@@ -19,7 +19,7 @@ index bd2e54e914b171df9b8bcc7dcbc2388e9641f6c6..8b3cb6542bea3fb89e47adc93cb13f94
where = "tab";
targetBrowser = null;
} else if (
-@@ -978,7 +979,7 @@ export const URILoadingHelper = {
+@@ -981,7 +982,7 @@ export const URILoadingHelper = {
ignoreQueryString || replaceQueryString,
ignoreFragmentWhenComparing
);
@@ -28,9 +28,9 @@ index bd2e54e914b171df9b8bcc7dcbc2388e9641f6c6..8b3cb6542bea3fb89e47adc93cb13f94
for (let i = 0; i < browsers.length; i++) {
let browser = browsers[i];
let browserCompare = cleanURL(
-@@ -1034,7 +1035,7 @@ export const URILoadingHelper = {
+@@ -1037,7 +1038,7 @@ export const URILoadingHelper = {
}
- aSplitView.ownerGlobal.focus();
+ aSplitView.documentGlobal.focus();
} else {
- aWindow.gBrowser.tabContainer.selectedIndex = i;
+ aWindow.gZenWorkspaces.switchIfNeeded(browser);
diff --git a/src/browser/themes/linux/browser-css.patch b/src/browser/themes/linux/browser-css.patch
index 79e5b201c..bc54b6b5d 100644
--- a/src/browser/themes/linux/browser-css.patch
+++ b/src/browser/themes/linux/browser-css.patch
@@ -1,5 +1,5 @@
diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
-index a99181fc249a7086e9886d86d85e8650595a0a0c..dd59739078080738d28bf59a1bb26fc0783bcac6 100644
+index 5e5d39787674d1d5ac8c39edccb04f8b8993fbb8..6c8b483ad19d9b26232592c68a7f2a6887161057 100644
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -14,7 +14,6 @@
diff --git a/src/browser/themes/osx/browser-css.patch b/src/browser/themes/osx/browser-css.patch
index 7ba8fdb25..3ec13a974 100644
--- a/src/browser/themes/osx/browser-css.patch
+++ b/src/browser/themes/osx/browser-css.patch
@@ -1,5 +1,5 @@
diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css
-index 92162e2893f7c8aea92c354f3a12cccf48f7576e..3189d75c8e47f3f76ddc1227d3cffee6b09402eb 100644
+index 486e269838d07f9c1c7bef3601900f0538cfe73b..b41da95b6ea96ccf3bb4f536f4444e3b47702544 100644
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -37,7 +37,7 @@
diff --git a/src/browser/themes/shared/browser-shared-css.patch b/src/browser/themes/shared/browser-shared-css.patch
index 5d30bb388..403fc025f 100644
--- a/src/browser/themes/shared/browser-shared-css.patch
+++ b/src/browser/themes/shared/browser-shared-css.patch
@@ -1,8 +1,8 @@
diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
-index 70571d8f32d60d10e59e33cb83e38229de026fc6..8e420ed6f6838499553c55265a1e35f5c3801d35 100644
+index 2287d8f9fd5a86be00a0e9d7635a119fca446f50..7870cd7a15688e6046e586ec91861439c4182933 100644
--- a/browser/themes/shared/browser-shared.css
+++ b/browser/themes/shared/browser-shared.css
-@@ -253,13 +253,13 @@ body {
+@@ -347,13 +347,13 @@ body {
@media (-moz-platform: macos) and (not (-moz-mac-rtl)) {
&:-moz-locale-dir(ltr) {
diff --git a/src/browser/themes/shared/identity-block/identity-block-css.patch b/src/browser/themes/shared/identity-block/identity-block-css.patch
index 7f116dd53..9ba08a4b0 100644
--- a/src/browser/themes/shared/identity-block/identity-block-css.patch
+++ b/src/browser/themes/shared/identity-block/identity-block-css.patch
@@ -1,5 +1,5 @@
diff --git a/browser/themes/shared/identity-block/identity-block.css b/browser/themes/shared/identity-block/identity-block.css
-index 72b6673094b80e9c109ae6f125cd25c3e00260ef..d116ab9671b02bbb05eddec8318e1f2835c29f32 100644
+index f239438ce661ae2c33a3e04ecc6d403b3a56a42b..c3a237aa78cff7aaaf0a7b931dd2b4d99049c051 100644
--- a/browser/themes/shared/identity-block/identity-block.css
+++ b/browser/themes/shared/identity-block/identity-block.css
@@ -7,7 +7,7 @@
diff --git a/src/browser/themes/shared/jar-inc-mn.patch b/src/browser/themes/shared/jar-inc-mn.patch
index f7ecba383..b07bcd68e 100644
--- a/src/browser/themes/shared/jar-inc-mn.patch
+++ b/src/browser/themes/shared/jar-inc-mn.patch
@@ -1,8 +1,8 @@
diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn
-index e59fb7f095161348e442626997bbb6dc4e1e999e..488c540b07e5ce73048cebec0d75dd33f9dcabd4 100644
+index e3bdc11e449fb2cd2a4033a1d8c1bba00455e748..f928bc1a3a668dcc1a9ecde9945c6349e5903828 100644
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
-@@ -343,3 +343,5 @@
+@@ -352,3 +352,5 @@
skin/classic/browser/illustrations/market-opt-in.svg (../shared/illustrations/market-opt-in.svg)
skin/classic/browser/illustrations/yelpRealtime-opt-in.svg (../shared/illustrations/yelpRealtime-opt-in.svg)
diff --git a/src/browser/themes/shared/tabbrowser/content-area-css.patch b/src/browser/themes/shared/tabbrowser/content-area-css.patch
index d4b6ab791..0c5d741bc 100644
--- a/src/browser/themes/shared/tabbrowser/content-area-css.patch
+++ b/src/browser/themes/shared/tabbrowser/content-area-css.patch
@@ -1,8 +1,8 @@
diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css
-index 05c1261f0085794e5e81dc8c1ef24fe1a9c5ec82..d0a1938b629338184bc462b4da1e10e1a4d6a4e7 100644
+index dff8162a84dbbe6873fa771828698b47b80d0472..e0c378af7a5cc607c2de1c9b5693adb04ac6adbd 100644
--- a/browser/themes/shared/tabbrowser/content-area.css
+++ b/browser/themes/shared/tabbrowser/content-area.css
-@@ -85,7 +85,6 @@
+@@ -171,7 +171,6 @@
min-height: 0;
/* We want to be able to show the frame color behind the clipped radiused corner */
@@ -10,7 +10,7 @@ index 05c1261f0085794e5e81dc8c1ef24fe1a9c5ec82..d0a1938b629338184bc462b4da1e10e1
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("sidebar.revamp") {
-@@ -146,7 +145,6 @@
+@@ -235,7 +234,6 @@
}
browser:is([blank], [pendingpaint]) {
@@ -18,7 +18,7 @@ index 05c1261f0085794e5e81dc8c1ef24fe1a9c5ec82..d0a1938b629338184bc462b4da1e10e1
}
/* Exclude browsers with smartwindow-content attribute which inherit
-@@ -440,7 +438,7 @@ split-view-footer {
+@@ -555,7 +553,7 @@ split-view-footer {
.dialogStack {
z-index: var(--browser-stack-z-index-dialog-stack);
@@ -27,7 +27,7 @@ index 05c1261f0085794e5e81dc8c1ef24fe1a9c5ec82..d0a1938b629338184bc462b4da1e10e1
inset: 0;
/* --browser-with-dialog set on browser[tabDialogShowing], we want to position the overlay
only on the top of the element so it doesn't overlap the DevTools toolbox */
-@@ -607,7 +605,7 @@ split-view-footer {
+@@ -722,7 +720,7 @@ split-view-footer {
.dialogOverlay[topmost="true"],
#window-modal-dialog::backdrop {
diff --git a/src/browser/themes/shared/tabbrowser/ctrlTab-css.patch b/src/browser/themes/shared/tabbrowser/ctrlTab-css.patch
index e990f547b..a10d1b45d 100644
--- a/src/browser/themes/shared/tabbrowser/ctrlTab-css.patch
+++ b/src/browser/themes/shared/tabbrowser/ctrlTab-css.patch
@@ -1,5 +1,5 @@
diff --git a/browser/themes/shared/tabbrowser/ctrlTab.css b/browser/themes/shared/tabbrowser/ctrlTab.css
-index d016bb363f306d7f6b08554f5029d425c01ca358..0f8e4d0a1aa2f9958124ea75423f83eb6ef35afe 100644
+index ad4819fec3fc71c15db0952957ec17dc5cb82e98..9fa29871afb967af3012e6c52d766f1134eab765 100644
--- a/browser/themes/shared/tabbrowser/ctrlTab.css
+++ b/browser/themes/shared/tabbrowser/ctrlTab.css
@@ -11,6 +11,7 @@
diff --git a/src/browser/themes/shared/tabbrowser/tabs-css.patch b/src/browser/themes/shared/tabbrowser/tabs-css.patch
index 18034a267..f64d8892b 100644
--- a/src/browser/themes/shared/tabbrowser/tabs-css.patch
+++ b/src/browser/themes/shared/tabbrowser/tabs-css.patch
@@ -1,8 +1,8 @@
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
-index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22c000e105 100644
+index b70af17781a4128593e3c092cf0f6aec81ab5f9a..1c11c2bf9dcde9d468959e9115a48cf272870987 100644
--- a/browser/themes/shared/tabbrowser/tabs.css
+++ b/browser/themes/shared/tabbrowser/tabs.css
-@@ -25,7 +25,7 @@
+@@ -34,7 +34,7 @@
--tab-group-line-thickness: 2px;
--tab-group-line-toolbar-border-distance: 1px;
/* Collapsed tabs should be square, so set width to match the min height */
@@ -11,15 +11,15 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
--tab-collapsed-width: calc(var(--tab-collapsed-background-width) + 2 * var(--tab-inner-inline-margin));
--tab-pinned-min-width-expanded: calc(var(--tab-pinned-expanded-background-width) + 2 * var(--tab-pinned-margin-inline-expanded));
--tab-note-icon-end-margin: var(--dimension-4);
-@@ -276,7 +276,6 @@ tab-split-view-wrapper[dragtarget] {
+@@ -285,7 +285,6 @@ tab-split-view-wrapper[dragtarget] {
}
:root:not([uidensity="compact"], [sidebar-expand-on-hover]) &[pinned] {
-- padding: 0 10px;
+- padding: 0 calc((var(--tab-min-height) - var(--icon-size)) / 2);
}
&:is([selected], [multiselected]) {
-@@ -290,6 +289,7 @@ tab-split-view-wrapper[dragtarget] {
+@@ -299,6 +298,7 @@ tab-split-view-wrapper[dragtarget] {
border-radius: inherit;
position: relative;
overflow: hidden;
@@ -27,7 +27,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
&::before {
position: absolute;
-@@ -489,10 +489,6 @@ tab-split-view-wrapper[dragtarget] {
+@@ -498,10 +498,6 @@ tab-split-view-wrapper[dragtarget] {
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("browser.tabs.fadeOutUnloadedTabs") {
&[pending] {
@@ -38,7 +38,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
opacity: 0.5;
/* Fade the favicon out */
transition-property: filter, opacity;
-@@ -509,10 +505,6 @@ tab-split-view-wrapper[dragtarget] {
+@@ -518,10 +514,6 @@ tab-split-view-wrapper[dragtarget] {
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("browser.tabs.fadeOutExplicitlyUnloadedTabs") {
&[pending][discarded] {
@@ -49,8 +49,8 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
opacity: 0.5;
/* Fade the favicon out */
transition-property: filter, opacity;
-@@ -581,7 +573,7 @@ tab-split-view-wrapper[dragtarget] {
- z-index: 1; /* Overlay tab title */
+@@ -596,7 +588,7 @@ tab-split-view-wrapper[dragtarget] {
+ }
#tabbrowser-tabs[orient="vertical"] & {
- top: 7px;
@@ -58,7 +58,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
}
&[crashed] {
-@@ -589,7 +581,7 @@ tab-split-view-wrapper[dragtarget] {
+@@ -604,7 +596,7 @@ tab-split-view-wrapper[dragtarget] {
}
#tabbrowser-tabs[orient="vertical"]:not([expanded]) &:not([crashed]),
@@ -67,7 +67,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
&[soundplaying] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg");
}
-@@ -644,7 +636,7 @@ tab-split-view-wrapper[dragtarget] {
+@@ -661,7 +653,7 @@ tab-split-view-wrapper[dragtarget] {
}
}
@@ -76,7 +76,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
&[crashed] {
display: revert;
}
-@@ -810,7 +802,7 @@ tab-split-view-wrapper[dragtarget] {
+@@ -829,7 +821,7 @@ tab-split-view-wrapper[dragtarget] {
has not been added to root. There are certain scenarios when that attribute is temporarily
removed from root such as when toggling the sidebar to expand with the toolbar button. */
#tabbrowser-tabs[orient="horizontal"] &:not([pinned]):not([crashed]),
@@ -85,7 +85,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
&:is([soundplaying], [muted], [activemedia-blocked]) {
display: flex;
}
-@@ -1026,7 +1018,6 @@ tab-split-view-wrapper[dragtarget] {
+@@ -1053,7 +1045,6 @@ tab-split-view-wrapper[dragtarget] {
.tabbrowser-tab:is([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected]),
.tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([selected]),
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab > .tab-stack > .tab-content[titlechanged]:not([selected]) {
@@ -93,7 +93,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
background-position: center bottom 6.5px;
background-size: 4px 4px;
background-repeat: no-repeat;
-@@ -1635,7 +1626,7 @@ tab-group {
+@@ -1813,7 +1804,7 @@ tab-group {
}
#tabbrowser-tabs[orient="vertical"][expanded] {
@@ -102,7 +102,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
&[movingtab][movingtab-addToGroup]:not([movingtab-group], [movingtab-ungroup]) .tabbrowser-tab:is(:active, [multiselected]) {
margin-inline-start: var(--space-medium);
}
-@@ -2128,7 +2119,7 @@ tab-group {
+@@ -2378,7 +2369,7 @@ tab-group {
}
}
@@ -111,7 +111,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
#vertical-tabs-newtab-button {
appearance: none;
min-height: var(--tab-min-height);
-@@ -2139,7 +2130,7 @@ tab-group {
+@@ -2389,7 +2380,7 @@ tab-group {
margin-inline: var(--tab-inner-inline-margin);
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
@@ -120,7 +120,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
}
&:hover {
-@@ -2163,7 +2154,7 @@ tab-group {
+@@ -2413,7 +2404,7 @@ tab-group {
* 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.
*/
@@ -129,7 +129,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
margin-block: var(--tab-block-margin);
}
-@@ -2351,7 +2342,6 @@ tab-group {
+@@ -2610,7 +2601,6 @@ tab-group {
&:not([expanded]) {
.tabbrowser-tab[pinned] {
@@ -137,7 +137,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
}
.tab-background {
-@@ -2391,8 +2381,8 @@ tab-group {
+@@ -2651,8 +2641,8 @@ tab-group {
display: block;
position: absolute;
inset: auto;
@@ -148,7 +148,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
&:-moz-window-inactive {
background-image:
-@@ -2480,9 +2470,6 @@ tab-group {
+@@ -2753,9 +2743,6 @@ tab-group {
~ #tabbrowser-tabs[orient="horizontal"]::before {
display: flex;
content: "";
@@ -158,7 +158,7 @@ index 2ce8b135dcf087a2e2cb75c3417be8c9ba4178e6..3c297614afd323e210ebf0018d4aca22
}
}
-@@ -2515,7 +2502,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
+@@ -2788,7 +2775,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
list-style-image: url(chrome://global/skin/icons/plus.svg);
}
diff --git a/src/browser/themes/shared/toolbarbuttons-css.patch b/src/browser/themes/shared/toolbarbuttons-css.patch
index 7c52385f6..917122e5e 100644
--- a/src/browser/themes/shared/toolbarbuttons-css.patch
+++ b/src/browser/themes/shared/toolbarbuttons-css.patch
@@ -1,59 +1,59 @@
diff --git a/browser/themes/shared/toolbarbuttons.css b/browser/themes/shared/toolbarbuttons.css
-index 829501008d7b6fd6bddf899f3cf599a68ff216a0..cbdc770d56c4053d0b9afc13322f072c3376eb30 100644
+index 94b1a2a841d8fd47a491616d52e5bf544f0c0bf9..9e98266b98c6b66fed26fec12fa3391fc5fcc79b 100644
--- a/browser/themes/shared/toolbarbuttons.css
+++ b/browser/themes/shared/toolbarbuttons.css
@@ -13,20 +13,6 @@
- --toolbarbutton-inner-padding: var(--toolbarbutton-inner-padding-touch);
+ --toolbarbutton-padding-inner: var(--toolbarbutton-padding-inner-touch);
--bookmark-block-padding: 7px;
}
- @media (width <= 900px) {
-- --toolbarbutton-outer-padding: var(--toolbarbutton-outer-padding-narrow);
+- --toolbarbutton-padding-outer: var(--toolbarbutton-padding-outer-narrow);
- }
- @media (width <= 800px) {
-- --toolbarbutton-inner-padding: var(--toolbarbutton-inner-padding-narrow);
+- --toolbarbutton-padding-inner: var(--toolbarbutton-padding-inner-narrow);
- &:where([uidensity="touch"]) {
-- --toolbarbutton-inner-padding: var(--toolbarbutton-inner-padding-touch-narrow);
+- --toolbarbutton-padding-inner: var(--toolbarbutton-padding-inner-touch-narrow);
- }
- }
- /* 700px is just above half of the popular 1366px screen width, so two browser
- windows put next to each other will be below this threshold. */
- @media (width <= 700px) {
-- --toolbarbutton-inner-padding: var(--toolbarbutton-inner-padding-compact);
+- --toolbarbutton-padding-inner: var(--toolbarbutton-padding-inner-compact);
- }
&:where([uidensity="compact"]) {
- --toolbarbutton-inner-padding: var(--toolbarbutton-inner-padding-compact);
+ --toolbarbutton-padding-inner: var(--toolbarbutton-padding-inner-compact);
--bookmark-block-padding: 1px;
@@ -123,9 +109,7 @@
#TabsToolbar {
/* Override the inner padding to ensure the dimensions match the tabs, but also making sure
different types of buttons (combined-buttons-dropmarker or text) still look correct. */
- @media (width > 900px) {
- --toolbarbutton-inner-padding: calc((var(--tab-min-height) - 16px) / 2);
+ --toolbarbutton-padding-inner: calc((var(--tab-min-height) - 16px) / 2);
- }
}
/* Primary toolbar buttons */
-@@ -204,8 +188,8 @@ toolbar .toolbarbutton-1 {
+@@ -205,8 +189,8 @@ toolbar .toolbarbutton-1 {
> .toolbarbutton-icon {
/* horizontal padding + actual icon width */
-- width: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
-- height: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
-+ width: calc(2 * var(--toolbarbutton-inner-padding) + var(--zen-toolbar-button-size, 16px));
-+ height: calc(2 * var(--toolbarbutton-inner-padding) + var(--zen-toolbar-button-size, 16px));
+- width: calc(2 * var(--toolbarbutton-padding-inner) + 16px);
+- height: calc(2 * var(--toolbarbutton-padding-inner) + 16px);
++ width: calc(2 * var(--toolbarbutton-padding-inner) + var(--zen-toolbar-button-size, 16px));
++ height: calc(2 * var(--toolbarbutton-padding-inner) + var(--zen-toolbar-button-size, 16px));
}
> .toolbarbutton-text {
-@@ -215,7 +199,7 @@ toolbar .toolbarbutton-1 {
+@@ -216,7 +200,7 @@ toolbar .toolbarbutton-1 {
* height as the button icons and the same vertical padding, but as a minimum,
* because otherwise an increase in text sizes would break things.
*/
-- min-height: calc(16px + 2 * var(--toolbarbutton-inner-padding));
-+ min-height: calc(var(--zen-toolbar-button-size, 16px) + 2 * var(--toolbarbutton-inner-padding));
+- min-height: calc(16px + 2 * var(--toolbarbutton-padding-inner));
++ min-height: calc(var(--zen-toolbar-button-size, 16px) + 2 * var(--toolbarbutton-padding-inner));
@media (-moz-platform: macos) {
- padding-top: calc(var(--toolbarbutton-inner-padding) + 1px);
-@@ -325,7 +309,7 @@ toolbar .toolbaritem-combined-buttons {
+ padding-top: calc(var(--toolbarbutton-padding-inner) + 1px);
+@@ -326,7 +310,7 @@ toolbar .toolbaritem-combined-buttons {
#nav-bar-overflow-button {
list-style-image: url("chrome://global/skin/icons/chevron.svg");
@@ -62,7 +62,7 @@ index 829501008d7b6fd6bddf899f3cf599a68ff216a0..cbdc770d56c4053d0b9afc13322f072c
display: none;
}
-@@ -535,7 +519,7 @@ toolbarbutton.bookmark-item:not(.subviewbutton) {
+@@ -536,7 +520,7 @@ toolbarbutton.bookmark-item:not(.subviewbutton) {
*/
align-items: stretch;
> .toolbarbutton-icon {
diff --git a/src/browser/themes/shared/urlbar-searchbar-css.patch b/src/browser/themes/shared/urlbar-searchbar-css.patch
index 6871d5e67..2fb638c24 100644
--- a/src/browser/themes/shared/urlbar-searchbar-css.patch
+++ b/src/browser/themes/shared/urlbar-searchbar-css.patch
@@ -1,8 +1,8 @@
diff --git a/browser/themes/shared/urlbar-searchbar.css b/browser/themes/shared/urlbar-searchbar.css
-index 3f46c918e125f9531a536a09358c980b2c923864..cba6f00318ce5dc7b6717b6c9afd2ee916715f8f 100644
+index cbd074b9bacfbf7cc82a67ad586ebc31c4d85970..993c61ba389cb9d912b2cebee9d71bec772e3a7d 100644
--- a/browser/themes/shared/urlbar-searchbar.css
+++ b/browser/themes/shared/urlbar-searchbar.css
-@@ -11,7 +11,7 @@
+@@ -12,7 +12,7 @@
/* Usually we wouldn't need snapping border widths manually, but we use this
* for other layout calculations too */
--urlbar-container-border-width: max(env(hairline), round(down, 1px, env(hairline)));
@@ -11,7 +11,7 @@ index 3f46c918e125f9531a536a09358c980b2c923864..cba6f00318ce5dc7b6717b6c9afd2ee9
--urlbar-container-inset: calc(var(--urlbar-container-border-width) + var(--urlbar-container-padding));
@media (max-width: 770px) {
-@@ -54,7 +54,7 @@ toolbar[inactive="true"] .urlbar,
+@@ -55,7 +55,7 @@ toolbar[inactive="true"] .urlbar,
.urlbar:not([usertyping]) > .urlbar-input-container > .urlbar-go-button,
.urlbar:not(#searchbar-new, [focused]) > .urlbar-input-container > .urlbar-go-button,
#urlbar-revert-button-container {
@@ -20,7 +20,7 @@ index 3f46c918e125f9531a536a09358c980b2c923864..cba6f00318ce5dc7b6717b6c9afd2ee9
}
/* Document Picture-in-Picture API window */
-@@ -201,6 +201,10 @@ toolbar[inactive="true"] .urlbar,
+@@ -205,6 +205,10 @@ toolbar[inactive="true"] .urlbar,
mask-image: linear-gradient(to right, transparent var(--urlbar-scheme-size), black calc(var(--urlbar-scheme-size) + 3ch));
}
@@ -31,18 +31,18 @@ index 3f46c918e125f9531a536a09358c980b2c923864..cba6f00318ce5dc7b6717b6c9afd2ee9
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("browser.nova.enabled") {
&::selection {
-@@ -343,10 +347,14 @@ toolbar[inactive="true"] .urlbar,
+@@ -429,10 +433,14 @@ toolbar[inactive="true"] .urlbar,
- .urlbar[breakout][breakout-extend] {
- height: auto;
-+ align-items: center;
-+ :root:not([zen-single-toolbar='true']) & {
- margin-left: calc(-1 * var(--urlbar-margin-inline));
-+ }
- width: calc(var(--urlbar-width) + 2 * var(--urlbar-margin-inline));
-
- > .urlbar-input-container {
+ .urlbar[breakout][breakout-extend] {
+ height: auto;
+ 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));
++ :root:not([zen-single-toolbar='true']) & {
+ margin-left: calc(-1 * var(--urlbar-margin-inline));
++ }
+ width: calc(var(--urlbar-width) + 2 * var(--urlbar-margin-inline));
+
+ > .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));
diff --git a/src/browser/themes/shared/urlbar/variables-css.patch b/src/browser/themes/shared/urlbar/variables-css.patch
index 1e1ae2b2d..7fe83c809 100644
--- a/src/browser/themes/shared/urlbar/variables-css.patch
+++ b/src/browser/themes/shared/urlbar/variables-css.patch
@@ -1,5 +1,5 @@
diff --git a/browser/themes/shared/urlbar/variables.css b/browser/themes/shared/urlbar/variables.css
-index 34ab3df5ed433dafed00799c902afc276a722862..1e71860631f33839bdc7e1ec3a1e877bef744b55 100644
+index 64eb46b3061504e590d3fcee0c30c902f68764fe..6e7ffe043c5676da27a6eb5b105dac2fde3309da 100644
--- a/browser/themes/shared/urlbar/variables.css
+++ b/browser/themes/shared/urlbar/variables.css
@@ -9,7 +9,7 @@
diff --git a/src/browser/themes/shared/urlbar/view-proton-css.patch b/src/browser/themes/shared/urlbar/view-proton-css.patch
index e95474f21..9ae3d6c26 100644
--- a/src/browser/themes/shared/urlbar/view-proton-css.patch
+++ b/src/browser/themes/shared/urlbar/view-proton-css.patch
@@ -1,5 +1,5 @@
diff --git a/browser/themes/shared/urlbar/view-proton.css b/browser/themes/shared/urlbar/view-proton.css
-index 9e041b67988f590bdbea48514937b1fa25c9785c..05507782b91858dff3e181843314af7956528ba9 100644
+index 0b10c077a555e5d0fc488a3bb1b1b920f433204c..38e9d14e9838f2b8de6f654ff4e0700bb65506f0 100644
--- a/browser/themes/shared/urlbar/view-proton.css
+++ b/browser/themes/shared/urlbar/view-proton.css
@@ -14,7 +14,7 @@
@@ -9,10 +9,10 @@ index 9e041b67988f590bdbea48514937b1fa25c9785c..05507782b91858dff3e181843314af79
- --urlbarView-results-padding: 7px;
+ --urlbarView-results-padding: 8px;
--urlbarView-row-gutter: var(--space-xxsmall);
- --urlbarView-item-inline-padding: var(--urlbar-icon-padding);
- --urlbarView-item-block-padding: 6px;
-@@ -168,7 +168,6 @@
- min-height: 32px;
+ --urlbarView-row-padding-inline: var(--urlbar-icon-padding);
+ --urlbarView-row-padding-block: 6px;
+@@ -174,7 +174,6 @@
+ min-height: var(--urlbarView-row-min-height);
}
:root[uidensity="touch"] & {
- padding-block: 11px;
diff --git a/src/browser/themes/shared/zen-icons/icons.css b/src/browser/themes/shared/zen-icons/icons.css
index 0c45bc216..20a8c58ce 100644
--- a/src/browser/themes/shared/zen-icons/icons.css
+++ b/src/browser/themes/shared/zen-icons/icons.css
@@ -51,7 +51,8 @@
}
#PanelUI-zen-gradient-generator-color-remove,
-#zen-gradient-generator-color-remove {
+#zen-gradient-generator-color-remove,
+.sr-remove {
list-style-image: url("unpin.svg") !important;
}
@@ -134,6 +135,10 @@
list-style-image: url("arrow-right.svg");
}
+.sr-open-in-icon {
+ list-style-image: url("arrow-corner-down-right.svg");
+}
+
#PanelUI-menu-button,
#appMenu-more-button2,
.zen-workspaces-actions,
@@ -501,9 +506,9 @@
}
#identity-permission-box,
-:root:not([zen-has-empty-tab="true"]) #urlbar:not([breakout-extend="true"]) #identity-icon-box:not([open]),
+:root:not([zen-has-empty-tab="true"]) #urlbar:not([breakout-extend]) #identity-icon-box:not([open]),
:root[zen-has-empty-tab="true"] #zen-site-data-icon-button,
-#urlbar[breakout-extend="true"] #zen-site-data-icon-button {
+#urlbar[breakout-extend] #zen-site-data-icon-button {
display: none !important;
}
@@ -521,7 +526,8 @@
list-style-image: url("permissions-fill.svg");
}
&[boosting] image {
- color: var(--color-accent-primary);
+ fill-opacity: 1 !important;
+ color: var(--zen-sidebar-themed-icon-fill);
list-style-image: url("permissions-fill.svg");
}
@@ -538,7 +544,9 @@
display: flex;
width: 100%;
height: 100%;
- color: var(--color-accent-primary);
+ color: var(--zen-sidebar-themed-icon-fill);
+ -moz-context-properties: fill;
+ fill: currentColor;
list-style-image: url("chrome://browser/content/zen-images/boost-indicator.svg");
transform: translateX(-20%);
z-index: 0;
@@ -1004,7 +1012,8 @@
}
}
-#zen-copy-url-button image {
+#zen-copy-url-button image,
+.sr-url-icon {
list-style-image: url("link.svg");
fill-opacity: 0.65;
}
@@ -1088,3 +1097,7 @@
#zen-boost-load {
list-style-image: url("open.svg");
}
+
+.sr-airplane {
+ list-style-image: url("selectable/airplane.svg");
+}
\ No newline at end of file
diff --git a/src/browser/themes/shared/zen-icons/jar.inc.mn b/src/browser/themes/shared/zen-icons/jar.inc.mn
index 0538f9926..b30fc9a99 100644
--- a/src/browser/themes/shared/zen-icons/jar.inc.mn
+++ b/src/browser/themes/shared/zen-icons/jar.inc.mn
@@ -4,6 +4,7 @@
#ifdef XP_WIN
* skin/classic/browser/zen-icons/algorithm.svg (../shared/zen-icons/nucleo/algorithm.svg)
+* skin/classic/browser/zen-icons/arrow-corner-down-right.svg (../shared/zen-icons/nucleo/arrow-corner-down-right.svg)
* skin/classic/browser/zen-icons/arrow-down.svg (../shared/zen-icons/nucleo/arrow-down.svg)
* skin/classic/browser/zen-icons/arrow-left.svg (../shared/zen-icons/nucleo/arrow-left.svg)
* skin/classic/browser/zen-icons/arrow-right.svg (../shared/zen-icons/nucleo/arrow-right.svg)
@@ -153,6 +154,7 @@
#endif
#ifdef XP_MACOSX
* skin/classic/browser/zen-icons/algorithm.svg (../shared/zen-icons/nucleo/algorithm.svg)
+* skin/classic/browser/zen-icons/arrow-corner-down-right.svg (../shared/zen-icons/nucleo/arrow-corner-down-right.svg)
* skin/classic/browser/zen-icons/arrow-down.svg (../shared/zen-icons/nucleo/arrow-down.svg)
* skin/classic/browser/zen-icons/arrow-left.svg (../shared/zen-icons/nucleo/arrow-left.svg)
* skin/classic/browser/zen-icons/arrow-right.svg (../shared/zen-icons/nucleo/arrow-right.svg)
@@ -302,6 +304,7 @@
#endif
#ifdef XP_LINUX
* skin/classic/browser/zen-icons/algorithm.svg (../shared/zen-icons/nucleo/algorithm.svg)
+* skin/classic/browser/zen-icons/arrow-corner-down-right.svg (../shared/zen-icons/nucleo/arrow-corner-down-right.svg)
* skin/classic/browser/zen-icons/arrow-down.svg (../shared/zen-icons/nucleo/arrow-down.svg)
* skin/classic/browser/zen-icons/arrow-left.svg (../shared/zen-icons/nucleo/arrow-left.svg)
* skin/classic/browser/zen-icons/arrow-right.svg (../shared/zen-icons/nucleo/arrow-right.svg)
diff --git a/src/browser/themes/shared/zen-icons/nucleo/arrow-corner-down-right.svg b/src/browser/themes/shared/zen-icons/nucleo/arrow-corner-down-right.svg
new file mode 100644
index 000000000..18b9d18df
--- /dev/null
+++ b/src/browser/themes/shared/zen-icons/nucleo/arrow-corner-down-right.svg
@@ -0,0 +1,5 @@
+#filter dumbComments emptyLines substitution
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
\ No newline at end of file
diff --git a/src/browser/themes/windows/browser-css.patch b/src/browser/themes/windows/browser-css.patch
index c5c56e61c..36d57a1d6 100644
--- a/src/browser/themes/windows/browser-css.patch
+++ b/src/browser/themes/windows/browser-css.patch
@@ -1,5 +1,5 @@
diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css
-index 039cd084f23ef27eb4a1d359c8caca690eb75eb5..432302ce8d29de1836aaf0a756b3aa0ebc86562a 100644
+index 7dcb386d38d25ee483f19322ea327b4dc6a244e0..c30a16e503224691572118efa0f1ff9e108895b3 100644
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -41,7 +41,6 @@
@@ -10,7 +10,7 @@ index 039cd084f23ef27eb4a1d359c8caca690eb75eb5..432302ce8d29de1836aaf0a756b3aa0e
}
/* Using a semitransparent background preserves the tinting from the backdrop.
-@@ -70,14 +69,13 @@
+@@ -73,14 +72,13 @@
}
/* This is needed for Windows 10, see bug 1961257 */
diff --git a/src/devtools/startup/DevToolsStartup-sys-mjs.patch b/src/devtools/startup/DevToolsStartup-sys-mjs.patch
index 766afd148..fc1e22d13 100644
--- a/src/devtools/startup/DevToolsStartup-sys-mjs.patch
+++ b/src/devtools/startup/DevToolsStartup-sys-mjs.patch
@@ -1,12 +1,12 @@
diff --git a/devtools/startup/DevToolsStartup.sys.mjs b/devtools/startup/DevToolsStartup.sys.mjs
-index d604d0e00c623026928d72b1bcb1ce82e6bb6d4a..e3341c9ffc6db9b4bf360445ea031fc558e6076b 100644
+index ab008a13b4a6a31b18d5587e93e1ff589693cdac..946d1c70600fcfda5452d130dd1924c92d502562 100644
--- a/devtools/startup/DevToolsStartup.sys.mjs
+++ b/devtools/startup/DevToolsStartup.sys.mjs
@@ -836,6 +836,9 @@ export class DevToolsStartup {
// account (see bug 832984).
const mainKeyset = doc.getElementById("mainKeyset");
mainKeyset.parentNode.insertBefore(keyset, mainKeyset);
-+ mainKeyset.ownerGlobal.setTimeout(() => {
++ mainKeyset.documentGlobal.setTimeout(() => {
+ window.dispatchEvent(new window.Event("zen-devtools-keyset-added"));
+ }, 0);
}
diff --git a/src/docshell/base/BrowsingContext-h.patch b/src/docshell/base/BrowsingContext-h.patch
index d46eee4d5..12860e76c 100644
--- a/src/docshell/base/BrowsingContext-h.patch
+++ b/src/docshell/base/BrowsingContext-h.patch
@@ -1,5 +1,5 @@
diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h
-index 4e20d7b602932621baf9082f6d28911701b7aa5b..d6e141b235ce60be5db86bc40578d0741b79b014 100644
+index 02abb6ab9562a7b41f4a95a6289c80da8d1176e8..1722802021f331338fc10c768301a953e582b711 100644
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
@@ -265,6 +265,9 @@ struct EmbedderColorSchemes {
@@ -12,7 +12,7 @@ index 4e20d7b602932621baf9082f6d28911701b7aa5b..d6e141b235ce60be5db86bc40578d074
/* Whether we can execute scripts in this BrowsingContext. Has no effect \
* unless scripts are also allowed in the parent WindowContext. */ \
FIELD(AllowJavascript, bool) \
-@@ -680,6 +683,11 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+@@ -671,6 +674,11 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
bool FullscreenAllowed() const;
@@ -24,7 +24,7 @@ index 4e20d7b602932621baf9082f6d28911701b7aa5b..d6e141b235ce60be5db86bc40578d074
float FullZoom() const { return GetFullZoom(); }
float TextZoom() const { return GetTextZoom(); }
-@@ -1284,6 +1292,9 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
+@@ -1275,6 +1283,9 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
}
void DidSet(FieldIndex, uint32_t aOldValue);
diff --git a/src/dom/base/Document-cpp.patch b/src/dom/base/Document-cpp.patch
index df2270c12..9b1b29f1f 100644
--- a/src/dom/base/Document-cpp.patch
+++ b/src/dom/base/Document-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
-index f5dc958b940b806cc471760ce91a26b1111aafa5..d6841cbef64374d14bc2941651e33669c28e2958 100644
+index 328b7524810322561700347fa7f26403897635a8..58d33d68e050d11ea712413ad5c2170a112e404a 100644
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
-@@ -465,6 +465,7 @@
+@@ -467,6 +467,7 @@
#include "prtime.h"
#include "prtypes.h"
#include "xpcpublic.h"
@@ -10,7 +10,7 @@ index f5dc958b940b806cc471760ce91a26b1111aafa5..d6841cbef64374d14bc2941651e33669
// clang-format off
#include "mozilla/Encoding.h"
-@@ -3275,6 +3276,10 @@ void Document::FillStyleSetUserAndUASheets() {
+@@ -3198,6 +3199,10 @@ void Document::FillStyleSetUserAndUASheets() {
for (StyleSheet* sheet : *sheetService->UserStyleSheets()) {
styleSet.AppendStyleSheet(*sheet);
}
diff --git a/src/dom/canvas/CanvasRenderingContext2D-cpp.patch b/src/dom/canvas/CanvasRenderingContext2D-cpp.patch
index 5a4821efc..9b75d72ff 100644
--- a/src/dom/canvas/CanvasRenderingContext2D-cpp.patch
+++ b/src/dom/canvas/CanvasRenderingContext2D-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp
-index ca400d3aed179ebef8e005206f29b419ae56afc4..4d4e56f4a222bd61dea82638f3e0b30fbe56a176 100644
+index 9c0d63f030848d379a66b7229b8378b214796c25..9409764996ed58974d88de68bc37d3b9d081ed9e 100644
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
-@@ -1326,7 +1326,8 @@ Maybe CanvasRenderingContext2D::ParseColor(
+@@ -1327,7 +1327,8 @@ Maybe CanvasRenderingContext2D::ParseColor(
RefPtr canvasStyle =
nsComputedDOMStyle::GetComputedStyle(mCanvasElement);
if (canvasStyle) {
diff --git a/src/dom/chrome-webidl/BrowsingContext-webidl.patch b/src/dom/chrome-webidl/BrowsingContext-webidl.patch
index fa4f77e9d..9486e109f 100644
--- a/src/dom/chrome-webidl/BrowsingContext-webidl.patch
+++ b/src/dom/chrome-webidl/BrowsingContext-webidl.patch
@@ -1,5 +1,5 @@
diff --git a/dom/chrome-webidl/BrowsingContext.webidl b/dom/chrome-webidl/BrowsingContext.webidl
-index 43f28a6aad9d0dd3e3c908e8472244fc6aa32a74..a6d47522f89589c1e69a8e7570c17b7e05330bb6 100644
+index d0508a8c29e5bd008213f781beb8eb1fcb458fb8..31130786d4f8e22f2327162c001f786a198bf582 100644
--- a/dom/chrome-webidl/BrowsingContext.webidl
+++ b/dom/chrome-webidl/BrowsingContext.webidl
@@ -179,6 +179,10 @@ interface BrowsingContext {
diff --git a/src/dom/chrome-webidl/MediaController-webidl.patch b/src/dom/chrome-webidl/MediaController-webidl.patch
index cd41a9cb5..86de13b0d 100644
--- a/src/dom/chrome-webidl/MediaController-webidl.patch
+++ b/src/dom/chrome-webidl/MediaController-webidl.patch
@@ -1,5 +1,5 @@
diff --git a/dom/chrome-webidl/MediaController.webidl b/dom/chrome-webidl/MediaController.webidl
-index eea39e9f70b1ba216dc5131bc3aa8b6ef46ca5ea..fd24ad430aeb64c4d622b3765af359579a903c40 100644
+index 6063e86e747dac87aafc865af95800daef2a5b9d..7fc4e72ee73a16b9ec2c1b9d11d926246fb7f7b6 100644
--- a/dom/chrome-webidl/MediaController.webidl
+++ b/dom/chrome-webidl/MediaController.webidl
@@ -23,6 +23,12 @@ enum MediaControlKey {
diff --git a/src/dom/html/HTMLInputElement-cpp.patch b/src/dom/html/HTMLInputElement-cpp.patch
index cae2a6ce0..ff16925cf 100644
--- a/src/dom/html/HTMLInputElement-cpp.patch
+++ b/src/dom/html/HTMLInputElement-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
-index 3374a88b9335de1659df548fe8c18610f675b336..540f22697e7b85bca2fd6d3fe952ed3944216e17 100644
+index e3698a2cbcfd13ce6075e0a155c46191dfc15a57..99c46e11bb80224986c757ab9a9a7dca4d8982d5 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -768,7 +768,7 @@ static void SerializeColorForHTMLCompatibility(const StyleAbsoluteColor& aColor,
diff --git a/src/dom/media/mediacontrol/MediaController-cpp.patch b/src/dom/media/mediacontrol/MediaController-cpp.patch
index 4f9cf1b75..2960c6f49 100644
--- a/src/dom/media/mediacontrol/MediaController-cpp.patch
+++ b/src/dom/media/mediacontrol/MediaController-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/dom/media/mediacontrol/MediaController.cpp b/dom/media/mediacontrol/MediaController.cpp
-index f28ec5e406bfeefd624c9538878d423e99b0df6a..afb60df8ddec86c0c83584b8325add8d1c373d0e 100644
+index e7fd71ac228370e4805f86d213e40c13e1520ad3..c82d485f1c30af1b4879c18fd4e33e0017cb6abc 100644
--- a/dom/media/mediacontrol/MediaController.cpp
+++ b/dom/media/mediacontrol/MediaController.cpp
@@ -49,6 +49,25 @@ void MediaController::GetSupportedKeys(
@@ -28,7 +28,7 @@ index f28ec5e406bfeefd624c9538878d423e99b0df6a..afb60df8ddec86c0c83584b8325add8d
void MediaController::GetMetadata(MediaMetadataInit& aMetadata,
ErrorResult& aRv) {
if (!IsActive() || mShutdown) {
-@@ -435,6 +454,7 @@ void MediaController::SetIsInPictureInPictureMode(
+@@ -457,6 +476,7 @@ void MediaController::SetIsInPictureInPictureMode(
ForceToBecomeMainControllerIfNeeded();
UpdateDeactivationTimerIfNeeded();
mPictureInPictureModeChangedEvent.Notify(mIsInPictureInPictureMode);
diff --git a/src/dom/media/mediacontrol/MediaController-h.patch b/src/dom/media/mediacontrol/MediaController-h.patch
index dffc7d160..b5d62cfd3 100644
--- a/src/dom/media/mediacontrol/MediaController-h.patch
+++ b/src/dom/media/mediacontrol/MediaController-h.patch
@@ -1,5 +1,5 @@
diff --git a/dom/media/mediacontrol/MediaController.h b/dom/media/mediacontrol/MediaController.h
-index ea05df396bcaa8f5e236105585c0a177496c8bd9..e064f279383004bdbdb030ecb23289a893c11a8c 100644
+index 101c952b23cb67b9fe911eefa3f78a88f5b6378c..e2c3d511f505bd9739bba7315f4f248effb77400 100644
--- a/dom/media/mediacontrol/MediaController.h
+++ b/dom/media/mediacontrol/MediaController.h
@@ -91,6 +91,7 @@ class MediaController final : public DOMEventTargetHelper,
@@ -9,4 +9,4 @@ index ea05df396bcaa8f5e236105585c0a177496c8bd9..e064f279383004bdbdb030ecb23289a8
+ void GetPositionState(MediaControllerPositionState& aPositionState, ErrorResult& aRv);
IMPL_EVENT_HANDLER(activated);
IMPL_EVENT_HANDLER(deactivated);
- IMPL_EVENT_HANDLER(metadatachange);
+ IMPL_EVENT_HANDLER(audiblechange);
diff --git a/src/dom/media/mediacontrol/MediaStatusManager-cpp.patch b/src/dom/media/mediacontrol/MediaStatusManager-cpp.patch
index 4ec84b181..c32f7b95d 100644
--- a/src/dom/media/mediacontrol/MediaStatusManager-cpp.patch
+++ b/src/dom/media/mediacontrol/MediaStatusManager-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/dom/media/mediacontrol/MediaStatusManager.cpp b/dom/media/mediacontrol/MediaStatusManager.cpp
-index c1282b8b1d99327df972c8f0aa848816fcbc4b2b..acaaff389838886267f96993a7f0d27950f08624 100644
+index 9348a0b69e4d389b92931d46ba6c1849d6883450..920a0b2ebc7ac3c4ecd0245903ccb1d8d4258820 100644
--- a/dom/media/mediacontrol/MediaStatusManager.cpp
+++ b/dom/media/mediacontrol/MediaStatusManager.cpp
-@@ -427,7 +427,8 @@ void MediaStatusManager::UpdateGuessedPositionState(
+@@ -431,7 +431,8 @@ void MediaStatusManager::UpdateGuessedPositionState(
return;
}
diff --git a/src/dom/media/mediaelement/HTMLMediaElement-cpp.patch b/src/dom/media/mediaelement/HTMLMediaElement-cpp.patch
index 201e8ea6c..8fd51cb02 100644
--- a/src/dom/media/mediaelement/HTMLMediaElement-cpp.patch
+++ b/src/dom/media/mediaelement/HTMLMediaElement-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/dom/media/mediaelement/HTMLMediaElement.cpp b/dom/media/mediaelement/HTMLMediaElement.cpp
-index 6ea902b7423bb105f23c0cd2092c40938174e4a3..9a1fe4b3fabc23022bb17ffa801d48cd1e6a5b60 100644
+index b4ab1622d0e58781929aa6801dfd374f42567a7a..358f3d3cac3381ab9de3af65616095f69b9c7b23 100644
--- a/dom/media/mediaelement/HTMLMediaElement.cpp
+++ b/dom/media/mediaelement/HTMLMediaElement.cpp
@@ -450,6 +450,7 @@ class HTMLMediaElement::MediaControlKeyListener final
@@ -10,7 +10,7 @@ index 6ea902b7423bb105f23c0cd2092c40938174e4a3..9a1fe4b3fabc23022bb17ffa801d48cd
NotifyAudibleStateChanged(mIsOwnerAudible
? MediaAudibleState::eAudible
: MediaAudibleState::eInaudible);
-@@ -7442,6 +7443,9 @@ void HTMLMediaElement::FireTimeUpdate(TimeupdateType aType) {
+@@ -7450,6 +7451,9 @@ void HTMLMediaElement::FireTimeUpdate(TimeupdateType aType) {
QueueTask(std::move(runner));
mQueueTimeUpdateRunnerTime = TimeStamp::Now();
mLastCurrentTime = CurrentTime();
diff --git a/src/eslint-file-globals-config-mjs.patch b/src/eslint-file-globals-config-mjs.patch
index 8754ddbe9..5eb4a2eda 100644
--- a/src/eslint-file-globals-config-mjs.patch
+++ b/src/eslint-file-globals-config-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/eslint-file-globals.config.mjs b/eslint-file-globals.config.mjs
-index c17a96adb86eff46c8dafc5cbef83eb10b5fbeeb..4d00012889a846fabfd9172fb05459318e4b4746 100644
+index bf1341a84382380d45b936aeffde3f167301a9ed..b6aa373252888dcdefd528a40329f1959086d8e5 100644
--- a/eslint-file-globals.config.mjs
+++ b/eslint-file-globals.config.mjs
@@ -22,6 +22,7 @@
@@ -10,7 +10,7 @@ index c17a96adb86eff46c8dafc5cbef83eb10b5fbeeb..4d00012889a846fabfd9172fb0545931
export default [
{
-@@ -549,4 +550,9 @@ export default [
+@@ -550,4 +551,9 @@ export default [
],
languageOptions: { globals: globals.worker },
},
diff --git a/src/eslint-test-paths-config-mjs.patch b/src/eslint-test-paths-config-mjs.patch
index 9c26e3f16..2c86988e6 100644
--- a/src/eslint-test-paths-config-mjs.patch
+++ b/src/eslint-test-paths-config-mjs.patch
@@ -1,8 +1,8 @@
diff --git a/eslint-test-paths.config.mjs b/eslint-test-paths.config.mjs
-index 7a87fec812ea8ddea5c10dca53af560e7dc6385b..2b943b031ebd30e06e2aa1043aed13c11bd10db1 100644
+index 0d3bd58e7fb9802223588a46fd83ae6b8e14837f..b8f91f6a6d52d58b47c7556650910f3ac0ec2842 100644
--- a/eslint-test-paths.config.mjs
+++ b/eslint-test-paths.config.mjs
-@@ -218,6 +218,7 @@ const extraBrowserTestPaths = [
+@@ -219,6 +219,7 @@ const extraBrowserTestPaths = [
"toolkit/components/windowwatcher/test/",
"toolkit/mozapps/extensions/test/xpinstall/",
"uriloader/exthandler/tests/mochitest/",
diff --git a/src/external-patches/firefox/allow_backdrop_to_work_on_transparency.patch b/src/external-patches/firefox/allow_backdrop_to_work_on_transparency.patch
index 3829c41c2..20ebb535c 100644
--- a/src/external-patches/firefox/allow_backdrop_to_work_on_transparency.patch
+++ b/src/external-patches/firefox/allow_backdrop_to_work_on_transparency.patch
@@ -64,7 +64,7 @@ diff --git a/gfx/wr/webrender/src/device/gl.rs b/gfx/wr/webrender/src/device/gl.
diff --git a/gfx/wr/webrender/src/renderer/init.rs b/gfx/wr/webrender/src/renderer/init.rs
--- a/gfx/wr/webrender/src/renderer/init.rs
+++ b/gfx/wr/webrender/src/renderer/init.rs
-@@ -204,10 +204,12 @@
+@@ -204,6 +204,8 @@
pub low_quality_pinch_zoom: bool,
pub max_shared_surface_size: i32,
/// If true, open a debug socket to listen for remote debugger.
@@ -72,19 +72,14 @@ diff --git a/gfx/wr/webrender/src/renderer/init.rs b/gfx/wr/webrender/src/render
pub enable_debugger: bool,
+ /// See explanation of `gfx.webrender.opaque-backdrop-fallback`.
+ pub opaque_backdrop_fallback: bool,
-
- /// Use the new quad primitive path for box-shadow blur rendering.
- pub use_quad_box_shadow: bool,
}
-
-@@ -277,10 +279,11 @@
+@@ -277,9 +279,10 @@
enable_instancing: true,
reject_software_rasterizer: false,
low_quality_pinch_zoom: false,
max_shared_surface_size: 2048,
enable_debugger: true,
+ opaque_backdrop_fallback: false,
- use_quad_box_shadow: true,
}
}
}
diff --git a/src/external-patches/firefox/bug_2013682_allow_stacking_contexts_to_be_promoted.patch b/src/external-patches/firefox/bug_2013682_allow_stacking_contexts_to_be_promoted.patch
deleted file mode 100644
index adc2d5903..000000000
--- a/src/external-patches/firefox/bug_2013682_allow_stacking_contexts_to_be_promoted.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-diff --git a/gfx/wr/webrender/src/clip.rs b/gfx/wr/webrender/src/clip.rs
---- a/gfx/wr/webrender/src/clip.rs
-+++ b/gfx/wr/webrender/src/clip.rs
-@@ -97,11 +97,11 @@
- use api::units::*;
- use crate::image_tiling::{self, Repetition};
- use crate::border::{ensure_no_corner_overlap, BorderRadiusAu};
- use crate::box_shadow::{BLUR_SAMPLE_SCALE, BoxShadowClipSource, BoxShadowCacheKey};
- use crate::renderer::GpuBufferBuilderF;
--use crate::spatial_tree::{SpatialTree, SpatialNodeIndex};
-+use crate::spatial_tree::{SceneSpatialTree, SpatialTree, SpatialNodeIndex};
- use crate::ellipse::Ellipse;
- use crate::gpu_types::{BoxShadowStretchMode};
- use crate::intern;
- use crate::internal_types::{FastHashMap, FastHashSet, LayoutPrimitiveInfo};
- use crate::prim_store::{VisibleMaskImageTile};
-@@ -745,10 +745,56 @@
- ) -> bool {
- let clip_chain_index = self.clip_chain_map[&clip_chain_id];
- self.has_complex_clips_impl(clip_chain_index, interners)
- }
-
-+ /// Check if all complex clips in a clip chain are fixed-position rounded
-+ /// rectangles (in Clip mode). When true, the intermediate surface for a
-+ /// root-level stacking context can be skipped because the clips will be
-+ /// promoted to compositor clips on the tile cache slices.
-+ pub fn clip_chain_complex_clips_are_promotable(
-+ &self,
-+ clip_chain_id: ClipChainId,
-+ interners: &Interners,
-+ spatial_tree: &SceneSpatialTree,
-+ ) -> bool {
-+ let clip_chain_index = self.clip_chain_map[&clip_chain_id];
-+ self.complex_clips_are_promotable_impl(clip_chain_index, interners, spatial_tree)
-+ }
-+
-+ fn complex_clips_are_promotable_impl(
-+ &self,
-+ clip_chain_index: usize,
-+ interners: &Interners,
-+ spatial_tree: &SceneSpatialTree,
-+ ) -> bool {
-+ let mut index = clip_chain_index;
-+
-+ loop {
-+ let clip_chain = &self.clip_chains[index];
-+
-+ for clip_entry in &clip_chain.clips {
-+ let clip_info = &interners.clip[clip_entry.handle];
-+
-+ match clip_info.key.kind {
-+ ClipItemKeyKind::Rectangle(_, ClipMode::Clip) => {}
-+ ClipItemKeyKind::RoundedRectangle(_, _, ClipMode::Clip) => {
-+ if !spatial_tree.is_root_coord_system(clip_entry.spatial_node_index) {
-+ return false;
-+ }
-+ }
-+ _ => return false,
-+ }
-+ }
-+
-+ match clip_chain.parent {
-+ Some(parent) => index = parent,
-+ None => return true,
-+ }
-+ }
-+ }
-+
- /// Check if a clip-node has complex (non-rectangular) clips
- pub fn clip_node_has_complex_clips(
- &self,
- clip_node_id: ClipNodeId,
- interners: &Interners,
-diff --git a/gfx/wr/webrender/src/scene_building.rs b/gfx/wr/webrender/src/scene_building.rs
---- a/gfx/wr/webrender/src/scene_building.rs
-+++ b/gfx/wr/webrender/src/scene_building.rs
-@@ -2369,11 +2369,26 @@
-
- // If this stacking context has any complex clips, we need to draw it
- // to an off-screen surface.
- if let Some(clip_chain_id) = clip_chain_id {
- if self.clip_tree_builder.clip_chain_has_complex_clips(clip_chain_id, &self.interners) {
-- blit_reason |= BlitReason::CLIP;
-+ // At the root level, if all complex clips are fixed-position
-+ // rounded rectangles, we can skip the intermediate surface.
-+ // The clips will be promoted to compositor clips on the tile
-+ // cache slices, which applies them once to the composited
-+ // surface — equivalent to the intermediate surface approach.
-+ // This allows tile cache barriers to fire normally, enabling
-+ // proper picture caching with multiple slices.
-+ if !self.sc_stack.is_empty() ||
-+ !self.clip_tree_builder.clip_chain_complex_clips_are_promotable(
-+ clip_chain_id,
-+ &self.interners,
-+ &self.spatial_tree,
-+ )
-+ {
-+ blit_reason |= BlitReason::CLIP;
-+ }
- }
- }
-
- // Check if we know this stacking context is redundant (doesn't need a surface)
- // The check for blend-container redundancy is more involved so it's handled below.
diff --git a/src/external-patches/firefox/native_macos_popovers/D284084.patch b/src/external-patches/firefox/native_macos_popovers/D284084.patch
deleted file mode 100644
index 59e6e31fb..000000000
--- a/src/external-patches/firefox/native_macos_popovers/D284084.patch
+++ /dev/null
@@ -1,669 +0,0 @@
-diff --git a/browser/base/content/main-popupset.inc.xhtml b/browser/base/content/main-popupset.inc.xhtml
---- a/browser/base/content/main-popupset.inc.xhtml
-+++ b/browser/base/content/main-popupset.inc.xhtml
-@@ -192,10 +192,11 @@
-
-
-
-
-
-
-@@ -203,10 +204,11 @@
-
-
-
-
-
-
-
-@@ -610,10 +612,11 @@
- type="arrow"
- orient="vertical"
- noautofocus="true"
- norolluponanchor="true"
- consumeoutsideclicks="false"
-+ nonnativepopover="true"
- role="tooltip">
-
-
-
-
-diff --git a/browser/components/asrouter/modules/FeatureCallout.sys.mjs b/browser/components/asrouter/modules/FeatureCallout.sys.mjs
---- a/browser/components/asrouter/modules/FeatureCallout.sys.mjs
-+++ b/browser/components/asrouter/modules/FeatureCallout.sys.mjs
-@@ -1054,10 +1054,11 @@
- noautofocus="true"
- flip="slide"
- type="arrow"
- consumeoutsideclicks="never"
- norolluponanchor="true"
-+
- position="${panel_position.panel_position_string}"
- ${hide_arrow ? "" : 'show-arrow=""'}
- ${autohide ? "" : 'noautohide="true"'}
- ${ignorekeys ? 'ignorekeys="true"' : ""}
- ${no_open_on_anchor ? 'no-open-on-anchor=""' : ""}
-diff --git a/browser/components/customizableui/content/panelUI.inc.xhtml b/browser/components/customizableui/content/panelUI.inc.xhtml
---- a/browser/components/customizableui/content/panelUI.inc.xhtml
-+++ b/browser/components/customizableui/content/panelUI.inc.xhtml
-@@ -276,10 +276,11 @@
- role="group"
- type="arrow"
- hidden="true"
- flip="slide"
- position="bottomright topright"
-+ hidepopovertail="true"
- noautofocus="true">
-
-
-diff --git a/dom/xul/XULPopupElement.cpp b/dom/xul/XULPopupElement.cpp
---- a/dom/xul/XULPopupElement.cpp
-+++ b/dom/xul/XULPopupElement.cpp
-@@ -80,10 +80,14 @@
- }
-
- void XULPopupElement::OpenPopupAtScreen(int32_t aXPos, int32_t aYPos,
- bool aIsContextMenu,
- Event* aTriggerEvent) {
-+ // TODO(cheff): At nsCocoaWindow::Show but we check for ShouldShowAsNSPopover
-+ // to determine whether to use a native popover or not. This should sort of
-+ // "replicate" that logic here, but it's a bit of a hacky way.
-+ SetAttr(kNameSpaceID_None, nsGkAtoms::nonnativepopover, u"true"_ns, true);
- nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
- if (pm) {
- pm->ShowPopupAtScreen(this, aXPos, aYPos, aIsContextMenu, aTriggerEvent);
- }
- }
-@@ -93,10 +97,14 @@
- int32_t aWidth, int32_t aHeight,
- bool aIsContextMenu,
- bool aAttributesOverride,
- Event* aTriggerEvent) {
- nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
-+ // TODO: See OpenPopupAtScreen. We should remove this and use the other
-+ // implementation because this is a bit of a hacky way to determine whether to
-+ // use a native popover or not.
-+ SetAttr(kNameSpaceID_None, nsGkAtoms::nonnativepopover, u"true"_ns, true);
- if (pm) {
- pm->ShowPopupAtScreenRect(
- this, aPosition, nsIntRect(aXPos, aYPos, aWidth, aHeight),
- aIsContextMenu, aAttributesOverride, aTriggerEvent);
- }
-diff --git a/layout/xul/nsMenuPopupFrame.h b/layout/xul/nsMenuPopupFrame.h
---- a/layout/xul/nsMenuPopupFrame.h
-+++ b/layout/xul/nsMenuPopupFrame.h
-@@ -528,18 +528,10 @@
-
- // Move the popup to the position specified in its |left| and |top|
- // attributes.
- void MoveToAttributePosition();
-
-- // Returns true if the popup should try to remain at the same relative
-- // location as the anchor while it is open. If the anchor becomes hidden
-- // either directly or indirectly because a parent popup or other element
-- // is no longer visible, or a parent deck page is changed, the popup hides
-- // as well. The second variation also sets the anchor rectangle, relative to
-- // the popup frame.
-- bool ShouldFollowAnchor() const;
--
- nsIFrame* GetAnchorFrame() const;
-
- public:
- /**
- * Return whether the popup direction should be RTL.
-@@ -548,10 +540,18 @@
- *
- * Return whether the popup direction should be RTL.
- */
- bool IsDirectionRTL() const;
-
-+ // Returns true if the popup should try to remain at the same relative
-+ // location as the anchor while it is open. If the anchor becomes hidden
-+ // either directly or indirectly because a parent popup or other element
-+ // is no longer visible, or a parent deck page is changed, the popup hides
-+ // as well. The second variation also sets the anchor rectangle, relative to
-+ // the popup frame.
-+ bool ShouldFollowAnchor() const;
-+
- bool ShouldFollowAnchor(nsRect& aRect);
-
- // Returns parent menu widget for submenus that are in the same
- // frame hierarchy, it's needed for Linux/Wayland which demands
- // strict popup windows hierarchy.
-diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
---- a/modules/libpref/init/StaticPrefList.yaml
-+++ b/modules/libpref/init/StaticPrefList.yaml
-@@ -19672,10 +19672,19 @@
- value: true
- mirror: always
-
- #ifdef XP_MACOSX
-
-+# If true, use native NSPopover for arrow panel popups (type="arrow") on macOS
-+# Someone like Zen browser will use this pref by default, so
-+# please take this into account when you change the behavior of
-+# native popover. Note: Only panels with type="arrow" will use NSPopover.
-+- name: widget.macos.native-popovers
-+ type: RelaxedAtomicBool
-+ value: false
-+ mirror: always
-+
- # Whether to shift by the menubar height on fullscreen mode.
- # 0: never
- # 1: always
- # 2: auto (tries to detect when it is needed)
- - name: widget.macos.shift-by-menubar-on-fullscreen
-diff --git a/toolkit/themes/shared/global-shared.css b/toolkit/themes/shared/global-shared.css
---- a/toolkit/themes/shared/global-shared.css
-+++ b/toolkit/themes/shared/global-shared.css
-@@ -72,10 +72,22 @@
- --menuitem-border-radius: var(--panel-menuitem-border-radius);
- --menuitem-padding: var(--panel-menuitem-padding);
- --menuitem-margin: var(--panel-menuitem-margin);
- }
-
-+/* stylelint-disable-next-line media-query-no-invalid */
-+@media -moz-pref("widget.macos.native-popovers") and (-moz-platform: macos) {
-+ panel:not(:where([nonnativepopover="true"])) {
-+ background-color: transparent;
-+ --panel-background: transparent;
-+ --panel-shadow: none;
-+ --panel-border-color: transparent;
-+ --panel-shadow-margin: 0px;
-+
-+ }
-+}
-+
- /* Lightweight theme roots */
-
- :root[lwtheme] {
- body,
- toolbar,
-diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h
---- a/widget/cocoa/nsCocoaWindow.h
-+++ b/widget/cocoa/nsCocoaWindow.h
-@@ -132,23 +132,38 @@
- // to create its "frame view".
- + (Class)frameViewClassForStyleMask:(NSUInteger)styleMask;
-
- @end
-
--@interface PopupWindow : BaseWindow {
-+@interface PopupWindow : BaseWindow {
- @private
- BOOL mIsContextMenu;
-+
-+ // NSPopover support for native appearance
-+ NSPopover* mPopover;
-+ NSViewController* mPopoverViewController;
-+ BOOL mUsePopover;
- }
-
- - (id)initWithContentRect:(NSRect)contentRect
- styleMask:(NSUInteger)styleMask
- backing:(NSBackingStoreType)bufferingType
- defer:(BOOL)deferCreation;
- - (BOOL)isContextMenu;
- - (void)setIsContextMenu:(BOOL)flag;
- - (BOOL)canBecomeMainWindow;
-
-+// NSPopover support
-+- (void)setAllowPopover;
-+- (BOOL)usePopover;
-+- (void)showPopoverRelativeToRect:(NSRect)positioningRect
-+ ofView:(NSView*)positioningView
-+ preferredEdge:(NSRectEdge)preferredEdge
-+ hiddenAnchor:(BOOL)hiddenAnchor;
-+- (void)closePopover;
-+- (void)updatePopoverContent;
-+
- @end
-
- @interface BorderlessWindow : BaseWindow {
- }
-
-@@ -200,10 +215,14 @@
- typedef nsIWidget Inherited;
-
- public:
- nsCocoaWindow();
-
-+ // Check if this window should use NSPopover for popup/menu display
-+ bool ShouldUseNSPopover() const;
-+ bool ShouldShowAsNSPopover() const override;
-+
- [[nodiscard]] nsresult Create(nsIWidget* aParent, const DesktopIntRect& aRect,
- const InitData&) override;
-
- [[nodiscard]] nsresult Create(nsIWidget* aParent,
- const LayoutDeviceIntRect& aRect,
-diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
---- a/widget/cocoa/nsCocoaWindow.mm
-+++ b/widget/cocoa/nsCocoaWindow.mm
-@@ -4,10 +4,13 @@
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
- #include "nsCocoaWindow.h"
-
- #include "nsArrayUtils.h"
-+#include "nsMenuPopupFrame.h"
-+#include "nsDeviceContext.h"
-+#include "mozilla/dom/XULPopupElement.h"
- #include "MOZDynamicCursor.h"
- #include "nsIAppStartup.h"
- #include "nsIDOMWindowUtils.h"
- #include "nsILocalFileMac.h"
- #include "CocoaCompositorWidget.h"
-@@ -5031,10 +5034,15 @@
- if (mWindowType == WindowType::Popup) {
- SetPopupWindowLevel();
- mWindow.backgroundColor = NSColor.clearColor;
- mWindow.opaque = NO;
-
-+ // Enable NSPopover for panel popup types when preference is enabled
-+ if ([mWindow isKindOfClass:[PopupWindow class]] && ShouldUseNSPopover()) {
-+ [(PopupWindow*)mWindow setAllowPopover];
-+ }
-+
- // When multiple spaces are in use and the browser is assigned to a
- // particular space, override the "Assign To" space and display popups on
- // the active space. Does not work with multiple displays. See
- // NeedsRecreateToReshow() for multi-display with multi-space workaround.
- mWindow.collectionBehavior = mWindow.collectionBehavior |
-@@ -5236,10 +5244,57 @@
- NS_OBJC_END_TRY_IGNORE_BLOCK;
- }
-
- bool nsCocoaWindow::IsRunningAppModal() { return [NSApp _isRunningAppModal]; }
-
-+static NSRectEdge AlignmentPositionToNSRectEdge(int8_t aPosition) {
-+ switch (aPosition) {
-+ case POPUPPOSITION_BEFORESTART:
-+ case POPUPPOSITION_BEFOREEND:
-+ return NSRectEdgeMaxY;
-+ case POPUPPOSITION_AFTERSTART:
-+ case POPUPPOSITION_AFTEREND:
-+ return NSRectEdgeMinY;
-+ case POPUPPOSITION_STARTBEFORE:
-+ case POPUPPOSITION_STARTAFTER:
-+ return NSRectEdgeMaxX;
-+ case POPUPPOSITION_ENDBEFORE:
-+ case POPUPPOSITION_ENDAFTER:
-+ return NSRectEdgeMinX;
-+ default:
-+ return NSRectEdgeMinY;
-+ }
-+}
-+
-+static void SyncPopoverBounds(NSPopover* aPopover,
-+ nsMenuPopupFrame* aPopupFrame) {
-+ if (!aPopover || !aPopover.shown || !aPopupFrame) {
-+ return;
-+ }
-+ NSWindow* popoverWindow = aPopover.contentViewController.view.window;
-+ if (!popoverWindow) {
-+ return;
-+ }
-+
-+ // Synchronize the popup frame's internal bounds with the actual bounds that
-+ // macOS calculated for the popover.
-+ NSView* contentView = popoverWindow.contentView;
-+ NSRect contentFrame = [contentView convertRect:contentView.bounds toView:nil];
-+ NSRect windowFrame = [popoverWindow convertRectToScreen:contentFrame];
-+
-+ CGFloat backingScale = popoverWindow.backingScaleFactor;
-+ mozilla::LayoutDeviceIntRect devPixRect =
-+ nsCocoaUtils::CocoaRectToGeckoRectDevPix(windowFrame, backingScale);
-+
-+ nsPresContext* presContext = aPopupFrame->PresContext();
-+ mozilla::CSSIntPoint cssPos =
-+ presContext->DevPixelsToIntCSSPixels(devPixRect.TopLeft());
-+
-+ aPopupFrame->MoveTo(mozilla::CSSPoint(cssPos.x, cssPos.y),
-+ /* aUpdateAttrs */ false);
-+}
-+
- // Hide or show this window
- void nsCocoaWindow::Show(bool aState) {
- NS_OBJC_BEGIN_TRY_IGNORE_BLOCK;
-
- if (!mWindow) {
-@@ -5300,10 +5355,58 @@
- mWindow.contentView.needsDisplay = YES;
- if (!nativeParentWindow || mPopupLevel != PopupLevel::Parent) {
- [mWindow orderFront:nil];
- }
- NS_OBJC_END_TRY_IGNORE_BLOCK;
-+ if (ShouldShowAsNSPopover() && nativeParentWindow) {
-+ nsMenuPopupFrame* popupFrame = GetPopupFrame();
-+ NSRectEdge preferredEdge =
-+ AlignmentPositionToNSRectEdge(popupFrame->GetAlignmentPosition());
-+ nsRect anchorRectAppUnits = popupFrame->GetUntransformedAnchorRect();
-+ nsPresContext* pc = popupFrame->PresContext();
-+ int32_t appUnitsPerDevPixel = pc->AppUnitsPerDevPixel();
-+ mozilla::DesktopToLayoutDeviceScale desktopToLayoutScale =
-+ pc->DeviceContext()->GetDesktopToDeviceScale();
-+ mozilla::DesktopIntRect popupAnchorRectScaled =
-+ mozilla::DesktopIntRect::RoundOut(
-+ mozilla::LayoutDeviceRect::FromAppUnits(anchorRectAppUnits,
-+ appUnitsPerDevPixel) /
-+ desktopToLayoutScale);
-+ // Taking the now correctly scaled anchor rect and turning it into a
-+ // gecko rect this accounts for the y-axis inversion that cocoa needs,
-+ // as the origin is in the bottom left. This rect is in screen space
-+ NSRect cocoaScreenRect =
-+ nsCocoaUtils::GeckoRectToCocoaRect(popupAnchorRectScaled);
-+ // We take the screen space rect and convert it to window space
-+ // coordinates, as NSPopover requires the coordinates to be in view
-+ // space and inside the view. If the coordinates are outside our view,
-+ // the popover will fail silently
-+ NSRect windowRect =
-+ [nativeParentWindow convertRectFromScreen:cocoaScreenRect];
-+ NSView* parentView = [nativeParentWindow contentView];
-+ // We take the window space rect and convert it to view space for the
-+ // specific parent view
-+ NSRect positioningRect = [parentView convertRect:windowRect
-+ fromView:nil];
-+ BOOL shouldHideAnchor = NO;
-+ auto& element = popupFrame->PopupElement();
-+ if (element.GetBoolAttr(nsGkAtoms::hidepopovertail)) {
-+ shouldHideAnchor = YES;
-+ }
-+ [(PopupWindow*)mWindow showPopoverRelativeToRect:positioningRect
-+ ofView:parentView
-+ preferredEdge:preferredEdge
-+ hiddenAnchor:shouldHideAnchor];
-+ SyncPopoverBounds([(PopupWindow*)mWindow popover], popupFrame);
-+
-+
-+
-+
-+ // Exit early here since the popover is now shown.
-+
-+ return;
-+ }
- // If our popup window is a non-native context menu, tell the OS (and
- // other programs) that a menu has opened. This is how the OS knows to
- // close other programs' context menus when ours open.
- if ([mWindow isKindOfClass:[PopupWindow class]] &&
- [(PopupWindow*)mWindow isContextMenu]) {
-@@ -5373,11 +5476,15 @@
- // unhook it here before ordering it out. When you order out the child
- // of a window it hides the parent window.
- if (mWindowType == WindowType::Popup && nativeParentWindow) {
- [nativeParentWindow removeChildWindow:mWindow];
- }
--
-+ // Handle NSPopover hiding or traditional window hiding
-+ if ([mWindow isKindOfClass:[PopupWindow class]] &&
-+ [(PopupWindow*)mWindow usePopover]) {
-+ [(PopupWindow*)mWindow closePopover];
-+ }
- [mWindow orderOut:nil];
- // If our popup window is a non-native context menu, tell the OS (and
- // other programs) that a menu has closed.
- if ([mWindow isKindOfClass:[PopupWindow class]] &&
- [(PopupWindow*)mWindow isContextMenu]) {
-@@ -5424,10 +5531,28 @@
- return false;
- }
- return nsIWidget::ShouldUseOffMainThreadCompositing();
- }
-
-+bool nsCocoaWindow::ShouldUseNSPopover() const {
-+ // Use NSPopover for panel popups when the preference is enabled
-+ // But not for detached popups - they should use traditional window logic
-+ return (mWindowType == WindowType::Popup && mPopupType == PopupType::Panel &&
-+ mozilla::StaticPrefs::widget_macos_native_popovers());
-+}
-+
-+bool nsCocoaWindow::ShouldShowAsNSPopover() const {
-+ if (!ShouldUseNSPopover()) {
-+ return false;
-+ }
-+ nsMenuPopupFrame* popupFrame = GetPopupFrame();
-+ return [mWindow isKindOfClass:[PopupWindow class]] &&
-+ [(PopupWindow*)mWindow usePopover] && popupFrame &&
-+ popupFrame->ShouldFollowAnchor() &&
-+ !popupFrame->PopupElement().GetBoolAttr(nsGkAtoms::nonnativepopover);
-+}
-+
- TransparencyMode nsCocoaWindow::GetTransparencyMode() {
- NS_OBJC_BEGIN_TRY_BLOCK_RETURN;
-
- return mWindow.isOpaque ? TransparencyMode::Opaque
- : TransparencyMode::Transparent;
-@@ -6378,10 +6503,19 @@
-
- // We ignore aRepaint -- we have to call display:YES, otherwise the
- // title bar doesn't immediately get repainted and is displayed in
- // the wrong place, leading to a visual jump.
- [mWindow setFrame:newFrame display:YES];
-+ if (ShouldUseNSPopover() && [(PopupWindow*)mWindow usePopover]) {
-+ [(PopupWindow*)mWindow updatePopoverContent];
-+ // A popover won't resize by setting the frame
-+ // as it's size is calculated based on the content size
-+ // Therefor the content size has to be changed as well
-+ NSSize contentSize = NSMakeSize(aWidth, aHeight);
-+ [[(PopupWindow*)mWindow popover] setContentSize:contentSize];
-+ SyncPopoverBounds([(PopupWindow*)mWindow popover], GetPopupFrame());
-+ }
-
- NS_OBJC_END_TRY_IGNORE_BLOCK;
- }
-
- void nsCocoaWindow::Resize(const DesktopRect& aRect, bool aRepaint) {
-@@ -8393,18 +8527,31 @@
- backing:bufferingType
- defer:deferCreation];
- if (!self) {
- return nil;
- }
--
-+ mPopover = nil;
-+ mPopoverViewController = nil;
-+ mUsePopover = NO;
- mIsContextMenu = false;
-
- return self;
-
- NS_OBJC_END_TRY_BLOCK_RETURN(nil);
- }
-
-+- (void)dealloc {
-+ if (mPopover) {
-+ ChildViewMouseTracker::OnDestroyWindow(
-+ mPopover.contentViewController.view.window);
-+ }
-+
-+ [mPopover release];
-+ [mPopoverViewController release];
-+ [super dealloc];
-+}
-+
- // Override the private API _backdropBleedAmount. This determines how much the
- // desktop wallpaper contributes to the vibrancy backdrop.
- // Return 0 in order to match what the system does for sheet windows and
- // _NSPopoverWindows.
- - (CGFloat)_backdropBleedAmount {
-@@ -8460,10 +8607,122 @@
-
- - (void)setIsContextMenu:(BOOL)flag {
- mIsContextMenu = flag;
- }
-
-+- (void)setAllowPopover {
-+ mUsePopover = YES;
-+
-+ if (!mPopover) {
-+ mPopover = [[NSPopover alloc] init];
-+
-+ // Use NSPopoverBehaviorApplicationDefined to prevent auto-closing
-+ // when other popovers are opened, and to respect the disable_autohide
-+ // preference
-+ mPopover.behavior = NSPopoverBehaviorApplicationDefined;
-+ mPopover.delegate = self;
-+
-+ // Create view controller that will contain our content view
-+ mPopoverViewController = [[NSViewController alloc] init];
-+
-+ NSView* contentView = self.contentView;
-+ if (contentView) {
-+ // Ensure the content view is properly configured
-+ [contentView
-+ setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
-+
-+ mPopoverViewController.view = contentView;
-+ mPopover.contentViewController = mPopoverViewController;
-+
-+ // Set popover size to match our window content size
-+ NSRect contentRect = [contentView frame];
-+ if (contentRect.size.width > 0 && contentRect.size.height > 0) {
-+ [mPopover setContentSize:contentRect.size];
-+ }
-+ }
-+ }
-+}
-+
-+- (BOOL)usePopover {
-+ return mUsePopover && !mIsContextMenu;
-+}
-+
-+- (void)showPopoverRelativeToRect:(NSRect)positioningRect
-+ ofView:(NSView*)positioningView
-+ preferredEdge:(NSRectEdge)preferredEdge
-+ hiddenAnchor:(BOOL)hiddenAnchor {
-+ NS_OBJC_BEGIN_TRY_IGNORE_BLOCK;
-+ if (!mPopover) {
-+ return;
-+ }
-+
-+ // Close existing popover if it's already shown
-+ if (mPopover.shown) {
-+ [mPopover close];
-+ }
-+
-+ // Force content update before showing
-+ [self updatePopoverContent];
-+
-+ if (mPopoverViewController.view) {
-+ mPopover.behavior = NSPopoverBehaviorApplicationDefined;
-+
-+ // This is a hidden API that prevents the popover from showing its arrow
-+ // pointing to the anchor.
-+ [mPopover setShouldHideAnchor:hiddenAnchor];
-+
-+ [mPopover showRelativeToRect:positioningRect
-+ ofView:positioningView
-+ preferredEdge:preferredEdge];
-+ }
-+
-+ NSWindow* popoverWindow = mPopover.contentViewController.view.window;
-+ [popoverWindow setAcceptsMouseMovedEvents:YES];
-+
-+ NS_OBJC_END_TRY_IGNORE_BLOCK;
-+}
-+
-+- (void)closePopover {
-+ NS_OBJC_BEGIN_TRY_IGNORE_BLOCK;
-+
-+ if (mPopover && mPopover.shown) {
-+ [mPopover close];
-+ }
-+
-+ NS_OBJC_END_TRY_IGNORE_BLOCK;
-+}
-+
-+- (void)updatePopoverContent {
-+ NS_OBJC_BEGIN_TRY_IGNORE_BLOCK;
-+ if (!mPopover || !mPopoverViewController) {
-+ return;
-+ }
-+
-+ NSView* contentView = self.contentView;
-+ if (!contentView) {
-+ return;
-+ }
-+ // Ensure proper hit testing for hover events
-+ [contentView setWantsLayer:YES];
-+ [contentView setAcceptsTouchEvents:YES];
-+
-+ // Update the popover content view to match current window content
-+ mPopoverViewController.view = contentView;
-+
-+ // Update popover size to match content
-+ NSRect contentRect = [contentView frame];
-+ if (contentRect.size.width > 0 && contentRect.size.height > 0) {
-+ mPopover.contentSize = contentRect.size;
-+ }
-+
-+ NS_OBJC_END_TRY_IGNORE_BLOCK;
-+}
-+
-+- (NSPopover*)popover {
-+ return mPopover;
-+}
-+
- - (BOOL)canBecomeMainWindow {
- // This is overridden because the default is 'yes' when a titlebar is present.
- return NO;
- }
-
-diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h
---- a/widget/nsIWidget.h
-+++ b/widget/nsIWidget.h
-@@ -829,10 +829,15 @@
- virtual void SuppressAnimation(bool aSuppress) {}
-
- /** Sets windows-specific mica backdrop on this widget. */
- virtual void SetMicaBackdrop(bool) {}
-
-+ /**
-+ * Determine whether this widget should be shown as an NSPopover.
-+ */
-+ virtual bool ShouldShowAsNSPopover() const { return false; }
-+
- /**
- * Return size mode (minimized, maximized, normalized).
- * Returns a value from nsSizeMode (see nsIWidgetListener.h)
- */
- virtual nsSizeMode SizeMode() = 0;
-diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py
---- a/xpcom/ds/StaticAtoms.py
-+++ b/xpcom/ds/StaticAtoms.py
-@@ -536,10 +536,11 @@
- Atom("hgroup", "hgroup"),
- Atom("hidden", "hidden"),
- Atom("hidechrome", "hidechrome"),
- Atom("hidecolumnpicker", "hidecolumnpicker"),
- Atom("hidetitlebarseparator", "hidetitlebarseparator"),
-+ Atom("hidepopovertail", "hidepopovertail"),
- Atom("hide_popover", "hide-popover"),
- Atom("high", "high"),
- Atom("highest", "highest"),
- Atom("horizontal", "horizontal"),
- Atom("hover", "hover"),
-@@ -759,10 +760,11 @@
- Atom("nohref", "nohref"),
- Atom("noinitialselection", "noinitialselection"),
- Atom("nomodule", "nomodule"),
- Atom("nonce", "nonce"),
- Atom("none", "none"),
-+ Atom("nonnativepopover", "nonnativepopover"),
- Atom("noresize", "noresize"),
- Atom("normal", "normal"),
- Atom("normalizeSpace", "normalize-space"),
- Atom("noscript", "noscript"),
- Atom("noshade", "noshade"),
-
diff --git a/src/external-patches/firefox/native_macos_popovers/D299584.patch b/src/external-patches/firefox/native_macos_popovers_fix.patch
similarity index 78%
rename from src/external-patches/firefox/native_macos_popovers/D299584.patch
rename to src/external-patches/firefox/native_macos_popovers_fix.patch
index a729c092c..d1aad1fa1 100644
--- a/src/external-patches/firefox/native_macos_popovers/D299584.patch
+++ b/src/external-patches/firefox/native_macos_popovers_fix.patch
@@ -1,3 +1,18 @@
+diff --git a/toolkit/themes/shared/global-shared.css b/toolkit/themes/shared/global-shared.css
+--- a/toolkit/themes/shared/global-shared.css
++++ b/toolkit/themes/shared/global-shared.css
+@@ -80,11 +80,10 @@
+ background-color: transparent;
+ --panel-background: transparent;
+ --panel-box-shadow: none;
+ --panel-border-color: transparent;
+ --panel-box-shadow-margin: 0px;
+- --panel-padding: 0px;
+ }
+ }
+
+ /* Lightweight theme roots */
+
diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h
--- a/widget/cocoa/nsCocoaWindow.h
+++ b/widget/cocoa/nsCocoaWindow.h
@@ -23,7 +38,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
return [mWindow isKindOfClass:[PopupWindow class]] &&
[(PopupWindow*)mWindow usePopover] && popupFrame &&
- popupFrame->ShouldFollowAnchor() &&
- !popupFrame->PopupElement().GetBoolAttr(nsGkAtoms::nonnativepopover);
+ !popupFrame->PopupElement().GetBoolAttr(nsGkAtoms::nonnative);
}
TransparencyMode nsCocoaWindow::GetTransparencyMode() {
diff --git a/src/external-patches/firefox/session_store_use_size_hint/D247215.patch b/src/external-patches/firefox/session_store_use_size_hint/D247215.patch
deleted file mode 100644
index 296671395..000000000
--- a/src/external-patches/firefox/session_store_use_size_hint/D247215.patch
+++ /dev/null
@@ -1,251 +0,0 @@
-diff --git a/dom/chrome-webidl/IOUtils.webidl b/dom/chrome-webidl/IOUtils.webidl
---- a/dom/chrome-webidl/IOUtils.webidl
-+++ b/dom/chrome-webidl/IOUtils.webidl
-@@ -93,23 +93,23 @@
- * otherwise rejects with a DOMException.
- */
- [NewObject]
- Promise writeUTF8(DOMString path, UTF8String string, optional WriteOptions options = {});
- /**
-- * Attempts to serialize |value| into a JSON string and encode it as into a
-- * UTF-8 string, then safely write the result to a file at |path|. Works
-- * exactly like |write|.
-+ * Attempts to serialize |value| into a JSON string and encode it as a UTF-8
-+ * string, then safely write the result to a file at |path|. Works exactly
-+ * like |write|.
- *
- * @param path An absolute file path
- * @param value The value to be serialized.
- * @param options Options for writing the file. The "append" mode is not supported.
- *
- * @return Resolves with the number of bytes successfully written to the file,
- * otherwise rejects with a DOMException.
- */
- [NewObject]
-- Promise writeJSON(DOMString path, any value, optional WriteOptions options = {});
-+ Promise writeJSON(DOMString path, any value, optional WriteJSONOptions options = {});
- /**
- * Moves the file from |sourcePath| to |destPath|, creating necessary parents.
- * If |destPath| is a directory, then the source file will be moved into the
- * destination directory.
- *
-@@ -566,10 +566,39 @@
- * If true, compress the data with LZ4-encoding before writing to the file.
- */
- boolean compress = false;
- };
-
-+/**
-+ * Options to be passed to the |IOUtils.writeJSON| method.
-+ */
-+dictionary WriteJSONOptions: WriteOptions {
-+ /**
-+ * An optional length hint that will be used to pre-allocate the buffer that
-+ * will hold the stringified JSON.
-+ *
-+ * This is the *length* and not the size (i.e., it is the number of UTF-16
-+ * codepoints and not the number of bytes).
-+ */
-+ unsigned long long lengthHint = 0;
-+};
-+
-+/**
-+ * Information about a WriteJSON operation.
-+ */
-+dictionary WriteJSONResult {
-+ /**
-+ * The number of bytes written.
-+ */
-+ required unsigned long long size;
-+
-+ /**
-+ * The length of the stringified JSON (in UTF-16 codepoints).
-+ */
-+ required unsigned long long jsonLength;
-+};
-+
- /**
- * Options to be passed to the |IOUtils.move| method.
- */
- dictionary MoveOptions {
- /**
-diff --git a/xpcom/ioutils/IOUtils.h b/xpcom/ioutils/IOUtils.h
---- a/xpcom/ioutils/IOUtils.h
-+++ b/xpcom/ioutils/IOUtils.h
-@@ -92,11 +92,11 @@
- const nsACString& aString, const dom::WriteOptions& aOptions,
- ErrorResult& aError);
-
- static already_AddRefed WriteJSON(
- dom::GlobalObject& aGlobal, const nsAString& aPath,
-- JS::Handle aValue, const dom::WriteOptions& aOptions,
-+ JS::Handle aValue, const dom::WriteJSONOptions& aOptions,
- ErrorResult& aError);
-
- static already_AddRefed Move(dom::GlobalObject& aGlobal,
- const nsAString& aSourcePath,
- const nsAString& aDestPath,
-@@ -734,13 +734,16 @@
- RefPtr mBackupFile;
- RefPtr mTmpFile;
- dom::WriteMode mMode;
- bool mFlush = false;
- bool mCompress = false;
-+ size_t mLengthHint = 0;
-
- static Result FromBinding(
- const dom::WriteOptions& aOptions);
-+ static Result FromBinding(
-+ const dom::WriteJSONOptions& aOptions);
- };
-
- /**
- * Re-implements the file compression and decompression utilities found
- * in toolkit/components/lz4/lz4.js
-diff --git a/xpcom/ioutils/IOUtils.cpp b/xpcom/ioutils/IOUtils.cpp
---- a/xpcom/ioutils/IOUtils.cpp
-+++ b/xpcom/ioutils/IOUtils.cpp
-@@ -587,15 +587,21 @@
- return WriteSync(file, AsBytes(Span(str)), opts);
- });
- });
- }
-
-+static bool AppendJSON(const char16_t* aBuf, uint32_t aLen, void* aStr) {
-+ nsAString* str = static_cast(aStr);
-+
-+ return str->Append(aBuf, aLen, fallible);
-+}
-+
- /* static */
- already_AddRefed IOUtils::WriteJSON(GlobalObject& aGlobal,
- const nsAString& aPath,
- JS::Handle aValue,
-- const WriteOptions& aOptions,
-+ const WriteJSONOptions& aOptions,
- ErrorResult& aError) {
- return WithPromiseAndState(
- aGlobal, aError, [&](Promise* promise, auto& state) {
- nsCOMPtr file = new nsLocalFile();
- REJECT_IF_INIT_PATH_FAILED(file, aPath, promise,
-@@ -621,14 +627,15 @@
- file->HumanReadablePath().get()));
- return;
- }
-
- JSContext* cx = aGlobal.Context();
-- JS::Rooted rootedValue(cx, aValue);
-+ JS::Rooted value(cx, aValue);
- nsString string;
-- if (!nsContentUtils::StringifyJSON(cx, aValue, string,
-- UndefinedIsNullStringLiteral)) {
-+ if (!JS_StringifyWithLengthHint(cx, &value, nullptr,
-+ JS::NullHandleValue, AppendJSON,
-+ &string, opts.mLengthHint)) {
- JS::Rooted exn(cx, JS::UndefinedValue());
- if (JS_GetPendingException(cx, &exn)) {
- JS_ClearPendingException(cx);
- promise->MaybeReject(exn);
- } else {
-@@ -637,22 +644,29 @@
- "Could not serialize object to JSON"_ns));
- }
- return;
- }
-
-- DispatchAndResolve(
-+ DispatchAndResolve(
- state->mEventQueue, promise,
- [file = std::move(file), string = std::move(string),
-- opts = std::move(opts)]() -> Result {
-+ opts = std::move(opts)]() -> Result {
- nsAutoCString utf8Str;
- if (!CopyUTF16toUTF8(string, utf8Str, fallible)) {
- return Err(IOError(
- NS_ERROR_OUT_OF_MEMORY,
- "Failed to write to `%s': could not allocate buffer",
- file->HumanReadablePath().get()));
- }
-- return WriteSync(file, AsBytes(Span(utf8Str)), opts);
-+
-+ uint32_t size =
-+ MOZ_TRY(WriteSync(file, AsBytes(Span(utf8Str)), opts));
-+
-+ dom::WriteJSONResult result;
-+ result.mSize = size;
-+ result.mJsonLength = static_cast(string.Length());
-+ return result;
- });
- });
- }
-
- /* static */
-@@ -2838,10 +2852,20 @@
-
- opts.mCompress = aOptions.mCompress;
- return opts;
- }
-
-+Result
-+IOUtils::InternalWriteOpts::FromBinding(const WriteJSONOptions& aOptions) {
-+ InternalWriteOpts opts =
-+ MOZ_TRY(FromBinding(static_cast(aOptions)));
-+
-+ opts.mLengthHint = aOptions.mLengthHint;
-+
-+ return opts;
-+}
-+
- /* static */
- Result IOUtils::JsBuffer::Create(
- IOUtils::BufferKind aBufferKind, size_t aCapacity) {
- JsBuffer buffer(aBufferKind, aCapacity);
- if (aCapacity != 0 && !buffer.mBuffer) {
-diff --git a/xpcom/ioutils/tests/test_ioutils_read_write_json.html b/xpcom/ioutils/tests/test_ioutils_read_write_json.html
---- a/xpcom/ioutils/tests/test_ioutils_read_write_json.html
-+++ b/xpcom/ioutils/tests/test_ioutils_read_write_json.html
-@@ -140,10 +140,43 @@
- );
-
- await cleanup(filename);
- });
-
-+ add_task(async function test_writeJSON_return() {
-+ const filename = PathUtils.join(PathUtils.tempDir, "test_ioutils_writeJSON_return.tmp");
-+
-+ const obj = { emoji: "☕️ ⚧️ 😀 🖖🏿 🤠 🏳️🌈 🥠 🏴☠️ 🪐" };
-+
-+ const expectedJson = JSON.stringify(obj);
-+ const size = new TextEncoder().encode(expectedJson).byteLength;
-+
-+ {
-+ const result = await IOUtils.writeJSON(filename, obj, { lengthHint: 0 });
-+
-+ is(await IOUtils.readUTF8(filename), expectedJson, "should have written expected JSON");
-+
-+ is(typeof result, "object", "writeJSON returns an object");
-+ ok(result !== null, "writeJSON returns non-null");
-+
-+ ok(Object.hasOwn(result, "size"), "result has size property");
-+ ok(Object.hasOwn(result, "jsonLength"), "result has jsonLength property");
-+
-+ is(result.size, size, "Should have written the expected number of bytes");
-+ is(result.jsonLength, expectedJson.length, "Should have written the expected number of UTF-16 codepoints");
-+ }
-+
-+ {
-+ const result = await IOUtils.writeJSON(filename, obj, { lengthHint: expectedJson.length, compress: true });
-+
-+ isnot(result.size, size, "Should have written a different number of bytes due to compression");
-+ is(result.jsonLength, expectedJson.length, "Should have written the same number of UTF-16 codepoints");
-+ }
-+
-+ await cleanup(filename);
-+ });
-+
- add_task(async function test_append_json() {
- const filename = PathUtils.join(PathUtils.tempDir, "test_ioutils_append_json.tmp");
-
- await IOUtils.writeJSON(filename, OBJECT);
-
-
diff --git a/src/external-patches/firefox/session_store_use_size_hint/D298708.patch b/src/external-patches/firefox/session_store_use_size_hint/D298708.patch
deleted file mode 100644
index 30b4d4b03..000000000
--- a/src/external-patches/firefox/session_store_use_size_hint/D298708.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-diff --git a/browser/components/sessionstore/SessionWriter.sys.mjs b/browser/components/sessionstore/SessionWriter.sys.mjs
---- a/browser/components/sessionstore/SessionWriter.sys.mjs
-+++ b/browser/components/sessionstore/SessionWriter.sys.mjs
-@@ -80,10 +80,14 @@
- return await SessionWriterInternal.wipe();
- } finally {
- unlock();
- }
- },
-+
-+ get _jsonLengthHint() {
-+ return SessionWriterInternal._lastJsonLength;
-+ },
- };
-
- const SessionWriterInternal = {
- // Path to the files used by the SessionWriter
- Paths: null,
-@@ -104,10 +108,14 @@
- /**
- * Number of old upgrade backups that are being kept
- */
- maxUpgradeBackups: null,
-
-+ // Estimated JSON string length from the previous write, used to pre-size
-+ // the serialization buffer and avoid incremental reallocations.
-+ _lastJsonLength: 0,
-+
- /**
- * Initialize (or reinitialize) the writer.
- *
- * @param {string} origin Which of sessionstore.js or its backups
- * was used. One of the `STATE_*` constants defined above.
-@@ -201,48 +209,60 @@
- }
- }
-
- let startWriteMs = Date.now();
- let fileStat;
-+ // Add 5% headroom to the hint so small growth between saves doesn't
-+ // cause reallocs. The compressed-size-based estimate already has
-+ // sufficient margin from the 4x multiplier.
-+ let jsonLengthHint = Math.ceil(this._lastJsonLength * 1.05);
-+
-+ let uncompressedBytes;
-
- if (options.isFinalWrite) {
- // We are shutting down. At this stage, we know that
- // $Paths.clean is either absent or corrupted. If it was
- // originally present and valid, it has been moved to
- // $Paths.cleanBackup a long time ago. We can therefore write
- // with the guarantees that we erase no important data.
-- await IOUtils.writeJSON(this.Paths.clean, state, {
-+ uncompressedBytes = await IOUtils.writeJSON(this.Paths.clean, state, {
- tmpPath: this.Paths.clean + ".tmp",
- compress: true,
-+ jsonLengthHint,
- });
- fileStat = await IOUtils.stat(this.Paths.clean);
- } else if (this.state == STATE_RECOVERY) {
- // At this stage, either $Paths.recovery was written >= 15
- // seconds ago during this session or we have just started
- // from $Paths.recovery left from the previous session. Either
- // way, $Paths.recovery is good. We can move $Path.backup to
- // $Path.recoveryBackup without erasing a good file with a bad
- // file.
-- await IOUtils.writeJSON(this.Paths.recovery, state, {
-+ uncompressedBytes = await IOUtils.writeJSON(this.Paths.recovery, state, {
- tmpPath: this.Paths.recovery + ".tmp",
- backupFile: this.Paths.recoveryBackup,
- compress: true,
-+ jsonLengthHint,
- });
- fileStat = await IOUtils.stat(this.Paths.recovery);
- } else {
- // In other cases, either $Path.recovery is not necessary, or
- // it doesn't exist or it has been corrupted. Regardless,
- // don't backup $Path.recovery.
-- await IOUtils.writeJSON(this.Paths.recovery, state, {
-+ uncompressedBytes = await IOUtils.writeJSON(this.Paths.recovery, state, {
- tmpPath: this.Paths.recovery + ".tmp",
- compress: true,
-+ jsonLengthHint,
- });
- fileStat = await IOUtils.stat(this.Paths.recovery);
- }
-
- telemetry.writeFileMs = Date.now() - startWriteMs;
- telemetry.fileSizeBytes = fileStat.size;
-+ // Use the actual pre-compression size from this write as the hint
-+ // for the next write's buffer allocation.
-+ this._lastJsonLength = uncompressedBytes;
- lazy.sessionStoreLogger.debug(
- `SessionWriter.write wrote ${telemetry.fileSizeBytes} bytes in ${telemetry.writeFileMs}ms`
- );
- } catch (ex) {
- // Don't throw immediately
-@@ -375,10 +395,11 @@
- } catch (ex) {
- exn = exn || ex;
- }
-
- this.state = STATE_EMPTY;
-+ this._lastJsonLength = 0;
- if (exn) {
- throw exn;
- }
-
- return { result: true };
-diff --git a/browser/components/sessionstore/test/unit/test_write_json_length_hint.js b/browser/components/sessionstore/test/unit/test_write_json_length_hint.js
-new file mode 100644
---- /dev/null
-+++ b/browser/components/sessionstore/test/unit/test_write_json_length_hint.js
-@@ -0,0 +1,73 @@
-+/* Any copyright is dedicated to the Public Domain.
-+ http://creativecommons.org/publicdomain/zero/1.0/ */
-+
-+"use strict";
-+
-+const { SessionWriter } = ChromeUtils.importESModule(
-+ "resource:///modules/sessionstore/SessionWriter.sys.mjs"
-+);
-+
-+const profd = do_get_profile();
-+const { SessionFile } = ChromeUtils.importESModule(
-+ "resource:///modules/sessionstore/SessionFile.sys.mjs"
-+);
-+
-+const { updateAppInfo } = ChromeUtils.importESModule(
-+ "resource://testing-common/AppInfo.sys.mjs"
-+);
-+updateAppInfo({
-+ name: "SessionRestoreTest",
-+ ID: "{230de50e-4cd1-11dc-8314-0800200c9a66}",
-+ version: "1",
-+ platformVersion: "",
-+});
-+
-+add_setup(async function () {
-+ let source = do_get_file("data/sessionstore_valid.js");
-+ source.copyTo(profd, "sessionstore.js");
-+ await writeCompressedFile(
-+ SessionFile.Paths.clean.replace("jsonlz4", "js"),
-+ SessionFile.Paths.clean
-+ );
-+ await SessionFile.read();
-+});
-+
-+add_task(async function test_length_hint_updates_after_write() {
-+ Assert.equal(
-+ SessionWriter._jsonLengthHint,
-+ 0,
-+ "Length hint starts at 0"
-+ );
-+
-+ await SessionFile.write({});
-+
-+ let hintAfterSmall = SessionWriter._jsonLengthHint;
-+ Assert.equal(
-+ hintAfterSmall,
-+ JSON.stringify({}).length,
-+ "Hint matches the uncompressed JSON byte length"
-+ );
-+
-+ let largerState = await IOUtils.readJSON(
-+ PathUtils.join(do_get_cwd().path, "data", "sessionstore_complete.json")
-+ );
-+ await SessionFile.write(largerState);
-+
-+ Assert.greater(
-+ SessionWriter._jsonLengthHint,
-+ hintAfterSmall,
-+ "Hint grows after writing a larger state"
-+ );
-+});
-+
-+add_task(async function test_length_hint_resets_on_wipe() {
-+ await SessionFile.write({ windows: [{ tabs: [{ entries: [] }] }] });
-+ Assert.greater(SessionWriter._jsonLengthHint, 0, "Hint is nonzero");
-+
-+ await SessionFile.wipe();
-+ Assert.equal(
-+ SessionWriter._jsonLengthHint,
-+ 0,
-+ "Hint resets to 0 after wipe"
-+ );
-+});
-diff --git a/browser/components/sessionstore/test/unit/xpcshell.toml b/browser/components/sessionstore/test/unit/xpcshell.toml
---- a/browser/components/sessionstore/test/unit/xpcshell.toml
-+++ b/browser/components/sessionstore/test/unit/xpcshell.toml
-@@ -39,5 +39,10 @@
- skip-if = [
- "condprof", # Bug 1769154
- ]
-
- ["test_startup_session_async.js"]
-+
-+["test_write_json_length_hint.js"]
-+support-files = [
-+ "data/sessionstore_complete.json",
-+]
-diff --git a/dom/chrome-webidl/IOUtils.webidl b/dom/chrome-webidl/IOUtils.webidl
---- a/dom/chrome-webidl/IOUtils.webidl
-+++ b/dom/chrome-webidl/IOUtils.webidl
-@@ -101,12 +101,12 @@
- *
- * @param path An absolute file path
- * @param value The value to be serialized.
- * @param options Options for writing the file. The "append" mode is not supported.
- *
-- * @return Resolves with the number of bytes successfully written to the file,
-- * otherwise rejects with a DOMException.
-+ * @return Resolves with the pre-compression size of the serialized JSON in
-+ * bytes (UTF-8), otherwise rejects with a DOMException.
- */
- [NewObject]
- Promise writeJSON(DOMString path, any value, optional WriteJSONOptions options = {});
- /**
- * Moves the file from |sourcePath| to |destPath|, creating necessary parents.
-@@ -564,10 +564,16 @@
- boolean flush = false;
- /**
- * If true, compress the data with LZ4-encoding before writing to the file.
- */
- boolean compress = false;
-+ /**
-+ * For |writeJSON|, a hint for the expected JSON string length in UTF-16 code
-+ * units. When provided, the JSON serializer pre-allocates a buffer of this
-+ * size to avoid incremental reallocations.
-+ */
-+ unsigned long long jsonLengthHint = 0;
- };
-
- /**
- * Options to be passed to the |IOUtils.writeJSON| method.
- */
-diff --git a/xpcom/ioutils/IOUtils.cpp b/xpcom/ioutils/IOUtils.cpp
---- a/xpcom/ioutils/IOUtils.cpp
-+++ b/xpcom/ioutils/IOUtils.cpp
-@@ -629,10 +629,13 @@
- }
-
- JSContext* cx = aGlobal.Context();
- JS::Rooted value(cx, aValue);
- nsString string;
-+ if (opts.mLengthHint) {
-+ string.SetCapacity(opts.mLengthHint);
-+ }
- if (!JS_StringifyWithLengthHint(cx, &value, nullptr,
- JS::NullHandleValue, AppendJSON,
- &string, opts.mLengthHint)) {
- JS::Rooted exn(cx, JS::UndefinedValue());
- if (JS_GetPendingException(cx, &exn)) {
-
diff --git a/src/external-patches/manifest.json b/src/external-patches/manifest.json
index e72f1a3df..8f89a255f 100644
--- a/src/external-patches/manifest.json
+++ b/src/external-patches/manifest.json
@@ -4,31 +4,8 @@
[
{
"type": "phabricator",
- "ids": [
- "D284084",
- "D299584"
- ],
- "name": "Native MacOS popovers",
- "replaces": {
- // Specifically trying to target FeatureCallout.sys.mjs's change.
- // IMPORTANT: Make sure Feature callouts STILL use native popopvers when
- // syncing from upstream, as this is a critical part of the patch.
- "+ nonnativepopover=\"true\"": "+ ",
-
- // Fix conflicts with upstream changes.
- "--menuitem-border-radius: var(--panel-menuitem-border-radius)": "--menuitem-border-radius: var(--arrowpanel-menuitem-border-radius)",
- "--menuitem-padding: var(--panel-menuitem-padding)": "--menuitem-padding: var(--arrowpanel-menuitem-padding)",
- "--menuitem-margin: var(--panel-menuitem-margin)": "--menuitem-margin: var(--arrowpanel-menuitem-margin)",
-
- " \n #include \"nsCocoaWindow.h\"\n \n #include \"nsISupportsPrimitives.h\"\n #include \"nsArrayUtils.h\"":
- " * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n \n #include \"nsCocoaWindow.h\"\n \n #include \"nsISupportsPrimitives.h\"\n #include \"nsArrayUtils.h\"",
- " #include \"nsISupportsPrimitives.h\"\n": "",
-
- " Atom(\"nonnative\", \"nonnative\"),\n": "",
- "Atom(\"noscript\", \"noscript\"),": "Atom(\"noscript\", \"noscript\"),\n Atom(\"noshade\", \"noshade\"),",
-
- "GetBoolAttr(nsGkAtoms::nonnative)": "GetBoolAttr(nsGkAtoms::nonnativepopover)"
- }
+ "id": "D299584",
+ "name": "Native MacOS popovers fix"
},
{
"type": "phabricator",
@@ -62,17 +39,5 @@
"type": "phabricator",
"id": "D291714",
"name": "gh-12979 Clip dirty_rect to device_size"
- },
- {
- "type": "phabricator",
- "ids": [
- "D247215",
- "D298708"
- ],
- "name": "Session store use size hint"
- },
- {
- "type": "local",
- "path": "firefox/bug_2013682_allow_stacking_contexts_to_be_promoted.patch"
}
]
diff --git a/src/gfx/layers/AnimationInfo-cpp.patch b/src/gfx/layers/AnimationInfo-cpp.patch
index 7a91671c6..83ce49a05 100644
--- a/src/gfx/layers/AnimationInfo-cpp.patch
+++ b/src/gfx/layers/AnimationInfo-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/gfx/layers/AnimationInfo.cpp b/gfx/layers/AnimationInfo.cpp
-index 1d330056bd7a4e89aac5e5296a3c164fb42b5c42..629fbdd748310c31aeb16b0a8d8e862a99314cc9 100644
+index b4941588bfbd94a337f2e848c659021723e1500d..8f91ca5b2fcca6ff04aa2c0af5ba26dd9fe7df0e 100644
--- a/gfx/layers/AnimationInfo.cpp
+++ b/gfx/layers/AnimationInfo.cpp
@@ -14,6 +14,7 @@
diff --git a/src/layout/base/PresShell-cpp.patch b/src/layout/base/PresShell-cpp.patch
index 3ec1da1b6..e193319cf 100644
--- a/src/layout/base/PresShell-cpp.patch
+++ b/src/layout/base/PresShell-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
-index b5930f71e362eb78f74888e1b33b2a6f9dbb4ea4..2105911a18b64e210d3125fec1bfa8058ca07d4e 100644
+index 9d651a17a91d2975017f5e21f1f533c13cc17659..ebc173c4fb6208eb771118f8edd40a4383364d55 100644
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
-@@ -135,6 +135,7 @@
+@@ -137,6 +137,7 @@
#include "mozilla/layers/WebRenderLayerManager.h"
#include "mozilla/layers/WebRenderUserData.h"
#include "mozilla/layout/ScrollAnchorContainer.h"
@@ -10,7 +10,7 @@ index b5930f71e362eb78f74888e1b33b2a6f9dbb4ea4..2105911a18b64e210d3125fec1bfa805
#include "nsAnimationManager.h"
#include "nsAutoLayoutPhase.h"
#include "nsCOMArray.h"
-@@ -5572,7 +5573,8 @@ nscolor PresShell::GetDefaultBackgroundColorToDraw() const {
+@@ -5614,7 +5615,8 @@ nscolor PresShell::GetDefaultBackgroundColorToDraw() const {
if (!mPresContext) {
return NS_RGB(255, 255, 255);
}
diff --git a/src/layout/generic/nsContainerFrame-cpp.patch b/src/layout/generic/nsContainerFrame-cpp.patch
index e8d69b552..935aaa8a3 100644
--- a/src/layout/generic/nsContainerFrame-cpp.patch
+++ b/src/layout/generic/nsContainerFrame-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp
-index c27fec39f9e32e61f0e335e5880ce3e97074965b..7b4f7760dcf92ead74c9f89cfc7a067892af9e34 100644
+index 45090fcb5a0d09109348f916728d01c589fd9a22..a6a2c5dc614c3ef85384f03938383b0a9025d718 100644
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
-@@ -349,7 +349,8 @@ class nsDisplaySelectionOverlay final : public nsPaintedDisplayItem {
+@@ -350,7 +350,8 @@ class nsDisplaySelectionOverlay final : public nsPaintedDisplayItem {
nsDisplayListBuilder* aDisplayListBuilder) override;
NS_DISPLAY_DECL_NAME("SelectionOverlay", TYPE_SELECTION_OVERLAY)
@@ -12,7 +12,7 @@ index c27fec39f9e32e61f0e335e5880ce3e97074965b..7b4f7760dcf92ead74c9f89cfc7a0678
static DeviceColor ApplyTransparencyIfNecessary(nscolor);
private:
-@@ -371,9 +372,9 @@ DeviceColor nsDisplaySelectionOverlay::ApplyTransparencyIfNecessary(
+@@ -372,9 +373,9 @@ DeviceColor nsDisplaySelectionOverlay::ApplyTransparencyIfNecessary(
}
DeviceColor nsDisplaySelectionOverlay::ComputeColorFromSelectionStyle(
@@ -25,7 +25,7 @@ index c27fec39f9e32e61f0e335e5880ce3e97074965b..7b4f7760dcf92ead74c9f89cfc7a0678
}
void nsDisplaySelectionOverlay::Paint(nsDisplayListBuilder* aBuilder,
-@@ -472,7 +473,8 @@ void nsContainerFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
+@@ -473,7 +474,8 @@ void nsContainerFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
ComputeHighlightSelectionStyle(sd->mHighlightData.mHighlightName)) {
aList->AppendNewToTopWithIndex(
aBuilder, this, index++,
@@ -35,7 +35,7 @@ index c27fec39f9e32e61f0e335e5880ce3e97074965b..7b4f7760dcf92ead74c9f89cfc7a0678
}
}
-@@ -480,7 +482,8 @@ void nsContainerFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
+@@ -481,7 +483,8 @@ void nsContainerFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
if (normal) {
DeviceColor color;
if (RefPtr style = ComputeSelectionStyle(selectionValue)) {
diff --git a/src/layout/generic/nsIFrame-h.patch b/src/layout/generic/nsIFrame-h.patch
index be0b97926..97542f7e1 100644
--- a/src/layout/generic/nsIFrame-h.patch
+++ b/src/layout/generic/nsIFrame-h.patch
@@ -1,8 +1,8 @@
diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h
-index 588b00d7ee115f0a7513e357af7ab5eee28311c1..bf07b69c7e7957e6e558403e069f16e2dec3cad0 100644
+index 44673860100e7a0b1af95bf3e1d4148d3c643a6e..7f9dde0f1fb9ab85adb12a470ea6f55ab5be224e 100644
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
-@@ -1008,7 +1008,7 @@ class nsIFrame : public nsQueryFrame {
+@@ -1010,7 +1010,7 @@ class nsIFrame : public nsQueryFrame {
/** Also forward GetVisitedDependentColor to the style */
template
nscolor GetVisitedDependentColor(T S::* aField) {
diff --git a/src/layout/generic/nsImageFrame-cpp.patch b/src/layout/generic/nsImageFrame-cpp.patch
index d64f3fd46..b6ddcab8f 100644
--- a/src/layout/generic/nsImageFrame-cpp.patch
+++ b/src/layout/generic/nsImageFrame-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp
-index c4ff60477e3061aeeecbdedb5ad8054d3808ab6e..40857d430eda576c4fca613857860f32abb39e2d 100644
+index bb9f5fb626b7c48144e2040967817cfbce82afd9..5c598170d9df73a498b3b62f3e56756c756cce66 100644
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
-@@ -1764,7 +1764,7 @@ void nsImageFrame::DisplayAltText(nsPresContext* aPresContext,
+@@ -1765,7 +1765,7 @@ void nsImageFrame::DisplayAltText(nsPresContext* aPresContext,
const nsRect& aRect) {
// Set font and color
aRenderingContext.SetColor(
diff --git a/src/layout/generic/nsTextFrame-cpp.patch b/src/layout/generic/nsTextFrame-cpp.patch
index 0c8afe005..488df7fe5 100644
--- a/src/layout/generic/nsTextFrame-cpp.patch
+++ b/src/layout/generic/nsTextFrame-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
-index e7f7943a19d3ac71872d0a8439b6ed90e8fd423d..eb3e84fabc67d95b6d194b5aaf3aaef7c38480c0 100644
+index 6c3615f90cdb1e5a42e15a0618cc4649cd0d0a15..17eb9d787e83093b0fea2ce43f05d7a447bd5cc9 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
-@@ -6381,7 +6381,7 @@ void nsTextFrame::DrawSelectionDecorations(
+@@ -6376,7 +6376,7 @@ void nsTextFrame::DrawSelectionDecorations(
computedStyleFromPseudo->StyleTextReset()->mTextDecorationStyle;
params.color =
computedStyleFromPseudo->StyleTextReset()
diff --git a/src/layout/painting/nsImageRenderer-cpp.patch b/src/layout/painting/nsImageRenderer-cpp.patch
index 6323f3471..907df766d 100644
--- a/src/layout/painting/nsImageRenderer-cpp.patch
+++ b/src/layout/painting/nsImageRenderer-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/layout/painting/nsImageRenderer.cpp b/layout/painting/nsImageRenderer.cpp
-index 4acb7670e971024f9c63e48ff711bbdd1dc02301..518543f29f396d819a71edb984879de22f8434a8 100644
+index 6e464b48c90174b8954aad8a79bae30a7a30cbc9..9ea9a4963ceae679f092e014ac24a0d24fb106ce 100644
--- a/layout/painting/nsImageRenderer.cpp
+++ b/layout/painting/nsImageRenderer.cpp
@@ -90,7 +90,7 @@ static already_AddRefed GetSymbolicIconImage(nsAtom* aName,
@@ -9,9 +9,9 @@ index 4acb7670e971024f9c63e48ff711bbdd1dc02301..518543f29f396d819a71edb984879de2
- const auto fg = aFrame->StyleText()->mColor.ToColor();
+ const auto fg = aFrame->StyleText()->mColor.ToColor(aFrame);
auto key = std::make_tuple(aName, aScale, fg);
- auto* cache = aFrame->GetProperty(SymbolicImageCacheProp());
- if (!cache) {
-@@ -567,7 +567,7 @@ ImgDrawResult nsImageRenderer::Draw(nsPresContext* aPresContext,
+ auto* cache = aFrame->GetOrCreateDeletableProperty(SymbolicImageCacheProp());
+ auto lookup = cache->Lookup(key);
+@@ -575,7 +575,7 @@ ImgDrawResult nsImageRenderer::Draw(nsPresContext* aPresContext,
}
case StyleImage::Tag::Gradient: {
nsCSSGradientRenderer renderer = nsCSSGradientRenderer::Create(
@@ -20,7 +20,7 @@ index 4acb7670e971024f9c63e48ff711bbdd1dc02301..518543f29f396d819a71edb984879de2
renderer.Paint(*ctx, aDest, aFill, aRepeatSize, aSrc, aDirtyRect,
aOpacity);
-@@ -644,7 +644,7 @@ ImgDrawResult nsImageRenderer::BuildWebRenderDisplayItems(
+@@ -652,7 +652,7 @@ ImgDrawResult nsImageRenderer::BuildWebRenderDisplayItems(
switch (mType) {
case StyleImage::Tag::Gradient: {
nsCSSGradientRenderer renderer = nsCSSGradientRenderer::Create(
@@ -29,7 +29,7 @@ index 4acb7670e971024f9c63e48ff711bbdd1dc02301..518543f29f396d819a71edb984879de2
renderer.BuildWebRenderDisplayItems(aBuilder, aSc, aDest, aFill,
aRepeatSize, aSrc,
-@@ -670,6 +670,8 @@ ImgDrawResult nsImageRenderer::BuildWebRenderDisplayItems(
+@@ -678,6 +678,8 @@ ImgDrawResult nsImageRenderer::BuildWebRenderDisplayItems(
nsPresContext::AppUnitsToIntCSSPixels(aDest.height)};
SVGImageContext svgContext(Some(destCSSSize));
@@ -37,8 +37,8 @@ index 4acb7670e971024f9c63e48ff711bbdd1dc02301..518543f29f396d819a71edb984879de2
+ *mForFrame->PresContext());
Maybe region;
- const int32_t appUnitsPerDevPixel =
-@@ -1076,7 +1078,7 @@ ImgDrawResult nsImageRenderer::DrawShapeImage(nsPresContext* aPresContext,
+ const int32_t appUnitsPerDevPixel = aPresContext->AppUnitsPerDevPixel();
+@@ -1092,7 +1094,7 @@ ImgDrawResult nsImageRenderer::DrawShapeImage(nsPresContext* aPresContext,
if (mImage->IsGradient()) {
nsCSSGradientRenderer renderer = nsCSSGradientRenderer::Create(
diff --git a/src/layout/style/GeckoBindings-cpp.patch b/src/layout/style/GeckoBindings-cpp.patch
index 0c9df23d6..461173615 100644
--- a/src/layout/style/GeckoBindings-cpp.patch
+++ b/src/layout/style/GeckoBindings-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/style/GeckoBindings.cpp b/layout/style/GeckoBindings.cpp
-index 56a16d313a5d30d12edf1f94459db1027af87002..3722f2d6ce6c0864956fed2b00c71a3286edc674 100644
+index ee784cef626a12da58ac1f6c6c8538c454f82f4f..32158faf39de766a16318018f325d0e6c6aef50c 100644
--- a/layout/style/GeckoBindings.cpp
+++ b/layout/style/GeckoBindings.cpp
-@@ -1068,7 +1068,7 @@ void Gecko_SetFontPaletteOverride(
+@@ -1032,7 +1032,7 @@ void Gecko_SetFontPaletteOverride(
return;
}
aValues->mOverrides.AppendElement(gfx::FontPaletteValueSet::OverrideColor{
diff --git a/src/layout/style/nsStyleStruct-cpp.patch b/src/layout/style/nsStyleStruct-cpp.patch
index b4617b093..d387e9d13 100644
--- a/src/layout/style/nsStyleStruct-cpp.patch
+++ b/src/layout/style/nsStyleStruct-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp
-index 80ca0cc08bc675359fbb09100eca43c8e3b9d413..d3ea525f6d84568c4e997a142bbfef6435d21034 100644
+index 758c673f48a5e5b2d440b67713340872e7db3041..3bfaeea43a6710338ab15bdd5dacd03752d718ae 100644
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
-@@ -2208,7 +2208,7 @@ nscolor nsStyleBackground::BackgroundColor(const nsIFrame* aFrame) const {
+@@ -2212,7 +2212,7 @@ nscolor nsStyleBackground::BackgroundColor(const nsIFrame* aFrame) const {
}
nscolor nsStyleBackground::BackgroundColor(const ComputedStyle* aStyle) const {
diff --git a/src/layout/svg/SVGContextPaint-cpp.patch b/src/layout/svg/SVGContextPaint-cpp.patch
index 38110341c..b3f2069cd 100644
--- a/src/layout/svg/SVGContextPaint-cpp.patch
+++ b/src/layout/svg/SVGContextPaint-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/layout/svg/SVGContextPaint.cpp b/layout/svg/SVGContextPaint.cpp
-index 3df8728978c1b48ca326c852feb0553091a99673..9f9096205c3dd3551c41c547a1aee667c0a51238 100644
+index 57ef88da66a3cacc28f6ea83cf55e5f803be6e56..305a6ae18b7b3ad814fb2aea3d5971f341c68da5 100644
--- a/layout/svg/SVGContextPaint.cpp
+++ b/layout/svg/SVGContextPaint.cpp
@@ -143,7 +143,7 @@ static void SetupInheritablePaint(const DrawTarget* aDrawTarget,
diff --git a/src/layout/svg/SVGGradientFrame-cpp.patch b/src/layout/svg/SVGGradientFrame-cpp.patch
index f79ff277b..e2ce808c9 100644
--- a/src/layout/svg/SVGGradientFrame-cpp.patch
+++ b/src/layout/svg/SVGGradientFrame-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/layout/svg/SVGGradientFrame.cpp b/layout/svg/SVGGradientFrame.cpp
-index 9c66d90fc0292abcab30c912968d3f84c0e181ff..aec0b2e48965729ccff19d632ac5e8fd04fd09eb 100644
+index b0d38b0fab01797328af0b1f1f48af8fb5eebe4d..953feffdc96143dc2d8f8e57f8bb4a6aeb33f0c5 100644
--- a/layout/svg/SVGGradientFrame.cpp
+++ b/layout/svg/SVGGradientFrame.cpp
@@ -229,8 +229,9 @@ class MOZ_STACK_CLASS SVGColorStopInterpolator
@@ -18,9 +18,9 @@ index 9c66d90fc0292abcab30c912968d3f84c0e181ff..aec0b2e48965729ccff19d632ac5e8fd
if (nStops == 1 || GradientVectorLengthIsZero()) {
// The gradient paints a single colour, using the stop-color of the last
// gradient step if there are more than one.
-- return do_AddRef(new gfxPattern(ToDeviceColor(stops.LastElement().mColor)));
-+ return do_AddRef(
-+ new gfxPattern(ToDeviceColor(stops.LastElement().mColor, aSource)));
+- return MakeAndAddRef(ToDeviceColor(stops.LastElement().mColor));
++ return MakeAndAddRef(
++ ToDeviceColor(stops.LastElement().mColor, aSource));
}
// Get the transform list (if there is one). We do this after the returns
diff --git a/src/layout/svg/SVGTextFrame-cpp.patch b/src/layout/svg/SVGTextFrame-cpp.patch
index 33e45c798..79b600fb6 100644
--- a/src/layout/svg/SVGTextFrame-cpp.patch
+++ b/src/layout/svg/SVGTextFrame-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp
-index 93f6f2a704734314586fa16b6a45b434f9c2304d..4503ee2b48be39bb2e61962316ef43ad292a7b27 100644
+index 96dfd52fc38fe0833da7fa4c669e2a911c04c236..bb6749f3275f22e1d462d0180e83eb9aa23b6dc0 100644
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
-@@ -2662,9 +2662,9 @@ void SVGTextDrawPathCallbacks::ApplyOpacity(
+@@ -2665,9 +2665,9 @@ void SVGTextDrawPathCallbacks::ApplyOpacity(
sRGBColor& aColor, const StyleSVGPaint& aPaint,
const StyleSVGOpacity& aOpacity) const {
if (aPaint.kind.tag == StyleSVGPaintKind::Tag::Color) {
@@ -15,7 +15,7 @@ index 93f6f2a704734314586fa16b6a45b434f9c2304d..4503ee2b48be39bb2e61962316ef43ad
}
aColor.a *= SVGUtils::GetOpacity(aOpacity, mContextPaint);
}
-@@ -5076,8 +5076,8 @@ bool SVGTextFrame::ShouldRenderAsPath(nsTextFrame* aFrame,
+@@ -5083,8 +5083,8 @@ bool SVGTextFrame::ShouldRenderAsPath(nsTextFrame* aFrame,
// It's possible nsTextFrame will support non-opaque shadows in the future,
// in which case this test can be removed.
if (style->mFill.kind.IsColor() && aFrame->StyleText()->HasTextShadow() &&
diff --git a/src/layout/svg/SVGUtils-cpp.patch b/src/layout/svg/SVGUtils-cpp.patch
index 577ca64ba..7478bb64d 100644
--- a/src/layout/svg/SVGUtils-cpp.patch
+++ b/src/layout/svg/SVGUtils-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/svg/SVGUtils.cpp b/layout/svg/SVGUtils.cpp
-index 93b73e1c665ea8e011af7026810db6cd23c8049b..004d1d0637d62fcde25a924df5392a7dc64f75dc 100644
+index 0819d5258b80f5600329547fd102240af057c5af..ee0478eeeb291991d0d97580375744f6c9a93b34 100644
--- a/layout/svg/SVGUtils.cpp
+++ b/layout/svg/SVGUtils.cpp
-@@ -1154,23 +1154,23 @@ gfxRect SVGUtils::PathExtentsToMaxStrokeExtents(const gfxRect& aPathExtents,
+@@ -1176,23 +1176,23 @@ gfxRect SVGUtils::PathExtentsToMaxStrokeExtents(const gfxRect& aPathExtents,
/* static */
nscolor SVGUtils::GetFallbackOrPaintColor(
const ComputedStyle& aStyle, StyleSVGPaint nsStyleSVG::* aFillOrStroke,
@@ -30,7 +30,7 @@ index 93b73e1c665ea8e011af7026810db6cd23c8049b..004d1d0637d62fcde25a924df5392a7d
break;
}
if (const auto* styleIfVisited = aStyle.GetStyleIfVisited()) {
-@@ -1184,7 +1184,8 @@ nscolor SVGUtils::GetFallbackOrPaintColor(
+@@ -1206,7 +1206,8 @@ nscolor SVGUtils::GetFallbackOrPaintColor(
// another simple color.
if (paintIfVisited.kind.IsColor() && paint.kind.IsColor()) {
nscolor colors[2] = {
@@ -40,7 +40,7 @@ index 93b73e1c665ea8e011af7026810db6cd23c8049b..004d1d0637d62fcde25a924df5392a7d
return ComputedStyle::CombineVisitedColors(colors,
aStyle.RelevantLinkVisited());
}
-@@ -1254,7 +1255,7 @@ void SVGUtils::MakeFillPatternFor(nsIFrame* aFrame, gfxContext* aContext,
+@@ -1276,7 +1277,7 @@ void SVGUtils::MakeFillPatternFor(nsIFrame* aFrame, gfxContext* aContext,
// objectBoundingBox where the width or height of the object is zero.
// See http://www.w3.org/TR/SVG11/coords.html#ObjectBoundingBox
sRGBColor color(sRGBColor::FromABGR(GetFallbackOrPaintColor(
@@ -49,7 +49,7 @@ index 93b73e1c665ea8e011af7026810db6cd23c8049b..004d1d0637d62fcde25a924df5392a7d
color.a *= fillOpacity;
aOutPattern->InitColorPattern(ToDeviceColor(color));
}
-@@ -1321,7 +1322,7 @@ void SVGUtils::MakeStrokePatternFor(nsIFrame* aFrame, gfxContext* aContext,
+@@ -1343,7 +1344,7 @@ void SVGUtils::MakeStrokePatternFor(nsIFrame* aFrame, gfxContext* aContext,
// objectBoundingBox where the width or height of the object is zero.
// See http://www.w3.org/TR/SVG11/coords.html#ObjectBoundingBox
sRGBColor color(sRGBColor::FromABGR(GetFallbackOrPaintColor(
diff --git a/src/layout/svg/SVGUtils-h.patch b/src/layout/svg/SVGUtils-h.patch
index 6adbbff91..065d530fc 100644
--- a/src/layout/svg/SVGUtils-h.patch
+++ b/src/layout/svg/SVGUtils-h.patch
@@ -1,8 +1,8 @@
diff --git a/layout/svg/SVGUtils.h b/layout/svg/SVGUtils.h
-index 1f1f7ad6b78e5c411651fee30bbbfeb784257e0a..28c7332aae411c4220bd00af08b491d31d2eb090 100644
+index a4367a69d488c4eab0592d5f460b035efda30e9a..03a305aeb03fe6902eb7aaeb524b70c88836d27f 100644
--- a/layout/svg/SVGUtils.h
+++ b/layout/svg/SVGUtils.h
-@@ -428,7 +428,7 @@ class SVGUtils final {
+@@ -429,7 +429,7 @@ class SVGUtils final {
static nscolor GetFallbackOrPaintColor(
const ComputedStyle&, StyleSVGPaint nsStyleSVG::* aFillOrStroke,
diff --git a/src/layout/tables/nsTableFrame-cpp.patch b/src/layout/tables/nsTableFrame-cpp.patch
index 7c480c702..1c3164ba3 100644
--- a/src/layout/tables/nsTableFrame-cpp.patch
+++ b/src/layout/tables/nsTableFrame-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp
-index 7c39ea94392dc158656621dfbee1be72bbcd46f8..e2fe47662b92ac6fb7fe2177d1d2cdab500bb969 100644
+index 00307e123b0d0bac93ad694e75141faca9bc4d56..86495743d49022626646d872f1ff46ed21aefe89 100644
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
-@@ -4088,7 +4088,7 @@ static void GetColorAndStyle(const nsIFrame* aFrame, WritingMode aTableWM,
+@@ -4065,7 +4065,7 @@ static void GetColorAndStyle(const nsIFrame* aFrame, WritingMode aTableWM,
return;
}
*aColor = aFrame->Style()->GetVisitedDependentColor(
diff --git a/src/layout/xul/tree/nsTreeBodyFrame-cpp.patch b/src/layout/xul/tree/nsTreeBodyFrame-cpp.patch
index 2b834bb1d..621d91b62 100644
--- a/src/layout/xul/tree/nsTreeBodyFrame-cpp.patch
+++ b/src/layout/xul/tree/nsTreeBodyFrame-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp
-index b6aa10336e7994c830e0326298820c3a534f8094..7747c52e5c5d227894d8f7fb377c65861dc51c4c 100644
+index f88360d5a787884510c3b461319b1536800a3d8f..1b1df582a1138a9de57fa69cde4441225ad7d4b3 100644
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2865,7 +2865,8 @@ ImgDrawResult nsTreeBodyFrame::PaintCell(
diff --git a/src/modules/libpref/init/StaticPrefList-yaml.patch b/src/modules/libpref/init/StaticPrefList-yaml.patch
index 2000a4fa7..6ffa98211 100644
--- a/src/modules/libpref/init/StaticPrefList-yaml.patch
+++ b/src/modules/libpref/init/StaticPrefList-yaml.patch
@@ -1,8 +1,8 @@
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
-index f36788f33221aa6d3709bcc09c05a90ff83e7c48..7f794117d155cea5772568115710e67c947d79e3 100644
+index b96e9d02beda72c92c295a2799c851b94945ada6..db79081c6d1bbdf78a38a6cc13494476827bf0d1 100644
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
-@@ -20238,6 +20238,7 @@
+@@ -20580,6 +20580,7 @@
mirror: always
#endif
diff --git a/src/modules/libpref/moz-build.patch b/src/modules/libpref/moz-build.patch
index cf3b17aa5..2098c06cc 100644
--- a/src/modules/libpref/moz-build.patch
+++ b/src/modules/libpref/moz-build.patch
@@ -1,5 +1,5 @@
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
-index 29140c6f29c1784ea594ccd84a005a9ec27eaaf5..62837e73bfee87b8bf708df912a6d07d06eea8b1 100644
+index fa05921295e8f028c4893c3cc224415d1251b877..acfcecaf6b0ae5f0aef5b540d9e60a3f5ffd02f4 100644
--- a/modules/libpref/moz.build
+++ b/modules/libpref/moz.build
@@ -91,6 +91,7 @@ pref_groups = [
diff --git a/src/security/mac/hardenedruntime/production/firefox-browser-xml.patch b/src/security/mac/hardenedruntime/production/firefox-browser-xml.patch
index 2a4dc288a..713006269 100644
--- a/src/security/mac/hardenedruntime/production/firefox-browser-xml.patch
+++ b/src/security/mac/hardenedruntime/production/firefox-browser-xml.patch
@@ -1,5 +1,5 @@
diff --git a/security/mac/hardenedruntime/production/firefox.browser.xml b/security/mac/hardenedruntime/production/firefox.browser.xml
-index b7b74dd2bdfee3c724c4361e98c8addaf6148465..ad1da805bc76df1ea7f8504305e0deccd9ed3f65 100644
+index eaee811d99d06ec53fbc78659aae495643f1deeb..cb0f8548a6622ba2f0847259f346c8301f44d8c3 100644
--- a/security/mac/hardenedruntime/production/firefox.browser.xml
+++ b/security/mac/hardenedruntime/production/firefox.browser.xml
@@ -29,7 +29,7 @@
diff --git a/src/servo/components/style/queries/feature_expression-rs.patch b/src/servo/components/style/queries/feature_expression-rs.patch
index 43be785a4..156883844 100644
--- a/src/servo/components/style/queries/feature_expression-rs.patch
+++ b/src/servo/components/style/queries/feature_expression-rs.patch
@@ -1,17 +1,17 @@
diff --git a/servo/components/style/queries/feature_expression.rs b/servo/components/style/queries/feature_expression.rs
-index e007f3e1583b5c53475e9dbbb3a52cde16d37e25..906d86922311cfe2339719d07d64b2af8819b05a 100644
+index 1519c1993d3f3c689aac423f430a53efe92aa009..9c94cda6290448c040e43182957c10ead99ba178 100644
--- a/servo/components/style/queries/feature_expression.rs
+++ b/servo/components/style/queries/feature_expression.rs
-@@ -21,7 +21,7 @@ use crate::str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
- use crate::stylesheets::{CssRuleType, Origin, UrlExtraData};
- use crate::values::computed::{self, CSSPixelLength, Ratio, ToComputedValue};
- use crate::values::specified::{Angle, Integer, Length, Number, Percentage, Resolution, Time};
--use crate::values::{CSSFloat, DashedIdent};
-+use crate::values::{CSSFloat, DashedIdent, AtomString};
+@@ -23,7 +23,7 @@ use crate::values::computed::{self, CSSPixelLength, ToComputedValue};
+ use crate::values::specified::{
+ Angle, Integer, Length, Number, Percentage, Ratio, Resolution, Time,
+ };
+-use crate::values::DashedIdent;
++use crate::values::{DashedIdent, AtomString};
use crate::{Atom, Zero};
use cssparser::{Parser, ParserInput, Token};
use selectors::kleene_value::KleeneValue;
-@@ -633,6 +633,10 @@ impl QueryFeatureExpression {
+@@ -643,6 +643,10 @@ impl QueryFeatureExpression {
.map(|v| *expect!(Enumerated, v));
return evaluator(context, computed);
},
@@ -22,7 +22,7 @@ index e007f3e1583b5c53475e9dbbb3a52cde16d37e25..906d86922311cfe2339719d07d64b2af
Evaluator::BoolInteger(eval) => {
let computed = self
.kind
-@@ -671,6 +675,7 @@ pub enum QueryExpressionValue {
+@@ -681,6 +685,7 @@ pub enum QueryExpressionValue {
/// An enumerated value, defined by the variant keyword table in the
/// feature's `mData` member.
Enumerated(KeywordDiscriminant),
@@ -30,7 +30,7 @@ index e007f3e1583b5c53475e9dbbb3a52cde16d37e25..906d86922311cfe2339719d07d64b2af
/// Value types only used by style-range query expressions, not feature queries.
/// A CSS-wide keyword.
Keyword(CSSWideKeyword),
-@@ -718,6 +723,7 @@ impl QueryExpressionValue {
+@@ -728,6 +733,7 @@ impl QueryExpressionValue {
Evaluator::Enumerated { serializer, .. } => dest.write_str(&*serializer(value)),
_ => unreachable!(),
},
@@ -38,7 +38,7 @@ index e007f3e1583b5c53475e9dbbb3a52cde16d37e25..906d86922311cfe2339719d07d64b2af
}
}
-@@ -755,6 +761,9 @@ impl QueryExpressionValue {
+@@ -764,6 +770,9 @@ impl QueryExpressionValue {
Evaluator::Resolution(..) => {
QueryExpressionValue::Resolution(Resolution::parse(context, input)?)
},
diff --git a/src/servo/ports/geckolib/cbindgen-toml.patch b/src/servo/ports/geckolib/cbindgen-toml.patch
index 24433b060..7ceec28b5 100644
--- a/src/servo/ports/geckolib/cbindgen-toml.patch
+++ b/src/servo/ports/geckolib/cbindgen-toml.patch
@@ -1,8 +1,8 @@
diff --git a/servo/ports/geckolib/cbindgen.toml b/servo/ports/geckolib/cbindgen.toml
-index e9ae0149e80a241b2a32ce445deb923af2fac445..0dc5768ab8bf89f7d6c31ff4c7bd4bb805d64509 100644
+index 17937bd70ead3b86e59b3da8c8d90591ee48e0a2..2bddfd549243ddc387107df00625ea5f38e5c655 100644
--- a/servo/ports/geckolib/cbindgen.toml
+++ b/servo/ports/geckolib/cbindgen.toml
-@@ -679,9 +679,9 @@ renaming_overrides_prefixing = true
+@@ -666,9 +666,9 @@ renaming_overrides_prefixing = true
nscolor CalcColor(const nsIFrame*) const;
/**
* Compute the final color, taking into account the foreground color from the
@@ -14,7 +14,7 @@ index e9ae0149e80a241b2a32ce445deb923af2fac445..0dc5768ab8bf89f7d6c31ff4c7bd4bb8
/**
* Compute the final color, making the argument the foreground color.
*/
-@@ -704,9 +704,11 @@ renaming_overrides_prefixing = true
+@@ -691,9 +691,11 @@ renaming_overrides_prefixing = true
/**
* Convert this color to an nscolor. The color will be converted to sRGB first
diff --git a/src/testing/mochitest/browser-test-js.patch b/src/testing/mochitest/browser-test-js.patch
index e261774bf..00fa347ad 100644
--- a/src/testing/mochitest/browser-test-js.patch
+++ b/src/testing/mochitest/browser-test-js.patch
@@ -1,5 +1,5 @@
diff --git a/testing/mochitest/browser-test.js b/testing/mochitest/browser-test.js
-index 2377812af77563d6e80178e3da47a537aa0576e2..e9e5c4a2f3b2ebb503605595f552f35eea4f9814 100644
+index 8ae4256b9f4a2c1ebce5bb0230d61a24ee625c07..8c1e6f1441553059f7a3a4654838cfd678717619 100644
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -497,10 +497,10 @@ Tester.prototype = {
@@ -15,7 +15,7 @@ index 2377812af77563d6e80178e3da47a537aa0576e2..e9e5c4a2f3b2ebb503605595f552f35e
let lastTab = gBrowser.tabs[gBrowser.tabs.length - 1];
if (!lastTab.closing) {
// Report the stale tab as an error only when they're not closing.
-@@ -1248,12 +1248,6 @@ Tester.prototype = {
+@@ -1242,12 +1242,6 @@ Tester.prototype = {
// test_end is logged, otherwise the new windows created by addTab will be
// tracked by ShutdownLeaks as belonging to the test and cause false leak reports.
if (window.gBrowser) {
diff --git a/src/toolkit/actors/PictureInPictureChild-sys-mjs.patch b/src/toolkit/actors/PictureInPictureChild-sys-mjs.patch
index 3bd878bbe..21521951b 100644
--- a/src/toolkit/actors/PictureInPictureChild-sys-mjs.patch
+++ b/src/toolkit/actors/PictureInPictureChild-sys-mjs.patch
@@ -1,8 +1,8 @@
diff --git a/toolkit/actors/PictureInPictureChild.sys.mjs b/toolkit/actors/PictureInPictureChild.sys.mjs
-index 4b42c43958989e9f67289537076a5683bdd08d55..a33a544647562c79af33ec9705fd60e36ec33488 100644
+index 49dd388d8304245e9e840cc32577eed45d36d62c..dde63be2eb6c442acb387b14bf05c18ce9419fa4 100644
--- a/toolkit/actors/PictureInPictureChild.sys.mjs
+++ b/toolkit/actors/PictureInPictureChild.sys.mjs
-@@ -297,6 +297,7 @@ export class PictureInPictureLauncherChild extends JSWindowActorChild {
+@@ -318,6 +318,7 @@ export class PictureInPictureLauncherChild extends JSWindowActorChild {
if (
video &&
PictureInPictureChild.videoIsPlaying(video) &&
diff --git a/src/toolkit/components/extensions/parent/ext-runtime-js.patch b/src/toolkit/components/extensions/parent/ext-runtime-js.patch
index 4fa34d2cb..9dfd1bd86 100644
--- a/src/toolkit/components/extensions/parent/ext-runtime-js.patch
+++ b/src/toolkit/components/extensions/parent/ext-runtime-js.patch
@@ -1,8 +1,8 @@
diff --git a/toolkit/components/extensions/parent/ext-runtime.js b/toolkit/components/extensions/parent/ext-runtime.js
-index 0d7a3e505b6bd30548c6dda1504dd343a517b083..fb6c6b4ef3eae24995a02f708ec41afd31d812ef 100644
+index 8278148b88861be48fa10b39f4cd05f5ceaaf53d..ef5c83eb555d9d4ac469afc4d8c7f0d9e7d11d51 100644
--- a/toolkit/components/extensions/parent/ext-runtime.js
+++ b/toolkit/components/extensions/parent/ext-runtime.js
-@@ -333,7 +333,7 @@ this.runtime = class extends ExtensionAPIPersistent {
+@@ -335,7 +335,7 @@ this.runtime = class extends ExtensionAPIPersistent {
getBrowserInfo: function () {
const { name, vendor, version, appBuildID } = Services.appinfo;
diff --git a/src/toolkit/components/extensions/parent/ext-tabs-base-js.patch b/src/toolkit/components/extensions/parent/ext-tabs-base-js.patch
index 33c176871..321144f23 100644
--- a/src/toolkit/components/extensions/parent/ext-tabs-base-js.patch
+++ b/src/toolkit/components/extensions/parent/ext-tabs-base-js.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/components/extensions/parent/ext-tabs-base.js b/toolkit/components/extensions/parent/ext-tabs-base.js
-index e617b47c547f633c95fe05023d2e748192c0b1b9..e12466e45d71376e975a127086a1ac5a57a38dd0 100644
+index 17321c22d36b3e44d32c1fe1cf35fbb94f8e4b91..c5f1dfb163fb64b29c2b0f70abe37d878cf8a625 100644
--- a/toolkit/components/extensions/parent/ext-tabs-base.js
+++ b/toolkit/components/extensions/parent/ext-tabs-base.js
@@ -1966,6 +1966,7 @@ class TabManagerBase {
diff --git a/src/toolkit/components/pictureinpicture/PictureInPicture-sys-mjs.patch b/src/toolkit/components/pictureinpicture/PictureInPicture-sys-mjs.patch
index 35eef7a60..1a2c6f0ab 100644
--- a/src/toolkit/components/pictureinpicture/PictureInPicture-sys-mjs.patch
+++ b/src/toolkit/components/pictureinpicture/PictureInPicture-sys-mjs.patch
@@ -1,9 +1,9 @@
diff --git a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
-index 098742100858b266aebc8f764f918c85815f3c5f..71b8f8d71d48229fc96d6c84c635d09012a82250 100644
+index e29503cef61f8a08134cb08b6a533cdc9107e725..186d366c71852ae2e04c0455ef769c81cce8c905 100644
--- a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
+++ b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
@@ -122,6 +122,9 @@ export class PictureInPictureToggleParent extends JSWindowActorParent {
- if (browser.ownerGlobal.gBrowser.selectedBrowser == browser) {
+ if (browser.documentGlobal.gBrowser.selectedBrowser == browser) {
break;
}
+ if (browser.audioMuted) {
@@ -14,10 +14,10 @@ index 098742100858b266aebc8f764f918c85815f3c5f..71b8f8d71d48229fc96d6c84c635d090
);
@@ -493,7 +496,7 @@ export var PictureInPicture = {
// focus the tab's window
- tab.ownerGlobal.focus();
+ tab.documentGlobal.focus();
- gBrowser.selectedTab = tab;
-+ browser?.ownerGlobal?.gZenWorkspaces.switchIfNeeded(browser);
++ browser?.documentGlobal?.gZenWorkspaces.switchIfNeeded(browser);
await this.closeSinglePipWindow({ reason: "Unpip", actorRef: pipActor });
},
diff --git a/src/toolkit/content/widgets/browser-custom-element-mjs.patch b/src/toolkit/content/widgets/browser-custom-element-mjs.patch
index 0d571f1cb..216608de0 100644
--- a/src/toolkit/content/widgets/browser-custom-element-mjs.patch
+++ b/src/toolkit/content/widgets/browser-custom-element-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/content/widgets/browser-custom-element.mjs b/toolkit/content/widgets/browser-custom-element.mjs
-index 22fcec0368d0356a24dd125373cb767836a6760d..7a78f5c1ddb06f3bc1b1e76f7489d57ee17a28e9 100644
+index ddfd9d770b6f318e32b46c0630a0c27c982e1c63..c76bf85c5db16a60243f497c10402926b3bb0591 100644
--- a/toolkit/content/widgets/browser-custom-element.mjs
+++ b/toolkit/content/widgets/browser-custom-element.mjs
@@ -504,11 +504,11 @@ export class MozBrowser extends MozElements.MozElementMixin(XULFrameElement) {
diff --git a/src/toolkit/content/widgets/findbar-js.patch b/src/toolkit/content/widgets/findbar-js.patch
index c0f26b7aa..bdfedf97d 100644
--- a/src/toolkit/content/widgets/findbar-js.patch
+++ b/src/toolkit/content/widgets/findbar-js.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/content/widgets/findbar.js b/toolkit/content/widgets/findbar.js
-index 89550d1700d4cb7e8bdef5e99ae4eb42b3ce3b16..b6d23961739b170d34f7a1bdc5f5c2e0ef005882 100644
+index ff9bb99e4ca481feb97d060e34eae37846ba55cf..6517111456d85d975d5857a044c642bdc1294be4 100644
--- a/toolkit/content/widgets/findbar.js
+++ b/toolkit/content/widgets/findbar.js
@@ -1189,6 +1189,7 @@
diff --git a/src/toolkit/content/widgets/moz-toggle/moz-toggle-tokens-css.patch b/src/toolkit/content/widgets/moz-toggle/moz-toggle-tokens-css.patch
index d9df005cd..584d7759c 100644
--- a/src/toolkit/content/widgets/moz-toggle/moz-toggle-tokens-css.patch
+++ b/src/toolkit/content/widgets/moz-toggle/moz-toggle-tokens-css.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/content/widgets/moz-toggle/moz-toggle.tokens.css b/toolkit/content/widgets/moz-toggle/moz-toggle.tokens.css
-index 831de79a85ca1a65eee661cd1e6731a99c2631ad..12eb917352d0ac9492404503bcb66e161c5c5652 100644
+index 6247d7a3923a6fedd4ec9911aba309ce565cd498..744e670eccc936dde664aa07df3e87bdcafd5e48 100644
--- a/toolkit/content/widgets/moz-toggle/moz-toggle.tokens.css
+++ b/toolkit/content/widgets/moz-toggle/moz-toggle.tokens.css
@@ -13,8 +13,8 @@
diff --git a/src/toolkit/content/widgets/panel-js.patch b/src/toolkit/content/widgets/panel-js.patch
index 7f8a17364..e7bfb137b 100644
--- a/src/toolkit/content/widgets/panel-js.patch
+++ b/src/toolkit/content/widgets/panel-js.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/content/widgets/panel.js b/toolkit/content/widgets/panel.js
-index dc3e34847f1b6dfd58f5e036fd7d714ef51c1380..20f18fcb1a2f637d83366b8a517d43200270739f 100644
+index dc3e34847f1b6dfd58f5e036fd7d714ef51c1380..243c5b8c849342dd2e887242d4c8499915ee51c2 100644
--- a/toolkit/content/widgets/panel.js
+++ b/toolkit/content/widgets/panel.js
@@ -136,7 +136,19 @@
@@ -7,11 +7,11 @@ index dc3e34847f1b6dfd58f5e036fd7d714ef51c1380..20f18fcb1a2f637d83366b8a517d4320
this.anchorNode.closest("toolbarbutton, .anchor-root") ||
this.anchorNode;
+ let toolbox = anchorRoot.closest("#navigator-toolbox");
-+ if (toolbox && toolbox.ownerGlobal.gZenCompactModeManager?.preference) {
++ if (toolbox && toolbox.documentGlobal.gZenCompactModeManager?.preference) {
+ // Disable transitions for now, see gh-11667
+ toolbox.style.transition = "none";
+ toolbox.setAttribute("zen-compact-mode-active", "true");
-+ anchorRoot.ownerGlobal.setTimeout(() => {
++ anchorRoot.documentGlobal.setTimeout(() => {
+ toolbox.style.transition = "";
+ }, 0);
+ }
diff --git a/src/toolkit/content/widgets/tabbox-js.patch b/src/toolkit/content/widgets/tabbox-js.patch
index d7ae6be59..40f876dc8 100644
--- a/src/toolkit/content/widgets/tabbox-js.patch
+++ b/src/toolkit/content/widgets/tabbox-js.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/content/widgets/tabbox.js b/toolkit/content/widgets/tabbox.js
-index de0a7817fe0d9d3b48a713c00f5bc1e7a367781b..09d8df42f92548fb1c32c8e9316cb43ed72cdfeb 100644
+index 9334120e818b609c6cb6792fd509e90c9b362551..2dde0c8698eb75bac0d0eb4d800d11b577e10a46 100644
--- a/toolkit/content/widgets/tabbox.js
+++ b/toolkit/content/widgets/tabbox.js
@@ -11,6 +11,23 @@
@@ -35,7 +35,7 @@ index de0a7817fe0d9d3b48a713c00f5bc1e7a367781b..09d8df42f92548fb1c32c8e9316cb43e
this._selectedPanel?.classList.add("deck-selected");
}
this.setAttribute("selectedIndex", val);
-@@ -908,7 +925,7 @@
+@@ -924,7 +941,7 @@
if (!tab) {
return;
}
@@ -44,7 +44,7 @@ index de0a7817fe0d9d3b48a713c00f5bc1e7a367781b..09d8df42f92548fb1c32c8e9316cb43e
if (otherTab != tab && otherTab.selected) {
otherTab._selected = false;
}
-@@ -944,6 +961,7 @@
+@@ -960,6 +977,7 @@
* @param {MozTab|null} [val]
*/
set selectedItem(val) {
@@ -52,7 +52,7 @@ index de0a7817fe0d9d3b48a713c00f5bc1e7a367781b..09d8df42f92548fb1c32c8e9316cb43e
if (val && !val.selected) {
// The selectedIndex setter ignores invalid values
// such as -1 if |val| isn't one of our child nodes.
-@@ -1121,7 +1139,7 @@
+@@ -1137,7 +1155,7 @@
if (tab == startTab) {
return null;
}
@@ -61,7 +61,7 @@ index de0a7817fe0d9d3b48a713c00f5bc1e7a367781b..09d8df42f92548fb1c32c8e9316cb43e
return tab;
}
}
-@@ -1183,13 +1201,30 @@
+@@ -1199,13 +1217,30 @@
* @param {boolean} [aWrap]
*/
advanceSelectedTab(aDir, aWrap) {
@@ -93,7 +93,7 @@ index de0a7817fe0d9d3b48a713c00f5bc1e7a367781b..09d8df42f92548fb1c32c8e9316cb43e
// Handle keyboard navigation for a hidden tab that can be selected, like the Firefox View tab,
// which has a random placement in this.allTabs.
if (startTab.hidden) {
-@@ -1202,7 +1237,7 @@
+@@ -1218,7 +1253,7 @@
newTab = this.findNextTab(startTab, {
direction: aDir,
wrap: aWrap,
diff --git a/src/toolkit/modules/AppConstants-sys-mjs.patch b/src/toolkit/modules/AppConstants-sys-mjs.patch
index b5d155644..c26288f1f 100644
--- a/src/toolkit/modules/AppConstants-sys-mjs.patch
+++ b/src/toolkit/modules/AppConstants-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/modules/AppConstants.sys.mjs b/toolkit/modules/AppConstants.sys.mjs
-index 13a523a989d1326b0f8faef9bac299738885e655..c2ff014dc553856161f6aec8014a27165819364b 100644
+index a26725ead2f74aaf6a7550e9251662c5202e1d16..891c1cb31614dad31cfb2ec2aadd3f8cdb13852a 100644
--- a/toolkit/modules/AppConstants.sys.mjs
+++ b/toolkit/modules/AppConstants.sys.mjs
@@ -175,6 +175,8 @@ export var AppConstants = Object.freeze({
diff --git a/src/toolkit/modules/LightweightThemeConsumer-sys-mjs.patch b/src/toolkit/modules/LightweightThemeConsumer-sys-mjs.patch
index dd7c9dc84..24e3bc26f 100644
--- a/src/toolkit/modules/LightweightThemeConsumer-sys-mjs.patch
+++ b/src/toolkit/modules/LightweightThemeConsumer-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/modules/LightweightThemeConsumer.sys.mjs b/toolkit/modules/LightweightThemeConsumer.sys.mjs
-index f26f2ad7a4010f4aac77626da3a47c4ebe87f910..1456f5d7d20b40cd4b3cc9f89563cfd7c880c63c 100644
+index 756cf47d4dd5e096af96a95ab63c20ac9348572b..a74c1ffd73c19ee54ed87318d97898d93b974ea7 100644
--- a/toolkit/modules/LightweightThemeConsumer.sys.mjs
+++ b/toolkit/modules/LightweightThemeConsumer.sys.mjs
@@ -34,7 +34,7 @@ const toolkitVariableMap = [
diff --git a/src/toolkit/modules/PopupNotifications-sys-mjs.patch b/src/toolkit/modules/PopupNotifications-sys-mjs.patch
index f5c9006ab..a4e2fe0f5 100644
--- a/src/toolkit/modules/PopupNotifications-sys-mjs.patch
+++ b/src/toolkit/modules/PopupNotifications-sys-mjs.patch
@@ -1,8 +1,8 @@
diff --git a/toolkit/modules/PopupNotifications.sys.mjs b/toolkit/modules/PopupNotifications.sys.mjs
-index a53369760ced2df3d2d9682142d94dfc7deda71c..8755f15ea82f6a7addcf91b62b1b3e7b1e20bce6 100644
+index 5e88f279e570edbf95823bb9dc9835bae89feb32..f50db584dff740583665239d2cc2c5d00c5010e9 100644
--- a/toolkit/modules/PopupNotifications.sys.mjs
+++ b/toolkit/modules/PopupNotifications.sys.mjs
-@@ -1526,6 +1526,15 @@ PopupNotifications.prototype = {
+@@ -1532,6 +1532,15 @@ PopupNotifications.prototype = {
) {
for (let anchorElement of anchorElements) {
anchorElement.setAttribute(ICON_ATTRIBUTE_SHOWING, "true");
@@ -11,7 +11,7 @@ index a53369760ced2df3d2d9682142d94dfc7deda71c..8755f15ea82f6a7addcf91b62b1b3e7b
+ // Disable transitions for now, see gh-11667
+ toolbox.style.transition = "none";
+ toolbox.setAttribute("zen-compact-mode-active", "true");
-+ anchorElement.ownerGlobal.setTimeout(() => {
++ anchorElement.documentGlobal.setTimeout(() => {
+ toolbox.style.transition = "";
+ }, 0);
+ }
diff --git a/src/toolkit/modules/moz-build.patch b/src/toolkit/modules/moz-build.patch
index e93907e15..38aaf0344 100644
--- a/src/toolkit/modules/moz-build.patch
+++ b/src/toolkit/modules/moz-build.patch
@@ -1,8 +1,8 @@
diff --git a/toolkit/modules/moz.build b/toolkit/modules/moz.build
-index 161be731ed701c598b757efbc23f90dbd193b4b2..ede01c5f1ebb46559947f648082d7ffc664fca09 100644
+index 71290eebecf1c67196baf78dc0bae2e0f7ea5e2c..cdbdae60c67c66147d076b14ccfb570f9537a638 100644
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
-@@ -289,6 +289,7 @@ for var in (
+@@ -291,6 +291,7 @@ for var in (
"DLL_SUFFIX",
"DEBUG_JS_MODULES",
"OMNIJAR_NAME",
diff --git a/src/toolkit/moz-configure.patch b/src/toolkit/moz-configure.patch
index cacaabb60..653e473fe 100644
--- a/src/toolkit/moz-configure.patch
+++ b/src/toolkit/moz-configure.patch
@@ -1,8 +1,8 @@
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
-index 226d0c5a93a9a2404e1974001da4e34b7b670067..b73277448f7d2706d316df2505e17d232f392d47 100644
+index 75e99bbd2490b9014be6f4e956546d4507e751df..fbe16d282113175f067d739e1284b2544d014e7d 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
-@@ -22,6 +22,7 @@ def check_moz_app_id(moz_app_id, build_project):
+@@ -20,6 +20,7 @@ def check_moz_app_id(moz_app_id, build_project):
project_flag(
env="MOZ_APP_VENDOR",
@@ -10,7 +10,7 @@ index 226d0c5a93a9a2404e1974001da4e34b7b670067..b73277448f7d2706d316df2505e17d23
nargs=1,
help='Used for application.ini\'s "Vendor" field, which also impacts profile location and user-visible fields',
)
-@@ -35,6 +36,7 @@ project_flag(
+@@ -33,6 +34,7 @@ project_flag(
project_flag(
"MOZ_APP_PROFILE",
@@ -18,7 +18,7 @@ index 226d0c5a93a9a2404e1974001da4e34b7b670067..b73277448f7d2706d316df2505e17d23
nargs=1,
help='Used for application.ini\'s "Profile" field, which controls profile location',
)
-@@ -86,10 +88,13 @@ option(
+@@ -84,10 +86,13 @@ option(
)
set_config("MOZ_INCLUDE_SOURCE_INFO", True, when="MOZ_INCLUDE_SOURCE_INFO")
@@ -33,20 +33,7 @@ index 226d0c5a93a9a2404e1974001da4e34b7b670067..b73277448f7d2706d316df2505e17d23
help="Set distribution-specific id",
)
set_config("MOZ_DISTRIBUTION_ID", depends("--with-distribution-id")(lambda v: v[0]))
-@@ -931,9 +936,9 @@ set_config("MOZ_SYSTEM_AV1", True, when="--with-system-av1")
- option("--disable-jxl", help="Disable jxl image support")
-
-
--@depends("--disable-jxl", milestone.is_nightly)
--def jxl(value, is_nightly):
-- if is_nightly and value:
-+@depends("--disable-jxl")
-+def jxl(value):
-+ if value:
- return True
-
-
-@@ -2070,7 +2075,7 @@ set_define("A11Y_LOG", True, when=a11y_log)
+@@ -2032,7 +2037,7 @@ set_define("A11Y_LOG", True, when=a11y_log)
# ==============================================================
@depends(milestone)
def require_signing(milestone):
@@ -55,7 +42,7 @@ index 226d0c5a93a9a2404e1974001da4e34b7b670067..b73277448f7d2706d316df2505e17d23
option(
-@@ -3903,7 +3908,7 @@ with only_when(compile_environment):
+@@ -3916,7 +3921,7 @@ with only_when(compile_environment):
return "Mozilla"
elif target.os == "Android":
return ".mozilla"
@@ -64,3 +51,12 @@ index 226d0c5a93a9a2404e1974001da4e34b7b670067..b73277448f7d2706d316df2505e17d23
option(
"--with-user-appdir",
+@@ -4329,7 +4334,7 @@ with only_when(target_is_windows):
+
+ @depends(target.abi)
+ def desktop_launcher_enabled(abi):
+- return abi == "msvc"
++ return False # See gh-13745
+
+ set_config("DESKTOP_LAUNCHER_ENABLED", True, when=desktop_launcher_enabled)
+ set_define("DESKTOP_LAUNCHER_ENABLED", True, when=desktop_launcher_enabled)
diff --git a/src/toolkit/mozapps/extensions/AddonManager-sys-mjs.patch b/src/toolkit/mozapps/extensions/AddonManager-sys-mjs.patch
index 0f6166b95..2fac8284c 100644
--- a/src/toolkit/mozapps/extensions/AddonManager-sys-mjs.patch
+++ b/src/toolkit/mozapps/extensions/AddonManager-sys-mjs.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/mozapps/extensions/AddonManager.sys.mjs b/toolkit/mozapps/extensions/AddonManager.sys.mjs
-index dc1a6f7e1e7fc3cb37fdf783db425793afe04f52..512749ee8c2a2ff4e099eb91ddb2d40fb1d361c2 100644
+index 06539de2cd61fca60e4e78a659650b00a1309317..e5077e4eb14bf23df3aba032621df75631b2a533 100644
--- a/toolkit/mozapps/extensions/AddonManager.sys.mjs
+++ b/toolkit/mozapps/extensions/AddonManager.sys.mjs
@@ -1282,12 +1282,12 @@ var AddonManagerInternal = {
diff --git a/src/toolkit/profile/nsToolkitProfileService-cpp.patch b/src/toolkit/profile/nsToolkitProfileService-cpp.patch
index b82ab8c93..f0b2782e1 100644
--- a/src/toolkit/profile/nsToolkitProfileService-cpp.patch
+++ b/src/toolkit/profile/nsToolkitProfileService-cpp.patch
@@ -1,17 +1,17 @@
diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp
-index df573b68c781a91763bb60ff63a248cea7a1c5af..f7b68fb5bc5ca22bdaf768a3afe2eb3eae568bc0 100644
+index f624b97e480cdeae8e7621060b33c7ab872c4523..2fc8240543ef391f43ca6a02d169302488d738cc 100644
--- a/toolkit/profile/nsToolkitProfileService.cpp
+++ b/toolkit/profile/nsToolkitProfileService.cpp
-@@ -97,6 +97,8 @@ using namespace mozilla;
- #define INSTALL_PREFIX_LENGTH 7
+@@ -101,6 +101,8 @@ using namespace mozilla;
#define STORE_ID_PREF "toolkit.profiles.storeID"
+ #define NEW_PROFILE_PREF "toolkit.profiles.newProfileSubmitted"
+#include "zenToolkitProfileServiceDefaultOverride.h"
+
struct KeyValue {
KeyValue(const char* aKey, const char* aValue) : key(aKey), value(aValue) {}
-@@ -1418,7 +1420,7 @@ nsresult nsToolkitProfileService::CreateDefaultProfile(
+@@ -1482,7 +1484,7 @@ nsresult nsToolkitProfileService::CreateDefaultProfile(
if (mUseDevEditionProfile) {
name.AssignLiteral(DEV_EDITION_NAME);
} else if (mUseDedicatedProfile) {
diff --git a/src/toolkit/themes/shared/design-system/dist/tokens-shared-css.patch b/src/toolkit/themes/shared/design-system/dist/tokens-shared-css.patch
index 7220ae5c7..280ba70ce 100644
--- a/src/toolkit/themes/shared/design-system/dist/tokens-shared-css.patch
+++ b/src/toolkit/themes/shared/design-system/dist/tokens-shared-css.patch
@@ -1,13 +1,24 @@
diff --git a/toolkit/themes/shared/design-system/dist/tokens-shared.css b/toolkit/themes/shared/design-system/dist/tokens-shared.css
-index 452f3731fbca42a3529ab14421ef1c2c453b6c01..66791a5b6b074bccb02905053f043cc054b6bd57 100644
+index 94afbe630914eef375967f2eff310d69c61fa1aa..04b42529d43c5100a76c883220875c0b70ad0616 100644
--- a/toolkit/themes/shared/design-system/dist/tokens-shared.css
+++ b/toolkit/themes/shared/design-system/dist/tokens-shared.css
@@ -7,6 +7,8 @@
- @layer tokens-foundation, tokens-foundation-nova, tokens-prefers-contrast, tokens-prefers-contrast-nova, tokens-forced-colors, tokens-forced-colors-nova;
+ @layer tokens-foundation, tokens-foundation-nova, tokens-prefers-contrast, tokens-prefers-contrast-nova, tokens-forced-colors, tokens-forced-colors-nova, tokens-browser-theme, tokens-browser-theme-nova;
+@import url("chrome://browser/content/zen-styles/zen-theme.css");
+
@layer tokens-foundation {
:root,
:host(.anonymous-content-host) {
+@@ -368,8 +370,8 @@
+ --panel-background-color-dimmed-further: color-mix(in srgb, currentColor 30%, transparent);
+ --panel-border-color: ThreeDShadow;
+ --panel-border-radius: var(--border-radius-medium);
+- --panel-box-shadow: 0 0 var(--panel-box-shadow-margin) hsla(0, 0%, 0%, 0.2);
+- --panel-box-shadow-margin: 4px;
++ --panel-box-shadow: var(--zen-big-shadow);
++ --panel-box-shadow-margin: 8px;
+ --panel-menuitem-border-radius: var(--border-radius-small);
+ --panel-menuitem-margin: var(--panel-menuitem-margin-block) var(--panel-menuitem-margin-inline);
+ --panel-menuitem-margin-block: 0px;
diff --git a/src/toolkit/themes/shared/design-system/src/panel-css.patch b/src/toolkit/themes/shared/design-system/src/panel-css.patch
deleted file mode 100644
index 9593afb73..000000000
--- a/src/toolkit/themes/shared/design-system/src/panel-css.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/toolkit/themes/shared/design-system/src/panel.css b/toolkit/themes/shared/design-system/src/panel.css
-index 92a6b4b23aee7d880bee21a5e843653444e3fc32..2d0a73d338b4e4d5a0f98b8e3c00134a823c223c 100644
---- a/toolkit/themes/shared/design-system/src/panel.css
-+++ b/toolkit/themes/shared/design-system/src/panel.css
-@@ -10,8 +10,8 @@
- --panel-color: FieldText;
- --panel-padding-block: var(--dimension-4);
- --panel-padding: var(--dimension-16);
-- --panel-shadow-margin: var(--dimension-4);
-- --panel-shadow: 0 0 var(--panel-shadow-margin) hsla(0, 0%, 0%, 0.2);
-+ --panel-shadow-margin: 8px;
-+ --panel-shadow: var(--zen-big-shadow);
- --panel-width: initial;
- --panel-dimmed: color-mix(in srgb, currentColor 17%, transparent);
- --panel-dimmed-further: color-mix(in srgb, currentColor 30%, transparent);
diff --git a/src/toolkit/themes/shared/design-system/src/toolbar-css.patch b/src/toolkit/themes/shared/design-system/src/toolbar-css.patch
index 6a3c8765b..bfe95d002 100644
--- a/src/toolkit/themes/shared/design-system/src/toolbar-css.patch
+++ b/src/toolkit/themes/shared/design-system/src/toolbar-css.patch
@@ -1,12 +1,12 @@
diff --git a/toolkit/themes/shared/design-system/src/toolbar.css b/toolkit/themes/shared/design-system/src/toolbar.css
-index 61667b3f778a66b74aa7b169cd646a8437a5dd42..d1a9e5ad121a44f182e7061a21f4bbe9540cae8c 100644
+index b5e0d34222312ec568d027725489ac8beee41dbe..c6fc389fbf4b3864f391b197c33ebd616bfc3b3c 100644
--- a/toolkit/themes/shared/design-system/src/toolbar.css
+++ b/toolkit/themes/shared/design-system/src/toolbar.css
-@@ -61,7 +61,6 @@
- --toolbar-field-color: inherit;
-
- @media (prefers-color-scheme: light) {
-- --toolbar-bgcolor: var(--color-white);
+@@ -9,7 +9,6 @@
+ :root {
+ @media not (prefers-contrast) {
+ @media (prefers-color-scheme: light) {
+- --toolbar-background-color: var(--color-white);
+ }
}
}
-
diff --git a/src/toolkit/themes/shared/in-content/common-shared-css.patch b/src/toolkit/themes/shared/in-content/common-shared-css.patch
index c8393e16c..5d60ff2e8 100644
--- a/src/toolkit/themes/shared/in-content/common-shared-css.patch
+++ b/src/toolkit/themes/shared/in-content/common-shared-css.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/themes/shared/in-content/common-shared.css b/toolkit/themes/shared/in-content/common-shared.css
-index 37c30173e5670f4ed0a557c6118c8e8cab53026f..cb9deb4386fe7dda6672df5fd7d51277f2d638dc 100644
+index 8cbeb5d266b19c2c5b3d605b23c8c421a03c2a0e..7db0baeee11b99a5da1c143c682e38751a9ac03c 100644
--- a/toolkit/themes/shared/in-content/common-shared.css
+++ b/toolkit/themes/shared/in-content/common-shared.css
@@ -57,7 +57,7 @@
diff --git a/src/toolkit/xre/nsXREDirProvider-cpp.patch b/src/toolkit/xre/nsXREDirProvider-cpp.patch
index f138d45da..963848a85 100644
--- a/src/toolkit/xre/nsXREDirProvider-cpp.patch
+++ b/src/toolkit/xre/nsXREDirProvider-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
-index 43dafeaceded7ec06e283ef602cab9f0d11bfe2a..8b0f4980650f23a0d2cff79d387ca2c75018187b 100644
+index b54980f967ab8fe9b9c13bbad8fae6323ec84f1f..f1a5481fb3bd44c1f8f6e40f4163aa7842623325 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
-@@ -1341,9 +1341,11 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
+@@ -1333,9 +1333,11 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
// Similar to nsXREDirProvider::AppendProfilePath.
// TODO: Bug 1990407 - Evaluate if refactoring might be required there in the
// future?
@@ -15,7 +15,7 @@ index 43dafeaceded7ec06e283ef602cab9f0d11bfe2a..8b0f4980650f23a0d2cff79d387ca2c7
MOZ_TRY(aFile->AppendRelativeNativePath(profile));
} else {
nsAutoCString vendor;
-@@ -1353,8 +1355,6 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
+@@ -1345,8 +1347,6 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
ToLowerCase(vendor);
ToLowerCase(appName);
@@ -24,7 +24,7 @@ index 43dafeaceded7ec06e283ef602cab9f0d11bfe2a..8b0f4980650f23a0d2cff79d387ca2c7
MOZ_TRY(aFile->AppendRelativeNativePath(appName));
}
-@@ -1522,13 +1522,8 @@ nsresult nsXREDirProvider::GetLegacyOrXDGHomePath(const char* aHomeDir,
+@@ -1514,13 +1514,8 @@ nsresult nsXREDirProvider::GetLegacyOrXDGHomePath(const char* aHomeDir,
// If the build was made against a specific profile name, MOZ_APP_PROFILE=
// then make sure we respect this and dont move to XDG directory
diff --git a/src/tools/lint/rejected-words-yml.patch b/src/tools/lint/rejected-words-yml.patch
index 0cb5dbe4a..83abddee4 100644
--- a/src/tools/lint/rejected-words-yml.patch
+++ b/src/tools/lint/rejected-words-yml.patch
@@ -1,9 +1,9 @@
diff --git a/tools/lint/rejected-words.yml b/tools/lint/rejected-words.yml
-index 3eb549d252c9f5f7b5cbcf72ca1480025794b481..1a065643971f1048e9598b3c389f51e199eba63d 100644
+index eae20774aaf1001a8fd06dbfe13dca13979db4ad..dd4786dcb8ea1ca4d2115a775bd1e940d2ccd725 100644
--- a/tools/lint/rejected-words.yml
+++ b/tools/lint/rejected-words.yml
-@@ -8,7 +8,6 @@ avoid-blacklist-and-whitelist:
- ignore-case: true
+@@ -13,7 +13,6 @@ avoid-blacklist-and-whitelist:
+ - 'tools/lint/mozcheck/**'
# Based on codespell with idl and webidl added.
extensions:
- - js
diff --git a/src/tools/signing/macos/mach_commands-py.patch b/src/tools/signing/macos/mach_commands-py.patch
index a1e3de73b..8b73cce7b 100644
--- a/src/tools/signing/macos/mach_commands-py.patch
+++ b/src/tools/signing/macos/mach_commands-py.patch
@@ -1,5 +1,5 @@
diff --git a/tools/signing/macos/mach_commands.py b/tools/signing/macos/mach_commands.py
-index c7ef5496daa36d77dbe11da7d30f3258e54f4936..6a28dc5233c88b866a9db212ded43ad86d63c1d7 100644
+index 319a9c9c37638d8114a94cde1c02e84d9aea916a..bd8301eacc5d37df2bef0850836f08dd996ca32e 100644
--- a/tools/signing/macos/mach_commands.py
+++ b/tools/signing/macos/mach_commands.py
@@ -37,7 +37,6 @@ from mozbuild.base import MachCommandConditions as conditions
@@ -21,7 +21,7 @@ index c7ef5496daa36d77dbe11da7d30f3258e54f4936..6a28dc5233c88b866a9db212ded43ad8
if use_rcodesign_arg is True:
sign_with_rcodesign(
command_context,
-@@ -630,7 +633,7 @@ def sign_with_rcodesign(
+@@ -637,7 +640,7 @@ def sign_with_rcodesign(
# input path and its options are specified as standard arguments.
ctx.log(logging.INFO, "macos-sign", {}, "Signing with rcodesign")
diff --git a/src/widget/cocoa/VibrancyManager-mm.patch b/src/widget/cocoa/VibrancyManager-mm.patch
index a4f7c5c33..00ea2b670 100644
--- a/src/widget/cocoa/VibrancyManager-mm.patch
+++ b/src/widget/cocoa/VibrancyManager-mm.patch
@@ -45,7 +45,7 @@ index 5df70a63afb235d2db11712276bb63f756222a0f..a2865aa2748433cbfd956ae46d197200
case VibrancyType::Titlebar:
return NSVisualEffectMaterialTitlebar;
}
-@@ -76,6 +96,7 @@ static NSVisualEffectBlendingMode VisualEffectBlendingModeForVibrancyType(
+@@ -76,6 +96,7 @@ - (NSView*)hitTest:(NSPoint)aPoint {
- (void)prefChanged {
self.blendingMode = VisualEffectBlendingModeForVibrancyType(mType);
diff --git a/src/widget/cocoa/nsCocoaUtils-mm.patch b/src/widget/cocoa/nsCocoaUtils-mm.patch
index db511042d..6dc5e8e40 100644
--- a/src/widget/cocoa/nsCocoaUtils-mm.patch
+++ b/src/widget/cocoa/nsCocoaUtils-mm.patch
@@ -1,8 +1,8 @@
diff --git a/widget/cocoa/nsCocoaUtils.mm b/widget/cocoa/nsCocoaUtils.mm
-index 49cb2b2d6960cbb0b6a8a17c409cfc909072213d..2406d1b576d1bfd38add149522c64281b9a20889 100644
+index 0c33b8916a4375ee43406d3be347504ef06148e2..51e8c46de07e78ccdd02c0a84a17448dd9f690f9 100644
--- a/widget/cocoa/nsCocoaUtils.mm
+++ b/widget/cocoa/nsCocoaUtils.mm
-@@ -1630,7 +1630,8 @@ bool static ShouldConsiderStartingSwipeFromEvent(NSEvent* anEvent) {
+@@ -1543,7 +1543,8 @@ bool static ShouldConsiderStartingSwipeFromEvent(NSEvent* anEvent) {
return [anEvent type] == NSEventTypeScrollWheel &&
eventPhase == NSEventPhaseBegan &&
[anEvent hasPreciseScrollingDeltas] &&
diff --git a/src/widget/cocoa/nsDragService-mm.patch b/src/widget/cocoa/nsDragService-mm.patch
index 67596f852..8109f2625 100644
--- a/src/widget/cocoa/nsDragService-mm.patch
+++ b/src/widget/cocoa/nsDragService-mm.patch
@@ -1,5 +1,5 @@
diff --git a/widget/cocoa/nsDragService.mm b/widget/cocoa/nsDragService.mm
-index 3b61c3a0d500e14e78d9009c821b47e70926cc97..b4cbc6e0dc0d43a55f074d4908dd414b859e16ed 100644
+index 81fe6f749c1d046141003ad2413605b4d4acf9ed..f26c2556657ad683dad3fa712feca5965343175d 100644
--- a/widget/cocoa/nsDragService.mm
+++ b/widget/cocoa/nsDragService.mm
@@ -22,6 +22,7 @@
@@ -10,7 +10,7 @@ index 3b61c3a0d500e14e78d9009c821b47e70926cc97..b4cbc6e0dc0d43a55f074d4908dd414b
#include "nsIContent.h"
#include "nsCocoaUtils.h"
#include "mozilla/gfx/2D.h"
-@@ -146,6 +147,10 @@ NSImage* nsDragSession::ConstructDragImage(nsINode* aDOMNode,
+@@ -146,6 +147,10 @@
bitsPerPixel:32];
uint8_t* dest = [imageRep bitmapData];
@@ -21,7 +21,7 @@ index 3b61c3a0d500e14e78d9009c821b47e70926cc97..b4cbc6e0dc0d43a55f074d4908dd414b
for (uint32_t i = 0; i < height; ++i) {
uint8_t* src = map.mData + i * map.mStride;
for (uint32_t j = 0; j < width; ++j) {
-@@ -153,15 +158,15 @@ NSImage* nsDragSession::ConstructDragImage(nsINode* aDOMNode,
+@@ -153,15 +158,15 @@
// is premultipled here. Also, Quartz likes RGBA, so do that translation
// as well.
#ifdef IS_BIG_ENDIAN
diff --git a/src/xpfe/appshell/AppWindow-cpp.patch b/src/xpfe/appshell/AppWindow-cpp.patch
index a3b335610..e675cbf39 100644
--- a/src/xpfe/appshell/AppWindow-cpp.patch
+++ b/src/xpfe/appshell/AppWindow-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/xpfe/appshell/AppWindow.cpp b/xpfe/appshell/AppWindow.cpp
-index d980bca7b42bb8d81817756215067771d2793bfe..94992e9d96348e4c88e089e4cdc3234076efb656 100644
+index 6b218ca7d704bcaffd16d741acb0e1d1f0a0cebb..ccd8a98827219fc8ba4ad9f226e81bae53b30836 100644
--- a/xpfe/appshell/AppWindow.cpp
+++ b/xpfe/appshell/AppWindow.cpp
@@ -1847,7 +1847,7 @@ nsresult AppWindow::MaybeSaveEarlyWindowPersistentValues(
diff --git a/src/zen/boosts/ZenBoostStyles.sys.mjs b/src/zen/boosts/ZenBoostStyles.sys.mjs
index 40c230f6f..ac2a022f8 100644
--- a/src/zen/boosts/ZenBoostStyles.sys.mjs
+++ b/src/zen/boosts/ZenBoostStyles.sys.mjs
@@ -82,7 +82,7 @@ export class nsZenBoostStyles {
if (fontCase != "" || fontFamily != "") {
style += `/* Text Format */\n`;
- style += `body * {\n`;
+ style += `body *:not(.google-symbols, gf-load-icon-font, mat-icon, .google-material-icons) {\n`;
style += `${fontFamily}\n`;
style += `${fontCase}\n`;
style += `}\n`;
diff --git a/src/zen/boosts/ZenBoostsEditor.mjs b/src/zen/boosts/ZenBoostsEditor.mjs
index 723229743..f67ad0fa3 100644
--- a/src/zen/boosts/ZenBoostsEditor.mjs
+++ b/src/zen/boosts/ZenBoostsEditor.mjs
@@ -18,6 +18,7 @@ export class nsZenBoostEditor {
"zap-state-update",
"selector-picker-state-update",
"zen-boosts-active-change",
+ "zen-theme-change",
];
/**
@@ -55,6 +56,23 @@ export class nsZenBoostEditor {
this.initColorPicker();
this.initFonts();
this.loadBoost(domain);
+ this.updateColorScheme();
+ }
+
+ get isDarkMode() {
+ return this.openerWindow.gZenThemePicker.isDarkMode;
+ }
+
+ /**
+ * Returns the ZenBoosts JSWindowActor child for the currently selected tab.
+ *
+ * @returns {ZenBoostsChild} zenBoostsChild Boost JSActor child
+ */
+ get zenBoostsChild() {
+ const linkedBrowser = this.openerWindow.gBrowser.selectedTab.linkedBrowser;
+ const actor =
+ linkedBrowser.browsingContext.currentWindowGlobal.getActor("ZenBoosts");
+ return actor;
}
/**
@@ -181,6 +199,24 @@ export class nsZenBoostEditor {
case "zen-boosts-active-change":
this.editorWindow.close();
break;
+ case "zen-theme-change":
+ this.updateColorScheme();
+ break;
+ }
+ }
+
+ /**
+ * Updates the color scheme of the editor window based on the current theme (dark or light mode)
+ */
+ updateColorScheme() {
+ const colorScheme = this.isDarkMode ? "dark" : "light";
+ this.doc.documentElement.style.colorScheme = colorScheme;
+
+ if (this.codeEditorReady) {
+ const container = this.doc.getElementById("zen-boost-code-editor");
+ const editorEl =
+ container.querySelector("iframe").contentDocument.documentElement;
+ editorEl.className = "theme-" + colorScheme;
}
}
@@ -205,7 +241,7 @@ export class nsZenBoostEditor {
const editor = new Editor({
mode: Editor.modes.css,
lineNumbers: true,
- theme: "default", // default is light theme
+ theme: "mozilla",
readOnly: false,
gutters: ["CodeMirror-linenumbers"],
});
@@ -216,6 +252,8 @@ export class nsZenBoostEditor {
this.editorWindow._editor = editor;
this.codeEditorReady = true;
+
+ this.updateColorScheme();
}
/**
@@ -361,12 +399,6 @@ export class nsZenBoostEditor {
}
windowElem.setAttribute("editor", "code");
- // Store the old boost editor width.
- // The window needs the outer width which includes
- // window chrome. This results in the window
- // being smaller than it should be
- this._boostEditorWidth = this.editorWindow.outerWidth;
-
this.editorWindow.requestAnimationFrame(() => {
this.editorWindow.resizeTo(
this._codeEditorWidth,
@@ -400,7 +432,11 @@ export class nsZenBoostEditor {
}
windowElem.setAttribute("editor", "boost");
- this.editorWindow.requestAnimationFrame(() => {
+ this.doc.getElementById("zen-boost-editor-root").style.display = "flex";
+ this.doc.getElementById("zen-boost-code-editor-root").style.display =
+ "none";
+
+ this.editorWindow.promiseDocumentFlushed(() => {
this.editorWindow.resizeTo(
this._boostEditorWidth,
this.editorWindow.outerHeight
@@ -411,10 +447,6 @@ export class nsZenBoostEditor {
this.editorWindow.screenY
);
}
-
- this.doc.getElementById("zen-boost-editor-root").style.display = "flex";
- this.doc.getElementById("zen-boost-code-editor-root").style.display =
- "none";
});
// Disable picker mode
@@ -422,20 +454,13 @@ export class nsZenBoostEditor {
}
async onZapButtonPressed() {
- const linkedBrowser = this.openerWindow.gBrowser.selectedTab.linkedBrowser;
- const actor =
- linkedBrowser.browsingContext.currentWindowGlobal.getActor("ZenBoosts");
- actor.sendQuery("ZenBoost:ToggleZapMode");
-
+ this.zenBoostsChild.sendQuery("ZenBoost:ToggleZapMode");
// Focus the parent browser window
this.openerWindow.focus();
}
async onPickerButtonPressed() {
- const linkedBrowser = this.openerWindow.gBrowser.selectedTab.linkedBrowser;
- const actor =
- linkedBrowser.browsingContext.currentWindowGlobal.getActor("ZenBoosts");
- actor.sendQuery("ZenBoost:TogglePickerMode");
+ this.zenBoostsChild.sendQuery("ZenBoost:TogglePickerMode");
this.openerWindow.focus();
}
@@ -460,16 +485,11 @@ ${cssSelector} {
}
onInspectorButtonPressed() {
- const linkedBrowser = this.openerWindow.gBrowser.selectedTab.linkedBrowser;
- const actor =
- linkedBrowser.browsingContext.currentWindowGlobal.getActor("ZenBoosts");
- actor.sendQuery("ZenBoost:OpenInspector");
+ this.zenBoostsChild.sendQuery("ZenBoost:OpenInspector");
}
async onUpdateZapButtonVisual() {
- const linkedBrowser = this.openerWindow.gBrowser.selectedTab.linkedBrowser;
- const actor =
- linkedBrowser.browsingContext.currentWindowGlobal.getActor("ZenBoosts");
+ const actor = this.zenBoostsChild;
const zapButton = this.doc.getElementById("zen-boost-zap");
const zapEnabled = await actor.sendQuery("ZenBoost:ZapModeEnabled");
@@ -480,12 +500,8 @@ ${cssSelector} {
}
async onUpdatePickerButtonVisual() {
- const linkedBrowser = this.openerWindow.gBrowser.selectedTab.linkedBrowser;
- const actor =
- linkedBrowser.browsingContext.currentWindowGlobal.getActor("ZenBoosts");
-
const pickerButton = this.doc.getElementById("zen-boost-css-picker");
- const selectEnabled = await actor.sendQuery(
+ const selectEnabled = await this.zenBoostsChild.sendQuery(
"ZenBoost:SelectorPickerModeEnabled"
);
@@ -624,6 +640,7 @@ ${cssSelector} {
this.currentBoostData.textCaseOverride = "uppercase";
}
+ this.currentBoostData.changeWasMade = true;
this.updateCaseButtonVisuals();
this.updateCurrentBoost();
}
@@ -631,7 +648,7 @@ ${cssSelector} {
/**
* Handles the size toggle button press, cycling through size override options
*/
- onBoostSizePressed() {
+ async onBoostSizePressed() {
if (this.currentBoostData.sizeOverride == 1) {
this.currentBoostData.sizeOverride = 1.1;
} else if (this.currentBoostData.sizeOverride == 1.1) {
@@ -642,8 +659,10 @@ ${cssSelector} {
this.currentBoostData.sizeOverride = 0.9;
} else if (this.currentBoostData.sizeOverride == 0.9) {
this.currentBoostData.sizeOverride = 1;
+ await this.zenBoostsChild.sendQuery("ZenBoost:DisableSizeOverride");
}
+ this.currentBoostData.changeWasMade = true;
this.updateSizeButtonVisuals();
this.updateCurrentBoost();
}
@@ -824,13 +843,19 @@ ${cssSelector} {
const dotSec = this.doc.querySelector(
"#zen-boost-color-picker-dot-secondary"
);
+
+ const dotDistance = this.currentBoostData.dotDistance;
+ const dotAngleDeg = this.currentBoostData.dotAngleDeg;
+ const secondaryDotAngleDelta =
+ this.currentBoostData.secondaryDotAngleDegDelta ?? 0;
+
dot.style.setProperty(
"--zen-theme-picker-dot-color",
- `hsl(${this.currentBoostData.dotAngleDeg}deg, ${this.currentBoostData.dotDistance * 100}%, 55%)`
+ `hsl(${dotAngleDeg}deg, ${dotDistance * 100}%, 55%)`
);
dotSec.style.setProperty(
"--zen-theme-picker-dot-color",
- `hsl(${this.currentBoostData.dotAngleDeg + this.currentBoostData.secondaryDotAngleDegDelta}deg, ${this.currentBoostData.dotDistance * 100}%, 20%)`
+ `hsl(${dotAngleDeg + secondaryDotAngleDelta}deg, ${dotDistance * 100}%, 20%)`
);
}
@@ -854,22 +879,23 @@ ${cssSelector} {
const centerY = rect.top + rect.height / 2;
const radius = (rect.width - padding) / 2;
+ const dotDistance = this.currentBoostData.dotDistance;
+ const primaryDotAngleDeg = this.currentBoostData.dotAngleDeg;
+
let angle = null;
- if (!pixelX || !pixelY) {
+ if (pixelX == null || pixelY == null) {
pixelX = centerX;
pixelY = centerY;
angle = this.currentBoostData.secondaryDotAngleDegDelta;
} else {
angle = Math.atan2(pixelY - centerY, pixelX - centerX);
- pixelX =
- centerX + Math.cos(angle) * this.currentBoostData.dotDistance * radius;
- pixelY =
- centerY + Math.sin(angle) * this.currentBoostData.dotDistance * radius;
+ pixelX = centerX + Math.cos(angle) * dotDistance * radius;
+ pixelY = centerY + Math.sin(angle) * dotDistance * radius;
}
// Rad to degree
this.currentBoostData.secondaryDotAngleDegDelta =
- ((angle * 180) / Math.PI + 100 - this.currentBoostData.dotAngleDeg) % 360;
+ ((angle * 180) / Math.PI + 100 - primaryDotAngleDeg) % 360;
if (this.currentBoostData.secondaryDotAngleDegDelta < 0) {
this.currentBoostData.secondaryDotAngleDegDelta += 360;
}
@@ -902,14 +928,19 @@ ${cssSelector} {
const cx = rect.width / 2;
const cy = rect.height / 2;
+ const dotDistance = this.currentBoostData.dotDistance;
+ const dotAngleDeg = this.currentBoostData.dotAngleDeg;
+ const secondaryDotAngleDelta =
+ this.currentBoostData.secondaryDotAngleDegDelta ?? 0;
+
// Updating the circle size to match the distance of the point
const circle = this.doc.querySelector(".zen-boost-color-picker-circle");
circle.setAttribute("animated", "false");
- circle.style.width = `${this.currentBoostData.dotDistance * radius * 2}px`;
- circle.style.height = `${this.currentBoostData.dotDistance * radius * 2}px`;
+ circle.style.width = `${dotDistance * radius * 2}px`;
+ circle.style.height = `${dotDistance * radius * 2}px`;
- const dotColor = `hsl(${this.currentBoostData.dotAngleDeg}deg, ${this.currentBoostData.dotDistance * 100}%, 55%)`;
- const dotColorSec = `hsl(${this.currentBoostData.dotAngleDeg + this.currentBoostData.secondaryDotAngleDegDelta}deg, ${this.currentBoostData.dotDistance * 100}%, 20%)`;
+ const dotColor = `hsl(${dotAngleDeg}deg, ${dotDistance * 100}%, 55%)`;
+ const dotColorSec = `hsl(${dotAngleDeg + secondaryDotAngleDelta}deg, ${dotDistance * 100}%, 20%)`;
this.updateArcFill(cx, cy, radius, dotColor, dotColorSec);
}
@@ -1154,12 +1185,6 @@ ${cssSelector} {
invertButton.classList.remove("zen-boost-button-active");
}
- if (this.currentBoostData.smartInvert) {
- invertButton.classList.add("zen-boost-button-active");
- } else {
- invertButton.classList.remove("zen-boost-button-active");
- }
-
if (!this.currentBoostData.enableColorBoost) {
disableButton.classList.add("zen-boost-button-active-transparent");
} else {
diff --git a/src/zen/boosts/ZenBoostsManager.sys.mjs b/src/zen/boosts/ZenBoostsManager.sys.mjs
index a93492da5..0a84833d1 100644
--- a/src/zen/boosts/ZenBoostsManager.sys.mjs
+++ b/src/zen/boosts/ZenBoostsManager.sys.mjs
@@ -114,9 +114,12 @@ class nsZenBoostsManager {
boostData: {
boostName: "My Boost",
- dotAngleDeg: 0,
+ /* These initial values depend on
+ each other. Changing one means having to
+ recalculate all of them manually. */
+ dotAngleDeg: 131.61,
dotPos: { x: 0.76, y: 0.66 },
- dotDistance: 0,
+ dotDistance: 0.91,
secondaryDotAngleDegDelta: 55,
secondaryDotPos: { x: 0.5, y: 0.81 },
diff --git a/src/zen/boosts/ZenSelectorComponent.sys.mjs b/src/zen/boosts/ZenSelectorComponent.sys.mjs
index 5a39409a1..0a9de26cb 100644
--- a/src/zen/boosts/ZenSelectorComponent.sys.mjs
+++ b/src/zen/boosts/ZenSelectorComponent.sys.mjs
@@ -50,7 +50,7 @@ export class SelectorComponent {
localizationArray = null
) {
this.document = document;
- this.window = document.ownerGlobal;
+ this.window = document.documentGlobal;
this.zenBoostsChild = zenBoostsChild;
this.#onSelect = onSelect;
diff --git a/src/zen/boosts/ZenZapDissolve.sys.mjs b/src/zen/boosts/ZenZapDissolve.sys.mjs
index ab1276346..32c14c1ee 100644
--- a/src/zen/boosts/ZenZapDissolve.sys.mjs
+++ b/src/zen/boosts/ZenZapDissolve.sys.mjs
@@ -164,7 +164,7 @@ void main() {
return;
}
this.document = document;
- this.window = document.ownerGlobal;
+ this.window = document.documentGlobal;
}
/**
diff --git a/src/zen/boosts/ZenZapOverlayChild.sys.mjs b/src/zen/boosts/ZenZapOverlayChild.sys.mjs
index 7b8b4ed35..c00ae8e34 100644
--- a/src/zen/boosts/ZenZapOverlayChild.sys.mjs
+++ b/src/zen/boosts/ZenZapOverlayChild.sys.mjs
@@ -34,7 +34,7 @@ export class ZapOverlay {
*/
constructor(document, zenBoostsChild) {
this.document = document;
- this.window = document.ownerGlobal;
+ this.window = document.documentGlobal;
this.zenBoostsChild = zenBoostsChild;
this.#selectorComponent = new lazy.SelectorComponent(
diff --git a/src/zen/boosts/actors/ZenBoostsChild.sys.mjs b/src/zen/boosts/actors/ZenBoostsChild.sys.mjs
index 597a74c09..13551682f 100644
--- a/src/zen/boosts/actors/ZenBoostsChild.sys.mjs
+++ b/src/zen/boosts/actors/ZenBoostsChild.sys.mjs
@@ -280,6 +280,9 @@ export class ZenBoostsChild extends JSWindowActorChild {
case "ZenBoost:OpenInspector":
this.sendAsyncMessage("ZenBoost:OpenInspector");
break;
+ case "ZenBoost:DisableSizeOverride":
+ this.disableSizeOverride();
+ break;
}
return null;
}
@@ -549,6 +552,14 @@ export class ZenBoostsChild extends JSWindowActorChild {
this.sendNotify("selector-picker-state-update", "ondisable");
}
+ disableSizeOverride() {
+ const browsingContext = this.browsingContext;
+ if (!browsingContext || browsingContext.parent !== null) {
+ return;
+ }
+ browsingContext.fullZoom = 1;
+ }
+
sendNotify(topic, msg = null) {
this.sendAsyncMessage("ZenBoost:Notify", { topic, msg });
}
diff --git a/src/zen/boosts/gtest/TestZenBoostsAccentCache.cpp b/src/zen/boosts/gtest/TestZenBoostsAccentCache.cpp
new file mode 100644
index 000000000..39896f863
--- /dev/null
+++ b/src/zen/boosts/gtest/TestZenBoostsAccentCache.cpp
@@ -0,0 +1,104 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "gtest/gtest.h"
+
+#include "mozilla/nsZenBoostsBackend.h"
+
+using zen::detail::AccentCacheSize;
+using zen::detail::EnsureCachedAccent;
+using zen::detail::IsAccentCached;
+using zen::detail::ResetAccentCache;
+
+namespace {
+
+class ZenBoostsAccentCache : public ::testing::Test {
+ protected:
+ void SetUp() override { ResetAccentCache(); }
+ void TearDown() override { ResetAccentCache(); }
+};
+
+constexpr nscolor kAccentA = NS_RGBA(80, 120, 200, 200);
+constexpr nscolor kAccentB = NS_RGBA(200, 80, 80, 200);
+constexpr nscolor kAccentC = NS_RGBA(80, 200, 120, 200);
+constexpr nscolor kAccentD = NS_RGBA(200, 200, 80, 200);
+constexpr nscolor kAccentE = NS_RGBA(120, 80, 200, 200);
+
+} // namespace
+
+TEST_F(ZenBoostsAccentCache, SizeIsAtLeastFour) {
+ EXPECT_GE(AccentCacheSize(), 4u);
+}
+
+TEST_F(ZenBoostsAccentCache, EmptyAfterReset) {
+ EnsureCachedAccent(kAccentA, 0.0f);
+ ResetAccentCache();
+ EXPECT_FALSE(IsAccentCached(kAccentA, 0.0f));
+}
+
+TEST_F(ZenBoostsAccentCache, SameKeyIsCachedAfterEnsure) {
+ EXPECT_FALSE(IsAccentCached(kAccentA, 0.0f));
+ EnsureCachedAccent(kAccentA, 0.0f);
+ EXPECT_TRUE(IsAccentCached(kAccentA, 0.0f));
+}
+
+// Keying on accent alone would silently serve a stale complementary accent
+// when the rotation changes.
+TEST_F(ZenBoostsAccentCache, DifferentRotationOccupiesDistinctEntry) {
+ EnsureCachedAccent(kAccentA, 0.0f);
+ EnsureCachedAccent(kAccentA, 90.0f);
+ EXPECT_TRUE(IsAccentCached(kAccentA, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentA, 90.0f));
+}
+
+TEST_F(ZenBoostsAccentCache, DifferentAccentOccupiesDistinctEntry) {
+ EnsureCachedAccent(kAccentA, 30.0f);
+ EnsureCachedAccent(kAccentB, 30.0f);
+ EXPECT_TRUE(IsAccentCached(kAccentA, 30.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentB, 30.0f));
+}
+
+TEST_F(ZenBoostsAccentCache, RoundRobinEvictsOldestEntry) {
+ ASSERT_EQ(AccentCacheSize(), 4u);
+
+ EnsureCachedAccent(kAccentA, 0.0f);
+ EnsureCachedAccent(kAccentB, 0.0f);
+ EnsureCachedAccent(kAccentC, 0.0f);
+ EnsureCachedAccent(kAccentD, 0.0f);
+
+ EXPECT_TRUE(IsAccentCached(kAccentA, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentB, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentC, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentD, 0.0f));
+
+ EnsureCachedAccent(kAccentE, 0.0f);
+ EXPECT_FALSE(IsAccentCached(kAccentA, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentB, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentC, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentD, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentE, 0.0f));
+}
+
+// A cache hit must not consume a fresh slot, otherwise repeated paints with
+// the same accent would evict their own neighbours.
+TEST_F(ZenBoostsAccentCache, RepeatEnsureDoesNotChurnTheCache) {
+ ASSERT_EQ(AccentCacheSize(), 4u);
+
+ EnsureCachedAccent(kAccentA, 0.0f);
+ EnsureCachedAccent(kAccentB, 0.0f);
+ EnsureCachedAccent(kAccentC, 0.0f);
+
+ for (int i = 0; i < 16; ++i) {
+ EnsureCachedAccent(kAccentA, 0.0f);
+ }
+
+ EXPECT_TRUE(IsAccentCached(kAccentA, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentB, 0.0f));
+ EXPECT_TRUE(IsAccentCached(kAccentC, 0.0f));
+
+ EnsureCachedAccent(kAccentD, 0.0f);
+ EnsureCachedAccent(kAccentE, 0.0f);
+
+ EXPECT_FALSE(IsAccentCached(kAccentA, 0.0f));
+}
diff --git a/src/zen/boosts/gtest/TestZenBoostsResolveStyleColor.cpp b/src/zen/boosts/gtest/TestZenBoostsResolveStyleColor.cpp
new file mode 100644
index 000000000..625bda981
--- /dev/null
+++ b/src/zen/boosts/gtest/TestZenBoostsResolveStyleColor.cpp
@@ -0,0 +1,42 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "gtest/gtest.h"
+
+#include "mozilla/nsZenBoostsBackend.h"
+
+using zen::nsZenBoostsBackend;
+
+namespace {
+
+const nscolor kResolveColors[] = {
+ NS_RGBA(0, 0, 0, 255), NS_RGBA(255, 255, 255, 255),
+ NS_RGBA(128, 128, 128, 255), NS_RGBA(255, 0, 0, 255),
+ NS_RGBA(0, 255, 0, 255), NS_RGBA(0, 0, 255, 255),
+ NS_RGBA(40, 44, 52, 255), NS_RGBA(248, 248, 248, 255),
+ NS_RGBA(20, 22, 28, 255), NS_RGBA(80, 80, 80, 200),
+ NS_RGBA(240, 17, 99, 1), NS_RGBA(0, 0, 0, 0),
+};
+
+} // namespace
+
+// Removing the null-frame guard would crash chrome-process callers that
+// legitimately pass nullptr (canvas getComputedStyle, font-palette binding,
+// the StyleColor(nscolor)/StyleColor(StyleAbsoluteColor) overloads).
+TEST(ZenBoostsResolveStyleColor, NullFrameIsIdentity)
+{
+ for (nscolor c : kResolveColors) {
+ EXPECT_EQ(nsZenBoostsBackend::ResolveStyleColor(c, nullptr), c);
+ }
+}
+
+TEST(ZenBoostsResolveStyleColor, NullFrameIsIdempotent)
+{
+ for (nscolor c : kResolveColors) {
+ nscolor once = nsZenBoostsBackend::ResolveStyleColor(c, nullptr);
+ nscolor twice = nsZenBoostsBackend::ResolveStyleColor(once, nullptr);
+ EXPECT_EQ(once, c);
+ EXPECT_EQ(twice, c);
+ }
+}
diff --git a/src/zen/boosts/gtest/moz.build b/src/zen/boosts/gtest/moz.build
index cc14100b7..0d375c734 100644
--- a/src/zen/boosts/gtest/moz.build
+++ b/src/zen/boosts/gtest/moz.build
@@ -3,7 +3,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
UNIFIED_SOURCES += [
+ "TestZenBoostsAccentCache.cpp",
"TestZenBoostsColorFilter.cpp",
+ "TestZenBoostsResolveStyleColor.cpp",
]
FINAL_LIBRARY = "xul-gtest"
diff --git a/src/zen/boosts/nsZenBoostsBackend.cpp b/src/zen/boosts/nsZenBoostsBackend.cpp
index 6a64cd724..9efc6acef 100644
--- a/src/zen/boosts/nsZenBoostsBackend.cpp
+++ b/src/zen/boosts/nsZenBoostsBackend.cpp
@@ -450,11 +450,9 @@ inline static void GetZenBoostsDataForFrame(const nsIFrame* aFrame,
} // namespace
+#ifdef ENABLE_TESTS
namespace detail {
-// Thin forwarders that give unit tests access to the pure color math without
-// pulling in the singleton / BrowsingContext. They are defined here, after the
-// anonymous namespace, so they can reach those file-local implementations.
nsZenAccentOklab PrecomputeAccent(nscolor aAccentColor) {
return zenPrecomputeAccent(aAccentColor);
}
@@ -474,7 +472,33 @@ nscolor InvertColorChannel(nscolor aColor) {
return zenInvertColorChannel(aColor);
}
+size_t AccentCacheSize() { return kAccentCacheSize; }
+
+void ResetAccentCache() {
+ for (auto& entry : sAccentCache) {
+ entry.valid = false;
+ entry.accentNS = 0;
+ entry.rotationDeg = 0.0f;
+ }
+ sAccentCacheNext = 0;
+}
+
+bool IsAccentCached(nscolor aAccentNS, float aRotationDeg) {
+ for (const auto& entry : sAccentCache) {
+ if (entry.valid && entry.accentNS == aAccentNS &&
+ entry.rotationDeg == aRotationDeg) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void EnsureCachedAccent(nscolor aAccentNS, float aRotationDeg) {
+ (void)GetCachedAccent(aAccentNS, aRotationDeg);
+}
+
} // namespace detail
+#endif // ENABLE_TESTS
static mozilla::StaticRefPtr sZenBoostsBackend;
diff --git a/src/zen/boosts/nsZenBoostsBackend.h b/src/zen/boosts/nsZenBoostsBackend.h
index 1d2073372..2905dae5e 100644
--- a/src/zen/boosts/nsZenBoostsBackend.h
+++ b/src/zen/boosts/nsZenBoostsBackend.h
@@ -27,10 +27,9 @@ struct nsZenAccentOklab {
float contrastFactor;
};
+#ifdef ENABLE_TESTS
+// Test-only forwarders into the file-local color math and accent cache.
namespace detail {
-// Pure color-math primitives, exposed for unit testing. These have no
-// dependency on the singleton, the BrowsingContext, or the process type, so
-// they can be exercised directly from gtest.
nsZenAccentOklab PrecomputeAccent(nscolor aAccentColor);
nsZenAccentOklab RotateAccent(const nsZenAccentOklab& aBase,
float aRotationDeg);
@@ -38,7 +37,13 @@ nscolor FilterColorChannel(nscolor aOriginalColor,
const nsZenAccentOklab& aAccent,
const nsZenAccentOklab& aComplementary);
nscolor InvertColorChannel(nscolor aColor);
+
+size_t AccentCacheSize();
+void ResetAccentCache();
+bool IsAccentCached(nscolor aAccentNS, float aRotationDeg);
+void EnsureCachedAccent(nscolor aAccentNS, float aRotationDeg);
} // namespace detail
+#endif // ENABLE_TESTS
class nsZenBoostsBackend final : public nsISupports {
public:
diff --git a/src/zen/boosts/zen-advanced-color-options.css b/src/zen/boosts/zen-advanced-color-options.css
index 4cc651de8..385d075ab 100644
--- a/src/zen/boosts/zen-advanced-color-options.css
+++ b/src/zen/boosts/zen-advanced-color-options.css
@@ -5,11 +5,10 @@
*/
#zen-boost-advanced-color-options-panel {
- color-scheme: light;
--panel-padding: 15px;
& p {
- color: #3a3a3b;
+ color: var(--zen-boosts-primary-color);
}
& input {
diff --git a/src/zen/boosts/zen-boost-editor.inc.xhtml b/src/zen/boosts/zen-boost-editor.inc.xhtml
index 15c75f57c..9cd64e411 100644
--- a/src/zen/boosts/zen-boost-editor.inc.xhtml
+++ b/src/zen/boosts/zen-boost-editor.inc.xhtml
@@ -34,14 +34,6 @@
-
-
-
@@ -120,15 +112,15 @@
-
+
-
+
-
+
@@ -164,5 +156,10 @@
+
+