Merge branch 'zen-browser:main' into main

This commit is contained in:
Bryan Galdámez
2024-09-14 03:11:25 -06:00
committed by GitHub
10 changed files with 186 additions and 65 deletions

View File

@@ -85,7 +85,6 @@ pref("security.tls.enable_0rtt_data", false);
/** DISK AVOIDANCE ***/
pref("browser.privatebrowsing.forceMediaMemoryCache", true);
pref("browser.sessionstore.interval", 60000);
/** SHUTDOWN & SANITIZING ***/
pref("privacy.history.custom", true);

View File

@@ -140,26 +140,12 @@ pref('xpinstall.signatures.required', false);
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
pref('dom.script_loader.bytecode_cache.strategy', 2);
// Font rendering, not for MacOSX and Linux
#ifndef XP_UNIX
#ifndef XP_MACOSX
pref("gfx.font_rendering.directwrite.bold_simulation", 2);
pref("gfx.font_rendering.cleartype_params.enhanced_contrast", 25);
pref("gfx.font_rendering.cleartype_params.force_gdi_classic_for_families", "");
#endif
#endif
// Enable private suggestions
pref('browser.search.suggest.enabled', true);
pref('browser.search.suggest.enabled.private', true);
pref("extensions.enabledScopes", 5); // [HIDDEN PREF]
// Enable GPU by default
pref('gfx.webrender.all', true);
pref('layers.acceleration.force-enabled', true);
pref('media.ffmpeg.vaapi.enabled', true);
// Enable JXL support
pref('image.jxl.enabled', true);
@@ -201,5 +187,10 @@ pref("widget.non-native-theme.use-theme-accent", true);
pref("privacy.resistFingerprinting.letterboxing", false);
pref("privacy.resistFingerprinting.letterboxing.dimensions", "");
// Enable GPU by default
pref('gfx.webrender.all', true);
pref('layers.acceleration.force-enabled', true);
pref('media.ffmpeg.vaapi.enabled', true);
pref("media.hardware-video-decoding.enabled", true);
pref("gfx.canvas.accelerated", true);

View File

@@ -9,9 +9,10 @@
);
var ZenStartup = {
init() {
this._changeSidebarLocation();
this._zenInitBrowserLayout();
this.openWatermark();
window.SessionStore.promiseInitialized.then(async () => {
this._changeSidebarLocation();
this._zenInitBrowserLayout();
this._focusSearchBar();
});
},
@@ -19,40 +20,42 @@
_zenInitBrowserLayout() {
if (this.__hasInitBrowserLayout) return;
this.__hasInitBrowserLayout = true;
this.openWatermark();
console.info('ZenThemeModifier: init browser layout');
const kNavbarItems = ['nav-bar', 'PersonalToolbar'];
const kNewContainerId = 'zen-appcontent-navbar-container';
let newContainer = document.getElementById(kNewContainerId);
for (let id of kNavbarItems) {
const node = document.getElementById(id);
console.assert(node, 'Could not find node with id: ' + id);
if (!node) continue;
newContainer.appendChild(node);
try {
console.info('ZenThemeModifier: init browser layout');
const kNavbarItems = ['nav-bar', 'PersonalToolbar'];
const kNewContainerId = 'zen-appcontent-navbar-container';
let newContainer = document.getElementById(kNewContainerId);
for (let id of kNavbarItems) {
const node = document.getElementById(id);
console.assert(node, 'Could not find node with id: ' + id);
if (!node) continue;
newContainer.appendChild(node);
}
// Fix notification deck
document
.getElementById('zen-appcontent-navbar-container')
.appendChild(document.getElementById('tab-notification-deck-template'));
// Disable smooth scroll
gBrowser.tabContainer.arrowScrollbox.smoothScroll = false;
gZenVerticalTabsManager.init();
gZenCompactModeManager.init();
gZenKeyboardShortcuts.init();
function throttle(f, delay) {
let timer = 0;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => f.apply(this, args), delay);
};
}
new ResizeObserver(throttle(this._updateTabsToolbar.bind(this), lazy.sidebarHeightThrottle)).observe(document.getElementById('tabbrowser-tabs'));
} catch (e) {
console.error('ZenThemeModifier: Error initializing browser layout', e);
}
// Fix notification deck
document
.getElementById('zen-appcontent-navbar-container')
.appendChild(document.getElementById('tab-notification-deck-template'));
// Disable smooth scroll
gBrowser.tabContainer.arrowScrollbox.smoothScroll = false;
gZenVerticalTabsManager.init();
gZenCompactModeManager.init();
gZenKeyboardShortcuts.init();
function throttle(f, delay) {
let timer = 0;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => f.apply(this, args), delay);
};
}
new ResizeObserver(throttle(this._updateTabsToolbar.bind(this), lazy.sidebarHeightThrottle)).observe(document.getElementById('tabbrowser-tabs'));
this.closeWatermark();
},

View File

@@ -203,8 +203,8 @@
&[zen-user-show],
&[flash-popup],
&[movingtab],
& #mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox,
&:has(.tabbrowser-tab:active),
& #mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox,
&:has(*[open='true']:not(tab):not(#zen-sidepanel-button)) {
transform: none !important;
opacity: 1;

View File

@@ -30,7 +30,6 @@
#zen-watermark[hidden='true'] {
transition: 0.6s;
transition-delay: 0.5s;
opacity: 0;
pointer-events: none;
}

View File

@@ -102,6 +102,8 @@
#navigator-toolbox:is(
#navigator-toolbox[zen-user-hover='true']:hover,
#navigator-toolbox[zen-user-hover='true']:focus-within,
#navigator-toolbox[zen-user-hover='true'][movingtab],
#navigator-toolbox[zen-user-hover='true'][flash-popup],
#mainPopupSet[zen-user-hover='true']:has(> #appMenu-popup:hover) ~ toolbox,
#navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)),
#navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true'])) {
@@ -162,6 +164,8 @@
#navigator-toolbox:not(#navigator-toolbox:is(
#navigator-toolbox[zen-user-hover='true']:hover,
#navigator-toolbox[zen-user-hover='true']:focus-within,
#navigator-toolbox[zen-user-hover='true'][movingtab],
#navigator-toolbox[zen-user-hover='true'][flash-popup],
#mainPopupSet[zen-user-hover='true']:has(> #appMenu-popup:hover) ~ toolbox,
#navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)),
#navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true']))) {
@@ -226,12 +230,6 @@
z-index: 1;
}
#navigator-toolbox,
#titlebar,
#TabsToolbar {
transition: 0s !important;
}
#TabsToolbar {
--hovered-verticaltab-width: 20em;
@@ -251,6 +249,7 @@
#navigator-toolbox:hover,
#navigator-toolbox:focus-within,
#navigator-toolbox[movingtab],
#navigator-toolbox[flash-popup],
#mainPopupSet:has(> #appMenu-popup:hover) ~ toolbox,
#navigator-toolbox:has(.tabbrowser-tab:active),
#navigator-toolbox:has(*[open='true']:not(tab):not(#zen-sidepanel-button)) {
@@ -269,11 +268,11 @@
position: absolute;
padding: var(--zen-toolbox-padding);
transition: 0 !important;
animation: zen-vtabs-animation 0.2s ease-in-out;
animation: zen-vtabs-animation 0.3s ease-in-out;
}
&[zen-right-side='true'] #TabsToolbar {
animation: zen-sidebar-panel-animation-right 0.2s ease-in-out;
animation: zen-sidebar-panel-animation-right 0.3s ease-in-out;
right: 0;
border-right: 0;
@@ -316,6 +315,12 @@
text-align: start;
}
}
#navigator-toolbox,
#titlebar,
#TabsToolbar {
transition: .1s !important;
}
}
}

View File

@@ -28,21 +28,135 @@
<description class="description-deemphasized" data-l10n-id="zen-dark-theme-styles-description" />
<form xmlns="http://www.w3.org/1999/xhtml" autocomplete="off" id="zen-dark-theme-styles-form">
<label class="web-appearance-choice">
<div class="web-appearance-choice-image-container"><img role="presentation" alt="" width="54" height="42" /></div>
<div class="web-appearance-choice-image-container">
<svg width="50%" height="50%" viewBox="0 0 229 135" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g id="Icon-1--Icon-2" serif:id="Icon 1, Icon 2">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:transparent"/>
</g>
<g id="Outline">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-colors-secondary);stroke-width:7.21px;"/>
</g>
<g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)">
<path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-colors-secondary);stroke-width:8.78px;"/>
</g>
</g>
<g id="Top-Bar" serif:id="Top Bar">
<g transform="matrix(1.19149,0,0,1.19149,-7.8979,-3.64443)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-colors-primary);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,128.569,-3.64443)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-colors-primary);"/>
</g>
<g transform="matrix(1.29333,0,0,1,-30.3604,4.42935)">
<path d="M149.424,24.359C149.424,26.626 148,28.467 146.247,28.467L77.764,28.467C76.01,28.467 74.587,26.626 74.587,24.359C74.587,22.091 76.01,20.25 77.764,20.25L146.247,20.25C148,20.25 149.424,22.091 149.424,24.359Z" style="fill:var(--zen-colors-primary);"/>
</g>
</g>
<g id="Side-Bar" serif:id="Side Bar">
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,20.8338)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-colors-primary);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,44.7817)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-colors-primary);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,68.7295)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-colors-primary);"/>
</g>
</g>
</g>
</svg>
</div>
<div class="web-appearance-choice-footer">
<input type="radio" name="web-appearance" value="amoled" data-l10n-id="preferences-web-appearance-choice-input-auto"
/><span data-l10n-id="zen-dark-theme-styles-amoled" />
</div>
</label>
<label class="web-appearance-choice">
<div class="web-appearance-choice-image-container"><img role="presentation" alt="" width="54" height="42" /></div>
<div class="web-appearance-choice-image-container">
<svg width="50%" height="50%" viewBox="0 0 229 135" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g id="Icon-1--Icon-2" serif:id="Icon 1, Icon 2">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:color-mix(in srgb, var(--zen-colors-secondary) 40%, transparent 40%)"/>
</g>
<g id="Outline">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-colors-secondary);stroke-width:7.21px;"/>
</g>
<g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)">
<path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-colors-secondary);stroke-width:8.78px;"/>
</g>
</g>
<g id="Top-Bar" serif:id="Top Bar">
<g transform="matrix(1.19149,0,0,1.19149,-7.8979,-3.64443)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,128.569,-3.64443)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
<g transform="matrix(1.29333,0,0,1,-30.3604,4.42935)">
<path d="M149.424,24.359C149.424,26.626 148,28.467 146.247,28.467L77.764,28.467C76.01,28.467 74.587,26.626 74.587,24.359C74.587,22.091 76.01,20.25 77.764,20.25L146.247,20.25C148,20.25 149.424,22.091 149.424,24.359Z" style="fill:var(--zen-primary-color);"/>
</g>
</g>
<g id="Side-Bar" serif:id="Side Bar">
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,20.8338)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,44.7817)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,68.7295)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
</g>
</g>
</svg>
</div>
<div class="web-appearance-choice-footer">
<input type="radio" name="web-appearance" value="default" data-l10n-id="preferences-web-appearance-choice-input-light"
/><span data-l10n-id="zen-dark-theme-styles-default" />
</div>
</label>
<label class="web-appearance-choice">
<div class="web-appearance-choice-image-container"><img role="presentation" alt="" width="54" height="42" /></div>
<div class="web-appearance-choice-image-container">
<svg width="50%" height="50%" viewBox="0 0 229 135" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g id="Icon-1--Icon-2" serif:id="Icon 1, Icon 2">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:var(--zen-colors-secondary);"/>
</g>
<g id="Outline">
<g transform="matrix(0.983827,0,0,0.922551,1.56302,5.09242)">
<path d="M223.674,41.506L223.674,93.788C223.674,114.914 207.591,132.065 187.78,132.065L41.807,132.065C21.996,132.065 5.913,114.914 5.913,93.788L5.913,41.506C5.913,20.38 21.996,3.228 41.807,3.228L187.78,3.228C207.591,3.228 223.674,20.38 223.674,41.506Z" style="fill:none;stroke:var(--zen-primary-color);stroke-width:7.21px;"/>
</g>
<g transform="matrix(0.790162,0,0,0.603645,44.881,47.2089)">
<path d="M223.674,3.228L223.674,77.954C223.674,107.819 205.151,132.065 182.335,132.065L5.913,132.065L5.913,41.506C5.913,20.38 19.016,3.228 35.155,3.228L223.674,3.228Z" style="fill:none;stroke:var(--zen-primary-color);stroke-width:8.78px;"/>
</g>
</g>
<g id="Top-Bar" serif:id="Top Bar">
<g transform="matrix(1.19149,0,0,1.19149,-7.8979,-3.64443)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,128.569,-3.64443)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
<g transform="matrix(1.29333,0,0,1,-30.3604,4.42935)">
<path d="M149.424,24.359C149.424,26.626 148,28.467 146.247,28.467L77.764,28.467C76.01,28.467 74.587,26.626 74.587,24.359C74.587,22.091 76.01,20.25 77.764,20.25L146.247,20.25C148,20.25 149.424,22.091 149.424,24.359Z" style="fill:var(--zen-primary-color);"/>
</g>
</g>
<g id="Side-Bar" serif:id="Side Bar">
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,20.8338)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,44.7817)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
<g transform="matrix(1.19149,0,0,1.19149,-25.5066,68.7295)">
<circle cx="45.459" cy="27.22" r="3.448" style="fill:var(--zen-primary-color);"/>
</g>
</g>
</g>
</svg>
</div>
<div class="web-appearance-choice-footer">
<input type="radio" name="web-appearance" value="colorful" data-l10n-id="preferences-web-appearance-choice-input-dark"
/><span data-l10n-id="zen-dark-theme-styles-colorful" />

View File

@@ -166,6 +166,16 @@ groupbox h2 {
justify-content: space-between;
gap: var(--space-large);
margin-top: 5px;
& .web-appearance-choice-image-container {
display: flex;
justify-content: center;
align-items: center;
padding: 20px 0;
background: color-mix(in srgb, var(--zen-colors-tertiary) 50%, transparent 50%);
}
}
#zen-expand-tabbar-strat {

View File

@@ -18,7 +18,7 @@
"brandShortName": "Zen Browser",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.0.0-a.39",
"displayVersion": "1.0.0-a.40",
"github": {
"repo": "zen-browser/desktop"
},