Compare commits

...

12 Commits

Author SHA1 Message Date
Andrey Bochkarev
7904f3264a gh-13870: Remove two spaces cycling (gh-14529) 2026-07-09 01:37:14 +02:00
mr. m
dbd090a576 no-bug: Remove transparency patch 2026-07-08 00:23:01 +02:00
mr. m
ddc10c7e42 Revert "gh-14470: Add space and container sync (gh-14471)"
This reverts commit 647e219639.
2026-07-08 00:22:46 +02:00
Ashvin Jangid
decd9548dd gh-14507: Fix essentials being added to folder without being removed (gh-14508)
Co-authored-by: mr. m <mr.m@tuta.com>
2026-07-07 21:35:23 +02:00
mr. m
27d290c77d gh-14514: Sync upstream Firefox to version 152.0.5 (gh-14513) 2026-07-07 21:31:01 +02:00
mr. m
5ecbc13eb6 gh-14470: Fixed patch export for sync modules (gh-14490) 2026-07-06 09:55:03 +02:00
mr. m
58611690b5 gh-14470: Fixed wrong sync engine name (gh-14486) 2026-07-05 20:32:03 +02:00
Andrey Bochkarev
68c8fe18bc gh-14242: Fix route tab doesn't change container (gh-14482) 2026-07-05 17:01:20 +02:00
Andrey Bochkarev
3a72290f16 gh-13870: Fix essentials overlap and fix two space wrap-around (gh-14476) 2026-07-05 12:45:35 +02:00
Ashvin Jangid
79d3d6a993 gh-14460: prevent nested glance tabs (gh-14480)
Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
2026-07-05 12:45:07 +02:00
InlitX
e9c35b0f92 gh-10749: Localize command palette actions, emoji picker, etc (gh-14473) 2026-07-05 12:19:18 +02:00
mr. m
647e219639 gh-14470: Add space and container sync (gh-14471)
Co-authored-by: Kristijan Ribarić <96492763+kristijanribaric@users.noreply.github.com>
Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
2026-07-04 11:18:08 +02:00
17 changed files with 145 additions and 421 deletions

View File

@@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
### Firefox Versions
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.4`! 🚀
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.4`!
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.5`! 🚀
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.5`!
### Contributing

View File

@@ -1 +1 @@
3985a970489e32fc751e1b80abf4d5534c905e45
6bd10168f81fb90f878132d87cf681200afbcd91

View File

@@ -24,3 +24,5 @@ files:
translation: browser/browser/zen-boosts.ftl
- source: en-US/browser/browser/zen-space-routing.ftl
translation: browser/browser/zen-space-routing.ftl
- source: en-US/browser/browser/zen-command-palette.ftl
translation: browser/browser/zen-command-palette.ftl

View File

@@ -0,0 +1,36 @@
# 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-action-toggle-compact-mode = Toggle Compact Mode
zen-action-open-theme-picker = Open Theme Picker
zen-action-new-split-view = New Split View
zen-action-new-folder = New Folder
zen-action-copy-current-url = Copy Current URL
zen-action-settings = Settings
zen-action-open-private-window = Open Private Window
zen-action-open-new-window = Open New Window
zen-action-new-blank-window = New Blank Window
zen-action-pin-tab = Pin Tab
zen-action-unpin-tab = Unpin Tab
zen-action-open-space-routing = Open Space Routing
zen-action-new-boost = New Boost
zen-action-next-space = Next Space
zen-action-previous-space = Previous Space
zen-action-close-tab = Close Tab
zen-action-reload-tab = Reload Tab
zen-action-reload-tab-without-cache = Reload Tab Without Cache
zen-action-next-tab = Next Tab
zen-action-previous-tab = Previous Tab
zen-action-capture-screenshot = Capture Screenshot
zen-action-toggle-tabs-on-right = Toggle Tabs on right
zen-action-add-to-essentials = Add to Essentials
zen-action-remove-from-essentials = Remove from Essentials
zen-action-find-in-page = Find in Page
zen-action-manage-extensions = Manage Extensions
zen-action-switch-to-automatic-appearance = Switch to Automatic Appearance
zen-action-switch-to-light-mode = Switch to Light Mode
zen-action-switch-to-dark-mode = Switch to Dark Mode
zen-action-print = Print
zen-action-focus-on = Focus on
zen-action-extension = Extension

View File

@@ -87,6 +87,8 @@ zen-icons-picker-emoji =
.label = Emojis
zen-icons-picker-svg =
.label = Icons
zen-emojis-picker-search =
.placeholder = Search emojis
urlbar-search-mode-zen_actions = Actions
zen-site-data-settings = Settings

View File

@@ -14,7 +14,7 @@
<hbox id="PanelUI-zen-emojis-picker-pages">
<vbox emojis="true">
<hbox id="PanelUI-zen-emojis-picker-header">
<html:input type="search" id="PanelUI-zen-emojis-picker-search" placeholder="Search emojis" />
<html:input type="search" id="PanelUI-zen-emojis-picker-search" data-l10n-id="zen-emojis-picker-search" />
</hbox>
<hbox id="PanelUI-zen-emojis-picker-list" />
</vbox>

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 08b5b56e069d038d72c87355920c4ce8a55ed805..209c0ddc0297adb8340180c58de07ae107790751 100644
index 08b5b56e069d038d72c87355920c4ce8a55ed805..e1a3a18081c7a8153f8d12c187bf4dd522944fcb 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -511,6 +511,7 @@
@@ -308,7 +308,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..209c0ddc0297adb8340180c58de07ae1
+
+ let hasZenDefaultUserContextId = false;
+ let zenForcedWorkspaceId = undefined;
+ if (beforeRouteResult.isRouteFound && typeof userContextId !== "undefined") {
+ if (beforeRouteResult.isRouteFound && typeof userContextId === "undefined") {
+ userContextId = beforeRouteResult.userContextId;
+ hasZenDefaultUserContextId = true;
+ } else if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {

View File

@@ -1,167 +0,0 @@
diff --git a/gfx/webrender_bindings/WebRenderAPI.cpp b/gfx/webrender_bindings/WebRenderAPI.cpp
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -298,11 +298,13 @@
panic_on_gl_error, picTileWidth, picTileHeight,
gfx::gfxVars::WebRenderRequiresHardwareDriver(),
StaticPrefs::gfx_webrender_low_quality_pinch_zoom_AtStartup(),
StaticPrefs::gfx_webrender_max_shared_surface_size_AtStartup(),
StaticPrefs::gfx_webrender_enable_subpixel_aa_AtStartup(),
- compositor->ShouldUseLayerCompositor())) {
+ compositor->ShouldUseLayerCompositor(),
+ StaticPrefs::
+ gfx_webrender_opaque_backdrop_fallback_AtStartup())) {
// wr_window_new puts a message into gfxCriticalNote if it returns
// false
MOZ_ASSERT(errorMessage);
error.AssignASCII(errorMessage);
wr_api_free_error_msg(errorMessage);
diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src/bindings.rs
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1998,10 +1998,11 @@
reject_software_rasterizer: bool,
low_quality_pinch_zoom: bool,
max_shared_surface_size: i32,
enable_subpixel_aa: bool,
use_layer_compositor: bool,
+ opaque_backdrop_fallback: bool,
) -> bool {
assert!(unsafe { is_in_render_thread() });
// Ensure the WR profiler callbacks are hooked up to the Gecko profiler.
set_profiler_hooks(Some(&PROFILER_HOOKS));
@@ -2164,10 +2165,11 @@
texture_cache_config,
reject_software_rasterizer,
low_quality_pinch_zoom,
max_shared_surface_size,
enable_dithering,
+ opaque_backdrop_fallback,
..Default::default()
};
let window_size = DeviceIntSize::new(window_width, window_height);
let notifier = Box::new(CppNotifier { window_id });
diff --git a/gfx/wr/webrender/src/device/gl.rs b/gfx/wr/webrender/src/device/gl.rs
--- a/gfx/wr/webrender/src/device/gl.rs
+++ b/gfx/wr/webrender/src/device/gl.rs
@@ -3982,10 +3982,14 @@
pub fn disable_color_write(&self) {
self.gl.color_mask(false, false, false, false);
}
+ pub fn set_color_mask(&self, r: bool, g: bool, b: bool, a: bool) {
+ self.gl.color_mask(r, g, b, a);
+ }
+
pub fn set_blend(&mut self, enable: bool) {
if enable {
self.gl.enable(gl::BLEND);
} else {
self.gl.disable(gl::BLEND);
diff --git a/gfx/wr/webrender/src/renderer/init.rs b/gfx/wr/webrender/src/renderer/init.rs
--- a/gfx/wr/webrender/src/renderer/init.rs
+++ b/gfx/wr/webrender/src/renderer/init.rs
@@ -204,6 +204,8 @@
pub low_quality_pinch_zoom: bool,
pub max_shared_surface_size: i32,
/// If true, open a debug socket to listen for remote debugger.
/// Relies on `debugger` cargo feature being enabled.
pub enable_debugger: bool,
+ /// See explanation of `gfx.webrender.opaque-backdrop-fallback`.
+ pub opaque_backdrop_fallback: bool,
}
@@ -277,9 +279,10 @@
enable_instancing: true,
reject_software_rasterizer: false,
low_quality_pinch_zoom: false,
max_shared_surface_size: 2048,
enable_debugger: true,
+ opaque_backdrop_fallback: false,
}
}
}
@@ -802,10 +805,11 @@
allocated_native_surfaces: FastHashSet::default(),
debug_overlay_state: DebugOverlayState::new(),
buffer_damage_tracker: BufferDamageTracker::default(),
max_primitive_instance_count,
enable_instancing: options.enable_instancing,
+ opaque_backdrop_fallback: options.opaque_backdrop_fallback,
consecutive_oom_frames: 0,
target_frame_publish_id: None,
pending_result_msg: None,
layer_compositor_frame_state_in_prev_frame: None,
external_composite_debug_items: Vec::new(),
diff --git a/gfx/wr/webrender/src/renderer/mod.rs b/gfx/wr/webrender/src/renderer/mod.rs
--- a/gfx/wr/webrender/src/renderer/mod.rs
+++ b/gfx/wr/webrender/src/renderer/mod.rs
@@ -867,10 +867,12 @@
buffer_damage_tracker: BufferDamageTracker,
max_primitive_instance_count: usize,
enable_instancing: bool,
+ opaque_backdrop_fallback: bool,
+
/// Count consecutive oom frames to detectif we are stuck unable to render
/// in a loop.
consecutive_oom_frames: u32,
/// update() defers processing of ResultMsg, if frame_publish_id of
@@ -2787,18 +2789,29 @@
let read_target = ReadTarget::from_texture(cache_texture);
// Should always be drawing to picture cache tiles or off-screen surface!
debug_assert!(!draw_target.is_default());
let device_to_framebuffer = Scale::new(1i32);
+ let dest_fb_rect = dest * device_to_framebuffer;
self.device.blit_render_target(
read_target,
src * device_to_framebuffer,
draw_target,
- dest * device_to_framebuffer,
+ dest_fb_rect,
TextureFilter::Linear,
);
+
+ if self.opaque_backdrop_fallback {
+ self.device.set_color_mask(false, false, false, true);
+ self.device.clear_target(
+ Some([0.0, 0.0, 0.0, 1.0]),
+ None,
+ Some(dest_fb_rect),
+ );
+ self.device.set_color_mask(true, true, true, true);
+ }
}
}
}
fn draw_picture_cache_target(
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -8439,10 +8439,17 @@
#else
value: false
#endif
mirror: once
+# Make backdrop-filter treat its captured backdrop as if it had been
+# composited over an opaque-black background. (See bug 2036640)
+- name: gfx.webrender.opaque-backdrop-fallback
+ type: bool
+ value: true
+ mirror: once
+
# Disable wait of GPU execution completion
- name: gfx.webrender.wait-gpu-finished.disabled
type: bool
value: false
mirror: once

View File

@@ -289,6 +289,9 @@ export class nsZenFolder extends MozTabbrowserTabGroup {
addTabs(tabs) {
let tabsFromOutside = [];
for (let tab of tabs) {
if (tab.hasAttribute("zen-essential")) {
gZenPinnedTabManager.removeEssentials(tab, false);
}
if (tab.group !== this) {
tabsFromOutside.push(tab);
}

View File

@@ -622,15 +622,13 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
}
createFolder(tabs = [], options = {}) {
const filteredTabs = tabs
.filter(tab => !tab.hasAttribute("zen-essential"))
.map(tab => {
gBrowser.pinTab(tab);
if (tab?.group?.hasAttribute("split-view-group")) {
tab = tab.group;
}
return tab;
});
const filteredTabs = tabs.map(tab => {
gBrowser.pinTab(tab);
if (tab?.group?.hasAttribute("split-view-group")) {
tab = tab.group;
}
return tab;
});
const workspacePinned = gZenWorkspaces.workspaceElement(
options.workspaceId

View File

@@ -1551,6 +1551,7 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
return (
owner &&
owner.pinned &&
!owner.hasAttribute("glance-id") &&
this._lazyPref.SHOULD_OPEN_EXTERNAL_TABS_IN_GLANCE &&
owner.linkedBrowser?.browsingContext?.isAppTab &&
this.tabDomainsDiffer(owner, uri) &&

View File

@@ -192,7 +192,7 @@ class nsZenWorkspaceCreation extends MozXULElement {
this.currentProfile = {
id: 0,
name: "Default",
name: ContextualIdentityService.formatContextLabel("user-context-none"),
};
} else {
this.inputProfile.parentNode.hidden = true;

View File

@@ -391,7 +391,7 @@ class nsZenWorkspaces {
container = 0;
}
let essentialsContainer = document.querySelector(
`.zen-essentials-container[container="${container}"]:not([cloned])`
`.zen-essentials-container[container="${container}"]`
);
if (!essentialsContainer) {
essentialsContainer = document.createXULElement("hbox");
@@ -1927,28 +1927,20 @@ class nsZenWorkspaces {
diff += spaceLen;
}
const isGoingLeft = diff < 0;
const clonedEssentials = [];
const essentialsAnimData = [];
if (shouldAnimate && this.shouldAnimateEssentials && previousWorkspace) {
const containerIds = new Map();
for (const workspace of workspaces) {
const essentialsContainer = this.getEssentialsSection(
workspace.containerTabId
);
let lastCloned = clonedEssentials[clonedEssentials.length - 1];
if (lastCloned && lastCloned.contextId == workspace.containerTabId) {
lastCloned.repeat++;
lastCloned.workspaces.push(workspace);
continue;
const containerId = workspace.containerTabId;
if (!containerIds.has(containerId)) {
containerIds.set(containerId, []);
}
essentialsContainer.setAttribute("hidden", "true");
const essentialsClone = essentialsContainer.cloneNode(true);
essentialsClone.removeAttribute("hidden");
essentialsClone.setAttribute("cloned", "true");
clonedEssentials.push({
container: essentialsClone,
workspaces: [workspace],
contextId: workspace.containerTabId,
originalContainer: essentialsContainer,
repeat: 0,
containerIds.get(containerId).push(workspace);
}
for (const [containerId, spaces] of containerIds) {
essentialsAnimData.push({
element: this.getEssentialsSection(containerId),
workspaces: spaces,
});
}
}
@@ -2055,190 +2047,48 @@ class nsZenWorkspaces {
}
}
if (this.shouldAnimateEssentials && previousWorkspace) {
// Animate essentials
const newWorkspaceEssentialsContainer = clonedEssentials.find(cloned =>
cloned.workspaces.some(w => w.uuid === newWorkspace.uuid)
);
// Get a list of essentials containers that are in between the first and last workspace
const essentialsContainersInBetween = clonedEssentials.filter(cloned => {
const essentialsWorkspaces = cloned.workspaces;
const firstIndex = workspaces.findIndex(
w => w.uuid === essentialsWorkspaces[0].uuid
for (const data of essentialsAnimData) {
const container = data.element;
const essentialsWorkspaces = data.workspaces;
const containsPrev = essentialsWorkspaces.some(
w => w.uuid === previousWorkspace.uuid
);
const lastIndex = workspaces.findIndex(
w =>
w.uuid ===
essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid
const containsNew = essentialsWorkspaces.some(
w => w.uuid === newWorkspace.uuid
);
const [start, end] = [
Math.min(previousWorkspaceIndex, newWorkspaceIndex),
Math.max(previousWorkspaceIndex, newWorkspaceIndex),
];
// Check if any part of the container overlaps with the movement range
return firstIndex <= end && lastIndex >= start;
});
for (const cloned of clonedEssentials) {
const container = cloned.container;
const essentialsWorkspaces = cloned.workspaces;
const repeats = cloned.repeat;
// Animate like the workspaces above expect essentials are a bit more
// complicated because they are not based on workspaces but on containers
// So, if we have the following arangement:
// | [workspace1] [workspace2] [workspace3] [workspace4]
// | [container1] [container1] [container2] [container1]
// And if we are changing from workspace 1 to workspace 4,
// we should be doing the following:
// First container (repeat 2 times) will stay in place until
// we reach container 3, then animate to the left and container 2
// also move to the left after that while container 1 in workspace 4
// will slide in from the right
// Get the index from first and last workspace
const firstWorkspaceIndex = workspaces.findIndex(
w => w.uuid === essentialsWorkspaces[0].uuid
);
const lastWorkspaceIndex = workspaces.findIndex(
w =>
w.uuid ===
essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid
);
cloned.originalContainer.style.removeProperty("transform");
// Check if the container is even going to appear on the screen, to save on animation
if (
// We also need to check if the container is even going to appear on the screen.
// In order to do this, we need to check if the container is between the first and last workspace.
// Note that essential containers can have multiple workspaces,
// so we need to check if any of the workspaces in the container are between the
// first and last workspace.
!essentialsContainersInBetween.find(
ce =>
ce.workspaces.some(
w => w.uuid === essentialsWorkspaces[0].uuid
) &&
ce.workspaces.some(
w =>
w.uuid ===
essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid
)
)
) {
if (!containsPrev && !containsNew) {
container.setAttribute("hidden", "true");
continue;
}
cloned.originalContainer.parentNode.appendChild(container);
let stepsInBetween =
Math.abs(
newWorkspaceIndex -
(isGoingLeft ? firstWorkspaceIndex : lastWorkspaceIndex)
) + 1;
const usingSameContainer =
newWorkspaceEssentialsContainer?.workspaces.some(
w => w.uuid === newWorkspace.uuid
) &&
newWorkspaceEssentialsContainer?.workspaces.some(
w => w.uuid === previousWorkspace.uuid
);
let newOffset =
-(
newWorkspaceIndex -
(isGoingLeft ? firstWorkspaceIndex : lastWorkspaceIndex) +
(!isGoingLeft ? repeats - 1 : -repeats + 1)
) * 100;
let existingOffset =
-(
newWorkspaceIndex -
(isGoingLeft ? lastWorkspaceIndex : firstWorkspaceIndex) +
(isGoingLeft ? repeats - 1 : -repeats + 1)
) * 100;
container.removeAttribute("hidden");
// If we are on the same container and both new and old workspace are in the same "essentialsWorkspaces"
// we can simply not animate the essentials
if (
usingSameContainer &&
essentialsWorkspaces.some(w => w.uuid === newWorkspace.uuid) &&
essentialsWorkspaces.some(w => w.uuid === previousWorkspace.uuid)
) {
if (containsPrev && containsNew) {
container.style.transform = "translateX(0%)";
continue;
}
let existingOffset, newOffset;
const currentTransform =
parseFloat(container.style.transform.split("(")[1]) || 0;
if (containsPrev && !containsNew) {
existingOffset = currentTransform;
newOffset = isGoingLeft ? 100 : -100;
} else {
existingOffset = currentTransform || (isGoingLeft ? -100 : 100);
newOffset = 0;
existingOffset = 0;
}
const needsOffsetAdjustment =
stepsInBetween > essentialsWorkspaces.length || usingSameContainer;
if (repeats > 0 && needsOffsetAdjustment) {
if (!isGoingLeft) {
if (existingOffset !== 0) {
existingOffset += 100;
}
if (newOffset !== 0) {
newOffset += 100;
}
} else {
if (existingOffset !== 0) {
existingOffset -= 100;
}
if (newOffset !== 0) {
newOffset -= 100;
}
}
}
// Special case: going forward from single reused container to a new one
if (
!usingSameContainer &&
!isGoingLeft &&
lastWorkspaceIndex === newWorkspaceIndex - 1
) {
existingOffset = 0;
newOffset = -100;
stepsInBetween = 1;
}
if (
!usingSameContainer &&
isGoingLeft &&
firstWorkspaceIndex === newWorkspaceIndex + 1
) {
existingOffset = 0;
newOffset = 100;
stepsInBetween = 1;
}
if (
!usingSameContainer &&
isGoingLeft &&
(firstWorkspaceIndex === newWorkspaceIndex - 1 ||
firstWorkspaceIndex === newWorkspaceIndex)
) {
existingOffset = -100;
newOffset = 0;
stepsInBetween = 1;
}
if (
!usingSameContainer &&
!isGoingLeft &&
firstWorkspaceIndex === newWorkspaceIndex
) {
existingOffset = 100;
newOffset = 0;
stepsInBetween = 1;
}
const newTransform = `translateX(${newOffset}%)`;
let existingTransform = `translateX(${existingOffset}%)`;
if (container.style.transform && container.style.transform !== "none") {
existingTransform = container.style.transform;
}
if (shouldAnimate) {
container.style.transform = existingTransform;
animations.push(
gZenUIManager.motion.animate(
container,
{
transform: [
existingTransform,
new Array(stepsInBetween).fill(newTransform).join(","),
],
transform: [existingTransform, newTransform],
},
{
type: "spring",
@@ -2267,17 +2117,12 @@ class nsZenWorkspaces {
this.#currentSpaceSwitchContext.animations = [];
document.documentElement.removeAttribute("animating-background");
if (shouldAnimate) {
for (const cloned of clonedEssentials) {
cloned.container.remove();
for (const data of essentialsAnimData) {
data.element.style.removeProperty("transform");
}
this._alwaysAnimatePaddingTop = true;
this.updateTabsContainers();
}
const essentialsContainer = this.getEssentialsSection(
newWorkspace.containerTabId
);
essentialsContainer.removeAttribute("hidden");
essentialsContainer.style.transform = "none";
gBrowser.tabContainer._invalidateCachedTabs();
gZenUIManager.tabsWrapper.style.removeProperty("scrollbar-width");
this._animatingChange = false;
@@ -3152,9 +2997,6 @@ class nsZenWorkspaces {
...normalContainers,
];
for (const container of containers) {
if (container.hasAttribute("cloned")) {
continue;
}
for (const tab of container.children) {
if (gBrowser.isTab(tab)) {
tabs.push(tab);

View File

@@ -1156,10 +1156,6 @@
pointer-events: none;
position: fixed; /* Fix position to prevent scrolling */
}
&[cloned] {
pointer-events: none;
}
}
.tabbrowser-tab[zen-essential="true"],

View File

@@ -27,6 +27,10 @@ ChromeUtils.defineESModuleGetters(lazy, {
UrlUtils: "resource://gre/modules/UrlUtils.sys.mjs",
});
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
return new Localization(["browser/zen-command-palette.ftl"], true);
});
XPCOMUtils.defineLazyPreferenceGetter(
lazy,
"enabledPref",
@@ -182,7 +186,7 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
.workspaceElement(workspace.uuid)
?.style.getPropertyValue("--zen-primary-color");
actions.push({
label: "Focus on",
label: lazy.l10n.formatValueSync("zen-action-focus-on"),
extraPayload: {
workspaceId: workspace.uuid,
prettyName: workspace.name,
@@ -215,7 +219,7 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
.map(addon => {
return {
icon: "chrome://browser/skin/zen-icons/extension.svg",
label: "Extension",
label: lazy.l10n.formatValueSync("zen-action-extension"),
commandId: `zen:extension-${addon.id}`,
extraPayload: {
extensionId: addon.id,

View File

@@ -13,58 +13,62 @@ XPCOMUtils.defineLazyPreferenceGetter(
2
);
ChromeUtils.defineLazyGetter(lazy, "l10n", () => {
return new Localization(["browser/zen-command-palette.ftl"], true);
});
function isNotEmptyTab(window) {
return !window.gBrowser.selectedTab.hasAttribute("zen-empty-tab");
}
const globalActionsTemplate = [
{
label: "Toggle Compact Mode",
l10nId: "zen-action-toggle-compact-mode",
command: "cmd_zenCompactModeToggle",
icon: "chrome://browser/skin/zen-icons/sidebar.svg",
},
{
label: "Open Theme Picker",
l10nId: "zen-action-open-theme-picker",
command: "cmd_zenOpenZenThemePicker",
icon: "chrome://browser/skin/zen-icons/edit-theme.svg",
},
{
label: "New Split View",
l10nId: "zen-action-new-split-view",
command: "cmd_zenNewEmptySplit",
icon: "chrome://browser/skin/zen-icons/split.svg",
},
{
label: "New Folder",
l10nId: "zen-action-new-folder",
command: "cmd_zenOpenFolderCreation",
icon: "chrome://browser/skin/zen-icons/folder.svg",
},
{
label: "Copy Current URL",
l10nId: "zen-action-copy-current-url",
command: "cmd_zenCopyCurrentURL",
icon: "chrome://browser/skin/zen-icons/link.svg",
},
{
label: "Settings",
l10nId: "zen-action-settings",
command: window => window.openPreferences(),
icon: "chrome://browser/skin/zen-icons/settings.svg",
},
{
label: "Open Private Window",
l10nId: "zen-action-open-private-window",
command: "Tools:PrivateBrowsing",
icon: "chrome://browser/skin/zen-icons/private-window.svg",
},
{
label: "Open New Window",
l10nId: "zen-action-open-new-window",
command: "cmd_newNavigator",
icon: "chrome://browser/skin/zen-icons/window.svg",
},
{
label: "New Blank Window",
l10nId: "zen-action-new-blank-window",
command: "cmd_zenNewNavigatorUnsynced",
icon: "chrome://browser/skin/zen-icons/window.svg",
},
{
label: "Pin Tab",
l10nId: "zen-action-pin-tab",
command: "cmd_zenTogglePinTab",
icon: "chrome://browser/skin/zen-icons/pin.svg",
isAvailable: window => {
@@ -73,7 +77,7 @@ const globalActionsTemplate = [
},
},
{
label: "Unpin Tab",
l10nId: "zen-action-unpin-tab",
command: "cmd_zenTogglePinTab",
icon: "chrome://browser/skin/zen-icons/unpin.svg",
isAvailable: window => {
@@ -82,12 +86,12 @@ const globalActionsTemplate = [
},
},
{
label: "Open Space Routing",
l10nId: "zen-action-open-space-routing",
command: "cmd_zenOpenSpaceRoutingSettings",
icon: "chrome://browser/skin/zen-icons/selectable/airplane.svg",
},
{
label: "New Boost",
l10nId: "zen-action-new-boost",
icon: "chrome://browser/skin/zen-icons/boost.svg",
isAvailable: window => {
if (!isNotEmptyTab(window)) {
@@ -130,7 +134,7 @@ const globalActionsTemplate = [
},
},
{
label: "Next Space",
l10nId: "zen-action-next-space",
command: "cmd_zenWorkspaceForward",
icon: "chrome://browser/skin/zen-icons/forward.svg",
isAvailable: window => {
@@ -138,7 +142,7 @@ const globalActionsTemplate = [
},
},
{
label: "Previous Space",
l10nId: "zen-action-previous-space",
command: "cmd_zenWorkspaceBackward",
icon: "chrome://browser/skin/zen-icons/back.svg",
isAvailable: window => {
@@ -147,7 +151,7 @@ const globalActionsTemplate = [
},
},
{
label: "Close Tab",
l10nId: "zen-action-close-tab",
command: "cmd_close",
icon: "chrome://browser/skin/zen-icons/close.svg",
isAvailable: window => {
@@ -155,27 +159,27 @@ const globalActionsTemplate = [
},
},
{
label: "Reload Tab",
l10nId: "zen-action-reload-tab",
command: "Browser:Reload",
icon: "chrome://browser/skin/zen-icons/reload.svg",
},
{
label: "Reload Tab Without Cache",
l10nId: "zen-action-reload-tab-without-cache",
command: "Browser:ReloadSkipCache",
icon: "chrome://browser/skin/zen-icons/reload.svg",
},
{
label: "Next Tab",
l10nId: "zen-action-next-tab",
command: "Browser:NextTab",
icon: "chrome://browser/skin/zen-icons/forward.svg",
},
{
label: "Previous Tab",
l10nId: "zen-action-previous-tab",
command: "Browser:PrevTab",
icon: "chrome://browser/skin/zen-icons/back.svg",
},
{
label: "Capture Screenshot",
l10nId: "zen-action-capture-screenshot",
command: "Browser:Screenshot",
icon: "chrome://browser/skin/zen-icons/screenshot.svg",
isAvailable: window => {
@@ -183,12 +187,12 @@ const globalActionsTemplate = [
},
},
{
label: "Toggle Tabs on right",
l10nId: "zen-action-toggle-tabs-on-right",
command: "cmd_zenToggleTabsOnRight",
icon: "chrome://browser/skin/zen-icons/sidebars-right.svg",
},
{
label: "Add to Essentials",
l10nId: "zen-action-add-to-essentials",
command: window =>
window.gZenPinnedTabManager.addToEssentials(window.gBrowser.selectedTab),
isAvailable: window => {
@@ -201,7 +205,7 @@ const globalActionsTemplate = [
icon: "chrome://browser/skin/zen-icons/essential-add.svg",
},
{
label: "Remove from Essentials",
l10nId: "zen-action-remove-from-essentials",
command: window =>
window.gZenPinnedTabManager.removeEssentials(window.gBrowser.selectedTab),
isAvailable: window =>
@@ -209,7 +213,7 @@ const globalActionsTemplate = [
icon: "chrome://browser/skin/zen-icons/essential-remove.svg",
},
{
label: "Find in Page",
l10nId: "zen-action-find-in-page",
command: "cmd_find",
icon: "chrome://browser/skin/zen-icons/search-page.svg",
isAvailable: window => {
@@ -217,12 +221,12 @@ const globalActionsTemplate = [
},
},
{
label: "Manage Extensions",
l10nId: "zen-action-manage-extensions",
command: "Tools:Addons",
icon: "chrome://browser/skin/zen-icons/extension.svg",
},
{
label: "Switch to Automatic Appearance",
l10nId: "zen-action-switch-to-automatic-appearance",
command: () => Services.prefs.setIntPref("zen.view.window.scheme", 2),
icon: "chrome://browser/skin/zen-icons/sparkles.svg",
isAvailable: () => {
@@ -230,7 +234,7 @@ const globalActionsTemplate = [
},
},
{
label: "Switch to Light Mode",
l10nId: "zen-action-switch-to-light-mode",
command: () => Services.prefs.setIntPref("zen.view.window.scheme", 1),
icon: "chrome://browser/skin/zen-icons/face-sun.svg",
isAvailable: () => {
@@ -238,7 +242,7 @@ const globalActionsTemplate = [
},
},
{
label: "Switch to Dark Mode",
l10nId: "zen-action-switch-to-dark-mode",
command: () => Services.prefs.setIntPref("zen.view.window.scheme", 0),
icon: "chrome://browser/skin/zen-icons/moon-stars.svg",
isAvailable: () => {
@@ -246,7 +250,7 @@ const globalActionsTemplate = [
},
},
{
label: "Print",
l10nId: "zen-action-print",
command: "cmd_print",
icon: "chrome://browser/skin/zen-icons/print.svg",
isAvailable: window => {
@@ -266,7 +270,10 @@ export const globalActions = globalActionsTemplate.map(action => ({
commandId:
typeof action.command === "string"
? action.command
: `zen:global-action-${action.label.toLowerCase().replace(/\s+/g, "-")}`,
: `zen:global-action-${action.l10nId.replace("zen-action-", "")}`,
extraPayload: {},
...action,
get label() {
return lazy.l10n.formatValueSync(action.l10nId);
},
}));

View File

@@ -5,8 +5,8 @@
"binaryName": "zen",
"version": {
"product": "firefox",
"version": "152.0.4",
"candidate": "152.0.4",
"version": "152.0.5",
"candidate": "152.0.5",
"candidateBuild": 1
},
"buildOptions": {
@@ -20,7 +20,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.21.5b",
"displayVersion": "1.21.6b",
"github": {
"repo": "zen-browser/desktop"
},
@@ -54,4 +54,4 @@
"licenseType": "MPL-2.0"
},
"updateHostname": "updates.zen-browser.app"
}
}