commit 282c9989c4d855c89a77119184db7c8dbed505f0
parent 76b03ee55d7d42bc86e4d9630f4d58f1f4babe6b
Author: agoloman <agoloman@mozilla.com>
Date: Wed, 8 Oct 2025 04:01:55 +0300
Revert "Bug 1989844 - Show file icon when accessing file urls. r=emz" for causing bc failures @browser_trust_panel_pages.js.
This reverts commit 931328afd49b3abec7eb441f39830a1fb7d4e702.
Diffstat:
5 files changed, 7 insertions(+), 72 deletions(-)
diff --git a/browser/base/content/browser-trustPanel.js b/browser/base/content/browser-trustPanel.js
@@ -248,9 +248,7 @@ class TrustPanel {
let secureConnection = this.#isSecurePage();
icon.className = "";
- if (this.#isURILoadedFromFile) {
- icon.classList.add("file");
- } else if (!this.#trackingProtectionEnabled) {
+ if (!this.#trackingProtectionEnabled) {
icon.classList.add("inactive");
} else if (secureConnection && this.#trackingProtectionEnabled) {
icon.classList.add("secure");
@@ -516,9 +514,9 @@ class TrustPanel {
}
get #trackingProtectionEnabled() {
- return (
- !ContentBlockingAllowList.canHandle(window.gBrowser.selectedBrowser) ||
- !ContentBlockingAllowList.includes(window.gBrowser.selectedBrowser)
+ return !(
+ ContentBlockingAllowList.canHandle(window.gBrowser.selectedBrowser) &&
+ ContentBlockingAllowList.includes(window.gBrowser.selectedBrowser)
);
}
@@ -838,7 +836,7 @@ class TrustPanel {
tooltip = gNavigatorBundle.getString("identity.notSecure.tooltip");
}
}
- } else if (!this.#isPotentiallyTrustworthy) {
+ } else {
tooltip = gNavigatorBundle.getString("identity.notSecure.tooltip");
}
diff --git a/browser/components/controlcenter/content/securityInformation.inc.xhtml b/browser/components/controlcenter/content/securityInformation.inc.xhtml
@@ -12,6 +12,8 @@
<!-- These descriptions are shown on a seperate subview when trustpanel is disabled and
are only visible here under the trustpanel -->
<box class="only-trustpanel">
+ <description class="identity-popup-connection-failure security-view"
+ when-connection="net-error-page" data-l10n-id="identity-connection-failure"></description >
<description when-connection="chrome" data-l10n-id="identity-connection-internal"></description>
<description when-connection="file" data-l10n-id="identity-connection-file"></description>
<description when-connection="associated" data-l10n-id="identity-connection-associated"></description>
diff --git a/browser/components/urlbar/tests/browser/browser.toml b/browser/components/urlbar/tests/browser/browser.toml
@@ -713,8 +713,6 @@ https_first_disabled = true
["browser_trust_panel.js"]
-["browser_trust_panel_pages.js"]
-
["browser_trust_panel_security_view.js"]
https_first_disabled = true
diff --git a/browser/components/urlbar/tests/browser/browser_trust_panel_pages.js b/browser/components/urlbar/tests/browser/browser_trust_panel_pages.js
@@ -1,59 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/* This test checks pages of different URL variants (mostly differing in scheme)
- * and verifies that the shield is only shown when content blocking can deal
- * with the specific variant. */
-
-const ICONS = {
- active: "chrome://browser/skin/trust-icon-active.svg",
- insecure: "chrome://browser/skin/trust-icon-insecure.svg",
- file: "chrome://global/skin/icons/page-portrait.svg",
-};
-
-const TESTS = [
- {
- url: "about:about",
- icon: ICONS.insecure,
- },
- {
- url: "https://example.com",
- icon: ICONS.active,
- },
- {
- url: "http://127.0.0.1/",
- icon: ICONS.insecure,
- },
- {
- url: "file:////",
- icon: ICONS.file,
- },
-];
-
-add_setup(async function setup() {
- await SpecialPowers.pushPrefEnv({
- set: [["browser.urlbar.trustPanel.featureGate", true]],
- });
-});
-
-add_task(async function () {
- for (let testData of TESTS) {
- info(`Testing state of for ${testData.url}`);
-
- const tab = await BrowserTestUtils.openNewForegroundTab({
- gBrowser,
- opening: testData.url,
- waitForLoad: testData.url != "http://127.0.0.1/",
- });
-
- let doc = tab.ownerDocument;
- let icon = doc.defaultView.getComputedStyle(
- doc.getElementById("trust-icon")
- ).listStyleImage;
- let iconUrl = icon.match(/url\("([^"]+)"\)/)?.[1] ?? null;
-
- Assert.equal(iconUrl, testData.icon, "Trustpanel urlbar icon is correct");
-
- BrowserTestUtils.removeTab(tab);
- }
-});
diff --git a/browser/themes/shared/identity-block/identity-block.css b/browser/themes/shared/identity-block/identity-block.css
@@ -319,10 +319,6 @@
list-style-image: url(chrome://browser/skin/trust-icon-warning.svg);
}
- &.file {
- list-style-image: url(chrome://global/skin/icons/page-portrait.svg);
- }
-
.urlbar-input-container[pageproxystate="valid"] > &:not(.chickletShown) {
display: flex;
}