Closed Bug 407776 Opened 17 years ago Closed 16 years ago

move code to determine height of rich autocomplete popup out of _appendCurrentResult() and into invalidate()

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3

People

(Reporter: moco, Assigned: Mardak)

References

Details

(Keywords: perf, Whiteboard: [has fix in bug 428001])

move code to determine height of rich autocomplete popup out of _appendCurrentResult() and into invalidate() 

in the review for the patch in bug #406259, gavin wrote:

>Index: toolkit/content/widgets/autocomplete.xml

>           // determine the height dynamically.  (see bug #401939)
>           if (!this._rowHeight && this.richlistbox.childNodes.length)
>             this._rowHeight = this.richlistbox.childNodes[0].boxObject.height;
> 
>           var height = this._rowHeight * rows;
>           if (this._rowHeight && this.richlistbox.height != height)
>             this.richlistbox.height = height;

Why are we running the code above each time, anyways? Seems like we could split
it out into it's own method that's called from invalidate() before calling
_appendCurrentResult, or just move it into invalidate.
note, if we get support for rows (see bug #401939) this code goes away completely.
Component: Places → Location Bar and Autocomplete
QA Contact: places → location.bar
(In reply to comment #0)
> Why are we running the code above each time, anyways?
It would be necessary to show the results on the first search because when the very first UI chunk is processed, there's no _rowHeight set. But then on the second UI chunk (even if there's nothing to append), it'll be able to use the height of the first item.
Assignee: nobody → edilee
Depends on: 428001
Whiteboard: [has fix in bug 428001]
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3
You need to log in before you can comment on or make changes to this bug.