Compare commits
197 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ff6d80dc8 | ||
|
|
cd8a8b6a97 | ||
|
|
3413399dfa | ||
|
|
93ab8babbc | ||
|
|
8d8c9e8a01 | ||
|
|
aec9ef390c | ||
|
|
6e5a56bed5 | ||
|
|
175d12cf42 | ||
|
|
6d9fd13fbe | ||
|
|
9870047d05 | ||
|
|
010f9acb54 | ||
|
|
a1a9f645f5 | ||
|
|
db5dd9ba7f | ||
|
|
30f1def143 | ||
|
|
b9dd0c6bf1 | ||
|
|
d158472709 | ||
|
|
cb9c7d5c48 | ||
|
|
f580e53fc2 | ||
|
|
c68456310c | ||
|
|
8d156192d5 | ||
|
|
0ab41a84bd | ||
|
|
a3e1033c11 | ||
|
|
ebcd656e70 | ||
|
|
68ea69bad6 | ||
|
|
4f9feeb953 | ||
|
|
7f99691e92 | ||
|
|
4f37352afe | ||
|
|
32c001d06d | ||
|
|
b81e1a3c70 | ||
|
|
d32950a1b9 | ||
|
|
da13e238ac | ||
|
|
3c58f91d28 | ||
|
|
c004cd47f0 | ||
|
|
6db11763f6 | ||
|
|
fea9987b02 | ||
|
|
67a6d9c844 | ||
|
|
b2d476659e | ||
|
|
8381fba596 | ||
|
|
5342837f0a | ||
|
|
8d2e0b0a89 | ||
|
|
c19748bbbe | ||
|
|
b6063c0831 | ||
|
|
00682ed150 | ||
|
|
af24ff6049 | ||
|
|
e0376b88f5 | ||
|
|
188fea025d | ||
|
|
d69cc7edf4 | ||
|
|
f9ec71ba58 | ||
|
|
1c59a6d461 | ||
|
|
29a0707bcd | ||
|
|
d4a9f9058d | ||
|
|
5c2274f429 | ||
|
|
ca57fa391d | ||
|
|
9c7c8fc227 | ||
|
|
d1471d197f | ||
|
|
add4576f0a | ||
|
|
acacf0885c | ||
|
|
7deaecc123 | ||
|
|
b82b0322a1 | ||
|
|
c6a92c2670 | ||
|
|
1d9c2f878e | ||
|
|
dd7233c81e | ||
|
|
d4dd298ef8 | ||
|
|
53e015a7aa | ||
|
|
9203918788 | ||
|
|
b9ae18a0ca | ||
|
|
d548b8cb6d | ||
|
|
3931f8195b | ||
|
|
7077a01dad | ||
|
|
26b3195bdd | ||
|
|
9b79e3c1ac | ||
|
|
405b2180cf | ||
|
|
462f354a9d | ||
|
|
d3f14bd9c3 | ||
|
|
d9939ea9be | ||
|
|
9c5ae70562 | ||
|
|
cfa03fe1f9 | ||
|
|
df745e1b43 | ||
|
|
b863045a8f | ||
|
|
ac53d731e9 | ||
|
|
fa62827717 | ||
|
|
5423aee3d5 | ||
|
|
74a4d982a5 | ||
|
|
a7184adc4d | ||
|
|
3fba559323 | ||
|
|
d41f0d7cf4 | ||
|
|
9ebfc973f3 | ||
|
|
9850c977be | ||
|
|
7fc4c03659 | ||
|
|
9c9627573b | ||
|
|
abedcd8896 | ||
|
|
63fcbc73a5 | ||
|
|
a724f9c6f2 | ||
|
|
c67440a940 | ||
|
|
d996db31d6 | ||
|
|
504faad077 | ||
|
|
c0eeab939b | ||
|
|
ca4952c02c | ||
|
|
952385f362 | ||
|
|
343bfe12fd | ||
|
|
ac600ad91b | ||
|
|
acfdb5b191 | ||
|
|
ca1e0ffdea | ||
|
|
a3bebadff8 | ||
|
|
22a042d35d | ||
|
|
0def2c24c8 | ||
|
|
a09f3ab32c | ||
|
|
5f7fcd57d2 | ||
|
|
952c02d3d6 | ||
|
|
355d98eb53 | ||
|
|
3972f3e2a7 | ||
|
|
c3f22ec7eb | ||
|
|
8330b31a6d | ||
|
|
c89e953b6e | ||
|
|
1536f5805e | ||
|
|
a640509e04 | ||
|
|
ea0a808e15 | ||
|
|
20f3a4128c | ||
|
|
f6bad14087 | ||
|
|
83f8975a50 | ||
|
|
ce7c1f797f | ||
|
|
bb9a97496d | ||
|
|
b94b5b2d90 | ||
|
|
b523f3d24e | ||
|
|
79966cb5ed | ||
|
|
c9f97665be | ||
|
|
d618181dc7 | ||
|
|
e2b6054b17 | ||
|
|
0f6bdcd88d | ||
|
|
74c9923f0b | ||
|
|
a86bb5197d | ||
|
|
6c7b15eeca | ||
|
|
4c44f874b9 | ||
|
|
4efc2cd05f | ||
|
|
839d5ce1f9 | ||
|
|
7c2d35d746 | ||
|
|
eff0b040a2 | ||
|
|
eede41fb18 | ||
|
|
a66abd037e | ||
|
|
7edce1967f | ||
|
|
6c028d8511 | ||
|
|
ef32e5f990 | ||
|
|
ba435d9c14 | ||
|
|
f6db693407 | ||
|
|
0f446a5435 | ||
|
|
0b17ceda90 | ||
|
|
f000af56e7 | ||
|
|
d06d684c96 | ||
|
|
24063ad883 | ||
|
|
3aa2109986 | ||
|
|
5c3c9f3dfa | ||
|
|
07a9aabe20 | ||
|
|
4702b8ffed | ||
|
|
b071c7ff11 | ||
|
|
9d8b8458bf | ||
|
|
73bc2382bb | ||
|
|
4a4c8a7b2b | ||
|
|
0a9f88a2fb | ||
|
|
8bed8e2cf7 | ||
|
|
c8b396b99d | ||
|
|
afc636a20f | ||
|
|
bd0b012bce | ||
|
|
86b0a9dac2 | ||
|
|
f344c0d41d | ||
|
|
f70c599afd | ||
|
|
08cf77eb23 | ||
|
|
25910c5189 | ||
|
|
09d17f2cfe | ||
|
|
c9cf757964 | ||
|
|
98b64e2fad | ||
|
|
fbfab42e8b | ||
|
|
c44c63d5ce | ||
|
|
1e3b1a6605 | ||
|
|
ef2a2a5efc | ||
|
|
ccfe709789 | ||
|
|
43563ccff7 | ||
|
|
db2673cf27 | ||
|
|
351cc884ec | ||
|
|
d6823beb95 | ||
|
|
dfede695a7 | ||
|
|
b0354fa8b9 | ||
|
|
41cecd4947 | ||
|
|
dd5a59a1cb | ||
|
|
ee86bff81c | ||
|
|
9fb04e4f7c | ||
|
|
74a4efddf1 | ||
|
|
10906f91f5 | ||
|
|
816d6887ad | ||
|
|
e950e012ed | ||
|
|
4fdd0993d7 | ||
|
|
8e783f948f | ||
|
|
e6313c4d5f | ||
|
|
7de3843cd9 | ||
|
|
425d334f8b | ||
|
|
609854c28d | ||
|
|
fd09bd2092 | ||
|
|
1aa00bfa2a |
51
.github/workflows/build.yml
vendored
51
.github/workflows/build.yml
vendored
@@ -54,6 +54,18 @@ jobs:
|
||||
echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}"
|
||||
echo "GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
buildid:
|
||||
name: Generate build ID
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
buildids: ${{ steps.get.outputs.bid }}
|
||||
steps:
|
||||
- id: get
|
||||
shell: bash -xe {0}
|
||||
run: |
|
||||
bdat=`date +"%Y%m%d%I%M%S"`
|
||||
echo "bid=${bdat}" >> $GITHUB_OUTPUT
|
||||
|
||||
start-self-host:
|
||||
runs-on: ubuntu-latest
|
||||
needs: debug-inputs
|
||||
@@ -294,7 +306,7 @@ jobs:
|
||||
windows-step-1:
|
||||
name: Windows build step 1 (PGO build)
|
||||
uses: ./.github/workflows/windows-release-build.yml
|
||||
needs: [build-data]
|
||||
needs: [build-data, buildid]
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
@@ -303,6 +315,7 @@ jobs:
|
||||
generate-gpo: true
|
||||
profile-data-path-archive: zen-windows-profile-data-and-jarlog.zip
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
|
||||
windows-step-2:
|
||||
name: Windows build step 2 (Generate profile data)
|
||||
@@ -322,11 +335,12 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
needs: [build-data, windows-step-2, start-self-host]
|
||||
needs: [build-data, windows-step-2, start-self-host, buildid]
|
||||
with:
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
generate-gpo: false
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
|
||||
linux:
|
||||
name: Linux build
|
||||
@@ -334,10 +348,11 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
needs: [build-data, start-self-host]
|
||||
needs: [build-data, start-self-host, buildid]
|
||||
with:
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
|
||||
mac:
|
||||
name: macOS build
|
||||
@@ -345,7 +360,19 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
needs: [build-data]
|
||||
needs: [build-data, buildid]
|
||||
with:
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
|
||||
mac-uni:
|
||||
name: macOS build (Universal)
|
||||
uses: ./.github/workflows/macos-universal-release-build.yml
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
needs: [build-data, mac]
|
||||
with:
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
@@ -441,7 +468,7 @@ jobs:
|
||||
echo "Stopping self-hosted runner"
|
||||
echo "${{ secrets.SELF_HOSTED_RUNNER_STOP_SCRIPT }}" | base64 -d > stop.sh
|
||||
sudo chmod +x stop.sh
|
||||
bash ./stop.sh > /dev/null 2>&1 &
|
||||
bash ./stop.sh > /dev/null
|
||||
|
||||
- name: Remove self-hosted runner script
|
||||
if: always() && ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
@@ -453,7 +480,7 @@ jobs:
|
||||
if: ${{ inputs.create_release || inputs.update_branch == 'twilight' }}
|
||||
permissions: write-all
|
||||
name: Release
|
||||
needs: [build-data, linux, windows-step-3, check-release, mac, appimage, source, lint, stop-self-hosted]
|
||||
needs: [build-data, linux, windows-step-3, check-release, mac-uni, appimage, source, lint, stop-self-hosted]
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: ${{ inputs.update_branch == 'release' && 'Deploy-Release' || 'Deploy-Twilight' }}
|
||||
@@ -503,8 +530,7 @@ jobs:
|
||||
cp -a ../windows_update_manifest_arm64/. updates/
|
||||
fi
|
||||
|
||||
cp -a ../macos_update_manifest_aarch64/. updates/
|
||||
cp -a ../macos_update_manifest_x86_64/. updates/
|
||||
cp -a ../macos_update_manifest/. updates/
|
||||
|
||||
- name: Commit
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
@@ -533,12 +559,10 @@ jobs:
|
||||
linux-aarch64.mar
|
||||
windows.mar
|
||||
windows-arm64.mar
|
||||
macos-x86_64.mar
|
||||
macos-aarch64.mar
|
||||
macos.mar
|
||||
zen.installer.exe
|
||||
zen.installer-arm64.exe
|
||||
zen.macos-x86_64.dmg
|
||||
zen.macos-aarch64.dmg
|
||||
zen.macos-universal.dmg
|
||||
automatic_release_tag: 'twilight'
|
||||
title: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})'
|
||||
draft: false
|
||||
@@ -569,8 +593,7 @@ jobs:
|
||||
linux-aarch64.mar
|
||||
.github/workflows/object/windows-x64-signed-x86_64/windows.mar
|
||||
.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
|
||||
macos-x86_64.mar
|
||||
macos-aarch64.mar
|
||||
macos.mar
|
||||
.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe
|
||||
.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
|
||||
zen.macos-x86_64.dmg
|
||||
|
||||
@@ -2,7 +2,7 @@ name: Check Firefox Candidate Release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 21 * * 1'
|
||||
- cron: '59 4 * * 2'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
7
.github/workflows/linux-release-build.yml
vendored
7
.github/workflows/linux-release-build.yml
vendored
@@ -11,6 +11,10 @@ on:
|
||||
description: 'The branch to build'
|
||||
required: true
|
||||
type: string
|
||||
MOZ_BUILD_DATE:
|
||||
type: string
|
||||
required: true
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@@ -130,6 +134,9 @@ jobs:
|
||||
continue-on-error: true
|
||||
run: |
|
||||
export SURFER_PLATFORM="linux"
|
||||
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
|
||||
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
|
||||
fi
|
||||
bash .github/workflows/src/release-build.sh
|
||||
|
||||
- name: Package
|
||||
|
||||
71
.github/workflows/macos-release-build.yml
vendored
71
.github/workflows/macos-release-build.yml
vendored
@@ -11,6 +11,10 @@ on:
|
||||
description: 'The branch to build'
|
||||
required: true
|
||||
type: string
|
||||
MOZ_BUILD_DATE:
|
||||
type: string
|
||||
required: true
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
mac-build:
|
||||
@@ -118,72 +122,47 @@ jobs:
|
||||
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
|
||||
run: |
|
||||
export SURFER_PLATFORM="darwin"
|
||||
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
|
||||
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
|
||||
fi
|
||||
bash .github/workflows/src/release-build.sh
|
||||
|
||||
- name: Import APPLE DEVELOPER ID CERTIFICATE for .app
|
||||
uses: Apple-Actions/import-codesign-certs@v3
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }}
|
||||
p12-password: ${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }}
|
||||
|
||||
- name: Import provisioning profile for .app
|
||||
run: |
|
||||
echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > ./engine/Zen_Browser.provisionprofile
|
||||
ls -la
|
||||
|
||||
- name: Package
|
||||
env:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
ZEN_GA_DISABLE_PGO: true
|
||||
MACOS_APPLE_ACCOUNT_ID: ${{ secrets.macOS_AppleAccountId }}
|
||||
MACOS_APPLE_DEVELOPER_ID_TEAM_ID: ${{ secrets.macOS_AppleDeveloperIdTeamId }}
|
||||
MACOS_APPLE_DEVELOPER_ID_PASSWORD: ${{ secrets.macOS_AppleDeveloperIdPassword }}
|
||||
run: |
|
||||
export SURFER_PLATFORM="darwin"
|
||||
export MACOS_APPLE_DEVELOPER_ID="${{ secrets.macOS_AppleDeveloperId }}"
|
||||
export ZEN_RELEASE=1
|
||||
pnpm package
|
||||
|
||||
- name: Rename artifacts
|
||||
run: |
|
||||
mv ./dist/output.mar macos-${{ matrix.arch }}.mar
|
||||
|
||||
- name: Remove sensitive information
|
||||
run: |
|
||||
rm -f ./engine/Zen_Browser.provisionprofile
|
||||
|
||||
- name: Sign .dmg
|
||||
run: |
|
||||
echo "Tarballing DMG"
|
||||
set -ex
|
||||
hdiutil convert ./dist/*.dmg -format UDZO -imagekey zlib-level=9 -o zen.macos-${{ matrix.arch }}.dmg
|
||||
xattr -cr zen.macos-${{ matrix.arch }}.dmg
|
||||
codesign -s "${{ secrets.macOS_AppleDeveloperId }}" zen.macos-${{ matrix.arch }}.dmg
|
||||
xcrun notarytool submit "zen.macos-${{ matrix.arch }}.dmg" \
|
||||
--apple-id "${{ secrets.macOS_AppleAccountId }}" \
|
||||
--team-id "${{ secrets.macOS_AppleDeveloperIdTeamId }}" \
|
||||
--password "${{ secrets.macOS_AppleDeveloperIdPassword }}" \
|
||||
--no-s3-acceleration \
|
||||
--verbose \
|
||||
--wait
|
||||
xcrun stapler staple "zen.macos-${{ matrix.arch }}.dmg"
|
||||
mv ./dist/*.dmg ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg
|
||||
mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/host/bin/mar ./zen-macos-host-mar
|
||||
mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/bin/platform.ini ./platform.ini
|
||||
|
||||
- name: Upload build artifact
|
||||
- name: Upload dist dmg
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 5
|
||||
name: zen.macos-${{ matrix.arch }}.dmg
|
||||
path: ./zen.macos-${{ matrix.arch }}.dmg
|
||||
retention-days: 1
|
||||
name: zen-${{ matrix.arch }}-apple-darwin-dist.dmg
|
||||
path: ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg
|
||||
|
||||
- name: Upload build artifact (.mar)
|
||||
- name: Upload host mar
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.arch == 'aarch64'
|
||||
with:
|
||||
retention-days: 5
|
||||
name: macos-${{ matrix.arch }}.mar
|
||||
path: ./macos-${{ matrix.arch }}.mar
|
||||
retention-days: 1
|
||||
name: zen-macos-host-mar
|
||||
path: ./zen-macos-host-mar
|
||||
|
||||
- name: Upload build artifact (update manifests)
|
||||
- name: Upload platform.ini
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.arch == 'x86_64'
|
||||
with:
|
||||
retention-days: 5
|
||||
name: macos_update_manifest_${{ matrix.arch }}
|
||||
path: ./dist/update
|
||||
retention-days: 1
|
||||
name: platform.ini
|
||||
path: ./platform.ini
|
||||
|
||||
270
.github/workflows/macos-universal-release-build.yml
vendored
Normal file
270
.github/workflows/macos-universal-release-build.yml
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
name: macOS Release Build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build-version:
|
||||
description: 'The version to build'
|
||||
required: true
|
||||
type: string
|
||||
release-branch:
|
||||
description: 'The branch to build'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
mac-build:
|
||||
name: Unify macOS (Universal)
|
||||
runs-on: 'macos-14'
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.DEPLOY_KEY }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
# note: This will use the version defined in '.python-version' by default
|
||||
|
||||
- name: Setup Git
|
||||
run: |
|
||||
git config --global user.email "mauro-balades@users.noreply.github.com"
|
||||
git config --global user.name "mauro-balades"
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install cairo sccache gnu-tar mercurial
|
||||
sudo pip install setuptools
|
||||
|
||||
brew uninstall --ignore-dependencies python3.12 -f
|
||||
|
||||
export PATH="$(python3 -m site --user-base)/bin":$PATH
|
||||
python3 -m pip install --user mercurial
|
||||
|
||||
rm '/usr/local/bin/2to3-3.11' '/usr/local/bin/2to3-3.12' '/usr/local/bin/2to3'
|
||||
rm '/usr/local/bin/idle3.11' '/usr/local/bin/idle3.12' '/usr/local/bin/idle3'
|
||||
rm '/usr/local/bin/pydoc3.11' '/usr/local/bin/pydoc3.12' '/usr/local/bin/pydoc3'
|
||||
rm '/usr/local/bin/python3.11' '/usr/local/bin/python3.12' '/usr/local/bin/python3'
|
||||
rm '/usr/local/bin/python3.11-config' '/usr/local/bin/python3.12-config' '/usr/local/bin/python3-config'
|
||||
|
||||
brew install watchman
|
||||
|
||||
cargo install apple-codesign
|
||||
|
||||
- name: Force usage of gnu-tar
|
||||
run: |
|
||||
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bash_profile
|
||||
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.zsh
|
||||
source ~/.bash_profile
|
||||
|
||||
- name: Setup pnpm
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pnpm install
|
||||
|
||||
- name: Load surfer CI setup
|
||||
run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}
|
||||
|
||||
- name: Download Firefox source and dependencies
|
||||
run: pnpm surfer download
|
||||
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
cd engine
|
||||
export SURFER_PLATFORM="darwin"
|
||||
export PATH="$(python3 -m site --user-base)/bin":$PATH
|
||||
./mach --no-interactive bootstrap --application-choice browser --no-system-changes
|
||||
cd ..
|
||||
|
||||
- name: Import
|
||||
run: pnpm surfer import
|
||||
|
||||
- name: Populate mozconfig
|
||||
env:
|
||||
SURFER_MOZCONFIG_ONLY: true
|
||||
run: |
|
||||
pnpm build
|
||||
cd engine
|
||||
./mach configure
|
||||
|
||||
- name: Download x86_64 DMG from artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: zen-x86_64-apple-darwin-dist.dmg
|
||||
|
||||
- name: Download aarch64 DMG from artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: zen-aarch64-apple-darwin-dist.dmg
|
||||
|
||||
- name: Remove any existing .app folders
|
||||
run: |
|
||||
set -x
|
||||
cd engine
|
||||
rm -rf "./obj-x86_64-apple-darwin/" || true
|
||||
rm -rf "./obj-aarch64-apple-darwin/" || true
|
||||
|
||||
- name: Extract .app from dmg
|
||||
run: |
|
||||
set -ex
|
||||
cd engine
|
||||
echo "Extracting x86_64 .app from dmg"
|
||||
mkdir -p ./obj-x86_64-apple-darwin/dist
|
||||
mkdir -p ./obj-aarch64-apple-darwin/dist
|
||||
./mach python -m mozbuild.action.unpack_dmg \
|
||||
../zen-x86_64-apple-darwin-dist.dmg \
|
||||
./obj-x86_64-apple-darwin/dist
|
||||
echo "Extracting aarch64 .app from dmg"
|
||||
./mach python -m mozbuild.action.unpack_dmg \
|
||||
../zen-aarch64-apple-darwin-dist.dmg \
|
||||
./obj-aarch64-apple-darwin/dist
|
||||
|
||||
- name: Find first .app folder name
|
||||
run: |
|
||||
cd engine/obj-x86_64-apple-darwin/dist
|
||||
export APP_NAME=$(basename "$(find . -maxdepth 1 -name "Zen *.app" -type d | head -n 1)" .app)
|
||||
echo "APP_NAME=$APP_NAME" >> $GITHUB_ENV
|
||||
echo "APP_NAME=$APP_NAME"
|
||||
|
||||
- name: List .app folders
|
||||
run: |
|
||||
ls engine/
|
||||
echo "--------------------"
|
||||
cd engine/obj-x86_64-apple-darwin/dist
|
||||
find . -maxdepth 1 -name "*.app" -type d
|
||||
cd ../..
|
||||
|
||||
- name: create .p12 for codesign 🖊️
|
||||
run: |
|
||||
cd engine
|
||||
echo "${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }}" > cert.txt
|
||||
base64 --decode -i cert.txt -o zenCert.p12
|
||||
echo "${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }}" > zenpCertPassword.passwd
|
||||
|
||||
- name: Remove certificate sensitive information
|
||||
run: |
|
||||
rm engine/cert.txt || true
|
||||
|
||||
- name: Import provisioning profile for .app
|
||||
run: |
|
||||
echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > ./engine/Zen_Browser.provisionprofile
|
||||
ls -la
|
||||
|
||||
- name: Unify architectures
|
||||
run: |
|
||||
cd engine
|
||||
./mach python "./toolkit/mozapps/installer/unify.py" "./obj-x86_64-apple-darwin/dist/${{ env.APP_NAME }}.app" "./obj-aarch64-apple-darwin/dist/${{ env.APP_NAME }}.app"
|
||||
echo "Merged aaarch64 into x86_64!"
|
||||
|
||||
- name: Import APPLE DEVELOPER ID CERTIFICATE for .app
|
||||
uses: Apple-Actions/import-codesign-certs@v3
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }}
|
||||
p12-password: ${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }}
|
||||
|
||||
- name: Copy provisioning profile for .app (embedded in .app)
|
||||
run: |
|
||||
cd engine
|
||||
echo "Copying provisioning profile for .app on both architectures (${{ env.APP_NAME }})"
|
||||
cp ./Zen_Browser.provisionprofile "./embedded.provisionprofile"
|
||||
|
||||
- name: Sign .app
|
||||
run: |
|
||||
cd engine
|
||||
# TODO: Change it to "production" once we figure out the issue with the webauth
|
||||
./mach macos-sign -v -r -c "release" -e "production-without-restricted" -a "./obj-x86_64-apple-darwin/dist/${{ env.APP_NAME }}.app" --rcodesign-p12-file zenCert.p12 --rcodesign-p12-password-file zenpCertPassword.passwd
|
||||
|
||||
- name: Create DMG
|
||||
run: |
|
||||
cd engine
|
||||
./mach python -m mozbuild.action.make_dmg \
|
||||
--volume-name "${{ env.APP_NAME }}" \
|
||||
--background ./browser/branding/${{ inputs.release-branch }}/background.png \
|
||||
--icon ./browser/branding/${{ inputs.release-branch }}/firefox.icns \
|
||||
--dsstore ./browser/branding/${{ inputs.release-branch }}/dsstore \
|
||||
./obj-x86_64-apple-darwin/dist/ ../zen-macOS-universal-temp.dmg
|
||||
|
||||
- name: Remove sensitive information
|
||||
run: |
|
||||
rm -f ./engine/Zen_Browser.provisionprofile
|
||||
|
||||
- name: Sign .dmg
|
||||
run: |
|
||||
set -ex
|
||||
hdiutil convert zen-macOS-universal-temp.dmg -format UDZO -imagekey zlib-level=9 -o zen.macos-universal.dmg
|
||||
codesign -s "${{ secrets.macOS_AppleDeveloperId }}" zen.macos-universal.dmg
|
||||
xcrun notarytool submit "zen.macos-universal.dmg" \
|
||||
--apple-id "${{ secrets.macOS_AppleAccountId }}" \
|
||||
--team-id "${{ secrets.macOS_AppleDeveloperIdTeamId }}" \
|
||||
--password "${{ secrets.macOS_AppleDeveloperIdPassword }}" \
|
||||
--no-s3-acceleration \
|
||||
--wait
|
||||
xcrun stapler staple "zen.macos-universal.dmg"
|
||||
|
||||
- name: Download host mar
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: zen-macos-host-mar
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 5
|
||||
name: zen.macos-universal.dmg
|
||||
path: ./zen.macos-universal.dmg
|
||||
|
||||
- name: Download platform.ini
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: platform.ini
|
||||
|
||||
- name: Package for mar
|
||||
env:
|
||||
JUST_MAR: true
|
||||
run: |
|
||||
# we don't need it anymore
|
||||
set -ex
|
||||
rm -rf ./engine/obj-aarch64-apple-darwin
|
||||
mkdir -p ./engine/obj-x86_64-apple-darwin/dist/bin
|
||||
mv ./platform.ini ./engine/obj-x86_64-apple-darwin/dist/bin/platform.ini
|
||||
export SURFER_PLATFORM="darwin"
|
||||
export ZEN_RELEASE=1
|
||||
# full path to zen-macos-host-mar
|
||||
export MAR=$(pwd)/zen-macos-host-mar
|
||||
chmod +x $MAR
|
||||
echo "MAR=$MAR"
|
||||
pnpm package --verbose
|
||||
mv ./dist/output.mar ./macos.mar
|
||||
|
||||
- name: Upload build artifact (.mar)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 5
|
||||
name: macos.mar
|
||||
path: ./macos.mar
|
||||
|
||||
- name: Upload build artifact (update manifests)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
retention-days: 5
|
||||
name: macos_update_manifest
|
||||
path: ./dist/update
|
||||
10
.github/workflows/windows-release-build.yml
vendored
10
.github/workflows/windows-release-build.yml
vendored
@@ -18,6 +18,10 @@ on:
|
||||
description: 'The branch to build'
|
||||
required: true
|
||||
type: string
|
||||
MOZ_BUILD_DATE:
|
||||
type: string
|
||||
required: true
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
windows-build:
|
||||
@@ -59,7 +63,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pnpm install
|
||||
sudo apt-get install -y python3 python3-pip dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3 python3-pip dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm --fix-missing
|
||||
|
||||
- name: Load Surfer CI setup
|
||||
run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}
|
||||
@@ -215,6 +220,9 @@ jobs:
|
||||
if test ${{ inputs.generate-gpo }} = true; then
|
||||
export ZEN_GA_GENERATE_PROFILE=1
|
||||
fi
|
||||
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
|
||||
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
|
||||
fi
|
||||
bash .github/workflows/src/release-build.sh
|
||||
|
||||
- name: Package
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,3 +9,5 @@ dist/
|
||||
|
||||
windsign-temp/
|
||||
venv/
|
||||
|
||||
!firefox-cache/
|
||||
|
||||
@@ -23,5 +23,6 @@ docs/issue-metrics/*.md
|
||||
# Some CSS files are preprocessed and prettier doesn't handle them well
|
||||
# We also dont want to format the CSS files that are generated by the build
|
||||
src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css
|
||||
src/browser/base/content/zen-styles/zen-compact-mode.css
|
||||
src/browser/base/zen-components/ZenEmojies.mjs
|
||||
build/codesign/codesign.bash
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
## 🖥️ Compatibility
|
||||
|
||||
Zen is currently built using firefox version `134.0.1`! 🚀
|
||||
Zen is currently built using firefox version `134.0.2`! 🚀
|
||||
|
||||
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using firefox version `RC 134.0.1`!
|
||||
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using firefox version `RC 134.0.2`!
|
||||
- Check out the latest [release notes](https://zen-browser.app/release-notes)!
|
||||
- Part of our mission is to keep Zen up-to-date with the latest version of Firefox, so you can enjoy the latest features and security updates!
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!--
|
||||
Entitlements to apply to the main browser process executable during
|
||||
codesigning of production channel builds.
|
||||
-->
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- Firefox needs to create executable pages (without MAP_JIT) -->
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/>
|
||||
|
||||
<!-- Firefox needs to create executable pages with MAP_JIT on aarch64 -->
|
||||
<key>com.apple.security.cs.allow-jit</key><true/>
|
||||
|
||||
<!-- Allow loading third party libraries. Needed for Flash and CDMs -->
|
||||
<key>com.apple.security.cs.disable-library-validation</key><true/>
|
||||
|
||||
<!-- Firefox needs to access the microphone on sites the user allows -->
|
||||
<key>com.apple.security.device.audio-input</key><true/>
|
||||
|
||||
<!-- Firefox needs to access the camera on sites the user allows -->
|
||||
<key>com.apple.security.device.camera</key><true/>
|
||||
|
||||
<!-- Firefox needs to access the location on sites the user allows -->
|
||||
<key>com.apple.security.personal-information.location</key><true/>
|
||||
|
||||
<!-- Allow Firefox to send Apple events to other applications. Needed
|
||||
for native messaging webextension helper applications launched by
|
||||
Firefox which rely on Apple Events to signal other processes. -->
|
||||
<key>com.apple.security.automation.apple-events</key><true/>
|
||||
|
||||
<!-- For SmartCardServices(7) -->
|
||||
<key>com.apple.security.smartcard</key><true/>
|
||||
|
||||
<!-- Required for com.apple.developer.web-browser.public-key-credential -->
|
||||
<key>com.apple.application-identifier</key>
|
||||
<string>H36NPCN86W.app.zen-browser.zen</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,179 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# 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 https://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# Runs codesign commands to codesign a Firefox .app bundle and enable macOS
|
||||
# Hardened Runtime. Intended to be manually run by developers working on macOS
|
||||
# 10.14+ who want to enable Hardened Runtime for manual testing. This is
|
||||
# provided as a stop-gap until automated build tooling is available that signs
|
||||
# binaries with a certificate generated during builds (bug 1522409). This
|
||||
# script requires macOS 10.14 because Hardened Runtime is only available for
|
||||
# applications running on 10.14 despite support for the codesign "-o runtime"
|
||||
# option being available in 10.13.6 and newer.
|
||||
#
|
||||
# The script requires an identity string (-i option) from an Apple Developer
|
||||
# ID certificate. This can be found in the macOS KeyChain after configuring an
|
||||
# Apple Developer ID certificate.
|
||||
#
|
||||
# Example usage on macOS 10.14:
|
||||
#
|
||||
# $ ./mach build
|
||||
# $ ./mach build package
|
||||
# $ open </PATH/TO/DMG/FILE.dmg>
|
||||
# <Drag Nightly.app to ~>
|
||||
# $ ./security/mac/hardenedruntime/codesign.bash \
|
||||
# -a ~/Nightly.app \
|
||||
# -i <MY-IDENTITY-STRING> \
|
||||
# -b security/mac/hardenedruntime/browser.developer.entitlements.xml
|
||||
# -p security/mac/hardenedruntime/plugin-container.developer.entitlements.xml
|
||||
# $ open ~/Nightly.app
|
||||
#
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo "Usage: $0 "
|
||||
echo " -a <PATH-TO-BROWSER.app>"
|
||||
echo " -i <IDENTITY>"
|
||||
echo " -b <ENTITLEMENTS-FILE>"
|
||||
echo " -p <CHILD-ENTITLEMENTS-FILE>"
|
||||
echo " [-o <OUTPUT-DMG-FILE>]"
|
||||
exit -1
|
||||
}
|
||||
|
||||
# Make sure we are running on macOS with the sw_vers command available.
|
||||
SWVERS=/usr/bin/sw_vers
|
||||
if [ ! -x ${SWVERS} ]; then
|
||||
echo "ERROR: macOS 10.14 or later is required"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Require macOS 10.14 or newer.
|
||||
#OSVERSION=`${SWVERS} -productVersion|sed -En 's/[0-9]+\.([0-9]+)\.[0-9]+/\1/p'`;
|
||||
#if [ ${OSVERSION} \< 14 ]; then
|
||||
# echo "ERROR: macOS 10.14 or later is required"
|
||||
# exit -1
|
||||
#fi
|
||||
|
||||
while getopts "a:i:b:o:p:" opt; do
|
||||
case ${opt} in
|
||||
a ) BUNDLE=$OPTARG ;;
|
||||
i ) IDENTITY=$OPTARG ;;
|
||||
b ) BROWSER_ENTITLEMENTS_FILE=$OPTARG ;;
|
||||
p ) PLUGINCONTAINER_ENTITLEMENTS_FILE=$OPTARG ;;
|
||||
o ) OUTPUT_DMG_FILE=$OPTARG ;;
|
||||
\? ) usage; exit -1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "${BUNDLE}" ] ||
|
||||
[ -z "${IDENTITY}" ] ||
|
||||
[ -z "${PLUGINCONTAINER_ENTITLEMENTS_FILE}" ] ||
|
||||
[ -z "${BROWSER_ENTITLEMENTS_FILE}" ]; then
|
||||
usage
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ ! -d "${BUNDLE}" ]; then
|
||||
echo "Invalid bundle. Bundle should be a .app directory"
|
||||
usage
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ ! -e "${PLUGINCONTAINER_ENTITLEMENTS_FILE}" ]; then
|
||||
echo "Invalid entitlements file"
|
||||
usage
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ ! -e "${BROWSER_ENTITLEMENTS_FILE}" ]; then
|
||||
echo "Invalid entitlements file"
|
||||
usage
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# DMG file output flag is optional
|
||||
if [ ! -z "${OUTPUT_DMG_FILE}" ] &&
|
||||
[ -e "${OUTPUT_DMG_FILE}" ]; then
|
||||
echo "Output dmg file ${OUTPUT_DMG_FILE} exists. Please delete it first."
|
||||
usage
|
||||
exit -1
|
||||
fi
|
||||
|
||||
echo "-------------------------------------------------------------------------"
|
||||
echo "bundle: $BUNDLE"
|
||||
echo "identity: $IDENTITY"
|
||||
echo "browser entitlements file: $BROWSER_ENTITLEMENTS_FILE"
|
||||
echo "plugin-container entitlements file: $PLUGINCONTAINER_ENTITLEMENTS_FILE"
|
||||
echo "output dmg file (optional): $OUTPUT_DMG_FILE"
|
||||
echo "-------------------------------------------------------------------------"
|
||||
|
||||
set -x
|
||||
|
||||
# move Zen_Browser.provisionprofile to the Contents directory
|
||||
#cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile
|
||||
|
||||
# Clear extended attributes which cause codesign to fail
|
||||
xattr -cr "${BUNDLE}"
|
||||
|
||||
# Sign these binaries first. Signing of some binaries has an ordering
|
||||
# requirement where other binaries must be signed first.
|
||||
codesign --force -o runtime --verbose --sign "$IDENTITY" \
|
||||
"${BUNDLE}/Contents/Library/LaunchServices/org.mozilla.updater" \
|
||||
"${BUNDLE}/Contents/MacOS/XUL" \
|
||||
"${BUNDLE}"/Contents/embedded.provisionprofile \
|
||||
"${BUNDLE}/Contents/MacOS/pingsender"
|
||||
|
||||
# Sign every ${BUNDLE}/Contents/MacOS/*.dylib
|
||||
find "${BUNDLE}"/Contents/MacOS -type f -name "*.dylib" -exec \
|
||||
codesign --force --verbose --sign "$IDENTITY" {} \;
|
||||
|
||||
find "${BUNDLE}"/Contents/MacOS -type f -name "*.dylib" -exec \
|
||||
codesign -vvv --strict --deep --verbose {} \;
|
||||
|
||||
codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \
|
||||
"${BUNDLE}"/Contents/MacOS/updater.app
|
||||
|
||||
# Sign zen main executable
|
||||
codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \
|
||||
--entitlements ${BROWSER_ENTITLEMENTS_FILE} \
|
||||
"${BUNDLE}"/Contents/MacOS/zen
|
||||
|
||||
# Sign Library/LaunchServices
|
||||
codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \
|
||||
"${BUNDLE}"/Contents/Library/LaunchServices/org.mozilla.updater
|
||||
|
||||
# Sign gmp-clearkey files
|
||||
find "${BUNDLE}"/Contents/Resources/gmp-clearkey -type f -exec \
|
||||
codesign --force -o runtime --verbose --sign "$IDENTITY" {} \;
|
||||
|
||||
# Sign the main bundle
|
||||
codesign --force -o runtime --verbose --sign "$IDENTITY" \
|
||||
--entitlements ${BROWSER_ENTITLEMENTS_FILE} "${BUNDLE}"
|
||||
|
||||
# Sign the plugin-container bundle with deep
|
||||
codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \
|
||||
--entitlements ${PLUGINCONTAINER_ENTITLEMENTS_FILE} \
|
||||
"${BUNDLE}"/Contents/MacOS/plugin-container.app
|
||||
|
||||
# Validate
|
||||
codesign -vvv --deep --strict "${BUNDLE}"
|
||||
|
||||
# Create a DMG
|
||||
if [ ! -z "${OUTPUT_DMG_FILE}" ]; then
|
||||
DISK_IMAGE_DIR=`mktemp -d`
|
||||
TEMP_FILE=`mktemp`
|
||||
TEMP_DMG=${TEMP_FILE}.dmg
|
||||
NAME=`basename "${BUNDLE}"`
|
||||
|
||||
ditto "${BUNDLE}" "${DISK_IMAGE_DIR}/${NAME}"
|
||||
hdiutil create -size 400m -fs HFS+ \
|
||||
-volname Firefox -srcfolder "${DISK_IMAGE_DIR}" "${TEMP_DMG}"
|
||||
hdiutil convert -format UDZO \
|
||||
-o "${OUTPUT_DMG_FILE}" "${TEMP_DMG}"
|
||||
|
||||
rm ${TEMP_FILE}
|
||||
rm ${TEMP_DMG}
|
||||
rm -rf "${DISK_IMAGE_DIR}"
|
||||
fi
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!--
|
||||
Entitlements to apply to the plugin-container.app bundle during
|
||||
codesigning of production channel builds.
|
||||
-->
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- Firefox needs to create executable pages (without MAP_JIT) -->
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/>
|
||||
|
||||
<!-- Firefox needs to create executable pages with MAP_JIT on aarch64 -->
|
||||
<key>com.apple.security.cs.allow-jit</key><true/>
|
||||
|
||||
<!-- Allow loading third party libraries. Needed for Flash and CDMs -->
|
||||
<key>com.apple.security.cs.disable-library-validation</key><true/>
|
||||
|
||||
<!-- Firefox needs to access the microphone on sites the user allows -->
|
||||
<key>com.apple.security.device.audio-input</key><true/>
|
||||
|
||||
<!-- Firefox needs to access the camera on sites the user allows -->
|
||||
<key>com.apple.security.device.camera</key><true/>
|
||||
|
||||
<!-- Firefox needs to access the location on sites the user allows -->
|
||||
<key>com.apple.security.personal-information.location</key><true/>
|
||||
|
||||
<!-- Allow Firefox to send Apple events to other applications. Needed
|
||||
for native messaging webextension helper applications launched by
|
||||
Firefox which rely on Apple Events to signal other processes. -->
|
||||
<key>com.apple.security.automation.apple-events</key><true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,119 +1,136 @@
|
||||
param(
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string][Parameter(Mandatory=$true)]$SignIdentity,
|
||||
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string][Parameter(Mandatory=$true)]$GithubRunId
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function Download-Artifacts {
|
||||
param(
|
||||
[string]$Name,
|
||||
[string]$GithubRunId
|
||||
)
|
||||
gh run download $GithubRunId --name $Name -D (Join-Path $PWD 'windsign-temp\windows-x64-obj-' + $Name)
|
||||
Write-Verbose "Downloaded $Name artifacts"
|
||||
}
|
||||
|
||||
function Sign-Files {
|
||||
param(
|
||||
[string]$Path
|
||||
)
|
||||
$files = Get-ChildItem -Path $Path -Recurse -Include *.exe, *.dll
|
||||
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
|
||||
}
|
||||
|
||||
function Move-File {
|
||||
param(
|
||||
[string]$Source,
|
||||
[string]$Destination
|
||||
)
|
||||
if (Test-Path $Source) {
|
||||
Move-Item $Source -Destination $Destination -Force
|
||||
Write-Verbose "Moved $Source to $Destination"
|
||||
} else {
|
||||
Write-Warning "Source file $Source does not exist."
|
||||
}
|
||||
}
|
||||
|
||||
function Create-Tar {
|
||||
param(
|
||||
[string]$Name
|
||||
)
|
||||
$tarPath = Join-Path $PWD "windsign-temp\windows-x64-signed-$Name"
|
||||
Remove-Item -Path $tarPath -Recurse -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType Directory -Path $tarPath | Out-Null
|
||||
|
||||
Move-File -Source ".\dist\output.mar" -Destination (Join-Path $tarPath ("windows-$Name.mar"))
|
||||
Move-File -Source ".\dist\zen.installer.exe" -Destination (Join-Path $tarPath ("zen.installer$($Name -eq 'arm64' ? '-arm64' : '') .exe"))
|
||||
Move-File -Source (Get-ChildItem ".\dist\*.en-US.win64$($Name -eq 'arm64' ? '-aarch64' : '') .zip" | Select-Object -First 1) -Destination (Join-Path $tarPath ("zen.win-$Name.zip"))
|
||||
}
|
||||
|
||||
function SignAndPackage {
|
||||
param(
|
||||
[string]$Name
|
||||
)
|
||||
|
||||
Write-Verbose "Executing on $Name"
|
||||
Remove-Item -Path ".\dist" -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "engine\obj-x86_64-pc-windows-msvc\" -Recurse -ErrorAction SilentlyContinue
|
||||
Copy-Item -Path (Join-Path $PWD "windsign-temp\windows-x64-obj-$Name") -Destination "engine\obj-x86_64-pc-windows-msvc\" -Recurse
|
||||
Write-Verbose "Signing $Name"
|
||||
|
||||
Sign-Files -Path "engine\obj-x86_64-pc-windows-msvc\"
|
||||
|
||||
$env:SURFER_SIGNING_MODE = "sign"
|
||||
$env:MAR = (Join-Path $PWD "build\winsign\mar.exe")
|
||||
$env:SURFER_COMPAT = if ($Name -eq "arm64") { "aarch64" } else { "x86_64" }
|
||||
Write-Verbose "Compat Mode? $env:SURFER_COMPAT"
|
||||
|
||||
pnpm surfer package --verbose
|
||||
|
||||
Create-Tar -Name $Name
|
||||
|
||||
# Extract and sign the contents of the zip
|
||||
Expand-Archive -Path (Join-Path $tarPath ("zen.win-$Name.zip")) -DestinationPath (Join-Path $tarPath ("zen.win-$Name"))
|
||||
Remove-Item -Path (Join-Path $tarPath ("zen.win-$Name.zip")) -ErrorAction SilentlyContinue
|
||||
|
||||
Sign-Files -Path (Join-Path $tarPath ("zen.win-$Name"))
|
||||
Compress-Archive -Path (Join-Path $tarPath ("zen.win-$Name")) -DestinationPath (Join-Path $tarPath ("zen.win-$Name.zip"))
|
||||
Remove-Item -Path (Join-Path $tarPath ("zen.win-$Name")) -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
Move-File -Source ".\dist\update\*" -Destination (Join-Path $tarPath "update_manifest")
|
||||
|
||||
Write-Verbose "Finished $Name"
|
||||
}
|
||||
|
||||
Write-Verbose "Preparing environment"
|
||||
echo "Preparing environment"
|
||||
git pull --recurse-submodules
|
||||
New-Item -ItemType Directory -Path "windsign-temp" -ErrorAction SilentlyContinue
|
||||
mkdir windsign-temp -ErrorAction SilentlyContinue
|
||||
|
||||
Download-Artifacts -Name "windows-x64-obj-arm64" -GithubRunId $GithubRunId
|
||||
Download-Artifacts -Name "windows-x64-obj-x86_64" -GithubRunId $GithubRunId
|
||||
# Download in parallel
|
||||
|
||||
#show output too
|
||||
#Start-Job -Name "DownloadGitObjectsRepo" -ScriptBlock {
|
||||
# param($PWD)
|
||||
# echo "Downloading git objects repo to $PWD\windsign-temp\windows-binaries"
|
||||
# git clone https://github.com/zen-browser/windows-binaries.git $PWD\windsign-temp\windows-binaries
|
||||
# echo "Downloaded git objects repo to"
|
||||
#} -Verbose -ArgumentList $PWD -Debug
|
||||
|
||||
gh run download $GithubRunId --name windows-x64-obj-arm64 -D windsign-temp\windows-x64-obj-arm64
|
||||
echo "Downloaded arm64 artifacts"
|
||||
gh run download $GithubRunId --name windows-x64-obj-x86_64 -D windsign-temp\windows-x64-obj-x86_64
|
||||
echo "Downloaded x86_64 artifacts"
|
||||
|
||||
|
||||
#Wait-Job -Name "DownloadGitObjectsRepo"
|
||||
|
||||
mkdir engine\obj-x86_64-pc-windows-msvc\ -ErrorAction SilentlyContinue
|
||||
|
||||
New-Item -ItemType Directory -Path "engine\obj-x86_64-pc-windows-msvc" -ErrorAction SilentlyContinue
|
||||
pnpm surfer ci --brand release
|
||||
|
||||
SignAndPackage -Name "arm64"
|
||||
SignAndPackage -Name "x86_64"
|
||||
function SignAndPackage($name) {
|
||||
echo "Executing on $name"
|
||||
rmdir .\dist -Recurse -ErrorAction SilentlyContinue
|
||||
rmdir engine\obj-x86_64-pc-windows-msvc\ -Recurse -ErrorAction SilentlyContinue
|
||||
cp windsign-temp\windows-x64-obj-$name engine\obj-x86_64-pc-windows-msvc\ -Recurse
|
||||
echo "Signing $name"
|
||||
|
||||
Write-Verbose "All artifacts signed and packaged, ready for release!"
|
||||
Write-Verbose "Committing the changes to the repository"
|
||||
cd (Join-Path $PWD "windsign-temp\windows-binaries")
|
||||
# Collect all .exe and .dll files into a list
|
||||
$files = Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.exe
|
||||
$files += Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.dll
|
||||
|
||||
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
|
||||
echo "Packaging $name"
|
||||
$env:SURFER_SIGNING_MODE="sign"
|
||||
$env:MAR="$PWD\\build\\winsign\\mar.exe"
|
||||
if ($name -eq "arm64") {
|
||||
$env:SURFER_COMPAT="aarch64"
|
||||
} else {
|
||||
$env:SURFER_COMPAT="x86_64"
|
||||
}
|
||||
|
||||
echo "Compat Mode? $env:SURFER_COMPAT"
|
||||
pnpm surfer package --verbose
|
||||
|
||||
# In the release script, we do the following:
|
||||
# tar -xvf .github/workflows/object/windows-x64-signed-x86_64.tar.gz -C windows-x64-signed-x86_64
|
||||
# We need to create a tar with the same structure and no top-level directory
|
||||
# Inside, we need:
|
||||
# - update_manifest/*
|
||||
# - windows.mar
|
||||
# - zen.installer.exe
|
||||
# - zen.win-x86_64.zip
|
||||
echo "Creating tar for $name"
|
||||
rm .\windsign-temp\windows-x64-signed-$name -Recurse -ErrorAction SilentlyContinue
|
||||
mkdir windsign-temp\windows-x64-signed-$name
|
||||
|
||||
# Move the MAR, add the `-arm64` suffix if needed
|
||||
echo "Moving MAR for $name"
|
||||
if ($name -eq "arm64") {
|
||||
mv .\dist\output.mar windsign-temp\windows-x64-signed-$name\windows-$name.mar
|
||||
} else {
|
||||
mv .\dist\output.mar windsign-temp\windows-x64-signed-$name\windows.mar
|
||||
}
|
||||
|
||||
# Move the installer
|
||||
echo "Moving installer for $name"
|
||||
if ($name -eq "arm64") {
|
||||
mv .\dist\zen.installer.exe windsign-temp\windows-x64-signed-$name\zen.installer-$name.exe
|
||||
} else {
|
||||
mv .\dist\zen.installer.exe windsign-temp\windows-x64-signed-$name\zen.installer.exe
|
||||
}
|
||||
|
||||
# Move the zip
|
||||
echo "Moving zip for $name"
|
||||
if ($name -eq "arm64") {
|
||||
mv (Get-Item .\dist\*.en-US.win64-aarch64.zip) windsign-temp\windows-x64-signed-$name\zen.win-arm64.zip
|
||||
} else {
|
||||
mv (Get-Item .\dist\*.en-US.win64.zip) windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
|
||||
}
|
||||
|
||||
# Extract the zip, sign everything inside, and repackage it
|
||||
Expand-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name.zip -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name
|
||||
rm windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
|
||||
$files = Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.exe
|
||||
$files += Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.dll
|
||||
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
|
||||
Compress-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
|
||||
rmdir windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
# Move the manifest
|
||||
mv .\dist\update\. windsign-temp\windows-x64-signed-$name\update_manifest
|
||||
|
||||
echo "Invoking tar for $name"
|
||||
# note: We need to sign it into a parent folder, called windows-x64-signed-$name
|
||||
rmdir .\windsign-temp\windows-binaries\windows-x64-signed-$name -Recurse -ErrorAction SilentlyContinue
|
||||
mv windsign-temp\windows-x64-signed-$name .\windsign-temp\windows-binaries -Force
|
||||
|
||||
echo "Finished $name"
|
||||
}
|
||||
|
||||
SignAndPackage arm64
|
||||
SignAndPackage x86_64
|
||||
|
||||
echo "All artifacts signed and packaged, ready for release!"
|
||||
echo "Commiting the changes to the repository"
|
||||
cd windsign-temp\windows-binaries
|
||||
git add .
|
||||
git commit -m "Sign and package windows artifacts"
|
||||
git push
|
||||
cd -
|
||||
cd ..\..
|
||||
|
||||
# Cleaning up
|
||||
Write-Verbose "Cleaning up"
|
||||
Remove-Item -Path "windsign-temp\windows-x64-obj-x86_64" -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "windsign-temp\windows-x64-obj-arm64" -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Verbose "Opening Visual Studio Code"
|
||||
echo "All done!"
|
||||
echo "All the artifacts (x86_64 and arm46) are signed and packaged, get a rest now!"
|
||||
Read-Host "Press Enter to continue"
|
||||
|
||||
echo "Cleaning up"
|
||||
rmdir windsign-temp\windows-x64-obj-x86_64 -Recurse -ErrorAction SilentlyContinue
|
||||
rmdir windsign-temp\windows-x64-obj-arm64 -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
echo "Opening visual studio code"
|
||||
code .
|
||||
Write-Host "All done! Press Enter to continue."
|
||||
Read-Host
|
||||
|
||||
|
||||
BIN
configs/branding/release/wizWatermark.bmp
Normal file
BIN
configs/branding/release/wizWatermark.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 201 KiB |
BIN
configs/branding/twilight/wizWatermark.bmp
Normal file
BIN
configs/branding/twilight/wizWatermark.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 201 KiB |
@@ -3,8 +3,8 @@ ac_add_options --with-app-name=${binName}
|
||||
ac_add_options --with-app-basename=Zen
|
||||
ac_add_options --enable-official-branding
|
||||
|
||||
# Localization
|
||||
ac_add_options --with-l10n-base="$PWD/browser/locales"
|
||||
# Localization (Must be an absolute path)
|
||||
ac_add_options --with-l10n-base="${topsrcdir}/browser/locales"
|
||||
|
||||
export MOZ_USER_DIR="${name}"
|
||||
export MOZ_APP_BASENAME=Zen
|
||||
|
||||
1
firefox-cache/l10n-last-commit-hash
Normal file
1
firefox-cache/l10n-last-commit-hash
Normal file
@@ -0,0 +1 @@
|
||||
1e9d5c766342b027f104f5071ec8e343abb1088b
|
||||
@@ -36,29 +36,29 @@ modules:
|
||||
- mv zen /app/
|
||||
- mkdir -p /app/lib/ffmpeg
|
||||
|
||||
- install -Dm0755 metadata/launch-script.sh ${FLATPAK_DEST}/bin/launch-script.sh
|
||||
- install -Dm0644 metadata/policies.json ${FLATPAK_DEST}/bin/distribution/policies.json
|
||||
- install -Dm0644 metadata/icons/${FLATPAK_ID}.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg
|
||||
- install -Dm0644 metadata/${FLATPAK_ID}.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
|
||||
- install -Dm0644 metadata/${FLATPAK_ID}.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
|
||||
- install -Dm0755 metadata/launch-script.sh ${{FLATPAK_DEST}}/bin/launch-script.sh
|
||||
- install -Dm0644 metadata/policies.json ${{FLATPAK_DEST}}/bin/distribution/policies.json
|
||||
- install -Dm0644 metadata/icons/${{FLATPAK_ID}}.svg ${{FLATPAK_DEST}}/share/icons/hicolor/scalable/apps/${{FLATPAK_ID}}.svg
|
||||
- install -Dm0644 metadata/${{FLATPAK_ID}}.metainfo.xml ${{FLATPAK_DEST}}/share/metainfo/${{FLATPAK_ID}}.metainfo.xml
|
||||
- install -Dm0644 metadata/${{FLATPAK_ID}}.desktop ${{FLATPAK_DEST}}/share/applications/${{FLATPAK_ID}}.desktop
|
||||
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/zen-browser/desktop/releases/download/1.6b/zen.linux-x86_64.tar.bz2
|
||||
url: https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-x86_64.tar.bz2
|
||||
sha256: {linux_sha256}
|
||||
strip-components: 0
|
||||
only-arches:
|
||||
- x86_64
|
||||
|
||||
- type: archive
|
||||
url: https://github.com/zen-browser/desktop/releases/download/1.6b/zen.linux-aarch64.tar.bz2
|
||||
url: https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-aarch64.tar.bz2
|
||||
sha256: {linux_aarch64_sha256}
|
||||
strip-components: 0
|
||||
only-arches:
|
||||
- aarch64
|
||||
|
||||
- type: archive
|
||||
url: https://github.com/zen-browser/flatpak/releases/download/1.6b/archive.tar
|
||||
url: https://github.com/zen-browser/flatpak/releases/download/{version}/archive.tar
|
||||
sha256: {flatpak_sha256}
|
||||
strip-components: 0
|
||||
dest: metadata
|
||||
2
l10n
2
l10n
Submodule l10n updated: 1abc46f17d...cb32b48cb5
0
l10n-last-commit-hash
Normal file
0
l10n-last-commit-hash
Normal file
4544
package-lock.json
generated
Normal file
4544
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@
|
||||
"start": "cd engine && ./mach run --noprofile",
|
||||
"import": "surfer import",
|
||||
"export": "surfer export",
|
||||
"init": "npm run bootstrap && npm run import",
|
||||
"init": "npm run download && npm run bootstrap && npm run import",
|
||||
"download": "surfer download",
|
||||
"bootstrap": "surfer bootstrap && surfer bootstrap",
|
||||
"package": "surfer package",
|
||||
@@ -19,6 +19,7 @@
|
||||
"update-ff:raw": "surfer update",
|
||||
"update-newtab": "python3 scripts/update_newtab.py",
|
||||
"update-ff:rc": "python3 scripts/update_ff.py --rc",
|
||||
"update-ff:l10n": "python3 scripts/update_ff.py --just-l10n",
|
||||
"pretty": "prettier . --write && autopep8 -r --in-place scripts/ src/",
|
||||
"lint": "npx prettier . --check && autopep8 --diff scripts/ src/",
|
||||
"prepare": "husky",
|
||||
@@ -39,7 +40,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/zen-browser/core#readme",
|
||||
"dependencies": {
|
||||
"@zen-browser/surfer": "^1.9.8"
|
||||
"@zen-browser/surfer": "^1.9.16"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^9.1.7",
|
||||
|
||||
1927
pnpm-lock.yaml
generated
1927
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -7,8 +7,13 @@ git config --global fetch.prune true
|
||||
|
||||
cd $CURRENT_DIR
|
||||
|
||||
LAST_FIREFOX_L10N_COMMIT=$(cat ./firefox-cache/l10n-last-commit-hash)
|
||||
|
||||
cd ./l10n
|
||||
# clone only from LAST_FIREFOX_L10N_COMMIT
|
||||
git clone https://github.com/mozilla-l10n/firefox-l10n
|
||||
cd firefox-l10n
|
||||
git checkout $LAST_FIREFOX_L10N_COMMIT
|
||||
cd $CURRENT_DIR
|
||||
|
||||
update_language() {
|
||||
|
||||
@@ -57,21 +57,39 @@ def update_readme(last_version, new_version, is_rc=False):
|
||||
raise RuntimeError(f"README.md file not found: {e}")
|
||||
|
||||
|
||||
def update_l10n_last_commit_hash():
|
||||
L10N_REPO = "https://github.com/mozilla-l10n/firefox-l10n"
|
||||
try:
|
||||
os.system(f"git clone {L10N_REPO} l10n-temp")
|
||||
if not os.path.exists("firefox-cache"):
|
||||
os.mkdir("firefox-cache")
|
||||
with open("l10n-last-commit-hash", "w") as f:
|
||||
os.system("cat l10n-temp/.git/refs/heads/main > firefox-cache/l10n-last-commit-hash")
|
||||
except KeyboardInterrupt:
|
||||
print("Exiting...")
|
||||
shutil.rmtree("l10n-temp")
|
||||
|
||||
|
||||
def main():
|
||||
"""Main function to update versions and README."""
|
||||
|
||||
arg_parser = argparse.ArgumentParser()
|
||||
arg_parser.add_argument(
|
||||
"--rc", help="Indicates that this is a release candidate.", default=False, action="store_true")
|
||||
arg_parser.add_argument(
|
||||
"--just-l10n", help="Only update the l10n last commit hash.", default=False, action="store_true")
|
||||
args = arg_parser.parse_args()
|
||||
|
||||
try:
|
||||
last_version = get_version_from_file("surfer.json", args.rc)
|
||||
update_ff(args.rc, last_version)
|
||||
new_version = get_version_from_file("surfer.json", args.rc)
|
||||
update_readme(last_version, new_version, args.rc)
|
||||
print(
|
||||
f"Updated version from {last_version} to {new_version} in README.md.")
|
||||
if not args.just_l10n:
|
||||
last_version = get_version_from_file("surfer.json", args.rc)
|
||||
update_ff(args.rc, last_version)
|
||||
new_version = get_version_from_file("surfer.json", args.rc)
|
||||
update_readme(last_version, new_version, args.rc)
|
||||
print(
|
||||
f"Updated version from {last_version} to {new_version} in README.md.")
|
||||
print("Updating l10n last commit hash.")
|
||||
update_l10n_last_commit_hash()
|
||||
except Exception as e:
|
||||
print(f"An error occurred: {e}")
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ pref('pdfjs.enableHighlightFloatingButton', true);
|
||||
pref("alerts.showFavicons", true);
|
||||
|
||||
// Toolbars
|
||||
pref("browser.tabs.closeWindowWithLastTab", false);
|
||||
pref("browser.tabs.loadBookmarksInTabs", false);
|
||||
pref('browser.toolbars.bookmarks.visibility', 'never');
|
||||
pref("browser.bookmarks.openInTabClosesMenu", false);
|
||||
@@ -85,11 +86,11 @@ pref('zen.theme.accent-color', "#ffb787");
|
||||
pref('zen.theme.content-element-separation', 6); // In pixels
|
||||
pref('zen.theme.pill-button', false);
|
||||
pref('zen.theme.gradient', true);
|
||||
pref('zen.theme.essentials-favicon-bg', true);
|
||||
pref('zen.theme.essentials-favicon-bg', false);
|
||||
|
||||
pref('zen.tabs.show-newtab-vertical', true);
|
||||
pref('zen.view.show-newtab-button-border-top', true);
|
||||
pref('zen.view.show-newtab-button-top', false);
|
||||
pref('zen.view.show-newtab-button-border-top', false);
|
||||
pref('zen.view.show-newtab-button-top', true);
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
||||
@@ -101,10 +102,10 @@ pref('zen.injections.match-urls', 'http://localhost/*', locked);
|
||||
pref('zen.rice.share.notice.accepted', false);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.theme.border-radius', 10); // In pixels
|
||||
pref('zen.theme.border-radius', 12); // In pixels
|
||||
#else
|
||||
#ifdef XP_WIN
|
||||
pref('zen.theme.border-radius', 6); // In pixels
|
||||
pref('zen.theme.border-radius', 12); // In pixels
|
||||
#else
|
||||
pref('zen.theme.border-radius', 8); // In pixels
|
||||
#endif
|
||||
@@ -114,7 +115,6 @@ pref('zen.theme.color-prefs.use-workspace-colors', true);
|
||||
pref('zen.theme.color-prefs.amoled', false);
|
||||
pref('zen.theme.color-prefs.colorful', false);
|
||||
|
||||
pref('zen.view.compact', false);
|
||||
pref('zen.view.compact.hide-tabbar', true);
|
||||
pref('zen.view.compact.hide-toolbar', false);
|
||||
pref('zen.view.compact.toolbar-flash-popup', true);
|
||||
@@ -133,14 +133,18 @@ pref('zen.view.experimental-rounded-view', false);
|
||||
pref('zen.view.experimental-rounded-view', true);
|
||||
#endif
|
||||
|
||||
// Glance
|
||||
pref('zen.glance.enabled', true);
|
||||
pref('zen.glance.hold-duration', 300); // in ms
|
||||
|
||||
pref('zen.glance.open-essential-external-links', true);
|
||||
pref('zen.glance.activation-method', 'alt'); // ctrl, alt, shift, none, hold
|
||||
|
||||
pref('zen.view.sidebar-height-throttle', 200); // in ms
|
||||
pref('zen.view.sidebar-expanded.max-width', 500);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.view.mac.show-three-dot-menu', false);
|
||||
#endif
|
||||
pref('zen.view.show-bottom-border', false);
|
||||
pref('zen.view.use-single-toolbar', true);
|
||||
pref('zen.view.sidebar-expanded', true);
|
||||
@@ -166,9 +170,10 @@ pref('zen.keyboard.shortcuts.disable-mainkeyset-clear', false); // for debugging
|
||||
pref('zen.themes.updated-value-observer', false);
|
||||
|
||||
pref('zen.tab-unloader.enabled', true);
|
||||
pref('zen.tab-unloader.timeout-minutes', 20);
|
||||
pref('zen.tab-unloader.timeout-minutes', 40);
|
||||
pref('zen.tab-unloader.excluded-urls', "example.com,example.org");
|
||||
|
||||
pref('zen.pinned-tab-manager.debug', false);
|
||||
pref('zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url', false);
|
||||
pref('zen.pinned-tab-manager.close-shortcut-behavior', 'switch');
|
||||
|
||||
@@ -188,7 +193,7 @@ pref('zen.splitView.change-on-hover', false);
|
||||
pref('zen.splitView.rearrange-hover-size', 24);
|
||||
|
||||
// Startup flags
|
||||
pref('zen.startup.smooth-scroll-in-tabs', false);
|
||||
pref('zen.startup.smooth-scroll-in-tabs', true);
|
||||
|
||||
// Zen Workspaces
|
||||
pref('zen.workspaces.disabled_for_testing', false);
|
||||
@@ -197,16 +202,18 @@ pref('zen.workspaces.hide-default-container-indicator', true);
|
||||
pref('zen.workspaces.individual-pinned-tabs', true);
|
||||
pref('zen.workspaces.show-icon-strip', true);
|
||||
pref('zen.workspaces.force-container-workspace', false);
|
||||
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', true);
|
||||
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', false);
|
||||
pref('zen.workspaces.show-workspace-indicator', true);
|
||||
pref('zen.workspaces.swipe-actions', true);
|
||||
pref('zen.workspaces.wrap-around-navigation', true);
|
||||
pref('zen.workspaces.natural-scroll', false);
|
||||
pref('zen.workspaces.scroll-modifier-key','ctrl'); // can be ctrl, alt, shift, or a meta key
|
||||
pref('services.sync.engine.workspaces', false);
|
||||
pref('zen.essentials.enabled', true);
|
||||
pref('zen.workspaces.container-specific-essentials-enabled', false);
|
||||
|
||||
// Essentials
|
||||
pref('zen.essentials.enabled', true);
|
||||
|
||||
// Zen Watermark
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.watermark.enabled', true, sticky);
|
||||
|
||||
@@ -11,8 +11,9 @@ export var ZenCustomizableUI = new (class {
|
||||
'zen-sidebar-top-buttons',
|
||||
{
|
||||
type: this.TYPE_TOOLBAR,
|
||||
defaultPlacements: AppConstants.platform === 'macosx' ? [] : ['zen-sidepanel-button'],
|
||||
defaultPlacements: [],
|
||||
defaultCollapsed: null,
|
||||
overflowable: true,
|
||||
},
|
||||
true
|
||||
);
|
||||
@@ -34,6 +35,16 @@ export var ZenCustomizableUI = new (class {
|
||||
}
|
||||
|
||||
_addSidebarButtons(window) {
|
||||
const toolbox = window.document.getElementById('navigator-toolbox');
|
||||
|
||||
// Set a splitter to navigator-toolbox
|
||||
const splitter = window.document.createXULElement('splitter');
|
||||
splitter.setAttribute('id', 'zen-sidebar-splitter');
|
||||
splitter.setAttribute('orient', 'horizontal');
|
||||
splitter.setAttribute('resizebefore', 'sibling');
|
||||
splitter.setAttribute('resizeafter', 'none');
|
||||
toolbox.insertAdjacentElement('afterend', splitter);
|
||||
|
||||
const sidebarBox = window.MozXULElement.parseXULToFragment(`
|
||||
<toolbar id="zen-sidebar-top-buttons"
|
||||
fullscreentoolbar="true"
|
||||
@@ -45,25 +56,37 @@ export var ZenCustomizableUI = new (class {
|
||||
flex="1"
|
||||
skipintoolbarset="true"
|
||||
customizationtarget="zen-sidebar-top-buttons-customization-target"
|
||||
overflowable="true"
|
||||
default-overflowbutton="nav-bar-overflow-button"
|
||||
default-overflowtarget="widget-overflow-list"
|
||||
default-overflowpanel="widget-overflow"
|
||||
addon-webext-overflowbutton="unified-extensions-button"
|
||||
addon-webext-overflowtarget="overflowed-extensions-list"
|
||||
mode="icons">
|
||||
<hbox id="zen-sidebar-top-buttons-customization-target" class="customization-target" flex="1">
|
||||
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" data-l10n-id="sidebar-zen-expand" cui-areatype="toolbar" oncommand="gZenVerticalTabsManager.toggleExpand();"></toolbarbutton>
|
||||
<toolbarbutton removable="true" class="toolbarbutton-1 zen-sidebar-action-button zen-compact-mode-ignore" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
|
||||
<html:div id="zen-sidebar-top-buttons-separator" skipintoolbarset="true" overflows="false"></html:div>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
`);
|
||||
window.document.getElementById('navigator-toolbox').prepend(sidebarBox);
|
||||
toolbox.prepend(sidebarBox);
|
||||
new window.MutationObserver((e) => {
|
||||
if (e[0].type !== 'attributes' || e[0].attributeName !== 'width') return;
|
||||
this._dispatchResizeEvent(window);
|
||||
}).observe(toolbox, {
|
||||
attributes: true, //configure it to listen to attribute changes
|
||||
});
|
||||
|
||||
// remove all styles except for the width, since we are xulstoring the complet style list
|
||||
const width = toolbox.style.width || '180px';
|
||||
toolbox.removeAttribute('style');
|
||||
toolbox.style.width = width;
|
||||
|
||||
const newTab = window.document.getElementById('vertical-tabs-newtab-button');
|
||||
newTab.classList.add('zen-sidebar-action-button');
|
||||
|
||||
const wrapper = window.document.createXULElement('toolbarbutton');
|
||||
wrapper.id = 'zen-workspaces-button';
|
||||
window.document.getElementById('zen-sidebar-icons-wrapper').prepend(wrapper);
|
||||
|
||||
for (let id of this.defaultSidebarIcons) {
|
||||
const elem = window.document.getElementById(id);
|
||||
if (!elem) continue;
|
||||
if (!elem || elem.id === 'zen-workspaces-button') continue;
|
||||
elem.setAttribute('removable', 'true');
|
||||
}
|
||||
|
||||
@@ -95,8 +118,19 @@ export var ZenCustomizableUI = new (class {
|
||||
}
|
||||
}
|
||||
|
||||
_dispatchResizeEvent(window) {
|
||||
window.dispatchEvent(new window.Event('resize'));
|
||||
}
|
||||
|
||||
registerToolbarNodes(window) {
|
||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons'));
|
||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper'));
|
||||
window.addEventListener(
|
||||
'DOMContentLoaded',
|
||||
() => {
|
||||
this._dispatchResizeEvent(window);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -31,11 +31,7 @@
|
||||
document.getElementById('zen-appcontent-navbar-container').appendChild(deckTemplate);
|
||||
}
|
||||
|
||||
// Disable smooth scroll
|
||||
gBrowser.tabContainer.arrowScrollbox.smoothScroll = Services.prefs.getBoolPref(
|
||||
'zen.startup.smooth-scroll-in-tabs',
|
||||
false
|
||||
);
|
||||
this._initSidebarScrolling();
|
||||
|
||||
gZenCompactModeManager.init();
|
||||
ZenWorkspaces.init();
|
||||
@@ -84,19 +80,35 @@
|
||||
sidebarPanelWrapper.prepend(elem);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// remove all styles except for the width, since we are xulstoring the complet style list
|
||||
const width = toolbox.style.width || '270px';
|
||||
toolbox.removeAttribute('style');
|
||||
toolbox.style.width = width;
|
||||
_initSidebarScrolling() {
|
||||
// Disable smooth scroll
|
||||
const canSmoothScroll = Services.prefs.getBoolPref('zen.startup.smooth-scroll-in-tabs', false);
|
||||
const workspaceIndicator = document.getElementById('zen-current-workspace-indicator');
|
||||
const tabsWrapper = document.getElementById('zen-browser-tabs-wrapper');
|
||||
gBrowser.tabContainer.addEventListener('wheel', (event) => {
|
||||
if (canSmoothScroll) return;
|
||||
event.preventDefault(); // Prevent the smooth scroll behavior
|
||||
gBrowser.tabContainer.scrollTop += event.deltaY * 20; // Apply immediate scroll
|
||||
});
|
||||
// Detect overflow and underflow
|
||||
const observer = new ResizeObserver((_) => {
|
||||
const tabContainer = gBrowser.tabContainer;
|
||||
const isVertical = tabContainer.getAttribute('orient') === 'vertical';
|
||||
let contentSize = tabsWrapper.getBoundingClientRect()[isVertical ? 'height' : 'width'];
|
||||
// NOTE: This should be contentSize > scrollClientSize, but due
|
||||
// to how Gecko internally rounds in those cases, we allow for some
|
||||
// minor differences (the internal Gecko layout size is 1/60th of a
|
||||
// pixel, so 0.02 should cover it).
|
||||
let overflowing = contentSize - tabContainer.arrowScrollbox.scrollClientSize > 0.02;
|
||||
|
||||
// Set a splitter to navigator-toolbox
|
||||
const splitter = document.createXULElement('splitter');
|
||||
splitter.setAttribute('id', 'zen-sidebar-splitter');
|
||||
splitter.setAttribute('orient', 'horizontal');
|
||||
splitter.setAttribute('resizebefore', 'sibling');
|
||||
splitter.setAttribute('resizeafter', 'none');
|
||||
toolbox.insertAdjacentElement('afterend', splitter);
|
||||
window.requestAnimationFrame(() => {
|
||||
tabContainer.arrowScrollbox.toggleAttribute('overflowing', overflowing);
|
||||
tabContainer.arrowScrollbox.dispatchEvent(new CustomEvent(overflowing ? 'overflow' : 'underflow'));
|
||||
});
|
||||
});
|
||||
observer.observe(tabsWrapper);
|
||||
},
|
||||
|
||||
_initSearchBar() {
|
||||
|
||||
@@ -13,7 +13,7 @@ var gZenUIManager = {
|
||||
});
|
||||
|
||||
new ResizeObserver(gZenCommonActions.throttle(this.updateTabsToolbar.bind(this), this.sidebarHeightThrottle)).observe(
|
||||
document.getElementById('tabbrowser-tabs')
|
||||
document.getElementById('TabsToolbar')
|
||||
);
|
||||
|
||||
new ResizeObserver(
|
||||
@@ -22,25 +22,33 @@ var gZenUIManager = {
|
||||
this.sidebarHeightThrottle
|
||||
)
|
||||
).observe(document.getElementById('navigator-toolbox'));
|
||||
|
||||
window.addEventListener('TabClose', this.updateTabsToolbar.bind(this));
|
||||
},
|
||||
|
||||
updateTabsToolbar() {
|
||||
// Set tabs max-height to the "toolbar-items" height
|
||||
const toolbarItems = document.getElementById('tabbrowser-tabs');
|
||||
const tabs = document.getElementById('tabbrowser-arrowscrollbox');
|
||||
tabs.style.maxHeight = '0px'; // reset to 0
|
||||
const toolbarRect = toolbarItems.getBoundingClientRect();
|
||||
let height = toolbarRect.height;
|
||||
// -5 for the controls padding
|
||||
let totalHeight = toolbarRect.height - this.contentElementSeparation * 2 - 5;
|
||||
// remove the height from other elements that aren't hidden
|
||||
const otherElements = document.querySelectorAll('#tabbrowser-tabs > *:not([hidden="true"])');
|
||||
for (let tab of otherElements) {
|
||||
if (tabs === tab) continue;
|
||||
totalHeight -= tab.getBoundingClientRect().height;
|
||||
const tabs = document.getElementById('zen-browser-tabs-wrapper');
|
||||
// Remove tabs so we can accurately calculate the height
|
||||
// without them affecting the height of the toolbar
|
||||
for (const tab of gBrowser.tabs) {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
continue;
|
||||
}
|
||||
tab.style.maxHeight = '0px';
|
||||
}
|
||||
tabs.style.maxHeight = totalHeight + 'px';
|
||||
//console.info('ZenThemeModifier: set tabs max-height to', totalHeight + 'px');
|
||||
tabs.style.flex = '1';
|
||||
tabs.style.removeProperty('max-height');
|
||||
const toolbarRect = tabs.getBoundingClientRect();
|
||||
let height = toolbarRect.height;
|
||||
for (const tab of gBrowser.tabs) {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
continue;
|
||||
}
|
||||
tab.style.removeProperty('max-height');
|
||||
}
|
||||
tabs.style.removeProperty('flex');
|
||||
tabs.style.maxHeight = height + 'px';
|
||||
},
|
||||
|
||||
openAndChangeToTab(url, options) {
|
||||
@@ -118,6 +126,7 @@ var gZenUIManager = {
|
||||
var gZenVerticalTabsManager = {
|
||||
init() {
|
||||
this._multiWindowFeature = new ZenMultiWindowFeature();
|
||||
this._initWaitPromise();
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, 'isWindowsStyledButtons', () => {
|
||||
return !(
|
||||
@@ -135,8 +144,9 @@ var gZenVerticalTabsManager = {
|
||||
});
|
||||
|
||||
var updateEvent = this._updateEvent.bind(this);
|
||||
var onPrefChange = this._onPrefChange.bind(this);
|
||||
|
||||
this.initializePreferences(updateEvent);
|
||||
this.initializePreferences(onPrefChange);
|
||||
this._toolbarOriginalParent = document.getElementById('nav-bar').parentElement;
|
||||
|
||||
gZenCompactModeManager.addEventListener(updateEvent);
|
||||
@@ -198,18 +208,56 @@ var gZenVerticalTabsManager = {
|
||||
if (this.__topButtonsSeparatorElement) {
|
||||
return this.__topButtonsSeparatorElement;
|
||||
}
|
||||
this.__topButtonsSeparatorElement = document.createElement('div');
|
||||
this.__topButtonsSeparatorElement.id = 'zen-sidebar-top-buttons-separator';
|
||||
this.__topButtonsSeparatorElement.setAttribute('skipintoolbarset', 'true');
|
||||
this.__topButtonsSeparatorElement = document.getElementById('zen-sidebar-top-buttons-separator');
|
||||
return this.__topButtonsSeparatorElement;
|
||||
},
|
||||
|
||||
animateTab(aTab) {
|
||||
if (!gZenUIManager.motion) {
|
||||
return;
|
||||
}
|
||||
// get next visible tab
|
||||
const isLastTab = () => {
|
||||
const visibleTabs = gBrowser.visibleTabs;
|
||||
return visibleTabs[visibleTabs.length - 1] === aTab;
|
||||
};
|
||||
|
||||
const tabSize = aTab.getBoundingClientRect().height;
|
||||
const transform = `-${tabSize}px`;
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
aTab,
|
||||
{
|
||||
opacity: [0, 1],
|
||||
transform: ['scale(0.95)', 'scale(1)'],
|
||||
marginBottom: isLastTab() ? [] : [transform, '0px'],
|
||||
},
|
||||
{
|
||||
duration: 0.2,
|
||||
easing: 'ease-out',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
aTab.style.removeProperty('margin-bottom');
|
||||
aTab.style.removeProperty('transform');
|
||||
aTab.style.removeProperty('opacity');
|
||||
});
|
||||
gZenUIManager.motion
|
||||
.animate(aTab.querySelector('.tab-stack'), {
|
||||
filter: ['blur(1px)', 'blur(0px)'],
|
||||
})
|
||||
.then(() => {
|
||||
aTab.querySelector('.tab-stack').style.removeProperty('filter');
|
||||
});
|
||||
},
|
||||
|
||||
get actualWindowButtons() {
|
||||
// we have multiple ".titlebar-buttonbox-container" in the DOM, because of the titlebar
|
||||
if (!this.__actualWindowButtons) {
|
||||
this.__actualWindowButtons = !this.isWindowsStyledButtons
|
||||
? document.querySelector('.titlebar-buttonbox-container') // TODO: test if it works 100% of the time
|
||||
: document.querySelector('#nav-bar .titlebar-buttonbox-container');
|
||||
this.__actualWindowButtons.setAttribute('overflows', 'false');
|
||||
}
|
||||
return this.__actualWindowButtons;
|
||||
},
|
||||
@@ -231,14 +279,6 @@ var gZenVerticalTabsManager = {
|
||||
},
|
||||
|
||||
initializePreferences(updateEvent) {
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
'_prefsCompactMode',
|
||||
'zen.view.compact',
|
||||
false
|
||||
// no need to update the event, it's handled by the compact mode manager
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, '_prefsVerticalTabs', 'zen.tabs.vertical', true, updateEvent);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, '_prefsRightSide', 'zen.tabs.vertical.right-side', false, updateEvent);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, '_prefsUseSingleToolbar', 'zen.view.use-single-toolbar', false, updateEvent);
|
||||
@@ -252,6 +292,31 @@ var gZenVerticalTabsManager = {
|
||||
);
|
||||
},
|
||||
|
||||
_initWaitPromise() {
|
||||
this._waitPromise = new Promise((resolve) => {
|
||||
this._resolveWaitPromise = resolve;
|
||||
});
|
||||
},
|
||||
|
||||
async _onPrefChange() {
|
||||
this._resolveWaitPromise();
|
||||
|
||||
// only run if we are in the active window
|
||||
await this._multiWindowFeature.foreachWindowAsActive(async (browser) => {
|
||||
if (browser.gZenVerticalTabsManager._multiWindowFeature.windowIsActive(browser)) {
|
||||
return;
|
||||
}
|
||||
await browser.gZenVerticalTabsManager._waitPromise;
|
||||
browser.gZenVerticalTabsManager._updateEvent({ dontRebuildAreas: true });
|
||||
browser.gZenVerticalTabsManager._initWaitPromise();
|
||||
});
|
||||
|
||||
if (ZenMultiWindowFeature.isActiveWindow) {
|
||||
this._updateEvent();
|
||||
this._initWaitPromise();
|
||||
}
|
||||
},
|
||||
|
||||
_updateEvent({ forCustomizableMode = false, dontRebuildAreas = false } = {}) {
|
||||
if (this._isUpdating) {
|
||||
return;
|
||||
@@ -265,7 +330,7 @@ var gZenVerticalTabsManager = {
|
||||
}
|
||||
|
||||
const topButtons = document.getElementById('zen-sidebar-top-buttons');
|
||||
const isCompactMode = this._prefsCompactMode && !forCustomizableMode;
|
||||
const isCompactMode = gZenCompactModeManager.preference && !forCustomizableMode;
|
||||
const isVerticalTabs = this._prefsVerticalTabs || forCustomizableMode;
|
||||
const isSidebarExpanded = this._prefsSidebarExpanded || !isVerticalTabs;
|
||||
const isRightSide = this._prefsRightSide && isVerticalTabs;
|
||||
@@ -332,7 +397,10 @@ var gZenVerticalTabsManager = {
|
||||
this._topButtonsSeparatorElement.after(button);
|
||||
}
|
||||
buttonsTarget.prepend(document.getElementById('unified-extensions-button'));
|
||||
buttonsTarget.prepend(document.getElementById('PanelUI-button'));
|
||||
const panelUIButton = document.getElementById('PanelUI-button');
|
||||
buttonsTarget.prepend(panelUIButton);
|
||||
panelUIButton.setAttribute('overflows', 'false');
|
||||
buttonsTarget.parentElement.append(document.getElementById('nav-bar-overflow-button'));
|
||||
if (this.isWindowsStyledButtons && !doNotChangeWindowButtons) {
|
||||
appContentNavbarContaienr.append(windowButtons);
|
||||
}
|
||||
@@ -357,7 +425,10 @@ var gZenVerticalTabsManager = {
|
||||
}
|
||||
this._topButtonsSeparatorElement.remove();
|
||||
document.documentElement.removeAttribute('zen-single-toolbar');
|
||||
navBar.appendChild(document.getElementById('PanelUI-button'));
|
||||
const panelUIButton = document.getElementById('PanelUI-button');
|
||||
navBar.appendChild(panelUIButton);
|
||||
panelUIButton.removeAttribute('overflows');
|
||||
navBar.appendChild(document.getElementById('nav-bar-overflow-button'));
|
||||
this._toolbarOriginalParent.prepend(navBar);
|
||||
if (!dontRebuildAreas) {
|
||||
this.rebuildAreas();
|
||||
@@ -387,7 +458,7 @@ var gZenVerticalTabsManager = {
|
||||
if (isRightSide && !isSidebarExpanded) {
|
||||
navBar.appendChild(windowButtons);
|
||||
} else {
|
||||
document.getElementById('zen-sidebar-top-buttons-customization-target').appendChild(windowButtons);
|
||||
topButtons.appendChild(windowButtons);
|
||||
}
|
||||
} else if (!isSingleToolbar && !isCompactMode) {
|
||||
if (this.isWindowsStyledButtons) {
|
||||
@@ -420,6 +491,7 @@ var gZenVerticalTabsManager = {
|
||||
|
||||
// Always move the splitter next to the sidebar
|
||||
this.navigatorToolbox.after(document.getElementById('zen-sidebar-splitter'));
|
||||
window.dispatchEvent(new Event('resize'));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
@@ -452,4 +524,15 @@ var gZenVerticalTabsManager = {
|
||||
const newVal = !Services.prefs.getBoolPref('zen.tabs.vertical.right-side');
|
||||
Services.prefs.setBoolPref('zen.tabs.vertical.right-side', newVal);
|
||||
},
|
||||
|
||||
appendCustomizableItem(target, child, placements) {
|
||||
if (
|
||||
target.id === 'zen-sidebar-top-buttons-customization-target' &&
|
||||
this._hasSetSingleToolbar &&
|
||||
placements.includes(child.id)
|
||||
) {
|
||||
return this._topButtonsSeparatorElement.before(child);
|
||||
}
|
||||
target.appendChild(child);
|
||||
},
|
||||
};
|
||||
|
||||
15
src/browser/base/content/browser-commands-js.patch
Normal file
15
src/browser/base/content/browser-commands-js.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/browser/base/content/browser-commands.js b/browser/base/content/browser-commands.js
|
||||
index 352de44dda36e3f6672eb353f42978ede0cd2681..d6956a318c34bfb12b0ba957edab1166e1a4edaf 100644
|
||||
--- a/browser/base/content/browser-commands.js
|
||||
+++ b/browser/base/content/browser-commands.js
|
||||
@@ -407,8 +407,8 @@ var BrowserCommands = {
|
||||
(event.ctrlKey || event.metaKey || event.altKey) &&
|
||||
gBrowser.selectedTab.pinned
|
||||
) {
|
||||
- if (gBrowser.visibleTabs.length > gBrowser.pinnedTabCount) {
|
||||
- gBrowser.tabContainer.selectedIndex = gBrowser.pinnedTabCount;
|
||||
+ if (gBrowser.visibleTabs.length > gBrowser._numVisiblePinTabs) {
|
||||
+ gBrowser.tabContainer.selectedIndex = gBrowser._numVisiblePinTabs;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/base/content/browser-fullScreenAndPointerLock.js
|
||||
index c61a424d3871d94e7086418c72ce22d5aef0a047..b6e3939b1ce67185acc3b9a66385869bd5490a39 100644
|
||||
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
|
||||
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
|
||||
@@ -431,10 +431,10 @@ var FullScreen = {
|
||||
gNavToolbox.classList.toggle("fullscreen-with-menubar", shiftSize > 0);
|
||||
|
||||
let transform = shiftSize > 0 ? `translateY(${shiftSize}px)` : "";
|
||||
- gNavToolbox.style.transform = transform;
|
||||
- gURLBar.textbox.style.transform = gURLBar.textbox.hasAttribute("breakout")
|
||||
- ? transform
|
||||
- : "";
|
||||
+ //gNavToolbox.style.transform = transform;
|
||||
+ //gURLBar.textbox.style.transform = gURLBar.textbox.hasAttribute("breakout")
|
||||
+ // ? transform
|
||||
+ // : "";
|
||||
if (shiftSize > 0) {
|
||||
// If the mouse tracking missed our fullScreenToggler, then the toolbox
|
||||
// might not have been shown before the menubar is animated down. Make
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
|
||||
index ccd83c15d0d73a1e53bdbfdfbe6fed43a26c961d..f18a6abf7debb97539a4cdf8422315b4dff08adb 100644
|
||||
index 9a65dcc7ad41ab961907c95338e023b173d4f474..9477e0c115ed3c4a670f1ac63846b6de01bf8b8c 100644
|
||||
--- a/browser/base/content/browser.js
|
||||
+++ b/browser/base/content/browser.js
|
||||
@@ -32,6 +32,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
||||
@@ -10,7 +10,7 @@ index ccd83c15d0d73a1e53bdbfdfbe6fed43a26c961d..f18a6abf7debb97539a4cdf8422315b4
|
||||
DevToolsSocketStatus:
|
||||
"resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
||||
@@ -632,6 +633,15 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
@@ -630,6 +631,15 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
false
|
||||
);
|
||||
|
||||
@@ -26,7 +26,7 @@ index ccd83c15d0d73a1e53bdbfdfbe6fed43a26c961d..f18a6abf7debb97539a4cdf8422315b4
|
||||
customElements.setElementCreationCallback("screenshots-buttons", () => {
|
||||
Services.scriptloader.loadSubScript(
|
||||
"chrome://browser/content/screenshots/screenshots-buttons.js",
|
||||
@@ -3438,6 +3448,11 @@ var XULBrowserWindow = {
|
||||
@@ -3440,6 +3450,11 @@ var XULBrowserWindow = {
|
||||
AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser);
|
||||
TranslationsParent.onLocationChange(gBrowser.selectedBrowser);
|
||||
|
||||
@@ -38,7 +38,27 @@ index ccd83c15d0d73a1e53bdbfdfbe6fed43a26c961d..f18a6abf7debb97539a4cdf8422315b4
|
||||
PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser);
|
||||
|
||||
if (!gMultiProcessBrowser) {
|
||||
@@ -7289,6 +7304,12 @@ var gDialogBox = {
|
||||
@@ -4435,7 +4450,7 @@ nsBrowserAccess.prototype = {
|
||||
// Passing a null-URI to only create the content window,
|
||||
// and pass true for aSkipLoad to prevent loading of
|
||||
// about:blank
|
||||
- return this.getContentWindowOrOpenURIInFrame(
|
||||
+ let res = this.getContentWindowOrOpenURIInFrame(
|
||||
null,
|
||||
aParams,
|
||||
aWhere,
|
||||
@@ -4443,6 +4458,10 @@ nsBrowserAccess.prototype = {
|
||||
aName,
|
||||
true
|
||||
);
|
||||
+ if (typeof window.gZenGlanceManager !== "undefined" && window.toolbar.visible) {
|
||||
+ window.gZenGlanceManager.onTabOpen(res, aURI);
|
||||
+ }
|
||||
+ return res;
|
||||
},
|
||||
|
||||
openURIInFrame: function browser_openURIInFrame(
|
||||
@@ -7281,6 +7300,12 @@ var gDialogBox = {
|
||||
parentElement.showModal();
|
||||
this._didOpenHTMLDialog = true;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
||||
index 5dd337a2ffc9f9107d735f4dc96a50d57b12d213..58ecaf7136e13885ac38d74d40b5ef0f52cd7684 100644
|
||||
index ca8953f3604f4f70de76576964af5f3c733f17a0..a2731ef6d4392301217cd05f6583e4814f1118e2 100644
|
||||
--- a/browser/base/content/browser.xhtml
|
||||
+++ b/browser/base/content/browser.xhtml
|
||||
@@ -98,6 +98,8 @@
|
||||
@@ -101,6 +101,8 @@
|
||||
|
||||
<title data-l10n-id="browser-main-window-title"></title>
|
||||
|
||||
@@ -11,7 +11,7 @@ index 5dd337a2ffc9f9107d735f4dc96a50d57b12d213..58ecaf7136e13885ac38d74d40b5ef0f
|
||||
# All JS files which are needed by browser.xhtml and other top level windows to
|
||||
# support MacOS specific features *must* go into the global-scripts.inc file so
|
||||
# that they can be shared with macWindow.inc.xhtml.
|
||||
@@ -141,6 +143,7 @@
|
||||
@@ -145,6 +147,7 @@
|
||||
window.addEventListener("DOMContentLoaded",
|
||||
gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true });
|
||||
</script>
|
||||
@@ -19,18 +19,18 @@ index 5dd337a2ffc9f9107d735f4dc96a50d57b12d213..58ecaf7136e13885ac38d74d40b5ef0f
|
||||
</head>
|
||||
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
# All sets except for popupsets (commands, keys, and stringbundles)
|
||||
@@ -162,9 +165,12 @@
|
||||
@@ -166,9 +169,12 @@
|
||||
</vbox>
|
||||
</html:template>
|
||||
|
||||
-#include navigator-toolbox.inc.xhtml
|
||||
-
|
||||
-#include browser-box.inc.xhtml
|
||||
+ <hbox id="zen-main-app-wrapper" flex="1">
|
||||
+ <hbox id="zen-main-app-wrapper" flex="1" persist="zen-compact-mode">
|
||||
+ #include navigator-toolbox.inc.xhtml
|
||||
+ <html:span id="zen-sidebar-box-container">
|
||||
+ </html:span>
|
||||
+ #include browser-box.inc.xhtml
|
||||
+ #include browser-box.inc.xhtml
|
||||
+ </hbox>
|
||||
|
||||
<html:template id="customizationPanel">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
index 00391af141d9015fe5839534e5e6b22a91ba65d9..17d8ac96986e698b09033b870c24fc2f61c47a05 100644
|
||||
index 00391af141d9015fe5839534e5e6b22a91ba65d9..b68767d0fef6cea2756376bbcfe00603d5d1a655 100644
|
||||
--- a/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
|
||||
@@ -2,7 +2,7 @@
|
||||
@@ -29,23 +29,32 @@ index 00391af141d9015fe5839534e5e6b22a91ba65d9..17d8ac96986e698b09033b870c24fc2f
|
||||
<toolbartabstop/>
|
||||
<hbox id="TabsToolbar-customization-target" flex="1">
|
||||
<toolbarbutton id="firefox-view-button"
|
||||
@@ -40,6 +40,7 @@
|
||||
@@ -40,9 +40,9 @@
|
||||
data-l10n-id="toolbar-button-firefox-view-2"
|
||||
role="button"
|
||||
aria-pressed="false"
|
||||
+ hidden="true"
|
||||
cui-areatype="toolbar"
|
||||
removable="true"/>
|
||||
|
||||
@@ -55,9 +56,14 @@
|
||||
-
|
||||
<tabs id="tabbrowser-tabs"
|
||||
is="tabbrowser-tabs"
|
||||
aria-multiselectable="true"
|
||||
@@ -50,6 +50,12 @@
|
||||
tooltip="tabbrowser-tab-tooltip"
|
||||
orient="horizontal"
|
||||
stopwatchid="FX_TAB_CLICK_MS">
|
||||
+<html:div id="zen-essentials-container" skipintoolbarset="true"></html:div>
|
||||
+<hbox id="zen-current-workspace-indicator" skipintoolbarset="true">
|
||||
+ <hbox id="zen-current-workspace-indicator-icon"></hbox>
|
||||
+ <hbox id="zen-current-workspace-indicator-name"></hbox>
|
||||
+</hbox>
|
||||
+<html:div id="zen-browser-tabs-wrapper">
|
||||
<hbox class="tab-drop-indicator" hidden="true"/>
|
||||
# If the name (tabbrowser-arrowscrollbox) or structure of this changes
|
||||
# significantly, there is an optimization in
|
||||
# DisplayPortUtils::MaybeCreateDisplayPortInFirstScrollFrameEncountered based
|
||||
@@ -57,7 +63,7 @@
|
||||
# the current structure that we may want to revisit.
|
||||
+ <html:div id="zen-essentials-container"></html:div>
|
||||
+ <hbox id="zen-current-workspace-indicator">
|
||||
+ <hbox id="zen-current-workspace-indicator-icon"></hbox>
|
||||
+ <hbox id="zen-current-workspace-indicator-name"></hbox>
|
||||
+ </hbox>
|
||||
<html:div id="vertical-pinned-tabs-container" tabindex="-1"></html:div>
|
||||
<html:div id="vertical-pinned-tabs-container-separator"></html:div>
|
||||
- <arrowscrollbox id="tabbrowser-arrowscrollbox" orient="horizontal" flex="1" clicktoscroll="" scrolledtostart="" scrolledtoend="">
|
||||
@@ -53,7 +62,15 @@ index 00391af141d9015fe5839534e5e6b22a91ba65d9..17d8ac96986e698b09033b870c24fc2f
|
||||
<tab is="tabbrowser-tab" class="tabbrowser-tab" selected="true" visuallyselected="" fadein=""/>
|
||||
<hbox id="tabbrowser-arrowscrollbox-periphery">
|
||||
<toolbartabstop/>
|
||||
@@ -100,11 +106,12 @@
|
||||
@@ -75,6 +81,7 @@
|
||||
tooltip="dynamic-shortcut-tooltip"
|
||||
data-l10n-id="tabs-toolbar-new-tab"/>
|
||||
<html:span id="tabbrowser-tab-a11y-desc" hidden="true"/>
|
||||
+</html:div>
|
||||
</tabs>
|
||||
|
||||
<toolbarbutton id="new-tab-button"
|
||||
@@ -100,11 +107,12 @@
|
||||
#include private-browsing-indicator.inc.xhtml
|
||||
<toolbarbutton id="content-analysis-indicator"
|
||||
class="toolbarbutton-1 content-analysis-indicator-icon"/>
|
||||
@@ -69,7 +86,7 @@ index 00391af141d9015fe5839534e5e6b22a91ba65d9..17d8ac96986e698b09033b870c24fc2f
|
||||
<toolbar id="nav-bar"
|
||||
class="browser-toolbar chromeclass-location"
|
||||
data-l10n-id="navbar-accessible"
|
||||
@@ -487,10 +494,12 @@
|
||||
@@ -487,10 +495,12 @@
|
||||
consumeanchor="PanelUI-button"
|
||||
data-l10n-id="appmenu-menu-button-closed2"/>
|
||||
</toolbaritem>
|
||||
|
||||
@@ -28,19 +28,18 @@
|
||||
|
||||
# Scripts used all over the browser
|
||||
<script src="chrome://browser/content/zen-components/ZenThemesCommon.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenActorsManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenGlanceManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenThemesImporter.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenCompactMode.mjs" />
|
||||
<script src="chrome://browser/content/ZenUIManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenSidebarManager.mjs"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenTabUnloader.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspaces.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenProfileDialogUI.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenGlanceManager.mjs" />
|
||||
|
||||
# Unimportant scripts
|
||||
<script src="chrome://browser/content/zen-components/ZenRices.mjs" />
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
content/browser/zen-components/ZenSidebarManager.mjs (zen-components/ZenSidebarManager.mjs)
|
||||
content/browser/zen-components/ZenProfileDialogUI.mjs (zen-components/ZenProfileDialogUI.mjs)
|
||||
content/browser/zen-components/ZenKeyboardShortcuts.mjs (zen-components/ZenKeyboardShortcuts.mjs)
|
||||
content/browser/zen-components/ZenThemeBuilder.mjs (zen-components/ZenThemeBuilder.mjs)
|
||||
content/browser/zen-components/ZenThemesImporter.mjs (zen-components/ZenThemesImporter.mjs)
|
||||
content/browser/zen-components/ZenTabUnloader.mjs (zen-components/ZenTabUnloader.mjs)
|
||||
content/browser/zen-components/ZenPinnedTabsStorage.mjs (zen-components/ZenPinnedTabsStorage.mjs)
|
||||
@@ -53,7 +52,7 @@
|
||||
content/browser/zen-styles/zen-panels/print.css (content/zen-styles/zen-panels/print.css)
|
||||
content/browser/zen-styles/zen-panels/welcome.css (content/zen-styles/zen-panels/welcome.css)
|
||||
|
||||
content/browser/zen-styles/zen-compact-mode.css (content/zen-styles/zen-compact-mode.css)
|
||||
* content/browser/zen-styles/zen-compact-mode.css (content/zen-styles/zen-compact-mode.css)
|
||||
|
||||
# Images
|
||||
content/browser/zen-images/gradient.png (content/zen-images/gradient.png)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<script type="text/javascript">
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCommonUtils.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspaces.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesSync.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs", this);
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenActorsManager.mjs", this);
|
||||
</script>
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
skipintoolbarset="true"
|
||||
context="toolbar-context-menu"
|
||||
mode="icons">
|
||||
<toolbarbutton removable="true" class="chromeclass-toolbar-additional toolbarbutton-1 zen-sidebar-action-button" id="zen-expand-sidebar-button" data-l10n-id="sidebar-zen-expand" cui-areatype="toolbar" oncommand="gZenVerticalTabsManager.toggleExpand();"></toolbarbutton>
|
||||
<toolbarbutton removable="true" class="toolbarbutton-1 zen-sidebar-action-button zen-compact-mode-ignore" id="zen-sidepanel-button" data-l10n-id="sidebar-zen-sidepanel" onclick="gZenBrowserManagerSidebar.toggle();"></toolbarbutton>
|
||||
<toolbarbutton id="zen-workspaces-button" class="chromeclass-toolbar-additional" overflows="false" removable="false"></toolbarbutton>
|
||||
<toolbarbutton id="zen-profile-button"
|
||||
class="zen-sidebar-action-button toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
delegatesanchor="true"
|
||||
@@ -22,4 +25,4 @@
|
||||
<image id="zen-profile-button-icon" />
|
||||
</vbox>
|
||||
</toolbarbutton>
|
||||
</toolbar>
|
||||
</toolbar>
|
||||
|
||||
@@ -56,21 +56,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes zen-new-tab-appear-vertical {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(-25px);
|
||||
}
|
||||
60% {
|
||||
opacity: 0.8;
|
||||
transform: translateY(4px);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes zen-main-app-wrapper-animation {
|
||||
from {
|
||||
opacity: 1;
|
||||
@@ -219,16 +204,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes zen-workspaces-button-active {
|
||||
from {
|
||||
bottom: -20px;
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: -2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mark: Zen Glance */
|
||||
@keyframes zen-glance-overlay-animation {
|
||||
from {
|
||||
|
||||
@@ -6,15 +6,7 @@
|
||||
:root:not([inDOMFullscreen='true']):not([chromehidden~='location']):not([chromehidden~='toolbar']) {
|
||||
& #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
|
||||
width: -moz-available;
|
||||
--zen-native-content-radius: env(-moz-gtk-csd-titlebar-radius, var(--zen-border-radius));
|
||||
border-radius: var(
|
||||
--zen-webview-border-radius,
|
||||
/* Inner radius calculation:
|
||||
* 1. If the native radius - the separation is less than 4px, use 4px.
|
||||
* 2. Otherwise, use the the calculated value (inner radius = outer radius - separation).
|
||||
*/
|
||||
max(4px, calc(var(--zen-native-content-radius) - var(--zen-element-separation)))
|
||||
);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
position: relative;
|
||||
|
||||
/* For glance */
|
||||
@@ -24,13 +16,8 @@
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
margin-left: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
:root:not([zen-no-padding='true']) & {
|
||||
margin: 1px;
|
||||
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
&[animating='true']::after {
|
||||
background: var(--zen-main-browser-background-old);
|
||||
backdrop-filter: blur(5px);
|
||||
animation: zen-main-app-wrapper-animation 0.6s ease forwards;
|
||||
animation: zen-main-app-wrapper-animation 0.5s ease forwards;
|
||||
transition: 0s;
|
||||
}
|
||||
}
|
||||
@@ -123,10 +123,11 @@
|
||||
}
|
||||
|
||||
#zen-appcontent-wrapper {
|
||||
max-width: 100%;
|
||||
min-width: 1px;
|
||||
overflow-x: hidden;
|
||||
z-index: 1;
|
||||
/* Use this trick to prevent bookmarks from overflowing the window,
|
||||
* without using overflow: hidden.
|
||||
*/
|
||||
min-width: 1px;
|
||||
}
|
||||
|
||||
:root:not([inDOMFullscreen='true']):not([chromehidden~='location']):not([chromehidden~='toolbar']) {
|
||||
@@ -142,16 +143,13 @@
|
||||
&[zen-right-side='true'] #zen-tabbox-wrapper {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&:not([zen-no-padding='true'], [zen-right-side='true']) #zen-tabbox-wrapper {
|
||||
margin-left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
#tabbrowser-tabbox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
gap: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
.titlebar-buttonbox-container {
|
||||
|
||||
@@ -5,330 +5,322 @@
|
||||
*/
|
||||
/* All overrides for compact mode go here */
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact') {
|
||||
:root:not([customizing]):not([inDOMFullscreen='true']) {
|
||||
#zen-sidebar-top-buttons:has(#zen-sidebar-top-buttons-customization-target:empty) {
|
||||
max-height: 0 !important;
|
||||
min-height: 0 !important;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
:root[zen-compact-mode='true']:not([customizing]):not([inDOMFullscreen='true']) {
|
||||
%include zen-tabs/vertical-tabs-topbuttons-fix.css
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') or (-moz-bool-pref: 'zen.view.use-single-toolbar') {
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') or (-moz-bool-pref: 'zen.view.use-single-toolbar') {
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
|
||||
#zen-tabbox-wrapper {
|
||||
/* Remove extra 1px of margine we have to add to the tabbox */
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
#zen-appcontent-wrapper {
|
||||
margin-left: var(--zen-element-separation) !important;
|
||||
|
||||
& #tabbrowser-tabbox {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
#zen-sidebar-top-buttons-customization-target {
|
||||
padding-inline-start: calc(var(--zen-toolbox-padding) - var(--toolbarbutton-outer-padding)) !important;
|
||||
}
|
||||
|
||||
#zen-sidebar-splitter {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
--zen-toolbox-max-width: 64px !important;
|
||||
--zen-compact-float: var(--zen-element-separation);
|
||||
|
||||
&:not([animate='true']) {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
transition:
|
||||
left 0.25s ease,
|
||||
right 0.25s ease,
|
||||
opacity 1.5s ease;
|
||||
top: 0;
|
||||
bottom: var(--zen-element-separation);
|
||||
opacity: 0;
|
||||
padding: 0 var(--zen-compact-float) !important;
|
||||
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
top: var(--zen-element-separation);
|
||||
}
|
||||
}
|
||||
|
||||
#zen-tabbox-wrapper {
|
||||
/* Remove extra 1px of margine we have to add to the tabbox */
|
||||
&:not([zen-right-side='true']) #nav-bar {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
#zen-appcontent-wrapper {
|
||||
margin-left: var(--zen-element-separation) !important;
|
||||
|
||||
& #tabbrowser-tabbox {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
#zen-sidebar-top-buttons-customization-target {
|
||||
padding-inline-start: calc(var(--zen-toolbox-padding) - var(--toolbarbutton-outer-padding)) !important;
|
||||
}
|
||||
|
||||
#zen-sidebar-splitter {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
--zen-toolbox-max-width: 64px !important;
|
||||
--zen-compact-float: var(--zen-element-separation);
|
||||
|
||||
&:not([animate='true']) {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
transition:
|
||||
left 0.25s ease,
|
||||
right 0.25s ease,
|
||||
opacity 1.5s ease;
|
||||
top: 0;
|
||||
bottom: var(--zen-element-separation);
|
||||
opacity: 0;
|
||||
padding: 0 var(--zen-compact-float) !important;
|
||||
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
top: var(--zen-element-separation);
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-right-side='true']) #nav-bar {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
& #urlbar[open] {
|
||||
top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-right-side='true']) #navigator-toolbox {
|
||||
left: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
}
|
||||
|
||||
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
|
||||
* we need to adjust the top-padding of the toolbox to account for the
|
||||
* extra toolbar height. */
|
||||
@media not (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) #navigator-toolbox:not([animate='true']) {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&[zen-right-side='true'] {
|
||||
& #navigator-toolbox {
|
||||
--zen-compact-float: calc(var(--zen-element-separation) + 1px);
|
||||
|
||||
&:not([animate='true']) {
|
||||
right: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
}
|
||||
}
|
||||
|
||||
& .browserSidebarContainer {
|
||||
margin-left: 0 !important;
|
||||
margin-right: var(--zen-element-separation) !important;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox:not([animate='true']) #titlebar {
|
||||
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
|
||||
border-radius: calc(var(--zen-border-radius) - 2px);
|
||||
padding: var(--zen-toolbox-padding) !important;
|
||||
position: relative;
|
||||
background: var(--zen-dialog-background);
|
||||
outline: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
padding-top: 0 !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-sidebar') {
|
||||
background: var(--zen-main-browser-background-toolbar) !important;
|
||||
background-attachment: fixed !important;
|
||||
background-size: 2000px !important; /* Dont ask me why */
|
||||
backdrop-filter: blur(5px) !important;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox:hover,
|
||||
#navigator-toolbox[zen-has-hover],
|
||||
#navigator-toolbox[zen-user-show],
|
||||
#navigator-toolbox[flash-popup],
|
||||
#navigator-toolbox[has-popup-menu],
|
||||
#navigator-toolbox[movingtab],
|
||||
#navigator-toolbox:has(.tabbrowser-tab:active),
|
||||
#navigator-toolbox:has(
|
||||
*:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore)
|
||||
) {
|
||||
&:not([animate='true']) {
|
||||
--zen-compact-mode-func: linear(
|
||||
0 0%,
|
||||
0.002958 1%,
|
||||
0.01137 2%,
|
||||
0.024581 3%,
|
||||
0.041981 4%,
|
||||
0.063001 5%,
|
||||
0.087118 6%,
|
||||
0.113846 7.000000000000001%,
|
||||
0.14274 8%,
|
||||
0.173391 9%,
|
||||
0.205425 10%,
|
||||
0.238504 11%,
|
||||
0.272318 12%,
|
||||
0.30659 13%,
|
||||
0.341071 14.000000000000002%,
|
||||
0.375535 15%,
|
||||
0.409787 16%,
|
||||
0.44365 17%,
|
||||
0.476971 18%,
|
||||
0.509618 19%,
|
||||
0.541476 20%,
|
||||
0.572448 21%,
|
||||
0.602453 22%,
|
||||
0.631425 23%,
|
||||
0.65931 24%,
|
||||
0.686067 25%,
|
||||
0.711668 26%,
|
||||
0.736092 27%,
|
||||
0.759328 28.000000000000004%,
|
||||
0.781375 28.999999999999996%,
|
||||
0.802235 30%,
|
||||
0.821921 31%,
|
||||
0.840449 32%,
|
||||
0.857841 33%,
|
||||
0.874121 34%,
|
||||
0.88932 35%,
|
||||
0.903469 36%,
|
||||
0.916603 37%,
|
||||
0.928759 38%,
|
||||
0.939975 39%,
|
||||
0.950291 40%,
|
||||
0.959747 41%,
|
||||
0.968385 42%,
|
||||
0.976244 43%,
|
||||
0.983366 44%,
|
||||
0.989792 45%,
|
||||
0.995562 46%,
|
||||
1.000716 47%,
|
||||
1.005292 48%,
|
||||
1.009328 49%,
|
||||
1.01286 50%,
|
||||
1.015925 51%,
|
||||
1.018556 52%,
|
||||
1.020787 53%,
|
||||
1.022648 54%,
|
||||
1.024172 55.00000000000001%,
|
||||
1.025385 56.00000000000001%,
|
||||
1.026316 56.99999999999999%,
|
||||
1.026991 57.99999999999999%,
|
||||
1.027434 59%,
|
||||
1.027669 60%,
|
||||
1.027717 61%,
|
||||
1.027599 62%,
|
||||
1.027334 63%,
|
||||
1.02694 64%,
|
||||
1.026433 65%,
|
||||
1.025829 66%,
|
||||
1.025143 67%,
|
||||
1.024388 68%,
|
||||
1.023575 69%,
|
||||
1.022715 70%,
|
||||
1.02182 71%,
|
||||
1.020898 72%,
|
||||
1.019957 73%,
|
||||
1.019005 74%,
|
||||
1.018048 75%,
|
||||
1.017094 76%,
|
||||
1.016146 77%,
|
||||
1.015211 78%,
|
||||
1.014291 79%,
|
||||
1.013391 80%,
|
||||
1.012513 81%,
|
||||
1.01166 82%,
|
||||
1.010835 83%,
|
||||
1.010039 84%,
|
||||
1.009273 85%,
|
||||
1.008538 86%,
|
||||
1.007836 87%,
|
||||
1.007166 88%,
|
||||
1.00653 89%,
|
||||
1.005926 90%,
|
||||
1.005355 91%,
|
||||
1.004817 92%,
|
||||
1.00431 93%,
|
||||
1.003835 94%,
|
||||
1.003391 95%,
|
||||
1.002976 96%,
|
||||
1.002591 97%,
|
||||
1.002233 98%,
|
||||
1.001902 99%,
|
||||
1.001597 100%
|
||||
);
|
||||
transition:
|
||||
left 0.3125s var(--zen-compact-mode-func),
|
||||
right 0.3125s var(--zen-compact-mode-func);
|
||||
opacity: 1;
|
||||
|
||||
left: -1px;
|
||||
:root[zen-right-side='true'] & {
|
||||
right: -1px;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
& #urlbar[open] {
|
||||
top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) {
|
||||
& #navigator-toolbox {
|
||||
top: 0;
|
||||
&:not([zen-right-side='true']) #navigator-toolbox {
|
||||
left: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
}
|
||||
|
||||
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
|
||||
* we need to adjust the top-padding of the toolbox to account for the
|
||||
* extra toolbar height. */
|
||||
@media not (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) #navigator-toolbox:not([animate='true']) {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&[zen-right-side='true'] {
|
||||
& #navigator-toolbox {
|
||||
--zen-compact-float: calc(var(--zen-element-separation) + 1px);
|
||||
|
||||
&:not([animate='true']) {
|
||||
right: calc(-1 * var(--zen-sidebar-width) + var(--zen-element-separation));
|
||||
}
|
||||
}
|
||||
|
||||
& .browserSidebarContainer {
|
||||
margin-left: 0 !important;
|
||||
margin-right: var(--zen-element-separation) !important;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox:not([animate='true']) #titlebar {
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
padding: var(--zen-toolbox-padding) !important;
|
||||
position: relative;
|
||||
background: var(--zen-dialog-background);
|
||||
border: 1px solid var(--zen-colors-border-contrast);
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
padding-top: 0 !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-sidebar') {
|
||||
background: var(--zen-main-browser-background-toolbar) !important;
|
||||
background-attachment: fixed !important;
|
||||
background-size: 2000px !important; /* Dont ask me why */
|
||||
backdrop-filter: blur(5px) !important;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox:hover,
|
||||
#navigator-toolbox[zen-has-hover],
|
||||
#navigator-toolbox[zen-user-show],
|
||||
#navigator-toolbox[flash-popup],
|
||||
#navigator-toolbox[has-popup-menu],
|
||||
#navigator-toolbox[movingtab],
|
||||
#navigator-toolbox:has(.tabbrowser-tab:active),
|
||||
#navigator-toolbox:has(
|
||||
*:is([panelopen='true'], [open='true'], #nav-bar:focus-within):not(tab):not(.zen-compact-mode-ignore)
|
||||
) {
|
||||
&:not([animate='true']) {
|
||||
--zen-compact-mode-func: linear(
|
||||
0 0%,
|
||||
0.002748 1%,
|
||||
0.010544 2%,
|
||||
0.022757 3%,
|
||||
0.038804 4%,
|
||||
0.058151 5%,
|
||||
0.080308 6%,
|
||||
0.104828 7.000000000000001%,
|
||||
0.131301 8%,
|
||||
0.159358 9%,
|
||||
0.188662 10%,
|
||||
0.21891 11%,
|
||||
0.249828 12%,
|
||||
0.281172 13%,
|
||||
0.312724 14.000000000000002%,
|
||||
0.344288 15%,
|
||||
0.375693 16%,
|
||||
0.40679 17%,
|
||||
0.437447 18%,
|
||||
0.467549 19%,
|
||||
0.497 20%,
|
||||
0.525718 21%,
|
||||
0.553633 22%,
|
||||
0.580688 23%,
|
||||
0.60684 24%,
|
||||
0.632052 25%,
|
||||
0.656298 26%,
|
||||
0.679562 27%,
|
||||
0.701831 28.000000000000004%,
|
||||
0.723104 28.999999999999996%,
|
||||
0.743381 30%,
|
||||
0.76267 31%,
|
||||
0.780983 32%,
|
||||
0.798335 33%,
|
||||
0.814744 34%,
|
||||
0.830233 35%,
|
||||
0.844826 36%,
|
||||
0.858549 37%,
|
||||
0.87143 38%,
|
||||
0.883498 39%,
|
||||
0.894782 40%,
|
||||
0.905314 41%,
|
||||
0.915125 42%,
|
||||
0.924247 43%,
|
||||
0.93271 44%,
|
||||
0.940547 45%,
|
||||
0.947787 46%,
|
||||
0.954463 47%,
|
||||
0.960603 48%,
|
||||
0.966239 49%,
|
||||
0.971397 50%,
|
||||
0.976106 51%,
|
||||
0.980394 52%,
|
||||
0.984286 53%,
|
||||
0.987808 54%,
|
||||
0.990984 55.00000000000001%,
|
||||
0.993837 56.00000000000001%,
|
||||
0.99639 56.99999999999999%,
|
||||
0.998664 57.99999999999999%,
|
||||
1.000679 59%,
|
||||
1.002456 60%,
|
||||
1.004011 61%,
|
||||
1.005363 62%,
|
||||
1.006528 63%,
|
||||
1.007522 64%,
|
||||
1.008359 65%,
|
||||
1.009054 66%,
|
||||
1.009618 67%,
|
||||
1.010065 68%,
|
||||
1.010405 69%,
|
||||
1.010649 70%,
|
||||
1.010808 71%,
|
||||
1.01089 72%,
|
||||
1.010904 73%,
|
||||
1.010857 74%,
|
||||
1.010757 75%,
|
||||
1.010611 76%,
|
||||
1.010425 77%,
|
||||
1.010205 78%,
|
||||
1.009955 79%,
|
||||
1.009681 80%,
|
||||
1.009387 81%,
|
||||
1.009077 82%,
|
||||
1.008754 83%,
|
||||
1.008422 84%,
|
||||
1.008083 85%,
|
||||
1.00774 86%,
|
||||
1.007396 87%,
|
||||
1.007052 88%,
|
||||
1.00671 89%,
|
||||
1.006372 90%,
|
||||
1.00604 91%,
|
||||
1.005713 92%,
|
||||
1.005394 93%,
|
||||
1.005083 94%,
|
||||
1.004782 95%,
|
||||
1.004489 96%,
|
||||
1.004207 97%,
|
||||
1.003935 98%,
|
||||
1.003674 99%,
|
||||
1.003423 100%
|
||||
);
|
||||
transition:
|
||||
left 0.3s var(--zen-compact-mode-func),
|
||||
right 0.3s var(--zen-compact-mode-func);
|
||||
opacity: 1;
|
||||
|
||||
left: -1px;
|
||||
:root[zen-right-side='true'] & {
|
||||
right: -1px;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
&:not([zen-single-toolbar='true']) {
|
||||
& #navigator-toolbox {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
& #navigator-toolbox {
|
||||
--zen-toolbox-top-align: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
& #sidebar-box,
|
||||
& #titlebar,
|
||||
& #zen-appcontent-wrapper,
|
||||
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not([pinned='true'])) {
|
||||
margin-top: var(--zen-element-separation) !important;
|
||||
}
|
||||
|
||||
& #zen-appcontent-wrapper {
|
||||
z-index: 3 !important;
|
||||
}
|
||||
|
||||
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-top: calc(var(--zen-element-separation) * 2) !important;
|
||||
}
|
||||
|
||||
& #zen-appcontent-navbar-container {
|
||||
--zen-compact-toolbar-offset: 5px;
|
||||
position: absolute;
|
||||
top: calc((-1 * var(--zen-toolbar-height)) + var(--zen-element-separation) + 1px);
|
||||
left: 0;
|
||||
z-index: 20;
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.3) !important;
|
||||
border-bottom-left-radius: var(--zen-border-radius);
|
||||
border-bottom-right-radius: var(--zen-border-radius);
|
||||
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
transition: all 0.15s ease;
|
||||
width: 100%;
|
||||
opacity: 0;
|
||||
background: var(--zen-dialog-background);
|
||||
|
||||
max-height: var(--zen-toolbar-height);
|
||||
overflow: hidden;
|
||||
|
||||
& > * {
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
& #navigator-toolbox {
|
||||
--zen-toolbox-top-align: var(--zen-element-separation);
|
||||
& #urlbar {
|
||||
transform: translateY(-50%);
|
||||
transition: transform 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
& #sidebar-box,
|
||||
& #titlebar,
|
||||
& #zen-appcontent-wrapper,
|
||||
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not([pinned='true'])) {
|
||||
margin-top: var(--zen-element-separation) !important;
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
|
||||
background-attachment: fixed;
|
||||
backdrop-filter: blur(5px);
|
||||
background: var(--zen-main-browser-background-toolbar);
|
||||
background-size: 100% 2000px;
|
||||
border-bottom: 1px solid var(--zen-colors-border);
|
||||
}
|
||||
}
|
||||
|
||||
& #zen-appcontent-wrapper {
|
||||
z-index: 3 !important;
|
||||
}
|
||||
& #zen-appcontent-navbar-container:hover,
|
||||
& #zen-appcontent-navbar-container[zen-has-hover],
|
||||
& #zen-appcontent-navbar-container:focus-within,
|
||||
& #zen-appcontent-navbar-container[zen-user-show],
|
||||
& #zen-appcontent-navbar-container[has-popup-menu],
|
||||
& #zen-appcontent-navbar-container:has(*:is([panelopen='true'], [open='true']):not(.zen-compact-mode-ignore)) {
|
||||
opacity: 1;
|
||||
border-top-width: 1px;
|
||||
|
||||
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
margin-top: calc(var(--zen-element-separation) * 2) !important;
|
||||
}
|
||||
top: -1px;
|
||||
overflow: initial;
|
||||
max-height: unset;
|
||||
|
||||
& #zen-appcontent-navbar-container {
|
||||
--zen-compact-toolbar-offset: 5px;
|
||||
position: absolute;
|
||||
top: calc((-1 * var(--zen-toolbar-height)) + var(--zen-element-separation) + 1px);
|
||||
left: 0;
|
||||
z-index: 20;
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.3) !important;
|
||||
border-bottom-left-radius: var(--zen-border-radius);
|
||||
border-bottom-right-radius: var(--zen-border-radius);
|
||||
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
transition: all 0.15s ease;
|
||||
width: 100%;
|
||||
opacity: 0;
|
||||
background: var(--zen-dialog-background);
|
||||
& #urlbar {
|
||||
transform: translateY(0);
|
||||
|
||||
max-height: var(--zen-toolbar-height);
|
||||
overflow: hidden;
|
||||
|
||||
& > * {
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
& #urlbar {
|
||||
transform: translateY(-50%);
|
||||
transition: transform 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
|
||||
background-attachment: fixed;
|
||||
backdrop-filter: blur(5px);
|
||||
background: var(--zen-main-browser-background-toolbar);
|
||||
background-size: 100% 2000px;
|
||||
border-bottom: 1px solid var(--zen-colors-border);
|
||||
}
|
||||
}
|
||||
|
||||
& #zen-appcontent-navbar-container:hover,
|
||||
& #zen-appcontent-navbar-container[zen-has-hover],
|
||||
& #zen-appcontent-navbar-container:focus-within,
|
||||
& #zen-appcontent-navbar-container[zen-user-show],
|
||||
& #zen-appcontent-navbar-container[has-popup-menu],
|
||||
& #zen-appcontent-navbar-container:has(*:is([panelopen='true'], [open='true']):not(.zen-compact-mode-ignore)) {
|
||||
opacity: 1;
|
||||
border-top-width: 1px;
|
||||
|
||||
top: -1px;
|
||||
overflow: initial;
|
||||
max-height: unset;
|
||||
|
||||
& #urlbar {
|
||||
transform: translateY(0);
|
||||
|
||||
&[open]:not([zen-floating-urlbar='true']) {
|
||||
top: 0 !important;
|
||||
}
|
||||
&[open]:not([zen-floating-urlbar='true']) {
|
||||
top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#tabbrowser-tabpanels[zen-split-view='true'] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: calc(var(--zen-split-column-gap) / -2);
|
||||
margin-top: calc(var(--zen-split-column-gap) * -1);
|
||||
}
|
||||
|
||||
#tabbrowser-tabpanels[zen-split-view='true'] > *:not([zen-split='true']) {
|
||||
@@ -41,9 +41,9 @@
|
||||
}
|
||||
|
||||
#tabbrowser-tabpanels[zen-split-view='true']:not([zen-split-resizing]) > [zen-split-anim='true'] {
|
||||
transition: inset 0.08s ease-out;
|
||||
transition: inset 0.09s ease-out !important;
|
||||
& browser {
|
||||
transition: opacity 0.2s ease-out;
|
||||
transition: opacity 0.2s ease-out !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,27 +56,14 @@
|
||||
--zen-split-row-gap: calc(var(--zen-element-separation) + 1px);
|
||||
--zen-split-column-gap: calc(var(--zen-element-separation) + 1px);
|
||||
margin-right: calc(-1 * var(--zen-split-column-gap));
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
margin-right: 0;
|
||||
margin-left: var(--zen-element-separation);
|
||||
}
|
||||
}
|
||||
|
||||
#tabbrowser-tabpanels:has(> [zen-split='true']),
|
||||
#zen-splitview-overlay {
|
||||
@media (-moz-bool-pref: 'zen.view.compact') {
|
||||
:root:not([customizing]) & {
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') {
|
||||
& {
|
||||
margin-left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
& {
|
||||
margin-top: calc(var(--zen-split-column-gap) / -2);
|
||||
}
|
||||
:root:not([zen-compact-mode='true']):not([customizing]) & {
|
||||
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
|
||||
& {
|
||||
margin-top: calc(var(--zen-split-column-gap) * -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,12 +48,12 @@
|
||||
& .browserContainer {
|
||||
background: var(--zen-dialog-background);
|
||||
position: fixed;
|
||||
border-radius: var(--zen-border-radius);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
opacity: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
flex: unset !important;
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
|
||||
&[has-finished-animation='true'] {
|
||||
position: relative !important;
|
||||
@@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
& .browserStack {
|
||||
border-radius: var(--zen-border-radius);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
border-right: none;
|
||||
|
||||
border-top-left-radius: var(--zen-border-radius);
|
||||
border-bottom-left-radius: var(--zen-border-radius);
|
||||
border-top-left-radius: var(--zen-native-inner-radius);
|
||||
border-bottom-left-radius: var(--zen-native-inner-radius);
|
||||
|
||||
padding: 5px;
|
||||
gap: 6px;
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Zen Welcome idalog override */
|
||||
.dialogBox:not(.spotlightBox) {
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.dialogBox:not(.spotlightBox) {
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
}
|
||||
}
|
||||
|
||||
#window-modal-dialog[zen-dialog-welcome-element='true'] .dialogBox:not(.spotlightBox) {
|
||||
|
||||
@@ -53,7 +53,12 @@
|
||||
menupopup,
|
||||
panel {
|
||||
--panel-background: var(--arrowpanel-background);
|
||||
--panel-border-radius: var(--zen-panel-radius);
|
||||
--panel-border-radius: var(--zen-native-inner-radius);
|
||||
}
|
||||
|
||||
/* split-view popup */
|
||||
#confirmation-hint {
|
||||
--arrowpanel-background: var(--zen-colors-primary);
|
||||
}
|
||||
|
||||
/* app menu */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#zen-rice-share-dialog-notice {
|
||||
color: var(--panel-color);
|
||||
background: var(--arrowpanel-background);
|
||||
border-radius: var(--zen-panel-radius);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
box-shadow: 0 0 1px 1px hsla(0, 0%, 0%, 0.2);
|
||||
border: var(--zen-appcontent-border);
|
||||
overflow: hidden;
|
||||
@@ -130,7 +130,7 @@
|
||||
background: rgba(255, 0, 0, 0.1);
|
||||
padding: 5px;
|
||||
transition: opacity 0.3s ease;
|
||||
border-radius: var(--zen-panel-radius);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
|
||||
@starting-style {
|
||||
opacity: 0;
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
max-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
|
||||
@@ -79,10 +80,9 @@
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel {
|
||||
border-radius: var(--zen-panel-radius);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
z-index: 2;
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
background: var(--zen-colors-tertiary);
|
||||
opacity: 0;
|
||||
animation-delay: 0.1s;
|
||||
@@ -101,12 +101,13 @@
|
||||
}
|
||||
|
||||
.zen-sidebar-web-panel-splitter,
|
||||
.zen-split-view-splitter[orient='vertical'] {
|
||||
.zen-split-view-splitter[orient='vertical'],
|
||||
#zen-sidebar-splitter {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: calc(var(--zen-element-separation) * 2 - 3px);
|
||||
width: var(--zen-element-separation);
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: ew-resize;
|
||||
@@ -119,9 +120,9 @@
|
||||
}
|
||||
|
||||
&::before {
|
||||
height: 30px;
|
||||
width: 3px;
|
||||
background: var(--zen-colors-border);
|
||||
height: 50px;
|
||||
width: 4px;
|
||||
background: var(--zen-colors-primary);
|
||||
border-radius: 2px;
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -181,10 +182,6 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel-wrapper {
|
||||
margin: 0 calc(var(--zen-element-separation) / 2) 0 var(--zen-element-separation);
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel[pinned='true'] {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
@@ -288,19 +285,6 @@
|
||||
animation: better-sidebar-pinned-hide 0.15s ease-in-out forwards !important;
|
||||
}
|
||||
|
||||
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not([hidden='true'])) {
|
||||
:root:not([zen-right-side='true']) & {
|
||||
margin-right: calc(var(--zen-element-separation) * 2 - 3px) !important;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.view.compact') and (-moz-bool-pref: 'zen.view.compact.hide-tabbar') {
|
||||
:root[zen-right-side='true'] & {
|
||||
margin-left: 0 !important;
|
||||
margin-right: calc(var(--zen-element-separation) * 2 - 3px) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** UNPINNED **/
|
||||
#zen-sidebar-web-panel {
|
||||
/* Sets perspective */
|
||||
|
||||
@@ -38,19 +38,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*#zen-profile-button::before {
|
||||
background: transparent;
|
||||
border-radius: 50%;
|
||||
border: 3px solid var(--zen-colors-border);
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: calc(2 * var(--toolbarbutton-inner-padding) + 16px - 8px - var(--toolbarbutton-inner-padding));
|
||||
height: calc(2 * var(--toolbarbutton-inner-padding) + 16px - 8px - var(--toolbarbutton-inner-padding));
|
||||
}*/
|
||||
|
||||
/* Bookmarks sidebar */
|
||||
#zen-tabbox-wrapper {
|
||||
& #sidebar-splitter {
|
||||
@@ -59,9 +46,8 @@
|
||||
}
|
||||
|
||||
& #sidebar-box {
|
||||
border-radius: var(--zen-border-radius);
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: var(--zen-element-separation);
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ height: var(--zen-toolbar-height);
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-has-hover='true']):not([has-popup-menu]):not(:focus-within) {
|
||||
&:not([zen-has-hover='true']):not([has-popup-menu]):not(:focus-within):not(:has(*:is([panelopen='true'], [open='true']))) {
|
||||
transition-delay: 0.2s;
|
||||
height: var(--zen-element-separation);
|
||||
overflow: hidden;
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
& #zen-sidebar-top-buttons:has(#zen-sidebar-top-buttons-customization-target:empty) {
|
||||
&
|
||||
#zen-sidebar-top-buttons:not(
|
||||
:has(#zen-sidebar-top-buttons-customization-target > *:not(#zen-sidebar-top-buttons-separator))
|
||||
) {
|
||||
max-height: 0 !important;
|
||||
min-height: 0 !important;
|
||||
opacity: 0;
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
height: var(--zen-toolbar-height);
|
||||
}
|
||||
|
||||
@media (-moz-platform: macos) and (not (-moz-bool-pref: 'zen.view.mac.show-three-dot-menu')) {
|
||||
&:not([customizing]) #PanelUI-button:not([open]):not([panelopen]) {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
& #zen-sidebar-top-buttons .toolbarbutton-1 {
|
||||
& > .toolbarbutton-icon {
|
||||
padding: 5px;
|
||||
@@ -37,10 +45,11 @@
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
&:root[zen-right-side='true'] #zen-sidebar-top-buttons-customization-target .titlebar-buttonbox-container {
|
||||
/* Must have the zen-sidebar-top-buttons-customization-target so we target it only when it's on the sidebar */
|
||||
margin-right: calc(-2 * var(--zen-toolbox-padding));
|
||||
&:root[zen-right-side='true'] #zen-sidebar-top-buttons .titlebar-buttonbox-container {
|
||||
/* Must have the #zen-sidebar-top-buttons so we target it only when it's on the sidebar */
|
||||
margin-right: calc(-1 * var(--zen-toolbox-padding));
|
||||
margin-top: -10px /*Make sure this stays synced with the top buttons' margin!*/;
|
||||
height: calc(4px + var(--zen-toolbar-height)) !important;
|
||||
|
||||
& .titlebar-button {
|
||||
align-items: end;
|
||||
@@ -48,10 +57,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
#vertical-pinned-tabs-container, #tabbrowser-arrowscrollbox {
|
||||
.tabbrowser-tab[fadein='true'][zen-initial-fadein='true'] {
|
||||
animation: zen-new-tab-appear-vertical 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
|
||||
}
|
||||
#tabbrowser-arrowscrollbox {
|
||||
min-height: fit-content !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +72,7 @@
|
||||
}
|
||||
|
||||
#browser {
|
||||
--zen-toolbox-padding: max(4px, calc(var(--zen-element-separation) / 1.5));
|
||||
--zen-toolbox-padding: max(.4rem, calc(var(--zen-element-separation) / 1.5));
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
@@ -98,7 +105,7 @@
|
||||
}
|
||||
|
||||
& #nav-bar {
|
||||
margin-bottom: 6px;
|
||||
margin-bottom: var(--zen-toolbox-padding);
|
||||
|
||||
& toolbarspring {
|
||||
display: none;
|
||||
@@ -119,18 +126,34 @@
|
||||
margin: 8px auto;
|
||||
border: none;
|
||||
height: 1px;
|
||||
max-height: 1px;
|
||||
width: 98%;
|
||||
transition: margin 0.2s ease-in-out, background 0.2s ease-in-out, max-height 0.2s ease-in-out;
|
||||
|
||||
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + & {
|
||||
display: none;
|
||||
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + &,
|
||||
#tabbrowser-tabs:not(:has(#tabbrowser-arrowscrollbox tab:not([hidden]))) & {
|
||||
max-height: 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
--border-radius-medium: 10px;
|
||||
--tab-border-radius: 10px;
|
||||
--tab-border-radius: 6px;
|
||||
--zen-toolbox-min-width: 1px;
|
||||
|
||||
@media (-moz-platform: windows) {
|
||||
/* More native look */
|
||||
--border-radius-medium: 8px;
|
||||
--tab-border-radius: 6px;
|
||||
}
|
||||
|
||||
@media (-moz-platform: macos) {
|
||||
/* More native look */
|
||||
--border-radius-medium: 12px;
|
||||
--tab-border-radius: 10px;
|
||||
}
|
||||
|
||||
--tab-hover-background-color: color-mix(in srgb, var(--toolbarbutton-hover-background) 50%, transparent 50%);
|
||||
|
||||
min-width: var(--zen-toolbox-min-width);
|
||||
@@ -220,7 +243,8 @@
|
||||
#tabbrowser-tabs {
|
||||
margin-inline-start: 0 !important;
|
||||
padding-inline-start: 0 !important;
|
||||
overflow-x: hidden;
|
||||
overflow-y: unset !important; /* DO NOT CHANGE THIS: Firefox renders badly workspace changes */
|
||||
overflow-x: clip;
|
||||
|
||||
--tab-inner-inline-margin: 0;
|
||||
|
||||
@@ -228,7 +252,7 @@
|
||||
border-bottom: 0px solid transparent !important;
|
||||
|
||||
--tab-block-margin: 2px;
|
||||
--tab-selected-bgcolor: light-dark(rgba(255,255,255,.8), rgba(255,255,255,.25));
|
||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.12));
|
||||
grid-gap: 0 !important;
|
||||
|
||||
&[overflow]::after,
|
||||
@@ -243,9 +267,13 @@
|
||||
#tabbrowser-tabs[dont-animate-tabs] & {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&:is([selected], [multiselected], [visuallyselected]) .tab-background {
|
||||
box-shadow: 0 1px 1px 1px light-dark(rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.1));
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-essential='true']):active {
|
||||
&:active {
|
||||
scale: 0.98;
|
||||
}
|
||||
|
||||
@@ -276,10 +304,10 @@
|
||||
|
||||
/* We have a tab inside a tab, this means, it's a glance tab */
|
||||
& .tabbrowser-tab {
|
||||
border-radius: 5px;
|
||||
pointer-events: none;
|
||||
margin: 0;
|
||||
--toolbarbutton-inner-padding: 0;
|
||||
--border-radius-medium: 8px;
|
||||
|
||||
& .tab-background {
|
||||
background: transparent;
|
||||
@@ -299,10 +327,10 @@
|
||||
/* On essentials, glance tabs are floating */
|
||||
&[zen-essential='true'] .tabbrowser-tab {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 5px;
|
||||
--tab-collapsed-width: 15px;
|
||||
--tab-min-height: 15px;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
--tab-collapsed-width: 35px;
|
||||
--tab-min-height: 16px;
|
||||
width: var(--tab-collapsed-width) !important;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
@@ -337,10 +365,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
#zen-browser-tabs-wrapper {
|
||||
min-height: fit-content;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#vertical-pinned-tabs-container {
|
||||
padding-inline-end: 0 !important;
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
min-height: fit-content !important;
|
||||
overflow: visible;
|
||||
max-height: unset !important;
|
||||
|
||||
& .tabbrowser-tab:not(:hover) .tab-background:not([selected]):not([multiselected]) {
|
||||
background: transparent !important;
|
||||
@@ -360,6 +397,7 @@
|
||||
/* Mark: toolbox as expanded */
|
||||
#navigator-toolbox[zen-sidebar-expanded='true'] {
|
||||
--zen-toolbox-min-width: fit-content;
|
||||
|
||||
--tab-icon-end-margin: 8.5px;
|
||||
padding: var(--zen-toolbox-padding);
|
||||
padding-left: 0;
|
||||
@@ -381,15 +419,10 @@
|
||||
padding-right: 0;
|
||||
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
margin-left: var(--zen-toolbox-padding);
|
||||
& #urlbar:not([breakout-extend='true']) .urlbar-input-container {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,9 +476,7 @@
|
||||
|
||||
&:not([zen-right-side='true']) {
|
||||
padding-right: 0;
|
||||
& #titlebar {
|
||||
padding-left: var(--zen-toolbox-padding);
|
||||
}
|
||||
padding-left: var(--zen-toolbox-padding);
|
||||
}
|
||||
|
||||
& #TabsToolbar-customization-target {
|
||||
@@ -454,10 +485,10 @@
|
||||
bottom: calc(-0.5 * var(--zen-toolbox-padding));
|
||||
}
|
||||
|
||||
& > *:not(tabs):not(#search-container):not(#zen-workspaces-button),
|
||||
& > :is(toolbaritem, toolbarbutton):not(#search-container):not(#zen-workspaces-button),
|
||||
& #tabbrowser-arrowscrollbox-periphery > toolbarbutton {
|
||||
width: 100% !important;
|
||||
border-radius: var(--tab-border-radius) !important;
|
||||
border-radius: var(--border-radius-medium) !important;
|
||||
|
||||
padding-left: var(--toolbarbutton-inner-padding) !important;
|
||||
padding-right: var(--toolbarbutton-inner-padding) !important;
|
||||
@@ -502,11 +533,6 @@
|
||||
}
|
||||
|
||||
& .tab-background {
|
||||
@media not (prefers-color-scheme: dark) {
|
||||
&:is([selected], [multiselected]) {
|
||||
box-shadow: 0 .5px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
margin-inline: var(--tab-block-margin);
|
||||
width: -moz-available;
|
||||
}
|
||||
@@ -565,7 +591,6 @@
|
||||
justify-content: center;
|
||||
max-height: unset !important;
|
||||
height: fit-content !important;
|
||||
margin-bottom: var(--zen-element-separation);
|
||||
}
|
||||
& #titlebar {
|
||||
display: grid;
|
||||
@@ -614,13 +639,6 @@
|
||||
margin: 0 auto;
|
||||
& .tab-background {
|
||||
margin-inline: auto !important;
|
||||
&:is([selected], [multiselected]) {
|
||||
box-shadow: 0 0 1px 1px rgba(0,0,0,.1);
|
||||
|
||||
@media not (prefers-color-scheme: dark) {
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.12) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
& .tab-reset-button {
|
||||
display: none !important;
|
||||
@@ -695,10 +713,6 @@
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
background: var(--zen-colors-border);
|
||||
appearance: none;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mark: Move sidebar to the right */
|
||||
@@ -812,6 +826,14 @@
|
||||
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
--toolbarbutton-inner-padding: calc(var(--zen-toolbar-button-inner-padding) - 2px) !important;
|
||||
|
||||
& #PanelUI-button {
|
||||
order: -2;
|
||||
}
|
||||
|
||||
& #unified-extensions-button {
|
||||
order: -1;
|
||||
}
|
||||
}
|
||||
|
||||
& #zen-sidebar-top-buttons-customization-target {
|
||||
@@ -851,6 +873,7 @@
|
||||
|
||||
#tabs-newtab-button {
|
||||
display: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.tabs.show-newtab-vertical') {
|
||||
@@ -915,16 +938,21 @@
|
||||
--toolbarbutton-inner-padding: 0;
|
||||
max-width: unset;
|
||||
width: 100% !important;
|
||||
border-radius: var(--border-radius-medium);
|
||||
|
||||
& .tab-background {
|
||||
border-radius: var(--border-radius-medium) !important;
|
||||
transition: background 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2));
|
||||
|
||||
&[selected] .tab-background {
|
||||
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.1));
|
||||
box-shadow: 0 1px 1px 1px light-dark(rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.1));
|
||||
}
|
||||
|
||||
&:not([selected], [multiselected="true"]) .tab-background {
|
||||
background: var(--zen-toolbar-element-bg);
|
||||
backdrop-filter: none !important;
|
||||
border: 1px solid light-dark(transparent, rgba(255, 255, 255, 0.05));
|
||||
border: none;
|
||||
}
|
||||
|
||||
& .tab-content {
|
||||
@@ -945,6 +973,10 @@
|
||||
margin-inline-end: 0 !important;
|
||||
}
|
||||
|
||||
&:hover .tab-background {
|
||||
background: var(--tab-selected-bgcolor);
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.theme.essentials-favicon-bg') {
|
||||
&[selected] .tab-background {
|
||||
&::after {
|
||||
@@ -960,11 +992,12 @@
|
||||
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.80));
|
||||
background: light-dark(rgba(255, 255, 255, 0.85), rgba(68, 64, 64, 0.85));
|
||||
margin: 2px;
|
||||
border-radius: calc(var(--tab-border-radius) - 2px);
|
||||
border-radius: calc(var(--border-radius-medium) - 2px);
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 0;
|
||||
@@ -974,7 +1007,7 @@
|
||||
}
|
||||
|
||||
&[selected]:hover .tab-background::before {
|
||||
background: light-dark(rgba(255, 255, 255, 0.8), rgba(68, 64, 64, 0.85));
|
||||
background: light-dark(rgba(255, 255, 255, 0.80), rgba(68, 64, 64, 0.80));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -983,8 +1016,8 @@
|
||||
/* Very special occasions */
|
||||
|
||||
/* Mark: Right side windows controls with collapsed sidebar */
|
||||
@media not (-moz-bool-pref: 'zen.view.compact') {
|
||||
:root[zen-right-side='true']:not([zen-sidebar-expanded='true']):not([zen-window-buttons-reversed='true']) {
|
||||
:root:not([zen-compact-mode='true']) {
|
||||
&[zen-right-side='true']:not([zen-sidebar-expanded='true']):not([zen-window-buttons-reversed='true']) {
|
||||
& #navigator-toolbox {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
@@ -1008,7 +1041,7 @@
|
||||
%include vertical-tabs-topbuttons-fix.css
|
||||
}
|
||||
|
||||
:root:not([zen-right-side='true']):not([zen-sidebar-expanded='true'])[zen-window-buttons-reversed='true'] {
|
||||
&:not([zen-right-side='true']):not([zen-sidebar-expanded='true'])[zen-window-buttons-reversed='true'] {
|
||||
& #navigator-toolbox {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
--zen-primary-color: #ffb787;
|
||||
|
||||
/* Branding */
|
||||
--zen-branding-dark: #202020;
|
||||
--zen-branding-dark: #1d1d1d;
|
||||
--zen-branding-coral: #f76f53;
|
||||
--zen-branding-paper: #ebebeb;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
--zen-colors-hover-bg: color-mix(in srgb, var(--zen-primary-color) 90%, white 10%);
|
||||
--zen-colors-primary-foreground: var(--zen-branding-bg-reverse);
|
||||
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 97%, black 3%);
|
||||
--zen-colors-border-contrast: color-mix(in srgb, var(--zen-colors-secondary) 10%, rgba(181, 181, 181, 0.11) 90%);
|
||||
|
||||
--zen-colors-input-bg: color-mix(in srgb, var(--zen-primary-color) 1%, var(--zen-colors-tertiary) 99%);
|
||||
|
||||
@@ -103,7 +104,7 @@
|
||||
--zen-button-border-radius: 5px;
|
||||
--zen-button-padding: 0.6rem 1.2rem;
|
||||
|
||||
--zen-toolbar-element-bg: light-dark(rgba(255, 255, 255, 0.65), rgba(170, 170, 170, 0.2));
|
||||
--zen-toolbar-element-bg: light-dark(rgba(0, 0, 0, 0.07), rgba(255, 255, 255, 0.11));
|
||||
|
||||
/* Toolbar */
|
||||
--zen-toolbar-height: 38px;
|
||||
@@ -126,7 +127,6 @@
|
||||
--browser-area-z-index-toolbox: 2 !important;
|
||||
|
||||
--zen-appcontent-border: 1px solid var(--zen-colors-border);
|
||||
--zen-panel-radius: var(--zen-border-radius);
|
||||
|
||||
--toolbarbutton-border-radius: 6px;
|
||||
--urlbar-margin-inline: 1px !important;
|
||||
@@ -146,15 +146,12 @@
|
||||
--fp-contextmenu-bgcolor: light-dark(Menu, rgb(43 42 51 / 0.95));
|
||||
--toolbar-bgcolor: transparent;
|
||||
|
||||
--toolbarbutton-active-background: light-dark(
|
||||
rgba(255, 255, 255, 0.9),
|
||||
color-mix(in srgb, var(--zen-primary-color) 50%, rgba(255, 255, 255, 0.1))
|
||||
);
|
||||
--toolbarbutton-active-background: var(--zen-toolbar-element-bg);
|
||||
|
||||
--input-bgcolor: var(--zen-colors-tertiary) !important;
|
||||
--input-border-color: var(--zen-input-border-color) !important;
|
||||
--zen-themed-toolbar-bg: light-dark(var(--zen-branding-bg), var(--zen-colors-tertiary));
|
||||
--zen-themed-toolbar-bg-transparent: light-dark(var(--zen-branding-bg), var(--zen-colors-tertiary));
|
||||
--zen-themed-toolbar-bg: light-dark(var(--zen-branding-bg), #161616);
|
||||
--zen-themed-toolbar-bg-transparent: light-dark(var(--zen-branding-bg), #161616);
|
||||
|
||||
@media (-moz-windows-mica) or (-moz-platform: macos) {
|
||||
background: transparent;
|
||||
@@ -168,7 +165,35 @@
|
||||
--toolbar-field-background-color: var(--zen-colors-input-bg) !important;
|
||||
--arrowpanel-background: var(--zen-dialog-background) !important;
|
||||
|
||||
--tab-selected-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1) !important;
|
||||
--tab-selected-shadow: none !important;
|
||||
--zen-big-shadow: 0 0 9.73px 0px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25));
|
||||
|
||||
/* Nativity */
|
||||
--zen-native-content-radius: var(--zen-border-radius);
|
||||
@media (-moz-platform: linux) {
|
||||
--zen-native-content-radius: env(-moz-gtk-csd-titlebar-radius);
|
||||
}
|
||||
--zen-native-inner-radius: var(
|
||||
--zen-webview-border-radius,
|
||||
/* Inner radius calculation:
|
||||
* 1. If the native radius - the separation is less than 4px, use 4px.
|
||||
* 2. Otherwise, use the the calculated value (inner radius = outer radius - separation).
|
||||
*/
|
||||
max(5px, calc(var(--zen-native-content-radius) - var(--zen-element-separation)))
|
||||
);
|
||||
|
||||
/** Other theme-related styles */
|
||||
@media (-moz-platform: macos) {
|
||||
font-family:
|
||||
SF Pro,
|
||||
ui-sans-serif,
|
||||
system-ui,
|
||||
sans-serif,
|
||||
Apple Color Emoji,
|
||||
Segoe UI Emoji,
|
||||
Segoe UI Symbol,
|
||||
Noto Color Emoji;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@@ -184,7 +209,8 @@
|
||||
--zen-colors-primary-foreground: color-mix(in srgb, var(--zen-primary-color) 80%, white 20%);
|
||||
|
||||
--zen-colors-input-bg: color-mix(in srgb, var(--zen-primary-color) 1%, var(--zen-dark-color-mix-base) 99%);
|
||||
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 20%, rgb(43, 43, 43) 80%);
|
||||
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 20%, rgb(53, 53, 53) 80%);
|
||||
--zen-colors-border-contrast: color-mix(in srgb, var(--zen-colors-secondary) 10%, rgba(255, 255, 255, 0.11) 90%);
|
||||
|
||||
--zen-dialog-background: var(--zen-dark-color-mix-base);
|
||||
--zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 4%, rgb(24, 24, 24) 96%);
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.urlbar-input::placeholder {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#searchbar:focus-within {
|
||||
border-color: transparent !important;
|
||||
}
|
||||
@@ -28,17 +32,13 @@
|
||||
|
||||
#urlbar-background {
|
||||
background: var(--zen-toolbar-element-bg) !important;
|
||||
border-radius: var(--border-radius-medium);
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
#urlbar-background {
|
||||
border: 1px solid light-dark(transparent, rgba(255, 255, 255, 0.1)) !important;
|
||||
border: none !important;
|
||||
margin: 1px;
|
||||
|
||||
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.1) !important;
|
||||
:root[zen-single-toolbar='true'] & {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
#urlbar[focused='true']:not([suppress-focus-border]) > #urlbar-background,
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#identity-box.chromeUI:not([pageproxystate='invalid']) {
|
||||
& #identity-icon-box {
|
||||
background: light-dark(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) !important;
|
||||
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)) !important;
|
||||
}
|
||||
|
||||
& #identity-icon-label {
|
||||
@@ -122,10 +122,12 @@
|
||||
|
||||
#urlbar[breakout-extend='true'] #urlbar-background {
|
||||
border: 1px solid var(--zen-colors-border) !important;
|
||||
box-shadow: var(--zen-big-shadow) !important;
|
||||
backdrop-filter: none !important;
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
.urlbar-page-action:not(#star-button-box):not([open]),
|
||||
.urlbar-page-action:not([open]),
|
||||
#tracking-protection-icon-container {
|
||||
margin-inline-end: calc(-16px - 2 * var(--urlbar-icon-padding)) !important;
|
||||
opacity: 0;
|
||||
@@ -372,9 +374,6 @@ button.popup-notification-dropmarker {
|
||||
the backdrop woudn't work, we would need to apply a clip-path to the site and that's not recommended
|
||||
due to performance issues */
|
||||
background-color: light-dark(rgb(247, 247, 247), var(--zen-branding-bg)) !important;
|
||||
box-shadow: 0 0 1px 1px light-dark(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1)) !important;
|
||||
outline: 1px solid light-dark(rgba(20, 20, 20, 0.2), rgba(235, 235, 235, 0.2)) !important;
|
||||
outline-offset: -1px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -397,6 +396,7 @@ button.popup-notification-dropmarker {
|
||||
--urlbar-margin-inline: 10px !important;
|
||||
position: absolute;
|
||||
|
||||
font-size: 1.15em !important;
|
||||
top: calc(var(--zen-toolbar-height) * 2) !important;
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
|
||||
@@ -61,13 +61,16 @@
|
||||
|
||||
@media not (-moz-bool-pref: 'zen.workspaces.hide-deactivated-workspaces') {
|
||||
& {
|
||||
opacity: 0.4;
|
||||
filter: grayscale(1);
|
||||
transition: opacity 0.2s;
|
||||
opacity: 0.5;
|
||||
transition:
|
||||
filter 0.2s,
|
||||
opacity 0.2s;
|
||||
}
|
||||
|
||||
&[active='true'] {
|
||||
filter: none;
|
||||
&[active='true'],
|
||||
&:hover {
|
||||
filter: grayscale(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,18 +14,24 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
true
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
lazyCompactMode,
|
||||
'COMPACT_MODE_CAN_ANIMATE_SIDEBAR',
|
||||
'zen.view.compact.animate-sidebar',
|
||||
true
|
||||
);
|
||||
|
||||
ChromeUtils.defineLazyGetter(lazyCompactMode, 'mainAppWrapper', () => document.getElementById('zen-main-app-wrapper'));
|
||||
|
||||
var gZenCompactModeManager = {
|
||||
_flashTimeouts: {},
|
||||
_evenListeners: [],
|
||||
_removeHoverFrames: {},
|
||||
_animating: false,
|
||||
|
||||
init() {
|
||||
Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this));
|
||||
Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', this._disableTabsOnHoverIfConflict.bind(this));
|
||||
Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this));
|
||||
|
||||
this._canAnimateSidebar = Services.prefs.getBoolPref('zen.view.compact.animate-sidebar', true);
|
||||
|
||||
gZenUIManager.addPopupTrackingAttribute(this.sidebar);
|
||||
gZenUIManager.addPopupTrackingAttribute(document.getElementById('zen-appcontent-navbar-container'));
|
||||
|
||||
@@ -33,12 +39,26 @@ var gZenCompactModeManager = {
|
||||
this.addContextMenu();
|
||||
},
|
||||
|
||||
get prefefence() {
|
||||
return Services.prefs.getBoolPref('zen.view.compact');
|
||||
get preference() {
|
||||
if (!document.documentElement.hasAttribute('zen-compact-mode')) {
|
||||
document.documentElement.setAttribute(
|
||||
'zen-compact-mode',
|
||||
lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode')
|
||||
);
|
||||
}
|
||||
return lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode') === 'true';
|
||||
},
|
||||
|
||||
set preference(value) {
|
||||
Services.prefs.setBoolPref('zen.view.compact', value);
|
||||
if (this.preference === value || this._animating) {
|
||||
// We dont want the user to be able to spam the button
|
||||
return value;
|
||||
}
|
||||
// We use this element in order to make it persis across restarts, by using the XULStore.
|
||||
// main-window can't store attributes other than window sizes, so we use this instead
|
||||
lazyCompactMode.mainAppWrapper.setAttribute('zen-compact-mode', value);
|
||||
document.documentElement.setAttribute('zen-compact-mode', value);
|
||||
this._updateEvent();
|
||||
return value;
|
||||
},
|
||||
|
||||
@@ -58,7 +78,7 @@ var gZenCompactModeManager = {
|
||||
},
|
||||
|
||||
flashSidebarIfNecessary(aInstant = false) {
|
||||
if (!aInstant && this.prefefence && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager._animating) {
|
||||
if (!aInstant && this.preference && lazyCompactMode.COMPACT_MODE_FLASH_ENABLED && !gZenGlanceManager._animating) {
|
||||
this.flashSidebar();
|
||||
}
|
||||
},
|
||||
@@ -113,7 +133,6 @@ var gZenCompactModeManager = {
|
||||
|
||||
_updateEvent() {
|
||||
this._evenListeners.forEach((callback) => callback());
|
||||
this._disableTabsOnHoverIfConflict();
|
||||
this.updateContextMenu();
|
||||
this.animateCompactMode();
|
||||
},
|
||||
@@ -127,107 +146,100 @@ var gZenCompactModeManager = {
|
||||
},
|
||||
|
||||
animateCompactMode() {
|
||||
const isCompactMode = this.prefefence;
|
||||
this._animating = true;
|
||||
const isCompactMode = this.preference;
|
||||
const canHideSidebar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar');
|
||||
if (this._isAnimating) {
|
||||
return;
|
||||
}
|
||||
this._isAnimating = true;
|
||||
const canAnimate =
|
||||
lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR &&
|
||||
!this.sidebar.hasAttribute('zen-user-show') &&
|
||||
!this.sidebar.hasAttribute('zen-has-hover');
|
||||
// Do this so we can get the correct width ONCE compact mode styled have been applied
|
||||
if (this._canAnimateSidebar) {
|
||||
if (canAnimate) {
|
||||
this.sidebar.setAttribute('animate', 'true');
|
||||
}
|
||||
window.requestAnimationFrame(() => {
|
||||
let sidebarWidth = this.getAndApplySidebarWidth();
|
||||
if (!this._canAnimateSidebar) {
|
||||
if (!canAnimate) {
|
||||
this.sidebar.removeAttribute('animate');
|
||||
this._isAnimating = false;
|
||||
this._animating = false;
|
||||
return;
|
||||
}
|
||||
if (canHideSidebar && isCompactMode) {
|
||||
window.requestAnimationFrame(() => {
|
||||
this.sidebar.style.position = 'unset';
|
||||
this.sidebar.style.transition = 'margin .4s ease';
|
||||
this.sidebar.style.left = '0';
|
||||
if (!this.sidebarIsOnRight) {
|
||||
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
|
||||
} else {
|
||||
this.sidebar.style.marginRight = `${-1 * sidebarWidth}px`;
|
||||
}
|
||||
this.sidebar.style.pointerEvents = 'none';
|
||||
|
||||
window.requestAnimationFrame(() => {
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
this.sidebar,
|
||||
this.sidebarIsOnRight
|
||||
? {
|
||||
marginRight: `-${sidebarWidth}px`,
|
||||
}
|
||||
: { marginLeft: `-${sidebarWidth}px` },
|
||||
{
|
||||
ease: 'easeIn',
|
||||
type: 'spring',
|
||||
stiffness: 3000,
|
||||
damping: 150,
|
||||
mass: 1,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.sidebar.removeAttribute('animate');
|
||||
this.sidebar.style.transition = 'none';
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
this._animating = false;
|
||||
setTimeout(() => {
|
||||
window.requestAnimationFrame(() => {
|
||||
this.sidebar.style.removeProperty('pointer-events');
|
||||
this.sidebar.style.removeProperty('position');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
this.sidebar.style.removeProperty('left');
|
||||
document.getElementById('browser').style.removeProperty('overflow');
|
||||
this.sidebar.removeAttribute('animate');
|
||||
window.requestAnimationFrame(() => {
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
this._isAnimating = false;
|
||||
});
|
||||
});
|
||||
}, 450);
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
});
|
||||
});
|
||||
});
|
||||
} else if (canHideSidebar && !isCompactMode) {
|
||||
document.getElementById('browser').style.overflow = 'hidden';
|
||||
this.sidebar.style.position = 'relative';
|
||||
this.sidebar.style.left = '0';
|
||||
|
||||
if (!this.sidebarIsOnRight) {
|
||||
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
|
||||
if (this.sidebarIsOnRight) {
|
||||
this.sidebar.style.marginRight = `-${sidebarWidth}px`;
|
||||
} else {
|
||||
this.sidebar.style.marginRight = `${-1 * sidebarWidth}px`;
|
||||
this.sidebar.style.transform = `translateX(${sidebarWidth}px)`;
|
||||
this.sidebar.style.marginLeft = `-${sidebarWidth}px`;
|
||||
}
|
||||
|
||||
window.requestAnimationFrame(() => {
|
||||
this.sidebar.style.transition = 'margin .3s ease, transform .275s ease, opacity .3s ease';
|
||||
// we are in compact mode and we are exiting it
|
||||
if (!this.sidebarIsOnRight) {
|
||||
this.sidebar.style.marginLeft = '0';
|
||||
} else {
|
||||
this.sidebar.style.marginRight = '0';
|
||||
this.sidebar.style.transform = 'translateX(0)';
|
||||
}
|
||||
this.sidebar.style.pointerEvents = 'none';
|
||||
|
||||
setTimeout(() => {
|
||||
window.requestAnimationFrame(() => {
|
||||
this._isAnimating = false;
|
||||
this.sidebar.style.removeProperty('position');
|
||||
this.sidebar.style.removeProperty('pointer-events');
|
||||
this.sidebar.style.removeProperty('opacity');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
this.sidebar,
|
||||
this.sidebarIsOnRight
|
||||
? {
|
||||
marginRight: 0,
|
||||
transform: ['translateX(100%)', 'translateX(0)'],
|
||||
}
|
||||
: { marginLeft: 0 },
|
||||
{
|
||||
ease: 'easeOut',
|
||||
type: 'spring',
|
||||
stiffness: 3000,
|
||||
damping: 150,
|
||||
mass: 1,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.sidebar.removeAttribute('animate');
|
||||
document.getElementById('browser').style.removeProperty('overflow');
|
||||
this.sidebar.style.transition = 'none';
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
this._animating = false;
|
||||
setTimeout(() => {
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
this.sidebar.style.removeProperty('left');
|
||||
|
||||
document.getElementById('browser').style.removeProperty('overflow');
|
||||
this.sidebar.removeAttribute('animate');
|
||||
});
|
||||
}, 400);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.sidebar.removeAttribute('animate'); // remove the attribute if we are not animating
|
||||
this._animating = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
updateContextMenu() {
|
||||
document
|
||||
.getElementById('zen-context-menu-compact-mode-toggle')
|
||||
.setAttribute('checked', Services.prefs.getBoolPref('zen.view.compact'));
|
||||
document.getElementById('zen-context-menu-compact-mode-toggle').setAttribute('checked', this.preference);
|
||||
|
||||
const hideTabBar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar');
|
||||
const hideToolbar = Services.prefs.getBoolPref('zen.view.compact.hide-toolbar');
|
||||
const hideTabBar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar', false);
|
||||
const hideToolbar = Services.prefs.getBoolPref('zen.view.compact.hide-toolbar', false);
|
||||
const hideBoth = hideTabBar && hideToolbar;
|
||||
|
||||
const idName = 'zen-context-menu-compact-mode-hide-';
|
||||
@@ -244,14 +256,8 @@ var gZenCompactModeManager = {
|
||||
}
|
||||
},
|
||||
|
||||
_disableTabsOnHoverIfConflict() {
|
||||
if (Services.prefs.getBoolPref('zen.view.compact') && Services.prefs.getBoolPref('zen.view.compact.hide-tabbar')) {
|
||||
Services.prefs.setBoolPref('zen.view.sidebar-expanded.on-hover', false);
|
||||
}
|
||||
},
|
||||
|
||||
toggle() {
|
||||
return (this.preference = !this.prefefence);
|
||||
return (this.preference = !this.preference);
|
||||
},
|
||||
|
||||
_updateSidebarIsOnRight() {
|
||||
@@ -274,7 +280,7 @@ var gZenCompactModeManager = {
|
||||
{
|
||||
element: this.sidebar,
|
||||
screenEdge: this.sidebarIsOnRight ? 'right' : 'left',
|
||||
keepHoverDuration: 300,
|
||||
keepHoverDuration: 100,
|
||||
},
|
||||
{
|
||||
element: document.getElementById('zen-appcontent-navbar-container'),
|
||||
@@ -316,6 +322,7 @@ var gZenCompactModeManager = {
|
||||
for (let i = 0; i < this.hoverableElements.length; i++) {
|
||||
let target = this.hoverableElements[i].element;
|
||||
target.addEventListener('mouseenter', (event) => {
|
||||
if (!event.target.matches(':hover')) return;
|
||||
this.clearFlashTimeout('has-hover' + target.id);
|
||||
window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true'));
|
||||
});
|
||||
|
||||
@@ -4,12 +4,19 @@
|
||||
#currentTab = null;
|
||||
|
||||
_animating = false;
|
||||
_lazyPref = {};
|
||||
|
||||
init() {
|
||||
document.documentElement.setAttribute('zen-glance-uuid', gZenUIManager.generateUuidv4());
|
||||
window.addEventListener('keydown', this.onKeyDown.bind(this));
|
||||
window.addEventListener('TabClose', this.onTabClose.bind(this));
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this._lazyPref,
|
||||
'SHOULD_OPEN_EXTERNAL_TABS_IN_GLANCE',
|
||||
'zen.glance.open-essential-external-links',
|
||||
false
|
||||
);
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, 'sidebarButtons', () => document.getElementById('zen-glance-sidebar-container'));
|
||||
|
||||
document.getElementById('tabbrowser-tabpanels').addEventListener('click', this.onOverlayClick.bind(this));
|
||||
@@ -46,16 +53,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
createBrowserElement(url, currentTab) {
|
||||
getTabPosition(tab) {
|
||||
return Math.max(gBrowser._numVisiblePinTabs, tab._tPos) + 1;
|
||||
}
|
||||
|
||||
createBrowserElement(url, currentTab, existingTab = null) {
|
||||
const newTabOptions = {
|
||||
userContextId: currentTab.getAttribute('usercontextid') || '',
|
||||
skipBackgroundNotify: true,
|
||||
insertTab: true,
|
||||
skipLoad: false,
|
||||
index: currentTab._tPos + 1,
|
||||
index: this.getTabPosition(currentTab),
|
||||
};
|
||||
this.currentParentTab = currentTab;
|
||||
const newTab = gBrowser.addTrustedTab(Services.io.newURI(url).spec, newTabOptions);
|
||||
const newTab = existingTab ?? gBrowser.addTrustedTab(Services.io.newURI(url).spec, newTabOptions);
|
||||
|
||||
gBrowser.selectedTab = newTab;
|
||||
currentTab.querySelector('.tab-content').appendChild(newTab);
|
||||
@@ -65,7 +76,7 @@
|
||||
return this.#currentBrowser;
|
||||
}
|
||||
|
||||
openGlance(data) {
|
||||
openGlance(data, existingTab = null, ownerTab = null) {
|
||||
if (this.#currentBrowser) {
|
||||
return;
|
||||
}
|
||||
@@ -82,13 +93,12 @@
|
||||
this.browserWrapper?.removeAttribute('has-finished-animation');
|
||||
this.overlay?.removeAttribute('post-fade-out');
|
||||
|
||||
const url = data.url;
|
||||
const currentTab = gBrowser.selectedTab;
|
||||
const currentTab = ownerTab ?? gBrowser.selectedTab;
|
||||
|
||||
this.animatingOpen = true;
|
||||
this._animating = true;
|
||||
|
||||
const browserElement = this.createBrowserElement(url, currentTab);
|
||||
const browserElement = this.createBrowserElement(data.url, currentTab, existingTab);
|
||||
|
||||
this.overlay = browserElement.closest('.browserSidebarContainer');
|
||||
this.browserWrapper = browserElement.closest('.browserContainer');
|
||||
@@ -104,28 +114,30 @@
|
||||
|
||||
this.overlay.removeAttribute('fade-out');
|
||||
this.browserWrapper.setAttribute('animate', true);
|
||||
this.browserWrapper.style.top = `${initialY}px`;
|
||||
this.browserWrapper.style.left = `${initialX}px`;
|
||||
this.browserWrapper.style.top = `${initialY + initialHeight / 2}px`;
|
||||
this.browserWrapper.style.left = `${initialX + initialWidth / 2}px`;
|
||||
this.browserWrapper.style.width = `${initialWidth}px`;
|
||||
this.browserWrapper.style.height = `${initialHeight}px`;
|
||||
this.browserWrapper.style.opacity = 0.8;
|
||||
this.overlay.style.overflow = 'visible';
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
this.browserWrapper,
|
||||
{
|
||||
top: [`${initialY}px`, '50%'],
|
||||
left: [`${initialX}px`, '50%'],
|
||||
width: [`${initialWidth}px`, '85%'],
|
||||
height: [`${initialHeight}px`, '100%'],
|
||||
opacity: [0.8, 1],
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
width: '85%',
|
||||
height: '100%',
|
||||
opacity: 1,
|
||||
},
|
||||
{
|
||||
duration: 0.5,
|
||||
ease: 'easeIn',
|
||||
duration: 0.4,
|
||||
type: 'spring',
|
||||
bounce: 0.25,
|
||||
bounce: 0.2,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.overlay.style.removeProperty('overflow');
|
||||
this.browserWrapper.removeAttribute('animate');
|
||||
this.browserWrapper.setAttribute('animate-end', true);
|
||||
this.browserWrapper.setAttribute('has-finished-animation', true);
|
||||
@@ -151,7 +163,7 @@
|
||||
this._animating = true;
|
||||
|
||||
gBrowser._insertTabAtIndex(this.#currentTab, {
|
||||
index: this.currentParentTab._tPos + 1,
|
||||
index: this.getTabPosition(this.currentParentTab),
|
||||
});
|
||||
|
||||
let quikcCloseZen = false;
|
||||
@@ -295,9 +307,51 @@
|
||||
}
|
||||
}
|
||||
|
||||
tabDomainsDiffer(tab1, url2) {
|
||||
try {
|
||||
if (!tab1) {
|
||||
return true;
|
||||
}
|
||||
let url1 = tab1.linkedBrowser.currentURI.spec;
|
||||
if (url1.startsWith('about:')) {
|
||||
return true;
|
||||
}
|
||||
return Services.io.newURI(url1).host !== url2.host;
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
shouldOpenTabInGlance(tab, uri) {
|
||||
let owner = tab.owner;
|
||||
return (
|
||||
owner &&
|
||||
owner.getAttribute('zen-essential') === 'true' &&
|
||||
this._lazyPref.SHOULD_OPEN_EXTERNAL_TABS_IN_GLANCE &&
|
||||
owner.linkedBrowser?.docShellIsActive &&
|
||||
owner.linkedBrowser?.browsingContext?.isAppTab &&
|
||||
this.tabDomainsDiffer(owner, uri) &&
|
||||
Services.prefs.getBoolPref('zen.glance.enabled', true)
|
||||
);
|
||||
}
|
||||
|
||||
onTabOpen(browser, uri) {
|
||||
let tab = gBrowser.getTabForBrowser(browser);
|
||||
if (!tab) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (this.shouldOpenTabInGlance(tab, uri)) {
|
||||
this.openGlance({ url: undefined, x: 0, y: 0, width: 0, height: 0 }, tab, tab.owner);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
fullyOpenGlance() {
|
||||
gBrowser._insertTabAtIndex(this.#currentTab, {
|
||||
index: this.#currentTab._tPos + 1,
|
||||
index: this.getTabPosition(this.#currentTab),
|
||||
});
|
||||
|
||||
this.animatingFullOpen = true;
|
||||
|
||||
@@ -246,51 +246,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
onThemePickerClick(event) {
|
||||
event.preventDefault();
|
||||
if (event.button !== 0 || this.dragging) return;
|
||||
const gradient = this.panel.querySelector('.zen-theme-picker-gradient');
|
||||
const rect = gradient.getBoundingClientRect();
|
||||
const padding = 90; // each side
|
||||
|
||||
const centerX = rect.left + rect.width / 2;
|
||||
const centerY = rect.top + rect.height / 2;
|
||||
const radius = (rect.width - padding) / 2;
|
||||
let pixelX = event.clientX;
|
||||
let pixelY = event.clientY;
|
||||
|
||||
// Check if the click is within the circle
|
||||
const distance = Math.sqrt((pixelX - centerX) ** 2 + (pixelY - centerY) ** 2);
|
||||
if (distance > radius) {
|
||||
return; // Don't create a dot if clicking outside the circle
|
||||
}
|
||||
|
||||
// Check if we clicked on an existing dot
|
||||
const clickedElement = event.target;
|
||||
const isExistingDot = clickedElement.classList.contains('zen-theme-picker-dot');
|
||||
|
||||
// Only proceed if not clicking on an existing dot
|
||||
if (!isExistingDot) {
|
||||
const relativeX = event.clientX - rect.left;
|
||||
const relativeY = event.clientY - rect.top;
|
||||
|
||||
const color = this.getColorFromPosition(relativeX, relativeY);
|
||||
|
||||
// Create new dot
|
||||
const dot = document.createElement('div');
|
||||
dot.classList.add('zen-theme-picker-dot');
|
||||
dot.addEventListener('mousedown', this.onDotMouseDown.bind(this));
|
||||
|
||||
dot.style.left = `${relativeX}px`;
|
||||
dot.style.top = `${relativeY}px`;
|
||||
dot.style.setProperty('--zen-theme-picker-dot-color', `rgb(${color[0]}, ${color[1]}, ${color[2]})`);
|
||||
|
||||
gradient.appendChild(dot);
|
||||
|
||||
this.updateCurrentWorkspace(true);
|
||||
}
|
||||
}
|
||||
|
||||
onDotMouseDown(event) {
|
||||
event.preventDefault();
|
||||
if (event.button === 2) {
|
||||
@@ -659,7 +614,7 @@
|
||||
// Reactivate the transition after the animation
|
||||
appWrapper.removeAttribute('post-animating');
|
||||
}, 100);
|
||||
}, 700);
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,11 @@
|
||||
}
|
||||
|
||||
class ZenPinnedTabManager extends ZenDOMOperatedFeature {
|
||||
init() {
|
||||
async init() {
|
||||
if (!this.enabled) {
|
||||
return;
|
||||
}
|
||||
this._canLog = Services.prefs.getBoolPref('zen.pinned-tab-manager.debug', false);
|
||||
this.observer = new ZenPinnedTabsObserver();
|
||||
this._initClosePinnedTabShortcut();
|
||||
this._insertItemsIntoTabContextMenu();
|
||||
@@ -58,6 +59,9 @@
|
||||
|
||||
this._zenClickEventListener = this._onTabClick.bind(this);
|
||||
ZenWorkspaces.addChangeListeners(this.onWorkspaceChange.bind(this));
|
||||
|
||||
await ZenPinnedTabsStorage.promiseInitialized;
|
||||
ZenWorkspaces._resolvePinnedInitialized();
|
||||
}
|
||||
|
||||
async onWorkspaceChange(newWorkspace, onInit) {
|
||||
@@ -68,6 +72,12 @@
|
||||
await this._refreshPinnedTabs(newWorkspace, { init: onInit });
|
||||
}
|
||||
|
||||
log(message) {
|
||||
if (this._canLog) {
|
||||
console.log(`[ZenPinnedTabManager] ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
onTabIconChanged(tab, url = null) {
|
||||
const iconUrl = url ?? tab.iconImage.src;
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
@@ -125,6 +135,7 @@
|
||||
this._pinsCache = [];
|
||||
}
|
||||
|
||||
this.log(`Initialized pins cache with ${this._pinsCache.length} pins`);
|
||||
return this._pinsCache;
|
||||
}
|
||||
|
||||
@@ -221,6 +232,7 @@
|
||||
SessionStore.setTabState(newTab, state);
|
||||
}
|
||||
|
||||
this.log(`Created new pinned tab for pin ${pin.uuid} (isEssential: ${pin.isEssential})`);
|
||||
gBrowser.pinTab(newTab);
|
||||
|
||||
newTab.initialize();
|
||||
@@ -369,6 +381,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
this.log(`Setting pinned attributes for tab ${tab.linkedBrowser.currentURI.spec}`);
|
||||
const browser = tab.linkedBrowser;
|
||||
|
||||
const uuid = gZenUIManager.generateUuidv4();
|
||||
@@ -406,6 +419,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (Services.startup.shuttingDown || window.skipNextCanClose) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.log(`Removing pinned attributes for tab ${tab.getAttribute('zen-pin-id')}`);
|
||||
await ZenPinnedTabsStorage.removePin(tab.getAttribute('zen-pin-id'));
|
||||
|
||||
if (!isClosing) {
|
||||
@@ -452,7 +470,8 @@
|
||||
this._resetTabToStoredState(selectedTab);
|
||||
}
|
||||
if (behavior.includes('unload')) {
|
||||
gBrowser.discardBrowser(selectedTab);
|
||||
gBrowser.explicitUnloadTabs([selectedTab]);
|
||||
selectedTab.removeAttribute('linkedpanel');
|
||||
}
|
||||
break;
|
||||
case 'reset':
|
||||
@@ -553,6 +572,7 @@
|
||||
gBrowser.pinTab(tab);
|
||||
this.onTabIconChanged(tab);
|
||||
}
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
}
|
||||
|
||||
removeEssentials() {
|
||||
@@ -565,6 +585,7 @@
|
||||
}
|
||||
gBrowser.unpinTab(tab);
|
||||
}
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
}
|
||||
|
||||
_insertItemsIntoTabContextMenu() {
|
||||
|
||||
@@ -45,6 +45,9 @@ var ZenPinnedTabsStorage = {
|
||||
await db.execute(`
|
||||
CREATE INDEX IF NOT EXISTS idx_zen_pins_changes_uuid ON zen_pins_changes(uuid)
|
||||
`);
|
||||
|
||||
await SessionStore.promiseInitialized;
|
||||
this._resolveInitialized();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -357,4 +360,7 @@ var ZenPinnedTabsStorage = {
|
||||
},
|
||||
};
|
||||
|
||||
ZenPinnedTabsStorage.init();
|
||||
ZenPinnedTabsStorage.promiseInitialized = new Promise((resolve) => {
|
||||
ZenPinnedTabsStorage._resolveInitialized = resolve;
|
||||
ZenPinnedTabsStorage.init();
|
||||
});
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
}
|
||||
|
||||
unload(tab) {
|
||||
gBrowser.discardBrowser(tab);
|
||||
gBrowser.explicitUnloadTabs([tab]);
|
||||
tab.removeAttribute('linkedpanel');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
const kZenAccentColorConfigKey = 'zen.theme.accent-color';
|
||||
|
||||
var gZenThemeBuilder = {
|
||||
init() {
|
||||
return; // TODO:
|
||||
this._mouseMoveListener = this._handleThumbMouseMove.bind(this);
|
||||
setTimeout(() => {
|
||||
this._initBuilderUI();
|
||||
}, 500);
|
||||
},
|
||||
|
||||
get _builderWrapper() {
|
||||
if (this.__builderWrapper) {
|
||||
return this.__builderWrapper;
|
||||
}
|
||||
this.__builderWrapper = document.getElementById('zen-theme-builder-wrapper');
|
||||
return this.__builderWrapper;
|
||||
},
|
||||
|
||||
_initBuilderUI() {
|
||||
let wrapper = this._builderWrapper;
|
||||
if (!wrapper) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.info('gZenThemeBuilder: init builder UI');
|
||||
|
||||
const kTemplate = `
|
||||
<html:div id="zen-theme-builder">
|
||||
<html:div id="zen-theme-builder-color-picker">
|
||||
<html:canvas id="zen-theme-builder-color-picker-canvas"></html:canvas>
|
||||
<html:div id="zen-theme-builder-color-picker-deck">
|
||||
<html:div id="zen-theme-builder-color-picker-thumb"></html:div>
|
||||
</html:div>
|
||||
</html:div>
|
||||
</html:div>
|
||||
`;
|
||||
wrapper.innerHTML = kTemplate;
|
||||
this._initColorPicker();
|
||||
},
|
||||
|
||||
_getPositionFromColor(ctx, color) {
|
||||
var w = ctx.canvas.width,
|
||||
h = ctx.canvas.height,
|
||||
data = ctx.getImageData(0, 0, w, h), /// get image data
|
||||
buffer = data.data, /// and its pixel buffer
|
||||
len = buffer.length, /// cache length
|
||||
x,
|
||||
y = 0,
|
||||
p,
|
||||
px; /// for iterating
|
||||
/// iterating x/y instead of forward to get position the easy way
|
||||
for (; y < h; y++) {
|
||||
/// common value for all x
|
||||
p = y * 4 * w;
|
||||
for (x = 0; x < w; x++) {
|
||||
/// next pixel (skipping 4 bytes as each pixel is RGBA bytes)
|
||||
px = p + x * 4;
|
||||
/// if red component match check the others
|
||||
if (buffer[px] === color[0]) {
|
||||
if (buffer[px + 1] === color[1] && buffer[px + 2] === color[2]) {
|
||||
return [x, y];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
_hexToRgb(hex) {
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)];
|
||||
},
|
||||
|
||||
_componentToHex(c) {
|
||||
var hex = c.toString(16);
|
||||
return hex.length == 1 ? '0' + hex : hex;
|
||||
},
|
||||
|
||||
_rgbToHex(r, g, b) {
|
||||
return '#' + this._componentToHex(r) + this._componentToHex(g) + this._componentToHex(b);
|
||||
},
|
||||
|
||||
_initColorPicker() {
|
||||
const canvas = document.getElementById('zen-theme-builder-color-picker-canvas');
|
||||
const thumb = document.getElementById('zen-theme-builder-color-picker-thumb');
|
||||
|
||||
// A all the main colors are all blended together towards the center.
|
||||
// But we also add some random gradients to make it look more interesting.
|
||||
// Instead of using a simple gradient, we use a radial gradient.
|
||||
const ctx = canvas.getContext('2d');
|
||||
const size = 180;
|
||||
canvas.width = size;
|
||||
canvas.height = size;
|
||||
const center = size / 2;
|
||||
const radius = size / 2;
|
||||
const gradient = ctx.createConicGradient(0, center, center);
|
||||
gradient.addColorStop(0, '#fff490');
|
||||
gradient.addColorStop(1 / 12, '#f9e380');
|
||||
gradient.addColorStop(2 / 12, '#fecc87');
|
||||
gradient.addColorStop(3 / 12, '#ffa894');
|
||||
gradient.addColorStop(4 / 12, '#f98089');
|
||||
gradient.addColorStop(5 / 12, '#f9b7c5');
|
||||
gradient.addColorStop(6 / 12, '#c193b8');
|
||||
gradient.addColorStop(7 / 12, '#a8b7e0');
|
||||
gradient.addColorStop(8 / 12, '#88d2f9');
|
||||
gradient.addColorStop(9 / 12, '#81e8e5');
|
||||
gradient.addColorStop(10 / 12, '#b7e5a5');
|
||||
gradient.addColorStop(11 / 12, '#eaefac');
|
||||
gradient.addColorStop(1, '#fff490');
|
||||
|
||||
const radialGradient = ctx.createRadialGradient(size / 2, size / 2, 0, size / 2, size / 2, size / 2);
|
||||
radialGradient.addColorStop(0, 'rgba(255,255,255,1)');
|
||||
radialGradient.addColorStop(1, 'rgba(255,255,255,0)');
|
||||
|
||||
ctx.fillStyle = gradient;
|
||||
ctx.fillRect(0, 0, size, size);
|
||||
|
||||
//ctx.fillStyle = radialGradient;
|
||||
//ctx.fillRect(0, 0, size, size);
|
||||
|
||||
// Add the thumb.
|
||||
const accentColor = Services.prefs.getStringPref(kZenAccentColorConfigKey, '#ffb787');
|
||||
const pos = this._getPositionFromColor(ctx, this._hexToRgb(accentColor));
|
||||
|
||||
let x = pos ? pos[0] : center;
|
||||
let y = pos ? pos[1] : center;
|
||||
|
||||
thumb.style.left = `${x}px`;
|
||||
thumb.style.top = `${y}px`;
|
||||
|
||||
thumb.addEventListener('mousedown', this._handleThumbMouseDown.bind(this));
|
||||
document.addEventListener('mouseup', this._handleThumbMouseUp.bind(this));
|
||||
},
|
||||
|
||||
_handleThumbMouseDown(e) {
|
||||
document.addEventListener('mousemove', this._mouseMoveListener);
|
||||
},
|
||||
|
||||
_handleThumbMouseUp(e) {
|
||||
document.removeEventListener('mousemove', this._mouseMoveListener);
|
||||
},
|
||||
|
||||
_handleThumbMouseMove(e) {
|
||||
const kThumbOffset = 15;
|
||||
const deck = document.getElementById('zen-theme-builder-color-picker-deck');
|
||||
|
||||
const thumb = document.getElementById('zen-theme-builder-color-picker-thumb');
|
||||
const rect = deck.getBoundingClientRect();
|
||||
let x = e.clientX - rect.left;
|
||||
let y = e.clientY - rect.top;
|
||||
|
||||
if (x > rect.width - kThumbOffset) {
|
||||
x = rect.width - kThumbOffset;
|
||||
}
|
||||
if (y > rect.height - kThumbOffset) {
|
||||
y = rect.height - kThumbOffset;
|
||||
}
|
||||
if (x < kThumbOffset) {
|
||||
x = kThumbOffset;
|
||||
}
|
||||
if (y < kThumbOffset) {
|
||||
y = kThumbOffset;
|
||||
}
|
||||
|
||||
thumb.style.left = `${x}px`;
|
||||
thumb.style.top = `${y}px`;
|
||||
|
||||
const canvas = document.getElementById('zen-theme-builder-color-picker-canvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
const imageData = ctx.getImageData(x, y, 1, 1);
|
||||
|
||||
// Update the accent color.
|
||||
Services.prefs.setStringPref(kZenAccentColorConfigKey, this._rgbToHex(...imageData.data));
|
||||
},
|
||||
};
|
||||
@@ -11,7 +11,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
cumulativeDelta: 0,
|
||||
direction: null,
|
||||
};
|
||||
_hoveringSidebar = false;
|
||||
_lastScrollTime = 0;
|
||||
bookmarkMenus = [
|
||||
'PlacesToolbar',
|
||||
@@ -21,6 +20,18 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
'BMB_mobileBookmarks',
|
||||
];
|
||||
|
||||
promiseDBInitialized = new Promise((resolve) => {
|
||||
this._resolveDBInitialized = resolve;
|
||||
});
|
||||
|
||||
promisePinnedInitialized = new Promise((resolve) => {
|
||||
this._resolvePinnedInitialized = resolve;
|
||||
});
|
||||
|
||||
async waitForPromises() {
|
||||
await Promise.all([this.promiseDBInitialized, this.promisePinnedInitialized, SessionStore.promiseAllWindowsRestored]);
|
||||
}
|
||||
|
||||
async init() {
|
||||
if (!this.shouldHaveWorkspaces) {
|
||||
document.getElementById('zen-current-workspace-indicator').setAttribute('hidden', 'true');
|
||||
@@ -66,6 +77,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (!this.workspaceEnabled) {
|
||||
return;
|
||||
}
|
||||
await this.waitForPromises();
|
||||
await this.initializeWorkspaces();
|
||||
console.info('ZenWorkspaces: ZenWorkspaces initialized');
|
||||
|
||||
@@ -101,6 +113,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
window.addEventListener('AppCommand', HandleAppCommandEvent, true);
|
||||
}
|
||||
|
||||
get _hoveringSidebar() {
|
||||
return document.getElementById('navigator-toolbox').hasAttribute('zen-has-hover');
|
||||
}
|
||||
|
||||
_handleAppCommand(event) {
|
||||
if (!this.workspaceEnabled || !this._hoveringSidebar) {
|
||||
return;
|
||||
@@ -125,14 +141,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
_setupSidebarHandlers() {
|
||||
const toolbox = document.getElementById('navigator-toolbox');
|
||||
|
||||
toolbox.addEventListener('mouseenter', () => {
|
||||
this._hoveringSidebar = true;
|
||||
});
|
||||
|
||||
toolbox.addEventListener('mouseleave', () => {
|
||||
this._hoveringSidebar = false;
|
||||
});
|
||||
|
||||
const scrollCooldown = 200; // Milliseconds to wait before allowing another scroll
|
||||
const scrollThreshold = 2; // Minimum scroll delta to trigger workspace change
|
||||
|
||||
@@ -238,9 +246,22 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
this._swipeState.cumulativeDelta += event.delta;
|
||||
|
||||
// Determine swipe direction based on cumulative delta
|
||||
if (Math.abs(this._swipeState.cumulativeDelta) > 0.25) {
|
||||
if (Math.abs(this._swipeState.cumulativeDelta) > 1) {
|
||||
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'left' : 'right';
|
||||
}
|
||||
|
||||
// Apply a translateX to the tab strip to give the user feedback on the swipe
|
||||
const stripWidth = document.getElementById('tabbrowser-tabs').scrollWidth;
|
||||
// To make the animation larger, we multiply the delta by 5
|
||||
let translateX = this._swipeState.cumulativeDelta * 10;
|
||||
if (this._swipeState.direction === 'left') {
|
||||
translateX = Math.min(translateX, stripWidth);
|
||||
} else {
|
||||
translateX = Math.max(translateX, -stripWidth);
|
||||
}
|
||||
for (const element of this._animateTabsElements) {
|
||||
element.style.transform = `translateX(${translateX}px)`;
|
||||
}
|
||||
}
|
||||
|
||||
async _handleSwipeEnd(event) {
|
||||
@@ -254,6 +275,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (this._swipeState.direction) {
|
||||
let direction = this.naturalScroll ? -1 : 1;
|
||||
this.changeWorkspaceShortcut(rawDirection * direction);
|
||||
} else {
|
||||
this._cancelSwipeAnimation();
|
||||
}
|
||||
|
||||
// Reset swipe state
|
||||
@@ -376,7 +399,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
this._initializeWorkspaceTabContextMenus();
|
||||
await this.workspaceBookmarks();
|
||||
window.addEventListener('TabBrowserInserted', this.onTabBrowserInserted.bind(this));
|
||||
await SessionStore.promiseInitialized;
|
||||
let workspaces = await this._workspaces();
|
||||
let activeWorkspace = null;
|
||||
if (workspaces.workspaces.length === 0) {
|
||||
@@ -391,11 +413,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
activeWorkspace = workspaces.workspaces[0];
|
||||
this.activeWorkspace = activeWorkspace?.uuid;
|
||||
}
|
||||
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
||||
}
|
||||
try {
|
||||
if (activeWorkspace) {
|
||||
window.gZenThemePicker = new ZenThemePicker();
|
||||
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('ZenWorkspaces: Error initializing theme picker', e);
|
||||
@@ -1042,25 +1064,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
let button = browser.document.getElementById('zen-workspaces-button');
|
||||
|
||||
if (!button) {
|
||||
button = browser.document.createXULElement('toolbarbutton');
|
||||
button.id = 'zen-workspaces-button';
|
||||
let navbar = browser.document.getElementById('nav-bar');
|
||||
navbar.appendChild(button);
|
||||
}
|
||||
|
||||
while (button.firstChild) {
|
||||
button.firstChild.remove();
|
||||
}
|
||||
|
||||
for (let attr of [...button.attributes]) {
|
||||
if (attr.name !== 'id') {
|
||||
button.removeAttribute(attr.name);
|
||||
}
|
||||
}
|
||||
|
||||
button.className = '';
|
||||
|
||||
if (this._workspacesButtonClickListener) {
|
||||
button.removeEventListener('click', this._workspacesButtonClickListener);
|
||||
this._workspacesButtonClickListener = null;
|
||||
@@ -1070,7 +1077,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
this._workspaceButtonContextMenuListener = null;
|
||||
}
|
||||
|
||||
button.setAttribute('removable', 'true');
|
||||
button.setAttribute('showInPrivateBrowsing', 'false');
|
||||
button.setAttribute('tooltiptext', 'Workspaces');
|
||||
if (this.shouldShowIconStrip) {
|
||||
@@ -1282,9 +1288,32 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
_cancelSwipeAnimation() {
|
||||
const existingTransform = this._animateTabsElements[0].style.transform;
|
||||
const newTransform = 'translateX(0)';
|
||||
for (const element of this._animateTabsElements) {
|
||||
gZenUIManager.motion.animate(
|
||||
element,
|
||||
{
|
||||
transform: existingTransform ? [existingTransform, newTransform] : newTransform,
|
||||
},
|
||||
{
|
||||
type: 'spring',
|
||||
bounce: 0,
|
||||
duration: 0.12,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async _performWorkspaceChange(window, { onInit = false, explicitAnimationDirection = undefined } = {}) {
|
||||
const previousWorkspace = await this.getActiveWorkspace();
|
||||
|
||||
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !onInit) {
|
||||
this._cancelSwipeAnimation();
|
||||
return;
|
||||
}
|
||||
|
||||
this.activeWorkspace = window.uuid;
|
||||
const containerId = window.containerTabId?.toString();
|
||||
const workspaces = await this._workspaces();
|
||||
@@ -1321,40 +1350,43 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
_animateElement(element, direction, out = false, callback) {
|
||||
if (out) {
|
||||
element.animate([{ transform: 'translateX(0)' }, { transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }], {
|
||||
duration: 100,
|
||||
easing: 'ease',
|
||||
fill: 'both',
|
||||
}).onfinish = callback;
|
||||
return;
|
||||
}
|
||||
element.animate([{ transform: `translateX(${direction === 'left' ? '-' : ''}100%)` }, { transform: 'translateX(0)' }], {
|
||||
duration: 100,
|
||||
easing: 'ease',
|
||||
fill: 'both',
|
||||
}).onfinish = callback;
|
||||
get _animateTabsElements() {
|
||||
const selector = `#zen-browser-tabs-wrapper`;
|
||||
const extraSelector = `#zen-current-workspace-indicator`;
|
||||
return [...this.tabContainer.querySelectorAll(selector), ...this.tabContainer.querySelectorAll(extraSelector)];
|
||||
}
|
||||
|
||||
async _animateTabs(direction, out = false) {
|
||||
const tabs = gBrowser.visibleTabs.filter((tab) => !tab.hasAttribute('zen-essential'));
|
||||
return new Promise((resolve) => {
|
||||
let count = 0;
|
||||
const onAnimationEnd = () => {
|
||||
count++;
|
||||
// +1 for the workspace indicator tab
|
||||
if (count >= tabs.length + 1) {
|
||||
resolve();
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
const tabsWidth = this.tabContainer.getBoundingClientRect().width;
|
||||
// order by actual position in the children list to animate
|
||||
const elements = this._animateTabsElements;
|
||||
if (out) {
|
||||
const existingTransform = elements[0].style.transform;
|
||||
const newTransform = `translateX(${direction === 'left' ? '-' : ''}${tabsWidth}px)`;
|
||||
return gZenUIManager.motion.animate(
|
||||
elements,
|
||||
{
|
||||
transform: existingTransform ? [existingTransform, newTransform] : newTransform,
|
||||
},
|
||||
{
|
||||
type: 'spring',
|
||||
bounce: 0,
|
||||
duration: 0.12,
|
||||
}
|
||||
};
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
// Also animate the workspace indicator label
|
||||
this._animateElement(document.getElementById('zen-current-workspace-indicator'), direction, out, () => onAnimationEnd());
|
||||
for (const tab of tabs) {
|
||||
this._animateElement(tab, direction, out, () => onAnimationEnd());
|
||||
);
|
||||
}
|
||||
return gZenUIManager.motion.animate(
|
||||
elements,
|
||||
{
|
||||
transform: [`translateX(${direction === 'left' ? '-' : ''}${tabsWidth}px)`, 'translateX(0px)'],
|
||||
},
|
||||
{
|
||||
duration: 0.15,
|
||||
type: 'spring',
|
||||
bounce: 0,
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
_processTabVisibility(workspaceUuid, containerId, workspaces) {
|
||||
|
||||
@@ -70,6 +70,8 @@ var ZenWorkspacesStorage = {
|
||||
this.lazy.Weave.Service.engineManager.register(ZenWorkspacesEngine);
|
||||
await ZenWorkspacesStorage.migrateWorkspacesFromJSON();
|
||||
}
|
||||
|
||||
ZenWorkspaces._resolveDBInitialized();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -603,4 +605,7 @@ var ZenWorkspaceBookmarksStorage = {
|
||||
},
|
||||
};
|
||||
|
||||
ZenWorkspacesStorage.init();
|
||||
ZenWorkspacesStorage.promiseDBInitialized = new Promise((resolve) => {
|
||||
ZenWorkspacesStorage._resolveDBInitialized = resolve;
|
||||
ZenWorkspacesStorage.init();
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427b1d934e3 100644
|
||||
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..67dbc54de5704be8fe09ec9982e3a2191a5f15dc 100644
|
||||
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
@@ -72,7 +72,33 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427
|
||||
// For toolbars that need it, mark as dirty.
|
||||
let defaultPlacements = areaProperties.get("defaultPlacements");
|
||||
if (
|
||||
@@ -3609,7 +3608,7 @@ var CustomizableUIInternal = {
|
||||
@@ -1540,7 +1539,7 @@ var CustomizableUIInternal = {
|
||||
lazy.log.info(
|
||||
"Widget " + aWidgetId + " not found, unable to remove from " + aArea
|
||||
);
|
||||
- continue;
|
||||
+ // continue;
|
||||
}
|
||||
|
||||
this.notifyDOMChange(widgetNode, null, container, true, () => {
|
||||
@@ -1550,7 +1549,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)) {
|
||||
- container.removeChild(widgetNode);
|
||||
+ widgetNode.remove();
|
||||
} else {
|
||||
window.gNavToolbox.palette.appendChild(widgetNode);
|
||||
}
|
||||
@@ -2654,7 +2653,6 @@ var CustomizableUIInternal = {
|
||||
if (!this.isWidgetRemovable(aWidgetId)) {
|
||||
return;
|
||||
}
|
||||
-
|
||||
let placements = gPlacements.get(oldPlacement.area);
|
||||
let position = placements.indexOf(aWidgetId);
|
||||
if (position != -1) {
|
||||
@@ -3609,7 +3607,7 @@ var CustomizableUIInternal = {
|
||||
}
|
||||
},
|
||||
|
||||
@@ -81,7 +107,7 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427
|
||||
for (let [areaId, areaNodes] of gBuildAreas) {
|
||||
let placements = gPlacements.get(areaId);
|
||||
let isFirstChangedToolbar = true;
|
||||
@@ -3620,7 +3619,7 @@ var CustomizableUIInternal = {
|
||||
@@ -3620,7 +3618,7 @@ var CustomizableUIInternal = {
|
||||
if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
|
||||
let defaultCollapsed = area.get("defaultCollapsed");
|
||||
let win = areaNode.ownerGlobal;
|
||||
@@ -90,7 +116,7 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427
|
||||
win.setToolbarVisibility(
|
||||
areaNode,
|
||||
typeof defaultCollapsed == "string"
|
||||
@@ -4583,6 +4582,7 @@ export var CustomizableUI = {
|
||||
@@ -4583,6 +4581,7 @@ export var CustomizableUI = {
|
||||
unregisterArea(aName, aDestroyPlacements) {
|
||||
CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);
|
||||
},
|
||||
@@ -98,3 +124,46 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..b161c73fe690c172a9be266894f72427
|
||||
/**
|
||||
* Add a widget to an area.
|
||||
* If the area to which you try to add is not known to CustomizableUI,
|
||||
@@ -6408,11 +6407,11 @@ class OverflowableToolbar {
|
||||
parseFloat(style.paddingLeft) -
|
||||
parseFloat(style.paddingRight) -
|
||||
toolbarChildrenWidth;
|
||||
- targetWidth = getInlineSize(this.#target);
|
||||
+ targetWidth = getInlineSize(this.#target) - ((win.gZenVerticalTabsManager._hasSetSingleToolbar && this.#target.id == 'zen-sidebar-top-buttons-customization-target') ? win.gZenVerticalTabsManager._topButtonsSeparatorElement.getBoundingClientRect().width : 0);
|
||||
targetChildrenWidth =
|
||||
this.#target == this.#toolbar
|
||||
? toolbarChildrenWidth
|
||||
- : sumChildrenInlineSize(this.#target);
|
||||
+ : sumChildrenInlineSize(this.#target, win.gZenVerticalTabsManager._topButtonsSeparatorElement);
|
||||
});
|
||||
|
||||
lazy.log.debug(
|
||||
@@ -6422,7 +6421,8 @@ class OverflowableToolbar {
|
||||
// If the target has min-width: 0, their children might actually overflow
|
||||
// it, so check for both cases explicitly.
|
||||
let targetContentWidth = Math.max(targetWidth, targetChildrenWidth);
|
||||
- let isOverflowing = Math.floor(targetContentWidth) > totalAvailWidth;
|
||||
+ if (win.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') return { isOverflowing: false, targetContentWidth, totalAvailWidth };
|
||||
+ let isOverflowing = Math.floor(targetContentWidth) + (win.gZenVerticalTabsManager._hasSetSingleToolbar ? 0.1 : 0) > totalAvailWidth;
|
||||
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
||||
}
|
||||
|
||||
@@ -6516,7 +6516,7 @@ class OverflowableToolbar {
|
||||
}
|
||||
}
|
||||
if (!inserted) {
|
||||
- this.#target.appendChild(child);
|
||||
+ win.gZenVerticalTabsManager.appendCustomizableItem(this.#target, child, gPlacements.get(this.#toolbar.id));
|
||||
}
|
||||
child.removeAttribute("cui-anchorid");
|
||||
child.removeAttribute("overflowedItem");
|
||||
@@ -6678,6 +6678,9 @@ class OverflowableToolbar {
|
||||
* @param {MouseEvent} aEvent the click event.
|
||||
*/
|
||||
#onClickDefaultListButton(aEvent) {
|
||||
+ if (aEvent.view.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') {
|
||||
+ return;
|
||||
+ }
|
||||
if (this.#defaultListButton.open) {
|
||||
this.#defaultListButton.open = false;
|
||||
lazy.PanelMultiView.hidePopup(this.#defaultListPanel);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js
|
||||
index 1bfa0af16178c9b42172bc1b1e0249d28ff8e9e6..cefe17335cb7cc1a22182f2e79c564237b9ae5e8 100644
|
||||
index 1bfa0af16178c9b42172bc1b1e0249d28ff8e9e6..6744a37b7183ab9e3ac5bced7ded715879063eb5 100644
|
||||
--- a/browser/components/places/content/browserPlacesViews.js
|
||||
+++ b/browser/components/places/content/browserPlacesViews.js
|
||||
@@ -330,12 +330,23 @@ class PlacesViewBase {
|
||||
@@ -33,7 +33,7 @@ index 1bfa0af16178c9b42172bc1b1e0249d28ff8e9e6..cefe17335cb7cc1a22182f2e79c56423
|
||||
"scheme",
|
||||
PlacesUIUtils.guessUrlSchemeForUI(aPlacesNode.uri)
|
||||
);
|
||||
+ element.addEventListener("command", gZenGlanceManager.openGlanceForBookmark.bind(gZenGlanceManager));
|
||||
+ element.addEventListener("command", (e) => window.gZenGlanceManager.openGlanceForBookmark(e));
|
||||
} else if (PlacesUtils.containerTypes.includes(type)) {
|
||||
element = document.createXULElement("menu");
|
||||
element.setAttribute("container", "true");
|
||||
|
||||
@@ -494,7 +494,6 @@ var gZenLooksAndFeel = {
|
||||
this.__hasInitialized = true;
|
||||
this._initializeColorPicker(this._getInitialAccentColor());
|
||||
window.zenPageAccentColorChanged = this._handleAccentColorChange.bind(this);
|
||||
gZenThemeBuilder.init();
|
||||
gZenMarketplaceManager.init();
|
||||
var onPreferColorSchemeChange = this.onPreferColorSchemeChange.bind(this);
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addListener(onPreferColorSchemeChange);
|
||||
@@ -602,8 +601,8 @@ var gZenLooksAndFeel = {
|
||||
|
||||
let value = '';
|
||||
if (
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') &&
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-toolbar')
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar', false) &&
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-toolbar', false)
|
||||
) {
|
||||
value = 'both';
|
||||
} else {
|
||||
@@ -978,11 +977,6 @@ Preferences.addAll([
|
||||
type: 'bool',
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
id: 'zen.view.compact',
|
||||
type: 'bool',
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: 'zen.view.compact.hide-toolbar',
|
||||
type: 'bool',
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<script src="chrome://browser/content/zen-components/ZenThemeBuilder.mjs" defer=""/>
|
||||
<script src="chrome://browser/content/preferences/zen-settings.js"/>
|
||||
<html:template id="template-paneZenLooks">
|
||||
|
||||
@@ -236,9 +235,6 @@
|
||||
<label><html:h2 data-l10n-id="zen-look-and-feel-compact-view-header"/></label>
|
||||
<description class="description-deemphasized" data-l10n-id="zen-look-and-feel-compact-view-description" />
|
||||
|
||||
<checkbox id="zenLooksAndFeelShowCompactView"
|
||||
data-l10n-id="zen-look-and-feel-compact-view-enabled"
|
||||
preference="zen.view.compact"/>
|
||||
<html:div id="ZenCompactModeStyle">
|
||||
<form xmlns="http://www.w3.org/1999/xhtml" autocomplete="off" id="zen-compact-mode-styles-form">
|
||||
<label class="web-appearance-choice">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54da793e76 100644
|
||||
index ce68c339f35416574b7bc7ebf8c93378f653242b..751dfb93d39b9e066b8c2c0aabdebb5581606e12 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -409,11 +409,39 @@
|
||||
@@ -124,21 +124,18 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
if (insertTab) {
|
||||
// insert the tab into the tab container in the correct position
|
||||
this._insertTabAtIndex(t, {
|
||||
@@ -2878,6 +2924,13 @@
|
||||
@@ -2878,6 +2924,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ requestAnimationFrame(() => {
|
||||
+ t.setAttribute("zen-initial-fadein", "true");
|
||||
+ setTimeout(() => {
|
||||
+ t.removeAttribute("zen-initial-fadein");
|
||||
+ }, 2000);
|
||||
+ });
|
||||
+ if (typeof window.gZenVerticalTabsManager !== "undefined") {
|
||||
+ gZenVerticalTabsManager.animateTab(t);
|
||||
+ }
|
||||
+
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this._notifyPinnedStatus(t);
|
||||
@@ -3389,6 +3442,23 @@
|
||||
@@ -3389,6 +3439,23 @@
|
||||
) {
|
||||
tabWasReused = true;
|
||||
tab = this.selectedTab;
|
||||
@@ -162,7 +159,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
if (!tabData.pinned) {
|
||||
this.unpinTab(tab);
|
||||
} else {
|
||||
@@ -3402,6 +3472,9 @@
|
||||
@@ -3402,6 +3469,9 @@
|
||||
restoreTabsLazily && !select && !tabData.pinned;
|
||||
|
||||
let url = "about:blank";
|
||||
@@ -172,7 +169,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
if (tabData.entries?.length) {
|
||||
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
||||
// Ensure the index is in bounds.
|
||||
@@ -3438,6 +3511,21 @@
|
||||
@@ -3438,6 +3508,21 @@
|
||||
preferredRemoteType,
|
||||
});
|
||||
|
||||
@@ -194,7 +191,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -3491,7 +3579,6 @@
|
||||
@@ -3491,7 +3576,6 @@
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
}
|
||||
}
|
||||
@@ -202,7 +199,16 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
tab.initialize();
|
||||
}
|
||||
|
||||
@@ -4070,6 +4157,10 @@
|
||||
@@ -3715,7 +3799,7 @@
|
||||
// Ensure we have an index if one was not provided.
|
||||
if (typeof index != "number") {
|
||||
// Move the new tab after another tab if needed, to the end otherwise.
|
||||
- index = Infinity;
|
||||
+ index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this.pinnedTabCount : Infinity;
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -4070,6 +4154,10 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -213,7 +219,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
this.removeTabs(selectedTabs);
|
||||
}
|
||||
|
||||
@@ -4389,6 +4480,13 @@
|
||||
@@ -4389,6 +4477,13 @@
|
||||
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||
}
|
||||
|
||||
@@ -227,18 +233,19 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
// Handle requests for synchronously removing an already
|
||||
// asynchronously closing tab.
|
||||
if (!animate && aTab.closing) {
|
||||
@@ -4404,6 +4502,10 @@
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
|
||||
@@ -4417,7 +4512,10 @@
|
||||
TelemetryStopwatch.cancel("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||
return;
|
||||
}
|
||||
-
|
||||
+ if (aTab.hasAttribute("zen-glance-tab")) {
|
||||
+ gZenGlanceManager.closeGlance();
|
||||
+ return;
|
||||
+ }
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -4556,14 +4658,14 @@
|
||||
let lockTabSizing =
|
||||
!this.tabContainer.verticalMode &&
|
||||
!aTab.pinned &&
|
||||
@@ -4556,14 +4654,14 @@
|
||||
!!this.tabsInCollapsedTabGroups.length;
|
||||
if (
|
||||
aTab.visible &&
|
||||
@@ -255,7 +262,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -5411,10 +5513,10 @@
|
||||
@@ -5411,10 +5509,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -268,7 +275,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -7384,6 +7486,7 @@
|
||||
@@ -7384,6 +7482,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -276,7 +283,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
gBrowser.syncThrobberAnimations(this.mTab);
|
||||
@@ -8344,7 +8447,7 @@ var TabContextMenu = {
|
||||
@@ -8344,7 +8443,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !multiselectionContext;
|
||||
@@ -285,7 +292,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
// Move Tab items
|
||||
let contextMoveTabOptions = document.getElementById(
|
||||
"context_moveTabOptions"
|
||||
@@ -8378,7 +8481,7 @@ var TabContextMenu = {
|
||||
@@ -8378,7 +8477,7 @@ var TabContextMenu = {
|
||||
let contextMoveTabToStart = document.getElementById("context_moveToStart");
|
||||
let isFirstTab =
|
||||
tabsToMove[0] == visibleTabs[0] ||
|
||||
@@ -294,7 +301,7 @@ index ce68c339f35416574b7bc7ebf8c93378f653242b..ceb292dd9939bd9db12b00673f0c3d54
|
||||
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
|
||||
|
||||
document.getElementById("context_openTabInWindow").disabled =
|
||||
@@ -8607,6 +8710,7 @@ var TabContextMenu = {
|
||||
@@ -8607,6 +8706,7 @@ var TabContextMenu = {
|
||||
if (this.contextTab.multiselected) {
|
||||
gBrowser.removeMultiSelectedTabs();
|
||||
} else {
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..f578fe9da3c502289c6a3e3a0ba17de6e747e80f 100644
|
||||
index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..15b9e83426ead9efcbe6d2b72f3f00c08b06e884 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -94,7 +94,7 @@
|
||||
return this.hasAttribute("positionpinnedtabs");
|
||||
};
|
||||
this.arrowScrollbox._canScrollToElement = tab => {
|
||||
- return (!tab.pinned || !arePositioningPinnedTabs()) && tab.visible;
|
||||
+ return (!tab.hasAttribute("zen-essential") || !arePositioningPinnedTabs()) && tab.visible;
|
||||
};
|
||||
|
||||
// Override for performance reasons. This is the size of a single element
|
||||
@@ -352,7 +352,7 @@
|
||||
// and we're not hitting the scroll buttons.
|
||||
if (
|
||||
event.button != 0 ||
|
||||
- event.target != this.arrowScrollbox ||
|
||||
+ event.target != this ||
|
||||
event.composedTarget.localName == "toolbarbutton"
|
||||
) {
|
||||
return;
|
||||
@@ -649,7 +649,7 @@
|
||||
if (this.#isContainerVerticalPinnedExpanded(tab)) {
|
||||
// In expanded vertical mode, the max number of pinned tabs per row is dynamic
|
||||
@@ -118,7 +136,8 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..f578fe9da3c502289c6a3e3a0ba17de6
|
||||
- let numPinned = gBrowser.pinnedTabCount;
|
||||
+ let numPinned = gBrowser._numVisiblePinTabs;
|
||||
|
||||
if (gBrowser.pinnedTabCount !== verticalTabsContainer.children.length) {
|
||||
- if (gBrowser.pinnedTabCount !== verticalTabsContainer.children.length) {
|
||||
+ if (gBrowser.pinnedTabCount !== (verticalTabsContainer.children.length + document.getElementById("zen-essentials-container").children.length)) {
|
||||
let tabs = this.visibleTabs;
|
||||
for (let i = 0; i < numPinned; i++) {
|
||||
tabs[i].style.marginInlineStart = "";
|
||||
@@ -180,6 +199,15 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..f578fe9da3c502289c6a3e3a0ba17de6
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2708,7 +2711,7 @@
|
||||
}
|
||||
|
||||
_notifyBackgroundTab(aTab) {
|
||||
- if (aTab.pinned || !aTab.visible || !this.overflowing) {
|
||||
+ if (aTab.hasAttribute("zen-essential") || !aTab.visible || !this.overflowing) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2726,12 +2729,14 @@
|
||||
selectedTab = {
|
||||
left: selectedTab.left,
|
||||
|
||||
@@ -39,7 +39,7 @@ body {
|
||||
#welcome .zen-branding-title,
|
||||
#thanks .zen-branding-title {
|
||||
text-align: center;
|
||||
font-size: 9rem;
|
||||
font-size: 7rem;
|
||||
}
|
||||
|
||||
#buttons-footer {
|
||||
@@ -62,11 +62,6 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
body:has(#welcome:not([hidden='true'])) {
|
||||
background: var(--zen-branding-coral);
|
||||
color: var(--zen-branding-paper);
|
||||
}
|
||||
|
||||
body:has(:is(#welcome, #thanks):not([hidden='true'])) {
|
||||
& #buttons-footer {
|
||||
justify-content: center;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/themes/shared/identity-block/identity-block.css b/browser/themes/shared/identity-block/identity-block.css
|
||||
index cb6bb55dd3aebdaebb92c9e2cba1f2a108b4d7bb..9d5055a007c63cb779e67ae58a1d937ad2a31bfe 100644
|
||||
index 11ff8f62c9e40fd2f523387a4325518f383f5d11..d6563e2ddf963caa34bee716c42f9d440c327b61 100644
|
||||
--- a/browser/themes/shared/identity-block/identity-block.css
|
||||
+++ b/browser/themes/shared/identity-block/identity-block.css
|
||||
@@ -70,7 +70,7 @@
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button,
|
||||
#urlbar-label-box {
|
||||
@@ -11,12 +11,13 @@ index cb6bb55dd3aebdaebb92c9e2cba1f2a108b4d7bb..9d5055a007c63cb779e67ae58a1d937a
|
||||
color: var(--urlbar-box-text-color);
|
||||
padding-inline: 8px;
|
||||
border-radius: var(--urlbar-icon-border-radius);
|
||||
@@ -164,16 +164,16 @@
|
||||
@@ -174,16 +174,17 @@
|
||||
}
|
||||
|
||||
#identity-icon {
|
||||
- list-style-image: url(chrome://global/skin/icons/search-glass.svg);
|
||||
+ list-style-image: url(chrome://global/skin/icons/search-glass.svg) !important;
|
||||
+ fill-opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
13
src/browser/themes/shared/tabbrowser/content-area-css.patch
Normal file
13
src/browser/themes/shared/tabbrowser/content-area-css.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css
|
||||
index 5c721ee07f0be1318a50cb381ddf59550a04d496..fa2d21687dd8ea7dd03fb4cc2952fe783782a955 100644
|
||||
--- a/browser/themes/shared/tabbrowser/content-area.css
|
||||
+++ b/browser/themes/shared/tabbrowser/content-area.css
|
||||
@@ -237,7 +237,7 @@
|
||||
|
||||
.dialogStack {
|
||||
z-index: var(--browser-stack-z-index-dialog-stack);
|
||||
- position: absolute;
|
||||
+ position: fixed;
|
||||
inset: 0;
|
||||
|
||||
/* Hide tab-modal dialogs when a window-modal one is up. */
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
|
||||
index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78dcee7424 100644
|
||||
index e5adf8c853bc6f92d1f5aae6398bb979a114b4fd..8d0783f8a23fabdfe90e5b9136e16a962b35dd5e 100644
|
||||
--- a/browser/themes/shared/tabbrowser/tabs.css
|
||||
+++ b/browser/themes/shared/tabbrowser/tabs.css
|
||||
@@ -26,7 +26,7 @@
|
||||
@@ -31,7 +31,7 @@
|
||||
--tab-icon-overlay-fill: light-dark(white, black);
|
||||
--tab-icon-overlay-stroke: light-dark(black, white);
|
||||
--tab-label-line-height: 1.7;
|
||||
@@ -11,7 +11,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
--tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent);
|
||||
--tab-selected-textcolor: var(--toolbar-color);
|
||||
--tab-selected-bgcolor: var(--toolbar-bgcolor);
|
||||
@@ -145,8 +145,7 @@
|
||||
@@ -205,8 +205,7 @@
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > &[pinned] {
|
||||
@@ -21,7 +21,15 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[movingtab] &:is([selected], [multiselected]) {
|
||||
@@ -498,14 +497,14 @@
|
||||
@@ -250,6 +249,7 @@
|
||||
border-radius: inherit;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
+ display: none;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
@@ -573,14 +573,14 @@
|
||||
}
|
||||
|
||||
&[textoverflow] {
|
||||
@@ -40,7 +48,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
direction: rtl;
|
||||
mask-image: linear-gradient(to right, transparent, black var(--tab-label-mask-size));
|
||||
}
|
||||
@@ -863,7 +862,7 @@ tab-group {
|
||||
@@ -1069,7 +1069,7 @@ tab-group {
|
||||
margin-inline: var(--tab-inner-inline-margin);
|
||||
|
||||
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
|
||||
@@ -49,7 +57,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@@ -1052,7 +1051,7 @@ tab-group {
|
||||
@@ -1283,7 +1283,7 @@ tab-group {
|
||||
toolbarbutton:not(#firefox-view-button),
|
||||
toolbarpaletteitem:not(#wrapper-firefox-view-button)
|
||||
) ~ #tabbrowser-tabs {
|
||||
@@ -58,7 +66,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
padding-inline-start: calc(var(--tab-overflow-pinned-tabs-width) + 2px);
|
||||
margin-inline-start: 2px;
|
||||
}
|
||||
@@ -1087,7 +1086,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
|
||||
@@ -1318,7 +1318,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
|
||||
list-style-image: url(chrome://global/skin/icons/plus.svg);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
diff --git a/browser/themes/shared/toolbarbuttons.css b/browser/themes/shared/toolbarbuttons.css
|
||||
index ca1d70b515f17922c3625e38e2110368ad0de652..22cb71fb3d254edf46a73c4308a0e136002f203a 100644
|
||||
index ca1d70b515f17922c3625e38e2110368ad0de652..3ac05678b10f054d16093a225eb93bb8ed26a116 100644
|
||||
--- a/browser/themes/shared/toolbarbuttons.css
|
||||
+++ b/browser/themes/shared/toolbarbuttons.css
|
||||
@@ -210,7 +210,7 @@ toolbar[brighttext] .toolbaritem-combined-buttons > separator {
|
||||
#nav-bar-overflow-button {
|
||||
list-style-image: url("chrome://global/skin/icons/chevron.svg");
|
||||
|
||||
- #nav-bar:not([overflowing], [nonemptyoverflow], [customizing]) > & {
|
||||
+ toolbar:not([overflowing], [nonemptyoverflow], [customizing]) > & {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ toolbarbutton.bookmark-item:not(.subviewbutton) {
|
||||
*/
|
||||
align-items: stretch;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
|
||||
index c63a259a51c4862bc8f73eabdc5730bfe2f28da4..f9b8431071e73ce55972c12354ed44bc3a4df9c0 100644
|
||||
index 5c5992d7b32e4c16d6a92815ca6fd54e8fcec824..6c8e67e36f02b578c800fa460868135afb73c66b 100644
|
||||
--- a/modules/libpref/init/StaticPrefList.yaml
|
||||
+++ b/modules/libpref/init/StaticPrefList.yaml
|
||||
@@ -17651,7 +17651,7 @@
|
||||
@@ -17810,7 +17810,7 @@
|
||||
# Whether we use the mica backdrop. Off by default for now.
|
||||
- name: widget.windows.mica
|
||||
type: bool
|
||||
@@ -11,3 +11,23 @@ index c63a259a51c4862bc8f73eabdc5730bfe2f28da4..f9b8431071e73ce55972c12354ed44bc
|
||||
mirror: once
|
||||
#endif
|
||||
|
||||
@@ -17923,6 +17923,19 @@
|
||||
mirror: always
|
||||
#endif
|
||||
|
||||
+# Dummy pref to always generate StaticPrefs_zen.h in every OS
|
||||
+- name: zen.browser.is-cool
|
||||
+ type: bool
|
||||
+ value: true
|
||||
+ mirror: never
|
||||
+
|
||||
+#ifdef XP_MACOSX
|
||||
+- name: zen.widget.mac.mono-window-controls
|
||||
+ type: RelaxedAtomicBool
|
||||
+ value: false
|
||||
+ mirror: always
|
||||
+#endif
|
||||
+
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "zoom."
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
12
src/modules/libpref/moz-build.patch
Normal file
12
src/modules/libpref/moz-build.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
|
||||
index 4e582caaa58884b27be20c45e4c39b0b841261ef..f8ce17a33f20380b3f56a3774e043b9fba849977 100644
|
||||
--- a/modules/libpref/moz.build
|
||||
+++ b/modules/libpref/moz.build
|
||||
@@ -93,6 +93,7 @@ pref_groups = [
|
||||
"view_source",
|
||||
"webgl",
|
||||
"widget",
|
||||
+ "zen",
|
||||
"zoom",
|
||||
]
|
||||
if CONFIG["OS_TARGET"] == "Android":
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/security/mac/hardenedruntime/v2/production/firefox.browser.xml b/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||
index abbf33e9d2b3c9d1e0a34bd46e7cd289c435533b..4d988ca8201fa6aba6ca049e97d3cdc6b772b5eb 100644
|
||||
--- a/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||
+++ b/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<!-- Required for com.apple.developer.web-browser.public-key-credential -->
|
||||
<key>com.apple.application-identifier</key>
|
||||
- <string>43AQ936H96.org.mozilla.firefox</string>
|
||||
+ <string>H36NPCN86W.app.zen-browser.zen</string>
|
||||
|
||||
<!-- For platform passkey (webauthn) support -->
|
||||
<key>com.apple.developer.web-browser.public-key-credential</key><true/>
|
||||
21
src/toolkit/content/widgets/arrowscrollbox-js.patch
Normal file
21
src/toolkit/content/widgets/arrowscrollbox-js.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff --git a/toolkit/content/widgets/arrowscrollbox.js b/toolkit/content/widgets/arrowscrollbox.js
|
||||
index 328c770d275ebbaada8a44438eaf738b1a62d985..95460108c6356408170b8a4a40d55a8f0621756b 100644
|
||||
--- a/toolkit/content/widgets/arrowscrollbox.js
|
||||
+++ b/toolkit/content/widgets/arrowscrollbox.js
|
||||
@@ -98,6 +98,7 @@
|
||||
|
||||
let slot = this.shadowRoot.querySelector("slot");
|
||||
let overflowObserver = new ResizeObserver(_ => {
|
||||
+ if (this.id == 'tabbrowser-arrowscrollbox') return; // zen: do NOT underflow/overflow on tabbrowser-arrowscrollbox
|
||||
let contentSize =
|
||||
slot.getBoundingClientRect()[this.#verticalMode ? "height" : "width"];
|
||||
// NOTE(emilio): This should be contentSize > scrollClientSize, but due
|
||||
@@ -639,7 +640,7 @@
|
||||
|
||||
on_wheel(event) {
|
||||
// Don't consume the event if we can't scroll.
|
||||
- if (!this.overflowing) {
|
||||
+ if (!this.overflowing || this.id === 'tabbrowser-arrowscrollbox') { // we handle this on ZenStartup
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
|
||||
index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..b1dd5bd9c28c95c69486b9803c76279af01459bd 100644
|
||||
index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..dcada8742c5ea147d2378357c86c9a8b7dc639db 100644
|
||||
--- a/toolkit/moz.configure
|
||||
+++ b/toolkit/moz.configure
|
||||
@@ -81,10 +81,13 @@ option(
|
||||
@@ -39,14 +39,3 @@ index 9c3bb513537f1efc44788fc3efb9f7561eca9c0e..b1dd5bd9c28c95c69486b9803c76279a
|
||||
|
||||
|
||||
option(
|
||||
@@ -3535,8 +3538,8 @@ with only_when(compile_environment):
|
||||
@depends(target)
|
||||
def default_user_appdir(target):
|
||||
if target.kernel in ("WINNT", "Darwin"):
|
||||
- return "Mozilla"
|
||||
- return ".mozilla"
|
||||
+ return "Zen"
|
||||
+ return ".zen"
|
||||
|
||||
option(
|
||||
"--with-user-appdir",
|
||||
|
||||
29
src/tools/signing/macos/mach_commands-py.patch
Normal file
29
src/tools/signing/macos/mach_commands-py.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
diff --git a/tools/signing/macos/mach_commands.py b/tools/signing/macos/mach_commands.py
|
||||
index a513ad723805459c194d27b42dac68e9babba468..be74acbfe16a4eb389bc7d0ba32820b82fe2819c 100644
|
||||
--- a/tools/signing/macos/mach_commands.py
|
||||
+++ b/tools/signing/macos/mach_commands.py
|
||||
@@ -37,7 +37,6 @@ from mozbuild.base import MachCommandConditions as conditions
|
||||
"Release channel entitlements, but the configuration used will be the "
|
||||
"Release configuration as defined in the repo working directory, not the "
|
||||
"configuration from the revision of the earlier 120 build.",
|
||||
- conditions=[conditions.is_firefox],
|
||||
)
|
||||
@CommandArgument(
|
||||
"-v",
|
||||
@@ -342,6 +341,7 @@ def macos_sign(
|
||||
cs_reset_cmd = ["find", app, "-exec", "codesign", "--remove-signature", "{}", ";"]
|
||||
run(command_context, cs_reset_cmd, capture_output=not verbose_arg)
|
||||
|
||||
+ run(command_context, ["mv", "./embedded.provisionprofile", os.path.join(app, "Contents")], capture_output=not verbose_arg)
|
||||
if use_rcodesign_arg is True:
|
||||
sign_with_rcodesign(
|
||||
command_context,
|
||||
@@ -567,7 +567,7 @@ def sign_with_rcodesign(
|
||||
# input path and its options are specified as standard arguments.
|
||||
ctx.log(logging.INFO, "macos-sign", {}, "Signing with rcodesign")
|
||||
|
||||
- cs_cmd = ["rcodesign", "sign"]
|
||||
+ cs_cmd = ["rcodesign", "sign", "--for-notarization"]
|
||||
if p12_file_arg is not None:
|
||||
cs_cmd.append("--p12-file")
|
||||
cs_cmd.append(p12_file_arg)
|
||||
27
src/widget/cocoa/nsCocoaWindow-mm.patch
Normal file
27
src/widget/cocoa/nsCocoaWindow-mm.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
|
||||
index f1c87dd8faef8c6caf9248ce7d9f40c12f5db9f6..f5280b8fc6cf46d3941d1ff04835b12dd2755170 100644
|
||||
--- a/widget/cocoa/nsCocoaWindow.mm
|
||||
+++ b/widget/cocoa/nsCocoaWindow.mm
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "mozilla/ScopeExit.h"
|
||||
#include "mozilla/StaticPrefs_gfx.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
+#include "mozilla/StaticPrefs_zen.h"
|
||||
#include "mozilla/WritingModes.h"
|
||||
#include "mozilla/layers/CompositorBridgeChild.h"
|
||||
#include "mozilla/widget/Screen.h"
|
||||
@@ -682,9 +683,11 @@ static unsigned int WindowMaskForBorderStyle(BorderStyle aBorderStyle) {
|
||||
continue;
|
||||
}
|
||||
NSWindow* win = ancestor->GetCocoaWindow();
|
||||
- [[win standardWindowButton:NSWindowCloseButton] setEnabled:!aModal];
|
||||
- [[win standardWindowButton:NSWindowMiniaturizeButton] setEnabled:!aModal];
|
||||
- [[win standardWindowButton:NSWindowZoomButton] setEnabled:!aModal];
|
||||
+
|
||||
+ auto zenBtnEnabled = StaticPrefs::zen_widget_mac_mono_window_controls() ? false : !aModal;
|
||||
+ [[win standardWindowButton:NSWindowCloseButton] setEnabled:zenBtnEnabled];
|
||||
+ [[win standardWindowButton:NSWindowMiniaturizeButton] setEnabled:zenBtnEnabled];
|
||||
+ [[win standardWindowButton:NSWindowZoomButton] setEnabled:zenBtnEnabled];
|
||||
}
|
||||
if (aModal) {
|
||||
mWindow.level = NSModalPanelWindowLevel;
|
||||
10
surfer.json
10
surfer.json
@@ -5,8 +5,8 @@
|
||||
"binaryName": "zen",
|
||||
"version": {
|
||||
"product": "firefox",
|
||||
"version": "134.0.1",
|
||||
"candidate": "134.0.1"
|
||||
"version": "134.0.2",
|
||||
"candidate": "134.0.2"
|
||||
},
|
||||
"buildOptions": {
|
||||
"generateBranding": true
|
||||
@@ -19,7 +19,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.7b",
|
||||
"displayVersion": "1.7.3b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
@@ -39,7 +39,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Twilight",
|
||||
"release": {
|
||||
"displayVersion": "1.7t",
|
||||
"displayVersion": "1.7.2t",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
}
|
||||
@@ -53,4 +53,4 @@
|
||||
"licenseType": "MPL-2.0"
|
||||
},
|
||||
"updateHostname": "updates.zen-browser.app"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user