• David Grogan's avatar
    [css-flex] Fix flex base size for some aspect ratio items · 9016b6b0
    David Grogan authored
    Old behavior: Use max content contribution for flex base size, which is
    roughly: use computed width if it exists, otherwise use intrinsic size
    after applying the aspect ratio and min/main/max height. In either
    case, apply min/max width.
    
    New behavior is similar to the 'max-content' size: use the intrinsic
    width after applying the aspect ratio and min/main/max height. Ignore
    computed min/main/max width.
    
    Also, we weren't returning available size as the max-content size of an
    SVG item that only has an aspect ratio and no intrinsic sizes, which is
    what Firefox does and what the spec dictates.
    
    Both of these are fixed with a new aspect-ratio sizing method that
    currently lives in flex but will be moved to NGReplacedLayoutAlgorithm
    when it exists.
    
    Change-Id: I4afb382a7604a4fcd0626f0702edf72f21cd0bcc
    Bug: 987000
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399082Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
    Commit-Queue: David Grogan <dgrogan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#809430}
    9016b6b0
disable-layout-ng 51.2 KB