Bug 1492810 - Display favicons in UrlbarView results. r=mak
authorDão Gottwald <dao@mozilla.com>
Mon, 26 Nov 2018 10:23:50 +0000
changeset 504396 2ba86b9e4cc85efd75c3b22e4728135012930e39
parent 504395 6b3e2ddccf10962e9fdabec9c2dd0d8a9bcffab2
child 504397 19f0f3b9cf1a589c9c7ed1074c0a513ddbdd9d9a
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1492810
milestone65.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 1492810 - Display favicons in UrlbarView results. r=mak Differential Revision: https://phabricator.services.mozilla.com/D12811
browser/components/urlbar/UrlbarView.jsm
browser/themes/shared/urlbar-autocomplete.inc.css
--- a/browser/components/urlbar/UrlbarView.jsm
+++ b/browser/components/urlbar/UrlbarView.jsm
@@ -164,18 +164,19 @@ class UrlbarView {
     let content = this._createElement("span");
     content.className = "urlbarView-row-inner";
     item.appendChild(content);
 
     let actionIcon = this._createElement("span");
     actionIcon.className = "urlbarView-action-icon";
     content.appendChild(actionIcon);
 
-    let favicon = this._createElement("span");
+    let favicon = this._createElement("img");
     favicon.className = "urlbarView-favicon";
+    favicon.src = result.payload.icon || "chrome://mozapps/skin/places/defaultFavicon.svg";
     content.appendChild(favicon);
 
     let title = this._createElement("span");
     title.className = "urlbarView-title";
     title.textContent = result.title || result.payload.url;
     content.appendChild(title);
 
     let secondary = this._createElement("span");
--- a/browser/themes/shared/urlbar-autocomplete.inc.css
+++ b/browser/themes/shared/urlbar-autocomplete.inc.css
@@ -77,22 +77,16 @@
   margin-inline-end: @urlbarViewIconMarginEnd@;
   background-repeat: no-repeat;
   background-size: contain;
   -moz-context-properties: fill, fill-opacity;
   fill: currentColor;
   fill-opacity: 0.6;
 }
 
-.urlbarView-favicon {
-  border-radius: 8px;
-  background: currentcolor;
-  opacity: 0.6;
-}
-
 .urlbarView-row[action=switch-to-tab] > .urlbarView-row-inner > .urlbarView-action-icon {
   background-image: url(chrome://browser/skin/tab.svg);
 }
 
 .urlbarView-title {
   font-size: 1.05em;
 }