Closed
Bug 631049
Opened 14 years ago
Closed 13 years ago
widget created for combobox in the child process in Fennec
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(fennec-)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fennec | - | --- |
People
(Reporter: azakai, Assigned: ehsan.akhgari)
References
Details
(Whiteboard: [fennec-4.1?])
Attachments
(1 file, 1 obsolete file)
1.33 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
In Fennec, we should render comboboxes and so forth in frontend code in the parent process (this is different than how desktop Firefox does things). However, it turns out we create and reflow comboboxes in platform code in the child process, which is apparently wrong. This was noticed during work on bug 610670 - the combobox does a reflow, and ends up hiding the widget that we care about in that bug. So this is both wrong and harmful.
Reporter | ||
Comment 1•14 years ago
|
||
Steps to reproduce: 1. Debug the child process in Fennec. 2. Add a break in nsComboboxControlFrame (constructor, or ::Reflow, etc.) 3. Visit http://www.google.com/m/news?q=wiki The break will be hit. Asking for blocking, since (1) this blocks a blocker (although, there is a workaround), and (2) I am guessing that fixing this would save us some memory and some code execution.
tracking-fennec: --- → ?
Comment 2•14 years ago
|
||
(In reply to comment #0) > 610670 - the combobox does a reflow, and ends up hiding the widget that we care > about in that bug. So this is both wrong and harmful. It looks like the combobox dropdown gets a widget and that is the widget that is getting hidden, not the toplevel puppet widget.
Comment 3•14 years ago
|
||
The reflow is correct, fwiw. It needs to happen to size the combobox correctly.
Is this the reason for Bug 630946?
Updated•14 years ago
|
Summary: Combobox created and reflowed in the child process in Fennec → widget created for combobox in the child process in Fennec
Comment 5•14 years ago
|
||
(In reply to comment #4) > Is this the reason for Bug 630946? No
Updated•14 years ago
|
tracking-fennec: ? → 2.0+
Comment 6•14 years ago
|
||
I think that the widget is created in nsCSSFrameConstructor::InitializeSelectFrame.
Updated•14 years ago
|
Assignee: nobody → azakai
Reporter | ||
Comment 7•14 years ago
|
||
1. This turns out to not be important for bug 610670, so it doesn't seem urgent to me anymore. 2. After more discussion with mfinkle and others, I am no longer sure if this is an actual bug. Should no popup widgets be created in the child process?
No longer blocks: 610670
Comment 8•14 years ago
|
||
(In reply to comment #7) > 2. After more discussion with mfinkle and others, I am no longer sure if this > is an actual bug. Should no popup widgets be created in the child process? Does Fennec use the created widgets? If not then they shouldn't be created.
Comment 9•14 years ago
|
||
Note that the fact that widget is eagerly created here is a bug in itself; we have that on file. It shouldn't be created until we try to open the popup (which sounds like it might be "never" in the fennec case).
Comment 10•14 years ago
|
||
(In reply to comment #9) > Note that the fact that widget is eagerly created here is a bug in itself; we > have that on file. It shouldn't be created until we try to open the popup > (which sounds like it might be "never" in the fennec case). Exactly
Updated•14 years ago
|
tracking-fennec: 2.0+ → 2.0-
Reporter | ||
Comment 11•13 years ago
|
||
So, when we create a page with a combobox, we call nsCSSFrameConstructor::ConstructSelectFrame. We then call InitializeSelectFrame with aBuildCombobox set to True. This leads to creation of a new Puppet Widget through the view's CreateWidgetForPopup. I don't see anything that looks odd, seems like creating a widget during page load here is normal. Should something else be happening - what are we trying to fix here?
Comment 12•13 years ago
|
||
That is all normal. Since in the Fennec case that widget is totally useless we should not create it. A related code cleanup task would be to only create the widget for the select on demand, ie when it needs to be shown. That would fix this bug as well.
Comment 13•13 years ago
|
||
We have an existing bug on doing that last part; it would help desktop a quite a bit too.
Reporter | ||
Comment 14•13 years ago
|
||
Got it, thanks tn and bz. bz, is the bug you meant bug 610391?
Depends on: 610391
Comment 15•13 years ago
|
||
Yes.
Reporter | ||
Comment 16•13 years ago
|
||
If we do it like this, we need to check with Camino, which also uses nsComboboxControlFrame::ToolkitHasNativePopup. This patch should help them as well, but need to verify it doesn't break things for them somehow.
Attachment #519470 -
Flags: review?(bzbarsky)
Comment 17•13 years ago
|
||
Comment on attachment 519470 [details] [diff] [review] patch This patch breaks listboxes completely (in the "always render wrong, always leak, crash if the page tries" way) when !useNativePopup. Which makes me suspect it has never been tested.
Attachment #519470 -
Flags: review?(bzbarsky) → review-
Reporter | ||
Comment 18•13 years ago
|
||
I tested it with the combobox in the web page in comment 1, and that worked. I will test on more stuff.
Reporter | ||
Comment 19•13 years ago
|
||
Sorry about the previous patch, I misunderstood something in the code, and didn't realize the patch affected listboxes as well (so I only tested on comboboxes). Here is a better version. This patch works with comboboxes and listboxes, both rendering and functionality. Only thing I didn't fully check is leaking, since checking that in a Fennec build doesn't work (we always report leaks there) - but, with this patch we report slightly fewer leaks/bloat than before (of widgets, as expected). Anything else I should check?
Attachment #519470 -
Attachment is obsolete: true
Comment 20•13 years ago
|
||
That last patch looks good. The only other thing to check is that nsComboboxControlFrame and nsListControlFrame don't assume a non-null widget. Well, and that both listbox and combobox work when !useNativePopup.
Reporter | ||
Comment 21•13 years ago
|
||
cc'ing ardissone since this might affect Camino.
Reporter | ||
Comment 22•13 years ago
|
||
Comment on attachment 519498 [details] [diff] [review] patch v2 This looks good on try for desktop, and for fennec I don't see any dangerous places in the code where a widget is assumed to exist (in fact, ToolkitHasNativePopup is used in the right places for that already), so asking for review.
Attachment #519498 -
Flags: review?(bzbarsky)
Comment 23•13 years ago
|
||
Comment on attachment 519498 [details] [diff] [review] patch v2 This looks fine, but the patch in bug 610391 removes this code altogether. Will ehsan's new code just not get hit in fennec, or does it need to be modified somehow? Please talk to him.
Attachment #519498 -
Flags: review?(bzbarsky) → review+
Updated•13 years ago
|
Whiteboard: [fennec-4.1?]
Assignee | ||
Comment 24•13 years ago
|
||
Hmm, which process is the ShowList call run in on Fennec? If it's run in the content process, then I guess this is WFM based on the patch in bug 610391.
Reporter | ||
Comment 25•13 years ago
|
||
(In reply to comment #24) > Hmm, which process is the ShowList call run in on Fennec? If it's run in the > content process, then I guess this is WFM based on the patch in bug 610391. Yes, this stuff is done in the content process. And I checked now, it does indeed work as you said - no widget is created either on load or when it is clicked. Turns out this is because ShowList isn't called in Fennec at all (that stuff is done in Fennec frontend code). So bug 610391 indeed fixes this one, hurray :)
Assignee: azakai → nobody
Whiteboard: [fennec-4.1?] → [fennec-4.1?] fixed-in-birch
Assignee | ||
Comment 26•13 years ago
|
||
I love it when bugs fix themselves. ;-)
Assignee: nobody → ehsan
Whiteboard: [fennec-4.1?] fixed-in-birch → [fennec-4.1?][fixed-in-birch][fixed by bug 610391]
Assignee | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fennec-4.1?][fixed-in-birch][fixed by bug 610391] → [fennec-4.1?]
You need to log in
before you can comment on or make changes to this bug.
Description
•