From 93ecf8da8d80b7762caaa294cbe102c3e8047414 Mon Sep 17 00:00:00 2001 From: Daisuke Akatsuka Date: Sun, 30 Jul 2023 21:07:01 +0000 Subject: [PATCH] Bug 1844706: Add and use new MDN icon for MDN Suggestions r=desktop-theme-reviewers,adw,dao Depends on D184075 Differential Revision: https://phabricator.services.mozilla.com/D184786 --- .../components/urlbar/private/MDNSuggestions.sys.mjs | 2 +- .../tests/quicksuggest/unit/test_quicksuggest_mdn.js | 2 +- toolkit/themes/shared/desktop-jar.inc.mn | 2 +- toolkit/themes/shared/icons/mdn.svg | 10 ++++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 toolkit/themes/shared/icons/mdn.svg diff --git a/browser/components/urlbar/private/MDNSuggestions.sys.mjs b/browser/components/urlbar/private/MDNSuggestions.sys.mjs index 417252a09c94..35fa3df09f13 100644 --- a/browser/components/urlbar/private/MDNSuggestions.sys.mjs +++ b/browser/components/urlbar/private/MDNSuggestions.sys.mjs @@ -90,7 +90,7 @@ export class MDNSuggestions extends BaseFeature { } const payload = { - icon: "chrome://devtools/skin/images/mdn.svg", + icon: "chrome://global/skin/icons/mdn.svg", url: suggestion.url, title: [suggestion.title, lazy.UrlbarUtils.HIGHLIGHT.TYPED], description: suggestion.description, diff --git a/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_mdn.js b/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_mdn.js index 55aca42d4a8e..b9b8502f26d8 100644 --- a/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_mdn.js +++ b/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_mdn.js @@ -208,7 +208,7 @@ function makeExpectedResult({ url: suggestion.url, displayUrl: suggestion.url.replace(/^https:\/\//, ""), description: isTopPick ? suggestion.description : "", - icon: "chrome://devtools/skin/images/mdn.svg", + icon: "chrome://global/skin/icons/mdn.svg", shouldShowUrl: true, }, }; diff --git a/toolkit/themes/shared/desktop-jar.inc.mn b/toolkit/themes/shared/desktop-jar.inc.mn index fb7efc3784e4..45a35c24122f 100644 --- a/toolkit/themes/shared/desktop-jar.inc.mn +++ b/toolkit/themes/shared/desktop-jar.inc.mn @@ -85,6 +85,7 @@ skin/classic/global/icons/link.svg (../../shared/icons/link.svg) skin/classic/global/icons/loading.png (../../shared/icons/loading.png) skin/classic/global/icons/loading@2x.png (../../shared/icons/loading@2x.png) + skin/classic/global/icons/mdn.svg (../../shared/icons/mdn.svg) skin/classic/global/icons/more.svg (../../shared/icons/more.svg) skin/classic/global/icons/open-in-new.svg (../../shared/icons/open-in-new.svg) skin/classic/global/icons/page-portrait.svg (../../shared/icons/page-portrait.svg) @@ -144,4 +145,3 @@ skin/classic/global/reader/RM-Content-Width-Plus-44x16.svg (../../shared/reader/RM-Content-Width-Plus-44x16.svg) skin/classic/global/reader/RM-Line-Height-Minus-38x14.svg (../../shared/reader/RM-Line-Height-Minus-38x14.svg) skin/classic/global/reader/RM-Line-Height-Plus-38x24.svg (../../shared/reader/RM-Line-Height-Plus-38x24.svg) - diff --git a/toolkit/themes/shared/icons/mdn.svg b/toolkit/themes/shared/icons/mdn.svg new file mode 100644 index 000000000000..52dd9d923f9e --- /dev/null +++ b/toolkit/themes/shared/icons/mdn.svg @@ -0,0 +1,10 @@ + + + + + + + +