Bug 1512660 - Show a magnifier icon instead of the favicon for keyword and search alias matches. r=adw
authorDão Gottwald <dao@mozilla.com>
Tue, 15 Jan 2019 19:21:11 +0000
changeset 513949 83f6feddbba0eb52115774fef93c4ed4274161aa
parent 513948 3eafb595be4fce04627edba4b9686ac44baed45f
child 513950 f1d185974426691abd0473f7c8e8d52ea8d2b0d8
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1512660
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1512660 - Show a magnifier icon instead of the favicon for keyword and search alias matches. r=adw Differential Revision: https://phabricator.services.mozilla.com/D16556
browser/components/urlbar/UrlbarView.jsm
--- a/browser/components/urlbar/UrlbarView.jsm
+++ b/browser/components/urlbar/UrlbarView.jsm
@@ -257,17 +257,22 @@ class UrlbarView {
     item.appendChild(content);
 
     let typeIcon = this._createElement("span");
     typeIcon.className = "urlbarView-type-icon";
     content.appendChild(typeIcon);
 
     let favicon = this._createElement("img");
     favicon.className = "urlbarView-favicon";
-    favicon.src = result.payload.icon || "chrome://mozapps/skin/places/defaultFavicon.svg";
+    if (result.type == UrlbarUtils.MATCH_TYPE.SEARCH ||
+        result.type == UrlbarUtils.MATCH_TYPE.KEYWORD) {
+      favicon.src = "chrome://browser/skin/search-glass.svg";
+    } else {
+      favicon.src = result.payload.icon || "chrome://mozapps/skin/places/defaultFavicon.svg";
+    }
     content.appendChild(favicon);
 
     let title = this._createElement("span");
     title.className = "urlbarView-title";
     this._addTextContentWithHighlights(
       title,
       ...(result.title ?
           [result.title, result.titleHighlights] :