[LayoutNG] Fix list marker positioning when the first child is block
This patch fixes list marker positioning when the first child of the list item is block-level, and the child does not produce a baseline. Before this patch, list marker is positioned at the synthesized baseline. This is not well-defined, but 3 browsers positions the list marker at the first child that has a baseline. This is filed to CSS WG at https://github.com/w3c/csswg-drafts/issues/2417. By doing so, a new case appears where there are no children that has a baseline. This case is also not well-defined and non- interoperable. Blink/Edge/WebKit creates an empty line box in this case, but this isn't easy as we have to insert an empty line box before the children we have already laid out. This patch follows Gecko behavior to position the list marker at the top of the list item. Also, whether list marker should affect block size or not is not defined and not interoperable. For now, this patch includes the list marker block size into list item's block size because it looks more reasonable to me, and Blink/Edge/WebKit do so. This is filed as: https://github.com/w3c/csswg-drafts/issues/2418 SetListMarkerPosition() is a left over in the last patch and therefore this patch removed it. Some tests turn to good, though they need to rebaseline due to list marker image differences. Bug: 725277 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: If47ab7daea214c0593a917a0c8f505274dae5ca2 Reviewed-on: https://chromium-review.googlesource.com/952843 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#541864}
Showing
Please register or sign in to comment