• Morten Stenshorne's avatar
    [LayoutNG] Orthogonal flows need available inline size for min/max calculation. · 4049f639
    Morten Stenshorne authored
    Provide a suitable constraint space when calculating min/max inline
    sizes for an orthogonal flow root. ComputeMinMaxSize() in NGBlockNode
    typically ended up creating its zero-sized constraint space, which would
    typically result in large block sizes (since there'd e.g. only be space
    for one word per line).
    
    Set percentage resolution size too, instead of leaving it at 0x0.
    Percentages are often unresolvable (i.e. indefinite), in which case we
    should of course refrain from resolving them, rather than resolving the
    percentage against zero (which we used to do).
    
    Add a DCHECK that we're always provided with a constraint space when
    calculating min/max for orthogonal flows, as using the zero-size one
    will not produce the correct result.
    
    Bug: 848225
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
    Change-Id: Ic0aac380b2b733d3a55b25396c89584e4468899d
    Reviewed-on: https://chromium-review.googlesource.com/1090845
    Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
    Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
    Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
    Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#565446}
    4049f639
enable-blink-features=LayoutNG 87.6 KB