Skip to content
Merged
37 changes: 36 additions & 1 deletion patches/add-license-info.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ diff --git a/chrome/browser/resources/settings/about_page/about_page.html b/chro
index 6864d76343794..678a7c240d91e 100644
--- a/chrome/browser/resources/settings/about_page/about_page.html
+++ b/chrome/browser/resources/settings/about_page/about_page.html
@@ -148,7 +148,68 @@
@@ -148,7 +148,103 @@
<settings-section>
<div class="info-sections">
<div class="info-section">
Expand Down Expand Up @@ -80,6 +80,41 @@ index 6864d76343794..678a7c240d91e 100644
+ </div>
+ <hr />
+ <div class="info-section">
+ <div class="secondary">This project contains code from ungoogled-chromium.</div>
+ <div class="secondary">Copyright (c) 2015-2025, The ungoogled-chromium Authors</div>
+ <div class="secondary">BSD-3-clause license:
+ <pre>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ </pre>
+ </div>
+ </div>
+ <hr />
+ <div class="info-section">
+ <div class="secondary">This project is based on the Chromium open source project.</div>
<div class="secondary">$i18n{aboutProductCopyright}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion patches/expose-flags.patch
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ index 7613006656aaa..ee707f847ccba 100644
+ "is disabled, the 'JavaScript optimization & security' permission "
+ "will disable WebAssembly when disallowed. When enabled, WebAssembly "
+ "in the same configuration will be available. Disabled by default "
+ "until it becomes more stable. This feature is provided by Trivalent."
+ "until it becomes more stable. This feature is provided by Trivalent.",
+ kOsAll, FEATURE_VALUE_TYPE(features::kEnableDrumbrake)},
+#endif
{variations::switches::kEnableBenchmarking,
Expand Down
296 changes: 296 additions & 0 deletions patches/trivalent-faq-page.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
Copyright (c) 2015-2025, The ungoogled-chromium Authors
Copyright (c) 2026, The Trivalent Authors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index d347c428ac..29faea895d 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1214,6 +1214,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
if (first_run::IsChromeFirstRun()) {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kApp) &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppId)) {
+ browser_creator_->AddFirstRunTabs({GURL("chrome://trivalent-faq")});
browser_creator_->AddFirstRunTabs(master_prefs_->new_tabs);
}
}
diff --git a/chrome/browser/ui/webui/chrome_web_ui_configs.cc b/chrome/browser/ui/webui/chrome_web_ui_configs.cc
index d185bfdfbb..7e66f32eb3 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_configs.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_configs.cc
@@ -48,6 +48,7 @@
#include "chrome/browser/ui/webui/signin_internals_ui.h"
#include "chrome/browser/ui/webui/sync_internals/sync_internals_ui.h"
#include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h"
+#include "chrome/browser/ui/webui/trivalent_faq.h"
#include "chrome/browser/ui/webui/usb_internals/usb_internals_ui.h"
#include "chrome/browser/ui/webui/user_actions/user_actions_ui.h"
#include "chrome/browser/ui/webui/version/version_ui.h"
@@ -274,6 +275,7 @@ void RegisterChromeWebUIConfigs() {
map.AddWebUIConfig(std::make_unique<SiteEngagementUIConfig>());
map.AddWebUIConfig(std::make_unique<SyncInternalsUIConfig>());
map.AddWebUIConfig(std::make_unique<TranslateInternalsUIConfig>());
+ map.AddWebUIConfig(std::make_unique<TrivalentFAQUIConfig>());
map.AddWebUIConfig(std::make_unique<UsbInternalsUIConfig>());
map.AddWebUIConfig(std::make_unique<UserActionsUIConfig>());
map.AddWebUIConfig(std::make_unique<VersionUIConfig>());
diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc
index f96fccfbc2..a058283fb5 100644
--- a/chrome/common/webui_url_constants.cc
+++ b/chrome/common/webui_url_constants.cc
@@ -74,6 +74,7 @@ bool IsSystemWebUIHost(std::string_view host) {
// These hosts will also be suggested by BuiltinProvider.
base::span<const base::cstring_view> ChromeURLHosts() {
static constexpr auto kChromeURLHosts = std::to_array<base::cstring_view>({
+ "trivalent-faq",
kChromeUIAboutHost,
kChromeUIAccessibilityHost,
kChromeUIActorInternalsHost,
diff --git a/chrome/browser/ui/webui/trivalent_faq.h b/chrome/browser/ui/webui/trivalent_faq.h
new file mode 100644
--- /dev/null
+++ b/chrome/browser/ui/webui/trivalent_faq.h
@@ -0,0 +1,218 @@
+#ifndef CHROME_BROWSER_UI_WEBUI_TRIVALENT_FAQ_H_
+#define CHROME_BROWSER_UI_WEBUI_TRIVALENT_FAQ_H_
+
+#include "base/memory/ref_counted_memory.h"
+#include "chrome/browser/profiles/profile.h"
+#include "content/public/browser/url_data_source.h"
+#include "content/public/browser/web_ui.h"
+#include "content/public/browser/web_ui_controller.h"
+#include "content/public/browser/webui_config.h"
+#include "services/network/public/mojom/content_security_policy.mojom.h"
+
+class TFDataSource : public content::URLDataSource {
+ public:
+ TFDataSource() {}
+ TFDataSource(const TFDataSource&) = delete;
+ TFDataSource& operator=(const TFDataSource&) = delete;
+ std::string GetSource() { return "trivalent-faq"; }
+ std::string GetMimeType(const GURL& url) { return "text/html"; }
+ bool IsWebUIEnabled(content::BrowserContext* browser_context) {
+ return !Profile::FromBrowserContext(browser_context)->IsOffTheRecord();
+ }
+ std::string GetContentSecurityPolicy(network::mojom::CSPDirectiveName directive) {
+ if (directive == network::mojom::CSPDirectiveName::DefaultSrc)
+ return "default-src 'none';";
+ else if (directive == network::mojom::CSPDirectiveName::StyleSrc)
+ return "style-src-elem chrome: 'unsafe-inline';";
+ else if (directive == network::mojom::CSPDirectiveName::FontSrc)
+ return "font-src chrome:;";
+ else if (directive == network::mojom::CSPDirectiveName::FormAction)
+ return "form-action 'none';";
+ else if (directive == network::mojom::CSPDirectiveName::FrameAncestors)
+ return "frame-ancestors 'none';";
+ else if (directive == network::mojom::CSPDirectiveName::BaseURI)
+ return "base-uri 'none';";
+ else if (directive == network::mojom::CSPDirectiveName::Sandbox)
+ return "sandbox;";
+ else if (directive == network::mojom::CSPDirectiveName::UpgradeInsecureRequests)
+ return "upgrade-insecure-requests;";
+ return std::string();
+ }
+ void StartDataRequest(const GURL& url,
+ const content::WebContents::Getter& wc_getter,
+ GotDataCallback callback) {
+ std::string source = R"(
+<title>Trivalent FAQ</title>
+<meta name="color-scheme" content="light dark">
+<style>
+ @import url(//resources/css/text_defaults_md.css);
+ html {
+ color: #202124;
+ background: white;
+ line-height: 1.1em
+ }
+ a {
+ color: #1967d2
+ }
+ h2, h3 {
+ margin: 0;
+ padding: 0.67em 1.33em
+ }
+ p, details {
+ border-top: .063em solid #f0f0f0;
+ margin: 0;
+ padding: 1em 2em;
+ line-height: 110%
+ }
+ ul, ol {
+ padding-left: 2em
+ }
+ code {
+ background: rgba(128 128 128 / .2);
+ padding: 0 0.5em;
+ border-radius: 0.25em
+ }
+ summary {
+ cursor: pointer
+ }
+ section {
+ width: 60em;
+ margin: 4em auto;
+ border-radius: .5em;
+ background: white;
+ box-shadow: 0 .063em .125em 0 #c4c5c6, 0 .125em .375em .125em #e2e3e3
+ }
+ @media(prefers-color-scheme:dark) {
+ html {
+ color: #e8eaed;
+ background: #202124
+ }
+ a {
+ color: #8ab4f8
+ }
+ p, details {
+ border-top: .063em solid #3f4042
+ }
+ section {
+ background: #292a2d;
+ box-shadow: 0 .063em .125em 0 #161719, 0 .125em .375em .125em #1b1c1f
+ }
+ }
+</style>
+<base target="_blank">
+<section>
+ <h2>Trivalent</h2><p>
+ Trivalent is a security-focused, Chromium-based browser for desktop Linux inspired by
+ <a href="https://github.com/GrapheneOS/Vanadium">Vanadium</a>.
+ <p>
+ This page can always be accessed from <a href="chrome://trivalent-faq">chrome://trivalent-faq</a>
+</section>
+<section>
+ <h2>Additional Preferences</h2><p>
+ Some of the features Trivalent provides can be controlled via preferences.
+ These preferences can be accessed in the <a href="chrome://settings/security">security settings</a>
+ in the section titled <code>Hardening</code> at the bottom.
+ Some additional preferences are also added for convenience, such as a website dark mode toggle in
+ <a href="chrome://settings/appearance">appearance settings</a>.
+</section>
+<section>
+ <h2>FAQ</h2>
+ <details><summary><b>Which filters are included in Trivalent adblocking? How do I add a new filter?</b></summary><br>
+ Trivalent comes preloaded with EasyList, EasyPrivacy, Fanboy Annoyance, and a wide set of
+ regional filter lists covering Europe, Asia, the Middle East, and more. It also includes
+ Anti-Adblock Filters to bypass detection. You can see the full list here:
+ <a href="https://github.com/secureblue/trivalent-subresource-filter/blob/live/copr_script.sh">Trivalent filter sources</a>.
+ Since these filters are precompiled at build time, if you want to add a new filter, please open an issue or submit a pull
+ request in the same repository.
+ </details>
+ <details><summary><b>Why aren't YouTube ads blocked, and how can I watch YouTube without ads?</b></summary><br>
+ Trivalent's subresource filter cannot perform script injection or observe and alter what happens
+ inside YouTube's video player, so it can't reliably intercept the scripts and dynamic behavior
+ YouTube uses to serve ads. To avoid ads, you need a tool capable of doing that. Common options
+ are <a href="https://flathub.org/apps/io.freetubeapp.FreeTube">FreeTube Electron Flatpak</a>,
+ <a href="https://flathub.org/apps/de.schmidhuberj.tubefeeder">Pipeline Piped proxy Flatpak</a>,
+ and the YouTube PWA (progressive web-app) paired with uBlock Origin Lite. Consider creating a
+ separate profile for the Youtube PWA, so you can continue browsing extensionless for your
+ usual profile.<br>
+ To install a PWA, click the <code>Install</code> button in the address bar, or at the top right,
+ click the three dots, then </code>Save and Share -> Install page as app</code>.
+ </details>
+ <details><summary><b>Why does Trivalent log me out of all sites by default?</b></summary><br>
+ It shouldn't, but this is a bug related to Chromium's Network Service Sandbox where cookies are
+ either cleared or become inaccessible when the browser is closed. If you experience this,
+ navigate to <a href="chrome://settings/security">security settings</a>, at the bottom you will
+ see a <code>Hardening</code> section and within it a toggle <code>Network Service Sandbox</code>,
+ flip this to off and restarting your browser.
+ <br><br>
+ Please note that the <code>Network Service Sandbox</code> is no longer enabled by default. Users
+ should keep in mind that enabling this setting may result in issues with cookie persistence.
+ Also note that this is a global toggle, which means that all of your browser profiles will be
+ affected if the setting is toggled.
+ </details>
+ <details><summary><b>Why don't extensions work in Trivalent?</b></summary><br>
+ Extensions in Trivalent are disabled by default, for security reasons, it is not advised to
+ use them. If you want content/ad blocking, that is already built into Trivalent and enabled by
+ default. If you require extensions, you can re-enable them by disabling the
+ <code>Disable Extensions</code> toggle under
+ <a href="chrome://settings/security">chrome://settings/security</a>, then restarting your browser
+ (this toggle is per-profile).
+ <br><br>
+ If the extension you installed doesn't work, it may be because it requires JavaScript
+ Just-In-Time Compilation (JIT), which is disabled by default in Trivalent. To re-enable JavaScript JIT
+ for an extension, visit <a href="chrome://extensions">chrome://extensions</a>, under the extension with the issues, go
+ <code>Details -> Site Settings</code>, then scroll to
+ <code>JavaScript Optimization & Security</code> and flip to allow.
+ If the extension continues to not work, try reinstalling the extension.
+ </details>
+ <details><summary><b>Why don't some websites that require JIT/WebAssembly work in Trivalent even with the JavaScript Optimizations toggle enabled?</b></summary><br>
+ This is an upstream bug that prevents JavaScript Optimization settings from being applied to
+ iframes embedded within a parent website. As a result, WebAssembly may not function on services
+ that use a separate URL for their content delivery network or other included domains, such as
+ VSCode Web (<code>https://github.dev</code>). To make VSCode Web work properly, you need to
+ manually allow JavaScript optimizations for the CDN by adding
+ <code>https://[*.]vscode-cdn.net</code> to your list of trusted websites.
+ <br><br>
+ There is also currently a bug where the Optimizations permission doesn't apply to a tab even
+ after reloading, only after closing and re-opening the tab does the optimizations toggle
+ properly apply.
+ </details>
+ <details><summary><b>Why doesn't DRM content (Spotify, Netflix etc.) work in Trivalent by default?</b></summary><br>
+ DRM-protected content is available in Trivalent, however it is disabled by default. Visit
+ <a href="chrome://settings/content/protectedContent">chrome://settings/content/protectedContent</a>
+ and select <code>Sites can play protected content</code>.
+ </details>
+</section>
+<section>
+ <h2>Additional Feature Toggles</h2><p>
+ Trivalent introduces some extra flags and features that can be viewed at
+ <a href="chrome://flags">chrome://flags</a>. The default state of each flag/feature
+ is explained in it's respective description. Some are features already present in chromium,
+ just exposed, and some are Trivalent-provided features. Both of these are labeled as such.
+</section>
+<section>
+ <h2>Additional Links</h2><p>
+ Read the secureblue <a href="https://secureblue.dev/#faq">FAQ</a>.
+ <p>
+ Consider contributing to <a href="https://github.com/secureblue/Trivalent">Trivalent</a> and <a href="https://github.com/secureblue/secureblue">secureblue</a>.
+</section>
+)";
+ std::move(callback).Run(base::MakeRefCounted<base::RefCountedString>(std::move(source)));
+ }
+};
+
+class TrivalentFAQ;
+class TrivalentFAQUIConfig : public content::DefaultWebUIConfig<TrivalentFAQ> {
+ public:
+ TrivalentFAQUIConfig() : DefaultWebUIConfig("chrome", "trivalent-faq") {}
+};
+
+class TrivalentFAQ : public content::WebUIController {
+ public:
+ TrivalentFAQ(content::WebUI* web_ui) : content::WebUIController(web_ui) {
+ content::URLDataSource::Add(Profile::FromWebUI(web_ui), std::make_unique<TFDataSource>());
+ }
+ TrivalentFAQ(const TrivalentFAQ&) = delete;
+ TrivalentFAQ& operator=(const TrivalentFAQ&) = delete;
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_TRIVALENT_FAQ_H_