Compare commits

..

1 Commits

Author SHA1 Message Date
mr. m
0541ac2ad0 closes #14331: Refactor SR to support container tab forcing 2026-06-22 12:13:52 +02:00
789 changed files with 4753 additions and 94355 deletions

2
.gitattributes vendored
View File

@@ -5,4 +5,4 @@
*.patch linguist-language=C++ *.patch linguist-language=C++
*.d.ts linguist-language=TypeScript *.d.ts linguist-language=TypeScript
src/zen/tests/** linguist-language=C++ src/zen/tests/*.js linguist-language=Test

View File

@@ -287,7 +287,7 @@ jobs:
with: with:
use-sccache: ${{ inputs.use-sccache }} use-sccache: ${{ inputs.use-sccache }}
build-version: ${{ needs.build-data.outputs.version }} build-version: ${{ needs.build-data.outputs.version }}
generate-pgo: true generate-gpo: true
profile-data-path-archive: zen-windows-profile-data-and-jarlog.zip profile-data-path-archive: zen-windows-profile-data-and-jarlog.zip
release-branch: ${{ inputs.update_branch }} release-branch: ${{ inputs.update_branch }}
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
@@ -313,7 +313,7 @@ jobs:
needs: [build-data, windows-step-2, start-self-host, buildid] needs: [build-data, windows-step-2, start-self-host, buildid]
with: with:
build-version: ${{ needs.build-data.outputs.version }} build-version: ${{ needs.build-data.outputs.version }}
generate-pgo: false generate-gpo: false
release-branch: ${{ inputs.update_branch }} release-branch: ${{ inputs.update_branch }}
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
use-sccache: ${{ inputs.use-sccache }} use-sccache: ${{ inputs.use-sccache }}
@@ -331,42 +331,16 @@ jobs:
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
use-sccache: ${{ inputs.use-sccache }} use-sccache: ${{ inputs.use-sccache }}
mac-step-1: mac:
name: macOS build step 1 (PGO build) name: macOS build
uses: ./.github/workflows/macos-release-build.yml uses: ./.github/workflows/macos-release-build.yml
permissions:
contents: write
secrets: inherit
needs: [build-data, buildid] needs: [build-data, buildid]
permissions:
contents: write
secrets: inherit
with:
use-sccache: ${{ inputs.use-sccache }}
build-version: ${{ needs.build-data.outputs.version }}
generate-pgo: true
release-branch: ${{ inputs.update_branch }}
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
mac-step-2:
name: macOS build step 2 (Generate profile data)
uses: ./.github/workflows/macos-profile-build.yml
permissions:
contents: write
secrets: inherit
needs: [mac-step-1, build-data]
with: with:
build-version: ${{ needs.build-data.outputs.version }} build-version: ${{ needs.build-data.outputs.version }}
release-branch: ${{ inputs.update_branch }} release-branch: ${{ inputs.update_branch }}
mac-step-3:
name: macOS build step 3 (build with profile data)
uses: ./.github/workflows/macos-release-build.yml
permissions:
contents: write
secrets: inherit
needs: [build-data, mac-step-2, start-self-host, buildid]
with:
build-version: ${{ needs.build-data.outputs.version }}
generate-pgo: false
release-branch: ${{ inputs.update_branch }}
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
use-sccache: ${{ inputs.use-sccache }} use-sccache: ${{ inputs.use-sccache }}
@@ -376,7 +350,7 @@ jobs:
permissions: permissions:
contents: write contents: write
secrets: inherit secrets: inherit
needs: [build-data, mac-step-3] needs: [build-data, mac]
with: with:
build-version: ${{ needs.build-data.outputs.version }} build-version: ${{ needs.build-data.outputs.version }}
release-branch: ${{ inputs.update_branch }} release-branch: ${{ inputs.update_branch }}
@@ -526,24 +500,10 @@ jobs:
path: updates-server path: updates-server
token: ${{ secrets.DEPLOY_KEY }} token: ${{ secrets.DEPLOY_KEY }}
- name: Download signed windows objects - name: Download object files
if: ${{ inputs.update_branch == 'release' }} if: ${{ inputs.update_branch == 'release' }}
env:
GH_TOKEN: ${{ secrets.DEPLOY_KEY }}
run: | run: |
mkdir -p .github/workflows/object git clone https://github.com/zen-browser/windows-binaries.git .github/workflows/object --depth 1
gh release download "windows-signed-${{ github.run_id }}" \
--repo zen-browser/windows-binaries \
--pattern 'windows-x64-signed-*.tar.gz' \
--dir .github/workflows/object
for arch in x86_64 arm64; do
archive=".github/workflows/object/windows-x64-signed-$arch.tar.gz"
dest=".github/workflows/object/windows-x64-signed-$arch"
echo "Expanding $archive"
mkdir -p "$dest"
tar -xvf "$archive" -C "$dest"
done
- name: Sign MAR files - name: Sign MAR files
env: env:
@@ -656,17 +616,6 @@ jobs:
./.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe ./.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
./zen.macos-universal.dmg/* ./zen.macos-universal.dmg/*
- name: Clean up signed windows staging release
if: ${{ inputs.update_branch == 'release' }}
env:
GH_TOKEN: ${{ secrets.DEPLOY_KEY }}
run: |
# The per-run staging prerelease on windows-binaries has served its purpose
# now that the signed bundles are published in the real release. Never fail
# the release over this cleanup.
gh release delete "windows-signed-${{ github.run_id }}" \
--repo zen-browser/windows-binaries --cleanup-tag --yes || true
prepare-flatpak: prepare-flatpak:
if: ${{ inputs.create_release && inputs.update_branch == 'release' }} if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
permissions: write-all permissions: write-all

View File

@@ -105,8 +105,6 @@ jobs:
SURFER_COMPAT: ${{ matrix.arch }} SURFER_COMPAT: ${{ matrix.arch }}
SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }} SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }}
SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }} SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }}
SURFER_CERT_PATCH_NAME_PREV: ${{ secrets.SURFER_CERT_PATCH_NAME_PREV }}
SURFER_CERT_PATCH_ISSUER_PREV: ${{ secrets.SURFER_CERT_PATCH_ISSUER_PREV }}
run: | run: |
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
npm run import npm run import

View File

@@ -1,111 +0,0 @@
name: macOS PGO Builds
permissions:
contents: read
on:
workflow_call:
inputs:
build-version:
description: "The version to build"
required: true
type: string
release-branch:
description: "The branch to build"
required: true
type: string
jobs:
macos-profile-build:
name: |
macOS Profile Build - ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64]
runs-on: ${{ matrix.arch == 'x86_64' && 'macos-15-intel' || 'macos-26' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Setup Python
uses: actions/setup-python@v5
- name: Setup Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(cat .rust-toolchain)
- name: Install dependencies
run: npm ci
- name: Load Surfer CI setup
run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}
- name: Download instrumented app
uses: actions/download-artifact@v4
with:
path: ~/instrumented
name: macos-pgo-stage1-${{ matrix.arch }}
- name: Download Firefox and dependencies
run: npm run download
- name: Import patches
env:
SURFER_NO_BRANDING_PATCH: true
run: |
. "$HOME/.cargo/env"
npm run import
- name: Bootstrap
run: |
cd engine
export SURFER_PLATFORM="darwin"
./mach --no-interactive bootstrap --application-choice browser --exclude macos-sdk || true
- name: Extract instrumented app
run: |
set -ex
cd engine
./mach python -m mozbuild.action.unpack_dmg \
"$HOME/instrumented/zen-macos-pgo-stage1-${{ matrix.arch }}.dmg" \
"$HOME/instrumented/app"
APP=$(find "$HOME/instrumented/app" -maxdepth 1 -name "*.app" -type d | head -1)
codesign --force --deep --sign - "$APP" || true
- name: Generate profile data
run: |
set -ex
export LLVM_PROFDATA="$HOME/.mozbuild/clang/bin/llvm-profdata"
export JARLOG_FILE=en-US.log
BINARY=$(find "$HOME/instrumented" -type f -path "*/Contents/MacOS/zen" | head -1)
test -n "$BINARY"
cd engine
./mach python ../scripts/download_pgo_extended_corpus.py
./mach python build/pgo/profileserver.py --binary "$BINARY" --extended-corpus ./pgo-extended-corpus
- name: Move profile data
run: |
mv engine/merged.profdata merged.profdata
mv engine/en-US.log en-US.log
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
retention-days: 1
path: |
merged.profdata
en-US.log
name: macos-profdata-${{ matrix.arch }}

View File

@@ -1,15 +1,10 @@
name: macOS Release Build name: macOS Release Build
permissions: permissions:
contents: read contents: read
on: on:
workflow_call: workflow_call:
inputs: inputs:
generate-pgo:
required: true
type: boolean
default: false
build-version: build-version:
description: "The version to build" description: "The version to build"
required: true required: true
@@ -31,22 +26,17 @@ on:
jobs: jobs:
mac-build: mac-build:
name: Build macOS - ${{ matrix.arch }} name: Build macOS - ${{ matrix.arch }}
runs-on: 'blacksmith-8vcpu-ubuntu-2404' runs-on: ${{ (inputs.release-branch == 'release') && 'blacksmith-6vcpu-macos-latest' || 'macos-26' }}
env:
SCCACHE_GHA_ENABLED: ${{ inputs.use-sccache && 'true' || 'false' }}
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
arch: [x86_64, aarch64] arch: [x86_64, aarch64]
env:
SCCACHE_GHA_ENABLED: ${{ inputs.use-sccache && 'true' || 'false' }}
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
steps: steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -54,10 +44,16 @@ jobs:
token: ${{ secrets.DEPLOY_KEY }} token: ${{ secrets.DEPLOY_KEY }}
- name: Setup Node.js - name: Setup Node.js
uses: useblacksmith/setup-node@v5 uses: actions/setup-node@v4
with: with:
node-version-file: ".nvmrc" node-version-file: ".nvmrc"
- name: Log SDK versions
run: |
ls /Library/Developer/CommandLineTools/SDKs/
xcrun --show-sdk-version
xcrun --show-sdk-path
- name: Run sccache-cache - name: Run sccache-cache
uses: mozilla-actions/sccache-action@main uses: mozilla-actions/sccache-action@main
if: ${{ inputs.use-sccache }} if: ${{ inputs.use-sccache }}
@@ -71,88 +67,109 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL']) core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']) core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
- name: Setup Python
uses: actions/setup-python@v5
# note: This will use the version defined in '.python-version' by default
- name: Setup Git - name: Setup Git
run: | run: |
git config --global user.name "github-actions[bot]" git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install dependencies - name: Install system dependencies
run: | run: |
npm ci brew update
sudo apt-get update brew install cairo gnu-tar mercurial
sudo apt-get install -y python3 python3-pip zstd yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb --fix-missing sudo pip install setuptools
- name: Load Surfer CI setup brew uninstall --ignore-dependencies python3.12 -f
run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}
- name: Download Firefox and dependencies export PATH="$(python3 -m site --user-base)/bin":$PATH
run: npm run download python3 -m pip install --user mercurial
- name: mac-cross Cache rm '/usr/local/bin/2to3-3.11' '/usr/local/bin/2to3-3.12' '/usr/local/bin/2to3'
env: rm '/usr/local/bin/idle3.11' '/usr/local/bin/idle3.12' '/usr/local/bin/idle3'
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5 rm '/usr/local/bin/pydoc3.11' '/usr/local/bin/pydoc3.12' '/usr/local/bin/pydoc3'
id: cache-mac-cross rm '/usr/local/bin/python3.11' '/usr/local/bin/python3.12' '/usr/local/bin/python3'
uses: useblacksmith/cache@v5 rm '/usr/local/bin/python3.11-config' '/usr/local/bin/python3.12-config' '/usr/local/bin/python3-config'
with:
path: ${HOME}/mac-cross
key: mac-cross
- name: Setup for macOS (cctools and DMG tools) brew install watchman
if: steps.cache-mac-cross.outputs.cache-hit != 'true'
run: |
set -ex
mkdir -p ~/mac-cross
cd engine/
./mach artifact toolchain --from-build linux64-cctools-port linux64-libdmg linux64-hfsplus
mv cctools dmg hfsplus ~/mac-cross/
ls ~/mac-cross/cctools/bin/x86_64-apple-darwin-ld ~/mac-cross/cctools/bin/aarch64-apple-darwin-ld ~/mac-cross/dmg/dmg ~/mac-cross/hfsplus/newfs_hfs
- name: Setup Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(cat .rust-toolchain) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(cat .rust-toolchain)
source $HOME/.cargo/env source $HOME/.cargo/env
if test "${{ matrix.arch }}" = "aarch64"; then if test "${{ matrix.arch }}" = "aarch64"; then
rustup target add aarch64-apple-darwin rustup target add aarch64-apple-darwin
else else
rustup target add x86_64-apple-darwin rustup target add x86_64-apple-darwin
fi fi
- name: Force usage of gnu-tar
run: |
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.zsh
source ~/.bash_profile
- name: Install dependencies
run: |
npm ci
- name: Load surfer CI setup
run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}
- name: Download Firefox source and dependencies
run: npm run download
- name: Import - name: Import
env: env:
SURFER_COMPAT: ${{ matrix.arch }} SURFER_COMPAT: ${{ matrix.arch }}
SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }} SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }}
SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }} SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }}
SURFER_CERT_PATCH_NAME_PREV: ${{ secrets.SURFER_CERT_PATCH_NAME_PREV }} run: npm run import
SURFER_CERT_PATCH_ISSUER_PREV: ${{ secrets.SURFER_CERT_PATCH_ISSUER_PREV }}
SURFER_PLATFORM: darwin
run: |
. "$HOME/.cargo/env"
npm run import -- --verbose
- name: Bootstrap - name: Bootstrap
run: | run: |
set -x cd engine
export SURFER_PLATFORM="darwin" export SURFER_PLATFORM="darwin"
npm run bootstrap export PATH="$(python3 -m site --user-base)/bin":$PATH
# Always exist with 0, even if bootstrap fails
./mach --no-interactive bootstrap --application-choice browser --exclude macos-sdk || true
cd ..
- name: Build language packs - name: Build language packs
run: sh scripts/download-language-packs.sh run: sh scripts/download-language-packs.sh
- name: Download artifact (if use profdata) - name: Build Zen (PGO stage 1 - generate)
uses: actions/download-artifact@v4 env:
if: ${{ !inputs.generate-pgo }} SURFER_COMPAT: ${{ matrix.arch }}
with: ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
path: ~/artifact ZEN_GA_GENERATE_PROFILE: 1
name: macos-profdata-${{ matrix.arch }} ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }}
ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }}
- name: Show artifact info ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
if: ${{ !inputs.generate-pgo }}
run: | run: |
ls ~/artifact export SURFER_PLATFORM="darwin"
ls ~/artifact/en-US.log if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
ls ~/artifact/merged.profdata export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
fi
bash .github/workflows/src/release-build.sh
- name: Build - name: Generate PGO profile data
env:
SURFER_COMPAT: ${{ matrix.arch }}
run: |
set -x
export LLVM_PROFDATA="$HOME/.mozbuild/clang/bin/llvm-profdata"
export JARLOG_FILE=en-US.log
mkdir -p "$HOME/artifact"
cd engine
./mach python ../scripts/download_pgo_extended_corpus.py
./mach package
./mach python build/pgo/profileserver.py --extended-corpus ./pgo-extended-corpus
mv merged.profdata "$HOME/artifact/merged.profdata"
mv en-US.log "$HOME/artifact/en-US.log"
- name: Build Zen
env: env:
SURFER_COMPAT: ${{ matrix.arch }} SURFER_COMPAT: ${{ matrix.arch }}
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
@@ -160,69 +177,47 @@ jobs:
ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }} ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }}
ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }} ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
run: | run: |
set -x
export SURFER_PLATFORM="darwin" export SURFER_PLATFORM="darwin"
export ZEN_CROSS_COMPILING=1
if test ${{ inputs.generate-pgo }} = true; then
export ZEN_GA_GENERATE_PROFILE=1
fi
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }} export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
fi fi
bash .github/workflows/src/release-build.sh bash .github/workflows/src/release-build.sh
- name: Package instrumented app (PGO stage 1)
if: ${{ inputs.generate-pgo }}
env:
SURFER_COMPAT: ${{ matrix.arch }}
ZEN_RELEASE: 1
SURFER_PLATFORM: darwin
ZEN_CROSS_COMPILING: 1
ZEN_GA_GENERATE_PROFILE: 1
run: |
set -ex
cd engine
./mach package
mv obj-${{ matrix.arch }}-apple-darwin/dist/*.dmg "$GITHUB_WORKSPACE/zen-macos-pgo-stage1-${{ matrix.arch }}.dmg"
- name: Upload artifact (PGO stage 1)
uses: actions/upload-artifact@v4
if: ${{ inputs.generate-pgo }}
with:
retention-days: 2
name: macos-pgo-stage1-${{ matrix.arch }}
path: ./zen-macos-pgo-stage1-${{ matrix.arch }}.dmg
- name: Package - name: Package
if: ${{ !inputs.generate-pgo }}
env: env:
SURFER_COMPAT: ${{ matrix.arch }} SURFER_COMPAT: ${{ matrix.arch }}
ZEN_GA_DISABLE_PGO: true ZEN_GA_DISABLE_PGO: true
run: | run: |
set -x
export SURFER_PLATFORM="darwin" export SURFER_PLATFORM="darwin"
export ZEN_CROSS_COMPILING=1
export ZEN_RELEASE=1 export ZEN_RELEASE=1
npm run package npm run package
- name: Rename artifacts - name: Rename artifacts
if: ${{ !inputs.generate-pgo }}
run: | run: |
echo "Tarballing DMG"
set -ex set -ex
mv ./dist/*.dmg ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg mv ./dist/*.dmg ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg
mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/host/bin/mar ./zen-macos-host-mar
mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/bin/platform.ini ./platform.ini mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/bin/platform.ini ./platform.ini
- name: Upload dist dmg - name: Upload dist dmg
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: ${{ !inputs.generate-pgo }}
with: with:
retention-days: 1 retention-days: 1
name: zen-${{ matrix.arch }}-apple-darwin-dist.dmg name: zen-${{ matrix.arch }}-apple-darwin-dist.dmg
path: ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg path: ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg
- name: Upload host mar
uses: actions/upload-artifact@v4
if: matrix.arch == 'aarch64'
with:
retention-days: 1
name: zen-macos-host-mar
path: ./zen-macos-host-mar
- name: Upload platform.ini - name: Upload platform.ini
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: ${{ !inputs.generate-pgo && matrix.arch == 'x86_64' }} if: matrix.arch == 'x86_64'
with: with:
retention-days: 1 retention-days: 1
name: platform.ini name: platform.ini

View File

@@ -99,16 +99,6 @@ jobs:
cd engine cd engine
./mach configure ./mach configure
- name: Build host mar tool
run: |
set -ex
cd engine
echo "ac_add_options --enable-project=tools/update-packaging" > mar-mozconfig
echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mar-tools" >> mar-mozconfig
MOZCONFIG=$PWD/mar-mozconfig ./mach build -v
cp obj-mar-tools/dist/host/bin/mar ../zen-macos-host-mar
rm -rf obj-mar-tools mar-mozconfig
- name: Download x86_64 DMG from artifacts - name: Download x86_64 DMG from artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
@@ -223,6 +213,11 @@ jobs:
--wait --wait
xcrun stapler staple "zen.macos-universal.dmg" xcrun stapler staple "zen.macos-universal.dmg"
- name: Download host mar
uses: actions/download-artifact@v4
with:
name: zen-macos-host-mar
- name: Upload build artifact - name: Upload build artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:

View File

@@ -61,6 +61,7 @@ jobs:
if: ${{ matrix.arch == 'x86_64' }} if: ${{ matrix.arch == 'x86_64' }}
run: | run: |
cd C:\artifact cd C:\artifact
ls
Expand-Archive -Path .\${{ inputs.profile-data-path-archive }} -DestinationPath C:\artifact Expand-Archive -Path .\${{ inputs.profile-data-path-archive }} -DestinationPath C:\artifact
ls ls

View File

@@ -6,7 +6,7 @@ permissions:
on: on:
workflow_call: workflow_call:
inputs: inputs:
generate-pgo: generate-gpo:
required: true required: true
type: boolean type: boolean
default: false default: false
@@ -35,7 +35,7 @@ jobs:
windows-build: windows-build:
name: Build Windows - ${{ matrix.arch }} name: Build Windows - ${{ matrix.arch }}
# aarch64 does not need full 16x, and we also dont use full LTO when generating GPO # aarch64 does not need full 16x, and we also dont use full LTO when generating GPO
runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-pgo && matrix.arch == 'x86_64') && 'self-hosted' || 'blacksmith-8vcpu-ubuntu-2404' }} runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-gpo && matrix.arch == 'x86_64') && 'self-hosted' || 'blacksmith-8vcpu-ubuntu-2404' }}
env: env:
SCCACHE_GHA_ENABLED: ${{ inputs.use-sccache && 'true' || 'false' }} SCCACHE_GHA_ENABLED: ${{ inputs.use-sccache && 'true' || 'false' }}
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@@ -48,7 +48,7 @@ jobs:
steps: steps:
- name: Free Disk Space (Ubuntu) - name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main uses: jlumbroso/free-disk-space@main
if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
with: with:
tool-cache: false tool-cache: false
@@ -91,7 +91,7 @@ jobs:
run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }} run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}
- name: Download Firefox and dependencies - name: Download Firefox and dependencies
if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
run: npm run download run: npm run download
- name: win-cross Cache - name: win-cross Cache
@@ -104,7 +104,7 @@ jobs:
key: win-cross key: win-cross
- name: Setup for Windows - name: Setup for Windows
if: steps.cache-win-cross.outputs.cache-hit != 'true' && !(inputs.generate-pgo && matrix.arch == 'aarch64') if: steps.cache-win-cross.outputs.cache-hit != 'true' && !(inputs.generate-gpo && matrix.arch == 'aarch64')
run: | run: |
set -x set -x
mkdir -p ~/win-cross mkdir -p ~/win-cross
@@ -154,26 +154,24 @@ jobs:
zlib1g-dev \ zlib1g-dev \
aria2 aria2
echo Setup wine echo Setup wine
aria2c "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-3.toolchains.v3.linux64-wine.latest/artifacts/public/build/wine.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 tar --zstd -xf wine.tar.zst -C ~/win-cross
rm wine.tar.zst rm wine.tar.zst
echo Setup Visual Studio echo Setup Visual Studio
./mach python --virtualenv build taskcluster/scripts/misc/get_vs.py build/vs/vs2026.yaml ~/win-cross/vs2026 ./mach python --virtualenv build taskcluster/scripts/misc/get_vs.py build/vs/vs2026.yaml ~/win-cross/vs2026
- name: Import - name: Import
if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
env: env:
SURFER_COMPAT: ${{ matrix.arch }} SURFER_COMPAT: ${{ matrix.arch }}
SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }} SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }}
SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }} SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }}
SURFER_CERT_PATCH_NAME_PREV: ${{ secrets.SURFER_CERT_PATCH_NAME_PREV }}
SURFER_CERT_PATCH_ISSUER_PREV: ${{ secrets.SURFER_CERT_PATCH_ISSUER_PREV }}
run: | run: |
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
npm run import -- --verbose npm run import -- --verbose
- name: Bootstrap - name: Bootstrap
if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
run: | run: |
set -x set -x
cd engine/ cd engine/
@@ -191,7 +189,7 @@ jobs:
ls ~/win-cross/vs2026 || true ls ~/win-cross/vs2026 || true
- name: Setup Rust - name: Setup Rust
if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
run: | run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(cat .rust-toolchain) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(cat .rust-toolchain)
source $HOME/.cargo/env source $HOME/.cargo/env
@@ -210,18 +208,18 @@ jobs:
echo "export MOZ_WINDOWS_RS_DIR=$(pwd)/windows-$WINDOWS_RS_VERSION" >> ../configs/common/mozconfig echo "export MOZ_WINDOWS_RS_DIR=$(pwd)/windows-$WINDOWS_RS_VERSION" >> ../configs/common/mozconfig
- name: Build language packs - name: Build language packs
if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
run: sh scripts/download-language-packs.sh run: sh scripts/download-language-packs.sh
- name: Download artifact (if use profdata) - name: Download artifact (if use profdata)
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
if: ${{ !inputs.generate-pgo && matrix.arch == 'x86_64' }} if: ${{ !inputs.generate-gpo && matrix.arch == 'x86_64' }}
with: with:
path: ~/artifact path: ~/artifact
name: windows-profdata-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} name: windows-profdata-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}
- name: Show artifact info - name: Show artifact info
if: ${{ !inputs.generate-pgo && matrix.arch == 'x86_64' }} if: ${{ !inputs.generate-gpo && matrix.arch == 'x86_64' }}
run: | run: |
ls ~/artifact ls ~/artifact
ls ~/artifact/en-US.log ls ~/artifact/en-US.log
@@ -230,7 +228,7 @@ jobs:
chmod +x ~/artifact/merged.profdata chmod +x ~/artifact/merged.profdata
- name: Build - name: Build
if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
env: env:
SURFER_COMPAT: ${{ matrix.arch }} SURFER_COMPAT: ${{ matrix.arch }}
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
@@ -243,7 +241,7 @@ jobs:
dos2unix configs/windows/mozconfig dos2unix configs/windows/mozconfig
export SURFER_PLATFORM="win32" export SURFER_PLATFORM="win32"
export ZEN_CROSS_COMPILING=1 export ZEN_CROSS_COMPILING=1
if test ${{ inputs.generate-pgo }} = true; then if test ${{ inputs.generate-gpo }} = true; then
export ZEN_GA_GENERATE_PROFILE=1 export ZEN_GA_GENERATE_PROFILE=1
fi fi
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
@@ -252,7 +250,7 @@ jobs:
bash .github/workflows/src/release-build.sh bash .github/workflows/src/release-build.sh
- name: Package - name: Package
if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
env: env:
SURFER_COMPAT: ${{ matrix.arch }} SURFER_COMPAT: ${{ matrix.arch }}
ZEN_GA_DISABLE_PGO: true ZEN_GA_DISABLE_PGO: true
@@ -262,18 +260,18 @@ jobs:
export ZEN_CROSS_COMPILING=1 export ZEN_CROSS_COMPILING=1
export ZEN_RELEASE=1 export ZEN_RELEASE=1
npm run package npm run package
ls ./dist
mv ./dist/zen-$(npm run --silent surfer -- get version | xargs).en-US.win64${{ matrix.arch == 'aarch64' && '-aarch64' || '' }}.zip zen.win64.zip mv ./dist/zen-$(npm run --silent surfer -- get version | xargs).en-US.win64${{ matrix.arch == 'aarch64' && '-aarch64' || '' }}.zip zen.win64.zip
ls ./dist
ls . ls .
- name: Move package for PGO upload - name: Move package for PGO upload
if: ${{ inputs.generate-pgo && matrix.arch == 'x86_64' }} if: ${{ inputs.generate-gpo && matrix.arch == 'x86_64' }}
run: | run: |
set -x set -x
mv ./zen.win64.zip ./zen.win64-pgo-stage-1.zip mv ./zen.win64.zip ./zen.win64-pgo-stage-1.zip
- name: Rename artifacts - name: Rename artifacts
if: ${{ !inputs.generate-pgo }} if: ${{ !inputs.generate-gpo }}
run: | run: |
mv ./zen.win64.zip zen.win-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}.zip mv ./zen.win64.zip zen.win-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}.zip
mv ./dist/output.mar windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar mv ./dist/output.mar windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar
@@ -281,14 +279,14 @@ jobs:
- name: Upload artifact (PGO) - name: Upload artifact (PGO)
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: ${{ inputs.generate-pgo && matrix.arch == 'x86_64' }} if: ${{ inputs.generate-gpo && matrix.arch == 'x86_64' }}
with: with:
retention-days: 2 retention-days: 2
name: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-${{ inputs.profile-data-path-archive }} name: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-${{ inputs.profile-data-path-archive }}
path: ./zen.win64-pgo-stage-1.zip path: ./zen.win64-pgo-stage-1.zip
- name: Remove unnecessary files from obj - name: Remove unnecessary files from obj
if: ${{ !inputs.generate-pgo }} if: ${{ !inputs.generate-gpo }}
run: | run: |
set -x set -x
mkdir obj-${{ matrix.arch }}-pc-windows-msvc/ mkdir obj-${{ matrix.arch }}-pc-windows-msvc/
@@ -303,7 +301,7 @@ jobs:
cp -r --no-dereference engine/obj-${{ matrix.arch }}-pc-windows-msvc/* obj-${{ matrix.arch }}-pc-windows-msvc/ || true cp -r --no-dereference engine/obj-${{ matrix.arch }}-pc-windows-msvc/* obj-${{ matrix.arch }}-pc-windows-msvc/ || true
- name: Upload dist object - name: Upload dist object
if: ${{ !inputs.generate-pgo }} if: ${{ !inputs.generate-gpo }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
retention-days: 2 retention-days: 2
@@ -311,7 +309,7 @@ jobs:
path: obj-${{ matrix.arch }}-pc-windows-msvc path: obj-${{ matrix.arch }}-pc-windows-msvc
- name: Upload artifact (if Twilight branch, installer) - name: Upload artifact (if Twilight branch, installer)
if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-pgo }} if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
retention-days: 5 retention-days: 5
@@ -319,7 +317,7 @@ jobs:
path: ./zen.installer${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.exe path: ./zen.installer${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.exe
- name: Upload artifact (if Twilight branch, .mar) - name: Upload artifact (if Twilight branch, .mar)
if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-pgo }} if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
retention-days: 5 retention-days: 5
@@ -327,7 +325,7 @@ jobs:
path: ./windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar path: ./windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar
- name: Upload artifact (if Twilight branch, update manifests) - name: Upload artifact (if Twilight branch, update manifests)
if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-pgo }} if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
retention-days: 5 retention-days: 5

View File

@@ -1 +1 @@
1.94.1 1.90

View File

@@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
### Firefox Versions ### Firefox Versions
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `154.0.1`! - [`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 154.0.1`! - [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.1`!
### Contributing ### Contributing

View File

@@ -1 +1 @@
bf4b57fd7fe94054457be7018e8e7beaf754c520 2960f4c1ce58d289d3b9ec885695f0017d2636ab

View File

@@ -3,6 +3,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
param( param(
[string][Parameter(Mandatory=$true)]$SignIdentity,
[string][Parameter(Mandatory=$true)]$SignIdentityIssuer,
[string][Parameter(Mandatory=$true)]$GithubRunId [string][Parameter(Mandatory=$true)]$GithubRunId
) )
@@ -22,23 +24,12 @@ mkdir windsign-temp -ErrorAction SilentlyContinue
# echo "Downloaded git objects repo to" # echo "Downloaded git objects repo to"
#} -Verbose -ArgumentList $PWD -Debug #} -Verbose -ArgumentList $PWD -Debug
$token = gh auth token
$env:SURFER_MOZCONFIG_ONLY="1" $env:SURFER_MOZCONFIG_ONLY="1"
$env:SURFER_SIGNING_MODE="" $env:SURFER_SIGNING_MODE=""
# Fetch SignIdentity from the github repo secrets, with the name SURFER_CERT_PATCH_ISSUER
$SignIdentityIssuer = (Invoke-RestMethod -Uri "https://api.github.com/repos/zen-browser/desktop/actions/secrets/SURFER_CERT_PATCH_ISSUER" -Headers @{Authorization = "Bearer $token"}).value
$SignIdentity = (Invoke-RestMethod -Uri "https://api.github.com/repos/zen-browser/desktop/actions/secrets/SURFER_CERT_PATCH_NAME" -Headers @{Authorization = "Bearer $token"}).value
$SignIndentityIssuerPrev = (Invoke-RestMethod -Uri "https://api.github.com/repos/zen-browser/desktop/actions/secrets/SURFER_CERT_PATCH_ISSUER_PREV" -Headers @{Authorization = "Bearer $token"}).value
$SignIdentityPrev = (Invoke-RestMethod -Uri "https://api.github.com/repos/zen-browser/desktop/actions/secrets/SURFER_CERT_PATCH_NAME_PREV" -Headers @{Authorization = "Bearer $token"}).
$env:SURFER_CERT_PATCH_ISSUER=$SignIdentityIssuer $env:SURFER_CERT_PATCH_ISSUER=$SignIdentityIssuer
$env:SURFER_CERT_PATCH_NAME=$SignIdentity $env:SURFER_CERT_PATCH_NAME=$SignIdentity
$env:SURFER_CERT_PATCH_NAME_PREV=$SignIdentityPrev
$env:SURFER_CERT_PATCH_ISSUER_PREV=$SignIndentityIssuerPrev
Start-Job -Name "DownloadGitl10n" -ScriptBlock { Start-Job -Name "DownloadGitl10n" -ScriptBlock {
param($PWD) param($PWD)
cd $PWD cd $PWD
@@ -55,6 +46,7 @@ npm run build
echo "Downloading artifacts info" echo "Downloading artifacts info"
$artifactsInfo=gh api repos/zen-browser/desktop/actions/runs/$GithubRunId/artifacts $artifactsInfo=gh api repos/zen-browser/desktop/actions/runs/$GithubRunId/artifacts
$token = gh auth token
function New-TemporaryDirectory { function New-TemporaryDirectory {
$tmp = [System.IO.Path]::GetTempPath() # Not $env:TEMP, see https://stackoverflow.com/a/946017 $tmp = [System.IO.Path]::GetTempPath() # Not $env:TEMP, see https://stackoverflow.com/a/946017
@@ -178,16 +170,14 @@ function SignAndPackage($name) {
echo "Packaging $name" echo "Packaging $name"
npm run package -- --verbose npm run package -- --verbose
# We assemble the signed bundle as a plain folder here (with no top-level # In the release script, we do the following:
# directory inside it) and compress it into windows-x64-signed-$name.tar.gz
# at the end of the script, once every .exe has been signed. The release
# workflow expands it back with:
# tar -xvf .github/workflows/object/windows-x64-signed-x86_64.tar.gz -C windows-x64-signed-x86_64 # tar -xvf .github/workflows/object/windows-x64-signed-x86_64.tar.gz -C windows-x64-signed-x86_64
# Inside the bundle we need: # We need to create a tar with the same structure and no top-level directory
# Inside, we need:
# - update_manifest/* # - update_manifest/*
# - windows.mar # - windows.mar
# - zen.installer.exe # - zen.installer.exe
echo "Preparing signed bundle for $name" echo "Creating tar for $name"
rm .\windsign-temp\windows-x64-signed-$name -Recurse -ErrorAction SilentlyContinue rm .\windsign-temp\windows-x64-signed-$name -Recurse -ErrorAction SilentlyContinue
mkdir windsign-temp\windows-x64-signed-$name mkdir windsign-temp\windows-x64-signed-$name
@@ -210,8 +200,9 @@ function SignAndPackage($name) {
# Move the manifest # Move the manifest
mv .\dist\update\. windsign-temp\windows-x64-signed-$name\update_manifest mv .\dist\update\. windsign-temp\windows-x64-signed-$name\update_manifest
# The signed bundle stays in windsign-temp\windows-x64-signed-$name; it is # note: We need to sign it into a parent folder, called windows-x64-signed-$name
# compressed and uploaded to the staging release once every .exe is signed. rmdir .\windsign-temp\windows-binaries\windows-x64-signed-$name -Recurse -ErrorAction SilentlyContinue
mv windsign-temp\windows-x64-signed-$name .\windsign-temp\windows-binaries -Force
rmdir engine\obj-$objName-pc-windows-msvc\ -Recurse -ErrorAction SilentlyContinue rmdir engine\obj-$objName-pc-windows-msvc\ -Recurse -ErrorAction SilentlyContinue
echo "Finished $name" echo "Finished $name"
@@ -220,34 +211,16 @@ function SignAndPackage($name) {
SignAndPackage arm64 SignAndPackage arm64
SignAndPackage x86_64 SignAndPackage x86_64
$files = Get-ChildItem .\windsign-temp\windows-x64-signed-x86_64, .\windsign-temp\windows-x64-signed-arm64 -Recurse -Include *.exe $files = Get-ChildItem .\windsign-temp\windows-binaries -Recurse -Include *.exe
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
$binariesRepo = "zen-browser/windows-binaries" echo "All artifacts signed and packaged, ready for release!"
$stagingTag = "windows-signed-$GithubRunId" echo "Commiting the changes to the repository"
echo "Ensuring staging release $stagingTag exists on $binariesRepo" cd windsign-temp\windows-binaries
gh release create $stagingTag --repo $binariesRepo --prerelease --title "Windows signed bundles ($GithubRunId)" --notes "Signed Windows bundles for run $GithubRunId, consumed by the release workflow. Safe to delete." git add .
if ($LASTEXITCODE -ne 0) { git commit -m "Sign and package windows artifacts"
throw "Failed to create staging release $stagingTag on $binariesRepo" git push
} cd ..\..
foreach ($name in @("x86_64", "arm64")) {
$signedDir = ".\windsign-temp\windows-x64-signed-$name"
$archive = ".\windsign-temp\windows-x64-signed-$name.tar.gz"
echo "Creating compressed tar for $name"
Remove-Item $archive -ErrorAction SilentlyContinue
tar -czvf $archive -C $signedDir .
if ($LASTEXITCODE -ne 0) {
throw "Failed to create tar archive for $name"
}
echo "Uploading $archive to $binariesRepo release $stagingTag"
gh release upload $stagingTag $archive --repo $binariesRepo --clobber
if ($LASTEXITCODE -ne 0) {
throw "Failed to upload $archive to release $stagingTag"
}
}
echo "All artifacts signed, packaged, and uploaded to $binariesRepo release $stagingTag!"
# Cleaning up # Cleaning up

View File

@@ -91,6 +91,11 @@ if test "$ZEN_RELEASE"; then
export MOZ_PACKAGE_JSSHELL=1 export MOZ_PACKAGE_JSSHELL=1
ac_add_options --disable-crashreporter ac_add_options --disable-crashreporter
# Experimental flag, enabled only on nightly for Firefox.
# Should bring in some nice performance improvements,
# but may cause stability issues.
ac_add_options --enable-replace-malloc
fi fi
ac_add_options --enable-jxl ac_add_options --enable-jxl

View File

@@ -7,21 +7,7 @@ unset MOZ_STDCXX_COMPAT
ac_add_options --disable-dmd ac_add_options --disable-dmd
ac_add_options --enable-eme=widevine ac_add_options --enable-eme=widevine
if test "$ZEN_CROSS_COMPILING"; then if test "$ZEN_RELEASE"; then
ZEN_MAC_CROSS="$HOME/mac-cross"
mk_add_options "export PATH=$ZEN_MAC_CROSS/cctools/bin:$PATH"
mk_add_options "export LD_LIBRARY_PATH=$HOME/.mozbuild/clang/lib:$LD_LIBRARY_PATH"
export MKFSHFS=$ZEN_MAC_CROSS/hfsplus/newfs_hfs
export DMG_TOOL=$ZEN_MAC_CROSS/dmg/dmg
export HFS_TOOL=$ZEN_MAC_CROSS/dmg/hfsplus
if test "$ZEN_RELEASE"; then
export MOZ_LD64_KNOWN_GOOD=1
ac_add_options --enable-linker=ld64
fi
elif test "$ZEN_RELEASE"; then
ALLOWED_SDKS="26.5 26.4" ALLOWED_SDKS="26.5 26.4"
for SDK in $ALLOWED_SDKS; do for SDK in $ALLOWED_SDKS; do
if [ -d "/Library/Developer/CommandLineTools/SDKs/MacOSX${SDK}.sdk" ]; then if [ -d "/Library/Developer/CommandLineTools/SDKs/MacOSX${SDK}.sdk" ]; then
@@ -66,3 +52,13 @@ else
export CXXFLAGS="$CXXFLAGS -mcpu=apple-m1" export CXXFLAGS="$CXXFLAGS -mcpu=apple-m1"
fi fi
fi fi
# Keep using ld64 on PGO/LTO builds because of performance regressions when using lld.
# Mozilla sets "MOZ_LD64_KNOWN_GOOD" to true when they do automated builds with PGO/LTO on macOS.
# See https://searchfox.org/firefox-main/rev/e61d59b5c9a651fd7bf28043f87c0dc669833496/build/moz.configure/lto-pgo.configure#261
# export MOZ_LD64_KNOWN_GOOD=1
# ac_add_options --enable-linker=ld64
#
# if test "$ZEN_RELEASE"; then
# mk_add_options MOZ_MAKE_FLAGS="-j4"
# fi

View File

@@ -10,6 +10,7 @@ if test "$ZEN_CROSS_COMPILING"; then
export WINEDEBUG=-all export WINEDEBUG=-all
export MOZ_STUB_INSTALLER=1 export MOZ_STUB_INSTALLER=1
export MOZ_PKG_FORMAT=TAR
export CROSS_BUILD=1 export CROSS_BUILD=1
CROSS_COMPILE=1 CROSS_COMPILE=1

View File

@@ -24,5 +24,3 @@ files:
translation: browser/browser/zen-boosts.ftl translation: browser/browser/zen-boosts.ftl
- source: en-US/browser/browser/zen-space-routing.ftl - source: en-US/browser/browser/zen-space-routing.ftl
translation: browser/browser/zen-space-routing.ftl translation: browser/browser/zen-space-routing.ftl
- source: en-US/browser/browser/zen-command-palette.ftl
translation: browser/browser/zen-command-palette.ftl

View File

@@ -48,11 +48,6 @@ zen-look-and-feel-compact-view-top-toolbar =
zen-look-and-feel-compact-toolbar-flash-popup = zen-look-and-feel-compact-toolbar-flash-popup =
.label = Briefly make the toolbar popup when switching or opening new tabs in compact mode .label = Briefly make the toolbar popup when switching or opening new tabs in compact mode
zen-look-and-feel-window-drag-header = Window dragging
zen-look-and-feel-window-drag-description = Move the window by dragging empty space at the top of websites, just like the titlebar.
zen-window-drag-enabled =
.label = Allow dragging the window from web pages
pane-zen-tabs-title = Tab Management pane-zen-tabs-title = Tab Management
category-zen-workspaces = category-zen-workspaces =
.tooltiptext = { pane-zen-tabs-title } .tooltiptext = { pane-zen-tabs-title }
@@ -288,8 +283,7 @@ zen-page-info-shortcut = View Page Info
zen-find-shortcut = Find on Page zen-find-shortcut = Find on Page
zen-search-find-again-shortcut = Find Again zen-search-find-again-shortcut = Find Again
zen-search-find-again-shortcut-prev = Find Previous zen-search-find-again-shortcut-prev = Find Previous
zen-search-find-again-shortcut-alt = Find Again (Alt) zen-search-find-again-shortcut-2 = Find Again (Alt)
zen-search-find-again-shortcut-prev-alt = Find Previous (Alt)
zen-bookmark-this-page-shortcut = Bookmark This Page zen-bookmark-this-page-shortcut = Bookmark This Page
zen-bookmark-show-library-shortcut = Show Bookmarks Library zen-bookmark-show-library-shortcut = Show Bookmarks Library
zen-key-stop = Stop Loading zen-key-stop = Stop Loading

View File

@@ -1,36 +0,0 @@
# 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-action-toggle-compact-mode = Toggle Compact Mode
zen-action-open-theme-picker = Open Theme Picker
zen-action-new-split-view = New Split View
zen-action-new-folder = New Folder
zen-action-copy-current-url = Copy Current URL
zen-action-settings = Settings
zen-action-open-private-window = Open Private Window
zen-action-open-new-window = Open New Window
zen-action-new-blank-window = New Blank Window
zen-action-pin-tab = Pin Tab
zen-action-unpin-tab = Unpin Tab
zen-action-open-space-routing = Open Space Routing
zen-action-new-boost = New Boost
zen-action-next-space = Next Space
zen-action-previous-space = Previous Space
zen-action-close-tab = Close Tab
zen-action-reload-tab = Reload Tab
zen-action-reload-tab-without-cache = Reload Tab Without Cache
zen-action-next-tab = Next Tab
zen-action-previous-tab = Previous Tab
zen-action-capture-screenshot = Capture Screenshot
zen-action-toggle-tabs-on-right = Toggle Tabs on right
zen-action-add-to-essentials = Add to Essentials
zen-action-remove-from-essentials = Remove from Essentials
zen-action-find-in-page = Find in Page
zen-action-manage-extensions = Manage Extensions
zen-action-switch-to-automatic-appearance = Switch to Automatic Appearance
zen-action-switch-to-light-mode = Switch to Light Mode
zen-action-switch-to-dark-mode = Switch to Dark Mode
zen-action-print = Print
zen-action-focus-on = Focus on
zen-action-extension = Extension

View File

@@ -6,13 +6,13 @@ zen-folders-search-placeholder =
.placeholder = Search { $folder-name }... .placeholder = Search { $folder-name }...
zen-folders-panel-rename-folder = zen-folders-panel-rename-folder =
.label = Rename Folder .label = Rename Folder
zen-folders-panel-unpack-folder = zen-folders-panel-unpack-folder =
.label = Unpack Folder .label = Unpack Folder
zen-folders-new-subfolder = zen-folders-new-subfolder =
.label = New Subfolder .label = New Subfolder
zen-folders-panel-delete-folder = zen-folders-panel-delete-folder =
.label = Delete Folder .label = Delete Folder
@@ -21,7 +21,7 @@ zen-folders-panel-convert-folder-to-space =
.label = Convert folder to Space .label = Convert folder to Space
zen-folders-panel-change-folder-space = zen-folders-panel-change-folder-space =
.label = Change Space .label = Change Space...
zen-folders-unload-all-tooltip = zen-folders-unload-all-tooltip =
.tooltiptext = Unload active in this folder .tooltiptext = Unload active in this folder

View File

@@ -19,23 +19,17 @@ tab-context-zen-add-essential-badge = { $num } / { $max }
tab-context-zen-remove-essential = tab-context-zen-remove-essential =
.label = Remove from Essentials .label = Remove from Essentials
.accesskey = R .accesskey = R
tab-context-zen-edit-pinned-page = tab-context-zen-replace-pinned-url-with-current =
.label = .label =
{ $isEssential -> { $isEssential ->
[true] Edit Essential URL [true] Replace Essential URL with Current
*[false] Edit Pinned URL *[false] Replace Pinned URL with Current
} }
.accesskey = P
tab-context-zen-replace-pinned-url-with-current =
.label = Replace with Current URL
.accesskey = C .accesskey = C
tab-context-zen-edit-pinned-url =
.label = Edit…
.accesskey = E
tab-context-zen-edit-title = tab-context-zen-edit-title =
.label = Change Label .label = Change Label...
tab-context-zen-edit-icon = tab-context-zen-edit-icon =
.label = Change Icon .label = Change Icon...
zen-themes-corrupted = Your { -brand-short-name } mods file is corrupted. They have been reset to the default theme. zen-themes-corrupted = Your { -brand-short-name } mods file is corrupted. They have been reset to the default theme.
zen-shortcuts-corrupted = Your { -brand-short-name } shortcuts file is corrupted. They have been reset to the default shortcuts. zen-shortcuts-corrupted = Your { -brand-short-name } shortcuts file is corrupted. They have been reset to the default shortcuts.
@@ -61,10 +55,6 @@ zen-general-confirm =
.label = Confirm .label = Confirm
zen-pinned-tab-replaced = Pinned tab URL has been replaced with the current URL! zen-pinned-tab-replaced = Pinned tab URL has been replaced with the current URL!
zen-pinned-tab-url-edited = Pinned tab URL has been updated!
zen-pinned-tab-url-invalid = That doesn't look like a valid URL.
zen-pinned-tab-edit-url-title = Edit Pinned URL
zen-pinned-tab-edit-url-label = Enter the URL this pinned tab should point to:
zen-tabs-renamed = Tab has been successfully renamed! zen-tabs-renamed = Tab has been successfully renamed!
zen-background-tab-opened-toast = New background tab opened! zen-background-tab-opened-toast = New background tab opened!
zen-workspace-renamed-toast = Workspace has been successfully renamed! zen-workspace-renamed-toast = Workspace has been successfully renamed!
@@ -87,8 +77,6 @@ zen-icons-picker-emoji =
.label = Emojis .label = Emojis
zen-icons-picker-svg = zen-icons-picker-svg =
.label = Icons .label = Icons
zen-emojis-picker-search =
.placeholder = Search emojis
urlbar-search-mode-zen_actions = Actions urlbar-search-mode-zen_actions = Actions
zen-site-data-settings = Settings zen-site-data-settings = Settings
@@ -151,9 +139,6 @@ zen-sidebar-notification-updated-heading = Update Complete!
zen-sidebar-notification-updated-label = What's new in { -brand-short-name } zen-sidebar-notification-updated-label = What's new in { -brand-short-name }
zen-sidebar-notification-updated-tooltip = zen-sidebar-notification-updated-tooltip =
.title = View Release Notes .title = View Release Notes
zen-sidebar-notification-donate-label = Support { -brand-short-name }
zen-sidebar-notification-donate-tooltip =
.title = Donate to the project
zen-sidebar-notification-restart-safe-mode-label = Something broke? zen-sidebar-notification-restart-safe-mode-label = Something broke?
zen-sidebar-notification-restart-safe-mode-tooltip = zen-sidebar-notification-restart-safe-mode-tooltip =
.title = Restart in Safe Mode .title = Restart in Safe Mode
@@ -164,5 +149,5 @@ zen-window-sync-migration-dialog-learn-more = Learn More
zen-window-sync-migration-dialog-accept = Got It zen-window-sync-migration-dialog-accept = Got It
zen-appmenu-new-blank-window = zen-appmenu-new-blank-window =
.label = New Blank Window .label = New blank window

View File

@@ -20,9 +20,6 @@ zen-live-folder-github-option-assigned-self =
zen-live-folder-github-option-review-requested = zen-live-folder-github-option-review-requested =
.label = Review Requests .label = Review Requests
zen-live-folder-github-option-include-drafts =
.label = Include Draft Pull Requests
zen-live-folder-type-rss = zen-live-folder-type-rss =
.label = RSS Feed .label = RSS Feed

View File

@@ -25,9 +25,3 @@ zen-space-routing-open-in = Open In
zen-space-routing-url = URL zen-space-routing-url = URL
zen-space-routing-tab-routed-toast = New tab opened in { $targetWorkspace } zen-space-routing-tab-routed-toast = New tab opened in { $targetWorkspace }
tab-context-zen-add-domain-to-sr =
.label =
{ $tabCount ->
[one] Add Route for Domain
*[other] Add Route for Domains
}

View File

@@ -5,14 +5,14 @@
tab-zen-split-tabs = tab-zen-split-tabs =
.label = .label =
{ $tabCount -> { $tabCount ->
[-1] Split Out Tab [-1] Split out tab
[1] Add Split View... [1] Add split view...
*[other] Join { $tabCount } Tabs *[other] Join { $tabCount } Tabs
} }
.accesskey = S .accesskey = S
zen-split-link = zen-split-link =
.label = Split Link to New Tab .label = Split link to new tab
.accesskey = S .accesskey = S
zen-split-view-modifier-header = Split View zen-split-view-modifier-header = Split View

View File

@@ -20,7 +20,7 @@ zen-toolbar-context-compact-mode-hide-both =
.accesskey = H .accesskey = H
zen-toolbar-context-move-to-folder = zen-toolbar-context-move-to-folder =
.label = Move to Folder .label = Move to Folder...
.accesskey = M .accesskey = M
zen-toolbar-context-new-folder = zen-toolbar-context-new-folder =
@@ -31,7 +31,7 @@ sidebar-zen-expand =
.label = Expand Sidebar .label = Expand Sidebar
sidebar-zen-create-new = sidebar-zen-create-new =
.label = Create New .label = Create New...
tabbrowser-unload-tab-button = tabbrowser-unload-tab-button =
.tooltiptext = .tooltiptext =

View File

@@ -24,10 +24,10 @@ zen-workspaces-panel-context-delete =
.accesskey = D .accesskey = D
zen-workspaces-panel-change-name = zen-workspaces-panel-change-name =
.label = Change Name .label = Change Name
zen-workspaces-panel-change-icon = zen-workspaces-panel-change-icon =
.label = Change Icon .label = Change Icon
zen-workspaces-panel-context-default-profile = zen-workspaces-panel-context-default-profile =
.label = Set Profile .label = Set Profile
@@ -42,7 +42,7 @@ zen-workspaces-how-to-reorder-title = How to reorder spaces
zen-workspaces-how-to-reorder-desc = Drag the space icons at the bottom of the sidebar to reorder them zen-workspaces-how-to-reorder-desc = Drag the space icons at the bottom of the sidebar to reorder them
zen-workspaces-change-theme = zen-workspaces-change-theme =
.label = Edit Theme .label = Edit Theme
zen-workspaces-panel-context-open = zen-workspaces-panel-context-open =
.label = Open Workspace .label = Open Workspace
@@ -72,7 +72,7 @@ zen-workspace-creation-name =
.placeholder = Space Name .placeholder = Space Name
zen-move-tab-to-workspace-button = zen-move-tab-to-workspace-button =
.label = Move To .label = Move To...
.tooltiptext = Move all tabs in this window to a Space .tooltiptext = Move all tabs in this window to a Space
zen-workspaces-panel-context-reorder = zen-workspaces-panel-context-reorder =
@@ -82,7 +82,6 @@ zen-workspace-creation-profile = Profile
.tooltiptext = Profiles are used to separate cookies and site data between spaces. .tooltiptext = Profiles are used to separate cookies and site data between spaces.
zen-workspace-creation-header = Create a Space zen-workspace-creation-header = Create a Space
zen-workspace-creation-label = Spaces are used to organize your tabs and sessions. zen-workspace-creation-label = Spaces are used to organize your tabs and sessions.
zen-workspace-default-profile = Default
zen-workspaces-delete-workspace-title = Delete Space? zen-workspaces-delete-workspace-title = Delete Space?
zen-workspaces-delete-workspace-body = Are you sure you want to delete { $name }? This action cannot be undone. zen-workspaces-delete-workspace-body = Are you sure you want to delete { $name }? This action cannot be undone.

8
package-lock.json generated
View File

@@ -11,7 +11,7 @@
"devDependencies": { "devDependencies": {
"@babel/preset-typescript": "^7.27.0", "@babel/preset-typescript": "^7.27.0",
"@zen-browser/prettier": "^3.9.3", "@zen-browser/prettier": "^3.9.3",
"@zen-browser/surfer": "^1.14.8", "@zen-browser/surfer": "^1.14.6",
"formal-git": "^1.2.9", "formal-git": "^1.2.9",
"globals": "^16.3.0", "globals": "^16.3.0",
"husky": "^9.1.7", "husky": "^9.1.7",
@@ -860,9 +860,9 @@
} }
}, },
"node_modules/@zen-browser/surfer": { "node_modules/@zen-browser/surfer": {
"version": "1.14.8", "version": "1.14.6",
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.14.8.tgz", "resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.14.6.tgz",
"integrity": "sha512-5HHcfibwHIK5n3huhJL2TLBX2+8odj6ebCMA6U2EcUj9ROSrcz7/bjY2n5MIa9oIRL9gtV3ott0jwJj6SlapxA==", "integrity": "sha512-hgTKadIJ/9/9dizHn4229ZZHQckd7D4OR6e7HVkcmtuq1Jke3OAn6SH7u7NjvzvYy35Mb2sXjVUvZEG1ITIfgg==",
"dev": true, "dev": true,
"license": "MPL-2.0", "license": "MPL-2.0",
"dependencies": { "dependencies": {

View File

@@ -10,6 +10,7 @@
"build": "surfer build", "build": "surfer build",
"build:ui": "surfer build --ui", "build:ui": "surfer build --ui",
"start": "cd engine && python3 ./mach run --noprofile", "start": "cd engine && python3 ./mach run --noprofile",
"start:debug": "npm start -- --jsdebugger --wait-for-jsdebugger",
"start:bloat": "XPCOM_MEM_BLOAT_LOG=1 npm start", "start:bloat": "XPCOM_MEM_BLOAT_LOG=1 npm start",
"import": "npm run ffprefs && npm run import:dumps && surfer import", "import": "npm run ffprefs && npm run import:dumps && surfer import",
"import:dumps": "python3 scripts/update_service_dumps.py", "import:dumps": "python3 scripts/update_service_dumps.py",
@@ -49,7 +50,7 @@
"devDependencies": { "devDependencies": {
"@babel/preset-typescript": "^7.27.0", "@babel/preset-typescript": "^7.27.0",
"@zen-browser/prettier": "^3.9.3", "@zen-browser/prettier": "^3.9.3",
"@zen-browser/surfer": "^1.14.8", "@zen-browser/surfer": "^1.14.6",
"formal-git": "^1.2.9", "formal-git": "^1.2.9",
"globals": "^16.3.0", "globals": "^16.3.0",
"husky": "^9.1.7", "husky": "^9.1.7",

View File

@@ -23,6 +23,3 @@
- name: browser.ml.linkPreview.enabled - name: browser.ml.linkPreview.enabled
value: false value: false
- name: browser.preferences.aiControls
value: false

View File

@@ -99,13 +99,3 @@
# Only enabled for windows, doesn't really fit inside Zen. # Only enabled for windows, doesn't really fit inside Zen.
- name: browser.startup.preXulSkeletonUI - name: browser.startup.preXulSkeletonUI
value: false value: false
- name: browser.preonboarding.enabled
value: false
- name: browser.referrals.enabled
value: false
locked: true
- name: browser.shell.customIcon.enabled
value: false # For now?

View File

@@ -2,11 +2,18 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- name: browser.lowMemoryResponseMask
value: 3
condition: "defined(XP_MACOSX)"
- name: network.predictor.enable-hover-on-ssl
value: true
# See https://github.com/zen-browser/desktop/issues/11599, this pref seems to # See https://github.com/zen-browser/desktop/issues/11599, this pref seems to
# have disabled itself on macos for some unknown reason. # have disabled itself on macos for some unknown reason.
# Make sure its in sync with: # Make sure its in sync with:
# https://searchfox.org/firefox-main/rev/dd2579cb6e7f1761a27ce64fb84d92c61d85c27f/modules/libpref/init/StaticPrefList.yaml#8396 # https://searchfox.org/firefox-main/rev/1477feb9706f4ccc5bd571c1c215832a6fbb7464/modules/libpref/init/StaticPrefList.yaml#7741-7748
- name: gfx.webrender.compositor - name: gfx.webrender.compositor
condition: "defined(XP_WIN) || defined(XP_DARWIN) || defined(MOZ_WIDGET_GTK)" condition: "defined(XP_WIN) || defined(XP_DARWIN)"
value: "@cond" value: "@cond"
mirror: once mirror: once

View File

@@ -20,14 +20,6 @@
- name: zen.view.compact.sidebar-keep-hover.duration - name: zen.view.compact.sidebar-keep-hover.duration
value: 150 value: 150
# How far (in CSS pixels) the mouse may travel past the window bounds after
# leaving the window before the hovered sidebar/toolbar is collapsed
- name: zen.view.compact.outside-window-edge-offset.horizontal
value: 200
- name: zen.view.compact.outside-window-edge-offset.vertical
value: 100
- name: zen.view.compact.animate-sidebar - name: zen.view.compact.animate-sidebar
value: true value: true

View File

@@ -2,14 +2,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Give the whole window a translucent, blurred backdrop, using the material # Enable transparent background for macos
# below. See ZenWindowMaterialView in nsCocoaWindow.mm. - name: widget.macos.sidebar-blend-mode.behind-window
- name: zen.widget.macos.window-vibrancy
value: true value: true
condition: "defined(XP_MACOSX)" condition: "defined(XP_MACOSX)"
cpptype: bool
mirror: always
type: static
# 1. hudWindow # 1. hudWindow
# 2. fullScreenUI # 2. fullScreenUI

View File

@@ -8,5 +8,9 @@
- name: svg.context-properties.content.enabled - name: svg.context-properties.content.enabled
value: true value: true
- name: image.avif.enabled
value: true
locked: true
- name: media.eme.enabled - name: media.eme.enabled
value: true value: true

View File

@@ -46,12 +46,6 @@
- name: zen.view.context-menu.refresh - name: zen.view.context-menu.refresh
value: "@IS_TWILIGHT@" value: "@IS_TWILIGHT@"
- name: zen.view.drag-window-from-content
value: true
- name: zen.view.drag-window-from-content.height-percentage
value: 5
- name: zen.view.borderless-fullscreen - name: zen.view.borderless-fullscreen
value: true value: true

View File

@@ -21,7 +21,7 @@
value: 100 value: 100
- name: zen.workspaces.switch-animation-duration - name: zen.workspaces.switch-animation-duration
value: 250 value: 200
- name: zen.workspaces.wrap-around-navigation - name: zen.workspaces.wrap-around-navigation
value: true value: true

View File

@@ -8,4 +8,4 @@ packaging==24.2
pathspec==0.12.1 pathspec==0.12.1
platformdirs==4.3.6 platformdirs==4.3.6
pycodestyle==2.12.1 pycodestyle==2.12.1
requests==2.34.2 requests==2.33.0

View File

@@ -83,7 +83,7 @@ def main():
dest = patch.get("dest") dest = patch.get("dest")
if not url or not dest: if not url or not dest:
die(f"Patch entry missing 'url' or 'dest': {patch}") die(f"Patch entry missing 'url' or 'dest': {patch}")
filename = patch.get("filename", url.split("/")[-1]) filename = url.split("/")[-1]
output_file = os.path.join(OUTPUT_DIR, dest, filename) output_file = os.path.join(OUTPUT_DIR, dest, filename)
download_patch_from_url(url, output_file) download_patch_from_url(url, output_file)
replaces = patch.get("replaces", {}) replaces = patch.get("replaces", {})

View File

@@ -1,8 +1,8 @@
diff --git a/.prettierignore b/.prettierignore diff --git a/.prettierignore b/.prettierignore
index bd8ab46ff7175f5039b69b04c1afe53ab8efe746..7ae12a1ff3724e99aeec2e93518640a2fa9611e6 100644 index 949896ff064ae0b54b6a657ea074bc88e12820f7..5249f420972667bece4d85fe8d35073afaebeb8a 100644
--- a/.prettierignore --- a/.prettierignore
+++ b/.prettierignore +++ b/.prettierignore
@@ -1807,3 +1807,12 @@ tools/ts/test/baselines/ @@ -1803,3 +1803,12 @@ tools/ts/test/baselines/
try_task_config.json try_task_config.json
xpcom/idl-parser/xpidl/fixtures/xpctest.d.json xpcom/idl-parser/xpidl/fixtures/xpctest.d.json
**/package-lock.json **/package-lock.json
@@ -12,6 +12,6 @@ index bd8ab46ff7175f5039b69b04c1afe53ab8efe746..7ae12a1ff3724e99aeec2e93518640a2
+*.min.js +*.min.js
+*.min.mjs +*.min.mjs
+*.inc +*.inc
+**/mochitests/** +*/mochitests/*
+*.svg +*.svg
+ +

View File

@@ -1,5 +1,5 @@
diff --git a/.stylelintrc.js b/.stylelintrc.js diff --git a/.stylelintrc.js b/.stylelintrc.js
index b484bf6600a7e1b8ad2aed8c8b7fe5e84cc3d023..f89712e2c13dfa0bcb48e55cd3872c67f5c98dad 100644 index 3c9fecf731126fdbf900d1bdcd3635dd31ed53ef..c3a210b8153e9699c6cbdc0d568bb72433976b2c 100644
--- a/.stylelintrc.js --- a/.stylelintrc.js
+++ b/.stylelintrc.js +++ b/.stylelintrc.js
@@ -67,7 +67,7 @@ module.exports = { @@ -67,7 +67,7 @@ module.exports = {
@@ -11,9 +11,9 @@ index b484bf6600a7e1b8ad2aed8c8b7fe5e84cc3d023..f89712e2c13dfa0bcb48e55cd3872c67
{ {
ignore: ["blockless-at-rules"], ignore: ["blockless-at-rules"],
}, },
@@ -280,7 +280,7 @@ module.exports = { @@ -274,7 +274,7 @@ module.exports = {
"media-query-no-invalid": null, // Remove this line setting `csscontrols/use-logical` to null after implementing fixes
"stylelint-plugin-mozilla/media-query-no-invalid": true, "csstools/use-logical": null,
"stylelint-plugin-mozilla/no-base-design-tokens": true, "stylelint-plugin-mozilla/no-base-design-tokens": true,
- "stylelint-plugin-mozilla/use-design-tokens": true, - "stylelint-plugin-mozilla/use-design-tokens": true,
+ "stylelint-plugin-mozilla/use-design-tokens": false, + "stylelint-plugin-mozilla/use-design-tokens": false,

View File

@@ -1,18 +0,0 @@
diff --git a/browser/base/content/aboutDialog.css b/browser/base/content/aboutDialog.css
index 017125bc2510e5f5e317a5e78c40d6aa9ded76ca..d343d8c62a2251e3c3a33ae8f2ab9c4c68218c22 100644
--- a/browser/base/content/aboutDialog.css
+++ b/browser/base/content/aboutDialog.css
@@ -135,6 +135,13 @@
margin: 0 40px;
}
+#trademark {
+ font-size: xx-small;
+ text-align: center;
+ margin-block: 10px;
+ color: var(--text-color-deemphasized);
+}
+
#currentChannel {
margin: 0;
padding: 0;

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js
index a2fb4433c7044e7f5681d5762285314fa3e00a5c..dac1e79e86c534247a470ae062e59f7e7cba6e38 100644 index f6e1391baf12abb91c85a95107bb3923118746c0..cac04aa288e8a305d0c8b28e0c919abce87658e5 100644
--- a/browser/base/content/aboutDialog.js --- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js +++ b/browser/base/content/aboutDialog.js
@@ -58,7 +58,7 @@ function init() { @@ -52,7 +52,7 @@ function init() {
]); ]);
let versionIdKey = "base"; let versionIdKey = "base";
let versionAttributes = { let versionAttributes = {
@@ -11,7 +11,7 @@ index a2fb4433c7044e7f5681d5762285314fa3e00a5c..dac1e79e86c534247a470ae062e59f7e
}; };
let arch = Services.sysinfo.get("arch"); let arch = Services.sysinfo.get("arch");
@@ -70,7 +70,7 @@ function init() { @@ -64,7 +64,7 @@ function init() {
} }
let version = Services.appinfo.version; let version = Services.appinfo.version;
@@ -20,7 +20,7 @@ index a2fb4433c7044e7f5681d5762285314fa3e00a5c..dac1e79e86c534247a470ae062e59f7e
versionIdKey += "-nightly"; versionIdKey += "-nightly";
let buildID = Services.appinfo.appBuildID; let buildID = Services.appinfo.appBuildID;
let year = buildID.slice(0, 4); let year = buildID.slice(0, 4);
@@ -158,14 +158,6 @@ function init() { @@ -125,14 +125,6 @@ function init() {
window.close(); window.close();
}); });
if (AppConstants.MOZ_UPDATER) { if (AppConstants.MOZ_UPDATER) {

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml diff --git a/browser/base/content/aboutDialog.xhtml b/browser/base/content/aboutDialog.xhtml
index 067eaf8d4e23f76a2423d01a1d9fa71d9ef3c65f..e0badae05d1da7e6de43e1d517539d4b09ec90f5 100644 index 3ffd464b960a4299a7dd0cd87e4fc2f781b9d593..ef9f42d1f0196902b4af31f4496891fcd6319831 100644
--- a/browser/base/content/aboutDialog.xhtml --- a/browser/base/content/aboutDialog.xhtml
+++ b/browser/base/content/aboutDialog.xhtml +++ b/browser/base/content/aboutDialog.xhtml
@@ -102,10 +102,6 @@ @@ -102,10 +102,6 @@
@@ -13,7 +13,7 @@ index 067eaf8d4e23f76a2423d01a1d9fa71d9ef3c65f..e0badae05d1da7e6de43e1d517539d4b
</vbox> </vbox>
#endif #endif
</hbox> </hbox>
@@ -120,12 +116,12 @@ @@ -120,26 +116,22 @@
<vbox id="experimental" hidden="true"> <vbox id="experimental" hidden="true">
<description class="text-blurb" id="warningDesc" data-l10n-id="warningDesc-version"></description> <description class="text-blurb" id="warningDesc" data-l10n-id="warningDesc-version"></description>
<description class="text-blurb" id="communityExperimentalDesc" data-l10n-id="community-exp"> <description class="text-blurb" id="communityExperimentalDesc" data-l10n-id="community-exp">
@@ -27,15 +27,20 @@ index 067eaf8d4e23f76a2423d01a1d9fa71d9ef3c65f..e0badae05d1da7e6de43e1d517539d4b
+ <label is="text-link" href="https://github.com/zen-browser/desktop" data-l10n-name="community-mozillaLink"/> + <label is="text-link" href="https://github.com/zen-browser/desktop" data-l10n-name="community-mozillaLink"/>
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/> <label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
</description> </description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus"> - <description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
@@ -144,8 +140,8 @@ - <label is="text-link" href="https://foundation.mozilla.org/?form=firefox-about" data-l10n-name="helpus-donateLink"/>
- <label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
- </description>
</vbox>
</vbox>
</hbox>
<vbox id="bottomBox"> <vbox id="bottomBox">
<hbox pack="center"> <hbox pack="center">
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="bottomLinks-license"/> <label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="bottomLinks-license"/>
- <label is="text-link" class="bottom-link" href="https://www.mozilla.org/about/legal/terms/firefox/" data-l10n-id="bottom-links-terms"/> - <label is="text-link" class="bottom-link" href="https://www.mozilla.org/about/legal/terms/firefox/" data-l10n-id="bottom-links-terms"/>
- <label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/firefox/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-id="bottom-links-privacy"/> - <label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/firefox/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-id="bottom-links-privacy"/>
+ <label is="text-link" class="bottom-link" href="about:rights" data-l10n-id="bottom-links-terms"/> + <label is="text-link" class="bottom-link" href="about:rights" data-l10n-id="bottomLinks-rights"/>
+ <label is="text-link" class="bottom-link" href="https://www.zen-browser.app/privacy-policy/" data-l10n-id="bottom-links-privacy"/> + <label is="text-link" class="bottom-link" href="https://www.zen-browser.app/privacy-policy/" data-l10n-id="bottomLinks-privacy"/>
</hbox> </hbox>
<description id="trademark" data-l10n-id="trademarkInfo"></description> <description id="trademark" data-l10n-id="trademarkInfo"></description>
</vbox> </vbox>

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml
index cf35762fdcc4716932c7af7cf4af4b2f72aea038..6c13e42806ce80accce464d7ec7e022a0d8e0078 100644 index 31cd4f927c273573b38021f84417101c57377902..f293e1c61d3b7a80b7dc472d927893f0439d6af9 100644
--- a/browser/base/content/browser-box.inc.xhtml --- a/browser/base/content/browser-box.inc.xhtml
+++ b/browser/base/content/browser-box.inc.xhtml +++ b/browser/base/content/browser-box.inc.xhtml
@@ -3,12 +3,22 @@ @@ -3,12 +3,22 @@
@@ -10,7 +10,7 @@ index cf35762fdcc4716932c7af7cf4af4b2f72aea038..6c13e42806ce80accce464d7ec7e022a
+ <html:div id="zen-browser-background" class="zen-browser-generic-background"> + <html:div id="zen-browser-background" class="zen-browser-generic-background">
+ <html:div class="zen-browser-grain" /> + <html:div class="zen-browser-grain" />
+ </html:div> + </html:div>
<box context="sidebar-context-menu" id="sidebar-container" class="chrome-block" hidden="true"> <box context="sidebar-context-menu" id="sidebar-main" class="chrome-block" hidden="true">
<html:sidebar-main flex="1"> <html:sidebar-main flex="1">
<box id="vertical-tabs" slot="tabstrip" customizable="true" contextmenu="toolbar-context-menu"></box> <box id="vertical-tabs" slot="tabstrip" customizable="true" contextmenu="toolbar-context-menu"></box>
</html:sidebar-main> </html:sidebar-main>
@@ -28,12 +28,12 @@ index cf35762fdcc4716932c7af7cf4af4b2f72aea038..6c13e42806ce80accce464d7ec7e022a
@@ -25,7 +35,7 @@ @@ -25,7 +35,7 @@
</stack> </stack>
</vbox> </vbox>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true" role="separator" aria-controls="sidebar-box" data-l10n-id="sidebar-resize-splitter"/> <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
- <tabbox id="tabbrowser-tabbox" flex="1" tabcontainer="tabbrowser-tabs"> - <tabbox id="tabbrowser-tabbox" flex="1" tabcontainer="tabbrowser-tabs">
+#include zen-tabbrowser-elements.inc.xhtml +#include zen-tabbrowser-elements.inc.xhtml
<tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"/> <tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"/>
</tabbox> </tabbox>
<splitter id="ai-window-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="sibling" collapsed="true"/> <splitter id="ai-window-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="none" resizeafter="sibling" collapsed="true"/>
@@ -34,3 +44,5 @@ @@ -34,3 +44,5 @@
</stack> </stack>
</vbox> </vbox>

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/base/content/browser-fullScreenAndPointerLock.js diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/base/content/browser-fullScreenAndPointerLock.js
index 991cbab1fca19bc20adabb73c146c26a57db68eb..5c0debc58c9614b13916e758c7f64b522756c1d4 100644 index d0d3b6fc57800b073bb1c75f6e55212749815b0a..f3d5790eed58f1cb9a36229582e0fa00f3668962 100644
--- a/browser/base/content/browser-fullScreenAndPointerLock.js --- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js +++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -502,8 +502,6 @@ var FullScreen = { @@ -502,8 +502,6 @@ var FullScreen = {
@@ -7,7 +7,7 @@ index 991cbab1fca19bc20adabb73c146c26a57db68eb..5c0debc58c9614b13916e758c7f64b52
let translate = shiftSize > 0 ? `0 ${shiftSize}px` : ""; let translate = shiftSize > 0 ? `0 ${shiftSize}px` : "";
gNavToolbox.classList.toggle("fullscreen-floating-toolbox", shiftSize > 0); gNavToolbox.classList.toggle("fullscreen-floating-toolbox", shiftSize > 0);
- gNavToolbox.style.translate = translate; - gNavToolbox.style.translate = translate;
- gURLBar.style.setProperty("--toolbar-shift-translate", translate); - gURLBar.style.translate = gURLBar.hasAttribute("breakout") ? translate : "";
document let searchbar = document.getElementById("searchbar-new");
.getElementById("searchbar-new") if (searchbar) {
?.style.setProperty("--toolbar-shift-translate", translate); searchbar.style.translate = searchbar.hasAttribute("breakout")

View File

@@ -1,16 +1,16 @@
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 4960f4baed32a9e9f523262591eb93550ca9c4b0..9ee825057b1b3b5a08e1d2b2c1036f1be2088da6 100644 index 1026474bb1bc026987be01a8c18fa0927cb911bc..60294e0587147d86ace8e6d6985d8c6eae8248b6 100644
--- a/browser/base/content/browser.js --- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js +++ b/browser/base/content/browser.js
@@ -34,6 +34,7 @@ ChromeUtils.defineESModuleGetters(this, { @@ -34,6 +34,7 @@ ChromeUtils.defineESModuleGetters(this, {
"moz-src:///toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs", "resource://gre/modules/ContextualIdentityService.sys.mjs",
CustomizableUI: CustomizableUI:
"moz-src:///browser/components/customizableui/CustomizableUI.sys.mjs", "moz-src:///browser/components/customizableui/CustomizableUI.sys.mjs",
+ ZenCustomizableUI: "resource:///modules/ZenCustomizableUI.sys.mjs", + ZenCustomizableUI: "resource:///modules/ZenCustomizableUI.sys.mjs",
DevToolsSocketStatus: DevToolsSocketStatus:
"resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs", "resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs", DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
@@ -831,7 +832,12 @@ function UpdateBackForwardCommands(aWebNavigation) { @@ -816,7 +817,12 @@ function UpdateBackForwardCommands(aWebNavigation) {
var backDisabled = backCommand.hasAttribute("disabled"); var backDisabled = backCommand.hasAttribute("disabled");
var forwardDisabled = forwardCommand.hasAttribute("disabled"); var forwardDisabled = forwardCommand.hasAttribute("disabled");
@@ -24,7 +24,7 @@ index 4960f4baed32a9e9f523262591eb93550ca9c4b0..9ee825057b1b3b5a08e1d2b2c1036f1b
if (backDisabled) { if (backDisabled) {
backCommand.removeAttribute("disabled"); backCommand.removeAttribute("disabled");
} else { } else {
@@ -3973,7 +3979,7 @@ function warnAboutClosingWindow() { @@ -3719,7 +3725,7 @@ function warnAboutClosingWindow() {
if (!isPBWindow && !toolbar.visible) { if (!isPBWindow && !toolbar.visible) {
return gBrowser.warnAboutClosingTabs( return gBrowser.warnAboutClosingTabs(
@@ -33,7 +33,7 @@ index 4960f4baed32a9e9f523262591eb93550ca9c4b0..9ee825057b1b3b5a08e1d2b2c1036f1b
gBrowser.closingTabsEnum.ALL gBrowser.closingTabsEnum.ALL
); );
} }
@@ -4013,7 +4019,7 @@ function warnAboutClosingWindow() { @@ -3759,7 +3765,7 @@ function warnAboutClosingWindow() {
return ( return (
isPBWindow || isPBWindow ||
gBrowser.warnAboutClosingTabs( gBrowser.warnAboutClosingTabs(
@@ -42,7 +42,7 @@ index 4960f4baed32a9e9f523262591eb93550ca9c4b0..9ee825057b1b3b5a08e1d2b2c1036f1b
gBrowser.closingTabsEnum.ALL gBrowser.closingTabsEnum.ALL
) )
); );
@@ -4038,7 +4044,7 @@ function warnAboutClosingWindow() { @@ -3784,7 +3790,7 @@ function warnAboutClosingWindow() {
AppConstants.platform != "macosx" || AppConstants.platform != "macosx" ||
isPBWindow || isPBWindow ||
gBrowser.warnAboutClosingTabs( gBrowser.warnAboutClosingTabs(
@@ -51,7 +51,7 @@ index 4960f4baed32a9e9f523262591eb93550ca9c4b0..9ee825057b1b3b5a08e1d2b2c1036f1b
gBrowser.closingTabsEnum.ALL gBrowser.closingTabsEnum.ALL
) )
); );
@@ -4998,6 +5004,16 @@ var ConfirmationHint = { @@ -4744,6 +4750,16 @@ var ConfirmationHint = {
} }
document.l10n.setAttributes(this._message, messageId, l10nArgs); document.l10n.setAttributes(this._message, messageId, l10nArgs);

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
index dd2f391096968564086911c532f696dc7ffb8ae1..3de617bf4fb7fa35f7d4d7b618e4673b72b953ee 100644 index e7e94e13a990c154fb54bda4a3420ca00bdac009..8253b7d403734973729a5982cceafc12bab24f54 100644
--- a/browser/base/content/navigator-toolbox.inc.xhtml --- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml +++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
@@ -26,7 +26,7 @@ index dd2f391096968564086911c532f696dc7ffb8ae1..3de617bf4fb7fa35f7d4d7b618e4673b
<toolbar id="TabsToolbar" <toolbar id="TabsToolbar"
class="browser-toolbar browser-titlebar" class="browser-toolbar browser-titlebar"
fullscreentoolbar="true" fullscreentoolbar="true"
@@ -54,6 +58,8 @@ @@ -62,6 +66,8 @@
<html:sidebar-pins-promo id="drag-to-pin-promo-card"></html:sidebar-pins-promo> <html:sidebar-pins-promo id="drag-to-pin-promo-card"></html:sidebar-pins-promo>
<arrowscrollbox id="pinned-tabs-container" orient="horizontal" clicktoscroll=""></arrowscrollbox> <arrowscrollbox id="pinned-tabs-container" orient="horizontal" clicktoscroll=""></arrowscrollbox>
<splitter orient="vertical" id="vertical-pinned-tabs-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/> <splitter orient="vertical" id="vertical-pinned-tabs-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
@@ -34,8 +34,8 @@ index dd2f391096968564086911c532f696dc7ffb8ae1..3de617bf4fb7fa35f7d4d7b618e4673b
+<html:div id="zen-tabs-wrapper"> +<html:div id="zen-tabs-wrapper">
<hbox class="tab-drop-indicator" hidden="true"/> <hbox class="tab-drop-indicator" hidden="true"/>
<arrowscrollbox id="tabbrowser-arrowscrollbox" orient="horizontal" flex="1" clicktoscroll="" scrolledtostart="" scrolledtoend=""> <arrowscrollbox id="tabbrowser-arrowscrollbox" orient="horizontal" flex="1" clicktoscroll="" scrolledtostart="" scrolledtoend="">
<tab is="tabbrowser-tab" class="tabbrowser-tab" selected="" visuallyselected="" fadein=""/> <tab is="tabbrowser-tab" class="tabbrowser-tab" selected="true" visuallyselected="" fadein=""/>
@@ -73,6 +79,7 @@ @@ -81,6 +87,7 @@
tooltip="dynamic-shortcut-tooltip" tooltip="dynamic-shortcut-tooltip"
data-l10n-id="tabs-toolbar-new-tab"/> data-l10n-id="tabs-toolbar-new-tab"/>
<html:span id="tabbrowser-tab-a11y-desc" hidden="true"/> <html:span id="tabbrowser-tab-a11y-desc" hidden="true"/>
@@ -43,7 +43,7 @@ index dd2f391096968564086911c532f696dc7ffb8ae1..3de617bf4fb7fa35f7d4d7b618e4673b
</tabs> </tabs>
<toolbarbutton id="new-tab-button" <toolbarbutton id="new-tab-button"
@@ -99,9 +106,10 @@ @@ -115,9 +122,10 @@
<toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/> <toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/>

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.js b/browser/base/content/navigator-toolbox.js diff --git a/browser/base/content/navigator-toolbox.js b/browser/base/content/navigator-toolbox.js
index 10faff18ca0c6df472de81b5dbdba83309fa2eb8..b675df9ad22150f5a1060dedbabf6cb27c951619 100644 index 1982ebadbd2df5ea309db487a4f30288f1af43e5..926c681d4733c84768a23407d60ca05859408b6d 100644
--- a/browser/base/content/navigator-toolbox.js --- a/browser/base/content/navigator-toolbox.js
+++ b/browser/base/content/navigator-toolbox.js +++ b/browser/base/content/navigator-toolbox.js
@@ -10,7 +10,7 @@ ChromeUtils.defineESModuleGetters(this, { @@ -10,7 +10,7 @@ ChromeUtils.defineESModuleGetters(this, {
@@ -37,15 +37,15 @@ index 10faff18ca0c6df472de81b5dbdba83309fa2eb8..b675df9ad22150f5a1060dedbabf6cb2
case "back-button": case "back-button":
case "forward-button": case "forward-button":
case "reload-button": case "reload-button":
@@ -331,6 +343,7 @@ document.addEventListener( @@ -329,6 +341,7 @@ document.addEventListener(
#downloads-button, #downloads-button,
#fxa-toolbar-menu-button, #fxa-toolbar-menu-button,
#unified-extensions-button, #unified-extensions-button,
+ #zen-site-data-icon-button, + #zen-site-data-icon-button,
#library-button, #library-button,
#ipprotection-button,
#split-view-button, #split-view-button,
@@ -416,6 +429,16 @@ document.addEventListener( #smartwindow-ask-button
@@ -413,6 +426,16 @@ document.addEventListener(
gUnifiedExtensions.togglePanel(event); gUnifiedExtensions.togglePanel(event);
break; break;

View File

@@ -35,7 +35,6 @@
<command id="cmd_zenToggleTabsOnRight" /> <command id="cmd_zenToggleTabsOnRight" />
<command id="cmd_zenReplacePinnedUrlWithCurrent" /> <command id="cmd_zenReplacePinnedUrlWithCurrent" />
<command id="cmd_zenEditPinnedUrl" />
<command id="cmd_contextZenAddToEssentials" /> <command id="cmd_contextZenAddToEssentials" />
<command id="cmd_contextZenRemoveFromEssentials" /> <command id="cmd_contextZenRemoveFromEssentials" />

View File

@@ -14,7 +14,7 @@
<hbox id="PanelUI-zen-emojis-picker-pages"> <hbox id="PanelUI-zen-emojis-picker-pages">
<vbox emojis="true"> <vbox emojis="true">
<hbox id="PanelUI-zen-emojis-picker-header"> <hbox id="PanelUI-zen-emojis-picker-header">
<html:input type="search" id="PanelUI-zen-emojis-picker-search" data-l10n-id="zen-emojis-picker-search" /> <html:input type="search" id="PanelUI-zen-emojis-picker-search" placeholder="Search emojis" />
</hbox> </hbox>
<hbox id="PanelUI-zen-emojis-picker-list" /> <hbox id="PanelUI-zen-emojis-picker-list" />
</vbox> </vbox>

View File

@@ -1,12 +1,12 @@
diff --git a/browser/components/aiwindow/ui/modules/AIWindow.sys.mjs b/browser/components/aiwindow/ui/modules/AIWindow.sys.mjs diff --git a/browser/components/aiwindow/ui/modules/AIWindow.sys.mjs b/browser/components/aiwindow/ui/modules/AIWindow.sys.mjs
index e0b78c29ad081e6eb541eb2aeae4cb6d5cbb9b9b..ae56a624523bee66bc1d1343b455fc7cb65ebef1 100644 index f6f1dd1f6b4d21d27e39b48bb7a57871ad5d019d..bf743120cf9f137cbe06d05896f706fb3d5b9435 100644
--- a/browser/components/aiwindow/ui/modules/AIWindow.sys.mjs --- a/browser/components/aiwindow/ui/modules/AIWindow.sys.mjs
+++ b/browser/components/aiwindow/ui/modules/AIWindow.sys.mjs +++ b/browser/components/aiwindow/ui/modules/AIWindow.sys.mjs
@@ -321,6 +321,7 @@ export const AIWindow = { @@ -287,6 +287,7 @@ export const AIWindow = {
* @param {boolean} [options.isToggling] },
*/
_updateHamburgerMenuPosition(win, { isToggling = false } = {}) { _updateToolbarButtonPositions(win, { isToggling = false } = {}) {
+ return; + return;
const modeSwitcherButton = win.document.getElementById("ai-window-toggle");
const hamburgerMenu = win.document.getElementById("PanelUI-button"); const hamburgerMenu = win.document.getElementById("PanelUI-button");
const targetToolbar = win.document.getElementById(
this.verticalTabsEnabled ? "nav-bar" : "TabsToolbar"

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/asrouter/modules/FeatureCallout.sys.mjs b/browser/components/asrouter/modules/FeatureCallout.sys.mjs diff --git a/browser/components/asrouter/modules/FeatureCallout.sys.mjs b/browser/components/asrouter/modules/FeatureCallout.sys.mjs
index f6230d6f7ed589f4336387b6115ae4527cdb071b..a289f7b3a665154025121cc9184ab851a74ea33d 100644 index c4638d2d557f05fa6638cd379be8e0076336f8dc..2e25f485aa94485d12ca9e98aa4eaf56a06cf1f8 100644
--- a/browser/components/asrouter/modules/FeatureCallout.sys.mjs --- a/browser/components/asrouter/modules/FeatureCallout.sys.mjs
+++ b/browser/components/asrouter/modules/FeatureCallout.sys.mjs +++ b/browser/components/asrouter/modules/FeatureCallout.sys.mjs
@@ -812,6 +812,7 @@ export class FeatureCallout { @@ -778,6 +778,7 @@ export class FeatureCallout {
) { ) {
return false; return false;
} }
@@ -10,11 +10,3 @@ index f6230d6f7ed589f4336387b6115ae4527cdb071b..a289f7b3a665154025121cc9184ab851
const style = this.win.getComputedStyle(el); const style = this.win.getComputedStyle(el);
return style?.visibility === "visible" && style?.display !== "none"; return style?.visibility === "visible" && style?.display !== "none";
@@ -1115,7 +1116,6 @@ export class FeatureCallout {
type="arrow"
consumeoutsideclicks="never"
norolluponanchor="true"
- nonnative=""
position="${panel_position?.panel_position_string}"
${hide_arrow ? "" : 'show-arrow=""'}
${autohide ? "" : 'noautohide="true"'}

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2681652e5 100644 index d5d4596739cde5d3d49d6294867f5da122c526b8..c206cfb374542c496be9bf0305a0a80bbcf503b2 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs --- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, { @@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -10,7 +10,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
HomePage: "resource:///modules/HomePage.sys.mjs", HomePage: "resource:///modules/HomePage.sys.mjs",
PanelMultiView: PanelMultiView:
"moz-src:///browser/components/customizableui/PanelMultiView.sys.mjs", "moz-src:///browser/components/customizableui/PanelMultiView.sys.mjs",
@@ -348,7 +349,7 @@ var CustomizableUIInternal = { @@ -347,7 +348,7 @@ var CustomizableUIInternal = {
{ {
type: CustomizableUI.TYPE_PANEL, type: CustomizableUI.TYPE_PANEL,
defaultPlacements: [], defaultPlacements: [],
@@ -19,7 +19,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
}, },
false false
); );
@@ -358,27 +359,23 @@ var CustomizableUIInternal = { @@ -357,20 +358,15 @@ var CustomizableUIInternal = {
"back-button", "back-button",
"forward-button", "forward-button",
"stop-reload-button", "stop-reload-button",
@@ -41,26 +41,27 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
this.registerArea( this.registerArea(
CustomizableUI.AREA_NAVBAR, CustomizableUI.AREA_NAVBAR,
{ {
type: CustomizableUI.TYPE_TOOLBAR, @@ -378,8 +374,6 @@ var CustomizableUIInternal = {
overflowable: true, overflowable: true,
defaultPlacements: navbarPlacements, defaultPlacements: navbarPlacements,
- verticalTabsDefaultPlacements: ["alltabs-button", "ai-window-toggle"], verticalTabsDefaultPlacements: [
+ verticalTabsDefaultPlacements: [ - "firefox-view-button",
+ ], - "alltabs-button",
],
defaultCollapsed: false, defaultCollapsed: false,
}, },
true @@ -403,10 +397,7 @@ var CustomizableUIInternal = {
@@ -402,9 +399,6 @@ var CustomizableUIInternal = { {
type: CustomizableUI.TYPE_TOOLBAR, type: CustomizableUI.TYPE_TOOLBAR,
defaultPlacements: [ defaultPlacements: [
- "firefox-view-button",
"tabbrowser-tabs", "tabbrowser-tabs",
- "new-tab-button", - "new-tab-button",
- "alltabs-button", - "alltabs-button",
- "ai-window-toggle",
], ],
verticalTabsDefaultPlacements: [], verticalTabsDefaultPlacements: [],
defaultCollapsed: null, defaultCollapsed: null,
@@ -484,6 +478,7 @@ var CustomizableUIInternal = { @@ -486,6 +477,7 @@ var CustomizableUIInternal = {
CustomizableUI.AREA_NAVBAR, CustomizableUI.AREA_NAVBAR,
CustomizableUI.AREA_BOOKMARKS, CustomizableUI.AREA_BOOKMARKS,
CustomizableUI.AREA_TABSTRIP, CustomizableUI.AREA_TABSTRIP,
@@ -68,7 +69,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
]); ]);
if (AppConstants.platform != "macosx") { if (AppConstants.platform != "macosx") {
toolbars.add(CustomizableUI.AREA_MENUBAR); toolbars.add(CustomizableUI.AREA_MENUBAR);
@@ -1285,6 +1280,9 @@ var CustomizableUIInternal = { @@ -1262,6 +1254,9 @@ var CustomizableUIInternal = {
placements = gPlacements.get(area); placements = gPlacements.get(area);
} }
@@ -78,7 +79,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
// For toolbars that need it, mark as dirty. // For toolbars that need it, mark as dirty.
let defaultPlacements = areaProperties.get("defaultPlacements"); let defaultPlacements = areaProperties.get("defaultPlacements");
if ( if (
@@ -1793,7 +1791,6 @@ var CustomizableUIInternal = { @@ -1769,7 +1764,6 @@ var CustomizableUIInternal = {
lazy.log.info( lazy.log.info(
"Widget " + aWidgetId + " not found, unable to remove from " + aArea "Widget " + aWidgetId + " not found, unable to remove from " + aArea
); );
@@ -86,7 +87,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
} }
this.notifyDOMChange(widgetNode, null, container, true, () => { this.notifyDOMChange(widgetNode, null, container, true, () => {
@@ -1803,7 +1800,7 @@ var CustomizableUIInternal = { @@ -1779,7 +1773,7 @@ var CustomizableUIInternal = {
// We also need to remove the panel context menu if it's there: // We also need to remove the panel context menu if it's there:
this.ensureButtonContextMenu(widgetNode); this.ensureButtonContextMenu(widgetNode);
if (gPalette.has(aWidgetId) || this.isSpecialWidget(aWidgetId)) { if (gPalette.has(aWidgetId) || this.isSpecialWidget(aWidgetId)) {
@@ -95,7 +96,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
} else { } else {
window.gNavToolbox.palette.appendChild(widgetNode); window.gNavToolbox.palette.appendChild(widgetNode);
} }
@@ -1971,16 +1968,16 @@ var CustomizableUIInternal = { @@ -1947,16 +1941,16 @@ var CustomizableUIInternal = {
elem.setAttribute("skipintoolbarset", "true"); elem.setAttribute("skipintoolbarset", "true");
} }
} }
@@ -115,7 +116,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
// Handle initial state of vertical tabs. // Handle initial state of vertical tabs.
if (isVerticalTabs) { if (isVerticalTabs) {
// Show the vertical tabs toolbar // Show the vertical tabs toolbar
@@ -2222,6 +2219,10 @@ var CustomizableUIInternal = { @@ -2198,6 +2192,10 @@ var CustomizableUIInternal = {
* The identifier string of the area that aNode is being inserted into. * The identifier string of the area that aNode is being inserted into.
*/ */
insertWidgetBefore(aNode, aNextNode, aContainer, aAreaId) { insertWidgetBefore(aNode, aNextNode, aContainer, aAreaId) {
@@ -126,7 +127,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
this.notifyDOMChange(aNode, aNextNode, aContainer, false, () => { this.notifyDOMChange(aNode, aNextNode, aContainer, false, () => {
this.setLocationAttributes(aNode, aAreaId); this.setLocationAttributes(aNode, aAreaId);
aContainer.insertBefore(aNode, aNextNode); aContainer.insertBefore(aNode, aNextNode);
@@ -4592,7 +4593,7 @@ var CustomizableUIInternal = { @@ -4562,7 +4560,7 @@ var CustomizableUIInternal = {
* For all registered areas, builds those areas to reflect the current * For all registered areas, builds those areas to reflect the current
* placement state of all widgets. * placement state of all widgets.
*/ */
@@ -135,7 +136,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
for (let [areaId, areaNodes] of gBuildAreas) { for (let [areaId, areaNodes] of gBuildAreas) {
let placements = gPlacements.get(areaId); let placements = gPlacements.get(areaId);
let isFirstChangedToolbar = true; let isFirstChangedToolbar = true;
@@ -4603,7 +4604,7 @@ var CustomizableUIInternal = { @@ -4573,7 +4571,7 @@ var CustomizableUIInternal = {
if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) { if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
let defaultCollapsed = area.get("defaultCollapsed"); let defaultCollapsed = area.get("defaultCollapsed");
let win = areaNode.documentGlobal; let win = areaNode.documentGlobal;
@@ -144,7 +145,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
win.setToolbarVisibility( win.setToolbarVisibility(
areaNode, areaNode,
typeof defaultCollapsed == "string" typeof defaultCollapsed == "string"
@@ -5899,6 +5900,7 @@ export var CustomizableUI = { @@ -5864,6 +5862,7 @@ export var CustomizableUI = {
unregisterArea(aName, aDestroyPlacements) { unregisterArea(aName, aDestroyPlacements) {
CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements); CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);
}, },
@@ -152,7 +153,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
/** /**
* Add a widget to an area. * Add a widget to an area.
* If the area to which you try to add is not known to CustomizableUI, * If the area to which you try to add is not known to CustomizableUI,
@@ -7869,7 +7871,9 @@ class OverflowableToolbar { @@ -7827,7 +7826,9 @@ class OverflowableToolbar {
); );
if (webExtList && CustomizableUI.isWebExtensionWidget(child.id)) { if (webExtList && CustomizableUI.isWebExtensionWidget(child.id)) {
@@ -162,7 +163,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
webExtList.insertBefore(child, webExtList.firstElementChild); webExtList.insertBefore(child, webExtList.firstElementChild);
} else { } else {
child.setAttribute("cui-anchorid", this.#defaultListButton.id); child.setAttribute("cui-anchorid", this.#defaultListButton.id);
@@ -7929,7 +7933,7 @@ class OverflowableToolbar { @@ -7887,7 +7888,7 @@ class OverflowableToolbar {
) { ) {
continue; continue;
} }
@@ -171,7 +172,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
if (child != aExceptChild) { if (child != aExceptChild) {
sum += getInlineSize(child); sum += getInlineSize(child);
} }
@@ -7953,11 +7957,11 @@ class OverflowableToolbar { @@ -7911,11 +7912,11 @@ class OverflowableToolbar {
parseFloat(style.paddingLeft) - parseFloat(style.paddingLeft) -
parseFloat(style.paddingRight) - parseFloat(style.paddingRight) -
toolbarChildrenWidth; toolbarChildrenWidth;
@@ -185,7 +186,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
}); });
lazy.log.debug( lazy.log.debug(
@@ -7972,7 +7976,39 @@ class OverflowableToolbar { @@ -7930,7 +7931,39 @@ class OverflowableToolbar {
Math.max(targetWidth, targetChildrenWidth) Math.max(targetWidth, targetChildrenWidth)
); );
totalAvailWidth = Math.ceil(totalAvailWidth); totalAvailWidth = Math.ceil(totalAvailWidth);
@@ -226,7 +227,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
return { isOverflowing, targetContentWidth, totalAvailWidth }; return { isOverflowing, targetContentWidth, totalAvailWidth };
} }
@@ -8033,7 +8069,11 @@ class OverflowableToolbar { @@ -7991,7 +8024,11 @@ class OverflowableToolbar {
return; return;
} }
} }
@@ -239,7 +240,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
lazy.log.debug( lazy.log.debug(
`Need ${minSize} but width is ${totalAvailWidth} so bailing` `Need ${minSize} but width is ${totalAvailWidth} so bailing`
); );
@@ -8066,7 +8106,7 @@ class OverflowableToolbar { @@ -8024,7 +8061,7 @@ class OverflowableToolbar {
} }
} }
if (!inserted) { if (!inserted) {
@@ -248,7 +249,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
} }
child.removeAttribute("cui-anchorid"); child.removeAttribute("cui-anchorid");
child.removeAttribute("overflowedItem"); child.removeAttribute("overflowedItem");
@@ -8192,6 +8232,9 @@ class OverflowableToolbar { @@ -8150,6 +8187,9 @@ class OverflowableToolbar {
* if no such list exists. * if no such list exists.
*/ */
get #webExtList() { get #webExtList() {
@@ -258,7 +259,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
if (!this.#webExtListRef) { if (!this.#webExtListRef) {
let targetID = this.#toolbar.getAttribute("addon-webext-overflowtarget"); let targetID = this.#toolbar.getAttribute("addon-webext-overflowtarget");
if (!targetID) { if (!targetID) {
@@ -8203,6 +8246,9 @@ class OverflowableToolbar { @@ -8161,6 +8201,9 @@ class OverflowableToolbar {
let win = this.#toolbar.documentGlobal; let win = this.#toolbar.documentGlobal;
let { panel } = win.gUnifiedExtensions; let { panel } = win.gUnifiedExtensions;
this.#webExtListRef = panel.querySelector(`#${targetID}`); this.#webExtListRef = panel.querySelector(`#${targetID}`);
@@ -268,7 +269,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
} }
return this.#webExtListRef; return this.#webExtListRef;
} }
@@ -8411,7 +8457,7 @@ class OverflowableToolbar { @@ -8369,7 +8412,7 @@ class OverflowableToolbar {
break; break;
} }
case "mousedown": { case "mousedown": {

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/extensions/parent/ext-browser.js b/browser/components/extensions/parent/ext-browser.js diff --git a/browser/components/extensions/parent/ext-browser.js b/browser/components/extensions/parent/ext-browser.js
index 91adc6bc3649af47745818e6f9d00cbbdffc35a5..e221b077dbfbe20c8696732f003bd5809d761a02 100644 index aca5a23deda6b0f2316b0e108cff20ffd7feda67..a06c90937f97a4994b0807b54984089dbe627a71 100644
--- a/browser/components/extensions/parent/ext-browser.js --- a/browser/components/extensions/parent/ext-browser.js
+++ b/browser/components/extensions/parent/ext-browser.js +++ b/browser/components/extensions/parent/ext-browser.js
@@ -362,6 +362,7 @@ class TabTracker extends TabTrackerBase { @@ -352,6 +352,7 @@ class TabTracker extends TabTrackerBase {
} }
getId(nativeTab) { getId(nativeTab) {
@@ -10,15 +10,15 @@ index 91adc6bc3649af47745818e6f9d00cbbdffc35a5..e221b077dbfbe20c8696732f003bd580
let id = this._tabs.get(nativeTab); let id = this._tabs.get(nativeTab);
if (id) { if (id) {
return id; return id;
@@ -395,6 +396,7 @@ class TabTracker extends TabTrackerBase { @@ -386,6 +387,7 @@ class TabTracker extends TabTrackerBase {
if (nativeTab.documentGlobal.closed) { if (nativeTab.documentGlobal.closed) {
throw new Error("Cannot attach ID to a tab in a closed window."); throw new Error("Cannot attach ID to a tab in a closed window.");
} }
+ if (nativeTab.hasAttribute("zen-empty-tab")) return; + if (nativeTab.hasAttribute("zen-empty-tab")) return;
this._tabs.set(nativeTab, id); this._tabs.set(nativeTab, id);
this._tabIds.set(id, nativeTab); if (nativeTab.linkedBrowser) {
@@ -1262,6 +1264,10 @@ class TabManager extends TabManagerBase { @@ -1276,6 +1278,10 @@ class TabManager extends TabManagerBase {
} }
canAccessTab(nativeTab) { canAccessTab(nativeTab) {

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js
index f342748d4b680a5de3a8b7c90df79f7c380b9e1c..65091cf370e00a580ae2cb1fad9cde76f10c8bd9 100644 index 8f5fdecc9394d42a1460a1b73fb8c4e92f63c41e..82c03e234289c7b00f49f73854be45fb95fb91d7 100644
--- a/browser/components/extensions/parent/ext-tabs.js --- a/browser/components/extensions/parent/ext-tabs.js
+++ b/browser/components/extensions/parent/ext-tabs.js +++ b/browser/components/extensions/parent/ext-tabs.js
@@ -438,6 +438,7 @@ this.tabs = class extends ExtensionAPIPersistent { @@ -514,6 +514,7 @@ this.tabs = class extends ExtensionAPIPersistent {
} }
let tab = tabManager.getWrapper(updatedTab); let tab = tabManager.getWrapper(updatedTab);
@@ -10,11 +10,11 @@ index f342748d4b680a5de3a8b7c90df79f7c380b9e1c..65091cf370e00a580ae2cb1fad9cde76
let changeInfo = {}; let changeInfo = {};
for (let prop of needed) { for (let prop of needed) {
@@ -806,6 +807,7 @@ this.tabs = class extends ExtensionAPIPersistent { @@ -883,6 +884,7 @@ this.tabs = class extends ExtensionAPIPersistent {
}); });
} }
+ window.gZenCompactModeManager._nextTimeWillBeActive = active; + window.gZenCompactModeManager._nextTimeWillBeActive = active;
let nativeTab = window.gBrowser.addTab(url, options); let nativeTab = window.gBrowser.addTab(url, options);
tabTracker.addTabReadyBlocker(nativeTab);
if (active) {

View File

@@ -0,0 +1,13 @@
diff --git a/browser/components/nova/NovaPrefs.sys.mjs b/browser/components/nova/NovaPrefs.sys.mjs
index 3d22c881c481643fcffbc581523905a1847a7d41..453dd4d9c43d7483c037a993afbf2b854533497c 100644
--- a/browser/components/nova/NovaPrefs.sys.mjs
+++ b/browser/components/nova/NovaPrefs.sys.mjs
@@ -18,7 +18,7 @@ const PLATFORM_PREFS = (() => {
})();
function applyNovaPlatformDefaults() {
- const on = Services.prefs.getBoolPref("browser.nova.enabled", false);
+ const on = true;
const defaults = Services.prefs.getDefaultBranch("");
for (const pref of PLATFORM_PREFS) {
defaults.setBoolPref(pref, on);

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/places/PlacesUIUtils.sys.mjs b/browser/components/places/PlacesUIUtils.sys.mjs diff --git a/browser/components/places/PlacesUIUtils.sys.mjs b/browser/components/places/PlacesUIUtils.sys.mjs
index 7c11a2004c87aa6f0c61cf05ca522c7471c7be71..0f92f9925221cadbd258402f1b6a86a71fdb42e9 100644 index 7c2786cc1be512ddfc165fb8f6514131ac033040..5846aff53030ef0fad2f87d017ba3713889b474d 100644
--- a/browser/components/places/PlacesUIUtils.sys.mjs --- a/browser/components/places/PlacesUIUtils.sys.mjs
+++ b/browser/components/places/PlacesUIUtils.sys.mjs +++ b/browser/components/places/PlacesUIUtils.sys.mjs
@@ -61,6 +61,7 @@ class BookmarkState { @@ -61,6 +61,7 @@ class BookmarkState {
@@ -157,3 +157,12 @@ index 7c11a2004c87aa6f0c61cf05ca522c7471c7be71..0f92f9925221cadbd258402f1b6a86a7
/** /**
* Append transactions to update tags by given information. * Append transactions to update tags by given information.
* *
@@ -915,7 +1024,7 @@ export var PlacesUIUtils = {
aNode,
aWhere,
aWindow,
- { aPrivate = false, userContextId = 0 } = {}
+ { aPrivate = false, userContextId = undefined } = {}
) {
if (
aNode &&

View File

@@ -1,10 +1,10 @@
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
index 88675d1bcbf000b10d85a9c0980bc6069d88052c..ed3a1e809eb0fcccc5a957be7affb77be8978e32 100644 index c86e54bb6f5e00d9d7bdd81154857a5be97f909c..4035f6a667a361ad106e816a172342724a770435 100644
--- a/browser/components/preferences/main.js --- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js +++ b/browser/components/preferences/main.js
@@ -528,6 +528,11 @@ function createStartupConfig(hidden = false) { @@ -643,6 +643,11 @@ function createStartupConfig(hidden = false) {
}, id: "browserRestoreSession",
], l10nId: "startup-restore-windows-and-tabs",
}, },
+ { + {
+ id: "zenWorkspaceContinueWhereLeftOff", + id: "zenWorkspaceContinueWhereLeftOff",
@@ -14,16 +14,16 @@ index 88675d1bcbf000b10d85a9c0980bc6069d88052c..ed3a1e809eb0fcccc5a957be7affb77b
{ {
id: "windowsLaunchOnLogin", id: "windowsLaunchOnLogin",
l10nId: "windows-launch-on-login", l10nId: "windows-launch-on-login",
@@ -575,7 +580,7 @@ function createStartupConfig(hidden = false) { @@ -690,7 +695,7 @@ function createStartupConfig(hidden = false) {
SettingGroupManager.registerGroups({ SettingGroupManager.registerGroups({
defaultBrowser: createDefaultBrowserConfig(), defaultBrowser: createDefaultBrowserConfig(),
startup: createStartupConfig( startup: createStartupConfig(
- Services.prefs.getBoolPref("browser.settings-redesign.enabled", false) - Services.prefs.getBoolPref("browser-settings-redesign.enabled", false)
+ false + false
), ),
}); });
@@ -628,7 +633,7 @@ function getBundleForLocales(newLocales) { @@ -743,7 +748,7 @@ function getBundleForLocales(newLocales) {
]) ])
); );
return new Localization( return new Localization(

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a9c5bb3f8 100644 index 57add34d876fb885275f1147209c6fbeee367a7c..be0ab43b299317c0022a5e719f47a070c1574714 100644
--- a/browser/components/preferences/preferences.js --- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js +++ b/browser/components/preferences/preferences.js
@@ -131,6 +131,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () { @@ -132,6 +132,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
styleSheets: [ styleSheets: [
"chrome://browser/skin/preferences/dialog.css", "chrome://browser/skin/preferences/dialog.css",
"chrome://browser/skin/preferences/preferences.css", "chrome://browser/skin/preferences/preferences.css",
@@ -19,7 +19,7 @@ index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a
"browserLayout", "browserLayout",
"tabs", "tabs",
"pageNavigation", "pageNavigation",
@@ -483,7 +486,7 @@ function register_module(categoryName, categoryObject) { @@ -477,7 +480,7 @@ function register_module(categoryName, categoryObject) {
} }
this._initted = true; this._initted = true;
let template = document.getElementById("template-" + categoryName); let template = document.getElementById("template-" + categoryName);
@@ -28,10 +28,10 @@ index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a
// Replace the template element with the nodes inside of it. // Replace the template element with the nodes inside of it.
template.replaceWith(template.content); template.replaceWith(template.content);
@@ -527,6 +530,10 @@ function init_all() { @@ -522,6 +525,10 @@ function init_all() {
register_module("paneHome", gHomePane);
register_module("paneSearch", gSearchPane); register_module("paneSearch", gSearchPane);
register_module("panePrivacy", gPrivacyPane); register_module("panePrivacy", gPrivacyPane);
register_module("paneContainers", gContainersPane);
+ register_module("paneZenLooks", gZenLooksAndFeel); + register_module("paneZenLooks", gZenLooksAndFeel);
+ register_module("paneZenTabManagement", gZenWorkspacesSettings); + register_module("paneZenTabManagement", gZenWorkspacesSettings);
+ register_module("paneZenCKS", gZenCKSSettings); + register_module("paneZenCKS", gZenCKSSettings);
@@ -39,7 +39,7 @@ index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a
// Restore the cached Firefox Labs nav button visibility so it shows // Restore the cached Firefox Labs nav button visibility so it shows
// immediately when recipes are expected to be available, before // immediately when recipes are expected to be available, before
@@ -656,9 +663,9 @@ async function gotoPref( @@ -651,9 +658,9 @@ async function gotoPref(
let redesignEnabled = srdSectionPrefs.all; let redesignEnabled = srdSectionPrefs.all;
let categories = document.getElementById("categories"); let categories = document.getElementById("categories");
const kDefaultCategoryInternalName = redesignEnabled const kDefaultCategoryInternalName = redesignEnabled

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
index 1b8c38159314b6edee9e6f455beb2b63db1ad3f0..1308345db640dba6b2848b49ef7c11819f9f5727 100644 index 9760a4a35b0b3bd21edec07a70c10bccc23e4a09..9f22146c259ea5b45005be660bfcb9ea2c1297ee 100644
--- a/browser/components/preferences/preferences.xhtml --- a/browser/components/preferences/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml +++ b/browser/components/preferences/preferences.xhtml
@@ -39,6 +39,8 @@ @@ -42,6 +42,8 @@
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-pane.css" /> <link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-pane.css" />
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-control.css" /> <link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-control.css" />
@@ -11,7 +11,7 @@ index 1b8c38159314b6edee9e6f455beb2b63db1ad3f0..1308345db640dba6b2848b49ef7c1181
<link rel="localization" href="branding/brand.ftl"/> <link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/browser.ftl"/> <link rel="localization" href="browser/browser.ftl"/>
<!-- Used by fontbuilder.js --> <!-- Used by fontbuilder.js -->
@@ -118,6 +120,26 @@ @@ -121,6 +123,26 @@
iconsrc="chrome://browser/skin/preferences/category-general.svg" iconsrc="chrome://browser/skin/preferences/category-general.svg"
data-l10n-id="pane-general-title"> data-l10n-id="pane-general-title">
</html:moz-page-nav-button> </html:moz-page-nav-button>
@@ -38,8 +38,8 @@ index 1b8c38159314b6edee9e6f455beb2b63db1ad3f0..1308345db640dba6b2848b49ef7c1181
<html:moz-page-nav-button id="category-sync" <html:moz-page-nav-button id="category-sync"
hidden="true" hidden="true"
view="paneSync" view="paneSync"
@@ -248,6 +270,10 @@ @@ -253,6 +275,10 @@
#include privacy.inc.xhtml #include containers.inc.xhtml
#include sync.inc.xhtml #include sync.inc.xhtml
#include moreFromMozilla.inc.xhtml #include moreFromMozilla.inc.xhtml
+#include zenLooksAndFeel.inc.xhtml +#include zenLooksAndFeel.inc.xhtml

View File

@@ -803,7 +803,6 @@ const zenMissingKeyboardShortcutL10n = {
key_inspectorMac: "zen-key-inspector-mac", key_inspectorMac: "zen-key-inspector-mac",
key_findSelection: "zen-key-find-selection", key_findSelection: "zen-key-find-selection",
key_findPrevious2: "zen-search-find-again-shortcut-prev-alt",
// Devtools // Devtools
key_toggleToolbox: "zen-devtools-toggle-shortcut", key_toggleToolbox: "zen-devtools-toggle-shortcut",
@@ -827,9 +826,6 @@ var zenIgnoreKeyboardShortcutIDs = [
"key_exitFullScreen_old", "key_exitFullScreen_old",
"key_exitFullScreen_compat", "key_exitFullScreen_compat",
"key_duplicateTab", "key_duplicateTab",
"key_addTabSplitView",
"key_separateTabSplitView",
"viewOpenTabsSidebarKb",
]; ];
var zenIgnoreKeyboardShortcutL10n = [ var zenIgnoreKeyboardShortcutL10n = [
@@ -1184,11 +1180,6 @@ Preferences.addAll([
type: "bool", type: "bool",
default: true, default: true,
}, },
{
id: "zen.view.drag-window-from-content",
type: "bool",
default: true,
},
{ {
id: "zen.urlbar.behavior", id: "zen.urlbar.behavior",
type: "string", type: "string",

View File

@@ -61,15 +61,6 @@
data-l10n-id="zen-look-and-feel-compact-toolbar-flash-popup" data-l10n-id="zen-look-and-feel-compact-toolbar-flash-popup"
preference="zen.view.compact.toolbar-flash-popup"/> preference="zen.view.compact.toolbar-flash-popup"/>
</vbox> </vbox>
<label><html:h2 data-l10n-id="zen-look-and-feel-window-drag-header"/></label>
<description class="description-deemphasized" data-l10n-id="zen-look-and-feel-window-drag-description" />
<vbox class="indent">
<checkbox id="zenLooksAndFeelWindowDragEnabled"
data-l10n-id="zen-window-drag-enabled"
preference="zen.view.drag-window-from-content"/>
</vbox>
</groupbox> </groupbox>
<hbox id="zenGlanceCategory" <hbox id="zenGlanceCategory"

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee4aa3be28 100644 index 183543c5f29ff4c879d3058e4c09faf376a69cb7..ab482c32cc697ccef82bf0aeaa0e3a1db40aecce 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs --- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs +++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -129,6 +129,9 @@ const TAB_EVENTS = [ @@ -129,6 +129,9 @@ const TAB_EVENTS = [
@@ -12,7 +12,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
]; ];
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@@ -201,6 +204,8 @@ ChromeUtils.defineESModuleGetters(lazy, { @@ -199,6 +202,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs", TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs",
TabStateFlusher: "resource:///modules/sessionstore/TabStateFlusher.sys.mjs", TabStateFlusher: "resource:///modules/sessionstore/TabStateFlusher.sys.mjs",
setTimeout: "resource://gre/modules/Timer.sys.mjs", setTimeout: "resource://gre/modules/Timer.sys.mjs",
@@ -21,7 +21,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
}); });
ChromeUtils.defineLazyGetter(lazy, "blankURI", () => { ChromeUtils.defineLazyGetter(lazy, "blankURI", () => {
@@ -1300,10 +1305,7 @@ var SessionStoreInternal = { @@ -1287,10 +1292,7 @@ var SessionStoreInternal = {
*/ */
get willAutoRestore() { get willAutoRestore() {
return ( return (
@@ -33,7 +33,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
); );
}, },
@@ -1990,6 +1992,9 @@ var SessionStoreInternal = { @@ -1965,6 +1967,9 @@ var SessionStoreInternal = {
case "TabPinned": case "TabPinned":
case "TabUnpinned": case "TabUnpinned":
case "SwapDocShells": case "SwapDocShells":
@@ -43,7 +43,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
this.saveStateDelayed(win); this.saveStateDelayed(win);
break; break;
case "TabGroupCreate": case "TabGroupCreate":
@@ -2099,6 +2104,10 @@ var SessionStoreInternal = { @@ -2074,6 +2079,10 @@ var SessionStoreInternal = {
this._windows[aWindow.__SSi].isTaskbarTab = true; this._windows[aWindow.__SSi].isTaskbarTab = true;
} }
@@ -54,7 +54,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
if (lazy.AIWindow.isAIWindowActiveAndEnabled(aWindow)) { if (lazy.AIWindow.isAIWindowActiveAndEnabled(aWindow)) {
this._windows[aWindow.__SSi].isAIWindow = true; this._windows[aWindow.__SSi].isAIWindow = true;
} }
@@ -2135,7 +2144,7 @@ var SessionStoreInternal = { @@ -2110,7 +2119,7 @@ var SessionStoreInternal = {
let isTaskbarTab = this._windows[aWindow.__SSi].isTaskbarTab; let isTaskbarTab = this._windows[aWindow.__SSi].isTaskbarTab;
// A regular window is not a private window, taskbar tab window, or popup window // A regular window is not a private window, taskbar tab window, or popup window
let isRegularWindow = let isRegularWindow =
@@ -63,7 +63,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// perform additional initialization when the first window is loading // perform additional initialization when the first window is loading
if (lazy.RunState.isStopped) { if (lazy.RunState.isStopped) {
@@ -2147,7 +2156,7 @@ var SessionStoreInternal = { @@ -2122,7 +2131,7 @@ var SessionStoreInternal = {
// to disk to NOW() to enforce a full interval before the next write. // to disk to NOW() to enforce a full interval before the next write.
lazy.SessionSaver.updateLastSaveTime(); lazy.SessionSaver.updateLastSaveTime();
@@ -72,7 +72,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
this._log.debug( this._log.debug(
"initializeWindow, the window is private or a web app. Saving SessionStartup.state for possibly restoring later" "initializeWindow, the window is private or a web app. Saving SessionStartup.state for possibly restoring later"
); );
@@ -2191,6 +2200,7 @@ var SessionStoreInternal = { @@ -2164,6 +2173,7 @@ var SessionStoreInternal = {
null, null,
"sessionstore-one-or-no-tab-restored" "sessionstore-one-or-no-tab-restored"
); );
@@ -80,7 +80,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
this._deferredAllWindowsRestored.resolve(); this._deferredAllWindowsRestored.resolve();
} }
// this window was opened by _openWindowWithState // this window was opened by _openWindowWithState
@@ -2240,7 +2250,6 @@ var SessionStoreInternal = { @@ -2213,7 +2223,6 @@ var SessionStoreInternal = {
if (closedWindowState) { if (closedWindowState) {
let newWindowState; let newWindowState;
if ( if (
@@ -88,7 +88,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
!lazy.SessionStartup.willRestore() !lazy.SessionStartup.willRestore()
) { ) {
// We want to split the window up into pinned tabs and unpinned tabs. // We want to split the window up into pinned tabs and unpinned tabs.
@@ -2276,6 +2285,7 @@ var SessionStoreInternal = { @@ -2249,6 +2258,7 @@ var SessionStoreInternal = {
} }
if (newWindowState) { if (newWindowState) {
@@ -96,17 +96,23 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// Ensure that the window state isn't hidden // Ensure that the window state isn't hidden
this._restoreCount = 1; this._restoreCount = 1;
let state = { windows: [newWindowState] }; let state = { windows: [newWindowState] };
@@ -2312,6 +2322,9 @@ var SessionStoreInternal = { @@ -2277,6 +2287,15 @@ var SessionStoreInternal = {
}); });
this._shouldRestoreLastSession = false; this._shouldRestoreLastSession = false;
} }
+ else if (!aInitialState && isRegularWindow) { + else if (!aInitialState && isRegularWindow) {
+ lazy.ZenSessionStore.restoreNewWindow(aWindow, this); + let windowPromises = [];
+ for (let window of this._browserWindows) {
+ windowPromises.push(lazy.TabStateFlusher.flushWindow(window));
+ }
+ Promise.all(windowPromises).finally(() => {
+ lazy.ZenSessionStore.restoreNewWindow(aWindow, this);
+ });
+ } + }
if (this._restoreLastWindow && aWindow.toolbar.visible) { if (this._restoreLastWindow && aWindow.toolbar.visible) {
// always reset (if not a popup window) // always reset (if not a popup window)
@@ -2462,7 +2475,7 @@ var SessionStoreInternal = { @@ -2427,7 +2446,7 @@ var SessionStoreInternal = {
var tabbrowser = aWindow.gBrowser; var tabbrowser = aWindow.gBrowser;
@@ -115,7 +121,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
TAB_EVENTS.forEach(function (aEvent) { TAB_EVENTS.forEach(function (aEvent) {
tabbrowser.tabContainer.removeEventListener(aEvent, this, true); tabbrowser.tabContainer.removeEventListener(aEvent, this, true);
@@ -2513,7 +2526,7 @@ var SessionStoreInternal = { @@ -2478,7 +2497,7 @@ var SessionStoreInternal = {
let isLastRegularWindow = let isLastRegularWindow =
Object.values(this._windows).filter( Object.values(this._windows).filter(
@@ -124,7 +130,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
).length == 1; ).length == 1;
this._log.debug( this._log.debug(
`onClose, closing window isLastRegularWindow? ${isLastRegularWindow}` `onClose, closing window isLastRegularWindow? ${isLastRegularWindow}`
@@ -2570,8 +2583,8 @@ var SessionStoreInternal = { @@ -2535,8 +2554,8 @@ var SessionStoreInternal = {
// 2) Flush the window. // 2) Flush the window.
// 3) When the flush is complete, revisit our decision to store the window // 3) When the flush is complete, revisit our decision to store the window
// in _closedWindows, and add/remove as necessary. // in _closedWindows, and add/remove as necessary.
@@ -135,7 +141,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
} }
completionPromise = lazy.TabStateFlusher.flushWindow(aWindow).then(() => { completionPromise = lazy.TabStateFlusher.flushWindow(aWindow).then(() => {
@@ -2591,8 +2604,9 @@ var SessionStoreInternal = { @@ -2556,8 +2575,9 @@ var SessionStoreInternal = {
// Save non-private windows if they have at // Save non-private windows if they have at
// least one saveable tab or are the last window. // least one saveable tab or are the last window.
@@ -147,7 +153,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
if (!isLastWindow && winData.closedId > -1) { if (!isLastWindow && winData.closedId > -1) {
this._addClosedAction( this._addClosedAction(
@@ -2668,7 +2682,7 @@ var SessionStoreInternal = { @@ -2633,7 +2653,7 @@ var SessionStoreInternal = {
* to call this method again asynchronously (for example, after * to call this method again asynchronously (for example, after
* a window flush). * a window flush).
*/ */
@@ -156,7 +162,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// Make sure SessionStore is still running, and make sure that we // Make sure SessionStore is still running, and make sure that we
// haven't chosen to forget this window. // haven't chosen to forget this window.
if ( if (
@@ -2685,6 +2699,7 @@ var SessionStoreInternal = { @@ -2650,6 +2670,7 @@ var SessionStoreInternal = {
// _closedWindows from a previous call to this function. // _closedWindows from a previous call to this function.
let winIndex = this._closedWindows.indexOf(winData); let winIndex = this._closedWindows.indexOf(winData);
let alreadyStored = winIndex != -1; let alreadyStored = winIndex != -1;
@@ -164,7 +170,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// If sidebar command is truthy, i.e. sidebar is open, store sidebar settings // If sidebar command is truthy, i.e. sidebar is open, store sidebar settings
let shouldStore = hasSaveableTabs || isLastWindow; let shouldStore = hasSaveableTabs || isLastWindow;
@@ -3507,7 +3522,7 @@ var SessionStoreInternal = { @@ -3467,7 +3488,7 @@ var SessionStoreInternal = {
if (!isPrivateWindow && tabState.isPrivate) { if (!isPrivateWindow && tabState.isPrivate) {
return; return;
} }
@@ -173,7 +179,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
return; return;
} }
@@ -4246,6 +4261,12 @@ var SessionStoreInternal = { @@ -4206,6 +4227,12 @@ var SessionStoreInternal = {
Math.min(tabState.index, tabState.entries.length) Math.min(tabState.index, tabState.entries.length)
); );
tabState.pinned = false; tabState.pinned = false;
@@ -186,7 +192,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
if (inBackground === false) { if (inBackground === false) {
aWindow.gBrowser.selectedTab = newTab; aWindow.gBrowser.selectedTab = newTab;
@@ -4679,6 +4700,8 @@ var SessionStoreInternal = { @@ -4642,6 +4669,8 @@ var SessionStoreInternal = {
// Append the tab if we're opening into a different window, // Append the tab if we're opening into a different window,
tabIndex: aSource == aTargetWindow ? pos : Infinity, tabIndex: aSource == aTargetWindow ? pos : Infinity,
pinned: state.pinned, pinned: state.pinned,
@@ -195,7 +201,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
userContextId: state.userContextId, userContextId: state.userContextId,
skipLoad: true, skipLoad: true,
preferredRemoteType, preferredRemoteType,
@@ -5176,9 +5199,10 @@ var SessionStoreInternal = { @@ -5146,9 +5175,10 @@ var SessionStoreInternal = {
if (activePageData.title && activePageData.title != activePageData.url) { if (activePageData.title && activePageData.title != activePageData.url) {
win.gBrowser.setInitialTabTitle(tab, activePageData.title, { win.gBrowser.setInitialTabTitle(tab, activePageData.title, {
isContentTitle: true, isContentTitle: true,
@@ -207,7 +213,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
} }
} }
@@ -5543,7 +5567,7 @@ var SessionStoreInternal = { @@ -5513,7 +5543,7 @@ var SessionStoreInternal = {
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) { for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
let tab = tabbrowser.tabs[i]; let tab = tabbrowser.tabs[i];
@@ -216,7 +222,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
removableTabs.push(tab); removableTabs.push(tab);
} }
} }
@@ -5656,7 +5680,7 @@ var SessionStoreInternal = { @@ -5626,7 +5656,7 @@ var SessionStoreInternal = {
// collect the data for all windows // collect the data for all windows
for (ix in this._windows) { for (ix in this._windows) {
@@ -225,7 +231,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// window data is still in _statesToRestore // window data is still in _statesToRestore
continue; continue;
} }
@@ -5800,11 +5824,12 @@ var SessionStoreInternal = { @@ -5770,11 +5800,12 @@ var SessionStoreInternal = {
} }
let tabbrowser = aWindow.gBrowser; let tabbrowser = aWindow.gBrowser;
@@ -239,7 +245,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// update the internal state data for this window // update the internal state data for this window
for (let tab of tabs) { for (let tab of tabs) {
if (tab == aWindow.FirefoxViewHandler.tab) { if (tab == aWindow.FirefoxViewHandler.tab) {
@@ -5815,6 +5840,9 @@ var SessionStoreInternal = { @@ -5785,6 +5816,9 @@ var SessionStoreInternal = {
tabsData.push(tabData); tabsData.push(tabData);
} }
@@ -249,7 +255,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// update tab group state for this window // update tab group state for this window
winData.groups = []; winData.groups = [];
for (let tabGroup of aWindow.gBrowser.tabGroups) { for (let tabGroup of aWindow.gBrowser.tabGroups) {
@@ -5831,7 +5859,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, // a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
// since it's only inserted into the tab strip after it's selected). // since it's only inserted into the tab strip after it's selected).
if (aWindow.FirefoxViewHandler.tab?.selected) { if (aWindow.FirefoxViewHandler.tab?.selected) {
@@ -258,7 +264,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
winData.title = tabbrowser.tabs[0].label; winData.title = tabbrowser.tabs[0].label;
} }
winData.selected = selectedIndex; winData.selected = selectedIndex;
@@ -6033,8 +6061,8 @@ var SessionStoreInternal = { @@ -6003,8 +6037,8 @@ var SessionStoreInternal = {
// selectTab represents. // selectTab represents.
let selectTab = 0; let selectTab = 0;
if (overwriteTabs) { if (overwriteTabs) {
@@ -269,7 +275,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
selectTab = Math.min(selectTab, winData.tabs.length); selectTab = Math.min(selectTab, winData.tabs.length);
} }
@@ -6056,6 +6084,7 @@ var SessionStoreInternal = { @@ -6026,6 +6060,7 @@ var SessionStoreInternal = {
if (overwriteTabs) { if (overwriteTabs) {
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) { for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
if (!tabbrowser.tabs[i].selected) { if (!tabbrowser.tabs[i].selected) {
@@ -277,7 +283,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
tabbrowser.removeTab(tabbrowser.tabs[i]); tabbrowser.removeTab(tabbrowser.tabs[i]);
} }
} }
@@ -6090,6 +6119,12 @@ var SessionStoreInternal = { @@ -6060,6 +6095,12 @@ var SessionStoreInternal = {
savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id) savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id)
); );
} }
@@ -290,7 +296,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// Move the originally open tabs to the end. // Move the originally open tabs to the end.
if (initialTabs) { if (initialTabs) {
@@ -6656,6 +6691,25 @@ var SessionStoreInternal = { @@ -6626,6 +6667,25 @@ var SessionStoreInternal = {
// Most of tabData has been restored, now continue with restoring // Most of tabData has been restored, now continue with restoring
// attributes that may trigger external events. // attributes that may trigger external events.
@@ -316,7 +322,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
if (tabData.pinned) { if (tabData.pinned) {
tabbrowser.pinTab(tab); tabbrowser.pinTab(tab);
@@ -6838,6 +6892,9 @@ var SessionStoreInternal = { @@ -6793,6 +6853,9 @@ var SessionStoreInternal = {
aWindow.gURLBar.readOnly = false; aWindow.gURLBar.readOnly = false;
} }
} }
@@ -326,7 +332,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
let promiseParts = Promise.withResolvers(); let promiseParts = Promise.withResolvers();
aWindow.setTimeout(() => { aWindow.setTimeout(() => {
@@ -7633,7 +7690,7 @@ var SessionStoreInternal = { @@ -7588,7 +7651,7 @@ var SessionStoreInternal = {
let groupsToSave = new Map(); let groupsToSave = new Map();
for (let tIndex = 0; tIndex < window.tabs.length; ) { for (let tIndex = 0; tIndex < window.tabs.length; ) {
@@ -335,7 +341,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// Adjust window.selected // Adjust window.selected
if (tIndex + 1 < window.selected) { if (tIndex + 1 < window.selected) {
window.selected -= 1; window.selected -= 1;
@@ -7648,7 +7705,7 @@ var SessionStoreInternal = { @@ -7603,7 +7666,7 @@ var SessionStoreInternal = {
); );
// We don't want to increment tIndex here. // We don't want to increment tIndex here.
continue; continue;
@@ -344,7 +350,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
// Convert any open groups into saved groups. // Convert any open groups into saved groups.
let groupStateToSave = window.groups.find( let groupStateToSave = window.groups.find(
groupState => groupState.id == window.tabs[tIndex].groupId groupState => groupState.id == window.tabs[tIndex].groupId
@@ -8193,7 +8250,6 @@ var SessionStoreInternal = { @@ -8062,7 +8125,6 @@ var SessionStoreInternal = {
timer.initWithCallback( timer.initWithCallback(
function () { function () {
if (beats <= 0) { if (beats <= 0) {
@@ -352,7 +358,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
Glean.sessionRestore.shutdownFlushAllOutcomes.timed_out.add(1); Glean.sessionRestore.shutdownFlushAllOutcomes.timed_out.add(1);
deferred.resolve(); deferred.resolve();
} }
@@ -8671,6 +8727,7 @@ var SessionStoreInternal = { @@ -8540,6 +8602,7 @@ var SessionStoreInternal = {
if ( if (
!savedTabGroupState.tabs.length || !savedTabGroupState.tabs.length ||
this.getSavedTabGroup(savedTabGroupState.id) this.getSavedTabGroup(savedTabGroupState.id)

View File

@@ -1,16 +1,8 @@
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
index a33deeb5b587d6a950960a1a4781176e4e730ad7..e96cfb9a5ffbe4feccdffa8b6d18ececb48d4c52 100644 index 4ba4dda363b602cb6f4445ef056f2f9abb1b0e1e..6b4b407e05e26faca69d9d7ac6f31510620898fe 100644
--- a/browser/components/sessionstore/TabState.sys.mjs --- a/browser/components/sessionstore/TabState.sys.mjs
+++ b/browser/components/sessionstore/TabState.sys.mjs +++ b/browser/components/sessionstore/TabState.sys.mjs
@@ -8,6 +8,7 @@ ChromeUtils.defineESModuleGetters(lazy, { @@ -99,10 +99,28 @@ class _TabState {
PrivacyFilter: "resource://gre/modules/sessionstore/PrivacyFilter.sys.mjs",
TabAttributes: "resource:///modules/sessionstore/TabAttributes.sys.mjs",
TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs",
+ UrlbarShared: "chrome://browser/content/urlbar/UrlbarShared.mjs",
sessionStoreLogger: "resource:///modules/sessionstore/SessionLogger.sys.mjs",
});
@@ -103,10 +104,28 @@ class _TabState {
} }
} }
@@ -33,7 +25,7 @@ index a33deeb5b587d6a950960a1a4781176e4e730ad7..e96cfb9a5ffbe4feccdffa8b6d18ecec
browser, browser,
true true
); );
+ if (tabData.searchMode?.source === lazy.UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS) { + if (tabData.searchMode?.source === tab.documentGlobal.UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS) {
+ delete tabData.searchMode; + delete tabData.searchMode;
+ } + }

View File

@@ -1,21 +0,0 @@
diff --git a/browser/components/tabbrowser/content/tab-context-menu.js b/browser/components/tabbrowser/content/tab-context-menu.js
index 4a7cb33a4d9067d469bbe09d4cd8844581642f7a..d7f75471a207cccac6ca3dec49037ac30dd76163 100644
--- a/browser/components/tabbrowser/content/tab-context-menu.js
+++ b/browser/components/tabbrowser/content/tab-context-menu.js
@@ -839,13 +839,15 @@ var TabContextMenu = {
);
contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !this.multiselected;
-
+ gZenViewSplitter.updateContextMenuItems();
+ gZenPinnedTabManager.updatePinnedTabContextMenu(this.contextTab);
// Build Ask Chat items. The classic layout shows the full ask-chat submenu
// (#context_askChat); the alt layout shows only a flat "Summarize Page" item
// (#context_askChatSummarize). Hide whichever one this layout doesn't use so
// a pref toggle reverses cleanly.
if (!this._altTabContextMenu) {
document.getElementById("context_askChatSummarize").hidden = true;
+ document.getElementById("context_aiSeparator").hidden = true;
TabContextMenu.GenAI.buildTabMenu(
document.getElementById("context_askChat"),
this

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8c579171b 100644 index 8f2ebf3a0bd4e2af01cf41024b16bd491e8ed961..27721e26c3cd8cb066b462dedfa4ce785ca5c2c3 100644
--- a/browser/components/tabbrowser/content/tab.js --- a/browser/components/tabbrowser/content/tab.js
+++ b/browser/components/tabbrowser/content/tab.js +++ b/browser/components/tabbrowser/content/tab.js
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
@@ -52,7 +52,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
return; return;
} }
@@ -216,11 +219,25 @@ @@ -220,11 +223,25 @@
} }
get visible() { get visible() {
@@ -83,7 +83,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
} }
get hidden() { get hidden() {
@@ -299,7 +316,7 @@ @@ -303,7 +320,7 @@
return false; return false;
} }
@@ -92,7 +92,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
} }
get lastAccessed() { get lastAccessed() {
@@ -384,7 +401,18 @@ @@ -388,7 +405,18 @@
} }
get group() { get group() {
@@ -112,7 +112,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
} }
get splitview() { get splitview() {
@@ -466,6 +494,10 @@ @@ -470,6 +498,10 @@
} }
} }
@@ -123,7 +123,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
// If the previous target wasn't part of this tab then this is a mouseenter event. // If the previous target wasn't part of this tab then this is a mouseenter event.
if (!this.contains(event.relatedTarget)) { if (!this.contains(event.relatedTarget)) {
this._mouseenter(); this._mouseenter();
@@ -495,6 +527,7 @@ @@ -499,6 +531,7 @@
if (!this.contains(event.relatedTarget)) { if (!this.contains(event.relatedTarget)) {
this._mouseleave(); this._mouseleave();
} }
@@ -131,15 +131,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
} }
on_dragstart(event) { on_dragstart(event) {
@@ -506,6 +539,7 @@ @@ -533,6 +566,8 @@
if (event.eventPhase == Event.CAPTURING_PHASE) {
this.style.MozUserFocus = "";
} else if (
+ event.target.classList?.contains("tab-reset-button") ||
event.target.classList?.contains("tab-close-button") ||
gSharedTabWarning.willShowSharedTabWarning(this)
) {
@@ -529,6 +563,8 @@
this.style.MozUserFocus = "ignore"; this.style.MozUserFocus = "ignore";
} else if ( } else if (
event.target.classList.contains("tab-close-button") || event.target.classList.contains("tab-close-button") ||
@@ -148,7 +140,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
event.target.classList.contains("tab-icon-overlay") || event.target.classList.contains("tab-icon-overlay") ||
event.target.classList.contains("tab-audio-button") event.target.classList.contains("tab-audio-button")
) { ) {
@@ -563,7 +599,7 @@ @@ -567,7 +602,7 @@
} }
} else if ( } else if (
event.altKey && event.altKey &&
@@ -157,7 +149,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
) { ) {
eventMaySelectTab = false; eventMaySelectTab = false;
} else if (!this.selected && this.multiselected) { } else if (!this.selected && this.multiselected) {
@@ -600,6 +636,10 @@ @@ -592,6 +627,10 @@
this.style.MozUserFocus = ""; this.style.MozUserFocus = "";
} }
@@ -168,7 +160,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
on_click(event) { on_click(event) {
if (event.button != 0) { if (event.button != 0) {
return; return;
@@ -623,14 +663,31 @@ @@ -615,14 +654,31 @@
trigger: "alt_click", trigger: "alt_click",
}); });
} }
@@ -201,7 +193,7 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
gBrowser.multiSelectedTabsCount > 0 && gBrowser.multiSelectedTabsCount > 0 &&
!event.target.classList.contains("tab-close-button") && !event.target.classList.contains("tab-close-button") &&
!event.target.classList.contains("tab-icon-overlay") && !event.target.classList.contains("tab-icon-overlay") &&
@@ -642,8 +699,9 @@ @@ -634,8 +690,9 @@
} }
if ( if (
@@ -213,16 +205,16 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
) { ) {
if (this.activeMediaBlocked) { if (this.activeMediaBlocked) {
if (this.multiselected) { if (this.multiselected) {
@@ -661,7 +719,7 @@ @@ -653,7 +710,7 @@
return; return;
} }
- if (event.target.classList.contains("tab-close-button")) { - if (event.target.classList.contains("tab-close-button")) {
+ if (!event.getModifierState("Accel") && event.target.classList.contains("tab-close-button")) { + if (!event.getModifierState("Accel") && event.target.classList.contains("tab-close-button")) {
if (this.multiselected) { if (this.multiselected) {
gBrowser.removeMultiSelectedTabs({ gBrowser.removeMultiSelectedTabs(
metricsContext: lazy.TabMetrics.userTriggeredContext( lazy.TabMetrics.userTriggeredContext(
@@ -681,6 +739,14 @@ @@ -673,6 +730,14 @@
// (see tabbrowser-tabs 'click' handler). // (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true; gBrowser.tabContainer._blockDblClick = true;
} }
@@ -237,9 +229,9 @@ index 6fcef5bf0f4ac8c58515afd127c7065f26251c7c..0307d79923612b8f728bf41c13b39aa8
} }
on_dblclick(event) { on_dblclick(event) {
@@ -707,6 +773,8 @@ @@ -696,6 +761,8 @@
lazy.TabMetrics.METRIC_SOURCE.TAB_STRIP animate: true,
), triggeringEvent: event,
}); });
+ } else if (this.hasAttribute('zen-essential') && !event.target.classList.contains("tab-icon-overlay")) { + } else if (this.hasAttribute('zen-essential') && !event.target.classList.contains("tab-icon-overlay")) {
+ gZenPinnedTabManager._onTabResetPinButton(event, this, 'reset'); + gZenPinnedTabManager._onTabResetPinButton(event, this, 'reset');

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da5504f9d8 100644 index 08b5b56e069d038d72c87355920c4ce8a55ed805..99b3de9a7be5cd5fd73c0b9dbbe265655d7171ce 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js --- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -513,6 +513,7 @@ @@ -511,6 +511,7 @@
* @type {MozBrowser[]} * @type {MozBrowser[]}
*/ */
get splitViewBrowsers() { get splitViewBrowsers() {
@@ -10,7 +10,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
const browsers = []; const browsers = [];
if (this.#activeSplitView) { if (this.#activeSplitView) {
for (const tab of this.#activeSplitView.tabs) { for (const tab of this.#activeSplitView.tabs) {
@@ -611,15 +612,66 @@ @@ -584,15 +585,66 @@
return this.tabContainer.visibleTabs; return this.tabContainer.visibleTabs;
} }
@@ -76,10 +76,10 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
+ return this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab")); + return this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab"));
+ } + }
+ +
setSelectedTab(val, metricsContext = null) { set selectedTab(val) {
if (this.selectedTab === val) { if (
return; gSharedTabWarning.willShowSharedTabWarning(val) ||
@@ -632,6 +684,9 @@ @@ -601,6 +653,9 @@
) { ) {
return; return;
} }
@@ -88,8 +88,8 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
+ } + }
// Update the tab // Update the tab
this.tabbox.selectedTab = val; this.tabbox.selectedTab = val;
}
@@ -708,6 +763,10 @@ @@ -668,6 +723,10 @@
userContextId = parseInt(tabArgument.getAttribute("usercontextid"), 10); userContextId = parseInt(tabArgument.getAttribute("usercontextid"), 10);
} }
@@ -97,10 +97,10 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
+ userContextId = window._zenStartupUnsyncedUserContextId; + userContextId = window._zenStartupUnsyncedUserContextId;
+ } + }
+ +
if (openWindowInfo) { if (tabArgument && tabArgument.linkedBrowser) {
userContextId = openWindowInfo.originAttributes.userContextId; remoteType = tabArgument.linkedBrowser.remoteType;
} initialBrowsingContextGroupId =
@@ -809,6 +868,8 @@ @@ -760,6 +819,8 @@
this.tabpanels.appendChild(panel); this.tabpanels.appendChild(panel);
let tab = this.tabs[0]; let tab = this.tabs[0];
@@ -109,13 +109,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
tab.linkedPanel = uniqueId; tab.linkedPanel = uniqueId;
this._selectedTab = tab; this._selectedTab = tab;
this._selectedBrowser = browser; this._selectedBrowser = browser;
@@ -1178,18 +1239,24 @@ @@ -1131,13 +1192,18 @@
* The context for the operation for telemetry purposes, defaults to an unknown context.
*/
pinTab(aTab, { metricsContext = this.TabMetrics.UNKNOWN_CONTEXT } = {}) {
+ aTab = gZenGlanceManager.getTabOrGlanceParent(aTab);
if (aTab.pinned || aTab == FirefoxViewHandler.tab) {
return;
} }
this.showTab(aTab); this.showTab(aTab);
@@ -135,13 +129,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
aTab.setAttribute("pinned", "true"); aTab.setAttribute("pinned", "true");
this._updateTabBarForPinnedTabs(); this._updateTabBarForPinnedTabs();
@@ -1206,16 +1273,25 @@ @@ -1150,11 +1216,19 @@
* The context for the operation for telemetry purposes, defaults to an unknown context.
*/
unpinTab(aTab, { metricsContext = this.TabMetrics.UNKNOWN_CONTEXT } = {}) {
+ aTab = gZenGlanceManager.getTabOrGlanceParent(aTab);
if (!aTab.pinned) {
return;
} }
this.#handleTabMove(aTab, () => { this.#handleTabMove(aTab, () => {
@@ -162,7 +150,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
}); });
aTab.style.marginInlineStart = ""; aTab.style.marginInlineStart = "";
@@ -1430,6 +1506,9 @@ @@ -1369,6 +1443,9 @@
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"]; let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
@@ -172,7 +160,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if ( if (
aIconURL && aIconURL &&
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol)) !LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
@@ -1439,6 +1518,9 @@ @@ -1378,6 +1455,9 @@
); );
return; return;
} }
@@ -182,23 +170,23 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
let browser = this.getBrowserForTab(aTab); let browser = this.getBrowserForTab(aTab);
browser.mIconURL = aIconURL; browser.mIconURL = aIconURL;
@@ -1761,7 +1843,6 @@ @@ -1700,7 +1780,6 @@
// Preview mode should not reset the owner // Preview mode should not reset the owner
if (!this.#previewMode && !oldTab.selected) { if (!this._previewMode && !oldTab.selected) {
- oldTab.owner = null; - oldTab.owner = null;
} }
let lastRelatedTab = this.#lastRelatedTabMap.get(oldTab); let lastRelatedTab = this._lastRelatedTabMap.get(oldTab);
@@ -1852,6 +1933,7 @@ @@ -1791,6 +1870,7 @@
if (!this.#previewMode) { if (!this._previewMode) {
newTab.recordTimeFromUnloadToReload(); newTab.recordTimeFromUnloadToReload();
newTab.updateLastAccessed(); newTab.updateLastAccessed();
+ newTab.removeAttribute("unread"); + newTab.removeAttribute("unread");
oldTab.updateLastAccessed(); oldTab.updateLastAccessed();
// if this is the foreground window, update the last-seen timestamps. // if this is the foreground window, update the last-seen timestamps.
if (this.documentGlobal == BrowserWindowTracker.getTopWindow()) { if (this.documentGlobal == BrowserWindowTracker.getTopWindow()) {
@@ -2066,6 +2148,9 @@ @@ -2005,6 +2085,9 @@
} }
let activeEl = document.activeElement; let activeEl = document.activeElement;
@@ -208,7 +196,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// If focus is on the old tab, move it to the new tab. // If focus is on the old tab, move it to the new tab.
if (activeEl == oldTab) { if (activeEl == oldTab) {
newTab.focus(); newTab.focus();
@@ -2104,7 +2189,7 @@ @@ -2043,7 +2126,7 @@
// Focus the location bar if it was previously focused for that tab. // Focus the location bar if it was previously focused for that tab.
// In full screen mode, only bother making the location bar visible // In full screen mode, only bother making the location bar visible
// if the tab is a blank one. // if the tab is a blank one.
@@ -217,7 +205,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
let selectURL = () => { let selectURL = () => {
if (this._asyncTabSwitching) { if (this._asyncTabSwitching) {
// Set _awaitingSetURI flag to suppress popup notification // Set _awaitingSetURI flag to suppress popup notification
@@ -2392,7 +2477,12 @@ @@ -2331,7 +2414,12 @@
return this._setTabLabel(aTab, aLabel); return this._setTabLabel(aTab, aLabel);
} }
@@ -231,16 +219,16 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (!aLabel || (isURL && /^about:reader\?url=/.test(aLabel))) { if (!aLabel || (isURL && /^about:reader\?url=/.test(aLabel))) {
return false; return false;
} }
@@ -2518,7 +2608,7 @@ @@ -2457,7 +2545,7 @@
newIndex = this.selectedTab._tPos + 1; newIndex = this.selectedTab._tPos + 1;
} }
- if (replace) { - if (replace) {
+ if (replace && !((targetTab || this.selectedTab)?.hasAttribute('zen-empty-tab'))) { + if (replace && !(!targetTab && this.selectedTab?.hasAttribute('zen-empty-tab'))) {
if (this.isTabGroupLabel(targetTab)) { if (this.isTabGroupLabel(targetTab)) {
throw new Error( throw new Error(
"Replacing a tab group label with a tab is not supported" "Replacing a tab group label with a tab is not supported"
@@ -2793,6 +2883,7 @@ @@ -2737,6 +2825,7 @@
uriIsAboutBlank, uriIsAboutBlank,
userContextId, userContextId,
skipLoad, skipLoad,
@@ -248,7 +236,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} = {}) { } = {}) {
let b = document.createXULElement("browser"); let b = document.createXULElement("browser");
// Use the JSM global to create the permanentKey, so that if the // Use the JSM global to create the permanentKey, so that if the
@@ -2866,8 +2957,7 @@ @@ -2810,8 +2899,7 @@
// we use a different attribute name for this? // we use a different attribute name for this?
b.setAttribute("name", name); b.setAttribute("name", name);
} }
@@ -258,7 +246,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
b.setAttribute("transparent", "true"); b.setAttribute("transparent", "true");
} }
@@ -3022,7 +3112,7 @@ @@ -2981,7 +3069,7 @@
let panel = this.getPanel(browser); let panel = this.getPanel(browser);
let uniqueId = this._generateUniquePanelID(); let uniqueId = this._generateUniquePanelID();
@@ -267,7 +255,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
aTab.linkedPanel = uniqueId; aTab.linkedPanel = uniqueId;
// Inject the <browser> into the DOM if necessary. // Inject the <browser> into the DOM if necessary.
@@ -3082,8 +3172,8 @@ @@ -3041,8 +3129,8 @@
// If we transitioned from one browser to two browsers, we need to set // If we transitioned from one browser to two browsers, we need to set
// hasSiblings=false on both the existing browser and the new browser. // hasSiblings=false on both the existing browser and the new browser.
if (this.tabs.length == 2) { if (this.tabs.length == 2) {
@@ -278,7 +266,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} else { } else {
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1; aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
} }
@@ -3268,7 +3358,6 @@ @@ -3227,7 +3315,6 @@
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, { this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
tabIndex: tab._tPos + 1, tabIndex: tab._tPos + 1,
userContextId: tab.userContextId, userContextId: tab.userContextId,
@@ -286,7 +274,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
focusUrlBar: true, focusUrlBar: true,
}); });
resolve(this.selectedBrowser); resolve(this.selectedBrowser);
@@ -3378,6 +3467,10 @@ @@ -3337,6 +3424,10 @@
schemelessInput, schemelessInput,
hasValidUserGestureActivation = false, hasValidUserGestureActivation = false,
textDirectiveUserActivation = false, textDirectiveUserActivation = false,
@@ -297,22 +285,21 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} = {} } = {}
) { ) {
// all callers of addTab that pass a params object need to pass // all callers of addTab that pass a params object need to pass
@@ -3388,10 +3481,25 @@ @@ -3347,10 +3438,24 @@
); );
} }
+ const beforeRouteResult = window.gZenSpaceRoutingManager.onBeforeAddTab(uriString, { skipRoute, pinned, tabGroup, fromExternal }, window); + const beforeRouteResult = window.gZenSpaceRoutingManager.onBeforeAddTab(uriString, { skipRoute, pinned, tabGroup, fromExternal, zenWorkspaceId }, window);
+ if (beforeRouteResult.shouldEarlyExit) { + if (beforeRouteResult.shouldEarlyExit) {
+ return null; + return null;
+ } + }
+ +
+ let hasZenDefaultUserContextId = false; + let hasZenDefaultUserContextId = false;
+ let zenForcedWorkspaceId = undefined; + if (beforeRouteResult.isRouteFound && typeof userContextId !== "undefined") {
+ if (beforeRouteResult.isRouteFound && (typeof userContextId === "undefined" || fromExternal)) {
+ userContextId = beforeRouteResult.userContextId; + userContextId = beforeRouteResult.userContextId;
+ hasZenDefaultUserContextId = true; + hasZenDefaultUserContextId = true;
+ } else if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) { + } else if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
+ [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal, triggeringPrincipal); + [userContextId, hasZenDefaultUserContextId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal, triggeringPrincipal);
+ } + }
+ +
if (!UserInteraction.running("browser.tabs.opening", window)) { if (!UserInteraction.running("browser.tabs.opening", window)) {
@@ -323,7 +310,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// If we're opening a foreground tab, set the owner by default. // If we're opening a foreground tab, set the owner by default.
ownerTab ??= inBackground ? null : this.selectedTab; ownerTab ??= inBackground ? null : this.selectedTab;
@@ -3399,6 +3507,7 @@ @@ -3358,6 +3463,7 @@
if (this.selectedTab.owner) { if (this.selectedTab.owner) {
this.selectedTab.owner = null; this.selectedTab.owner = null;
} }
@@ -331,7 +318,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// Find the tab that opened this one, if any. This is used for // Find the tab that opened this one, if any. This is used for
// determining positioning, and inherited attributes such as the // determining positioning, and inherited attributes such as the
@@ -3451,6 +3560,22 @@ @@ -3410,6 +3516,18 @@
noInitialLabel, noInitialLabel,
skipBackgroundNotify, skipBackgroundNotify,
}); });
@@ -340,10 +327,6 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
+ } + }
+ if (zenWorkspaceId) { + if (zenWorkspaceId) {
+ t.setAttribute("zen-workspace-id", zenWorkspaceId); + t.setAttribute("zen-workspace-id", zenWorkspaceId);
+ t.setAttribute("change-workspace", "")
+ } else if (zenForcedWorkspaceId !== undefined) {
+ t.setAttribute("zen-workspace-id", zenForcedWorkspaceId);
+ t.setAttribute("change-workspace", "")
+ } + }
+ if (_forZenEmptyTab) { + if (_forZenEmptyTab) {
+ t.setAttribute("zen-empty-tab", "true"); + t.setAttribute("zen-empty-tab", "true");
@@ -354,7 +337,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (insertTab) { if (insertTab) {
// Insert the tab into the tab container in the correct position. // Insert the tab into the tab container in the correct position.
this.#insertTabAtIndex(t, { this.#insertTabAtIndex(t, {
@@ -3459,6 +3584,7 @@ @@ -3418,6 +3536,7 @@
ownerTab, ownerTab,
openerTab, openerTab,
pinned, pinned,
@@ -362,7 +345,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
bulkOrderedOpen, bulkOrderedOpen,
tabGroup: tabGroup ?? openerTab?.group, tabGroup: tabGroup ?? openerTab?.group,
}); });
@@ -3477,6 +3603,7 @@ @@ -3436,6 +3555,7 @@
openWindowInfo, openWindowInfo,
skipLoad, skipLoad,
triggeringRemoteType, triggeringRemoteType,
@@ -370,7 +353,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
})); }));
if (focusUrlBar) { if (focusUrlBar) {
@@ -3601,6 +3728,12 @@ @@ -3560,6 +3680,12 @@
} }
} }
@@ -383,7 +366,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// Additionally send pinned tab events // Additionally send pinned tab events
if (pinned) { if (pinned) {
this.#notifyPinnedStatus(t); this.#notifyPinnedStatus(t);
@@ -3611,6 +3744,15 @@ @@ -3570,6 +3696,15 @@
if (!inBackground) { if (!inBackground) {
this.selectedTab = t; this.selectedTab = t;
} }
@@ -399,15 +382,15 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
return t; return t;
} }
@@ -3834,6 +3976,7 @@ @@ -3802,6 +3937,7 @@
insertBefore = null,
isAdoptingGroup = false, isAdoptingGroup = false,
metricsContext = this.TabMetrics.UNKNOWN_CONTEXT, isUserTriggered = false,
telemetryUserCreateSource = "unknown",
+ forSplitView = false, + forSplitView = false,
} = {} } = {}
) { ) {
if ( if (
@@ -3844,9 +3987,6 @@ @@ -3812,9 +3948,6 @@
!this.isSplitViewWrapper(tabOrSplitView) !this.isSplitViewWrapper(tabOrSplitView)
) )
) { ) {
@@ -417,7 +400,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
if (!color) { if (!color) {
@@ -3867,9 +4007,14 @@ @@ -3835,9 +3968,14 @@
label, label,
isAdoptingGroup isAdoptingGroup
); );
@@ -432,9 +415,9 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
group, group,
- insertBefore?.group ?? insertBefore - insertBefore?.group ?? insertBefore
); );
group.addTabs(tabsAndSplitViews, metricsContext); group.addTabs(tabsAndSplitViews);
@@ -3973,7 +4118,7 @@ @@ -3958,7 +4096,7 @@
} }
this.#handleTabMove(tab, () => this.#handleTabMove(tab, () =>
@@ -443,7 +426,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
); );
} }
@@ -4059,6 +4204,7 @@ @@ -4044,6 +4182,7 @@
color: group.color, color: group.color,
insertBefore: newTabs[0], insertBefore: newTabs[0],
isAdoptingGroup: true, isAdoptingGroup: true,
@@ -451,7 +434,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
}); });
} }
@@ -4269,6 +4415,7 @@ @@ -4254,6 +4393,7 @@
openWindowInfo, openWindowInfo,
skipLoad, skipLoad,
triggeringRemoteType, triggeringRemoteType,
@@ -459,7 +442,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
) { ) {
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and // If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
@@ -4329,6 +4476,7 @@ @@ -4323,6 +4463,7 @@
openWindowInfo, openWindowInfo,
name, name,
skipLoad, skipLoad,
@@ -467,7 +450,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
}); });
} }
@@ -4542,9 +4690,9 @@ @@ -4536,9 +4677,9 @@
} }
// Add a new tab if needed. // Add a new tab if needed.
@@ -479,7 +462,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
let url = "about:blank"; let url = "about:blank";
if (tabData.entries?.length) { if (tabData.entries?.length) {
@@ -4577,8 +4725,10 @@ @@ -4575,8 +4716,10 @@
insertTab: false, insertTab: false,
skipLoad: true, skipLoad: true,
preferredRemoteType, preferredRemoteType,
@@ -491,7 +474,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (select) { if (select) {
tabToSelect = tab; tabToSelect = tab;
} }
@@ -4600,7 +4750,8 @@ @@ -4598,7 +4741,8 @@
this.pinTab(tab); this.pinTab(tab);
// Then ensure all the tab open/pinning information is sent. // Then ensure all the tab open/pinning information is sent.
this._fireTabOpen(tab, {}); this._fireTabOpen(tab, {});
@@ -501,7 +484,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
let { groupId } = tabData; let { groupId } = tabData;
const tabGroup = tabGroupWorkingData.get(groupId); const tabGroup = tabGroupWorkingData.get(groupId);
// if a tab refers to a tab group we don't know, skip any group // if a tab refers to a tab group we don't know, skip any group
@@ -4620,7 +4771,10 @@ @@ -4618,7 +4762,10 @@
tabGroup.stateData.id, tabGroup.stateData.id,
tabGroup.stateData.color, tabGroup.stateData.color,
tabGroup.stateData.collapsed, tabGroup.stateData.collapsed,
@@ -513,7 +496,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
); );
tabsFragment.appendChild(tabGroup.node); tabsFragment.appendChild(tabGroup.node);
} }
@@ -4675,9 +4829,21 @@ @@ -4673,9 +4820,21 @@
// to remove the old selected tab. // to remove the old selected tab.
if (tabToSelect) { if (tabToSelect) {
let leftoverTab = this.selectedTab; let leftoverTab = this.selectedTab;
@@ -535,15 +518,12 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (tabs.length > 1 || !tabs[0].selected) { if (tabs.length > 1 || !tabs[0].selected) {
this._updateTabsAfterInsert(); this._updateTabsAfterInsert();
@@ -4882,11 +5048,17 @@ @@ -4866,11 +5025,14 @@
if (ownerTab) { if (ownerTab) {
tab.owner = ownerTab; tab.owner = ownerTab;
} }
+ if ((!tab.pinned && tabGroup?.isZenFolder && !Services.prefs.getBoolPref('zen.folders.owned-tabs-in-folder')) || (tabGroup && tabGroup.hasAttribute("split-view-group"))) { + if ((!tab.pinned && tabGroup?.isZenFolder && !Services.prefs.getBoolPref('zen.folders.owned-tabs-in-folder')) || (tabGroup && tabGroup.hasAttribute("split-view-group"))) {
+ tabGroup = null; + tabGroup = null;
+ }
+ if (openerTab?.hasAttribute("zen-glance-tab")) {
+ openerTab = gZenGlanceManager.getTabOrGlanceParent(openerTab);
+ } + }
// Ensure we have an index if one was not provided. // Ensure we have an index if one was not provided.
@@ -554,16 +534,16 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if ( if (
!bulkOrderedOpen && !bulkOrderedOpen &&
((openerTab && ((openerTab &&
@@ -4898,7 +5070,7 @@ @@ -4882,7 +5044,7 @@
let lastRelatedTab = let lastRelatedTab =
openerTab && this.#lastRelatedTabMap.get(openerTab); openerTab && this._lastRelatedTabMap.get(openerTab);
let previousTab = lastRelatedTab || openerTab || this.selectedTab; let previousTab = lastRelatedTab || openerTab || this.selectedTab;
- if (!tabGroup) { - if (!tabGroup) {
+ if (!tabGroup && pinned === previousTab.group?.pinned) { + if (!tabGroup && pinned === previousTab.group?.pinned) {
tabGroup = previousTab.group; tabGroup = previousTab.group;
} }
if ( if (
@@ -4914,7 +5086,7 @@ @@ -4898,7 +5060,7 @@
previousTab.splitview previousTab.splitview
) + 1; ) + 1;
} else if (previousTab.visible) { } else if (previousTab.visible) {
@@ -572,7 +552,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} else if (previousTab == FirefoxViewHandler.tab) { } else if (previousTab == FirefoxViewHandler.tab) {
elementIndex = 0; elementIndex = 0;
} }
@@ -4942,14 +5114,14 @@ @@ -4926,14 +5088,14 @@
} }
// Ensure index is within bounds. // Ensure index is within bounds.
if (tab.pinned) { if (tab.pinned) {
@@ -591,7 +571,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (pinned && !itemAfter?.pinned) { if (pinned && !itemAfter?.pinned) {
itemAfter = null; itemAfter = null;
@@ -4966,7 +5138,7 @@ @@ -4950,7 +5112,7 @@
this.tabContainer._invalidateCachedTabs(); this.tabContainer._invalidateCachedTabs();
@@ -600,7 +580,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if ( if (
(this.isTab(itemAfter) && itemAfter.group == tabGroup) || (this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
this.isSplitViewWrapper(itemAfter) this.isSplitViewWrapper(itemAfter)
@@ -4997,7 +5169,11 @@ @@ -4981,7 +5143,11 @@
const tabContainer = pinned const tabContainer = pinned
? this.tabContainer.pinnedTabsContainer ? this.tabContainer.pinnedTabsContainer
: this.tabContainer; : this.tabContainer;
@@ -612,7 +592,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
if (tab.group?.collapsed) { if (tab.group?.collapsed) {
@@ -5012,6 +5188,7 @@ @@ -4996,6 +5162,7 @@
if (pinned) { if (pinned) {
this._updateTabBarForPinnedTabs(); this._updateTabBarForPinnedTabs();
} }
@@ -620,23 +600,23 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
TabBarVisibility.update(); TabBarVisibility.update();
} }
@@ -5568,6 +5745,7 @@ @@ -5544,6 +5711,7 @@
metricsContext, telemetrySource,
} = {} } = {}
) { ) {
+ tabs = tabs.filter(tab => !tab.hasAttribute("zen-empty-tab")); + tabs = tabs.filter(tab => !tab.hasAttribute("zen-empty-tab"));
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs // When 'closeWindowWithLastTab' pref is enabled, closing all tabs
// can be considered equivalent to closing the window. // can be considered equivalent to closing the window.
if ( if (
@@ -5678,6 +5856,7 @@ @@ -5633,6 +5801,7 @@
closedTabCount -= 1; if (lastToClose) {
} this.removeTab(lastToClose, aParams);
} }
+ gZenUIManager.onTabClose(undefined); + gZenUIManager.onTabClose(undefined);
} catch (e) {
if (closedTabCount > 0) { console.error(e);
this.recordTabMetrics( }
@@ -5730,6 +5909,14 @@ @@ -5678,6 +5847,14 @@
return; return;
} }
@@ -651,7 +631,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
let isVisibleTab = aTab.visible; let isVisibleTab = aTab.visible;
// We have to sample the tab width now, since _beginRemoveTab might // 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 // end up modifying the DOM in such a way that aTab gets a new
@@ -5737,6 +5924,9 @@ @@ -5685,6 +5862,9 @@
// state). // state).
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width; let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
let isLastTab = this.#isLastTabInWindow(aTab); let isLastTab = this.#isLastTabInWindow(aTab);
@@ -661,8 +641,8 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if ( if (
!this._beginRemoveTab(aTab, { !this._beginRemoveTab(aTab, {
closeWindowFastpath: true, closeWindowFastpath: true,
@@ -5747,13 +5937,14 @@ @@ -5696,13 +5876,14 @@
metricsContext, telemetrySource,
}) })
) { ) {
+ delete gZenWorkspaces._isClosingWindow; + delete gZenWorkspaces._isClosingWindow;
@@ -677,7 +657,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
let lockTabSizing = let lockTabSizing =
!this.tabContainer.verticalMode && !this.tabContainer.verticalMode &&
!aTab.pinned && !aTab.pinned &&
@@ -5784,7 +5975,13 @@ @@ -5733,7 +5914,13 @@
// We're not animating, so we can cancel the animation stopwatch. // We're not animating, so we can cancel the animation stopwatch.
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId); Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
aTab._closeTimeAnimTimerId = null; aTab._closeTimeAnimTimerId = null;
@@ -692,16 +672,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
return; return;
} }
@@ -5827,7 +6024,7 @@ @@ -5867,7 +6054,7 @@
*/
#isLastTabInWindow(tab) {
for (const otherTab of this.tabs) {
- if (otherTab != tab && otherTab.isOpen && !otherTab.hidden) {
+ if (otherTab != tab && otherTab.isOpen && !otherTab.hidden && !otherTab.hasAttribute("zen-empty-tab")) {
return false;
}
}
@@ -5917,7 +6114,7 @@
closeWindowWithLastTab != null closeWindowWithLastTab != null
? closeWindowWithLastTab ? closeWindowWithLastTab
: !window.toolbar.visible || : !window.toolbar.visible ||
@@ -710,7 +681,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (closeWindow) { if (closeWindow) {
// We've already called beforeunload on all the relevant tabs if we get here, // We've already called beforeunload on all the relevant tabs if we get here,
@@ -5941,6 +6138,7 @@ @@ -5891,6 +6078,7 @@
newTab = true; newTab = true;
} }
@@ -718,7 +689,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
aTab._endRemoveArgs = [closeWindow, newTab]; aTab._endRemoveArgs = [closeWindow, newTab];
// swapBrowsersAndCloseOther will take care of closing the window without animation. // swapBrowsersAndCloseOther will take care of closing the window without animation.
@@ -5982,13 +6180,7 @@ @@ -5931,13 +6119,7 @@
aTab._mouseleave(); aTab._mouseleave();
if (newTab) { if (newTab) {
@@ -733,15 +704,15 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} else { } else {
TabBarVisibility.update(); TabBarVisibility.update();
} }
@@ -6128,6 +6320,7 @@ @@ -6070,6 +6252,7 @@
this.tabs[i]._tPos = i; this.tabs[i]._tPos = i;
} }
+ gZenWorkspaces.updateTabsContainers(); + gZenWorkspaces.updateTabsContainers();
if (!this.#windowIsClosing) { if (!this._windowIsClosing) {
// update tab close buttons state // update tab close buttons state
this.tabContainer._updateCloseButtons(); this.tabContainer._updateCloseButtons();
@@ -6313,6 +6506,7 @@ @@ -6255,6 +6438,7 @@
memory_after: await getTotalMemoryUsage(), memory_after: await getTotalMemoryUsage(),
time_to_unload_in_ms: timeElapsed, time_to_unload_in_ms: timeElapsed,
}); });
@@ -749,7 +720,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
/** /**
@@ -6358,6 +6552,7 @@ @@ -6300,6 +6484,7 @@
} }
let excludeTabs = new Set(aExcludeTabs); let excludeTabs = new Set(aExcludeTabs);
@@ -757,7 +728,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// If this tab has a successor, it should be selectable, since // If this tab has a successor, it should be selectable, since
// hiding or closing a tab removes that tab as a successor. // hiding or closing a tab removes that tab as a successor.
@@ -6370,13 +6565,13 @@ @@ -6312,15 +6497,22 @@
!excludeTabs.has(aTab.owner) && !excludeTabs.has(aTab.owner) &&
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose") Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
) { ) {
@@ -772,11 +743,6 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
+ tab => !excludeTabs.has(tab) && gZenWorkspaces._shouldChangeToTab(tab) && tab !== aTab + tab => !excludeTabs.has(tab) && gZenWorkspaces._shouldChangeToTab(tab) && tab !== aTab
); );
if (Services.prefs.getBoolPref("browser.tabs.selectMRUOnClose", false)) {
@@ -6392,6 +6587,13 @@
}
}
+ if (remainingTabs.length > 0 && Services.prefs.getBoolPref("zen.tabs.select-recently-used-on-close")) { + if (remainingTabs.length > 0 && Services.prefs.getBoolPref("zen.tabs.select-recently-used-on-close")) {
+ let mostRecentTab = remainingTabs.reduce((a, b) => + let mostRecentTab = remainingTabs.reduce((a, b) =>
+ b.lastAccessed > a.lastAccessed ? b : a + b.lastAccessed > a.lastAccessed ? b : a
@@ -787,7 +753,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
let tab = this.tabContainer.findNextTab(aTab, { let tab = this.tabContainer.findNextTab(aTab, {
direction: 1, direction: 1,
filter: _tab => remainingTabs.includes(_tab), filter: _tab => remainingTabs.includes(_tab),
@@ -6405,7 +6607,7 @@ @@ -6334,7 +6526,7 @@
} }
if (tab) { if (tab) {
@@ -796,7 +762,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
// If no qualifying visible tab was found, see if there is a tab in // If no qualifying visible tab was found, see if there is a tab in
@@ -6426,7 +6628,7 @@ @@ -6355,7 +6547,7 @@
}); });
} }
@@ -805,7 +771,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
_blurTab(aTab) { _blurTab(aTab) {
@@ -6437,7 +6639,7 @@ @@ -6366,7 +6558,7 @@
* @returns {boolean} * @returns {boolean}
* False if swapping isn't permitted, true otherwise. * False if swapping isn't permitted, true otherwise.
*/ */
@@ -814,7 +780,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// Do not allow transfering a private tab to a non-private window // Do not allow transfering a private tab to a non-private window
// and vice versa. // and vice versa.
if ( if (
@@ -6491,6 +6693,7 @@ @@ -6420,6 +6612,7 @@
// fire the beforeunload event in the process. Close the other // fire the beforeunload event in the process. Close the other
// window if this was its last tab. // window if this was its last tab.
if ( if (
@@ -822,7 +788,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
!remoteBrowser._beginRemoveTab(aOtherTab, { !remoteBrowser._beginRemoveTab(aOtherTab, {
adoptedByTab: aOurTab, adoptedByTab: aOurTab,
closeWindowWithLastTab: true, closeWindowWithLastTab: true,
@@ -6502,7 +6705,7 @@ @@ -6431,7 +6624,7 @@
// If this is the last tab of the window, hide the window // If this is the last tab of the window, hide the window
// immediately without animation before the docshell swap, to avoid // immediately without animation before the docshell swap, to avoid
// about:blank being painted. // about:blank being painted.
@@ -831,7 +797,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (closeWindow) { if (closeWindow) {
let win = aOtherTab.documentGlobal; let win = aOtherTab.documentGlobal;
win.windowUtils.suppressAnimation(true); win.windowUtils.suppressAnimation(true);
@@ -6636,11 +6839,13 @@ @@ -6565,11 +6758,13 @@
} }
// Finish tearing down the tab that's going away. // Finish tearing down the tab that's going away.
@@ -845,7 +811,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
this.setTabTitle(aOurTab); this.setTabTitle(aOurTab);
@@ -6860,10 +7065,10 @@ @@ -6771,10 +6966,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy"); SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
} }
@@ -858,7 +824,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
aTab.selected || aTab.selected ||
aTab.closing || aTab.closing ||
// Tabs that are sharing the screen, microphone or camera cannot be hidden. // Tabs that are sharing the screen, microphone or camera cannot be hidden.
@@ -6923,7 +7128,8 @@ @@ -6834,7 +7029,8 @@
* @param {object} [aOptions={}] * @param {object} [aOptions={}]
* Key-value pairs that will be serialized into the features string. * Key-value pairs that will be serialized into the features string.
*/ */
@@ -868,7 +834,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (this.tabs.length == 1) { if (this.tabs.length == 1) {
return null; return null;
} }
@@ -6940,7 +7146,7 @@ @@ -6851,7 +7047,7 @@
// tell a new window to take the "dropped" tab // tell a new window to take the "dropped" tab
let args = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray); let args = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
args.appendElement(aTab.splitview ?? aTab); args.appendElement(aTab.splitview ?? aTab);
@@ -877,7 +843,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
private: PrivateBrowsingUtils.isWindowPrivate(window), private: PrivateBrowsingUtils.isWindowPrivate(window),
features: Object.entries(aOptions) features: Object.entries(aOptions)
.map(([key, value]) => `${key}=${value}`) .map(([key, value]) => `${key}=${value}`)
@@ -6948,6 +7154,8 @@ @@ -6859,6 +7055,8 @@
openerWindow: window, openerWindow: window,
args, args,
}); });
@@ -886,7 +852,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
/** /**
@@ -7074,7 +7282,7 @@ @@ -6971,7 +7169,7 @@
* `true` if element is a `<tab-group>` * `true` if element is a `<tab-group>`
*/ */
isTabGroup(element) { isTabGroup(element) {
@@ -895,7 +861,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
/** /**
@@ -7146,8 +7354,8 @@ @@ -7056,8 +7254,8 @@
} }
// Don't allow mixing pinned and unpinned tabs. // Don't allow mixing pinned and unpinned tabs.
@@ -906,7 +872,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} else { } else {
tabIndex = Math.max(tabIndex, this.pinnedTabCount); tabIndex = Math.max(tabIndex, this.pinnedTabCount);
} }
@@ -7193,8 +7401,8 @@ @@ -7103,8 +7301,8 @@
this.#handleTabMove( this.#handleTabMove(
element, element,
() => { () => {
@@ -917,7 +883,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
neighbor = neighbor.group; neighbor = neighbor.group;
} }
if (neighbor?.splitview) { if (neighbor?.splitview) {
@@ -7205,6 +7413,12 @@ @@ -7115,6 +7313,12 @@
return; return;
} }
} }
@@ -930,8 +896,8 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
if (movingForwards && neighbor) { if (movingForwards && neighbor) {
neighbor.after(element); neighbor.after(element);
@@ -7278,23 +7492,31 @@ @@ -7173,23 +7377,31 @@
) { #moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
if (this.isTabGroupLabel(targetElement)) { if (this.isTabGroupLabel(targetElement)) {
targetElement = targetElement.group; targetElement = targetElement.group;
- if (!moveBefore && !targetElement.collapsed) { - if (!moveBefore && !targetElement.collapsed) {
@@ -968,7 +934,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} else if (!element.pinned && targetElement && targetElement.pinned) { } else if (!element.pinned && targetElement && targetElement.pinned) {
// If the caller asks to move an unpinned element next to a 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 // tab, move the unpinned element to be the first unpinned element
@@ -7307,12 +7529,35 @@ @@ -7202,12 +7414,35 @@
// move the tab group right before the first unpinned tab. // move the tab group right before the first unpinned tab.
// 4. Moving a tab group and the first unpinned tab is grouped: // 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. // move the tab group right before the first unpinned tab's tab group.
@@ -1005,7 +971,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// We want to include the splitview wrapper if it's the targetElement, but // 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. // not in the case where we want to reverse tabs within the same splitview.
@@ -7321,6 +7566,7 @@ @@ -7216,6 +7451,7 @@
} }
let getContainer = () => let getContainer = () =>
@@ -1013,7 +979,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
element.pinned element.pinned
? this.tabContainer.pinnedTabsContainer ? this.tabContainer.pinnedTabsContainer
: this.tabContainer; : this.tabContainer;
@@ -7329,11 +7575,15 @@ @@ -7224,11 +7460,15 @@
element, element,
() => { () => {
if (moveBefore) { if (moveBefore) {
@@ -1029,11 +995,11 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
+ } + }
} }
}, },
{ metricsContext } metricsContext
@@ -7411,11 +7661,15 @@ @@ -7302,11 +7542,15 @@
* The context for the operation for telemetry purposes. * @param {TabMetricsContext} [metricsContext]
*/ */
moveTabToExistingGroup(aTab, aGroup, { metricsContext } = {}) { moveTabToExistingGroup(aTab, aGroup, metricsContext) {
- if (!this.isTab(aTab)) { - if (!this.isTab(aTab)) {
+ if (!this.isTab(aTab) && !aTab.hasAttribute('split-view-group')) { + if (!this.isTab(aTab) && !aTab.hasAttribute('split-view-group')) {
throw new Error("Can only move a tab into a tab group"); throw new Error("Can only move a tab into a tab group");
@@ -1049,7 +1015,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
} }
if (aTab.group && aTab.group.id === aGroup.id) { if (aTab.group && aTab.group.id === aGroup.id) {
return; return;
@@ -7489,6 +7743,7 @@ @@ -7378,6 +7622,7 @@
let state = { let state = {
tabIndex: tab._tPos, tabIndex: tab._tPos,
@@ -1057,7 +1023,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
}; };
if (tab.visible) { if (tab.visible) {
state.elementIndex = tab.elementIndex; state.elementIndex = tab.elementIndex;
@@ -7527,7 +7782,7 @@ @@ -7409,7 +7654,7 @@
let changedSplitView = let changedSplitView =
previousTabState.splitViewId != currentTabState.splitViewId; previousTabState.splitViewId != currentTabState.splitViewId;
@@ -1066,7 +1032,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
tab.dispatchEvent( tab.dispatchEvent(
new CustomEvent("TabMove", { new CustomEvent("TabMove", {
bubbles: true, bubbles: true,
@@ -7579,6 +7834,10 @@ @@ -7456,6 +7701,10 @@
moveActionCallback(); moveActionCallback();
@@ -1077,7 +1043,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// Clear tabs cache after moving nodes because the order of tabs may have // Clear tabs cache after moving nodes because the order of tabs may have
// changed. // changed.
this.tabContainer._invalidateCachedTabs(); this.tabContainer._invalidateCachedTabs();
@@ -7626,7 +7885,22 @@ @@ -7506,7 +7755,22 @@
* @returns {object} * @returns {object}
* The new tab in the current window, null if the tab couldn't be adopted. * The new tab in the current window, null if the tab couldn't be adopted.
*/ */
@@ -1101,7 +1067,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
// Swap the dropped tab with a new one we create and then close // 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 // 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 // windows). We also ensure that the tab we create to swap into has
@@ -7669,6 +7943,8 @@ @@ -7549,6 +7813,8 @@
} }
params.skipLoad = true; params.skipLoad = true;
let newTab = this.addWebTab("about:blank", params); let newTab = this.addWebTab("about:blank", params);
@@ -1110,7 +1076,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
aTab.container.tabDragAndDrop.finishAnimateTabMove(); aTab.container.tabDragAndDrop.finishAnimateTabMove();
@@ -8448,7 +8724,7 @@ @@ -8259,7 +8525,7 @@
// preventDefault(). It will still raise the window if appropriate. // preventDefault(). It will still raise the window if appropriate.
return; return;
} }
@@ -1119,7 +1085,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
window.focus(); window.focus();
aEvent.preventDefault(); aEvent.preventDefault();
} }
@@ -8465,7 +8741,6 @@ @@ -8276,7 +8542,6 @@
on_TabGroupCollapse(aEvent) { on_TabGroupCollapse(aEvent) {
aEvent.target.tabs.forEach(tab => { aEvent.target.tabs.forEach(tab => {
@@ -1127,38 +1093,38 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
}); });
} }
@@ -8819,7 +9094,9 @@ @@ -8630,7 +8895,9 @@
let filter = this.#tabFilters.get(tab); let filter = this._tabFilters.get(tab);
if (filter) { if (filter) {
+ try { + try {
browser.webProgress.removeProgressListener(filter); browser.webProgress.removeProgressListener(filter);
+ } catch {} + } catch {}
let listener = this.#tabListeners.get(tab); let listener = this._tabListeners.get(tab);
if (listener) { if (listener) {
@@ -9604,6 +9881,7 @@ @@ -9435,6 +9702,7 @@
aWebProgress.isTopLevel aWebProgress.isTopLevel
) { ) {
this._tab.setAttribute("busy", "true"); this.mTab.setAttribute("busy", "true");
+ if (!this._tab.selected) this._tab.setAttribute("unread", "true"); + if (!this.mTab.selected) this.mTab.setAttribute("unread", "true");
gBrowser._tabAttrModified(this._tab, ["busy"]); gBrowser._tabAttrModified(this.mTab, ["busy"]);
this._tab._notselectedsinceload = !this._tab.selected; this.mTab._notselectedsinceload = !this.mTab.selected;
} }
@@ -9684,6 +9962,7 @@ @@ -9515,6 +9783,7 @@
// known defaults. Note we use the original URL since about:newtab // known defaults. Note we use the original URL since about:newtab
// redirects to a prerendered page. // redirects to a prerendered page.
const shouldRemoveFavicon = const shouldRemoveFavicon =
+ !this._tab.zenStaticIcon && + !this.mTab.zenStaticIcon &&
!this._browser.mIconURL && !this.mBrowser.mIconURL &&
!ignoreBlank && !ignoreBlank &&
!(originalLocation.spec in FAVICON_DEFAULTS); !(originalLocation.spec in FAVICON_DEFAULTS);
@@ -9858,13 +10137,6 @@ @@ -9689,13 +9958,6 @@
this._browser.originalURI = aRequest.originalURI; this.mBrowser.originalURI = aRequest.originalURI;
} }
- if (!gBrowser._allowTransparentBrowser) { - if (!gBrowser._allowTransparentBrowser) {
- this._browser.toggleAttribute( - this.mBrowser.toggleAttribute(
- "transparent", - "transparent",
- AIWindow.isAIWindowActive(window) && - AIWindow.isAIWindowActive(window) &&
- AIWindow.isAIWindowContentPage(aLocation) - AIWindow.isAIWindowContentPage(aLocation)
@@ -1166,4 +1132,14 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
- } - }
} }
let userContextId = this._browser.getAttribute("usercontextid") || 0; let userContextId = this.mBrowser.getAttribute("usercontextid") || 0;
@@ -10587,7 +10849,8 @@ var TabContextMenu = {
);
contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !this.multiselected;
-
+ gZenViewSplitter.updateContextMenuItems();
+ gZenPinnedTabManager.updatePinnedTabContextMenu(this.contextTab);
// Build Ask Chat items
TabContextMenu.GenAI.buildTabMenu(
document.getElementById("context_askChat"),

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e356c9f8c6f 100644 index e78fa0dec83424c0059c081f83fda0d23bdb5a94..a7de584d9029ff9e55d809d50377593e398ee999 100644
--- a/browser/components/tabbrowser/content/tabgroup.js --- a/browser/components/tabbrowser/content/tabgroup.js
+++ b/browser/components/tabbrowser/content/tabgroup.js +++ b/browser/components/tabbrowser/content/tabgroup.js
@@ -14,11 +14,11 @@ @@ -14,11 +14,11 @@
@@ -129,7 +129,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
} }
get color() { get color() {
@@ -330,6 +361,9 @@ @@ -335,6 +366,9 @@
} }
set collapsed(val) { set collapsed(val) {
@@ -139,7 +139,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
if (!!val == this.collapsed) { if (!!val == this.collapsed) {
return; return;
} }
@@ -416,7 +450,6 @@ @@ -421,7 +455,6 @@
tabGroupName, tabGroupName,
}) })
.then(result => { .then(result => {
@@ -147,7 +147,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
}); });
} }
@@ -491,13 +524,68 @@ @@ -496,13 +529,68 @@
* @returns {MozTabbrowserTab[]} * @returns {MozTabbrowserTab[]}
*/ */
get tabs() { get tabs() {
@@ -221,17 +221,15 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
} }
/** /**
@@ -617,9 +705,6 @@ @@ -610,7 +698,6 @@
}); );
} else { } else {
if (tabOrSplitView.pinned) { if (tabOrSplitView.pinned) {
- tabOrSplitView.documentGlobal.gBrowser.unpinTab(tabOrSplitView, { - tabOrSplitView.documentGlobal.gBrowser.unpinTab(tabOrSplitView);
- metricsContext,
- });
} }
let tabToMove = let tabToMove =
this.documentGlobal === tabOrSplitView.documentGlobal this.documentGlobal === tabOrSplitView.documentGlobal
@@ -682,7 +767,7 @@ @@ -679,7 +766,7 @@
*/ */
on_click(event) { on_click(event) {
let isToggleElement = let isToggleElement =
@@ -240,7 +238,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
event.target === this.#overflowCountLabel; event.target === this.#overflowCountLabel;
if (isToggleElement && event.button === 0) { if (isToggleElement && event.button === 0) {
event.preventDefault(); event.preventDefault();
@@ -761,5 +846,6 @@ @@ -758,5 +845,6 @@
} }
} }

View File

@@ -0,0 +1,21 @@
diff --git a/browser/components/urlbar/UrlbarController.sys.mjs b/browser/components/urlbar/UrlbarController.sys.mjs
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 {
const isMac = AppConstants.platform == "macosx";
// Handle readline/emacs-style navigation bindings on Mac.
if (
- isMac &&
this.view.isOpen &&
event.ctrlKey &&
(event.key == "n" || event.key == "p")
@@ -494,6 +493,8 @@ export class UrlbarController {
});
}
event.preventDefault();
+ } else if (!this.input.value && !(event.ctrlKey || event.altKey || event.shiftKey)) {
+ this.browserWindow.gZenUIManager.enableCommandsMode(event);
}
break;
}

View File

@@ -1,14 +1,14 @@
diff --git a/browser/components/urlbar/UrlbarMuxerStandard.sys.mjs b/browser/components/urlbar/UrlbarMuxerStandard.sys.mjs diff --git a/browser/components/urlbar/UrlbarMuxerStandard.sys.mjs b/browser/components/urlbar/UrlbarMuxerStandard.sys.mjs
index 65bd41b2ea14c26d490632d4a5348d6cf33ee9dd..80fbd685156949b6c7e93ed9d0ef56350dd1a0fe 100644 index 16041c10755adced9d665539796737a9f55712de..2232bdcc02e20dbb384ca0529a8bd8ce73dc6284 100644
--- a/browser/components/urlbar/UrlbarMuxerStandard.sys.mjs --- a/browser/components/urlbar/UrlbarMuxerStandard.sys.mjs
+++ b/browser/components/urlbar/UrlbarMuxerStandard.sys.mjs +++ b/browser/components/urlbar/UrlbarMuxerStandard.sys.mjs
@@ -925,11 +925,16 @@ class MuxerUnifiedComplete extends UrlbarMuxer { @@ -837,11 +837,16 @@ class MuxerUnifiedComplete extends UrlbarMuxer {
result.providerName == "UrlbarProviderHeuristicFallback" && result.providerName == "UrlbarProviderHeuristicFallback" &&
state.context.heuristicResult?.providerName != state.context.heuristicResult?.providerName !=
"UrlbarProviderHeuristicFallback" "UrlbarProviderHeuristicFallback"
+ && !( + && !(
+ result.type == lazy.UrlbarShared.RESULT_TYPE.SEARCH && + result.type == UrlbarUtils.RESULT_TYPE.SEARCH &&
+ state.context.heuristicResult?.type == lazy.UrlbarShared.RESULT_TYPE.URL + state.context.heuristicResult?.type == UrlbarUtils.RESULT_TYPE.URL
+ ) + )
) { ) {
return false; return false;
@@ -19,11 +19,11 @@ index 65bd41b2ea14c26d490632d4a5348d6cf33ee9dd..80fbd685156949b6c7e93ed9d0ef5635
// Discard the result if a tab-to-search result was added already. // Discard the result if a tab-to-search result was added already.
if (!state.canAddTabToSearch) { if (!state.canAddTabToSearch) {
return false; return false;
@@ -1593,7 +1598,9 @@ class MuxerUnifiedComplete extends UrlbarMuxer { @@ -1491,7 +1496,9 @@ class MuxerUnifiedComplete extends UrlbarMuxer {
usedLimits.maxResultCount++; usedLimits.maxResultCount++;
} }
+ if (!(result.heuristic && result.source == lazy.UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS)) { + if (!(result.heuristic && result.source == UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS)) {
state.usedResultSpan += span; state.usedResultSpan += span;
+ } + }
this._updateStatePostAdd(result, state); this._updateStatePostAdd(result, state);

View File

@@ -1,18 +1,8 @@
diff --git a/browser/components/urlbar/UrlbarPrefs.sys.mjs b/browser/components/urlbar/UrlbarPrefs.sys.mjs diff --git a/browser/components/urlbar/UrlbarPrefs.sys.mjs b/browser/components/urlbar/UrlbarPrefs.sys.mjs
index 89f0d44d462de3d7d0f581d6371606f475443822..0d45ce5f6455e9c7276c54f504906bade5b3d286 100644 index 2d21248256c6c2bfb8dac958133c10e3251ef564..f788bd10ec2c08e4b27b77cd3bb0489fb04e8b7a 100644
--- a/browser/components/urlbar/UrlbarPrefs.sys.mjs --- a/browser/components/urlbar/UrlbarPrefs.sys.mjs
+++ b/browser/components/urlbar/UrlbarPrefs.sys.mjs +++ b/browser/components/urlbar/UrlbarPrefs.sys.mjs
@@ -163,6 +163,9 @@ const PREF_URLBAR_DEFAULTS = /** @type {PreferenceDefinition[]} */ ([ @@ -462,6 +462,7 @@ const PREF_URLBAR_DEFAULTS = /** @type {PreferenceDefinition[]} */ ([
// Feature gate pref for flight status suggestions in the urlbar.
["flightStatus.featureGate", false],
+ // Whether to close the urlbar when blurring the window while the urlbar is focused.
+ ["closeOnWindowBlur", true],
+
// The minimum prefix length of a flight status keyword the user must type to
// trigger the suggestion. 0 means the min length should be taken from Nimbus
// or remote settings.
@@ -482,6 +485,7 @@ const PREF_URLBAR_DEFAULTS = /** @type {PreferenceDefinition[]} */ ([
["shortcuts.tabs", true], ["shortcuts.tabs", true],
["shortcuts.history", true], ["shortcuts.history", true],
["shortcuts.actions", true], ["shortcuts.actions", true],
@@ -20,7 +10,7 @@ index 89f0d44d462de3d7d0f581d6371606f475443822..0d45ce5f6455e9c7276c54f504906bad
// Boolean to determine if the providers defined in `exposureResults` // Boolean to determine if the providers defined in `exposureResults`
// should be displayed in search results. This can be set by a // should be displayed in search results. This can be set by a
@@ -840,6 +844,8 @@ function makeDefaultResultGroups({ @@ -799,6 +800,8 @@ function makeDefaultResultGroups({ showSearchSuggestionsFirst }) {
*/ */
let rootGroup = { let rootGroup = {
children: [ children: [

View File

@@ -1,35 +1,35 @@
diff --git a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs diff --git a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
index 67f51c7996c24549f39594c9a518bc5316350ce7..d66969f2411bb687c15448ad828b64ddf43c3389 100644 index 8de151f473ac6b95bc606251f78a4bede093ee0c..dbd302259c54b0196a370b9ff12ba0dcf1545272 100644
--- a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs --- a/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
+++ b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs +++ b/browser/components/urlbar/UrlbarProvidersManager.sys.mjs
@@ -914,6 +914,7 @@ export class Query { @@ -913,6 +913,7 @@ export class Query {
if ( if (
result.heuristic && result.heuristic &&
this.context.searchMode && this.context.searchMode &&
+ !(this.context.searchMode.source === lazy.UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS && result.payload?.zenAction) && + !(this.context.searchMode.source === lazy.UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS && result.payload?.zenAction) &&
(!this.context.trimmedSearchString || (!this.context.trimmedSearchString ||
(!this.context.searchMode.engineName && !result.autofill)) (!this.context.searchMode.engineName && !result.autofill))
) { ) {
@@ -1060,6 +1061,7 @@ function updateSourcesIfEmpty(context) { @@ -1043,6 +1044,7 @@ function updateSourcesIfEmpty(context) {
lazy.UrlbarShared.TOKEN_TYPE.RESTRICT_TITLE, lazy.UrlbarTokenizer.TYPE.RESTRICT_TITLE,
lazy.UrlbarShared.TOKEN_TYPE.RESTRICT_URL, lazy.UrlbarTokenizer.TYPE.RESTRICT_URL,
lazy.UrlbarShared.TOKEN_TYPE.RESTRICT_ACTION, lazy.UrlbarTokenizer.TYPE.RESTRICT_ACTION,
+ lazy.UrlbarShared.TOKEN_TYPE.RESTRICT_WORKSPACE, + lazy.UrlbarTokenizer.TYPE.RESTRICT_WORKSPACE,
].includes(t.type) ].includes(t.type)
); );
@@ -1119,6 +1121,14 @@ function updateSourcesIfEmpty(context) { @@ -1100,6 +1102,14 @@ function updateSourcesIfEmpty(context) {
acceptedSources.push(source); acceptedSources.push(source);
} }
break; break;
+ case lazy.UrlbarShared.RESULT_SOURCE.WORKSPACES: + case lazy.UrlbarUtils.RESULT_SOURCE.WORKSPACES:
+ if ( + if (
+ restrictTokenType === lazy.UrlbarShared.TOKEN_TYPE.RESTRICT_WORKSPACE || + restrictTokenType === lazy.UrlbarTokenizer.TYPE.RESTRICT_WORKSPACE ||
+ !restrictTokenType + !restrictTokenType
+ ) { + ) {
+ acceptedSources.push(source); + acceptedSources.push(source);
+ } + }
+ break; + break;
case lazy.UrlbarShared.RESULT_SOURCE.OTHER_LOCAL: case lazy.UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL:
case lazy.UrlbarShared.RESULT_SOURCE.ADDON: case lazy.UrlbarUtils.RESULT_SOURCE.ADDON:
default: default:

View File

@@ -0,0 +1,15 @@
diff --git a/browser/components/urlbar/UrlbarResult.sys.mjs b/browser/components/urlbar/UrlbarResult.sys.mjs
index 21f7938f76375e7230f9509e4932cafa4d0e57f2..ab96b160b6c65da3bf267d9fe2f1f35c7507466e 100644
--- a/browser/components/urlbar/UrlbarResult.sys.mjs
+++ b/browser/components/urlbar/UrlbarResult.sys.mjs
@@ -181,6 +181,10 @@ export class UrlbarResult {
return this.#heuristic;
}
+ set heuristic(value) {
+ this.#heuristic = value;
+ }
+
get hideRowLabel() {
return this.#hideRowLabel;
}

View File

@@ -0,0 +1,28 @@
diff --git a/browser/components/urlbar/UrlbarTokenizer.sys.mjs b/browser/components/urlbar/UrlbarTokenizer.sys.mjs
index d4af0ee5138a69139b94d898fb07e2345172f025..f750aae3f9f0a849ca009784510575b2b7119e6d 100644
--- a/browser/components/urlbar/UrlbarTokenizer.sys.mjs
+++ b/browser/components/urlbar/UrlbarTokenizer.sys.mjs
@@ -66,6 +66,7 @@ export var UrlbarTokenizer = {
// `looksLikeOrigin()` returned `LOOKS_LIKE_ORIGIN.OTHER` for this token. It
// may or may not be an origin.
POSSIBLE_ORIGIN_BUT_SEARCH_ALLOWED: 12,
+ RESTRICT_WORKSPACE: 13,
}),
// The special characters below can be typed into the urlbar to restrict
@@ -83,6 +84,7 @@ export var UrlbarTokenizer = {
TITLE: "#",
URL: "$",
ACTION: ">",
+ WORKSPACE: "`",
}),
// The keys of characters in RESTRICT that will enter search mode.
@@ -97,6 +99,7 @@ export var UrlbarTokenizer = {
if (lazy.UrlbarPrefs.get("scotchBonnet.enableOverride")) {
keys.push(this.RESTRICT.ACTION);
}
+ keys.push(this.RESTRICT.WORKSPACE);
return new Set(keys);
},

View File

@@ -1,9 +1,9 @@
diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs
index 78c76bde00b6b581184cee1cd0e1756e5f2da6a4..94c713470b1240729ef2350d090b0449f3801af4 100644 index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d85a930686 100644
--- a/browser/components/urlbar/UrlbarUtils.sys.mjs --- a/browser/components/urlbar/UrlbarUtils.sys.mjs
+++ b/browser/components/urlbar/UrlbarUtils.sys.mjs +++ b/browser/components/urlbar/UrlbarUtils.sys.mjs
@@ -126,6 +126,8 @@ export var UrlbarUtils = { @@ -109,6 +109,8 @@ export var UrlbarUtils = {
SEMANTIC_HISTORY: "semanticHistory", RESTRICT_SEARCH_KEYWORD: "restrictSearchKeyword",
SUGGESTED_INDEX: "suggestedIndex", SUGGESTED_INDEX: "suggestedIndex",
TAIL_SUGGESTION: "tailSuggestion", TAIL_SUGGESTION: "tailSuggestion",
+ ZEN_ACTION: "zenAction", + ZEN_ACTION: "zenAction",
@@ -11,13 +11,22 @@ index 78c76bde00b6b581184cee1cd0e1756e5f2da6a4..94c713470b1240729ef2350d090b0449
}), }),
// Defines provider types. // Defines provider types.
@@ -274,6 +276,14 @@ export var UrlbarUtils = { @@ -170,6 +172,8 @@ export var UrlbarUtils = {
OTHER_NETWORK: 6,
ADDON: 7,
ACTIONS: 8,
+ ZEN_ACTIONS: 9,
+ WORKSPACES: 10,
}),
// Per-result exposure telemetry.
@@ -319,6 +323,14 @@ export var UrlbarUtils = {
telemetryLabel: "actions", telemetryLabel: "actions",
uiLabel: "urlbar-searchmode-actions3", uiLabel: "urlbar-searchmode-actions2",
}, },
+ { + {
+ source: UrlbarShared.RESULT_SOURCE.WORKSPACES, + source: this.RESULT_SOURCE.WORKSPACES,
+ restrict: UrlbarShared.RESTRICT_TOKENS.WORKSPACE, + restrict: lazy.UrlbarTokenizer.RESTRICT.WORKSPACE,
+ icon: "chrome://browser/skin/zen-icons/selectable/layers.svg", + icon: "chrome://browser/skin/zen-icons/selectable/layers.svg",
+ pref: "shortcuts.workspaces", + pref: "shortcuts.workspaces",
+ telemetryLabel: "workspaces", + telemetryLabel: "workspaces",
@@ -26,12 +35,12 @@ index 78c76bde00b6b581184cee1cd0e1756e5f2da6a4..94c713470b1240729ef2350d090b0449
]); ]);
}, },
@@ -566,6 +576,12 @@ export var UrlbarUtils = { @@ -611,6 +623,12 @@ export var UrlbarUtils = {
return this.RESULT_GROUP.HEURISTIC_FALLBACK; return this.RESULT_GROUP.HEURISTIC_FALLBACK;
case "UrlbarProviderHistoryUrlHeuristic": case "UrlbarProviderHistoryUrlHeuristic":
return this.RESULT_GROUP.HEURISTIC_HISTORY_URL; return this.RESULT_GROUP.HEURISTIC_HISTORY_URL;
+ case "ZenUrlbarProviderGlobalActions": + case "ZenUrlbarProviderGlobalActions":
+ if (result.source == UrlbarShared.RESULT_SOURCE.WORKSPACES) { + if (result.source == this.RESULT_SOURCE.WORKSPACES) {
+ return this.RESULT_GROUP.ZEN_WORKSPACE; + return this.RESULT_GROUP.ZEN_WORKSPACE;
+ } else { + } else {
+ return this.RESULT_GROUP.ZEN_ACTION; + return this.RESULT_GROUP.ZEN_ACTION;

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs diff --git a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
index 7ccffa60be42ba5e554b0e91bc831c56c24dfb42..ca5d6f983490f6cfc392c92f3570a5fb1bb3c43d 100644 index 8def83509f097ba034b9d94ae00d2ee474ec2d30..ebdb84b9af928b132b848bd4c5bb506d813e5e06 100644
--- a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs --- a/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
+++ b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs +++ b/browser/components/urlbar/UrlbarValueFormatter.sys.mjs
@@ -77,7 +77,7 @@ export class UrlbarValueFormatter { @@ -77,7 +77,7 @@ export class UrlbarValueFormatter {
@@ -11,7 +11,7 @@ index 7ccffa60be42ba5e554b0e91bc831c56c24dfb42..ca5d6f983490f6cfc392c92f3570a5fb
}); });
} }
@@ -126,6 +126,18 @@ export class UrlbarValueFormatter { @@ -105,6 +105,18 @@ export class UrlbarValueFormatter {
} }
#ensureFormattedHostVisible(urlMetaData) { #ensureFormattedHostVisible(urlMetaData) {
@@ -30,7 +30,7 @@ index 7ccffa60be42ba5e554b0e91bc831c56c24dfb42..ca5d6f983490f6cfc392c92f3570a5fb
// Make sure the host is always visible. Since it is aligned on // Make sure the host is always visible. Since it is aligned on
// the first strong directional character, we set scrollLeft // the first strong directional character, we set scrollLeft
// appropriately to ensure the domain stays visible in case of an // appropriately to ensure the domain stays visible in case of an
@@ -403,7 +415,7 @@ export class UrlbarValueFormatter { @@ -381,7 +393,7 @@ export class UrlbarValueFormatter {
* @returns {boolean} * @returns {boolean}
* True if formatting was applied and false if not. * True if formatting was applied and false if not.
*/ */
@@ -39,15 +39,11 @@ index 7ccffa60be42ba5e554b0e91bc831c56c24dfb42..ca5d6f983490f6cfc392c92f3570a5fb
let urlMetaData = this.#getUrlMetaData(); let urlMetaData = this.#getUrlMetaData();
if (!urlMetaData) { if (!urlMetaData) {
return false; return false;
@@ -688,9 +700,10 @@ export class UrlbarValueFormatter { @@ -650,6 +662,7 @@ export class UrlbarValueFormatter {
) { this.#window.requestAnimationFrame(() => {
// The host range is no longer valid. if (instance == this.#resizeInstance) {
this.#removeURLFormat(); this.#ensureFormattedHostVisible();
- this.#formatURL(); + this._formatURL();
+ this._formatURL();
} else {
this.#ensureFormattedHostVisible();
+ this._formatURL();
}
} }
}); });
}, 100);

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/urlbar/content/UrlbarView.mjs b/browser/components/urlbar/content/UrlbarView.mjs diff --git a/browser/components/urlbar/UrlbarView.sys.mjs b/browser/components/urlbar/UrlbarView.sys.mjs
index e465806c4ae4fc372d9aa2b71aa7f0e74c65d026..c0b3781901298bedee2736819a93edbf545507a7 100644 index b665adb1a1ce8bbae8df4cbea6c3248c3e4fb431..1de7f9461b8ccbd4680b917e6dd5ba3c02f69a94 100644
--- a/browser/components/urlbar/content/UrlbarView.mjs --- a/browser/components/urlbar/UrlbarView.sys.mjs
+++ b/browser/components/urlbar/content/UrlbarView.mjs +++ b/browser/components/urlbar/UrlbarView.sys.mjs
@@ -803,7 +803,7 @@ export class UrlbarView { @@ -640,7 +640,7 @@ export class UrlbarView {
!this.input.value || !this.input.value ||
this.input.getAttribute("pageproxystate") == "valid" this.input.getAttribute("pageproxystate") == "valid"
) { ) {
@@ -11,7 +11,7 @@ index e465806c4ae4fc372d9aa2b71aa7f0e74c65d026..c0b3781901298bedee2736819a93edbf
// Try to reuse the cached top-sites context. If it's not cached, then // Try to reuse the cached top-sites context. If it's not cached, then
// there will be a gap of time between when the input is focused and // there will be a gap of time between when the input is focused and
// when the view opens that can be perceived as flicker. // when the view opens that can be perceived as flicker.
@@ -941,10 +941,6 @@ export class UrlbarView { @@ -777,10 +777,6 @@ export class UrlbarView {
} }
// If search mode isn't active, close the view. // If search mode isn't active, close the view.
@@ -22,7 +22,7 @@ index e465806c4ae4fc372d9aa2b71aa7f0e74c65d026..c0b3781901298bedee2736819a93edbf
// Search mode is active. If the one-offs should be shown, make sure they // Search mode is active. If the one-offs should be shown, make sure they
// are enabled and show the view. // are enabled and show the view.
@@ -3203,6 +3199,8 @@ export class UrlbarView { @@ -2988,6 +2984,8 @@ export class UrlbarView {
if (row?.hasAttribute("row-selectable")) { if (row?.hasAttribute("row-selectable")) {
row?.toggleAttribute("selected", true); row?.toggleAttribute("selected", true);
} }
@@ -31,7 +31,7 @@ index e465806c4ae4fc372d9aa2b71aa7f0e74c65d026..c0b3781901298bedee2736819a93edbf
if (element != row) { if (element != row) {
row?.toggleAttribute("descendant-selected", true); row?.toggleAttribute("descendant-selected", true);
} }
@@ -3715,7 +3713,7 @@ export class UrlbarView { @@ -3477,7 +3475,7 @@ export class UrlbarView {
} }
#enableOrDisableRowWrap() { #enableOrDisableRowWrap() {
@@ -40,16 +40,3 @@ index e465806c4ae4fc372d9aa2b71aa7f0e74c65d026..c0b3781901298bedee2736819a93edbf
this.#rows.toggleAttribute("wrap", wrap); this.#rows.toggleAttribute("wrap", wrap);
this.oneOffSearchButtons?.container.toggleAttribute("wrap", wrap); this.oneOffSearchButtons?.container.toggleAttribute("wrap", wrap);
} }
@@ -4144,6 +4142,12 @@ export class UrlbarView {
}
on_blur() {
+ if (
+ this.document.commandDispatcher.focusedElement == this.input.inputField &&
+ !lazy.UrlbarPrefs.get("closeOnWindowBlur")
+ ) {
+ return;
+ }
// If the view is open without the input being focused, it will not close
// automatically when the window loses focus. We might be in this state
// after a Search Tip is shown on an engine homepage.

View File

@@ -1,21 +0,0 @@
diff --git a/browser/components/urlbar/content/UrlbarChildController.mjs b/browser/components/urlbar/content/UrlbarChildController.mjs
index a8e9d3093d046612650a17970330a8279f55833f..063a3e8adf009d6c0ddc60430bc0e7485e812b8a 100644
--- a/browser/components/urlbar/content/UrlbarChildController.mjs
+++ b/browser/components/urlbar/content/UrlbarChildController.mjs
@@ -258,7 +258,6 @@ export class UrlbarChildController {
const isMac = AppConstants.platform == "macosx";
// Handle readline/emacs-style navigation bindings on Mac.
if (
- isMac &&
this.view.isOpen &&
event.ctrlKey &&
(event.key == "n" || event.key == "p")
@@ -450,6 +449,8 @@ export class UrlbarChildController {
});
}
event.preventDefault();
+ } else if (!this.input.value && !(event.ctrlKey || event.altKey || event.shiftKey)) {
+ this.window.gZenUIManager.enableCommandsMode(event);
}
break;
}

View File

@@ -1,9 +1,9 @@
diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs
index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c396406a247e9 100644 index 0fba59d62af9d3cd05bfee2cf84cd8b7cf9bfd6e..3997a5109267f378b59aa6510cbacd07ed57bd36 100644
--- a/browser/components/urlbar/content/UrlbarInput.mjs --- a/browser/components/urlbar/content/UrlbarInput.mjs
+++ b/browser/components/urlbar/content/UrlbarInput.mjs +++ b/browser/components/urlbar/content/UrlbarInput.mjs
@@ -101,6 +101,13 @@ const lazy = XPCOMUtils.declareLazy({ @@ -98,6 +98,13 @@ const lazy = XPCOMUtils.declareLazy({
logger: () => UrlbarShared.getLogger({ prefix: "Input" }), logger: () => lazy.UrlbarUtils.getLogger({ prefix: "Input" }),
}); });
+XPCOMUtils.defineLazyPreferenceGetter( +XPCOMUtils.defineLazyPreferenceGetter(
@@ -16,7 +16,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
const UNLIMITED_MAX_RESULTS = 99; const UNLIMITED_MAX_RESULTS = 99;
let getBoundsWithoutFlushing = element => let getBoundsWithoutFlushing = element =>
@@ -769,7 +776,16 @@ ${ @@ -770,7 +777,16 @@ ${
// See _on_select(). HTMLInputElement.select() dispatches a "select" // See _on_select(). HTMLInputElement.select() dispatches a "select"
// event but does not set the primary selection. // event but does not set the primary selection.
this._suppressPrimaryAdjustment = true; this._suppressPrimaryAdjustment = true;
@@ -33,7 +33,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
this._suppressPrimaryAdjustment = false; this._suppressPrimaryAdjustment = false;
} }
@@ -843,6 +859,10 @@ ${ @@ -844,6 +860,10 @@ ${
hideSearchTerms = false, hideSearchTerms = false,
isSameDocument = false, isSameDocument = false,
} = {}) { } = {}) {
@@ -44,7 +44,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
if (!this.#isAddressbar) { if (!this.#isAddressbar) {
throw new Error( throw new Error(
"Cannot set URI for UrlbarInput that is not an address bar" "Cannot set URI for UrlbarInput that is not an address bar"
@@ -1137,7 +1157,16 @@ ${ @@ -1138,7 +1158,16 @@ ${
this.searchModeSwitcher?.updateSearchIcon(); this.searchModeSwitcher?.updateSearchIcon();
} }
@@ -61,10 +61,10 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
} }
/** /**
@@ -1626,7 +1655,11 @@ ${ @@ -1627,7 +1656,11 @@ ${
openParams.avoidBrowserFocus = keepViewOpen; }
if (!this.#providesSearchMode(result) && !keepViewOpen) { if (!this.#providesSearchMode(result)) {
- this.view.close({ elementPicked: true }); - this.view.close({ elementPicked: true });
+ if (this._zenHandleUrlbarClose) { + if (this._zenHandleUrlbarClose) {
+ this._zenHandleUrlbarClose(true, true); + this._zenHandleUrlbarClose(true, true);
@@ -74,7 +74,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
} }
if (isCanonized) { if (isCanonized) {
@@ -2974,6 +3007,42 @@ ${ @@ -2936,6 +2969,42 @@ ${
await this.#updateLayoutBreakoutDimensions(); await this.#updateLayoutBreakoutDimensions();
} }
@@ -117,9 +117,9 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
startLayoutExtend() { startLayoutExtend() {
if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) { if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
// Do not expand if the Urlbar does not support being expanded or it is // Do not expand if the Urlbar does not support being expanded or it is
@@ -2988,6 +3057,13 @@ ${ @@ -2954,6 +3023,13 @@ ${
this.toggleAttribute("breakout-extend", true); this.toggleAttribute("breakout-extend", true);
this.#updateTextboxPosition();
+ this.window.gZenUIManager.onUrlbarOpen(); + this.window.gZenUIManager.onUrlbarOpen();
+ if (this.zenUrlbarBehavior == 'float' || (this.zenUrlbarBehavior == 'floating-on-type' && !this.focusedViaMousedown)) { + if (this.zenUrlbarBehavior == 'float' || (this.zenUrlbarBehavior == 'floating-on-type' && !this.focusedViaMousedown)) {
@@ -131,7 +131,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
// Enable the animation only after the first extend call to ensure it // Enable the animation only after the first extend call to ensure it
// doesn't run when opening a new window. // doesn't run when opening a new window.
if (!this.hasAttribute("breakout-extend-animate")) { if (!this.hasAttribute("breakout-extend-animate")) {
@@ -3011,6 +3087,29 @@ ${ @@ -2981,6 +3057,29 @@ ${
return; return;
} }
@@ -161,7 +161,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
this.toggleAttribute("breakout-extend", false); this.toggleAttribute("breakout-extend", false);
this.#updateTextboxPosition(); this.#updateTextboxPosition();
} }
@@ -3049,7 +3148,7 @@ ${ @@ -3028,7 +3127,7 @@ ${
forceUnifiedSearchButtonAvailable = false forceUnifiedSearchButtonAvailable = false
) { ) {
let prevState = this.getAttribute("pageproxystate"); let prevState = this.getAttribute("pageproxystate");
@@ -170,7 +170,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
this.setAttribute("pageproxystate", state); this.setAttribute("pageproxystate", state);
this._inputContainer.setAttribute("pageproxystate", state); this._inputContainer.setAttribute("pageproxystate", state);
this._identityBox?.setAttribute("pageproxystate", state); this._identityBox?.setAttribute("pageproxystate", state);
@@ -3332,10 +3431,12 @@ ${ @@ -3309,10 +3408,12 @@ ${
} }
this.style.top = px( this.style.top = px(
@@ -183,7 +183,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
); );
} }
@@ -3394,9 +3495,10 @@ ${ @@ -3371,9 +3472,10 @@ ${
return; return;
} }
@@ -195,7 +195,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
); );
this.style.setProperty( this.style.setProperty(
"--urlbar-height", "--urlbar-height",
@@ -3902,6 +4004,7 @@ ${ @@ -3878,6 +3980,7 @@ ${
} }
_toggleActionOverride(event) { _toggleActionOverride(event) {
@@ -203,7 +203,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
if ( if (
event.keyCode == KeyEvent.DOM_VK_SHIFT || event.keyCode == KeyEvent.DOM_VK_SHIFT ||
event.keyCode == KeyEvent.DOM_VK_ALT || event.keyCode == KeyEvent.DOM_VK_ALT ||
@@ -4014,8 +4117,8 @@ ${ @@ -3990,8 +4093,8 @@ ${
if (!this.#isAddressbar) { if (!this.#isAddressbar) {
return val; return val;
} }
@@ -214,15 +214,15 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
: val; : val;
// Only trim value if the directionality doesn't change to RTL and we're not // Only trim value if the directionality doesn't change to RTL and we're not
// showing a strikeout https protocol. // showing a strikeout https protocol.
@@ -4317,6 +4420,7 @@ ${ @@ -4290,6 +4393,7 @@ ${
browser = this.window.gBrowser.selectedBrowser, resultDetails = null,
keepViewOpen = false browser = this.window.gBrowser.selectedBrowser
) { ) {
+ openUILinkWhere = this.window.gZenUIManager.getOpenUILinkWhere(url, browser, openUILinkWhere); + openUILinkWhere = this.window.gZenUIManager.getOpenUILinkWhere(url, browser, openUILinkWhere);
if (this.#isAddressbar) { if (this.#isAddressbar) {
this.#prepareAddressbarLoad( this.#prepareAddressbarLoad(
url, url,
@@ -4430,6 +4534,10 @@ ${ @@ -4401,6 +4505,10 @@ ${
} }
reuseEmpty = true; reuseEmpty = true;
} }
@@ -233,7 +233,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
if ( if (
where == "tab" && where == "tab" &&
reuseEmpty && reuseEmpty &&
@@ -4437,6 +4545,9 @@ ${ @@ -4408,6 +4516,9 @@ ${
) { ) {
where = "current"; where = "current";
} }
@@ -243,7 +243,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
return where; return where;
} }
@@ -4691,6 +4802,7 @@ ${ @@ -4662,6 +4773,7 @@ ${
this.setResultForCurrentValue(null); this.setResultForCurrentValue(null);
this.handleCommand(); this.handleCommand();
this.controller.clearLastQueryContextCache(); this.controller.clearLastQueryContextCache();
@@ -251,7 +251,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
this._suppressStartQuery = false; this._suppressStartQuery = false;
}); });
@@ -4698,7 +4810,6 @@ ${ @@ -4669,7 +4781,6 @@ ${
contextMenu.addEventListener("popupshowing", () => { contextMenu.addEventListener("popupshowing", () => {
// Close the results pane when the input field contextual menu is open, // Close the results pane when the input field contextual menu is open,
// because paste and go doesn't want a result selection. // because paste and go doesn't want a result selection.
@@ -259,7 +259,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
let controller = let controller =
this.document.commandDispatcher.getControllerForCommand("cmd_paste"); this.document.commandDispatcher.getControllerForCommand("cmd_paste");
@@ -4979,7 +5090,11 @@ ${ @@ -4825,7 +4936,11 @@ ${
if (!engineName && !source && !this.hasAttribute("searchmode")) { if (!engineName && !source && !this.hasAttribute("searchmode")) {
return; return;
} }
@@ -272,7 +272,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
if (this._searchModeIndicatorTitle) { if (this._searchModeIndicatorTitle) {
this._searchModeIndicatorTitle.textContent = ""; this._searchModeIndicatorTitle.textContent = "";
this._searchModeIndicatorTitle.removeAttribute("data-l10n-id"); this._searchModeIndicatorTitle.removeAttribute("data-l10n-id");
@@ -5297,6 +5412,7 @@ ${ @@ -5141,6 +5256,7 @@ ${
this.document.l10n.setAttributes( this.document.l10n.setAttributes(
this.inputField, this.inputField,
@@ -280,20 +280,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
l10nId, l10nId,
l10nId == "urlbar-placeholder-with-name" l10nId == "urlbar-placeholder-with-name"
? { name: engineName } ? { name: engineName }
@@ -5347,6 +5463,12 @@ ${ @@ -5264,6 +5380,11 @@ ${
}
lazy.logger.debug("Blur Event");
+ if (
+ this.document.commandDispatcher.focusedElement == this.inputField &&
+ !lazy.UrlbarPrefs.get("closeOnWindowBlur")
+ ) {
+ return;
+ }
// We cannot count every blur events after a missed engagement as abandoment
// because the user may have clicked on some view element that executes
// a command causing a focus change. For example opening preferences from
@@ -5424,6 +5546,11 @@ ${
} }
_on_click(event) { _on_click(event) {
@@ -305,11 +292,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
switch (event.target) { switch (event.target) {
case this.inputField: case this.inputField:
case this._inputContainer: case this._inputContainer:
@@ -5513,10 +5640,11 @@ ${ @@ -5356,7 +5477,7 @@ ${
}
if (untrim) {
this.setValue(this._untrimmedValue);
+ this.setSelectionRange(0, this.value.length);
} }
} }
@@ -318,7 +301,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
this.view.autoOpen({ event }); this.view.autoOpen({ event });
} else { } else {
if (this._untrimOnFocusAfterKeydown) { if (this._untrimOnFocusAfterKeydown) {
@@ -5556,9 +5684,16 @@ ${ @@ -5396,9 +5517,16 @@ ${
} }
_on_mousedown(event) { _on_mousedown(event) {
@@ -336,7 +319,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
if ( if (
event.composedTarget != this.inputField && event.composedTarget != this.inputField &&
event.composedTarget != this._inputContainer event.composedTarget != this._inputContainer
@@ -5568,6 +5703,10 @@ ${ @@ -5408,6 +5536,10 @@ ${
this.focusedViaMousedown = !this.focused; this.focusedViaMousedown = !this.focused;
this.#preventClickSelectsAll = this.focused; this.#preventClickSelectsAll = this.focused;
@@ -347,21 +330,21 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..95e4333866a5f0d41fbdbe23910c3964
// Keep the focus status, since the attribute may be changed // Keep the focus status, since the attribute may be changed
// upon calling this.focus(). // upon calling this.focus().
@@ -5605,7 +5744,7 @@ ${ @@ -5443,7 +5575,7 @@ ${
}
// Don't close the view when clicking on a tab; we may want to keep the
// view open on tab switch, and the TabSelect event arrived earlier. // view open on tab switch, and the TabSelect event arrived earlier.
// Also ignore mousedown on the urlbarView context menu: opening/closing the - if (event.target.closest?.("tab")) {
// view is already handled by the result opening flow. + if (event.target.closest?.("tab") || event.target.closest?.("#tabs-newtab-button")) {
- if (event.target.closest?.("tab, #urlbarView-context-menu")) {
+ if (event.target.closest?.("tab, #urlbarView-context-menu") || event.target.closest?.("#tabs-newtab-button")) {
break; break;
} }
@@ -5894,7 +6033,7 @@ ${ @@ -5732,7 +5864,7 @@ ${
// When we are in actions search mode we can show more results so // When we are in actions search mode we can show more results so
// increase the limit. // increase the limit.
let maxResults = let maxResults =
- this.searchMode?.source != UrlbarShared.RESULT_SOURCE.ACTIONS - this.searchMode?.source != lazy.UrlbarUtils.RESULT_SOURCE.ACTIONS
+ this.searchMode?.source != UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS + this.searchMode?.source != lazy.UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS
? lazy.UrlbarPrefs.get("maxRichResults") ? lazy.UrlbarPrefs.get("maxRichResults")
: UNLIMITED_MAX_RESULTS; : UNLIMITED_MAX_RESULTS;
let options = { let options = {

View File

@@ -1,15 +0,0 @@
diff --git a/browser/components/urlbar/content/UrlbarResult.mjs b/browser/components/urlbar/content/UrlbarResult.mjs
index 30662cbb0551a5efe12926eb1524719ece24ee48..1ed598c8b8c0836759b5af10e6cc9f5e334744ef 100644
--- a/browser/components/urlbar/content/UrlbarResult.mjs
+++ b/browser/components/urlbar/content/UrlbarResult.mjs
@@ -184,6 +184,10 @@ export class UrlbarResult {
return this.#heuristic;
}
+ set heuristic(value) {
+ this.#heuristic = value;
+ }
+
get hideRowLabel() {
return this.#hideRowLabel;
}

View File

@@ -1,37 +0,0 @@
diff --git a/browser/components/urlbar/content/UrlbarShared.mjs b/browser/components/urlbar/content/UrlbarShared.mjs
index 5b45afb747bfcdbd06782186737669aa2c4c634d..f68bd009f70415b5fb513abdfe19b4427ceefbfc 100644
--- a/browser/components/urlbar/content/UrlbarShared.mjs
+++ b/browser/components/urlbar/content/UrlbarShared.mjs
@@ -47,6 +47,7 @@ export const UrlbarShared = {
// `looksLikeOrigin()` returned `LOOKS_LIKE_ORIGIN.OTHER` for this token.
// It may or may not be an origin.
POSSIBLE_ORIGIN_BUT_SEARCH_ALLOWED: 12,
+ RESTRICT_WORKSPACE: 13,
}),
/**
@@ -67,6 +68,7 @@ export const UrlbarShared = {
TITLE: "#",
URL: "$",
ACTION: ">",
+ WORKSPACE: "`",
}),
// Defines UrlbarResult types.
@@ -112,6 +114,8 @@ export const UrlbarShared = {
OTHER_NETWORK: 6,
ADDON: 7,
ACTIONS: 8,
+ ZEN_ACTIONS: 9,
+ WORKSPACES: 10,
}),
/**
@@ -128,6 +132,7 @@ export const UrlbarShared = {
if (lazy.UrlbarPrefs.get("scotchBonnet.enableOverride")) {
keys.push(this.RESTRICT_TOKENS.ACTION);
}
+ keys.push(this.RESTRICT_TOKENS.WORKSPACE);
return new Set(keys);
},

View File

@@ -1,11 +1,11 @@
diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
index e735ec80b56e1a2da4bc5bec29136ce60353277b..330ea62d220d9acd96a95a605888839388e97452 100644 index 5e5d39787674d1d5ac8c39edccb04f8b8993fbb8..6c8b483ad19d9b26232592c68a7f2a6887161057 100644
--- a/browser/themes/linux/browser.css --- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css
@@ -14,7 +14,6 @@ @@ -14,7 +14,6 @@
@media (-moz-gtk-theme-family) { @media (-moz-gtk-theme-family) {
--tabs-navbar-separator-style: none; --tabs-navbar-separator-style: none;
@media (prefers-color-scheme: light) and (not -moz-pref("browser.nova.enabled")) { @media (prefers-color-scheme: light) {
- --urlbar-box-background-color: #fafafa; - --urlbar-box-background-color: #fafafa;
} }
} }

View File

@@ -1,18 +1,18 @@
diff --git a/browser/themes/shared/identity-block/identity-block.css b/browser/themes/shared/identity-block/identity-block.css diff --git a/browser/themes/shared/identity-block/identity-block.css b/browser/themes/shared/identity-block/identity-block.css
index 82c3e319f783e6383ce437131808bbde14293379..6b4444b8ad68664f746be057aae4c59e01e8d170 100644 index f239438ce661ae2c33a3e04ecc6d403b3a56a42b..c3a237aa78cff7aaaf0a7b931dd2b4d99049c051 100644
--- a/browser/themes/shared/identity-block/identity-block.css --- a/browser/themes/shared/identity-block/identity-block.css
+++ b/browser/themes/shared/identity-block/identity-block.css +++ b/browser/themes/shared/identity-block/identity-block.css
@@ -12,7 +12,7 @@ @@ -7,7 +7,7 @@
}
#identity-box { #identity-box {
margin-inline-end: var(--identity-box-margin-inline);
- &[pageproxystate="invalid"] { - &[pageproxystate="invalid"] {
+ :root[zen-has-empty-tab='true'] & { + :root[zen-has-empty-tab='true'] & {
pointer-events: none; pointer-events: none;
-moz-user-focus: ignore; -moz-user-focus: ignore;
}
@@ -96,13 +96,6 @@ @@ -85,13 +85,6 @@
margin: 0; }
} }
-#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button, -#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button,
@@ -25,7 +25,7 @@ index 82c3e319f783e6383ce437131808bbde14293379..6b4444b8ad68664f746be057aae4c59e
#urlbar[focused] { #urlbar[focused] {
#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button:not(:hover, [open]), #identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button:not(:hover, [open]),
@@ -193,16 +186,17 @@ @@ -182,16 +175,17 @@
} }
#identity-icon { #identity-icon {

View File

@@ -1,10 +1,11 @@
diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn
index 7892988bd5994d5183d25bf575d486f89ac888d0..a837672bb2fa1a404640fc8b2908fe4bd68d3c04 100644 index e3bdc11e449fb2cd2a4033a1d8c1bba00455e748..f928bc1a3a668dcc1a9ecde9945c6349e5903828 100644
--- a/browser/themes/shared/jar.inc.mn --- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn +++ b/browser/themes/shared/jar.inc.mn
@@ -357,3 +357,5 @@ @@ -352,3 +352,5 @@
skin/classic/browser/illustrations/market-opt-in.svg (../shared/illustrations/market-opt-in.svg) skin/classic/browser/illustrations/market-opt-in.svg (../shared/illustrations/market-opt-in.svg)
skin/classic/browser/illustrations/tab-groups.svg (../shared/illustrations/tab-groups.svg)
skin/classic/browser/illustrations/yelpRealtime-opt-in.svg (../shared/illustrations/yelpRealtime-opt-in.svg) skin/classic/browser/illustrations/yelpRealtime-opt-in.svg (../shared/illustrations/yelpRealtime-opt-in.svg)
+ +
+#include zen-sources.inc.mn +#include zen-sources.inc.mn
\ No newline at end of file

View File

@@ -1,21 +0,0 @@
diff --git a/browser/themes/shared/places/organizer-shared.css b/browser/themes/shared/places/organizer-shared.css
index fe6b79cfc2453927c324a044bd62040f866def95..a93813c76ba3633c365a739289b39187c0d1e881 100644
--- a/browser/themes/shared/places/organizer-shared.css
+++ b/browser/themes/shared/places/organizer-shared.css
@@ -52,6 +52,16 @@
}
}
+#places .zenEditBMPanel_fieldContainer {
+ display: contents;
+}
+
+#places label[control="editBMPanel_workspacesSelectorExpander"],
+#places #editBMPanel_workspaceDropdown,
+#places #editBMPanel_workspaceList {
+ display: none;
+}
+
#editBMPanel_itemsCountText {
grid-column: auto / span 2;
justify-self: center;

View File

@@ -484,10 +484,13 @@ groupbox h2 {
#helpButton, #helpButton,
#support-firefox, #support-firefox,
#tabGroupSuggestions, #tabGroupSuggestions,
#web-appearance-manage-themes-link,
#setting-control-sidebarChatbotFieldset, #setting-control-sidebarChatbotFieldset,
#aiControlsDescription,
#category-ai-features,
#setting-control-supportFirefox, #setting-control-supportFirefox,
.mission-message, .mission-message,
html|setting-group:is([data-subcategory="layout"], [groupid="support"], [groupid="browserTheme"]) { html|setting-group:is([data-subcategory="layout"], [groupid="support"]) {
display: none !important; display: none !important;
} }

View File

@@ -1,16 +1,16 @@
diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css
index 3acdec2b8e043fe27919cfa54e73f4d3c491bfc8..267a1087134464a8193a824a2d7f8ac15ff8ad60 100644 index dff8162a84dbbe6873fa771828698b47b80d0472..e0c378af7a5cc607c2de1c9b5693adb04ac6adbd 100644
--- a/browser/themes/shared/tabbrowser/content-area.css --- a/browser/themes/shared/tabbrowser/content-area.css
+++ b/browser/themes/shared/tabbrowser/content-area.css +++ b/browser/themes/shared/tabbrowser/content-area.css
@@ -157,7 +157,6 @@ @@ -171,7 +171,6 @@
min-height: 0; min-height: 0;
/* We want to be able to show the frame color behind the clipped radiused corner */ /* We want to be able to show the frame color behind the clipped radiused corner */
- background: var(--tabpanel-background-color); - background: var(--tabpanel-background-color);
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("sidebar.revamp") { @media -moz-pref("sidebar.revamp") {
outline: 0.01px solid var(--chrome-content-separator-color); @@ -235,7 +234,6 @@
@@ -216,7 +215,6 @@
} }
browser:is([blank], [pendingpaint]) { browser:is([blank], [pendingpaint]) {
@@ -18,7 +18,7 @@ index 3acdec2b8e043fe27919cfa54e73f4d3c491bfc8..267a1087134464a8193a824a2d7f8ac1
} }
/* Exclude browsers with smartwindow-content attribute which inherit /* Exclude browsers with smartwindow-content attribute which inherit
@@ -553,7 +551,7 @@ split-view-footer { @@ -555,7 +553,7 @@ split-view-footer {
.dialogStack { .dialogStack {
z-index: var(--browser-stack-z-index-dialog-stack); z-index: var(--browser-stack-z-index-dialog-stack);
@@ -27,7 +27,7 @@ index 3acdec2b8e043fe27919cfa54e73f4d3c491bfc8..267a1087134464a8193a824a2d7f8ac1
inset: 0; inset: 0;
/* --browser-with-dialog set on browser[tabDialogShowing], we want to position the overlay /* --browser-with-dialog set on browser[tabDialogShowing], we want to position the overlay
only on the top of the <browser> element so it doesn't overlap the DevTools toolbox */ only on the top of the <browser> element so it doesn't overlap the DevTools toolbox */
@@ -718,7 +716,7 @@ split-view-footer { @@ -722,7 +720,7 @@ split-view-footer {
.dialogOverlay[topmost="true"], .dialogOverlay[topmost="true"],
#window-modal-dialog::backdrop { #window-modal-dialog::backdrop {

View File

@@ -1,8 +1,8 @@
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f253804576e 100644 index b70af17781a4128593e3c092cf0f6aec81ab5f9a..1c11c2bf9dcde9d468959e9115a48cf272870987 100644
--- a/browser/themes/shared/tabbrowser/tabs.css --- a/browser/themes/shared/tabbrowser/tabs.css
+++ b/browser/themes/shared/tabbrowser/tabs.css +++ b/browser/themes/shared/tabbrowser/tabs.css
@@ -45,7 +45,7 @@ @@ -34,7 +34,7 @@
--tab-group-line-thickness: 2px; --tab-group-line-thickness: 2px;
--tab-group-line-toolbar-border-distance: 1px; --tab-group-line-toolbar-border-distance: 1px;
/* Collapsed tabs should be square, so set width to match the min height */ /* Collapsed tabs should be square, so set width to match the min height */
@@ -11,7 +11,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
--tab-collapsed-width: calc(var(--tab-collapsed-background-width) + 2 * var(--tab-inner-inline-margin)); --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-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); --tab-note-icon-end-margin: var(--dimension-4);
@@ -295,7 +295,6 @@ tab-split-view-wrapper[dragtarget] { @@ -285,7 +285,6 @@ tab-split-view-wrapper[dragtarget] {
} }
:root:not([uidensity="compact"], [sidebar-expand-on-hover]) &[pinned] { :root:not([uidensity="compact"], [sidebar-expand-on-hover]) &[pinned] {
@@ -19,7 +19,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
} }
&:is([selected], [multiselected]) { &:is([selected], [multiselected]) {
@@ -309,6 +308,7 @@ tab-split-view-wrapper[dragtarget] { @@ -299,6 +298,7 @@ tab-split-view-wrapper[dragtarget] {
border-radius: inherit; border-radius: inherit;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@@ -27,8 +27,8 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
&::before { &::before {
position: absolute; position: absolute;
@@ -506,10 +506,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") { @media -moz-pref("browser.tabs.fadeOutUnloadedTabs") {
&[pending] { &[pending] {
- filter: grayscale(100%); - filter: grayscale(100%);
@@ -38,8 +38,8 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
opacity: 0.5; opacity: 0.5;
/* Fade the favicon out */ /* Fade the favicon out */
transition-property: filter, opacity; transition-property: filter, opacity;
@@ -525,10 +521,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") { @media -moz-pref("browser.tabs.fadeOutExplicitlyUnloadedTabs") {
&[pending][discarded] { &[pending][discarded] {
- filter: grayscale(100%); - filter: grayscale(100%);
@@ -49,7 +49,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
opacity: 0.5; opacity: 0.5;
/* Fade the favicon out */ /* Fade the favicon out */
transition-property: filter, opacity; transition-property: filter, opacity;
@@ -602,7 +594,7 @@ tab-split-view-wrapper[dragtarget] { @@ -596,7 +588,7 @@ tab-split-view-wrapper[dragtarget] {
} }
#tabbrowser-tabs[orient="vertical"] & { #tabbrowser-tabs[orient="vertical"] & {
@@ -58,7 +58,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
} }
&[crashed] { &[crashed] {
@@ -610,7 +602,7 @@ tab-split-view-wrapper[dragtarget] { @@ -604,7 +596,7 @@ tab-split-view-wrapper[dragtarget] {
} }
#tabbrowser-tabs[orient="vertical"]:not([expanded]) &:not([crashed]), #tabbrowser-tabs[orient="vertical"]:not([expanded]) &:not([crashed]),
@@ -67,7 +67,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
&[soundplaying] { &[soundplaying] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg"); list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg");
} }
@@ -664,7 +656,7 @@ tab-split-view-wrapper[dragtarget] { @@ -661,7 +653,7 @@ tab-split-view-wrapper[dragtarget] {
} }
} }
@@ -76,7 +76,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
&[crashed] { &[crashed] {
display: revert; display: revert;
} }
@@ -824,7 +816,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 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. */ removed from root such as when toggling the sidebar to expand with the toolbar button. */
#tabbrowser-tabs[orient="horizontal"] &:not([pinned]):not([crashed]), #tabbrowser-tabs[orient="horizontal"] &:not([pinned]):not([crashed]),
@@ -85,7 +85,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
&:is([soundplaying], [muted], [activemedia-blocked]) { &:is([soundplaying], [muted], [activemedia-blocked]) {
display: flex; display: flex;
} }
@@ -1044,7 +1036,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:is([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected]),
.tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]: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]) { #tabbrowser-tabs[orient="vertical"] .tabbrowser-tab > .tab-stack > .tab-content[titlechanged]:not([selected]) {
@@ -93,7 +93,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
background-position: center bottom 6.5px; background-position: center bottom 6.5px;
background-size: 4px 4px; background-size: 4px 4px;
background-repeat: no-repeat; background-repeat: no-repeat;
@@ -1797,7 +1788,7 @@ tab-group { @@ -1813,7 +1804,7 @@ tab-group {
} }
#tabbrowser-tabs[orient="vertical"][expanded] { #tabbrowser-tabs[orient="vertical"][expanded] {
@@ -102,7 +102,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
&[movingtab][movingtab-addToGroup]:not([movingtab-group], [movingtab-ungroup]) .tabbrowser-tab:is(:active, [multiselected]) { &[movingtab][movingtab-addToGroup]:not([movingtab-group], [movingtab-ungroup]) .tabbrowser-tab:is(:active, [multiselected]) {
margin-inline-start: var(--space-medium); margin-inline-start: var(--space-medium);
} }
@@ -2351,7 +2342,7 @@ tab-group { @@ -2378,7 +2369,7 @@ tab-group {
} }
} }
@@ -111,7 +111,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
#vertical-tabs-newtab-button { #vertical-tabs-newtab-button {
appearance: none; appearance: none;
min-height: var(--tab-min-height); min-height: var(--tab-min-height);
@@ -2362,7 +2353,7 @@ tab-group { @@ -2389,7 +2380,7 @@ tab-group {
margin-inline: var(--tab-inner-inline-margin); margin-inline: var(--tab-inner-inline-margin);
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text { #tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
@@ -120,16 +120,16 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
} }
&:hover { &:hover {
@@ -2386,7 +2377,7 @@ tab-group { @@ -2413,7 +2404,7 @@ tab-group {
* flex container. #tabs-newtab-button is a child of the arrowscrollbox where * flex container. #tabs-newtab-button is a child of the arrowscrollbox where
* we don't want a gap (between tabs), so we have to add some margin. * we don't want a gap (between tabs), so we have to add some margin.
*/ */
-#tabbrowser-arrowscrollbox[orient="vertical"] > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button { -#tabbrowser-arrowscrollbox[orient="vertical"] > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button {
+#tabbrowser-arrowscrollbox[orient="vertical"] #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button { +#tabbrowser-arrowscrollbox[orient="vertical"] #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button {
margin-block: var(--tab-margin-block); margin-block: var(--tab-block-margin);
} }
@@ -2576,7 +2567,6 @@ tab-group { @@ -2610,7 +2601,6 @@ tab-group {
&:not([expanded]) { &:not([expanded]) {
.tabbrowser-tab[pinned] { .tabbrowser-tab[pinned] {
@@ -137,7 +137,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
} }
.tab-background { .tab-background {
@@ -2615,8 +2605,8 @@ tab-group { @@ -2651,8 +2641,8 @@ tab-group {
display: block; display: block;
position: absolute; position: absolute;
inset: auto; inset: auto;
@@ -148,7 +148,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
&:-moz-window-inactive { &:-moz-window-inactive {
background-image: background-image:
@@ -2714,9 +2704,6 @@ tab-group { @@ -2753,9 +2743,6 @@ tab-group {
~ #tabbrowser-tabs[orient="horizontal"]::before { ~ #tabbrowser-tabs[orient="horizontal"]::before {
display: flex; display: flex;
content: ""; content: "";
@@ -158,7 +158,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
} }
} }
@@ -2749,7 +2736,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); list-style-image: url(chrome://global/skin/icons/plus.svg);
} }

View File

@@ -1,19 +1,17 @@
diff --git a/browser/themes/shared/urlbar-searchbar.css b/browser/themes/shared/urlbar-searchbar.css diff --git a/browser/themes/shared/urlbar-searchbar.css b/browser/themes/shared/urlbar-searchbar.css
index 22d624d718a289dd7b84ffc2f04dd35893dfbe95..4f57f7853f3043e3ad01d893aa928b9d2e6f3c16 100644 index cbd074b9bacfbf7cc82a67ad586ebc31c4d85970..993c61ba389cb9d912b2cebee9d71bec772e3a7d 100644
--- a/browser/themes/shared/urlbar-searchbar.css --- a/browser/themes/shared/urlbar-searchbar.css
+++ b/browser/themes/shared/urlbar-searchbar.css +++ b/browser/themes/shared/urlbar-searchbar.css
@@ -19,8 +19,8 @@ @@ -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)));
- --urlbar-container-padding: round(up, 1px, env(hairline));
+ --urlbar-container-padding: 2px;
--urlbar-container-inset: calc(var(--urlbar-container-border-width) + var(--urlbar-container-padding));
@media not -moz-pref("browser.nova.enabled") {
--urlbar-basic-component-size: calc(var(--urlbar-min-height) - 2 * (var(--urlbar-input-container-border-width) + var(--urlbar-input-container-padding)));
- --urlbar-icon-padding: calc((var(--urlbar-min-height) - 2px /* border */ - 2px /* padding */ - 16px /* icon */) / 2);
- --urlbar-input-container-padding: round(up, 1px, env(hairline));
+ --urlbar-icon-padding: calc((var(--urlbar-min-height) - 2px /* border */ - 14px /* icon */) / 2);
+ --urlbar-input-container-padding: 2px;
}
@media (max-width: 770px) { @media (max-width: 770px) {
--urlbar-container-min-width: 240px; @@ -55,7 +55,7 @@ toolbar[inactive="true"] .urlbar,
@@ -126,7 +126,7 @@ toolbar[inactive="true"] .urlbar,
.urlbar:not([usertyping]) > .urlbar-input-container > .urlbar-go-button, .urlbar:not([usertyping]) > .urlbar-input-container > .urlbar-go-button,
.urlbar:not(#searchbar-new, [focused]) > .urlbar-input-container > .urlbar-go-button, .urlbar:not(#searchbar-new, [focused]) > .urlbar-input-container > .urlbar-go-button,
#urlbar-revert-button-container { #urlbar-revert-button-container {
@@ -22,18 +20,18 @@ index 22d624d718a289dd7b84ffc2f04dd35893dfbe95..4f57f7853f3043e3ad01d893aa928b9d
} }
/* Document Picture-in-Picture API window */ /* Document Picture-in-Picture API window */
@@ -403,6 +403,10 @@ toolbar[inactive="true"] .urlbar, @@ -205,6 +205,10 @@ toolbar[inactive="true"] .urlbar,
.urlbar:not([focused])[textoverflow="left"][domaindir="rtl"] > .urlbar-input-container > .urlbar-input-box > & {
mask-image: linear-gradient(to right, transparent var(--urlbar-scheme-size), black calc(var(--urlbar-scheme-size) + 3ch)); mask-image: linear-gradient(to right, transparent var(--urlbar-scheme-size), black calc(var(--urlbar-scheme-size) + 3ch));
} }
+
+ #navigator-toolbox[zen-has-implicit-hover="true"] .urlbar:not([focused])[textoverflow="left"] > .urlbar-input-container > .urlbar-input-box > & { + #navigator-toolbox[zen-has-implicit-hover="true"] .urlbar:not([focused])[textoverflow="left"] > .urlbar-input-container > .urlbar-input-box > & {
+ mask-image: linear-gradient(to right, transparent, black 3ch, black calc(100% - 3ch), transparent); + mask-image: linear-gradient(to right, transparent, black 3ch, black calc(100% - 3ch), transparent);
+ } + }
} +
/* stylelint-disable-next-line media-query-no-invalid */
#urlbar-scheme { @media -moz-pref("browser.nova.enabled") {
@@ -492,10 +496,14 @@ toolbar[inactive="true"] .urlbar, &::selection {
@@ -429,10 +433,14 @@ toolbar[inactive="true"] .urlbar,
.urlbar[breakout][breakout-extend] { .urlbar[breakout][breakout-extend] {
height: auto; height: auto;
@@ -46,5 +44,5 @@ index 22d624d718a289dd7b84ffc2f04dd35893dfbe95..4f57f7853f3043e3ad01d893aa928b9d
> .urlbar-input-container { > .urlbar-input-container {
+ align-items: center; + align-items: center;
height: var(--urlbar-container-height); height: var(--urlbar-container-height);
padding-block: calc((var(--urlbar-container-height) - var(--urlbar-height)) / 2); padding-block: calc((var(--urlbar-container-height) - var(--urlbar-height)) / 2 + var(--urlbar-container-padding));
padding-inline: calc(var(--urlbar-margin-inline) + var(--urlbar-input-container-padding)); padding-inline: calc(var(--urlbar-margin-inline) + var(--urlbar-container-padding));

View File

@@ -0,0 +1,13 @@
diff --git a/browser/themes/shared/urlbar/variables.css b/browser/themes/shared/urlbar/variables.css
index 64eb46b3061504e590d3fcee0c30c902f68764fe..6e7ffe043c5676da27a6eb5b105dac2fde3309da 100644
--- a/browser/themes/shared/urlbar/variables.css
+++ b/browser/themes/shared/urlbar/variables.css
@@ -9,7 +9,7 @@
:root {
--identity-box-margin-inline: 4px;
--urlbar-min-height: max(32px, 1.4em);
- --urlbar-icon-padding: calc((var(--urlbar-min-height) - 2px /* border */ - 2px /* padding */ - 16px /* icon */) / 2);
+ --urlbar-icon-padding: calc((var(--urlbar-min-height) - 2px /* border */ - 14px /* icon */) / 2);
/* This should be used for icons and chiclets inside the input field, as well
as result rows. It makes the gap around them more uniform when they are

View File

@@ -1,18 +1,18 @@
diff --git a/browser/themes/shared/urlbar/view-proton.css b/browser/themes/shared/urlbar/view-proton.css diff --git a/browser/themes/shared/urlbar/view-proton.css b/browser/themes/shared/urlbar/view-proton.css
index 3620b33cb11f2e6bba189cbaf7532cca0e97cd3b..346c318ed178fb77a217b3b992b94706db6bf0ee 100644 index 0b10c077a555e5d0fc488a3bb1b1b920f433204c..38e9d14e9838f2b8de6f654ff4e0700bb65506f0 100644
--- a/browser/themes/shared/urlbar/view-proton.css --- a/browser/themes/shared/urlbar/view-proton.css
+++ b/browser/themes/shared/urlbar/view-proton.css +++ b/browser/themes/shared/urlbar/view-proton.css
@@ -12,7 +12,7 @@ @@ -14,7 +14,7 @@
--urlbarView-small-font-size: 0.85em; --urlbarView-small-font-size: 0.85em;
- --urlbarView-results-padding: 7px; - --urlbarView-results-padding: 7px;
+ --urlbarView-results-padding: 8px; + --urlbarView-results-padding: 8px;
--urlbarView-row-gutter: var(--space-xxsmall); --urlbarView-row-gutter: var(--space-xxsmall);
--urlbarview-row-padding-block: 6px;
--urlbarView-row-padding-inline: var(--urlbar-icon-padding); --urlbarView-row-padding-inline: var(--urlbar-icon-padding);
@@ -165,7 +165,6 @@ --urlbarView-row-padding-block: 6px;
min-height: var(--urlbarview-row-min-height); @@ -174,7 +174,6 @@
min-height: var(--urlbarView-row-min-height);
} }
:root[uidensity="touch"] & { :root[uidensity="touch"] & {
- padding-block: 11px; - padding-block: 11px;

View File

@@ -816,57 +816,61 @@
display: none !important; display: none !important;
} }
.zen-media-playpause-button { #zen-media-playpause-button {
list-style-image: url("media-play.svg"); list-style-image: url("media-play.svg");
} }
.zen-media-card.playing .zen-media-playpause-button { #zen-media-controls-toolbar.playing #zen-media-playpause-button {
list-style-image: url("media-pause.svg"); list-style-image: url("media-pause.svg");
} }
.zen-media-nexttrack-button { #zen-media-nexttrack-button {
list-style-image: url("media-next.svg"); list-style-image: url("media-next.svg");
} }
.zen-media-previoustrack-button { #zen-media-previoustrack-button {
list-style-image: url("media-previous.svg"); list-style-image: url("media-previous.svg");
} }
.zen-media-card[muted] .zen-media-mute-button { #zen-media-controls-toolbar[muted] #zen-media-mute-button {
list-style-image: url("media-mute.svg"); list-style-image: url("media-mute.svg");
} }
.zen-media-mute-button { #zen-media-mute-button {
list-style-image: url("media-unmute.svg"); list-style-image: url("media-unmute.svg");
} }
.zen-media-close-button { #zen-media-close-button {
list-style-image: url("close.svg"); list-style-image: url("close.svg");
} }
.zen-media-focus-button:hover { #zen-media-focus-button:hover {
list-style-image: url("screen.svg"); list-style-image: url("screen.svg");
} }
.zen-media-mute-mic-button { #zen-media-close-button {
list-style-image: url("close.svg");
}
#zen-media-mute-mic-button {
list-style-image: url("microphone-fill.svg"); list-style-image: url("microphone-fill.svg");
} }
.zen-media-card[mic-muted] .zen-media-mute-mic-button { #zen-media-controls-toolbar[mic-muted] #zen-media-mute-mic-button {
list-style-image: url("microphone-blocked-fill.svg"); list-style-image: url("microphone-blocked-fill.svg");
fill: rgb(224, 41, 29); fill: rgb(224, 41, 29);
} }
.zen-media-mute-camera-button { #zen-media-mute-camera-button {
list-style-image: url("video-fill.svg"); list-style-image: url("video-fill.svg");
} }
.zen-media-card[camera-muted] .zen-media-mute-camera-button { #zen-media-controls-toolbar[camera-muted] #zen-media-mute-camera-button {
list-style-image: url("video-blocked-fill.svg"); list-style-image: url("video-blocked-fill.svg");
fill: rgb(224, 41, 29); fill: rgb(224, 41, 29);
} }
.zen-media-pip-button { #zen-media-pip-button {
list-style-image: url("chrome://global/skin/media/picture-in-picture-open.svg"); list-style-image: url("chrome://global/skin/media/picture-in-picture-open.svg");
} }

View File

@@ -1,5 +1,5 @@
diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h
index 6f7f58bba3be6f08b3b27e81f30864c61d683351..2516126365ee9e1c07e245a873efe5f48767aff7 100644 index 02abb6ab9562a7b41f4a95a6289c80da8d1176e8..1722802021f331338fc10c768301a953e582b711 100644
--- a/docshell/base/BrowsingContext.h --- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h +++ b/docshell/base/BrowsingContext.h
@@ -265,6 +265,9 @@ struct EmbedderColorSchemes { @@ -265,6 +265,9 @@ struct EmbedderColorSchemes {
@@ -24,23 +24,13 @@ index 6f7f58bba3be6f08b3b27e81f30864c61d683351..2516126365ee9e1c07e245a873efe5f4
float FullZoom() const { return GetFullZoom(); } float FullZoom() const { return GetFullZoom(); }
float TextZoom() const { return GetTextZoom(); } float TextZoom() const { return GetTextZoom(); }
@@ -1290,6 +1298,19 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache { @@ -1275,6 +1283,9 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
} }
void DidSet(FieldIndex<IDX_SessionStoreEpoch>, uint32_t aOldValue); void DidSet(FieldIndex<IDX_SessionStoreEpoch>, uint32_t aOldValue);
+ void DidSet(FieldIndex<IDX_ZenBoostsData>, nscolor aOldValue); + void DidSet(FieldIndex<IDX_ZenBoostsData>, nscolor aOldValue);
+ void DidSet(FieldIndex<IDX_ZenBoostsComplementaryRotation>, float aOldValue); + void DidSet(FieldIndex<IDX_ZenBoostsComplementaryRotation>, float aOldValue);
+ void DidSet(FieldIndex<IDX_IsZenBoostsInverted>, bool aOldValue); + void DidSet(FieldIndex<IDX_IsZenBoostsInverted>, bool aOldValue);
+ bool CanSet(FieldIndex<IDX_ZenBoostsData>, const nscolor&, ContentParent*) {
+ return true;
+ }
+ bool CanSet(FieldIndex<IDX_ZenBoostsComplementaryRotation>, const float&,
+ ContentParent*) {
+ return true;
+ }
+ bool CanSet(FieldIndex<IDX_IsZenBoostsInverted>, const bool&, ContentParent*) {
+ return true;
+ }
// Ensure that opener is in the same BrowsingContextGroup. using CanSetResult = syncedcontext::CanSetResult;
bool CanSet(FieldIndex<IDX_OpenerId>, const uint64_t& aValue,

View File

@@ -1,8 +1,8 @@
diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
index 73eb08f648d55121a0cd96cd808f932fb14bfee6..efa99861a5da12ad8d0daa2c0eb1473c57810397 100644 index 328b7524810322561700347fa7f26403897635a8..58d33d68e050d11ea712413ad5c2170a112e404a 100644
--- a/dom/base/Document.cpp --- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp +++ b/dom/base/Document.cpp
@@ -471,6 +471,7 @@ @@ -467,6 +467,7 @@
#include "prtime.h" #include "prtime.h"
#include "prtypes.h" #include "prtypes.h"
#include "xpcpublic.h" #include "xpcpublic.h"
@@ -10,15 +10,14 @@ index 73eb08f648d55121a0cd96cd808f932fb14bfee6..efa99861a5da12ad8d0daa2c0eb1473c
// clang-format off // clang-format off
#include "mozilla/Encoding.h" #include "mozilla/Encoding.h"
@@ -3164,6 +3165,11 @@ void Document::FillStyleSetUserAndUASheets() { @@ -3198,6 +3199,10 @@ void Document::FillStyleSetUserAndUASheets() {
} for (StyleSheet* sheet : *sheetService->UserStyleSheets()) {
}; styleSet.AppendStyleSheet(*sheet);
}
+ if (IsInChromeDocShell()) { + if (auto sheet = zen::ZenStyleSheetCache::Singleton()->GetModsSheet(); sheet && IsInChromeDocShell()) {
+ // The mods sheet is only used in the chrome docshell. + // The mods sheet is only used in the chrome docshell.
+ MaybeAppend(zen::ZenStyleSheetCache::Singleton()->GetModsSheet()); + styleSet.AppendStyleSheet(*sheet);
+ } + }
+
MaybeAppend(IsInChromeDocShell() ? cache->GetUserChromeSheet() StyleSheet* sheet = IsInChromeDocShell() ? cache->GetUserChromeSheet()
: cache->GetUserContentSheet()); : cache->GetUserContentSheet();
MaybeAppend(cache->GetUASheet());

View File

@@ -1,5 +1,5 @@
diff --git a/dom/chrome-webidl/MediaController.webidl b/dom/chrome-webidl/MediaController.webidl diff --git a/dom/chrome-webidl/MediaController.webidl b/dom/chrome-webidl/MediaController.webidl
index 494ed7a424457dae822c86c0ef7f6d4e8685cd5e..a5a859cbdc76e0d79460780cfc41d7ed95e660e1 100644 index 6063e86e747dac87aafc865af95800daef2a5b9d..7fc4e72ee73a16b9ec2c1b9d11d926246fb7f7b6 100644
--- a/dom/chrome-webidl/MediaController.webidl --- a/dom/chrome-webidl/MediaController.webidl
+++ b/dom/chrome-webidl/MediaController.webidl +++ b/dom/chrome-webidl/MediaController.webidl
@@ -23,6 +23,12 @@ enum MediaControlKey { @@ -23,6 +23,12 @@ enum MediaControlKey {
@@ -13,17 +13,14 @@ index 494ed7a424457dae822c86c0ef7f6d4e8685cd5e..a5a859cbdc76e0d79460780cfc41d7ed
+}; +};
+ +
/** /**
* The reason a chrome caller is pausing the controller. "user" preserves the * MediaController is used to control media playback for a tab, and each tab
* existing user-initiated pause; the "system-*" values represent an * would only have one media controller, which can be accessed from the
@@ -49,6 +55,7 @@ interface MediaController : EventTarget { @@ -36,10 +42,14 @@ interface MediaController : EventTarget {
readonly attribute boolean isPlaying; readonly attribute boolean isPlaying;
readonly attribute boolean isAnyMediaBeingControlled; readonly attribute boolean isAnyMediaBeingControlled;
readonly attribute MediaSessionPlaybackState playbackState; readonly attribute MediaSessionPlaybackState playbackState;
+ readonly attribute boolean isBeingUsedInPIPModeOrFullscreen; + readonly attribute boolean isBeingUsedInPIPModeOrFullscreen;
// The effective audio-session type the tab is currently claiming. Chrome
// consumers can use this to apply tab/application level audio-focus
@@ -59,6 +66,9 @@ interface MediaController : EventTarget {
[Throws] [Throws]
MediaMetadataInit getMetadata(); MediaMetadataInit getMetadata();

View File

@@ -1,16 +1,16 @@
diff --git a/dom/media/mediaelement/HTMLMediaElement.cpp b/dom/media/mediaelement/HTMLMediaElement.cpp diff --git a/dom/media/mediaelement/HTMLMediaElement.cpp b/dom/media/mediaelement/HTMLMediaElement.cpp
index 912f2e08bd0d50e7ba012ed11b583127cf3e35e5..b60ec40f06f4e1a0f433eadebb1a18d40fd6d60f 100644 index b4ab1622d0e58781929aa6801dfd374f42567a7a..358f3d3cac3381ab9de3af65616095f69b9c7b23 100644
--- a/dom/media/mediaelement/HTMLMediaElement.cpp --- a/dom/media/mediaelement/HTMLMediaElement.cpp
+++ b/dom/media/mediaelement/HTMLMediaElement.cpp +++ b/dom/media/mediaelement/HTMLMediaElement.cpp
@@ -495,6 +495,7 @@ class HTMLMediaElement::MediaControlKeyListener final @@ -450,6 +450,7 @@ class HTMLMediaElement::MediaControlKeyListener final
// started, since they never reach the playing state. // audible state. Therefore, in that case we would noitfy the audible state
if (mState == MediaPlaybackState::ePlayed || // when media starts playing.
(IsStarted() && mControlType == ControlType::eUncontrollable)) { if (mState == MediaPlaybackState::ePlayed) {
+ NotifyMediaPositionState(); + NotifyMediaPositionState();
NotifyAudibleStateChanged(newState); NotifyAudibleStateChanged(mIsOwnerAudible
} ? MediaAudibleState::eAudible
} : MediaAudibleState::eInaudible);
@@ -7738,6 +7739,9 @@ void HTMLMediaElement::FireTimeUpdate(TimeupdateType aType) { @@ -7450,6 +7451,9 @@ void HTMLMediaElement::FireTimeUpdate(TimeupdateType aType) {
QueueTask(std::move(runner)); QueueTask(std::move(runner));
mQueueTimeUpdateRunnerTime = TimeStamp::Now(); mQueueTimeUpdateRunnerTime = TimeStamp::Now();
mLastCurrentTime = CurrentTime(); mLastCurrentTime = CurrentTime();

View File

@@ -1,5 +1,5 @@
diff --git a/eslint-file-globals.config.mjs b/eslint-file-globals.config.mjs diff --git a/eslint-file-globals.config.mjs b/eslint-file-globals.config.mjs
index c15744aeaf940cea9e438e7b9924a328d2615b9f..df5c6c3f36e78537e0a54fb89dfd5b3d510a51a4 100644 index bf1341a84382380d45b936aeffde3f167301a9ed..b6aa373252888dcdefd528a40329f1959086d8e5 100644
--- a/eslint-file-globals.config.mjs --- a/eslint-file-globals.config.mjs
+++ b/eslint-file-globals.config.mjs +++ b/eslint-file-globals.config.mjs
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
@@ -10,9 +10,9 @@ index c15744aeaf940cea9e438e7b9924a328d2615b9f..df5c6c3f36e78537e0a54fb89dfd5b3d
export default [ export default [
{ {
@@ -576,4 +577,9 @@ export default [ @@ -550,4 +551,9 @@ export default [
globals: globals.audioWorklet, ],
}, languageOptions: { globals: globals.worker },
}, },
+ { + {
+ name: "zen-globals", + name: "zen-globals",

View File

@@ -0,0 +1,75 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -411,10 +411,13 @@
pref("browser.urlbar.maxRichResults", 10);
// The maximum number of historical search results to show.
pref("browser.urlbar.maxHistoricalSearchSuggestions", 2);
+// Whether to close the urlbar when blurring the window while the urlbar is focused.
+pref("browser.urlbar.closeOnWindowBlur", true);
+
// The default behavior for the urlbar can be configured to use any combination
// of the match filters with each additional filter adding more results (union).
pref("browser.urlbar.suggest.bookmark", true);
pref("browser.urlbar.suggest.clipboard", true);
pref("browser.urlbar.suggest.history", true);
diff --git a/browser/components/urlbar/UrlbarPrefs.sys.mjs b/browser/components/urlbar/UrlbarPrefs.sys.mjs
--- a/browser/components/urlbar/UrlbarPrefs.sys.mjs
+++ b/browser/components/urlbar/UrlbarPrefs.sys.mjs
@@ -152,10 +152,13 @@
["filter.javascript", true],
// Feature gate pref for flight status suggestions in the urlbar.
["flightStatus.featureGate", false],
+ // Whether to close the urlbar when blurring the window while the urlbar is focused.
+ ["closeOnWindowBlur", true],
+
// The minimum prefix length of a flight status keyword the user must type to
// trigger the suggestion. 0 means the min length should be taken from Nimbus
// or remote settings.
["flightStatus.minKeywordLength", 0],
diff --git a/browser/components/urlbar/UrlbarView.sys.mjs b/browser/components/urlbar/UrlbarView.sys.mjs
--- a/browser/components/urlbar/UrlbarView.sys.mjs
+++ b/browser/components/urlbar/UrlbarView.sys.mjs
@@ -3909,10 +3909,16 @@
}
}
}
on_blur() {
+ if (
+ this.document.commandDispatcher.focusedElement == this.input.inputField &&
+ !lazy.UrlbarPrefs.get("closeOnWindowBlur")
+ ) {
+ return;
+ }
// If the view is open without the input being focused, it will not close
// automatically when the window loses focus. We might be in this state
// after a Search Tip is shown on an engine homepage.
if (!lazy.UrlbarPrefs.get("ui.popup.disable_autohide")) {
this.close();
diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs
--- a/browser/components/urlbar/content/UrlbarInput.mjs
+++ b/browser/components/urlbar/content/UrlbarInput.mjs
@@ -4783,10 +4783,16 @@
}
}
_on_blur(event) {
lazy.logger.debug("Blur Event");
+ if (
+ this.document.commandDispatcher.focusedElement == this.inputField &&
+ !lazy.UrlbarPrefs.get("closeOnWindowBlur")
+ ) {
+ return;
+ }
// We cannot count every blur events after a missed engagement as abandoment
// because the user may have clicked on some view element that executes
// a command causing a focus change. For example opening preferences from
// the oneoff settings button.
// For now we detect that case by discarding the event on command, but we
// may want to figure out a more robust way to detect abandonment.

View File

@@ -0,0 +1,167 @@
diff --git a/gfx/webrender_bindings/WebRenderAPI.cpp b/gfx/webrender_bindings/WebRenderAPI.cpp
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -298,11 +298,13 @@
panic_on_gl_error, picTileWidth, picTileHeight,
gfx::gfxVars::WebRenderRequiresHardwareDriver(),
StaticPrefs::gfx_webrender_low_quality_pinch_zoom_AtStartup(),
StaticPrefs::gfx_webrender_max_shared_surface_size_AtStartup(),
StaticPrefs::gfx_webrender_enable_subpixel_aa_AtStartup(),
- compositor->ShouldUseLayerCompositor())) {
+ compositor->ShouldUseLayerCompositor(),
+ StaticPrefs::
+ gfx_webrender_opaque_backdrop_fallback_AtStartup())) {
// wr_window_new puts a message into gfxCriticalNote if it returns
// false
MOZ_ASSERT(errorMessage);
error.AssignASCII(errorMessage);
wr_api_free_error_msg(errorMessage);
diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src/bindings.rs
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1998,10 +1998,11 @@
reject_software_rasterizer: bool,
low_quality_pinch_zoom: bool,
max_shared_surface_size: i32,
enable_subpixel_aa: bool,
use_layer_compositor: bool,
+ opaque_backdrop_fallback: bool,
) -> bool {
assert!(unsafe { is_in_render_thread() });
// Ensure the WR profiler callbacks are hooked up to the Gecko profiler.
set_profiler_hooks(Some(&PROFILER_HOOKS));
@@ -2164,10 +2165,11 @@
texture_cache_config,
reject_software_rasterizer,
low_quality_pinch_zoom,
max_shared_surface_size,
enable_dithering,
+ opaque_backdrop_fallback,
..Default::default()
};
let window_size = DeviceIntSize::new(window_width, window_height);
let notifier = Box::new(CppNotifier { window_id });
diff --git a/gfx/wr/webrender/src/device/gl.rs b/gfx/wr/webrender/src/device/gl.rs
--- a/gfx/wr/webrender/src/device/gl.rs
+++ b/gfx/wr/webrender/src/device/gl.rs
@@ -3982,10 +3982,14 @@
pub fn disable_color_write(&self) {
self.gl.color_mask(false, false, false, false);
}
+ pub fn set_color_mask(&self, r: bool, g: bool, b: bool, a: bool) {
+ self.gl.color_mask(r, g, b, a);
+ }
+
pub fn set_blend(&mut self, enable: bool) {
if enable {
self.gl.enable(gl::BLEND);
} else {
self.gl.disable(gl::BLEND);
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,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.
/// Relies on `debugger` cargo feature being enabled.
pub enable_debugger: bool,
+ /// See explanation of `gfx.webrender.opaque-backdrop-fallback`.
+ pub opaque_backdrop_fallback: bool,
}
@@ -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,
}
}
}
@@ -802,10 +805,11 @@
allocated_native_surfaces: FastHashSet::default(),
debug_overlay_state: DebugOverlayState::new(),
buffer_damage_tracker: BufferDamageTracker::default(),
max_primitive_instance_count,
enable_instancing: options.enable_instancing,
+ opaque_backdrop_fallback: options.opaque_backdrop_fallback,
consecutive_oom_frames: 0,
target_frame_publish_id: None,
pending_result_msg: None,
layer_compositor_frame_state_in_prev_frame: None,
external_composite_debug_items: Vec::new(),
diff --git a/gfx/wr/webrender/src/renderer/mod.rs b/gfx/wr/webrender/src/renderer/mod.rs
--- a/gfx/wr/webrender/src/renderer/mod.rs
+++ b/gfx/wr/webrender/src/renderer/mod.rs
@@ -867,10 +867,12 @@
buffer_damage_tracker: BufferDamageTracker,
max_primitive_instance_count: usize,
enable_instancing: bool,
+ opaque_backdrop_fallback: bool,
+
/// Count consecutive oom frames to detectif we are stuck unable to render
/// in a loop.
consecutive_oom_frames: u32,
/// update() defers processing of ResultMsg, if frame_publish_id of
@@ -2787,18 +2789,29 @@
let read_target = ReadTarget::from_texture(cache_texture);
// Should always be drawing to picture cache tiles or off-screen surface!
debug_assert!(!draw_target.is_default());
let device_to_framebuffer = Scale::new(1i32);
+ let dest_fb_rect = dest * device_to_framebuffer;
self.device.blit_render_target(
read_target,
src * device_to_framebuffer,
draw_target,
- dest * device_to_framebuffer,
+ dest_fb_rect,
TextureFilter::Linear,
);
+
+ if self.opaque_backdrop_fallback {
+ self.device.set_color_mask(false, false, false, true);
+ self.device.clear_target(
+ Some([0.0, 0.0, 0.0, 1.0]),
+ None,
+ Some(dest_fb_rect),
+ );
+ self.device.set_color_mask(true, true, true, true);
+ }
}
}
}
fn draw_picture_cache_target(
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
@@ -8439,10 +8439,17 @@
#else
value: false
#endif
mirror: once
+# Make backdrop-filter treat its captured backdrop as if it had been
+# composited over an opaque-black background. (See bug 2036640)
+- name: gfx.webrender.opaque-backdrop-fallback
+ type: bool
+ value: true
+ mirror: once
+
# Disable wait of GPU execution completion
- name: gfx.webrender.wait-gpu-finished.disabled
type: bool
value: false
mirror: once

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