[Webkit-unassigned] [Bug 185220] New: Floating figure using page-break-inside:avoid is cut off by column end
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 2 14:56:25 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=185220
Bug ID: 185220
Summary: Floating figure using page-break-inside:avoid is cut
off by column end
Product: WebKit
Version: Safari 11
Hardware: Unspecified
OS: macOS 10.13
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: bya at 180g.co
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
Created attachment 339348
--> https://bugs.webkit.org/attachment.cgi?id=339348&action=review
The html that exhibits the bug
The attached html includes three paragraphs of text that fills two columns. Immediately after the second paragraph is a figure that contains both an image and a caption. This figure has float:left set, so you would expect it to appear to the left of the subsequent (i.e. third) paragraph. The image, however, appears well after the end of the third (and final) paragraph. In fact, it is positioned so far down the second column that its bottom is cut off by the column, and the remainder of the image appears in a new column.
The figure has page-break-inside:avoid set so that the image and the caption are not split between columns. Commenting this line out, though, "fixes" the layout issue. Because the image is too tall to be displayed in the first column, the image is correctly displayed at the top of the second column. Furthermore, the image and the caption are in the same column, so it is (perhaps) somewhat surprising that page-break-inside:avoid would have had any effect at all.
Lastly, this incorrect layout is quite dependent upon the height of the image in the figure. In the attached html, the height of the image is set to 484. However, if that is changed to 483, then the layout issue goes away. This seems like it might be related to the height of the third paragraph's rect in the first column. Even though the height of the figure element is more than 483, changing the image's height causes it to be drawn correctly.
(Though I'm filing as Safari 11, this bug also exists in Safari Technology Preview.)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180502/14e8c65b/attachment-0001.html>
More information about the webkit-unassigned
mailing list