Closed
Bug 467481
Opened 16 years ago
Closed 16 years ago
"ASSERTION: What's going on?" with xul:listbox, iframe, ordinal
Categories
(Core :: XUL, defect, P2)
Core
XUL
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: roc)
References
Details
(Keywords: assertion, fixed1.9.1, testcase, Whiteboard: [sg:critical?])
Attachments
(2 files)
(deleted),
application/vnd.mozilla.xul+xml
|
Details | |
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: What's going on?: 'mInnerView', file /Users/jruderman/central/layout/generic/nsFrameFrame.cpp, line 918
###!!! ASSERTION: Shouldn't happen: 'aPresContext->GetPresShell()->GetPrimaryFrameFor(mContent) == this', file /Users/jruderman/central/layout/generic/nsFrameFrame.cpp, line 533
Comment 1•16 years ago
|
||
This is XUL bug. We're constructing two nsGridRowLeaf frames for the same listitem and for all its kids, which gives us two subdocument frames for the same content node.
Generally, that last situation is exploitable.
Group: core-security
Flags: blocking1.9.1?
Comment 2•16 years ago
|
||
That extra frame is created by nsListBoxBodyFrame::CreateRows
This is sorta like bug 433296 but not quite, since all the grid row leaves are inside the listbox body in this case in the frame tree. So I have no idea why CreateRows is trying to create stuff.
Perhaps we should disallow subdocument frames inside listboxes, until listboxes get unhorked?
Updated•16 years ago
|
Whiteboard: [sg:critical?]
Comment 3•16 years ago
|
||
Anything with ordinals makes me wonder if it's fixed by bug 431705.
Comment 4•16 years ago
|
||
Doesn't seem to be.
Assignee | ||
Updated•16 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
Comment 5•16 years ago
|
||
I can reproduce both assertions on a linux debug build; Platform --> All/All
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Comment 6•16 years ago
|
||
I think creating two frame subtrees for the same element is guaranteed to be scary even if we disallow subdocument frames in there. So I think we should try to tackle the root cause.
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → roc
Assignee | ||
Comment 7•16 years ago
|
||
I think we should just disable ordinals in listboxes, reordering of rows with ordinals isn't really compatible with the dynamic creation and destruction of row frames.
Depends on: 433296
Whiteboard: [sg:critical?] → [sg:critical?][depends on 433296]
Assignee | ||
Comment 8•16 years ago
|
||
Voila
Attachment #355942 -
Flags: superreview?(bzbarsky)
Attachment #355942 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 9•16 years ago
|
||
Oh, I really meant to attach this patch to the other bug. But it doesn't matter.
Assignee | ||
Updated•16 years ago
|
Assignee | ||
Updated•16 years ago
|
Whiteboard: [sg:critical?][depends on 433296] → [sg:critical?][needs review]
Comment 10•16 years ago
|
||
Comment on attachment 355942 [details] [diff] [review]
fix
Let's do it.
Attachment #355942 -
Flags: superreview?(bzbarsky)
Attachment #355942 -
Flags: superreview+
Attachment #355942 -
Flags: review?(bzbarsky)
Attachment #355942 -
Flags: review+
Comment 11•16 years ago
|
||
Comment on attachment 355942 [details] [diff] [review]
fix
> NS_IMETHODIMP
> nsBoxFrame::RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIBox* aChild)
> {
>+ if (!SupportsOrdinalsInChildren())
>+ return NS_OK;
As this is already virtual, it would be minusculely neater to override this in nsListBoxBodyFrame instead.
Assignee | ||
Comment 12•16 years ago
|
||
I considered that, but CheckBoxOrder still needs to be skipped, and it seemed better to me to skip both of them (and future/other code) with a single overridden function in subclasses.
But I suppose I could override SetInitialChildList *and* RelayoutChildAtOrdinal in nsListBoxBodyFrame. Boris, what do you think?
Comment 13•16 years ago
|
||
I'd be ok with that, sure. But then we have to make sure no one ever adds calls to the reordering stuff elsewhere...
Assignee | ||
Comment 14•16 years ago
|
||
The way this is currently written also makes it very easy for us to disable ordinal-reordering for children of other kinds of XUL frames. So I think overall I'll just leave it as-is.
Assignee | ||
Comment 15•16 years ago
|
||
Pushed 1da6da73561c
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [sg:critical?][needs review] → [sg:critical?][needs 191 landing]
Comment 17•16 years ago
|
||
Patch pushed to 1.9.1 branch on behalf of roc.
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/254bb9eafd97
Keywords: fixed1.9.1
Whiteboard: [sg:critical?][needs 191 landing] → [sg:critical?]
Updated•12 years ago
|
Group: core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•