Compare commits
131 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5259fa7cbd | ||
|
|
9dd58ce0a4 | ||
|
|
097b7fb262 | ||
|
|
7975494bd6 | ||
|
|
fd9a754209 | ||
|
|
c2f4d7cd86 | ||
|
|
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 |
52
.github/workflows/build.yml
vendored
52
.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 }}
|
||||
@@ -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,12 +593,10 @@ 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
|
||||
zen.macos-aarch64.dmg
|
||||
zen.macos-universal.dmg
|
||||
|
||||
prepare-flatpak:
|
||||
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -129,6 +129,7 @@ Zen couldn't be in its current state without the help of these amazing projects!
|
||||
|
||||
- Zen's default preferences are based on [BetterFox](https://github.com/yokoffing/Betterfox)
|
||||
- Gradient image extracted from [Arc Palette](https://github.com/neurokitti/Arc_Palette)
|
||||
- `icons.css` has been modified from [Edge Firefox](https://github.com/bmFtZQ/edge-frfox) (MIT licensed file).
|
||||
|
||||
### 🖥️ Comparison with other browsers
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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
|
||||
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
@@ -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}")
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ pref('zen.theme.gradient', 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);
|
||||
@@ -142,6 +142,9 @@ 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);
|
||||
@@ -167,7 +170,7 @@ 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);
|
||||
@@ -190,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);
|
||||
@@ -199,7 +202,7 @@ 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);
|
||||
|
||||
@@ -126,7 +126,7 @@ export var ZenCustomizableUI = new (class {
|
||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons'));
|
||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper'));
|
||||
window.addEventListener(
|
||||
'MozAfterPaint',
|
||||
'DOMContentLoaded',
|
||||
() => {
|
||||
this._dispatchResizeEvent(window);
|
||||
},
|
||||
|
||||
@@ -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();
|
||||
@@ -86,6 +82,35 @@
|
||||
}
|
||||
},
|
||||
|
||||
_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;
|
||||
|
||||
window.requestAnimationFrame(() => {
|
||||
tabContainer.arrowScrollbox.toggleAttribute('overflowing', overflowing);
|
||||
tabContainer.arrowScrollbox.dispatchEvent(new CustomEvent(overflowing ? 'overflow' : 'underflow'));
|
||||
});
|
||||
});
|
||||
observer.observe(tabsWrapper);
|
||||
},
|
||||
|
||||
_initSearchBar() {
|
||||
// Only focus the url bar
|
||||
gURLBar.focus();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
var gZenUIManager = {
|
||||
_popupTrackingElements: [],
|
||||
_hoverPausedForExpand: false,
|
||||
_hasLoadedDOM: false,
|
||||
|
||||
init() {
|
||||
document.addEventListener('popupshowing', this.onPopupShowing.bind(this));
|
||||
@@ -13,7 +14,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 +23,37 @@ var gZenUIManager = {
|
||||
this.sidebarHeightThrottle
|
||||
)
|
||||
).observe(document.getElementById('navigator-toolbox'));
|
||||
|
||||
SessionStore.promiseAllWindowsRestored.then(() => {
|
||||
this._hasLoadedDOM = true;
|
||||
});
|
||||
|
||||
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 +131,7 @@ var gZenUIManager = {
|
||||
var gZenVerticalTabsManager = {
|
||||
init() {
|
||||
this._multiWindowFeature = new ZenMultiWindowFeature();
|
||||
this._initWaitPromise();
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, 'isWindowsStyledButtons', () => {
|
||||
return !(
|
||||
@@ -135,8 +149,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);
|
||||
@@ -202,6 +217,45 @@ var gZenVerticalTabsManager = {
|
||||
return this.__topButtonsSeparatorElement;
|
||||
},
|
||||
|
||||
animateTab(aTab) {
|
||||
if (!gZenUIManager.motion || !aTab || !gZenUIManager._hasLoadedDOM) {
|
||||
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) {
|
||||
@@ -243,6 +297,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;
|
||||
@@ -384,7 +463,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) {
|
||||
|
||||
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/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>
|
||||
|
||||
@@ -52,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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
: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-native-inner-radius);
|
||||
position: relative;
|
||||
|
||||
|
||||
@@ -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.4s ease forwards;
|
||||
animation: zen-main-app-wrapper-animation 0.5s ease forwards;
|
||||
transition: 0s;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,7 @@
|
||||
/* All overrides for compact mode go here */
|
||||
|
||||
:root[zen-compact-mode='true']: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;
|
||||
}
|
||||
%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']) {
|
||||
@@ -234,8 +228,8 @@
|
||||
1.003423 100%
|
||||
);
|
||||
transition:
|
||||
left 0.3125s var(--zen-compact-mode-func),
|
||||
right 0.3125s var(--zen-compact-mode-func);
|
||||
left 0.3s var(--zen-compact-mode-func),
|
||||
right 0.3s var(--zen-compact-mode-func);
|
||||
opacity: 1;
|
||||
|
||||
left: -1px;
|
||||
|
||||
@@ -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,11 +56,6 @@
|
||||
--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']),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -56,6 +56,11 @@ panel {
|
||||
--panel-border-radius: var(--zen-native-inner-radius);
|
||||
}
|
||||
|
||||
/* split-view popup */
|
||||
#confirmation-hint {
|
||||
--arrowpanel-background: var(--zen-colors-primary);
|
||||
}
|
||||
|
||||
/* app menu */
|
||||
.addon-banner-item,
|
||||
.panel-banner-item {
|
||||
|
||||
@@ -83,7 +83,6 @@
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
z-index: 2;
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
border: 1px solid var(--zen-colors-border);
|
||||
background: var(--zen-colors-tertiary);
|
||||
opacity: 0;
|
||||
animation-delay: 0.1s;
|
||||
@@ -108,7 +107,7 @@
|
||||
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;
|
||||
|
||||
@@ -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,11 @@
|
||||
}
|
||||
|
||||
#browser {
|
||||
--zen-toolbox-padding: max(5px, calc(var(--zen-element-separation) / 1.5));
|
||||
--zen-min-toolbox-padding: .4rem;
|
||||
@media (-moz-platform: macos) {
|
||||
--zen-min-toolbox-padding: .52rem;
|
||||
}
|
||||
--zen-toolbox-padding: max(var(--zen-min-toolbox-padding), calc(var(--zen-element-separation) / 1.5));
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
@@ -98,7 +109,7 @@
|
||||
}
|
||||
|
||||
& #nav-bar {
|
||||
margin-bottom: 6px;
|
||||
margin-bottom: var(--zen-toolbox-padding);
|
||||
|
||||
& toolbarspring {
|
||||
display: none;
|
||||
@@ -119,18 +130,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: 12px;
|
||||
--tab-border-radius: 8px;
|
||||
--border-radius-medium: 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 +247,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;
|
||||
|
||||
@@ -249,7 +277,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
&:not([zen-essential='true']):active {
|
||||
&:active {
|
||||
scale: 0.98;
|
||||
}
|
||||
|
||||
@@ -341,11 +369,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;
|
||||
max-height: calc(100vh - 12 * (var(--tab-min-height) + 2 * var(--tab-block-margin))) !important;
|
||||
min-height: fit-content !important;
|
||||
overflow: visible;
|
||||
max-height: unset !important;
|
||||
|
||||
& .tabbrowser-tab:not(:hover) .tab-background:not([selected]):not([multiselected]) {
|
||||
background: transparent !important;
|
||||
@@ -453,10 +489,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;
|
||||
@@ -559,7 +595,6 @@
|
||||
justify-content: center;
|
||||
max-height: unset !important;
|
||||
height: fit-content !important;
|
||||
margin-bottom: var(--zen-element-separation);
|
||||
}
|
||||
& #titlebar {
|
||||
display: grid;
|
||||
@@ -907,7 +942,11 @@
|
||||
--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));
|
||||
|
||||
@@ -938,6 +977,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 {
|
||||
@@ -956,9 +999,9 @@
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
background: light-dark(rgba(255, 255, 255, 0.75), rgba(68, 64, 64, 0.75));
|
||||
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;
|
||||
@@ -968,7 +1011,7 @@
|
||||
}
|
||||
|
||||
&[selected]:hover .tab-background::before {
|
||||
background: light-dark(rgba(255, 255, 255, 0.70), rgba(68, 64, 64, 0.70));
|
||||
background: light-dark(rgba(255, 255, 255, 0.80), rgba(68, 64, 64, 0.80));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
--zen-button-border-radius: 5px;
|
||||
--zen-button-padding: 0.6rem 1.2rem;
|
||||
|
||||
--zen-toolbar-element-bg: light-dark(rgba(0, 0, 0, 0.11), rgba(255, 255, 255, 0.11));
|
||||
--zen-toolbar-element-bg: light-dark(rgba(0, 0, 0, 0.07), rgba(255, 255, 255, 0.11));
|
||||
|
||||
/* Toolbar */
|
||||
--zen-toolbar-height: 38px;
|
||||
@@ -146,10 +146,7 @@
|
||||
--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;
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.urlbar-input::placeholder {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#searchbar:focus-within {
|
||||
border-color: transparent !important;
|
||||
}
|
||||
@@ -28,10 +32,9 @@
|
||||
|
||||
#urlbar-background {
|
||||
background: var(--zen-toolbar-element-bg) !important;
|
||||
border-radius: var(--border-radius-medium);
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
#urlbar-background {
|
||||
border: none !important;
|
||||
margin: 1px;
|
||||
|
||||
@@ -393,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,15 +61,16 @@
|
||||
|
||||
@media not (-moz-bool-pref: 'zen.workspaces.hide-deactivated-workspaces') {
|
||||
& {
|
||||
opacity: 0.4;
|
||||
filter: grayscale(1);
|
||||
opacity: 0.5;
|
||||
transition:
|
||||
opacity 0.2s,
|
||||
filter 0.2s;
|
||||
filter 0.2s,
|
||||
opacity 0.2s;
|
||||
}
|
||||
|
||||
&[active='true'] {
|
||||
filter: none;
|
||||
&[active='true'],
|
||||
&:hover {
|
||||
filter: grayscale(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,13 @@ 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 = {
|
||||
@@ -25,8 +32,6 @@ var gZenCompactModeManager = {
|
||||
init() {
|
||||
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'));
|
||||
|
||||
@@ -144,14 +149,19 @@ var gZenCompactModeManager = {
|
||||
this._animating = true;
|
||||
const isCompactMode = this.preference;
|
||||
const canHideSidebar = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar');
|
||||
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._animating = false;
|
||||
return;
|
||||
}
|
||||
if (canHideSidebar && isCompactMode) {
|
||||
@@ -220,6 +230,7 @@ var gZenCompactModeManager = {
|
||||
});
|
||||
} else {
|
||||
this.sidebar.removeAttribute('animate'); // remove the attribute if we are not animating
|
||||
this._animating = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -330,14 +330,22 @@
|
||||
this._lazyPref.SHOULD_OPEN_EXTERNAL_TABS_IN_GLANCE &&
|
||||
owner.linkedBrowser?.docShellIsActive &&
|
||||
owner.linkedBrowser?.browsingContext?.isAppTab &&
|
||||
this.tabDomainsDiffer(owner, uri)
|
||||
this.tabDomainsDiffer(owner, uri) &&
|
||||
Services.prefs.getBoolPref('zen.glance.enabled', true)
|
||||
);
|
||||
}
|
||||
|
||||
onTabOpen(browser, uri) {
|
||||
let tab = gBrowser.getTabForBrowser(browser);
|
||||
if (this.shouldOpenTabInGlance(tab, uri)) {
|
||||
this.openGlance({ url: undefined, x: 0, y: 0, width: 0, height: 0 }, tab, tab.owner);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -470,7 +470,8 @@
|
||||
this._resetTabToStoredState(selectedTab);
|
||||
}
|
||||
if (behavior.includes('unload')) {
|
||||
gBrowser.discardBrowser(selectedTab);
|
||||
gBrowser.explicitUnloadTabs([selectedTab]);
|
||||
selectedTab.removeAttribute('linkedpanel');
|
||||
}
|
||||
break;
|
||||
case 'reset':
|
||||
@@ -571,6 +572,7 @@
|
||||
gBrowser.pinTab(tab);
|
||||
this.onTabIconChanged(tab);
|
||||
}
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
}
|
||||
|
||||
removeEssentials() {
|
||||
@@ -583,6 +585,7 @@
|
||||
}
|
||||
gBrowser.unpinTab(tab);
|
||||
}
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
}
|
||||
|
||||
_insertItemsIntoTabContextMenu() {
|
||||
|
||||
@@ -11,7 +11,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
cumulativeDelta: 0,
|
||||
direction: null,
|
||||
};
|
||||
_hoveringSidebar = false;
|
||||
_lastScrollTime = 0;
|
||||
bookmarkMenus = [
|
||||
'PlacesToolbar',
|
||||
@@ -114,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;
|
||||
@@ -138,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
|
||||
|
||||
@@ -251,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) {
|
||||
@@ -267,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
|
||||
@@ -1278,10 +1288,29 @@ 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;
|
||||
}
|
||||
|
||||
@@ -1321,35 +1350,41 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
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 selector = `#tabbrowser-tabs *:is(.tabbrowser-tab:not([zen-essential], [hidden]), #tabbrowser-arrowscrollbox-periphery, #zen-current-workspace-indicator)`;
|
||||
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(
|
||||
selector,
|
||||
elements,
|
||||
{
|
||||
transform: `translateX(${direction === 'left' ? '-' : ''}100%)`,
|
||||
opacity: 0,
|
||||
transform: existingTransform ? [existingTransform, newTransform] : newTransform,
|
||||
},
|
||||
{
|
||||
type: 'spring',
|
||||
duration: 0.2,
|
||||
bounce: 0.2,
|
||||
// delay: gZenUIManager.motion.stagger(0.01),
|
||||
bounce: 0,
|
||||
duration: 0.12,
|
||||
}
|
||||
);
|
||||
}
|
||||
return gZenUIManager.motion.animate(
|
||||
selector,
|
||||
elements,
|
||||
{
|
||||
transform: [`translateX(${direction === 'left' ? '-' : ''}100%)`, 'translateX(0%)'],
|
||||
opacity: 1,
|
||||
transform: [`translateX(${direction === 'left' ? '-' : ''}${tabsWidth}px)`, 'translateX(0px)'],
|
||||
},
|
||||
{
|
||||
duration: 0.2,
|
||||
duration: 0.15,
|
||||
type: 'spring',
|
||||
bounce: 0.2,
|
||||
// delay: gZenUIManager.motion.stagger(0.01),
|
||||
bounce: 0,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
|
||||
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..251c3a7fa624057a8eaba5c0c42ef23fe2a6ace3 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, {
|
||||
@@ -143,7 +143,7 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..251c3a7fa624057a8eaba5c0c42ef23f
|
||||
// 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 == 'nav-bar') return { isOverflowing: false, 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 };
|
||||
}
|
||||
@@ -157,3 +157,13 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..251c3a7fa624057a8eaba5c0c42ef23f
|
||||
}
|
||||
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/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;
|
||||
|
||||
13
src/browser/themes/shared/browser-shared-css.patch
Normal file
13
src/browser/themes/shared/browser-shared-css.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
|
||||
index b4854731c08b2f463751bb907cb44130ee6b6d2a..18d96cb457f5e57ed00b4eec6d2702287bfc72c7 100644
|
||||
--- a/browser/themes/shared/browser-shared.css
|
||||
+++ b/browser/themes/shared/browser-shared.css
|
||||
@@ -147,8 +147,6 @@ body {
|
||||
*/
|
||||
&.fullscreen-with-menubar {
|
||||
z-index: var(--browser-area-z-index-toolbox-while-animating);
|
||||
- box-shadow: var(--content-area-shadow);
|
||||
- border-bottom-color: var(--chrome-content-separator-color);
|
||||
}
|
||||
|
||||
/* Themes define a set of toolbox foreground and background colors which we
|
||||
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,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;
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -19,7 +19,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.7.2b",
|
||||
"displayVersion": "1.7.4b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
@@ -39,7 +39,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Twilight",
|
||||
"release": {
|
||||
"displayVersion": "1.7.2t",
|
||||
"displayVersion": "1.7.4t",
|
||||
"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