Closed
Bug 610391
Opened 14 years ago
Closed 14 years ago
Don't eagerly create widgets for combobox dropdowns
Categories
(Core :: Layout: Form Controls, defect, P1)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: bzbarsky, Assigned: ehsan.akhgari)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
And in fact, we should create them when showing the dropdown, and tear them down when hiding the dropdown.
Ehsan, please feel free to steal!
Reporter | ||
Updated•14 years ago
|
Priority: P2 → P1
Updated•14 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Comment 1•14 years ago
|
||
You asked for it! ;-)
But I'm not sure if I can actually work on this before 2.0...
Assignee: bzbarsky → ehsan
Keywords: perf
Reporter | ||
Comment 2•14 years ago
|
||
I think this is a post-2.0 project.
Assignee | ||
Updated•14 years ago
|
Whiteboard: [post-2.0]
Assignee | ||
Comment 3•14 years ago
|
||
Is this about the widget created in nsCSSFrameConstructor::InitializeSelectFrame?
Comment 4•14 years ago
|
||
Yes.
Assignee | ||
Comment 5•14 years ago
|
||
This was much easier than I thought, which makes me think that I might have missed something! :-)
Attachment #520103 -
Flags: review?(roc)
I think it would be slightly cleaner to put widget creation in ShowList alongside the destruction code.
Assignee | ||
Comment 7•14 years ago
|
||
Done.
Attachment #520103 -
Attachment is obsolete: true
Attachment #520257 -
Flags: review?(roc)
Attachment #520103 -
Flags: review?(roc)
Comment 8•14 years ago
|
||
Ehsan, in bug 631049 we are trying to prevent a widget ever being created for combobox dropdowns, for Fennec and Camino (which don't need such widgets). bz pointed me to your patch here, which removes the code changed in my patch there. Reading it now, I think the simplest thing would be to just change a single line in your patch and fix both bugs at once. Specifically, if
+ if (aShowList) {
were
+ if (aShowList && !nsComboboxControlFrame::ToolkitHasNativePopup()) {
then the widget will not be created if not needed (ToolkitHasNativePopup is true only on Fennec and Camino). What do you think?
Assignee | ||
Comment 9•14 years ago
|
||
(In reply to comment #8)
> Ehsan, in bug 631049 we are trying to prevent a widget ever being created for
> combobox dropdowns, for Fennec and Camino (which don't need such widgets). bz
> pointed me to your patch here, which removes the code changed in my patch
> there. Reading it now, I think the simplest thing would be to just change a
> single line in your patch and fix both bugs at once. Specifically, if
>
> + if (aShowList) {
>
> were
>
> + if (aShowList && !nsComboboxControlFrame::ToolkitHasNativePopup()) {
>
> then the widget will not be created if not needed (ToolkitHasNativePopup is
> true only on Fennec and Camino). What do you think?
I'm usually a fan of smaller bugs, so I'd rather do that in bug 631049. I'm happy to own that bug too if you want me to (since I was the one who stepped on your toes there). :-)
Comment 10•14 years ago
|
||
Ok, as discussed on IRC I'll make the patch in the other bug fit on top of this one.
As I was doing that I noticed that the patch here doesn't compile - nsComboboxControlFrame::ShowList uses view and viewManager which are not defined.
Assignee | ||
Comment 11•14 years ago
|
||
I guess code being compiled is a prerequisite for what we accept on m-c. This patch meets that criteria at least! ;-)
Attachment #520257 -
Attachment is obsolete: true
Attachment #520332 -
Flags: review?(roc)
Attachment #520257 -
Flags: review?(roc)
Attachment #520332 -
Flags: review?(roc) → review+
Assignee | ||
Comment 12•14 years ago
|
||
Whiteboard: [post-2.0] → fixed-in-birch
Assignee | ||
Comment 13•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-birch
Assignee | ||
Updated•14 years ago
|
Target Milestone: Future → mozilla5
You need to log in
before you can comment on or make changes to this bug.
Description
•