mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-06 21:40:45 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f3bcb2f32 | ||
|
|
c209ea72c1 | ||
|
|
55b71754f3 | ||
|
|
6af79fd621 | ||
|
|
57196c1464 | ||
|
|
43d47ac537 |
4
.github/workflows/windows-release-build.yml
vendored
4
.github/workflows/windows-release-build.yml
vendored
@@ -207,8 +207,10 @@ jobs:
|
||||
fi
|
||||
# Stored in 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/
|
||||
cargo install cargo-download --locked
|
||||
cargo download -x windows=$WINDOWS_RS_VERSION
|
||||
export CARGO_INCREMENTAL=0
|
||||
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
|
||||
|
||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `155.0`!
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 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.1`!
|
||||
|
||||
### 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",
|
||||
"path": "firefox/css_corner_shape_rendering.patch"
|
||||
},
|
||||
{
|
||||
"type": "local",
|
||||
"path": "firefox/override_cert_checks_temp.patch"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -198,45 +198,36 @@ export class nsGithubLiveFolderProvider extends nsZenLiveFolderProvider {
|
||||
}
|
||||
|
||||
const document = new DOMParser().parseFromString(text, "text/html");
|
||||
const issues = document.querySelectorAll(
|
||||
"div[class^=IssueItem-module__defaultRepoContainer]"
|
||||
const links = document.querySelectorAll(
|
||||
'a[data-testid="issue-listitem-title-link"]'
|
||||
);
|
||||
const items = [];
|
||||
const activeRepos = new Set();
|
||||
|
||||
if (issues.length) {
|
||||
const authors = document.querySelectorAll(
|
||||
"a[class^=IssueItem-module__authorCreatedLink]"
|
||||
for (const link of links) {
|
||||
const issueUrl = new URL(link.getAttribute("href"), this.state.url);
|
||||
const pathMatch = issueUrl.pathname.match(
|
||||
/^\/([^/]+\/[^/]+)\/(?:issues|pull)\/([0-9]+)/
|
||||
);
|
||||
const titles = document.querySelectorAll(
|
||||
"div[class^=Title-module__container]"
|
||||
);
|
||||
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 number = numberMatch?.[0] ?? "";
|
||||
|
||||
items.push({
|
||||
title,
|
||||
subtitle: author,
|
||||
icon: "chrome://browser/content/zen-images/favicons/github.svg",
|
||||
url: "https://github.com" + issueUrl,
|
||||
id: `${repo}#${number}`,
|
||||
});
|
||||
if (!pathMatch) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const [, repo, number] = pathMatch;
|
||||
activeRepos.add(repo);
|
||||
|
||||
const author = link
|
||||
.closest("li")
|
||||
?.querySelector('[data-testid="author-filter-link"]')
|
||||
?.lastChild?.textContent.trim();
|
||||
|
||||
items.push({
|
||||
title: link.textContent.trim(),
|
||||
subtitle: author,
|
||||
icon: "chrome://browser/content/zen-images/favicons/github.svg",
|
||||
url: issueUrl.href,
|
||||
id: `${repo}#${number}`,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -1509,7 +1509,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
|
||||
baseColor = this.blendColors(
|
||||
accentColor,
|
||||
baseColor.slice(0, 3),
|
||||
this.canBeTransparent ? 25 : 5
|
||||
this.canBeTransparent ? 20 : 5
|
||||
).concat(opacity);
|
||||
}
|
||||
return baseColor;
|
||||
@@ -1538,16 +1538,16 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
|
||||
return;
|
||||
}
|
||||
|
||||
if (theme === null) {
|
||||
browser.gZenThemePicker.invalidateGradientCache(uuid);
|
||||
}
|
||||
|
||||
// Do not rebuild if the workspace is not the same as the current one
|
||||
const windowWorkspace = browser.gZenWorkspaces.getActiveWorkspace();
|
||||
if (windowWorkspace.uuid !== uuid) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (theme === null) {
|
||||
browser.gZenThemePicker.invalidateGradientCache(uuid);
|
||||
}
|
||||
|
||||
// get the theme from the window
|
||||
workspaceTheme = this.fixTheme(theme || windowWorkspace.theme);
|
||||
const docElement = browser.document.documentElement;
|
||||
@@ -1983,9 +1983,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
|
||||
|
||||
invalidateGradientCache(uuid) {
|
||||
delete this.#gradientsCache[uuid];
|
||||
window.dispatchEvent(
|
||||
new Event("ZenGradientCacheChanged", { bubbles: true })
|
||||
);
|
||||
gZenWorkspaces.workspaceElement(uuid)?.onGradientCacheChanged();
|
||||
}
|
||||
|
||||
getGradientForWorkspace(workspace, { getGradient = true } = {}) {
|
||||
|
||||
@@ -268,12 +268,6 @@ export class nsZenWorkspace extends MozXULElement {
|
||||
|
||||
this.#updateOverflow();
|
||||
|
||||
this.onGradientCacheChanged = this.#onGradientCacheChanged.bind(this);
|
||||
window.addEventListener(
|
||||
"ZenGradientCacheChanged",
|
||||
this.onGradientCacheChanged
|
||||
);
|
||||
|
||||
this.pinnedTabsContainer.addEventListener("TabPinned", () => {
|
||||
// If a tab is pinned and the pinned tabs section is collapsed, uncollapse it.
|
||||
if (this.collapsiblePins.collapsed) {
|
||||
@@ -300,13 +294,6 @@ export class nsZenWorkspace extends MozXULElement {
|
||||
});
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
window.removeEventListener(
|
||||
"ZenGradientCacheChanged",
|
||||
this.onGradientCacheChanged
|
||||
);
|
||||
}
|
||||
|
||||
get active() {
|
||||
return this.hasAttribute("active");
|
||||
}
|
||||
@@ -395,7 +382,7 @@ export class nsZenWorkspace extends MozXULElement {
|
||||
return this.querySelector("#tabs-newtab-button");
|
||||
}
|
||||
|
||||
#onGradientCacheChanged() {
|
||||
onGradientCacheChanged() {
|
||||
const { isDarkMode, isExplicitMode, toolbarColor, primaryColor } =
|
||||
gZenThemePicker.getGradientForWorkspace(
|
||||
gZenWorkspaces.getWorkspaceFromId(this.workspaceUuid),
|
||||
|
||||
@@ -653,12 +653,24 @@ class nsZenSpacesSyncModel {
|
||||
return this.projections().get(id) ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Before the session file is read the sidebar reads as empty. Diffing that
|
||||
* against the uploaded snapshot would tombstone every synced item. An
|
||||
* initialized sidebar always holds at least one space.
|
||||
*/
|
||||
#sidebarReady() {
|
||||
return !!lazy.ZenSessionStore.getSidebarData()?.spaces?.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes = diff between the current projections and the last state the
|
||||
* server acknowledged. Ids present locally with different content are
|
||||
* modified; ids only present in the uploaded snapshot are deletions.
|
||||
*/
|
||||
computeChangedIDs() {
|
||||
if (!this.#sidebarReady()) {
|
||||
return {};
|
||||
}
|
||||
const uploaded = this.#data().uploaded;
|
||||
const current = this.#digestAll();
|
||||
const pending = this.#pendingIds();
|
||||
@@ -687,6 +699,9 @@ class nsZenSpacesSyncModel {
|
||||
}
|
||||
|
||||
hasPendingChanges() {
|
||||
if (!this.#sidebarReady()) {
|
||||
return false;
|
||||
}
|
||||
const uploaded = this.#data().uploaded;
|
||||
const current = this.#digestAll();
|
||||
const pending = this.#pendingIds();
|
||||
|
||||
@@ -130,18 +130,22 @@ add_task(async function test_html_parsing_logic() {
|
||||
const mockHtml = `
|
||||
<html>
|
||||
<body>
|
||||
<div>
|
||||
<div class="IssueItem-module__defaultRepoContainer"><span>mozilla/zen</span><span>#101</span></div>
|
||||
<a class="IssueItem-module__authorCreatedLink">UserA</a>
|
||||
<div class="Title-module__container">Fix the login bug</div>
|
||||
<a data-testid="issue-pr-title-link" href="/issues/101"></a>
|
||||
</div>
|
||||
<div>
|
||||
<div class="IssueItem-module__defaultRepoContainer"><span>mozilla/zen</span><span>#102</span></div>
|
||||
<a class="IssueItem-module__authorCreatedLink">UserB</a>
|
||||
<div class="Title-module__container">Add dark mode</div>
|
||||
<a data-testid="issue-pr-title-link" href="/pull/102"></a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="ListItem-module__listItem__wBJcm">
|
||||
<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="Description-module__container__hpqJz">
|
||||
<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>
|
||||
</li>
|
||||
<li class="ListItem-module__listItem__wBJcm">
|
||||
<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="Description-module__container__hpqJz">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</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].subtitle, "UserA");
|
||||
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].subtitle, "UserB");
|
||||
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();
|
||||
});
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
"binaryName": "zen",
|
||||
"version": {
|
||||
"product": "firefox",
|
||||
"version": "155.0",
|
||||
"candidate": "155.0",
|
||||
"version": "155.0.1",
|
||||
"candidate": "155.0.1",
|
||||
"candidateBuild": 1
|
||||
},
|
||||
"buildOptions": {
|
||||
|
||||
Reference in New Issue
Block a user