mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-06 21:40:45 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f3bcb2f32 | ||
|
|
c209ea72c1 | ||
|
|
55b71754f3 | ||
|
|
6af79fd621 | ||
|
|
57196c1464 |
4
.github/workflows/windows-release-build.yml
vendored
4
.github/workflows/windows-release-build.yml
vendored
@@ -207,8 +207,10 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
# Stored in build/windows/.windows-rs-version
|
# Stored in build/windows/.windows-rs-version
|
||||||
WINDOWS_RS_VERSION=$(cat build/windows/.windows-rs-version)
|
WINDOWS_RS_VERSION=$(cat build/windows/.windows-rs-version)
|
||||||
|
curl -fsSL "https://static.crates.io/crates/cargo-download/cargo-download-0.1.2.crate" | tar xz -C /tmp
|
||||||
|
(cd /tmp/cargo-download-0.1.2 && cargo generate-lockfile && cargo update tinyvec --precise 1.12.0)
|
||||||
|
RUSTFLAGS="--cap-lints=allow" cargo install --path /tmp/cargo-download-0.1.2 --locked
|
||||||
cd engine/
|
cd engine/
|
||||||
cargo install cargo-download --locked
|
|
||||||
cargo download -x windows=$WINDOWS_RS_VERSION
|
cargo download -x windows=$WINDOWS_RS_VERSION
|
||||||
export CARGO_INCREMENTAL=0
|
export CARGO_INCREMENTAL=0
|
||||||
echo "" >> ../configs/common/mozconfig
|
echo "" >> ../configs/common/mozconfig
|
||||||
|
|||||||
@@ -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 `155.0`!
|
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `155.0.1`!
|
||||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 155.0`!
|
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 155.0.1`!
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
20e5abbb642ab21d943bc1261864d9c531ba421a
|
b6d45eac914fd4886c9b6e5f1447f613771228ff
|
||||||
32
src/external-patches/firefox/override_cert_checks_temp.patch
Normal file
32
src/external-patches/firefox/override_cert_checks_temp.patch
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
diff --git a/toolkit/mozapps/update/common/registrycertificates.cpp b/toolkit/mozapps/update/common/registrycertificates.cpp
|
||||||
|
index f7f5acdfa08879a0ff3095e15eebf7b436cf5092..5915141b3f4a6d3536841cc1040e70afe033e058 100644
|
||||||
|
--- a/toolkit/mozapps/update/common/registrycertificates.cpp
|
||||||
|
+++ b/toolkit/mozapps/update/common/registrycertificates.cpp
|
||||||
|
@@ -33,9 +33,21 @@
|
||||||
|
*
|
||||||
|
* @return TRUE if the binary matches any of the allowed certificates.
|
||||||
|
*/
|
||||||
|
+// TEMPORARY: accept any binary without consulting the allowed-certificate
|
||||||
|
+// values. Those values are only ever written by an installer run, so after a
|
||||||
|
+// signing certificate change every existing install still names the previous
|
||||||
|
+// certificate, the maintenance service refuses the newly signed binaries, and
|
||||||
|
+// updates fall back to prompting for elevation every time. Remove this define
|
||||||
|
+// and the block below once installs have been migrated.
|
||||||
|
+#define ZEN_SKIP_ALLOWED_CERTIFICATE_CHECK 1
|
||||||
|
+
|
||||||
|
BOOL DoesBinaryMatchAllowedCertificates(LPCWSTR basePathForUpdate,
|
||||||
|
LPCWSTR filePath,
|
||||||
|
BOOL allowFallbackKeySkip) {
|
||||||
|
+#ifdef ZEN_SKIP_ALLOWED_CERTIFICATE_CHECK
|
||||||
|
+ LOG(("Skipping the allowed certificate check for \"%ls\"", filePath));
|
||||||
|
+ return TRUE;
|
||||||
|
+#else
|
||||||
|
#ifdef DISABLE_UPDATER_AUTHENTICODE_CHECK
|
||||||
|
if (allowFallbackKeySkip) {
|
||||||
|
LOG_WARN(("Skipping authenticode check"));
|
||||||
|
@@ -163,4 +175,5 @@ BOOL DoesBinaryMatchAllowedCertificates(LPCWSTR basePathForUpdate,
|
||||||
|
RegCloseKey(baseKey);
|
||||||
|
// No certificates match, :'(
|
||||||
|
return FALSE;
|
||||||
|
+#endif // ZEN_SKIP_ALLOWED_CERTIFICATE_CHECK
|
||||||
|
}
|
||||||
@@ -54,5 +54,9 @@
|
|||||||
{
|
{
|
||||||
"type": "local",
|
"type": "local",
|
||||||
"path": "firefox/css_corner_shape_rendering.patch"
|
"path": "firefox/css_corner_shape_rendering.patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "local",
|
||||||
|
"path": "firefox/override_cert_checks_temp.patch"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -198,46 +198,37 @@ export class nsGithubLiveFolderProvider extends nsZenLiveFolderProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const document = new DOMParser().parseFromString(text, "text/html");
|
const document = new DOMParser().parseFromString(text, "text/html");
|
||||||
const issues = document.querySelectorAll(
|
const links = document.querySelectorAll(
|
||||||
"div[class^=IssueItem-module__defaultRepoContainer]"
|
'a[data-testid="issue-listitem-title-link"]'
|
||||||
);
|
);
|
||||||
const items = [];
|
const items = [];
|
||||||
const activeRepos = new Set();
|
const activeRepos = new Set();
|
||||||
|
|
||||||
if (issues.length) {
|
for (const link of links) {
|
||||||
const authors = document.querySelectorAll(
|
const issueUrl = new URL(link.getAttribute("href"), this.state.url);
|
||||||
"a[class^=IssueItem-module__authorCreatedLink]"
|
const pathMatch = issueUrl.pathname.match(
|
||||||
|
/^\/([^/]+\/[^/]+)\/(?:issues|pull)\/([0-9]+)/
|
||||||
);
|
);
|
||||||
const titles = document.querySelectorAll(
|
if (!pathMatch) {
|
||||||
"div[class^=Title-module__container]"
|
continue;
|
||||||
);
|
|
||||||
const links = document.querySelectorAll(
|
|
||||||
'[data-testid="issue-pr-title-link"]'
|
|
||||||
);
|
|
||||||
|
|
||||||
for (let i = 0; i < issues.length; i++) {
|
|
||||||
const [rawRepo, rawNumber] = issues[i].childNodes;
|
|
||||||
const author = authors[i]?.textContent;
|
|
||||||
const title = titles[i]?.textContent;
|
|
||||||
const issueUrl = links[i]?.href;
|
|
||||||
|
|
||||||
const repo = rawRepo.textContent?.trim();
|
|
||||||
if (repo) {
|
|
||||||
activeRepos.add(repo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const numberMatch = rawNumber?.textContent?.match(/[0-9]+/);
|
const [, repo, number] = pathMatch;
|
||||||
const number = numberMatch?.[0] ?? "";
|
activeRepos.add(repo);
|
||||||
|
|
||||||
|
const author = link
|
||||||
|
.closest("li")
|
||||||
|
?.querySelector('[data-testid="author-filter-link"]')
|
||||||
|
?.lastChild?.textContent.trim();
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
title,
|
title: link.textContent.trim(),
|
||||||
subtitle: author,
|
subtitle: author,
|
||||||
icon: "chrome://browser/content/zen-images/favicons/github.svg",
|
icon: "chrome://browser/content/zen-images/favicons/github.svg",
|
||||||
url: "https://github.com" + issueUrl,
|
url: issueUrl.href,
|
||||||
id: `${repo}#${number}`,
|
id: `${repo}#${number}`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
status,
|
status,
|
||||||
|
|||||||
@@ -1509,7 +1509,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
|
|||||||
baseColor = this.blendColors(
|
baseColor = this.blendColors(
|
||||||
accentColor,
|
accentColor,
|
||||||
baseColor.slice(0, 3),
|
baseColor.slice(0, 3),
|
||||||
this.canBeTransparent ? 25 : 5
|
this.canBeTransparent ? 20 : 5
|
||||||
).concat(opacity);
|
).concat(opacity);
|
||||||
}
|
}
|
||||||
return baseColor;
|
return baseColor;
|
||||||
@@ -1538,16 +1538,16 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (theme === null) {
|
||||||
|
browser.gZenThemePicker.invalidateGradientCache(uuid);
|
||||||
|
}
|
||||||
|
|
||||||
// Do not rebuild if the workspace is not the same as the current one
|
// Do not rebuild if the workspace is not the same as the current one
|
||||||
const windowWorkspace = browser.gZenWorkspaces.getActiveWorkspace();
|
const windowWorkspace = browser.gZenWorkspaces.getActiveWorkspace();
|
||||||
if (windowWorkspace.uuid !== uuid) {
|
if (windowWorkspace.uuid !== uuid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (theme === null) {
|
|
||||||
browser.gZenThemePicker.invalidateGradientCache(uuid);
|
|
||||||
}
|
|
||||||
|
|
||||||
// get the theme from the window
|
// get the theme from the window
|
||||||
workspaceTheme = this.fixTheme(theme || windowWorkspace.theme);
|
workspaceTheme = this.fixTheme(theme || windowWorkspace.theme);
|
||||||
const docElement = browser.document.documentElement;
|
const docElement = browser.document.documentElement;
|
||||||
@@ -1983,9 +1983,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
|
|||||||
|
|
||||||
invalidateGradientCache(uuid) {
|
invalidateGradientCache(uuid) {
|
||||||
delete this.#gradientsCache[uuid];
|
delete this.#gradientsCache[uuid];
|
||||||
window.dispatchEvent(
|
gZenWorkspaces.workspaceElement(uuid)?.onGradientCacheChanged();
|
||||||
new Event("ZenGradientCacheChanged", { bubbles: true })
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getGradientForWorkspace(workspace, { getGradient = true } = {}) {
|
getGradientForWorkspace(workspace, { getGradient = true } = {}) {
|
||||||
|
|||||||
@@ -268,12 +268,6 @@ export class nsZenWorkspace extends MozXULElement {
|
|||||||
|
|
||||||
this.#updateOverflow();
|
this.#updateOverflow();
|
||||||
|
|
||||||
this.onGradientCacheChanged = this.#onGradientCacheChanged.bind(this);
|
|
||||||
window.addEventListener(
|
|
||||||
"ZenGradientCacheChanged",
|
|
||||||
this.onGradientCacheChanged
|
|
||||||
);
|
|
||||||
|
|
||||||
this.pinnedTabsContainer.addEventListener("TabPinned", () => {
|
this.pinnedTabsContainer.addEventListener("TabPinned", () => {
|
||||||
// If a tab is pinned and the pinned tabs section is collapsed, uncollapse it.
|
// If a tab is pinned and the pinned tabs section is collapsed, uncollapse it.
|
||||||
if (this.collapsiblePins.collapsed) {
|
if (this.collapsiblePins.collapsed) {
|
||||||
@@ -300,13 +294,6 @@ export class nsZenWorkspace extends MozXULElement {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnectedCallback() {
|
|
||||||
window.removeEventListener(
|
|
||||||
"ZenGradientCacheChanged",
|
|
||||||
this.onGradientCacheChanged
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
get active() {
|
get active() {
|
||||||
return this.hasAttribute("active");
|
return this.hasAttribute("active");
|
||||||
}
|
}
|
||||||
@@ -395,7 +382,7 @@ export class nsZenWorkspace extends MozXULElement {
|
|||||||
return this.querySelector("#tabs-newtab-button");
|
return this.querySelector("#tabs-newtab-button");
|
||||||
}
|
}
|
||||||
|
|
||||||
#onGradientCacheChanged() {
|
onGradientCacheChanged() {
|
||||||
const { isDarkMode, isExplicitMode, toolbarColor, primaryColor } =
|
const { isDarkMode, isExplicitMode, toolbarColor, primaryColor } =
|
||||||
gZenThemePicker.getGradientForWorkspace(
|
gZenThemePicker.getGradientForWorkspace(
|
||||||
gZenWorkspaces.getWorkspaceFromId(this.workspaceUuid),
|
gZenWorkspaces.getWorkspaceFromId(this.workspaceUuid),
|
||||||
|
|||||||
@@ -130,18 +130,22 @@ add_task(async function test_html_parsing_logic() {
|
|||||||
const mockHtml = `
|
const mockHtml = `
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<ul>
|
||||||
<div class="IssueItem-module__defaultRepoContainer"><span>mozilla/zen</span><span>#101</span></div>
|
<li class="ListItem-module__listItem__wBJcm">
|
||||||
<a class="IssueItem-module__authorCreatedLink">UserA</a>
|
<h4><a data-testid="issue-listitem-title-link" href="https://github.com/mozilla/zen/issues/101"><span><span>Fix the login bug</span></span></a></h4>
|
||||||
<div class="Title-module__container">Fix the login bug</div>
|
<div class="Description-module__container__hpqJz">
|
||||||
<a data-testid="issue-pr-title-link" href="/issues/101"></a>
|
<span>zen-browser/desktop#101</span>
|
||||||
|
<span> · <button data-testid="author-filter-link"><span class="prc-VisuallyHidden-VisuallyHidden-Q0qSB">Filter by author </span>UserA</button></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
</li>
|
||||||
<div class="IssueItem-module__defaultRepoContainer"><span>mozilla/zen</span><span>#102</span></div>
|
<li class="ListItem-module__listItem__wBJcm">
|
||||||
<a class="IssueItem-module__authorCreatedLink">UserB</a>
|
<h4><a data-testid="issue-listitem-title-link" href="https://github.com/mozilla/zen/pull/102"><span><span>Add dark mode</span></span></a></h4>
|
||||||
<div class="Title-module__container">Add dark mode</div>
|
<div class="Description-module__container__hpqJz">
|
||||||
<a data-testid="issue-pr-title-link" href="/pull/102"></a>
|
<span>zen-browser/desktop#102</span>
|
||||||
|
<span> · <button data-testid="author-filter-link"><span class="prc-VisuallyHidden-VisuallyHidden-Q0qSB">Filter by author </span>UserB</button></span>
|
||||||
</div>
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
`;
|
`;
|
||||||
@@ -158,12 +162,15 @@ add_task(async function test_html_parsing_logic() {
|
|||||||
Assert.equal(items[0].title, "Fix the login bug");
|
Assert.equal(items[0].title, "Fix the login bug");
|
||||||
Assert.equal(items[0].subtitle, "UserA");
|
Assert.equal(items[0].subtitle, "UserA");
|
||||||
Assert.equal(items[0].id, "mozilla/zen#101");
|
Assert.equal(items[0].id, "mozilla/zen#101");
|
||||||
Assert.equal(items[0].url, "https://github.com/issues/101");
|
Assert.equal(
|
||||||
|
items[0].url,
|
||||||
|
"https://github.com/zen-browser/desktop/issues/101"
|
||||||
|
);
|
||||||
|
|
||||||
Assert.equal(items[1].title, "Add dark mode");
|
Assert.equal(items[1].title, "Add dark mode");
|
||||||
Assert.equal(items[1].subtitle, "UserB");
|
Assert.equal(items[1].subtitle, "UserB");
|
||||||
Assert.equal(items[1].id, "mozilla/zen#102");
|
Assert.equal(items[1].id, "mozilla/zen#102");
|
||||||
Assert.equal(items[1].url, "https://github.com/pull/102");
|
Assert.equal(items[1].url, "https://github.com/zen-browser/desktop/pull/102");
|
||||||
|
|
||||||
sandbox.restore();
|
sandbox.restore();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
"binaryName": "zen",
|
"binaryName": "zen",
|
||||||
"version": {
|
"version": {
|
||||||
"product": "firefox",
|
"product": "firefox",
|
||||||
"version": "155.0",
|
"version": "155.0.1",
|
||||||
"candidate": "155.0",
|
"candidate": "155.0.1",
|
||||||
"candidateBuild": 1
|
"candidateBuild": 1
|
||||||
},
|
},
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
|
|||||||
Reference in New Issue
Block a user