mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-19 19:18:03 +00:00
Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22961e97d8 | ||
|
|
cb6a607c67 | ||
|
|
267c9aabe1 | ||
|
|
d54e12359c | ||
|
|
c89645a787 | ||
|
|
0a548c7572 | ||
|
|
6d158223b5 | ||
|
|
76fcd5c822 | ||
|
|
ed6900d762 | ||
|
|
2e9aecd41b | ||
|
|
da995e8653 | ||
|
|
64d73ab3e3 | ||
|
|
9551444c61 | ||
|
|
fdf9588b7b | ||
|
|
b07b17c87e | ||
|
|
c9d3cb3dc9 | ||
|
|
2c030369c5 | ||
|
|
88a90206ce | ||
|
|
6d398dec63 | ||
|
|
243a8791a0 | ||
|
|
412731f37e | ||
|
|
7a78848177 | ||
|
|
a323036995 | ||
|
|
abc69a1fcb | ||
|
|
8df45e5c9a | ||
|
|
58e83c137f | ||
|
|
4f3bcb2f32 | ||
|
|
c209ea72c1 | ||
|
|
55b71754f3 | ||
|
|
6af79fd621 | ||
|
|
57196c1464 | ||
|
|
43d47ac537 | ||
|
|
a8a94c14a4 | ||
|
|
3655afbe13 | ||
|
|
bb023ac5b1 | ||
|
|
faafff667e | ||
|
|
8b632c9b05 | ||
|
|
67b6daaa0e | ||
|
|
e89bd7796e | ||
|
|
66c5931a29 | ||
|
|
a5585c5619 | ||
|
|
2326d2b56b | ||
|
|
9ef1d96c00 | ||
|
|
432f93770f | ||
|
|
f28e0688fb | ||
|
|
8df6fef1ac | ||
|
|
4746d36699 | ||
|
|
9e0c790602 | ||
|
|
3d53b37e8b | ||
|
|
e7ddfb52db | ||
|
|
ba70449bdd | ||
|
|
bf40c31149 | ||
|
|
7a093beae4 | ||
|
|
03b4e934fe | ||
|
|
b93d19b873 | ||
|
|
b9c4000fe2 | ||
|
|
0b7687ec6d | ||
|
|
d70b3d902c | ||
|
|
f9f8f2f372 | ||
|
|
99dca42723 | ||
|
|
ed0a6fd447 | ||
|
|
88c6611f1e | ||
|
|
e66e763e63 | ||
|
|
721135f576 | ||
|
|
d8a934d2ec | ||
|
|
91a1d4d2ca | ||
|
|
97577dac26 | ||
|
|
5723a89bcd |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -5,4 +5,4 @@
|
||||
*.patch linguist-language=C++
|
||||
*.d.ts linguist-language=TypeScript
|
||||
|
||||
src/zen/tests/*.js linguist-language=Test
|
||||
src/zen/tests/** linguist-language=C++
|
||||
|
||||
51
.github/workflows/build.yml
vendored
51
.github/workflows/build.yml
vendored
@@ -26,6 +26,11 @@ on:
|
||||
required: true
|
||||
type: "boolean"
|
||||
default: false
|
||||
disable-pgo:
|
||||
description: "Build without PGO (skips the profile generation stages)"
|
||||
required: false
|
||||
type: "boolean"
|
||||
default: false
|
||||
workflow_call:
|
||||
inputs:
|
||||
create_release:
|
||||
@@ -48,6 +53,11 @@ on:
|
||||
required: true
|
||||
type: "boolean"
|
||||
default: false
|
||||
disable-pgo:
|
||||
description: "Build without PGO (skips the profile generation stages)"
|
||||
required: false
|
||||
type: "boolean"
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
buildid:
|
||||
@@ -73,6 +83,7 @@ jobs:
|
||||
echo "create_release: ${{ inputs.create_release }}"
|
||||
echo "update_version: ${{ inputs.update_version }}"
|
||||
echo "use sccache: ${{ inputs.use-sccache }}"
|
||||
echo "disable-pgo: ${{ inputs.disable-pgo }}"
|
||||
echo "update_branch: ${{ inputs.update_branch }}"
|
||||
echo "GITHUB_REPOSITORY: ${{ github.repository }}"
|
||||
echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}"
|
||||
@@ -102,14 +113,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download aws-cli
|
||||
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
if: ${{ inputs.update_branch == 'release' }}
|
||||
run: |
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
unzip awscliv2.zip
|
||||
sudo ./aws/install --update
|
||||
|
||||
- name: Start self-hosted runner
|
||||
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
if: ${{ inputs.update_branch == 'release' }}
|
||||
run: |
|
||||
echo "Starting self-hosted runner"
|
||||
echo "${{ secrets.SELF_HOSTED_RUNNER_START_SCRIPT }}" | base64 -d > start.sh
|
||||
@@ -117,7 +128,7 @@ jobs:
|
||||
bash ./start.sh
|
||||
|
||||
- name: Remove self-hosted runner script
|
||||
if: always() && ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
if: always() && ${{ inputs.update_branch == 'release' }}
|
||||
run: |
|
||||
echo "Removing self-hosted runner script"
|
||||
rm start.sh || true
|
||||
@@ -280,6 +291,7 @@ jobs:
|
||||
windows-step-1:
|
||||
name: Windows build step 1 (PGO build)
|
||||
uses: ./.github/workflows/windows-release-build.yml
|
||||
if: ${{ !inputs.disable-pgo }}
|
||||
needs: [build-data, buildid]
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -295,6 +307,7 @@ jobs:
|
||||
windows-step-2:
|
||||
name: Windows build step 2 (Generate profile data)
|
||||
uses: ./.github/workflows/windows-profile-build.yml
|
||||
if: ${{ !inputs.disable-pgo }}
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
@@ -310,10 +323,13 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
# windows-step-2 is skipped when PGO is disabled, so don't inherit its skip
|
||||
if: ${{ !failure() && !cancelled() }}
|
||||
needs: [build-data, windows-step-2, start-self-host, buildid]
|
||||
with:
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
generate-pgo: false
|
||||
disable-pgo: ${{ inputs.disable-pgo }}
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
use-sccache: ${{ inputs.use-sccache }}
|
||||
@@ -330,10 +346,12 @@ jobs:
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
use-sccache: ${{ inputs.use-sccache }}
|
||||
disable-pgo: ${{ inputs.disable-pgo }}
|
||||
|
||||
mac-step-1:
|
||||
name: macOS build step 1 (PGO build)
|
||||
uses: ./.github/workflows/macos-release-build.yml
|
||||
if: ${{ !inputs.disable-pgo }}
|
||||
needs: [build-data, buildid]
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -348,6 +366,7 @@ jobs:
|
||||
mac-step-2:
|
||||
name: macOS build step 2 (Generate profile data)
|
||||
uses: ./.github/workflows/macos-profile-build.yml
|
||||
if: ${{ !inputs.disable-pgo }}
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
@@ -362,10 +381,13 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
# mac-step-2 is skipped when PGO is disabled, so don't inherit its skip
|
||||
if: ${{ !failure() && !cancelled() }}
|
||||
needs: [build-data, mac-step-2, start-self-host, buildid]
|
||||
with:
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
generate-pgo: false
|
||||
disable-pgo: ${{ inputs.disable-pgo }}
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
use-sccache: ${{ inputs.use-sccache }}
|
||||
@@ -470,14 +492,14 @@ jobs:
|
||||
if: always()
|
||||
steps:
|
||||
- name: Download aws-cli
|
||||
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
if: ${{ inputs.update_branch == 'release' }}
|
||||
run: |
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
unzip awscliv2.zip
|
||||
sudo ./aws/install --update
|
||||
|
||||
- name: Stop self-hosted runner
|
||||
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
if: ${{ inputs.update_branch == 'release' }}
|
||||
run: |
|
||||
echo "Stopping self-hosted runner"
|
||||
echo "${{ secrets.SELF_HOSTED_RUNNER_STOP_SCRIPT }}" | base64 -d > stop.sh
|
||||
@@ -485,13 +507,12 @@ jobs:
|
||||
bash ./stop.sh > /dev/null
|
||||
|
||||
- name: Remove self-hosted runner script
|
||||
if: always() && ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
if: always() && ${{ inputs.update_branch == 'release' }}
|
||||
run: |
|
||||
echo "Removing self-hosted runner script"
|
||||
rm stop.sh || true
|
||||
|
||||
release:
|
||||
if: ${{ inputs.create_release || inputs.update_branch == 'twilight' }}
|
||||
permissions: write-all
|
||||
name: Release
|
||||
needs:
|
||||
@@ -585,6 +606,7 @@ jobs:
|
||||
|
||||
- name: Commit
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
if: ${{ inputs.create_release || inputs.update_branch == 'twilight' }}
|
||||
with:
|
||||
commit_message: 🚀 Update update manifests
|
||||
commit_user_name: Zen Browser Robot
|
||||
@@ -628,9 +650,22 @@ jobs:
|
||||
env:
|
||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||
|
||||
- name: Upload signed MAR files to workflow artifacts
|
||||
if: ${{ inputs.update_branch == 'release' && !inputs.create_release }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 5
|
||||
name: signed-mar-files
|
||||
path: |
|
||||
./linux.mar/*
|
||||
./linux-aarch64.mar/*
|
||||
./.github/workflows/object/windows-x64-signed-x86_64/windows.mar
|
||||
./.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
|
||||
./macos.mar/*
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2.2.2
|
||||
if: ${{ inputs.update_branch == 'release' }}
|
||||
if: ${{ inputs.update_branch == 'release' && inputs.create_release }}
|
||||
with:
|
||||
token: ${{ secrets.DEPLOY_KEY }}
|
||||
tag_name: ${{ needs.build-data.outputs.version }}
|
||||
|
||||
12
.github/workflows/linux-release-build.yml
vendored
12
.github/workflows/linux-release-build.yml
vendored
@@ -20,6 +20,11 @@ on:
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
disable-pgo:
|
||||
description: "Build without PGO at all"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@@ -105,6 +110,8 @@ jobs:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }}
|
||||
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: |
|
||||
. "$HOME/.cargo/env"
|
||||
npm run import
|
||||
@@ -120,7 +127,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build (PGO stage 1 - generate)
|
||||
if: ${{ matrix.arch == 'x86_64' }}
|
||||
if: ${{ matrix.arch == 'x86_64' && !inputs.disable-pgo }}
|
||||
env:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
|
||||
@@ -137,7 +144,7 @@ jobs:
|
||||
bash .github/workflows/src/release-build.sh
|
||||
|
||||
- name: Generate PGO profile data
|
||||
if: ${{ matrix.arch == 'x86_64' }}
|
||||
if: ${{ matrix.arch == 'x86_64' && !inputs.disable-pgo }}
|
||||
run: |
|
||||
set -x
|
||||
export DISPLAY=:2
|
||||
@@ -155,6 +162,7 @@ jobs:
|
||||
env:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
|
||||
ZEN_GA_DISABLE_PGO: ${{ inputs.disable-pgo && '1' || '' }}
|
||||
ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }}
|
||||
ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }}
|
||||
ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
|
||||
|
||||
1
.github/workflows/macos-profile-build.yml
vendored
1
.github/workflows/macos-profile-build.yml
vendored
@@ -23,7 +23,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
|
||||
runs-on: ${{ matrix.arch == 'x86_64' && 'macos-15-intel' || 'macos-26' }}
|
||||
|
||||
steps:
|
||||
|
||||
14
.github/workflows/macos-release-build.yml
vendored
14
.github/workflows/macos-release-build.yml
vendored
@@ -10,6 +10,11 @@ on:
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
disable-pgo:
|
||||
description: "Build without PGO at all"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
build-version:
|
||||
description: "The version to build"
|
||||
required: true
|
||||
@@ -122,6 +127,8 @@ jobs:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }}
|
||||
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 }}
|
||||
SURFER_PLATFORM: darwin
|
||||
run: |
|
||||
. "$HOME/.cargo/env"
|
||||
@@ -138,13 +145,13 @@ jobs:
|
||||
|
||||
- name: Download artifact (if use profdata)
|
||||
uses: actions/download-artifact@v4
|
||||
if: ${{ !inputs.generate-pgo }}
|
||||
if: ${{ !inputs.generate-pgo && !inputs.disable-pgo }}
|
||||
with:
|
||||
path: ~/artifact
|
||||
name: macos-profdata-${{ matrix.arch }}
|
||||
|
||||
- name: Show artifact info
|
||||
if: ${{ !inputs.generate-pgo }}
|
||||
if: ${{ !inputs.generate-pgo && !inputs.disable-pgo }}
|
||||
run: |
|
||||
ls ~/artifact
|
||||
ls ~/artifact/en-US.log
|
||||
@@ -164,6 +171,9 @@ jobs:
|
||||
if test ${{ inputs.generate-pgo }} = true; then
|
||||
export ZEN_GA_GENERATE_PROFILE=1
|
||||
fi
|
||||
if test ${{ inputs.disable-pgo }} = true; then
|
||||
export ZEN_GA_DISABLE_PGO=1
|
||||
fi
|
||||
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
|
||||
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
|
||||
fi
|
||||
|
||||
1
.github/workflows/windows-profile-build.yml
vendored
1
.github/workflows/windows-profile-build.yml
vendored
@@ -27,7 +27,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
|
||||
runs-on: ${{ inputs.release-branch == 'release' && 'windows-latest' || 'windows-latest' }}
|
||||
|
||||
steps:
|
||||
|
||||
18
.github/workflows/windows-release-build.yml
vendored
18
.github/workflows/windows-release-build.yml
vendored
@@ -10,6 +10,11 @@ on:
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
disable-pgo:
|
||||
description: "Build without PGO at all"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
build-version:
|
||||
description: "The version to build"
|
||||
required: true
|
||||
@@ -166,6 +171,8 @@ jobs:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }}
|
||||
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: |
|
||||
. "$HOME/.cargo/env"
|
||||
npm run import -- --verbose
|
||||
@@ -200,8 +207,10 @@ jobs:
|
||||
fi
|
||||
# Stored in build/windows/.windows-rs-version
|
||||
WINDOWS_RS_VERSION=$(cat build/windows/.windows-rs-version)
|
||||
curl -fsSL "https://static.crates.io/crates/cargo-download/cargo-download-0.1.2.crate" | tar xz -C /tmp
|
||||
(cd /tmp/cargo-download-0.1.2 && cargo generate-lockfile && cargo update tinyvec --precise 1.12.0)
|
||||
RUSTFLAGS="--cap-lints=allow" cargo install --path /tmp/cargo-download-0.1.2 --locked
|
||||
cd engine/
|
||||
cargo install cargo-download --locked
|
||||
cargo download -x windows=$WINDOWS_RS_VERSION
|
||||
export CARGO_INCREMENTAL=0
|
||||
echo "" >> ../configs/common/mozconfig
|
||||
@@ -213,13 +222,13 @@ jobs:
|
||||
|
||||
- name: Download artifact (if use profdata)
|
||||
uses: actions/download-artifact@v4
|
||||
if: ${{ !inputs.generate-pgo && matrix.arch == 'x86_64' }}
|
||||
if: ${{ !inputs.generate-pgo && !inputs.disable-pgo && matrix.arch == 'x86_64' }}
|
||||
with:
|
||||
path: ~/artifact
|
||||
name: windows-profdata-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}
|
||||
|
||||
- name: Show artifact info
|
||||
if: ${{ !inputs.generate-pgo && matrix.arch == 'x86_64' }}
|
||||
if: ${{ !inputs.generate-pgo && !inputs.disable-pgo && matrix.arch == 'x86_64' }}
|
||||
run: |
|
||||
ls ~/artifact
|
||||
ls ~/artifact/en-US.log
|
||||
@@ -244,6 +253,9 @@ jobs:
|
||||
if test ${{ inputs.generate-pgo }} = true; then
|
||||
export ZEN_GA_GENERATE_PROFILE=1
|
||||
fi
|
||||
if test ${{ inputs.disable-pgo }} = true; then
|
||||
export ZEN_GA_DISABLE_PGO=1
|
||||
fi
|
||||
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
|
||||
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
|
||||
fi
|
||||
|
||||
@@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
|
||||
|
||||
### Firefox Versions
|
||||
|
||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `154.0`! 🚀
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 154.0`!
|
||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `155.0.1`!
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 155.0.1`!
|
||||
|
||||
### Contributing
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
1fb0703fa9723fd9c400ad60d18e64ee4f9bf125
|
||||
b6d45eac914fd4886c9b6e5f1447f613771228ff
|
||||
@@ -3,8 +3,6 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
param(
|
||||
[string][Parameter(Mandatory=$true)]$SignIdentity,
|
||||
[string][Parameter(Mandatory=$true)]$SignIdentityIssuer,
|
||||
[string][Parameter(Mandatory=$true)]$GithubRunId
|
||||
)
|
||||
|
||||
@@ -24,11 +22,15 @@ mkdir windsign-temp -ErrorAction SilentlyContinue
|
||||
# echo "Downloaded git objects repo to"
|
||||
#} -Verbose -ArgumentList $PWD -Debug
|
||||
|
||||
$token = gh auth token
|
||||
|
||||
$env:SURFER_MOZCONFIG_ONLY="1"
|
||||
$env:SURFER_SIGNING_MODE=""
|
||||
|
||||
$env:SURFER_CERT_PATCH_ISSUER=$SignIdentityIssuer
|
||||
$env:SURFER_CERT_PATCH_NAME=$SignIdentity
|
||||
get-content "$PSScriptRoot/../.env" | foreach {
|
||||
$name, $value = $_.split('=')
|
||||
set-content env:\$name $value
|
||||
}
|
||||
|
||||
Start-Job -Name "DownloadGitl10n" -ScriptBlock {
|
||||
param($PWD)
|
||||
@@ -46,7 +48,6 @@ npm run build
|
||||
|
||||
echo "Downloading artifacts info"
|
||||
$artifactsInfo=gh api repos/zen-browser/desktop/actions/runs/$GithubRunId/artifacts
|
||||
$token = gh auth token
|
||||
|
||||
function New-TemporaryDirectory {
|
||||
$tmp = [System.IO.Path]::GetTempPath() # Not $env:TEMP, see https://stackoverflow.com/a/946017
|
||||
|
||||
@@ -53,7 +53,10 @@ fi
|
||||
if test "$ZEN_RELEASE"; then
|
||||
|
||||
ac_add_options --enable-clang-plugin
|
||||
ac_add_options --enable-bootstrap=-sccache
|
||||
|
||||
if ! test "$ZEN_DISABLE_BOOTSTRAP"; then
|
||||
ac_add_options --enable-bootstrap=-sccache
|
||||
fi
|
||||
|
||||
ac_add_options --enable-optimize
|
||||
|
||||
@@ -69,16 +72,11 @@ if test "$ZEN_RELEASE"; then
|
||||
ac_add_options --disable-geckodriver
|
||||
ac_add_options --disable-rust-tests
|
||||
|
||||
if ! test "$ZEN_DISABLE_LTO"; then
|
||||
# only enable full LTO when ZEN_RELEASE_BRANCH is 'release'
|
||||
if test "$ZEN_RELEASE_BRANCH" = "release"; then
|
||||
# TODO: make it "full" once we have the resources to build it
|
||||
export MOZ_LTO=cross,full
|
||||
ac_add_options --enable-lto=cross,full
|
||||
else
|
||||
export MOZ_LTO=cross,thin
|
||||
ac_add_options --enable-lto=cross,thin
|
||||
fi
|
||||
if test "$ZEN_DISABLE_LTO"; then
|
||||
ac_add_options --disable-lto
|
||||
else
|
||||
export MOZ_LTO=cross,thin
|
||||
ac_add_options --enable-lto=cross,thin
|
||||
fi
|
||||
|
||||
mk_add_options MOZILLA_OFFICIAL=1
|
||||
|
||||
@@ -9,6 +9,9 @@ if test "$ZEN_RELEASE"; then
|
||||
|
||||
# Enable Profile Guided Optimization
|
||||
if ! test "$ZEN_GA_DISABLE_PGO"; then
|
||||
export MOZ_LTO=cross,full
|
||||
ac_add_options --enable-lto=cross,full
|
||||
|
||||
if test "$ZEN_GA_GENERATE_PROFILE"; then
|
||||
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0"
|
||||
ac_add_options --enable-profile-generate=cross
|
||||
|
||||
@@ -45,6 +45,9 @@ if test "$ZEN_CROSS_COMPILING"; then
|
||||
ac_add_options --enable-profile-use=cross
|
||||
ac_add_options --with-pgo-profile-path=$(echo ~)/artifact/merged.profdata
|
||||
ac_add_options --with-pgo-jarlog=$(echo ~)/artifact/en-US.log
|
||||
|
||||
export MOZ_LTO=cross,full
|
||||
ac_add_options --enable-lto=cross,full
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -26,3 +26,5 @@ files:
|
||||
translation: browser/browser/zen-space-routing.ftl
|
||||
- source: en-US/browser/browser/zen-command-palette.ftl
|
||||
translation: browser/browser/zen-command-palette.ftl
|
||||
- source: en-US/browser/browser/zen-share.ftl
|
||||
translation: browser/browser/zen-share.ftl
|
||||
|
||||
@@ -64,6 +64,14 @@ zen-tabs-select-recently-used-on-close =
|
||||
zen-tabs-close-on-back-with-no-history =
|
||||
.label = Close tab and switch to its owner tab (or most recently used tab) when going back with no history
|
||||
|
||||
zen-settings-workspaces-sync =
|
||||
.label = Sync your sidebar across devices
|
||||
.description = Keep your workspaces, pinned tabs and folders in sync on all your devices through your Mozilla account.
|
||||
|
||||
zen-settings-normal-tabs-sync =
|
||||
.label = Include unpinned tabs
|
||||
.description = Also sync the regular tabs of each space, not just your pinned tabs and folders.
|
||||
|
||||
zen-settings-workspaces-sync-unpinned-tabs =
|
||||
.label = Sync only pinned tabs in workspaces
|
||||
|
||||
|
||||
@@ -164,5 +164,5 @@ zen-window-sync-migration-dialog-learn-more = Learn More
|
||||
zen-window-sync-migration-dialog-accept = Got It
|
||||
|
||||
zen-appmenu-new-blank-window =
|
||||
.label = New blank window
|
||||
.label = New Blank Window
|
||||
|
||||
|
||||
43
locales/en-US/browser/browser/zen-share.ftl
Normal file
43
locales/en-US/browser/browser/zen-share.ftl
Normal file
@@ -0,0 +1,43 @@
|
||||
# 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-share-space =
|
||||
.label = Share Space…
|
||||
zen-share-folder =
|
||||
.label = Share Folder…
|
||||
zen-share-split-view =
|
||||
.label = Share Split View…
|
||||
|
||||
zen-share-link-copied-toast = Share link copied!
|
||||
zen-share-link-expires-description = Anyone with the link can open it until { $date }
|
||||
zen-share-link-permanent-description = Anyone with the link can open it
|
||||
|
||||
zen-share-error-toast = Couldn't create a share link
|
||||
zen-share-error-auth-description = The share server rejected your key
|
||||
zen-share-error-too-large-description = This share is too big to upload
|
||||
zen-share-error-rate-limited-description = You're sharing too fast, try again in a minute
|
||||
zen-share-error-network-description = Couldn't reach the share server
|
||||
zen-share-error-empty-description = There's nothing shareable here
|
||||
zen-share-error-server-description = The share server returned an error
|
||||
|
||||
zen-share-overlay-loading = Loading shared tabs…
|
||||
zen-share-overlay-from-space = A Space from { $name }
|
||||
zen-share-overlay-from-folder = A Folder from { $name }
|
||||
zen-share-overlay-shared-with-you = Shared with you
|
||||
zen-share-overlay-add-space = Add Space to Zen
|
||||
zen-share-overlay-add-folder = Add Folder to Zen
|
||||
zen-share-imported-toast = Added to your browser!
|
||||
zen-share-import-error-toast = Couldn't import this share
|
||||
zen-share-import-error-dead-description = The link has expired or doesn't exist
|
||||
zen-share-import-error-invalid-description = The shared data is invalid
|
||||
|
||||
zen-share-confirm-title = Share link
|
||||
zen-share-confirm-dialog =
|
||||
.buttonlabelaccept = Share
|
||||
zen-share-confirm-description = Zen uploads a copy of these tabs to the share server and copies a link anyone can open. The link expires after 30 days.
|
||||
zen-share-confirm-anonymous = Sharing is anonymous unless you add a name.
|
||||
zen-share-confirm-name-input =
|
||||
.placeholder = Your name (optional)
|
||||
zen-share-confirm-dont-ask =
|
||||
.label = Don't ask me again
|
||||
@@ -5,14 +5,14 @@
|
||||
tab-zen-split-tabs =
|
||||
.label =
|
||||
{ $tabCount ->
|
||||
[-1] Split out tab
|
||||
[1] Add split view...
|
||||
[-1] Split Out Tab
|
||||
[1] Add Split View...
|
||||
*[other] Join { $tabCount } Tabs
|
||||
}
|
||||
.accesskey = S
|
||||
|
||||
zen-split-link =
|
||||
.label = Split link to new tab
|
||||
.label = Split Link to New Tab
|
||||
.accesskey = S
|
||||
|
||||
zen-split-view-modifier-header = Split View
|
||||
|
||||
@@ -5,29 +5,33 @@
|
||||
zen-welcome-title-line1 = Welcome to
|
||||
zen-welcome-title-line2 = a calmer internet
|
||||
|
||||
zen-welcome-import-title = A Fresh Start, Same Bookmarks
|
||||
zen-welcome-import-description-1 = Your bookmarks, history, and passwords are like a trail of breadcrumbs through the internet—don’t leave them behind!
|
||||
zen-welcome-import-description-2 = Easily bring them over from another browser and pick up right where you left off.
|
||||
zen-welcome-import-button = Import now
|
||||
zen-welcome-back = Back
|
||||
zen-welcome-skip = Skip for now
|
||||
|
||||
zen-welcome-set-default-browser = Set { -brand-short-name } as your default browser
|
||||
zen-welcome-dont-set-default-browser = DON’T set { -brand-short-name } as your default browser
|
||||
zen-welcome-import-title = Bring your stuff along.
|
||||
zen-welcome-import-description = Import your bookmarks, history and passwords from another browser and pick up right where you left off.
|
||||
zen-welcome-import-yes = <strong>YES</strong>, import from another browser.
|
||||
zen-welcome-import-no = <strong>NO</strong>, start fresh.
|
||||
|
||||
zen-welcome-initial-essentials-title = Your Key Tabs, Always Within Reach
|
||||
zen-welcome-initial-essentials-description-1 = Keep your most important tabs easily accessible and always at hand, no matter how many you open.
|
||||
zen-welcome-initial-essentials-description-2 = Essential tabs are always visible, no matter what workspace you are in.
|
||||
zen-welcome-default-browser-title = Make { -brand-short-name } your default?
|
||||
zen-welcome-default-browser-description = Links from other apps will open in { -brand-short-name }. You can always change this later.
|
||||
zen-welcome-set-default-browser = <strong>YES</strong>, make { -brand-short-name } default.
|
||||
zen-welcome-dont-set-default-browser = <strong>NO</strong>, still exploring my options.
|
||||
|
||||
zen-welcome-workspace-colors-title = Your Workspaces, Your Colors
|
||||
zen-welcome-workspace-colors-description = Personalize your browser by giving each workspace its own unique color identity.
|
||||
|
||||
zen-welcome-start-browsing-title = All set?<br/>
|
||||
Let’s get rolling!
|
||||
zen-welcome-start-browsing-description-1 = You’re all set up and ready to go. Click the button below to start browsing with { -brand-short-name }.
|
||||
zen-welcome-start-browsing = Dive in!
|
||||
|
||||
zen-welcome-default-search-title = Your Default Search Engine
|
||||
zen-welcome-default-search-title = Pick your search engine.
|
||||
zen-welcome-default-search-description = Choose your default search engine. You can always change it later!
|
||||
|
||||
zen-welcome-skip-button = Skip
|
||||
zen-welcome-essentials-title = Choose the apps you use most.
|
||||
zen-welcome-essentials-description = Select your favorite apps to keep them handy in your sidebar.
|
||||
|
||||
zen-welcome-finished = Your Zen has been set up correctly!
|
||||
zen-welcome-block-ads-title = Block ads and trackers?
|
||||
zen-welcome-block-ads-description = { -brand-short-name } can install uBlock Origin for you, so pages load cleaner and faster. You can remove it any time.
|
||||
zen-welcome-block-ads-yes = <strong>YES</strong>, block ads for me.
|
||||
zen-welcome-block-ads-no = <strong>NO</strong>, show me everything.
|
||||
|
||||
zen-welcome-workspace-colors-title = Your space, your colors.
|
||||
zen-welcome-workspace-colors-description = Personalize your browser by giving each space its own unique color identity.
|
||||
|
||||
zen-welcome-start-browsing-title = All set? Let’s get rolling!
|
||||
zen-welcome-start-browsing-description-1 = You’re all set up and ready to go. Click the button below to start browsing with { -brand-short-name }.
|
||||
zen-welcome-start-browsing = Dive in!
|
||||
|
||||
@@ -86,6 +86,8 @@ zen-workspace-default-profile = Default
|
||||
|
||||
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-remote-delete-title = Delete Synced Space?
|
||||
zen-workspaces-remote-delete-body = { $name } was deleted on another device. Delete it here too? Keeping it will restore it on your other devices.
|
||||
|
||||
# Note that the html tag MUST not be changed or removed, as it is used to better
|
||||
# display the shortcut in the toast notification.
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -11,7 +11,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/preset-typescript": "^7.27.0",
|
||||
"@zen-browser/prettier": "^3.9.3",
|
||||
"@zen-browser/surfer": "^1.14.7",
|
||||
"@zen-browser/surfer": "^1.14.9",
|
||||
"formal-git": "^1.2.9",
|
||||
"globals": "^16.3.0",
|
||||
"husky": "^9.1.7",
|
||||
@@ -860,9 +860,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@zen-browser/surfer": {
|
||||
"version": "1.14.7",
|
||||
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.14.7.tgz",
|
||||
"integrity": "sha512-Ui2Chqvr4/+FmHM54eKOv7cQu8DRAK/uCX9o1GNi81hszxo/RSQwaw71eNW43Qcj7giK4U4x0IdCMht98iQ0rA==",
|
||||
"version": "1.14.9",
|
||||
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.14.9.tgz",
|
||||
"integrity": "sha512-XbMzG4GHSRoGzKR/DkpyywcbTYemieDRD1A6qgJ8CaVDixenj/uzMhp6HXAUksRTeh1u9j3lzNcVrI99axcZLw==",
|
||||
"dev": true,
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/preset-typescript": "^7.27.0",
|
||||
"@zen-browser/prettier": "^3.9.3",
|
||||
"@zen-browser/surfer": "^1.14.7",
|
||||
"@zen-browser/surfer": "^1.14.9",
|
||||
"formal-git": "^1.2.9",
|
||||
"globals": "^16.3.0",
|
||||
"husky": "^9.1.7",
|
||||
|
||||
@@ -95,6 +95,9 @@
|
||||
- name: browser.search.widget.new
|
||||
value: true
|
||||
|
||||
- name: layout.css.corner-shape.enabled
|
||||
value: true
|
||||
|
||||
# Disabled from https://searchfox.org/firefox-main/rev/d6bfff43852356ca98af848b4705d37f8d41856f/modules/libpref/init/StaticPrefList.yaml#2008
|
||||
# Only enabled for windows, doesn't really fit inside Zen.
|
||||
- name: browser.startup.preXulSkeletonUI
|
||||
|
||||
@@ -2,5 +2,18 @@
|
||||
# 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/.
|
||||
|
||||
- name: zen.share.enabled
|
||||
- name: zen.share.base-url
|
||||
value: "https://share.zen-browser.app"
|
||||
|
||||
- name: zen.share.secret-key
|
||||
value: ""
|
||||
|
||||
- name: zen.share.display-name
|
||||
value: ""
|
||||
|
||||
# Allow zen.share.display-name to be synced across devices.
|
||||
- name: services.sync.prefs.sync.zen.share.display-name
|
||||
value: true
|
||||
|
||||
- name: zen.share.dont-ask-before-sharing
|
||||
value: false
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
- name: services.sync.engine.spaces
|
||||
value: true
|
||||
value: "@cond"
|
||||
condition: "@IS_TWILIGHT@"
|
||||
|
||||
- name: services.sync.engine.spaces
|
||||
- name: zen.spaces-sync.debug
|
||||
value: false
|
||||
locked: true
|
||||
condition: "!@IS_TWILIGHT@"
|
||||
|
||||
- name: zen.spaces-sync.normal-tabs
|
||||
value: false
|
||||
|
||||
- name: services.sync.prefs.sync.zen.spaces-sync.normal-tabs
|
||||
value: true
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
- name: zen.theme.acrylic-elements
|
||||
value: "@IS_TWILIGHT@"
|
||||
|
||||
- name: zen.theme.squircle-browser-view
|
||||
value: "@IS_TWILIGHT@"
|
||||
|
||||
- name: zen.theme.disable-lightweight
|
||||
value: true
|
||||
|
||||
|
||||
@@ -8,4 +8,4 @@ packaging==24.2
|
||||
pathspec==0.12.1
|
||||
platformdirs==4.3.6
|
||||
pycodestyle==2.12.1
|
||||
requests==2.33.0
|
||||
requests==2.34.2
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/.prettierignore b/.prettierignore
|
||||
index 949896ff064ae0b54b6a657ea074bc88e12820f7..5249f420972667bece4d85fe8d35073afaebeb8a 100644
|
||||
index bd8ab46ff7175f5039b69b04c1afe53ab8efe746..7ae12a1ff3724e99aeec2e93518640a2fa9611e6 100644
|
||||
--- a/.prettierignore
|
||||
+++ b/.prettierignore
|
||||
@@ -1803,3 +1803,12 @@ tools/ts/test/baselines/
|
||||
@@ -1807,3 +1807,12 @@ tools/ts/test/baselines/
|
||||
try_task_config.json
|
||||
xpcom/idl-parser/xpidl/fixtures/xpctest.d.json
|
||||
**/package-lock.json
|
||||
@@ -12,6 +12,6 @@ index 949896ff064ae0b54b6a657ea074bc88e12820f7..5249f420972667bece4d85fe8d35073a
|
||||
+*.min.js
|
||||
+*.min.mjs
|
||||
+*.inc
|
||||
+*/mochitests/*
|
||||
+**/mochitests/**
|
||||
+*.svg
|
||||
+
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/.stylelintrc.js b/.stylelintrc.js
|
||||
index b484bf6600a7e1b8ad2aed8c8b7fe5e84cc3d023..f89712e2c13dfa0bcb48e55cd3872c67f5c98dad 100644
|
||||
index b5f8245fa04ffb8fc82240261d63f893f4629f19..1b6ead24adbe69fcb5aeb95cfd3e7fa9662d89d8 100644
|
||||
--- a/.stylelintrc.js
|
||||
+++ b/.stylelintrc.js
|
||||
@@ -67,7 +67,7 @@ module.exports = {
|
||||
@@ -11,10 +11,10 @@ index b484bf6600a7e1b8ad2aed8c8b7fe5e84cc3d023..f89712e2c13dfa0bcb48e55cd3872c67
|
||||
{
|
||||
ignore: ["blockless-at-rules"],
|
||||
},
|
||||
@@ -280,7 +280,7 @@ module.exports = {
|
||||
"media-query-no-invalid": null,
|
||||
@@ -281,7 +281,7 @@ module.exports = {
|
||||
"stylelint-plugin-mozilla/media-query-no-invalid": true,
|
||||
"stylelint-plugin-mozilla/no-base-design-tokens": true,
|
||||
"stylelint-plugin-mozilla/no-has-selector": true,
|
||||
- "stylelint-plugin-mozilla/use-design-tokens": true,
|
||||
+ "stylelint-plugin-mozilla/use-design-tokens": false,
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
index dd2f391096968564086911c532f696dc7ffb8ae1..3de617bf4fb7fa35f7d4d7b618e4673b72b953ee 100644
|
||||
index dd2f391096968564086911c532f696dc7ffb8ae1..c968e5f0ebb5f0151fb124bafe10d8d5361e060f 100644
|
||||
--- a/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
@@ -2,7 +2,7 @@
|
||||
@@ -19,7 +19,7 @@ index dd2f391096968564086911c532f696dc7ffb8ae1..3de617bf4fb7fa35f7d4d7b618e4673b
|
||||
</toolbar>
|
||||
|
||||
+<hbox id="titlebar">
|
||||
+ <html:div id="zen-toolbar-background" class="zen-toolbar-background zen-browser-generic-background">
|
||||
+ <html:div id="zen-toolbar-background" class="zen-toolbar-background zen-squircle-before zen-squircle-after zen-browser-generic-background">
|
||||
+ <html:div class="zen-browser-grain" />
|
||||
+ </html:div>
|
||||
+ <box id="zen-overflow-extensions-list" skipintoolbarset="true" contextmenu="toolbar-context-menu" />
|
||||
|
||||
@@ -21,3 +21,4 @@
|
||||
#include ../../../zen/boosts/jar.inc.mn
|
||||
#include ../../../zen/live-folders/jar.inc.mn
|
||||
#include ../../../zen/space-routing/jar.inc.mn
|
||||
#include ../../../zen/share/jar.inc.mn
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<command id="cmd_zenSplitViewUnsplit" />
|
||||
<command id="cmd_zenSplitViewLinkInNewTab" />
|
||||
<command id="cmd_zenSplitViewContextMenu" />
|
||||
<command id="cmd_zenCtxShareSplitView" />
|
||||
<command id="cmd_zenNewEmptySplit" />
|
||||
|
||||
<!-- Workspace commands -->
|
||||
@@ -40,6 +41,7 @@
|
||||
<command id="cmd_contextZenRemoveFromEssentials" />
|
||||
|
||||
<command id="cmd_zenCtxDeleteWorkspace" />
|
||||
<command id="cmd_zenCtxShareWorkspace" />
|
||||
<command id="cmd_zenUnloadWorkspace" />
|
||||
<command id="cmd_zenUnloadAllOtherWorkspace" />
|
||||
<command id="cmd_zenOpenSpaceRoutingSettings" />
|
||||
|
||||
@@ -12,4 +12,5 @@
|
||||
<link rel="localization" href="browser/zen-boosts.ftl"/>
|
||||
<link rel="localization" href="browser/zen-live-folders.ftl"/>
|
||||
<link rel="localization" href="browser/zen-space-routing.ftl"/>
|
||||
<link rel="localization" href="browser/zen-share.ftl"/>
|
||||
</linkset>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<menuitem id="context_zenUnloadAllOtherWorkspace" data-l10n-id="zen-workspaces-panel-unload-others" command="cmd_zenUnloadAllOtherWorkspace"/>
|
||||
<menuseparator/>
|
||||
<menuitem data-l10n-id="zen-panel-ui-workspaces-create" command="cmd_zenOpenWorkspaceCreation"/>
|
||||
<menuitem id="context_zenShareWorkspace" data-l10n-id="zen-share-space" command="cmd_zenCtxShareWorkspace"/>
|
||||
<menuitem id="context_zenDeleteWorkspace" data-l10n-id="zen-workspaces-panel-context-delete" command="cmd_zenCtxDeleteWorkspace"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="context_zenSpaceRoutingSettings" data-l10n-id="zen-space-routing-settings" command="cmd_zenOpenSpaceRoutingSettings"/>
|
||||
@@ -55,6 +56,7 @@
|
||||
<menupopup />
|
||||
</menu>
|
||||
<menuitem id="context_zenFolderToSpace" data-l10n-id="zen-folders-panel-convert-folder-to-space" />
|
||||
<menuitem id="context_zenShareFolder" data-l10n-id="zen-share-folder"/>
|
||||
<menuseparator />
|
||||
<menuitem id="context_zenFolderUnpack" data-l10n-id="zen-folders-panel-unpack-folder"/>
|
||||
<menuitem id="context_zenFolderDelete" data-l10n-id="zen-folders-panel-delete-folder"/>
|
||||
|
||||
@@ -15,19 +15,23 @@
|
||||
mainview-with-header="true">
|
||||
<hbox id="zen-site-data-header">
|
||||
<toolbarbutton id="zen-site-data-header-share"
|
||||
class="zen-squircle-before"
|
||||
data-l10n-id="zen-site-data-header-share"
|
||||
flex="1"
|
||||
closemenu="none" />
|
||||
<toolbarbutton id="zen-site-data-header-reader-mode"
|
||||
class="zen-squircle-before"
|
||||
data-l10n-id="zen-site-data-header-reader-mode"
|
||||
command="View:ReaderView"
|
||||
tooltip="dynamic-shortcut-tooltip"
|
||||
flex="1" />
|
||||
<toolbarbutton id="zen-site-data-header-screenshot"
|
||||
class="zen-squircle-before"
|
||||
data-l10n-id="zen-site-data-header-screenshot"
|
||||
command="Browser:Screenshot"
|
||||
flex="1" />
|
||||
<toolbarbutton id="zen-site-data-header-bookmark"
|
||||
class="zen-squircle-before"
|
||||
data-l10n-id="zen-site-data-header-bookmark"
|
||||
command="Browser:AddBookmarkAs"
|
||||
flex="1" />
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
<panelview id="PanelUI-zen-gradient-generator-view" class="PanelUI-subView zen-theme-picker" role="document" mainview-with-header="true" has-custom-header="true">
|
||||
<hbox class="zen-theme-picker-gradient">
|
||||
<hbox id="PanelUI-zen-gradient-generator-scheme">
|
||||
<button id="PanelUI-zen-gradient-generator-scheme-auto" class="subviewbutton"/>
|
||||
<button id="PanelUI-zen-gradient-generator-scheme-light" class="subviewbutton"/>
|
||||
<button id="PanelUI-zen-gradient-generator-scheme-dark" class="subviewbutton"/>
|
||||
<button id="PanelUI-zen-gradient-generator-scheme-auto" class="no-squircles subviewbutton"/>
|
||||
<button id="PanelUI-zen-gradient-generator-scheme-light" class="no-squircles subviewbutton"/>
|
||||
<button id="PanelUI-zen-gradient-generator-scheme-dark" class="no-squircles subviewbutton"/>
|
||||
</hbox>
|
||||
<hbox id="PanelUI-zen-gradient-generator-color-actions">
|
||||
<button id="PanelUI-zen-gradient-generator-color-add" class="subviewbutton" />
|
||||
<button id="PanelUI-zen-gradient-generator-color-remove" class="subviewbutton" />
|
||||
<button id="PanelUI-zen-gradient-generator-color-toggle-algo" class="subviewbutton" />
|
||||
<button id="PanelUI-zen-gradient-generator-color-add" class="no-squircles subviewbutton" />
|
||||
<button id="PanelUI-zen-gradient-generator-color-remove" class="no-squircles subviewbutton" />
|
||||
<button id="PanelUI-zen-gradient-generator-color-toggle-algo" class="no-squircles subviewbutton" />
|
||||
</hbox>
|
||||
<label data-l10n-id="zen-panel-ui-gradient-click-to-add" id="PanelUI-zen-gradient-generator-color-click-to-add"></label>
|
||||
</hbox>
|
||||
@@ -29,82 +29,82 @@
|
||||
<toolbarbutton id="PanelUI-zen-gradient-generator-color-page-left" class="toolbarbutton-1" disabled="true" />
|
||||
<hbox id="PanelUI-zen-gradient-generator-color-pages">
|
||||
<hbox>
|
||||
<box data-lightness="90" data-algo="float" data-num-dots="1" data-position="240,240" style="background: #f4efdf;"></box>
|
||||
<box data-lightness="80" data-algo="float" data-num-dots="1" data-position="233,157" style="background: #f0b8cd;"></box>
|
||||
<box data-lightness="80" data-algo="float" data-num-dots="1" data-position="236,111" style="background: #e9c3e3;"></box>
|
||||
<box data-lightness="70" data-algo="float" data-num-dots="1" data-position="234,173" style="background: #da7682;"></box>
|
||||
<box data-lightness="70" data-algo="float" data-num-dots="1" data-position="220,187" style="background: #eb8570;"></box>
|
||||
<box data-lightness="60" data-algo="float" data-num-dots="1" data-position="225,237" style="background: #dcce7f;"></box>
|
||||
<box data-lightness="60" data-algo="float" data-num-dots="1" data-position="147,195" style="background: #5becad;"></box>
|
||||
<box data-lightness="50" data-algo="float" data-num-dots="1" data-position="81,84" style="background: #919bb5;"></box>
|
||||
<box class="no-squircles" data-lightness="90" data-algo="float" data-num-dots="1" data-position="240,240" style="background: #f4efdf;"></box>
|
||||
<box class="no-squircles" data-lightness="80" data-algo="float" data-num-dots="1" data-position="233,157" style="background: #f0b8cd;"></box>
|
||||
<box class="no-squircles" data-lightness="80" data-algo="float" data-num-dots="1" data-position="236,111" style="background: #e9c3e3;"></box>
|
||||
<box class="no-squircles" data-lightness="70" data-algo="float" data-num-dots="1" data-position="234,173" style="background: #da7682;"></box>
|
||||
<box class="no-squircles" data-lightness="70" data-algo="float" data-num-dots="1" data-position="220,187" style="background: #eb8570;"></box>
|
||||
<box class="no-squircles" data-lightness="60" data-algo="float" data-num-dots="1" data-position="225,237" style="background: #dcce7f;"></box>
|
||||
<box class="no-squircles" data-lightness="60" data-algo="float" data-num-dots="1" data-position="147,195" style="background: #5becad;"></box>
|
||||
<box class="no-squircles" data-lightness="50" data-algo="float" data-num-dots="1" data-position="81,84" style="background: #919bb5;"></box>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<box data-lightness="90" data-algo="analogous" data-num-dots="3" data-position="240,240"
|
||||
<box class="no-squircles" data-lightness="90" data-algo="analogous" data-num-dots="3" data-position="240,240"
|
||||
style="--c1: rgb(245, 237, 214); --c2: rgb(221, 243, 216); --c3: rgb(243, 216, 225);" />
|
||||
<box data-lightness="85" data-algo="analogous" data-num-dots="3" data-position="233,157"
|
||||
<box class="no-squircles" data-lightness="85" data-algo="analogous" data-num-dots="3" data-position="233,157"
|
||||
style="--c1: rgb(243, 190, 222); --c2: rgb(247, 222, 186); --c3: rgb(223, 195, 238);" />
|
||||
<box data-lightness="80" data-algo="analogous" data-num-dots="3" data-position="236,111"
|
||||
<box class="no-squircles" data-lightness="80" data-algo="analogous" data-num-dots="3" data-position="236,111"
|
||||
style="--c1: rgb(229, 179, 228); --c2: rgb(236, 172, 178); --c3: rgb(197, 185, 223);" />
|
||||
<box data-lightness="70" data-algo="analogous" data-num-dots="3" data-position="234,173"
|
||||
<box class="no-squircles" data-lightness="70" data-algo="analogous" data-num-dots="3" data-position="234,173"
|
||||
style="--c1: rgb(235, 122, 159); --c2: rgb(239, 239, 118); --c3: rgb(210, 133, 224);" />
|
||||
<box data-lightness="70" data-algo="analogous" data-num-dots="3" data-position="220,187"
|
||||
<box class="no-squircles" data-lightness="70" data-algo="analogous" data-num-dots="3" data-position="220,187"
|
||||
style="--c1: rgb(242, 115, 123); --c2: rgb(175, 242, 115); --c3: rgb(230, 125, 232);" />
|
||||
<box data-lightness="60" data-algo="analogous" data-num-dots="3" data-position="225,237"
|
||||
<box class="no-squircles" data-lightness="60" data-algo="analogous" data-num-dots="3" data-position="225,237"
|
||||
style="--c1: rgb(221, 205, 85); --c2: rgb(97, 212, 94); --c3: rgb(215, 91, 124);" />
|
||||
<box data-lightness="60" data-algo="analogous" data-num-dots="3" data-position="147,195"
|
||||
<box class="no-squircles" data-lightness="60" data-algo="analogous" data-num-dots="3" data-position="147,195"
|
||||
style="--c1: rgb(75, 231, 210); --c2: rgb(84, 175, 222); --c3: rgb(62, 244, 112);" />
|
||||
<box data-lightness="55" data-algo="analogous" data-num-dots="3" data-position="81,84"
|
||||
<box class="no-squircles" data-lightness="55" data-algo="analogous" data-num-dots="3" data-position="81,84"
|
||||
style="--c1: rgb(122, 132, 158); --c2: rgb(137, 117, 164); --c3: rgb(116, 162, 164);" />
|
||||
</hbox>
|
||||
<hbox>
|
||||
<box data-lightness="10" data-algo="float" data-num-dots="1" data-position="171,72" style="background:rgb(93, 86, 106);"></box>
|
||||
<box data-lightness="40" data-algo="float" data-num-dots="1" data-position="265,79" style="background: #997096;"></box>
|
||||
<box data-lightness="35" data-algo="float" data-num-dots="1" data-position="301,176" style="background: #956066;"></box>
|
||||
<box data-lightness="30" data-algo="float" data-num-dots="1" data-position="237,210" style="background: #9c6645;"></box>
|
||||
<box data-lightness="30" data-algo="float" data-num-dots="1" data-position="91,228" style="background: #517b6c;"></box>
|
||||
<box data-lightness="25" data-algo="float" data-num-dots="1" data-position="67,159" style="background: #576e75;"></box>
|
||||
<box data-lightness="20" data-algo="float" data-num-dots="1" data-position="314,235" style="background:rgb(131, 109, 95);"></box>
|
||||
<box data-lightness="20" data-algo="float" data-num-dots="1" data-position="118,215" style="background: #447464;"></box>
|
||||
<box class="no-squircles" data-lightness="10" data-algo="float" data-num-dots="1" data-position="171,72" style="background:rgb(93, 86, 106);"></box>
|
||||
<box class="no-squircles" data-lightness="40" data-algo="float" data-num-dots="1" data-position="265,79" style="background: #997096;"></box>
|
||||
<box class="no-squircles" data-lightness="35" data-algo="float" data-num-dots="1" data-position="301,176" style="background: #956066;"></box>
|
||||
<box class="no-squircles" data-lightness="30" data-algo="float" data-num-dots="1" data-position="237,210" style="background: #9c6645;"></box>
|
||||
<box class="no-squircles" data-lightness="30" data-algo="float" data-num-dots="1" data-position="91,228" style="background: #517b6c;"></box>
|
||||
<box class="no-squircles" data-lightness="25" data-algo="float" data-num-dots="1" data-position="67,159" style="background: #576e75;"></box>
|
||||
<box class="no-squircles" data-lightness="20" data-algo="float" data-num-dots="1" data-position="314,235" style="background:rgb(131, 109, 95);"></box>
|
||||
<box class="no-squircles" data-lightness="20" data-algo="float" data-num-dots="1" data-position="118,215" style="background: #447464;"></box>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<box data-lightness="10" data-algo="analogous" data-num-dots="3" data-position="171,72"
|
||||
<box class="no-squircles" data-lightness="10" data-algo="analogous" data-num-dots="3" data-position="171,72"
|
||||
style="--c1: rgb(23, 17, 34); --c2: rgb(37, 14, 35); --c3: rgb(18, 22, 33);" />
|
||||
<box data-lightness="40" data-algo="analogous" data-num-dots="3" data-position="265,79"
|
||||
<box class="no-squircles" data-lightness="40" data-algo="analogous" data-num-dots="3" data-position="265,79"
|
||||
style="--c1: rgb(128, 76, 124); --c2: rgb(141, 63, 66); --c3: rgb(97, 88, 116);" />
|
||||
<box data-lightness="35" data-algo="analogous" data-num-dots="3" data-position="301,176"
|
||||
<box class="no-squircles" data-lightness="35" data-algo="analogous" data-num-dots="3" data-position="301,176"
|
||||
style="--c1: rgb(122, 56, 64); --c2: rgb(126, 121, 52); --c3: rgb(111, 68, 110);" />
|
||||
<box data-lightness="30" data-algo="analogous" data-num-dots="3" data-position="237,210"
|
||||
<box class="no-squircles" data-lightness="30" data-algo="analogous" data-num-dots="3" data-position="237,210"
|
||||
style="--c1: rgb(131, 65, 22); --c2: rgb(64, 128, 25); --c3: rgb(122, 31, 91);" />
|
||||
<box data-lightness="30" data-algo="analogous" data-num-dots="3" data-position="91,228"
|
||||
<box class="no-squircles" data-lightness="30" data-algo="analogous" data-num-dots="3" data-position="91,228"
|
||||
style="--c1: rgb(45, 108, 85); --c2: rgb(52, 85, 101); --c3: rgb(52, 118, 35);" />
|
||||
<box data-lightness="25" data-algo="analogous" data-num-dots="3" data-position="67,159"
|
||||
<box class="no-squircles" data-lightness="25" data-algo="analogous" data-num-dots="3" data-position="67,159"
|
||||
style="--c1: rgb(45, 74, 83); --c2: rgb(46, 50, 81); --c3: rgb(38, 90, 65);" />
|
||||
<box data-lightness="20" data-algo="analogous" data-num-dots="3" data-position="314,235"
|
||||
<box class="no-squircles" data-lightness="20" data-algo="analogous" data-num-dots="3" data-position="314,235"
|
||||
style="--c1: rgb(64, 47, 38); --c2: rgb(55, 64, 38); --c3: rgb(59, 43, 52);" />
|
||||
<box data-lightness="20" data-algo="analogous" data-num-dots="3" data-position="118,215"
|
||||
<box class="no-squircles" data-lightness="20" data-algo="analogous" data-num-dots="3" data-position="118,215"
|
||||
style="--c1: rgb(22, 80, 61); --c2: rgb(26, 60, 76); --c3: rgb(27, 87, 15);" />
|
||||
</hbox>
|
||||
<hbox>
|
||||
# Start from black to white in a span on 8 steps and.
|
||||
# They must all go from the middle to the right side. They must always stay verically centered.
|
||||
# And reach to 180 on the right side, meaning we must divide the width in 16 segments.
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="340,180" style="background: rgb(224, 224, 224);"></box>
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="337.5,180" style="background: rgb(224, 224, 224);"></box>
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="315,180" style="background: rgb(192, 192, 192);"></box>
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="292.5,180" style="background: rgb(160, 160, 160);"></box>
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="270,180" style="background: rgb(128, 128, 128);"></box>
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="247.5,180" style="background: rgb(96, 96, 96);"></box>
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="225,180" style="background: rgb(64, 64, 64);"></box>
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="202.5,180" style="background: rgb(32, 32, 32);"></box>
|
||||
<box data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
<box class="no-squircles" data-type="explicit-black-white" data-algo="float" data-num-dots="1"
|
||||
data-position="180,180" style="background: rgb(0, 0, 0);"></box>
|
||||
</hbox>
|
||||
</hbox>
|
||||
@@ -131,10 +131,10 @@
|
||||
</box>
|
||||
<html:input type="range" value="0.4" step="0.001" id="PanelUI-zen-gradient-generator-opacity"
|
||||
#ifdef XP_MACOSX
|
||||
max="0.9"
|
||||
max="0.8"
|
||||
min="0.30"
|
||||
#else
|
||||
max="0.9"
|
||||
max="0.8"
|
||||
min="0.25"
|
||||
#endif
|
||||
/>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
diff --git a/browser/components/contextualidentity/content/ContainerCreationPanel.mjs b/browser/components/contextualidentity/content/ContainerCreationPanel.mjs
|
||||
index e04d7a4738192703e8f7f8555f50aaf0a619a5bd..b86e4853c421856f84ad8e017062f0d611b88aad 100644
|
||||
--- a/browser/components/contextualidentity/content/ContainerCreationPanel.mjs
|
||||
+++ b/browser/components/contextualidentity/content/ContainerCreationPanel.mjs
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { ContainerEditor } from "chrome://browser/content/usercontext/ContainerEditor.mjs";
|
||||
|
||||
-const ANCHOR_ID = "userContext-icons";
|
||||
+const ANCHOR_ID = "navigator-toolbox";
|
||||
const ANCHOR_PINNED_CLASS = "container-anchor-pinned";
|
||||
|
||||
const lazy = {};
|
||||
@@ -95,6 +95,6 @@ export const ContainerCreationPanel = {
|
||||
anchor.hidden = false;
|
||||
}
|
||||
|
||||
- panel.openPopup(anchor, "bottomright topright");
|
||||
+ panel.openPopup(anchor, win.gZenUIManager.panelUIPosition());
|
||||
},
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2681652e5 100644
|
||||
index 6d1885a54815d10b3a4e79f7e5acd61ab3abb159..3d6e092e7ed126cdee8c32229df2cfa13303d3a3 100644
|
||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -10,7 +10,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
PanelMultiView:
|
||||
"moz-src:///browser/components/customizableui/PanelMultiView.sys.mjs",
|
||||
@@ -348,7 +349,7 @@ var CustomizableUIInternal = {
|
||||
@@ -352,7 +353,7 @@ var CustomizableUIInternal = {
|
||||
{
|
||||
type: CustomizableUI.TYPE_PANEL,
|
||||
defaultPlacements: [],
|
||||
@@ -19,7 +19,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
},
|
||||
false
|
||||
);
|
||||
@@ -358,27 +359,23 @@ var CustomizableUIInternal = {
|
||||
@@ -362,27 +363,23 @@ var CustomizableUIInternal = {
|
||||
"back-button",
|
||||
"forward-button",
|
||||
"stop-reload-button",
|
||||
@@ -50,17 +50,18 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
defaultCollapsed: false,
|
||||
},
|
||||
true
|
||||
@@ -402,9 +399,6 @@ var CustomizableUIInternal = {
|
||||
@@ -406,10 +403,6 @@ var CustomizableUIInternal = {
|
||||
type: CustomizableUI.TYPE_TOOLBAR,
|
||||
defaultPlacements: [
|
||||
"tabbrowser-tabs",
|
||||
- "new-tab-button",
|
||||
- "spring",
|
||||
- "alltabs-button",
|
||||
- "ai-window-toggle",
|
||||
],
|
||||
verticalTabsDefaultPlacements: [],
|
||||
defaultCollapsed: null,
|
||||
@@ -484,6 +478,7 @@ var CustomizableUIInternal = {
|
||||
@@ -502,6 +495,7 @@ var CustomizableUIInternal = {
|
||||
CustomizableUI.AREA_NAVBAR,
|
||||
CustomizableUI.AREA_BOOKMARKS,
|
||||
CustomizableUI.AREA_TABSTRIP,
|
||||
@@ -68,7 +69,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
]);
|
||||
if (AppConstants.platform != "macosx") {
|
||||
toolbars.add(CustomizableUI.AREA_MENUBAR);
|
||||
@@ -1285,6 +1280,9 @@ var CustomizableUIInternal = {
|
||||
@@ -1334,6 +1328,9 @@ var CustomizableUIInternal = {
|
||||
placements = gPlacements.get(area);
|
||||
}
|
||||
|
||||
@@ -78,7 +79,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
// For toolbars that need it, mark as dirty.
|
||||
let defaultPlacements = areaProperties.get("defaultPlacements");
|
||||
if (
|
||||
@@ -1793,7 +1791,6 @@ var CustomizableUIInternal = {
|
||||
@@ -1842,7 +1839,6 @@ var CustomizableUIInternal = {
|
||||
lazy.log.info(
|
||||
"Widget " + aWidgetId + " not found, unable to remove from " + aArea
|
||||
);
|
||||
@@ -86,7 +87,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
}
|
||||
|
||||
this.notifyDOMChange(widgetNode, null, container, true, () => {
|
||||
@@ -1803,7 +1800,7 @@ var CustomizableUIInternal = {
|
||||
@@ -1852,7 +1848,7 @@ var CustomizableUIInternal = {
|
||||
// We also need to remove the panel context menu if it's there:
|
||||
this.ensureButtonContextMenu(widgetNode);
|
||||
if (gPalette.has(aWidgetId) || this.isSpecialWidget(aWidgetId)) {
|
||||
@@ -95,7 +96,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
} else {
|
||||
window.gNavToolbox.palette.appendChild(widgetNode);
|
||||
}
|
||||
@@ -1971,16 +1968,16 @@ var CustomizableUIInternal = {
|
||||
@@ -2020,16 +2016,16 @@ var CustomizableUIInternal = {
|
||||
elem.setAttribute("skipintoolbarset", "true");
|
||||
}
|
||||
}
|
||||
@@ -115,7 +116,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
// Handle initial state of vertical tabs.
|
||||
if (isVerticalTabs) {
|
||||
// Show the vertical tabs toolbar
|
||||
@@ -2222,6 +2219,10 @@ var CustomizableUIInternal = {
|
||||
@@ -2271,6 +2267,10 @@ var CustomizableUIInternal = {
|
||||
* The identifier string of the area that aNode is being inserted into.
|
||||
*/
|
||||
insertWidgetBefore(aNode, aNextNode, aContainer, aAreaId) {
|
||||
@@ -126,7 +127,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
this.notifyDOMChange(aNode, aNextNode, aContainer, false, () => {
|
||||
this.setLocationAttributes(aNode, aAreaId);
|
||||
aContainer.insertBefore(aNode, aNextNode);
|
||||
@@ -4592,7 +4593,7 @@ var CustomizableUIInternal = {
|
||||
@@ -4647,7 +4647,7 @@ var CustomizableUIInternal = {
|
||||
* For all registered areas, builds those areas to reflect the current
|
||||
* placement state of all widgets.
|
||||
*/
|
||||
@@ -135,7 +136,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
for (let [areaId, areaNodes] of gBuildAreas) {
|
||||
let placements = gPlacements.get(areaId);
|
||||
let isFirstChangedToolbar = true;
|
||||
@@ -4603,7 +4604,7 @@ var CustomizableUIInternal = {
|
||||
@@ -4658,7 +4658,7 @@ var CustomizableUIInternal = {
|
||||
if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
|
||||
let defaultCollapsed = area.get("defaultCollapsed");
|
||||
let win = areaNode.documentGlobal;
|
||||
@@ -144,7 +145,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
win.setToolbarVisibility(
|
||||
areaNode,
|
||||
typeof defaultCollapsed == "string"
|
||||
@@ -5899,6 +5900,7 @@ export var CustomizableUI = {
|
||||
@@ -5971,6 +5971,7 @@ export var CustomizableUI = {
|
||||
unregisterArea(aName, aDestroyPlacements) {
|
||||
CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);
|
||||
},
|
||||
@@ -152,7 +153,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
/**
|
||||
* Add a widget to an area.
|
||||
* If the area to which you try to add is not known to CustomizableUI,
|
||||
@@ -7869,7 +7871,9 @@ class OverflowableToolbar {
|
||||
@@ -7946,7 +7947,9 @@ class OverflowableToolbar {
|
||||
);
|
||||
|
||||
if (webExtList && CustomizableUI.isWebExtensionWidget(child.id)) {
|
||||
@@ -162,16 +163,27 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
webExtList.insertBefore(child, webExtList.firstElementChild);
|
||||
} else {
|
||||
child.setAttribute("cui-anchorid", this.#defaultListButton.id);
|
||||
@@ -7929,7 +7933,7 @@ class OverflowableToolbar {
|
||||
@@ -7995,6 +7998,7 @@ class OverflowableToolbar {
|
||||
return aElement.getBoundingClientRect().width;
|
||||
}
|
||||
|
||||
+ let toolbar = this.#toolbar;
|
||||
function sumChildrenInlineSize(aParent, aExceptChild = null) {
|
||||
let sum = 0;
|
||||
for (let child of aParent.children) {
|
||||
@@ -8006,7 +8010,10 @@ class OverflowableToolbar {
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
- sum += parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
||||
+ sum += parseFloat(style.marginLeft) + (win.gZenVerticalTabsManager._hasSetSingleToolbar ? Math.max(0, parseFloat(style.marginRight)) : parseFloat(style.marginRight));
|
||||
+ if (toolbar.id == 'zen-sidebar-top-buttons' && toolbar.hasAttribute("overflowing")) {
|
||||
+ sum += 2; // Add extra padding that we remove from the CSS
|
||||
+ }
|
||||
if (child != aExceptChild) {
|
||||
sum += getInlineSize(child);
|
||||
}
|
||||
@@ -7953,11 +7957,11 @@ class OverflowableToolbar {
|
||||
@@ -8030,11 +8037,11 @@ class OverflowableToolbar {
|
||||
parseFloat(style.paddingLeft) -
|
||||
parseFloat(style.paddingRight) -
|
||||
toolbarChildrenWidth;
|
||||
@@ -185,7 +197,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
});
|
||||
|
||||
lazy.log.debug(
|
||||
@@ -7972,7 +7976,39 @@ class OverflowableToolbar {
|
||||
@@ -8049,7 +8056,39 @@ class OverflowableToolbar {
|
||||
Math.max(targetWidth, targetChildrenWidth)
|
||||
);
|
||||
totalAvailWidth = Math.ceil(totalAvailWidth);
|
||||
@@ -226,7 +238,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
||||
}
|
||||
|
||||
@@ -8033,7 +8069,11 @@ class OverflowableToolbar {
|
||||
@@ -8110,7 +8149,11 @@ class OverflowableToolbar {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -239,7 +251,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
lazy.log.debug(
|
||||
`Need ${minSize} but width is ${totalAvailWidth} so bailing`
|
||||
);
|
||||
@@ -8066,7 +8106,7 @@ class OverflowableToolbar {
|
||||
@@ -8143,7 +8186,7 @@ class OverflowableToolbar {
|
||||
}
|
||||
}
|
||||
if (!inserted) {
|
||||
@@ -248,7 +260,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
}
|
||||
child.removeAttribute("cui-anchorid");
|
||||
child.removeAttribute("overflowedItem");
|
||||
@@ -8192,6 +8232,9 @@ class OverflowableToolbar {
|
||||
@@ -8269,6 +8312,9 @@ class OverflowableToolbar {
|
||||
* if no such list exists.
|
||||
*/
|
||||
get #webExtList() {
|
||||
@@ -258,7 +270,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
if (!this.#webExtListRef) {
|
||||
let targetID = this.#toolbar.getAttribute("addon-webext-overflowtarget");
|
||||
if (!targetID) {
|
||||
@@ -8203,6 +8246,9 @@ class OverflowableToolbar {
|
||||
@@ -8280,6 +8326,9 @@ class OverflowableToolbar {
|
||||
let win = this.#toolbar.documentGlobal;
|
||||
let { panel } = win.gUnifiedExtensions;
|
||||
this.#webExtListRef = panel.querySelector(`#${targetID}`);
|
||||
@@ -268,7 +280,7 @@ index 491161e48044f75167a8e8a0348779cfa22fc40e..867d51b8a6b74f841afc6d84dcdfd8f2
|
||||
}
|
||||
return this.#webExtListRef;
|
||||
}
|
||||
@@ -8411,7 +8457,7 @@ class OverflowableToolbar {
|
||||
@@ -8488,7 +8537,7 @@ class OverflowableToolbar {
|
||||
break;
|
||||
}
|
||||
case "mousedown": {
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
diff --git a/browser/components/preferences/config/account-sync.mjs b/browser/components/preferences/config/account-sync.mjs
|
||||
index b503987a08e2ce64bfc01c4e3a21e5e19ef834f0..b1c03a0b219fd3eddd93c1deaeb18ab79c85f168 100644
|
||||
index b01fd4bb163ad53139fcbd8e79e12ef994d1fa13..7e3c2f6852b77192b4505bb3d5a7b58586da6548 100644
|
||||
--- a/browser/components/preferences/config/account-sync.mjs
|
||||
+++ b/browser/components/preferences/config/account-sync.mjs
|
||||
@@ -42,6 +42,7 @@ Preferences.addAll([
|
||||
@@ -46,6 +46,8 @@ Preferences.addAll([
|
||||
{ id: "services.sync.engine.creditcards", type: "bool" },
|
||||
{ id: "services.sync.engine.addons", type: "bool" },
|
||||
{ id: "services.sync.engine.prefs", type: "bool" },
|
||||
+ { id: "services.sync.engine.spaces", type: "bool" },
|
||||
+ { id: "zen.spaces-sync.normal-tabs", type: "bool" },
|
||||
]);
|
||||
|
||||
/**
|
||||
@@ -546,6 +547,7 @@ const SYNC_ENGINE_SETTINGS = [
|
||||
@@ -557,6 +559,7 @@ const SYNC_ENGINE_SETTINGS = [
|
||||
type: "payments",
|
||||
},
|
||||
{ id: "syncAddons", pref: "services.sync.engine.addons", type: "addons" },
|
||||
@@ -18,3 +19,50 @@ index b503987a08e2ce64bfc01c4e3a21e5e19ef834f0..b1c03a0b219fd3eddd93c1deaeb18ab7
|
||||
{ id: "syncSettings", pref: "services.sync.engine.prefs", type: "settings" },
|
||||
];
|
||||
|
||||
@@ -564,6 +567,18 @@ SYNC_ENGINE_SETTINGS.forEach(({ id, pref }) => {
|
||||
Preferences.addSetting({ id, pref });
|
||||
});
|
||||
|
||||
+Preferences.addSetting({ id: "zenSyncWorkspacesGroup" });
|
||||
+Preferences.addSetting({
|
||||
+ id: "zenSyncWorkspaces",
|
||||
+ pref: "services.sync.engine.spaces",
|
||||
+});
|
||||
+Preferences.addSetting({
|
||||
+ id: "zenSyncNormalTabs",
|
||||
+ pref: "zen.spaces-sync.normal-tabs",
|
||||
+ deps: ["zenSyncWorkspaces"],
|
||||
+ visible: deps => !!deps.zenSyncWorkspaces.value,
|
||||
+});
|
||||
+
|
||||
Preferences.addSetting({
|
||||
id: "syncEngines",
|
||||
deps: SYNC_ENGINE_SETTINGS.map(({ id }) => id),
|
||||
@@ -995,6 +1010,27 @@ SettingGroupManager.registerGroups({
|
||||
id: "syncEnginesList",
|
||||
control: "sync-engines-list",
|
||||
},
|
||||
+ {
|
||||
+ id: "zenSyncWorkspacesGroup",
|
||||
+ control: "moz-box-item",
|
||||
+ items: [
|
||||
+ {
|
||||
+ id: "zenSyncWorkspaces",
|
||||
+ l10nId: "zen-settings-workspaces-sync",
|
||||
+ control: "moz-toggle",
|
||||
+ controlAttrs: {
|
||||
+ inputlayout: "inline-end",
|
||||
+ },
|
||||
+ items: [
|
||||
+ {
|
||||
+ id: "zenSyncNormalTabs",
|
||||
+ l10nId: "zen-settings-normal-tabs-sync",
|
||||
+ control: "moz-checkbox",
|
||||
+ },
|
||||
+ ],
|
||||
+ },
|
||||
+ ],
|
||||
+ },
|
||||
{
|
||||
id: "syncChangeOptions",
|
||||
control: "moz-box-button",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
|
||||
index 88675d1bcbf000b10d85a9c0980bc6069d88052c..ed3a1e809eb0fcccc5a957be7affb77be8978e32 100644
|
||||
index 5a56d348146c1c37c088ced60327fffebcf8fac0..abd65594d365fbc0a74af3953c71f410301898ad 100644
|
||||
--- a/browser/components/preferences/main.js
|
||||
+++ b/browser/components/preferences/main.js
|
||||
@@ -528,6 +528,11 @@ function createStartupConfig(hidden = false) {
|
||||
@@ -529,6 +529,11 @@ function createStartupConfig(hidden = false) {
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -14,7 +14,7 @@ index 88675d1bcbf000b10d85a9c0980bc6069d88052c..ed3a1e809eb0fcccc5a957be7affb77b
|
||||
{
|
||||
id: "windowsLaunchOnLogin",
|
||||
l10nId: "windows-launch-on-login",
|
||||
@@ -575,7 +580,7 @@ function createStartupConfig(hidden = false) {
|
||||
@@ -576,7 +581,7 @@ function createStartupConfig(hidden = false) {
|
||||
SettingGroupManager.registerGroups({
|
||||
defaultBrowser: createDefaultBrowserConfig(),
|
||||
startup: createStartupConfig(
|
||||
@@ -23,7 +23,7 @@ index 88675d1bcbf000b10d85a9c0980bc6069d88052c..ed3a1e809eb0fcccc5a957be7affb77b
|
||||
),
|
||||
});
|
||||
|
||||
@@ -628,7 +633,7 @@ function getBundleForLocales(newLocales) {
|
||||
@@ -636,7 +641,7 @@ function getBundleForLocales(newLocales) {
|
||||
])
|
||||
);
|
||||
return new Localization(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
|
||||
index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a9c5bb3f8 100644
|
||||
index 94612d8e28af58fcb04914440348b899a0a1e08f..da3b1ffd09745d09589283356d1001dbfb76a468 100644
|
||||
--- a/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: [
|
||||
"chrome://browser/skin/preferences/dialog.css",
|
||||
"chrome://browser/skin/preferences/preferences.css",
|
||||
@@ -10,7 +10,7 @@ index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a
|
||||
],
|
||||
resizeCallback: async ({ title, frame }) => {
|
||||
// Search within main document and highlight matched keyword.
|
||||
@@ -437,6 +438,8 @@ const CONFIG_PANES = Object.freeze({
|
||||
@@ -471,6 +472,8 @@ const CONFIG_PANES = Object.freeze({
|
||||
tabsBrowsing: {
|
||||
l10nId: "tabs-browsing-section",
|
||||
groupIds: [
|
||||
@@ -19,7 +19,7 @@ index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a
|
||||
"browserLayout",
|
||||
"tabs",
|
||||
"pageNavigation",
|
||||
@@ -483,7 +486,7 @@ function register_module(categoryName, categoryObject) {
|
||||
@@ -518,7 +521,7 @@ function register_module(categoryName, categoryObject) {
|
||||
}
|
||||
this._initted = true;
|
||||
let template = document.getElementById("template-" + categoryName);
|
||||
@@ -28,7 +28,7 @@ index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a
|
||||
// Replace the template element with the nodes inside of it.
|
||||
template.replaceWith(template.content);
|
||||
|
||||
@@ -527,6 +530,10 @@ function init_all() {
|
||||
@@ -562,6 +565,10 @@ function init_all() {
|
||||
register_module("paneHome", gHomePane);
|
||||
register_module("paneSearch", gSearchPane);
|
||||
register_module("panePrivacy", gPrivacyPane);
|
||||
@@ -39,15 +39,3 @@ index c76a0647e14bac806d9428483bb565b3e10c31e7..2188f7808aca090f92574c7f5c55a28a
|
||||
|
||||
// Restore the cached Firefox Labs nav button visibility so it shows
|
||||
// immediately when recipes are expected to be available, before
|
||||
@@ -656,9 +663,9 @@ async function gotoPref(
|
||||
let redesignEnabled = srdSectionPrefs.all;
|
||||
let categories = document.getElementById("categories");
|
||||
const kDefaultCategoryInternalName = redesignEnabled
|
||||
- ? "paneSync"
|
||||
+ ? "paneTabsBrowsing"
|
||||
: "paneGeneral";
|
||||
- const kDefaultCategory = redesignEnabled ? "sync" : "general";
|
||||
+ const kDefaultCategory = redesignEnabled ? "tabsBrowsing" : "general";
|
||||
let hash = document.location.hash;
|
||||
let category = aCategory || hash.substring(1) || kDefaultCategoryInternalName;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ index 1b8c38159314b6edee9e6f455beb2b63db1ad3f0..1308345db640dba6b2848b49ef7c1181
|
||||
+ </html:moz-page-nav-button>
|
||||
+ <html:moz-page-nav-button id="category-zen-CKS"
|
||||
+ view="paneZenCKS"
|
||||
+ iconsrc="chrome://browser/skin/quickactions.svg"
|
||||
+ iconsrc="chrome://browser/skin/preferences/category-accessibility.svg"
|
||||
+ data-l10n-id="pane-zen-CKS-title">
|
||||
+ </html:moz-page-nav-button>
|
||||
+ <html:moz-page-nav-button id="category-zen-marketplace"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/browser/components/preferences/widgets/sync-engine-list/sync-engines-list.mjs b/browser/components/preferences/widgets/sync-engine-list/sync-engines-list.mjs
|
||||
index 9359a485ed6212c7df49a8d4b1e4a8febbc1c9b6..132fea440cfa535e78b35f706e7ef2d6881f9ba6 100644
|
||||
--- a/browser/components/preferences/widgets/sync-engine-list/sync-engines-list.mjs
|
||||
+++ b/browser/components/preferences/widgets/sync-engine-list/sync-engines-list.mjs
|
||||
@@ -50,6 +50,10 @@ const engineTypeToMetadata = {
|
||||
iconSrc: "chrome://global/skin/icons/settings.svg",
|
||||
l10nId: "sync-currently-syncing-settings",
|
||||
},
|
||||
+ workspaces: {
|
||||
+ iconSrc: "chrome://devtools/skin/images/tool-storage.svg",
|
||||
+ l10nId: "sync-currently-syncing-workspaces",
|
||||
+ },
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -38,9 +38,16 @@ var gZenMarketplaceManager = {
|
||||
|
||||
this.__hasInitializedEvents = true;
|
||||
|
||||
await this._buildModsList();
|
||||
|
||||
Services.prefs.addObserver(gZenMods.updatePref, this);
|
||||
window.addEventListener(
|
||||
"unload",
|
||||
() => {
|
||||
Services.prefs.removeObserver(gZenMods.updatePref, this);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
||||
await this._buildModsList();
|
||||
|
||||
const checkForUpdateClick = (event) => {
|
||||
if (event.target === checkForUpdates) {
|
||||
@@ -69,7 +76,6 @@ var gZenMarketplaceManager = {
|
||||
});
|
||||
|
||||
window.addEventListener("unload", () => {
|
||||
Services.prefs.removeObserver(gZenMods.updatePref, this);
|
||||
this.__hasInitializedEvents = false;
|
||||
|
||||
document.removeEventListener("ZenModsMarketplace:CheckForUpdatesFinished", this);
|
||||
@@ -735,7 +741,6 @@ var gZenWorkspacesSettings = {
|
||||
|
||||
Services.prefs.addObserver("zen.glance.enabled", tabsUnloaderPrefListener); // We can use the same listener for both prefs
|
||||
Services.prefs.addObserver("zen.workspaces.separate-essentials", tabsUnloaderPrefListener);
|
||||
Services.prefs.addObserver("zen.glance.activation-method", tabsUnloaderPrefListener);
|
||||
Services.prefs.addObserver("zen.window-sync.sync-only-pinned-tabs", tabsUnloaderPrefListener);
|
||||
Services.prefs.addObserver(
|
||||
"zen.tabs.ctrl-tab.ignore-essential-tabs",
|
||||
@@ -744,7 +749,6 @@ var gZenWorkspacesSettings = {
|
||||
Services.prefs.addObserver("browser.ctrlTab.sortByRecentlyUsed", toggleZenCycleByAttrWarning);
|
||||
window.addEventListener("unload", () => {
|
||||
Services.prefs.removeObserver("zen.glance.enabled", tabsUnloaderPrefListener);
|
||||
Services.prefs.removeObserver("zen.glance.activation-method", tabsUnloaderPrefListener);
|
||||
Services.prefs.removeObserver("zen.workspaces.separate-essentials", tabsUnloaderPrefListener);
|
||||
Services.prefs.removeObserver(
|
||||
"zen.window-sync.sync-only-pinned-tabs",
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee4aa3be28 100644
|
||||
index 76a984f6e21409941ea038218d161e67f2e0c23d..52408568a33a89c0e3d0d1514152ded2eaa1afed 100644
|
||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
@@ -129,6 +129,9 @@ const TAB_EVENTS = [
|
||||
@@ -126,6 +126,11 @@ const TAB_EVENTS = [
|
||||
"TabSplitViewActivate",
|
||||
"SplitViewRemoved",
|
||||
"SplitViewCreated",
|
||||
+ "TabAddedToEssentials",
|
||||
+ "TabRemovedFromEssentials",
|
||||
+ "TabMove",
|
||||
+ "TabGroupMoved",
|
||||
+ "ZenWorkspaceDataChanged",
|
||||
];
|
||||
|
||||
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
@@ -201,6 +204,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -198,6 +203,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs",
|
||||
TabStateFlusher: "resource:///modules/sessionstore/TabStateFlusher.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
@@ -21,7 +23,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
});
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazy, "blankURI", () => {
|
||||
@@ -1300,10 +1305,7 @@ var SessionStoreInternal = {
|
||||
@@ -1314,10 +1321,7 @@ var SessionStoreInternal = {
|
||||
*/
|
||||
get willAutoRestore() {
|
||||
return (
|
||||
@@ -33,17 +35,19 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1990,6 +1992,9 @@ var SessionStoreInternal = {
|
||||
@@ -2005,6 +2009,11 @@ var SessionStoreInternal = {
|
||||
case "TabPinned":
|
||||
case "TabUnpinned":
|
||||
case "SwapDocShells":
|
||||
+ case "TabRemovedFromEssentials":
|
||||
+ case "TabAddedToEssentials":
|
||||
+ case "TabMove":
|
||||
+ case "TabGroupMoved":
|
||||
+ case "ZenWorkspaceDataChanged":
|
||||
this.saveStateDelayed(win);
|
||||
break;
|
||||
case "TabGroupCreate":
|
||||
@@ -2099,6 +2104,10 @@ var SessionStoreInternal = {
|
||||
@@ -2114,6 +2123,10 @@ var SessionStoreInternal = {
|
||||
this._windows[aWindow.__SSi].isTaskbarTab = true;
|
||||
}
|
||||
|
||||
@@ -54,7 +58,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
if (lazy.AIWindow.isAIWindowActiveAndEnabled(aWindow)) {
|
||||
this._windows[aWindow.__SSi].isAIWindow = true;
|
||||
}
|
||||
@@ -2135,7 +2144,7 @@ var SessionStoreInternal = {
|
||||
@@ -2150,7 +2163,7 @@ var SessionStoreInternal = {
|
||||
let isTaskbarTab = this._windows[aWindow.__SSi].isTaskbarTab;
|
||||
// A regular window is not a private window, taskbar tab window, or popup window
|
||||
let isRegularWindow =
|
||||
@@ -63,7 +67,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
|
||||
// perform additional initialization when the first window is loading
|
||||
if (lazy.RunState.isStopped) {
|
||||
@@ -2147,7 +2156,7 @@ var SessionStoreInternal = {
|
||||
@@ -2162,7 +2175,7 @@ var SessionStoreInternal = {
|
||||
// to disk to NOW() to enforce a full interval before the next write.
|
||||
lazy.SessionSaver.updateLastSaveTime();
|
||||
|
||||
@@ -72,7 +76,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
this._log.debug(
|
||||
"initializeWindow, the window is private or a web app. Saving SessionStartup.state for possibly restoring later"
|
||||
);
|
||||
@@ -2191,6 +2200,7 @@ var SessionStoreInternal = {
|
||||
@@ -2206,6 +2219,7 @@ var SessionStoreInternal = {
|
||||
null,
|
||||
"sessionstore-one-or-no-tab-restored"
|
||||
);
|
||||
@@ -80,7 +84,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
this._deferredAllWindowsRestored.resolve();
|
||||
}
|
||||
// this window was opened by _openWindowWithState
|
||||
@@ -2240,7 +2250,6 @@ var SessionStoreInternal = {
|
||||
@@ -2255,7 +2269,6 @@ var SessionStoreInternal = {
|
||||
if (closedWindowState) {
|
||||
let newWindowState;
|
||||
if (
|
||||
@@ -88,7 +92,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
!lazy.SessionStartup.willRestore()
|
||||
) {
|
||||
// We want to split the window up into pinned tabs and unpinned tabs.
|
||||
@@ -2276,6 +2285,7 @@ var SessionStoreInternal = {
|
||||
@@ -2291,6 +2304,7 @@ var SessionStoreInternal = {
|
||||
}
|
||||
|
||||
if (newWindowState) {
|
||||
@@ -96,7 +100,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
// Ensure that the window state isn't hidden
|
||||
this._restoreCount = 1;
|
||||
let state = { windows: [newWindowState] };
|
||||
@@ -2312,6 +2322,9 @@ var SessionStoreInternal = {
|
||||
@@ -2327,6 +2341,9 @@ var SessionStoreInternal = {
|
||||
});
|
||||
this._shouldRestoreLastSession = false;
|
||||
}
|
||||
@@ -106,7 +110,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
|
||||
if (this._restoreLastWindow && aWindow.toolbar.visible) {
|
||||
// always reset (if not a popup window)
|
||||
@@ -2462,7 +2475,7 @@ var SessionStoreInternal = {
|
||||
@@ -2477,7 +2494,7 @@ var SessionStoreInternal = {
|
||||
|
||||
var tabbrowser = aWindow.gBrowser;
|
||||
|
||||
@@ -115,7 +119,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
|
||||
TAB_EVENTS.forEach(function (aEvent) {
|
||||
tabbrowser.tabContainer.removeEventListener(aEvent, this, true);
|
||||
@@ -2513,7 +2526,7 @@ var SessionStoreInternal = {
|
||||
@@ -2528,7 +2545,7 @@ var SessionStoreInternal = {
|
||||
|
||||
let isLastRegularWindow =
|
||||
Object.values(this._windows).filter(
|
||||
@@ -124,7 +128,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
).length == 1;
|
||||
this._log.debug(
|
||||
`onClose, closing window isLastRegularWindow? ${isLastRegularWindow}`
|
||||
@@ -2570,8 +2583,8 @@ var SessionStoreInternal = {
|
||||
@@ -2585,8 +2602,8 @@ var SessionStoreInternal = {
|
||||
// 2) Flush the window.
|
||||
// 3) When the flush is complete, revisit our decision to store the window
|
||||
// in _closedWindows, and add/remove as necessary.
|
||||
@@ -135,7 +139,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
}
|
||||
|
||||
completionPromise = lazy.TabStateFlusher.flushWindow(aWindow).then(() => {
|
||||
@@ -2591,8 +2604,9 @@ var SessionStoreInternal = {
|
||||
@@ -2606,8 +2623,9 @@ var SessionStoreInternal = {
|
||||
|
||||
// Save non-private windows if they have at
|
||||
// least one saveable tab or are the last window.
|
||||
@@ -147,7 +151,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
|
||||
if (!isLastWindow && winData.closedId > -1) {
|
||||
this._addClosedAction(
|
||||
@@ -2668,7 +2682,7 @@ var SessionStoreInternal = {
|
||||
@@ -2683,7 +2701,7 @@ var SessionStoreInternal = {
|
||||
* to call this method again asynchronously (for example, after
|
||||
* a window flush).
|
||||
*/
|
||||
@@ -156,7 +160,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
// Make sure SessionStore is still running, and make sure that we
|
||||
// haven't chosen to forget this window.
|
||||
if (
|
||||
@@ -2685,6 +2699,7 @@ var SessionStoreInternal = {
|
||||
@@ -2700,6 +2718,7 @@ var SessionStoreInternal = {
|
||||
// _closedWindows from a previous call to this function.
|
||||
let winIndex = this._closedWindows.indexOf(winData);
|
||||
let alreadyStored = winIndex != -1;
|
||||
@@ -164,7 +168,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
// If sidebar command is truthy, i.e. sidebar is open, store sidebar settings
|
||||
let shouldStore = hasSaveableTabs || isLastWindow;
|
||||
|
||||
@@ -3507,7 +3522,7 @@ var SessionStoreInternal = {
|
||||
@@ -3522,7 +3541,7 @@ var SessionStoreInternal = {
|
||||
if (!isPrivateWindow && tabState.isPrivate) {
|
||||
return;
|
||||
}
|
||||
@@ -173,10 +177,14 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4246,6 +4261,12 @@ var SessionStoreInternal = {
|
||||
@@ -4260,7 +4279,15 @@ var SessionStoreInternal = {
|
||||
1,
|
||||
Math.min(tabState.index, tabState.entries.length)
|
||||
);
|
||||
tabState.pinned = false;
|
||||
- tabState.pinned = false;
|
||||
+ tabState.pinned =
|
||||
+ newTab.group?.isZenFolder === true &&
|
||||
+ Services.prefs.getBoolPref("zen.folders.owned-tabs-in-folder");
|
||||
+ tabState.zenEssential = false;
|
||||
+ tabState.zenSyncId = null;
|
||||
+ tabState.zenIsGlance = false;
|
||||
@@ -186,7 +194,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
|
||||
if (inBackground === false) {
|
||||
aWindow.gBrowser.selectedTab = newTab;
|
||||
@@ -4679,6 +4700,8 @@ var SessionStoreInternal = {
|
||||
@@ -4694,6 +4721,8 @@ var SessionStoreInternal = {
|
||||
// Append the tab if we're opening into a different window,
|
||||
tabIndex: aSource == aTargetWindow ? pos : Infinity,
|
||||
pinned: state.pinned,
|
||||
@@ -195,7 +203,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
userContextId: state.userContextId,
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
@@ -5176,9 +5199,10 @@ var SessionStoreInternal = {
|
||||
@@ -5191,9 +5220,10 @@ var SessionStoreInternal = {
|
||||
if (activePageData.title && activePageData.title != activePageData.url) {
|
||||
win.gBrowser.setInitialTabTitle(tab, activePageData.title, {
|
||||
isContentTitle: true,
|
||||
@@ -207,7 +215,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5543,7 +5567,7 @@ var SessionStoreInternal = {
|
||||
@@ -5561,7 +5591,7 @@ var SessionStoreInternal = {
|
||||
|
||||
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
|
||||
let tab = tabbrowser.tabs[i];
|
||||
@@ -216,7 +224,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
removableTabs.push(tab);
|
||||
}
|
||||
}
|
||||
@@ -5656,7 +5680,7 @@ var SessionStoreInternal = {
|
||||
@@ -5674,7 +5704,7 @@ var SessionStoreInternal = {
|
||||
|
||||
// collect the data for all windows
|
||||
for (ix in this._windows) {
|
||||
@@ -225,7 +233,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
// window data is still in _statesToRestore
|
||||
continue;
|
||||
}
|
||||
@@ -5800,11 +5824,12 @@ var SessionStoreInternal = {
|
||||
@@ -5818,11 +5848,12 @@ var SessionStoreInternal = {
|
||||
}
|
||||
|
||||
let tabbrowser = aWindow.gBrowser;
|
||||
@@ -239,7 +247,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
// update the internal state data for this window
|
||||
for (let tab of tabs) {
|
||||
if (tab == aWindow.FirefoxViewHandler.tab) {
|
||||
@@ -5815,6 +5840,9 @@ var SessionStoreInternal = {
|
||||
@@ -5833,6 +5864,9 @@ var SessionStoreInternal = {
|
||||
tabsData.push(tabData);
|
||||
}
|
||||
|
||||
@@ -249,7 +257,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
// update tab group state for this window
|
||||
winData.groups = [];
|
||||
for (let tabGroup of aWindow.gBrowser.tabGroups) {
|
||||
@@ -5831,7 +5859,7 @@ var SessionStoreInternal = {
|
||||
@@ -5849,7 +5883,7 @@ var SessionStoreInternal = {
|
||||
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
|
||||
// since it's only inserted into the tab strip after it's selected).
|
||||
if (aWindow.FirefoxViewHandler.tab?.selected) {
|
||||
@@ -258,7 +266,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
winData.title = tabbrowser.tabs[0].label;
|
||||
}
|
||||
winData.selected = selectedIndex;
|
||||
@@ -6033,8 +6061,8 @@ var SessionStoreInternal = {
|
||||
@@ -6051,8 +6085,8 @@ var SessionStoreInternal = {
|
||||
// selectTab represents.
|
||||
let selectTab = 0;
|
||||
if (overwriteTabs) {
|
||||
@@ -269,7 +277,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
selectTab = Math.min(selectTab, winData.tabs.length);
|
||||
}
|
||||
|
||||
@@ -6056,6 +6084,7 @@ var SessionStoreInternal = {
|
||||
@@ -6074,6 +6108,7 @@ var SessionStoreInternal = {
|
||||
if (overwriteTabs) {
|
||||
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
|
||||
if (!tabbrowser.tabs[i].selected) {
|
||||
@@ -277,7 +285,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
tabbrowser.removeTab(tabbrowser.tabs[i]);
|
||||
}
|
||||
}
|
||||
@@ -6090,6 +6119,12 @@ var SessionStoreInternal = {
|
||||
@@ -6108,6 +6143,12 @@ var SessionStoreInternal = {
|
||||
savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id)
|
||||
);
|
||||
}
|
||||
@@ -290,7 +298,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
|
||||
// Move the originally open tabs to the end.
|
||||
if (initialTabs) {
|
||||
@@ -6656,6 +6691,25 @@ var SessionStoreInternal = {
|
||||
@@ -6674,6 +6715,25 @@ var SessionStoreInternal = {
|
||||
|
||||
// Most of tabData has been restored, now continue with restoring
|
||||
// attributes that may trigger external events.
|
||||
@@ -316,7 +324,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
|
||||
if (tabData.pinned) {
|
||||
tabbrowser.pinTab(tab);
|
||||
@@ -6838,6 +6892,9 @@ var SessionStoreInternal = {
|
||||
@@ -6859,6 +6919,9 @@ var SessionStoreInternal = {
|
||||
aWindow.gURLBar.readOnly = false;
|
||||
}
|
||||
}
|
||||
@@ -326,7 +334,14 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
|
||||
let promiseParts = Promise.withResolvers();
|
||||
aWindow.setTimeout(() => {
|
||||
@@ -7633,7 +7690,7 @@ var SessionStoreInternal = {
|
||||
@@ -7356,5 +7419,6 @@ var SessionStoreInternal = {
|
||||
*/
|
||||
_isCmdLineEmpty: function ssi_isCmdLineEmpty(aWindow, aState) {
|
||||
var pinnedOnly =
|
||||
+ !Services.prefs.getBoolPref("zen.workspaces.continue-where-left-off") &&
|
||||
aState.windows &&
|
||||
aState.windows.every(win => win.tabs.every(tab => tab.pinned));
|
||||
@@ -7654,7 +7718,7 @@ var SessionStoreInternal = {
|
||||
|
||||
let groupsToSave = new Map();
|
||||
for (let tIndex = 0; tIndex < window.tabs.length; ) {
|
||||
@@ -335,7 +350,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
// Adjust window.selected
|
||||
if (tIndex + 1 < window.selected) {
|
||||
window.selected -= 1;
|
||||
@@ -7648,7 +7705,7 @@ var SessionStoreInternal = {
|
||||
@@ -7669,7 +7733,7 @@ var SessionStoreInternal = {
|
||||
);
|
||||
// We don't want to increment tIndex here.
|
||||
continue;
|
||||
@@ -344,7 +359,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
// Convert any open groups into saved groups.
|
||||
let groupStateToSave = window.groups.find(
|
||||
groupState => groupState.id == window.tabs[tIndex].groupId
|
||||
@@ -8193,7 +8250,6 @@ var SessionStoreInternal = {
|
||||
@@ -8233,7 +8297,6 @@ var SessionStoreInternal = {
|
||||
timer.initWithCallback(
|
||||
function () {
|
||||
if (beats <= 0) {
|
||||
@@ -352,7 +367,7 @@ index 11191a82a0f0dc6eee60f9de52a63bc6085c3981..f995c3b297c53aa6ee2219bfc09515ee
|
||||
Glean.sessionRestore.shutdownFlushAllOutcomes.timed_out.add(1);
|
||||
deferred.resolve();
|
||||
}
|
||||
@@ -8671,6 +8727,7 @@ var SessionStoreInternal = {
|
||||
@@ -8711,6 +8774,7 @@ var SessionStoreInternal = {
|
||||
if (
|
||||
!savedTabGroupState.tabs.length ||
|
||||
this.getSavedTabGroup(savedTabGroupState.id)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
|
||||
index a33deeb5b587d6a950960a1a4781176e4e730ad7..e96cfb9a5ffbe4feccdffa8b6d18ececb48d4c52 100644
|
||||
index a33deeb5b587d6a950960a1a4781176e4e730ad7..7927471d389f2626e4cc1b0e7a6eab6446dca432 100644
|
||||
--- a/browser/components/sessionstore/TabState.sys.mjs
|
||||
+++ b/browser/components/sessionstore/TabState.sys.mjs
|
||||
@@ -8,6 +8,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -39,3 +39,14 @@ index a33deeb5b587d6a950960a1a4781176e4e730ad7..e96cfb9a5ffbe4feccdffa8b6d18ecec
|
||||
|
||||
tabData.userContextId = tab.userContextId || 0;
|
||||
|
||||
@@ -132,6 +151,10 @@ class _TabState {
|
||||
tabData.image = tabbrowser.getIcon(tab);
|
||||
}
|
||||
|
||||
+ if (tab.zenStaticIcon) {
|
||||
+ tabData.image = tab.zenStaticIcon;
|
||||
+ }
|
||||
+
|
||||
// If there is a userTypedValue set, then either the user has typed something
|
||||
// in the URL bar, or a new tab was opened with a URI to load.
|
||||
// If so, we also track whether we were still in the process of loading something.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/drag-and-drop.js b/browser/components/tabbrowser/content/drag-and-drop.js
|
||||
index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b15a030046 100644
|
||||
index 70b37f93c4e8ff4ad9a2452681e468d23914c1b5..dbf2d9c83dafbe0e0b4e6caf3835edc8edf9bcf4 100644
|
||||
--- a/browser/components/tabbrowser/content/drag-and-drop.js
|
||||
+++ b/browser/components/tabbrowser/content/drag-and-drop.js
|
||||
@@ -35,6 +35,9 @@
|
||||
@@ -12,7 +12,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
if (isTab(element) || isSplitViewWrapper(element)) {
|
||||
return element;
|
||||
}
|
||||
@@ -118,6 +121,9 @@
|
||||
@@ -128,6 +131,9 @@
|
||||
}
|
||||
|
||||
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||
@@ -22,7 +22,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
if (
|
||||
(dropEffect == "move" || dropEffect == "copy") &&
|
||||
document == draggedTab.ownerDocument &&
|
||||
@@ -138,6 +144,7 @@
|
||||
@@ -148,6 +154,7 @@
|
||||
!draggedTab.group.collapsed
|
||||
) {
|
||||
draggedTab.group.collapsed = true;
|
||||
@@ -30,7 +30,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
}
|
||||
|
||||
if (dropEffect == "move") {
|
||||
@@ -145,10 +152,6 @@
|
||||
@@ -155,10 +162,6 @@
|
||||
|
||||
// Pinned tabs in expanded vertical mode are on a grid format and require
|
||||
// different logic to drag and drop.
|
||||
@@ -41,7 +41,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
this._animateTabMove(event);
|
||||
return;
|
||||
}
|
||||
@@ -287,6 +290,10 @@
|
||||
@@ -297,6 +300,10 @@
|
||||
|
||||
this._tabDropIndicator.hidden = true;
|
||||
event.stopPropagation();
|
||||
@@ -52,7 +52,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
if (draggedTab && dropEffect == "copy") {
|
||||
let duplicatedDraggedTab;
|
||||
let duplicatedTabs = [];
|
||||
@@ -312,12 +319,16 @@
|
||||
@@ -324,12 +331,16 @@
|
||||
let translateOffsetY = oldTranslateY % tabHeight;
|
||||
let newTranslateX = oldTranslateX - translateOffsetX;
|
||||
let newTranslateY = oldTranslateY - translateOffsetY;
|
||||
@@ -73,7 +73,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
|
||||
if (this._tabbrowserTabs.isContainerVerticalPinnedGrid(draggedTab)) {
|
||||
// Update both translate axis for pinned vertical expanded tabs
|
||||
@@ -392,11 +403,13 @@
|
||||
@@ -404,11 +415,13 @@
|
||||
this._dragToPinPromoCard,
|
||||
];
|
||||
let shouldPin =
|
||||
@@ -87,15 +87,15 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
isTab(draggedTab) &&
|
||||
draggedTab.pinned &&
|
||||
this._tabbrowserTabs.arrowScrollbox.contains(event.target);
|
||||
@@ -466,6 +479,7 @@
|
||||
@@ -484,6 +497,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ shouldTranslate = false;
|
||||
if (shouldTranslate) {
|
||||
this.#dropAnimationEndTime = Date.now() + DROP_ANIMATION_GRACE_MS;
|
||||
let translationPromises = [];
|
||||
for (let item of movingTabs) {
|
||||
@@ -477,7 +491,7 @@
|
||||
@@ -496,7 +510,7 @@
|
||||
item.removeAttribute("tabdrop-samewindow");
|
||||
resolve();
|
||||
};
|
||||
@@ -104,7 +104,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
postTransitionCleanup();
|
||||
} else {
|
||||
let onTransitionEnd = transitionendEvent => {
|
||||
@@ -552,7 +566,7 @@
|
||||
@@ -580,7 +594,7 @@
|
||||
if (tab.selected) {
|
||||
selectedTab = tab;
|
||||
indexForSelectedTab = newIndex;
|
||||
@@ -113,7 +113,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
const droppedIntoPinnedArea = dropIndex < gBrowser.pinnedTabCount;
|
||||
const newSplitView = gBrowser.adoptSplitView(tab, {
|
||||
elementIndex: droppedIntoPinnedArea
|
||||
@@ -577,7 +591,7 @@
|
||||
@@ -605,7 +619,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
const newTab = gBrowser.adoptTab(selectedTab, {
|
||||
elementIndex: indexForSelectedTab,
|
||||
selectTab: selectedTab == draggedTab,
|
||||
@@ -611,10 +625,6 @@
|
||||
@@ -639,10 +653,6 @@
|
||||
this._tabbrowserTabs.dragAndDropElements[
|
||||
gBrowser.pinnedTabCount + unpinnedSplitViews.length - 1
|
||||
];
|
||||
@@ -133,7 +133,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -664,6 +674,7 @@
|
||||
@@ -703,6 +713,7 @@
|
||||
|
||||
let nextItem = this._tabbrowserTabs.dragAndDropElements[newIndex];
|
||||
let tabGroup = isTab(nextItem) && nextItem.group;
|
||||
@@ -141,12 +141,15 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
gBrowser.loadTabs(urls, {
|
||||
inBackground,
|
||||
replace,
|
||||
@@ -705,7 +716,16 @@
|
||||
@@ -744,6 +755,22 @@
|
||||
this._expandGroupOnDrop(draggedTab);
|
||||
}
|
||||
this._resetTabsAfterDrop(draggedTab.ownerDocument);
|
||||
-
|
||||
+ if (!dt.mozUserCancelled && dt.dropEffect == "none" && !this._isCustomizing) {
|
||||
this._resetTabsAfterDrop(draggedTab);
|
||||
+ if (
|
||||
+ !dt.mozUserCancelled &&
|
||||
+ dt.dropEffect == "none" &&
|
||||
+ !this._tabbrowserTabs._isCustomizing
|
||||
+ ) {
|
||||
+ const moved = gZenViewSplitter.moveTabToSplitView(event, draggedTab);
|
||||
+ if (moved) {
|
||||
+ delete draggedTab._dragData;
|
||||
@@ -154,12 +157,14 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
+ }
|
||||
+ } else if (dt.mozUserCancelled) {
|
||||
+ gZenViewSplitter.onBrowserDragEndToSplit(event, true);
|
||||
+ if (gZenViewSplitter._lastOpenedTab) gZenViewSplitter._lastOpenedTab._visuallySelected = false;
|
||||
+ if (gZenViewSplitter._lastOpenedTab) {
|
||||
+ gZenViewSplitter._lastOpenedTab._visuallySelected = false;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (
|
||||
dt.mozUserCancelled ||
|
||||
dt.dropEffect != "none" ||
|
||||
@@ -927,11 +947,10 @@
|
||||
@@ -1074,11 +1101,10 @@
|
||||
return this.#getHorizontalScrollboxDragTarget(event, ignoreSides);
|
||||
}
|
||||
while (target) {
|
||||
@@ -175,7 +180,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
break;
|
||||
}
|
||||
target = target.parentNode;
|
||||
@@ -961,6 +980,9 @@
|
||||
@@ -1108,6 +1134,9 @@
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -185,17 +190,36 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
return target;
|
||||
}
|
||||
|
||||
@@ -1014,7 +1036,8 @@
|
||||
isTabGroupLabel(draggedTab) &&
|
||||
draggedTab._dragData?.expandGroupOnDrop
|
||||
) {
|
||||
- draggedTab.group.collapsed = false;
|
||||
+ draggedTab.group.collapsed = draggedTab.group.hasAttribute("has-active");
|
||||
+ gZenFolders.animateGroupMove(draggedTab.group, true);
|
||||
@@ -1170,14 +1199,20 @@
|
||||
let releaseReservedSpace = () =>
|
||||
this.#releaseSpaceInScrolledContent(periphery);
|
||||
if (group.collapsed) {
|
||||
- // The group's tabs animate back to their full size, so hold on to the
|
||||
- // space reserved for them until they get there.
|
||||
- group.addEventListener(
|
||||
- "TabGroupAnimationComplete",
|
||||
- releaseReservedSpace,
|
||||
- { once: true }
|
||||
- );
|
||||
- group.collapsed = false;
|
||||
+ const expand = !group.hasAttribute("has-active");
|
||||
+ if (expand) {
|
||||
+ // The group's tabs animate back to their full size, so hold on to the
|
||||
+ // space reserved for them until they get there.
|
||||
+ group.addEventListener(
|
||||
+ "TabGroupAnimationComplete",
|
||||
+ releaseReservedSpace,
|
||||
+ { once: true }
|
||||
+ );
|
||||
+ } else {
|
||||
+ releaseReservedSpace();
|
||||
+ }
|
||||
+ group.collapsed = !expand;
|
||||
+ gZenFolders.animateGroupMove(group, true);
|
||||
} else {
|
||||
releaseReservedSpace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1206,7 +1229,6 @@
|
||||
@@ -1362,7 +1397,6 @@
|
||||
// using updateDragImage. On Linux, we can use a panel.
|
||||
if (platform == "win" || platform == "macosx") {
|
||||
captureListener = function () {
|
||||
@@ -203,7 +227,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
};
|
||||
} else {
|
||||
// Create a panel to use it in setDragImage
|
||||
@@ -1244,7 +1266,6 @@
|
||||
@@ -1400,7 +1434,6 @@
|
||||
);
|
||||
dragImageOffset = dragImageOffset * scale;
|
||||
}
|
||||
@@ -211,7 +235,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
|
||||
// _dragData.offsetX/Y give the coordinates that the mouse should be
|
||||
// positioned relative to the corner of the new window created upon
|
||||
@@ -1263,7 +1284,7 @@
|
||||
@@ -1419,7 +1452,7 @@
|
||||
let dropEffect = this.getDropEffectForTabDrag(event);
|
||||
let isMovingInTabStrip = !fromTabList && dropEffect == "move";
|
||||
let collapseTabGroupDuringDrag =
|
||||
@@ -220,7 +244,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
|
||||
tab._dragData = {
|
||||
offsetX: this._tabbrowserTabs.verticalMode
|
||||
@@ -1273,7 +1294,7 @@
|
||||
@@ -1429,7 +1462,7 @@
|
||||
? event.screenY - window.screenY - tabOffset
|
||||
: event.screenY - window.screenY,
|
||||
scrollPos:
|
||||
@@ -229,7 +253,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
? this._tabbrowserTabs.pinnedTabsContainer.scrollPosition
|
||||
: this._tabbrowserTabs.arrowScrollbox.scrollPosition,
|
||||
screenX: event.screenX,
|
||||
@@ -1320,6 +1341,7 @@
|
||||
@@ -1522,6 +1555,7 @@
|
||||
if (tabStripItemElement.hasAttribute("dragtarget")) {
|
||||
return;
|
||||
}
|
||||
@@ -237,7 +261,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
let isPinned = tab.pinned;
|
||||
let dragAndDropElements = this._tabbrowserTabs.dragAndDropElements;
|
||||
let isGrid = this._tabbrowserTabs.isContainerVerticalPinnedGrid(tab);
|
||||
@@ -1686,23 +1708,6 @@
|
||||
@@ -1895,23 +1929,6 @@
|
||||
|
||||
// Slide the relevant tabs to their new position.
|
||||
// non-moving tabs adjust for RTL
|
||||
@@ -261,7 +285,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
// moving tabs don't adjust for RTL
|
||||
for (let item of selectedElements) {
|
||||
if (
|
||||
@@ -1751,7 +1756,6 @@
|
||||
@@ -1960,7 +1977,6 @@
|
||||
for (let item of this._tabbrowserTabs.dragAndDropElements) {
|
||||
delete item._moveTogetherSelectedTabsData;
|
||||
item = elementToMove(item);
|
||||
@@ -269,7 +293,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
item.removeAttribute("multiselected-move-together");
|
||||
}
|
||||
}
|
||||
@@ -2598,7 +2602,6 @@
|
||||
@@ -2812,7 +2828,6 @@
|
||||
tab.style.top = "";
|
||||
tab.style.maxWidth = "";
|
||||
tab.style.pointerEvents = "";
|
||||
@@ -277,7 +301,7 @@ index 8bb1219962a1368f50b53c61041f135c68e35f31..8e72441d26883cbef7a352b00c0fe2b1
|
||||
tab.removeAttribute("small-stack");
|
||||
tab.removeAttribute("big-stack");
|
||||
}
|
||||
@@ -2607,11 +2610,9 @@
|
||||
@@ -2821,11 +2836,9 @@
|
||||
)) {
|
||||
label.style.width = "";
|
||||
label.style.maxWidth = "";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tab-context-menu.js b/browser/components/tabbrowser/content/tab-context-menu.js
|
||||
index 4a7cb33a4d9067d469bbe09d4cd8844581642f7a..2e2404b78deb428e57d01b8b929231f675a21323 100644
|
||||
index 4a7cb33a4d9067d469bbe09d4cd8844581642f7a..d7f75471a207cccac6ca3dec49037ac30dd76163 100644
|
||||
--- a/browser/components/tabbrowser/content/tab-context-menu.js
|
||||
+++ b/browser/components/tabbrowser/content/tab-context-menu.js
|
||||
@@ -839,7 +839,8 @@ var TabContextMenu = {
|
||||
@@ -839,13 +839,15 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !this.multiselected;
|
||||
@@ -12,3 +12,10 @@ index 4a7cb33a4d9067d469bbe09d4cd8844581642f7a..2e2404b78deb428e57d01b8b929231f6
|
||||
// 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
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da5504f9d8 100644
|
||||
index 43180487a2fac15b7a65fac94f233eeed9094990..ef6d30eb681caeae48d15280687b3bc37dbadc37 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -513,6 +513,7 @@
|
||||
@@ -514,6 +514,7 @@
|
||||
* @type {MozBrowser[]}
|
||||
*/
|
||||
get splitViewBrowsers() {
|
||||
@@ -10,7 +10,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
const browsers = [];
|
||||
if (this.#activeSplitView) {
|
||||
for (const tab of this.#activeSplitView.tabs) {
|
||||
@@ -611,15 +612,66 @@
|
||||
@@ -612,15 +613,66 @@
|
||||
return this.tabContainer.visibleTabs;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
setSelectedTab(val, metricsContext = null) {
|
||||
if (this.selectedTab === val) {
|
||||
return;
|
||||
@@ -632,6 +684,9 @@
|
||||
@@ -633,6 +685,9 @@
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
// Update the tab
|
||||
this.tabbox.selectedTab = val;
|
||||
|
||||
@@ -708,6 +763,10 @@
|
||||
@@ -709,6 +764,10 @@
|
||||
userContextId = parseInt(tabArgument.getAttribute("usercontextid"), 10);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (openWindowInfo) {
|
||||
userContextId = openWindowInfo.originAttributes.userContextId;
|
||||
}
|
||||
@@ -809,6 +868,8 @@
|
||||
@@ -810,6 +869,8 @@
|
||||
this.tabpanels.appendChild(panel);
|
||||
|
||||
let tab = this.tabs[0];
|
||||
@@ -109,7 +109,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
tab.linkedPanel = uniqueId;
|
||||
this._selectedTab = tab;
|
||||
this._selectedBrowser = browser;
|
||||
@@ -1178,18 +1239,24 @@
|
||||
@@ -1179,18 +1240,24 @@
|
||||
* The context for the operation for telemetry purposes, defaults to an unknown context.
|
||||
*/
|
||||
pinTab(aTab, { metricsContext = this.TabMetrics.UNKNOWN_CONTEXT } = {}) {
|
||||
@@ -135,7 +135,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
aTab.setAttribute("pinned", "true");
|
||||
this._updateTabBarForPinnedTabs();
|
||||
@@ -1206,16 +1273,25 @@
|
||||
@@ -1207,16 +1274,25 @@
|
||||
* The context for the operation for telemetry purposes, defaults to an unknown context.
|
||||
*/
|
||||
unpinTab(aTab, { metricsContext = this.TabMetrics.UNKNOWN_CONTEXT } = {}) {
|
||||
@@ -162,7 +162,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
});
|
||||
|
||||
aTab.style.marginInlineStart = "";
|
||||
@@ -1430,6 +1506,9 @@
|
||||
@@ -1432,6 +1508,9 @@
|
||||
|
||||
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
|
||||
|
||||
@@ -172,7 +172,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (
|
||||
aIconURL &&
|
||||
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
|
||||
@@ -1439,6 +1518,9 @@
|
||||
@@ -1441,6 +1520,9 @@
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -182,7 +182,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
let browser = this.getBrowserForTab(aTab);
|
||||
browser.mIconURL = aIconURL;
|
||||
@@ -1761,7 +1843,6 @@
|
||||
@@ -1763,7 +1845,6 @@
|
||||
|
||||
// Preview mode should not reset the owner
|
||||
if (!this.#previewMode && !oldTab.selected) {
|
||||
@@ -190,7 +190,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
|
||||
let lastRelatedTab = this.#lastRelatedTabMap.get(oldTab);
|
||||
@@ -1852,6 +1933,7 @@
|
||||
@@ -1854,6 +1935,7 @@
|
||||
if (!this.#previewMode) {
|
||||
newTab.recordTimeFromUnloadToReload();
|
||||
newTab.updateLastAccessed();
|
||||
@@ -198,7 +198,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
oldTab.updateLastAccessed();
|
||||
// if this is the foreground window, update the last-seen timestamps.
|
||||
if (this.documentGlobal == BrowserWindowTracker.getTopWindow()) {
|
||||
@@ -2066,6 +2148,9 @@
|
||||
@@ -2068,6 +2150,9 @@
|
||||
}
|
||||
|
||||
let activeEl = document.activeElement;
|
||||
@@ -208,7 +208,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
// If focus is on the old tab, move it to the new tab.
|
||||
if (activeEl == oldTab) {
|
||||
newTab.focus();
|
||||
@@ -2104,7 +2189,7 @@
|
||||
@@ -2106,7 +2191,7 @@
|
||||
// Focus the location bar if it was previously focused for that tab.
|
||||
// In full screen mode, only bother making the location bar visible
|
||||
// if the tab is a blank one.
|
||||
@@ -217,7 +217,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
let selectURL = () => {
|
||||
if (this._asyncTabSwitching) {
|
||||
// Set _awaitingSetURI flag to suppress popup notification
|
||||
@@ -2392,7 +2477,12 @@
|
||||
@@ -2394,7 +2479,12 @@
|
||||
return this._setTabLabel(aTab, aLabel);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (!aLabel || (isURL && /^about:reader\?url=/.test(aLabel))) {
|
||||
return false;
|
||||
}
|
||||
@@ -2518,7 +2608,7 @@
|
||||
@@ -2520,7 +2610,7 @@
|
||||
newIndex = this.selectedTab._tPos + 1;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (this.isTabGroupLabel(targetTab)) {
|
||||
throw new Error(
|
||||
"Replacing a tab group label with a tab is not supported"
|
||||
@@ -2793,6 +2883,7 @@
|
||||
@@ -2795,6 +2885,7 @@
|
||||
uriIsAboutBlank,
|
||||
userContextId,
|
||||
skipLoad,
|
||||
@@ -248,7 +248,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
} = {}) {
|
||||
let b = document.createXULElement("browser");
|
||||
// Use the JSM global to create the permanentKey, so that if the
|
||||
@@ -2866,8 +2957,7 @@
|
||||
@@ -2868,8 +2959,7 @@
|
||||
// we use a different attribute name for this?
|
||||
b.setAttribute("name", name);
|
||||
}
|
||||
@@ -258,7 +258,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
b.setAttribute("transparent", "true");
|
||||
}
|
||||
|
||||
@@ -3022,7 +3112,7 @@
|
||||
@@ -3024,7 +3114,7 @@
|
||||
|
||||
let panel = this.getPanel(browser);
|
||||
let uniqueId = this._generateUniquePanelID();
|
||||
@@ -267,7 +267,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
aTab.linkedPanel = uniqueId;
|
||||
|
||||
// Inject the <browser> into the DOM if necessary.
|
||||
@@ -3082,8 +3172,8 @@
|
||||
@@ -3084,8 +3174,8 @@
|
||||
// If we transitioned from one browser to two browsers, we need to set
|
||||
// hasSiblings=false on both the existing browser and the new browser.
|
||||
if (this.tabs.length == 2) {
|
||||
@@ -278,7 +278,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
} else {
|
||||
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
||||
}
|
||||
@@ -3268,7 +3358,6 @@
|
||||
@@ -3270,7 +3360,6 @@
|
||||
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
|
||||
tabIndex: tab._tPos + 1,
|
||||
userContextId: tab.userContextId,
|
||||
@@ -286,7 +286,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
focusUrlBar: true,
|
||||
});
|
||||
resolve(this.selectedBrowser);
|
||||
@@ -3378,6 +3467,10 @@
|
||||
@@ -3380,6 +3469,10 @@
|
||||
schemelessInput,
|
||||
hasValidUserGestureActivation = false,
|
||||
textDirectiveUserActivation = false,
|
||||
@@ -297,7 +297,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
} = {}
|
||||
) {
|
||||
// all callers of addTab that pass a params object need to pass
|
||||
@@ -3388,10 +3481,25 @@
|
||||
@@ -3390,10 +3483,25 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
// If we're opening a foreground tab, set the owner by default.
|
||||
ownerTab ??= inBackground ? null : this.selectedTab;
|
||||
|
||||
@@ -3399,6 +3507,7 @@
|
||||
@@ -3401,6 +3509,7 @@
|
||||
if (this.selectedTab.owner) {
|
||||
this.selectedTab.owner = null;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
// Find the tab that opened this one, if any. This is used for
|
||||
// determining positioning, and inherited attributes such as the
|
||||
@@ -3451,6 +3560,22 @@
|
||||
@@ -3453,6 +3562,22 @@
|
||||
noInitialLabel,
|
||||
skipBackgroundNotify,
|
||||
});
|
||||
@@ -354,7 +354,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (insertTab) {
|
||||
// Insert the tab into the tab container in the correct position.
|
||||
this.#insertTabAtIndex(t, {
|
||||
@@ -3459,6 +3584,7 @@
|
||||
@@ -3461,6 +3586,7 @@
|
||||
ownerTab,
|
||||
openerTab,
|
||||
pinned,
|
||||
@@ -362,7 +362,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
bulkOrderedOpen,
|
||||
tabGroup: tabGroup ?? openerTab?.group,
|
||||
});
|
||||
@@ -3477,6 +3603,7 @@
|
||||
@@ -3479,6 +3605,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
triggeringRemoteType,
|
||||
@@ -370,7 +370,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}));
|
||||
|
||||
if (focusUrlBar) {
|
||||
@@ -3601,6 +3728,12 @@
|
||||
@@ -3603,6 +3730,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this.#notifyPinnedStatus(t);
|
||||
@@ -3611,6 +3744,15 @@
|
||||
@@ -3613,6 +3746,15 @@
|
||||
if (!inBackground) {
|
||||
this.selectedTab = t;
|
||||
}
|
||||
@@ -399,7 +399,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -3834,6 +3976,7 @@
|
||||
@@ -3836,6 +3978,7 @@
|
||||
insertBefore = null,
|
||||
isAdoptingGroup = false,
|
||||
metricsContext = this.TabMetrics.UNKNOWN_CONTEXT,
|
||||
@@ -407,7 +407,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
} = {}
|
||||
) {
|
||||
if (
|
||||
@@ -3844,9 +3987,6 @@
|
||||
@@ -3846,9 +3989,6 @@
|
||||
!this.isSplitViewWrapper(tabOrSplitView)
|
||||
)
|
||||
) {
|
||||
@@ -417,7 +417,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
|
||||
if (!color) {
|
||||
@@ -3867,9 +4007,14 @@
|
||||
@@ -3869,9 +4009,14 @@
|
||||
label,
|
||||
isAdoptingGroup
|
||||
);
|
||||
@@ -434,7 +434,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
);
|
||||
group.addTabs(tabsAndSplitViews, metricsContext);
|
||||
|
||||
@@ -3973,7 +4118,7 @@
|
||||
@@ -3975,7 +4120,7 @@
|
||||
}
|
||||
|
||||
this.#handleTabMove(tab, () =>
|
||||
@@ -443,7 +443,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4059,6 +4204,7 @@
|
||||
@@ -4061,6 +4206,7 @@
|
||||
color: group.color,
|
||||
insertBefore: newTabs[0],
|
||||
isAdoptingGroup: true,
|
||||
@@ -451,7 +451,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4269,6 +4415,7 @@
|
||||
@@ -4271,6 +4417,7 @@
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
triggeringRemoteType,
|
||||
@@ -459,7 +459,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
) {
|
||||
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
|
||||
@@ -4329,6 +4476,7 @@
|
||||
@@ -4331,6 +4478,7 @@
|
||||
openWindowInfo,
|
||||
name,
|
||||
skipLoad,
|
||||
@@ -467,7 +467,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4542,9 +4690,9 @@
|
||||
@@ -4544,9 +4692,9 @@
|
||||
}
|
||||
|
||||
// Add a new tab if needed.
|
||||
@@ -479,7 +479,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
let url = "about:blank";
|
||||
if (tabData.entries?.length) {
|
||||
@@ -4577,8 +4725,10 @@
|
||||
@@ -4579,8 +4727,10 @@
|
||||
insertTab: false,
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
@@ -491,7 +491,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -4600,7 +4750,8 @@
|
||||
@@ -4602,7 +4752,8 @@
|
||||
this.pinTab(tab);
|
||||
// Then ensure all the tab open/pinning information is sent.
|
||||
this._fireTabOpen(tab, {});
|
||||
@@ -501,7 +501,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
let { groupId } = tabData;
|
||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||
// if a tab refers to a tab group we don't know, skip any group
|
||||
@@ -4620,7 +4771,10 @@
|
||||
@@ -4622,7 +4773,10 @@
|
||||
tabGroup.stateData.id,
|
||||
tabGroup.stateData.color,
|
||||
tabGroup.stateData.collapsed,
|
||||
@@ -513,7 +513,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
);
|
||||
tabsFragment.appendChild(tabGroup.node);
|
||||
}
|
||||
@@ -4675,9 +4829,21 @@
|
||||
@@ -4677,9 +4831,21 @@
|
||||
// to remove the old selected tab.
|
||||
if (tabToSelect) {
|
||||
let leftoverTab = this.selectedTab;
|
||||
@@ -523,7 +523,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
+ } else {
|
||||
+ gZenWorkspaces._tabToRemoveForEmpty = leftoverTab;
|
||||
+ if (Services.prefs.getBoolPref("zen.workspaces.continue-where-left-off")) {
|
||||
+ gZenWorkspaces._tabToSelect = selectTab - 2; // -1 for the offset, and another -1 for the empty tab.
|
||||
+ gZenWorkspaces._tabToSelect = selectTab - 1; // -1 for the empty tab.
|
||||
+ }
|
||||
+ if (gZenWorkspaces._initialTab && !gZenVerticalTabsManager._canReplaceNewTab) {
|
||||
+ gZenWorkspaces._initialTab._shouldRemove = true;
|
||||
@@ -535,7 +535,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
this._updateTabsAfterInsert();
|
||||
@@ -4882,11 +5048,17 @@
|
||||
@@ -4884,11 +5050,17 @@
|
||||
if (ownerTab) {
|
||||
tab.owner = ownerTab;
|
||||
}
|
||||
@@ -554,7 +554,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -4898,7 +5070,7 @@
|
||||
@@ -4900,7 +5072,7 @@
|
||||
let lastRelatedTab =
|
||||
openerTab && this.#lastRelatedTabMap.get(openerTab);
|
||||
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
|
||||
@@ -563,7 +563,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
tabGroup = previousTab.group;
|
||||
}
|
||||
if (
|
||||
@@ -4914,7 +5086,7 @@
|
||||
@@ -4916,7 +5088,7 @@
|
||||
previousTab.splitview
|
||||
) + 1;
|
||||
} else if (previousTab.visible) {
|
||||
@@ -572,7 +572,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
} else if (previousTab == FirefoxViewHandler.tab) {
|
||||
elementIndex = 0;
|
||||
}
|
||||
@@ -4942,14 +5114,14 @@
|
||||
@@ -4944,14 +5116,14 @@
|
||||
}
|
||||
// Ensure index is within bounds.
|
||||
if (tab.pinned) {
|
||||
@@ -591,7 +591,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
if (pinned && !itemAfter?.pinned) {
|
||||
itemAfter = null;
|
||||
@@ -4966,7 +5138,7 @@
|
||||
@@ -4968,7 +5140,7 @@
|
||||
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
|
||||
@@ -600,7 +600,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (
|
||||
(this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
|
||||
this.isSplitViewWrapper(itemAfter)
|
||||
@@ -4997,7 +5169,11 @@
|
||||
@@ -4999,7 +5171,11 @@
|
||||
const tabContainer = pinned
|
||||
? this.tabContainer.pinnedTabsContainer
|
||||
: this.tabContainer;
|
||||
@@ -612,7 +612,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
|
||||
if (tab.group?.collapsed) {
|
||||
@@ -5012,6 +5188,7 @@
|
||||
@@ -5014,6 +5190,7 @@
|
||||
if (pinned) {
|
||||
this._updateTabBarForPinnedTabs();
|
||||
}
|
||||
@@ -620,7 +620,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -5568,6 +5745,7 @@
|
||||
@@ -5577,6 +5754,7 @@
|
||||
metricsContext,
|
||||
} = {}
|
||||
) {
|
||||
@@ -628,7 +628,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||
// can be considered equivalent to closing the window.
|
||||
if (
|
||||
@@ -5678,6 +5856,7 @@
|
||||
@@ -5687,6 +5865,7 @@
|
||||
closedTabCount -= 1;
|
||||
}
|
||||
}
|
||||
@@ -636,7 +636,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
if (closedTabCount > 0) {
|
||||
this.recordTabMetrics(
|
||||
@@ -5730,6 +5909,14 @@
|
||||
@@ -5761,6 +5940,14 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -651,7 +651,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
let isVisibleTab = aTab.visible;
|
||||
// We have to sample the tab width now, since _beginRemoveTab might
|
||||
// end up modifying the DOM in such a way that aTab gets a new
|
||||
@@ -5737,6 +5924,9 @@
|
||||
@@ -5768,6 +5955,9 @@
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
let isLastTab = this.#isLastTabInWindow(aTab);
|
||||
@@ -661,7 +661,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -5747,13 +5937,14 @@
|
||||
@@ -5778,13 +5968,14 @@
|
||||
metricsContext,
|
||||
})
|
||||
) {
|
||||
@@ -677,7 +677,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
let lockTabSizing =
|
||||
!this.tabContainer.verticalMode &&
|
||||
!aTab.pinned &&
|
||||
@@ -5784,7 +5975,13 @@
|
||||
@@ -5815,7 +6006,13 @@
|
||||
// We're not animating, so we can cancel the animation stopwatch.
|
||||
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
|
||||
aTab._closeTimeAnimTimerId = null;
|
||||
@@ -692,7 +692,18 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5827,7 +6024,7 @@
|
||||
@@ -5855,7 +6052,9 @@
|
||||
get #shouldCloseWindowWithLastTab() {
|
||||
return (
|
||||
!window.toolbar.visible ||
|
||||
- Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab")
|
||||
+ (Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") &&
|
||||
+ !gZenWorkspaces._isClosingWindow &&
|
||||
+ !gZenWorkspaces._removedByStartupPage)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5871,7 +6070,7 @@
|
||||
*/
|
||||
#isLastTabInWindow(tab) {
|
||||
for (const otherTab of this.tabs) {
|
||||
@@ -701,16 +712,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -5917,7 +6114,7 @@
|
||||
closeWindowWithLastTab != null
|
||||
? closeWindowWithLastTab
|
||||
: !window.toolbar.visible ||
|
||||
- Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab");
|
||||
+ Services.prefs.getBoolPref("browser.tabs.closeWindowWithLastTab") && !gZenWorkspaces._isClosingWindow && !gZenWorkspaces._removedByStartupPage;
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -5941,6 +6138,7 @@
|
||||
@@ -5982,6 +6181,7 @@
|
||||
|
||||
newTab = true;
|
||||
}
|
||||
@@ -718,8 +720,8 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||
|
||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||
@@ -5982,13 +6180,7 @@
|
||||
aTab._mouseleave();
|
||||
@@ -6029,13 +6229,7 @@
|
||||
}
|
||||
|
||||
if (newTab) {
|
||||
- this.addTrustedTab(BROWSER_NEW_TAB_URL, {
|
||||
@@ -733,7 +735,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
} else {
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -6128,6 +6320,7 @@
|
||||
@@ -6192,6 +6386,7 @@
|
||||
this.tabs[i]._tPos = i;
|
||||
}
|
||||
|
||||
@@ -741,7 +743,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (!this.#windowIsClosing) {
|
||||
// update tab close buttons state
|
||||
this.tabContainer._updateCloseButtons();
|
||||
@@ -6313,6 +6506,7 @@
|
||||
@@ -6377,6 +6572,7 @@
|
||||
memory_after: await getTotalMemoryUsage(),
|
||||
time_to_unload_in_ms: timeElapsed,
|
||||
});
|
||||
@@ -749,7 +751,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6358,6 +6552,7 @@
|
||||
@@ -6422,11 +6618,12 @@
|
||||
}
|
||||
|
||||
let excludeTabs = new Set(aExcludeTabs);
|
||||
@@ -757,7 +759,13 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
// If this tab has a successor, it should be selectable, since
|
||||
// hiding or closing a tab removes that tab as a successor.
|
||||
@@ -6370,13 +6565,13 @@
|
||||
if (aTab.successor && !excludeTabs.has(aTab.successor)) {
|
||||
- return aTab.successor;
|
||||
+ return gZenWorkspaces.findTabToBlur(aTab.successor);
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -6434,13 +6631,13 @@
|
||||
!excludeTabs.has(aTab.owner) &&
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||
) {
|
||||
@@ -773,7 +781,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
);
|
||||
|
||||
if (Services.prefs.getBoolPref("browser.tabs.selectMRUOnClose", false)) {
|
||||
@@ -6392,6 +6587,13 @@
|
||||
@@ -6456,6 +6653,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -787,7 +795,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
let tab = this.tabContainer.findNextTab(aTab, {
|
||||
direction: 1,
|
||||
filter: _tab => remainingTabs.includes(_tab),
|
||||
@@ -6405,7 +6607,7 @@
|
||||
@@ -6469,7 +6673,7 @@
|
||||
}
|
||||
|
||||
if (tab) {
|
||||
@@ -796,7 +804,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
|
||||
// If no qualifying visible tab was found, see if there is a tab in
|
||||
@@ -6426,7 +6628,7 @@
|
||||
@@ -6490,7 +6694,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -805,7 +813,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
|
||||
_blurTab(aTab) {
|
||||
@@ -6437,7 +6639,7 @@
|
||||
@@ -6501,7 +6705,7 @@
|
||||
* @returns {boolean}
|
||||
* False if swapping isn't permitted, true otherwise.
|
||||
*/
|
||||
@@ -814,7 +822,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
// Do not allow transfering a private tab to a non-private window
|
||||
// and vice versa.
|
||||
if (
|
||||
@@ -6491,6 +6693,7 @@
|
||||
@@ -6555,6 +6759,7 @@
|
||||
// fire the beforeunload event in the process. Close the other
|
||||
// window if this was its last tab.
|
||||
if (
|
||||
@@ -822,7 +830,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
!remoteBrowser._beginRemoveTab(aOtherTab, {
|
||||
adoptedByTab: aOurTab,
|
||||
closeWindowWithLastTab: true,
|
||||
@@ -6502,7 +6705,7 @@
|
||||
@@ -6566,7 +6771,7 @@
|
||||
// If this is the last tab of the window, hide the window
|
||||
// immediately without animation before the docshell swap, to avoid
|
||||
// about:blank being painted.
|
||||
@@ -831,7 +839,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (closeWindow) {
|
||||
let win = aOtherTab.documentGlobal;
|
||||
win.windowUtils.suppressAnimation(true);
|
||||
@@ -6636,11 +6839,13 @@
|
||||
@@ -6700,11 +6905,13 @@
|
||||
}
|
||||
|
||||
// Finish tearing down the tab that's going away.
|
||||
@@ -845,7 +853,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
this.setTabTitle(aOurTab);
|
||||
|
||||
@@ -6860,10 +7065,10 @@
|
||||
@@ -6928,10 +7135,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -858,7 +866,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -6923,7 +7128,8 @@
|
||||
@@ -6991,7 +7198,8 @@
|
||||
* @param {object} [aOptions={}]
|
||||
* Key-value pairs that will be serialized into the features string.
|
||||
*/
|
||||
@@ -868,7 +876,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
if (this.tabs.length == 1) {
|
||||
return null;
|
||||
}
|
||||
@@ -6940,7 +7146,7 @@
|
||||
@@ -7008,7 +7216,7 @@
|
||||
// tell a new window to take the "dropped" tab
|
||||
let args = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
|
||||
args.appendElement(aTab.splitview ?? aTab);
|
||||
@@ -877,7 +885,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
private: PrivateBrowsingUtils.isWindowPrivate(window),
|
||||
features: Object.entries(aOptions)
|
||||
.map(([key, value]) => `${key}=${value}`)
|
||||
@@ -6948,6 +7154,8 @@
|
||||
@@ -7016,6 +7224,8 @@
|
||||
openerWindow: window,
|
||||
args,
|
||||
});
|
||||
@@ -886,7 +894,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7074,7 +7282,7 @@
|
||||
@@ -7142,7 +7352,7 @@
|
||||
* `true` if element is a `<tab-group>`
|
||||
*/
|
||||
isTabGroup(element) {
|
||||
@@ -895,7 +903,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7146,8 +7354,8 @@
|
||||
@@ -7214,8 +7424,8 @@
|
||||
}
|
||||
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
@@ -906,7 +914,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
} else {
|
||||
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -7193,8 +7401,8 @@
|
||||
@@ -7261,8 +7471,8 @@
|
||||
this.#handleTabMove(
|
||||
element,
|
||||
() => {
|
||||
@@ -917,7 +925,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
neighbor = neighbor.group;
|
||||
}
|
||||
if (neighbor?.splitview) {
|
||||
@@ -7205,6 +7413,12 @@
|
||||
@@ -7273,6 +7483,12 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -930,7 +938,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
if (movingForwards && neighbor) {
|
||||
neighbor.after(element);
|
||||
@@ -7278,23 +7492,31 @@
|
||||
@@ -7346,23 +7562,31 @@
|
||||
) {
|
||||
if (this.isTabGroupLabel(targetElement)) {
|
||||
targetElement = targetElement.group;
|
||||
@@ -968,7 +976,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
} else if (!element.pinned && targetElement && targetElement.pinned) {
|
||||
// If the caller asks to move an unpinned element next to a pinned
|
||||
// tab, move the unpinned element to be the first unpinned element
|
||||
@@ -7307,12 +7529,35 @@
|
||||
@@ -7375,12 +7599,35 @@
|
||||
// move the tab group right before the first unpinned tab.
|
||||
// 4. Moving a tab group and the first unpinned tab is grouped:
|
||||
// move the tab group right before the first unpinned tab's tab group.
|
||||
@@ -982,7 +990,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
+ if (!gZenFolders.canDropElement(element, targetElement)) {
|
||||
+ element = element.group;
|
||||
+ }
|
||||
+ if (!element.hasAttribute('zen-essential') && targetElement?.hasAttribute('zen-essential')) {
|
||||
+ if (!element.hasAttribute('zen-essential') && targetElement?.hasAttribute('zen-essential')) {
|
||||
+ targetElement = null;
|
||||
+ moveBefore = false;
|
||||
+ }
|
||||
@@ -1005,7 +1013,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
// 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.
|
||||
@@ -7321,6 +7566,7 @@
|
||||
@@ -7389,6 +7636,7 @@
|
||||
}
|
||||
|
||||
let getContainer = () =>
|
||||
@@ -1013,7 +1021,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
element.pinned
|
||||
? this.tabContainer.pinnedTabsContainer
|
||||
: this.tabContainer;
|
||||
@@ -7329,11 +7575,15 @@
|
||||
@@ -7397,11 +7645,15 @@
|
||||
element,
|
||||
() => {
|
||||
if (moveBefore) {
|
||||
@@ -1030,7 +1038,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
},
|
||||
{ metricsContext }
|
||||
@@ -7411,11 +7661,15 @@
|
||||
@@ -7479,11 +7731,15 @@
|
||||
* The context for the operation for telemetry purposes.
|
||||
*/
|
||||
moveTabToExistingGroup(aTab, aGroup, { metricsContext } = {}) {
|
||||
@@ -1049,7 +1057,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
return;
|
||||
@@ -7489,6 +7743,7 @@
|
||||
@@ -7557,6 +7813,7 @@
|
||||
|
||||
let state = {
|
||||
tabIndex: tab._tPos,
|
||||
@@ -1057,7 +1065,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
};
|
||||
if (tab.visible) {
|
||||
state.elementIndex = tab.elementIndex;
|
||||
@@ -7527,7 +7782,7 @@
|
||||
@@ -7595,7 +7852,7 @@
|
||||
let changedSplitView =
|
||||
previousTabState.splitViewId != currentTabState.splitViewId;
|
||||
|
||||
@@ -1066,7 +1074,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
tab.dispatchEvent(
|
||||
new CustomEvent("TabMove", {
|
||||
bubbles: true,
|
||||
@@ -7579,6 +7834,10 @@
|
||||
@@ -7647,6 +7904,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
@@ -1077,7 +1085,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -7626,7 +7885,22 @@
|
||||
@@ -7694,7 +7955,22 @@
|
||||
* @returns {object}
|
||||
* The new tab in the current window, null if the tab couldn't be adopted.
|
||||
*/
|
||||
@@ -1101,7 +1109,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
// Swap the dropped tab with a new one we create and then close
|
||||
// it in the other window (making it seem to have moved between
|
||||
// windows). We also ensure that the tab we create to swap into has
|
||||
@@ -7669,6 +7943,8 @@
|
||||
@@ -7737,6 +8013,8 @@
|
||||
}
|
||||
params.skipLoad = true;
|
||||
let newTab = this.addWebTab("about:blank", params);
|
||||
@@ -1110,7 +1118,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
aTab.container.tabDragAndDrop.finishAnimateTabMove();
|
||||
|
||||
@@ -8448,7 +8724,7 @@
|
||||
@@ -8516,7 +8794,7 @@
|
||||
// preventDefault(). It will still raise the window if appropriate.
|
||||
return;
|
||||
}
|
||||
@@ -1119,7 +1127,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
@@ -8465,7 +8741,6 @@
|
||||
@@ -8533,7 +8811,6 @@
|
||||
|
||||
on_TabGroupCollapse(aEvent) {
|
||||
aEvent.target.tabs.forEach(tab => {
|
||||
@@ -1127,7 +1135,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8819,7 +9094,9 @@
|
||||
@@ -8887,7 +9164,9 @@
|
||||
|
||||
let filter = this.#tabFilters.get(tab);
|
||||
if (filter) {
|
||||
@@ -1137,7 +1145,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
|
||||
let listener = this.#tabListeners.get(tab);
|
||||
if (listener) {
|
||||
@@ -9604,6 +9881,7 @@
|
||||
@@ -9676,6 +9955,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this._tab.setAttribute("busy", "true");
|
||||
@@ -1145,7 +1153,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
gBrowser._tabAttrModified(this._tab, ["busy"]);
|
||||
this._tab._notselectedsinceload = !this._tab.selected;
|
||||
}
|
||||
@@ -9684,6 +9962,7 @@
|
||||
@@ -9756,6 +10036,7 @@
|
||||
// known defaults. Note we use the original URL since about:newtab
|
||||
// redirects to a prerendered page.
|
||||
const shouldRemoveFavicon =
|
||||
@@ -1153,7 +1161,7 @@ index 39b5babee5942427a82a7a64ad69e1b16efebcc1..32beac13dd4215a16de3a783db6c32da
|
||||
!this._browser.mIconURL &&
|
||||
!ignoreBlank &&
|
||||
!(originalLocation.spec in FAVICON_DEFAULTS);
|
||||
@@ -9858,13 +10137,6 @@
|
||||
@@ -9930,13 +10211,6 @@
|
||||
this._browser.originalURI = aRequest.originalURI;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
|
||||
index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e356c9f8c6f 100644
|
||||
index 237950fb2c449ce088c204d33a70b1d95dae549b..635f9dbc5c79b6bb869b4ab4ec2d4b4e226b4672 100644
|
||||
--- a/browser/components/tabbrowser/content/tabgroup.js
|
||||
+++ b/browser/components/tabbrowser/content/tabgroup.js
|
||||
@@ -14,11 +14,11 @@
|
||||
@@ -101,7 +101,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
|
||||
resetDefaultGroupName = () => {
|
||||
this.#defaultGroupName = "";
|
||||
@@ -175,10 +198,15 @@
|
||||
@@ -175,10 +198,18 @@
|
||||
if (!this.#tabChangeObserver) {
|
||||
this.#tabChangeObserver = new window.MutationObserver(mutations => {
|
||||
if (!this.tabs.length) {
|
||||
@@ -112,12 +112,15 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
new CustomEvent("TabGroupRemoved", { bubbles: true })
|
||||
);
|
||||
+ gZenVerticalTabsManager.animateItemClose(this).then(() => {
|
||||
+ this.dispatchEvent(
|
||||
+ new CustomEvent("TabGroupRemovedFromDOM", { bubbles: true })
|
||||
+ );
|
||||
this.remove();
|
||||
+ });
|
||||
Services.obs.notifyObservers(
|
||||
this,
|
||||
"browser-tabgroup-removed-from-dom"
|
||||
@@ -223,7 +251,10 @@
|
||||
@@ -223,7 +254,10 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -129,7 +132,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
}
|
||||
|
||||
get color() {
|
||||
@@ -330,6 +361,9 @@
|
||||
@@ -330,6 +364,9 @@
|
||||
}
|
||||
|
||||
set collapsed(val) {
|
||||
@@ -139,7 +142,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
if (!!val == this.collapsed) {
|
||||
return;
|
||||
}
|
||||
@@ -416,7 +450,6 @@
|
||||
@@ -416,7 +453,6 @@
|
||||
tabGroupName,
|
||||
})
|
||||
.then(result => {
|
||||
@@ -147,7 +150,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
});
|
||||
}
|
||||
|
||||
@@ -491,13 +524,68 @@
|
||||
@@ -491,13 +527,68 @@
|
||||
* @returns {MozTabbrowserTab[]}
|
||||
*/
|
||||
get tabs() {
|
||||
@@ -162,9 +165,8 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
+ tabsCollect.push(item);
|
||||
+ if (gBrowser.isTabGroup(item)) {
|
||||
+ tabsCollect.push(...item.tabs);
|
||||
}
|
||||
}
|
||||
- return childrenArray.filter(node => node.matches("tab"));
|
||||
+ }
|
||||
+ }
|
||||
+ return tabsCollect.filter(node => node.matches("tab"));
|
||||
+ }
|
||||
+
|
||||
@@ -208,8 +210,9 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
+ currentGroup = currentGroup?.group;
|
||||
+ if (currentGroup.collapsed) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
- return childrenArray.filter(node => node.matches("tab"));
|
||||
+ if (this.pinned && gZenWorkspaces.activeWorkspaceElement?.hasCollapsedPinnedTabs) {
|
||||
+ return false;
|
||||
+ }
|
||||
@@ -221,7 +224,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -617,9 +705,6 @@
|
||||
@@ -617,9 +708,6 @@
|
||||
});
|
||||
} else {
|
||||
if (tabOrSplitView.pinned) {
|
||||
@@ -231,7 +234,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
}
|
||||
let tabToMove =
|
||||
this.documentGlobal === tabOrSplitView.documentGlobal
|
||||
@@ -682,7 +767,7 @@
|
||||
@@ -682,7 +770,7 @@
|
||||
*/
|
||||
on_click(event) {
|
||||
let isToggleElement =
|
||||
@@ -240,7 +243,7 @@ index 237950fb2c449ce088c204d33a70b1d95dae549b..af200a043dcd2e24393fcefe32493e35
|
||||
event.target === this.#overflowCountLabel;
|
||||
if (isToggleElement && event.button === 0) {
|
||||
event.preventDefault();
|
||||
@@ -761,5 +846,6 @@
|
||||
@@ -761,5 +849,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarPrefs.sys.mjs b/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
index 2d21248256c6c2bfb8dac958133c10e3251ef564..f788bd10ec2c08e4b27b77cd3bb0489fb04e8b7a 100644
|
||||
index e48f0295d803ba9eac5ab9d01ebb3b3dacbc9d4b..cb78b74230f63a47479404767b5ab5883278dfba 100644
|
||||
--- a/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
@@ -462,6 +462,7 @@ const PREF_URLBAR_DEFAULTS = /** @type {PreferenceDefinition[]} */ ([
|
||||
@@ -161,6 +161,9 @@ 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.
|
||||
@@ -486,6 +489,7 @@ const PREF_URLBAR_DEFAULTS = /** @type {PreferenceDefinition[]} */ ([
|
||||
["shortcuts.tabs", true],
|
||||
["shortcuts.history", true],
|
||||
["shortcuts.actions", true],
|
||||
@@ -10,12 +20,12 @@ index 2d21248256c6c2bfb8dac958133c10e3251ef564..f788bd10ec2c08e4b27b77cd3bb0489f
|
||||
|
||||
// Boolean to determine if the providers defined in `exposureResults`
|
||||
// should be displayed in search results. This can be set by a
|
||||
@@ -799,6 +800,8 @@ function makeDefaultResultGroups({ showSearchSuggestionsFirst }) {
|
||||
@@ -854,6 +858,8 @@ function makeDefaultResultGroups({
|
||||
*/
|
||||
let rootGroup = {
|
||||
children: [
|
||||
+ { children: [{ group: lazy.UrlbarUtils.RESULT_GROUP.ZEN_ACTION }] },
|
||||
+ { children: [{ group: lazy.UrlbarUtils.RESULT_GROUP.ZEN_WORKSPACE }] },
|
||||
+ { children: [{ group: lazy.UrlbarShared.RESULT_GROUP.ZEN_ACTION }] },
|
||||
+ { children: [{ group: lazy.UrlbarShared.RESULT_GROUP.ZEN_WORKSPACE }] },
|
||||
// heuristic
|
||||
{
|
||||
maxResultCount: 1,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarProviderHeuristicFallback.sys.mjs b/browser/components/urlbar/UrlbarProviderHeuristicFallback.sys.mjs
|
||||
index f611d8e44af518aa1adc7505c5021235f55b49de..0eca20cb869626dfa6ace02acc00cad84462d54f 100644
|
||||
index cfc232f038cd491db32e0c0ca35622360dd9dec5..4806a725ddefa9d0709020d537eae5464249a294 100644
|
||||
--- a/browser/components/urlbar/UrlbarProviderHeuristicFallback.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarProviderHeuristicFallback.sys.mjs
|
||||
@@ -78,22 +78,26 @@ export class UrlbarProviderHeuristicFallback extends UrlbarProvider {
|
||||
@@ -77,22 +77,26 @@ export class UrlbarProviderHeuristicFallback extends UrlbarProvider {
|
||||
// Since we can't tell if this is a real URL and whether the user wants
|
||||
// to visit or search for it, we provide an alternative searchengine
|
||||
// match if the string looks like an alphanumeric origin or an e-mail.
|
||||
@@ -17,7 +17,7 @@ index f611d8e44af518aa1adc7505c5021235f55b49de..0eca20cb869626dfa6ace02acc00cad8
|
||||
- lazy.UrlUtils.REGEXP_COMMON_EMAIL.test(str))
|
||||
- ) {
|
||||
+ let trimmedSearchString = queryContext.trimmedSearchString;
|
||||
+ let [searchCandidate] = UrlbarUtils.stripPrefixAndTrim(
|
||||
+ let [searchCandidate] = lazy.UrlbarShared.stripPrefixAndTrim(
|
||||
+ trimmedSearchString,
|
||||
+ {
|
||||
+ trimSlash: true,
|
||||
|
||||
@@ -1,41 +1,16 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
index 78c76bde00b6b581184cee1cd0e1756e5f2da6a4..94c713470b1240729ef2350d090b0449f3801af4 100644
|
||||
index 178cd5e84fda74a28b2de59b671b3399cc28fac4..b03c6e06de4ee9a95dcb4d33d7ac9f0b053be4e1 100644
|
||||
--- a/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
@@ -126,6 +126,8 @@ export var UrlbarUtils = {
|
||||
SEMANTIC_HISTORY: "semanticHistory",
|
||||
SUGGESTED_INDEX: "suggestedIndex",
|
||||
TAIL_SUGGESTION: "tailSuggestion",
|
||||
+ ZEN_ACTION: "zenAction",
|
||||
+ ZEN_WORKSPACE: "zenWorkspace",
|
||||
}),
|
||||
|
||||
// Defines provider types.
|
||||
@@ -274,6 +276,14 @@ export var UrlbarUtils = {
|
||||
telemetryLabel: "actions",
|
||||
uiLabel: "urlbar-searchmode-actions3",
|
||||
},
|
||||
+ {
|
||||
+ source: UrlbarShared.RESULT_SOURCE.WORKSPACES,
|
||||
+ restrict: UrlbarShared.RESTRICT_TOKENS.WORKSPACE,
|
||||
+ icon: "chrome://browser/skin/zen-icons/selectable/layers.svg",
|
||||
+ pref: "shortcuts.workspaces",
|
||||
+ telemetryLabel: "workspaces",
|
||||
+ uiLabel: "urlbar-search-mode-workspaces",
|
||||
+ },
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -566,6 +576,12 @@ export var UrlbarUtils = {
|
||||
return this.RESULT_GROUP.HEURISTIC_FALLBACK;
|
||||
@@ -214,6 +214,11 @@ export var UrlbarUtils = {
|
||||
return UrlbarShared.RESULT_GROUP.HEURISTIC_FALLBACK;
|
||||
case "UrlbarProviderHistoryUrlHeuristic":
|
||||
return this.RESULT_GROUP.HEURISTIC_HISTORY_URL;
|
||||
return UrlbarShared.RESULT_GROUP.HEURISTIC_HISTORY_URL;
|
||||
+ case "ZenUrlbarProviderGlobalActions":
|
||||
+ if (result.source == UrlbarShared.RESULT_SOURCE.WORKSPACES) {
|
||||
+ return this.RESULT_GROUP.ZEN_WORKSPACE;
|
||||
+ } else {
|
||||
+ return this.RESULT_GROUP.ZEN_ACTION;
|
||||
+ return UrlbarShared.RESULT_GROUP.ZEN_WORKSPACE;
|
||||
+ }
|
||||
+ return UrlbarShared.RESULT_GROUP.ZEN_ACTION;
|
||||
case "UrlbarProviderOmnibox":
|
||||
return this.RESULT_GROUP.HEURISTIC_OMNIBOX;
|
||||
return UrlbarShared.RESULT_GROUP.HEURISTIC_OMNIBOX;
|
||||
case "UrlbarProviderRestrictKeywordsAutofill":
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/content/UrlbarChildController.mjs b/browser/components/urlbar/content/UrlbarChildController.mjs
|
||||
index a8e9d3093d046612650a17970330a8279f55833f..063a3e8adf009d6c0ddc60430bc0e7485e812b8a 100644
|
||||
index a17a4de079b69d2818388b33a2c1746cc6148c73..4fee63a22919972af08716db2d2de1c7549ff100 100644
|
||||
--- a/browser/components/urlbar/content/UrlbarChildController.mjs
|
||||
+++ b/browser/components/urlbar/content/UrlbarChildController.mjs
|
||||
@@ -258,7 +258,6 @@ export class UrlbarChildController {
|
||||
@@ -438,7 +438,6 @@ export class UrlbarChildController {
|
||||
const isMac = AppConstants.platform == "macosx";
|
||||
// Handle readline/emacs-style navigation bindings on Mac.
|
||||
if (
|
||||
@@ -10,7 +10,7 @@ index a8e9d3093d046612650a17970330a8279f55833f..063a3e8adf009d6c0ddc60430bc0e748
|
||||
this.view.isOpen &&
|
||||
event.ctrlKey &&
|
||||
(event.key == "n" || event.key == "p")
|
||||
@@ -450,6 +449,8 @@ export class UrlbarChildController {
|
||||
@@ -630,6 +629,8 @@ export class UrlbarChildController {
|
||||
});
|
||||
}
|
||||
event.preventDefault();
|
||||
@@ -19,3 +19,25 @@ index a8e9d3093d046612650a17970330a8279f55833f..063a3e8adf009d6c0ddc60430bc0e748
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -934,6 +935,10 @@ export class UrlbarChildController {
|
||||
}
|
||||
reuseEmpty = true;
|
||||
}
|
||||
+ if (this.#input.hasAttribute?.("zen-newtab")) {
|
||||
+ where = "tab";
|
||||
+ reuseEmpty = true;
|
||||
+ }
|
||||
// The browser window exists only in chrome; a content-process input has no
|
||||
// tab to reuse, so `gBrowser` is absent and the reuse is skipped.
|
||||
if (
|
||||
@@ -943,6 +948,10 @@ export class UrlbarChildController {
|
||||
) {
|
||||
where = "current";
|
||||
}
|
||||
+ if (this.window.gBrowser?.selectedTab.hasAttribute("zen-empty-tab")) {
|
||||
+ // Always open in a new tab if the current tab is our empty tab.
|
||||
+ return "tab";
|
||||
+ }
|
||||
return where;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs
|
||||
index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a6182579cbaf4d 100644
|
||||
index 319fb6870ec18d87b9f1263bd960edaa39b0447c..1746a052c304e7988447fdb869ad2e36d7d74e8e 100644
|
||||
--- a/browser/components/urlbar/content/UrlbarInput.mjs
|
||||
+++ b/browser/components/urlbar/content/UrlbarInput.mjs
|
||||
@@ -101,6 +101,13 @@ const lazy = XPCOMUtils.declareLazy({
|
||||
@@ -88,6 +88,13 @@ const lazy = XPCOMUtils.declareLazy({
|
||||
logger: () => UrlbarShared.getLogger({ prefix: "Input" }),
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
const UNLIMITED_MAX_RESULTS = 99;
|
||||
|
||||
let getBoundsWithoutFlushing = element =>
|
||||
@@ -769,7 +776,16 @@ ${
|
||||
@@ -771,7 +778,16 @@ ${
|
||||
// See _on_select(). HTMLInputElement.select() dispatches a "select"
|
||||
// event but does not set the primary selection.
|
||||
this._suppressPrimaryAdjustment = true;
|
||||
@@ -33,7 +33,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
this._suppressPrimaryAdjustment = false;
|
||||
}
|
||||
|
||||
@@ -843,6 +859,10 @@ ${
|
||||
@@ -846,6 +862,10 @@ ${
|
||||
hideSearchTerms = false,
|
||||
isSameDocument = false,
|
||||
} = {}) {
|
||||
@@ -44,7 +44,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
if (!this.#isAddressbar) {
|
||||
throw new Error(
|
||||
"Cannot set URI for UrlbarInput that is not an address bar"
|
||||
@@ -1137,7 +1157,16 @@ ${
|
||||
@@ -1143,7 +1163,16 @@ ${
|
||||
this.searchModeSwitcher?.updateSearchIcon();
|
||||
}
|
||||
|
||||
@@ -61,7 +61,17 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1626,7 +1655,11 @@ ${
|
||||
@@ -1255,6 +1284,9 @@ ${
|
||||
where,
|
||||
query: searchString,
|
||||
});
|
||||
+ if (where != "current" && this.sapName != "searchbar") {
|
||||
+ this.handleRevert();
|
||||
+ }
|
||||
this.controller.openSERP(
|
||||
engine.id,
|
||||
searchString,
|
||||
@@ -1726,7 +1758,11 @@ ${
|
||||
openParams.avoidBrowserFocus = keepViewOpen;
|
||||
|
||||
if (!this.#providesSearchMode(result) && !keepViewOpen) {
|
||||
@@ -74,7 +84,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
}
|
||||
|
||||
if (isCanonized) {
|
||||
@@ -2974,6 +3007,42 @@ ${
|
||||
@@ -3016,6 +3052,42 @@ ${
|
||||
await this.#updateLayoutBreakoutDimensions();
|
||||
}
|
||||
|
||||
@@ -117,7 +127,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
startLayoutExtend() {
|
||||
if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
|
||||
// Do not expand if the Urlbar does not support being expanded or it is
|
||||
@@ -2988,6 +3057,13 @@ ${
|
||||
@@ -3030,6 +3102,13 @@ ${
|
||||
this.toggleAttribute("breakout-extend", true);
|
||||
this.#updateTextboxPosition();
|
||||
|
||||
@@ -131,7 +141,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
// Enable the animation only after the first extend call to ensure it
|
||||
// doesn't run when opening a new window.
|
||||
if (!this.hasAttribute("breakout-extend-animate")) {
|
||||
@@ -3011,6 +3087,29 @@ ${
|
||||
@@ -3053,6 +3132,29 @@ ${
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -161,7 +171,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
this.toggleAttribute("breakout-extend", false);
|
||||
this.#updateTextboxPosition();
|
||||
}
|
||||
@@ -3049,7 +3148,7 @@ ${
|
||||
@@ -3091,7 +3193,7 @@ ${
|
||||
forceUnifiedSearchButtonAvailable = false
|
||||
) {
|
||||
let prevState = this.getAttribute("pageproxystate");
|
||||
@@ -170,7 +180,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
this.setAttribute("pageproxystate", state);
|
||||
this._inputContainer.setAttribute("pageproxystate", state);
|
||||
this._identityBox?.setAttribute("pageproxystate", state);
|
||||
@@ -3332,10 +3431,12 @@ ${
|
||||
@@ -3355,10 +3457,12 @@ ${
|
||||
}
|
||||
|
||||
this.style.top = px(
|
||||
@@ -183,7 +193,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3394,9 +3495,10 @@ ${
|
||||
@@ -3417,9 +3521,10 @@ ${
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -193,9 +203,9 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
- px(getBoundsWithoutFlushing(this.parentNode).height)
|
||||
+ px(getBoundsWithoutFlushing(this.parentNode).height + 8)
|
||||
);
|
||||
this.style.setProperty(
|
||||
"--urlbar-height",
|
||||
@@ -3902,6 +4004,7 @@ ${
|
||||
|
||||
if (this.#breakoutBlockerCount) {
|
||||
@@ -3929,6 +4034,7 @@ ${
|
||||
}
|
||||
|
||||
_toggleActionOverride(event) {
|
||||
@@ -203,47 +213,33 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
if (
|
||||
event.keyCode == KeyEvent.DOM_VK_SHIFT ||
|
||||
event.keyCode == KeyEvent.DOM_VK_ALT ||
|
||||
@@ -4014,8 +4117,8 @@ ${
|
||||
@@ -4027,9 +4133,10 @@ ${
|
||||
if (!this.#isAddressbar) {
|
||||
return val;
|
||||
}
|
||||
- let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
|
||||
- let trimmedValue = UrlbarPrefs.get("trimURLs")
|
||||
- ? lazy.BrowserUIUtils.trimURL(val)
|
||||
+ let trimmedValue = lazy.UrlbarPrefs.get("trimURLs") && this._zenTrimURL
|
||||
+ ? this._zenTrimURL(val)
|
||||
: val;
|
||||
- : val;
|
||||
+ let trimmedValue =
|
||||
+ UrlbarPrefs.get("trimURLs") && this._zenTrimURL
|
||||
+ ? this._zenTrimURL(val)
|
||||
+ : val;
|
||||
// Only trim value if the directionality doesn't change to RTL and we're not
|
||||
// showing a strikeout https protocol.
|
||||
@@ -4317,6 +4420,7 @@ ${
|
||||
browser = this.window.gBrowser.selectedBrowser,
|
||||
keepViewOpen = false
|
||||
) {
|
||||
+ openUILinkWhere = this.window.gZenUIManager.getOpenUILinkWhere(url, browser, openUILinkWhere);
|
||||
if (this.#isAddressbar) {
|
||||
this.#prepareAddressbarLoad(
|
||||
url,
|
||||
@@ -4430,6 +4534,10 @@ ${
|
||||
}
|
||||
reuseEmpty = true;
|
||||
}
|
||||
+ if (this.hasAttribute("zen-newtab")) {
|
||||
+ where = "tab";
|
||||
+ reuseEmpty = true;
|
||||
+ }
|
||||
if (
|
||||
where == "tab" &&
|
||||
reuseEmpty &&
|
||||
@@ -4437,6 +4545,9 @@ ${
|
||||
) {
|
||||
where = "current";
|
||||
}
|
||||
+ if (this.window.gBrowser.selectedTab.hasAttribute("zen-empty-tab")) {
|
||||
+ return "tab"; // Always open in a new tab if the current tab is "our empty tab".
|
||||
+ }
|
||||
return where;
|
||||
}
|
||||
|
||||
@@ -4691,6 +4802,7 @@ ${
|
||||
return this.controller.isTextDirectionRTL(trimmedValue) ||
|
||||
@@ -4235,6 +4342,11 @@ ${
|
||||
keepViewOpen = false,
|
||||
browserId = null,
|
||||
}) {
|
||||
+ where = this.window.gZenUIManager.getOpenUILinkWhere(
|
||||
+ url,
|
||||
+ this.window.gBrowser.selectedBrowser,
|
||||
+ where
|
||||
+ );
|
||||
let userTypedValue;
|
||||
if (this.#isAddressbar && where == "current") {
|
||||
// Make sure URL is formatted properly (don't show punycode).
|
||||
@@ -4576,6 +4688,7 @@ ${
|
||||
this.setResultForCurrentValue(null);
|
||||
this.handleCommand();
|
||||
this.controller.clearLastQueryContextCache();
|
||||
@@ -251,7 +247,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
|
||||
this._suppressStartQuery = false;
|
||||
});
|
||||
@@ -4698,7 +4810,6 @@ ${
|
||||
@@ -4583,7 +4696,6 @@ ${
|
||||
contextMenu.addEventListener("popupshowing", () => {
|
||||
// Close the results pane when the input field contextual menu is open,
|
||||
// because paste and go doesn't want a result selection.
|
||||
@@ -259,7 +255,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
|
||||
let controller =
|
||||
this.document.commandDispatcher.getControllerForCommand("cmd_paste");
|
||||
@@ -4979,7 +5090,11 @@ ${
|
||||
@@ -4850,7 +4962,11 @@ ${
|
||||
if (!engineName && !source && !this.hasAttribute("searchmode")) {
|
||||
return;
|
||||
}
|
||||
@@ -272,7 +268,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
if (this._searchModeIndicatorTitle) {
|
||||
this._searchModeIndicatorTitle.textContent = "";
|
||||
this._searchModeIndicatorTitle.removeAttribute("data-l10n-id");
|
||||
@@ -5297,6 +5412,7 @@ ${
|
||||
@@ -5149,6 +5265,7 @@ ${
|
||||
|
||||
this.document.l10n.setAttributes(
|
||||
this.inputField,
|
||||
@@ -280,7 +276,20 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
l10nId,
|
||||
l10nId == "urlbar-placeholder-with-name"
|
||||
? { name: engineName }
|
||||
@@ -5424,6 +5540,11 @@ ${
|
||||
@@ -5199,6 +5316,12 @@ ${
|
||||
}
|
||||
|
||||
lazy.logger.debug("Blur Event");
|
||||
+ if (
|
||||
+ this.document.commandDispatcher.focusedElement == this.inputField &&
|
||||
+ !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
|
||||
@@ -5276,6 +5399,11 @@ ${
|
||||
}
|
||||
|
||||
_on_click(event) {
|
||||
@@ -292,7 +301,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
switch (event.target) {
|
||||
case this.inputField:
|
||||
case this._inputContainer:
|
||||
@@ -5513,10 +5634,11 @@ ${
|
||||
@@ -5371,10 +5499,11 @@ ${
|
||||
}
|
||||
if (untrim) {
|
||||
this.setValue(this._untrimmedValue);
|
||||
@@ -305,7 +314,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
this.view.autoOpen({ event });
|
||||
} else {
|
||||
if (this._untrimOnFocusAfterKeydown) {
|
||||
@@ -5556,9 +5678,16 @@ ${
|
||||
@@ -5414,9 +5543,16 @@ ${
|
||||
}
|
||||
|
||||
_on_mousedown(event) {
|
||||
@@ -323,7 +332,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
if (
|
||||
event.composedTarget != this.inputField &&
|
||||
event.composedTarget != this._inputContainer
|
||||
@@ -5568,6 +5697,10 @@ ${
|
||||
@@ -5426,6 +5562,10 @@ ${
|
||||
|
||||
this.focusedViaMousedown = !this.focused;
|
||||
this.#preventClickSelectsAll = this.focused;
|
||||
@@ -334,7 +343,7 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
|
||||
// Keep the focus status, since the attribute may be changed
|
||||
// upon calling this.focus().
|
||||
@@ -5605,7 +5738,7 @@ ${
|
||||
@@ -5463,7 +5603,7 @@ ${
|
||||
// view open on tab switch, and the TabSelect event arrived earlier.
|
||||
// Also ignore mousedown on the urlbarView context menu: opening/closing the
|
||||
// view is already handled by the result opening flow.
|
||||
@@ -343,12 +352,12 @@ index e7e9495e56076cd112beafb8297dece4ae4cea58..330104d245ddd0956b95377082a61825
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5894,7 +6027,7 @@ ${
|
||||
@@ -5754,7 +5894,7 @@ ${
|
||||
// When we are in actions search mode we can show more results so
|
||||
// increase the limit.
|
||||
let maxResults =
|
||||
- this.searchMode?.source != UrlbarShared.RESULT_SOURCE.ACTIONS
|
||||
+ this.searchMode?.source != UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS
|
||||
? lazy.UrlbarPrefs.get("maxRichResults")
|
||||
? UrlbarPrefs.get("maxRichResults")
|
||||
: UNLIMITED_MAX_RESULTS;
|
||||
let options = {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/content/UrlbarShared.mjs b/browser/components/urlbar/content/UrlbarShared.mjs
|
||||
index 5b45afb747bfcdbd06782186737669aa2c4c634d..f68bd009f70415b5fb513abdfe19b4427ceefbfc 100644
|
||||
index 4e67dad66ae006842abc6eed547e4a244320d57a..393b61b4d2543c73e60afd334a353f36119ae73e 100644
|
||||
--- a/browser/components/urlbar/content/UrlbarShared.mjs
|
||||
+++ b/browser/components/urlbar/content/UrlbarShared.mjs
|
||||
@@ -47,6 +47,7 @@ export const UrlbarShared = {
|
||||
@@ -100,6 +100,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,
|
||||
@@ -10,7 +10,7 @@ index 5b45afb747bfcdbd06782186737669aa2c4c634d..f68bd009f70415b5fb513abdfe19b442
|
||||
}),
|
||||
|
||||
/**
|
||||
@@ -67,6 +68,7 @@ export const UrlbarShared = {
|
||||
@@ -120,6 +121,7 @@ export const UrlbarShared = {
|
||||
TITLE: "#",
|
||||
URL: "$",
|
||||
ACTION: ">",
|
||||
@@ -18,7 +18,7 @@ index 5b45afb747bfcdbd06782186737669aa2c4c634d..f68bd009f70415b5fb513abdfe19b442
|
||||
}),
|
||||
|
||||
// Defines UrlbarResult types.
|
||||
@@ -112,6 +114,8 @@ export const UrlbarShared = {
|
||||
@@ -165,6 +167,8 @@ export const UrlbarShared = {
|
||||
OTHER_NETWORK: 6,
|
||||
ADDON: 7,
|
||||
ACTIONS: 8,
|
||||
@@ -26,9 +26,33 @@ index 5b45afb747bfcdbd06782186737669aa2c4c634d..f68bd009f70415b5fb513abdfe19b442
|
||||
+ WORKSPACES: 10,
|
||||
}),
|
||||
|
||||
/**
|
||||
@@ -128,6 +132,7 @@ export const UrlbarShared = {
|
||||
if (lazy.UrlbarPrefs.get("scotchBonnet.enableOverride")) {
|
||||
// Results are categorized into groups to help the muxer compose them. See
|
||||
@@ -200,6 +204,8 @@ export const UrlbarShared = {
|
||||
SEMANTIC_HISTORY: "semanticHistory",
|
||||
SUGGESTED_INDEX: "suggestedIndex",
|
||||
TAIL_SUGGESTION: "tailSuggestion",
|
||||
+ ZEN_ACTION: "zenAction",
|
||||
+ ZEN_WORKSPACE: "zenWorkspace",
|
||||
}),
|
||||
|
||||
// Defines provider types.
|
||||
@@ -385,6 +391,14 @@ export const UrlbarShared = {
|
||||
telemetryLabel: "actions",
|
||||
uiLabel: "urlbar-searchmode-actions3",
|
||||
},
|
||||
+ {
|
||||
+ source: this.RESULT_SOURCE.WORKSPACES,
|
||||
+ restrict: this.RESTRICT_TOKENS.WORKSPACE,
|
||||
+ icon: "chrome://browser/skin/zen-icons/selectable/layers.svg",
|
||||
+ pref: "shortcuts.workspaces",
|
||||
+ telemetryLabel: "workspaces",
|
||||
+ uiLabel: "urlbar-search-mode-workspaces",
|
||||
+ },
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -402,6 +416,7 @@ export const UrlbarShared = {
|
||||
if (UrlbarPrefs.get("scotchBonnet.enableOverride")) {
|
||||
keys.push(this.RESTRICT_TOKENS.ACTION);
|
||||
}
|
||||
+ keys.push(this.RESTRICT_TOKENS.WORKSPACE);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/urlbar/content/UrlbarView.mjs b/browser/components/urlbar/content/UrlbarView.mjs
|
||||
index 8afb2bf4a757b3ef7902f5a6e6eed6b70ca2845e..440dea1e66540ca1998cb7464b6695ac823fedcb 100644
|
||||
index 9a2c787cfa4d70bd587d49e017075f905c90f626..1c3b341e5d520ec9541c4021aaedce98751b6993 100644
|
||||
--- a/browser/components/urlbar/content/UrlbarView.mjs
|
||||
+++ b/browser/components/urlbar/content/UrlbarView.mjs
|
||||
@@ -674,7 +674,7 @@ export class UrlbarView {
|
||||
@@ -822,7 +822,7 @@ export class UrlbarView {
|
||||
!this.input.value ||
|
||||
this.input.getAttribute("pageproxystate") == "valid"
|
||||
) {
|
||||
@@ -11,7 +11,7 @@ index 8afb2bf4a757b3ef7902f5a6e6eed6b70ca2845e..440dea1e66540ca1998cb7464b6695ac
|
||||
// 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
|
||||
// when the view opens that can be perceived as flicker.
|
||||
@@ -812,10 +812,6 @@ export class UrlbarView {
|
||||
@@ -963,10 +963,6 @@ export class UrlbarView {
|
||||
}
|
||||
|
||||
// If search mode isn't active, close the view.
|
||||
@@ -22,7 +22,7 @@ index 8afb2bf4a757b3ef7902f5a6e6eed6b70ca2845e..440dea1e66540ca1998cb7464b6695ac
|
||||
|
||||
// Search mode is active. If the one-offs should be shown, make sure they
|
||||
// are enabled and show the view.
|
||||
@@ -3031,6 +3027,8 @@ export class UrlbarView {
|
||||
@@ -3306,6 +3302,8 @@ export class UrlbarView {
|
||||
if (row?.hasAttribute("row-selectable")) {
|
||||
row?.toggleAttribute("selected", true);
|
||||
}
|
||||
@@ -31,7 +31,7 @@ index 8afb2bf4a757b3ef7902f5a6e6eed6b70ca2845e..440dea1e66540ca1998cb7464b6695ac
|
||||
if (element != row) {
|
||||
row?.toggleAttribute("descendant-selected", true);
|
||||
}
|
||||
@@ -3544,7 +3542,7 @@ export class UrlbarView {
|
||||
@@ -3972,7 +3970,7 @@ export class UrlbarView {
|
||||
}
|
||||
|
||||
#enableOrDisableRowWrap() {
|
||||
@@ -40,3 +40,16 @@ index 8afb2bf4a757b3ef7902f5a6e6eed6b70ca2845e..440dea1e66540ca1998cb7464b6695ac
|
||||
this.#rows.toggleAttribute("wrap", wrap);
|
||||
this.oneOffSearchButtons?.container.toggleAttribute("wrap", wrap);
|
||||
}
|
||||
@@ -4387,6 +4385,12 @@ export class UrlbarView {
|
||||
}
|
||||
|
||||
on_blur() {
|
||||
+ if (
|
||||
+ this.document.commandDispatcher.focusedElement == this.input.inputField &&
|
||||
+ !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.
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
|
||||
index 4562efc05b76d5dddd35bda79bd7d5d98a51ffc9..ad9b6f55f5e77065ce74535daf6457a5c4b44058 100644
|
||||
--- a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
|
||||
+++ b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
|
||||
@@ -355,7 +355,7 @@ export class AboutPreferences {
|
||||
// Firefox 155+ registers `homepage` and `customHomepage` in
|
||||
// components/preferences. They can't be registered twice, so skip them
|
||||
// on 155+. Drop this condition once 155 reaches Release.
|
||||
- if (Services.vc.compare(AppConstants.MOZ_APP_VERSION, "155.0a1") < 0) {
|
||||
+ if (false) {
|
||||
groups.homepage = this._setupHomepageGroup(window);
|
||||
groups.customHomepage = this._setupCustomHomepageGroup(window);
|
||||
}
|
||||
124
src/browser/installer/windows/nsis/shared-nsh.patch
Normal file
124
src/browser/installer/windows/nsis/shared-nsh.patch
Normal file
@@ -0,0 +1,124 @@
|
||||
diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh
|
||||
index b81c7ef59be0d25f67668215028008a451860df2..fa0ab8947e011289d25158cab17ff9388b5cab0d 100755
|
||||
--- a/browser/installer/windows/nsis/shared.nsh
|
||||
+++ b/browser/installer/windows/nsis/shared.nsh
|
||||
@@ -873,50 +873,87 @@ FunctionEnd
|
||||
!ifdef MOZ_MAINTENANCE_SERVICE
|
||||
; Adds maintenance service certificate keys for the install dir.
|
||||
; For the cert to work, it must also be signed by a trusted cert for the user.
|
||||
+; Writes this application's allowed certificate values into _KEY, which must be
|
||||
+; a maintenance service registry path such as the one returned by
|
||||
+; ServicesHelper::PathToUniqueRegistryPath.
|
||||
+!macro AddMaintCertKeyValues _KEY
|
||||
+ ; PrefetchProcessName was originally used to experiment with deleting
|
||||
+ ; Windows prefetch as a speed optimization. It is no longer used though.
|
||||
+ DeleteRegValue HKLM "${_KEY}" "prefetchProcessName"
|
||||
+
|
||||
+ ; Setting the Attempted value will ensure that a new Maintenance Service
|
||||
+ ; install will never be attempted again after this from updates. The value
|
||||
+ ; is used only to see if updates should attempt new service installs.
|
||||
+ WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
|
||||
+
|
||||
+ ; More than one certificate can be specified in a different subfolder
|
||||
+ ; for example: ${_KEY}\1, but each individual binary can be signed
|
||||
+ ; with at most one certificate. A fallback certificate can only be used
|
||||
+ ; if the binary is replaced with a different certificate.
|
||||
+ WriteRegStr HKLM "${_KEY}\0" "name" "${CERTIFICATE_NAME}"
|
||||
+ WriteRegStr HKLM "${_KEY}\0" "issuer" "${CERTIFICATE_ISSUER}"
|
||||
+ ; These values associate the allowed certificates for the previous
|
||||
+ ; installation, so that we can update from it cleanly using the
|
||||
+ ; old updater.exe (which will still have this signature).
|
||||
+ WriteRegStr HKLM "${_KEY}\1" "name" "${CERTIFICATE_NAME_PREVIOUS}"
|
||||
+ WriteRegStr HKLM "${_KEY}\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}"
|
||||
+ ClearErrors
|
||||
+!macroend
|
||||
+
|
||||
!macro AddMaintCertKeys
|
||||
Push $R0
|
||||
; Allow main Mozilla cert information for updates
|
||||
; This call will push the needed key on the stack
|
||||
ServicesHelper::PathToUniqueRegistryPath "$INSTDIR"
|
||||
Pop $R0
|
||||
+ Push $R1
|
||||
+ Push $R2
|
||||
+ Push $R3
|
||||
+ ; We always use the 64bit registry for certs.
|
||||
+ ${If} ${RunningX64}
|
||||
+ ${OrIf} ${IsNativeARM64}
|
||||
+ SetRegView 64
|
||||
+ ${EndIf}
|
||||
+
|
||||
${If} $R0 != ""
|
||||
- ; More than one certificate can be specified in a different subfolder
|
||||
- ; for example: $R0\1, but each individual binary can be signed
|
||||
- ; with at most one certificate. A fallback certificate can only be used
|
||||
- ; if the binary is replaced with a different certificate.
|
||||
- ; We always use the 64bit registry for certs.
|
||||
- ${If} ${RunningX64}
|
||||
- ${OrIf} ${IsNativeARM64}
|
||||
- SetRegView 64
|
||||
- ${EndIf}
|
||||
+ !insertmacro AddMaintCertKeyValues "$R0"
|
||||
+ ${Else}
|
||||
+ ; ServicesHelper could not be loaded. This happens when PostUpdate is run
|
||||
+ ; by the updater, which launches it with an environment too minimal for
|
||||
+ ; NSIS to load its plugins, leaving the unique registry path uncomputable.
|
||||
+ ; Fall back to refreshing every key that already records one of our own
|
||||
+ ; certificate names, so that any installation of this application is kept
|
||||
+ ; current rather than only the first one found. Keys belonging to other
|
||||
+ ; applications record a different name and are left alone.
|
||||
+ StrCpy $R1 0
|
||||
+ ${Do}
|
||||
+ EnumRegKey $R2 HKLM "Software\Mozilla\MaintenanceService" $R1
|
||||
+ ${If} $R2 == ""
|
||||
+ ${ExitDo}
|
||||
+ ${EndIf}
|
||||
+ ReadRegStr $R3 HKLM "Software\Mozilla\MaintenanceService\$R2\0" "name"
|
||||
+ ${If} $R3 == "${CERTIFICATE_NAME}"
|
||||
+ ${OrIf} $R3 == "${CERTIFICATE_NAME_PREVIOUS}"
|
||||
+ StrCpy $R0 "Software\Mozilla\MaintenanceService\$R2"
|
||||
+ !insertmacro AddMaintCertKeyValues "$R0"
|
||||
+ ${EndIf}
|
||||
+ IntOp $R1 $R1 + 1
|
||||
+ ${Loop}
|
||||
+ StrCpy $R0 ""
|
||||
+ ${EndIf}
|
||||
|
||||
- ; PrefetchProcessName was originally used to experiment with deleting
|
||||
- ; Windows prefetch as a speed optimization. It is no longer used though.
|
||||
- DeleteRegValue HKLM "$R0" "prefetchProcessName"
|
||||
-
|
||||
- ; Setting the Attempted value will ensure that a new Maintenance Service
|
||||
- ; install will never be attempted again after this from updates. The value
|
||||
- ; is used only to see if updates should attempt new service installs.
|
||||
- WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
|
||||
-
|
||||
- ; These values associate the allowed certificates for the current
|
||||
- ; installation.
|
||||
- WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}"
|
||||
- WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}"
|
||||
- ; These values associate the allowed certificates for the previous
|
||||
- ; installation, so that we can update from it cleanly using the
|
||||
- ; old updater.exe (which will still have this signature).
|
||||
- WriteRegStr HKLM "$R0\1" "name" "${CERTIFICATE_NAME_PREVIOUS}"
|
||||
- WriteRegStr HKLM "$R0\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}"
|
||||
- ${If} ${RunningX64}
|
||||
- ${OrIf} ${IsNativeARM64}
|
||||
- SetRegView lastused
|
||||
- ${EndIf}
|
||||
- ClearErrors
|
||||
+ ${If} ${RunningX64}
|
||||
+ ${OrIf} ${IsNativeARM64}
|
||||
+ SetRegView lastused
|
||||
${EndIf}
|
||||
+
|
||||
+ Pop $R3
|
||||
+ Pop $R2
|
||||
+ Pop $R1
|
||||
; Restore the previously used value back
|
||||
Pop $R0
|
||||
!macroend
|
||||
+
|
||||
!define AddMaintCertKeys "!insertmacro AddMaintCertKeys"
|
||||
!endif
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
index becbb0f70c84eb7f2d9bff5a3aedcbb7a78a61cf..05835d2088ab631316a25a9f0728898bd7998d8d
|
||||
index becbb0f70c84eb7f2d9bff5a3aedcbb7a78a61cf..a23a8a1b160932368377fc841b501df9355918db
|
||||
--- a/browser/installer/windows/nsis/uninstaller.nsi
|
||||
+++ b/browser/installer/windows/nsis/uninstaller.nsi
|
||||
@@ -150,7 +150,7 @@ OutFile "helper.exe"
|
||||
!endif
|
||||
ShowUnInstDetails nevershow
|
||||
|
||||
-!define URLUninstallSurvey "https://qsurvey.mozilla.com/s3/FF-Desktop-Post-Uninstall?channel=${UpdateChannel}&version=${AppVersion}&osversion="
|
||||
+!define URLUninstallSurvey "https://links.zen-browser.app/uninstall-feedback?osversion="
|
||||
|
||||
; Support for the profile refresh feature
|
||||
!define URLProfileRefreshHelp "https://support.mozilla.org/kb/refresh-firefox-reset-add-ons-and-settings"
|
||||
@@ -516,6 +516,7 @@ Section "Uninstall"
|
||||
${un.RegCleanFileHandler} ".svg" "FirefoxHTML-$AppUserModelID"
|
||||
${un.RegCleanFileHandler} ".webp" "FirefoxHTML-$AppUserModelID"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
|
||||
index e735ec80b56e1a2da4bc5bec29136ce60353277b..330ea62d220d9acd96a95a605888839388e97452 100644
|
||||
index f276db1d456703493ee713370691352985021708..619ee6724eec1e6a25adcb257af0d02eb7a29d34 100644
|
||||
--- a/browser/themes/linux/browser.css
|
||||
+++ b/browser/themes/linux/browser.css
|
||||
@@ -14,7 +14,6 @@
|
||||
@media (-moz-gtk-theme-family) {
|
||||
--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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ html|dialog {
|
||||
}
|
||||
|
||||
groupbox button {
|
||||
border-radius: 5px !important;
|
||||
border-radius: calc(5px * var(--zen-squircle-value)) !important;
|
||||
}
|
||||
|
||||
groupbox button,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css
|
||||
index 3acdec2b8e043fe27919cfa54e73f4d3c491bfc8..267a1087134464a8193a824a2d7f8ac15ff8ad60 100644
|
||||
index 2374ed38bd9361d6c7e1886117099c6761e403b8..72f1f52a13096f19ca4009037ad0cdc880775ff7 100644
|
||||
--- a/browser/themes/shared/tabbrowser/content-area.css
|
||||
+++ b/browser/themes/shared/tabbrowser/content-area.css
|
||||
@@ -157,7 +157,6 @@
|
||||
min-height: 0;
|
||||
@@ -239,7 +239,6 @@
|
||||
min-width: 0;
|
||||
|
||||
/* We want to be able to show the frame color behind the clipped radiused corner */
|
||||
- background: var(--tabpanel-background-color);
|
||||
|
||||
@media -moz-pref("sidebar.revamp") {
|
||||
outline: 0.01px solid var(--chrome-content-separator-color);
|
||||
@@ -216,7 +215,6 @@
|
||||
display: grid;
|
||||
/**
|
||||
@@ -425,7 +424,6 @@
|
||||
}
|
||||
|
||||
browser:is([blank], [pendingpaint]) {
|
||||
@@ -18,7 +18,7 @@ index 3acdec2b8e043fe27919cfa54e73f4d3c491bfc8..267a1087134464a8193a824a2d7f8ac1
|
||||
}
|
||||
|
||||
/* Exclude browsers with smartwindow-content attribute which inherit
|
||||
@@ -553,7 +551,7 @@ split-view-footer {
|
||||
@@ -865,7 +863,7 @@ split-view-footer {
|
||||
|
||||
.dialogStack {
|
||||
z-index: var(--browser-stack-z-index-dialog-stack);
|
||||
@@ -27,12 +27,12 @@ index 3acdec2b8e043fe27919cfa54e73f4d3c491bfc8..267a1087134464a8193a824a2d7f8ac1
|
||||
inset: 0;
|
||||
/* --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 */
|
||||
@@ -718,7 +716,7 @@ split-view-footer {
|
||||
@@ -1034,7 +1032,7 @@ split-view-footer {
|
||||
|
||||
.dialogOverlay[topmost="true"],
|
||||
#window-modal-dialog::backdrop {
|
||||
- background-color: var(--background-color-overlay);
|
||||
+ background-color: light-dark(rgba(255, 255, 255, .3), rgba(0, 0, 0, .3));
|
||||
}
|
||||
border-radius: var(--chrome-block-radius);
|
||||
|
||||
.dialogOverlay[hideContent="true"][topmost="true"] {
|
||||
.browserSidebarContainer.responsive-mode & {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
|
||||
index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f253804576e 100644
|
||||
index 61c0b8382c78f63ad9113af55a6236c4a29bc45b..0ab463c768d4fb3f45d22e753f408c46b61c0480 100644
|
||||
--- a/browser/themes/shared/tabbrowser/tabs.css
|
||||
+++ b/browser/themes/shared/tabbrowser/tabs.css
|
||||
@@ -45,7 +45,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
--tab-group-line-thickness: 2px;
|
||||
--tab-group-line-toolbar-border-distance: 1px;
|
||||
/* Collapsed tabs should be square, so set width to match the min height */
|
||||
- --tab-collapsed-background-width: var(--tab-min-height);
|
||||
+ --tab-collapsed-background-width: 48px;
|
||||
--tab-collapsed-width: calc(var(--tab-collapsed-background-width) + 2 * var(--tab-inner-inline-margin));
|
||||
--tab-collapsed-split-pill-offset: 0px;
|
||||
--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);
|
||||
@@ -295,7 +295,6 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -308,7 +308,6 @@ tab-split-view-wrapper[dragtarget] {
|
||||
}
|
||||
|
||||
:root:not([uidensity="compact"], [sidebar-expand-on-hover]) &[pinned] {
|
||||
@@ -19,7 +19,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
}
|
||||
|
||||
&:is([selected], [multiselected]) {
|
||||
@@ -309,6 +308,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -322,6 +321,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
border-radius: inherit;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
@@ -27,7 +27,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
@@ -506,10 +506,6 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -519,10 +519,6 @@ tab-split-view-wrapper[dragtarget] {
|
||||
|
||||
@media -moz-pref("browser.tabs.fadeOutUnloadedTabs") {
|
||||
&[pending] {
|
||||
@@ -38,7 +38,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
opacity: 0.5;
|
||||
/* Fade the favicon out */
|
||||
transition-property: filter, opacity;
|
||||
@@ -525,10 +521,6 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -538,10 +534,6 @@ tab-split-view-wrapper[dragtarget] {
|
||||
|
||||
@media -moz-pref("browser.tabs.fadeOutExplicitlyUnloadedTabs") {
|
||||
&[pending][discarded] {
|
||||
@@ -49,7 +49,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
opacity: 0.5;
|
||||
/* Fade the favicon out */
|
||||
transition-property: filter, opacity;
|
||||
@@ -602,7 +594,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -615,7 +607,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[orient="vertical"] & {
|
||||
@@ -58,7 +58,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
}
|
||||
|
||||
&[crashed] {
|
||||
@@ -610,7 +602,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -623,7 +615,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[orient="vertical"]:not([expanded]) &:not([crashed]),
|
||||
@@ -67,7 +67,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
&[soundplaying] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg");
|
||||
}
|
||||
@@ -664,7 +656,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -677,7 +669,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
&[crashed] {
|
||||
display: revert;
|
||||
}
|
||||
@@ -824,7 +816,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -837,7 +829,7 @@ tab-split-view-wrapper[dragtarget] {
|
||||
has not been added to root. There are certain scenarios when that attribute is temporarily
|
||||
removed from root such as when toggling the sidebar to expand with the toolbar button. */
|
||||
#tabbrowser-tabs[orient="horizontal"] &:not([pinned]):not([crashed]),
|
||||
@@ -85,7 +85,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
&:is([soundplaying], [muted], [activemedia-blocked]) {
|
||||
display: flex;
|
||||
}
|
||||
@@ -1044,7 +1036,6 @@ tab-split-view-wrapper[dragtarget] {
|
||||
@@ -1151,7 +1143,6 @@ tab-split-view-wrapper[dragtarget] {
|
||||
.tabbrowser-tab:is([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected]),
|
||||
.tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([selected]),
|
||||
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab > .tab-stack > .tab-content[titlechanged]:not([selected]) {
|
||||
@@ -93,7 +93,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
background-position: center bottom 6.5px;
|
||||
background-size: 4px 4px;
|
||||
background-repeat: no-repeat;
|
||||
@@ -1797,7 +1788,7 @@ tab-group {
|
||||
@@ -1904,7 +1895,7 @@ tab-group {
|
||||
}
|
||||
|
||||
#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]) {
|
||||
margin-inline-start: var(--space-medium);
|
||||
}
|
||||
@@ -2351,7 +2342,7 @@ tab-group {
|
||||
@@ -2504,7 +2495,7 @@ tab-group {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,8 +111,8 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
#vertical-tabs-newtab-button {
|
||||
appearance: none;
|
||||
min-height: var(--tab-min-height);
|
||||
@@ -2362,7 +2353,7 @@ tab-group {
|
||||
margin-inline: var(--tab-inner-inline-margin);
|
||||
@@ -2524,7 +2515,7 @@ tab-group {
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
|
||||
- display: none;
|
||||
@@ -120,7 +120,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@@ -2386,7 +2377,7 @@ tab-group {
|
||||
@@ -2548,7 +2539,7 @@ tab-group {
|
||||
* flex container. #tabs-newtab-button is a child of the arrowscrollbox where
|
||||
* we don't want a gap (between tabs), so we have to add some margin.
|
||||
*/
|
||||
@@ -129,7 +129,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
margin-block: var(--tab-margin-block);
|
||||
}
|
||||
|
||||
@@ -2576,7 +2567,6 @@ tab-group {
|
||||
@@ -2740,7 +2731,6 @@ tab-group {
|
||||
|
||||
&:not([expanded]) {
|
||||
.tabbrowser-tab[pinned] {
|
||||
@@ -137,7 +137,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
}
|
||||
|
||||
.tab-background {
|
||||
@@ -2615,8 +2605,8 @@ tab-group {
|
||||
@@ -2779,8 +2769,8 @@ tab-group {
|
||||
display: block;
|
||||
position: absolute;
|
||||
inset: auto;
|
||||
@@ -148,7 +148,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
|
||||
&:-moz-window-inactive {
|
||||
background-image:
|
||||
@@ -2714,9 +2704,6 @@ tab-group {
|
||||
@@ -2878,9 +2868,6 @@ tab-group {
|
||||
~ #tabbrowser-tabs[orient="horizontal"]::before {
|
||||
display: flex;
|
||||
content: "";
|
||||
@@ -158,7 +158,7 @@ index 0820fa040642ee05c2a24f5d2cfa58da5c926647..2d93abcce1729744e5963f1c6ad47f25
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2749,7 +2736,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
|
||||
@@ -2913,7 +2900,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
|
||||
list-style-image: url(chrome://global/skin/icons/plus.svg);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
diff --git a/browser/themes/shared/urlbar-searchbar.css b/browser/themes/shared/urlbar-searchbar.css
|
||||
index 22d624d718a289dd7b84ffc2f04dd35893dfbe95..4f57f7853f3043e3ad01d893aa928b9d2e6f3c16 100644
|
||||
index 149f123e26cd79e89432dfeb504ca7218ee04810..7e0e6d981d6c2aa53bc2a76d82d2078419659065 100644
|
||||
--- a/browser/themes/shared/urlbar-searchbar.css
|
||||
+++ b/browser/themes/shared/urlbar-searchbar.css
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
@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-basic-component-size: calc(var(--urlbar-height) - 2 * (var(--urlbar-input-container-border-width) + var(--urlbar-input-container-padding)));
|
||||
- --urlbar-icon-padding: calc((var(--urlbar-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-icon-padding: calc((var(--urlbar-height) - 2px /* border */ - 14px /* icon */) / 2);
|
||||
+ --urlbar-input-container-padding: 2px;
|
||||
}
|
||||
@media (max-width: 770px) {
|
||||
--urlbar-container-min-width: 240px;
|
||||
@@ -126,7 +126,7 @@ toolbar[inactive="true"] .urlbar,
|
||||
@@ -127,7 +127,7 @@ toolbar[inactive="true"] .urlbar,
|
||||
.urlbar:not([usertyping]) > .urlbar-input-container > .urlbar-go-button,
|
||||
.urlbar:not(#searchbar-new, [focused]) > .urlbar-input-container > .urlbar-go-button,
|
||||
#urlbar-revert-button-container {
|
||||
@@ -22,7 +22,7 @@ index 22d624d718a289dd7b84ffc2f04dd35893dfbe95..4f57f7853f3043e3ad01d893aa928b9d
|
||||
}
|
||||
|
||||
/* Document Picture-in-Picture API window */
|
||||
@@ -403,6 +403,10 @@ toolbar[inactive="true"] .urlbar,
|
||||
@@ -405,6 +405,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));
|
||||
}
|
||||
@@ -33,16 +33,18 @@ index 22d624d718a289dd7b84ffc2f04dd35893dfbe95..4f57f7853f3043e3ad01d893aa928b9d
|
||||
}
|
||||
|
||||
#urlbar-scheme {
|
||||
@@ -492,10 +496,14 @@ toolbar[inactive="true"] .urlbar,
|
||||
@@ -476,10 +480,15 @@ toolbar[inactive="true"] .urlbar,
|
||||
}
|
||||
|
||||
.urlbar[breakout][breakout-extend] {
|
||||
height: auto;
|
||||
- margin-left: calc(-1 * var(--urlbar-margin-inline));
|
||||
+ align-items: center;
|
||||
+ :root:not([zen-single-toolbar='true']) & {
|
||||
margin-left: calc(-1 * var(--urlbar-margin-inline));
|
||||
+ }
|
||||
width: calc(var(--urlbar-width) + 2 * var(--urlbar-margin-inline));
|
||||
|
||||
+ :root:not([zen-single-toolbar="true"]) & {
|
||||
+ margin-left: calc(-1 * var(--urlbar-margin-inline));
|
||||
+ }
|
||||
+
|
||||
> .urlbar-input-container {
|
||||
+ align-items: center;
|
||||
height: var(--urlbar-container-height);
|
||||
|
||||
@@ -435,10 +435,6 @@
|
||||
list-style-image: url("arrow-left.svg") !important;
|
||||
}
|
||||
|
||||
#appmenu-moreTools-button {
|
||||
list-style-image: url("customize.svg") !important;
|
||||
}
|
||||
|
||||
#zen-copy-current-url-button,
|
||||
#share-tab-button,
|
||||
#zen-site-data-header-share {
|
||||
@@ -812,7 +808,8 @@
|
||||
|
||||
#toolbar-context-toggle-vertical-tabs,
|
||||
#toolbar-context-customize-sidebar,
|
||||
#sidebarRevampSeparator {
|
||||
#sidebarRevampSeparator,
|
||||
.fxa-menu-sign-in-promo-image {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@@ -879,7 +876,7 @@
|
||||
border-radius: var(--tab-border-radius);
|
||||
|
||||
&:hover {
|
||||
background: var(--toolbarbutton-hover-background);
|
||||
background: var(--toolbarbutton-background-color-hover);
|
||||
}
|
||||
|
||||
& image {
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* skin/classic/browser/zen-icons/autoplay-media-fill.svg (../shared/zen-icons/nucleo/autoplay-media-fill.svg)
|
||||
* skin/classic/browser/zen-icons/autoplay-media.svg (../shared/zen-icons/nucleo/autoplay-media.svg)
|
||||
* skin/classic/browser/zen-icons/back.svg (../shared/zen-icons/nucleo/back.svg)
|
||||
* skin/classic/browser/zen-icons/blocked-element.svg (../shared/zen-icons/nucleo/blocked-element.svg)
|
||||
* skin/classic/browser/zen-icons/block.svg (../shared/zen-icons/nucleo/block.svg)
|
||||
* skin/classic/browser/zen-icons/blocked-element.svg (../shared/zen-icons/nucleo/blocked-element.svg)
|
||||
* skin/classic/browser/zen-icons/bolt.svg (../shared/zen-icons/nucleo/bolt.svg)
|
||||
* skin/classic/browser/zen-icons/bookmark-hollow.svg (../shared/zen-icons/nucleo/bookmark-hollow.svg)
|
||||
* skin/classic/browser/zen-icons/bookmark-star-on-tray.svg (../shared/zen-icons/nucleo/bookmark-star-on-tray.svg)
|
||||
@@ -104,26 +104,27 @@
|
||||
* skin/classic/browser/zen-icons/popup-fill.svg (../shared/zen-icons/nucleo/popup-fill.svg)
|
||||
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/nucleo/popup.svg)
|
||||
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/nucleo/print.svg)
|
||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/nucleo/privateBrowsing.svg)
|
||||
* skin/classic/browser/zen-icons/private-window-small.svg (../shared/zen-icons/nucleo/private-window-small.svg)
|
||||
* skin/classic/browser/zen-icons/private-window.svg (../shared/zen-icons/nucleo/private-window.svg)
|
||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/nucleo/privateBrowsing.svg)
|
||||
* skin/classic/browser/zen-icons/reader-mode.svg (../shared/zen-icons/nucleo/reader-mode.svg)
|
||||
* skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/nucleo/reload.svg)
|
||||
* skin/classic/browser/zen-icons/save.svg (../shared/zen-icons/nucleo/save.svg)
|
||||
* skin/classic/browser/zen-icons/screen-blocked.svg (../shared/zen-icons/nucleo/screen-blocked.svg)
|
||||
* skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/nucleo/screenshot.svg)
|
||||
* skin/classic/browser/zen-icons/screen.svg (../shared/zen-icons/nucleo/screen.svg)
|
||||
* skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/nucleo/screenshot.svg)
|
||||
* skin/classic/browser/zen-icons/search-glass.svg (../shared/zen-icons/nucleo/search-glass.svg)
|
||||
* skin/classic/browser/zen-icons/search-page.svg (../shared/zen-icons/nucleo/search-page.svg)
|
||||
* skin/classic/browser/zen-icons/security-broken.svg (../shared/zen-icons/nucleo/security-broken.svg)
|
||||
* skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/nucleo/security.svg)
|
||||
* skin/classic/browser/zen-icons/security-warning.svg (../shared/zen-icons/nucleo/security-warning.svg)
|
||||
* skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/nucleo/security.svg)
|
||||
* skin/classic/browser/zen-icons/send-to-device.svg (../shared/zen-icons/nucleo/send-to-device.svg)
|
||||
* skin/classic/browser/zen-icons/settings-fill.svg (../shared/zen-icons/nucleo/settings-fill.svg)
|
||||
* skin/classic/browser/zen-icons/settings.svg (../shared/zen-icons/nucleo/settings.svg)
|
||||
* skin/classic/browser/zen-icons/share.svg (../shared/zen-icons/nucleo/share.svg)
|
||||
* skin/classic/browser/zen-icons/sidebar-right.svg (../shared/zen-icons/nucleo/sidebar-right.svg)
|
||||
* skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/nucleo/sidebars-right.svg)
|
||||
* skin/classic/browser/zen-icons/sidebar.svg (../shared/zen-icons/nucleo/sidebar.svg)
|
||||
* skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/nucleo/sidebars-right.svg)
|
||||
* skin/classic/browser/zen-icons/sliders.svg (../shared/zen-icons/nucleo/sliders.svg)
|
||||
* skin/classic/browser/zen-icons/sparkles.svg (../shared/zen-icons/nucleo/sparkles.svg)
|
||||
* skin/classic/browser/zen-icons/spell-check.svg (../shared/zen-icons/nucleo/spell-check.svg)
|
||||
@@ -164,8 +165,8 @@
|
||||
* skin/classic/browser/zen-icons/autoplay-media-fill.svg (../shared/zen-icons/nucleo/autoplay-media-fill.svg)
|
||||
* skin/classic/browser/zen-icons/autoplay-media.svg (../shared/zen-icons/nucleo/autoplay-media.svg)
|
||||
* skin/classic/browser/zen-icons/back.svg (../shared/zen-icons/nucleo/back.svg)
|
||||
* skin/classic/browser/zen-icons/blocked-element.svg (../shared/zen-icons/nucleo/blocked-element.svg)
|
||||
* skin/classic/browser/zen-icons/block.svg (../shared/zen-icons/nucleo/block.svg)
|
||||
* skin/classic/browser/zen-icons/blocked-element.svg (../shared/zen-icons/nucleo/blocked-element.svg)
|
||||
* skin/classic/browser/zen-icons/bolt.svg (../shared/zen-icons/nucleo/bolt.svg)
|
||||
* skin/classic/browser/zen-icons/bookmark-hollow.svg (../shared/zen-icons/nucleo/bookmark-hollow.svg)
|
||||
* skin/classic/browser/zen-icons/bookmark-star-on-tray.svg (../shared/zen-icons/nucleo/bookmark-star-on-tray.svg)
|
||||
@@ -254,26 +255,27 @@
|
||||
* skin/classic/browser/zen-icons/popup-fill.svg (../shared/zen-icons/nucleo/popup-fill.svg)
|
||||
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/nucleo/popup.svg)
|
||||
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/nucleo/print.svg)
|
||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/nucleo/privateBrowsing.svg)
|
||||
* skin/classic/browser/zen-icons/private-window-small.svg (../shared/zen-icons/nucleo/private-window-small.svg)
|
||||
* skin/classic/browser/zen-icons/private-window.svg (../shared/zen-icons/nucleo/private-window.svg)
|
||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/nucleo/privateBrowsing.svg)
|
||||
* skin/classic/browser/zen-icons/reader-mode.svg (../shared/zen-icons/nucleo/reader-mode.svg)
|
||||
* skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/nucleo/reload.svg)
|
||||
* skin/classic/browser/zen-icons/save.svg (../shared/zen-icons/nucleo/save.svg)
|
||||
* skin/classic/browser/zen-icons/screen-blocked.svg (../shared/zen-icons/nucleo/screen-blocked.svg)
|
||||
* skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/nucleo/screenshot.svg)
|
||||
* skin/classic/browser/zen-icons/screen.svg (../shared/zen-icons/nucleo/screen.svg)
|
||||
* skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/nucleo/screenshot.svg)
|
||||
* skin/classic/browser/zen-icons/search-glass.svg (../shared/zen-icons/nucleo/search-glass.svg)
|
||||
* skin/classic/browser/zen-icons/search-page.svg (../shared/zen-icons/nucleo/search-page.svg)
|
||||
* skin/classic/browser/zen-icons/security-broken.svg (../shared/zen-icons/nucleo/security-broken.svg)
|
||||
* skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/nucleo/security.svg)
|
||||
* skin/classic/browser/zen-icons/security-warning.svg (../shared/zen-icons/nucleo/security-warning.svg)
|
||||
* skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/nucleo/security.svg)
|
||||
* skin/classic/browser/zen-icons/send-to-device.svg (../shared/zen-icons/nucleo/send-to-device.svg)
|
||||
* skin/classic/browser/zen-icons/settings-fill.svg (../shared/zen-icons/nucleo/settings-fill.svg)
|
||||
* skin/classic/browser/zen-icons/settings.svg (../shared/zen-icons/nucleo/settings.svg)
|
||||
* skin/classic/browser/zen-icons/share.svg (../shared/zen-icons/nucleo/share.svg)
|
||||
* skin/classic/browser/zen-icons/sidebar-right.svg (../shared/zen-icons/nucleo/sidebar-right.svg)
|
||||
* skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/nucleo/sidebars-right.svg)
|
||||
* skin/classic/browser/zen-icons/sidebar.svg (../shared/zen-icons/nucleo/sidebar.svg)
|
||||
* skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/nucleo/sidebars-right.svg)
|
||||
* skin/classic/browser/zen-icons/sliders.svg (../shared/zen-icons/nucleo/sliders.svg)
|
||||
* skin/classic/browser/zen-icons/sparkles.svg (../shared/zen-icons/nucleo/sparkles.svg)
|
||||
* skin/classic/browser/zen-icons/spell-check.svg (../shared/zen-icons/nucleo/spell-check.svg)
|
||||
@@ -314,8 +316,8 @@
|
||||
* skin/classic/browser/zen-icons/autoplay-media-fill.svg (../shared/zen-icons/nucleo/autoplay-media-fill.svg)
|
||||
* skin/classic/browser/zen-icons/autoplay-media.svg (../shared/zen-icons/nucleo/autoplay-media.svg)
|
||||
* skin/classic/browser/zen-icons/back.svg (../shared/zen-icons/nucleo/back.svg)
|
||||
* skin/classic/browser/zen-icons/blocked-element.svg (../shared/zen-icons/nucleo/blocked-element.svg)
|
||||
* skin/classic/browser/zen-icons/block.svg (../shared/zen-icons/nucleo/block.svg)
|
||||
* skin/classic/browser/zen-icons/blocked-element.svg (../shared/zen-icons/nucleo/blocked-element.svg)
|
||||
* skin/classic/browser/zen-icons/bolt.svg (../shared/zen-icons/nucleo/bolt.svg)
|
||||
* skin/classic/browser/zen-icons/bookmark-hollow.svg (../shared/zen-icons/nucleo/bookmark-hollow.svg)
|
||||
* skin/classic/browser/zen-icons/bookmark-star-on-tray.svg (../shared/zen-icons/nucleo/bookmark-star-on-tray.svg)
|
||||
@@ -404,26 +406,27 @@
|
||||
* skin/classic/browser/zen-icons/popup-fill.svg (../shared/zen-icons/nucleo/popup-fill.svg)
|
||||
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/nucleo/popup.svg)
|
||||
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/nucleo/print.svg)
|
||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/nucleo/privateBrowsing.svg)
|
||||
* skin/classic/browser/zen-icons/private-window-small.svg (../shared/zen-icons/nucleo/private-window-small.svg)
|
||||
* skin/classic/browser/zen-icons/private-window.svg (../shared/zen-icons/nucleo/private-window.svg)
|
||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/nucleo/privateBrowsing.svg)
|
||||
* skin/classic/browser/zen-icons/reader-mode.svg (../shared/zen-icons/nucleo/reader-mode.svg)
|
||||
* skin/classic/browser/zen-icons/reload.svg (../shared/zen-icons/nucleo/reload.svg)
|
||||
* skin/classic/browser/zen-icons/save.svg (../shared/zen-icons/nucleo/save.svg)
|
||||
* skin/classic/browser/zen-icons/screen-blocked.svg (../shared/zen-icons/nucleo/screen-blocked.svg)
|
||||
* skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/nucleo/screenshot.svg)
|
||||
* skin/classic/browser/zen-icons/screen.svg (../shared/zen-icons/nucleo/screen.svg)
|
||||
* skin/classic/browser/zen-icons/screenshot.svg (../shared/zen-icons/nucleo/screenshot.svg)
|
||||
* skin/classic/browser/zen-icons/search-glass.svg (../shared/zen-icons/nucleo/search-glass.svg)
|
||||
* skin/classic/browser/zen-icons/search-page.svg (../shared/zen-icons/nucleo/search-page.svg)
|
||||
* skin/classic/browser/zen-icons/security-broken.svg (../shared/zen-icons/nucleo/security-broken.svg)
|
||||
* skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/nucleo/security.svg)
|
||||
* skin/classic/browser/zen-icons/security-warning.svg (../shared/zen-icons/nucleo/security-warning.svg)
|
||||
* skin/classic/browser/zen-icons/security.svg (../shared/zen-icons/nucleo/security.svg)
|
||||
* skin/classic/browser/zen-icons/send-to-device.svg (../shared/zen-icons/nucleo/send-to-device.svg)
|
||||
* skin/classic/browser/zen-icons/settings-fill.svg (../shared/zen-icons/nucleo/settings-fill.svg)
|
||||
* skin/classic/browser/zen-icons/settings.svg (../shared/zen-icons/nucleo/settings.svg)
|
||||
* skin/classic/browser/zen-icons/share.svg (../shared/zen-icons/nucleo/share.svg)
|
||||
* skin/classic/browser/zen-icons/sidebar-right.svg (../shared/zen-icons/nucleo/sidebar-right.svg)
|
||||
* skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/nucleo/sidebars-right.svg)
|
||||
* skin/classic/browser/zen-icons/sidebar.svg (../shared/zen-icons/nucleo/sidebar.svg)
|
||||
* skin/classic/browser/zen-icons/sidebars-right.svg (../shared/zen-icons/nucleo/sidebars-right.svg)
|
||||
* skin/classic/browser/zen-icons/sliders.svg (../shared/zen-icons/nucleo/sliders.svg)
|
||||
* skin/classic/browser/zen-icons/sparkles.svg (../shared/zen-icons/nucleo/sparkles.svg)
|
||||
* skin/classic/browser/zen-icons/spell-check.svg (../shared/zen-icons/nucleo/spell-check.svg)
|
||||
@@ -459,8 +462,8 @@
|
||||
* skin/classic/browser/zen-icons/selectable/basket.svg (../shared/zen-icons/common/selectable/basket.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/bed.svg (../shared/zen-icons/common/selectable/bed.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/bell.svg (../shared/zen-icons/common/selectable/bell.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/bookmark.svg (../shared/zen-icons/common/selectable/bookmark.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/book.svg (../shared/zen-icons/common/selectable/book.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/bookmark.svg (../shared/zen-icons/common/selectable/bookmark.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/briefcase.svg (../shared/zen-icons/common/selectable/briefcase.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/brush.svg (../shared/zen-icons/common/selectable/brush.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/bug.svg (../shared/zen-icons/common/selectable/bug.svg)
|
||||
@@ -522,8 +525,8 @@
|
||||
* skin/classic/browser/zen-icons/selectable/shapes.svg (../shared/zen-icons/common/selectable/shapes.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/shirt.svg (../shared/zen-icons/common/selectable/shirt.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/skull.svg (../shared/zen-icons/common/selectable/skull.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/squares.svg (../shared/zen-icons/common/selectable/squares.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/square.svg (../shared/zen-icons/common/selectable/square.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/squares.svg (../shared/zen-icons/common/selectable/squares.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/star-1.svg (../shared/zen-icons/common/selectable/star-1.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/star.svg (../shared/zen-icons/common/selectable/star.svg)
|
||||
* skin/classic/browser/zen-icons/selectable/stats-chart.svg (../shared/zen-icons/common/selectable/stats-chart.svg)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#filter dumbComments emptyLines substitution
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="context-fill" fill-opacity="context-fill-opacity" viewBox="0 -1 20 20"><path d="M12.75 10.5a3.25 3.25 0 1 1-3.19 2.632 1.25 1.25 0 0 0-1.119 0q.059.3.059.618a3.25 3.25 0 1 1-3.25-3.25 3.24 3.24 0 0 1 2.571 1.268 2.74 2.74 0 0 1 2.357 0A3.24 3.24 0 0 1 12.75 10.5M5.25 12a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5m7.5 0a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5m-.867-11c.87 0 1.61.64 1.732 1.503l.34 2.393L16.78 7.72A.75.75 0 0 1 16.25 9H1.75a.751.751 0 0 1-.53-1.28l2.823-2.824.342-2.393A1.75 1.75 0 0 1 6.117 1zM3.56 7.5h10.88L12.94 6H5.06zm2.557-5a.25.25 0 0 0-.237.17l-.011.045L5.614 4.5h6.772l-.255-1.785a.25.25 0 0 0-.248-.215z"/></svg>
|
||||
@@ -1,76 +0,0 @@
|
||||
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/content/UrlbarView.mjs b/browser/components/urlbar/content/UrlbarView.mjs
|
||||
--- a/browser/components/urlbar/content/UrlbarView.mjs
|
||||
+++ b/browser/components/urlbar/content/UrlbarView.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
|
||||
@@ -5460,11 +5460,17 @@
|
||||
_on_blur(event) {
|
||||
if (this.view.resultMenu.hasAttribute("open")) {
|
||||
return;
|
||||
}
|
||||
|
||||
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.
|
||||
@@ -31,12 +31,13 @@ diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src
|
||||
|
||||
// Ensure the WR profiler callbacks are hooked up to the Gecko profiler.
|
||||
set_profiler_hooks(Some(&PROFILER_HOOKS));
|
||||
@@ -2164,10 +2165,11 @@
|
||||
@@ -2164,11 +2165,12 @@
|
||||
texture_cache_config,
|
||||
reject_software_rasterizer,
|
||||
low_quality_pinch_zoom,
|
||||
max_shared_surface_size,
|
||||
enable_dithering,
|
||||
enable_shared_instance_buffer,
|
||||
+ opaque_backdrop_fallback,
|
||||
..Default::default()
|
||||
};
|
||||
@@ -73,8 +74,9 @@ diff --git a/gfx/wr/webrender/src/renderer/init.rs b/gfx/wr/webrender/src/render
|
||||
+ /// See explanation of `gfx.webrender.opaque-backdrop-fallback`.
|
||||
+ pub opaque_backdrop_fallback: bool,
|
||||
}
|
||||
@@ -277,9 +279,10 @@
|
||||
@@ -277,10 +279,11 @@
|
||||
enable_instancing: true,
|
||||
enable_shared_instance_buffer: false,
|
||||
reject_software_rasterizer: false,
|
||||
low_quality_pinch_zoom: false,
|
||||
max_shared_surface_size: 2048,
|
||||
@@ -84,12 +86,13 @@ diff --git a/gfx/wr/webrender/src/renderer/init.rs b/gfx/wr/webrender/src/render
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,10 +805,11 @@
|
||||
@@ -802,11 +805,12 @@
|
||||
allocated_native_surfaces: FastHashSet::default(),
|
||||
debug_overlay_state: DebugOverlayState::new(),
|
||||
buffer_damage_tracker: BufferDamageTracker::default(),
|
||||
max_primitive_instance_count,
|
||||
enable_instancing: options.enable_instancing,
|
||||
use_shared_instance_buffer,
|
||||
+ opaque_backdrop_fallback: options.opaque_backdrop_fallback,
|
||||
consecutive_oom_frames: 0,
|
||||
target_frame_publish_id: None,
|
||||
@@ -99,11 +102,14 @@ diff --git a/gfx/wr/webrender/src/renderer/init.rs b/gfx/wr/webrender/src/render
|
||||
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 @@
|
||||
@@ -867,13 +867,15 @@
|
||||
buffer_damage_tracker: BufferDamageTracker,
|
||||
|
||||
max_primitive_instance_count: usize,
|
||||
enable_instancing: bool,
|
||||
/// If true, stream instance data into large buffers shared by multiple
|
||||
/// draws, rather than allocating a new instance buffer for each draw.
|
||||
use_shared_instance_buffer: bool,
|
||||
|
||||
+ opaque_backdrop_fallback: bool,
|
||||
+
|
||||
|
||||
168
src/external-patches/firefox/bug_2011236.patch
Normal file
168
src/external-patches/firefox/bug_2011236.patch
Normal file
@@ -0,0 +1,168 @@
|
||||
diff --git a/browser/components/sessionstore/test/browser.toml b/browser/components/sessionstore/test/browser.toml
|
||||
--- a/browser/components/sessionstore/test/browser.toml
|
||||
+++ b/browser/components/sessionstore/test/browser.toml
|
||||
@@ -14,10 +14,12 @@
|
||||
"browser_frame_history_c.html",
|
||||
"browser_frame_history_c1.html",
|
||||
"browser_frame_history_c2.html",
|
||||
"browser_formdata_format_sample.html",
|
||||
"browser_sessionHistory_slow.sjs",
|
||||
+ "browser_policy_container_sample.html",
|
||||
+ "browser_policy_container_sample_frame.html",
|
||||
"browser_scrollPositions_sample.html",
|
||||
"browser_scrollPositions_sample2.html",
|
||||
"browser_scrollPositions_sample_frameset.html",
|
||||
"browser_scrollPositions_readerModeArticle.html",
|
||||
"browser_sessionStorage.html",
|
||||
@@ -226,10 +228,12 @@
|
||||
["browser_pinned_tabs.js"]
|
||||
skip-if = [
|
||||
"ccov", # Bug 1625525
|
||||
]
|
||||
|
||||
+["browser_policy_container_not_stored.js"]
|
||||
+
|
||||
["browser_privatetabs.js"]
|
||||
|
||||
["browser_purge_domaindata.js"]
|
||||
|
||||
["browser_purge_shistory.js"]
|
||||
diff --git a/browser/components/sessionstore/test/browser_policy_container_not_stored.js b/browser/components/sessionstore/test/browser_policy_container_not_stored.js
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/browser/components/sessionstore/test/browser_policy_container_not_stored.js
|
||||
@@ -0,0 +1,51 @@
|
||||
+/* 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/. */
|
||||
+
|
||||
+"use strict";
|
||||
+
|
||||
+/**
|
||||
+ * A session history entry only needs to retain the policy container for loads
|
||||
+ * that inherit their policies (about:blank, about:srcdoc, blob:, data:, ...).
|
||||
+ * Anything fetched over the network gets its policies from the response again,
|
||||
+ * so storing them would only bloat the session store (bug 2011236).
|
||||
+ */
|
||||
+
|
||||
+const TEST_ROOT = getRootDirectory(gTestPath).replace(
|
||||
+ "chrome://mochitests/content",
|
||||
+ "https://example.com"
|
||||
+);
|
||||
+const PARENT_URL = TEST_ROOT + "browser_policy_container_sample.html";
|
||||
+const FRAME_URL = TEST_ROOT + "browser_policy_container_sample_frame.html";
|
||||
+
|
||||
+add_task(async function test_policy_container_only_for_inheriting_loads() {
|
||||
+ const tab = BrowserTestUtils.addTab(gBrowser, PARENT_URL);
|
||||
+ gBrowser.selectedTab = tab;
|
||||
+ await promiseBrowserLoaded(tab.linkedBrowser, true, PARENT_URL);
|
||||
+ await TabStateFlusher.flush(tab.linkedBrowser);
|
||||
+
|
||||
+ const state = JSON.parse(ss.getTabState(tab));
|
||||
+ const topEntry = state.entries.at(-1);
|
||||
+ is(topEntry.url, PARENT_URL, "collected the parent entry");
|
||||
+
|
||||
+ const children = topEntry.children ?? [];
|
||||
+ const networkFrame = children.find(child => child.url === FRAME_URL);
|
||||
+ const blankFrame = children.find(child => child.url === "about:blank");
|
||||
+
|
||||
+ ok(networkFrame, "collected the network-scheme subframe entry");
|
||||
+ ok(blankFrame, "collected the about:blank subframe entry");
|
||||
+
|
||||
+ // The parent has a CSP, so both subframes inherit a policy container onto
|
||||
+ // their load state. Only the one that cannot recover it from a response
|
||||
+ // should keep it in session history.
|
||||
+ ok(
|
||||
+ !("policyContainer" in networkFrame),
|
||||
+ "https subframe entry does not store a policyContainer"
|
||||
+ );
|
||||
+ ok(
|
||||
+ "policyContainer" in blankFrame,
|
||||
+ "about:blank subframe entry still stores its inherited policyContainer"
|
||||
+ );
|
||||
+
|
||||
+ await BrowserTestUtils.removeTab(tab);
|
||||
+});
|
||||
diff --git a/browser/components/sessionstore/test/browser_policy_container_sample.html b/browser/components/sessionstore/test/browser_policy_container_sample.html
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/browser/components/sessionstore/test/browser_policy_container_sample.html
|
||||
@@ -0,0 +1,12 @@
|
||||
+<!DOCTYPE html>
|
||||
+<html>
|
||||
+<head>
|
||||
+ <meta charset="utf-8">
|
||||
+ <meta http-equiv="Content-Security-Policy" content="default-src * data: blob: 'unsafe-inline'">
|
||||
+ <title>policyContainer session store sample</title>
|
||||
+</head>
|
||||
+<body>
|
||||
+ <iframe id="network" src="browser_policy_container_sample_frame.html"></iframe>
|
||||
+ <iframe id="blank" src="about:blank"></iframe>
|
||||
+</body>
|
||||
+</html>
|
||||
diff --git a/browser/components/sessionstore/test/browser_policy_container_sample_frame.html b/browser/components/sessionstore/test/browser_policy_container_sample_frame.html
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/browser/components/sessionstore/test/browser_policy_container_sample_frame.html
|
||||
@@ -0,0 +1,10 @@
|
||||
+<!DOCTYPE html>
|
||||
+<html>
|
||||
+<head>
|
||||
+ <meta charset="utf-8">
|
||||
+ <title>policyContainer session store sample frame</title>
|
||||
+</head>
|
||||
+<body>
|
||||
+ frame
|
||||
+</body>
|
||||
+</html>
|
||||
diff --git a/docshell/shistory/SessionHistoryEntry.cpp b/docshell/shistory/SessionHistoryEntry.cpp
|
||||
--- a/docshell/shistory/SessionHistoryEntry.cpp
|
||||
+++ b/docshell/shistory/SessionHistoryEntry.cpp
|
||||
@@ -41,10 +41,18 @@
|
||||
extern mozilla::LazyLogModule gSHLog;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
+// Only store policy container for loads that can't carry it themselves
|
||||
+// (about:blank, about:srcdoc, blob:, data:, ...)
|
||||
+// bug 1867137, bug 2011236
|
||||
+static nsIPolicyContainer* PolicyContainerToStore(
|
||||
+ nsIURI* aURI, nsIPolicyContainer* aPolicyContainer) {
|
||||
+ return CSP_ShouldURIInheritCSP(aURI) ? aPolicyContainer : nullptr;
|
||||
+}
|
||||
+
|
||||
SessionHistoryInfo::SessionHistoryInfo(nsDocShellLoadState* aLoadState,
|
||||
nsIChannel* aChannel)
|
||||
: mURI(aLoadState->URI()),
|
||||
mOriginalURI(aLoadState->OriginalURI()),
|
||||
mResultPrincipalURI(aLoadState->ResultPrincipalURI()),
|
||||
@@ -59,11 +67,12 @@
|
||||
mLoadReplace(aLoadState->LoadReplace()),
|
||||
mHasUserActivation(aLoadState->HasValidUserGestureActivation()),
|
||||
mSharedState(SharedState::Create(
|
||||
aLoadState->TriggeringPrincipal(), aLoadState->PrincipalToInherit(),
|
||||
aLoadState->PartitionedPrincipalToInherit(),
|
||||
- aLoadState->PolicyContainer(),
|
||||
+ PolicyContainerToStore(aLoadState->URI(),
|
||||
+ aLoadState->PolicyContainer()),
|
||||
/* FIXME Is this correct? */
|
||||
aLoadState->TypeHint())) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mURI->SchemeIs("javascript"));
|
||||
|
||||
// Pull the upload stream off of the channel instead of the load state, as
|
||||
@@ -124,11 +133,12 @@
|
||||
loadInfo->GetPrincipalToInherit(
|
||||
getter_AddRefs(mSharedState.Get()->mPrincipalToInherit));
|
||||
|
||||
mSharedState.Get()->mPartitionedPrincipalToInherit =
|
||||
aPartitionedPrincipalToInherit;
|
||||
- mSharedState.Get()->mPolicyContainer = aPolicyContainer;
|
||||
+ mSharedState.Get()->mPolicyContainer =
|
||||
+ PolicyContainerToStore(mURI, aPolicyContainer);
|
||||
aChannel->GetContentType(mSharedState.Get()->mContentType);
|
||||
aChannel->GetOriginalURI(getter_AddRefs(mOriginalURI));
|
||||
|
||||
uint32_t loadFlags;
|
||||
aChannel->GetLoadFlags(&loadFlags);
|
||||
|
||||
1089
src/external-patches/firefox/bug_2047627_corner_shape_borders.patch
Normal file
1089
src/external-patches/firefox/bug_2047627_corner_shape_borders.patch
Normal file
File diff suppressed because it is too large
Load Diff
558
src/external-patches/firefox/bug_2063169/D319577.patch
Normal file
558
src/external-patches/firefox/bug_2063169/D319577.patch
Normal file
@@ -0,0 +1,558 @@
|
||||
diff --git a/gfx/wr/webrender/res/ps_quad_mask.glsl b/gfx/wr/webrender/res/ps_quad_mask.glsl
|
||||
--- a/gfx/wr/webrender/res/ps_quad_mask.glsl
|
||||
+++ b/gfx/wr/webrender/res/ps_quad_mask.glsl
|
||||
@@ -19,12 +19,14 @@
|
||||
// We pack 4 vec3 clip planes into 3 vec4 to save a varying slot.
|
||||
flat varying highp vec4 vClipPlane_A;
|
||||
flat varying highp vec4 vClipPlane_B;
|
||||
flat varying highp vec4 vClipPlane_C;
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
flat varying highp vec4 vClipShape;
|
||||
flat varying highp vec4 vClipClampedInset;
|
||||
+#endif
|
||||
|
||||
#endif
|
||||
flat varying highp vec2 vClipMode;
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
@@ -40,12 +42,14 @@
|
||||
vec4 radii;
|
||||
#else
|
||||
vec4 radii_top;
|
||||
vec4 radii_bottom;
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vec4 shape;
|
||||
vec4 inset;
|
||||
+#endif
|
||||
#endif
|
||||
float mode;
|
||||
int space;
|
||||
};
|
||||
|
||||
@@ -58,22 +62,29 @@
|
||||
vec4 texels[3] = fetch_from_gpu_buffer_3f(index);
|
||||
clip.rect = RectWithEndpoint(texels[0].xy, texels[0].zw);
|
||||
clip.radii = texels[1];
|
||||
clip.mode = texels[2].x;
|
||||
#else
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vec4 texels[6] = fetch_from_gpu_buffer_6f(index);
|
||||
+#else
|
||||
+ vec4 texels[4] = fetch_from_gpu_buffer_4f(index);
|
||||
+#endif
|
||||
clip.rect = RectWithEndpoint(texels[0].xy, texels[0].zw);
|
||||
clip.radii_top = texels[1];
|
||||
clip.radii_bottom = texels[2];
|
||||
clip.mode = texels[3].x;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
clip.shape = texels[4];
|
||||
clip.inset = texels[5];
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
return clip;
|
||||
}
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vec4 precalc_corner(vec2 center, vec2 radii, vec2 inset, vec2 clip_sign, float k) {
|
||||
if (k == 1.0) {
|
||||
// round/ellipse corner, precalc the ellipse parameters
|
||||
return vec4(center, inverse_radii_squared(radii));
|
||||
} else {
|
||||
@@ -85,10 +96,11 @@
|
||||
radii = offset_radii.zw;
|
||||
}
|
||||
return vec4(center, inverse_radii(radii));
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
void pattern_vertex(PrimitiveInfo prim_info) {
|
||||
|
||||
Clip clip = fetch_clip(aClipData.y);
|
||||
Transform clip_transform = fetch_transform(aClipData.x);
|
||||
@@ -121,10 +133,11 @@
|
||||
vec2 r_tl = clip.radii_top.xy;
|
||||
vec2 r_tr = clip.radii_top.zw;
|
||||
vec2 r_br = clip.radii_bottom.zw;
|
||||
vec2 r_bl = clip.radii_bottom.xy;
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vClipCenter_Radius_TL = precalc_corner(clip.rect.p0 + r_tl,
|
||||
r_tl,
|
||||
clip.inset.wx,
|
||||
vec2(-1.0, -1.0),
|
||||
clip.shape.x);
|
||||
@@ -146,10 +159,25 @@
|
||||
clip.rect.p1.y - r_bl.y),
|
||||
r_bl,
|
||||
clip.inset.wz,
|
||||
vec2(-1.0, 1.0),
|
||||
clip.shape.w);
|
||||
+#else
|
||||
+ vClipCenter_Radius_TL = vec4(clip.rect.p0 + r_tl,
|
||||
+ inverse_radii_squared(r_tl));
|
||||
+
|
||||
+ vClipCenter_Radius_TR = vec4(clip.rect.p1.x - r_tr.x,
|
||||
+ clip.rect.p0.y + r_tr.y,
|
||||
+ inverse_radii_squared(r_tr));
|
||||
+
|
||||
+ vClipCenter_Radius_BR = vec4(clip.rect.p1 - r_br,
|
||||
+ inverse_radii_squared(r_br));
|
||||
+
|
||||
+ vClipCenter_Radius_BL = vec4(clip.rect.p0.x + r_bl.x,
|
||||
+ clip.rect.p1.y - r_bl.y,
|
||||
+ inverse_radii_squared(r_bl));
|
||||
+#endif
|
||||
|
||||
// We need to know the half-spaces of the corners separate from the center
|
||||
// and radius. We compute a point that falls on the diagonal (which is just
|
||||
// an inner vertex pushed out along one axis, but not on both) to get the
|
||||
// plane offset of the half-space. We also compute the direction vector of
|
||||
@@ -170,13 +198,15 @@
|
||||
|
||||
vClipPlane_A = vec4(tl.x, tl.y, tl.z, tr.x);
|
||||
vClipPlane_B = vec4(tr.y, tr.z, br.x, br.y);
|
||||
vClipPlane_C = vec4(br.z, bl.x, bl.y, bl.z);
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vClipShape = clip.shape;
|
||||
vClipClampedInset = min(clip.inset, 0.0);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WR_FRAGMENT_SHADER
|
||||
@@ -205,11 +235,13 @@
|
||||
vec3 plane_tr = vec3(vClipPlane_A.w, vClipPlane_B.x, vClipPlane_B.y);
|
||||
vec3 plane_br = vec3(vClipPlane_B.z, vClipPlane_B.w, vClipPlane_C.x);
|
||||
vec3 plane_bl = vec3(vClipPlane_C.y, vClipPlane_C.z, vClipPlane_C.w);
|
||||
|
||||
float dist;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
if (vClipShape == vec4(1.0)) {
|
||||
+#endif
|
||||
dist = distance_to_rounded_rect(
|
||||
clip_local_pos,
|
||||
plane_tl,
|
||||
vClipCenter_Radius_TL,
|
||||
plane_tr,
|
||||
@@ -218,10 +250,11 @@
|
||||
vClipCenter_Radius_BR,
|
||||
plane_bl,
|
||||
vClipCenter_Radius_BL,
|
||||
vTransformBounds
|
||||
);
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
} else {
|
||||
dist = distance_to_shaped_rect(
|
||||
clip_local_pos,
|
||||
vClipCenter_Radius_TL,
|
||||
vClipCenter_Radius_TR,
|
||||
@@ -230,10 +263,11 @@
|
||||
vTransformBounds,
|
||||
vClipShape,
|
||||
vClipClampedInset
|
||||
);
|
||||
}
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
// Compute AA for the given dist and range.
|
||||
float alpha = distance_aa(aa_range, dist);
|
||||
|
||||
@@ -340,13 +374,13 @@
|
||||
#define AA_RECT(local_pos) \
|
||||
sd_round_box(local_pos, v_clip_size, v_clip_radii)
|
||||
#else
|
||||
// The span fast path only handles elliptical corners. For superellipse
|
||||
// shapes, bail out and let SWGL fall back to the fragment shader.
|
||||
- if (vClipShape != vec4(1.0)) {
|
||||
+ #ifdef WR_FEATURE_SUPERELLIPSE
|
||||
return;
|
||||
- }
|
||||
+ #endif
|
||||
|
||||
// Unpack the corner half-spaces packed into vClipPlane_A/B/C.
|
||||
vec3 plane_tl = vec3(vClipPlane_A.x, vClipPlane_A.y, vClipPlane_A.z);
|
||||
vec3 plane_tr = vec3(vClipPlane_A.w, vClipPlane_B.x, vClipPlane_B.y);
|
||||
vec3 plane_br = vec3(vClipPlane_B.z, vClipPlane_B.w, vClipPlane_C.x);
|
||||
diff --git a/gfx/wr/webrender/src/batch.rs b/gfx/wr/webrender/src/batch.rs
|
||||
--- a/gfx/wr/webrender/src/batch.rs
|
||||
+++ b/gfx/wr/webrender/src/batch.rs
|
||||
@@ -1224,25 +1224,29 @@
|
||||
/// A list of clip instances to be drawn into a target.
|
||||
#[cfg_attr(feature = "capture", derive(Serialize))]
|
||||
#[cfg_attr(feature = "replay", derive(Deserialize))]
|
||||
pub struct ClipMaskInstanceList {
|
||||
pub mask_instances_fast: FrameVec<MaskInstance>,
|
||||
+ pub mask_instances_superellipse: FrameVec<MaskInstance>,
|
||||
pub mask_instances_slow: FrameVec<MaskInstance>,
|
||||
|
||||
pub mask_instances_fast_with_scissor: FastHashMap<DeviceIntRect, FrameVec<MaskInstance>>,
|
||||
+ pub mask_instances_superellipse_with_scissor: FastHashMap<DeviceIntRect, FrameVec<MaskInstance>>,
|
||||
pub mask_instances_slow_with_scissor: FastHashMap<DeviceIntRect, FrameVec<MaskInstance>>,
|
||||
|
||||
pub image_mask_instances: FastHashMap<TextureSource, FrameVec<PrimitiveInstanceData>>,
|
||||
pub image_mask_instances_with_scissor: FastHashMap<(DeviceIntRect, TextureSource), FrameVec<PrimitiveInstanceData>>,
|
||||
}
|
||||
|
||||
impl ClipMaskInstanceList {
|
||||
pub fn new(memory: &FrameMemory) -> Self {
|
||||
ClipMaskInstanceList {
|
||||
mask_instances_fast: memory.new_vec(),
|
||||
+ mask_instances_superellipse: memory.new_vec(),
|
||||
mask_instances_slow: memory.new_vec(),
|
||||
mask_instances_fast_with_scissor: FastHashMap::default(),
|
||||
+ mask_instances_superellipse_with_scissor: FastHashMap::default(),
|
||||
mask_instances_slow_with_scissor: FastHashMap::default(),
|
||||
image_mask_instances: FastHashMap::default(),
|
||||
image_mask_instances_with_scissor: FastHashMap::default(),
|
||||
}
|
||||
}
|
||||
@@ -1250,20 +1254,24 @@
|
||||
pub fn is_empty(&self) -> bool {
|
||||
// Destructure self to make sure we don't forget to update this method if
|
||||
// a new member is added.
|
||||
let ClipMaskInstanceList {
|
||||
mask_instances_fast,
|
||||
+ mask_instances_superellipse,
|
||||
mask_instances_slow,
|
||||
mask_instances_fast_with_scissor,
|
||||
+ mask_instances_superellipse_with_scissor,
|
||||
mask_instances_slow_with_scissor,
|
||||
image_mask_instances,
|
||||
image_mask_instances_with_scissor,
|
||||
} = self;
|
||||
|
||||
mask_instances_fast.is_empty()
|
||||
+ && mask_instances_superellipse.is_empty()
|
||||
&& mask_instances_slow.is_empty()
|
||||
&& mask_instances_fast_with_scissor.is_empty()
|
||||
+ && mask_instances_superellipse_with_scissor.is_empty()
|
||||
&& mask_instances_slow_with_scissor.is_empty()
|
||||
&& image_mask_instances.is_empty()
|
||||
&& image_mask_instances_with_scissor.is_empty()
|
||||
}
|
||||
}
|
||||
diff --git a/gfx/wr/webrender/src/quad.rs b/gfx/wr/webrender/src/quad.rs
|
||||
--- a/gfx/wr/webrender/src/quad.rs
|
||||
+++ b/gfx/wr/webrender/src/quad.rs
|
||||
@@ -1807,11 +1807,11 @@
|
||||
gpu_buffer: &mut GpuBufferBuilderF,
|
||||
clip_rect: LayoutRect,
|
||||
radius: &BorderRadius,
|
||||
inset: LayoutSideOffsets,
|
||||
mode: ClipMode,
|
||||
-) -> (GpuBufferAddress, bool) {
|
||||
+) -> (GpuBufferAddress, bool, bool) {
|
||||
let radius = clamped_radius(radius, clip_rect.size());
|
||||
|
||||
if radius.can_use_fast_path_in(&clip_rect) {
|
||||
let mut writer = gpu_buffer.write_blocks(3);
|
||||
writer.push_one(clip_rect);
|
||||
@@ -1821,13 +1821,15 @@
|
||||
radius.bottom_left.width,
|
||||
radius.top_left.width,
|
||||
]);
|
||||
writer.push_one([mode as i32 as f32, 0.0, 0.0, 0.0]);
|
||||
|
||||
- (writer.finish(), true)
|
||||
+ (writer.finish(), true, false)
|
||||
} else {
|
||||
- let mut writer = gpu_buffer.write_blocks(6);
|
||||
+ let superellipse = !radius.shapes_all_round();
|
||||
+ let block_count = if superellipse { 6 } else { 4 };
|
||||
+ let mut writer = gpu_buffer.write_blocks(block_count);
|
||||
writer.push_one(clip_rect);
|
||||
writer.push_one([
|
||||
radius.top_left.width,
|
||||
radius.top_left.height,
|
||||
radius.top_right.width,
|
||||
@@ -1838,19 +1840,21 @@
|
||||
radius.bottom_left.height,
|
||||
radius.bottom_right.width,
|
||||
radius.bottom_right.height,
|
||||
]);
|
||||
writer.push_one([mode as i32 as f32, 0.0, 0.0, 0.0]);
|
||||
- writer.push_one([
|
||||
- radius.shape_top_left,
|
||||
- radius.shape_top_right,
|
||||
- radius.shape_bottom_right,
|
||||
- radius.shape_bottom_left,
|
||||
- ]);
|
||||
- writer.push_one(inset);
|
||||
+ if superellipse {
|
||||
+ writer.push_one([
|
||||
+ radius.shape_top_left,
|
||||
+ radius.shape_top_right,
|
||||
+ radius.shape_bottom_right,
|
||||
+ radius.shape_bottom_left,
|
||||
+ ]);
|
||||
+ writer.push_one(inset);
|
||||
+ }
|
||||
|
||||
- (writer.finish(), false)
|
||||
+ (writer.finish(), false, superellipse)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prepare_clip_task(
|
||||
clip_instance: &ClipNodeInstance,
|
||||
@@ -1865,11 +1869,11 @@
|
||||
gpu_buffer: &mut GpuBufferBuilderF,
|
||||
transforms: &mut TransformPalette,
|
||||
rg_builder: &mut RenderTaskGraphBuilder,
|
||||
sub_tasks: &mut SubTaskRange,
|
||||
) {
|
||||
- let (clip_address, fast_path) = match clip_item.kind {
|
||||
+ let (clip_address, fast_path, superellipse) = match clip_item.kind {
|
||||
ClipItemKind::RoundedRectangle { radius, inset, mode } => {
|
||||
write_rounded_rect_clip_blocks(
|
||||
gpu_buffer,
|
||||
clip_instance.clip_rect,
|
||||
&radius,
|
||||
@@ -1882,11 +1886,11 @@
|
||||
writer.push_one(clip_instance.clip_rect);
|
||||
writer.push_one([0.0, 0.0, 0.0, 0.0]);
|
||||
writer.push_one([mode as i32 as f32, 0.0, 0.0, 0.0]);
|
||||
let clip_address = writer.finish();
|
||||
|
||||
- (clip_address, true)
|
||||
+ (clip_address, true, false)
|
||||
}
|
||||
ClipItemKind::Image { .. } => {
|
||||
let transform_id = transforms.gpu.get_id_with_post_scale(
|
||||
clip_instance.spatial_node_index,
|
||||
raster_spatial_node_index,
|
||||
@@ -2033,10 +2037,11 @@
|
||||
clip_transform_id,
|
||||
quad_flags,
|
||||
clip_space,
|
||||
needs_scissor_rect,
|
||||
rounded_rect_fast_path: fast_path,
|
||||
+ rounded_rect_superellipse: superellipse,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
fn create_quad_primitive(
|
||||
diff --git a/gfx/wr/webrender/src/render_target.rs b/gfx/wr/webrender/src/render_target.rs
|
||||
--- a/gfx/wr/webrender/src/render_target.rs
|
||||
+++ b/gfx/wr/webrender/src/render_target.rs
|
||||
@@ -441,11 +441,11 @@
|
||||
// so the target must be initialized to one.
|
||||
self.clears.push((target_rect, ColorF::WHITE));
|
||||
|
||||
let device_rect = DeviceRect::from_size(target_rect.size().to_f32());
|
||||
|
||||
- let (clip_address, fast_path) = quad::write_rounded_rect_clip_blocks(
|
||||
+ let (clip_address, fast_path, superellipse) = quad::write_rounded_rect_clip_blocks(
|
||||
&mut gpu_buffer_builder.f32,
|
||||
region_task.clip_rect,
|
||||
®ion_task.radius,
|
||||
region_task.inset,
|
||||
region_task.mode,
|
||||
@@ -495,10 +495,12 @@
|
||||
unused: 0,
|
||||
};
|
||||
|
||||
if fast_path {
|
||||
self.clip_masks.mask_instances_fast.push(instance);
|
||||
+ } else if superellipse {
|
||||
+ self.clip_masks.mask_instances_superellipse.push(instance);
|
||||
} else {
|
||||
self.clip_masks.mask_instances_slow.push(instance);
|
||||
}
|
||||
},
|
||||
);
|
||||
@@ -925,19 +927,26 @@
|
||||
if task.rounded_rect_fast_path {
|
||||
results.mask_instances_fast_with_scissor
|
||||
.entry(*target_rect)
|
||||
.or_insert_with(|| memory.new_vec())
|
||||
.push(instance);
|
||||
+ } else if task.rounded_rect_superellipse {
|
||||
+ results.mask_instances_superellipse_with_scissor
|
||||
+ .entry(*target_rect)
|
||||
+ .or_insert_with(|| memory.new_vec())
|
||||
+ .push(instance);
|
||||
} else {
|
||||
results.mask_instances_slow_with_scissor
|
||||
.entry(*target_rect)
|
||||
.or_insert_with(|| memory.new_vec())
|
||||
.push(instance);
|
||||
}
|
||||
} else {
|
||||
if task.rounded_rect_fast_path {
|
||||
results.mask_instances_fast.push(instance);
|
||||
+ } else if task.rounded_rect_superellipse {
|
||||
+ results.mask_instances_superellipse.push(instance);
|
||||
} else {
|
||||
results.mask_instances_slow.push(instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/gfx/wr/webrender/src/render_task.rs b/gfx/wr/webrender/src/render_task.rs
|
||||
--- a/gfx/wr/webrender/src/render_task.rs
|
||||
+++ b/gfx/wr/webrender/src/render_task.rs
|
||||
@@ -2240,10 +2240,11 @@
|
||||
/// Transform from the quad primitive's space to the clip's local space.
|
||||
pub clip_transform_id: GpuTransformId,
|
||||
pub quad_flags: QuadFlags,
|
||||
pub needs_scissor_rect: bool,
|
||||
pub rounded_rect_fast_path: bool,
|
||||
+ pub rounded_rect_superellipse: bool,
|
||||
}
|
||||
|
||||
/// An clip applied to a render task using the multiply blend mode on top of
|
||||
/// the content being clipped.
|
||||
#[derive(Debug)]
|
||||
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
|
||||
@@ -2450,10 +2450,54 @@
|
||||
}
|
||||
|
||||
self.device.disable_scissor();
|
||||
}
|
||||
|
||||
+ if !masks.mask_instances_superellipse.is_empty() {
|
||||
+ self.shaders.borrow_mut().ps_mask_superellipse().bind(
|
||||
+ &mut self.device,
|
||||
+ projection,
|
||||
+ None,
|
||||
+ &mut self.renderer_errors,
|
||||
+ &mut self.profile,
|
||||
+ &mut self.command_log,
|
||||
+ );
|
||||
+
|
||||
+ self.draw_instanced_batch(
|
||||
+ &masks.mask_instances_superellipse,
|
||||
+ VertexArrayKind::Mask,
|
||||
+ &BatchTextures::empty(),
|
||||
+ stats,
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ if !masks.mask_instances_superellipse_with_scissor.is_empty() {
|
||||
+ self.shaders.borrow_mut().ps_mask_superellipse().bind(
|
||||
+ &mut self.device,
|
||||
+ projection,
|
||||
+ None,
|
||||
+ &mut self.renderer_errors,
|
||||
+ &mut self.profile,
|
||||
+ &mut self.command_log,
|
||||
+ );
|
||||
+
|
||||
+ self.device.enable_scissor();
|
||||
+
|
||||
+ for (scissor_rect, instances) in &masks.mask_instances_superellipse_with_scissor {
|
||||
+ self.device.set_scissor_rect(draw_target.to_framebuffer_rect(*scissor_rect));
|
||||
+
|
||||
+ self.draw_instanced_batch(
|
||||
+ instances,
|
||||
+ VertexArrayKind::Mask,
|
||||
+ &BatchTextures::empty(),
|
||||
+ stats,
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ self.device.disable_scissor();
|
||||
+ }
|
||||
+
|
||||
if !masks.image_mask_instances.is_empty() {
|
||||
self.shaders.borrow_mut().ps_quad_textured().bind(
|
||||
&mut self.device,
|
||||
projection,
|
||||
None,
|
||||
diff --git a/gfx/wr/webrender/src/renderer/shade.rs b/gfx/wr/webrender/src/renderer/shade.rs
|
||||
--- a/gfx/wr/webrender/src/renderer/shade.rs
|
||||
+++ b/gfx/wr/webrender/src/renderer/shade.rs
|
||||
@@ -65,10 +65,11 @@
|
||||
];
|
||||
|
||||
const DITHERING_FEATURE: &str = "DITHERING";
|
||||
const DUAL_SOURCE_FEATURE: &str = "DUAL_SOURCE_BLENDING";
|
||||
const FAST_PATH_FEATURE: &str = "FAST_PATH";
|
||||
+const SUPERELLIPSE_FEATURE: &str = "SUPERELLIPSE";
|
||||
|
||||
pub(crate) enum ShaderKind {
|
||||
Primitive,
|
||||
Cache(VertexArrayKind),
|
||||
Text,
|
||||
@@ -449,10 +450,11 @@
|
||||
ps_quad_backdrop: ShaderHandle,
|
||||
ps_quad_blend: ShaderHandle,
|
||||
ps_quad_mix_blend: ShaderHandle,
|
||||
ps_mask: ShaderHandle,
|
||||
ps_mask_fast: ShaderHandle,
|
||||
+ ps_mask_superellipse: ShaderHandle,
|
||||
ps_clear: ShaderHandle,
|
||||
ps_copy: ShaderHandle,
|
||||
|
||||
composite: CompositorShaders,
|
||||
}
|
||||
@@ -514,10 +516,17 @@
|
||||
"ps_quad_mask",
|
||||
&[FAST_PATH_FEATURE],
|
||||
&shader_list,
|
||||
)?;
|
||||
|
||||
+ let ps_mask_superellipse = loader.create_shader(
|
||||
+ ShaderKind::Cache(VertexArrayKind::Mask),
|
||||
+ "ps_quad_mask",
|
||||
+ &[SUPERELLIPSE_FEATURE],
|
||||
+ &shader_list,
|
||||
+ )?;
|
||||
+
|
||||
let mut cs_scale = Vec::new();
|
||||
let scale_shader_num = IMAGE_BUFFER_KINDS.len();
|
||||
// PrimitiveShader is not clonable. Use push() to initialize the vec.
|
||||
for _ in 0 .. scale_shader_num {
|
||||
cs_scale.push(None);
|
||||
@@ -786,10 +795,11 @@
|
||||
ps_quad_backdrop,
|
||||
ps_quad_blend,
|
||||
ps_quad_mix_blend,
|
||||
ps_mask,
|
||||
ps_mask_fast,
|
||||
+ ps_mask_superellipse,
|
||||
ps_split_composite,
|
||||
ps_clear,
|
||||
ps_copy,
|
||||
composite,
|
||||
})
|
||||
@@ -963,10 +973,11 @@
|
||||
pub fn ps_quad_textured(&mut self) -> &mut LazilyCompiledShader {
|
||||
self.loader.get(self.ps_quad_textured)
|
||||
}
|
||||
pub fn ps_mask(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.ps_mask) }
|
||||
pub fn ps_mask_fast(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.ps_mask_fast) }
|
||||
+ pub fn ps_mask_superellipse(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.ps_mask_superellipse) }
|
||||
pub fn ps_clear(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.ps_clear) }
|
||||
pub fn ps_copy(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.ps_copy) }
|
||||
|
||||
pub fn deinit(self, device: &mut Device) {
|
||||
self.loader.deinit(device);
|
||||
diff --git a/gfx/wr/webrender_build/src/shader_features.rs b/gfx/wr/webrender_build/src/shader_features.rs
|
||||
--- a/gfx/wr/webrender_build/src/shader_features.rs
|
||||
+++ b/gfx/wr/webrender_build/src/shader_features.rs
|
||||
@@ -65,11 +65,11 @@
|
||||
let mut shaders = ShaderFeatures::new();
|
||||
|
||||
// Cache shaders
|
||||
shaders.insert("cs_blur", vec!["ALPHA_TARGET".to_string(), "COLOR_TARGET".to_string()]);
|
||||
|
||||
- shaders.insert("ps_quad_mask", vec![String::new(), "FAST_PATH".to_string()]);
|
||||
+ shaders.insert("ps_quad_mask", vec![String::new(), "FAST_PATH".to_string(), "SUPERELLIPSE".to_string()]);
|
||||
|
||||
for name in &[
|
||||
"cs_line_decoration",
|
||||
"cs_border_segment",
|
||||
"cs_border_solid",
|
||||
|
||||
307
src/external-patches/firefox/bug_2063169/D319796.patch
Normal file
307
src/external-patches/firefox/bug_2063169/D319796.patch
Normal file
@@ -0,0 +1,307 @@
|
||||
diff --git a/gfx/wr/webrender/res/ps_quad_box_shadow.glsl b/gfx/wr/webrender/res/ps_quad_box_shadow.glsl
|
||||
--- a/gfx/wr/webrender/res/ps_quad_box_shadow.glsl
|
||||
+++ b/gfx/wr/webrender/res/ps_quad_box_shadow.glsl
|
||||
@@ -49,22 +49,26 @@
|
||||
flat varying highp vec4 vElemCenter_Radius_TL;
|
||||
flat varying highp vec4 vElemCenter_Radius_TR;
|
||||
flat varying highp vec4 vElemCenter_Radius_BR;
|
||||
flat varying highp vec4 vElemCenter_Radius_BL;
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
flat varying highp vec4 vElemShape;
|
||||
+#endif
|
||||
|
||||
#ifdef WR_VERTEX_SHADER
|
||||
|
||||
void pattern_vertex(PrimitiveInfo info) {
|
||||
vec4 data0 = fetch_from_gpu_buffer_1f(info.pattern_input.x);
|
||||
vec4 data1 = fetch_from_gpu_buffer_1f(info.pattern_input.x + 1);
|
||||
vec4 data2 = fetch_from_gpu_buffer_1f(info.pattern_input.x + 2);
|
||||
vec4 data3 = fetch_from_gpu_buffer_1f(info.pattern_input.x + 3);
|
||||
vec4 data4 = fetch_from_gpu_buffer_1f(info.pattern_input.x + 4);
|
||||
vec4 data5 = fetch_from_gpu_buffer_1f(info.pattern_input.x + 5);
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vec4 data6 = fetch_from_gpu_buffer_1f(info.pattern_input.x + 6);
|
||||
+#endif
|
||||
|
||||
vec2 alloc_size = data0.xy;
|
||||
vec2 dest_rect_size = data0.zw;
|
||||
vec2 dest_rect_off = data1.xy;
|
||||
v_uv_scale_inset = vec4(vec2(1.0) / alloc_size, data1.z, 0.0);
|
||||
@@ -84,11 +88,11 @@
|
||||
// Map nine-patch UV=1.0 to the true content edge (uv_p0 + content_device_size)
|
||||
// rather than the rounded atlas entry edge (info.segment.uv_rect.p1). The atlas
|
||||
// allocation is rounded up from content_device_size, so this edge always lies
|
||||
// inside the entry; using it keeps the mapping stable to sub-texel precision as
|
||||
// the blur animates (bug 2002194).
|
||||
- vec2 content_device_size = data6.xy;
|
||||
+ vec2 content_device_size = data5.xy;
|
||||
vec2 texture_size = vec2(TEX_SIZE(sColor0));
|
||||
vec2 uv_p0 = info.segment.uv_rect.p0;
|
||||
vec2 uv_p1 = uv_p0 + content_device_size;
|
||||
v_uv_rect = vec4(uv_p0, uv_p1) / texture_size.xyxy;
|
||||
v_uv_bounds = vec4(
|
||||
@@ -110,11 +114,13 @@
|
||||
vElemCenter_Radius_TL = vec4(elem_p0 + r_tl, r_tl);
|
||||
vElemCenter_Radius_TR = vec4(elem_p1.x - r_tr.x, elem_p0.y + r_tr.y, r_tr);
|
||||
vElemCenter_Radius_BR = vec4(elem_p1 - r_br, r_br);
|
||||
vElemCenter_Radius_BL = vec4(elem_p0.x + r_bl.x, elem_p1.y - r_bl.y, r_bl);
|
||||
|
||||
- vElemShape = data5;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
+ vElemShape = data6;
|
||||
+#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef WR_FRAGMENT_SHADER
|
||||
@@ -170,22 +176,24 @@
|
||||
vec3 elem_plane_bl = vec3(n_bl, dot(n_bl, vec2(c_bl.x, c_bl.y + r_bl.y)));
|
||||
|
||||
// Reconstruct the element rect bounds from the TL and BR corner data.
|
||||
vec4 elem_bounds = vec4(c_tl - r_tl, c_br + r_br);
|
||||
|
||||
- vec4 elem_shape = vElemShape;
|
||||
-
|
||||
float elem_dist;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
+ vec4 elem_shape = vElemShape;
|
||||
if (elem_shape == vec4(1.0)) {
|
||||
+#endif
|
||||
elem_dist = distance_to_rounded_rect(
|
||||
local_pos,
|
||||
elem_plane_tl, vec4(c_tl, inverse_radii_squared(r_tl)),
|
||||
elem_plane_tr, vec4(c_tr, inverse_radii_squared(r_tr)),
|
||||
elem_plane_br, vec4(c_br, inverse_radii_squared(r_br)),
|
||||
elem_plane_bl, vec4(c_bl, inverse_radii_squared(r_bl)),
|
||||
elem_bounds
|
||||
);
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
} else {
|
||||
elem_dist = distance_to_shaped_rect(
|
||||
local_pos,
|
||||
vec4(c_tl, elem_shape.x == 1.0 ? inverse_radii_squared(r_tl) : inverse_radii(r_tl)),
|
||||
vec4(c_tr, elem_shape.y == 1.0 ? inverse_radii_squared(r_tr) : inverse_radii(r_tr)),
|
||||
@@ -194,10 +202,11 @@
|
||||
elem_bounds,
|
||||
elem_shape,
|
||||
vec4(0.0)
|
||||
);
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Outset (inset=0): dist < 0 = inside element → should be clipped out → use -elem_dist.
|
||||
// Inset (inset=1): dist < 0 = inside element → should be kept → use elem_dist.
|
||||
float element_clip = distance_aa(aa_range, mix(-elem_dist, elem_dist, inset));
|
||||
|
||||
diff --git a/gfx/wr/webrender/src/pattern/box_shadow.rs b/gfx/wr/webrender/src/pattern/box_shadow.rs
|
||||
--- a/gfx/wr/webrender/src/pattern/box_shadow.rs
|
||||
+++ b/gfx/wr/webrender/src/pattern/box_shadow.rs
|
||||
@@ -41,11 +41,14 @@
|
||||
_sub_rect: Option<DeviceRect>,
|
||||
_offset: LayoutVector2D,
|
||||
_ctx: &PatternBuilderContext,
|
||||
state: &mut PatternBuilderState,
|
||||
) -> Pattern {
|
||||
- let mut writer = state.frame_gpu_data.f32.write_blocks(7);
|
||||
+ let superellipse = !self.element_radius.shapes_all_round();
|
||||
+
|
||||
+ let block_count = if superellipse { 7 } else { 6 };
|
||||
+ let mut writer = state.frame_gpu_data.f32.write_blocks(block_count);
|
||||
writer.push_one([
|
||||
self.shadow_rect_alloc_size.width,
|
||||
self.shadow_rect_alloc_size.height,
|
||||
self.dest_rect_size.width,
|
||||
self.dest_rect_size.height,
|
||||
@@ -72,26 +75,28 @@
|
||||
self.element_radius.bottom_right.width,
|
||||
self.element_radius.bottom_right.height,
|
||||
self.element_radius.bottom_left.width,
|
||||
self.element_radius.bottom_left.height,
|
||||
]);
|
||||
- writer.push_one([
|
||||
- self.element_radius.shape_top_left,
|
||||
- self.element_radius.shape_top_right,
|
||||
- self.element_radius.shape_bottom_right,
|
||||
- self.element_radius.shape_bottom_left,
|
||||
- ]);
|
||||
writer.push_one([
|
||||
self.content_device_size.width,
|
||||
self.content_device_size.height,
|
||||
0.0,
|
||||
0.0,
|
||||
]);
|
||||
+ if superellipse {
|
||||
+ writer.push_one([
|
||||
+ self.element_radius.shape_top_left,
|
||||
+ self.element_radius.shape_top_right,
|
||||
+ self.element_radius.shape_bottom_right,
|
||||
+ self.element_radius.shape_bottom_left,
|
||||
+ ]);
|
||||
+ }
|
||||
let addr = writer.finish();
|
||||
|
||||
Pattern {
|
||||
- kind: PatternKind::BoxShadow,
|
||||
+ kind: if superellipse { PatternKind::BoxShadowSuperellipse } else { PatternKind::BoxShadow },
|
||||
shader_input: PatternShaderInput(addr.as_int(), 0),
|
||||
texture_input: PatternTextureInput::new(self.render_task),
|
||||
base_color: self.color,
|
||||
is_opaque: false,
|
||||
blend_mode: BlendMode::PremultipliedAlpha,
|
||||
diff --git a/gfx/wr/webrender/src/pattern/mod.rs b/gfx/wr/webrender/src/pattern/mod.rs
|
||||
--- a/gfx/wr/webrender/src/pattern/mod.rs
|
||||
+++ b/gfx/wr/webrender/src/pattern/mod.rs
|
||||
@@ -29,36 +29,37 @@
|
||||
Gradient = 1,
|
||||
Repeat = 2,
|
||||
|
||||
Mask = 3,
|
||||
BoxShadow = 4,
|
||||
+ BoxShadowSuperellipse = 5,
|
||||
// Variants of ColorOrTexture that use a non-default sampler type
|
||||
// (samplerExternalOES / __samplerExternal2DY2YEXT / sampler2DRect). The
|
||||
// quad shader is compiled in matching per-kind variants; see
|
||||
// ps_quad_textured.glsl.
|
||||
- TextureExternal = 5,
|
||||
- TextureExternalBT709 = 6,
|
||||
- TextureRect = 7,
|
||||
+ TextureExternal = 6,
|
||||
+ TextureExternalBT709 = 7,
|
||||
+ TextureRect = 8,
|
||||
// Samples up to three planes (sColor0/1/2) and converts from YUV to RGB.
|
||||
// Like ColorOrTexture, the YUV pattern comes in sampler-type-specific
|
||||
// variants so that the planes are sampled with the matching sColor
|
||||
// declaration; see ps_quad_yuv.glsl. `Yuv` is the default (TEXTURE_2D).
|
||||
- Yuv = 8,
|
||||
- YuvTextureExternal = 9,
|
||||
- YuvTextureExternalBT709 = 10,
|
||||
- YuvTextureRect = 11,
|
||||
+ Yuv = 9,
|
||||
+ YuvTextureExternal = 10,
|
||||
+ YuvTextureExternalBT709 = 11,
|
||||
+ YuvTextureRect = 12,
|
||||
// Samples a captured backdrop texture using a (bilerp) 4-corner uv quad.
|
||||
- Backdrop = 12,
|
||||
+ Backdrop = 13,
|
||||
// Applies a filter to a sampled source texture; see ps_quad_blend.glsl.
|
||||
- Blend = 13,
|
||||
+ Blend = 14,
|
||||
// Composites a picture over its backdrop with a software mix-blend-mode;
|
||||
// samples two textures (backdrop + source). See ps_quad_mix_blend.glsl.
|
||||
- MixBlend = 14,
|
||||
+ MixBlend = 15,
|
||||
// When adding patterns, don't forget to update the NUM_PATTERNS constant.
|
||||
}
|
||||
|
||||
-pub const NUM_PATTERNS: u32 = 15;
|
||||
+pub const NUM_PATTERNS: u32 = 16;
|
||||
|
||||
impl PatternKind {
|
||||
pub fn from_u32(val: u32) -> Self {
|
||||
assert!(val < NUM_PATTERNS);
|
||||
unsafe { std::mem::transmute(val) }
|
||||
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
|
||||
@@ -251,10 +251,11 @@
|
||||
BatchKind::Quad(PatternKind::TextureExternalBT709) => GPU_TAG_PRIMITIVE,
|
||||
BatchKind::Quad(PatternKind::TextureRect) => GPU_TAG_PRIMITIVE,
|
||||
BatchKind::Quad(PatternKind::Gradient) => GPU_TAG_GRADIENT,
|
||||
BatchKind::Quad(PatternKind::Repeat) => GPU_TAG_REPEAT,
|
||||
BatchKind::Quad(PatternKind::BoxShadow) => GPU_TAG_PRIMITIVE,
|
||||
+ BatchKind::Quad(PatternKind::BoxShadowSuperellipse) => GPU_TAG_PRIMITIVE,
|
||||
BatchKind::Quad(PatternKind::Yuv) => GPU_TAG_BRUSH_YUV_IMAGE,
|
||||
BatchKind::Quad(PatternKind::YuvTextureExternal) => GPU_TAG_BRUSH_YUV_IMAGE,
|
||||
BatchKind::Quad(PatternKind::YuvTextureExternalBT709) => GPU_TAG_BRUSH_YUV_IMAGE,
|
||||
BatchKind::Quad(PatternKind::YuvTextureRect) => GPU_TAG_BRUSH_YUV_IMAGE,
|
||||
BatchKind::Quad(PatternKind::Backdrop) => GPU_TAG_PRIMITIVE,
|
||||
diff --git a/gfx/wr/webrender/src/renderer/shade.rs b/gfx/wr/webrender/src/renderer/shade.rs
|
||||
--- a/gfx/wr/webrender/src/renderer/shade.rs
|
||||
+++ b/gfx/wr/webrender/src/renderer/shade.rs
|
||||
@@ -438,10 +438,11 @@
|
||||
ps_quad_textured_external_bt709: Option<ShaderHandle>,
|
||||
ps_quad_textured_rect: Option<ShaderHandle>,
|
||||
ps_quad_repeat: ShaderHandle,
|
||||
ps_quad_gradient: ShaderHandle,
|
||||
ps_quad_box_shadow: ShaderHandle,
|
||||
+ ps_quad_box_shadow_superellipse: ShaderHandle,
|
||||
// ps_quad_yuv, like ps_quad_textured, comes in sampler-type-specific
|
||||
// variants so the YUV planes are sampled with the matching sColor
|
||||
// declaration. The variant is selected via PatternKind.
|
||||
ps_quad_yuv: ShaderHandle,
|
||||
ps_quad_yuv_external: Option<ShaderHandle>,
|
||||
@@ -651,10 +652,17 @@
|
||||
"ps_quad_box_shadow",
|
||||
&[],
|
||||
&shader_list,
|
||||
)?;
|
||||
|
||||
+ let ps_quad_box_shadow_superellipse = loader.create_shader(
|
||||
+ ShaderKind::Primitive,
|
||||
+ "ps_quad_box_shadow",
|
||||
+ &[SUPERELLIPSE_FEATURE],
|
||||
+ &shader_list,
|
||||
+ )?;
|
||||
+
|
||||
let ps_quad_yuv = loader.create_shader(
|
||||
ShaderKind::Primitive,
|
||||
"ps_quad_yuv",
|
||||
&["TEXTURE_2D"],
|
||||
&shader_list,
|
||||
@@ -786,10 +794,11 @@
|
||||
ps_quad_textured_external_bt709,
|
||||
ps_quad_textured_rect,
|
||||
ps_quad_repeat,
|
||||
ps_quad_gradient,
|
||||
ps_quad_box_shadow,
|
||||
+ ps_quad_box_shadow_superellipse,
|
||||
ps_quad_yuv,
|
||||
ps_quad_yuv_external,
|
||||
ps_quad_yuv_external_bt709,
|
||||
ps_quad_yuv_rect,
|
||||
ps_quad_backdrop,
|
||||
@@ -867,10 +876,11 @@
|
||||
PatternKind::TextureRect => self.ps_quad_textured_rect
|
||||
.expect("bug: ps_quad_textured TEXTURE_RECT variant not loaded"),
|
||||
PatternKind::Gradient => self.ps_quad_gradient,
|
||||
PatternKind::Repeat => self.ps_quad_repeat,
|
||||
PatternKind::BoxShadow => self.ps_quad_box_shadow,
|
||||
+ PatternKind::BoxShadowSuperellipse => self.ps_quad_box_shadow_superellipse,
|
||||
PatternKind::Yuv => self.ps_quad_yuv,
|
||||
PatternKind::YuvTextureExternal => self.ps_quad_yuv_external
|
||||
.expect("bug: ps_quad_yuv TEXTURE_EXTERNAL variant not loaded"),
|
||||
PatternKind::YuvTextureExternalBT709 => self.ps_quad_yuv_external_bt709
|
||||
.expect("bug: ps_quad_yuv TEXTURE_EXTERNAL_BT709 variant not loaded"),
|
||||
@@ -923,10 +933,13 @@
|
||||
self.ps_quad_repeat
|
||||
}
|
||||
BatchKind::Quad(PatternKind::BoxShadow) => {
|
||||
self.ps_quad_box_shadow
|
||||
}
|
||||
+ BatchKind::Quad(PatternKind::BoxShadowSuperellipse) => {
|
||||
+ self.ps_quad_box_shadow_superellipse
|
||||
+ }
|
||||
BatchKind::Quad(PatternKind::Yuv) => {
|
||||
self.ps_quad_yuv
|
||||
}
|
||||
BatchKind::Quad(PatternKind::YuvTextureExternal) => {
|
||||
self.ps_quad_yuv_external
|
||||
diff --git a/gfx/wr/webrender_build/src/shader_features.rs b/gfx/wr/webrender_build/src/shader_features.rs
|
||||
--- a/gfx/wr/webrender_build/src/shader_features.rs
|
||||
+++ b/gfx/wr/webrender_build/src/shader_features.rs
|
||||
@@ -166,11 +166,11 @@
|
||||
}
|
||||
shaders.insert("ps_quad_textured", ps_quad_textured_features);
|
||||
|
||||
shaders.insert("ps_quad_repeat", vec![base_prim_features.finish()]);
|
||||
|
||||
- shaders.insert("ps_quad_box_shadow", vec![base_prim_features.finish()]);
|
||||
+ shaders.insert("ps_quad_box_shadow", vec![base_prim_features.finish(), "SUPERELLIPSE".to_string()]);
|
||||
|
||||
// Like ps_quad_textured, ps_quad_yuv needs per-texture-kind variants so that
|
||||
// the YUV planes are sampled with the correct sampler type.
|
||||
let mut ps_quad_yuv_features: Vec<String> = vec!["TEXTURE_2D".to_string()];
|
||||
if flags.contains(ShaderFeatureFlags::GL) {
|
||||
|
||||
560
src/external-patches/firefox/bug_2063169/D319869.patch
Normal file
560
src/external-patches/firefox/bug_2063169/D319869.patch
Normal file
@@ -0,0 +1,560 @@
|
||||
diff --git a/gfx/wr/webrender/res/border_shared.glsl b/gfx/wr/webrender/res/border_shared.glsl
|
||||
--- a/gfx/wr/webrender/res/border_shared.glsl
|
||||
+++ b/gfx/wr/webrender/res/border_shared.glsl
|
||||
@@ -27,25 +27,33 @@
|
||||
vec4 rect;
|
||||
vec4 color0;
|
||||
vec4 color1;
|
||||
vec2 widths;
|
||||
vec2 radii;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
float shape;
|
||||
vec2 shape_offset;
|
||||
vec2 inset;
|
||||
+#endif
|
||||
};
|
||||
|
||||
BorderInstanceGpuData fetch_gpu_data(int index) {
|
||||
BorderInstanceGpuData data;
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vec4 texels[6] = fetch_from_gpu_buffer_6f(index);
|
||||
+#else
|
||||
+ vec4 texels[4] = fetch_from_gpu_buffer_4f(index);
|
||||
+#endif
|
||||
data.rect = texels[0];
|
||||
data.color0 = texels[1];
|
||||
data.color1 = texels[2];
|
||||
data.widths = texels[3].xy;
|
||||
data.radii = texels[3].zw;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
data.shape = texels[4].x;
|
||||
data.shape_offset = texels[4].yz;
|
||||
data.inset = texels[5].xy;
|
||||
+#endif
|
||||
|
||||
return data;
|
||||
}
|
||||
diff --git a/gfx/wr/webrender/res/cs_border_segment.glsl b/gfx/wr/webrender/res/cs_border_segment.glsl
|
||||
--- a/gfx/wr/webrender/res/cs_border_segment.glsl
|
||||
+++ b/gfx/wr/webrender/res/cs_border_segment.glsl
|
||||
@@ -30,11 +30,13 @@
|
||||
flat varying highp vec4 vClipCenter_Sign;
|
||||
|
||||
// An outer and inner elliptical radii for border
|
||||
// corner clipping.
|
||||
flat varying highp vec4 vClipRadii;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
flat varying highp vec4 vClipOffsets;
|
||||
+#endif
|
||||
|
||||
// Reference point for determine edge clip lines.
|
||||
flat varying highp vec4 vEdgeReference;
|
||||
|
||||
// Stores widths/2 and widths/3 to save doing this in FS.
|
||||
@@ -192,26 +194,34 @@
|
||||
vColor00 = color0[0];
|
||||
vColor01 = color0[1];
|
||||
vec4[2] color1 = get_colors_for_side(data.color1, style1);
|
||||
vColor10 = color1[0];
|
||||
vColor11 = color1[1];
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vClipCenter_Sign = vec4(outer + clip_sign * (data.radii + data.shape_offset), clip_sign);
|
||||
+#else
|
||||
+ vClipCenter_Sign = vec4(outer + clip_sign * data.radii, clip_sign);
|
||||
+#endif
|
||||
vClipRadii = vec4(data.radii, max(data.radii - data.widths, 0.0));
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vClipOffsets = vec4(0.0);
|
||||
+#endif
|
||||
vColorLine = vec4(outer, data.widths.y * -clip_sign.y, data.widths.x * clip_sign.x);
|
||||
vEdgeReference = vec4(edge_reference, edge_reference + data.widths);
|
||||
vClipParams1 = aClipParams1;
|
||||
vClipParams2 = aClipParams2;
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
if (data.shape != 1.0)
|
||||
{
|
||||
vec2 reference_radii = (data.radii == vec2(0.0)) ? vec2(0.0) : data.radii + data.inset;
|
||||
vec4 contour1 = compute_contoured_superellipse(reference_radii, data.shape, data.inset);
|
||||
vec4 contour2 = compute_contoured_superellipse(reference_radii, data.shape, data.inset + data.widths);
|
||||
vClipOffsets = vec4(contour1.xy, contour2.xy);
|
||||
vClipRadii = vec4(contour1.zw, contour2.zw);
|
||||
}
|
||||
+#endif
|
||||
|
||||
// For the case of dot and dash clips, optimize the number of pixels that
|
||||
// are hit to just include the dot itself.
|
||||
if (clip_mode == CLIP_DOT) {
|
||||
float radius = aClipParams1.z;
|
||||
@@ -258,19 +268,22 @@
|
||||
// also 0.67 of the radii. Use these to form a
|
||||
// SDF subtraction which will clip out the inside
|
||||
// third of the rounded edge.
|
||||
float d_radii_a;
|
||||
float d_radii_b;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
if (data.shape == 1.0) {
|
||||
+#endif
|
||||
d_radii_a = distance_to_ellipse(
|
||||
clip_relative_pos,
|
||||
clip_radii.xy - vPartialWidths.xy
|
||||
);
|
||||
d_radii_b = distance_to_ellipse(
|
||||
clip_relative_pos,
|
||||
clip_radii.xy - 2.0 * vPartialWidths.xy
|
||||
);
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
} else {
|
||||
d_radii_a = distance_to_superellipse(
|
||||
clip_relative_pos - mix(vClipOffsets.xy, vClipOffsets.zw, 1.0 / 3.0),
|
||||
mix(clip_radii.xy, clip_radii.zw, 1.0 / 3.0),
|
||||
data.shape
|
||||
@@ -286,24 +299,28 @@
|
||||
d_radii_a = max(d_radii_a, -min(included_region_a.x, included_region_a.y));
|
||||
|
||||
vec2 included_region_b = data.radii - 2.0 * vPartialWidths.xy - clip_relative_pos;
|
||||
d_radii_b = max(d_radii_b, -min(included_region_b.x, included_region_b.y));
|
||||
}
|
||||
+#endif
|
||||
|
||||
float d = min(-d_radii_a, d_radii_b);
|
||||
|
||||
color0 *= distance_aa(aa_range, d);
|
||||
break;
|
||||
}
|
||||
case BORDER_STYLE_GROOVE:
|
||||
case BORDER_STYLE_RIDGE: {
|
||||
float d;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
if (data.shape == 1.0) {
|
||||
+#endif
|
||||
d = distance_to_ellipse(
|
||||
clip_relative_pos,
|
||||
clip_radii.xy - vPartialWidths.zw
|
||||
);
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
} else {
|
||||
d = distance_to_superellipse(
|
||||
clip_relative_pos - mix(vClipOffsets.xy, vClipOffsets.zw, 0.5),
|
||||
mix(clip_radii.xy, clip_radii.zw, 0.5),
|
||||
data.shape
|
||||
@@ -311,10 +328,11 @@
|
||||
|
||||
// Clamp to the middle of the adjacent borders
|
||||
vec2 included_region = data.radii - vPartialWidths.zw - clip_relative_pos;
|
||||
d = max(d, -min(included_region.x, included_region.y));
|
||||
}
|
||||
+#endif
|
||||
float alpha = distance_aa(aa_range, d);
|
||||
float swizzled_factor;
|
||||
switch (segment) {
|
||||
case SEGMENT_TOP_LEFT: swizzled_factor = 0.0; break;
|
||||
case SEGMENT_TOP_RIGHT: swizzled_factor = mix_factor; break;
|
||||
@@ -435,22 +453,26 @@
|
||||
|
||||
if (in_clip_region) {
|
||||
float d_radii_a;
|
||||
float d_radii_b;
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
if (data.shape == 1.0) {
|
||||
+#endif
|
||||
d_radii_a = distance_to_ellipse(clip_relative_pos, vClipRadii.xy);
|
||||
d_radii_b = distance_to_ellipse(clip_relative_pos, vClipRadii.zw);
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
} else {
|
||||
clip_relative_pos = abs(clip_relative_pos) - data.shape_offset;
|
||||
d_radii_a = distance_to_superellipse(clip_relative_pos - vClipOffsets.xy, vClipRadii.xy, data.shape);
|
||||
d_radii_b = distance_to_superellipse(clip_relative_pos - vClipOffsets.zw, vClipRadii.zw, data.shape);
|
||||
|
||||
// exclude the straight border part from the subtracted region
|
||||
vec2 included_region = data.radii - data.widths - clip_relative_pos;
|
||||
d_radii_b = max(d_radii_b, -min(included_region.x, included_region.y));
|
||||
}
|
||||
+#endif
|
||||
|
||||
float d_radii = max(d_radii_a, -d_radii_b);
|
||||
d = max(d, d_radii);
|
||||
|
||||
color0 = evaluate_color_for_style_in_corner(
|
||||
diff --git a/gfx/wr/webrender/res/cs_border_solid.glsl b/gfx/wr/webrender/res/cs_border_solid.glsl
|
||||
--- a/gfx/wr/webrender/res/cs_border_solid.glsl
|
||||
+++ b/gfx/wr/webrender/res/cs_border_solid.glsl
|
||||
@@ -31,11 +31,13 @@
|
||||
flat varying highp vec4 vClipCenter_Sign;
|
||||
|
||||
// An outer and inner elliptical radii for border
|
||||
// corner clipping.
|
||||
flat varying highp vec4 vClipRadii;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
flat varying highp vec4 vClipOffsets;
|
||||
+#endif
|
||||
|
||||
// Position, scale, and radii of horizontally and vertically adjacent corner clips.
|
||||
flat varying highp vec4 vHorizontalClipCenter_Sign;
|
||||
flat varying highp vec2 vHorizontalClipRadii;
|
||||
flat varying highp vec4 vVerticalClipCenter_Sign;
|
||||
@@ -74,11 +76,11 @@
|
||||
void main(void) {
|
||||
BorderInstanceGpuData data = fetch_gpu_data(aGpuDataAddress);
|
||||
vGpuDataAddress.x = aGpuDataAddress;
|
||||
|
||||
int segment = aFlags & 0xff;
|
||||
- bool do_aa = ((aFlags >> 24) & 0xf0) != 0;
|
||||
+ bool do_aa = ((aFlags >> 28) & 0x1) != 0;
|
||||
|
||||
vec2 outer_scale = get_outer_corner_scale(segment);
|
||||
vec2 size = data.rect.zw - data.rect.xy;
|
||||
vec2 outer = outer_scale * size;
|
||||
vec2 clip_sign = 1.0 - 2.0 * outer_scale;
|
||||
@@ -100,23 +102,31 @@
|
||||
vMixColors.x = mix_colors;
|
||||
vPos = size * aPosition.xy;
|
||||
|
||||
vColor0 = data.color0;
|
||||
vColor1 = data.color1;
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vClipCenter_Sign = vec4(outer + clip_sign * (data.radii + data.shape_offset), clip_sign);
|
||||
+#else
|
||||
+ vClipCenter_Sign = vec4(outer + clip_sign * data.radii, clip_sign);
|
||||
+#endif
|
||||
vClipRadii = vec4(data.radii, max(data.radii - data.widths, 0.0));
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
vClipOffsets = vec4(0.0);
|
||||
+#endif
|
||||
vColorLine = vec4(outer, data.widths.y * -clip_sign.y, data.widths.x * clip_sign.x);
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
if (data.shape != 1.0)
|
||||
{
|
||||
vec2 reference_radii = (data.radii == vec2(0.0)) ? vec2(0.0) : data.radii + data.inset;
|
||||
vec4 contour1 = compute_contoured_superellipse(reference_radii, data.shape, data.inset);
|
||||
vec4 contour2 = compute_contoured_superellipse(reference_radii, data.shape, data.inset + data.widths);
|
||||
vClipOffsets = vec4(contour1.xy, contour2.xy);
|
||||
vClipRadii = vec4(contour1.zw, contour2.zw);
|
||||
}
|
||||
+#endif
|
||||
|
||||
vec2 horizontal_clip_sign = vec2(-clip_sign.x, clip_sign.y);
|
||||
vHorizontalClipCenter_Sign = vec4(aClipParams1.xy +
|
||||
horizontal_clip_sign * aClipParams1.zw,
|
||||
horizontal_clip_sign);
|
||||
@@ -156,22 +166,26 @@
|
||||
float d = -1.0;
|
||||
if (in_clip_region) {
|
||||
float d_radii_a;
|
||||
float d_radii_b;
|
||||
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
if (data.shape == 1.0) {
|
||||
+#endif
|
||||
d_radii_a = distance_to_ellipse(clip_relative_pos, vClipRadii.xy);
|
||||
d_radii_b = distance_to_ellipse(clip_relative_pos, vClipRadii.zw);
|
||||
+#ifdef WR_FEATURE_SUPERELLIPSE
|
||||
} else {
|
||||
clip_relative_pos = abs(clip_relative_pos) - data.shape_offset;
|
||||
d_radii_a = distance_to_superellipse(clip_relative_pos - vClipOffsets.xy, vClipRadii.xy, data.shape);
|
||||
d_radii_b = distance_to_superellipse(clip_relative_pos - vClipOffsets.zw, vClipRadii.zw, data.shape);
|
||||
|
||||
// exclude the straight border part from the subtracted region
|
||||
vec2 included_region = data.radii - data.widths - clip_relative_pos;
|
||||
d_radii_b = max(d_radii_b, -min(included_region.x, included_region.y));
|
||||
}
|
||||
+#endif
|
||||
|
||||
d = max(d_radii_a, -d_radii_b);
|
||||
}
|
||||
|
||||
// And again for horizontally-adjacent corner
|
||||
diff --git a/gfx/wr/webrender/src/border.rs b/gfx/wr/webrender/src/border.rs
|
||||
--- a/gfx/wr/webrender/src/border.rs
|
||||
+++ b/gfx/wr/webrender/src/border.rs
|
||||
@@ -855,14 +855,17 @@
|
||||
h_adjacent_corner_radius: DeviceSize,
|
||||
v_adjacent_corner_outer: DevicePoint,
|
||||
v_adjacent_corner_radius: DeviceSize,
|
||||
gpu_buffer_builder: &mut GpuBufferBuilderF,
|
||||
) {
|
||||
+ let superellipse = shape != 1.0;
|
||||
+
|
||||
let base_flags = (segment as i32) |
|
||||
((style0 as i32) << 8) |
|
||||
((style1 as i32) << 16) |
|
||||
- ((do_aa as i32) << 28);
|
||||
+ ((do_aa as i32) << 28) |
|
||||
+ ((superellipse as i32) << 29);
|
||||
|
||||
let instance_gpu_data = BorderInstanceGpuData {
|
||||
local_rect: task_rect,
|
||||
color0: color0.premultiplied(),
|
||||
color1: color1.premultiplied(),
|
||||
@@ -875,11 +878,11 @@
|
||||
|
||||
let base_instance = BorderInstance {
|
||||
task_origin: DevicePoint::zero(),
|
||||
flags: base_flags,
|
||||
clip_params: [0.0; 8],
|
||||
- gpu_data_address: instance_gpu_data.write(gpu_buffer_builder)
|
||||
+ gpu_data_address: instance_gpu_data.write(superellipse, gpu_buffer_builder)
|
||||
};
|
||||
|
||||
match segment {
|
||||
BorderSegment::TopLeft |
|
||||
BorderSegment::TopRight |
|
||||
diff --git a/gfx/wr/webrender/src/gpu_types.rs b/gfx/wr/webrender/src/gpu_types.rs
|
||||
--- a/gfx/wr/webrender/src/gpu_types.rs
|
||||
+++ b/gfx/wr/webrender/src/gpu_types.rs
|
||||
@@ -192,18 +192,21 @@
|
||||
pub shape_offset: DeviceSize,
|
||||
pub inset: DeviceSize,
|
||||
}
|
||||
|
||||
impl BorderInstanceGpuData {
|
||||
- pub fn write(&self, gpu_buffer_builder: &mut GpuBufferBuilderF) -> GpuBufferAddress {
|
||||
- let mut writer = gpu_buffer_builder.write_blocks(6);
|
||||
+ pub fn write(&self, superellipse: bool, gpu_buffer_builder: &mut GpuBufferBuilderF) -> GpuBufferAddress {
|
||||
+ let block_count = if superellipse { 6 } else { 4 };
|
||||
+ let mut writer = gpu_buffer_builder.write_blocks(block_count);
|
||||
writer.push_one(self.local_rect);
|
||||
writer.push_one(self.color0);
|
||||
writer.push_one(self.color1);
|
||||
writer.push_one([self.widths.width, self.widths.height, self.radius.width, self.radius.height]);
|
||||
- writer.push_one([self.shape, self.shape_offset.width, self.shape_offset.height, 0.0]);
|
||||
- writer.push_one([self.inset.width, self.inset.height, 0.0, 0.0]);
|
||||
+ if superellipse {
|
||||
+ writer.push_one([self.shape, self.shape_offset.width, self.shape_offset.height, 0.0]);
|
||||
+ writer.push_one([self.inset.width, self.inset.height, 0.0, 0.0]);
|
||||
+ }
|
||||
|
||||
writer.finish()
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/gfx/wr/webrender/src/render_target.rs b/gfx/wr/webrender/src/render_target.rs
|
||||
--- a/gfx/wr/webrender/src/render_target.rs
|
||||
+++ b/gfx/wr/webrender/src/render_target.rs
|
||||
@@ -33,10 +33,11 @@
|
||||
use crate::spatial_tree::SpatialNodeIndex;
|
||||
|
||||
|
||||
const STYLE_SOLID: i32 = ((BorderStyle::Solid as i32) << 8) | ((BorderStyle::Solid as i32) << 16);
|
||||
const STYLE_MASK: i32 = 0x00FF_FF00;
|
||||
+const SUPERELLIPSE_MASK: i32 = 1 << 29;
|
||||
|
||||
/// A tag used to identify the output format of a `RenderTarget`.
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
#[cfg_attr(feature = "capture", derive(Serialize))]
|
||||
#[cfg_attr(feature = "replay", derive(Deserialize))]
|
||||
@@ -163,10 +164,12 @@
|
||||
|
||||
pub clip_masks: ClipMaskInstanceList,
|
||||
|
||||
pub border_segments_complex: FrameVec<BorderInstance>,
|
||||
pub border_segments_solid: FrameVec<BorderInstance>,
|
||||
+ pub border_segments_complex_superellipse: FrameVec<BorderInstance>,
|
||||
+ pub border_segments_solid_superellipse: FrameVec<BorderInstance>,
|
||||
pub line_decorations: FrameVec<LineDecorationJob>,
|
||||
|
||||
// Clearing render targets has a fair amount of special cases.
|
||||
// The general rules are:
|
||||
// - Depth (for at least the used potion of the target) is always cleared if it
|
||||
@@ -223,10 +226,12 @@
|
||||
prim_instances: std::array::from_fn(|_| FastHashMap::default()),
|
||||
prim_instances_with_scissor: FastHashMap::default(),
|
||||
clip_masks: ClipMaskInstanceList::new(memory),
|
||||
border_segments_complex: memory.new_vec(),
|
||||
border_segments_solid: memory.new_vec(),
|
||||
+ border_segments_complex_superellipse: memory.new_vec(),
|
||||
+ border_segments_solid_superellipse: memory.new_vec(),
|
||||
clears: memory.new_vec(),
|
||||
line_decorations: memory.new_vec(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,14 +552,23 @@
|
||||
let instances = task_info.instances.clone();
|
||||
for mut instance in instances {
|
||||
// TODO(gw): It may be better to store the task origin in
|
||||
// the render task data instead of per instance.
|
||||
instance.task_origin = task_origin;
|
||||
+ let superellipse = (instance.flags & SUPERELLIPSE_MASK) != 0;
|
||||
if instance.flags & STYLE_MASK == STYLE_SOLID {
|
||||
- self.border_segments_solid.push(instance);
|
||||
+ if superellipse {
|
||||
+ self.border_segments_solid_superellipse.push(instance);
|
||||
+ } else {
|
||||
+ self.border_segments_solid.push(instance);
|
||||
+ }
|
||||
} else {
|
||||
- self.border_segments_complex.push(instance);
|
||||
+ if superellipse {
|
||||
+ self.border_segments_complex_superellipse.push(instance);
|
||||
+ } else {
|
||||
+ self.border_segments_complex.push(instance);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
RenderTaskKind::Image(..) |
|
||||
RenderTaskKind::Cached(..) |
|
||||
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
|
||||
@@ -3394,11 +3394,13 @@
|
||||
draw_target,
|
||||
);
|
||||
|
||||
// Draw any borders for this target.
|
||||
if !target.border_segments_solid.is_empty() ||
|
||||
- !target.border_segments_complex.is_empty()
|
||||
+ !target.border_segments_complex.is_empty() ||
|
||||
+ !target.border_segments_solid_superellipse.is_empty() ||
|
||||
+ !target.border_segments_complex_superellipse.is_empty()
|
||||
{
|
||||
let _timer = self.gpu_profiler.start_timer(GPU_TAG_CACHE_BORDER);
|
||||
|
||||
self.set_blend(true, FramebufferKind::Other);
|
||||
self.set_blend_mode_premultiplied_alpha(FramebufferKind::Other);
|
||||
@@ -3437,10 +3439,46 @@
|
||||
&BatchTextures::empty(),
|
||||
stats,
|
||||
);
|
||||
}
|
||||
|
||||
+ if !target.border_segments_solid_superellipse.is_empty() {
|
||||
+ self.shaders.borrow_mut().cs_border_solid_superellipse().bind(
|
||||
+ &mut self.device,
|
||||
+ &projection,
|
||||
+ None,
|
||||
+ &mut self.renderer_errors,
|
||||
+ &mut self.profile,
|
||||
+ &mut self.command_log,
|
||||
+ );
|
||||
+
|
||||
+ self.draw_instanced_batch(
|
||||
+ &target.border_segments_solid_superellipse,
|
||||
+ VertexArrayKind::Border,
|
||||
+ &BatchTextures::empty(),
|
||||
+ stats,
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ if !target.border_segments_complex_superellipse.is_empty() {
|
||||
+ self.shaders.borrow_mut().cs_border_segment_superellipse().bind(
|
||||
+ &mut self.device,
|
||||
+ &projection,
|
||||
+ None,
|
||||
+ &mut self.renderer_errors,
|
||||
+ &mut self.profile,
|
||||
+ &mut self.command_log,
|
||||
+ );
|
||||
+
|
||||
+ self.draw_instanced_batch(
|
||||
+ &target.border_segments_complex_superellipse,
|
||||
+ VertexArrayKind::Border,
|
||||
+ &BatchTextures::empty(),
|
||||
+ stats,
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
self.set_blend(false, FramebufferKind::Other);
|
||||
}
|
||||
|
||||
// Draw any line decorations for this target.
|
||||
if !target.line_decorations.is_empty() {
|
||||
diff --git a/gfx/wr/webrender/src/renderer/shade.rs b/gfx/wr/webrender/src/renderer/shade.rs
|
||||
--- a/gfx/wr/webrender/src/renderer/shade.rs
|
||||
+++ b/gfx/wr/webrender/src/renderer/shade.rs
|
||||
@@ -413,10 +413,12 @@
|
||||
// draw intermediate results to cache targets. The results
|
||||
// of these shaders are then used by the primitive shaders.
|
||||
cs_blur_rgba8: ShaderHandle,
|
||||
cs_border_segment: ShaderHandle,
|
||||
cs_border_solid: ShaderHandle,
|
||||
+ cs_border_segment_superellipse: ShaderHandle,
|
||||
+ cs_border_solid_superellipse: ShaderHandle,
|
||||
cs_scale: Vec<Option<ShaderHandle>>,
|
||||
cs_line_decoration: ShaderHandle,
|
||||
cs_svg_filter_node: ShaderHandle,
|
||||
|
||||
// The are "primitive shaders". These shaders draw and blend
|
||||
@@ -774,19 +776,35 @@
|
||||
"cs_border_solid",
|
||||
&[],
|
||||
&shader_list,
|
||||
)?;
|
||||
|
||||
+ let cs_border_segment_superellipse = loader.create_shader(
|
||||
+ ShaderKind::Cache(VertexArrayKind::Border),
|
||||
+ "cs_border_segment",
|
||||
+ &[SUPERELLIPSE_FEATURE],
|
||||
+ &shader_list,
|
||||
+ )?;
|
||||
+
|
||||
+ let cs_border_solid_superellipse = loader.create_shader(
|
||||
+ ShaderKind::Cache(VertexArrayKind::Border),
|
||||
+ "cs_border_solid",
|
||||
+ &[SUPERELLIPSE_FEATURE],
|
||||
+ &shader_list,
|
||||
+ )?;
|
||||
+
|
||||
let composite = CompositorShaders::new(device, gl_type, &mut loader)?;
|
||||
|
||||
Ok(Shaders {
|
||||
loader,
|
||||
|
||||
cs_blur_rgba8,
|
||||
cs_border_segment,
|
||||
- cs_line_decoration,
|
||||
cs_border_solid,
|
||||
+ cs_border_segment_superellipse,
|
||||
+ cs_border_solid_superellipse,
|
||||
+ cs_line_decoration,
|
||||
cs_scale,
|
||||
cs_svg_filter_node,
|
||||
ps_text_run,
|
||||
ps_text_run_dual_source,
|
||||
ps_quad_textured,
|
||||
@@ -979,10 +997,12 @@
|
||||
}
|
||||
|
||||
pub fn cs_blur_rgba8(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.cs_blur_rgba8) }
|
||||
pub fn cs_border_segment(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.cs_border_segment) }
|
||||
pub fn cs_border_solid(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.cs_border_solid) }
|
||||
+ pub fn cs_border_segment_superellipse(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.cs_border_segment_superellipse) }
|
||||
+ pub fn cs_border_solid_superellipse(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.cs_border_solid_superellipse) }
|
||||
pub fn cs_line_decoration(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.cs_line_decoration) }
|
||||
pub fn cs_svg_filter_node(&mut self) -> &mut LazilyCompiledShader { self.loader.get(self.cs_svg_filter_node) }
|
||||
pub fn ps_quad_textured(&mut self) -> &mut LazilyCompiledShader {
|
||||
self.loader.get(self.ps_quad_textured)
|
||||
}
|
||||
diff --git a/gfx/wr/webrender_build/src/shader_features.rs b/gfx/wr/webrender_build/src/shader_features.rs
|
||||
--- a/gfx/wr/webrender_build/src/shader_features.rs
|
||||
+++ b/gfx/wr/webrender_build/src/shader_features.rs
|
||||
@@ -69,17 +69,22 @@
|
||||
|
||||
shaders.insert("ps_quad_mask", vec![String::new(), "FAST_PATH".to_string(), "SUPERELLIPSE".to_string()]);
|
||||
|
||||
for name in &[
|
||||
"cs_line_decoration",
|
||||
- "cs_border_segment",
|
||||
- "cs_border_solid",
|
||||
"cs_svg_filter_node",
|
||||
] {
|
||||
shaders.insert(name, vec![String::new()]);
|
||||
}
|
||||
|
||||
+ for name in &[
|
||||
+ "cs_border_segment",
|
||||
+ "cs_border_solid",
|
||||
+ ] {
|
||||
+ shaders.insert(name, vec![String::new(), "SUPERELLIPSE".to_string()]);
|
||||
+ }
|
||||
+
|
||||
let mut base_prim_features = FeatureList::new();
|
||||
|
||||
let mut texture_types = vec!["TEXTURE_2D"];
|
||||
if flags.contains(ShaderFeatureFlags::GL) {
|
||||
texture_types.push("TEXTURE_RECT");
|
||||
|
||||
15
src/external-patches/firefox/bug_2063169/D320211.patch
Normal file
15
src/external-patches/firefox/bug_2063169/D320211.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/devtools/client/responsive/test/browser/browser.toml b/devtools/client/responsive/test/browser/browser.toml
|
||||
--- a/devtools/client/responsive/test/browser/browser.toml
|
||||
+++ b/devtools/client/responsive/test/browser/browser.toml
|
||||
@@ -275,7 +275,10 @@
|
||||
skip-if = [
|
||||
"os == 'win' && os_version == '11.26100' && arch == 'x86_64' && asan", # Bug 2016837
|
||||
]
|
||||
|
||||
["browser_window_sizing.js"]
|
||||
+skip-if = [
|
||||
+ "os == 'win' && opt && standalone", # Bug 2063169
|
||||
+]
|
||||
|
||||
["browser_zoom.js"]
|
||||
|
||||
34
src/external-patches/firefox/bug_2063169/D320568.patch
Normal file
34
src/external-patches/firefox/bug_2063169/D320568.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp
|
||||
--- a/layout/painting/nsDisplayList.cpp
|
||||
+++ b/layout/painting/nsDisplayList.cpp
|
||||
@@ -4606,12 +4606,12 @@
|
||||
wr::LayoutRect deviceClipRect = wr::ToLayoutRect(clipRect);
|
||||
|
||||
nscoord spread = shadow.spread.ToAppUnits();
|
||||
float spreadRadius = float(spread) / float(appUnitsPerDevPixel);
|
||||
|
||||
- wr::BorderRadius borderRadius{};
|
||||
- wr::BorderRadius shadowRadius{};
|
||||
+ wr::BorderRadius borderRadius = wr::EmptyBorderRadius();
|
||||
+ wr::BorderRadius shadowRadius = wr::EmptyBorderRadius();
|
||||
if (hasBorderRadius) {
|
||||
borderRadius = wr::ToBorderRadius(borderRadii);
|
||||
if (spreadRadius) {
|
||||
auto shadowRadii = borderRadii;
|
||||
shadowRadii.AdjustOutwards(
|
||||
@@ -4727,12 +4727,12 @@
|
||||
float(shadow.base.blur.ToAppUnits()) / float(appUnitsPerDevPixel);
|
||||
|
||||
nscoord spread = shadow.spread.ToAppUnits();
|
||||
float spreadRadius = spread / float(appUnitsPerDevPixel);
|
||||
|
||||
- wr::BorderRadius borderRadius{};
|
||||
- wr::BorderRadius shadowRadius{};
|
||||
+ wr::BorderRadius borderRadius = wr::EmptyBorderRadius();
|
||||
+ wr::BorderRadius shadowRadius = wr::EmptyBorderRadius();
|
||||
if (hasBorderRadius) {
|
||||
borderRadius = wr::ToBorderRadius(innerRadii);
|
||||
if (spreadRadius) {
|
||||
RectCornerRadii shadowRadii = innerRadii;
|
||||
shadowRadii.AdjustInwards(
|
||||
|
||||
53
src/external-patches/firefox/bug_2063169/D321282.patch
Normal file
53
src/external-patches/firefox/bug_2063169/D321282.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
diff --git a/gfx/wr/webrender/res/ps_quad_mask.glsl b/gfx/wr/webrender/res/ps_quad_mask.glsl
|
||||
--- a/gfx/wr/webrender/res/ps_quad_mask.glsl
|
||||
+++ b/gfx/wr/webrender/res/ps_quad_mask.glsl
|
||||
@@ -318,12 +318,30 @@
|
||||
#endif
|
||||
|
||||
vec4 clip_dist =
|
||||
mix(clip_rect, clip_rect.zwxy, lessThan(local_step, vec2(0.0)).xyxy)
|
||||
- local_pos0.xyxy;
|
||||
+
|
||||
+ // Half-width, in local units, of the band around an edge over which
|
||||
+ // distance_aa() produces partial coverage.
|
||||
+ float aa_band = 0.5 * recip(aa_range);
|
||||
+ // An axis the span does not step along has the same distance to its two
|
||||
+ // edges for every pixel of the span, so the inside/outside test below
|
||||
+ // cannot resolve an edge that runs parallel to the span and coverage ends
|
||||
+ // up quantized to whole spans. Grow the rect by the AA band so that a span
|
||||
+ // landing inside the band counts as inside, which leaves the corner
|
||||
+ // selection below unchanged, and remember that the span is only partially
|
||||
+ // covered so the opaque run can be dropped further down.
|
||||
+ // `inset` is the distance from the span to the nearer of an axis' two
|
||||
+ // edges, positive when the span is between them.
|
||||
+ vec2 inset = min(-clip_dist.xy, clip_dist.zw);
|
||||
+ bvec2 flat_axis = equal(local_step, vec2(0.0));
|
||||
+ bvec2 partial = lessThan(inset, vec2(aa_band));
|
||||
+ bool aa_span = (flat_axis.x && partial.x) || (flat_axis.y && partial.y);
|
||||
+
|
||||
clip_dist =
|
||||
- mix(1.0e6 * step(0.0, clip_dist),
|
||||
+ mix(1.0e6 * step(0.0, clip_dist - vec4(aa_band, aa_band, -aa_band, -aa_band)),
|
||||
clip_dist * recip(local_step).xyxy,
|
||||
notEqual(local_step, vec2(0.0)).xyxy);
|
||||
|
||||
float opaque_start = max(clip_dist.x, clip_dist.y);
|
||||
float opaque_end = min(clip_dist.z, clip_dist.w);
|
||||
@@ -404,10 +422,16 @@
|
||||
|
||||
aa_margin = max(aa_margin - max(aa_start - aa_end, 0.0), 0.0);
|
||||
aa_start -= aa_margin;
|
||||
aa_end += aa_margin;
|
||||
|
||||
+ if (aa_span) {
|
||||
+ // No pixel of the span is fully covered, so collapse the opaque run and
|
||||
+ // let the anti-aliased runs on either side of it cover the whole span.
|
||||
+ opaque_end = min(opaque_end, opaque_start);
|
||||
+ }
|
||||
+
|
||||
ivec4 steps = ivec4(clamp(
|
||||
swgl_SpanLength -
|
||||
swgl_StepSize *
|
||||
vec4(floor(aa_start), ceil(opaque_start), floor(opaque_end), ceil(aa_end)),
|
||||
0.0, swgl_SpanLength));
|
||||
|
||||
162
src/external-patches/firefox/issue_14710.patch
Normal file
162
src/external-patches/firefox/issue_14710.patch
Normal file
@@ -0,0 +1,162 @@
|
||||
diff --git a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
|
||||
--- a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
|
||||
+++ b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
|
||||
@@ -39,10 +39,16 @@
|
||||
const TOGGLE_POSITION_PREF =
|
||||
"media.videocontrols.picture-in-picture.video-toggle.position";
|
||||
const TOGGLE_POSITION_RIGHT = "right";
|
||||
const TOGGLE_POSITION_LEFT = "left";
|
||||
const RESIZE_MARGIN_PX = 16;
|
||||
+// Close reasons that should suppress auto-toggle when the originating tab is backgrounded
|
||||
+const DELIBERATE_CLOSE_REASONS = [
|
||||
+ "CloseButton",
|
||||
+ "ClosePlayerShortcut",
|
||||
+ "Shortcut",
|
||||
+];
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
lazy,
|
||||
"PIP_ENABLED",
|
||||
"media.videocontrols.picture-in-picture.enabled",
|
||||
@@ -119,10 +125,19 @@
|
||||
}
|
||||
case "PictureInPicture:VideoTabHidden": {
|
||||
if (!lazy.PIP_ENABLED || !lazy.PIP_WHEN_SWITCHING_TABS) {
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ // Suppress auto-toggle if the user deliberately closed this PiP window
|
||||
+ if (
|
||||
+ PictureInPicture.weakAutoPipBrowserClosedDeliberately.has(browser)
|
||||
+ ) {
|
||||
+ PictureInPicture.weakAutoPipBrowserClosedDeliberately.delete(browser);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
// If the tab is still selected, then we can ignore this event
|
||||
if (browser.documentGlobal.gBrowser.selectedBrowser == browser) {
|
||||
break;
|
||||
}
|
||||
let actor = browsingContext.currentWindowGlobal.getActor(
|
||||
@@ -261,10 +276,13 @@
|
||||
maxConcurrentPlayerCount: 0,
|
||||
|
||||
// Maps auto pip browser to PictureInPictureParent actor
|
||||
weakAutoPipBrowserToParent: new WeakMap(),
|
||||
|
||||
+ // Browsers with deliberately closed PiP windows; suppresses auto-toggle.
|
||||
+ weakAutoPipBrowserClosedDeliberately: new WeakSet(),
|
||||
+
|
||||
/**
|
||||
* Returns the player window if one exists and if it hasn't yet been closed.
|
||||
*
|
||||
* @param {PictureInPictureParent} pipActorRef
|
||||
* Reference to the calling PictureInPictureParent actor
|
||||
@@ -441,10 +459,20 @@
|
||||
},
|
||||
|
||||
onPipSwappedBrowsers(event) {
|
||||
let otherTab = event.detail;
|
||||
if (otherTab) {
|
||||
+ if (
|
||||
+ this.weakAutoPipBrowserClosedDeliberately.has(
|
||||
+ event.target.linkedBrowser
|
||||
+ )
|
||||
+ ) {
|
||||
+ this.weakAutoPipBrowserClosedDeliberately.add(otherTab.linkedBrowser);
|
||||
+ this.weakAutoPipBrowserClosedDeliberately.delete(
|
||||
+ event.target.linkedBrowser
|
||||
+ );
|
||||
+ }
|
||||
for (let win of Services.wm.getEnumerator(WINDOW_TYPE)) {
|
||||
if (this.weakWinToBrowser.get(win) === event.target.linkedBrowser) {
|
||||
this.weakWinToBrowser.set(win, otherTab.linkedBrowser);
|
||||
this.removePiPBrowserFromWeakMap(event.target.linkedBrowser);
|
||||
this.removeOriginatingWinFromWeakMap(event.target.linkedBrowser);
|
||||
@@ -899,10 +927,20 @@
|
||||
const { reason, actorRef } = closeData;
|
||||
const win = this.getWeakPipPlayer(actorRef);
|
||||
if (!win) {
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ const browser = this.weakWinToBrowser.get(win);
|
||||
+
|
||||
+ if (browser && DELIBERATE_CLOSE_REASONS.includes(reason)) {
|
||||
+ const tabbrowser = browser.getTabBrowser();
|
||||
+ if (tabbrowser && tabbrowser.selectedBrowser != browser) {
|
||||
+ PictureInPicture.weakAutoPipBrowserClosedDeliberately.add(browser);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
this.removePiPBrowserFromWeakMap(this.weakWinToBrowser.get(win));
|
||||
this.weakAutoPipBrowserToParent.delete(this.weakWinToBrowser.get(win));
|
||||
|
||||
Glean.pictureinpicture["closedMethod" + reason].record();
|
||||
await this.closePipWindow(win);
|
||||
diff --git a/toolkit/components/pictureinpicture/tests/browser_autotoggle.js b/toolkit/components/pictureinpicture/tests/browser_autotoggle.js
|
||||
--- a/toolkit/components/pictureinpicture/tests/browser_autotoggle.js
|
||||
+++ b/toolkit/components/pictureinpicture/tests/browser_autotoggle.js
|
||||
@@ -297,5 +297,61 @@
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
assertNoPiPWindowsOpen();
|
||||
}
|
||||
);
|
||||
});
|
||||
+
|
||||
+/**
|
||||
+ * Tests that closing a PiP window deliberately (via Shift+ESC) while the tab is backgrounded
|
||||
+ * suppresses auto-toggle, but auto-toggle works normally on the next background.
|
||||
+ */
|
||||
+add_task(async function autopip_suppress_on_deliberate_close() {
|
||||
+ await SpecialPowers.pushPrefEnv({
|
||||
+ set: [[ALWAYS_SHOW_PREF, true]],
|
||||
+ });
|
||||
+
|
||||
+ // Open a new window and save a handle for the first tab
|
||||
+ let win1 = await BrowserTestUtils.openNewBrowserWindow();
|
||||
+ let firstTab = win1.gBrowser.selectedTab;
|
||||
+
|
||||
+ // Open a new tab containing a video
|
||||
+ let pipTab = await BrowserTestUtils.openNewForegroundTab(
|
||||
+ win1.gBrowser,
|
||||
+ TEST_PAGE
|
||||
+ );
|
||||
+ let browser = pipTab.linkedBrowser;
|
||||
+
|
||||
+ // Ensure the video is playing
|
||||
+ let videoID = "with-controls";
|
||||
+ await ensureVideosReady(browser);
|
||||
+ await SpecialPowers.spawn(browser, [videoID], async videoID => {
|
||||
+ await content.document.getElementById(videoID).play();
|
||||
+ });
|
||||
+
|
||||
+ // Switch from the video tab to the first tab and check if the PiP window opened
|
||||
+ let domWindowOpened = BrowserTestUtils.domWindowOpenedAndLoaded(null);
|
||||
+ await BrowserTestUtils.switchTab(win1.gBrowser, firstTab);
|
||||
+ let pipWin = await domWindowOpened;
|
||||
+ ok(pipWin, "PiP window automatically opened.");
|
||||
+
|
||||
+ // Close the PiP window deliberately while the tab is backgrounded and check that it doesn't reopen
|
||||
+ domWindowOpened = BrowserTestUtils.domWindowOpenedAndLoaded(null);
|
||||
+ // A short delay is needed to make the test more robust
|
||||
+ // eslint-disable-next-line mozilla/no-arbitrary-setTimeout
|
||||
+ await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
+ EventUtils.synthesizeKey("KEY_Escape", { shiftKey: true }, pipWin);
|
||||
+ let reopened = await Promise.race([
|
||||
+ domWindowOpened.then(() => true),
|
||||
+ // eslint-disable-next-line mozilla/no-arbitrary-setTimeout
|
||||
+ new Promise(resolve => setTimeout(() => resolve(false), 2000)),
|
||||
+ ]);
|
||||
+ ok(!reopened, "PiP window should not reopen after deliberate close");
|
||||
+
|
||||
+ // Switch to the video tab and back to the first tab, which should automatically open the PiP window
|
||||
+ domWindowOpened = BrowserTestUtils.domWindowOpenedAndLoaded(null);
|
||||
+ await BrowserTestUtils.switchTab(win1.gBrowser, pipTab);
|
||||
+ await BrowserTestUtils.switchTab(win1.gBrowser, firstTab);
|
||||
+ pipWin = await domWindowOpened;
|
||||
+ ok(pipWin, "PiP window automatically opened.");
|
||||
+
|
||||
+ await BrowserTestUtils.closeWindow(win1);
|
||||
+});
|
||||
|
||||
154
src/external-patches/firefox/issue_15123.patch
Normal file
154
src/external-patches/firefox/issue_15123.patch
Normal file
@@ -0,0 +1,154 @@
|
||||
diff --git a/toolkit/modules/subprocess/subprocess_shared_unix.js b/toolkit/modules/subprocess/subprocess_shared_unix.js
|
||||
--- a/toolkit/modules/subprocess/subprocess_shared_unix.js
|
||||
+++ b/toolkit/modules/subprocess/subprocess_shared_unix.js
|
||||
@@ -52,16 +52,17 @@
|
||||
|
||||
close: [ctypes.default_abi, ctypes.int, ctypes.int /* fildes */],
|
||||
|
||||
dup: [ctypes.default_abi, ctypes.int, ctypes.int],
|
||||
|
||||
+ // Variadic arguments use a different calling convention on Apple silicon.
|
||||
fcntl: [
|
||||
ctypes.default_abi,
|
||||
ctypes.int,
|
||||
ctypes.int /* fildes */,
|
||||
ctypes.int /* cmd */,
|
||||
- ctypes.int /* ... */,
|
||||
+ "...",
|
||||
],
|
||||
|
||||
getcwd: [
|
||||
ctypes.default_abi,
|
||||
ctypes.char.ptr,
|
||||
diff --git a/toolkit/modules/subprocess/subprocess_unix.sys.mjs b/toolkit/modules/subprocess/subprocess_unix.sys.mjs
|
||||
--- a/toolkit/modules/subprocess/subprocess_unix.sys.mjs
|
||||
+++ b/toolkit/modules/subprocess/subprocess_unix.sys.mjs
|
||||
@@ -34,13 +34,13 @@
|
||||
throw new Error("Unable to create pipe");
|
||||
}
|
||||
|
||||
this.signalFd = fds[1];
|
||||
|
||||
- libc.fcntl(fds[0], LIBC.F_SETFL, LIBC.O_NONBLOCK);
|
||||
- libc.fcntl(fds[0], LIBC.F_SETFD, LIBC.FD_CLOEXEC);
|
||||
- libc.fcntl(fds[1], LIBC.F_SETFD, LIBC.FD_CLOEXEC);
|
||||
+ libc.fcntl(fds[0], LIBC.F_SETFL, ctypes.int(LIBC.O_NONBLOCK));
|
||||
+ libc.fcntl(fds[0], LIBC.F_SETFD, ctypes.int(LIBC.FD_CLOEXEC));
|
||||
+ libc.fcntl(fds[1], LIBC.F_SETFD, ctypes.int(LIBC.FD_CLOEXEC));
|
||||
|
||||
this.call("init", [{ signalFd: fds[0] }]);
|
||||
}
|
||||
|
||||
closePipe() {
|
||||
diff --git a/toolkit/modules/subprocess/subprocess_unix.worker.js b/toolkit/modules/subprocess/subprocess_unix.worker.js
|
||||
--- a/toolkit/modules/subprocess/subprocess_unix.worker.js
|
||||
+++ b/toolkit/modules/subprocess/subprocess_unix.worker.js
|
||||
@@ -349,13 +349,13 @@
|
||||
our_pipes.push(new InputPipe(this, fds[1]));
|
||||
} else {
|
||||
our_pipes.push(new OutputPipe(this, fds[1]));
|
||||
}
|
||||
|
||||
- libc.fcntl(fds[0], LIBC.F_SETFD, LIBC.FD_CLOEXEC);
|
||||
- libc.fcntl(fds[1], LIBC.F_SETFD, LIBC.FD_CLOEXEC);
|
||||
- libc.fcntl(fds[1], LIBC.F_SETFL, LIBC.O_NONBLOCK);
|
||||
+ libc.fcntl(fds[0], LIBC.F_SETFD, ctypes.int(LIBC.FD_CLOEXEC));
|
||||
+ libc.fcntl(fds[1], LIBC.F_SETFD, ctypes.int(LIBC.FD_CLOEXEC));
|
||||
+ libc.fcntl(fds[1], LIBC.F_SETFL, ctypes.int(LIBC.O_NONBLOCK));
|
||||
|
||||
return fds[0];
|
||||
};
|
||||
|
||||
their_pipes.set(0, pipe(false));
|
||||
diff --git a/toolkit/modules/subprocess/test/xpcshell/test_subprocess_pipe_flags.js b/toolkit/modules/subprocess/test/xpcshell/test_subprocess_pipe_flags.js
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/toolkit/modules/subprocess/test/xpcshell/test_subprocess_pipe_flags.js
|
||||
@@ -0,0 +1,73 @@
|
||||
+/* 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/. */
|
||||
+
|
||||
+"use strict";
|
||||
+
|
||||
+add_task(async function test_subprocess_pipe_flags() {
|
||||
+ const { Subprocess, getSubprocessImplForTest } = ChromeUtils.importESModule(
|
||||
+ "resource://gre/modules/Subprocess.sys.mjs"
|
||||
+ );
|
||||
+ const { ctypes } = ChromeUtils.importESModule(
|
||||
+ "resource://gre/modules/ctypes.sys.mjs"
|
||||
+ );
|
||||
+ const constants = ChromeUtils.getLibcConstants();
|
||||
+ const library = ctypes.open("a.out");
|
||||
+ const fcntl = library.declare(
|
||||
+ "fcntl",
|
||||
+ ctypes.default_abi,
|
||||
+ ctypes.int,
|
||||
+ ctypes.int,
|
||||
+ ctypes.int,
|
||||
+ "..."
|
||||
+ );
|
||||
+ // Darwin's fcntl commands for reading descriptor and file status flags.
|
||||
+ const F_GETFD = 1;
|
||||
+ const F_GETFL = 3;
|
||||
+ let process;
|
||||
+
|
||||
+ try {
|
||||
+ const worker = getSubprocessImplForTest().Process.getWorker();
|
||||
+ Assert.equal(
|
||||
+ fcntl(worker.signalFd, F_GETFD),
|
||||
+ constants.FD_CLOEXEC,
|
||||
+ "The main-thread signal pipe has exactly FD_CLOEXEC set"
|
||||
+ );
|
||||
+
|
||||
+ process = await Subprocess.call({
|
||||
+ command: "/bin/cat",
|
||||
+ stderr: "pipe",
|
||||
+ disclaim: true,
|
||||
+ });
|
||||
+ const fds = await worker.call("getFds", [process.id]);
|
||||
+ // Only inspect the descriptors while the worker owns them and cat is alive.
|
||||
+ // Exact flags also rule out an unintended FD_CLOFORK on macOS.
|
||||
+ for (const fd of fds) {
|
||||
+ Assert.equal(
|
||||
+ fcntl(fd, F_GETFD),
|
||||
+ constants.FD_CLOEXEC,
|
||||
+ "Worker pipes have exactly FD_CLOEXEC set"
|
||||
+ );
|
||||
+ Assert.equal(
|
||||
+ fcntl(fd, F_GETFL) & constants.O_NONBLOCK,
|
||||
+ constants.O_NONBLOCK,
|
||||
+ "Worker pipes are nonblocking"
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ const output = process.stdout.readString(5);
|
||||
+ await process.stdin.write("hello");
|
||||
+ Assert.equal(await output, "hello", "The subprocess pipes transfer data");
|
||||
+ await process.stdin.close();
|
||||
+ Assert.equal(
|
||||
+ (await process.wait()).exitCode,
|
||||
+ 0,
|
||||
+ "The subprocess exits cleanly"
|
||||
+ );
|
||||
+ } finally {
|
||||
+ if (process && process.exitCode === null) {
|
||||
+ await process.kill();
|
||||
+ }
|
||||
+ library.close();
|
||||
+ }
|
||||
+});
|
||||
diff --git a/toolkit/modules/subprocess/test/xpcshell/xpcshell.toml b/toolkit/modules/subprocess/test/xpcshell/xpcshell.toml
|
||||
--- a/toolkit/modules/subprocess/test/xpcshell/xpcshell.toml
|
||||
+++ b/toolkit/modules/subprocess/test/xpcshell/xpcshell.toml
|
||||
@@ -25,6 +25,9 @@
|
||||
["test_subprocess_pathSearch.js"]
|
||||
|
||||
["test_subprocess_perf.js"]
|
||||
requesttimeoutfactor = 2 # Slow on Windows
|
||||
|
||||
+["test_subprocess_pipe_flags.js"]
|
||||
+run-if = ["os == 'mac'"]
|
||||
+
|
||||
["test_subprocess_polling.js"]
|
||||
|
||||
32
src/external-patches/firefox/override_cert_checks_temp.patch
Normal file
32
src/external-patches/firefox/override_cert_checks_temp.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
diff --git a/toolkit/mozapps/update/common/registrycertificates.cpp b/toolkit/mozapps/update/common/registrycertificates.cpp
|
||||
index f7f5acdfa08879a0ff3095e15eebf7b436cf5092..5915141b3f4a6d3536841cc1040e70afe033e058 100644
|
||||
--- a/toolkit/mozapps/update/common/registrycertificates.cpp
|
||||
+++ b/toolkit/mozapps/update/common/registrycertificates.cpp
|
||||
@@ -33,9 +33,21 @@
|
||||
*
|
||||
* @return TRUE if the binary matches any of the allowed certificates.
|
||||
*/
|
||||
+// TEMPORARY: accept any binary without consulting the allowed-certificate
|
||||
+// values. Those values are only ever written by an installer run, so after a
|
||||
+// signing certificate change every existing install still names the previous
|
||||
+// certificate, the maintenance service refuses the newly signed binaries, and
|
||||
+// updates fall back to prompting for elevation every time. Remove this define
|
||||
+// and the block below once installs have been migrated.
|
||||
+#define ZEN_SKIP_ALLOWED_CERTIFICATE_CHECK 1
|
||||
+
|
||||
BOOL DoesBinaryMatchAllowedCertificates(LPCWSTR basePathForUpdate,
|
||||
LPCWSTR filePath,
|
||||
BOOL allowFallbackKeySkip) {
|
||||
+#ifdef ZEN_SKIP_ALLOWED_CERTIFICATE_CHECK
|
||||
+ LOG(("Skipping the allowed certificate check for \"%ls\"", filePath));
|
||||
+ return TRUE;
|
||||
+#else
|
||||
#ifdef DISABLE_UPDATER_AUTHENTICODE_CHECK
|
||||
if (allowFallbackKeySkip) {
|
||||
LOG_WARN(("Skipping authenticode check"));
|
||||
@@ -163,4 +175,5 @@ BOOL DoesBinaryMatchAllowedCertificates(LPCWSTR basePathForUpdate,
|
||||
RegCloseKey(baseKey);
|
||||
// No certificates match, :'(
|
||||
return FALSE;
|
||||
+#endif // ZEN_SKIP_ALLOWED_CERTIFICATE_CHECK
|
||||
}
|
||||
@@ -9,11 +9,8 @@
|
||||
},
|
||||
{
|
||||
"type": "phabricator",
|
||||
"id": "D284404",
|
||||
"name": "Add urlbar closeOnWindowBlur preference",
|
||||
"replaces": {
|
||||
"\n\n": "\n // may want to figure out a more robust way to detect abandonment."
|
||||
}
|
||||
"id": "D323933",
|
||||
"name": "Issue 15123"
|
||||
},
|
||||
{
|
||||
"type": "local",
|
||||
@@ -48,5 +45,30 @@
|
||||
"this._lastJsonLength = uncompressedBytes;": "this._lastJsonLength = uncompressedBytes.jsonLength;",
|
||||
" jsonLengthHint,": " lengthHint: jsonLengthHint,"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "phabricator",
|
||||
"id": "D320897",
|
||||
"name": "Bug 2011236"
|
||||
},
|
||||
{
|
||||
"type": "phabricator",
|
||||
"id": "D321446",
|
||||
"name": "Issue 14710"
|
||||
},
|
||||
{
|
||||
"type": "local",
|
||||
// Sorts before bug_2063169/ on purpose: D319869 builds on the border
|
||||
// shader hunks in here, and surfer applies patches in path order.
|
||||
"path": "firefox/bug_2047627_corner_shape_borders.patch"
|
||||
},
|
||||
{
|
||||
"type": "phabricator",
|
||||
"ids": ["D319577", "D319796", "D319869", "D320211", "D320568", "D321282"],
|
||||
"name": "Bug 2063169"
|
||||
},
|
||||
{
|
||||
"type": "local",
|
||||
"path": "firefox/override_cert_checks_temp.patch"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
diff --git a/layout/style/StyleColor.cpp b/layout/style/StyleColor.cpp
|
||||
index bbee32af30f35525730a10d0b242c0e8a8fe4695..a590fff105b30bc96fa7a0d8a8d3b1d5aa997e08 100644
|
||||
index f922f7fdacc7e1a14beb8da77b48aef3f6ae0b2b..47d19242baaf2a1f25ee07c6e210c839cc7b5089 100644
|
||||
--- a/layout/style/StyleColor.cpp
|
||||
+++ b/layout/style/StyleColor.cpp
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "mozilla/StyleColorInlines.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsStyleStruct.h"
|
||||
+#include "mozilla/nsZenBoostsBackend.h"
|
||||
#include "nsStyleUtil.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -96,23 +97,24 @@ StyleAbsoluteColor StyleColor::ResolveColor(
|
||||
@@ -98,23 +99,24 @@ StyleAbsoluteColor StyleColor::ResolveColor(
|
||||
|
||||
template <>
|
||||
nscolor StyleColor::CalcColor(nscolor aColor) const {
|
||||
@@ -40,7 +40,7 @@ index bbee32af30f35525730a10d0b242c0e8a8fe4695..a590fff105b30bc96fa7a0d8a8d3b1d5
|
||||
}
|
||||
|
||||
StyleAbsoluteColor StyleAbsoluteColor::ToColorSpace(
|
||||
@@ -120,7 +122,7 @@ StyleAbsoluteColor StyleAbsoluteColor::ToColorSpace(
|
||||
@@ -122,7 +124,7 @@ StyleAbsoluteColor StyleAbsoluteColor::ToColorSpace(
|
||||
return Servo_ConvertColorSpace(this, aColorSpace);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ index bbee32af30f35525730a10d0b242c0e8a8fe4695..a590fff105b30bc96fa7a0d8a8d3b1d5
|
||||
constexpr StyleColorSpace DEST_COLOR_SPACE = StyleColorSpace::Srgb;
|
||||
|
||||
constexpr float MIN = 0.0f;
|
||||
@@ -162,11 +164,13 @@ nscolor StyleAbsoluteColor::ToColor() const {
|
||||
@@ -164,11 +166,13 @@ nscolor StyleAbsoluteColor::ToColor() const {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/layout/svg/SVGImageContext.h b/layout/svg/SVGImageContext.h
|
||||
index b1f811989697966e30859610f4fc07579d0385ab..f6f4cd5a45fc49b416111d980fab4e612788903e 100644
|
||||
index ad833c7c2ee6a4c4984efdb0d59e3576c2d1bc19..36864a34badc0cbfe44d6295798622fd6178f9e3 100644
|
||||
--- a/layout/svg/SVGImageContext.h
|
||||
+++ b/layout/svg/SVGImageContext.h
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -44,7 +44,7 @@ index b1f811989697966e30859610f4fc07579d0385ab..f6f4cd5a45fc49b416111d980fab4e61
|
||||
const Maybe<SVGPreserveAspectRatio>& GetPreserveAspectRatio() const {
|
||||
return mPreserveAspectRatio;
|
||||
}
|
||||
@@ -116,7 +137,11 @@ class SVGImageContext {
|
||||
@@ -110,7 +131,11 @@ class SVGImageContext {
|
||||
return contextPaintIsEqual && mViewportSize == aOther.mViewportSize &&
|
||||
mPreserveAspectRatio == aOther.mPreserveAspectRatio &&
|
||||
mColorScheme == aOther.mColorScheme &&
|
||||
@@ -57,17 +57,17 @@ index b1f811989697966e30859610f4fc07579d0385ab..f6f4cd5a45fc49b416111d980fab4e61
|
||||
}
|
||||
|
||||
bool operator!=(const SVGImageContext&) const = default;
|
||||
@@ -129,7 +154,8 @@ class SVGImageContext {
|
||||
return HashGeneric(hash, mViewportSize.map(HashSize).valueOr(0),
|
||||
mPreserveAspectRatio.map(HashPAR).valueOr(0),
|
||||
mColorScheme.map(HashColorScheme).valueOr(0),
|
||||
- HashLinkParameters(mLinkParameters));
|
||||
+ HashLinkParameters(mLinkParameters), mZenBoostsAccent,
|
||||
+ mZenBoostsComplementaryRotation, mZenBoostsInverted);
|
||||
@@ -123,7 +148,8 @@ class SVGImageContext {
|
||||
return AddToHash(hash, mViewportSize.map(HashSize).valueOr(0),
|
||||
mPreserveAspectRatio.map(HashPAR).valueOr(0),
|
||||
mColorScheme.map(HashColorScheme).valueOr(0),
|
||||
- HashLinkParameters(mLinkParameters));
|
||||
+ HashLinkParameters(mLinkParameters), mZenBoostsAccent,
|
||||
+ mZenBoostsComplementaryRotation, mZenBoostsInverted);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -167,6 +193,9 @@ class SVGImageContext {
|
||||
@@ -156,6 +182,9 @@ class SVGImageContext {
|
||||
Maybe<SVGPreserveAspectRatio> mPreserveAspectRatio;
|
||||
Maybe<ColorScheme> mColorScheme;
|
||||
StyleLinkParameters mLinkParameters;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/services/sync/modules/service.sys.mjs b/services/sync/modules/service.sys.mjs
|
||||
index 4f4efe572909441abdd81909282936702c225621..81ab06a9414ed656b644a21b40b683f06a4f8dbf 100644
|
||||
index 4f4efe572909441abdd81909282936702c225621..2b47a2c9e97cf87641a0be9814f9a6be4d43f6ea 100644
|
||||
--- a/services/sync/modules/service.sys.mjs
|
||||
+++ b/services/sync/modules/service.sys.mjs
|
||||
@@ -99,6 +99,10 @@ function getEngineModules() {
|
||||
@@ -7,8 +7,8 @@ index 4f4efe572909441abdd81909282936702c225621..81ab06a9414ed656b644a21b40b683f0
|
||||
whenFalse: "ExtensionStorageEngineBridge",
|
||||
};
|
||||
+ result.Spaces = {
|
||||
+ module: "resource:///modules/zen/ZenWorkspacesSync.sys.mjs",
|
||||
+ symbol: "ZenWorkspacesEngine",
|
||||
+ module: "resource:///modules/zen/ZenSpacesSync.sys.mjs",
|
||||
+ symbol: "ZenSpacesSyncEngine",
|
||||
+ };
|
||||
return result;
|
||||
}
|
||||
|
||||
14
src/testing/xpcshell/runxpcshelltests-py.patch
Normal file
14
src/testing/xpcshell/runxpcshelltests-py.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py
|
||||
index 403401613189ffb758037850dc6bbb1d55f194ab..cad28e245155eb54775e551885532026e56c5fa9 100755
|
||||
--- a/testing/xpcshell/runxpcshelltests.py
|
||||
+++ b/testing/xpcshell/runxpcshelltests.py
|
||||
@@ -2275,6 +2275,9 @@ class XPCShellTests:
|
||||
appDirKey = None
|
||||
if "appname" in self.mozInfo:
|
||||
appDirKey = self.mozInfo["appname"] + "-appdir"
|
||||
+ if appDirKey == "zen-appdir":
|
||||
+ # Inherited manifests use firefox-appdir.
|
||||
+ appDirKey = "firefox-appdir"
|
||||
|
||||
# We have to do this before we run tests that depend on having the node
|
||||
# http/2 server.
|
||||
@@ -1,37 +0,0 @@
|
||||
diff --git a/toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs b/toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs
|
||||
index 5702ff28cc22206f5ce16584dac8a78d816562ce..3d08ecc97ce5995b30d8a4af0c33df329b428008 100644
|
||||
--- a/toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs
|
||||
+++ b/toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs
|
||||
@@ -270,11 +270,29 @@ _ContextualIdentityService.prototype = {
|
||||
});
|
||||
},
|
||||
|
||||
- create(name, icon, color) {
|
||||
+ create(name, icon, color, id = null) {
|
||||
this.ensureDataReady();
|
||||
|
||||
- // Retrieve the next userContextId available.
|
||||
- let userContextId = ++this._lastUserContextId;
|
||||
+ if (id !== null) {
|
||||
+ id = typeof id == "string" ? Number(id) : id;
|
||||
+ if (!Number.isSafeInteger(id) || id <= 0) {
|
||||
+ throw new Error(`Invalid userContextId '${id}'`);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ let userContextId;
|
||||
+ if (
|
||||
+ id !== null &&
|
||||
+ !this._identities.some(identity => identity.userContextId === id)
|
||||
+ ) {
|
||||
+ userContextId = id;
|
||||
+ this._lastUserContextId = Math.max(
|
||||
+ this._lastUserContextId,
|
||||
+ userContextId
|
||||
+ );
|
||||
+ } else {
|
||||
+ userContextId = ++this._lastUserContextId;
|
||||
+ }
|
||||
|
||||
// Throw an error if the next userContextId available is invalid (the one associated to
|
||||
// MAX_USER_CONTEXT_ID is already reserved to "userContextIdInternal.webextStorageLocal", which
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/toolkit/content/widgets/moz-toggle/moz-toggle.tokens.css b/toolkit/content/widgets/moz-toggle/moz-toggle.tokens.css
|
||||
index 6247d7a3923a6fedd4ec9911aba309ce565cd498..744e670eccc936dde664aa07df3e87bdcafd5e48 100644
|
||||
index c0976c54418a28046802443931042bd285aefbde..2adb18d25edbb8aac4e396fcfc64a4a664607836 100644
|
||||
--- a/toolkit/content/widgets/moz-toggle/moz-toggle.tokens.css
|
||||
+++ b/toolkit/content/widgets/moz-toggle/moz-toggle.tokens.css
|
||||
@@ -13,8 +13,8 @@
|
||||
@@ -11,5 +11,5 @@ index 6247d7a3923a6fedd4ec9911aba309ce565cd498..744e670eccc936dde664aa07df3e87bd
|
||||
+ --toggle-background-color-pressed: var(--zen-primary-color);
|
||||
+ --toggle-background-color-pressed-hover: var(--zen-colors-hover-bg);
|
||||
--toggle-background-color-pressed-active: var(--color-accent-primary-active);
|
||||
--toggle-border-color: var(--border-color-interactive);
|
||||
--toggle-border-color: light-dark(var(--color-gray-70), var(--border-color-interactive));
|
||||
--toggle-border-color-hover: var(--toggle-border-color);
|
||||
|
||||
29
src/toolkit/content/widgets/panel-list/panel-list-mjs.patch
Normal file
29
src/toolkit/content/widgets/panel-list/panel-list-mjs.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
diff --git a/toolkit/content/widgets/panel-list/panel-list.mjs b/toolkit/content/widgets/panel-list/panel-list.mjs
|
||||
index 68ad2fafc8b31dfff541cf8381d9b9533e376d1c..fa62fec6bfb33338091fc06d3736fb76fd5c47c4 100644
|
||||
--- a/toolkit/content/widgets/panel-list/panel-list.mjs
|
||||
+++ b/toolkit/content/widgets/panel-list/panel-list.mjs
|
||||
@@ -223,7 +223,12 @@ export class PanelList extends HTMLElement {
|
||||
this.setAttribute("showing", "true");
|
||||
// Tell the host element to hide any overflow in case the panel extends off
|
||||
// the page before the alignment is set.
|
||||
- hostElement.style.overflow = "hidden";
|
||||
+ const hostHidesOverflow = !getComputedStyle(hostElement)
|
||||
+ .overflow.split(" ")
|
||||
+ .includes("visible");
|
||||
+ if (!hostHidesOverflow) {
|
||||
+ hostElement.style.overflow = "hidden";
|
||||
+ }
|
||||
|
||||
// Wait for a layout flush, then find the bounds.
|
||||
let {
|
||||
@@ -344,7 +349,9 @@ export class PanelList extends HTMLElement {
|
||||
// Set the alignments and show the panel.
|
||||
this.setAttribute("align", align);
|
||||
this.setAttribute("valign", valign);
|
||||
- hostElement.style.overflow = "";
|
||||
+ if (!hostHidesOverflow) {
|
||||
+ hostElement.style.overflow = "";
|
||||
+ }
|
||||
// Decide positioning based on where this panel will be rendered
|
||||
const offsetParentIsBody =
|
||||
this.supportsPopover() ||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/toolkit/themes/shared/design-system/dist/tokens-shared.css b/toolkit/themes/shared/design-system/dist/tokens-shared.css
|
||||
index 15c0d98a18b4f19e7f2e03d2b78066b0353f416a..b32f6244c7a07e93894bab422691a605456034a1 100644
|
||||
index 63c641f560d4c0ce06b40a652ca99d1c48cd6941..39c81e773a442870763396e68fb57bd336e3625a 100644
|
||||
--- a/toolkit/themes/shared/design-system/dist/tokens-shared.css
|
||||
+++ b/toolkit/themes/shared/design-system/dist/tokens-shared.css
|
||||
@@ -7,6 +7,8 @@
|
||||
@@ -11,7 +11,22 @@ index 15c0d98a18b4f19e7f2e03d2b78066b0353f416a..b32f6244c7a07e93894bab422691a605
|
||||
@layer tokens-foundation {
|
||||
:root,
|
||||
:host(.anonymous-content-host) {
|
||||
@@ -424,8 +426,8 @@
|
||||
@@ -28,10 +30,10 @@
|
||||
--border-color-selected: var(--color-accent-primary);
|
||||
--border-color-transparent: transparent;
|
||||
--border-radius-circle: 9999px;
|
||||
- --border-radius-xsmall: 2px;
|
||||
- --border-radius-small: 4px;
|
||||
- --border-radius-medium: 8px;
|
||||
- --border-radius-large: 16px;
|
||||
+ --border-radius-xsmall: calc(2px * var(--zen-squircle-value));
|
||||
+ --border-radius-small: calc(4px * var(--zen-squircle-value));
|
||||
+ --border-radius-medium: calc(8px * var(--zen-squircle-value));
|
||||
+ --border-radius-large: calc(16px * var(--zen-squircle-value));
|
||||
--border-width: 1px;
|
||||
|
||||
/** box-shadow **/
|
||||
@@ -477,8 +479,8 @@
|
||||
--panel-background-color-dimmed-further: var(--background-color-dimmed-further);
|
||||
--panel-border-color: light-dark(rgb(240, 240, 244), rgb(82, 82, 94));
|
||||
--panel-border-radius: var(--border-radius-medium);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h
|
||||
index 312011c1c2ac41e78affecbdef25d72766a7c882..e5865c7d6259f0a3df48edf7a26b1b75a23cdb3a 100644
|
||||
index 22a2a7ef3a5e9257c8bb00ba6a55e8d39d2abbd9..6d8353fd11921585f7101f5717bdb3dd8f2a5eae 100644
|
||||
--- a/widget/cocoa/nsCocoaWindow.h
|
||||
+++ b/widget/cocoa/nsCocoaWindow.h
|
||||
@@ -462,6 +462,10 @@ class nsCocoaWindow final : public nsIWidget {
|
||||
@@ -461,6 +461,10 @@ class nsCocoaWindow final : public nsIWidget {
|
||||
void SetHideTitlebarSeparator(bool) override;
|
||||
bool IsMacTitlebarDirectionRTL() override;
|
||||
void SetCustomTitlebar(bool) override;
|
||||
@@ -13,9 +13,9 @@ index 312011c1c2ac41e78affecbdef25d72766a7c882..e5865c7d6259f0a3df48edf7a26b1b75
|
||||
void UpdateThemeGeometries(
|
||||
const nsTArray<ThemeGeometry>& aThemeGeometries) override;
|
||||
void LockAspectRatio(bool aShouldLock) override;
|
||||
@@ -672,6 +676,7 @@ class nsCocoaWindow final : public nsIWidget {
|
||||
bool mAspectRatioLocked = false;
|
||||
bool mIsAlert = false; // True if this is an non-native alert window.
|
||||
@@ -674,6 +678,7 @@ class nsCocoaWindow final : public nsIWidget {
|
||||
// show (e.g. a window created by detaching a tab from a fullscreen window).
|
||||
bool mIsInitialFullscreenSuppressed = false;
|
||||
bool mWasShown = false;
|
||||
+ bool mIsBrowserWindow = false;
|
||||
|
||||
|
||||
29
src/widget/gtk/nsDragSessionSource-cpp.patch
Normal file
29
src/widget/gtk/nsDragSessionSource-cpp.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
diff --git a/widget/gtk/nsDragSessionSource.cpp b/widget/gtk/nsDragSessionSource.cpp
|
||||
index a5f67d700f8c80d513f08cc25405b57cf28a2a9a..58186470bcbb7b1eda34ee20a19e29d540ab052a 100644
|
||||
--- a/widget/gtk/nsDragSessionSource.cpp
|
||||
+++ b/widget/gtk/nsDragSessionSource.cpp
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
#include "mozilla/WidgetUtilsGtk.h"
|
||||
+#include "mozilla/nsZenDragAndDrop.h"
|
||||
#include "nsAppShell.h"
|
||||
#include "nsArrayUtils.h"
|
||||
#include "nsCRT.h"
|
||||
@@ -1196,11 +1197,15 @@ bool nsDragSessionSource::SetAlphaPixmap(SourceSurface* aSurface,
|
||||
cairo_image_surface_get_stride(surf), SurfaceFormat::B8G8R8A8);
|
||||
if (!dt) return false;
|
||||
|
||||
+ auto drag_translucency = DRAG_IMAGE_ALPHA_LEVEL;
|
||||
+ if (auto zenDragAndDrop = zen::nsZenDragAndDrop::GetZenDragAndDropInstance()) {
|
||||
+ drag_translucency = zenDragAndDrop->GetDragImageOpacity();
|
||||
+ }
|
||||
dt->ClearRect(Rect(0, 0, dragRect.width, dragRect.height));
|
||||
dt->DrawSurface(
|
||||
aSurface, Rect(0, 0, dragRect.width, dragRect.height),
|
||||
Rect(0, 0, dragRect.width, dragRect.height), DrawSurfaceOptions(),
|
||||
- DrawOptions(DRAG_IMAGE_ALPHA_LEVEL, CompositionOp::OP_SOURCE));
|
||||
+ DrawOptions(drag_translucency, CompositionOp::OP_SOURCE));
|
||||
|
||||
cairo_surface_mark_dirty(surf);
|
||||
cairo_surface_set_device_offset(surf, -aXOffset, -aYOffset);
|
||||
@@ -1521,7 +1521,7 @@ ${cssSelector} {
|
||||
shuffleBoost() {
|
||||
const availFonts = this.fetchFontList();
|
||||
const commonFonts = this.commonFonts;
|
||||
let font = commonFonts[Math.round(Math.random() * commonFonts.length)];
|
||||
let font = commonFonts[Math.floor(Math.random() * commonFonts.length)];
|
||||
if (availFonts.includes(font)) {
|
||||
this.currentBoostData.fontFamily = font;
|
||||
}
|
||||
|
||||
@@ -649,9 +649,10 @@ class nsZenBoostsManager {
|
||||
);
|
||||
|
||||
// Close the editor if the tab is switched
|
||||
const onTabSelect = editor.close.bind(editor);
|
||||
parentWindow.gBrowser.tabContainer.addEventListener(
|
||||
"TabSelect",
|
||||
editor.close.bind(editor),
|
||||
onTabSelect,
|
||||
{
|
||||
once: true,
|
||||
}
|
||||
@@ -661,13 +662,24 @@ class nsZenBoostsManager {
|
||||
onLocationChange: webProgress => {
|
||||
if (webProgress.isTopLevel) {
|
||||
editor.close();
|
||||
parentWindow.gBrowser.removeTabsProgressListener(progressListener);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
parentWindow.gBrowser.addProgressListener(progressListener);
|
||||
|
||||
editor.addEventListener(
|
||||
"unload",
|
||||
() => {
|
||||
parentWindow.gBrowser.tabContainer.removeEventListener(
|
||||
"TabSelect",
|
||||
onTabSelect
|
||||
);
|
||||
parentWindow.gBrowser.removeProgressListener(progressListener);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
||||
// Give the domain
|
||||
editor.domain = domain;
|
||||
editor.openerWindow = parentWindow;
|
||||
|
||||
@@ -70,8 +70,10 @@ export class ZenBoostsChild extends JSWindowActorChild {
|
||||
|
||||
static PREVENTABLE_SET = new Set(ZenBoostsChild.PREVENTABLE_EVENTS);
|
||||
|
||||
actorCreated() {
|
||||
this.#applyBoostForPageIfAvailable();
|
||||
handleEvent(event) {
|
||||
if (event.type === "DOMDocElementInserted") {
|
||||
this.#applyBoostForPageIfAvailable();
|
||||
}
|
||||
}
|
||||
|
||||
didDestroy() {
|
||||
@@ -330,6 +332,22 @@ export class ZenBoostsChild extends JSWindowActorChild {
|
||||
return this.sendQuery("ZenBoost:GetBoostForDomain", domain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a synced BrowsingContext field only when its value changes. Every
|
||||
* setter commits a transaction that is broadcast to the whole browsing
|
||||
* context group, even when the value is unchanged, so this avoids three
|
||||
* such broadcasts on every page load that has no boost.
|
||||
*
|
||||
* @param {BrowsingContext} browsingContext
|
||||
* @param {string} field - The synced field name.
|
||||
* @param {number | boolean} value
|
||||
*/
|
||||
#setSyncedField(browsingContext, field, value) {
|
||||
if (browsingContext[field] !== value) {
|
||||
browsingContext[field] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the boost settings for the current page if available.
|
||||
*
|
||||
@@ -360,7 +378,11 @@ export class ZenBoostsChild extends JSWindowActorChild {
|
||||
sizeOverride: boostData.sizeOverride,
|
||||
});
|
||||
|
||||
browsingContext.isZenBoostsInverted = boostData.smartInvert;
|
||||
this.#setSyncedField(
|
||||
browsingContext,
|
||||
"isZenBoostsInverted",
|
||||
!!boostData.smartInvert
|
||||
);
|
||||
if (boostData.enableColorBoost) {
|
||||
let primaryColor;
|
||||
if (boostData.autoTheme) {
|
||||
@@ -396,18 +418,21 @@ export class ZenBoostsChild extends JSWindowActorChild {
|
||||
boostData
|
||||
);
|
||||
}
|
||||
browsingContext.zenBoostsData = primaryColor;
|
||||
this.#setSyncedField(browsingContext, "zenBoostsData", primaryColor);
|
||||
// The complementary accent is derived in the backend by rotating the
|
||||
// primary accent's hue by this delta (in degrees).
|
||||
browsingContext.zenBoostsComplementaryRotation =
|
||||
boostData.secondaryDotAngleDegDelta ?? 0;
|
||||
this.#setSyncedField(
|
||||
browsingContext,
|
||||
"zenBoostsComplementaryRotation",
|
||||
boostData.secondaryDotAngleDegDelta ?? 0
|
||||
);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
browsingContext.isZenBoostsInverted = false;
|
||||
this.#setSyncedField(browsingContext, "isZenBoostsInverted", false);
|
||||
}
|
||||
browsingContext.zenBoostsData = 0;
|
||||
browsingContext.zenBoostsComplementaryRotation = 0;
|
||||
this.#setSyncedField(browsingContext, "zenBoostsData", 0);
|
||||
this.#setSyncedField(browsingContext, "zenBoostsComplementaryRotation", 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
<vbox flex="1" id="zen-boost-filter-wrapper">
|
||||
<hbox class="zen-boost-color-picker-gradient zen-boost-panel-disabled">
|
||||
<button data-l10n-id="zen-boost-magic-theme" id="zen-boost-magic-theme" class="subviewbutton mod-button"></button>
|
||||
<html:div id="zen-boost-color-picker-dot-primary" class="zen-boost-color-picker-dot"></html:div>
|
||||
<html:div id="zen-boost-color-picker-dot-secondary" class="zen-boost-color-picker-dot"></html:div>
|
||||
<html:div class="zen-boost-color-picker-circle"></html:div>
|
||||
<html:div id="zen-boost-color-picker-dot-primary" class="zen-boost-color-picker-dot no-squircles"></html:div>
|
||||
<html:div id="zen-boost-color-picker-dot-secondary" class="zen-boost-color-picker-dot no-squircles"></html:div>
|
||||
<html:div class="zen-boost-color-picker-circle no-squircles"></html:div>
|
||||
</hbox>
|
||||
|
||||
<hbox flex="1" id="zen-boost-toolbar-wrapper-colors">
|
||||
|
||||
@@ -194,7 +194,8 @@ body {
|
||||
max-height: 40px;
|
||||
align-items: center;
|
||||
background-color: var(--zen-boosts-secondary-background);
|
||||
border: solid 1px var(--zen-boosts-primary-border-color);
|
||||
border: solid 1px transparent;
|
||||
border-bottom-color: var(--zen-boosts-primary-border-color);
|
||||
|
||||
@media (-moz-windows-mica) {
|
||||
background-color: var(--zen-boosts-mica-background);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"chrome://browser/content/zen-components/ZenEmojiPicker.mjs",
|
||||
"chrome://browser/content/zen-components/ZenLiveFoldersUI.mjs",
|
||||
"chrome://browser/content/zen-components/ZenDownloadAnimation.mjs",
|
||||
"resource:///modules/zen/share/ZenShareManager.mjs",
|
||||
];
|
||||
|
||||
for (let script of scripts) {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import checkForZenUpdates, {
|
||||
createWindowUpdateAnimation,
|
||||
playWindowSweepAnimation,
|
||||
} from "chrome://browser/content/ZenUpdates.mjs";
|
||||
|
||||
class ZenStartup {
|
||||
@@ -195,6 +196,14 @@ class ZenStartup {
|
||||
checkForZenUpdates();
|
||||
return await createWindowUpdateAnimation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry point for privileged modules (e.g. the sync applier) to play the
|
||||
* update sweep animation in this window.
|
||||
*/
|
||||
playWindowSweepAnimation() {
|
||||
return playWindowSweepAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
window.gZenStartup = new ZenStartup();
|
||||
|
||||
@@ -257,7 +257,7 @@ window.gZenUIManager = {
|
||||
};
|
||||
},
|
||||
|
||||
updateTabsToolbar() {
|
||||
updateTabsToolbar(fromResizeEvent = false) {
|
||||
const kUrlbarHeight = 333;
|
||||
gURLBar.style.setProperty(
|
||||
"--zen-urlbar-top",
|
||||
@@ -270,8 +270,8 @@ window.gZenUIManager = {
|
||||
gZenVerticalTabsManager.actualWindowButtons.removeAttribute(
|
||||
"zen-has-hover"
|
||||
);
|
||||
gZenVerticalTabsManager.recalculateURLBarHeight(true);
|
||||
if (!this._preventToolbarRebuild) {
|
||||
gZenVerticalTabsManager.recalculateURLBarHeight(!fromResizeEvent);
|
||||
if (!this._preventToolbarRebuild && !fromResizeEvent) {
|
||||
setTimeout(() => {
|
||||
gZenWorkspaces.updateTabsContainers();
|
||||
}, 0);
|
||||
@@ -493,6 +493,13 @@ window.gZenUIManager = {
|
||||
_clearTimeout: null,
|
||||
_lastTab: null,
|
||||
|
||||
_urlbarSessionCounter: 0,
|
||||
_urlbarOwner: null,
|
||||
|
||||
_isOwner(closeSeq) {
|
||||
return this._urlbarOwner === closeSeq;
|
||||
},
|
||||
|
||||
// Check if browser elements are in a valid state for tab operations
|
||||
_validateBrowserState() {
|
||||
// Check if browser window is still open
|
||||
@@ -517,8 +524,15 @@ window.gZenUIManager = {
|
||||
werePassedURL,
|
||||
searchClipboard,
|
||||
where,
|
||||
overridePreferance = false
|
||||
overridePreferance = false,
|
||||
closeToken = {}
|
||||
) {
|
||||
// Keep this here. It's better to make sure every
|
||||
// call has a different token rather then forgetting
|
||||
// to increment it in one of the early returns.
|
||||
const closeSeq = ++this._urlbarSessionCounter;
|
||||
closeToken.id = closeSeq;
|
||||
|
||||
// Validate browser state first
|
||||
if (!this._validateBrowserState()) {
|
||||
console.warn("Browser state invalid for new tab operation");
|
||||
@@ -529,6 +543,10 @@ window.gZenUIManager = {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.documentElement.hasAttribute("zen-welcome-stage")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const shouldOpenURLBar =
|
||||
overridePreferance ||
|
||||
(gZenVerticalTabsManager._canReplaceNewTab &&
|
||||
@@ -542,7 +560,13 @@ window.gZenUIManager = {
|
||||
|
||||
// Close the new tab popup on cmd/ctrl + t
|
||||
if (!overridePreferance && gURLBar.hasAttribute("zen-newtab")) {
|
||||
this.handleUrlbarClose();
|
||||
// The _zenHandleUrlbarClose holds a token in it's closure.
|
||||
// Call that instead.
|
||||
if (gURLBar._zenHandleUrlbarClose) {
|
||||
gURLBar._zenHandleUrlbarClose();
|
||||
} else {
|
||||
this.handleUrlbarClose(closeSeq);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -568,7 +592,9 @@ window.gZenUIManager = {
|
||||
this._prevUrlbarLabel = gURLBar._untrimmedValue || "";
|
||||
|
||||
// Set up URL bar for new tab
|
||||
gURLBar._zenHandleUrlbarClose = this.handleUrlbarClose.bind(this);
|
||||
gURLBar._zenHandleUrlbarClose = (onSwitch, onElementPicked) =>
|
||||
this.handleUrlbarClose(closeSeq, onSwitch, onElementPicked);
|
||||
this._urlbarOwner = closeSeq;
|
||||
gURLBar.setAttribute("zen-newtab", true);
|
||||
|
||||
// Update newtab buttons
|
||||
@@ -582,18 +608,33 @@ window.gZenUIManager = {
|
||||
document.getElementById("Browser:OpenLocation").doCommand();
|
||||
} catch (e) {
|
||||
console.error("Error opening location in new tab:", e);
|
||||
this.handleUrlbarClose(false);
|
||||
this.handleUrlbarClose(closeSeq, false, false);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether the closeToken given by handleNewTab
|
||||
* corresponds to a close event.
|
||||
*
|
||||
* @param {object} closeToken - Token previously passed to handleNewTab.
|
||||
* @param {CustomEvent} event - A ZenURLBarClosed event.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
matchesCloseToken(closeToken, event) {
|
||||
return (
|
||||
typeof closeToken?.id === "number" &&
|
||||
event?.detail?.closeSeq === closeToken.id
|
||||
);
|
||||
},
|
||||
|
||||
clearUrlbarData() {
|
||||
this._prevUrlbarLabel = null;
|
||||
this._lastSearch = "";
|
||||
},
|
||||
|
||||
handleUrlbarClose(onSwitch = false, onElementPicked = false) {
|
||||
handleUrlbarClose(closeSeq, onSwitch = false, onElementPicked = false) {
|
||||
// Validate browser state first
|
||||
if (!this._validateBrowserState()) {
|
||||
console.warn("Browser state invalid for URL bar close operation");
|
||||
@@ -607,59 +648,69 @@ window.gZenUIManager = {
|
||||
|
||||
const isFocusedBefore = gURLBar.focused;
|
||||
setTimeout(() => {
|
||||
// We use this attribute on Tabbrowser::addTab
|
||||
gURLBar.removeAttribute("zen-newtab");
|
||||
/* If someone else opened the url bar in the meantime don't be
|
||||
* stingy and leave it open for them.*/
|
||||
if (this._isOwner(closeSeq)) {
|
||||
// We use this attribute on Tabbrowser::addTab
|
||||
gURLBar.removeAttribute("zen-newtab");
|
||||
|
||||
// Safely restore tab visual state with proper validation
|
||||
if (
|
||||
this._lastTab &&
|
||||
!this._lastTab.closing &&
|
||||
this._lastTab.documentGlobal &&
|
||||
!this._lastTab.documentGlobal.closed &&
|
||||
gBrowser.selectedTab === this._lastTab
|
||||
) {
|
||||
this._lastTab._visuallySelected = true;
|
||||
this._lastTab = null;
|
||||
}
|
||||
|
||||
// Reset newtab buttons
|
||||
for (const button of this.newtabButtons) {
|
||||
button.removeAttribute("in-urlbar");
|
||||
}
|
||||
|
||||
// Handle search data
|
||||
if (onSwitch) {
|
||||
this.clearUrlbarData();
|
||||
} else {
|
||||
this._lastSearch = gURLBar._untrimmedValue || "";
|
||||
|
||||
if (this._clearTimeout) {
|
||||
clearTimeout(this._clearTimeout);
|
||||
// Safely restore tab visual state with proper validation
|
||||
if (
|
||||
this._lastTab &&
|
||||
!this._lastTab.closing &&
|
||||
this._lastTab.documentGlobal &&
|
||||
!this._lastTab.documentGlobal.closed &&
|
||||
gBrowser.selectedTab === this._lastTab
|
||||
) {
|
||||
this._lastTab._visuallySelected = true;
|
||||
this._lastTab = null;
|
||||
}
|
||||
|
||||
this._clearTimeout = setTimeout(() => {
|
||||
// Reset newtab buttons
|
||||
for (const button of this.newtabButtons) {
|
||||
button.removeAttribute("in-urlbar");
|
||||
}
|
||||
|
||||
// Handle search data
|
||||
if (onSwitch) {
|
||||
this.clearUrlbarData();
|
||||
}, this.urlbarWaitToClear);
|
||||
}
|
||||
} else {
|
||||
this._lastSearch = gURLBar._untrimmedValue || "";
|
||||
|
||||
// Safely restore URL bar state with proper validation
|
||||
if (this._prevUrlbarLabel) {
|
||||
gURLBar.setURI({
|
||||
uri: this._prevUrlbarLabel,
|
||||
dueToTabSwitch: onSwitch,
|
||||
isSameDocument: !onSwitch,
|
||||
});
|
||||
}
|
||||
if (this._clearTimeout) {
|
||||
clearTimeout(this._clearTimeout);
|
||||
}
|
||||
|
||||
gURLBar.handleRevert();
|
||||
this._clearTimeout = setTimeout(() => {
|
||||
this.clearUrlbarData();
|
||||
}, this.urlbarWaitToClear);
|
||||
}
|
||||
|
||||
// Safely restore URL bar state with proper validation
|
||||
if (this._prevUrlbarLabel) {
|
||||
gURLBar.setURI({
|
||||
uri: this._prevUrlbarLabel,
|
||||
dueToTabSwitch: onSwitch,
|
||||
isSameDocument: !onSwitch,
|
||||
});
|
||||
}
|
||||
|
||||
gURLBar.handleRevert();
|
||||
}
|
||||
|
||||
if (isFocusedBefore) {
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("ZenURLBarClosed", {
|
||||
detail: { onSwitch, onElementPicked },
|
||||
detail: { onSwitch, onElementPicked, closeSeq },
|
||||
})
|
||||
);
|
||||
|
||||
if (!this._isOwner(closeSeq)) {
|
||||
return;
|
||||
}
|
||||
this._urlbarOwner = null;
|
||||
|
||||
gURLBar.view.close({ elementPicked: onElementPicked });
|
||||
gURLBar.updateTextOverflow();
|
||||
|
||||
@@ -683,6 +734,8 @@ window.gZenUIManager = {
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
} else if (this._isOwner(closeSeq)) {
|
||||
this._urlbarOwner = null;
|
||||
}
|
||||
}, 0);
|
||||
},
|
||||
@@ -815,7 +868,6 @@ window.gZenUIManager = {
|
||||
},
|
||||
|
||||
panelUIPosition(panel, anchor) {
|
||||
void panel;
|
||||
// The alignment position of the panel is determined during the "popuppositioned" event
|
||||
// when the panel opens. The alignment positions help us determine in which orientation
|
||||
// the panel is anchored to the screen space.
|
||||
@@ -1226,8 +1278,16 @@ window.gZenVerticalTabsManager = {
|
||||
if (gZenWorkspaces._processingResize) {
|
||||
return;
|
||||
}
|
||||
this._pendingUrlbarFormatUpdate ||= updateFormat;
|
||||
if (this._urlbarHeightRecalcScheduled) {
|
||||
return;
|
||||
}
|
||||
this._urlbarHeightRecalcScheduled = true;
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
delete this._urlbarHeightRecalcScheduled;
|
||||
const shouldUpdateFormat = this._pendingUrlbarFormatUpdate;
|
||||
delete this._pendingUrlbarFormatUpdate;
|
||||
gURLBar.removeAttribute("--urlbar-height");
|
||||
let height;
|
||||
if (!this._hasSetSingleToolbar) {
|
||||
@@ -1238,7 +1298,7 @@ window.gZenVerticalTabsManager = {
|
||||
if (typeof height !== "undefined") {
|
||||
gURLBar.style.setProperty("--urlbar-height", `${height}px`);
|
||||
}
|
||||
if (updateFormat) {
|
||||
if (shouldUpdateFormat) {
|
||||
gURLBar.zenFormatURLValue();
|
||||
}
|
||||
});
|
||||
@@ -1299,18 +1359,21 @@ window.gZenVerticalTabsManager = {
|
||||
document.documentElement.removeAttribute("zen-right-side");
|
||||
}
|
||||
|
||||
delete this._hadSidebarCollapse;
|
||||
if (isSidebarExpanded) {
|
||||
this._hadSidebarCollapse = !document.documentElement.hasAttribute(
|
||||
"zen-sidebar-expanded"
|
||||
);
|
||||
this.navigatorToolbox.setAttribute("zen-sidebar-expanded", "true");
|
||||
document.documentElement.setAttribute("zen-sidebar-expanded", "true");
|
||||
gBrowser.tabContainer.setAttribute("expanded", "true");
|
||||
} else {
|
||||
this.navigatorToolbox.removeAttribute("zen-sidebar-expanded");
|
||||
document.documentElement.removeAttribute("zen-sidebar-expanded");
|
||||
gBrowser.tabContainer.removeAttribute("expanded");
|
||||
const wasSidebarExpanded = document.documentElement.hasAttribute(
|
||||
"zen-sidebar-expanded"
|
||||
);
|
||||
if (isSidebarExpanded !== wasSidebarExpanded) {
|
||||
delete this._hadSidebarCollapse;
|
||||
if (isSidebarExpanded) {
|
||||
this._hadSidebarCollapse = true;
|
||||
this.navigatorToolbox.setAttribute("zen-sidebar-expanded", "true");
|
||||
document.documentElement.setAttribute("zen-sidebar-expanded", "true");
|
||||
gBrowser.tabContainer.setAttribute("expanded", "true");
|
||||
} else {
|
||||
this.navigatorToolbox.removeAttribute("zen-sidebar-expanded");
|
||||
document.documentElement.removeAttribute("zen-sidebar-expanded");
|
||||
gBrowser.tabContainer.removeAttribute("expanded");
|
||||
}
|
||||
}
|
||||
|
||||
const appContentNavbarContaienr = document.getElementById(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user