• Koji Ishii's avatar
    [LayoutNG] Change list markers to out-of-flow for tree building · 0bc9ce1e
    Koji Ishii authored
    Following CL:919443, this patch implements list-item further for
    block-level content, and unifies the positioning logic with the
    logic for inline content.
    
    The anonymous blocks that wrap list markers were not easy that
    this patch changes the tree building (LayoutBlockFlow::AddChild)
    to handle LayoutNGListMarker as out-of-flow. However, setting
    the out-of-flow properties (e.g., position: absolute) affects
    many parts of the code base that it is limited only for the
    tree building purpose.
    
    Also, in order for the list item block to position its list
    marker, NGInlineLayoutAlgorithm no longer positions it. Instead,
    the |unpositioned_list_marker_| is moved to NGLayoutResult,
    which propagates from line box to the nearest list item block.
    
    Other logic are still in NGInlineLayoutAlgorithm because list
    markers forces the line box not empty.
    
    NGBoxFragmentPainter needs a minor change because by adding
    list markers to list items, it may appear along with line boxes.
    
    20 tests turned to pass, including some rebaselines for text
    rendering differences. 4 tests regressed, that are
    1. 'display: contents'; the tree building change needs to take
       this into account.
    2. When inside/outside are changed from JS, we fail to compute
       the baseline.
    I will investigate them, along with tests that still don't pass
    in following patches.
    
    Bug: 725277
    Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
    Change-Id: I09eb80b3a24a17b8841b4b200ff5d4a249c81853
    Reviewed-on: https://chromium-review.googlesource.com/925381Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
    Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
    Commit-Queue: Koji Ishii <kojii@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#539144}
    0bc9ce1e
enable-blink-features=LayoutNG 460 KB