• David Grogan's avatar
    [css-flex] Respect aspect ratio when determining cross size · a02c341b
    David Grogan authored
    Previously, if a 300x300 flex item got a 700 main size after flexing,
    we'd assign a 300px cross size. LayoutReplaced doesn't pass the flexed
    size (delivered in one of the Override sizes) through the aspect ratio,
    so just add this logic directly in flex.
    
    There's a regression, external/wpt/css/css-flexbox/align-items-007.html
    that we'll have to fix before shipping, but I suspect the new behavior
    might be right.
    
    This CL adds a blink runtime flag, FlexAspectRatio, because this is the
    first of a few aspect ratio fixes I want to ship at the same time. The
    flag is set to experimental: enable-experimental-web-platform-features
    users will see this fix in Canary right away. I will set the flag to
    stable probably in time for M87.
    
    Bug: 721123
    Change-Id: Ie01f8da1a95eb940f20ba3e9bbf960bd4624c71b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333530
    Commit-Queue: David Grogan <dgrogan@chromium.org>
    Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#795227}
    a02c341b
flexitem.html 10.6 KB