Closed
Bug 536623
Opened 15 years ago
Closed 15 years ago
"ASSERTION: SetMayHaveFrame failed?" with XBL, xul:label, table, wrapping
Categories
(Core :: XBL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: bzbarsky)
References
Details
(Keywords: assertion, testcase, verified1.9.2)
Attachments
(3 files, 1 obsolete file)
956 bytes,
application/xhtml+xml
|
Details | |
8.14 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
6.98 KB,
patch
|
christian
:
approval1.9.2.4-
dveditz
:
approval1.9.2.7+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: SetMayHaveFrame failed?: 'mContent->MayHaveFrame()', file /Users/jruderman/mozilla-central/layout/generic/nsFrame.cpp, line 343
Assignee | ||
Comment 1•15 years ago
|
||
Gah. This is the usual crap where a textnode has no parent and is getting a frame created for it...
Assignee | ||
Comment 2•15 years ago
|
||
And in particular, we have an nsXULLabelFrame whose first child is an nsTextFrame, whose textnode content has a null parent. This textframe has the text "1 2 3" and we're creating a continuation for it while reflowing the parent block.
Assignee | ||
Comment 3•15 years ago
|
||
And _that_ happens because when we go to remove the frames for the "1 2 3" text on the removeAttribute call there are actually two frames for it in the frame tree.
Assignee | ||
Comment 4•15 years ago
|
||
OK. So the setAttribute tries to construct a textframe child of the table, which just reframes the table (already risky, since that table is anonymous, but maybe not too bad since it's at least xbl-bound anonymous).
When we go to create the frame for that table, we somehow end up creating two textframes for that text content. Looking into why.
Assignee | ||
Comment 5•15 years ago
|
||
Aha! When reconstructing the <table> via ContentInserted, we do AddTextItemIfNeeded, and since aIndexInContainer there is -1, we pass 0 as the index to it. That constructs a frame for the textnode, which is in fact a child of the <label>, and the only child (hence at position 0).
We could fix this particular case by not calling AddTextItemIfNeeded if the index is -1. But I think calling AddTextItemIfNeeded in cases when the parent has an XBL-bound child list is just generally wrong (or alternately, that AddTextItemIfNeeded needs to do that check). The textframe could be suppressed for other XBL reasons (e.g. its parent node could be an anonymous <html:colgroup>), and then we'd construct it in the wrong place in the frame tree even in cases where non-anonymous content is being inserted. Since cases when the parent has an XBL-bound child list don't suppress textframes to start with, skipping AddTextFrameIfNeeded in those cases would be safe, I think.
roc, does that make sense?
Yes.
Assignee | ||
Comment 7•15 years ago
|
||
roc, we need to get this in on 1.9.2 as well, right? (Possibly minus the additional asserts I added.)
Comment on attachment 419465 [details] [diff] [review]
Fix
Yes.
Attachment #419465 -
Flags: review?(roc) → review+
Assignee | ||
Comment 9•15 years ago
|
||
Flags: in-testsuite+
Assignee | ||
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•15 years ago
|
||
Attachment #419692 -
Flags: approval1.9.2.1?
Assignee | ||
Updated•15 years ago
|
status1.9.2:
--- → ?
Assignee | ||
Comment 11•15 years ago
|
||
Attachment #419692 -
Attachment is obsolete: true
Attachment #423355 -
Flags: approval1.9.2.1?
Attachment #419692 -
Flags: approval1.9.2.1?
Assignee | ||
Updated•15 years ago
|
blocking1.9.2: --- → ?
Updated•15 years ago
|
blocking1.9.2: ? → -
Updated•15 years ago
|
Attachment #423355 -
Flags: approval1.9.2.2? → approval1.9.2.3?
Comment 12•15 years ago
|
||
Comment on attachment 423355 [details] [diff] [review]
1.9.2 merge that compiles in a debug build too (removed two asserts)
Didn't make 1.9.2.2, would like to take it in .3 - moving flag forward.
Comment 13•15 years ago
|
||
Comment on attachment 423355 [details] [diff] [review]
1.9.2 merge that compiles in a debug build too (removed two asserts)
a=LegNeato for 1.9.2.5. Please *only* land it on mozilla-1.9.2 default, as we are still working on the 3.6.4 relbranch and do not want this landed there
Attachment #423355 -
Flags: approval1.9.2.5+
Attachment #423355 -
Flags: approval1.9.2.4?
Attachment #423355 -
Flags: approval1.9.2.4-
Assignee | ||
Comment 14•14 years ago
|
||
Updated•14 years ago
|
Attachment #423355 -
Flags: approval1.9.2.5+ → approval1.9.2.6+
Comment 15•14 years ago
|
||
I just ran this in my nightly 1.9.2 build from the other day on Windows XP (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6pre) Gecko/20100624 Namoroka/3.6.6pre ( .NET CLR 3.5.30729)).
When I run the attached testcase, I got a crash the first time which I didn't catch.
Subsequent runs, I get the original assert:
###!!! ASSERTION: SetMayHaveFrame failed?: 'mContent->MayHaveFrame()', file c:/projects/moz1.9.2/layout/generic/nsFrame.cpp, line 347
###!!! ASSERTION: SetMayHaveFrame failed?: 'mContent->MayHaveFrame()', file c:/projects/moz1.9.2/layout/generic/nsFrame.cpp, line 347
Is this meant to only be fixed on OS X and not on Windows?
Assignee | ||
Comment 16•14 years ago
|
||
This is expected to be fixed for all OSes. What's the revision id for the build mentioned in comment 15?
Assignee | ||
Comment 17•14 years ago
|
||
I just retested on Linux, and don't see the assertions there either...
Comment 18•14 years ago
|
||
It's me. I completely screwed up which build I was using due to innate stupidity. I'm rebuilding now after blowing away my debug directory. Sorry about that.
Comment 19•14 years ago
|
||
It looks to be fixed. The only thing I see in my OS X debug build from the other day (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.6pre) Gecko/20100622 Namoroka/3.6.6pre) is:
WARNING: NS_ENSURE_TRUE(globalObject) failed: file /Users/albill/mozilla-192/content/base/src/nsDocument.cpp, line 6472
Updated•14 years ago
|
Keywords: verified1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•