Closed Bug 1145936 Opened 10 years ago Closed 10 years ago

<foreignObject style="writing-mode: vertical-lr;" /> trips an assertion

Categories

(Core :: SVG, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: jruderman, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(4 files)

Attached image testcase (deleted) —
###!!! ASSERTION: reflow state made child wrong size: 'reflowState.ComputedWidth() == mRect.width', file layout/svg/nsSVGForeignObjectFrame.cpp, line 553
Attached file stack (deleted) —
Testcase requires: user_pref("layout.css.vertical-text.enabled", true);
It doesn't just trip an assertion, it also renders incorrectly (if there's any actual content to render).
Attachment #8582357 - Flags: review?(smontagu)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Here's a simple reftest that renders incorrectly (when writing-mode is enabled) until the bug is fixed.
Attachment #8582358 - Flags: review?(smontagu)
If the pref can be changed during a session, you can force it on for a specific reftest, like this: > pref(layout.css.vertical-text.enabled,true) == foreignObject-vertical-01.svg foreignObject-vertical-01-ref.svg
Comment on attachment 8582357 [details] [diff] [review] Fix sizing of foreignObject with vertical writing mode Review of attachment 8582357 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/svg/nsSVGForeignObjectFrame.cpp @@ +548,5 @@ > NS_ASSERTION(reflowState.ComputedPhysicalBorderPadding() == nsMargin(0, 0, 0, 0) && > reflowState.ComputedPhysicalMargin() == nsMargin(0, 0, 0, 0), > "style system should ensure that :-moz-svg-foreign-content " > "does not get styled"); > + NS_ASSERTION(reflowState.ComputedISize() == GetLogicalSize(wm).ISize(wm), reflowState.ComputedISize() == ISize(wm) @@ +553,2 @@ > "reflow state made child wrong size"); > + reflowState.SetComputedBSize(GetLogicalSize(wm).BSize(wm)); reflowState.SetComputedBSize(BSize(wm));
Attachment #8582357 - Flags: review?(smontagu) → review+
Attachment #8582358 - Flags: review?(smontagu) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: