Closed Bug 986899 Opened 6 years ago Closed 6 years ago

"ASSERTION: writing-mode mismatch" with pre-line, rtl

Categories

(Core :: Layout: Block and Inline, defect)

x86_64
macOS
defect
Not set

Tracking

()

VERIFIED FIXED
mozilla31
Tracking Status
firefox31 --- verified

People

(Reporter: jruderman, Assigned: smontagu)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, regression, testcase)

Attachments

(2 files, 1 obsolete file)

Attached file testcase
###!!! ASSERTION: writing-mode mismatch: 'aWritingMode == mWritingMode', file layout/generic/WritingModes.h
Blocks: randomstyles
The assertions here come from nsLineLayout::ApplyFrameJustification, where the PerSpanData's writing mode does not match that of the PerFrameData's bounds. Simply using the mode from mRootSpan instead of aPSD makes the assertion go away, but may not actually be correct - I haven't thought it all through at this point. This doesn't appear to break existing tests (https://tbpl.mozilla.org/?tree=Try&rev=9cca896ddd1d), but that may simply mean our test coverage is incomplete! Should we instead be explictly handling writing mode mismatches here, so as to convert coordinates if necessary?
I tested the same fix in https://tbpl.mozilla.org/?tree=Try&rev=27fe3212b2e3 :). I believe this *is* the correct fix: all of the action in ApplyFrameJustification needs to be in the inline-direction of the block, even if child spans have a different direction. Orthogonal flows are not an exception, because an inline element with a different block-flow direction from its parent automatically becomes inline-block, so it won't go through this recursive code path anyway.
By the way, I also checked that there isn't any other case in nsLineLayout where we use psd->mWritingMode for the line writing mode and psd is not the root span.
Assignee: nobody → smontagu
Attachment #8395562 - Attachment is obsolete: true
Attachment #8395711 - Flags: review?(jfkthame)
Comment on attachment 8395711 [details] [diff] [review]
Patch with testcase

Review of attachment 8395711 [details] [diff] [review]:
-----------------------------------------------------------------

Sounds good then (i.e. comment 2); thanks for checking.

BTW, when writing the check-in comment, beware of confusing mc-merge with multiple bug numbers as per bug 983691. :)
Attachment #8395711 - Flags: review?(jfkthame) → review+
https://hg.mozilla.org/mozilla-central/rev/769d7d20adf4
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Reproduced in Nightly 2014-03-24-mozilla-central-debug.
Verified fixed FF 31.0a1 Nightly 2014-03-31-mozilla-central-debug, Win 7 x64.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.