Compare commits

...

8 Commits
1.21.4b ... dev

17 changed files with 95 additions and 40 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 ### Firefox Versions
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.3`! 🚀 - [`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.3`! - [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.4`!
### Contributing ### Contributing

View File

@@ -1 +1 @@
b223f3727a037a7b8a0f36f34bfe8c4622a7f387 3985a970489e32fc751e1b80abf4d5534c905e45

View File

@@ -6,13 +6,13 @@ zen-folders-search-placeholder =
.placeholder = Search { $folder-name }... .placeholder = Search { $folder-name }...
zen-folders-panel-rename-folder = zen-folders-panel-rename-folder =
.label = Rename Folder .label = Rename Folder
zen-folders-panel-unpack-folder = zen-folders-panel-unpack-folder =
.label = Unpack Folder .label = Unpack Folder
zen-folders-new-subfolder = zen-folders-new-subfolder =
.label = New Subfolder .label = New Subfolder
zen-folders-panel-delete-folder = zen-folders-panel-delete-folder =
.label = Delete Folder .label = Delete Folder
@@ -21,7 +21,7 @@ zen-folders-panel-convert-folder-to-space =
.label = Convert folder to Space .label = Convert folder to Space
zen-folders-panel-change-folder-space = zen-folders-panel-change-folder-space =
.label = Change Space... .label = Change Space
zen-folders-unload-all-tooltip = zen-folders-unload-all-tooltip =
.tooltiptext = Unload active in this folder .tooltiptext = Unload active in this folder

View File

@@ -30,12 +30,12 @@ tab-context-zen-replace-pinned-url-with-current =
.label = Replace with Current URL .label = Replace with Current URL
.accesskey = C .accesskey = C
tab-context-zen-edit-pinned-url = tab-context-zen-edit-pinned-url =
.label = Edit... .label = Edit
.accesskey = E .accesskey = E
tab-context-zen-edit-title = tab-context-zen-edit-title =
.label = Change Label... .label = Change Label
tab-context-zen-edit-icon = tab-context-zen-edit-icon =
.label = Change Icon... .label = Change Icon
zen-themes-corrupted = Your { -brand-short-name } mods file is corrupted. They have been reset to the default theme. zen-themes-corrupted = Your { -brand-short-name } mods file is corrupted. They have been reset to the default theme.
zen-shortcuts-corrupted = Your { -brand-short-name } shortcuts file is corrupted. They have been reset to the default shortcuts. zen-shortcuts-corrupted = Your { -brand-short-name } shortcuts file is corrupted. They have been reset to the default shortcuts.

View File

@@ -20,7 +20,7 @@ zen-toolbar-context-compact-mode-hide-both =
.accesskey = H .accesskey = H
zen-toolbar-context-move-to-folder = zen-toolbar-context-move-to-folder =
.label = Move to Folder... .label = Move to Folder
.accesskey = M .accesskey = M
zen-toolbar-context-new-folder = zen-toolbar-context-new-folder =
@@ -31,7 +31,7 @@ sidebar-zen-expand =
.label = Expand Sidebar .label = Expand Sidebar
sidebar-zen-create-new = sidebar-zen-create-new =
.label = Create New... .label = Create New
tabbrowser-unload-tab-button = tabbrowser-unload-tab-button =
.tooltiptext = .tooltiptext =

View File

@@ -24,10 +24,10 @@ zen-workspaces-panel-context-delete =
.accesskey = D .accesskey = D
zen-workspaces-panel-change-name = zen-workspaces-panel-change-name =
.label = Change Name .label = Change Name
zen-workspaces-panel-change-icon = zen-workspaces-panel-change-icon =
.label = Change Icon .label = Change Icon
zen-workspaces-panel-context-default-profile = zen-workspaces-panel-context-default-profile =
.label = Set Profile .label = Set Profile
@@ -42,7 +42,7 @@ zen-workspaces-how-to-reorder-title = How to reorder spaces
zen-workspaces-how-to-reorder-desc = Drag the space icons at the bottom of the sidebar to reorder them zen-workspaces-how-to-reorder-desc = Drag the space icons at the bottom of the sidebar to reorder them
zen-workspaces-change-theme = zen-workspaces-change-theme =
.label = Edit Theme .label = Edit Theme
zen-workspaces-panel-context-open = zen-workspaces-panel-context-open =
.label = Open Workspace .label = Open Workspace
@@ -72,7 +72,7 @@ zen-workspace-creation-name =
.placeholder = Space Name .placeholder = Space Name
zen-move-tab-to-workspace-button = zen-move-tab-to-workspace-button =
.label = Move To... .label = Move To
.tooltiptext = Move all tabs in this window to a Space .tooltiptext = Move all tabs in this window to a Space
zen-workspaces-panel-context-reorder = zen-workspaces-panel-context-reorder =

View File

@@ -23,3 +23,6 @@
- name: browser.ml.linkPreview.enabled - name: browser.ml.linkPreview.enabled
value: false value: false
- name: browser.preferences.aiControls
value: false

View File

@@ -10,7 +10,7 @@ index 57add34d876fb885275f1147209c6fbeee367a7c..be0ab43b299317c0022a5e719f47a070
], ],
resizeCallback: async ({ title, frame }) => { resizeCallback: async ({ title, frame }) => {
// Search within main document and highlight matched keyword. // Search within main document and highlight matched keyword.
@@ -437,6 +438,8 @@ const CONFIG_PANES = Object.freeze({ @@ -437,6 +437,8 @@ const CONFIG_PANES = Object.freeze({
tabsBrowsing: { tabsBrowsing: {
l10nId: "tabs-browsing-section", l10nId: "tabs-browsing-section",
groupIds: [ groupIds: [

View File

@@ -1,9 +1,9 @@
diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs
index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d85a930686 100644 index aa7c67f2bfaa3f15d592a14b527a8721dfc9bc6f..d2fe012796ea3a5be05090a732011b3cf92b78be 100644
--- a/browser/components/urlbar/UrlbarUtils.sys.mjs --- a/browser/components/urlbar/UrlbarUtils.sys.mjs
+++ b/browser/components/urlbar/UrlbarUtils.sys.mjs +++ b/browser/components/urlbar/UrlbarUtils.sys.mjs
@@ -109,6 +109,8 @@ export var UrlbarUtils = { @@ -110,6 +110,8 @@ export var UrlbarUtils = {
RESTRICT_SEARCH_KEYWORD: "restrictSearchKeyword", SEMANTIC_HISTORY: "semanticHistory",
SUGGESTED_INDEX: "suggestedIndex", SUGGESTED_INDEX: "suggestedIndex",
TAIL_SUGGESTION: "tailSuggestion", TAIL_SUGGESTION: "tailSuggestion",
+ ZEN_ACTION: "zenAction", + ZEN_ACTION: "zenAction",
@@ -11,7 +11,7 @@ index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d8
}), }),
// Defines provider types. // Defines provider types.
@@ -170,6 +172,8 @@ export var UrlbarUtils = { @@ -171,6 +173,8 @@ export var UrlbarUtils = {
OTHER_NETWORK: 6, OTHER_NETWORK: 6,
ADDON: 7, ADDON: 7,
ACTIONS: 8, ACTIONS: 8,
@@ -20,7 +20,7 @@ index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d8
}), }),
// Per-result exposure telemetry. // Per-result exposure telemetry.
@@ -319,6 +323,14 @@ export var UrlbarUtils = { @@ -320,6 +324,14 @@ export var UrlbarUtils = {
telemetryLabel: "actions", telemetryLabel: "actions",
uiLabel: "urlbar-searchmode-actions2", uiLabel: "urlbar-searchmode-actions2",
}, },
@@ -35,7 +35,7 @@ index 2f03bdf632c6ca15c728df2801162da5159682da..6834daede8cb11854f137602100183d8
]); ]);
}, },
@@ -611,6 +623,12 @@ export var UrlbarUtils = { @@ -612,6 +624,12 @@ export var UrlbarUtils = {
return this.RESULT_GROUP.HEURISTIC_FALLBACK; return this.RESULT_GROUP.HEURISTIC_FALLBACK;
case "UrlbarProviderHistoryUrlHeuristic": case "UrlbarProviderHistoryUrlHeuristic":
return this.RESULT_GROUP.HEURISTIC_HISTORY_URL; return this.RESULT_GROUP.HEURISTIC_HISTORY_URL;

View File

@@ -486,8 +486,6 @@ groupbox h2 {
#tabGroupSuggestions, #tabGroupSuggestions,
#web-appearance-manage-themes-link, #web-appearance-manage-themes-link,
#setting-control-sidebarChatbotFieldset, #setting-control-sidebarChatbotFieldset,
#aiControlsDescription,
#category-ai-features,
#setting-control-supportFirefox, #setting-control-supportFirefox,
.mission-message, .mission-message,
html|setting-group:is([data-subcategory="layout"], [groupid="support"]) { html|setting-group:is([data-subcategory="layout"], [groupid="support"]) {

View File

@@ -1579,6 +1579,7 @@ window.gZenVerticalTabsManager = {
overflowElements.appendChild(child); overflowElements.appendChild(child);
} else { } else {
const element = document.getElementById("page-action-buttons"); const element = document.getElementById("page-action-buttons");
child.setAttribute("context", "toolbar-context-menu");
element.before(child); element.before(child);
} }
return; return;
@@ -1612,7 +1613,9 @@ window.gZenVerticalTabsManager = {
// it will reset to the original name anyway // it will reset to the original name anyway
if (hasChanged || (this._tabEdited.zenStaticLabel && newName)) { if (hasChanged || (this._tabEdited.zenStaticLabel && newName)) {
this._tabEdited.zenStaticLabel = newName; this._tabEdited.zenStaticLabel = newName;
gBrowser._setTabLabel(this._tabEdited, newName); gBrowser._setTabLabel(this._tabEdited, newName, {
_zenChangeLabelFlag: true,
});
gZenUIManager.showToast("zen-tabs-renamed"); gZenUIManager.showToast("zen-tabs-renamed");
} else { } else {
delete this._tabEdited.zenStaticLabel; delete this._tabEdited.zenStaticLabel;
@@ -1708,7 +1711,8 @@ window.gZenVerticalTabsManager = {
this._tabEdited.after(input); this._tabEdited.after(input);
} }
input.focus(); input.focus();
input.select(); input.setSelectionRange(0, input.value.length, "backward");
input.scrollLeft = 0;
input.addEventListener("blur", this._renameTabHalt); input.addEventListener("blur", this._renameTabHalt);
}, },

View File

@@ -51,6 +51,10 @@
--zen-toolbox-max-width: 74px !important; --zen-toolbox-max-width: 74px !important;
--zen-compact-float: var(--zen-element-separation); --zen-compact-float: var(--zen-element-separation);
@media (-moz-mac-tahoe-theme) {
--zen-compact-mode-no-padding-radius-fix: -2px;
}
:root[zen-no-padding='true'] & { :root[zen-no-padding='true'] & {
--zen-compact-float: 10px; --zen-compact-float: 10px;
--zen-compact-top-toolbar-hidden-fix: var(--zen-compact-float); --zen-compact-top-toolbar-hidden-fix: var(--zen-compact-float);

View File

@@ -85,8 +85,7 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
menuitem.addEventListener("command", () => menuitem.addEventListener("command", () =>
this.openGlance({ this.openGlance({
url: gContextMenu.linkURL, url: gContextMenu.linkURL,
triggeringPrincipal: triggeringPrincipal: gContextMenu.principal,
Services.scriptSecurityManager.getSystemPrincipal(),
}) })
); );
@@ -354,6 +353,28 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
return this.#lastLinkClickData; return this.#lastLinkClickData;
} }
/**
* Check whether a glance load is permitted for its triggering principal.
*
* @param {object} data - Glance data including URL and triggeringPrincipal
* @returns {boolean} Whether the load is allowed
*/
#isGlanceLoadAllowed(data) {
const { url, triggeringPrincipal } = data ?? {};
if (typeof url !== "string" || !url.length || !triggeringPrincipal) {
return false;
}
try {
Services.scriptSecurityManager.checkLoadURIStrWithPrincipal(
triggeringPrincipal,
url
);
} catch {
return false;
}
return true;
}
/** /**
* Open a glance overlay with the specified data * Open a glance overlay with the specified data
* *
@@ -371,6 +392,13 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature {
return Promise.resolve(this.#currentTab); return Promise.resolve(this.#currentTab);
} }
// Existing-tab glances perform no navigation and are exempt; for fresh
// loads, refuse any URL the triggering principal isn't allowed to load
// (e.g. a web page linking to file://).
if (!existingTab && !this.#isGlanceLoadAllowed(data)) {
return Promise.resolve(null);
}
if (!data.height || !data.width) { if (!data.height || !data.width) {
data = { data = {
...data, ...data,

View File

@@ -245,10 +245,6 @@ class nsZenSpaceRoutingManager {
if (targetWorkspace) { if (targetWorkspace) {
workspaces.moveTabToWorkspace(newTab, targetWorkspace.uuid); workspaces.moveTabToWorkspace(newTab, targetWorkspace.uuid);
if (inBackground) {
return;
}
const mostRecentWindow = const mostRecentWindow =
Services.wm.getMostRecentWindow("navigator:browser"); Services.wm.getMostRecentWindow("navigator:browser");
const isOriginatingWindow = win === mostRecentWindow; const isOriginatingWindow = win === mostRecentWindow;
@@ -256,7 +252,10 @@ class nsZenSpaceRoutingManager {
win.gZenWorkspaces.lastSelectedWorkspaceTabs[ win.gZenWorkspaces.lastSelectedWorkspaceTabs[
targetWorkspace.uuid targetWorkspace.uuid
] = newTab; ] = newTab;
await win.gZenWorkspaces.changeWorkspace(targetWorkspace);
if (!inBackground) {
await win.gZenWorkspaces.changeWorkspace(targetWorkspace);
}
} }
} }
} }

View File

@@ -182,8 +182,8 @@ class nsZenWorkspaceCreation extends MozXULElement {
this.onProfileCommand.bind(this) this.onProfileCommand.bind(this)
); );
this.profilesPopup.addEventListener( this.profilesPopup.addEventListener(
"popupshown", "popupshowing",
this.onProfilePopupShown.bind(this) this.onProfilePopupShowing.bind(this)
); );
this.profilesPopup.addEventListener( this.profilesPopup.addEventListener(
"command", "command",
@@ -296,7 +296,7 @@ class nsZenWorkspaceCreation extends MozXULElement {
this.profilesPopup.openPopup(event.target, "after_start"); this.profilesPopup.openPopup(event.target, "after_start");
} }
onProfilePopupShown(event) { onProfilePopupShowing(event) {
return window.createUserContextMenu(event, { return window.createUserContextMenu(event, {
isContextMenu: true, isContextMenu: true,
showDefaultTab: true, showDefaultTab: true,

View File

@@ -1229,7 +1229,11 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
const newTab = this.openAndSwitchToTab(url, { const newTab = this.openAndSwitchToTab(url, {
skipRoute: true, skipRoute: true,
inBackground: false, inBackground: false,
triggeringPrincipal: window.gContextMenu.principal,
}); });
if (!newTab) {
return;
}
this.splitTabs([currentTab, newTab], undefined, 1); this.splitTabs([currentTab, newTab], undefined, 1);
} }
@@ -1979,9 +1983,24 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
* @returns {tab} The tab that was opened * @returns {tab} The tab that was opened
*/ */
openAndSwitchToTab(url, options) { openAndSwitchToTab(url, options) {
const triggeringPrincipal = options?.triggeringPrincipal;
if (!triggeringPrincipal) {
return null;
}
try {
Services.scriptSecurityManager.checkLoadURIStrWithPrincipal(
triggeringPrincipal,
url
);
} catch {
return null;
}
const parentWindow = window.parent; const parentWindow = window.parent;
const targetWindow = parentWindow || window; const targetWindow = parentWindow || window;
const tab = targetWindow.gBrowser.addTrustedTab(url, options); const tab = targetWindow.gBrowser.addTab(url, {
...options,
triggeringPrincipal,
});
targetWindow.gBrowser.selectedTab = tab; targetWindow.gBrowser.selectedTab = tab;
return tab; return tab;
} }

View File

@@ -5,8 +5,8 @@
"binaryName": "zen", "binaryName": "zen",
"version": { "version": {
"product": "firefox", "product": "firefox",
"version": "152.0.3", "version": "152.0.4",
"candidate": "152.0.3", "candidate": "152.0.4",
"candidateBuild": 1 "candidateBuild": 1
}, },
"buildOptions": { "buildOptions": {
@@ -20,7 +20,7 @@
"brandShortName": "Zen", "brandShortName": "Zen",
"brandFullName": "Zen Browser", "brandFullName": "Zen Browser",
"release": { "release": {
"displayVersion": "1.21.4b", "displayVersion": "1.21.5b",
"github": { "github": {
"repo": "zen-browser/desktop" "repo": "zen-browser/desktop"
}, },