Commit 80f835c7 authored by Christian Biesinger's avatar Christian Biesinger Committed by Commit Bot

[AspectRatio] Legacy should look at override block size

So that the inline size gets correctly calculated inside a flex box.

R=ikilpatrick@chromium.org, mstensho@chromium.org

Bug: 1083010
Change-Id: Idcdab256e134dfe2c344ee94a27d24e287d0a085
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442629
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812771}
parent e3a0e671
......@@ -3836,10 +3836,13 @@ LayoutUnit LayoutBox::ContainerWidthInInlineDirection() const {
bool LayoutBox::ShouldComputeLogicalWidthFromAspectRatio(
LayoutUnit* out_logical_height) const {
NOT_DESTROYED();
if (!ShouldComputeLogicalWidthFromAspectRatioAndInsets() &&
(StyleRef().AspectRatio().IsAuto() ||
(!StyleRef().LogicalHeight().IsFixed() &&
!StyleRef().LogicalHeight().IsPercentOrCalc()))) {
if (StyleRef().AspectRatio().IsAuto())
return false;
if (!HasOverrideLogicalHeight() &&
!ShouldComputeLogicalWidthFromAspectRatioAndInsets() &&
!StyleRef().LogicalHeight().IsFixed() &&
!StyleRef().LogicalHeight().IsPercentOrCalc()) {
return false;
}
......
......@@ -121,8 +121,6 @@ crbug.com/591099 external/wpt/css/css-shapes/shape-outside/supported-shapes/poly
crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/abspos-013.tentative.html [ Pass ]
crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/block-aspect-ratio-024.tentative.html [ Failure ]
crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/block-aspect-ratio-028.tentative.html [ Failure ]
crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/flex-aspect-ratio-009.tentative.html [ Failure ]
crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/flex-aspect-ratio-014.tentative.html [ Failure ]
crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/percentage-resolution-002.tentative.html [ Failure ]
crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/quirks-mode-001.tentative.html [ Failure ]
crbug.com/591099 external/wpt/css/css-sizing/clone-nowrap-intrinsic-size-bidi.html [ Failure ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment