Compare commits

..

56 Commits

Author SHA1 Message Date
mr. m
902651a196 fix: Fixed including zen design tokens from the dist output, b=no-bug, c=no-component 2026-01-12 22:41:04 +01:00
mr. m
bc24c2b11d feat: Implement a better identified migration system for window sync, b=no-bug, c=glance, mods 2026-01-12 21:07:27 +01:00
mr. m
9fefa6c1ee fix: Correctly initialize new sessions for troubleshooting mode, b=no-bug, c=common 2026-01-12 17:26:00 +01:00
mr. m
368d648b65 test: Remove browser_private_mode_no_essentials.js from the tests list, b=no-bug, c=workflows, tests 2026-01-12 16:39:56 +01:00
mr. m
37eed5fcfe fix: Start working on more eslint rules, p=#11874
* fix: Start working on more eslint rules, b=no-bug, c=common, mods, workspaces

* chore: Continue migration, b=no-bug, c=workflows, windows, glance, mods, welcome, workspaces, common, compact-mode, folders, tests, kbs, media, split-view, tabs

* chore: Finish, b=no-bug, c=common, compact-mode, folders, glance, tests, kbs, media, mods, split-view, tabs, workspaces, welcome

* fix: Fix installing deps, b=no-bug, c=common

* feat: Dont initialize git on download checks, b=no-bug, c=workflows

* feat: Remove empty JS docs, b=no-bug, c=common, compact-mode, folders, glance, kbs, media, mods, split-view, tabs, tests, workspaces

* chore: Run lint, b=no-bug, c=common, folders, glance, kbs, mods, split-view, tabs, workspaces
2026-01-12 15:11:43 +01:00
mr. m
fd82ad95b7 perf: Further optimize having to reflush the document on space switch, b=bug #11851, c=split-view, workspaces 2026-01-12 11:49:21 +01:00
mr. m
21821c31d2 chore: Dont de-init deferred backup tasks when granting quits for PGO tests, b=no-bug, c=no-component 2026-01-11 21:28:06 +01:00
mr. m
0bfac990d2 chore: Dont clear the file on shutdown, b=no-bug, c=no-component 2026-01-11 20:50:03 +01:00
mr. m
bc4443fda9 feat: Make sure to enable animations and spaces when running PGO testings, b=no-bug, c=common, workspaces 2026-01-11 19:37:15 +01:00
mr. m
bea81b0364 feat: Turn off firefox notes by default and change settings styles, b=no-bug, c=no-component 2026-01-11 16:47:36 +01:00
mr. m
a616fc38e7 fix: Make sure to correctly reset the values after animating compact mode, p=#11863
* fix: Make sure to correctly reset the values after animating compact mode, b=no-bug, c=compact-mode
2026-01-10 23:53:23 +01:00
mr. m
e8ad33c0f1 feat: Start making automatic backups for session files, p=#11861
* feat: Start making automatic backups for session files, b=no-bug, c=common

* feat: Allow new links to open in unsynced windows, b=no-bug, c=no-component
2026-01-10 22:24:53 +01:00
mr. m
8d25577bdb fix: Make sure to disable workspace delete when updating context menus, b=no-bug, c=workspaces 2026-01-10 18:48:56 +01:00
Andrey Bochkarev
fc7f10aef1 feat: Add dnd switch support for groups, p=#11854
* feat: Add dnd switch support for groups

* refactor: Use `changeFolderToSpace` for drag-and-drop workspace changes

* refactor: Use optional parameter instead of attribute

* fix: Formatting

* refactor: Move condition inside function

* Refactor tab group handling in drag-and-drop

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>

* feat: Only allow double click rename on labels, b=no-bug, c=common

---------

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
2026-01-10 14:41:28 +01:00
mr. m
44a28e2afe perf: Stop flushing document styles when switching spaces, b=bug #11851, c=glance, workspaces 2026-01-10 13:00:27 +01:00
mr. m
818b2d1af5 chore: Make sure to mark macos unifications as releases, b=no-bug, c=workflows 2026-01-10 12:26:50 +01:00
mr. m
9147e5c10c Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2026-01-10 01:24:26 +01:00
mr. m
d5727a6a1b chore: Clean up build flags to stay more close to firefox defaults, b=no-bug, c=common, configs, windows 2026-01-10 01:24:20 +01:00
rain capsule
6c84a01950 fix: Allow user override of zen.theme.border-radius pref value, p=#11847
* fix: Allow user override of zen.theme.border-radius pref value

* fix: Handle platform-specific zen radius via JS rather than CSS

* lint: border radius js implementation
2026-01-09 17:00:55 +01:00
mr. m
f77249e8e9 fix: Make sure to update cache when swaping docshells, b=bug #11831, c=no-component 2026-01-09 16:52:22 +01:00
mr. m
6bce6f4874 chore: Update SDK version to 26.2 for MacOS artifact builds, b=no-bug, c=workflows, configs 2026-01-09 03:06:31 +01:00
mr. m
0d080ffc38 chore: Specify the new MacOSX SDK dir for artifact builds, b=no-bug, c=configs 2026-01-09 02:49:43 +01:00
mr. m
568607231f Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2026-01-09 02:45:58 +01:00
mr. m
88068613a1 chore: Override minimum MacOS SDK version, b=no-bug, c=workflows 2026-01-09 02:45:52 +01:00
Andrey Bochkarev
1e09b3fb4d feat: Expand pinned section when a tab is pinned, p=#11848 2026-01-09 02:18:10 +01:00
mr. m
4d1e091af6 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2026-01-09 02:17:10 +01:00
mr. m
b22bf7485e feat: Create patches to use MacOS 26.2 SDK version, b=no-bug, c=no-component 2026-01-09 02:16:58 +01:00
Andrey Bochkarev
bcdd9c0567 fix: Fix indentation and activeTabs on new folder tab, p=#11846 2026-01-09 01:38:02 +01:00
mr. m
05b1f52171 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2026-01-09 01:37:49 +01:00
mr. m
edfb427a23 chore: Update MacOS and Windows SDKs, b=no-bug, c=workflows, windows, scripts 2026-01-09 01:37:43 +01:00
Andrey Bochkarev
b7fafdbf02 fix: Unexpected renaming behavior when creating new folders, p=#11843 2026-01-08 23:09:44 +01:00
mr. m
f39faf6638 fix: Fixed closing and reopening zen turning tabs into blank states when having multiple windows, b=bug #11831, c=split-view 2026-01-08 20:48:38 +01:00
mr. m
7e7d860c9e chore: Sync upstream Firefox to version 147.0, p=#11822
* chore: Sync upstream to `Firefox 147.0`

* chore: Continued migration, b=no-bug, c=tests

* chore: Finish migration without testing, b=no-bug, c=scripts, tabs, media, common, split-view

* feat: Finish migration, b=no-bug, c=common, compact-mode, split-view, workspaces

* feat: Finish basic migration, b=no-bug, c=kbs, common, folders

* feat: Update surfer, b=no-bug, c=scripts
2026-01-08 18:06:05 +01:00
Andrey Bochkarev
ae93efef57 fix: Prevent indentation for collapsed workspace, b=closes #11839, p=#11830
* fix: Prevent indentation for collapsed workspace (#11830)

* refactor: Use `activeWorkspaceElement` for collapsed pinned tabs check
2026-01-08 15:25:11 +01:00
mr. m
3c7fb093db feat: Make sure dragged tab does not allow the title to overflow, b=no-bug, c=no-component 2026-01-07 01:05:08 +01:00
mr. m
ec4a55e1f8 chore: Revert linking with ld64 due to big compile times and resource usage, b=no-bug, c=configs 2026-01-07 00:28:56 +01:00
mr. m
b0f3839426 feat: Limit the number of threads when building macos releases, b=no-bug, c=configs 2026-01-06 20:20:38 +01:00
mr. m
a537f0f91d feat: Ignore errors when trying to import external mochitests while trying to sync upstream, b=no-bug, c=workflows 2026-01-06 13:02:03 +01:00
mr. m
11f29c12c5 chore: Install autopep8 for code formatting in the upstream workflow, b=no-bug, c=workflows 2026-01-06 12:53:27 +01:00
mr. m
e7631ce9cc feat: Make sure upstream sync workflow initializes git before downloading, b=no-bug, c=workflows 2026-01-06 12:48:26 +01:00
mr. m
481163a756 feat: Correctly initialize new restored windows, p=#11821
* feat: Correctly initialize new restored windows, b=no-bug, c=no-component

* chore: Experiment with different build flags for optimization and build time, b=no-bug, c=common, configs

* chore: Format, b=no-bug, c=no-component
2026-01-06 12:38:22 +01:00
mr. m
281ec6693d feat: Correctly initialize new restored windows, b=no-bug, c=no-component 2026-01-06 12:35:35 +01:00
mr. m
9820bd5772 test: Started adding tests for window sync, b=no-bug, c=tests, workspaces 2026-01-06 01:23:20 +01:00
mr. m
75f4f0c3e6 feat: Created share files, schemas and prefs, p=#11814, c=no-component 2026-01-05 19:42:01 +01:00
mr. m
591193b748 fix: Correctly restore unsynced windows, b=no-bug, c=workspaces 2026-01-05 19:29:22 +01:00
mr. m
2628ba7dd8 chore: Don't imply MOZ_LD64_KNOWN_GOOD from automation flag, b=no-bug, c=no-component 2026-01-05 18:58:35 +01:00
mr. m
2fd0935bf5 chore: Mark ld64 as known for automated macos builds, b=no-bug, c=configs 2026-01-05 18:37:30 +01:00
mr. m
7683b2675a fix: Fixed title overlapping with essential tabs after unlock, b=closes #11808, c=workspaces 2026-01-05 13:35:43 +01:00
mr. m
ea7024aae4 feat: Start using ld64 for macos builds, b=no-bug, c=configs, compact-mode 2026-01-05 13:31:08 +01:00
mr. m
be8cbce23e fix: Fixed 'focus on' not working on twilight, b=closes #11804, c=no-component 2026-01-05 13:30:16 +01:00
mr. m
9c2b8426a9 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2026-01-05 02:22:53 +01:00
mr. m
beb4f94fd2 chore: Change compile flags for macos to fix potential memory leaks, b=bug #9649, c=configs 2026-01-05 02:22:44 +01:00
Andrey Bochkarev
f39ca33aa5 fix: Correctly identify child active groups for collapsible pins, b=closes https://github.com/zen-browser/desktop/issues/11799, p=#11809, c=folders
* fix: Correctly identify child active groups for `zen-workspace-collapsible-pins` (#11799)

* fix: Formatting
2026-01-04 23:44:13 +01:00
mr. m
7743ad968c fix: Fixed deleting a space when its currently selected, b=no-bug, c=common, workspaces 2026-01-04 23:43:29 +01:00
mr. m
7470df4cf6 feat: Fixed creating new unsynced windows rendering the window blank, b=no-bug, c=common, tabs, workspaces 2026-01-04 19:15:18 +01:00
mr. m
aef8400841 feat: Improved gradient rendering for three colors, b=no-bug, c=workspaces 2026-01-03 23:11:08 +01:00
333 changed files with 16874 additions and 13822 deletions

View File

@@ -15,7 +15,7 @@ fonts
welcome
scripts
workflows
winsign
windows
flatpak
configs
l10n

View File

@@ -3,56 +3,56 @@ policy:
- id: [component]
label:
# Make sure it's in sync with the dropdown in the issue template
- name: 'component: sync'
keys: ['Sync']
- name: 'component: compact-mode'
keys: ['Compact Mode']
- name: 'component: workspaces'
keys: ['Workspaces']
- name: 'component: mods-themes'
keys: ['Mods / Themes']
- name: 'component: bookmarks'
keys: ['Bookmarks']
- name: 'component: glance'
keys: ['Glance']
- name: 'component: url-bar'
keys: ['URL Bar']
- name: 'component: tabs'
keys: ['Tabs']
- name: 'component: settings'
keys: ['Settings']
- name: 'component: privacy'
keys: ['Privacy']
- name: 'component: split-view'
keys: ['Split View']
- name: 'component: performance'
keys: ['Performance']
- name: 'component: media-controller'
keys: ['Media Controler']
- name: 'component: tab-unloading'
keys: ['Tab unloading']
- name: 'component: tab-folders'
keys: ['Tab Folders']
- name: 'component: keyboard-shortcuts'
keys: ['Keyboard Shortcuts']
- name: 'component: security'
keys: ['Security']
- name: 'component: extensions'
keys: ['Extensions']
- name: 'component: customizable-ui-toolbars'
keys: ['Customizable UI / Toolbars']
- name: 'component: localization'
keys: ['Localization']
- name: 'component: other'
keys: ['Other']
- name: "component: sync"
keys: ["Sync"]
- name: "component: compact-mode"
keys: ["Compact Mode"]
- name: "component: workspaces"
keys: ["Workspaces"]
- name: "component: mods-themes"
keys: ["Mods / Themes"]
- name: "component: bookmarks"
keys: ["Bookmarks"]
- name: "component: glance"
keys: ["Glance"]
- name: "component: url-bar"
keys: ["URL Bar"]
- name: "component: tabs"
keys: ["Tabs"]
- name: "component: settings"
keys: ["Settings"]
- name: "component: privacy"
keys: ["Privacy"]
- name: "component: split-view"
keys: ["Split View"]
- name: "component: performance"
keys: ["Performance"]
- name: "component: media-controller"
keys: ["Media Controler"]
- name: "component: tab-unloading"
keys: ["Tab unloading"]
- name: "component: tab-folders"
keys: ["Tab Folders"]
- name: "component: keyboard-shortcuts"
keys: ["Keyboard Shortcuts"]
- name: "component: security"
keys: ["Security"]
- name: "component: extensions"
keys: ["Extensions"]
- name: "component: customizable-ui-toolbars"
keys: ["Customizable UI / Toolbars"]
- name: "component: localization"
keys: ["Localization"]
- name: "component: other"
keys: ["Other"]
- id: [platform]
block-list: ['Other']
block-list: ["Other"]
label:
# Make sure it's in sync with the dropdown in the issue template
- name: 'platform: linux'
keys: ['Linux (AppImage)', 'Linux (Flatpak)', 'Linux (Tarball)']
- name: 'platform: macOS'
keys: ['macOS - aarch64', 'macOS - Intel']
- name: 'platform: windows'
keys: ['Windows - x64', 'Windows - aarch64']
- name: "platform: linux"
keys: ["Linux (AppImage)", "Linux (Flatpak)", "Linux (Tarball)"]
- name: "platform: macOS"
keys: ["macOS - aarch64", "macOS - Intel"]
- name: "platform: windows"
keys: ["Windows - x64", "Windows - aarch64"]

View File

@@ -4,49 +4,49 @@ on:
workflow_dispatch:
inputs:
create_release:
description: 'Create a new release for this build'
description: "Create a new release for this build"
required: false
default: false
type: 'boolean'
type: "boolean"
update_version:
description: 'Update the version number'
description: "Update the version number"
required: false
default: false
type: 'boolean'
type: "boolean"
update_branch:
description: 'Update branch with new version'
description: "Update branch with new version"
required: true
default: 'release'
type: 'choice'
default: "release"
type: "choice"
options:
- 'release'
- 'twilight'
- "release"
- "twilight"
use-sccache:
description: 'Use sccache'
description: "Use sccache"
required: true
type: 'boolean'
type: "boolean"
default: false
workflow_call:
inputs:
create_release:
description: 'Create a new release for this build'
description: "Create a new release for this build"
required: false
default: false
type: 'boolean'
type: "boolean"
update_version:
description: 'Update the version number'
description: "Update the version number"
required: false
default: false
type: 'boolean'
type: "boolean"
update_branch:
description: 'Update branch with new version'
description: "Update branch with new version"
required: true
default: 'release'
type: 'string'
default: "release"
type: "string"
use-sccache:
description: 'Use sccache'
description: "Use sccache"
required: true
type: 'boolean'
type: "boolean"
default: false
jobs:
@@ -142,7 +142,7 @@ jobs:
- name: Setup Node.js
uses: useblacksmith/setup-node@v5
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Install dependencies
run: |
@@ -202,7 +202,7 @@ jobs:
- name: Setup Node.js
uses: useblacksmith/setup-node@v5
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Install dependencies
run: |
@@ -244,7 +244,7 @@ jobs:
- name: Setup Node.js
uses: useblacksmith/setup-node@v5
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Setup Git
run: |
@@ -379,7 +379,7 @@ jobs:
- name: Setup Node.js
uses: useblacksmith/setup-node@v5
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Install dependencies
run: |
@@ -565,8 +565,8 @@ jobs:
./zen.installer.exe/*
./zen.installer-arm64.exe/*
./zen.macos-universal.dmg/*
tag_name: 'twilight'
name: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})'
tag_name: "twilight"
name: "Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})"
draft: false
generate_release_notes: false
prerelease: true
@@ -584,7 +584,7 @@ jobs:
prerelease: false
fail_on_unmatched_files: false
generate_release_notes: false
name: 'Release build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})'
name: "Release build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})"
body_path: release_notes.md
files: |
./zen.source.tar.zst/*
@@ -656,7 +656,7 @@ jobs:
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[release]: Update Flatpak manifest'
commit_message: "[release]: Update Flatpak manifest"
commit_user_name: Zen Browser Robot
commit_user_email: zen-browser-auto@users.noreply.github.com
repository: ./flatpak

View File

@@ -2,7 +2,7 @@ name: Check Firefox Candidate Release
on:
schedule:
- cron: '59 4 * * 2'
- cron: "59 4 * * 2"
workflow_dispatch:
permissions:

View File

@@ -5,9 +5,6 @@ on:
branches:
- dev
workflow_call:
pull_request:
branches:
- dev
permissions:
contents: read
@@ -25,7 +22,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Setup and run autopep8
if: ${{ contains(join(github.event.commits.*.modified, ' '), '.py') || contains(join(github.event.commits.*.added, ' '), '.py') || contains(join(github.event.commits.*.removed, ' '), '.py') }}
@@ -36,5 +33,11 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Download Firefox
env:
ZEN_DOWNLOAD_DONT_INIT_GIT: "1"
run: |
npm run download
- name: Lint
run: npm run lint

View File

@@ -5,7 +5,7 @@ permissions:
on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'
- cron: "3 2 1 * *"
jobs:
build:
@@ -47,7 +47,7 @@ jobs:
GH_TOKEN: ${{ secrets.DEPLOY_KEY }}
HIDE_AUTHOR: true
HIDE_TIME_TO_ANSWER: true
SEARCH_QUERY: 'repo:zen-browser/desktop is:issue created:${{ env.last_month }}'
SEARCH_QUERY: "repo:zen-browser/desktop is:issue created:${{ env.last_month }}"
- name: Move metrics to docs folder
run: |
@@ -62,6 +62,6 @@ jobs:
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'docs: Update monthly issue metrics, b=(no bug), c={docs}'
commit_message: "docs: Update monthly issue metrics, b=(no bug), c={docs}"
commit_user_name: Zen Browser Robot
commit_user_email: zen-browser-auto@users.noreply.github.com

View File

@@ -4,19 +4,19 @@ on:
workflow_call:
inputs:
build-version:
description: 'The version to build'
description: "The version to build"
required: true
type: string
release-branch:
description: 'The branch to build'
description: "The branch to build"
required: true
type: string
MOZ_BUILD_DATE:
type: string
required: true
default: ''
default: ""
use-sccache:
description: 'Use sccache'
description: "Use sccache"
required: true
type: boolean
default: false
@@ -53,7 +53,7 @@ jobs:
- name: Setup Node.js
uses: useblacksmith/setup-node@v5
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@main

View File

@@ -6,19 +6,19 @@ on:
workflow_call:
inputs:
build-version:
description: 'The version to build'
description: "The version to build"
required: true
type: string
release-branch:
description: 'The branch to build'
description: "The branch to build"
required: true
type: string
MOZ_BUILD_DATE:
type: string
required: true
default: ''
default: ""
use-sccache:
description: 'Use sccache'
description: "Use sccache"
required: true
type: boolean
default: false
@@ -47,7 +47,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@main
@@ -126,8 +126,9 @@ jobs:
export SURFER_PLATFORM="darwin"
export PATH="$(python3 -m site --user-base)/bin":$PATH
# Always exist with 0, even if bootstrap fails
./mach --no-interactive bootstrap --application-choice browser --no-system-changes --exclude macos-sdk || true
./mach --no-interactive bootstrap --application-choice browser --exclude macos-sdk || true
cd ..
ls /Library/Developer/CommandLineTools/SDKs/MacOSX26.2.sdk
- name: Build language packs
run: sh scripts/download-language-packs.sh

View File

@@ -4,18 +4,18 @@ on:
workflow_call:
inputs:
build-version:
description: 'The version to build'
description: "The version to build"
required: true
type: string
release-branch:
description: 'The branch to build'
description: "The branch to build"
required: true
type: string
jobs:
mac-build:
name: Unify macOS (Universal)
runs-on: 'macos-26'
runs-on: "macos-26"
strategy:
fail-fast: false
@@ -30,7 +30,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Setup Python
uses: actions/setup-python@v5
@@ -92,6 +92,7 @@ jobs:
- name: Populate mozconfig
env:
SURFER_MOZCONFIG_ONLY: true
ZEN_RELEASE: 1
run: |
npm run build
cd engine

View File

@@ -19,13 +19,18 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Install dependencies
run: npm ci
- name: Download Firefox and dependencies
env:
ZEN_DOWNLOAD_DONT_INIT_GIT: "1"
run: npm run download
- name: Import patches
run: npm run import
- name: Run linting
run: npm run lint

View File

@@ -4,14 +4,14 @@ on:
workflow_dispatch:
inputs:
release_candidate:
description: 'Set to true to sync release candidates'
description: "Set to true to sync release candidates"
required: false
type: boolean
default: false
workflow_call:
inputs:
release_candidate:
description: 'Set to true to sync release candidates'
description: "Set to true to sync release candidates"
required: false
type: boolean
default: false
@@ -41,12 +41,18 @@ jobs:
uses: actions/setup-node@v4
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Install dependencies
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
run: npm ci
- name: Install dependencies
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
run: |
git config --global user.email "mr-cheffy@users.noreply.github.com"
git config --global user.name "mr-cheffy"
- name: Setup surfer CI
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
run: |
@@ -67,6 +73,12 @@ jobs:
npm run sync
fi
- name: Run formatter
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
run: |
sudo apt install python3-autopep8
npm run pretty
- name: Check if any files changed
id: git-check
run: |
@@ -97,7 +109,7 @@ jobs:
- name: Import external tests
if: steps.git-check.outputs.files_changed == 'true'
run: python3 scripts/import_external_tests.py
run: python3 scripts/import_external_tests.py || true
- name: Create pull request
uses: peter-evans/create-pull-request@v7
@@ -107,9 +119,9 @@ jobs:
GIT_CURL_VERBOSE: 1
with:
token: ${{ secrets.DEPLOY_KEY }}
commit-message: 'chore: Sync upstream to `Firefox ${{ steps.build-data.outputs.version }}`'
branch: 'chore/upstream-sync'
title: 'Sync upstream Firefox to version ${{ steps.build-data.outputs.version }}'
commit-message: "chore: Sync upstream to `Firefox ${{ steps.build-data.outputs.version }}`"
branch: "chore/upstream-sync"
title: "Sync upstream Firefox to version ${{ steps.build-data.outputs.version }}"
body: |
This PR syncs the upstream Firefox to version ${{ steps.build-data.outputs.version }}.

View File

@@ -2,11 +2,11 @@ name: Zen Twilight Scheduled Releases
on:
schedule:
- cron: '0 23 * * *'
- cron: "0 23 * * *"
workflow_dispatch:
inputs:
create_release:
description: 'Whether to do a release'
description: "Whether to do a release"
required: false
type: boolean
default: true
@@ -34,4 +34,4 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

View File

@@ -7,15 +7,15 @@ on:
workflow_call:
inputs:
build-version:
description: 'The version to build'
description: "The version to build"
required: true
type: string
profile-data-path-archive:
description: 'The path to the zip archive containing the profile data'
description: "The path to the zip archive containing the profile data"
required: false
type: string
release-branch:
description: 'The branch to build'
description: "The branch to build"
required: true
type: string
@@ -37,7 +37,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Setup Git
run: |

View File

@@ -11,22 +11,22 @@ on:
type: boolean
default: false
build-version:
description: 'The version to build'
description: "The version to build"
required: true
type: string
profile-data-path-archive:
description: 'The path to the zip archive containing the profile data'
description: "The path to the zip archive containing the profile data"
type: string
release-branch:
description: 'The branch to build'
description: "The branch to build"
required: true
type: string
MOZ_BUILD_DATE:
type: string
required: true
default: ''
default: ""
use-sccache:
description: 'Use sccache'
description: "Use sccache"
required: true
type: boolean
default: false
@@ -62,7 +62,7 @@ jobs:
- name: Setup Node.js
uses: useblacksmith/setup-node@v5
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@main
@@ -197,12 +197,14 @@ jobs:
else
rustup target add x86_64-pc-windows-msvc
fi
# Stored in build/windows/.windows-rs-version
WINDOWS_RS_VERSION=$(cat build/windows/.windows-rs-version)
cd engine/
cargo install cargo-download --locked
cargo download -x windows=0.58.0
cargo download -x windows=$WINDOWS_RS_VERSION
export CARGO_INCREMENTAL=0
echo "" >> ../configs/common/mozconfig
echo "export MOZ_WINDOWS_RS_DIR=$(pwd)/windows-0.58.0" >> ../configs/common/mozconfig
echo "export MOZ_WINDOWS_RS_DIR=$(pwd)/windows-$WINDOWS_RS_VERSION" >> ../configs/common/mozconfig
- name: Build language packs
if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}

2
.gitignore vendored
View File

@@ -22,3 +22,5 @@ target/
.vscode/
locales/firefox-l10n/
!src/toolkit/themes/shared/design-system/dist/

View File

@@ -2,11 +2,19 @@
"bracketSameLine": true,
"endOfLine": "lf",
"trailingComma": "es5",
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"jsxSingleQuote": false,
"semi": true,
"printWidth": 100,
"plugins": ["prettier-plugin-sh"]
"plugins": ["prettier-plugin-sh"],
"overrides": [
{
"files": "*.css",
"options": {
"parser": "css",
"printWidth": 160
}
}
]
}

View File

@@ -35,7 +35,7 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
### Firefox Versions
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `146.0.1`! 🚀
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 146.0.1`!
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 147.0`!
### Contributing

View File

@@ -1 +1 @@
b6f4d18893d4f547f01d5e8aa8a4b364b168c84f
459ca9dfb9642c48c4ae314ce489d462b25448a8

View File

@@ -2,13 +2,13 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
const fs = require('fs');
const MJS_FILES = ['src/zen/split-view/ZenViewSplitter.ts'];
const fs = require("fs");
const MJS_FILES = ["src/zen/split-view/ZenViewSplitter.ts"];
for (const file of MJS_FILES) {
const code = fs.readFileSync(file, 'utf8');
require('@babel/core').transformSync(code, {
presets: ['@babel/preset-typescript'],
const code = fs.readFileSync(file, "utf8");
require("@babel/core").transformSync(code, {
presets: ["@babel/preset-typescript"],
filename: file,
});
}

View File

@@ -0,0 +1 @@
0.62.2

View File

@@ -47,6 +47,8 @@ if test "$ZEN_RELEASE"; then
# ac_add_options --enable-clang-plugin
ac_add_options --enable-bootstrap=-sccache
ac_add_options --enable-optimize
ac_add_options --enable-release
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
@@ -56,8 +58,6 @@ if test "$ZEN_RELEASE"; then
ac_add_options --enable-rust-simd
ac_add_options --enable-wasm-simd
mk_add_options MOZ_PARALLEL_COMPILE=1
ac_add_options --disable-geckodriver
ac_add_options --disable-rust-tests
@@ -73,24 +73,13 @@ if test "$ZEN_RELEASE"; then
fi
fi
ac_add_options --enable-jemalloc
mk_add_options MOZILLA_OFFICIAL=1
MOZILLA_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export OPT_LEVEL="3"
ac_add_options OPT_LEVEL="3"
export RUSTC_OPT_LEVEL="3"
ac_add_options RUSTC_OPT_LEVEL="3"
mk_add_options AUTOCLOBBER=1
export AUTOCLOBBER=1
ac_add_options --enable-updater
ac_add_options --enable-js-shell
export MOZ_PACKAGE_JSSHELL=1
ac_add_options --disable-crashreporter

View File

@@ -17,30 +17,16 @@ if test "$ZEN_RELEASE"; then
ac_add_options --enable-eme=widevine
# Enable Profile Guided Optimization
if test "$ZEN_GA_DISABLE_PGO"; then
export ZEN_DUMMY=1
else
export MOZ_PGO=1
ac_add_options MOZ_PGO=1
if ! test "$ZEN_GA_DISABLE_PGO"; then
export MOZ_PGO=1
ac_add_options MOZ_PGO=1
fi
# Optimization flags for SURFER_COMPAT
ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf"
export LDFLAGS="$LDFLAGS -Wl,-O3"
elif test "$SURFER_COMPAT" = "aarch64"; then
ac_add_options --target=aarch64-linux-gnu
ac_add_options --enable-optimize="-O3"
# override LTO settings
export MOZ_LTO=cross,thin
ac_add_options --enable-lto=cross,thin
export CFLAGS="$CFLAGS -O3"
export CPPFLAGS="$CPPFLAGS -O3"
export CXXFLAGS="$CXXFLAGS -O3"
export LDFLAGS="$LDFLAGS -Wl,-O3"
fi
# Disable DMD and ELF hacks, enable linker lld

View File

@@ -28,28 +28,31 @@ if test "$SURFER_COMPAT" = "x86_64"; then
if test "$ZEN_RELEASE"; then
ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-march=nehalem -mtune=haswell -O3 -w"
export CFLAGS="-O3 -march=nehalem"
export CPPFLAGS="-O3 -march=nehalem"
export CXXFLAGS="-O3 -march=nehalem"
export LDFLAGS="-Wl,-O3 -march=nehalem"
export RUSTFLAGS="-Ctarget-cpu=nehalem"
fi
else
ac_add_options --enable-clang-plugin
ac_add_options --target=aarch64-apple-darwin
if test "$ZEN_RELEASE"; then
ac_add_options --enable-optimize="-O3 -mcpu=apple-m1 -march=armv8.3-a+simd"
# As of Clang 13, the default is -mcpu=apple-m1 when using a aarch64-apple-macos target,
# but we're using apple64-apple-darwin, which defaults to -mcpu=apple-a7, which disables
# a bunch of # performance-enabling CPU features.
export CFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
export CPPFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
export CXXFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
export LDFLAGS="-Wl,-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
export RUSTFLAGS="-C target-feature=+v8.3a -Ctarget-cpu=apple-m1"
# TODO: We'll want to switch to aarch64-apple-macos eventually.
export CFLAGS="$CFLAGS -mcpu=apple-m1"
export CXXFLAGS="$CXXFLAGS -mcpu=apple-m1"
fi
fi
if test "$ZEN_RELEASE"; then
ac_add_options --with-macos-sdk=/Library/Developer/CommandLineTools/SDKs/MacOSX26.2.sdk
fi
# Keep using ld64 on PGO/LTO builds because of performance regressions when using lld.
# Mozilla sets "MOZ_LD64_KNOWN_GOOD" to true when they do automated builds with PGO/LTO on macOS.
# See https://searchfox.org/firefox-main/rev/e61d59b5c9a651fd7bf28043f87c0dc669833496/build/moz.configure/lto-pgo.configure#261
# export MOZ_LD64_KNOWN_GOOD=1
# ac_add_options --enable-linker=ld64
#
# if test "$ZEN_RELEASE"; then
# mk_add_options MOZ_MAKE_FLAGS="-j4"
# fi

View File

@@ -30,34 +30,19 @@ ac_add_options --disable-maintenance-service
ac_add_options --disable-bits-download
if test "$SURFER_COMPAT" = "x86_64"; then
ac_add_options --target=x86_64-pc-windows-msvc
ac_add_options --enable-eme=widevine,wmfcdm
ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf"
export LDFLAGS="-Wl,-O3"
export RUSTFLAGS="-Clink-args=--icf=safe"
elif test "$SURFER_COMPAT" = "aarch64"; then
ac_add_options --target=aarch64-pc-windows-msvc
ac_add_options --enable-eme=widevine
ac_add_options --enable-optimize="-O2 -mtune=cortex-a55 -march=armv8.2-a+simd"
# override LTO settings
export MOZ_LTO=cross,thin
ac_add_options --enable-lto=cross,thin
export CFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55"
export CPPFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55"
export CXXFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55"
export LDFLAGS="-Wl,-O2 -march=armv8.2-a+simd -mtune=cortex-a55"
export RUSTFLAGS="-C target-feature=+v8.2a -Ctarget-cpu=cortex-a55"
fi
if test "$ZEN_CROSS_COMPILING"; then
if test "$ZEN_GA_GENERATE_PROFILE"; then
export CXXFLAGS="$CXXFLAGS -fprofile-generate -mllvm -enable-name-compression=false -mllvm -pgo-temporal-instrumentation -fprofile-update=atomic"
mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0"
ac_add_options --enable-profile-generate=cross
elif test "$SURFER_COMPAT" = "x86_64"; then

View File

@@ -1,27 +1,472 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import js from '@eslint/js';
import globals from 'globals';
import { defineConfig, globalIgnores } from 'eslint/config';
import zenGlobals from './src/zen/zen.globals.js';
import sdl from "@microsoft/eslint-plugin-sdl";
import eslintConfigPrettier from "eslint-config-prettier/flat";
import html from "eslint-plugin-html";
import importPlugin from "eslint-plugin-import";
import json from "@eslint/json";
import lit from "eslint-plugin-lit";
import mozilla from "eslint-plugin-mozilla";
import reactHooks from "eslint-plugin-react-hooks";
import zenGlobals from "./src/zen/zen.globals.mjs";
export default defineConfig([
import globals from "globals";
import path from "path";
import globalIgnores from "./engine/eslint-ignores.config.mjs";
import testPathsConfig from "./engine/eslint-test-paths.config.mjs";
import repositoryGlobals from "./engine/eslint-file-globals.config.mjs";
import rollouts from "./engine/eslint-rollouts.config.mjs";
import subdirConfigs from "./engine/eslint-subdirs.config.mjs";
const testPaths = testPathsConfig.testPaths;
const httpTestingPaths = [
`**/*mixedcontent*.{${mozilla.allFileExtensions.join(",")}}`,
`**/*CrossOrigin*.{${mozilla.allFileExtensions.join(",")}}`,
`**/*crossorigin*.{${mozilla.allFileExtensions.join(",")}}`,
`**/*cors*.{${mozilla.allFileExtensions.join(",")}}`,
`**/*downgrade*.{${mozilla.allFileExtensions.join(",")}}`,
`**/*Downgrade*.{${mozilla.allFileExtensions.join(",")}}`,
];
globals.browser = {
...globals.browser,
...zenGlobals.reduce((obj, key) => {
obj[key] = "readonly";
return obj;
}, {}),
};
testPaths.browser = testPaths.browser.concat("src/zen/tests/");
/**
* Takes each path in the paths array, and expands it with the list of extensions
* that ESLint is watching.
*
* @param {object} options
* @param {string[]} options.paths
* The list of paths to wrap.
* @param {string[]} [options.excludedExtensions]
* The list of extensions to be excluded from the wrapping.
*/
function wrapPaths({ paths, excludedExtensions }) {
let extensions = excludedExtensions
? mozilla.allFileExtensions.filter((f) => !excludedExtensions.includes(f))
: mozilla.allFileExtensions;
return paths.map((p) => {
if (p.endsWith("**")) {
return p + `/*.{${extensions.join(",")}}`;
}
if (p.endsWith("/")) {
return p + `**/*.{${extensions.join(",")}}`;
}
if (p.endsWith("*")) {
return p + `.{${extensions.join(",")}}`;
}
return p;
});
}
/**
* Wraps the paths listed in the files section of a configuration with the
* file extensions that ESLint is watching.
*
* @param {object} configs
*/
function wrapPathsInConfig(configs) {
for (let config of configs) {
// add "engine/" to the paths in the files section.
config.files = wrapPaths({ paths: config.files.map((p) => "engine/" + p) });
}
return configs;
}
let config = [
{
files: ['**/*.{js,mjs,cjs}'],
plugins: { js },
extends: ['js/recommended'],
languageOptions: {
globals: {
...globals.browser,
...zenGlobals.reduce((acc, global) => {
acc[global] = 'readable';
return acc;
}, {}),
name: "import-plugin-settings",
settings: {
"import/extensions": [".mjs"],
"import/resolver": {
[path.resolve(import.meta.dirname, "engine", "srcdir-resolver.js")]: {},
node: {},
},
},
ignores: ['**/vendor/**', '**/tests/**'],
},
globalIgnores(['**/mochitests/**']),
]);
{
name: "ignores",
ignores: [...globalIgnores, "src/zen/vendor/*"],
},
{
name: "all-files",
files: wrapPaths({ paths: ["**"] }),
linterOptions: {
// With this option on, if an inline comment disables a rule, and the
// rule is able to be automatically fixed, then ESLint will remove the
// inline comment and apply the fix. We don't want this because we have
// some rules that intentionally need to be turned off in specific cases,
// e.g. @microsoft/sdl/no-insecure-url.
reportUnusedDisableDirectives: "off",
},
plugins: { lit },
rules: {
"lit/quoted-expressions": ["error", "never"],
"lit/no-invalid-html": "error",
"lit/no-value-attribute": "error",
},
},
{
name: "source-type-script",
files: ["**/*.{js,json,html,sjs,xhtml}"],
languageOptions: {
sourceType: "script",
},
},
...mozilla.configs["flat/recommended"],
{
name: "json-recommended-with-comments",
files: ["**/*.json"],
language: "json/jsonc",
...json.configs.recommended,
},
{
name: "json-recommended-no-comments",
files: ["**/package.json"],
language: "json/json",
...json.configs.recommended,
},
{
name: "json-empty-keys-off-for-image_builder",
files: ["taskcluster/docker/image_builder/policy.json"],
rules: {
"json/no-empty-keys": "off",
},
},
{
name: "eslint-plugin-html",
files: ["**/*.html", "**/*.xhtml"],
plugins: { html },
},
{
name: "define-globals-for-browser-env",
// Not available for sjs files.
files: wrapPaths({ paths: ["**"], excludedExtensions: ["sjs"] }),
ignores: [
// Also not available for various other scopes and tools.
"**/*.sys.mjs",
"**/?(*.)worker.?(m)js",
"**/?(*.)serviceworker.?(m)js",
...wrapPaths({
paths: testPaths.xpcshell,
excludedExtensions: ["mjs", "sjs"],
}),
"tools/lint/eslint/**",
],
languageOptions: {
globals: globals.browser,
},
},
{
// Generally we assume that all files, except mjs ones are in our
// privileged and specific environment. mjs are handled separately by
// the recommended configuration in eslint-plugin-mozilla.
name: "define-privileged-and-specific-globals-for-most-files",
files: wrapPaths({ paths: ["**"], excludedExtensions: ["json"] }),
ignores: ["browser/components/storybook/**", "tools"],
languageOptions: {
globals: {
...mozilla.environments.privileged.globals,
...mozilla.environments.specific.globals,
},
},
},
{
name: "define-globals-for-node-files",
files: [
// All .eslintrc.mjs files are in the node environment, so turn that
// on here.
"**/.eslintrc*.mjs",
// .js files in the top-level are generally assumed to be node.
"\.*.js",
// *.config.js files are generally assumed to be configuration files
// based for node.
"**/*.config.js",
// The resolver for moz-src for eslint, vscode etc.
"engine/srcdir-resolver.js",
],
languageOptions: {
globals: { ...globals.node, ...mozilla.turnOff(globals.browser) },
},
},
{
name: "browser-no-more-globals",
files: ["browser/base/content/browser.js"],
rules: {
"mozilla/no-more-globals": "error",
},
},
{
name: "jsx-files",
files: ["**/*.jsx", "browser/components/storybook/.storybook/**/*.mjs"],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
},
{
name: "eslint-plugin-import-rules",
files: ["**/*.mjs"],
plugins: { import: importPlugin },
rules: {
"import/default": "error",
"import/export": "error",
"import/named": "error",
"import/namespace": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-absolute-path": "error",
"import/no-named-default": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-self-import": "error",
"import/no-unassigned-import": "error",
"import/no-unresolved": [
"error",
// Bug 1773473 - Ignore resolver URLs for chrome and resource as we
// do not yet have a resolver for them.
{ ignore: ["chrome://", "resource://"] },
],
"import/no-useless-path-segments": "error",
},
},
{
name: "turn-off-unassigned-import-for-stories",
// Turn off no-unassigned-import for files that typically test our
// custom elements, which are imported for the side effects (ie
// the custom element being registered) rather than any particular
// export:
files: ["**/*.stories.mjs"],
plugins: { import: importPlugin },
rules: {
"import/no-unassigned-import": "off",
},
},
{
...mozilla.configs["flat/general-test"],
files: wrapPaths({ paths: ["**/test/**", "**/tests/**"] }),
},
{
...mozilla.configs["flat/xpcshell-test"],
files: wrapPaths({
paths: testPaths.xpcshell,
excludedExtensions: ["mjs", "sjs"],
}),
},
{
name: "no-unused-vars-disable-on-headjs",
// If it is an xpcshell head file, we turn off global unused variable checks, as it
// would require searching the other test files to know if they are used or not.
// This would be expensive and slow, and it isn't worth it for head files.
// We could get developers to declare as exported, but that doesn't seem worth it.
files: testPaths.xpcshell.map((filePath) => `${filePath}head*.js`),
rules: {
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
caughtErrors: "none",
vars: "local",
},
],
},
},
{
name: "no-unused-vars-for-xpcshell",
// This section enables errors of no-unused-vars globally for all test*.js
// files in xpcshell test paths.
// This is not done in the xpcshell-test configuration as we cannot pull
// in overrides from there. We should at some stage, aim to enable this
// for all files in xpcshell-tests.
files: testPaths.xpcshell.map((filePath) => `${filePath}test*.js`),
rules: {
// No declaring variables that are never used
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
caughtErrors: "none",
vars: "all",
},
],
},
},
{
...mozilla.configs["flat/browser-test"],
files: wrapPaths({
paths: testPaths.browser,
excludedExtensions: ["mjs", "sjs"],
}),
},
{
...mozilla.configs["flat/mochitest-test"],
files: wrapPaths({
paths: testPaths.mochitest,
excludedExtensions: ["mjs"],
}),
ignores: ["security/manager/ssl/tests/mochitest/browser/**"],
},
{
...mozilla.configs["flat/chrome-test"],
files: wrapPaths({
paths: testPaths.chrome,
excludedExtensions: ["mjs", "sjs"],
}),
},
{
name: "simpletest",
languageOptions: {
globals: {
...mozilla.environments.simpletest.globals,
},
},
files: [
...testPaths.mochitest.map((filePath) => `${filePath}/**/*.js`),
...testPaths.chrome.map((filePath) => `${filePath}/**/*.js`),
],
},
{
name: "multiple-test-kinds",
// Some directories have multiple kinds of tests, and some rules
// don't work well for HTML-based mochitests, so disable those.
files: testPaths.xpcshell
.concat(testPaths.browser)
.map((filePath) => [`${filePath}/**/*.html`, `${filePath}/**/*.xhtml`])
.flat(),
rules: {
// plain/chrome mochitests don't automatically include Assert, so
// autofixing `ok()` to Assert.something is bad.
"mozilla/no-comparison-or-assignment-inside-ok": "off",
},
},
{
name: "test-file-reuse",
// Some directories reuse `test_foo.js` files between mochitest-plain and
// unit tests, or use custom postMessage-based assertion propagation into
// browser tests. Ignore those too:
files: wrapPaths({
paths: [
// Reuses xpcshell unit test scripts in mochitest-plain HTML files.
"dom/indexedDB/test/**",
// Dispatches functions to the webpage in ways that are hard to detect.
"toolkit/components/antitracking/test/**",
],
}),
rules: {
"mozilla/no-comparison-or-assignment-inside-ok": "off",
},
},
{
// Rules of Hooks broadly checks for camelCase "use" identifiers, so
// enable only for paths actually using React to avoid false positives.
name: "react-hooks",
files: [
"browser/components/aboutwelcome/**",
"browser/components/asrouter/**",
"browser/extensions/newtab/**",
"devtools/**",
],
...reactHooks.configs["recommended-latest"],
plugins: { "react-hooks": reactHooks },
rules: {
// react-hooks/recommended has exhaustive-deps as a warning, we prefer
// errors, so that raised issues get addressed one way or the other.
"react-hooks/exhaustive-deps": "error",
},
},
{
name: "disable-no-insecure-url-for-http-testing",
// Exempt files with these paths since they have to use http for full coverage
files: httpTestingPaths,
plugins: { "@microsoft/sdl": sdl },
rules: {
"@microsoft/sdl/no-insecure-url": "off",
},
},
{
name: "mozilla/valid-jsdoc",
files: wrapPaths({ paths: ["**"] }),
...mozilla.configs["flat/valid-jsdoc"],
},
{
name: "rollout-no-browser-refs-in-toolkit",
files: ["toolkit/**"],
ignores: ["toolkit/**/test/**", "toolkit/**/tests/**"],
plugins: { mozilla },
rules: {
"mozilla/no-browser-refs-in-toolkit": "error",
},
},
{
name: "no-newtab-refs-outside-newtab",
files: ["**/*.mjs", "**/*.js", "**/*.sys.mjs"],
ignores: [
"tools/@types/generated/**",
"tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-newtab-refs-outside-newtab.mjs",
"tools/lint/eslint/eslint-plugin-mozilla/tests/no-newtab-refs-outside-newtab.mjs",
],
plugins: { mozilla },
rules: {
"mozilla/no-newtab-refs-outside-newtab": "error",
},
},
...wrapPathsInConfig(subdirConfigs),
...wrapPathsInConfig(repositoryGlobals),
/**
* The items below should always be the last items in this order:
*
* - Enable eslint-config-prettier.
* - Enable curly.
* - Rollouts
*/
// Turn off rules that conflict with Prettier.
{ name: "eslint-config-prettier", ...eslintConfigPrettier },
{
name: "enable-curly",
files: wrapPaths({ paths: ["**/"] }),
rules: {
// Require braces around blocks that start a new line. This must be
// configured after eslint-config-prettier is included, as otherwise
// eslint-config-prettier disables the curly rule. Hence, we do
// not include it in
// `tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js`.
curly: ["error", "all"],
},
},
...wrapPathsInConfig(rollouts),
];
// The various places we get our globals from use true/false rather than
// the strings required by ESLint, so translate those here.
config.map((entry) => {
if (entry.languageOptions?.globals) {
let newGlobals = {};
for (let [key, value] of Object.entries(entry.languageOptions.globals)) {
if (typeof entry.languageOptions.globals[key] == "boolean") {
newGlobals[key] = value ? "writable" : "readonly";
} else {
newGlobals[key] = value;
}
}
}
return entry;
});
export default config;

View File

@@ -10,7 +10,10 @@ zen-menubar-toggle-pinned-tabs =
}
zen-menubar-appearance =
.label = Website Appearance
.label = Appearance
zen-menubar-appearance-description =
.label = Websites will use:
zen-menubar-appearance-auto =
.label = Automatic

1318
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -49,24 +49,34 @@
"url": "https://github.com/zen-browser/desktop/issues"
},
"homepage": "https://github.com/zen-browser/desktop#readme",
"dependencies": {
"@zen-browser/surfer": "^1.12.1"
},
"devDependencies": {
"@babel/preset-typescript": "^7.27.0",
"@eslint/js": "^9.32.0",
"@eslint/js": "^9.39.2",
"@eslint/json": "^0.14.0",
"@microsoft/eslint-plugin-sdl": "^1.1.0",
"eslint": "^9.32.0",
"@zen-browser/surfer": "^1.13.1",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-eslint-plugin": "^7.3.0",
"eslint-plugin-html": "^8.1.3",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^29.12.1",
"eslint-plugin-json": "^4.0.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-lit": "^2.1.1",
"eslint-plugin-mozilla": "^4.3.3",
"eslint-plugin-no-unsanitized": "4.1.4",
"eslint-plugin-promise": "7.2.1",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-spidermonkey-js": "file:tools/eslint-plugin-spidermonkey-js",
"formal-git": "^1.2.9",
"globals": "^16.3.0",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"prettier": "^3.4.2",
"prettier-plugin-sh": "^0.14.0"
"prettier-plugin-sh": "^0.14.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.52.0"
}
}

View File

@@ -5,45 +5,45 @@
# Smooth scrolling and mousewheel tuning preferences
- name: general.smoothScroll.msdPhysics.enabled
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: true
- name: general.smoothScroll.currentVelocityWeighting
condition: '!defined(XP_MACOSX)'
value: '0.15'
condition: "!defined(XP_MACOSX)"
value: "0.15"
- name: general.smoothScroll.stopDecelerationWeighting
condition: '!defined(XP_MACOSX)'
value: '0.6'
condition: "!defined(XP_MACOSX)"
value: "0.6"
- name: mousewheel.min_line_scroll_amount
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: 10
- name: general.smoothScroll.mouseWheel.durationMinMS
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: 80
- name: general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: 12
- name: general.smoothScroll.msdPhysics.motionBeginSpringConstant
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: 600
- name: general.smoothScroll.msdPhysics.regularSpringConstant
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: 650
- name: general.smoothScroll.msdPhysics.slowdownMinDeltaMS
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: 25
- name: general.smoothScroll.msdPhysics.slowdownSpringConstant
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: 250
- name: mousewheel.default.delta_multiplier_y
condition: '!defined(XP_MACOSX)'
condition: "!defined(XP_MACOSX)"
value: 200

View File

@@ -18,7 +18,7 @@
value: true
- name: browser.toolbars.bookmarks.visibility
value: 'never'
value: "never"
- name: widget.non-native-theme.scrollbar.style
value: 2
@@ -48,7 +48,7 @@
- name: app.update.checkInstallTime.days
value: 6
condition: 'defined(MOZILLA_OFFICIAL)'
condition: "defined(MOZILLA_OFFICIAL)"
- name: browser.profiles.enabled
value: false
@@ -65,3 +65,10 @@
- name: browser.tabs.closeWindowWithLastTab
value: false
- name: browser.tabs.dragDrop.multiselectStacking
value: false
locked: true
- name: browser.tabs.notes.enabled
value: false

View File

@@ -4,10 +4,10 @@
# Fullscreen API preferences
- name: full-screen-api.transition-duration.enter
value: '0 0'
value: "0 0"
- name: full-screen-api.transition-duration.leave
value: '0 0'
value: "0 0"
- name: full-screen-api.warning.delay
value: -1

View File

@@ -4,7 +4,7 @@
- name: browser.lowMemoryResponseMask
value: 3
condition: 'defined(XP_MACOSX)'
condition: "defined(XP_MACOSX)"
- name: network.predictor.enable-hover-on-ssl
value: true
@@ -14,6 +14,6 @@
# Make sure its in sync with:
# https://searchfox.org/firefox-main/rev/1477feb9706f4ccc5bd571c1c215832a6fbb7464/modules/libpref/init/StaticPrefList.yaml#7741-7748
- name: gfx.webrender.compositor
condition: 'defined(XP_WIN) || defined(XP_DARWIN)'
value: '@cond'
condition: "defined(XP_WIN) || defined(XP_DARWIN)"
value: "@cond"
mirror: once

View File

@@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
- name: browser.privatebrowsing.vpnpromourl
value: ''
value: ""
locked: true
- name: extensions.getAddons.showPane

View File

@@ -20,7 +20,7 @@
locked: true
- name: toolkit.telemetry.server
value: 'data:,'
value: "data:,"
locked: true
- name: toolkit.telemetry.archive.enabled
@@ -56,7 +56,7 @@
locked: true
- name: toolkit.coverage.endpoint.base
value: ''
value: ""
locked: true
- name: browser.newtabpage.activity-stream.feeds.telemetry
@@ -84,7 +84,7 @@
value: false
- name: app.normandy.api_url
value: ''
value: ""
locked: true
# Crash Reports

View File

@@ -12,7 +12,7 @@
value: true
- name: zen.glance.activation-method
value: 'alt' # ctrl, alt, shift
value: "alt" # ctrl, alt, shift
- name: zen.glance.animation-duration
value: 350 # in milliseconds

View File

@@ -5,8 +5,8 @@
# GTK-specific preferences
- name: widget.gtk.rounded-bottom-corners.enabled
value: true
condition: 'defined(MOZ_WIDGET_GTK)'
condition: "defined(MOZ_WIDGET_GTK)"
- name: zen.widget.linux.transparency
value: false
condition: 'defined(MOZ_WIDGET_GTK)'
condition: "defined(MOZ_WIDGET_GTK)"

View File

@@ -2,9 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
- name: zen.keyboard.shortcuts.enabled
value: true
- name: zen.keyboard.shortcuts.version
value: 0 # Empty string means default shortcuts

View File

@@ -5,7 +5,7 @@
# Enable transparent background for macos
- name: widget.macos.sidebar-blend-mode.behind-window
value: true
condition: 'defined(XP_MACOSX)'
condition: "defined(XP_MACOSX)"
# 1. hudWindow
# 2. fullScreenUI
@@ -16,7 +16,7 @@
# 7. underlay
- name: zen.widget.macos.window-material
value: 1
condition: 'defined(XP_MACOSX)'
condition: "defined(XP_MACOSX)"
cpptype: uint32_t
mirror: always
type: static

View File

@@ -9,8 +9,8 @@
value: 20 # In days
- name: zen.mods.auto-update
value: '@cond'
condition: 'defined(MOZILLA_OFFICIAL)'
value: "@cond"
condition: "defined(MOZILLA_OFFICIAL)"
- name: zen.rice.share.notice.accepted
value: false
@@ -18,10 +18,10 @@
# === Mark: Site Injection ===
- name: zen.injections.match-urls
value: 'https://zen-browser.app/*'
value: "https://zen-browser.app/*"
locked: true
condition: 'defined(MOZILLA_OFFICIAL)'
condition: "defined(MOZILLA_OFFICIAL)"
- name: zen.injections.match-urls
value: 'http://localhost/*'
condition: '!defined(MOZILLA_OFFICIAL)'
value: "http://localhost/*"
condition: "!defined(MOZILLA_OFFICIAL)"

View File

@@ -6,7 +6,7 @@
value: true
- name: zen.session-store.log
value: '@IS_TWILIGHT@'
value: "@IS_TWILIGHT@"
- name: zen.session-store.restore-unsynced-windows
value: true

6
prefs/zen/share.yaml Normal file
View File

@@ -0,0 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
- name: zen.share.enabled
value: true

View File

@@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
- name: zen.theme.accent-color
value: 'AccentColor'
value: "AccentColor"
- name: zen.theme.content-element-separation
value: 8
@@ -30,23 +30,18 @@
value: true
- name: zen.theme.styled-status-panel
value: '@IS_TWILIGHT@'
value: "@IS_TWILIGHT@"
- name: zen.theme.styled-status-panel
value: true
condition: 'defined(XP_MACOSX)'
condition: "defined(XP_MACOSX)"
- name: zen.theme.hide-unified-extensions-button
value: true
# ==== Mark: border radius ====
# macOS border radius
# -1 will use platform-native values
# Set to a positive value to override with a custom radius
- name: zen.theme.border-radius
value: 10
condition: 'defined(XP_MACOSX)'
# non-macOS border radius
- name: zen.theme.border-radius
value: 8
condition: '!defined(XP_MACOSX)'
value: -1

View File

@@ -10,11 +10,11 @@
- name: zen.view.mac.show-three-dot-menu
value: false
condition: 'defined(XP_MACOSX)'
condition: "defined(XP_MACOSX)"
- name: zen.widget.mac.mono-window-controls
value: true
condition: 'defined(XP_MACOSX)'
condition: "defined(XP_MACOSX)"
- name: zen.view.use-single-toolbar
value: true
@@ -41,7 +41,7 @@
value: 2
- name: zen.view.context-menu.refresh
value: '@IS_TWILIGHT@'
value: "@IS_TWILIGHT@"
- name: zen.view.borderless-fullscreen
value: true

View File

@@ -3,6 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
- name: zen.watermark.enabled
value: '@cond'
value: "@cond"
sticky: true
condition: 'defined(MOZILLA_OFFICIAL)'
condition: "defined(MOZILLA_OFFICIAL)"

View File

@@ -3,6 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
- name: zen.welcome-screen.seen
value: '@cond'
value: "@cond"
sticky: true
condition: '!defined(MOZILLA_OFFICIAL)'
condition: "!defined(MOZILLA_OFFICIAL)"

View File

@@ -10,3 +10,6 @@
- name: zen.window-sync.prefer-unsynced-windows
value: false
- name: zen.window-sync.open-link-in-new-unsynced-window
value: true

View File

@@ -5,15 +5,15 @@
# Mica effect preferences for Windows
- name: widget.windows.mica
value: true
condition: 'defined(XP_WIN)'
condition: "defined(XP_WIN)"
- name: widget.windows.mica.popups
value: true
condition: 'defined(XP_WIN)'
condition: "defined(XP_WIN)"
# 1 = DWMSBT_MAINWINDOW
# 2 = DWMSBT_TRANSIENTWINDOW (default, also used for popups)
# 3 = DWMSBT_TABBEDWINDOW
- name: widget.windows.mica.toplevel-backdrop
value: 2
condition: 'defined(XP_WIN)'
condition: "defined(XP_WIN)"

View File

@@ -32,9 +32,12 @@
- name: zen.workspaces.separate-essentials
value: true
- name: zen.workspaces.dnd-switch-padding
value: 10
- name: zen.workspaces.debug
value: '@cond'
condition: '!defined(MOZILLA_OFFICIAL)' # Section: Pinned tabs management
value: "@cond"
condition: "!defined(MOZILLA_OFFICIAL)" # Section: Pinned tabs management
- name: zen.pinned-tab-manager.wheel-close-if-pending
value: true

View File

@@ -17,7 +17,7 @@ def get_current_version() -> Optional[str]:
try:
with open(METADATA_FILENAME) as f:
metadata = json.load(f)
return metadata["version"]["candidate"]
return metadata["version"]["candidate"], metadata["version"]["candidateBuild"]
except (FileNotFoundError, json.JSONDecodeError) as e:
print(f"Error reading current version: {e}")
return None
@@ -43,8 +43,10 @@ def get_rc_response() -> Optional[str]:
tag = tag_dict["tag"]
if (tag.startswith("FIREFOX") and tag.endswith("_BUILD1")
and "ESR" not in tag and "b" not in tag and "ANDROID" not in tag):
return (tag.replace("FIREFOX_", "").replace("_BUILD1",
"").replace("_", "."))
version = (tag.replace("FIREFOX_", "").replace("_BUILD1",
"").replace("_", "."))
build = int(tag.split("_BUILD")[-1])
return version, build
except (FileNotFoundError, json.JSONDecodeError) as e:
print(f"Error reading RC response: {e}")
return None
@@ -76,15 +78,15 @@ def send_webhook(rc: str) -> None:
print("Webhook URL not set.")
def rc_should_be_updated(rc_response: str, current_version: str) -> bool:
return rc_response and rc_response != current_version
def rc_should_be_updated(rc_response: str, current_version: str, rc_build: int, current_build: int) -> bool:
return rc_response and (rc_response != current_version or rc_build != current_build)
def main() -> int:
current_version = get_current_version()
rc_response = get_rc_response()
current_version, current_build = get_current_version()
rc_response, rc_build = get_rc_response()
if rc_should_be_updated(rc_response, current_version):
if rc_should_be_updated(rc_response, current_version, rc_build, current_build):
send_webhook(rc_response)
return 0

View File

@@ -10,7 +10,7 @@ COMPONENT_ROOT=$(pwd)/src/zen
EXTRA_COMPONENTS=(
"scripts"
"workflows"
"winsign"
"windows"
"flatpak"
"configs"
)

View File

@@ -16,7 +16,7 @@ IGNORE_FILES=(
# Recursively find all .patch files in the current directory and its subdirectories
find src -type f -name "*.patch" | while read -r patch_file; do
# Get the file from the inside of the file as indicated by the patch
target_file=$(grep -m 1 -oP '(?<=\+\+\+ b/).+' "$patch_file")
target_file=$(grep -m 1 -E '^\+\+\+ b/' "$patch_file" | sed 's/^\+\+\+ b\///')
if [[ -z "$target_file" ]]; then
echo "No target file found in patch: $patch_file"
continue

View File

@@ -10,4 +10,4 @@ if [ ! -f "package.json" ]; then
fi
npm update @zen-browser/surfer
npm i @zen-browser/surfer@latest
npm i @zen-browser/surfer@latest -D

View File

@@ -10,9 +10,9 @@ import shutil
from check_rc_response import get_rc_response, rc_should_be_updated
def update_rc(last_version: str):
rc_version = get_rc_response()
if rc_should_be_updated(rc_version, last_version):
def update_rc(last_version: str, last_build: int):
rc_version, rc_build = get_rc_response()
if rc_should_be_updated(rc_version, last_version, rc_build, last_build):
print(f"New Firefox RC version is available: {rc_version}")
print("Removing engine directory and updating surfer.json.")
if os.path.exists("engine"):
@@ -21,6 +21,7 @@ def update_rc(last_version: str):
data = json.load(f)
with open("surfer.json", "w") as f:
data["version"]["candidate"] = rc_version
data["version"]["candidateBuild"] = rc_build
json.dump(data, f, indent=2)
print("Download the new engine by running 'npm run download'.")
os.system("npm run download")
@@ -28,10 +29,10 @@ def update_rc(last_version: str):
print("No new Firefox RC version available.")
def update_ff(is_rc: bool = False, last_version: str = ""):
def update_ff(is_rc: bool = False, last_version: str = "", last_build: int = 0):
"""Runs the npm command to sync Firefox."""
if is_rc:
return update_rc(last_version)
return update_rc(last_version, last_build)
result = os.system("npm run sync:raw")
if result != 0:
raise RuntimeError("Failed to sync Firefox.")
@@ -42,7 +43,8 @@ def get_version_from_file(filename, is_rc):
try:
with open(filename, "r") as f:
data = json.load(f)
return data["version"]["version"] if not is_rc else data["version"]["candidate"]
return (data["version"]["version"] if not is_rc else data["version"]["candidate"],
data["version"]["candidateBuild"])
except (FileNotFoundError, json.JSONDecodeError) as e:
raise RuntimeError(f"Error reading version from {filename}: {e}")
@@ -91,9 +93,9 @@ def main():
try:
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)
last_version, last_build = get_version_from_file("surfer.json", args.rc)
update_ff(args.rc, last_version, last_build)
new_version, new_build = 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.")

View File

@@ -1,8 +1,8 @@
diff --git a/Cargo.lock b/Cargo.lock
index 6f6632e9747e281aac3ea177225c03b73f25456e..06756e08041835c203490057855d537118647cd0 100644
index 723445447f491058784992e66245e0e0f8e61e19..02816c1df3e20d96ce68f16970b8a6e38080533e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4171,8 +4171,6 @@ dependencies = [
@@ -4214,8 +4214,6 @@ dependencies = [
[[package]]
name = "mime_guess"
version = "2.0.4"

View File

@@ -1,8 +1,8 @@
diff --git a/Cargo.toml b/Cargo.toml
index e2846a08008684f18799d75e5c28fd244c10361a..ba72071baef49ed494f78d1cc6752b53d1841f46 100644
index 35e725043bce0b39fea550e8fb2b0ae1ff752e43..abac2042d537fcc1ce26e0e3acbf98fc2975b793 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -232,6 +232,8 @@ moz_asserts = { path = "mozglue/static/rust/moz_asserts" }
@@ -237,6 +237,8 @@ moz_asserts = { path = "mozglue/static/rust/moz_asserts" }
# Workaround for https://github.com/rust-lang/cargo/issues/11232
rure = { path = "third_party/rust/rure" }

View File

@@ -1,5 +1,5 @@
diff --git a/browser/actors/WebRTCParent.sys.mjs b/browser/actors/WebRTCParent.sys.mjs
index a9612920f86ef5f37328497bf62255497e96b02d..a5643cd7e9c7a71da391408c14e00185b7db3f24 100644
index ffa7d61ded4f2cf5866d0cb12dd9b14728a63570..5575943208a734f820758fd50a80503061934d56 100644
--- a/browser/actors/WebRTCParent.sys.mjs
+++ b/browser/actors/WebRTCParent.sys.mjs
@@ -152,6 +152,7 @@ export class WebRTCParent extends JSWindowActorParent {

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js
index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d6e425bdf 100644
index cfb6b8dd5443966d0635c3d7b477a68eca8fa9e0..c876890706b1a314c7760bbe1ff5e9eb57857e60 100644
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -1069,7 +1069,7 @@ var gXPInstallObserver = {
@@ -20,7 +20,7 @@ index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d
},
};
@@ -2211,7 +2211,7 @@ var gUnifiedExtensions = {
@@ -2212,7 +2212,7 @@ var gUnifiedExtensions = {
// If the new ID is not added in NOTIFICATION_IDS, consider handling the case
// in the "PopupNotificationsBeforeAnchor" handler elsewhere in this file.
getPopupAnchorID(aBrowser, aWindow) {
@@ -29,7 +29,7 @@ index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d
const attr = anchorID + "popupnotificationanchor";
if (!aBrowser[attr]) {
@@ -2222,7 +2222,7 @@ var gUnifiedExtensions = {
@@ -2223,7 +2223,7 @@ var gUnifiedExtensions = {
anchorID
// Anchor on the toolbar icon to position the popup right below the
// button.
@@ -38,7 +38,7 @@ index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d
}
return anchorID;
@@ -2547,7 +2547,7 @@ var gUnifiedExtensions = {
@@ -2548,7 +2548,7 @@ var gUnifiedExtensions = {
requestAnimationFrame(() => this.updateAttention());
},
@@ -47,7 +47,7 @@ index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d
// A list of extension widget IDs (possibly empty).
let widgetIDs;
@@ -2561,7 +2561,7 @@ var gUnifiedExtensions = {
@@ -2562,7 +2562,7 @@ var gUnifiedExtensions = {
}
// The list of overflowed extensions in the extensions panel.
@@ -56,7 +56,7 @@ index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d
"#overflowed-extensions-list"
);
@@ -2662,37 +2662,41 @@ var gUnifiedExtensions = {
@@ -2663,37 +2663,41 @@ var gUnifiedExtensions = {
);
template.replaceWith(template.content);
this._panel = document.getElementById("unified-extensions-panel");
@@ -123,7 +123,7 @@ index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d
if (!CustomizationHandler.isCustomizing()) {
if (aEvent) {
if (
@@ -2714,6 +2718,7 @@ var gUnifiedExtensions = {
@@ -2715,6 +2719,7 @@ var gUnifiedExtensions = {
// and no alternative content is available for display in the panel.
const policies = this.getActivePolicies();
if (
@@ -131,7 +131,7 @@ index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d
policies.length &&
!this.hasExtensionsInPanel(policies) &&
!this.isPrivateWindowMissingExtensionsWithoutPBMAccess() &&
@@ -2729,32 +2734,30 @@ var gUnifiedExtensions = {
@@ -2730,32 +2735,30 @@ var gUnifiedExtensions = {
this.blocklistAttentionInfo =
await AddonManager.getBlocklistAttentionInfo();
@@ -170,7 +170,7 @@ index fadcbfca95ee28140579430c0371baad0e2f216a..1947b4ab1c0b4ba0099147c9f13ae78d
triggerEvent: aEvent,
});
}
@@ -2941,18 +2944,20 @@ var gUnifiedExtensions = {
@@ -2942,18 +2945,20 @@ var gUnifiedExtensions = {
this._maybeMoveWidgetNodeBack(widgetId);
}

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml
index afa7f8e7dd74173bf2c696bd96f7e86e8b0126bc..4847c24923f673e91eb7fb65ea6b037f38062405 100644
index 2faed30e09511c381051bc40910a883d1d7bc10d..6ba2d0d91235ed33e4b4bad281c974b5960beaa2 100644
--- a/browser/base/content/browser-box.inc.xhtml
+++ b/browser/base/content/browser-box.inc.xhtml
@@ -25,7 +25,15 @@
@@ -25,7 +25,13 @@
</stack>
</vbox>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
@@ -15,6 +15,10 @@ index afa7f8e7dd74173bf2c696bd96f7e86e8b0126bc..4847c24923f673e91eb7fb65ea6b037f
+#include zen-tabbrowser-elements.inc.xhtml
<tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"/>
</tabbox>
<splitter id="ai-window-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="none" resizeafter="sibling" hidden="true"/>
@@ -34,3 +40,5 @@
</stack>
</vbox>
</hbox>
+</vbox>
+</hbox>

View File

@@ -1,19 +1,13 @@
diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/base/content/browser-fullScreenAndPointerLock.js
index f459f3ca4048c29a32832b46ba87de8552a0ab8a..d317676e6d12d756ddf5dfbffe73050de07c2375 100644
index 0e1aa344c084abdce40058278b12a042a4510997..50c06aaab823cb8572eee2ad53a7b709b1cfd084 100644
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -423,10 +423,10 @@ var FullScreen = {
@@ -425,8 +425,6 @@ 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
+ // : "";
- gURLBar.style.transform = gURLBar.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

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/browser-init.js b/browser/base/content/browser-init.js
index 02f601d859ea32557af572d2499ad8be75b684b5..b1a6f66a74f75150d7e2fbc50528965bb16cb4d9 100644
index 288a79e5fb4da24cffcb30fb4b8adc9604b15d26..bf9bd3e666dfb6298dbeec0546cae223a7bc68f0 100644
--- a/browser/base/content/browser-init.js
+++ b/browser/base/content/browser-init.js
@@ -198,6 +198,7 @@ var gBrowserInit = {
@@ -200,6 +200,7 @@ var gBrowserInit = {
},
onLoad() {
@@ -10,7 +10,7 @@ index 02f601d859ea32557af572d2499ad8be75b684b5..b1a6f66a74f75150d7e2fbc50528965b
gBrowser.addEventListener("DOMUpdateBlockedPopups", e =>
PopupAndRedirectBlockerObserver.handleEvent(e)
);
@@ -372,6 +373,7 @@ var gBrowserInit = {
@@ -375,6 +376,7 @@ var gBrowserInit = {
this._handleURIToLoad();

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 15ef352c147eff781d34a3e5fa02fa791bdd6188..b0784e817ad25c7a4983e9f1cb08b293de15a99d 100644
index 16cf3e201358d24c9216f9b06b0ba3b89684d32a..2cfa507bbdc96b8a293b18595d0beae031fe6119 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -31,6 +31,7 @@ ChromeUtils.defineESModuleGetters(this, {
@@ -33,6 +33,7 @@ ChromeUtils.defineESModuleGetters(this, {
"resource://gre/modules/ContextualIdentityService.sys.mjs",
CustomizableUI:
"moz-src:///browser/components/customizableui/CustomizableUI.sys.mjs",
@@ -10,7 +10,7 @@ index 15ef352c147eff781d34a3e5fa02fa791bdd6188..b0784e817ad25c7a4983e9f1cb08b293
DevToolsSocketStatus:
"resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
@@ -821,7 +822,12 @@ function UpdateBackForwardCommands(aWebNavigation) {
@@ -819,7 +820,12 @@ function UpdateBackForwardCommands(aWebNavigation) {
var backDisabled = backCommand.hasAttribute("disabled");
var forwardDisabled = forwardCommand.hasAttribute("disabled");
@@ -24,7 +24,7 @@ index 15ef352c147eff781d34a3e5fa02fa791bdd6188..b0784e817ad25c7a4983e9f1cb08b293
if (backDisabled) {
backCommand.removeAttribute("disabled");
} else {
@@ -2297,6 +2303,8 @@ var XULBrowserWindow = {
@@ -2305,6 +2311,8 @@ var XULBrowserWindow = {
AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser);
TranslationsParent.onLocationChange(gBrowser.selectedBrowser);
@@ -33,7 +33,7 @@ index 15ef352c147eff781d34a3e5fa02fa791bdd6188..b0784e817ad25c7a4983e9f1cb08b293
PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser);
if (!gMultiProcessBrowser) {
@@ -3808,7 +3816,7 @@ function warnAboutClosingWindow() {
@@ -3818,7 +3826,7 @@ function warnAboutClosingWindow() {
if (!isPBWindow && !toolbar.visible) {
return gBrowser.warnAboutClosingTabs(
@@ -42,7 +42,7 @@ index 15ef352c147eff781d34a3e5fa02fa791bdd6188..b0784e817ad25c7a4983e9f1cb08b293
gBrowser.closingTabsEnum.ALL
);
}
@@ -3848,7 +3856,7 @@ function warnAboutClosingWindow() {
@@ -3858,7 +3866,7 @@ function warnAboutClosingWindow() {
return (
isPBWindow ||
gBrowser.warnAboutClosingTabs(
@@ -51,7 +51,7 @@ index 15ef352c147eff781d34a3e5fa02fa791bdd6188..b0784e817ad25c7a4983e9f1cb08b293
gBrowser.closingTabsEnum.ALL
)
);
@@ -3873,7 +3881,7 @@ function warnAboutClosingWindow() {
@@ -3883,7 +3891,7 @@ function warnAboutClosingWindow() {
AppConstants.platform != "macosx" ||
isPBWindow ||
gBrowser.warnAboutClosingTabs(
@@ -60,7 +60,7 @@ index 15ef352c147eff781d34a3e5fa02fa791bdd6188..b0784e817ad25c7a4983e9f1cb08b293
gBrowser.closingTabsEnum.ALL
)
);
@@ -4795,6 +4803,9 @@ var ConfirmationHint = {
@@ -4806,6 +4814,9 @@ var ConfirmationHint = {
MozXULElement.insertFTLIfNeeded("toolkit/branding/brandings.ftl");
MozXULElement.insertFTLIfNeeded("browser/confirmationHints.ftl");
document.l10n.setAttributes(this._message, messageId, options.l10nArgs);

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js
index 3bd7b8f6025a7df4ce5cfb66916125bce9ef3991..c408ef829b7540aec72b2307e5d4bfa34109d6cd 100644
index 925d74575827340960706718a29426bdf079b47c..921feb0e4229706b4691a43c9fc1005cbfd90999 100644
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -249,6 +249,8 @@ var StarUI = {
@@ -33,7 +33,7 @@ index 3bd7b8f6025a7df4ce5cfb66916125bce9ef3991..c408ef829b7540aec72b2307e5d4bfa3
removeBookmarkButtonCommand: function SU_removeBookmarkButtonCommand() {
this._removeBookmarksOnPopupHidden = true;
this.panel.hidePopup();
@@ -1797,6 +1814,7 @@ var BookmarkingUI = {
@@ -1806,6 +1823,7 @@ var BookmarkingUI = {
document.getElementById("context-bookmarkpage"),
PanelMultiView.getViewNode(document, "panelMenuBookmarkThisPage"),
document.getElementById("pageAction-panel-bookmark"),

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc
index 8d97b6e669954a09afe6a46d1c79652264494e92..86877b983207c5f9852c9192ee0257a909c5ea7a 100644
index 139f7c2617f5e4843e0072435818c859def2f6bb..6ac1467b4117e2d76102d6977f13268827b4588f 100644
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -406,3 +406,4 @@
@@ -413,3 +413,4 @@
internal="true"/>
#endif
</keyset>

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/browser-sets.js b/browser/base/content/browser-sets.js
index 0bb581aa34ddeef1e3eb85b0fadd41a539b4b9d6..cbe2df8b1775cb8194007ee995fd91769618b48d 100644
index 94a05a510204c027e482fda33deaf3dc0d7471c9..79d37a7c7f29739d3ad2d9f6a3b3b8d638836b10 100644
--- a/browser/base/content/browser-sets.js
+++ b/browser/base/content/browser-sets.js
@@ -254,7 +254,7 @@ document.addEventListener(
@@ -266,7 +266,7 @@ document.addEventListener(
}
});

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
index 246d23a77960d25f78b163429a3ed28c7180ccd7..1c26485d8464413689767c8a38aadbcadcecae4d 100644
index ac82dcd286b5502d1ba38ed740813db08941eb7b..c26b3f0468ee6acd7716d4e8a24ad8cc84fce186 100644
--- a/browser/base/content/browser.xhtml
+++ b/browser/base/content/browser.xhtml
@@ -19,6 +19,7 @@
@@ -10,7 +10,7 @@ index 246d23a77960d25f78b163429a3ed28c7180ccd7..1c26485d8464413689767c8a38aadbca
persist="screenX screenY width height sizemode"
data-l10n-sync="true">
<head>
@@ -98,8 +99,10 @@
@@ -99,8 +100,10 @@
<title data-l10n-id="browser-main-window-default-title"></title>
@@ -21,7 +21,7 @@ index 246d23a77960d25f78b163429a3ed28c7180ccd7..1c26485d8464413689767c8a38aadbca
</head>
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
# All sets except for popupsets (commands, keys, and stringbundles)
@@ -132,9 +135,11 @@
@@ -133,9 +136,11 @@
</vbox>
</html:template>

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/main-popupset.inc.xhtml b/browser/base/content/main-popupset.inc.xhtml
index e688ba37c40ea602a32a84af6c1497d884ddc27b..ad8515eae1d4e697b9329d9d5babfd59679c9288 100644
index 79b604c5965ba03762acbf085c9288c73001ec24..d75d5481e5de93c592850e39d4b0b4fd07e12678 100644
--- a/browser/base/content/main-popupset.inc.xhtml
+++ b/browser/base/content/main-popupset.inc.xhtml
@@ -216,6 +216,10 @@
@@ -226,6 +226,10 @@
hidden="true"
tabspecific="true"
aria-labelledby="editBookmarkPanelTitle">
@@ -13,7 +13,7 @@ index e688ba37c40ea602a32a84af6c1497d884ddc27b..ad8515eae1d4e697b9329d9d5babfd59
<box class="panel-header">
<html:h1>
<html:span id="editBookmarkPanelTitle"/>
@@ -241,6 +245,7 @@
@@ -251,6 +255,7 @@
class="footer-button"/>
</html:moz-button-group>
</vbox>
@@ -21,7 +21,7 @@ index e688ba37c40ea602a32a84af6c1497d884ddc27b..ad8515eae1d4e697b9329d9d5babfd59
</panel>
</html:template>
@@ -636,6 +641,8 @@
@@ -656,6 +661,8 @@
#include popup-notifications.inc.xhtml

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
index 40dddda5a6191c2ac012767ca55ed5fa35c03a6b..2e96a7ca233529ee2b570f94154008be5b0088e3 100644
index 68c24f730d56f548cf1e286198a04f8363529378..71418c93ce7216d71412f2fa67295322bb73abad 100644
--- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -2,7 +2,7 @@

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.js b/browser/base/content/navigator-toolbox.js
index 7b776b15d52367a008ce6bf53dcfcbbe007b7453..da23f716c753f5a43f17bb5ed7a3d335891168c2 100644
index 15469e9d9b91c1eaef2578c9e43b6999edac3392..553402b41bc15f7cd99bf87c54416dc66d7c03e7 100644
--- a/browser/base/content/navigator-toolbox.js
+++ b/browser/base/content/navigator-toolbox.js
@@ -6,7 +6,7 @@
@@ -11,9 +11,9 @@ index 7b776b15d52367a008ce6bf53dcfcbbe007b7453..da23f716c753f5a43f17bb5ed7a3d335
const widgetOverflow = document.getElementById("widget-overflow");
function onPopupShowing(event) {
@@ -185,6 +185,7 @@ document.addEventListener(
@@ -184,6 +184,7 @@ document.addEventListener(
#forward-button,
#reload-button ,
#urlbar-go-button,
#reader-mode-button,
+ #zen-tabs-wrapper,
#picture-in-picture-button,
@@ -27,15 +27,15 @@ index 7b776b15d52367a008ce6bf53dcfcbbe007b7453..da23f716c753f5a43f17bb5ed7a3d335
gBrowser.handleNewTabMiddleClick(element, event);
break;
@@ -316,6 +318,7 @@ document.addEventListener(
@@ -318,6 +320,7 @@ document.addEventListener(
#downloads-button,
#fxa-toolbar-menu-button,
#unified-extensions-button,
+ #zen-site-data-icon-button,
#library-button
#library-button,
#split-view-button
`);
if (!element) {
@@ -398,6 +401,16 @@ document.addEventListener(
@@ -401,6 +404,16 @@ document.addEventListener(
gUnifiedExtensions.togglePanel(event);
break;

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/nsContextMenu.sys.mjs b/browser/base/content/nsContextMenu.sys.mjs
index b77c12da637ba31aca6e8100187d0ac14db33298..4fbec0dda932bcaa77ce714826ac8ab20b9e8e63 100644
index d9fbd3a9a78c993c89efa75be9e2ffc975158aba..e64382b32580c2d113774e76e3587002ce0aebad 100644
--- a/browser/base/content/nsContextMenu.sys.mjs
+++ b/browser/base/content/nsContextMenu.sys.mjs
@@ -376,6 +376,9 @@ export class nsContextMenu {
@@ -371,6 +371,9 @@ export class nsContextMenu {
this.initPDFItems();
this.initTextFragmentItems();

View File

@@ -6,7 +6,6 @@
# Styles used all over the browser
<linkset>
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-theme.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-animations.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-sidebar.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-buttons.css" />

View File

@@ -4,4 +4,10 @@
#include zen-commands.inc.xhtml
<keyset id="zenKeyset"></keyset>
<keyset id="zenKeyset">
# Prefetch these keys because they are being used by the native menu bar
# and they need to be available even before the XUL is fully loaded and
# our KBS sysmtem is initialized.
<key id="zen-workspace-forward" />
<key id="zen-workspace-backward" />
</keyset>

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
index 5dcbb1705625746afd7c57b7a6044c4fa2f00afd..c0872057ec65fe8ebdb2f81e47198dec5d6f0faf 100644
index 8acc1e5a97f769dc76d30ca0534f28b0a4511ab5..bd54169f976d3abe7d122b0efc0fa0d0626179eb 100644
--- a/browser/components/BrowserGlue.sys.mjs
+++ b/browser/components/BrowserGlue.sys.mjs
@@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

View File

@@ -1,22 +0,0 @@
diff --git a/browser/components/aboutlogins/content/components/login-list.css b/browser/components/aboutlogins/content/components/login-list.css
index e8d2077ca425d9a2b924aa6ac6ba8ada36b76615..95a8ab3dcff832f16068b6739526e8e29f0b4e26 100644
--- a/browser/components/aboutlogins/content/components/login-list.css
+++ b/browser/components/aboutlogins/content/components/login-list.css
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
:host {
- border-inline-end: 1px solid var(--in-content-border-color);
+ border: 1px solid var(--in-content-border-color);
background-color: var(--background-color-box);
display: flex;
flex-direction: column;
@@ -162,3 +162,8 @@ ol {
font-size: 0.85em;
color: var(--text-color-deemphasized);
}
+
+:host {
+ border-radius: 5px;
+ margin: 10px;
+}

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/asrouter/modules/FeatureCallout.sys.mjs b/browser/components/asrouter/modules/FeatureCallout.sys.mjs
index 4ea9c9e88a1831dad7e42ebd8d0dd507102e8280..316aa626e525f05caac7f315e0ea7ae9d822b6af 100644
index 80dd8b5e357acc9decea6cf621c4868d547a0eb3..8a5fea6ed1a62a5930bafffcbbde3ce3292e42a1 100644
--- a/browser/components/asrouter/modules/FeatureCallout.sys.mjs
+++ b/browser/components/asrouter/modules/FeatureCallout.sys.mjs
@@ -777,6 +777,7 @@ export class FeatureCallout {
@@ -778,6 +778,7 @@ export class FeatureCallout {
) {
return false;
}

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js
index d6393080aa8aff6c0f7b2043fd408b6f6249d0c4..bf37b46c4743b7619393c730720204380635666a 100644
index d016811caa6c1ecc947fd705f6e1b27e3b5a12a5..89f2a9ec9ebd80e744ed0118e1b3c164151cf2b8 100644
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -608,10 +608,12 @@ const PanelUI = {
@@ -619,10 +619,12 @@ const PanelUI = {
if (hasKids && !this.navbar.hasAttribute("nonemptyoverflow")) {
this.navbar.setAttribute("nonemptyoverflow", "true");
this.overflowPanel.setAttribute("hasfixeditems", "true");
@@ -15,7 +15,7 @@ index d6393080aa8aff6c0f7b2043fd408b6f6249d0c4..bf37b46c4743b7619393c73072020438
}
},
@@ -959,7 +961,7 @@ const PanelUI = {
@@ -970,7 +972,7 @@ const PanelUI = {
el.removeAttribute("data-lazy-l10n-id");
});

View File

@@ -1,11 +1,10 @@
diff --git a/browser/components/preferences/jar.mn b/browser/components/preferences/jar.mn
index 7c5f6e9053f119a790f83a68c75ee11a6c172d98..cb0e1386318e8a8df24dfbbf8430d0a09fe07d16 100644
index 5e53352fdbd25d2aed40d0117c3ad7072b9acf8c..0f400864ba7cc850d212ddeeefb71a06376e845f 100644
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/jar.mn
@@ -37,3 +37,5 @@ browser.jar:
content/browser/preferences/widgets/security-privacy-card.mjs (widgets/security-privacy/security-privacy-card/security-privacy-card.mjs)
content/browser/preferences/widgets/security-privacy-card.css (widgets/security-privacy/security-privacy-card/security-privacy-card.css)
@@ -42,3 +42,5 @@ browser.jar:
content/browser/preferences/widgets/sync-device-name.mjs (widgets/sync-device-name/sync-device-name.mjs)
content/browser/preferences/widgets/sync-engines-list.mjs (widgets/sync-engine-list/sync-engines-list.mjs)
content/browser/preferences/widgets/sync-engines-list.css (widgets/sync-engine-list/sync-engines-list.css)
+
+ content/browser/preferences/zen-settings.js
\ No newline at end of file

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
index bfddd91e6b524f2ebced985f5d12a4963e5c6075..7e80c0a293aae6356e53d9c9760017290e97ffa0 100644
index d218a04e0ab44e6a55e368566c97df95e939565b..59f038e59fe1a8554a8b112c5ac33e700b71c79c 100644
--- a/browser/components/preferences/main.inc.xhtml
+++ b/browser/components/preferences/main.inc.xhtml
@@ -141,7 +141,8 @@
@@ -48,7 +48,8 @@
<!-- Browser layout -->
<groupbox data-category="paneGeneral"
data-subcategory="layout"
@@ -12,7 +12,7 @@ index bfddd91e6b524f2ebced985f5d12a4963e5c6075..7e80c0a293aae6356e53d9c976001729
<label><html:h2 data-l10n-id="browser-layout-header"/></label>
<radiogroup id="browserLayoutRadioGroup" preference="sidebar.verticalTabs">
<radio id="browserLayoutHorizontalTabs" data-l10n-id="browser-layout-horizontal-tabs" value="false"/>
@@ -346,6 +347,7 @@
@@ -253,6 +254,7 @@
languages-customize-add.label,
" />
</hbox>

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
index a184086f10d6a919c8125ab5d7728319256b3b73..7c826000ccdc8a55a12a08bdc2c547d886e5610c 100644
index 6f99cbf973d414ffd4036d17740abe963629db37..520dcce0adb06c5ebfee8c76f72f7d7b40e106da 100644
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -1117,6 +1117,11 @@ let SETTINGS_CONFIG = {
@@ -1729,6 +1729,11 @@ SettingGroupManager.registerGroups({
id: "browserRestoreSession",
l10nId: "startup-restore-windows-and-tabs",
},
@@ -14,7 +14,7 @@ index a184086f10d6a919c8125ab5d7728319256b3b73..7c826000ccdc8a55a12a08bdc2c547d8
{
id: "windowsLaunchOnLogin",
l10nId: "windows-launch-on-login",
@@ -1700,7 +1705,7 @@ function getBundleForLocales(newLocales) {
@@ -3133,7 +3138,7 @@ function getBundleForLocales(newLocales) {
])
);
return new Localization(

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index a0e16b375f0ad7ef58bf68d7574453ef37d4557f..2d5b5a0715b5ed8ebe592eebea0219a6cde17b52 100644
index 7d6835b8636f771943b8081b7d56f579812026c2..97227eec4baeffd39b23ed6194ce7fa108c3b862 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -118,6 +118,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
@@ -124,6 +124,7 @@ ChromeUtils.defineLazyGetter(this, "gSubDialog", function () {
styleSheets: [
"chrome://browser/skin/preferences/dialog.css",
"chrome://browser/skin/preferences/preferences.css",
@@ -10,7 +10,7 @@ index a0e16b375f0ad7ef58bf68d7574453ef37d4557f..2d5b5a0715b5ed8ebe592eebea0219a6
],
resizeCallback: async ({ title, frame }) => {
// Search within main document and highlight matched keyword.
@@ -225,6 +226,10 @@ function init_all() {
@@ -344,6 +345,10 @@ function init_all() {
register_module("paneSearch", gSearchPane);
register_module("panePrivacy", gPrivacyPane);
register_module("paneContainers", gContainersPane);
@@ -19,5 +19,5 @@ index a0e16b375f0ad7ef58bf68d7574453ef37d4557f..2d5b5a0715b5ed8ebe592eebea0219a6
+ register_module("paneZenCKS", gZenCKSSettings);
+ register_module("paneZenMarketplace", gZenMarketplaceManager);
for (let [subPane, config] of Object.entries(CONFIG_PANES)) {
subPane = friendlyPrefCategoryNameToInternalName(subPane);
for (let [id, config] of Object.entries(CONFIG_PANES)) {
SettingPaneManager.registerPane(id, config);

View File

@@ -1,9 +1,9 @@
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d102b4fe0 100644
index a1aec823d6266d69ff02aa8523d2da999a0871b9..559f2ea12e53dd19f24e7953db4388456b97f02c 100644
--- a/browser/components/preferences/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml
@@ -45,6 +45,8 @@
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-group.css" />
@@ -46,6 +46,8 @@
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-pane.css" />
<link rel="stylesheet" href="chrome://browser/content/preferences/widgets/setting-control.css" />
+#include zen-preferences-links.xhtml
@@ -11,7 +11,7 @@ index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d
<link rel="localization" href="branding/brand.ftl"/>
<link rel="localization" href="browser/browser.ftl"/>
<!-- Used by fontbuilder.js -->
@@ -113,6 +115,11 @@
@@ -115,6 +117,11 @@
<hbox flex="1">
<vbox class="navigation">
@@ -23,7 +23,7 @@ index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d
<!-- category list -->
<richlistbox id="categories" data-l10n-id="category-list" data-l10n-attrs="aria-label">
<richlistitem id="category-general"
@@ -125,6 +132,50 @@
@@ -127,6 +134,50 @@
<label class="category-name" flex="1" data-l10n-id="pane-general-title"></label>
</richlistitem>
@@ -74,7 +74,7 @@ index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d
<richlistitem id="category-home"
class="category"
value="paneHome"
@@ -236,11 +287,6 @@
@@ -242,11 +293,6 @@
<html:a href="about:policies" target="_blank" data-l10n-id="managed-notice"/>
</hbox>
</hbox>
@@ -86,7 +86,7 @@ index 993554d64efa6ce39fbcc01d4676a69199e158ff..e69aec388162997ef7cb93481cfedb9d
</hbox>
</hbox>
<vbox id="mainPrefPane">
@@ -254,6 +300,10 @@
@@ -260,6 +306,10 @@
#include sync.inc.xhtml
#include experimental.inc.xhtml
#include moreFromMozilla.inc.xhtml

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/screenshots/overlay/overlay.css b/browser/components/screenshots/overlay/overlay.css
index ee2740fc48e9b70fe17b0f27b60053209516dbbf..cc0270e0eb28c3e60216460b02d62111abb970de 100644
index 43a5d2109ad107ce1c79eef7cb8635bc1fa813f7..c1e5648d0e71826119bda1bc18c5d16886bab8fd 100644
--- a/browser/components/screenshots/overlay/overlay.css
+++ b/browser/components/screenshots/overlay/overlay.css
@@ -196,6 +196,9 @@

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/search/SearchUIUtils.sys.mjs b/browser/components/search/SearchUIUtils.sys.mjs
index 15fdb0cd7664c2b49977902d7f4c7a117d82cf15..6aedbc18de6604b63b2586e7d9745a4c4e7e38ae 100644
index 65daa1402a52e252360386e60471f726c1387bb3..be8f588316a8a4d7f33a324bf11f9e1f19def32d 100644
--- a/browser/components/search/SearchUIUtils.sys.mjs
+++ b/browser/components/search/SearchUIUtils.sys.mjs
@@ -434,7 +434,7 @@ export var SearchUIUtils = {
@@ -444,7 +444,7 @@ export var SearchUIUtils = {
triggeringSearchEngine: engine.name,
},
});

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionFile.sys.mjs b/browser/components/sessionstore/SessionFile.sys.mjs
index 31140cb8be3b529a0952ca8dc55165690b0e2120..605c9e0aa84da0a2d3171a0573e8cd95e27bd0c4 100644
index 5580838acd72bf0e1189d367984859529d89f5b4..e5fa6076a9cc6ada016ccc4e129cad455010a522 100644
--- a/browser/components/sessionstore/SessionFile.sys.mjs
+++ b/browser/components/sessionstore/SessionFile.sys.mjs
@@ -22,6 +22,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -10,7 +10,7 @@ index 31140cb8be3b529a0952ca8dc55165690b0e2120..605c9e0aa84da0a2d3171a0573e8cd95
});
const PREF_UPGRADE_BACKUP = "browser.sessionstore.upgradeBackup.latestBuildID";
@@ -380,7 +381,7 @@ var SessionFileInternal = {
@@ -381,7 +382,7 @@ var SessionFileInternal = {
this._readOrigin = result.origin;
result.noFilesFound = noFilesFound;

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStartup.sys.mjs b/browser/components/sessionstore/SessionStartup.sys.mjs
index be23213ae9ec7e59358a17276c6c3764d38d9996..229bb1346f9349892acb1e9e05109b28f5a5b45f 100644
index 86600ffb5178599ab23270a964064ca657a3283f..ffb22990e7d9e1b79f276fe5c1eb38f2b869a57b 100644
--- a/browser/components/sessionstore/SessionStartup.sys.mjs
+++ b/browser/components/sessionstore/SessionStartup.sys.mjs
@@ -40,6 +40,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -28,7 +28,7 @@ index be23213ae9ec7e59358a17276c6c3764d38d9996..229bb1346f9349892acb1e9e05109b28
if (this._initialState == null) {
// No valid session found.
this._sessionType = this.NO_SESSION;
@@ -335,12 +338,7 @@ export var SessionStartup = {
@@ -336,12 +339,7 @@ export var SessionStartup = {
isAutomaticRestoreEnabled() {
if (this._resumeSessionEnabled === null) {
this._resumeSessionEnabled =

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b30ab5f08 100644
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..959e73ab86bdb78203e3aed0c939c1b9acbe4897 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -127,6 +127,9 @@ const TAB_EVENTS = [
@@ -20,7 +20,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
});
ChromeUtils.defineLazyGetter(lazy, "blankURI", () => {
@@ -1238,10 +1242,7 @@ var SessionStoreInternal = {
@@ -1261,10 +1265,7 @@ var SessionStoreInternal = {
*/
get willAutoRestore() {
return (
@@ -32,7 +32,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
);
},
@@ -1911,6 +1912,9 @@ var SessionStoreInternal = {
@@ -1934,6 +1935,9 @@ var SessionStoreInternal = {
case "TabPinned":
case "TabUnpinned":
case "SwapDocShells":
@@ -42,7 +42,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
this.saveStateDelayed(win);
break;
case "TabGroupCreate":
@@ -2020,6 +2024,10 @@ var SessionStoreInternal = {
@@ -2044,6 +2048,10 @@ var SessionStoreInternal = {
this._windows[aWindow.__SSi].isTaskbarTab = true;
}
@@ -53,7 +53,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
let tabbrowser = aWindow.gBrowser;
// add tab change listeners to all already existing tabs
@@ -2107,6 +2115,7 @@ var SessionStoreInternal = {
@@ -2131,6 +2139,7 @@ var SessionStoreInternal = {
null,
"sessionstore-one-or-no-tab-restored"
);
@@ -61,7 +61,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
this._deferredAllWindowsRestored.resolve();
}
// this window was opened by _openWindowWithState
@@ -2151,7 +2160,6 @@ var SessionStoreInternal = {
@@ -2175,7 +2184,6 @@ var SessionStoreInternal = {
if (closedWindowState) {
let newWindowState;
if (
@@ -69,7 +69,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
!lazy.SessionStartup.willRestore()
) {
// We want to split the window up into pinned tabs and unpinned tabs.
@@ -2215,6 +2223,15 @@ var SessionStoreInternal = {
@@ -2239,6 +2247,15 @@ var SessionStoreInternal = {
});
this._shouldRestoreLastSession = false;
}
@@ -85,7 +85,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
if (this._restoreLastWindow && aWindow.toolbar.visible) {
// always reset (if not a popup window)
@@ -2465,7 +2482,7 @@ var SessionStoreInternal = {
@@ -2491,7 +2508,7 @@ var SessionStoreInternal = {
// 2) Flush the window.
// 3) When the flush is complete, revisit our decision to store the window
// in _closedWindows, and add/remove as necessary.
@@ -94,7 +94,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
this.maybeSaveClosedWindow(winData, isLastWindow);
}
@@ -2486,7 +2503,7 @@ var SessionStoreInternal = {
@@ -2512,7 +2529,7 @@ var SessionStoreInternal = {
// Save non-private windows if they have at
// least one saveable tab or are the last window.
@@ -103,7 +103,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
this.maybeSaveClosedWindow(winData, isLastWindow);
if (!isLastWindow && winData.closedId > -1) {
@@ -2582,6 +2599,7 @@ var SessionStoreInternal = {
@@ -2608,6 +2625,7 @@ var SessionStoreInternal = {
let alreadyStored = winIndex != -1;
// If sidebar command is truthy, i.e. sidebar is open, store sidebar settings
let shouldStore = hasSaveableTabs || isLastWindow;
@@ -111,7 +111,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
if (shouldStore && !alreadyStored) {
let index = this._closedWindows.findIndex(win => {
@@ -3373,7 +3391,7 @@ var SessionStoreInternal = {
@@ -3408,7 +3426,7 @@ var SessionStoreInternal = {
if (!isPrivateWindow && tabState.isPrivate) {
return;
}
@@ -120,7 +120,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
return;
}
@@ -4089,6 +4107,12 @@ var SessionStoreInternal = {
@@ -4129,6 +4147,12 @@ var SessionStoreInternal = {
Math.min(tabState.index, tabState.entries.length)
);
tabState.pinned = false;
@@ -133,7 +133,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
if (inBackground === false) {
aWindow.gBrowser.selectedTab = newTab;
@@ -4525,6 +4549,7 @@ var SessionStoreInternal = {
@@ -4565,6 +4589,7 @@ var SessionStoreInternal = {
// Append the tab if we're opening into a different window,
tabIndex: aSource == aTargetWindow ? pos : Infinity,
pinned: state.pinned,
@@ -141,7 +141,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
userContextId: state.userContextId,
skipLoad: true,
preferredRemoteType,
@@ -5374,7 +5399,7 @@ var SessionStoreInternal = {
@@ -5414,7 +5439,7 @@ var SessionStoreInternal = {
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
let tab = tabbrowser.tabs[i];
@@ -150,7 +150,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
removableTabs.push(tab);
}
}
@@ -5483,7 +5508,7 @@ var SessionStoreInternal = {
@@ -5525,7 +5550,7 @@ var SessionStoreInternal = {
// collect the data for all windows
for (ix in this._windows) {
@@ -159,7 +159,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
// window data is still in _statesToRestore
continue;
}
@@ -5625,11 +5650,12 @@ var SessionStoreInternal = {
@@ -5668,11 +5693,12 @@ var SessionStoreInternal = {
}
let tabbrowser = aWindow.gBrowser;
@@ -173,7 +173,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
// update the internal state data for this window
for (let tab of tabs) {
if (tab == aWindow.FirefoxViewHandler.tab) {
@@ -5640,6 +5666,9 @@ var SessionStoreInternal = {
@@ -5683,6 +5709,9 @@ var SessionStoreInternal = {
tabsData.push(tabData);
}
@@ -183,7 +183,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
// update tab group state for this window
winData.groups = [];
for (let tabGroup of aWindow.gBrowser.tabGroups) {
@@ -5652,7 +5681,7 @@ var SessionStoreInternal = {
@@ -5695,7 +5724,7 @@ var SessionStoreInternal = {
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
// since it's only inserted into the tab strip after it's selected).
if (aWindow.FirefoxViewHandler.tab?.selected) {
@@ -192,7 +192,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
winData.title = tabbrowser.tabs[0].label;
}
winData.selected = selectedIndex;
@@ -5765,8 +5794,8 @@ var SessionStoreInternal = {
@@ -5810,8 +5839,8 @@ var SessionStoreInternal = {
// selectTab represents.
let selectTab = 0;
if (overwriteTabs) {
@@ -203,7 +203,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
selectTab = Math.min(selectTab, winData.tabs.length);
}
@@ -5788,6 +5817,7 @@ var SessionStoreInternal = {
@@ -5833,6 +5862,7 @@ var SessionStoreInternal = {
if (overwriteTabs) {
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
if (!tabbrowser.tabs[i].selected) {
@@ -211,17 +211,20 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
tabbrowser.removeTab(tabbrowser.tabs[i]);
}
}
@@ -5821,6 +5851,9 @@ var SessionStoreInternal = {
@@ -5866,6 +5896,12 @@ var SessionStoreInternal = {
savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id)
);
}
+ if (winData.isZenUnsynced) {
+ aWindow.document.documentElement.setAttribute("zen-unsynced-window", "true");
+ }
+ aWindow.gZenFolders?.restoreDataFromSessionStore(winData.folders);
+ aWindow.gZenViewSplitter?.restoreDataFromSessionStore(winData.splitViewData);
+ aWindow.gZenWorkspaces?.restoreWorkspacesFromSessionStore(winData);
// Move the originally open tabs to the end.
if (initialTabs) {
@@ -6372,6 +6405,25 @@ var SessionStoreInternal = {
@@ -6419,6 +6455,25 @@ var SessionStoreInternal = {
// Most of tabData has been restored, now continue with restoring
// attributes that may trigger external events.
@@ -247,7 +250,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
if (tabData.pinned) {
tabbrowser.pinTab(tab);
@@ -7290,7 +7342,7 @@ var SessionStoreInternal = {
@@ -7343,7 +7398,7 @@ var SessionStoreInternal = {
let groupsToSave = new Map();
for (let tIndex = 0; tIndex < window.tabs.length; ) {
@@ -256,7 +259,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..41bddb36fef7bb74212c261f1c07e40b
// Adjust window.selected
if (tIndex + 1 < window.selected) {
window.selected -= 1;
@@ -7305,7 +7357,7 @@ var SessionStoreInternal = {
@@ -7358,7 +7413,7 @@ var SessionStoreInternal = {
);
// We don't want to increment tIndex here.
continue;

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
index 82721356d191055bec0d4b0ca49e481221988801..ffa95005b96ea384433f18dace63faa35d2d21bf 100644
index 82721356d191055bec0d4b0ca49e481221988801..238d6ae1a4261e098d1e986e3c3df813d9d625f3 100644
--- a/browser/components/sessionstore/TabState.sys.mjs
+++ b/browser/components/sessionstore/TabState.sys.mjs
@@ -85,7 +85,24 @@ class _TabState {
@@ -27,12 +27,3 @@ index 82721356d191055bec0d4b0ca49e481221988801..ffa95005b96ea384433f18dace63faa3
tabData.userContextId = tab.userContextId || 0;
@@ -98,7 +115,7 @@ class _TabState {
// Copy data from the tab state cache only if the tab has fully finished
// restoring. We don't want to overwrite data contained in __SS_data.
- this.copyFromCache(browser.permanentKey, tabData, options);
+ this.copyFromCache(tab.permanentKey, tabData, options);
// After copyFromCache() was called we check for properties that are kept
// in the cache only while the tab is pending or restoring. Once that

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sidebar/browser-sidebar.js b/browser/components/sidebar/browser-sidebar.js
index 220c3c83fa09daaec433803a4655a20114a137a6..1ef8adc3ecfa61839bb993f7fc090133bffe77db 100644
index bd6db85732e6e99ca51ce9c4c1a7d469199cf8cb..6c7859c1014baf4e343714ef797cf558d065e189 100644
--- a/browser/components/sidebar/browser-sidebar.js
+++ b/browser/components/sidebar/browser-sidebar.js
@@ -793,7 +793,7 @@ var SidebarController = {
@@ -8,6 +8,6 @@ index 220c3c83fa09daaec433803a4655a20114a137a6..1ef8adc3ecfa61839bb993f7fc090133
let contentArea = document.getElementById("tabbrowser-tabbox");
- let browser = document.getElementById("browser");
+ let browser = document.getElementById("tabbrowser-tabbox");
[...browser.children].forEach((node, i) => {
node.style.order = i + 1;
[...browser.children].forEach((node, i, children) => {
node.style.order = this._positionStart ? i + 1 : children.length - i;
});

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
index bcd7689e9d68ef8b171c327188174334c4271e21..0a95e1137fdf4b63e0d841776ad934da1a513c6f 100644
index 9c5e92fbd555d328ce09c0cf0ff8078584f68478..2af7a428bc830d8c12b3d3c0af375c97e6942994 100644
--- a/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
+++ b/browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs
@@ -938,6 +938,7 @@ export class AsyncTabSwitcher {
@@ -939,6 +939,7 @@ export class AsyncTabSwitcher {
this.tabbrowser._printPreviewBrowsers.has(browser) ||
this.tabbrowser.splitViewBrowsers.includes(browser) ||
lazy.PictureInPicture.isOriginatingBrowser(browser)

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/TabUnloader.sys.mjs b/browser/components/tabbrowser/TabUnloader.sys.mjs
index 2a3fcbe9dfb6328cabba891697990e2467973f6e..22fdaaefa71b3c37cbccbd7ae4db044b1057f1f2 100644
index aefccef39f0b81176a5710a794e8a5e2650d6507..e073c65790df6d55e827a4f4596199f4f1a99a57 100644
--- a/browser/components/tabbrowser/TabUnloader.sys.mjs
+++ b/browser/components/tabbrowser/TabUnloader.sys.mjs
@@ -52,7 +52,7 @@ let CRITERIA_WEIGHT = 1;

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/TabsList.sys.mjs b/browser/components/tabbrowser/TabsList.sys.mjs
index b394a980869d5e5df01b6afdd81e0f41c090e6ec..236c99db0dfa5ebcba50d55c1e4eb6ab7b8110b2 100644
index 400a69449e6477da754b06530eef7c15ea9ad887..7dd22f481dade16286533acffc2c2321d4c34b41 100644
--- a/browser/components/tabbrowser/TabsList.sys.mjs
+++ b/browser/components/tabbrowser/TabsList.sys.mjs
@@ -87,7 +87,7 @@ class TabsListBase {

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/content/browser-ctrlTab.js b/browser/components/tabbrowser/content/browser-ctrlTab.js
index 958728cde19dd7cc24692baa89e11fcab816ab82..32e2b6af2536133f170bd5e14c47392ded8440eb 100644
index 3330dc133c120e7fbeecd2a36c71f9dfba60b3fb..0243cdfe67e5eb3f68fc7cde66bb3809e79bd6c3 100644
--- a/browser/components/tabbrowser/content/browser-ctrlTab.js
+++ b/browser/components/tabbrowser/content/browser-ctrlTab.js
@@ -249,7 +249,8 @@ var ctrlTab = {
@@ -252,7 +252,8 @@ var ctrlTab = {
},
get tabList() {
@@ -12,7 +12,7 @@ index 958728cde19dd7cc24692baa89e11fcab816ab82..32e2b6af2536133f170bd5e14c47392d
},
init: function ctrlTab_init() {
@@ -460,7 +461,7 @@ var ctrlTab = {
@@ -457,7 +458,7 @@ var ctrlTab = {
// If the tab is hidden, don't add it to the list unless it's selected
// (Normally hidden tabs would be unhidden when selected, but that doesn't
// happen for Firefox View).
@@ -21,7 +21,7 @@ index 958728cde19dd7cc24692baa89e11fcab816ab82..32e2b6af2536133f170bd5e14c47392d
return;
}
@@ -484,7 +485,7 @@ var ctrlTab = {
@@ -481,7 +482,7 @@ var ctrlTab = {
},
open: function ctrlTab_open() {
@@ -30,7 +30,7 @@ index 958728cde19dd7cc24692baa89e11fcab816ab82..32e2b6af2536133f170bd5e14c47392d
return;
}
@@ -763,7 +764,7 @@ var ctrlTab = {
@@ -751,7 +752,7 @@ var ctrlTab = {
_initRecentlyUsedTabs() {
this._recentlyUsedTabs = Array.prototype.filter.call(
gBrowser.tabs,

View File

@@ -1,18 +1,18 @@
diff --git a/browser/components/tabbrowser/content/drag-and-drop.js b/browser/components/tabbrowser/content/drag-and-drop.js
index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129da99905f 100644
index 57800333445ec7850742145527e04ae8d504b0bb..3a5015c391c594c94aa77a7ff9b08762d36276f6 100644
--- a/browser/components/tabbrowser/content/drag-and-drop.js
+++ b/browser/components/tabbrowser/content/drag-and-drop.js
@@ -32,6 +32,9 @@
@@ -35,6 +35,9 @@
* @returns {MozTabbrowserTab|vbox}
*/
const elementToMove = element => {
+ if (element.group?.hasAttribute("split-view-group")) {
+ return element.group;
+ }
if (isTab(element)) {
if (isTab(element) || isSplitViewWrapper(element)) {
return element;
}
@@ -112,6 +115,9 @@
@@ -115,6 +118,9 @@
}
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
@@ -22,7 +22,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
if (
(dropEffect == "move" || dropEffect == "copy") &&
document == draggedTab.ownerDocument &&
@@ -130,10 +136,6 @@
@@ -133,10 +139,6 @@
// Pinned tabs in expanded vertical mode are on a grid format and require
// different logic to drag and drop.
@@ -33,7 +33,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
this._animateTabMove(event);
return;
}
@@ -266,6 +268,15 @@
@@ -269,6 +271,15 @@
this._tabDropIndicator.hidden = true;
event.stopPropagation();
@@ -49,7 +49,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
if (draggedTab && dropEffect == "copy") {
let duplicatedDraggedTab;
let duplicatedTabs = [];
@@ -291,8 +302,9 @@
@@ -294,8 +305,9 @@
let translateOffsetY = oldTranslateY % tabHeight;
let newTranslateX = oldTranslateX - translateOffsetX;
let newTranslateY = oldTranslateY - translateOffsetY;
@@ -61,10 +61,10 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
if (this._isContainerVerticalPinnedGrid(draggedTab)) {
// Update both translate axis for pinned vertical expanded tabs
@@ -308,8 +320,8 @@
@@ -311,8 +323,8 @@
}
} else {
let tabs = this._tabbrowserTabs.ariaFocusableItems.slice(
let tabs = this._tabbrowserTabs.dragAndDropElements.slice(
- isPinned ? 0 : numPinned,
- isPinned ? numPinned : undefined
+ isPinned ? (essential ? 0 : gBrowser._numZenEssentials) : numPinned,
@@ -72,7 +72,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
);
let size = this._tabbrowserTabs.verticalMode ? "height" : "width";
let screenAxis = this._tabbrowserTabs.verticalMode
@@ -362,11 +374,13 @@
@@ -365,11 +377,13 @@
this._dragToPinPromoCard,
];
let shouldPin =
@@ -86,7 +86,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
isTab(draggedTab) &&
draggedTab.pinned &&
this._tabbrowserTabs.arrowScrollbox.contains(event.target);
@@ -384,6 +398,7 @@
@@ -387,6 +401,7 @@
(oldTranslateY && oldTranslateY != newTranslateY);
} else if (this._tabbrowserTabs.verticalMode) {
shouldTranslate &&= oldTranslateY && oldTranslateY != newTranslateY;
@@ -94,7 +94,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
} else {
shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX;
}
@@ -440,7 +455,7 @@
@@ -443,7 +458,7 @@
item.removeAttribute("tabdrop-samewindow");
resolve();
};
@@ -103,15 +103,15 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
postTransitionCleanup();
} else {
let onTransitionEnd = transitionendEvent => {
@@ -581,6 +596,7 @@
@@ -584,6 +599,7 @@
let nextItem = this._tabbrowserTabs.ariaFocusableItems[newIndex];
let nextItem = this._tabbrowserTabs.dragAndDropElements[newIndex];
let tabGroup = isTab(nextItem) && nextItem.group;
+ if (gZenViewSplitter.handleTabDrop(event, urls, replace, inBackground)) return;
gBrowser.loadTabs(urls, {
inBackground,
replace,
@@ -618,7 +634,16 @@
@@ -621,7 +637,16 @@
this._expandGroupOnDrop(draggedTab);
}
this._resetTabsAfterDrop(draggedTab.ownerDocument);
@@ -129,7 +129,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
if (
dt.mozUserCancelled ||
dt.dropEffect != "none" ||
@@ -822,7 +847,10 @@
@@ -825,7 +850,10 @@
_getDragTarget(event, { ignoreSides = false } = {}) {
let { target } = event;
while (target) {
@@ -141,7 +141,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
break;
}
target = target.parentNode;
@@ -839,14 +867,17 @@
@@ -842,14 +870,17 @@
return null;
}
}
@@ -161,7 +161,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
!this._tabbrowserTabs.expandOnHover
);
}
@@ -877,7 +908,8 @@
@@ -880,7 +911,8 @@
isTabGroupLabel(draggedTab) &&
draggedTab._dragData?.expandGroupOnDrop
) {
@@ -171,7 +171,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
}
}
@@ -1055,7 +1087,6 @@
@@ -1058,7 +1090,6 @@
// using updateDragImage. On Linux, we can use a panel.
if (platform == "win" || platform == "macosx") {
captureListener = function () {
@@ -179,7 +179,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
};
} else {
// Create a panel to use it in setDragImage
@@ -1093,7 +1124,6 @@
@@ -1096,7 +1127,6 @@
);
dragImageOffset = dragImageOffset * scale;
}
@@ -187,7 +187,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
// _dragData.offsetX/Y give the coordinates that the mouse should be
// positioned relative to the corner of the new window created upon
@@ -1112,7 +1142,7 @@
@@ -1115,7 +1145,7 @@
let dropEffect = this.getDropEffectForTabDrag(event);
let isMovingInTabStrip = !fromTabList && dropEffect == "move";
let collapseTabGroupDuringDrag =
@@ -196,7 +196,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
tab._dragData = {
offsetX: this._tabbrowserTabs.verticalMode
@@ -1122,7 +1152,7 @@
@@ -1125,7 +1155,7 @@
? event.screenY - window.screenY - tabOffset
: event.screenY - window.screenY,
scrollPos:
@@ -205,7 +205,7 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
? this._tabbrowserTabs.pinnedTabsContainer.scrollPosition
: this._tabbrowserTabs.arrowScrollbox.scrollPosition,
screenX: event.screenX,
@@ -1149,6 +1179,7 @@
@@ -1152,6 +1182,7 @@
if (collapseTabGroupDuringDrag) {
tab.group.collapsed = true;
@@ -213,31 +213,31 @@ index 97b931c3c7385a52d20204369fcf6d6999053687..bd64a97046d2a62e842cc922764ad129
}
}
}
@@ -1173,6 +1204,7 @@
@@ -1176,6 +1207,7 @@
if (tabStripItemElement.hasAttribute("dragtarget")) {
return;
}
+ return;
let isPinned = tab.pinned;
let numPinned = gBrowser.pinnedTabCount;
let allTabs = this._tabbrowserTabs.ariaFocusableItems;
@@ -1598,7 +1630,6 @@
let dragAndDropElements = this._tabbrowserTabs.dragAndDropElements;
@@ -1601,7 +1633,6 @@
for (let item of this._tabbrowserTabs.ariaFocusableItems) {
for (let item of this._tabbrowserTabs.dragAndDropElements) {
item = elementToMove(item);
- item.style.transform = "";
item.removeAttribute("multiselected-move-together");
delete item._moveTogetherSelectedTabsData;
}
@@ -2426,7 +2457,6 @@
for (let item of this._tabbrowserTabs.ariaFocusableItems) {
@@ -2429,7 +2460,6 @@
for (let item of this._tabbrowserTabs.dragAndDropElements) {
this._resetGroupTarget(item);
item = elementToMove(item);
- item.style.transform = "";
}
this._tabbrowserTabs.removeAttribute("movingtab-group");
this._tabbrowserTabs.removeAttribute("movingtab-ungroup");
@@ -2457,17 +2487,14 @@
@@ -2460,17 +2490,14 @@
tab.style.left = "";
tab.style.top = "";
tab.style.maxWidth = "";

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d83bee7390 100644
index 6528da245d922e2ccdb59cbf8106055bc34d1e74..1cd3395961a80e3b48582794b5b5365c9b8386b3 100644
--- a/browser/components/tabbrowser/content/tab.js
+++ b/browser/components/tabbrowser/content/tab.js
@@ -21,6 +21,7 @@
@@ -10,18 +10,19 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
<stack class="tab-icon-stack">
<hbox class="tab-throbber"/>
<hbox class="tab-icon-pending"/>
@@ -37,8 +38,10 @@
@@ -38,9 +39,11 @@
<hbox class="tab-secondary-label">
<label class="tab-icon-sound-label tab-icon-sound-pip-label" data-l10n-id="browser-tab-audio-pip" role="presentation"/>
</hbox>
+ <label class="tab-reset-pin-label" data-l10n-id="tab-reset-pin-label" role="presentation"/>
</vbox>
<image class="tab-note-icon" role="presentation"/>
<image class="tab-close-button close-icon" role="button" data-l10n-id="tabbrowser-close-tabs-button" data-l10n-args='{"tabCount": 1}' keyNav="false"/>
+ <image class="tab-reset-button reset-icon" role="button" data-l10n-id="tabbrowser-unload-tab-button" data-l10n-args='{"tabCount": 1}' keyNav="false"/>
</hbox>
</stack>
`;
@@ -84,7 +87,7 @@
@@ -86,7 +89,7 @@
".tab-content":
"pinned,selected=visuallyselected,multiselected,titlechanged,attention",
".tab-icon-stack":
@@ -30,7 +31,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
".tab-throbber":
"fadein,pinned,busy,progress,selected=visuallyselected",
".tab-icon-pending":
@@ -93,9 +96,9 @@
@@ -95,9 +98,9 @@
"src=image,requestcontextid,fadein,pinned,selected=visuallyselected,busy,crashed,sharing,pictureinpicture,pending,discarded",
".tab-sharing-icon-overlay": "sharing,selected=visuallyselected,pinned",
".tab-icon-overlay":
@@ -42,7 +43,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
".tab-label-container":
"pinned,selected=visuallyselected,labeldirection",
".tab-label":
@@ -186,7 +189,7 @@
@@ -188,7 +191,7 @@
}
set _visuallySelected(val) {
@@ -51,7 +52,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
return;
}
@@ -222,11 +225,21 @@
@@ -224,11 +227,21 @@
}
get visible() {
@@ -78,7 +79,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
}
get hidden() {
@@ -305,7 +318,7 @@
@@ -307,7 +320,7 @@
return false;
}
@@ -87,7 +88,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
}
get lastAccessed() {
@@ -382,7 +395,18 @@
@@ -384,7 +397,18 @@
}
get group() {
@@ -107,7 +108,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
}
get splitview() {
@@ -473,6 +497,8 @@
@@ -489,6 +513,8 @@
this.style.MozUserFocus = "ignore";
} else if (
event.target.classList.contains("tab-close-button") ||
@@ -116,7 +117,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
event.target.classList.contains("tab-icon-overlay") ||
event.target.classList.contains("tab-audio-button")
) {
@@ -527,6 +553,10 @@
@@ -543,6 +569,10 @@
this.style.MozUserFocus = "";
}
@@ -127,7 +128,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
on_click(event) {
if (event.button != 0) {
return;
@@ -587,6 +617,14 @@
@@ -603,6 +633,14 @@
// (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true;
}
@@ -142,7 +143,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..1cc31b04e0165f7ae6ffc377da08f8d8
}
on_dblclick(event) {
@@ -610,6 +648,8 @@
@@ -626,6 +664,8 @@
animate: true,
triggeringEvent: event,
});

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078ef3b1fca 100644
index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..64b6fc581be1791ef9a750e03ab9a91c92325be3 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -386,6 +386,7 @@
@@ -398,6 +398,7 @@
* @type {MozBrowser[]}
*/
get splitViewBrowsers() {
@@ -10,7 +10,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
const browsers = [];
if (this.#activeSplitView) {
for (const tab of this.#activeSplitView.tabs) {
@@ -450,15 +451,66 @@
@@ -462,15 +463,66 @@
return this.tabContainer.visibleTabs;
}
@@ -79,7 +79,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
set selectedTab(val) {
if (
gSharedTabWarning.willShowSharedTabWarning(val) ||
@@ -534,6 +586,10 @@
@@ -546,6 +598,10 @@
userContextId = parseInt(tabArgument.getAttribute("usercontextid"), 10);
}
@@ -90,7 +90,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (tabArgument && tabArgument.linkedBrowser) {
remoteType = tabArgument.linkedBrowser.remoteType;
initialBrowsingContextGroupId =
@@ -613,6 +669,7 @@
@@ -625,6 +681,7 @@
this.tabpanels.appendChild(panel);
let tab = this.tabs[0];
@@ -98,7 +98,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
tab.linkedPanel = uniqueId;
this._selectedTab = tab;
this._selectedBrowser = browser;
@@ -898,13 +955,18 @@
@@ -912,13 +969,18 @@
}
this.showTab(aTab);
@@ -118,7 +118,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
aTab.setAttribute("pinned", "true");
this._updateTabBarForPinnedTabs();
@@ -917,11 +979,18 @@
@@ -931,11 +993,18 @@
}
this.#handleTabMove(aTab, () => {
@@ -138,7 +138,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
});
aTab.style.marginInlineStart = "";
@@ -1098,6 +1167,9 @@
@@ -1112,6 +1181,9 @@
let LOCAL_PROTOCOLS = ["chrome:", "about:", "resource:", "data:"];
@@ -148,7 +148,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (
aIconURL &&
!LOCAL_PROTOCOLS.some(protocol => aIconURL.startsWith(protocol))
@@ -1107,6 +1179,9 @@
@@ -1121,6 +1193,9 @@
);
return;
}
@@ -158,7 +158,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
let browser = this.getBrowserForTab(aTab);
browser.mIconURL = aIconURL;
@@ -1379,7 +1454,6 @@
@@ -1393,7 +1468,6 @@
// Preview mode should not reset the owner
if (!this._previewMode && !oldTab.selected) {
@@ -166,7 +166,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
}
let lastRelatedTab = this._lastRelatedTabMap.get(oldTab);
@@ -1470,6 +1544,7 @@
@@ -1484,6 +1558,7 @@
if (!this._previewMode) {
newTab.recordTimeFromUnloadToReload();
newTab.updateLastAccessed();
@@ -174,7 +174,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
oldTab.updateLastAccessed();
// if this is the foreground window, update the last-seen timestamps.
if (this.ownerGlobal == BrowserWindowTracker.getTopWindow()) {
@@ -1622,6 +1697,9 @@
@@ -1636,6 +1711,9 @@
}
let activeEl = document.activeElement;
@@ -184,7 +184,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// If focus is on the old tab, move it to the new tab.
if (activeEl == oldTab) {
newTab.focus();
@@ -1945,6 +2023,11 @@
@@ -1959,6 +2037,11 @@
}
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
@@ -196,7 +196,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (!aLabel || aLabel.includes("about:reader?")) {
return false;
}
@@ -2053,7 +2136,7 @@
@@ -2067,7 +2150,7 @@
newIndex = this.selectedTab._tPos + 1;
}
@@ -205,7 +205,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (this.isTabGroupLabel(targetTab)) {
throw new Error(
"Replacing a tab group label with a tab is not supported"
@@ -2328,6 +2411,7 @@
@@ -2342,6 +2425,7 @@
uriIsAboutBlank,
userContextId,
skipLoad,
@@ -213,7 +213,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
} = {}) {
let b = document.createXULElement("browser");
// Use the JSM global to create the permanentKey, so that if the
@@ -2401,8 +2485,7 @@
@@ -2415,8 +2499,7 @@
// we use a different attribute name for this?
b.setAttribute("name", name);
}
@@ -223,7 +223,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
b.setAttribute("transparent", "true");
}
@@ -2567,7 +2650,7 @@
@@ -2581,7 +2664,7 @@
let panel = this.getPanel(browser);
let uniqueId = this._generateUniquePanelID();
@@ -232,7 +232,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
aTab.linkedPanel = uniqueId;
// Inject the <browser> into the DOM if necessary.
@@ -2626,8 +2709,8 @@
@@ -2640,8 +2723,8 @@
// If we transitioned from one browser to two browsers, we need to set
// hasSiblings=false on both the existing browser and the new browser.
if (this.tabs.length == 2) {
@@ -243,7 +243,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
} else {
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
}
@@ -2814,7 +2897,6 @@
@@ -2828,7 +2911,6 @@
this.selectedTab = this.addTrustedTab(BROWSER_NEW_TAB_URL, {
tabIndex: tab._tPos + 1,
userContextId: tab.userContextId,
@@ -251,7 +251,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
focusUrlBar: true,
});
resolve(this.selectedBrowser);
@@ -2923,6 +3005,9 @@
@@ -2938,6 +3020,9 @@
schemelessInput,
hasValidUserGestureActivation = false,
textDirectiveUserActivation = false,
@@ -261,7 +261,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
} = {}
) {
// all callers of addTab that pass a params object need to pass
@@ -2933,10 +3018,17 @@
@@ -2948,10 +3033,17 @@
);
}
@@ -279,7 +279,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// If we're opening a foreground tab, set the owner by default.
ownerTab ??= inBackground ? null : this.selectedTab;
@@ -2944,6 +3036,7 @@
@@ -2959,6 +3051,7 @@
if (this.selectedTab.owner) {
this.selectedTab.owner = null;
}
@@ -287,7 +287,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// Find the tab that opened this one, if any. This is used for
// determining positioning, and inherited attributes such as the
@@ -2996,6 +3089,21 @@
@@ -3011,6 +3104,21 @@
noInitialLabel,
skipBackgroundNotify,
});
@@ -309,7 +309,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (insertTab) {
// Insert the tab into the tab container in the correct position.
this.#insertTabAtIndex(t, {
@@ -3004,6 +3112,7 @@
@@ -3019,6 +3127,7 @@
ownerTab,
openerTab,
pinned,
@@ -317,7 +317,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
bulkOrderedOpen,
tabGroup: tabGroup ?? openerTab?.group,
});
@@ -3022,6 +3131,7 @@
@@ -3037,6 +3146,7 @@
openWindowInfo,
skipLoad,
triggeringRemoteType,
@@ -325,7 +325,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
}));
if (focusUrlBar) {
@@ -3146,6 +3256,12 @@
@@ -3161,6 +3271,12 @@
}
}
@@ -338,19 +338,25 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// Additionally send pinned tab events
if (pinned) {
this.#notifyPinnedStatus(t);
@@ -3349,10 +3465,10 @@
@@ -3375,6 +3491,7 @@
isAdoptingGroup = false,
isUserTriggered = false,
telemetryUserCreateSource = "unknown",
+ forSplitView = false,
} = {}
) {
if (!tabs?.length) {
- throw new Error("Cannot create tab group with zero tabs");
if (
@@ -3385,9 +3502,6 @@
!this.isSplitViewWrapper(tabOrSplitView)
)
) {
- throw new Error(
- "Cannot create tab group with zero tabs or split views"
- );
}
if (!color) {
@@ -3373,9 +3489,14 @@
@@ -3408,9 +3522,14 @@
label,
isAdoptingGroup
);
@@ -358,16 +364,16 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
+ if (forSplitView) {
+ group.setAttribute('split-view-group', true);
+ }
+ group.essential = tabs.some(tab => tab.hasAttribute("essential"));
+ group.pinned = group.essential || tabs.some(tab => tab.pinned);
+ group.essential = tabsAndSplitViews.some(tab => tab.hasAttribute("essential"));
+ group.pinned = group.essential || tabsAndSplitViews.some(tab => tab.pinned);
+ if (forSplitView && !insertBefore?.group?.isZenFolder) insertBefore = insertBefore?.group ?? insertBefore;
+ insertBefore.before(
group,
- insertBefore?.group ?? insertBefore
);
group.addTabs(tabs);
group.addTabs(tabsAndSplitViews);
@@ -3496,7 +3617,7 @@
@@ -3531,7 +3650,7 @@
}
this.#handleTabMove(tab, () =>
@@ -376,7 +382,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
);
}
@@ -3698,6 +3819,7 @@
@@ -3746,6 +3865,7 @@
openWindowInfo,
skipLoad,
triggeringRemoteType,
@@ -384,7 +390,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
}
) {
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
@@ -3767,6 +3889,7 @@
@@ -3815,6 +3935,7 @@
openWindowInfo,
name,
skipLoad,
@@ -392,7 +398,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
});
}
@@ -3955,7 +4078,7 @@
@@ -4003,7 +4124,7 @@
// Add a new tab if needed.
if (!tab) {
let createLazyBrowser =
@@ -401,7 +407,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
let url = "about:blank";
if (tabData.entries?.length) {
@@ -3992,8 +4115,10 @@
@@ -4040,8 +4161,10 @@
insertTab: false,
skipLoad: true,
preferredRemoteType,
@@ -413,7 +419,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (select) {
tabToSelect = tab;
}
@@ -4005,7 +4130,8 @@
@@ -4053,7 +4176,8 @@
this.pinTab(tab);
// Then ensure all the tab open/pinning information is sent.
this._fireTabOpen(tab, {});
@@ -423,7 +429,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
let { groupId } = tabData;
const tabGroup = tabGroupWorkingData.get(groupId);
// if a tab refers to a tab group we don't know, skip any group
@@ -4019,7 +4145,10 @@
@@ -4067,7 +4191,10 @@
tabGroup.stateData.id,
tabGroup.stateData.color,
tabGroup.stateData.collapsed,
@@ -435,7 +441,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
);
tabsFragment.appendChild(tabGroup.node);
}
@@ -4064,9 +4193,23 @@
@@ -4112,9 +4239,23 @@
// to remove the old selected tab.
if (tabToSelect) {
let leftoverTab = this.selectedTab;
@@ -451,15 +457,15 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
+ gZenWorkspaces._initialTab._shouldRemove = true;
+ }
+ }
}
+ }
+ else {
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
+ }
}
+ this._hasAlreadyInitializedZenSessionStore = true;
if (tabs.length > 1 || !tabs[0].selected) {
this._updateTabsAfterInsert();
@@ -4257,11 +4400,14 @@
@@ -4305,11 +4446,14 @@
if (ownerTab) {
tab.owner = ownerTab;
}
@@ -475,7 +481,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (
!bulkOrderedOpen &&
((openerTab &&
@@ -4273,7 +4419,7 @@
@@ -4321,7 +4465,7 @@
let lastRelatedTab =
openerTab && this._lastRelatedTabMap.get(openerTab);
let previousTab = lastRelatedTab || openerTab || this.selectedTab;
@@ -484,16 +490,16 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
tabGroup = previousTab.group;
}
if (
@@ -4284,7 +4430,7 @@
) {
elementIndex = Infinity;
@@ -4337,7 +4481,7 @@
previousTab.splitview
) + 1;
} else if (previousTab.visible) {
- elementIndex = previousTab.elementIndex + 1;
+ elementIndex = (typeof previousTab.elementIndex === 'undefined') ? elementIndex : (previousTab.elementIndex + 1);
} else if (previousTab == FirefoxViewHandler.tab) {
elementIndex = 0;
}
@@ -4312,14 +4458,14 @@
@@ -4365,14 +4509,14 @@
}
// Ensure index is within bounds.
if (tab.pinned) {
@@ -512,16 +518,16 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (pinned && !itemAfter?.pinned) {
itemAfter = null;
@@ -4330,7 +4476,7 @@
@@ -4385,7 +4529,7 @@
this.tabContainer._invalidateCachedTabs();
- if (tabGroup) {
+ if (tabGroup && !tabGroup.hasAttribute("split-view-group")) {
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
// Place at the front of, or between tabs in, the same tab group
this.tabContainer.insertBefore(tab, itemAfter);
@@ -4358,7 +4504,11 @@
if (
(this.isTab(itemAfter) && itemAfter.group == tabGroup) ||
this.isSplitViewWrapper(itemAfter)
@@ -4416,7 +4560,11 @@
const tabContainer = pinned
? this.tabContainer.pinnedTabsContainer
: this.tabContainer;
@@ -532,8 +538,8 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
+ }
}
this._updateTabsAfterInsert();
@@ -4366,6 +4516,7 @@
if (tab.group?.collapsed) {
@@ -4431,6 +4579,7 @@
if (pinned) {
this._updateTabBarForPinnedTabs();
}
@@ -541,7 +547,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
TabBarVisibility.update();
}
@@ -4916,6 +5067,7 @@
@@ -4983,6 +5132,7 @@
telemetrySource,
} = {}
) {
@@ -549,7 +555,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
// can be considered equivalent to closing the window.
if (
@@ -5005,6 +5157,7 @@
@@ -5072,6 +5222,7 @@
if (lastToClose) {
this.removeTab(lastToClose, aParams);
}
@@ -557,7 +563,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
} catch (e) {
console.error(e);
}
@@ -5043,6 +5196,12 @@
@@ -5110,6 +5261,12 @@
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
}
@@ -570,7 +576,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// Handle requests for synchronously removing an already
// asynchronously closing tab.
if (!animate && aTab.closing) {
@@ -5057,6 +5216,9 @@
@@ -5124,6 +5281,9 @@
// state).
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
let isLastTab = this.#isLastTabInWindow(aTab);
@@ -580,12 +586,12 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (
!this._beginRemoveTab(aTab, {
closeWindowFastpath: true,
@@ -5105,7 +5267,13 @@
@@ -5172,7 +5332,13 @@
// We're not animating, so we can cancel the animation stopwatch.
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
aTab._closeTimeAnimTimerId = null;
- this._endRemoveTab(aTab);
+ if (animate && !gReduceMotion && !gZenUIManager.testingEnabled) {
+ if (animate && !gReduceMotion && !(gZenUIManager.testingEnabled && !gZenUIManager.profilingEnabled)) {
+ gZenVerticalTabsManager.animateTabClose(aTab, (animate && !gReduceMotion)).then(() => {
+ this._endRemoveTab(aTab);
+ });
@@ -595,7 +601,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
return;
}
@@ -5239,7 +5407,7 @@
@@ -5306,7 +5472,7 @@
closeWindowWithLastTab != null
? closeWindowWithLastTab
: !window.toolbar.visible ||
@@ -604,7 +610,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (closeWindow) {
// We've already called beforeunload on all the relevant tabs if we get here,
@@ -5263,6 +5431,7 @@
@@ -5330,6 +5496,7 @@
newTab = true;
}
@@ -612,7 +618,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
aTab._endRemoveArgs = [closeWindow, newTab];
// swapBrowsersAndCloseOther will take care of closing the window without animation.
@@ -5303,13 +5472,7 @@
@@ -5370,13 +5537,7 @@
aTab._mouseleave();
if (newTab) {
@@ -627,7 +633,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
} else {
TabBarVisibility.update();
}
@@ -5442,6 +5605,7 @@
@@ -5509,6 +5670,7 @@
this.tabs[i]._tPos = i;
}
@@ -635,7 +641,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (!this._windowIsClosing) {
// update tab close buttons state
this.tabContainer._updateCloseButtons();
@@ -5663,6 +5827,7 @@
@@ -5732,6 +5894,7 @@
}
let excludeTabs = new Set(aExcludeTabs);
@@ -643,7 +649,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// If this tab has a successor, it should be selectable, since
// hiding or closing a tab removes that tab as a successor.
@@ -5675,13 +5840,13 @@
@@ -5744,13 +5907,13 @@
!excludeTabs.has(aTab.owner) &&
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
) {
@@ -659,7 +665,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
);
let tab = this.tabContainer.findNextTab(aTab, {
@@ -5697,7 +5862,7 @@
@@ -5766,7 +5929,7 @@
}
if (tab) {
@@ -668,7 +674,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
}
// If no qualifying visible tab was found, see if there is a tab in
@@ -5718,7 +5883,7 @@
@@ -5787,7 +5950,7 @@
});
}
@@ -677,7 +683,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
}
_blurTab(aTab) {
@@ -5729,7 +5894,7 @@
@@ -5798,7 +5961,7 @@
* @returns {boolean}
* False if swapping isn't permitted, true otherwise.
*/
@@ -686,7 +692,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// Do not allow transfering a private tab to a non-private window
// and vice versa.
if (
@@ -5783,6 +5948,7 @@
@@ -5852,6 +6015,7 @@
// fire the beforeunload event in the process. Close the other
// window if this was its last tab.
if (
@@ -694,7 +700,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
!remoteBrowser._beginRemoveTab(aOtherTab, {
adoptedByTab: aOurTab,
closeWindowWithLastTab: true,
@@ -5794,7 +5960,7 @@
@@ -5863,7 +6027,7 @@
// If this is the last tab of the window, hide the window
// immediately without animation before the docshell swap, to avoid
// about:blank being painted.
@@ -703,7 +709,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (closeWindow) {
let win = aOtherTab.ownerGlobal;
win.windowUtils.suppressAnimation(true);
@@ -5918,11 +6084,13 @@
@@ -5987,11 +6151,13 @@
}
// Finish tearing down the tab that's going away.
@@ -717,7 +723,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
this.setTabTitle(aOurTab);
@@ -6124,10 +6292,10 @@
@@ -6193,10 +6359,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
}
@@ -730,7 +736,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
aTab.selected ||
aTab.closing ||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
@@ -6185,7 +6353,8 @@
@@ -6254,7 +6420,8 @@
*
* @param {MozTabbrowserTab|MozTabbrowserTabGroup|MozTabbrowserTabGroup.labelElement} aTab
*/
@@ -740,7 +746,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (this.tabs.length == 1) {
return null;
}
@@ -6209,12 +6378,14 @@
@@ -6278,12 +6445,14 @@
}
// tell a new window to take the "dropped" tab
@@ -756,7 +762,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
}
/**
@@ -6319,7 +6490,7 @@
@@ -6388,7 +6557,7 @@
* `true` if element is a `<tab-group>`
*/
isTabGroup(element) {
@@ -765,7 +771,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
}
/**
@@ -6404,8 +6575,8 @@
@@ -6473,8 +6642,8 @@
}
// Don't allow mixing pinned and unpinned tabs.
@@ -776,7 +782,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
} else {
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
}
@@ -6431,10 +6602,16 @@
@@ -6500,10 +6669,16 @@
this.#handleTabMove(
element,
() => {
@@ -795,7 +801,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
neighbor.after(element);
} else {
@@ -6492,23 +6669,31 @@
@@ -6561,23 +6736,31 @@
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
if (this.isTabGroupLabel(targetElement)) {
targetElement = targetElement.group;
@@ -833,7 +839,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
} else if (!element.pinned && targetElement && targetElement.pinned) {
// If the caller asks to move an unpinned element next to a pinned
// tab, move the unpinned element to be the first unpinned element
@@ -6521,14 +6706,34 @@
@@ -6590,14 +6773,34 @@
// move the tab group right before the first unpinned tab.
// 4. Moving a tab group and the first unpinned tab is grouped:
// move the tab group right before the first unpinned tab's tab group.
@@ -869,7 +875,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
element.pinned
? this.tabContainer.pinnedTabsContainer
: this.tabContainer;
@@ -6537,7 +6742,7 @@
@@ -6606,7 +6809,7 @@
element,
() => {
if (moveBefore) {
@@ -878,10 +884,10 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
} else if (targetElement) {
targetElement.after(element);
} else {
@@ -6607,10 +6812,10 @@
@@ -6676,10 +6879,10 @@
* @param {TabMetricsContext} [metricsContext]
*/
moveTabToGroup(aTab, aGroup, metricsContext) {
moveTabToExistingGroup(aTab, aGroup, metricsContext) {
- if (!this.isTab(aTab)) {
+ if (!this.isTab(aTab) && !aTab.hasAttribute('split-view-group')) {
throw new Error("Can only move a tab into a tab group");
@@ -891,7 +897,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
return;
}
if (aTab.group && aTab.group.id === aGroup.id) {
@@ -6656,6 +6861,7 @@
@@ -6751,6 +6954,7 @@
let state = {
tabIndex: tab._tPos,
@@ -899,7 +905,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
};
if (tab.visible) {
state.elementIndex = tab.elementIndex;
@@ -6682,7 +6888,7 @@
@@ -6777,7 +6981,7 @@
let changedTabGroup =
previousTabState.tabGroupId != currentTabState.tabGroupId;
@@ -908,7 +914,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
tab.dispatchEvent(
new CustomEvent("TabMove", {
bubbles: true,
@@ -6723,6 +6929,10 @@
@@ -6818,6 +7022,10 @@
moveActionCallback();
@@ -919,7 +925,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
// Clear tabs cache after moving nodes because the order of tabs may have
// changed.
this.tabContainer._invalidateCachedTabs();
@@ -6815,6 +7025,8 @@
@@ -6910,6 +7118,8 @@
params.userContextId = aTab.getAttribute("usercontextid");
}
let newTab = this.addWebTab("about:blank", params);
@@ -928,7 +934,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
let newBrowser = this.getBrowserForTab(newTab);
aTab.container.tabDragAndDrop.finishAnimateTabMove();
@@ -7623,7 +7835,7 @@
@@ -7718,7 +7928,7 @@
// preventDefault(). It will still raise the window if appropriate.
break;
}
@@ -937,7 +943,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
window.focus();
aEvent.preventDefault();
break;
@@ -7640,7 +7852,6 @@
@@ -7735,7 +7945,6 @@
}
case "TabGroupCollapse":
aEvent.target.tabs.forEach(tab => {
@@ -945,7 +951,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
});
break;
case "TabGroupCreateByUser":
@@ -7800,7 +8011,9 @@
@@ -7895,7 +8104,9 @@
let filter = this._tabFilters.get(tab);
if (filter) {
@@ -955,7 +961,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
let listener = this._tabListeners.get(tab);
if (listener) {
@@ -8589,6 +8802,7 @@
@@ -8698,6 +8909,7 @@
aWebProgress.isTopLevel
) {
this.mTab.setAttribute("busy", "true");
@@ -963,7 +969,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
gBrowser._tabAttrModified(this.mTab, ["busy"]);
this.mTab._notselectedsinceload = !this.mTab.selected;
}
@@ -8670,6 +8884,7 @@
@@ -8778,6 +8990,7 @@
// known defaults. Note we use the original URL since about:newtab
// redirects to a prerendered page.
const shouldRemoveFavicon =
@@ -971,7 +977,7 @@ index 42027bfa55eab8ea9298a7d425f2ded45188f7f3..d69787a3a57dcccce8616457d7eca078
!this.mBrowser.mIconURL &&
!ignoreBlank &&
!(originalLocation.spec in FAVICON_DEFAULTS);
@@ -9623,7 +9838,7 @@ var TabContextMenu = {
@@ -9803,7 +10016,7 @@ var TabContextMenu = {
);
contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !this.multiselected;

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607fb699424 100644
index 9abf115062e7c86196d7cb6b8ac82a9bb63b5a65..9a38d7dc10403c1ee721b6abf33d525a4aa1f821 100644
--- a/browser/components/tabbrowser/content/tabgroup.js
+++ b/browser/components/tabbrowser/content/tabgroup.js
@@ -14,11 +14,11 @@
@@ -78,7 +78,20 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
this.#updateLabelAriaAttributes();
@@ -143,6 +162,8 @@
@@ -132,17 +151,21 @@
let tabGroupCreateDetail = this.#wasCreatedByAdoption
? { isAdoptingGroup: true }
: {};
+ if (!this.hasAttribute('drag-image')) {
this.dispatchEvent(
new CustomEvent("TabGroupCreate", {
bubbles: true,
detail: tabGroupCreateDetail,
})
);
+ }
// Reset `wasCreatedByAdoption` to default of false so that we only
// claim that a tab group was created by adoption the first time it
// mounts after getting created by `Tabbrowser.adoptTabGroup`.
this.#wasCreatedByAdoption = false;
}
@@ -87,7 +100,7 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
resetDefaultGroupName = () => {
this.#defaultGroupName = "";
@@ -211,7 +232,10 @@
@@ -211,7 +234,10 @@
}
});
}
@@ -99,7 +112,7 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
}
get color() {
@@ -305,6 +329,9 @@
@@ -305,6 +331,9 @@
}
set collapsed(val) {
@@ -109,7 +122,7 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
if (!!val == this.collapsed) {
return;
}
@@ -391,7 +418,6 @@
@@ -391,7 +420,6 @@
tabGroupName,
})
.then(result => {
@@ -117,7 +130,7 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
});
}
@@ -466,13 +492,65 @@
@@ -466,13 +494,65 @@
* @returns {MozTabbrowserTab[]}
*/
get tabs() {
@@ -188,15 +201,15 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
}
/**
@@ -553,7 +631,6 @@
addTabs(tabs, metricsContext) {
for (let tab of tabs) {
if (tab.pinned) {
- tab.ownerGlobal.gBrowser.unpinTab(tab);
}
let tabToMove =
this.ownerGlobal === tab.ownerGlobal
@@ -616,7 +693,7 @@
@@ -560,7 +640,6 @@
);
} else {
if (tabOrSplitView.pinned) {
- tabOrSplitView.ownerGlobal.gBrowser.unpinTab(tabOrSplitView);
}
let tabToMove =
this.ownerGlobal === tabOrSplitView.ownerGlobal
@@ -625,7 +704,7 @@
*/
on_click(event) {
let isToggleElement =
@@ -205,7 +218,7 @@ index 394b2af2e187b82bb3e98ebcdc6e66b63036e20d..e92927612abf12631c384a8f54b6a607
event.target === this.#overflowCountLabel;
if (isToggleElement && event.button === 0) {
event.preventDefault();
@@ -687,5 +764,6 @@
@@ -696,5 +775,6 @@
}
}

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