haikuwebkit/LayoutTests/fast/lists/list-marker-before-float-ex...

9 lines
265 B
HTML
Raw Permalink Normal View History

A floating element within <li> overlaps with the marker https://bugs.webkit.org/show_bug.cgi?id=166528 Reviewed by Zalan Bujtas. Source/WebCore: Merged from Blink (patch by trobhogan@gmail.com): https://crrev.com/c896e79e5ba348d7ed87438cd3a19d0176f3036d https://crbug.com/548616 Establish a list marker's offset before floats have been added to its line. Computing the offset for a list marker after the rest of the objects on the line it is on have been laid out, means it will avoid floats it ought not to. Instead, compute the offset when laying out the marker and cache it for use later. Tests: fast/lists/list-marker-before-float-nested-rtl.html fast/lists/list-marker-before-float-nested.html fast/lists/list-marker-before-float-rtl.html fast/lists/list-marker-before-float.html * rendering/RenderListItem.cpp: (WebCore::RenderListItem::positionListMarker): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::RenderListMarker): (WebCore::RenderListMarker::layout): * rendering/RenderListMarker.h: LayoutTests: * fast/lists/list-marker-before-float-expected.html: Added. * fast/lists/list-marker-before-float-nested-expected.html: Added. * fast/lists/list-marker-before-float-nested-rtl-expected.html: Added. * fast/lists/list-marker-before-float-nested-rtl.html: Added. * fast/lists/list-marker-before-float-nested.html: Added. * fast/lists/list-marker-before-float-rtl-expected.html: Added. * fast/lists/list-marker-before-float-rtl.html: Added. * fast/lists/list-marker-before-float.html: Added. Canonical link: https://commits.webkit.org/183799@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-03 15:02:26 +00:00
<!DOCTYPE html>
<p>webkit.org/b/166528: List markers shouldn't shift to avoid floats that come after them on a line.</p>
<ol>
<li>
<img width=20 height=20 style="background-color:black;"><img width=20 height=20 style="background-color:black;">
</li>
</ol>