Bug 1306308 - [One-off searches] Awesomebar results don't show the correct search engine when searching with search engine keywords. r?mak
MozReview-Commit-ID: JAK6OghsTiF
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1687,27 +1687,18 @@ file, You can obtain one at http://mozil
this.input.handleCommand(event, where, params);
]]></body>
</method>
<!-- Result listitems call this to determine which search engine they
should show in their labels and include in their url attributes. -->
<property name="overrideSearchEngineName" readonly="true">
<getter><![CDATA[
- // When building the popup, autocomplete reuses an item at index i if
- // that item's url attribute matches the controller's value at index
- // i, but only if overrideSearchEngineName matches the engine in the
- // url attribute. To absolutely avoid reusing items that shouldn't be
- // reused, always return a non-null name here by falling back to the
- // current engine.
- let engine =
- (this.oneOffSearchButtons.selectedButton &&
- this.oneOffSearchButtons.selectedButton.engine) ||
- Services.search.currentEngine;
- return engine ? engine.name : null;
+ let button = this.oneOffSearchButtons.selectedButton;
+ return button && button.engine && button.engine.name;
]]></getter>
</property>
<method name="createResultLabel">
<parameter name="item"/>
<parameter name="proposedLabel"/>
<body>
<![CDATA[