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 511067 83f6feddbba0eb52115774fef93c4ed4274161aa
parent 511066 3eafb595be4fce04627edba4b9686ac44baed45f
child 511068 f1d185974426691abd0473f7c8e8d52ea8d2b0d8
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [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] :