Closed Bug 366967 Opened 17 years ago Closed 17 years ago

[FIX]"ASSERTION: aPrevFrame must be the last continuation in its chain!" involving rtl, float, :after, :first-letter

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: assertion, rtl, testcase)

Attachments

(2 files)

Attached file testcase
###!!! ASSERTION: aPrevFrame must be the last continuation in its chain!: '!aPrevFrame || !aPrevFrame->GetNextContinuation()', file /Users/admin/trunk/mozilla/layout/base/nsFrameManager.cpp, line 693
I suspect the trouble here starts way before bidi kicks in.
Specifically, I see a first-letter frame created for the text following the float (even if it's normal text, not the product of ":after"), when changing the overflow style of the float. This seems wrong, although usually it's harmless.

But after spending some time with the first-letter code in nsCSSFrameConstructor, I give up (for now, at least).
So I don't know whether this is relevant to first-letter, but the assert fires because of:

(gdb) frame
#1  0x078059f1 in nsCSSFrameConstructor::AppendFrames (this=0x40b33830, aState=@0xbfffc640, aContainer=0x40b795a0, aParentFrame=0x24b1830, aFrameList=0x24b6e20, aAfterFrame=0x24b19b0) at ../../../mozilla/layout/base/nsCSSFrameConstructor.cpp:7819
7819                                          aFrameList);
(gdb) p frames.GetPrevSiblingFor(aAfterFrame)
$21 = (nsInlineFrame *) 0x24b6dc0
(gdb) p aAfterFrame->GetPrevContinuation()
$22 = (nsInlineFrame *) 0x24b6dc0
(gdb) p aAfterFrame->GetPrevContinuation()->GetNextContinuation()
$23 = (nsInlineFrame *) 0x24b19b0
(gdb) p aAfterFrame->GetPrevContinuation()->GetNextSibling()
$24 = (nsInlineFrame *) 0x24b19b0
(gdb) p aAfterFrame  
$25 = (nsInlineFrame *) 0x24b19b0

so the sibling chain is broken -- the next continuation shouldn't also be the next sibling.
This is a regression from bug 299065 -- code is looking at in-flows when it should now be looking at continuations.
Blocks: 299065
Attached patch Proposed fixSplinter Review
Attachment #251681 - Flags: superreview?(roc)
Attachment #251681 - Flags: review?(uriber)
Assignee: nobody → bzbarsky
OS: Mac OS X → All
Hardware: Macintosh → All
Summary: "ASSERTION: aPrevFrame must be the last continuation in its chain!" involving rtl, float, :after, :first-letter → [FIX]"ASSERTION: aPrevFrame must be the last continuation in its chain!" involving rtl, float, :after, :first-letter
Target Milestone: --- → mozilla1.9alpha
Attachment #251681 - Flags: superreview?(roc) → superreview+
Comment on attachment 251681 [details] [diff] [review]
Proposed fix

Looks good.
Attachment #251681 - Flags: review?(uriber) → review+
Fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Crashtest checked in.
Flags: in-testsuite+
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: