From bfe230a5dcf9008962b310b5c150525a9307c259 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Wed, 10 Mar 2021 20:31:57 +0000 Subject: [PATCH] Bug 1697219 - Use a fully colored branding icon in the identity box. r=harry,desktop-theme-reviewers Differential Revision: https://phabricator.services.mozilla.com/D107739 --- .../test/siteIdentity/browser_identityIcon_img_url.js | 6 +++++- .../shared/identity-block/identity-block.inc.css | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/browser/base/content/test/siteIdentity/browser_identityIcon_img_url.js b/browser/base/content/test/siteIdentity/browser_identityIcon_img_url.js index 09cfc9edf6a8..e5eb5fbdc800 100644 --- a/browser/base/content/test/siteIdentity/browser_identityIcon_img_url.js +++ b/browser/base/content/test/siteIdentity/browser_identityIcon_img_url.js @@ -35,7 +35,11 @@ const TEST_CASES = [ { type: "chrome about page", testURL: "about:preferences", - img_url: `url("chrome://branding/content/identity-icons-brand.svg")`, + img_url: UrlbarPrefs.get("browser.proton.urlbar.enabled") + ? `url("chrome://branding/content/icon${ + window.devicePixelRatio > 1 ? 32 : 16 + }.png")` + : `url("chrome://branding/content/identity-icons-brand.svg")`, }, { type: "file", diff --git a/browser/themes/shared/identity-block/identity-block.inc.css b/browser/themes/shared/identity-block/identity-block.inc.css index df597a17874c..468323a2bf63 100644 --- a/browser/themes/shared/identity-block/identity-block.inc.css +++ b/browser/themes/shared/identity-block/identity-block.inc.css @@ -204,9 +204,20 @@ list-style-image: url(chrome://global/skin/icons/identity-icon.svg); } +#identity-box[pageproxystate="valid"].chromeUI #identity-icon { + list-style-image: url(chrome://branding/content/icon16.png); +} +@media (min-resolution: 1.1dppx) { + #identity-box[pageproxystate="valid"].chromeUI #identity-icon { + list-style-image: url(chrome://branding/content/icon32.png); + } +} + +@supports not -moz-bool-pref("browser.proton.urlbar.enabled") { #identity-box[pageproxystate="valid"].chromeUI #identity-icon { list-style-image: url(chrome://branding/content/identity-icons-brand.svg); } +} /*** END !proton ***/ #identity-box[pageproxystate="valid"].localResource #identity-icon { list-style-image: url(chrome://global/skin/icons/document.svg);