mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-28 02:04:18 +00:00
Merge branch 'dev' into firefox-135
Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com>
This commit is contained in:
@@ -89,8 +89,8 @@ pref('zen.theme.gradient', true);
|
||||
pref('zen.theme.essentials-favicon-bg', false);
|
||||
|
||||
pref('zen.tabs.show-newtab-vertical', true);
|
||||
pref('zen.view.show-newtab-button-border-top', true);
|
||||
pref('zen.view.show-newtab-button-top', false);
|
||||
pref('zen.view.show-newtab-button-border-top', false);
|
||||
pref('zen.view.show-newtab-button-top', true);
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
||||
@@ -202,7 +202,7 @@ pref('zen.workspaces.hide-default-container-indicator', true);
|
||||
pref('zen.workspaces.individual-pinned-tabs', true);
|
||||
pref('zen.workspaces.show-icon-strip', true);
|
||||
pref('zen.workspaces.force-container-workspace', false);
|
||||
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', true);
|
||||
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', false);
|
||||
pref('zen.workspaces.show-workspace-indicator', true);
|
||||
pref('zen.workspaces.swipe-actions', true);
|
||||
pref('zen.workspaces.wrap-around-navigation', true);
|
||||
|
||||
@@ -126,7 +126,7 @@ export var ZenCustomizableUI = new (class {
|
||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons'));
|
||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper'));
|
||||
window.addEventListener(
|
||||
'MozAfterPaint',
|
||||
'DOMContentLoaded',
|
||||
() => {
|
||||
this._dispatchResizeEvent(window);
|
||||
},
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
var gZenUIManager = {
|
||||
_popupTrackingElements: [],
|
||||
_hoverPausedForExpand: false,
|
||||
_hasLoadedDOM: false,
|
||||
|
||||
init() {
|
||||
document.addEventListener('popupshowing', this.onPopupShowing.bind(this));
|
||||
@@ -23,6 +24,10 @@ var gZenUIManager = {
|
||||
)
|
||||
).observe(document.getElementById('navigator-toolbox'));
|
||||
|
||||
SessionStore.promiseAllWindowsRestored.then(() => {
|
||||
this._hasLoadedDOM = true;
|
||||
});
|
||||
|
||||
window.addEventListener('TabClose', this.updateTabsToolbar.bind(this));
|
||||
},
|
||||
|
||||
@@ -212,6 +217,45 @@ var gZenVerticalTabsManager = {
|
||||
return this.__topButtonsSeparatorElement;
|
||||
},
|
||||
|
||||
animateTab(aTab) {
|
||||
if (!gZenUIManager.motion || !aTab || !gZenUIManager._hasLoadedDOM) {
|
||||
return;
|
||||
}
|
||||
// get next visible tab
|
||||
const isLastTab = () => {
|
||||
const visibleTabs = gBrowser.visibleTabs;
|
||||
return visibleTabs[visibleTabs.length - 1] === aTab;
|
||||
};
|
||||
|
||||
const tabSize = aTab.getBoundingClientRect().height;
|
||||
const transform = `-${tabSize}px`;
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
aTab,
|
||||
{
|
||||
opacity: [0, 1],
|
||||
transform: ['scale(0.95)', 'scale(1)'],
|
||||
marginBottom: isLastTab() ? [] : [transform, '0px'],
|
||||
},
|
||||
{
|
||||
duration: 0.2,
|
||||
easing: 'ease-out',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
aTab.style.removeProperty('margin-bottom');
|
||||
aTab.style.removeProperty('transform');
|
||||
aTab.style.removeProperty('opacity');
|
||||
});
|
||||
gZenUIManager.motion
|
||||
.animate(aTab.querySelector('.tab-stack'), {
|
||||
filter: ['blur(1px)', 'blur(0px)'],
|
||||
})
|
||||
.then(() => {
|
||||
aTab.querySelector('.tab-stack').style.removeProperty('filter');
|
||||
});
|
||||
},
|
||||
|
||||
get actualWindowButtons() {
|
||||
// we have multiple ".titlebar-buttonbox-container" in the DOM, because of the titlebar
|
||||
if (!this.__actualWindowButtons) {
|
||||
|
||||
@@ -56,21 +56,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes zen-new-tab-appear-vertical {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(-25px);
|
||||
}
|
||||
60% {
|
||||
opacity: 0.8;
|
||||
transform: translateY(4px);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes zen-main-app-wrapper-animation {
|
||||
from {
|
||||
opacity: 1;
|
||||
|
||||
@@ -228,8 +228,8 @@
|
||||
1.003423 100%
|
||||
);
|
||||
transition:
|
||||
left 0.3125s var(--zen-compact-mode-func),
|
||||
right 0.3125s var(--zen-compact-mode-func);
|
||||
left 0.3s var(--zen-compact-mode-func),
|
||||
right 0.3s var(--zen-compact-mode-func);
|
||||
opacity: 1;
|
||||
|
||||
left: -1px;
|
||||
|
||||
@@ -56,6 +56,11 @@ panel {
|
||||
--panel-border-radius: var(--zen-native-inner-radius);
|
||||
}
|
||||
|
||||
/* split-view popup */
|
||||
#confirmation-hint {
|
||||
--arrowpanel-background: var(--zen-colors-primary);
|
||||
}
|
||||
|
||||
/* app menu */
|
||||
.addon-banner-item,
|
||||
.panel-banner-item {
|
||||
|
||||
@@ -60,12 +60,6 @@
|
||||
#tabbrowser-arrowscrollbox {
|
||||
min-height: fit-content !important;
|
||||
}
|
||||
|
||||
#vertical-pinned-tabs-container, #tabbrowser-arrowscrollbox {
|
||||
.tabbrowser-tab[fadein='true'][zen-initial-fadein='true'] {
|
||||
animation: zen-new-tab-appear-vertical 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:root[zen-window-buttons-reversed='true'] .titlebar-buttonbox-container {
|
||||
@@ -78,7 +72,11 @@
|
||||
}
|
||||
|
||||
#browser {
|
||||
--zen-toolbox-padding: max(5px, calc(var(--zen-element-separation) / 1.5));
|
||||
--zen-min-toolbox-padding: .4rem;
|
||||
@media (-moz-platform: macos) {
|
||||
--zen-min-toolbox-padding: .52rem;
|
||||
}
|
||||
--zen-toolbox-padding: max(var(--zen-min-toolbox-padding), calc(var(--zen-element-separation) / 1.5));
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
@@ -131,11 +129,15 @@
|
||||
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1));
|
||||
margin: 8px auto;
|
||||
border: none;
|
||||
min-height: 1px;
|
||||
height: 1px;
|
||||
max-height: 1px;
|
||||
width: 98%;
|
||||
transition: margin 0.2s ease-in-out, background 0.2s ease-in-out, max-height 0.2s ease-in-out;
|
||||
|
||||
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + & {
|
||||
display: none;
|
||||
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + &,
|
||||
#tabbrowser-tabs:not(:has(#tabbrowser-arrowscrollbox tab:not([hidden]))) & {
|
||||
max-height: 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -943,6 +945,7 @@
|
||||
|
||||
& .tab-background {
|
||||
border-radius: var(--border-radius-medium) !important;
|
||||
transition: background 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2));
|
||||
@@ -974,6 +977,10 @@
|
||||
margin-inline-end: 0 !important;
|
||||
}
|
||||
|
||||
&:hover .tab-background {
|
||||
background: var(--tab-selected-bgcolor);
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.theme.essentials-favicon-bg') {
|
||||
&[selected] .tab-background {
|
||||
&::after {
|
||||
|
||||
@@ -61,13 +61,17 @@
|
||||
|
||||
@media not (-moz-bool-pref: 'zen.workspaces.hide-deactivated-workspaces') {
|
||||
& {
|
||||
color: transparent;
|
||||
text-shadow: 0 0 0 light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.15));
|
||||
transition: text-shadow 0.2s ease;
|
||||
filter: grayscale(1);
|
||||
opacity: 0.5;
|
||||
transition:
|
||||
filter 0.2s,
|
||||
opacity 0.2s;
|
||||
}
|
||||
|
||||
&[active='true'] {
|
||||
text-shadow: 0 0 0 color-mix(in srgb, var(--zen-primary-color) 80%, transparent 20%);
|
||||
&[active='true'],
|
||||
&:hover {
|
||||
filter: grayscale(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,9 +246,22 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
this._swipeState.cumulativeDelta += event.delta;
|
||||
|
||||
// Determine swipe direction based on cumulative delta
|
||||
if (Math.abs(this._swipeState.cumulativeDelta) > 0.25) {
|
||||
if (Math.abs(this._swipeState.cumulativeDelta) > 1) {
|
||||
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'left' : 'right';
|
||||
}
|
||||
|
||||
// Apply a translateX to the tab strip to give the user feedback on the swipe
|
||||
const stripWidth = document.getElementById('tabbrowser-tabs').scrollWidth;
|
||||
// To make the animation larger, we multiply the delta by 5
|
||||
let translateX = this._swipeState.cumulativeDelta * 10;
|
||||
if (this._swipeState.direction === 'left') {
|
||||
translateX = Math.min(translateX, stripWidth);
|
||||
} else {
|
||||
translateX = Math.max(translateX, -stripWidth);
|
||||
}
|
||||
for (const element of this._animateTabsElements) {
|
||||
element.style.transform = `translateX(${translateX}px)`;
|
||||
}
|
||||
}
|
||||
|
||||
async _handleSwipeEnd(event) {
|
||||
@@ -262,6 +275,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (this._swipeState.direction) {
|
||||
let direction = this.naturalScroll ? -1 : 1;
|
||||
this.changeWorkspaceShortcut(rawDirection * direction);
|
||||
} else {
|
||||
this._cancelSwipeAnimation();
|
||||
}
|
||||
|
||||
// Reset swipe state
|
||||
@@ -1273,10 +1288,29 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
_cancelSwipeAnimation() {
|
||||
const existingTransform = this._animateTabsElements[0].style.transform;
|
||||
const newTransform = 'translateX(0)';
|
||||
for (const element of this._animateTabsElements) {
|
||||
gZenUIManager.motion.animate(
|
||||
element,
|
||||
{
|
||||
transform: existingTransform ? [existingTransform, newTransform] : newTransform,
|
||||
},
|
||||
{
|
||||
type: 'spring',
|
||||
bounce: 0,
|
||||
duration: 0.12,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async _performWorkspaceChange(window, { onInit = false, explicitAnimationDirection = undefined } = {}) {
|
||||
const previousWorkspace = await this.getActiveWorkspace();
|
||||
|
||||
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !onInit) {
|
||||
this._cancelSwipeAnimation();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1316,21 +1350,24 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
async _animateTabs(direction, out = false) {
|
||||
get _animateTabsElements() {
|
||||
const selector = `#zen-browser-tabs-wrapper`;
|
||||
const extraSelector = `#zen-current-workspace-indicator`;
|
||||
return [...this.tabContainer.querySelectorAll(selector), ...this.tabContainer.querySelectorAll(extraSelector)];
|
||||
}
|
||||
|
||||
async _animateTabs(direction, out = false) {
|
||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||
const tabsWidth = this.tabContainer.getBoundingClientRect().width;
|
||||
// order by actual position in the children list to animate
|
||||
const elements = Array.from([
|
||||
...this.tabContainer.querySelectorAll(selector),
|
||||
...this.tabContainer.querySelectorAll(extraSelector),
|
||||
]);
|
||||
const elements = this._animateTabsElements;
|
||||
if (out) {
|
||||
const existingTransform = elements[0].style.transform;
|
||||
const newTransform = `translateX(${direction === 'left' ? '-' : ''}${tabsWidth}px)`;
|
||||
return gZenUIManager.motion.animate(
|
||||
elements,
|
||||
{
|
||||
transform: `translateX(${direction === 'left' ? '-' : ''}${tabsWidth}px)`,
|
||||
transform: existingTransform ? [existingTransform, newTransform] : newTransform,
|
||||
},
|
||||
{
|
||||
type: 'spring',
|
||||
|
||||
@@ -143,7 +143,7 @@ index e6b9b7dcfab179e7552c146eb1551b45ad042266..d9d838a7a51f67b52b69f419024cc317
|
||||
// it, so check for both cases explicitly.
|
||||
let targetContentWidth = Math.max(targetWidth, targetChildrenWidth);
|
||||
- let isOverflowing = Math.floor(targetContentWidth) > totalAvailWidth;
|
||||
+ if (win.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar == 'nav-bar') return { isOverflowing: false, targetContentWidth, totalAvailWidth };
|
||||
+ if (win.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') return { isOverflowing: false, targetContentWidth, totalAvailWidth };
|
||||
+ let isOverflowing = Math.floor(targetContentWidth) + (win.gZenVerticalTabsManager._hasSetSingleToolbar ? 0.1 : 0) > totalAvailWidth;
|
||||
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
||||
}
|
||||
|
||||
@@ -128,12 +128,9 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
|
||||
}
|
||||
}
|
||||
|
||||
+ requestAnimationFrame(() => {
|
||||
+ t.setAttribute("zen-initial-fadein", "true");
|
||||
+ setTimeout(() => {
|
||||
+ t.removeAttribute("zen-initial-fadein");
|
||||
+ }, 2000);
|
||||
+ });
|
||||
+ if (typeof window.gZenVerticalTabsManager !== "undefined") {
|
||||
+ gZenVerticalTabsManager.animateTab(t);
|
||||
+ }
|
||||
+
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
@@ -202,7 +199,16 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
|
||||
tab.initialize();
|
||||
}
|
||||
|
||||
@@ -4095,6 +4182,10 @@
|
||||
@@ -3715,7 +3799,7 @@
|
||||
// Ensure we have an index if one was not provided.
|
||||
if (typeof index != "number") {
|
||||
// Move the new tab after another tab if needed, to the end otherwise.
|
||||
- index = Infinity;
|
||||
+ index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this.pinnedTabCount : Infinity;
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -4070,6 +4154,10 @@
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ body {
|
||||
#welcome .zen-branding-title,
|
||||
#thanks .zen-branding-title {
|
||||
text-align: center;
|
||||
font-size: 9rem;
|
||||
font-size: 7rem;
|
||||
}
|
||||
|
||||
#buttons-footer {
|
||||
@@ -62,11 +62,6 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
body:has(#welcome:not([hidden='true'])) {
|
||||
background: var(--zen-branding-coral);
|
||||
color: var(--zen-branding-paper);
|
||||
}
|
||||
|
||||
body:has(:is(#welcome, #thanks):not([hidden='true'])) {
|
||||
& #buttons-footer {
|
||||
justify-content: center;
|
||||
|
||||
13
src/browser/themes/shared/browser-shared-css.patch
Normal file
13
src/browser/themes/shared/browser-shared-css.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
|
||||
index b4854731c08b2f463751bb907cb44130ee6b6d2a..18d96cb457f5e57ed00b4eec6d2702287bfc72c7 100644
|
||||
--- a/browser/themes/shared/browser-shared.css
|
||||
+++ b/browser/themes/shared/browser-shared.css
|
||||
@@ -147,8 +147,6 @@ body {
|
||||
*/
|
||||
&.fullscreen-with-menubar {
|
||||
z-index: var(--browser-area-z-index-toolbox-while-animating);
|
||||
- box-shadow: var(--content-area-shadow);
|
||||
- border-bottom-color: var(--chrome-content-separator-color);
|
||||
}
|
||||
|
||||
/* Themes define a set of toolbox foreground and background colors which we
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
|
||||
index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78dcee7424 100644
|
||||
index e5adf8c853bc6f92d1f5aae6398bb979a114b4fd..8d0783f8a23fabdfe90e5b9136e16a962b35dd5e 100644
|
||||
--- a/browser/themes/shared/tabbrowser/tabs.css
|
||||
+++ b/browser/themes/shared/tabbrowser/tabs.css
|
||||
@@ -26,7 +26,7 @@
|
||||
@@ -31,7 +31,7 @@
|
||||
--tab-icon-overlay-fill: light-dark(white, black);
|
||||
--tab-icon-overlay-stroke: light-dark(black, white);
|
||||
--tab-label-line-height: 1.7;
|
||||
@@ -11,7 +11,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
--tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent);
|
||||
--tab-selected-textcolor: var(--toolbar-color);
|
||||
--tab-selected-bgcolor: var(--toolbar-bgcolor);
|
||||
@@ -145,8 +145,7 @@
|
||||
@@ -205,8 +205,7 @@
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > &[pinned] {
|
||||
@@ -21,7 +21,15 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[movingtab] &:is([selected], [multiselected]) {
|
||||
@@ -498,14 +497,14 @@
|
||||
@@ -250,6 +249,7 @@
|
||||
border-radius: inherit;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
+ display: none;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
@@ -573,14 +573,14 @@
|
||||
}
|
||||
|
||||
&[textoverflow] {
|
||||
@@ -40,7 +48,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
direction: rtl;
|
||||
mask-image: linear-gradient(to right, transparent, black var(--tab-label-mask-size));
|
||||
}
|
||||
@@ -863,7 +862,7 @@ tab-group {
|
||||
@@ -1069,7 +1069,7 @@ tab-group {
|
||||
margin-inline: var(--tab-inner-inline-margin);
|
||||
|
||||
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
|
||||
@@ -49,7 +57,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@@ -1052,7 +1051,7 @@ tab-group {
|
||||
@@ -1283,7 +1283,7 @@ tab-group {
|
||||
toolbarbutton:not(#firefox-view-button),
|
||||
toolbarpaletteitem:not(#wrapper-firefox-view-button)
|
||||
) ~ #tabbrowser-tabs {
|
||||
@@ -58,7 +66,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
||||
padding-inline-start: calc(var(--tab-overflow-pinned-tabs-width) + 2px);
|
||||
margin-inline-start: 2px;
|
||||
}
|
||||
@@ -1087,7 +1086,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
|
||||
@@ -1318,7 +1318,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
|
||||
list-style-image: url(chrome://global/skin/icons/plus.svg);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
|
||||
index c63a259a51c4862bc8f73eabdc5730bfe2f28da4..f9b8431071e73ce55972c12354ed44bc3a4df9c0 100644
|
||||
index 5c5992d7b32e4c16d6a92815ca6fd54e8fcec824..6c8e67e36f02b578c800fa460868135afb73c66b 100644
|
||||
--- a/modules/libpref/init/StaticPrefList.yaml
|
||||
+++ b/modules/libpref/init/StaticPrefList.yaml
|
||||
@@ -17651,7 +17651,7 @@
|
||||
@@ -17810,7 +17810,7 @@
|
||||
# Whether we use the mica backdrop. Off by default for now.
|
||||
- name: widget.windows.mica
|
||||
type: bool
|
||||
@@ -11,3 +11,23 @@ index c63a259a51c4862bc8f73eabdc5730bfe2f28da4..f9b8431071e73ce55972c12354ed44bc
|
||||
mirror: once
|
||||
#endif
|
||||
|
||||
@@ -17923,6 +17923,19 @@
|
||||
mirror: always
|
||||
#endif
|
||||
|
||||
+# Dummy pref to always generate StaticPrefs_zen.h in every OS
|
||||
+- name: zen.browser.is-cool
|
||||
+ type: bool
|
||||
+ value: true
|
||||
+ mirror: never
|
||||
+
|
||||
+#ifdef XP_MACOSX
|
||||
+- name: zen.widget.mac.mono-window-controls
|
||||
+ type: RelaxedAtomicBool
|
||||
+ value: false
|
||||
+ mirror: always
|
||||
+#endif
|
||||
+
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "zoom."
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
12
src/modules/libpref/moz-build.patch
Normal file
12
src/modules/libpref/moz-build.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
|
||||
index 4e582caaa58884b27be20c45e4c39b0b841261ef..f8ce17a33f20380b3f56a3774e043b9fba849977 100644
|
||||
--- a/modules/libpref/moz.build
|
||||
+++ b/modules/libpref/moz.build
|
||||
@@ -93,6 +93,7 @@ pref_groups = [
|
||||
"view_source",
|
||||
"webgl",
|
||||
"widget",
|
||||
+ "zen",
|
||||
"zoom",
|
||||
]
|
||||
if CONFIG["OS_TARGET"] == "Android":
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/security/mac/hardenedruntime/v2/production/firefox.browser.xml b/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||
index abbf33e9d2b3c9d1e0a34bd46e7cd289c435533b..4d988ca8201fa6aba6ca049e97d3cdc6b772b5eb 100644
|
||||
--- a/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||
+++ b/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<!-- Required for com.apple.developer.web-browser.public-key-credential -->
|
||||
<key>com.apple.application-identifier</key>
|
||||
- <string>43AQ936H96.org.mozilla.firefox</string>
|
||||
+ <string>H36NPCN86W.app.zen-browser.zen</string>
|
||||
|
||||
<!-- For platform passkey (webauthn) support -->
|
||||
<key>com.apple.developer.web-browser.public-key-credential</key><true/>
|
||||
29
src/tools/signing/macos/mach_commands-py.patch
Normal file
29
src/tools/signing/macos/mach_commands-py.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
diff --git a/tools/signing/macos/mach_commands.py b/tools/signing/macos/mach_commands.py
|
||||
index a513ad723805459c194d27b42dac68e9babba468..be74acbfe16a4eb389bc7d0ba32820b82fe2819c 100644
|
||||
--- a/tools/signing/macos/mach_commands.py
|
||||
+++ b/tools/signing/macos/mach_commands.py
|
||||
@@ -37,7 +37,6 @@ from mozbuild.base import MachCommandConditions as conditions
|
||||
"Release channel entitlements, but the configuration used will be the "
|
||||
"Release configuration as defined in the repo working directory, not the "
|
||||
"configuration from the revision of the earlier 120 build.",
|
||||
- conditions=[conditions.is_firefox],
|
||||
)
|
||||
@CommandArgument(
|
||||
"-v",
|
||||
@@ -342,6 +341,7 @@ def macos_sign(
|
||||
cs_reset_cmd = ["find", app, "-exec", "codesign", "--remove-signature", "{}", ";"]
|
||||
run(command_context, cs_reset_cmd, capture_output=not verbose_arg)
|
||||
|
||||
+ run(command_context, ["mv", "./embedded.provisionprofile", os.path.join(app, "Contents")], capture_output=not verbose_arg)
|
||||
if use_rcodesign_arg is True:
|
||||
sign_with_rcodesign(
|
||||
command_context,
|
||||
@@ -567,7 +567,7 @@ def sign_with_rcodesign(
|
||||
# input path and its options are specified as standard arguments.
|
||||
ctx.log(logging.INFO, "macos-sign", {}, "Signing with rcodesign")
|
||||
|
||||
- cs_cmd = ["rcodesign", "sign"]
|
||||
+ cs_cmd = ["rcodesign", "sign", "--for-notarization"]
|
||||
if p12_file_arg is not None:
|
||||
cs_cmd.append("--p12-file")
|
||||
cs_cmd.append(p12_file_arg)
|
||||
27
src/widget/cocoa/nsCocoaWindow-mm.patch
Normal file
27
src/widget/cocoa/nsCocoaWindow-mm.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
|
||||
index f1c87dd8faef8c6caf9248ce7d9f40c12f5db9f6..f5280b8fc6cf46d3941d1ff04835b12dd2755170 100644
|
||||
--- a/widget/cocoa/nsCocoaWindow.mm
|
||||
+++ b/widget/cocoa/nsCocoaWindow.mm
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "mozilla/ScopeExit.h"
|
||||
#include "mozilla/StaticPrefs_gfx.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
+#include "mozilla/StaticPrefs_zen.h"
|
||||
#include "mozilla/WritingModes.h"
|
||||
#include "mozilla/layers/CompositorBridgeChild.h"
|
||||
#include "mozilla/widget/Screen.h"
|
||||
@@ -682,9 +683,11 @@ static unsigned int WindowMaskForBorderStyle(BorderStyle aBorderStyle) {
|
||||
continue;
|
||||
}
|
||||
NSWindow* win = ancestor->GetCocoaWindow();
|
||||
- [[win standardWindowButton:NSWindowCloseButton] setEnabled:!aModal];
|
||||
- [[win standardWindowButton:NSWindowMiniaturizeButton] setEnabled:!aModal];
|
||||
- [[win standardWindowButton:NSWindowZoomButton] setEnabled:!aModal];
|
||||
+
|
||||
+ auto zenBtnEnabled = StaticPrefs::zen_widget_mac_mono_window_controls() ? false : !aModal;
|
||||
+ [[win standardWindowButton:NSWindowCloseButton] setEnabled:zenBtnEnabled];
|
||||
+ [[win standardWindowButton:NSWindowMiniaturizeButton] setEnabled:zenBtnEnabled];
|
||||
+ [[win standardWindowButton:NSWindowZoomButton] setEnabled:zenBtnEnabled];
|
||||
}
|
||||
if (aModal) {
|
||||
mWindow.level = NSModalPanelWindowLevel;
|
||||
Reference in New Issue
Block a user