Open Bug 1751260 Opened 2 years ago Updated 1 year ago

Fix image frame's fragmentation for vertical writing-mode

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect

Tracking

()

People

(Reporter: TYLin, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

While working on bug 1748277, I add an assertion to assert the completeness of nsMathMLTokenFrame's children, and it bumps the assertion count.

The root cause is that nsImageFrame::Reflow [1] doesn't consider vertical writing-mode when fragmenting images, so we should rewrite it by using logical coordinates.

[1] https://searchfox.org/mozilla-central/rev/8012bca692dddb307c2787bac1d4dd48cb0d8243/layout/generic/nsImageFrame.cpp#1265-1275

Attached file testcase 1

Note that with layout.display-list.improve-fragmentation enabled by default, we currently can already fragment images in vertical writing-mode in printing. (Hence lower the severity to S4.)

Converting nsImageFrame::Reflow() code to logical coordinates is probably not sufficient. Some callers in image painting related code use nsImageFrame::GetContinuationOffset() to calculate the consumed height from previous continuations. It won't work in the vertical writing-modes. nsSplittableFrame::CalcAndCacheConsumedBSize() should be used instead.

Severity: S3 → S4
See Also: → 1805522

This is the screenshot of https://bug1805522.bmoattachments.org/attachment.cgi?id=9308103 (Note: the browser will crash without the fix in bug 1805522.)

The image doesn't render correctly. There should be only one asterisk.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: