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 234075 7f675d2bd889c1eac1191b1db2fd9dbfb1b11813
parent 234074 a87ab9d302eb36b70aa1b6d499dbb606e70cb45f
child 234076 859cff5cfabb288baf9cccfdf4d2659cb7dc8118
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersfelipe, gavin
bugs1103119
milestone35.0a2
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
@@ -988,19 +988,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;