Compare commits

..

21 Commits

Author SHA1 Message Date
mr. M
f2c6d0a6b9 fix: streamline style clearing in ZenGlanceManager and update version numbers in surfer.json 2025-04-05 04:15:18 +02:00
mr. m
a7e217152b fix: refine panel appearance and shadow properties for better consistency across platforms 2025-04-04 18:11:59 +02:00
mr. m
91c993da13 fix: adjust padding for right-side toolbar buttons when window buttons are not reversed 2025-04-04 16:58:12 +02:00
mr. m
5e7423bdce fix: correct artifact name formatting in Windows profile build workflow 2025-04-04 15:44:48 +02:00
mr. m
ba48e15f5f fix: update workspace directory handling in Windows profile build 2025-04-04 15:42:56 +02:00
mr. m
4e407fb0b9 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2025-04-04 13:00:30 +02:00
mr. m
5d1963e0ec Implemented -zen-window-transform-origin attribute and applied it to the panels on the right side 2025-04-04 13:00:17 +02:00
mr. m
c9bb6b25e9 Merge pull request #7292 from Slowlife01/glance-permitunload
fix: skip permitUnload when fully opening glance
2025-04-04 12:06:00 +02:00
Slowlife01
3bf433992e style: format 2025-04-04 16:55:22 +07:00
Slowlife01
a3a82b9fe7 fix: skip permitUnload when fully opening glance 2025-04-04 16:54:20 +07:00
mr. m
513f04d41b Merge pull request #7288 from Slowlife01/tab-command
fix: update event handling for changing tab workspace
2025-04-04 10:34:18 +02:00
mr. m
5b318a8aaf Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2025-04-04 10:33:00 +02:00
mr. m
c75de7a096 fix: adjust margin-left in zen-compact-mode.css for improved layout 2025-04-04 10:32:37 +02:00
Slowlife01
2cd5140600 fix: update event handling for changing tab workspace 2025-04-04 15:06:51 +07:00
mr. m
eaca3d6cc8 Correctly redirect output on windows pgo steps
Signed-off-by: mr. m  <91018726+mauro-balades@users.noreply.github.com>
2025-04-04 08:25:56 +02:00
mr. m
2ce89bf24b fix: add !important to appearance property in ctrlTab.css for better styling control 2025-04-03 21:41:00 +02:00
mr. m
97cbd76e8e fix: change position from absolute to fixed in zen-compact-mode.css and update sidebar visibility logic in ToolbarContextMenu 2025-04-03 20:39:17 +02:00
mr. m
683bb7eb41 fix: update path for zen metainfo file in build workflow 2025-04-03 19:50:09 +02:00
mr. m
8b0fd0af85 Merge branch 'dev' of https://github.com/zen-browser/desktop into dev 2025-04-03 19:49:35 +02:00
mr. m
80d177aa92 fix: update template root path in build workflow configuration 2025-04-03 19:49:30 +02:00
mr. m
dea4ccbe58 Fixed flatpak upload path
Signed-off-by: mr. m  <91018726+mauro-balades@users.noreply.github.com>
2025-04-03 10:35:03 -07:00
31 changed files with 650 additions and 710 deletions

View File

@@ -645,7 +645,7 @@ jobs:
pwd
ls .
ls ..
mv releases.xml ./build/flatpak/app.zen_browser.zen.metainfo.xml
mv releases.xml ./flatpak/app.zen_browser.zen.metainfo.xml
# output the version to the file
echo -n ${{ needs.build-data.outputs.version }} > ./flatpak/version
@@ -707,7 +707,7 @@ jobs:
--linux-archive zen.linux-x86_64.tar.xz \
--linux-aarch64-archive zen.linux-aarch64.tar.xz \
--output app.zen_browser.zen.yml \
--template-root ./zen-browser/flatpak
--template-root ./zen-browser/build/flatpak
- name: Commit changes
run: |

View File

@@ -65,7 +65,7 @@ jobs:
- name: Setup
run: |
(New-Object System.Net.WebClient).DownloadFile("https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe", "C:\MozillaBuildSetup-Latest.exe")
C:\MozillaBuildSetup-Latest.exe /S
C:\MozillaBuildSetup-Latest.exe /S | out-null
- name: Download Firefox and dependencies
if: ${{ matrix.arch == 'x86_64' }}
@@ -82,15 +82,16 @@ jobs:
- name: Generate
if: ${{ matrix.arch == 'x86_64' }}
run: |
ls
$Env:USE_MINTTY = "0"
$workspace_dir_current = [regex]::replace($env:GITHUB_WORKSPACE, "^([A-Z]):", { "/" + $args.value.Substring(0, 1).toLower() }) -replace "\\", "/"
$workspace_dir = $workspace_dir_current + "/engine"
echo $workspace_dir
echo "cd $workspace_dir" '' >> mozilla-build-run.sh
echo 'export PATH=/c/mozilla-build/msys2/usr/bin:$PATH' '' >> mozilla-build-run.sh
echo './mach --no-interactive bootstrap --application-choice browser' '' >> mozilla-build-run.sh
echo 'LLVM_PROFDATA=/c/Users/runneradmin/.mozbuild/clang/bin/llvm-profdata.exe JARLOG_FILE=en-US.log ./mach python build/pgo/profileserver.py --binary /c/artifact/zen/zen.exe' '' >> mozilla-build-run.sh
echo 'Running Profile Build:'
C:\mozilla-build\start-shell.bat mozilla-build-run.sh
C:\mozilla-build\start-shell.bat $workspace_dir_current\mozilla-build-run.sh
- name: Move profile data
if: ${{ matrix.arch == 'x86_64' }}

View File

@@ -83,8 +83,6 @@
_changeSidebarLocation() {
const kElementsToAppend = ['sidebar-splitter', 'sidebar-box'];
const appWrapepr = document.getElementById('zen-sidebar-box-container');
appWrapepr.setAttribute('hidden', 'true');
const browser = document.getElementById('browser');
const toolbox = document.getElementById('navigator-toolbox');

View File

@@ -657,10 +657,10 @@ var gZenVerticalTabsManager = {
this.navigatorToolbox.after(document.getElementById('zen-sidebar-splitter'));
window.dispatchEvent(new Event('resize'));
gZenCompactModeManager.getAndApplySidebarWidth();
gZenUIManager.updateTabsToolbar();
} catch (e) {
console.error(e);
}
gZenUIManager.updateTabsToolbar();
this._isUpdating = false;
},

View File

@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
index 0d0a559a6473149b50f4bf18d059e86907c4acd3..a5a48ba1d50b3bf74dec3f3d371a76228e246a9e 100644
index 0d0a559a6473149b50f4bf18d059e86907c4acd3..25ad798eb26f04262d069fdaf1f3fb00adec9807 100644
--- a/browser/base/content/browser.xhtml
+++ b/browser/base/content/browser.xhtml
@@ -26,6 +26,7 @@
@@ -27,7 +27,7 @@ index 0d0a559a6473149b50f4bf18d059e86907c4acd3..a5a48ba1d50b3bf74dec3f3d371a7622
</head>
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
# All sets except for popupsets (commands, keys, and stringbundles)
@@ -169,9 +173,13 @@
@@ -169,9 +173,11 @@
</vbox>
</html:template>
@@ -37,8 +37,6 @@ index 0d0a559a6473149b50f4bf18d059e86907c4acd3..a5a48ba1d50b3bf74dec3f3d371a7622
+ <hbox id="zen-main-app-wrapper" flex="1" persist="zen-compact-mode">
+ <vbox id="zen-toast-container"></vbox>
+ #include navigator-toolbox.inc.xhtml
+ <html:span id="zen-sidebar-box-container">
+ </html:span>
+ #include browser-box.inc.xhtml
+ </hbox>

View File

@@ -19,7 +19,6 @@
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-decks.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-folders.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-glance.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-sidebar-panels.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-popup.css" />
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-compact-mode.css" />

View File

@@ -45,7 +45,6 @@
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-sidebar-panels.css (content/zen-styles/zen-sidebar-panels.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)

View File

@@ -25,7 +25,7 @@
<command id="cmd_zenWorkspaceSwitch10" />
<command id="cmd_zenOpenZenThemePicker" />
<command id="cmd_zenChangeWorkspaceTabColor" />
<command id="cmd_zenChangeWorkspaceTab" />
<command id="cmd_zenToggleTabsOnRight" />
<command id="cmd_zenReplacePinnedUrlWithCurrent" />

View File

@@ -53,7 +53,7 @@ document.addEventListener(
gZenThemePicker.openThemePicker(event);
break;
case 'cmd_zenChangeWorkspaceTab':
ZenWorkspaces.changeTabWorkspace(event.target.getAttribute('zen-workspace-id'));
ZenWorkspaces.changeTabWorkspace(event.sourceEvent.target.getAttribute('zen-workspace-id'));
break;
case 'cmd_zenToggleTabsOnRight':
gZenVerticalTabsManager.toggleTabsOnRight();

View File

@@ -187,3 +187,46 @@
}
}
}
:root[zen-window-buttons-reversed='true'][zen-right-side='true'] .titlebar-buttonbox-container {
margin-inline-start: calc(var(--zen-element-separation) - 3px);
}
.zen-split-view-splitter[orient='vertical'],
#zen-sidebar-splitter {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: var(--zen-element-separation);
background: transparent;
border: none;
cursor: ew-resize;
z-index: 3;
&:is(.zen-split-view-splitter[orient='vertical']) {
/* Bit of a hacky solution, but it works */
width: var(--zen-split-row-gap);
margin-left: calc(var(--zen-element-separation) * -1 - 1px);
height: unset;
cursor: ew-resize;
}
&::before {
height: 50px;
width: 2px;
background: var(--button-primary-bgcolor);
border-radius: 2px;
content: '';
position: absolute;
top: 50%;
left: 50%;
opacity: 0;
transition: opacity 0.1s ease-in-out;
pointer-events: none;
}
&:hover::before {
opacity: 1;
}
}

View File

@@ -7,286 +7,288 @@
:root[zen-compact-mode='true']:not([customizing]):not([inDOMFullscreen='true']) {
%include zen-tabs/vertical-tabs-topbuttons-fix.css
@media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') {
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
}
#zen-tabbox-wrapper {
/* Remove extra 1px of margine we have to add to the tabbox */
margin-left: var(--zen-element-separation) !important;
margin-right: var(--zen-element-separation) !important;
}
#zen-appcontent-wrapper {
& #tabbrowser-tabbox {
margin-left: 0 !important;
&:not([zen-compact-animating]) {
& #zen-sidebar-splitter {
display: none !important;
}
}
#zen-sidebar-top-buttons-customization-target {
padding-inline-start: calc(var(--zen-toolbox-padding) - var(--toolbarbutton-outer-padding)) !important;
}
#zen-tabbox-wrapper {
/* Remove extra 1px of margine we have to add to the tabbox */
margin-left: var(--zen-element-separation) !important;
margin-right: var(--zen-element-separation) !important;
}
#zen-sidebar-splitter {
display: none !important;
}
&:not([zen-window-buttons-reversed='true']) #zen-appcontent-navbar-container #nav-bar {
margin-left: var(--zen-element-separation) !important;
}
&[zen-window-buttons-reversed='true'] #zen-appcontent-navbar-container #nav-bar {
margin-right: var(--zen-element-separation) !important;
}
#navigator-toolbox {
--zen-toolbox-max-width: 64px !important;
--zen-compact-float: var(--zen-element-separation);
/* Initial padding for when we are animating */
padding: 0 0 0 var(--zen-toolbox-padding) !important;
&:not([animate='true']) {
position: absolute;
z-index: 10;
transition:
left 0.15s ease,
right 0.15s ease,
opacity 1.5s ease;
top: 0;
bottom: var(--zen-element-separation);
padding: 0 var(--zen-compact-float) !important;
opacity: 0;
:root[zen-single-toolbar='true'] & {
top: calc(var(--zen-element-separation) / 2);
height: calc(100% - var(--zen-element-separation));
}
& #zen-sidebar-top-buttons {
margin: 0 0 calc(var(--zen-toolbox-padding) / 2) 0;
#zen-appcontent-wrapper {
& #tabbrowser-tabbox {
margin-left: 0 !important;
}
}
&:not([zen-right-side='true']) #nav-bar {
margin-left: 0 !important;
#zen-sidebar-splitter {
display: none !important;
}
}
&:not([zen-right-side='true']) #navigator-toolbox {
left: calc(-1 * var(--actual-zen-sidebar-width) + 1px);
}
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
* we need to adjust the top-padding of the toolbox to account for the
* extra toolbar height. */
@media not -moz-pref('zen.view.compact.hide-toolbar') {
&:not([zen-single-toolbar='true']) {
#navigator-toolbox:not([animate='true']) {
margin-top: var(--zen-toolbar-height) !important;
}
#zen-sidebar-top-buttons-customization-target {
padding-inline-start: calc(var(--zen-toolbox-padding) - var(--toolbarbutton-outer-padding)) !important;
}
}
&[zen-right-side='true'] {
& #navigator-toolbox {
--zen-compact-float: calc(var(--zen-element-separation) + 1px);
&:not([zen-window-buttons-reversed='true']) #zen-appcontent-navbar-container #nav-bar {
margin-left: var(--zen-element-separation) !important;
}
&[zen-window-buttons-reversed='true'] #zen-appcontent-navbar-container #nav-bar {
margin-right: var(--zen-element-separation) !important;
margin-left: calc(var(--zen-element-separation) - 3px) !important;
}
#navigator-toolbox {
--zen-toolbox-max-width: 64px !important;
--zen-compact-float: var(--zen-element-separation);
/* Initial padding for when we are animating */
padding: 0 0 0 var(--zen-toolbox-padding) !important;
&:not([animate='true']) {
right: calc(-1 * var(--actual-zen-sidebar-width) + 1px);
position: fixed;
z-index: 10;
transition:
left 0.15s ease,
right 0.15s ease,
opacity 1.5s ease;
top: 0;
bottom: var(--zen-element-separation);
padding: 0 var(--zen-compact-float) !important;
opacity: 0;
:root[zen-single-toolbar='true'] & {
top: calc(var(--zen-element-separation) / 2);
height: calc(100% - var(--zen-element-separation));
}
& #zen-sidebar-top-buttons {
margin: 0 0 calc(var(--zen-toolbox-padding) / 2) 0;
}
}
&:not([zen-right-side='true']) #nav-bar {
margin-left: 0 !important;
}
}
& .browserSidebarContainer {
margin-left: 0 !important;
margin-right: 0 !important;
&:not([zen-right-side='true']) #navigator-toolbox {
left: calc(-1 * var(--actual-zen-sidebar-width) + 1px);
}
}
#navigator-toolbox:not([animate='true']) #titlebar {
box-shadow: var(--zen-big-shadow);
border-radius: calc(var(--zen-native-inner-radius) + var(--zen-element-separation) / 4);
padding: var(--zen-toolbox-padding) !important;
position: relative;
background: var(--zen-dialog-background);
outline: 1px solid var(--zen-colors-border-contrast);
outline-offset: -1px;
/* times 4 because we have the inner padding and the outter padding to consider */
:root[zen-sidebar-expanded='true'] & {
&[has-animated-padding='true'] {
width: calc(var(--zen-sidebar-width) + var(--zen-toolbox-padding));
}
&:not([has-animated-padding='true']) {
width: calc(var(--zen-sidebar-width) - var(--zen-toolbox-padding));
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
* we need to adjust the top-padding of the toolbox to account for the
* extra toolbar height. */
@media not -moz-pref('zen.view.compact.hide-toolbar') {
&:not([zen-single-toolbar='true']) {
#navigator-toolbox:not([animate='true']) {
margin-top: var(--zen-toolbar-height) !important;
}
}
}
:root[zen-single-toolbar='true'] {
padding-top: 0 !important;
margin-left: 0 !important;
&[zen-right-side='true'] {
& #navigator-toolbox {
--zen-compact-float: calc(var(--zen-element-separation) + 1px);
&:not([animate='true']) {
right: calc(-1 * var(--actual-zen-sidebar-width) + 1px);
}
}
& .browserSidebarContainer {
margin-left: 0 !important;
margin-right: 0 !important;
}
}
@media -moz-pref('zen.view.compact.color-sidebar') {
background: var(--zen-main-browser-background-toolbar) !important;
background-attachment: fixed !important;
background-size: 2000px !important; /* Dont ask me why */
/* NOTE: We MUST not add a backdrop-filter if we want the URL
* bar to be floating correctly:
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_display/Containing_block#identifying_the_containing_block */
#navigator-toolbox:not([animate='true']) #titlebar {
box-shadow: var(--zen-big-shadow);
border-radius: calc(var(--zen-native-inner-radius) + var(--zen-element-separation) / 4);
padding: var(--zen-toolbox-padding) !important;
position: relative;
background: var(--zen-dialog-background);
outline: 1px solid var(--zen-colors-border-contrast);
outline-offset: -1px;
/* times 4 because we have the inner padding and the outter padding to consider */
:root[zen-sidebar-expanded='true'] & {
&[has-animated-padding='true'] {
width: calc(var(--zen-sidebar-width) + var(--zen-toolbox-padding));
}
&:not([has-animated-padding='true']) {
width: calc(var(--zen-sidebar-width) - var(--zen-toolbox-padding));
}
}
:root[zen-single-toolbar='true'] {
padding-top: 0 !important;
margin-left: 0 !important;
}
@media -moz-pref('zen.view.compact.color-sidebar') {
background: var(--zen-main-browser-background-toolbar) !important;
background-attachment: fixed !important;
background-size: 2000px !important; /* Dont ask me why */
/* NOTE: We MUST not add a backdrop-filter if we want the URL
* bar to be floating correctly:
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_display/Containing_block#identifying_the_containing_block */
}
& #urlbar[open][zen-floating-urlbar='true'] {
transition: left 0.05s ease;
visibility: visible;
#navigator-toolbox:has(&) {
opacity: 1;
}
}
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url(chrome://browser/content/zen-images/grain-bg.png);
pointer-events: none;
z-index: 0;
opacity: var(--zen-grainy-background-opacity, 0);
mix-blend-mode: overlay;
}
}
& #urlbar[open][zen-floating-urlbar='true'] {
transition: left 0.05s ease;
visibility: visible;
#navigator-toolbox:has(&) {
#navigator-toolbox[zen-has-hover]:not(:has(#urlbar[zen-floating-urlbar='true']:hover)),
#navigator-toolbox[zen-user-show],
#navigator-toolbox[zen-has-empty-tab],
#navigator-toolbox[flash-popup],
#navigator-toolbox[has-popup-menu],
#navigator-toolbox[movingtab],
#navigator-toolbox:has(.tabbrowser-tab:active),
&[zen-renaming-tab='true'] #navigator-toolbox,
#navigator-toolbox:has(
*:is([panelopen='true'], [open='true'], #urlbar:focus-within):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore)
) {
&:not([animate='true']) {
--zen-compact-mode-func: linear(
0 0%,
0.002748 1%,
0.010544 2%,
0.022757 3%,
0.038804 4%,
0.058151 5%,
0.080308 6%,
0.104828 7.000000000000001%,
0.131301 8%,
0.159358 9%,
0.188662 10%,
0.21891 11%,
0.249828 12%,
0.281172 13%,
0.312724 14.000000000000002%,
0.344288 15%,
0.375693 16%,
0.40679 17%,
0.437447 18%,
0.467549 19%,
0.497 20%,
0.525718 21%,
0.553633 22%,
0.580688 23%,
0.60684 24%,
0.632052 25%,
0.656298 26%,
0.679562 27%,
0.701831 28.000000000000004%,
0.723104 28.999999999999996%,
0.743381 30%,
0.76267 31%,
0.780983 32%,
0.798335 33%,
0.814744 34%,
0.830233 35%,
0.844826 36%,
0.858549 37%,
0.87143 38%,
0.883498 39%,
0.894782 40%,
0.905314 41%,
0.915125 42%,
0.924247 43%,
0.93271 44%,
0.940547 45%,
0.947787 46%,
0.954463 47%,
0.960603 48%,
0.966239 49%,
0.971397 50%,
0.976106 51%,
0.980394 52%,
0.984286 53%,
0.987808 54%,
0.990984 55.00000000000001%,
0.993837 56.00000000000001%,
0.99639 56.99999999999999%,
0.998664 57.99999999999999%,
1.000679 59%,
1.002456 60%,
1.004011 61%,
1.005363 62%,
1.006528 63%,
1.007522 64%,
1.008359 65%,
1.009054 66%,
1.009618 67%,
1.010065 68%,
1.010405 69%,
1.010649 70%,
1.010808 71%,
1.01089 72%,
1.010904 73%,
1.010857 74%,
1.010757 75%,
1.010611 76%,
1.010425 77%,
1.010205 78%,
1.009955 79%,
1.009681 80%,
1.009387 81%,
1.009077 82%,
1.008754 83%,
1.008422 84%,
1.008083 85%,
1.00774 86%,
1.007396 87%,
1.007052 88%,
1.00671 89%,
1.006372 90%,
1.00604 91%,
1.005713 92%,
1.005394 93%,
1.005083 94%,
1.004782 95%,
1.004489 96%,
1.004207 97%,
1.003935 98%,
1.003674 99%,
1.003423 100%
);
transition:
left 0.25s var(--zen-compact-mode-func),
right 0.25s var(--zen-compact-mode-func);
opacity: 1;
}
}
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url(chrome://browser/content/zen-images/grain-bg.png);
pointer-events: none;
z-index: 0;
opacity: var(--zen-grainy-background-opacity, 0);
mix-blend-mode: overlay;
}
}
#navigator-toolbox[zen-has-hover]:not(:has(#urlbar[zen-floating-urlbar='true']:hover)),
#navigator-toolbox[zen-user-show],
#navigator-toolbox[zen-has-empty-tab],
#navigator-toolbox[flash-popup],
#navigator-toolbox[has-popup-menu],
#navigator-toolbox[movingtab],
#navigator-toolbox:has(.tabbrowser-tab:active),
&[zen-renaming-tab='true'] #navigator-toolbox,
#navigator-toolbox:has(
*:is([panelopen='true'], [open='true'], #urlbar:focus-within):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore)
) {
&:not([animate='true']) {
--zen-compact-mode-func: linear(
0 0%,
0.002748 1%,
0.010544 2%,
0.022757 3%,
0.038804 4%,
0.058151 5%,
0.080308 6%,
0.104828 7.000000000000001%,
0.131301 8%,
0.159358 9%,
0.188662 10%,
0.21891 11%,
0.249828 12%,
0.281172 13%,
0.312724 14.000000000000002%,
0.344288 15%,
0.375693 16%,
0.40679 17%,
0.437447 18%,
0.467549 19%,
0.497 20%,
0.525718 21%,
0.553633 22%,
0.580688 23%,
0.60684 24%,
0.632052 25%,
0.656298 26%,
0.679562 27%,
0.701831 28.000000000000004%,
0.723104 28.999999999999996%,
0.743381 30%,
0.76267 31%,
0.780983 32%,
0.798335 33%,
0.814744 34%,
0.830233 35%,
0.844826 36%,
0.858549 37%,
0.87143 38%,
0.883498 39%,
0.894782 40%,
0.905314 41%,
0.915125 42%,
0.924247 43%,
0.93271 44%,
0.940547 45%,
0.947787 46%,
0.954463 47%,
0.960603 48%,
0.966239 49%,
0.971397 50%,
0.976106 51%,
0.980394 52%,
0.984286 53%,
0.987808 54%,
0.990984 55.00000000000001%,
0.993837 56.00000000000001%,
0.99639 56.99999999999999%,
0.998664 57.99999999999999%,
1.000679 59%,
1.002456 60%,
1.004011 61%,
1.005363 62%,
1.006528 63%,
1.007522 64%,
1.008359 65%,
1.009054 66%,
1.009618 67%,
1.010065 68%,
1.010405 69%,
1.010649 70%,
1.010808 71%,
1.01089 72%,
1.010904 73%,
1.010857 74%,
1.010757 75%,
1.010611 76%,
1.010425 77%,
1.010205 78%,
1.009955 79%,
1.009681 80%,
1.009387 81%,
1.009077 82%,
1.008754 83%,
1.008422 84%,
1.008083 85%,
1.00774 86%,
1.007396 87%,
1.007052 88%,
1.00671 89%,
1.006372 90%,
1.00604 91%,
1.005713 92%,
1.005394 93%,
1.005083 94%,
1.004782 95%,
1.004489 96%,
1.004207 97%,
1.003935 98%,
1.003674 99%,
1.003423 100%
);
transition:
left 0.25s var(--zen-compact-mode-func),
right 0.25s var(--zen-compact-mode-func);
opacity: 1;
&:not([supress-primary-adjustment='true']) {
left: calc(var(--zen-element-separation) / -2);
:root[zen-right-side='true'] & {
right: calc(var(--zen-element-separation) / -2);
left: auto;
&:not([supress-primary-adjustment='true']) {
left: calc(var(--zen-element-separation) / -2);
:root[zen-right-side='true'] & {
right: calc(var(--zen-element-separation) / -2);
left: auto;
}
}
}
}

View File

@@ -133,7 +133,7 @@
padding: 5px;
position: relative;
& .zen-theme-picker-dot-custom {
& .zen-theme-picker-dot.custom {
background: var(--zen-theme-picker-dot-color);
border: 1px solid var(--zen-colors-border);
border-radius: 5px;

View File

@@ -6,6 +6,19 @@
panel[type='arrow'][animate='open'] {
@media (-moz-platform: macos) {
animation: zen-jello-animation-macos 0.4s ease-out;
&[side='bottom'] {
/* Animate from the bottom */
-zen-window-transform-origin: 0 100%;
}
:root[zen-right-side='true'] & {
/* Animate from the right */
-zen-window-transform-origin: 100% 0;
&[side='bottom'] {
/* Animate from the bottom right */
-zen-window-transform-origin: 100% 100%;
}
}
}
@media (-moz-platform: linux) or ((-moz-platform: windows) and (not (-moz-windows-mica-popups))) {
/* Mica popups have a weird background while the animation is running */
@@ -20,7 +33,7 @@ panel[type='arrow'][animate]:not([animate='open']) {
}
menupopup,
panel {
panel[type='arrow'] {
@media (-moz-windows-mica-popups) {
appearance: auto !important;
-moz-default-appearance: menupopup;
@@ -34,4 +47,18 @@ panel {
animation: none !important;
}
}
@media (-moz-platform: macos) {
appearance: auto !important;
-moz-default-appearance: menupopup;
/* We set the default background here, rather than on ::part(content),
* because otherwise it'd interfere with the native look. Non-native-looking
* popups should get their background via --panel-background */
background-color: Menu;
--panel-shadow-margin: 0px !important;
--panel-background: transparent !important;
--panel-border-color: transparent;
/* This should be kept in sync with GetMenuMaskImage() */
--panel-border-radius: 6px;
}
}

View File

@@ -1,306 +0,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/.
*/
#zen-sidebar-panels-wrapper {
/*min-height: 500px;*/
display: flex;
align-items: center;
justify-content: space-between;
align-content: center;
}
#zen-sidebar-panels-sites {
background: transparent;
max-width: 1px;
display: flex;
}
#zen-sidebar-add-panel-button:not(:hover) image,
.zen-sidebar-panel-button:not([selected='true'], #zen-sidebar-add-panel-button) image {
background: transparent !important;
}
.zen-sidebar-panel-button {
width: var(--zen-sidebar-action-button-width);
height: var(--zen-sidebar-action-button-width);
max-height: var(--zen-sidebar-action-button-width);
padding: 0 3px !important;
margin: 0;
justify-content: center;
align-items: center;
cursor: pointer;
}
.zen-sidebar-panel-button image {
border-radius: 10px !important;
border: 2px solid transparent;
}
.zen-sidebar-panel-button:hover image {
background: color-mix(in srgb, var(--toolbarbutton-hover-background) 12%, transparent);
}
.zen-sidebar-panel-button[selected='true'] image {
border-color: var(--zen-primary-color);
}
/** Sidebar view */
#zen-sidebar-web-panel-wrapper {
--zen-default-sidebar-width: 300px;
--zen-sidebar-web-panel-spacing: var(--zen-element-separation);
position: relative;
margin-right: 0;
display: flex;
pointer-events: none;
transition: width 0.3s ease-in-out;
}
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[hidden='true']) {
max-width: 0;
padding: 0;
margin: 0;
display: none;
}
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
position: absolute;
z-index: 1;
width: calc(100% - var(--zen-sidebar-web-panel-spacing) * 3);
margin: var(--zen-sidebar-web-panel-spacing);
/* Why times 3?
* + 1 for the top margin, making the element overflow the view.
* + 1 for the margin we want to add at the bottom
* + 1 so that the panel can be correctly spaced from the border of the webview
*/
height: calc(100% - var(--zen-sidebar-web-panel-spacing) * 4);
}
#zen-sidebar-web-panel {
border-radius: var(--zen-native-inner-radius);
z-index: 2;
box-shadow: var(--zen-big-shadow);
background: var(--zen-colors-tertiary);
opacity: 0;
animation-delay: 0.1s;
flex-direction: column;
min-width: var(--zen-default-sidebar-width);
max-width: 720px;
min-height: var(--zen-default-sidebar-width);
width: calc(var(--zen-default-sidebar-width) + 200px);
pointer-events: all;
height: calc(100% - 20px);
}
#zen-sidebar-web-panel:not([pinned='true']) {
/* We need to always override the height */
height: unset !important;
}
.zen-sidebar-web-panel-splitter,
.zen-split-view-splitter[orient='vertical'],
#zen-sidebar-splitter {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: var(--zen-element-separation);
background: transparent;
border: none;
cursor: ew-resize;
z-index: 3;
&:is(.zen-split-view-splitter[orient='vertical']) {
/* Bit of a hacky solution, but it works */
width: var(--zen-split-row-gap);
margin-left: calc(var(--zen-element-separation) * -1 - 1px);
height: unset;
cursor: ew-resize;
}
&::before {
height: 50px;
width: 2px;
background: var(--button-primary-bgcolor);
border-radius: 2px;
content: '';
position: absolute;
top: 50%;
left: 50%;
opacity: 0;
transition: opacity 0.1s ease-in-out;
pointer-events: none;
}
&:hover::before {
opacity: 1;
}
}
.zen-sidebar-web-panel-splitter[side='right'] {
left: 100%;
}
.zen-sidebar-web-panel-splitter[side='left'] {
right: 100%;
}
.zen-sidebar-web-panel-splitter[orient='horizontal'] {
width: 100%;
height: 7px;
cursor: ns-resize;
&::before {
display: none;
}
}
.zen-sidebar-web-panel-splitter[side='bottom'] {
top: initial;
bottom: -2px;
}
#zen-sidebar-web-panel[hidden='true'] .zen-sidebar-web-panel-splitter,
#zen-sidebar-web-panel-wrapper[hidden='true'] + .zen-sidebar-web-panel-splitter,
#zen-sidebar-web-panel:not([pinned='true']) .zen-sidebar-web-panel-splitter[orient='horizontal'],
#zen-sidebar-web-panel:not([pinned='true']) .zen-sidebar-web-panel-splitter[side='left'] {
display: none;
margin: 0;
}
#main-window[customizing='true'] #zen-sidebar-web-panel-wrapper {
display: none !important;
}
#zen-sidebar-web-panel:not([hidden='true']) {
display: flex;
}
#zen-sidebar-web-panel[pinned='true'] {
position: absolute;
z-index: 1;
max-height: 100%;
}
#zen-sidebar-web-panel[hidden='true'][pinned='true'] {
display: flex;
pointer-events: none;
}
#zen-sidebar-web-header,
#zen-sidebar-panels-wrapper {
width: 100%;
min-height: var(--zen-toolbar-height) !important;
display: flex;
align-items: center;
padding: 0 5px;
border: var(--zen-appcontent-border);
border-width: 0 !important;
border-bottom-width: 1px !important;
background: transparent;
position: relative;
color-scheme: var(--toolbar-color-scheme);
-moz-window-dragging: no-drag;
--toolbarbutton-inner-padding: var(--zen-toolbar-button-inner-padding) !important;
}
#zen-sidebar-web-header {
justify-content: space-between;
}
#zen-sidebar-web-header toolbarbutton {
fill: color-mix(in srgb, var(--toolbarbutton-icon-fill) 70%, transparent);
}
#zen-sidebar-panels-wrapper {
border-top-width: 1px !important;
border-bottom-width: 0px !important;
}
#zen-sidebar-web-panel-browser-containers {
height: 100%;
position: relative;
}
#zen-sidebar-introduction-panel {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0 auto;
width: 70%;
}
#zen-sidebar-introduction-panel[hidden='true'] {
display: none;
}
#zen-sidebar-introduction-panel h1 {
font-size: 1.5em;
font-weight: 600;
margin: 0;
margin-bottom: 2px;
}
#zen-sidebar-introduction-panel p {
opacity: 0.7;
text-align: center;
}
#zen-sidebar-web-panel browser[zen-sidebar-id] {
height: 100%;
}
#zen-sidebar-web-panel-title {
font-size: 0.9em;
font-weight: 600;
margin: 0 10px;
padding: 0;
color: var(--text-color-deemphasized);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: -moz-available;
text-align: center;
display: block;
}
#zen-sidebar-web-panel[pinned] {
transform-origin: 50% 20%;
}
#zen-sidebar-web-panel[pinned]:not([hidden]) {
animation: better-sidebar-pinned-show 0.15s ease-in-out forwards !important;
}
#zen-sidebar-web-panel[pinned][hidden] {
animation: better-sidebar-pinned-hide 0.15s ease-in-out forwards !important;
}
/** UNPINNED **/
#zen-sidebar-web-panel {
/* Sets perspective */
transform-origin: 50% 20%;
}
#zen-sidebar-web-panel:not([hidden]) #zen-sidebar-introduction-panel * {
opacity: 0;
animation: better-sidebar-intro-show 0.5s 0.4s ease-out forwards !important;
}
#zen-sidebar-web-panel:not([hidden]) #zen-sidebar-introduction-panel p {
animation: better-sidebar-intro-show 0.5s 0.8s ease-out forwards !important;
}
#zen-sidebar-web-panel:not([hidden]) {
animation: better-sidebar-show 0.15s ease-in-out forwards !important;
}
#zen-sidebar-web-panel[hidden] {
animation: better-sidebar-hide 0.15s ease-in-out forwards !important;
}

View File

@@ -965,7 +965,7 @@
padding-inline-start: var(--toolbarbutton-outer-padding);
}
:root[zen-right-side='true'] & {
:root[zen-right-side='true']:not([zen-window-buttons-reversed='true']) {
padding-inline-end: var(--zen-toolbox-padding);
}

View File

@@ -27,7 +27,6 @@ var gZenCompactModeManager = {
_flashTimeouts: {},
_evenListeners: [],
_removeHoverFrames: {},
_animating: false,
init() {
Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this));
@@ -67,7 +66,7 @@ var gZenCompactModeManager = {
},
set preference(value) {
if (this.preference === value || this._animating) {
if (this.preference === value || document.documentElement.hasAttribute('zen-compact-animating')) {
// We dont want the user to be able to spam the button
return value;
}
@@ -146,10 +145,17 @@ var gZenCompactModeManager = {
this._evenListeners.push(callback);
},
_updateEvent() {
this._evenListeners.forEach((callback) => callback());
async _updateEvent() {
// IF we are animating IN, call the callbacks first so we can calculate the width
// once the window buttons are shown
this.updateContextMenu();
this.animateCompactMode();
if (!this.preference) {
this._evenListeners.forEach((callback) => callback());
await this.animateCompactMode();
} else {
await this.animateCompactMode();
this._evenListeners.forEach((callback) => callback());
}
},
// NOTE: Dont actually use event, it's just so we make sure
@@ -160,6 +166,7 @@ var gZenCompactModeManager = {
gZenUIManager.restoreScrollbarState();
// Second variable to get the genuine width of the sidebar
this.sidebar.style.setProperty('--actual-zen-sidebar-width', `${sidebarWidth}px`);
window.dispatchEvent(new window.Event('resize')); // To recalculate the layout
if (event && this.preference) {
return;
}
@@ -169,104 +176,121 @@ var gZenCompactModeManager = {
},
animateCompactMode() {
this._animating = true;
const isCompactMode = this.preference;
const canHideSidebar =
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') || gZenVerticalTabsManager._hasSetSingleToolbar;
const canAnimate =
lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR &&
!this.sidebar.hasAttribute('zen-user-show') &&
!this.sidebar.hasAttribute('zen-has-empty-tab') &&
!this.sidebar.hasAttribute('zen-has-hover');
// Do this so we can get the correct width ONCE compact mode styled have been applied
const titlebar = this.sidebar.querySelector('#titlebar');
if (canAnimate) {
this.sidebar.setAttribute('animate', 'true');
titlebar.setAttribute('has-animated-padding', 'true');
} else {
titlebar.removeAttribute('has-animated-padding');
}
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
this.sidebar.style.removeProperty('transform');
window.requestAnimationFrame(() => {
let sidebarWidth = this.getAndApplySidebarWidth();
if (!canAnimate) {
this.sidebar.removeAttribute('animate');
this._animating = false;
return;
return new Promise((resolve) => {
// Get the splitter width before hiding it (we need to hide it before animating on right)
document.documentElement.setAttribute('zen-compact-animating', 'true');
// We need to set the splitter width before hiding it
let splitterWidth = document.getElementById('zen-sidebar-splitter').getBoundingClientRect().width;
const isCompactMode = this.preference;
const canHideSidebar =
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') || gZenVerticalTabsManager._hasSetSingleToolbar;
const canAnimate =
lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR &&
!this.sidebar.hasAttribute('zen-user-show') &&
!this.sidebar.hasAttribute('zen-has-empty-tab') &&
!this.sidebar.hasAttribute('zen-has-hover');
// Do this so we can get the correct width ONCE compact mode styled have been applied
const titlebar = this.sidebar.querySelector('#titlebar');
if (canAnimate) {
this.sidebar.setAttribute('animate', 'true');
titlebar.setAttribute('has-animated-padding', 'true');
} else {
titlebar.removeAttribute('has-animated-padding');
}
if (canHideSidebar && isCompactMode) {
gZenUIManager.motion
.animate(
this.sidebar,
this.sidebarIsOnRight
? {
marginRight: `-${sidebarWidth}px`,
}
: { marginLeft: `-${sidebarWidth}px` },
{
ease: 'easeIn',
type: 'spring',
bounce: 0,
duration: 0.2,
}
)
.then(() => {
window.requestAnimationFrame(() => {
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
this.sidebar.style.removeProperty('transform');
window.requestAnimationFrame(() => {
let sidebarWidth = this.getAndApplySidebarWidth();
if (!canAnimate) {
this.sidebar.removeAttribute('animate');
document.documentElement.removeAttribute('zen-compact-animating');
resolve();
return;
}
if (canHideSidebar && isCompactMode) {
sidebarWidth -= 0.5 * splitterWidth;
gZenUIManager.motion
.animate(
this.sidebar,
{
marginRight: this.sidebarIsOnRight ? `-${sidebarWidth}px` : 0,
marginLeft: this.sidebarIsOnRight ? 0 : `-${sidebarWidth}px`,
},
{
ease: 'easeIn',
type: 'spring',
bounce: 0,
duration: 0.2,
}
)
.then(() => {
this.sidebar.style.transition = 'none';
this.sidebar.style.opacity = 0;
this.getAndApplySidebarWidth();
setTimeout(() => {
this.sidebar.removeAttribute('animate');
document.documentElement.removeAttribute('zen-compact-animating');
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
if (this.sidebarIsOnRight) {
this.sidebar.style.right = `-100%`;
} else {
this.sidebar.style.left = `-100%`;
}
setTimeout(() => {
this.sidebar.style.left = '';
this.sidebar.style.right = '';
this.sidebar.style.removeProperty('opacity');
this.sidebar.style.removeProperty('transform');
this.sidebar.style.removeProperty('transition');
}, 200);
resolve();
}, 0);
});
} else if (canHideSidebar && !isCompactMode) {
document.getElementById('browser').style.overflow = 'clip';
if (this.sidebarIsOnRight) {
this.sidebar.style.marginRight = `-${sidebarWidth}px`;
} else {
this.sidebar.style.marginLeft = `-${sidebarWidth}px`;
}
gZenUIManager.motion
.animate(
this.sidebar,
this.sidebarIsOnRight
? {
marginRight: [`-${sidebarWidth}px`, 0],
transform: ['translateX(100%)', 'translateX(0)'],
}
: { marginLeft: 0 },
{
ease: 'easeOut',
type: 'spring',
bounce: 0,
duration: 0.2,
}
)
.then(() => {
this.sidebar.removeAttribute('animate');
this.sidebar.style.visibility = 'hidden';
document.getElementById('browser').style.removeProperty('overflow');
this.sidebar.style.transition = 'none';
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
this.sidebar.style.removeProperty('transform');
document.documentElement.removeAttribute('zen-compact-animating');
setTimeout(() => {
this._animating = false;
this.sidebar.style.removeProperty('visibility');
this.sidebar.style.removeProperty('transition');
this.sidebar.style.removeProperty('opacity');
}, 300);
resolve();
});
});
});
} else if (canHideSidebar && !isCompactMode) {
document.getElementById('browser').style.overflow = 'clip';
if (this.sidebarIsOnRight) {
this.sidebar.style.marginRight = `-${sidebarWidth}px`;
} else {
this.sidebar.style.marginLeft = `-${sidebarWidth}px`;
this.sidebar.removeAttribute('animate'); // remove the attribute if we are not animating
document.documentElement.removeAttribute('zen-compact-animating');
}
gZenUIManager.motion
.animate(
this.sidebar,
this.sidebarIsOnRight
? {
marginRight: [`-${sidebarWidth}px`, 0],
transform: ['translateX(100%)', 'translateX(0)'],
}
: { marginLeft: 0 },
{
ease: 'easeOut',
type: 'spring',
bounce: 0,
duration: 0.2,
}
)
.then(() => {
this.sidebar.removeAttribute('animate');
document.getElementById('browser').style.removeProperty('overflow');
this.sidebar.style.transition = 'none';
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
this.sidebar.style.removeProperty('transform');
this._animating = false;
setTimeout(() => {
this.sidebar.style.removeProperty('transition');
});
});
} else {
this.sidebar.removeAttribute('animate'); // remove the attribute if we are not animating
this._animating = false;
}
});
});
},

View File

@@ -228,20 +228,27 @@
_clearContainerStyles(container) {
const inset = container.style.inset;
window.requestAnimationFrame(() => {
container.removeAttribute('style');
container.style.inset = inset;
});
container.removeAttribute('style');
container.style.inset = inset;
}
closeGlance({ noAnimation = false, onTabClose = false, setNewID = null, isDifferent = false, hasFocused = false } = {}) {
closeGlance({
noAnimation = false,
onTabClose = false,
setNewID = null,
isDifferent = false,
hasFocused = false,
skipPermitUnload = false,
} = {}) {
if (this._animating || !this.#currentBrowser || this.animatingOpen || this._duringOpening) {
return;
}
let { permitUnload } = this.#currentBrowser.permitUnload();
if (!permitUnload) {
return;
if (!skipPermitUnload) {
let { permitUnload } = this.#currentBrowser.permitUnload();
if (!permitUnload) {
return;
}
}
if (onTabClose && hasFocused && !this.#confirmationTimeout) {
@@ -545,20 +552,22 @@
this.overlay.classList.remove('zen-glance-overlay');
this._clearContainerStyles(this.browserWrapper);
this.animatingFullOpen = false;
this.closeGlance({ noAnimation: true });
this.closeGlance({ noAnimation: true, skipPermitUnload: true });
this.#glances.delete(this.#currentGlanceID);
}
async fullyOpenGlance({ forSplit = false } = {}) {
this.animatingFullOpen = true;
this.#currentTab.setAttribute('zen-dont-split-glance', true);
gBrowser._insertTabAtIndex(this.#currentTab, {
index: this.getTabPosition(this.#currentTab),
});
this.#currentTab.removeAttribute('zen-glance-tab');
this._clearContainerStyles(this.browserWrapper);
this.browserWrapper.removeAttribute('has-finished-animation');
this.browserWrapper.setAttribute('animate-full', true);
this.#currentTab.removeAttribute('zen-glance-tab');
this.#currentTab.removeAttribute('glance-id');
this.#currentParentTab.removeAttribute('glance-id');
gBrowser.selectedTab = this.#currentTab;

View File

@@ -366,13 +366,13 @@
addColorToCustomList(color) {
const listItems = window.MozXULElement.parseXULToFragment(`
<hbox class="zen-theme-picker-custom-list-item">
<html:div class="zen-theme-picker-dot-custom"></html:div>
<html:div class="zen-theme-picker-dot custom"></html:div>
<label class="zen-theme-picker-custom-list-item-label"></label>
<toolbarbutton class="zen-theme-picker-custom-list-item-remove toolbarbutton-1" oncommand="gZenThemePicker.removeCustomColor(event);"></toolbarbutton>
</hbox>
`);
listItems.querySelector('.zen-theme-picker-custom-list-item').setAttribute('data-color', color);
listItems.querySelector('.zen-theme-picker-dot-custom').style.setProperty('--zen-theme-picker-dot-color', color);
listItems.querySelector('.zen-theme-picker-dot').style.setProperty('--zen-theme-picker-dot-color', color);
listItems.querySelector('.zen-theme-picker-custom-list-item-label').textContent = color;
this.customColorList.appendChild(listItems);

View File

@@ -902,7 +902,9 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
async onLocationChange(browser) {
this.disableTabRearrangeView();
let tab = window.gBrowser.getTabForBrowser(browser);
if (tab.hasAttribute('zen-glance-tab')) {
const ignoreSplit = tab.hasAttribute('zen-dont-split-glance');
tab.removeAttribute('zen-dont-split-glance');
if (tab.hasAttribute('zen-glance-tab') && !ignoreSplit) {
// Extract from parent node so we are not selecting the wrong (current) tab
tab = tab.parentNode.closest('.tabbrowser-tab');
console.assert(tab, 'Tab not found for zen-glance-tab');

View File

@@ -1898,6 +1898,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
const menuItem = document.createXULElement('menuitem');
menuItem.setAttribute('label', workspace.name);
menuItem.setAttribute('zen-workspace-id', workspace.uuid);
menuItem.setAttribute('command', 'cmd_zenChangeWorkspaceTab');
if (workspace.uuid === activeWorkspace.uuid) {
menuItem.setAttribute('disabled', 'true');
@@ -2208,7 +2209,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
const menuPopup = document.createXULElement('menupopup');
menuPopup.setAttribute('id', 'context-zen-change-workspace-tab-menu-popup');
menuPopup.setAttribute('command', 'cmd_zenChangeWorkspaceTab');
menu.appendChild(menuPopup);

View File

@@ -1,13 +1,15 @@
diff --git a/browser/components/customizableui/ToolbarContextMenu.sys.mjs b/browser/components/customizableui/ToolbarContextMenu.sys.mjs
index af22f766a052372a68faca139161cccbf0d768f0..ceff0576321f880c71ce301e537f4d03ccca8a73 100644
index af22f766a052372a68faca139161cccbf0d768f0..199591ca0609e8902e84a87baf50acc29f84ee3a 100644
--- a/browser/components/customizableui/ToolbarContextMenu.sys.mjs
+++ b/browser/components/customizableui/ToolbarContextMenu.sys.mjs
@@ -241,7 +241,7 @@ export var ToolbarContextMenu = {
@@ -240,8 +240,8 @@ export var ToolbarContextMenu = {
// Show/hide sidebar and vertical tabs menu items
let sidebarRevampEnabled = Services.prefs.getBoolPref("sidebar.revamp");
let showSidebarActions =
["tabbrowser-tabs", "sidebar-button"].includes(toolbarItem?.id) ||
- ["tabbrowser-tabs", "sidebar-button"].includes(toolbarItem?.id) ||
- toolbarItem?.localName == "toolbarspring";
+ toolbarItem?.localName == "toolbarspring" && false;
+ (["tabbrowser-tabs", "sidebar-button"].includes(toolbarItem?.id) ||
+ toolbarItem?.localName == "toolbarspring") && false;
let toggleVerticalTabsItem = document.getElementById(
"toolbar-context-toggle-vertical-tabs"
);

View File

@@ -0,0 +1,12 @@
diff --git a/browser/themes/shared/tabbrowser/ctrlTab.css b/browser/themes/shared/tabbrowser/ctrlTab.css
index 645467864db4a73b7addf3a57fa892beaf9a9614..46907c1ac8a10e8aba8ad82530269b660add550d 100644
--- a/browser/themes/shared/tabbrowser/ctrlTab.css
+++ b/browser/themes/shared/tabbrowser/ctrlTab.css
@@ -12,6 +12,7 @@
--panel-color: white;
--panel-border-color: transparent;
--panel-padding: 20px 10px 10px;
+ --panel-shadow-margin: 0;
}
@media (-moz-platform: macos) {

View File

@@ -0,0 +1,12 @@
diff --git a/devtools/server/actors/animation-type-longhand.js b/devtools/server/actors/animation-type-longhand.js
index a7faa2a2f17144198338aa80207ccf33b631cf32..7c15f8d8d533721b661866643cf10b37c99cb051 100644
--- a/devtools/server/actors/animation-type-longhand.js
+++ b/devtools/server/actors/animation-type-longhand.js
@@ -341,6 +341,7 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [
"transform-origin",
"translate",
"-moz-window-transform",
+ "-zen-window-transform-origin",
"-webkit-line-clamp",
]),
],

View File

@@ -0,0 +1,50 @@
diff --git a/dom/base/use_counter_metrics.yaml b/dom/base/use_counter_metrics.yaml
index ffdb908e5760eea8643f3c3f85979cb5f7ff36ae..8ab16b5283f8c15f20b0d630a9b5fc82ec803af5 100644
--- a/dom/base/use_counter_metrics.yaml
+++ b/dom/base/use_counter_metrics.yaml
@@ -21289,6 +21289,22 @@ use.counter.css.page:
send_in_pings:
- use-counters
+ css_zen_window_transform_origin:
+ type: counter
+ description: >
+ Whether a page used the CSS property -zen-window-transform-origin.
+ Compare against `use.counter.top_level_content_documents_destroyed`
+ to calculate the rate.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
+ notification_emails:
+ - dom-core@mozilla.com
+ expires: never
+ send_in_pings:
+ - use-counters
+
css_transform_origin:
type: counter
description: >
@@ -33259,6 +33275,22 @@ use.counter.css.doc:
send_in_pings:
- use-counters
+ css_zen_window_transform_origin:
+ type: counter
+ description: >
+ Whether a document used the CSS property -zen-window-transform-origin.
+ Compare against `use.counter.content_documents_destroyed`
+ to calculate the rate.
+ bugs:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
+ data_reviews:
+ - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
+ notification_emails:
+ - dom-core@mozilla.com
+ expires: never
+ send_in_pings:
+ - use-counters
+
css_transform_origin:
type: counter
description: >

View File

@@ -0,0 +1,16 @@
diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp
index 01f724b0c42999107c4622323f849ddd2a6fe5c9..9dafa755c711c43c11835dfe9f7ba1b70b52b9a3 100644
--- a/layout/generic/nsIFrame.cpp
+++ b/layout/generic/nsIFrame.cpp
@@ -11694,6 +11694,11 @@ gfx::Matrix nsIFrame::ComputeWidgetTransform() const {
gfx::Matrix4x4 matrix = nsStyleTransformMatrix::ReadTransforms(
uiReset->mMozWindowTransform, refBox, float(appUnitsPerDevPixel));
+ const StyleTransformOrigin& origin = uiReset->mWindowTransformOrigin;
+ Point transformOrigin = nsStyleTransformMatrix::Convert2DPosition(
+ origin.horizontal, origin.vertical, refBox, appUnitsPerDevPixel);
+ matrix.ChangeBasis(Point3D(transformOrigin.x, transformOrigin.y, 0));
+
gfx::Matrix result2d;
if (!matrix.CanDraw2D(&result2d)) {
// FIXME: It would be preferable to reject non-2D transforms at parse time.

View File

@@ -0,0 +1,22 @@
diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp
index f89bade8099183baa55b38ccc3c77c7ba9f1a290..8ada58a7965e7f2c9375d8b9bf64a5c78d80bf3f 100644
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -3204,6 +3204,9 @@ nsStyleUIReset::nsStyleUIReset()
mWindowShadow(StyleWindowShadow::Auto),
mWindowOpacity(1.0),
mMozWindowInputRegionMargin(StyleLength::Zero()),
+ mWindowTransformOrigin{LengthPercentage::FromPercentage(0.5),
+ LengthPercentage::FromPercentage(0.5),
+ {0.}},
mTransitions(
nsStyleAutoArray<StyleTransition>::WITH_SINGLE_INITIAL_ELEMENT),
mTransitionTimingFunctionCount(1),
@@ -3247,6 +3250,7 @@ nsStyleUIReset::nsStyleUIReset(const nsStyleUIReset& aSource)
mWindowOpacity(aSource.mWindowOpacity),
mMozWindowInputRegionMargin(aSource.mMozWindowInputRegionMargin),
mMozWindowTransform(aSource.mMozWindowTransform),
+ mWindowTransformOrigin(aSource.mWindowTransformOrigin),
mTransitions(aSource.mTransitions.Clone()),
mTransitionTimingFunctionCount(aSource.mTransitionTimingFunctionCount),
mTransitionDurationCount(aSource.mTransitionDurationCount),

View File

@@ -0,0 +1,12 @@
diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h
index 97eed3431394e21eb7b8890fd87aea8240e23f2b..898d5876c03f822e9e0f2ec892ee86e0d17daf73 100644
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -1875,6 +1875,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUIReset {
// The margin of the window region that should be transparent to events.
mozilla::StyleLength mMozWindowInputRegionMargin;
mozilla::StyleTransform mMozWindowTransform;
+ mozilla::StyleTransformOrigin mWindowTransformOrigin;
nsStyleAutoArray<mozilla::StyleTransition> mTransitions;
// The number of elements in mTransitions that are not from repeating

View File

@@ -0,0 +1,12 @@
diff --git a/layout/style/test/ListCSSProperties.cpp b/layout/style/test/ListCSSProperties.cpp
index b6a881b037a3720991f8097903e859dfc72012c1..8917a8cc23b97e37b4accaaf0d6c2876b36594af 100644
--- a/layout/style/test/ListCSSProperties.cpp
+++ b/layout/style/test/ListCSSProperties.cpp
@@ -108,6 +108,7 @@ const char* gInaccessibleProperties[] = {
"-moz-window-opacity", // chrome-only internal properties
"-moz-window-transform", // chrome-only internal properties
"-moz-window-shadow", // chrome-only internal properties
+ "-zen-window-transform-origin", // chrome-only internal properties
};
inline int is_inaccessible(const char* aPropName) {

View File

@@ -0,0 +1,23 @@
diff --git a/servo/components/style/properties/longhands/ui.mako.rs b/servo/components/style/properties/longhands/ui.mako.rs
index b7d24fe7bb54b1c143876e3bc9da59c64324ffa5..c36f7edcf076e31209e847af0b59361033d3b4da 100644
--- a/servo/components/style/properties/longhands/ui.mako.rs
+++ b/servo/components/style/properties/longhands/ui.mako.rs
@@ -286,6 +286,18 @@ ${helpers.predefined_type(
affects="",
)}
+${helpers.predefined_type(
+ "-zen-window-transform-origin",
+ "TransformOrigin",
+ "computed::TransformOrigin::initial_value()",
+ engines="gecko",
+ gecko_ffi_name="mWindowTransformOrigin",
+ boxed=True,
+ spec="None (Nonstandard internal property)",
+ enabled_in="chrome",
+ affects="overflow",
+)}
+
${helpers.predefined_type(
"animation-fill-mode",
"AnimationFillMode",

View File

@@ -1,5 +1,5 @@
diff --git a/toolkit/themes/shared/popup.css b/toolkit/themes/shared/popup.css
index ed0caa97db5726a7d1bc1cd0aa7af3fdf99690dc..ebb312830670564175cc98f11af1b29b80711ceb 100644
index ed0caa97db5726a7d1bc1cd0aa7af3fdf99690dc..ce49d7f6900a1184c9aed00c26bd7b42916482aa 100644
--- a/toolkit/themes/shared/popup.css
+++ b/toolkit/themes/shared/popup.css
@@ -21,8 +21,8 @@ panel {
@@ -8,7 +8,7 @@ index ed0caa97db5726a7d1bc1cd0aa7af3fdf99690dc..ebb312830670564175cc98f11af1b29b
- --panel-shadow-margin: 0px;
- --panel-shadow: 0 0 var(--panel-shadow-margin) hsla(0,0%,0%,.2);
+ --panel-shadow-margin: 10px !important;
+ --panel-shadow-margin: 10px;
+ --panel-shadow: var(--zen-big-shadow);
-moz-window-input-region-margin: var(--panel-shadow-margin);
margin: calc(-1 * var(--panel-shadow-margin));
@@ -22,24 +22,7 @@ index ed0caa97db5726a7d1bc1cd0aa7af3fdf99690dc..ebb312830670564175cc98f11af1b29b
@media (prefers-contrast) {
--panel-border-color: color-mix(in srgb, currentColor 60%, transparent);
@@ -60,13 +58,14 @@ panel {
}
@media (-moz-platform: macos) {
- appearance: auto;
+ appearance: auto !important;
-moz-default-appearance: menupopup;
/* We set the default background here, rather than on ::part(content),
* because otherwise it'd interfere with the native look. Non-native-looking
* popups should get their background via --panel-background */
background-color: Menu;
- --panel-background: none;
+ --panel-shadow-margin: 0px !important;
+ --panel-background: transparent !important;
--panel-border-color: transparent;
/* This should be kept in sync with GetMenuMaskImage() */
--panel-border-radius: 6px;
@@ -208,7 +207,6 @@ panel:where([type="arrow"]) {
@@ -208,7 +206,6 @@ panel:where([type="arrow"]) {
}
&[animating] {

View File

@@ -19,7 +19,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.11b",
"displayVersion": "1.11.1b",
"github": {
"repo": "zen-browser/desktop"
},
@@ -39,7 +39,7 @@
"brandShortName": "Twilight",
"brandFullName": "Zen Twilight",
"release": {
"displayVersion": "1.11t",
"displayVersion": "1.11.1t",
"github": {
"repo": "zen-browser/desktop"
}