Compare commits

...

21 Commits

Author SHA1 Message Date
Mauro Balades
83dcaa3e54 feat: Add preference for dimming pending tabs in Zen browser theme 2024-08-12 10:22:10 +02:00
Mauro Balades
af75d67b30 chore: Refactor Zen theme modifier, fix notification deck placement, and update tab styling 2024-08-12 10:18:00 +02:00
Mauro Balades
cedd505a09 chore: Refactor Zen theme modifier and fix notification deck placement 2024-08-12 09:41:22 +02:00
Mauro Balades
1a450ebc72 chore: Update flatpak configuration and install scripts 2024-08-11 20:09:08 +02:00
mauro-balades
a395fe34d0 🔖 Update version to 1.0.0-a.17 2024-08-11 15:09:41 +00:00
Mauro Balades
e604372a9f chore: Remove unnecessary device flag in flatpak configuration 2024-08-11 17:08:49 +02:00
Mauro Balades
d5e8babaf2 chore: Update pane title for Looks And Feel in Zen preferences 2024-08-11 17:05:43 +02:00
Mauro Balades
650337f9b5 chore: Update tab styling in Zen browser theme 2024-08-11 17:01:31 +02:00
Mauro Balades
aa4d950be1 Update bytecode cache strategy for experimental Zen features 2024-08-11 16:55:47 +02:00
Mauro Balades
c2dd526195 chore: Remove annoying top border in Windows browser theme 2024-08-11 16:17:43 +02:00
mauro 🤙
5df2cce01c Merge pull request #220 from GunGunGun/patch-1
Update zen-browser.js to enable Browser Toolbox by default
2024-08-11 16:16:02 +02:00
Mauro Balades
aba58af1da Fix default user agent and min width for compact mode 2024-08-11 16:12:59 +02:00
Gun
c6455e86ef Update zen-browser.js to enable Browser Toolbox by default
Update zen-browser.js to enable Browser Toolbox by default
2024-08-11 21:02:58 +07:00
Mauro Balades
c57db962f8 chore: Update Zen browser components submodule commit reference and improve flatpak configuration and fixed tabs not fully closing 2024-08-11 13:37:46 +02:00
mauro 🤙
bd449faf05 Merge pull request #213 from Samueru-sama/main
`alpha.yml` include zsync file in release
2024-08-11 11:15:29 +02:00
mauro 🤙
cf3f673c35 Update alpha.yml 2024-08-11 09:24:43 +02:00
Samuel
27386c608e alpha.yml Use full path for zsync file 2024-08-10 22:00:51 -04:00
Samuel
14b7d97579 alpha.yml Add zsync files to uploads 2024-08-10 19:58:09 -04:00
Samuel
16b5521087 alpha.yml include zsync file in release 2024-08-10 19:34:29 -04:00
mauro 🤙
903f73f7d5 Fixed flatpak file 2024-08-10 18:35:43 +00:00
mauro 🤙
f4e3bfdb9e Delete io.github.zen_browser.zen.yml 2024-08-10 20:30:03 +02:00
15 changed files with 147 additions and 99 deletions

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
*-c.patch linguist-language=C++
*-cpp.patch linguist-language=C++

View File

@@ -300,6 +300,12 @@ jobs:
name: zen-${{ matrix.generic == true && 'generic' || 'specific' }}.AppImage
path: ./dist/zen-${{ matrix.generic == true && 'generic' || 'specific' }}.AppImage
- name: Upload artifact (ZSync)
uses: actions/upload-artifact@v4
with:
name: zen-${{ matrix.generic == true && 'generic' || 'specific' }}.AppImage.zsync
path: ./dist/zen-${{ matrix.generic == true && 'generic' || 'specific' }}.AppImage.zsync
release:
if: ${{ github.event.inputs.create_release == 'true' }}
permissions: write-all
@@ -360,7 +366,9 @@ jobs:
zen.linux-generic.tar.bz2
zen.linux-specific.tar.bz2
zen-generic.AppImage
zen-generic.AppImage.zsync
zen-specific.AppImage
zen-specific.AppImage.zsync
zen.win-generic.zip
zen.win-specific.zip
linux.mar

View File

@@ -27,20 +27,20 @@ modules:
build-commands:
- mv zen /app/
- install -Dm0755 metadata/launch-script.sh ${FLATPAK_DEST}/bin/launch-script.sh
- install -Dm0644 metadata/policies.json ${FLATPAK_DEST}/bin/distribution/policies.json
- install -Dm0644 metadata/icons/io.github.zen_browser.zen.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png
- install -Dm0644 metadata/io.github.zen_browser.zen.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
- install -Dm0644 metadata/io.github.zen_browser.zen.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
- install -Dm0755 metadata/launch-script.sh ${{FLATPAK_DEST}}/bin/launch-script.sh
- install -Dm0644 metadata/policies.json ${{FLATPAK_DEST}}/bin/distribution/policies.json
- install -Dm0644 metadata/icons/io.github.zen_browser.zen.png ${{FLATPAK_DEST}}/share/icons/hicolor/256x256/apps/${{FLATPAK_ID}}.png
- install -Dm0644 metadata/io.github.zen_browser.zen.metainfo.xml ${{FLATPAK_DEST}}/share/metainfo/${{FLATPAK_ID}}.metainfo.xml
- install -Dm0644 metadata/io.github.zen_browser.zen.desktop ${{FLATPAK_DEST}}/share/applications/${{FLATPAK_ID}}.desktop
sources:
- type: archive
url: https://github.com/zen-browser/desktop/releases/download/1.0.0-a.16/zen.linux-generic.tar.bz2
sha256: 229e45dc80a2a99707fdd15c49f71260830a3c902c6be88f9d1a51fca861c478
url: https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-generic.tar.bz2
sha256: {linux_sha256}
strip-components: 0
- type: archive
url: https://github.com/zen-browser/flatpak/releases/latest/download/archive.tar
sha256: b019e8fb33045606a59ce5606b0a8ef01ead97d7e8edbce9fb1d436493a37aab
sha256: {flatpak_sha256}
strip-components: 0
dest: metadata

View File

@@ -71,8 +71,10 @@ pref('zen.view.compact.hide-toolbar', false);
pref('zen.view.sidebar-expanded', false);
pref('zen.view.sidebar-expanded.show-button', true);
pref('zen.view.sidebar-expanded.max-width', 400);
pref('zen.keyboard.shortcuts', "{}");
pref('zen.keyboard.shortcuts.enabled', true);
pref('zen.keyboard.shortcuts', ""); // Empty string means default shortcuts
pref('zen.keyboard.shortcuts.disable-firefox', false);
pref('zen.tabs.dim-pending', true);
// Pref to enable the new profiles (TODO: Check this out!)
//pref("browser.profiles.enabled", true);
@@ -117,6 +119,10 @@ pref('browser.migrate.opera.enabled', true);
pref('xpinstall.signatures.required', false);
// Experimental Zen Features
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
pref('dom.script_loader.bytecode_cache.strategy', 2);
#include better-fox.js
// Betterfox overrides (Stay below the include directive)
@@ -131,3 +137,8 @@ pref("network.dns.disablePrefetchFromHTTPS", false);
pref("network.predictor.enable-hover-on-ssl", true);
pref("network.http.speculative-parallel-limit", 10);
pref("network.http.rcwn.enabled", false);
// Enable Browser Toolbox, Ctrl+Shift+Alt+I for debugging and modifying UI
pref("devtools.debugger.remote-enabled", true);
pref("devtools.chrome.enabled", true);

View File

@@ -1,32 +0,0 @@
diff --git a/browser/base/content/browser-siteProtections.js b/browser/base/content/browser-siteProtections.js
index 5364aa74cd938141e85e3a3333e8d1fa58ea3ae4..5cd1748a883b19caa2977c1047d51b9551686bf4 100644
--- a/browser/base/content/browser-siteProtections.js
+++ b/browser/base/content/browser-siteProtections.js
@@ -1904,9 +1904,14 @@ var gProtectionsHandler = {
// the information contained there would mostly be broken and/or
// irrelevant anyway.
this._trackingProtectionIconContainer.hidden = true;
+ // ZEN: We make a clear distinction between native UI and websites for security reasons.
+ // we can remove the separator for websites that dont need it, like "about:*" pages, where
+ // they are safe to use.
+ this._nativeSeparatorForWebsitesContainer.hidden = true;
return;
}
this._trackingProtectionIconContainer.hidden = false;
+ this._nativeSeparatorForWebsitesContainer.hidden = false;
// Check whether the user has added an exception for this site.
this.hasException = ContentBlockingAllowList.includes(
@@ -2882,4 +2887,12 @@ var gProtectionsHandler = {
return messageEl;
},
+
+ get _nativeSeparatorForWebsitesContainer() {
+ delete this._nativeSeparatorForWebsitesContainer;
+ return (this._nativeSeparatorForWebsitesContainer = document.getElementById(
+ "zen-website-and-native-separator"
+ ));
+ },
+
};

View File

@@ -108,7 +108,6 @@ var ZenThemeModifier = {
"nav-bar",
"PersonalToolbar"
];
const kSeparatorId = "zen-website-and-native-separator";
const kNewContainerId = "zen-appcontent-navbar-container";
let newContainer = document.getElementById(kNewContainerId);
for (let id of kNavbarItems) {
@@ -117,13 +116,14 @@ var ZenThemeModifier = {
if (!node) continue;
newContainer.appendChild(node);
}
// Add the separator
const separator = document.createElement("span");
separator.id = kSeparatorId;
newContainer.appendChild(separator);
// Fix notification deck
document.getElementById("zen-appcontent-navbar-container")
.appendChild(document.getElementById("tab-notification-deck-template"));
gZenVerticalTabsManager.init();
gZenCompactModeManager.init();
gZenKeyboardShortcuts.init();
this._updateZenAvatar();
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', this._onPrefersColorSchemeChange.bind(this));
@@ -153,8 +153,8 @@ var ZenThemeModifier = {
const tabs = document.getElementById("tabbrowser-arrowscrollbox");
tabs.style.maxHeight = '0px'; // reset to 0
const toolbarRect = toolbarItems.getBoundingClientRect();
// -7 for the controls padding
tabs.style.maxHeight = toolbarRect.height - 7 + "px";
// -5 for the controls padding
tabs.style.maxHeight = toolbarRect.height - 5 + "px";
console.info("ZenThemeModifier: set tabs max-height to", toolbarRect.height + "px");
},

View File

@@ -164,13 +164,15 @@ var gZenCKSSettings = {
meta: event.metaKey
};
if (event.key === "Tab") {
const shortcutWithoutModifiers = !shortcut.ctrl && !shortcut.alt && !shortcut.shift && !shortcut.meta;
if (event.key === "Tab" && shortcutWithoutModifiers) {
return;
} else if (event.key === "Escape") {
} else if (event.key === "Escape" && shortcutWithoutModifiers) {
this._currentAction = null;
input.blur();
return;
} else if (event.key === "Backspace") {
} else if (event.key === "Backspace" && shortcutWithoutModifiers) {
this._resetCKS(input, this._currentAction);
return;
}

View File

@@ -1,8 +1,8 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 2674dc2bebf436529a46d45c52cb56e86b82c03f..06d30b3e33562d8eaa04522d3719728126c59a81 100644
index 6e7a8ca21a20626a0607d860c56e39991b4aa2b8..d998059907f2467b0648c94c54c502278e2b188d 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -3208,6 +3208,11 @@
@@ -3214,6 +3214,11 @@
) {
tabWasReused = true;
tab = this.selectedTab;
@@ -14,7 +14,7 @@ index 2674dc2bebf436529a46d45c52cb56e86b82c03f..06d30b3e33562d8eaa04522d37197281
if (!tabData.pinned) {
this.unpinTab(tab);
} else {
@@ -3257,6 +3262,10 @@
@@ -3263,6 +3268,10 @@
preferredRemoteType,
});
@@ -25,3 +25,11 @@ index 2674dc2bebf436529a46d45c52cb56e86b82c03f..06d30b3e33562d8eaa04522d37197281
if (select) {
tabToSelect = tab;
}
@@ -4150,6 +4159,7 @@
isLastTab ||
aTab.pinned ||
aTab.hidden ||
+ true ||
this._removingTabs.size >
3 /* don't want lots of concurrent animations */ ||
!aTab.hasAttribute(

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index 3b97732d8035f07a2308f76f235702c70a5fa388..edbc1ad66a84fd17b1674ff7852cdf01bef0c21b 100644
index e9aa0f03c26dc26e1a2e56d28fadb70e60c8e8ca..9c209752b01bd07a3f38452da4bc8efc7433466c 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -552,19 +552,36 @@
@@ -146,21 +146,7 @@ index 3b97732d8035f07a2308f76f235702c70a5fa388..edbc1ad66a84fd17b1674ff7852cdf01
children.pop();
this._allTabs = children;
return children;
@@ -1144,10 +1188,13 @@
}
_initializeArrowScrollbox() {
+ this.toggleAttribute("overflow", true);
+
let arrowScrollbox = this.arrowScrollbox;
let previewElement = document.getElementById("tab-preview-panel");
arrowScrollbox.shadowRoot.addEventListener(
"underflow",
event => {
+ return;
// Ignore underflow events:
// - from nested scrollable elements
@@ -1471,11 +1518,11 @@
@@ -1476,11 +1520,11 @@
for (let i = numPinned - 1; i >= 0; i--) {
let tab = tabs[i];
width += layoutData.pinnedTabWidth;
@@ -177,7 +163,7 @@ index 3b97732d8035f07a2308f76f235702c70a5fa388..edbc1ad66a84fd17b1674ff7852cdf01
tab._pinnedUnscrollable = true;
}
this.style.setProperty(
@@ -1510,19 +1557,30 @@
@@ -1515,19 +1559,30 @@
}
}
@@ -217,7 +203,7 @@ index 3b97732d8035f07a2308f76f235702c70a5fa388..edbc1ad66a84fd17b1674ff7852cdf01
let pinned = draggedTab.pinned;
let numPinned = gBrowser._numPinnedTabs;
@@ -1531,36 +1589,39 @@
@@ -1536,36 +1591,39 @@
pinned ? numPinned : undefined
);
@@ -268,7 +254,7 @@ index 3b97732d8035f07a2308f76f235702c70a5fa388..edbc1ad66a84fd17b1674ff7852cdf01
}
draggedTab._dragData.translateX = translateX;
@@ -1593,11 +1654,11 @@
@@ -1598,11 +1656,11 @@
if (tabs[mid] == draggedTab && ++mid > high) {
break;
}
@@ -282,7 +268,7 @@ index 3b97732d8035f07a2308f76f235702c70a5fa388..edbc1ad66a84fd17b1674ff7852cdf01
tabCenter
) {
low = mid + 1;
@@ -1620,16 +1681,16 @@
@@ -1625,16 +1683,16 @@
for (let tab of tabs) {
if (tab != draggedTab) {
let shift = getTabShift(tab, newIndex);
@@ -302,7 +288,7 @@ index 3b97732d8035f07a2308f76f235702c70a5fa388..edbc1ad66a84fd17b1674ff7852cdf01
}
return 0;
}
@@ -1701,9 +1762,9 @@
@@ -1706,9 +1764,9 @@
// Slide the relevant tabs to their new position.
for (let t of this._getVisibleTabs()) {

View File

@@ -1,5 +1,5 @@
pane-zen-looks-title = Looks And Feel
pane-zen-looks-title = Look And Feel
category-zen-looks =
.tooltiptext = { pane-zen-looks-title }
@@ -82,6 +82,8 @@ zen-cks-group-open-page-action = Open Page Actions
zen-cks-group-downloads-action = Downloads Actions
zen-cks-group-sidebar-action = Sidebar Actions
zen-cks-group-compact-mode-action = Compact Mode Actions
zen-cks-group-split-view-action = Split View Actions
zen-cks-group-workspace-action = Workspace Actions
open-new-tab = Open New Tab
close-tab = Close Tab
@@ -146,3 +148,8 @@ zen-toggle-web-panels = Toggle Web Panels
zen-toggle-compact-mode = Toggle Compact Mode
zen-toggle-compact-mode-sidebar = Toggle Compact Mode Sidebar
zen-toggle-compact-mode-toolbar = Toggle Compact Mode Toolbar
zen-change-workspace = Cycle Workspaces
zen-split-view-grid = Split View Grid
zen-split-view-vertical = Split View Vertical
zen-split-view-horizontal = Split View Horizontal
zen-split-view-close = Close Split View

View File

@@ -56,12 +56,6 @@
border-radius: var(--toolbarbutton-border-radius);
}
#zen-website-and-native-separator {
background: light-dark(#ddd, #4a4a4a);
height: 1px;
width: 100%;
}
#urlbar[focused="true"][breakout-extend="true"] {
overflow: visible;
}
@@ -322,6 +316,12 @@ toolbarbutton#scrollbutton-up {
align-items: center;
}
@media (-moz-bool-pref: "zen.tabs.dim-pending") {
.tabbrowser-tab[pending]:not(:hover) {
opacity: 0.5;
}
}
.tabbrowser-tab[hidden="true"] {
display: none !important;
}
@@ -587,7 +587,7 @@ panelmultiview {
@media (-moz-bool-pref: "zen.view.sidebar-expanded") {
#navigator-toolbox {
min-width: 210px !important;
min-width: calc(var(--zen-navigation-toolbar-min-width) + var(--zen-compact-toolbox-margin-single) * 2) !important;
}
}
@@ -787,11 +787,11 @@ panelmultiview {
}
#navigator-toolbox {
min-width: 160px;
--zen-navigation-toolbar-min-width: 160px;
min-width: var(--zen-navigation-toolbar-min-width);
align-items: start;
padding-left: 10px;
padding-right: 5px;
max-width: 210px;
transition: .2s;
width: 170px;
border: none;
@@ -815,7 +815,6 @@ panelmultiview {
#TabsToolbar > .toolbar-items toolbarbutton:not(#zen-workspaces-button) {
width: 100% !important;
justify-content: start;
border-radius: 8px;
}
@@ -823,22 +822,22 @@ panelmultiview {
background: var(--button-hover-bgcolor);
}
#TabsToolbar > .toolbar-items toolbarbutton:not(#zen-workspaces-button) .toolbarbutton-text {
display: block;
margin: 0 !important;
padding-left: 0 !important;
}
#TabsToolbar > .toolbar-items toolbarbutton:not(#zen-workspaces-button) .toolbarbutton-text {
text-align: start;
}
#TabsToolbar > .toolbar-items toolbarbutton:not(#zen-workspaces-button) .toolbarbutton-text,
#TabsToolbar > .toolbar-items toolbarbutton:not(#zen-workspaces-button) .toolbarbutton-icon,
#TabsToolbar > .toolbar-items toolbarbutton:not(#zen-workspaces-button) .toolbarbutton-badge-stack {
background: transparent !important;
}
#tabbrowser-arrowscrollbox-periphery {
margin-top: 5px;
}
#tabbrowser-arrowscrollbox-periphery > toolbarbutton {
display: flex;
justify-content: center;
align-items: center;
}
.tabbrowser-tab {
max-width: unset !important;
@@ -887,12 +886,14 @@ panelmultiview {
padding: 5px;
}
.tabbrowser-tab:not([pinned]) {
.tabbrowser-tab:not([pinned]),
#tabbrowser-arrowscrollbox-periphery {
grid-column: 1 / -1;
}
.tabbrowser-tab[pinned] {
grid-column: span 1;
min-width: 100%;
}
#zen-workspaces-button {

View File

@@ -0,0 +1,13 @@
diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css
index b5cbdd7d226e4b7c8909688b05763db74f0b87fb..b5247cd4f43a906f72f34169775531e2266cb215 100644
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -47,7 +47,7 @@
}
&[sizemode="normal"] #navigator-toolbox {
- border-top: .5px solid ActiveBorder;
+ /* border-top: .5px solid ActiveBorder; Zen: Remove annoying top border, dont remove */
&:-moz-window-inactive {
border-top-color: InactiveBorder;
}

View File

@@ -0,0 +1,41 @@
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index e65533af04ea5f42c10477314c594c2c7bbc67b3..df4d63dafb838b67e64a91f26487106a77494516 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -2401,6 +2401,36 @@ void ScriptLoader::CalculateBytecodeCacheFlag(ScriptLoadRequest* aRequest) {
hasFetchCountMin = false;
break;
}
+ case 1: {
+ // 1!
+ hasSourceLengthMin = true;
+ hasFetchCountMin = true;
+ sourceLengthMin = 1024;
+ // If we were to optimize only for speed, without considering the impact
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
+ fetchCountMin = 1;
+ break;
+ }
+ case 2: {
+ // 2!
+ hasSourceLengthMin = true;
+ hasFetchCountMin = true;
+ sourceLengthMin = 1024;
+ // If we were to optimize only for speed, without considering the impact
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
+ fetchCountMin = 2;
+ break;
+ }
+ case 3: {
+ // 3!
+ hasSourceLengthMin = true;
+ hasFetchCountMin = true;
+ sourceLengthMin = 1024;
+ // If we were to optimize only for speed, without considering the impact
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
+ fetchCountMin = 3;
+ break;
+ }
default:
case 0: {
hasSourceLengthMin = true;

View File

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