Bug 1103119: Search drop down fails to display properly if a search engine has no icon. r=felipe, a=gavin
authorDave Townsend <dtownsend@oxymoronical.com>
Fri, 21 Nov 2014 13:04:24 -0800
changeset 226120 30ca4c851a16b16268e0de3b8d67a956e6d374a8
parent 226119 cb637f8504a85cb0738e7efc18e7fab0b44fa730
child 226121 86ac124fa5fc0992e74c04c22c52f675a7ae922f
push id4166
push userdtownsend@mozilla.com
push dateFri, 21 Nov 2014 21:05:02 +0000
treeherdermozilla-beta@30ca4c851a16 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe, gavin
bugs1103119
milestone34.0
Bug 1103119: Search drop down fails to display properly if a search engine has no icon. r=felipe, a=gavin
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -948,19 +948,20 @@
         else {
           this.removeAttribute("showonlysettings");
           tree.collapsed = false;
         }
 
         // Show the current default engine in the top header of the panel.
         let currentEngine = Services.search.currentEngine;
         let uri = currentEngine.iconURI;
-        if (uri)
+        if (uri) {
           uri = uri.spec;
-        this.setAttribute("src", PlacesUtils.getImageURLForResolution(window, uri));
+          this.setAttribute("src", PlacesUtils.getImageURLForResolution(window, uri));
+        }
         document.getAnonymousElementByAttribute(this, "anonid", "searchbar-engine-name")
                 .setAttribute("value", currentEngine.name + " Search");
 
         // Update the 'Search for <keywords> with:" header.
         let headerSearchText =
           document.getAnonymousElementByAttribute(this, "anonid",
                                                   "searchbar-oneoffheader-searchtext");
         let textbox = searchbar.textbox;