• Morten Stenshorne's avatar
    [LayoutNG] Don't update a block's intrinsic block size prematurely. · 103877dd
    Morten Stenshorne authored
    Assuming that every child block end offset contribute to intrinsic block
    size of the container is wrong. There may be negative margins.
    Calculate it after child layout, rather than during child layout for
    each in-flow child.
    
    Some extra care was required for NG block fragmentation, because there
    was code that updated (and checked) the intrinsic size rather than
    logical block offset. Using intrinsic size will no longer get us
    anywhere, since it's now only updated at the end of container layout,
    not during child layout.
    
    Move the initialization of intrinsic block size (set to content edge)
    after layout instead of before layout, to reduce variable span. We may
    eventually want to change it to a local variable instead of a member.
    
    Fixes 9 tests, 7 of which were not marked as failing, but rather had
    incorrect NG-specific baselines. Also wrote 2 new tests that test this
    fix a bit more directly.
    
    Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
    Change-Id: Id57ba18b70f0cc8569deeff63fa5547cb8c44c98
    Reviewed-on: https://chromium-review.googlesource.com/1100473Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
    Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#567429}
    103877dd
enable-blink-features=LayoutNG 82.6 KB