Index: toolkit/content/widgets/autocomplete.xml
===================================================================
RCS file: /cvsroot/mozilla/toolkit/content/widgets/autocomplete.xml,v
retrieving revision 1.62
diff -u -p -8 -r1.62 autocomplete.xml
--- toolkit/content/widgets/autocomplete.xml 12 Jun 2006 17:49:06 -0000 1.62
+++ toolkit/content/widgets/autocomplete.xml 15 Jun 2006 18:41:12 -0000
@@ -168,29 +168,16 @@
<property name="consumeRollupEvent" readonly="true"
onget="return this.mConsumeRollupEvent;"/>
<!-- This is the maximum number of drop-down rows we get when we
hit the drop marker beside fields that have it (like the URLbar).-->
<field name="maxDropMarkerRows" readonly="true">14</field>
- <!-- When displaying the dropmarker-triggered popup, we need to
- set the maxRows property to maxDropMarkerRows, so we cache
- the normal maxRows value here while that version of the
- popup is open, and restore it when we're done.
-
- This is so that we can have more rows to show previously-typed
- URLs than when we're just autocompleting URLs from history.
-
- This field is set to -1 between uses so that we can tell
- when it's been set by showHistoryPopup and when we need to
- set it in the popupshowing handler. -->
- <field name="_normalMaxRows">-1</field>
-
<method name="getSearchAt">
<parameter name="aIndex"/>
<body><![CDATA[
this.initSearchNames();
return this.mSearchNames[aIndex];
]]></body>
</method>
@@ -351,17 +338,17 @@
<body><![CDATA[
this.mConsumeRollupEvent = false;
this.popup.closePopup();
]]></body>
</method>
<method name="showHistoryPopup">
<body><![CDATA[
- this._normalMaxRows = this.maxRows;
+ this.popup._normalMaxRows = this.maxRows;
this.maxRows = this.maxDropMarkerRows;
// Ensure that we have focus.
if (!this.focused)
this.focus();
this.mConsumeRollupEvent = true;
this.attachController();
this.mController.startSearch("");
]]></body>
@@ -663,16 +650,29 @@
]]></setter>
</property>
<!-- This is the default number of rows that we give the autocomplete
popup when the textbox doesn't have a "maxrows" attribute
for us to use. -->
<field name="defaultMaxRows" readonly="true">6</field>
+ <!-- When displaying the dropmarker-triggered popup, we need to
+ set the maxRows property to maxDropMarkerRows, so we cache
+ the normal maxRows value here while that version of the
+ popup is open, and restore it when we're done.
+
+ This is so that we can have more rows to show previously-typed
+ URLs than when we're just autocompleting URLs from history.
+
+ This field is set to -1 between uses so that we can tell
+ when it's been set by showHistoryPopup and when we need to
+ set it in the popupshowing handler. -->
+ <field name="_normalMaxRows">-1</field>
+
<property name="maxRows" readonly="true">
<getter><![CDATA[
return (this.mInput && this.mInput.maxRows) || this.defaultMaxRows;
]]></getter>
</property>
<property name="showCommentColumn"
onget="return this.mShowCommentColumn;">
@@ -764,25 +764,25 @@
controller.handleEnter();
]]></body>
</method>
</implementation>
<handlers>
<handler event="popupshowing"><![CDATA[
- if (this.mInput._normalMaxRows < 0)
- this.mInput._normalMaxRows = this.mInput.maxRows;
+ if (this._normalMaxRows < 0)
+ this._normalMaxRows = this.mInput.maxRows;
this.mPopupOpen = true;
]]></handler>
<handler event="popuphiding">
this.mPopupOpen = false;
- this.mInput.maxRows = this.mInput._normalMaxRows;
- this.mInput._normalMaxRows = -1;
+ this.mInput.maxRows = this._normalMaxRows;
+ this._normalMaxRows = -1;
</handler>
</handlers>
</binding>
<binding id="autocomplete-tree" extends="chrome://global/content/bindings/tree.xml#tree">
<content>
<children includes="treecols"/>
<xul:treerows class="autocomplete-treerows tree-rows" xbl:inherits="hidescrollbar" flex="1">