Bug 405235: search bar autocomplete doesn't appear unless content autocomplete has been used (don't rely on openAutocompletePopup to unhide the autocomplete panel), r=sspitzer

This commit is contained in:
gavin@gavinsharp.com 2007-12-04 10:37:21 -08:00
parent 688029611b
commit 57e643f3cb
2 changed files with 19 additions and 57 deletions

View File

@ -268,19 +268,12 @@
<binding id="urlbar-result-popup" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-result-popup">
<implementation>
<method name="openAutocompletePopup">
<parameter name="aInput"/>
<parameter name="aElement"/>
<body>
<![CDATA[
// initially the panel is hidden
// to avoid impacting startup / new window performance
aInput.popup.hidden = false;
// this method is defined on the base binding
this._openAutocompletePopup(aInput, aElement);
]]></body>
</method>
<constructor>
// This panel is hidden initially to reduce startup costs. This binding
// won't be attached until this panel is accessed (via xpconnect or
// otherwise), so we can unhide it here.
this.hidden = false;
</constructor>
<method name="onPopupClick">
<parameter name="aEvent"/>
@ -311,13 +304,20 @@
controller.handleEnter();
}
}
]]></body>
</method>
</implementation>
</binding>
]]></body>
</method>
</implementation>
</binding>
<binding id="urlbar-rich-result-popup" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-rich-result-popup">
<implementation>
<constructor>
// This panel is hidden initially to reduce startup costs. This binding
// won't be attached until this panel is accessed (via xpconnect or
// otherwise), so we can unhide it here.
this.hidden = false;
</constructor>
<binding id="urlbar-rich-result-popup" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-rich-result-popup">
<implementation>
<field name="_maxResults">0</field>
<property name="maxResults" readonly="true">
@ -334,20 +334,6 @@
</getter>
</property>
<method name="openAutocompletePopup">
<parameter name="aInput"/>
<parameter name="aElement"/>
<body>
<![CDATA[
// initially the panel is hidden
// to avoid impacting startup / new window performance
aInput.popup.hidden = false;
// this method is defined on the base binding
this._openAutocompletePopup(aInput, aElement);
]]></body>
</method>
<method name="onPopupClick">
<parameter name="aEvent"/>
<body>

View File

@ -642,17 +642,6 @@
</method>
<method name="openAutocompletePopup">
<parameter name="aInput"/>
<parameter name="aElement"/>
<body><![CDATA[
// until we have "baseBinding", (see bug #373652) this allows
// us to override openAutocompletePopup(), but still call
// the method on the base class
this._openAutocompletePopup(aInput, aElement);
]]></body>
</method>
<method name="_openAutocompletePopup">
<parameter name="aInput"/>
<parameter name="aElement"/>
<body><![CDATA[
@ -862,19 +851,6 @@
</property>
<method name="openAutocompletePopup">
<parameter name="aInput"/>
<parameter name="aElement"/>
<body>
<![CDATA[
// until we have "baseBinding", (see bug #373652) this allows
// us to override openAutocompletePopup(), but still call
// the method on the base class
this._openAutocompletePopup(aInput, aElement);
]]>
</body>
</method>
<method name="_openAutocompletePopup">
<parameter name="aInput"/>
<parameter name="aElement"/>
<body>