Open Bug 367251 Opened 18 years ago Updated 2 years ago

XBL confuses CSS quotes nesting, "ASSERTION: same content, different frames"

Categories

(Core :: CSS Parsing and Computation, defect)

PowerPC
macOS
defect

Tracking

()

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: assertion, testcase)

Attachments

(1 file)

478 bytes, application/xhtml+xml
Details
Attached file testcase
This testcase triggers two assertions:

###!!! ASSERTION: same content, different frames: 'cmp != 0', file /Users/admin/trunk/mozilla/layout/base/nsGenConList.cpp, line 139

###!!! ASSERTION: sorting error: 'IsLast(aNode) || NodeAfter(Next(aNode), aNode)', file /Users/admin/trunk/mozilla/layout/base/nsGenConList.cpp, line 197

Also:
* The inner quote is a double-quote and should probably be a single-quote.
* Sometimes, the entire outer quote disappears.  (That might be a separate bug.)
The problem is this code in nsLayoutUtils::DoCompareTreePosition:

356     // one of them must be anonymous; we can't determine the order
357     return 0;

Also note the comment in nsGenConList::NodeAfter:

137   // XXX Switch to the frame version of DoCompareTreePosition?

which would in fact not have these issues...

That said, we should consider fixing the content version of DoCompareTreePosition to work with XBL...
Flags: blocking1.9?
I just landed the frame version of DoCompareTreePosition. We should probably just use that until we find a real need for XBL-aware content tree position comparison.
Using the frame version of DoCompareTreePosition doesn't work, since we're in the process of constructing one or more of the frames in question, so it's not in the tree yet.  When I try using the frame method, I get:

WARNING: Frames were in different child lists???: file ../../../mozilla/layout/base/nsLayoutUtils.cpp, line 449
###!!! ASSERTION: same content, different frames?: 'cmp != 0', file ../../../mozilla/layout/base/nsGenConList.cpp, line 139

which is not surprising because the two frames have different parents, which are both kids of the same thing but both have null GetNextSibling().
I suppose we could just put the quote node into the frame ctor state and handle inserting all the gen con nodes once we've processed all the frame insertions or something....
Flags: blocking1.9? → blocking1.9-
Assignee: dbaron → nobody
QA Contact: ian → style-system
I still see this bug on trunk.  (Tested on Mac.)
Still happens on trunk.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: