commit 0a0415da3a5f180bca9bafe5da89a4efd357e612
parent aec59658e8580dc1853de7d303c185799c0091bc
Author: Richard Pospesel <richard@torproject.org>
Date: Tue, 19 Sep 2023 04:04:08 +0000
BB 42037: Disable about:firefoxview page
Diffstat:
5 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
@@ -4931,6 +4931,11 @@ var FirefoxViewHandler = {
}
},
openTab(section) {
+ if (AppConstants.BASE_BROWSER_VERSION) {
+ // about:firefoxview is disabled. tor-browser#42037.
+ return;
+ }
+
if (!CustomizableUI.getPlacementOfWidget(this.BUTTON_ID)) {
CustomizableUI.addWidgetToArea(
this.BUTTON_ID,
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
@@ -79,8 +79,6 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::IS_SECURE_CHROME_UI},
- {"firefoxview", "chrome://browser/content/firefoxview/firefoxview.html",
- nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI},
{"opentabs", "chrome://browser/content/tabbrowser/opentabs.html",
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI |
nsIAboutModule::HIDE_FROM_ABOUTABOUT},
diff --git a/browser/components/about/components.conf b/browser/components/about/components.conf
@@ -14,7 +14,6 @@ pages = [
'keyboard',
'logins',
'loginsimportreport',
- 'firefoxview',
'messagepreview',
'opentabs',
'policies',
diff --git a/browser/components/moz.build b/browser/components/moz.build
@@ -41,7 +41,6 @@ DIRS += [
"downloads",
"enterprisepolicies",
"extensions",
- "firefoxview",
# Exclude "genai" component. tor-browser#44045.
"ipprotection",
"messagepreview",
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
@@ -2383,14 +2383,20 @@ tab-group {
color-scheme: var(--tab-selected-color-scheme);
}
-:root:not([privatebrowsingmode]) :is(toolbarbutton, toolbarpaletteitem) ~ #tabbrowser-tabs,
-:root[privatebrowsingmode] :is(toolbarbutton:not(#firefox-view-button), toolbarpaletteitem:not(#wrapper-firefox-view-button)) ~ #tabbrowser-tabs {
+/* about:firefoxview is disabled in Base Browser. See tor-browser#42037.
+ * Therefore we always hide #firefox-view-button, regardless of private
+ * browsing. Here we only want to draw the border if there is a non-hidden
+ * toolbar item before the tabs. */
+:root :is(toolbarbutton:not(#firefox-view-button), toolbarpaletteitem:not(#wrapper-firefox-view-button)) ~ #tabbrowser-tabs {
border-inline-start: var(--tabstrip-inner-border);
padding-inline-start: 2px;
margin-inline-start: 2px;
}
-:root[privatebrowsingmode] :is(#firefox-view-button, #menu_openFirefoxView) {
+/* about:firefoxview is disabled in Base Browser. Always hide the toolbar button
+ * and menu item regardless of private browsing. See tor-browser#42037. */
+#firefox-view-button,
+#menu_openFirefoxView {
display: none;
}