Compare commits

...

73 Commits

Author SHA1 Message Date
mr. m
fb1575d875 fix: Fixed window controls not being accessible on fullscreen when element separation is 0, b=(no-bug), c=tabs 2025-04-19 19:46:25 +02:00
mr. m
004b946716 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2025-04-19 13:52:34 +02:00
mr. m
6400722712 fix: fixed urlbar being selected on workspace change, b=(closes #7741), c=workspaces 2025-04-19 13:52:25 +02:00
mr. m
d9ec28459e chore: Disabled Auto-Pip once we have propper settings UI for it, b=(no-bug), c=no-component 2025-04-19 13:48:00 +02:00
mr. m
407c1d24af Merge pull request #7740 from Cheese-Space/patch-1
remove --cask flag from mac install instructions as it isn't necessary
2025-04-19 13:14:30 +02:00
mr. m
de6d8d1153 fix: Windows applications being shifted half a pixel to the top, b=(no-bug), c=no-component 2025-04-19 12:57:42 +02:00
Cheese_space
3eb10fc05b removed --cask flag from mac install instructions as it isn't necessary
Signed-off-by: Cheese_space <99285740+Cheese-Space@users.noreply.github.com>
2025-04-19 12:17:10 +02:00
mr. m
1ab6f77f95 feat: Make PiP checkbox disable the entire feature, not just video controls, b=(no-bug), c=no-component 2025-04-19 10:40:19 +02:00
mr. m
c1b15b59db chore: Bump version and small fixes, b=(no-bug), c=tabs 2025-04-19 10:34:32 +02:00
mr. m
3dae5a6d47 fix: Fixed links on the README, b=(no-bug), c=no-component 2025-04-18 22:20:56 +02:00
mr. m
dab2646054 fix: Crashes when opening the overflow menu multiple times on macos, b=(closes #7718), c=no-component 2025-04-18 19:13:14 +02:00
mr. m
ad0485d651 Fix workflow failure for windows
Signed-off-by: mr. m  <91018726+mauro-balades@users.noreply.github.com>
2025-04-18 00:30:34 +02:00
mr. m
46bbbccdc9 fix: Window controls not expanding on split views and element separation on 0 also not expanding them, b=(closes #7694), c=tabs 2025-04-17 21:12:06 +02:00
mr. m
ee28417a4c fix: Enable Restore pinned tabs to their originally pinned URL on startup setting does not work, b=(bug #7453), c=tabs 2025-04-17 20:00:07 +02:00
mr. m
746ac1eec7 chore: Format before release, b=(no-bug), c=split-view 2025-04-17 18:51:26 +02:00
mr. m
8b67c4fdd1 fix: Fixed recalculating split view on compact mode, b=(no-bug), c=split-view 2025-04-17 18:40:59 +02:00
mr. m
c3e658d46a fix: Split view calculating the wrong side of split view, b=(no-bug), c=split-view 2025-04-17 18:26:04 +02:00
mr. m
ebded1a73b Merge pull request #7688 from sporocyst/CompactFullMTrans
Smooth transition from fullscreen in compact mode
2025-04-17 17:05:38 +02:00
mr. m
cf879a5c23 Update zen-compact-mode.css
Signed-off-by: mr. m  <91018726+mauro-balades@users.noreply.github.com>
2025-04-17 17:05:27 +02:00
sporocyst
4aa3e5b34d Opacity 0 when Compact Fullscreen
Signed-off-by: sporocyst <sporocyst.tw@gmail.com>
2025-04-17 22:18:43 +08:00
mr. m
303e6066e2 Bumped version to 1.11.4b
Signed-off-by: mr. m  <91018726+mauro-balades@users.noreply.github.com>
2025-04-17 14:42:23 +02:00
mr. m
861cd15240 Merge pull request #7677 from zen-browser/revert-7675-dev 2025-04-17 13:45:25 +02:00
mr. m
d695ddb91a Revert "feat: improve tab switching with trackpad" 2025-04-17 04:45:17 -07:00
mr. m
7abb2edb2f Merge pull request #7675 from mathieutu/dev
feat: improve tab switching with trackpad
2025-04-17 12:54:33 +02:00
Mathieu TUDISCO
dfe8abd496 feat: improve tab switching with trackpad 2025-04-17 12:42:25 +02:00
mr. m
61b384ee56 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2025-04-17 11:13:31 +02:00
mr. m
d71a890430 fix: Fixed performance issue when closing multiple tabs, b=(closes #7507), c=common 2025-04-17 11:13:03 +02:00
mr. m
2c85a85fff Merge pull request #7672 from mathieutu/dev 2025-04-17 11:00:28 +02:00
mr. m
ce6074530f Merge branch 'dev' into dev 2025-04-17 11:00:18 +02:00
Mathieu TUDISCO
e20228153c fix: closes #7274 - Fixed mouses simulating swipes with Forward and Back buttons 2025-04-17 10:43:08 +02:00
mr. m
e431170435 fix: Split views not selected still having the pending attribute, b=(no-bug), c=split-view, tabs 2025-04-17 00:36:43 +02:00
mr. m
c671d1e389 fix: Revert export from 31a5e70b26 (diff-0dad6ae9e720c6b380d48f7e19654910c30256bacc25567e1319a927bace7e5f), b=(no-bug), c=no-component 2025-04-16 19:51:48 +02:00
mr. m
31a5e70b26 chore: Re-export all patches, b=(no-bug), c=no-component 2025-04-16 17:05:46 +02:00
mr. m
0c68c72b29 fix: Inconsistent spacing with the native firefox sidebar on compact mode (multiple toolbars), b=(closes #7118), c=compact-mode 2025-04-16 16:50:15 +02:00
mr. m
2b158fdf57 style: Changed commit template to display a cleaner message, b=(no-bug), c=no-component 2025-04-16 16:23:25 +02:00
mr. m
dd005b31a4 feat: no-bug - Improved tab blur next selection, r=workspaces 2025-04-16 12:50:21 +02:00
mr. m
0b467cc149 fix: closes #7295 - Fixed workspaces temporarily inheriting essential tabs from the source workspace a container tab was switched from, r=workspaces 2025-04-16 12:32:49 +02:00
mr. m
46e2fdca00 fix: closes #6992 - Fixed url bar not being selected when selecting an empty tab, r=workspaces 2025-04-16 12:25:23 +02:00
mr. m
983b06266b chore: no-bug - Formatted project, r=media 2025-04-16 12:05:07 +02:00
mr. m
cb8708d2d9 fix: closes #7650 - Fixed context menu closing the URL bar, r=no-component 2025-04-16 12:05:01 +02:00
mr. m
adbec11c04 chore: no-bug - Added missing licenses to files, r=common, folders, glance, media, mods, welcome, workspaces 2025-04-16 11:42:03 +02:00
mr. m
404f00c02b chore: no-bug - Changed pinned tabs to load on demand, r=no-component 2025-04-16 11:38:59 +02:00
mr. m
5d346205fc fix: closes #7605 - Fixed compact mode not focusing on the urlbar on startup, r=common 2025-04-16 10:56:35 +02:00
mr. m
db3f1a7c09 style: no-bug - Tweaked essential background values, r=tabs 2025-04-16 10:14:19 +02:00
mr. m
d2599f1f9a Merge pull request #7641 from mbergo/fix/workspace-drag-linux-bug
Fix workspace position dragging on Linux (Fixes #7542)
2025-04-16 08:43:31 +02:00
Marcus Bergo
ed88aafdc1 Fix workspace position dragging on Linux (Fixes #7542)
This commit fixes an issue where dragging workspaces to change their position doesn't work on Linux platforms.

The main changes include:
1. Added Linux-specific drag and drop handling with a transparent drag image
2. Enhanced dragover event handling for better visual feedback on Linux
3. Improved CSS styles for drag and drop elements on Linux
4. Added clearer comments to explain the reorder mode behavior

The issue was that the drag and drop functionality wasn't working properly on Linux due to platform-specific behavior differences. This fix ensures that workspace reordering works consistently across all platforms.
2025-04-16 01:30:17 -03:00
Mr. M
d94deed341 fix: no-bug - Media player not erroring out if browsing context is null, r=media 2025-04-16 01:57:00 +02:00
Mr. M
4b49d87a81 fix: closes #7614 - Fixed pinned tabs not correctly differentiating url params, r=tabs 2025-04-16 01:56:36 +02:00
Mr. M
4a6281ebf6 chore: no-bug - Formatted the project, r=no-component 2025-04-16 01:39:29 +02:00
Mr. M
332443fe81 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2025-04-16 01:39:16 +02:00
Mr. M
96c784704a fix: closes #7547 - Fixed removing workspaces still leaving remains, r=tabs, workspaces 2025-04-16 01:39:02 +02:00
Mr. M
b0d10919d7 fix: closes #7630 - Fixed windows packages not containing redistributable files, r=configs 2025-04-15 22:58:02 +02:00
Mr. M
b0e4681b5f fix: closes #7453 - Fixed pinning a tab with invalid HOST or about:blank creating an infinite loop of reseting its state, r=tabs 2025-04-15 22:25:06 +02:00
Mr. M
2958f6ea7f fix: no-bug - Fixed split view animations when canceling the drop, r=tabs, common, split-view 2025-04-15 22:23:16 +02:00
Mr. M
4d46f94975 fix: no-bug - Fixed split view not opening a new window when dragging the tab, r=split-view 2025-04-15 22:13:04 +02:00
Mr. M
4cc7e9ca98 chore: no-bug - Cleaned up configurations for windows and unsused style sheets, r=no-component 2025-04-15 20:24:58 +02:00
mr. m
7688a11ef9 fix: closes #7365 - Fixed unloaded tabs appearing on ctrl+Tab panel, r=no-component 2025-04-15 19:24:24 +02:00
mr. m
80b182cc54 chore: no-bug - Updated firefox 137.0.2, r=no-component 2025-04-15 18:44:12 +02:00
Mr. M
b6936e7ca4 feat: no-bug - Enabled automatic picture-in-picture, r=no-component 2025-04-15 17:12:37 +02:00
Mr. M
1590326fc1 fix: closes #7374 - Fixed scrollbar not being accessible because it's too thin, r=tabs 2025-04-15 17:09:17 +02:00
Mr. M
1a1eb3264f fix: closes #7263 - Fixed glance not opening on http or file protocols, r=glance, tabs 2025-04-15 16:41:58 +02:00
Mr. M
3d80a8aa39 fix: bug #7453 - Pinned tabs failing to restore if they got selected before closing, r=split-view, tabs, workspaces 2025-04-15 16:28:10 +02:00
Mr. M
6cca084e05 style: closes #5154 - Tweaked essential background colors, r=tabs 2025-04-15 15:48:08 +02:00
Mr. M
1c2c496f7e style: closes #5154 - Changed essential backgrounds to have better visuals, r=tabs 2025-04-15 15:13:17 +02:00
Mr. M
8ab60be68b refactor: no-bug - Changed template method for commit messages, r=no-component 2025-04-15 14:29:15 +02:00
Mr. M
f1fe363083 refactor(scripts): no-bug - Added extra git components for commit messages 2025-04-15 14:26:59 +02:00
Mr. M
db619790be refactor(no-component): no-bug - Fixed code linter workflow name 2025-04-15 14:12:03 +02:00
mr. m
608749ce1a Merge pull request #7629 from zen-browser/component-refactor
Component refactor
2025-04-15 14:05:25 +02:00
Mr. M
1135744520 refactor(common, compact-mode, folders, fonts, glance, images, kbs, media, mods, split-view, tabs, tests, workspaces, vendor, welcome): closes #7628 - Refactor zen components file structure for easier understanding 2025-04-15 14:03:55 +02:00
mr. m
c8d616e657 Merge pull request #7624 from Slowlife01/fixmedia
fix(MediaController): update share state from same tab if not currently in sharing state
2025-04-15 11:17:03 +02:00
Slowlife01
3f8a6e04c8 fix(MediaController): update share state from same tab if not sharing 2025-04-15 15:56:58 +07:00
mr. m
851cd8e037 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2025-04-14 19:39:40 +02:00
mr. m
7b3dae8bea fix(build.yml): optimize git clone command by using --depth 1 for faster downloads 2025-04-14 19:39:38 +02:00
113 changed files with 554 additions and 944 deletions

20
.formal-git/components Normal file
View File

@@ -0,0 +1,20 @@
split-view
kbs
folders
workspaces
mods
tests
glance
media
images
vendor
tabs
compact-mode
common
fonts
welcome
scripts
workflows
winsign
flatpak
configs

1
.formal-git/template Normal file
View File

@@ -0,0 +1 @@
{type}: {message}, b=({bugId}), c={components}

View File

@@ -503,7 +503,7 @@ jobs:
- name: Download object files
if: ${{ inputs.update_branch == 'release' }}
run: |
git clone https://github.com/zen-browser/windows-binaries.git .github/workflows/object
git clone https://github.com/zen-browser/windows-binaries.git .github/workflows/object --depth 1
- name: Copy update manifests
env:

View File

@@ -11,7 +11,7 @@ on:
- dev
jobs:
pr-test:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository

View File

@@ -111,6 +111,7 @@ jobs:
set -x
mkdir -p ~/win-cross
cd engine/
sudo apt-get install python3-launchpadlib
sudo add-apt-repository ppa:savoury1/backports
sudo apt-get update
sudo apt-get install -y python3-pip autoconf \

1
.gitignore vendored
View File

@@ -11,3 +11,4 @@ windsign-temp/
venv/
!firefox-cache/
win-cross/

View File

@@ -22,9 +22,8 @@ docs/issue-metrics/*.md
# Some CSS files are preprocessed and prettier doesn't handle them well
# We also dont want to format the CSS files that are generated by the build
src/browser/base/content/zen-styles/zen-tabs/vertical-tabs.css
src/browser/base/content/zen-styles/zen-compact-mode.css
src/browser/base/zen-components/ZenEmojies.mjs
build/codesign/codesign.bash
src/zen/tabs/zen-tabs/vertical-tabs.css
src/zen/compact-mode/zen-compact-mode.css
src/zen/common/ZenEmojies.mjs
*.inc

View File

@@ -28,9 +28,9 @@
## 🖥️ Compatibility
Zen is currently built using Firefox version `137.0.1`! 🚀
Zen is currently built using Firefox version `137.0.2`! 🚀
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `137.0.1`!
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 137.0.2`!
- Check out the latest [release notes](https://zen-browser.app/release-notes)!
- Part of our mission is to keep Zen up-to-date with the latest version of Firefox, so you can enjoy the latest features and security updates!
@@ -85,7 +85,7 @@ winget install --id Zen-Team.Zen-Browser
You can also install Zen using Homebrew:
```
brew install --cask zen-browser
brew install zen-browser
```
#### Linux
@@ -118,11 +118,11 @@ To upgrade the browser to a newer version, use the embedded update functionality
## 👨‍💻 Development and Contributing
Some components used by @zen-browser as an attempt to make firefox forks a better place, and for other to enjoy the beauty of OSS. You can find them [here](https://github.com/zen-browser/desktop/tree/dev/src/browser/base/zen-components).
Some components used by @zen-browser as an attempt to make firefox forks a better place, and for other to enjoy the beauty of OSS. You can find them [here](https://github.com/zen-browser/desktop/tree/dev/src/zen).
#### `Run Locally`
In order to download and run Zen locally, please follow [these instructions](https://docs.zen-browser.app/building).
In order to download and run Zen locally, please follow [these instructions](https://docs.zen-browser.app/guides/building).
#### `Special Thanks`

View File

@@ -1 +1 @@
01c20afaa6fe914ff4f083689b8d234c1ba76961
ee85441427e22eb9fbc8d3eb62c7e5804535f0bc

View File

@@ -4,4 +4,6 @@ C:\MozillaBuildSetup-Latest.exe /S | out-null
rustup target add aarch64-pc-windows-msvc
rustup target add x86_64-pc-windows-msvc
cp -r tests engine/browser/base/zen-components/
cd engine
./mach python --virtualenv build taskcluster/scripts/misc/get_vs.py build/vs/vs2022.yaml ../win-cross/vs2022
cd ..

View File

@@ -49,7 +49,6 @@ function DownloadFile($url, $targetFile) {
$request = [System.Net.HttpWebRequest]::Create($uri)
$request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
$request.Headers.Add("Authorization", "Bearer $token")
$request.set_Timeout(15000) #15 second timeout
$response = $request.GetResponse()
$totalLength = [System.Math]::Floor($response.get_ContentLength()/1024)
$responseStream = $response.GetResponseStream()
@@ -135,6 +134,12 @@ function SignAndPackage($name) {
echo "Copying setup.exe into obj dir"
$env:ZEN_SETUP_EXE_PATH="$PWD\windsign-temp\windows-x64-obj-$name\browser\installer\windows\instgen\setup.exe"
if ($name -eq "arm64") {
$env:WIN32_REDIST_DIR="$PWD\win-cross\vs2022\VC\Redist\MSVC\14.38.33135\arm64\Microsoft.VC143.CRT"
} else {
$env:WIN32_REDIST_DIR="$PWD\win-cross\vs2022\VC\Redist\MSVC\14.38.33135\x64\Microsoft.VC143.CRT"
}
$env:MAR="..\\build\\winsign\\mar.exe"
if ($name -eq "arm64") {

View File

@@ -17,7 +17,6 @@ if test "$ZEN_CROSS_COMPILING"; then
else
export WIN32_REDIST_DIR="$(echo ~)/win-cross/vs2022/VC/Redist/MSVC/14.38.33135/x64/Microsoft.VC143.CRT"
fi
fi
#? https://bugzilla.mozilla.org/show_bug.cgi?id=1617793

12
package-lock.json generated
View File

@@ -12,6 +12,7 @@
"@zen-browser/surfer": "^1.11.7"
},
"devDependencies": {
"formal-git": "^1.1.5",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"prettier": "^3.4.2",
@@ -1028,6 +1029,17 @@
}
}
},
"node_modules/formal-git": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/formal-git/-/formal-git-1.1.5.tgz",
"integrity": "sha512-cSPoV0+/LFdUsE+fCGxCOK/eJNZeWj5c+6IxB3PP3QkeWIgdQFgw+RObnnpG/0KOsXy8mFrsD6tkEHbGjNGMpQ==",
"dev": true,
"license": "ISC",
"bin": {
"fo": "lib/main.js",
"formal-git": "lib/main.js"
}
},
"node_modules/fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",

View File

@@ -43,6 +43,7 @@
"@zen-browser/surfer": "^1.11.7"
},
"devDependencies": {
"formal-git": "^1.1.5",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"prettier": "^3.4.2",

View File

@@ -0,0 +1,30 @@
#!/bin/bash
set -e
COMPONENT_ROOT=$(pwd)/src/zen
EXTRA_COMPONENTS=(
"scripts"
"workflows"
"winsign"
"flatpak"
"configs"
)
echo "" > .formal-git/components
# iterate top directories and adding the base name to .formal-git/components
for dir in $(find $COMPONENT_ROOT -maxdepth 1 -type d | grep -v '\.git' | grep -v 'node_modules' | grep -v 'engine'); do
if [ "$dir" != "$COMPONENT_ROOT" ]; then
echo "$(basename $dir)" >> .formal-git/components
fi
done
# iterate over the extra components and adding them to .formal-git/components
for extra in "${EXTRA_COMPONENTS[@]}"; do
echo "$extra" >> .formal-git/components
done
# remove all empty lines
sed -i '/^$/d' .formal-git/components

View File

@@ -1,8 +1,8 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index 97acbf826f9427b06e0a54679b30269ce7b695f5..aeadcd0c72816612cd5c1ca1199fe2a363c637f4 100644
index 78572e5480a6137c5b7de89c489956f5d68ef698..1c72fe9a5419e211dea25271113981aeda46ec66 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -3362,3 +3362,5 @@ pref("toolkit.contentRelevancy.enabled", false);
@@ -3363,3 +3363,5 @@ pref("toolkit.contentRelevancy.enabled", false);
pref("toolkit.contentRelevancy.ingestEnabled", false);
// Pref to enable extra logging for the content relevancy feature
pref("toolkit.contentRelevancy.log", false);

View File

@@ -19,6 +19,7 @@ pref("intl.multilingual.downloadEnabled", false);
// Restore session on startup
pref("browser.startup.page", 3);
pref("browser.sessionstore.restore_pinned_tabs_on_demand", true);
// Theme
pref('toolkit.legacyUserProfileCustomizations.stylesheets', true);
@@ -26,6 +27,10 @@ pref('browser.compactmode.show', true);
#ifdef XP_WIN
pref("browser.privateWindowSeparation.enabled", false);
// Mica
pref("widget.windows.mica", true);
pref("widget.windows.mica.popups", true);
#endif
pref('browser.newtabpage.activity-stream.newtabWallpapers.enabled', true);
@@ -312,10 +317,13 @@ pref("mousewheel.default.delta_multiplier_y", 200);
#endif
#if defined(XP_WIN)
pref("dom.ipc.processPriorityManager.backgroundUsesEcoQoS", false);
pref("dom.ipc.processPriorityManager.backgroundUsesEcoQoS", false);
#endif
#ifdef UNIX_BUT_NOT_MAC
pref("widget.gtk.rounded-bottom-corners.enabled", true);
#endif
pref('browser.sessionstore.restore_pinned_tabs_on_demand', true);
pref('browser.newtabpage.activity-stream.system.showWeather', true);
// Enable experimental settings page (Used for Zen Labs)
@@ -464,3 +472,8 @@ pref("image.mem.decode_bytes_at_a_time", 32768);
pref("gfx.canvas.accelerated", true);
pref("media.hardware-video-decoding.enabled", true);
pref("layers.gpu-process.enabled", true);
// Picture-in-picture
pref("media.videocontrols.picture-in-picture.video-toggle.enabled", true);
// TODO: Enable once we have a proper settings page
pref("media.videocontrols.picture-in-picture.enable-when-switching-tabs.enabled", false);

View File

@@ -10,7 +10,6 @@
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-tabs.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-browser-ui.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-gradient-generator.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-rices.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-panel-ui.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-single-components.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-browser-container.css" />
@@ -43,7 +42,4 @@ Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/Zen
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenViewSplitter.mjs", this);
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenGlanceManager.mjs", this);
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenMediaController.mjs", this);
// Unimportant scripts
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenRices.mjs", this);
</script>

View File

@@ -1,82 +1,87 @@
content/browser/zenThemeModifier.js (content/zenThemeModifier.js)
content/browser/ZenStartup.mjs (content/ZenStartup.mjs)
content/browser/zen-sets.js (content/zen-sets.js)
content/browser/ZenUIManager.mjs (content/ZenUIManager.mjs)
content/browser/ZenCustomizableUI.sys.mjs (content/ZenCustomizableUI.sys.mjs)
content/browser/zen-components/ZenUIMigration.mjs (zen-components/ZenUIMigration.mjs)
content/browser/zen-components/ZenCompactMode.mjs (zen-components/ZenCompactMode.mjs)
content/browser/zen-components/ZenViewSplitter.mjs (zen-components/ZenViewSplitter.mjs)
content/browser/zen-components/ZenThemesCommon.mjs (zen-components/ZenThemesCommon.mjs)
content/browser/zen-components/ZenWorkspaces.mjs (zen-components/ZenWorkspaces.mjs)
content/browser/zen-components/ZenWorkspacesStorage.mjs (zen-components/ZenWorkspacesStorage.mjs)
content/browser/zen-components/ZenWorkspacesSync.mjs (zen-components/ZenWorkspacesSync.mjs)
content/browser/zen-components/ZenKeyboardShortcuts.mjs (zen-components/ZenKeyboardShortcuts.mjs)
content/browser/zen-components/ZenThemesImporter.mjs (zen-components/ZenThemesImporter.mjs)
content/browser/zen-components/ZenTabUnloader.mjs (zen-components/ZenTabUnloader.mjs)
content/browser/zen-components/ZenPinnedTabsStorage.mjs (zen-components/ZenPinnedTabsStorage.mjs)
content/browser/zen-components/ZenPinnedTabManager.mjs (zen-components/ZenPinnedTabManager.mjs)
content/browser/zen-components/ZenCommonUtils.mjs (zen-components/ZenCommonUtils.mjs)
content/browser/zen-components/ZenGradientGenerator.mjs (zen-components/ZenGradientGenerator.mjs)
content/browser/zen-components/ZenGlanceManager.mjs (zen-components/ZenGlanceManager.mjs)
content/browser/zen-components/ZenFolders.mjs (zen-components/ZenFolders.mjs)
content/browser/zen-components/ZenActorsManager.mjs (zen-components/ZenActorsManager.mjs)
content/browser/zen-components/ZenRices.mjs (zen-components/ZenRices.mjs)
content/browser/zen-components/ZenEmojies.mjs (zen-components/ZenEmojies.mjs)
content/browser/zen-components/ZenWelcome.mjs (zen-components/ZenWelcome.mjs)
content/browser/zen-components/ZenMediaController.mjs (zen-components/ZenMediaController.mjs)
content/browser/zenThemeModifier.js (../../zen/common/zenThemeModifier.js)
content/browser/ZenStartup.mjs (../../zen/common/ZenStartup.mjs)
content/browser/zen-sets.js (../../zen/common/zen-sets.js)
content/browser/ZenUIManager.mjs (../../zen/common/ZenUIManager.mjs)
content/browser/zen-components/ZenActorsManager.mjs (../../zen/common/ZenActorsManager.mjs)
content/browser/zen-components/ZenEmojies.mjs (../../zen/common/ZenEmojies.mjs)
content/browser/ZenCustomizableUI.sys.mjs (../../zen/common/ZenCustomizableUI.sys.mjs)
content/browser/zen-components/ZenUIMigration.mjs (../../zen/common/ZenUIMigration.mjs)
content/browser/zen-components/ZenCommonUtils.mjs (../../zen/common/ZenCommonUtils.mjs)
content/browser/zen-styles/zen-theme.css (content/zen-styles/zen-theme.css)
content/browser/zen-styles/zen-buttons.css (content/zen-styles/zen-buttons.css)
content/browser/zen-styles/zen-tabs.css (content/zen-styles/zen-tabs.css)
* content/browser/zen-styles/zen-tabs/vertical-tabs.css (content/zen-styles/zen-tabs/vertical-tabs.css)
content/browser/zen-styles/zen-tabs/horizontal-tabs.css (content/zen-styles/zen-tabs/horizontal-tabs.css)
content/browser/zen-styles/zen-browser-ui.css (content/zen-styles/zen-browser-ui.css)
content/browser/zen-styles/zen-animations.css (content/zen-styles/zen-animations.css)
content/browser/zen-styles/zen-panel-ui.css (content/zen-styles/zen-panel-ui.css)
content/browser/zen-styles/zen-single-components.css (content/zen-styles/zen-single-components.css)
content/browser/zen-styles/zen-sidebar.css (content/zen-styles/zen-sidebar.css)
content/browser/zen-styles/zen-toolbar.css (content/zen-styles/zen-toolbar.css)
content/browser/zen-styles/zen-decks.css (content/zen-styles/zen-decks.css)
content/browser/zen-styles/zen-folders.css (content/zen-styles/zen-folders.css)
content/browser/zen-styles/zen-glance.css (content/zen-styles/zen-glance.css)
content/browser/zen-styles/zen-browser-container.css (content/zen-styles/zen-browser-container.css)
content/browser/zen-styles/zen-workspaces.css (content/zen-styles/zen-workspaces.css)
content/browser/zen-styles/zen-urlbar.css (content/zen-styles/zen-urlbar.css)
content/browser/zen-styles/zen-popup.css (content/zen-styles/zen-popup.css)
content/browser/zen-styles/zen-gradient-generator.css (content/zen-styles/zen-gradient-generator.css)
content/browser/zen-styles/zen-rices.css (content/zen-styles/zen-rices.css)
content/browser/zen-styles/zen-branding.css (content/zen-styles/zen-branding.css)
content/browser/zen-styles/zen-welcome.css (content/zen-styles/zen-welcome.css)
content/browser/zen-styles/zen-media-controls.css (content/zen-styles/zen-media-controls.css)
content/browser/zen-styles/zen-theme.css (../../zen/common/styles/zen-theme.css)
content/browser/zen-styles/zen-buttons.css (../../zen/common/styles/zen-buttons.css)
content/browser/zen-styles/zen-browser-ui.css (../../zen/common/styles/zen-browser-ui.css)
content/browser/zen-styles/zen-animations.css (../../zen/common/styles/zen-animations.css)
content/browser/zen-styles/zen-panel-ui.css (../../zen/common/styles/zen-panel-ui.css)
content/browser/zen-styles/zen-single-components.css (../../zen/common/styles/zen-single-components.css)
content/browser/zen-styles/zen-sidebar.css (../../zen/common/styles/zen-sidebar.css)
content/browser/zen-styles/zen-toolbar.css (../../zen/common/styles/zen-toolbar.css)
content/browser/zen-styles/zen-browser-container.css (../../zen/common/styles/zen-browser-container.css)
content/browser/zen-styles/zen-urlbar.css (../../zen/common/styles/zen-urlbar.css)
content/browser/zen-styles/zen-popup.css (../../zen/common/styles/zen-popup.css)
content/browser/zen-styles/zen-branding.css (../../zen/common/styles/zen-branding.css)
content/browser/zen-styles/zen-panels/bookmarks.css (content/zen-styles/zen-panels/bookmarks.css)
content/browser/zen-styles/zen-panels/extensions.css (content/zen-styles/zen-panels/extensions.css)
content/browser/zen-styles/zen-panels/print.css (content/zen-styles/zen-panels/print.css)
content/browser/zen-styles/zen-panels/dialog.css (content/zen-styles/zen-panels/dialog.css)
content/browser/zen-styles/zen-panels/bookmarks.css (../../zen/common/styles/zen-panels/bookmarks.css)
content/browser/zen-styles/zen-panels/extensions.css (../../zen/common/styles/zen-panels/extensions.css)
content/browser/zen-styles/zen-panels/print.css (../../zen/common/styles/zen-panels/print.css)
content/browser/zen-styles/zen-panels/dialog.css (../../zen/common/styles/zen-panels/dialog.css)
* content/browser/zen-styles/zen-compact-mode.css (content/zen-styles/zen-compact-mode.css)
content/browser/zen-components/ZenCompactMode.mjs (../../zen/compact-mode/ZenCompactMode.mjs)
* content/browser/zen-styles/zen-compact-mode.css (../../zen/compact-mode/zen-compact-mode.css)
# Images
content/browser/zen-images/gradient.png (content/zen-images/gradient.png)
content/browser/zen-images/brand-header.svg (content/zen-images/brand-header.svg)
content/browser/zen-images/layouts/collapsed.png (content/zen-images/layouts/collapsed.png)
content/browser/zen-images/layouts/multiple-toolbar.png (content/zen-images/layouts/multiple-toolbar.png)
content/browser/zen-images/layouts/single-toolbar.png (content/zen-images/layouts/single-toolbar.png)
content/browser/zen-images/grain-bg.png (content/zen-images/grain-bg.png)
content/browser/zen-images/note-indicator.svg (content/zen-images/note-indicator.svg)
content/browser/zen-components/ZenViewSplitter.mjs (../../zen/split-view/ZenViewSplitter.mjs)
content/browser/zen-styles/zen-decks.css (../../zen/split-view/zen-decks.css)
# Actors
content/browser/zen-components/actors/ZenThemeMarketplaceParent.sys.mjs (zen-components/actors/ZenThemeMarketplaceParent.sys.mjs)
content/browser/zen-components/actors/ZenThemeMarketplaceChild.sys.mjs (zen-components/actors/ZenThemeMarketplaceChild.sys.mjs)
content/browser/zen-components/actors/ZenGlanceChild.sys.mjs (zen-components/actors/ZenGlanceChild.sys.mjs)
content/browser/zen-components/actors/ZenGlanceParent.sys.mjs (zen-components/actors/ZenGlanceParent.sys.mjs)
content/browser/zen-components/ZenThemesCommon.mjs (../../zen/mods/ZenThemesCommon.mjs)
content/browser/zen-components/ZenThemesImporter.mjs (../../zen/mods/ZenThemesImporter.mjs)
content/browser/zen-components/actors/ZenThemeMarketplaceParent.sys.mjs (../../zen/mods/actors/ZenThemeMarketplaceParent.sys.mjs)
content/browser/zen-components/actors/ZenThemeMarketplaceChild.sys.mjs (../../zen/mods/actors/ZenThemeMarketplaceChild.sys.mjs)
# Fonts
content/browser/zen-fonts/JunicodeVF-Italic.woff2 (content/zen-fonts/JunicodeVF-Italic.woff2)
content/browser/zen-fonts/JunicodeVF-Roman.woff2 (content/zen-fonts/JunicodeVF-Roman.woff2)
content/browser/zen-components/ZenWorkspaces.mjs (../../zen/workspaces/ZenWorkspaces.mjs)
content/browser/zen-components/ZenWorkspacesStorage.mjs (../../zen/workspaces/ZenWorkspacesStorage.mjs)
content/browser/zen-components/ZenWorkspacesSync.mjs (../../zen/workspaces/ZenWorkspacesSync.mjs)
content/browser/zen-components/ZenGradientGenerator.mjs (../../zen/workspaces/ZenGradientGenerator.mjs)
content/browser/zen-styles/zen-workspaces.css (../../zen/workspaces/zen-workspaces.css)
content/browser/zen-styles/zen-gradient-generator.css (../../zen/workspaces/zen-gradient-generator.css)
content/browser/zen-components/ZenKeyboardShortcuts.mjs (../../zen/kbs/ZenKeyboardShortcuts.mjs)
content/browser/zen-components/ZenTabUnloader.mjs (../../zen/tabs/ZenTabUnloader.mjs)
content/browser/zen-components/ZenPinnedTabsStorage.mjs (../../zen/tabs/ZenPinnedTabsStorage.mjs)
content/browser/zen-components/ZenPinnedTabManager.mjs (../../zen/tabs/ZenPinnedTabManager.mjs)
content/browser/zen-styles/zen-tabs.css (../../zen/tabs/zen-tabs.css)
* content/browser/zen-styles/zen-tabs/vertical-tabs.css (../../zen/tabs/zen-tabs/vertical-tabs.css)
content/browser/zen-styles/zen-tabs/horizontal-tabs.css (../../zen/tabs/zen-tabs/horizontal-tabs.css)
content/browser/zen-components/ZenGlanceManager.mjs (../../zen/glance/ZenGlanceManager.mjs)
content/browser/zen-styles/zen-glance.css (../../zen/glance/zen-glance.css)
content/browser/zen-components/actors/ZenGlanceChild.sys.mjs (../../zen/glance/actors/ZenGlanceChild.sys.mjs)
content/browser/zen-components/actors/ZenGlanceParent.sys.mjs (../../zen/glance/actors/ZenGlanceParent.sys.mjs)
content/browser/zen-components/ZenFolders.mjs (../../zen/folders/ZenFolders.mjs)
content/browser/zen-styles/zen-folders.css (../../zen/folders/zen-folders.css)
content/browser/zen-components/ZenWelcome.mjs (../../zen/welcome/ZenWelcome.mjs)
content/browser/zen-styles/zen-welcome.css (../../zen/welcome/zen-welcome.css)
content/browser/zen-components/ZenMediaController.mjs (../../zen/media/ZenMediaController.mjs)
content/browser/zen-styles/zen-media-controls.css (../../zen/media/zen-media-controls.css)
# Images
content/browser/zen-images/gradient.png (../../zen/images/gradient.png)
content/browser/zen-images/brand-header.svg (../../zen/images/brand-header.svg)
content/browser/zen-images/layouts/collapsed.png (../../zen/images/layouts/collapsed.png)
content/browser/zen-images/layouts/multiple-toolbar.png (../../zen/images/layouts/multiple-toolbar.png)
content/browser/zen-images/layouts/single-toolbar.png (../../zen/images/layouts/single-toolbar.png)
content/browser/zen-images/grain-bg.png (../../zen/images/grain-bg.png)
content/browser/zen-images/note-indicator.svg (../../zen/images/note-indicator.svg)
# Fonts
content/browser/zen-fonts/JunicodeVF-Italic.woff2 (../../zen/fonts/JunicodeVF-Italic.woff2)
content/browser/zen-fonts/JunicodeVF-Roman.woff2 (../../zen/fonts/JunicodeVF-Roman.woff2)
# JS Vendor
content/browser/zen-vendor/tsparticles.confetti.bundle.min.js (content/zen-vendor/tsparticles.confetti.bundle.min.js)
content/browser/zen-vendor/motion.min.mjs (content/zen-vendor/motion.min.mjs)
content/browser/zen-vendor/tsparticles.confetti.bundle.min.js (../../zen/vendor/tsparticles.confetti.bundle.min.js)
content/browser/zen-vendor/motion.min.mjs (../../zen/vendor/motion.min.mjs)

View File

@@ -1,4 +1,4 @@
#include zen-media-controls.inc.xhtml
#include ../../../zen/media/zen-media-controls.inc.xhtml
<toolbar brighttext="true"
id="zen-sidebar-bottom-buttons"
fullscreentoolbar="true"

View File

@@ -1,226 +0,0 @@
#zen-rice-share-dialog-overlay:not([hidden]) {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
}
#zen-rice-share-dialog,
#zen-rice-share-dialog-notice {
color: var(--panel-color);
background: var(--arrowpanel-background);
border-radius: var(--zen-native-inner-radius);
box-shadow: 0 0 1px 1px hsla(0, 0%, 0%, 0.2);
border: var(--zen-appcontent-border);
overflow: hidden;
animation: zen-jello-animation-large 0.4s ease;
max-width: 400px;
&[animate='true'] {
animation: zen-rice-submit-animation 1s cubic-bezier(0.77, 0, 0.18, 1);
}
& .zen-rice-share-content {
padding: 10px 0;
border-top: var(--zen-appcontent-border);
background: var(--arrowpanel-background);
position: relative;
align-items: center;
min-height: 50px;
&:has(#zen-rice-share-first-form:not([fade-out])),
&:has(#zen-rice-share-success) {
padding-top: 20px;
}
& > vbox {
width: 100%;
padding: 0 10px;
}
& #zen-rice-share-first-form input[type='text'] {
width: 100%;
padding: 1px 2px;
border: 0;
border-bottom: 1px solid var(--zen-appcontent-border);
background: transparent;
font-style: italic;
font-weight: 600;
}
& #zen-rice-share-name {
font-style: normal !important;
font-size: 24px;
margin-left: 1px;
}
& .indent {
margin-left: 30px;
}
}
& .zen-rice-share-header {
height: 200px;
margin-bottom: -20px;
}
& #zen-rice-share-options {
padding: 10px 0;
max-height: 30px;
overflow: hidden;
transition:
max-height 0.3s ease,
height 0.3s ease;
&[zen-collapsed='false'] {
max-height: 350px;
}
& > .options-header {
font-weight: 600;
margin-bottom: 5px;
position: relative;
cursor: pointer;
align-items: center;
color: inherit;
-moz-context-properties: fill, fill-opacity;
fill: var(--toolbarbutton-icon-fill);
& label {
width: fit-content;
cursor: pointer;
}
}
& > .options-header image {
transition: transform 0.3s ease;
width: 15px;
height: 15px;
}
&[zen-collapsed='false'] > .options-header image {
transform: rotate(90deg);
}
& > checkbox {
margin-left: 15px;
}
}
& .panel-footer {
margin: 0;
margin-top: 10px;
& button {
justify-content: center;
}
}
#zen-rice-share-error {
border: 1px solid rgba(255, 0, 0, 0.5);
background: rgba(255, 0, 0, 0.1);
padding: 5px;
transition: opacity 0.3s ease;
border-radius: var(--zen-native-inner-radius);
@starting-style {
opacity: 0;
}
& button {
margin-left: auto;
margin-top: 2px;
}
}
/* Animations */
#zen-rice-share-first-form[fade-out] {
position: absolute;
transform: translateX(-100%);
pointer-events: none;
animation: zen-rice-form-out 0.5s ease;
}
#zen-rice-share-second-form {
animation: zen-rice-form-in 0.5s ease forwards;
justify-content: center;
& > hbox {
width: 100%;
height: 5px;
border-radius: 100px;
border: 1px solid var(--zen-colors-border);
position: relative;
overflow: hidden;
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--zen-primary-color);
transition: width 4s cubic-bezier(1, 0, 0, 1);
@starting-style {
width: 0;
}
}
}
&[fade-out] {
position: absolute !important;
animation: zen-rice-form-out 0.5s ease forwards;
}
}
#zen-rice-share-success {
overflow-y: hidden;
max-height: 0px;
animation: zen-rice-form-in-2 0.5s ease forwards;
& > h1 {
margin: 0;
font-size: 20px;
}
& > p {
color: var(--text-color-deemphasized);
}
& label {
margin: 0;
margin-top: 15px;
font-weight: 600;
margin-bottom: 5px;
}
}
}
#zen-rice-share-dialog-notice {
padding: 15px;
& br {
margin-bottom: 10px;
}
& > p {
color: var(--text-color-deemphasized);
margin-top: 10px;
}
.panel-footer {
margin-top: 10px;
align-items: center;
}
}

View File

@@ -1,2 +1,2 @@
#include zen-splitview-overlay.inc.xhtml
#include zen-glance.inc.xhtml
#include ../../../zen/split-view/zen-splitview-overlay.inc.xhtml
#include ../../../zen/glance/zen-glance.inc.xhtml

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/moz.build b/browser/base/moz.build
index 636e0841786735a63ddea00e819c0b6f0b8a5d4d..6685d857180944d68bf4f049919f81361084c481 100644
index 636e0841786735a63ddea00e819c0b6f0b8a5d4d..62e4531bd19caf098fd76c69b213fa32d62546a6 100644
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -87,3 +87,5 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("windows", "gtk"):
@@ -7,4 +7,4 @@ index 636e0841786735a63ddea00e819c0b6f0b8a5d4d..6685d857180944d68bf4f049919f8136
JAR_MANIFESTS += ["jar.mn"]
+
+DIRS += ["zen-components"]
+DIRS += ["../../zen"]

View File

@@ -1,428 +0,0 @@
{
const ZEN_RICE_API = Services.prefs.getStringPref('zen.rice.api.url', '');
class ZenRiceCollector {
constructor() {}
clear() {
this._userChrome = null;
this._userContent = null;
this._enabledMods = null;
this._preferences = null;
this._workspaceThemes = null;
}
async gatherAll({
userUserChrome = true,
userContent = true,
enabledMods = true,
preferences = true,
modPrefs = true,
workspaceThemes = true,
} = {}) {
this.clear();
// Get the mods first, as they may be needed for the preferences
if (enabledMods) {
await this.gatherEnabledMods();
}
await Promise.all([
userUserChrome && this.gatherUserChrome(),
userContent && this.gatherUserContent(),
preferences && this.gatherPreferences({ modPrefs }),
workspaceThemes && this.gatherWorkspaceThemes(),
]);
}
get profileDir() {
return PathUtils.profileDir;
}
async gatherUserChrome() {
try {
const path = PathUtils.join(this.profileDir, 'chrome', 'userChrome.css');
this._userChrome = await IOUtils.readUTF8(path);
} catch (e) {
console.warn('[ZenRiceCollector]: Error reading userChrome.css: ', e);
return null;
}
}
async gatherUserContent() {
try {
const path = PathUtils.join(this.profileDir, 'chrome', 'userContent.css');
this._userContent = await IOUtils.readUTF8(path);
} catch (e) {
console.warn('[ZenRiceCollector]: Error reading userContent.css: ', e);
return null;
}
}
async gatherEnabledMods() {
const activeThemes = await gZenThemesImporter.getEnabledThemes();
if (activeThemes.length === 0) {
return;
}
this._enabledMods = activeThemes;
}
_getThemePrefValue(theme, pref) {
if (pref.type === 'checkbox') {
return Services.prefs.getBoolPref(pref.property);
}
return Services.prefs.getStringPref(pref.property);
}
async gatherPreferences({ modPrefs = true } = {}) {
this._preferences = {};
if (modPrefs && this._enabledMods) {
for (const theme of this._enabledMods) {
const prefs = await ZenThemesCommon.getThemePreferences(theme);
for (const pref of prefs) {
this._preferences[pref.property] = this._getThemePrefValue(theme, pref);
}
}
}
const boolPrefsToCollect = [
'zen.view.use-single-toolbar',
'zen.view.sidebar-expanded',
'zen.tabs.vertical.right-side',
'zen.view.experimental-no-window-controls',
'zen.view.hide-window-controls',
...(gZenOperatingSystemCommonUtils.currentOperatingSystem === 'windows' ? ['widget.windows.mica'] : []),
...(gZenOperatingSystemCommonUtils.currentOperatingSystem === 'macos'
? ['widget.macos.titlebar-blend-mode.behind-window']
: []),
];
const stringPrefsToCollect = ['browser.uiCustomization.state'];
for (const pref of boolPrefsToCollect) {
this._preferences[pref] = Services.prefs.getBoolPref(pref);
}
for (const pref of stringPrefsToCollect) {
this._preferences[pref] = Services.prefs.getStringPref(pref);
}
}
async gatherWorkspaceThemes() {
const workspaces = (await ZenWorkspaces._workspaces()).workspaces;
this._workspaceThemes = workspaces.map((w) => w.theme);
}
async packRice(...args) {
await this.gatherAll(...args);
const rice = {
userChrome: this._userChrome,
userContent: this._userContent,
enabledMods: this._enabledMods?.map((t) => t.id),
preferences: this._preferences,
workspaceThemes: this._workspaceThemes,
};
return rice;
}
}
class ZenRiceManager {
constructor() {
this._collector = new ZenRiceCollector();
}
init() {}
get conffettiWrapper() {
if (!this.confetti) {
Services.scriptloader.loadSubScript('chrome://browser/content/zen-vendor/tsparticles.confetti.bundle.min.js', this);
}
return this.confetti;
}
async packRice() {
return await this._collector.packRice();
}
get shareDialog() {
if (this._shareDialog) {
return this._shareDialog;
}
this._shareDialog = window.MozXULElement.parseXULToFragment(`
<vbox id="zen-rice-share-dialog-overlay" hidden="true">
<vbox id="zen-rice-share-dialog-notice">
<h1 data-l10n-id="zen-rice-share-notice" />
<p data-l10n-id="zen-rice-share-notice-description" />
<html:moz-button-group class="panel-footer">
<html:a href="https://docs.zen-browser.app/guides/" target="_blank" data-l10n-id="zen-learn-more-text" onclick="gZenThemePicker.riceManager.openLink(event)" />
<button onclick="gZenThemePicker.riceManager.acceptNotice()" class="footer-button" data-l10n-id="zen-rice-share-accept" slot="primary" default="true" />
</html:moz-button-group>
</vbox>
<vbox id="zen-rice-share-dialog" hidden="true">
<html:img src="chrome://browser/content/zen-images/brand-header.svg" class="zen-rice-share-header" />
<hbox class="zen-rice-share-content">
<vbox id="zen-rice-share-first-form">
<html:input type="text" data-l10n-id="zen-rice-share-name" id="zen-rice-share-name" oninput="gZenThemePicker.riceManager.validateShareDialog()" />
<hbox class="zen-rice-share-author">
<label data-l10n-id="zen-rice-share-author" />
<html:input type="text" data-l10n-id="zen-rice-share-author-input" id="zen-rice-share-author" oninput="gZenThemePicker.riceManager.validateShareDialog();" />
</hbox>
<vbox zen-collapsed="true" id="zen-rice-share-options" onclick="gZenThemePicker.riceManager.toggleOptions(event)">
<hbox class="options-header">
<label data-l10n-id="zen-rice-share-include" />
<image></image>
</hbox>
<checkbox data-l10n-id="zen-rice-share-include-userchrome" id="zen-rice-share-include-userchrome" />
<checkbox data-l10n-id="zen-rice-share-include-usercontent" id="zen-rice-share-include-usercontent" />
<checkbox data-l10n-id="zen-rice-share-include-mods" id="zen-rice-share-include-mods" />
<vbox class="indent">
<checkbox data-l10n-id="zen-rice-share-include-mod-prefs" id="zen-rice-share-include-mod-prefs" />
</vbox>
<checkbox data-l10n-id="zen-rice-share-include-preferences" id="zen-rice-share-include-preferences" />
<checkbox data-l10n-id="zen-rice-share-include-workspace-themes" id="zen-rice-share-include-workspace-themes" />
</vbox>
<html:moz-button-group class="panel-footer">
<button onclick="gZenThemePicker.riceManager.cancel()" class="footer-button" data-l10n-id="zen-general-cancel" />
<button onclick="gZenThemePicker.riceManager.submit()" class="footer-button" data-l10n-id="zen-rice-share-save" default="true" slot="primary" id="zen-rice-share-save" disabled="true" />
</html:moz-button-group>
</vbox>
<vbox id="zen-rice-share-second-form" hidden="true">
<hbox></hbox>
<vbox id="zen-rice-share-error" hidden="true">
<label data-l10n-id="zen-rice-share-error" />
<button onclick="gZenThemePicker.riceManager.resetShareDialog()" data-l10n-id="zen-close-label" class="footer-button" />
</vbox>
</vbox>
<vbox id="zen-rice-share-success" hidden="true">
<h1 data-l10n-id="zen-rice-share-success" />
<p data-l10n-id="zen-rice-share-succes-details" />
<label data-l10n-id="zen-rice-share-success-link" />
<html:input type="text" readonly="true" id="zen-rice-share-success-link" onclick="this.select()" />
<html:moz-button-group class="panel-footer">
<button onclick="gZenThemePicker.riceManager.resetShareDialog()" data-l10n-id="zen-close-label" class="footer-button" slot="primary" default="true" />
</html:moz-button-group>
</vbox>
</hbox>
</vbox>
</vbox>
`);
document.getElementById('zen-main-app-wrapper').appendChild(this._shareDialog);
this._shareDialog = document.getElementById('zen-rice-share-dialog-overlay');
return this._shareDialog;
}
get hasAcceptedNotice() {
return Services.prefs.getBoolPref('zen.rice.share.notice.accepted', false);
}
set hasAcceptedNotice(value) {
Services.prefs.setBoolPref('zen.rice.share.notice.accepted', value);
}
openLink(event) {
event.stopPropagation();
this.cancel();
gZenUIManager.openAndChangeToTab('https://docs.zen-browser.app/guides/');
}
acceptNotice() {
this.hasAcceptedNotice = true;
const notice = document.getElementById('zen-rice-share-dialog-notice');
notice.setAttribute('hidden', 'true');
this.openShareDialog();
}
toggleOptions(event) {
if (event.originalTarget.closest('.options-header')) {
const options = document.getElementById('zen-rice-share-options');
options.setAttribute('zen-collapsed', options.getAttribute('zen-collapsed') === 'true' ? 'false' : 'true');
}
this.validateShareDialog();
}
openShareDialog() {
window.docShell.treeOwner.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIAppWindow).rollupAllPopups();
const dialog = this.shareDialog;
dialog.removeAttribute('hidden');
if (!this.hasAcceptedNotice) {
const notice = document.getElementById('zen-rice-share-dialog-notice');
notice.removeAttribute('hidden');
return;
}
document.getElementById('zen-rice-share-dialog').removeAttribute('hidden');
document.getElementById('zen-rice-share-dialog-notice').setAttribute('hidden', 'true');
document.getElementById('zen-rice-share-name').focus();
// Initialize the dialog with the current values
this.validateShareDialog();
}
resetShareDialog() {
const dialog = this.shareDialog;
dialog.setAttribute('hidden', 'true');
document.getElementById('zen-rice-share-dialog').removeAttribute('animate');
document.getElementById('zen-rice-share-name').value = '';
document.getElementById('zen-rice-share-author').value = '';
document.getElementById('zen-rice-share-save').disabled = true;
document.getElementById('zen-rice-share-first-form').removeAttribute('fade-out');
document.getElementById('zen-rice-share-second-form').setAttribute('hidden', 'true');
document.getElementById('zen-rice-share-second-form').removeAttribute('fade-out');
document.getElementById('zen-rice-share-error').setAttribute('hidden', 'true');
document.getElementById('zen-rice-share-success').setAttribute('hidden', 'true');
document.getElementById('zen-rice-share-options').setAttribute('zen-collapsed', 'true');
// Remove confetti module from memory
this.confetti = null;
}
cancel() {
this.resetShareDialog();
}
getAllowedRice() {
return {
userChrome: document.getElementById('zen-rice-share-include-userchrome').checked,
userContent: document.getElementById('zen-rice-share-include-usercontent').checked,
mods: document.getElementById('zen-rice-share-include-mods').checked,
modPrefs: document.getElementById('zen-rice-share-include-mod-prefs').checked,
preferences: document.getElementById('zen-rice-share-include-preferences').checked,
workspaceThemes: document.getElementById('zen-rice-share-include-workspace-themes').checked,
};
}
get userAgent() {
return `ZenBrowser/${Services.appinfo.version} (${gZenOperatingSystemCommonUtils.currentOperatingSystem})`;
}
canShareRice() {
const allowedRice = this.getAllowedRice();
const modsPrefs = document.getElementById('zen-rice-share-include-mod-prefs');
// remove "share mod prefs" if mods are not included
if (!allowedRice.mods) {
allowedRice.modPrefs = false;
modsPrefs.disabled = true;
}
modsPrefs.disabled = !allowedRice.mods;
return Object.values(allowedRice).some((v) => v);
}
validateShareDialog() {
const saveButton = document.getElementById('zen-rice-share-save');
const authorInput = document.getElementById('zen-rice-share-author');
const input = document.getElementById('zen-rice-share-name');
saveButton.disabled =
!this.canShareRice() ||
input.value.trim().length < 3 ||
input.value.trim().length > 30 ||
authorInput.value.trim().length < 3 ||
authorInput.value.trim().length > 15;
}
async submit() {
const firstForm = document.getElementById('zen-rice-share-first-form');
const secondForm = document.getElementById('zen-rice-share-second-form');
firstForm.setAttribute('fade-out', 'true');
secondForm.removeAttribute('hidden');
await this._submit();
}
async _submit() {
const allowedRice = this.getAllowedRice();
const rice = await this._collector.packRice(allowedRice);
const name = document.getElementById('zen-rice-share-name').value;
const author = document.getElementById('zen-rice-share-author').value;
const response = await this._sendRice({ name, author, rice });
if (response) {
this.showSuccessDialog(response);
}
}
async _sendRice({ name, author, rice }) {
const headers = new Headers();
headers.append('X-Zen-Rice-Name', name);
headers.append('X-Zen-Rice-Author', author);
headers.append('User-Agent', this.userAgent);
headers.append('Content-Type', 'application/json');
headers.append('Accept', 'application/json');
let response;
try {
response = await fetch(`${ZEN_RICE_API}/rices`, {
method: 'POST',
headers,
body: JSON.stringify(rice),
});
} catch (e) {
this.showErrorMessage('An error occurred while sharing your rice. Please try again later.');
console.error(e);
return null;
}
// Here, response will never be a null object
return await this._verifyResponse(response);
}
async _verifyResponse(response) {
const json = await response.json();
if (!response.ok) {
const message = json.message || 'An error occurred while sharing your rice.';
this.showErrorMessage(message);
console.error(json);
return null;
}
return json;
}
showErrorMessage(message) {
const errorBox = document.getElementById('zen-rice-share-error');
errorBox.removeAttribute('hidden');
errorBox.querySelector('label').textContent = message;
}
showSuccessDialog(riceInfo) {
const { slug, token } = riceInfo;
// 'token' is like some sort of password to edit the rice, do NOT expose it
setTimeout(() => {
document.getElementById('zen-rice-share-dialog').setAttribute('animate', 'true');
const successBox = document.getElementById('zen-rice-share-success');
document.getElementById('zen-rice-share-second-form').setAttribute('fade-out', 'true');
successBox.removeAttribute('hidden');
const link = document.getElementById('zen-rice-share-success-link');
link.value = `${ZEN_RICE_API}/rices/${slug}`;
this.showConffetti();
}, 2000);
}
showConffetti() {
const end = Date.now() + 2500;
function frame() {
this.conffettiWrapper({
angle: 135,
spread: 55,
particleCount: 5,
startVelocity: 55,
origin: { y: 0.6 },
});
this.conffettiWrapper({
angle: 45,
spread: 55,
particleCount: 5,
startVelocity: 55,
origin: { y: 0.6 },
});
this.conffettiWrapper({
angle: 90,
spread: 55,
particleCount: 5,
startVelocity: 55,
origin: { y: 0.6 },
});
if (Date.now() < end) {
requestAnimationFrame(frame.bind(this));
}
}
frame.call(this);
}
openRicePage({ name, id, author }) {
console.log('Opening rice page: ', name, id, author);
gBrowser.removeTab(gBrowser.selectedTab);
}
}
window.ZenRiceManager = ZenRiceManager;
}

View File

@@ -1,11 +0,0 @@
BROWSER_CHROME_MANIFESTS += [
"tests/browser.toml",
]
FINAL_TARGET_FILES.actors += [
"actors/ZenGlanceChild.sys.mjs",
"actors/ZenGlanceParent.sys.mjs",
"actors/ZenThemeMarketplaceChild.sys.mjs",
"actors/ZenThemeMarketplaceParent.sys.mjs",
]

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d16ee46c8 100644
index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..1c5b80678fc3a4d17b0632a765b8182d88986bcc 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -188,13 +188,12 @@ index 9392b42a1de7310719a6cc8aaf11bd857e8fa69a..24dc9acd733ae401f8cdfb2351a7275d
}
child.removeAttribute("cui-anchorid");
child.removeAttribute("overflowedItem");
@@ -7186,6 +7190,9 @@ class OverflowableToolbar {
* @param {MouseEvent} aEvent the click event.
*/
#onClickDefaultListButton(aEvent) {
+ if (aEvent.view.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') {
+ return;
+ }
if (this.#defaultListButton.open) {
this.#defaultListButton.open = false;
lazy.PanelMultiView.hidePopup(this.#defaultListPanel);
@@ -7369,7 +7373,7 @@ class OverflowableToolbar {
break;
}
case "mousedown": {
- if (aEvent.button != 0) {
+ if (aEvent.button != 0 || this.#toolbar.id == "zen-sidebar-top-buttons") { // Fix https://github.com/zen-browser/desktop/issues/7718
break;
}
if (aEvent.target == this.#defaultListButton) {

View File

@@ -1024,4 +1024,9 @@ Preferences.addAll([
type: 'bool',
default: true,
},
{
id: 'media.videocontrols.picture-in-picture.enabled',
type: 'bool',
default: true,
},
]);

View File

@@ -1,7 +1,16 @@
diff --git a/browser/components/tabbrowser/content/browser-ctrlTab.js b/browser/components/tabbrowser/content/browser-ctrlTab.js
index e5d16e605b7edf11fc9f52b93e415087b76398f1..40b6e29d26c7f8d692a2a9a7d924b289ec7a3d03 100644
index 6753641cb579032306453be3f5054d7bc7661e8c..e0eda8d77637334ca30ee1842057cb43b4af2c21 100644
--- a/browser/components/tabbrowser/content/browser-ctrlTab.js
+++ b/browser/components/tabbrowser/content/browser-ctrlTab.js
@@ -252,7 +252,7 @@ var ctrlTab = {
},
get tabList() {
- return this._recentlyUsedTabs;
+ return this._recentlyUsedTabs.filter(tab => !tab.hasAttribute("pending"));
},
init: function ctrlTab_init() {
@@ -459,7 +459,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

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e218b527ed 100644
index 5f406ea5d09273c9b70b84eee24c6267f88692f8..be8740305b28cfc7752ad8f48ca94e69f8d324d1 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -424,11 +424,67 @@
@@ -347,19 +347,12 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
if (!tabData.pinned) {
this.unpinTab(tab);
} else {
@@ -3522,6 +3647,7 @@
restoreTabsLazily && !select && !tabData.pinned;
let url = "about:blank";
+ gZenPinnedTabManager.resetPinnedTabData(tabData);
if (tabData.entries?.length) {
let activeIndex = (tabData.index || tabData.entries.length) - 1;
// Ensure the index is in bounds.
@@ -3557,7 +3683,27 @@
@@ -3557,8 +3682,28 @@
skipLoad: true,
preferredRemoteType,
});
-
- if (select) {
+ if (tabData.zenWorkspace) {
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
+ }
@@ -381,10 +374,11 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
+ if (tabData.zenPinnedEntry) {
+ tab.setAttribute("zen-pinned-entry", tabData.zenPinnedEntry);
+ }
if (select) {
+ if (select && !tabData.pinned) {
tabToSelect = tab;
}
@@ -3570,8 +3716,8 @@
}
@@ -3570,8 +3715,8 @@
// inserted in the DOM. If the tab is not yet in the DOM,
// just insert it in the right place from the start.
if (!tab.parentNode) {
@@ -395,7 +389,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
tab.toggleAttribute("pinned", true);
this.tabContainer._invalidateCachedTabs();
// Then ensure all the tab open/pinning information is sent.
@@ -3581,7 +3727,8 @@
@@ -3581,7 +3726,8 @@
// needs calling:
shouldUpdateForPinnedTabs = true;
}
@@ -405,7 +399,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
let { groupId } = tabData;
const tabGroup = tabGroupWorkingData.get(groupId);
// if a tab refers to a tab group we don't know, skip any group
@@ -3595,7 +3742,10 @@
@@ -3595,7 +3741,10 @@
tabGroup.stateData.id,
tabGroup.stateData.color,
tabGroup.stateData.collapsed,
@@ -417,7 +411,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
);
tabsFragment.appendChild(tabGroup.node);
}
@@ -3646,6 +3796,9 @@
@@ -3646,6 +3795,9 @@
this.selectedTab = tabToSelect;
this.removeTab(leftoverTab);
}
@@ -427,7 +421,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
if (tabs.length > 1 || !tabs[0].selected) {
this._updateTabsAfterInsert();
@@ -3830,7 +3983,7 @@
@@ -3830,7 +3982,7 @@
// Ensure we have an index if one was not provided.
if (typeof index != "number") {
// Move the new tab after another tab if needed, to the end otherwise.
@@ -436,7 +430,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
if (
!bulkOrderedOpen &&
((openerTab &&
@@ -3876,18 +4029,18 @@
@@ -3876,18 +4028,18 @@
// Ensure index is within bounds.
if (tab.pinned) {
@@ -459,7 +453,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
if (tabAfter && tabAfter.group == tabGroup) {
// Place at the front of, or between tabs in, the same tab group
this.tabContainer.insertBefore(tab, tabAfter);
@@ -4199,6 +4352,9 @@
@@ -4199,6 +4351,9 @@
return;
}
@@ -469,7 +463,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
this.removeTabs(selectedTabs);
}
@@ -4450,6 +4606,7 @@
@@ -4450,6 +4605,7 @@
skipGroupCheck = false,
} = {}
) {
@@ -477,6 +471,14 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
// can be considered equivalent to closing the window.
if (
@@ -4533,6 +4689,7 @@
if (lastToClose) {
this.removeTab(lastToClose, aParams);
}
+ gZenUIManager.onTabClose(undefined);
} catch (e) {
console.error(e);
}
@@ -4556,6 +4713,7 @@
skipSessionStore,
} = {}
@@ -573,7 +575,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
if (unloadBlocked) {
return;
}
@@ -5159,7 +5325,7 @@
@@ -5159,13 +5325,13 @@
!excludeTabs.has(aTab.owner) &&
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
) {
@@ -582,6 +584,13 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
}
// Try to find a remaining tab that comes after the given tab
let remainingTabs = Array.prototype.filter.call(
this.visibleTabs,
- tab => !excludeTabs.has(tab)
+ tab => !excludeTabs.has(tab) && ZenWorkspaces._shouldChangeToTab(tab)
);
let tab = this.tabContainer.findNextTab(aTab, {
@@ -5181,7 +5347,7 @@
}
@@ -591,6 +600,15 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e2
}
// If no qualifying visible tab was found, see if there is a tab in
@@ -5202,7 +5368,7 @@
});
}
- return tab;
+ return ZenWorkspaces.findTabToBlur(tab);
}
_blurTab(aTab) {
@@ -5599,10 +5765,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
}

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f001dd4c3b1 100644
index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..75a30478387494c06e5c8131f55ba5dc977c8415 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -93,7 +93,7 @@
@@ -101,7 +101,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
gBrowser.loadTabs(urls, {
inBackground,
replace,
@@ -1276,13 +1294,23 @@
@@ -1276,13 +1294,25 @@
return;
}
@@ -114,6 +114,8 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
+ delete draggedTab._dragData;
+ return;
+ }
+ } else if (dt.mozUserCancelled) {
+ if (gZenViewSplitter._lastOpenedTab) gZenViewSplitter._lastOpenedTab._visuallySelected = false;
+ }
+
+ this._finishMoveTogetherSelectedTabs(draggedTab);
@@ -127,7 +129,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
) {
delete draggedTab._dragData;
return;
@@ -1504,7 +1532,7 @@
@@ -1504,7 +1534,7 @@
}
get newTabButton() {
@@ -136,7 +138,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
}
get verticalMode() {
@@ -1524,29 +1552,41 @@
@@ -1524,29 +1554,41 @@
if (this.#allTabs) {
return this.#allTabs;
}
@@ -186,7 +188,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
}
/**
@@ -1566,7 +1606,7 @@
@@ -1566,7 +1608,7 @@
*/
get visibleTabs() {
if (!this.#visibleTabs) {
@@ -195,7 +197,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
}
return this.#visibleTabs;
}
@@ -1601,23 +1641,18 @@
@@ -1601,23 +1643,18 @@
}
let elementIndex = 0;
@@ -223,7 +225,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
visibleTabsInGroup.forEach(tab => {
tab.elementIndex = elementIndex++;
@@ -1627,10 +1662,7 @@
@@ -1627,10 +1664,7 @@
}
}
@@ -235,7 +237,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
return this.#focusableItems;
}
@@ -1638,6 +1670,7 @@
@@ -1638,6 +1672,7 @@
_invalidateCachedTabs() {
this.#allTabs = null;
this._invalidateCachedVisibleTabs();
@@ -243,7 +245,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
}
_invalidateCachedVisibleTabs() {
@@ -1652,8 +1685,8 @@
@@ -1652,8 +1687,8 @@
#isContainerVerticalPinnedExpanded(tab) {
return (
this.verticalMode &&
@@ -254,7 +256,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
);
}
@@ -1668,7 +1701,7 @@
@@ -1668,7 +1703,7 @@
if (node == null) {
// We have a container for non-tab elements at the end of the scrollbox.
@@ -263,7 +265,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
}
node.before(tab);
@@ -1763,7 +1796,7 @@
@@ -1763,7 +1798,7 @@
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
// Attach the long click popup to all of them.
@@ -272,7 +274,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
const newTab2 = this.newTabButton;
const newTabVertical = document.getElementById(
"vertical-tabs-newtab-button"
@@ -1846,7 +1879,7 @@
@@ -1846,7 +1881,7 @@
let rect = ele => {
return window.windowUtils.getBoundsWithoutFlushing(ele);
};
@@ -281,7 +283,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
if (tab && rect(tab).width <= this._tabClipWidth) {
this.setAttribute("closebuttons", "activetab");
} else {
@@ -1858,10 +1891,12 @@
@@ -1858,10 +1893,12 @@
_handleTabSelect(aInstant) {
let selectedTab = this.selectedItem;
@@ -294,7 +296,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
selectedTab._notselectedsinceload = false;
}
@@ -1873,7 +1908,7 @@
@@ -1873,7 +1910,7 @@
return;
}
@@ -303,7 +305,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
if (!tabs.length) {
return;
}
@@ -1909,7 +1944,7 @@
@@ -1909,7 +1946,7 @@
if (isEndTab && !this._hasTabTempMaxWidth) {
return;
}
@@ -312,7 +314,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
// Force tabs to stay the same width, unless we're closing the last tab,
// which case we need to let them expand just enough so that the overall
// tabbar width is the same.
@@ -1924,7 +1959,7 @@
@@ -1924,7 +1961,7 @@
let tabsToReset = [];
for (let i = numPinned; i < tabs.length; i++) {
let tab = tabs[i];
@@ -321,7 +323,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
if (!isEndTab) {
// keep tabs the same width
tab.style.transition = "none";
@@ -1990,16 +2025,15 @@
@@ -1990,16 +2027,15 @@
// Move pinned tabs to another container when the tabstrip is toggled to vertical
// and when session restore code calls _positionPinnedTabs; update styling whenever
// the number of pinned tabs changes.
@@ -344,7 +346,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
}
}
@@ -2007,9 +2041,7 @@
@@ -2007,9 +2043,7 @@
}
_resetVerticalPinnedTabs() {
@@ -355,7 +357,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
if (!verticalTabsContainer.children.length) {
return;
@@ -2022,8 +2054,8 @@
@@ -2022,8 +2056,8 @@
}
_positionPinnedTabs() {
@@ -366,7 +368,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let absPositionHorizontalTabs =
this.overflowing && tabs.length > numPinned && numPinned > 0;
@@ -2032,7 +2064,7 @@
@@ -2032,7 +2066,7 @@
if (this.verticalMode) {
this._updateVerticalPinnedTabs();
@@ -375,7 +377,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let layoutData = this._pinnedTabsLayoutCache;
let uiDensity = document.documentElement.getAttribute("uidensity");
if (!layoutData || layoutData.uiDensity != uiDensity) {
@@ -2104,7 +2136,7 @@
@@ -2104,7 +2138,7 @@
return;
}
@@ -384,7 +386,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let directionX = screenX > dragData.animLastScreenX;
let directionY = screenY > dragData.animLastScreenY;
@@ -2112,7 +2144,7 @@
@@ -2112,7 +2146,7 @@
dragData.animLastScreenX = screenX;
let { width: tabWidth, height: tabHeight } =
@@ -393,7 +395,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let shiftSizeX = tabWidth * movingTabs.length;
let shiftSizeY = tabHeight;
dragData.tabWidth = tabWidth;
@@ -2296,11 +2328,15 @@
@@ -2296,11 +2330,15 @@
this.#clearDragOverCreateGroupTimer();
let isPinned = draggedTab.pinned;
@@ -413,7 +415,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
if (this.#rtlMode) {
tabs.reverse();
@@ -2314,7 +2350,7 @@
@@ -2314,7 +2352,7 @@
let size = this.verticalMode ? "height" : "width";
let translateAxis = this.verticalMode ? "translateY" : "translateX";
let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft";
@@ -422,7 +424,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let translateX = event.screenX - dragData.screenX;
let translateY = event.screenY - dragData.screenY;
@@ -2328,6 +2364,12 @@
@@ -2328,6 +2366,12 @@
let lastTab = tabs.at(-1);
let lastMovingTab = movingTabs.at(-1);
let firstMovingTab = movingTabs[0];
@@ -435,7 +437,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let endEdge = ele => ele[screenAxis] + bounds(ele)[size];
let lastMovingTabScreen = endEdge(lastMovingTab);
let firstMovingTabScreen = firstMovingTab[screenAxis];
@@ -2348,7 +2390,11 @@
@@ -2348,7 +2392,11 @@
translate = Math.min(Math.max(translate, firstBound), lastBound);
for (let tab of movingTabs) {
@@ -448,7 +450,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
}
dragData.translatePos = translate;
@@ -2485,6 +2531,9 @@
@@ -2485,6 +2533,9 @@
break;
}
let element = tabs[mid];
@@ -458,7 +460,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let elementForSize = isTabGroupLabel(element)
? element.parentElement
: element;
@@ -2507,6 +2556,10 @@
@@ -2507,6 +2558,10 @@
if (!dropElement) {
dropElement = this.ariaFocusableItems[oldDropElementIndex];
}
@@ -469,7 +471,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
let newDropElementIndex = dropElement
? dropElement.elementIndex
: oldDropElementIndex;
@@ -2515,7 +2568,7 @@
@@ -2515,7 +2570,7 @@
let shouldCreateGroupOnDrop;
let dropBefore;
if (dropElement) {
@@ -478,7 +480,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
? dropElement.parentElement
: dropElement;
@@ -2566,12 +2619,12 @@
@@ -2566,12 +2621,12 @@
}
}
@@ -493,7 +495,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
dropElement != draggedTab &&
isTab(dropElement) &&
!dropElement?.group &&
@@ -2639,7 +2692,7 @@
@@ -2639,7 +2694,7 @@
// Shift background tabs to leave a gap where the dragged tab
// would currently be dropped.
for (let item of tabs) {
@@ -502,7 +504,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
continue;
}
@@ -2648,6 +2701,9 @@
@@ -2648,6 +2703,9 @@
if (isTabGroupLabel(item)) {
// Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement;
@@ -512,7 +514,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
}
item.style.transform = transform;
}
@@ -2697,8 +2753,9 @@
@@ -2697,8 +2755,9 @@
);
}
@@ -524,7 +526,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
return;
}
@@ -2711,6 +2768,12 @@
@@ -2711,6 +2770,12 @@
item = item.parentElement;
}
item.style.transform = "";
@@ -537,7 +539,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
item.removeAttribute("dragover-createGroup");
}
this.removeAttribute("movingtab-createGroup");
@@ -2754,7 +2817,7 @@
@@ -2754,7 +2819,7 @@
let postTransitionCleanup = () => {
movingTab._moveTogetherSelectedTabsData.animate = false;
};
@@ -546,7 +548,7 @@ index 0fbdbf3aefc467880e6b0bae2615cb145735cb0f..0d3919b288afefb05e3ec54ddfa90f00
postTransitionCleanup();
} else {
let onTransitionEnd = transitionendEvent => {
@@ -2924,7 +2987,7 @@
@@ -2924,7 +2989,7 @@
}
_notifyBackgroundTab(aTab) {

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index 6de4c2ac873b1424abee118a143ac377f26beb80..423e3aab4fd4fff9960caf8b8375d7bfcb90c733 100644
index 6de4c2ac873b1424abee118a143ac377f26beb80..23b4d238d767000b9f0de74cfc13c862f1d17b8d 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
@@ -138,7 +138,24 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..423e3aab4fd4fff9960caf8b8375d7bf
return where;
}
@@ -4048,6 +4099,11 @@ export class UrlbarInput {
@@ -3625,7 +3676,7 @@ export class UrlbarInput {
pasteAndGo.setAttribute("anonid", "paste-and-go");
pasteAndGo.addEventListener("command", () => {
this._suppressStartQuery = true;
-
+ this.view.close();
this.select();
this.window.goDoCommand("cmd_paste");
this.setResultForCurrentValue(null);
@@ -3638,7 +3689,6 @@ export class UrlbarInput {
contextMenu.addEventListener("popupshowing", () => {
// Close the results pane when the input field contextual menu is open,
// because paste and go doesn't want a result selection.
- this.view.close();
let controller =
this.document.commandDispatcher.getControllerForCommand("cmd_paste");
@@ -4048,6 +4098,11 @@ export class UrlbarInput {
}
_on_click(event) {
@@ -150,7 +167,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..423e3aab4fd4fff9960caf8b8375d7bf
if (
event.target == this.inputField ||
event.target == this._inputContainer ||
@@ -4119,7 +4175,7 @@ export class UrlbarInput {
@@ -4119,7 +4174,7 @@ export class UrlbarInput {
}
}
@@ -159,7 +176,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..423e3aab4fd4fff9960caf8b8375d7bf
this.view.autoOpen({ event });
} else {
if (this._untrimOnFocusAfterKeydown) {
@@ -4159,9 +4215,12 @@ export class UrlbarInput {
@@ -4159,9 +4214,12 @@ export class UrlbarInput {
}
_on_mousedown(event) {
@@ -173,7 +190,7 @@ index 6de4c2ac873b1424abee118a143ac377f26beb80..423e3aab4fd4fff9960caf8b8375d7bf
if (
event.target != this.inputField &&
@@ -4171,8 +4230,8 @@ export class UrlbarInput {
@@ -4171,8 +4229,8 @@ export class UrlbarInput {
break;
}

View File

@@ -1,8 +1,8 @@
diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css
index 9af78803f0005a2b89e1c73f52153ed4d9e3154a..b63dc3d050144f048ac6a326acd57cc85fa8a3a7 100644
index 9af78803f0005a2b89e1c73f52153ed4d9e3154a..f5b21a09347f5890da3eef0efa38a66195c8e418 100644
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -40,14 +40,13 @@
@@ -40,13 +40,12 @@
* override these on the tabs toolbar because the accent color is
* arbitrary, so the hardcoded colors from browser-custom-colors might
* not provide sufficient contrast. */
@@ -12,9 +12,8 @@ index 9af78803f0005a2b89e1c73f52153ed4d9e3154a..b63dc3d050144f048ac6a326acd57cc8
}
}
&[sizemode="normal"] #navigator-toolbox {
- border-top: .5px solid ActiveBorder;
+ /* border-top: .5px solid ActiveBorder; Zen: Remove annoying top border, dont remove */
- &[sizemode="normal"] #navigator-toolbox {
+ &[sizemode="normal"] #browser {
border-top: .5px solid ActiveBorder;
&:-moz-window-inactive {
border-top-color: InactiveBorder;
}

View File

@@ -1,24 +1,8 @@
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
index 85974462e5ce2b7dbf85bd5c79f09b3db5c25915..f914f5c0f29be4149be15265bb6571ae92fb23cc 100644
index 2f0bb8a6e21bec5c89a4a25413bf8d1308210f52..450d8265c128861f3ad5973ec0417b9463ebffd0 100644
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -18462,13 +18462,13 @@
# Whether we use the mica backdrop. Off by default for now.
- name: widget.windows.mica
type: bool
- value: false
+ value: true
mirror: always
# Whether we use the mica backdrop for popups. Off by default for now.
- name: widget.windows.mica.popups
type: RelaxedAtomicBool
- value: false
+ value: true
mirror: always
# Whether we expand the client area into the taskbar hidden edge on maximized
@@ -18594,6 +18594,7 @@
@@ -18598,6 +18598,7 @@
mirror: always
#endif

View File

@@ -35,7 +35,7 @@ index 849b62c9976a7bc5fee35e074e54c8f556ed9c38..a9742c7ff30d417a18f41f9c12025919
}
}
@@ -78,6 +95,7 @@ static NSVisualEffectBlendingMode VisualEffectBlendingModeForVibrancyType(
@@ -78,6 +95,7 @@ - (NSView*)hitTest:(NSPoint)aPoint {
- (void)prefChanged {
self.blendingMode = VisualEffectBlendingModeForVibrancyType(mType);

View File

@@ -66,6 +66,11 @@
// A bit of a hack to make sure the tabs toolbar is updated.
// Just in case we didn't get the right size.
gZenUIManager.updateTabsToolbar();
// Fix for https://github.com/zen-browser/desktop/issues/7605, specially in compact mode
if (gURLBar.hasAttribute('breakout-extend')) {
gURLBar.focus();
}
}, 100);
}, 0);
this.closeWatermark();

View File

@@ -88,9 +88,11 @@ var gZenUIManager = {
this.tabsWrapper.scrollTop = this._scrollbarState;
},
onTabClose(event) {
this.updateTabsToolbar();
this.restoreScrollbarState();
onTabClose(event = undefined) {
if (!event?.target?._closedInMultiselection) {
this.updateTabsToolbar();
this.restoreScrollbarState();
}
},
openAndChangeToTab(url, options) {

View File

@@ -4,7 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
:root:not([inDOMFullscreen='true']):not([chromehidden~='location']):not([chromehidden~='toolbar']) {
& #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
& #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer,
#tabbrowser-tabpanels[dragging-split='true'] {
width: -moz-available;
position: relative;
overflow: hidden;

View File

@@ -4,40 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#zen-profile-button {
& stack {
padding: 0;
}
& .toolbarbutton-badge {
display: none !important;
}
& stack {
width: calc(2 * var(--toolbarbutton-inner-padding) + 16px) !important;
height: calc(2 * var(--toolbarbutton-inner-padding) + 16px) !important;
display: flex;
justify-content: center;
align-items: center;
& > image {
width: 0;
}
}
& #zen-profile-button-icon {
width: 20px;
height: 20px;
list-style-image: var(--avatar-image-url);
border-radius: 50%;
pointer-events: none;
list-style-image: var(--avatar-image-url);
-moz-context-properties: fill;
fill: currentColor;
border: 1px solid var(--zen-colors-border);
}
}
/* Bookmarks sidebar */
#zen-tabbox-wrapper {
& #sidebar-splitter {

View File

@@ -1,3 +1,7 @@
// 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/.
document.addEventListener(
'MozBeforeInitialXULLayout',
() => {

View File

@@ -6,7 +6,7 @@
/* All overrides for compact mode go here */
:root[zen-compact-mode='true']:not([customizing]):not([inDOMFullscreen='true']) {
%include zen-tabs/vertical-tabs-topbuttons-fix.css
%include ../tabs/zen-tabs/vertical-tabs-topbuttons-fix.css
@media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') {
&:not([zen-compact-animating]) {
& #zen-sidebar-splitter {
@@ -296,7 +296,6 @@
--zen-toolbox-top-align: var(--zen-element-separation);
}
& #sidebar-box,
& #titlebar,
& #zen-appcontent-wrapper,
& #zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel:not([pinned='true'])) {
@@ -385,3 +384,21 @@
}
}
}
/* Fix for https://github.com/zen-browser/desktop/issues/7615 */
:root[zen-compact-mode='true']:not([customizing])[inDOMFullscreen='true'] {
@media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') {
&:not([zen-compact-animating]) {
#navigator-toolbox {
opacity: 0;
}
}
}
@media -moz-pref('zen.view.compact.hide-toolbar') {
&:not([zen-single-toolbar='true']) {
& #zen-appcontent-navbar-container {
opacity: 0;
}
}
}
}

View File

@@ -1,3 +1,9 @@
/*
* 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/.
*/
tab-group[split-view-group] {
display: flex;
flex-wrap: nowrap;

View File

@@ -665,7 +665,7 @@
},
},
allFrames: true,
matches: ['https://*/*'],
matches: ['*://*/*'],
});
}
}

10
src/zen/glance/moz.build Normal file
View File

@@ -0,0 +1,10 @@
#
# 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/.
FINAL_TARGET_FILES.actors += [
"actors/ZenGlanceChild.sys.mjs",
"actors/ZenGlanceParent.sys.mjs",
]

View File

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 803 B

View File

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 513 KiB

After

Width:  |  Height:  |  Size: 513 KiB

View File

Before

Width:  |  Height:  |  Size: 522 KiB

After

Width:  |  Height:  |  Size: 522 KiB

View File

Before

Width:  |  Height:  |  Size: 525 KiB

After

Width:  |  Height:  |  Size: 525 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -151,7 +151,7 @@
this.hideMediaControls();
}
if (linkedBrowser?.browsingContext.mediaController) {
if (linkedBrowser?.browsingContext?.mediaController) {
this.deinitMediaController(linkedBrowser.browsingContext.mediaController, true, isCurrentBrowser, true);
}
}
@@ -359,9 +359,10 @@
for (const browser of window.gBrowser.browsers) {
const isMatch = browser.innerWindowID === windowId;
const isCurrentBrowser = this._currentBrowser?.browserId === browser.browserId;
const shouldShow = showCameraIndicator || showMicrophoneIndicator;
if (!isMatch) continue;
if (!isCurrentBrowser && (showCameraIndicator || showMicrophoneIndicator)) {
if (shouldShow && !(isCurrentBrowser && this.isSharing)) {
const webRTC = browser.browsingContext.currentWindowGlobal.getActor('WebRTC');
webRTC.sendAsyncMessage('webrtc:UnmuteMicrophone');
webRTC.sendAsyncMessage('webrtc:UnmuteCamera');
@@ -373,7 +374,7 @@
this.activateMediaDeviceControls(browser)
);
} else this.activateMediaDeviceControls(browser);
} else if (isCurrentBrowser && this.isSharing && !(showCameraIndicator || showMicrophoneIndicator)) {
} else if (!shouldShow && isCurrentBrowser && this.isSharing) {
this.isSharing = false;
this._currentBrowser = null;
this.hideMediaControls();

View File

@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#zen-media-controls-toolbar {
--progress-height: 4px;
--button-spacing: 2px;

10
src/zen/mods/moz.build Normal file
View File

@@ -0,0 +1,10 @@
#
# 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/.
FINAL_TARGET_FILES.actors += [
"actors/ZenThemeMarketplaceChild.sys.mjs",
"actors/ZenThemeMarketplaceParent.sys.mjs",
]

14
src/zen/moz.build Normal file
View File

@@ -0,0 +1,14 @@
#
# 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/.
BROWSER_CHROME_MANIFESTS += [
"tests/browser.toml",
]
DIRS += [
"glance",
"mods"
]

View File

@@ -90,6 +90,10 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
this.initializeContextMenu();
this.insertIntoContextMenu();
window.addEventListener('AfterWorkspacesSessionRestore', this.onAfterWorkspaceSessionRestore.bind(this), {
once: true,
});
// Add drag over listener to the browser view
if (Services.prefs.getBoolPref('zen.splitView.enable-tab-drop')) {
const tabBox = document.getElementById('tabbrowser-tabbox');
@@ -170,6 +174,10 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
}
onBrowserDragOverToSplit(event) {
if (this.fakeBrowser) {
this.onBrowserDragEndToSplit(event);
return;
}
var dt = event.dataTransfer;
var draggedTab;
if (dt.mozTypesAt(0)[0] == TAB_DROP_TYPE) {
@@ -222,6 +230,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
this._draggingTab = draggedTab;
gBrowser.selectedTab = oldTab;
this._hasAnimated = true;
this.tabBrowserPanel.setAttribute('dragging-split', 'true');
for (const tab of gBrowser.tabs) {
tab.style.removeProperty('transform');
if (tab.group) {
@@ -231,7 +240,11 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
// Add a min width to all the browser elements to prevent them from resizing
const panelsWidth = gBrowser.tabbox.getBoundingClientRect().width;
const halfWidth = panelsWidth / 2;
const side = event.clientX > halfWidth ? 'right' : 'left';
let threshold = gNavToolbox.getBoundingClientRect().width * (gZenVerticalTabsManager._prefsRightSide ? 0 : 1);
if (gZenCompactModeManager.preference) {
threshold = 0;
}
const side = event.clientX - threshold > halfWidth ? 'right' : 'left';
for (const browser of gBrowser.browsers) {
const width = browser.getBoundingClientRect().width;
// Only apply it to the left side because if we add it to the right side,
@@ -1370,6 +1383,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
}
const browser = tab.linkedBrowser.closest('.browserSidebarContainer');
if (active) {
tab.removeAttribute('pending');
browser.setAttribute('zen-split', 'true');
browser.addEventListener('dragstart', this.onBrowserDragStart);
@@ -1493,6 +1507,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
_maybeRemoveFakeBrowser(select = true) {
gBrowser.tabbox.removeAttribute('style');
this.tabBrowserPanel.removeAttribute('dragging-split');
if (this.fakeBrowser) {
delete this._hasAnimated;
this.fakeBrowser.remove();
@@ -1523,6 +1538,19 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
return false;
}
// CHeck if it's inside the tabbox
const tabboxRect = gBrowser.tabbox.getBoundingClientRect();
const elementSeparation = ZenThemeModifier.elementSeparation;
if (
event.clientX < tabboxRect.left ||
event.clientX > tabboxRect.right - elementSeparation ||
event.clientY < tabboxRect.top ||
event.clientY > tabboxRect.bottom - elementSeparation
) {
this._maybeRemoveFakeBrowser(false);
return false;
}
const dropSide = this.fakeBrowser?.getAttribute('side');
const containerRect = this.fakeBrowser.getBoundingClientRect();
const padding = ZenThemeModifier.elementSeparation;

View File

@@ -558,7 +558,7 @@
}
}
async _resetTabToStoredState(tab) {
_resetTabToStoredState(tab) {
const id = tab.getAttribute('zen-pin-id');
if (!id) {
return;
@@ -572,13 +572,19 @@
const tabState = SessionStore.getTabState(tab);
const state = JSON.parse(tabState);
state.entries = [
{
url: pin.url,
title: pin.title,
triggeringPrincipal_base64: lazy.E10SUtils.SERIALIZED_SYSTEMPRINCIPAL,
},
];
const foundEntryIndex = state.entries?.findIndex((entry) => entry.url === pin.url);
if (!foundEntryIndex || foundEntryIndex === -1) {
state.entries = [
{
url: pin.url,
title: pin.title,
triggeringPrincipal_base64: lazy.E10SUtils.SERIALIZED_SYSTEMPRINCIPAL,
},
];
} else {
// Remove everything except the entry we want to keep
state.entries = [state.entries[foundEntryIndex]];
}
state.image = pin.iconUrl || null;
state.index = 0;
@@ -807,8 +813,8 @@
return;
}
// Remove # and ? from the url
const pinUrl = pin.url.split('#')[0].split('?')[0];
const currentUrl = browser.currentURI.spec.split('#')[0].split('?')[0];
const pinUrl = pin.url.split('#')[0];
const currentUrl = browser.currentURI.spec.split('#')[0];
// Add an indicator that the pin has been changed
if (pinUrl === currentUrl) {
this.resetPinChangedUrl(tab);
@@ -980,7 +986,7 @@
if (!pin) {
return;
}
if (pin.url === 'about:blank') {
if (pin.url === 'about:blank' && tab.linkedBrowser.currentURI.spec !== 'about:blank') {
await this.replacePinnedUrlWithCurrent(tab);
}
}

View File

@@ -1,4 +1,5 @@
height: var(--zen-toolbar-height);
z-index: 1;
@media -moz-pref('zen.view.hide-window-controls') {
& {
@@ -15,7 +16,8 @@ height: var(--zen-toolbar-height);
&:not([zen-has-hover='true']):not([has-popup-menu]):not(:focus-within):not(:has(*:is([panelopen='true'], [open='true']))) {
transition-delay: 0.2s;
height: var(--zen-element-separation);
/* In order to still use it on fullscreen, even if it's 0px, add .1px (almost invisible) */
height: calc(var(--zen-element-separation) + 0.1px);
overflow: hidden;
opacity: 0;
& > * {

View File

@@ -385,7 +385,7 @@
min-height: fit-content;
overflow-y: auto;
height: 100%;
scrollbar-width: thin;
scrollbar-color: color-mix(in srgb, currentColor 26%, transparent) transparent;
/* Only do this hack if we have workspaces enabled */
:root[zen-workspace-id] & {
@@ -1109,10 +1109,11 @@
inset: -50%;
filter: blur(20px);
position: absolute;
background-size: 100% 100%;
background-size: contain;
background-clip: padding-box;
background-image: var(--zen-tab-icon);
z-index: -1;
background-position: center;
}
background: transparent;
@@ -1133,7 +1134,7 @@
}
&[visuallyselected]:hover .tab-background::before {
background: light-dark(rgba(255, 255, 255, 0.80), rgba(68, 64, 64, 0.80));
background: light-dark(rgba(255, 255, 255, 0.80), rgba(68, 64, 64, 0.75));
}
}
}

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