[css-flex] Fix bug in deriving min-height:auto for aspect ratio items
When deriving the content size suggestion we need to account for the aspect ratio and any definite cross axis size. In the code that does this we were using the flex basis instead of the cross axis size. This fixes two tests that were marked as failing. Change-Id: Ifcdd57434944f884a5c6b1c0dae68efa7e1bba6e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490227 Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Commit-Queue: David Grogan <dgrogan@chromium.org> Cr-Commit-Position: refs/heads/master@{#820522}
This commit is contained in:
third_party/blink
renderer
core
layout
web_tests
@ -777,10 +777,10 @@ void NGFlexLayoutAlgorithm::ConstructAndAppendFlexItems() {
|
||||
RuntimeEnabledFeatures::FlexAspectRatioEnabled()) {
|
||||
base::Optional<LayoutUnit> definite_inline_size;
|
||||
if (!child_style.LogicalWidth().IsAuto()) {
|
||||
definite_inline_size =
|
||||
ResolveMainInlineLength(flex_basis_space, child_style,
|
||||
border_padding_in_child_writing_mode,
|
||||
MinMaxSizesFunc, length_to_resolve);
|
||||
definite_inline_size = ResolveMainInlineLength(
|
||||
flex_basis_space, child_style,
|
||||
border_padding_in_child_writing_mode, MinMaxSizesFunc,
|
||||
child_style.LogicalWidth());
|
||||
}
|
||||
intrinsic_block_size =
|
||||
ComputeIntrinsicBlockSizeForAspectRatioElement(
|
||||
|
@ -548,6 +548,8 @@ crbug.com/987000 external/wpt/css/css-flexbox/flex-aspect-ratio-img-row-010.html
|
||||
crbug.com/987000 external/wpt/css/css-flexbox/flex-aspect-ratio-img-column-012.html [ Failure ]
|
||||
crbug.com/987000 external/wpt/css/css-flexbox/flex-aspect-ratio-img-column-015.html [ Failure ]
|
||||
crbug.com/987000 external/wpt/css/css-flexbox/svg-root-as-flex-item-002.html [ Failure ]
|
||||
crbug.com/553838 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-height-auto-002a.html [ Failure ]
|
||||
crbug.com/553838 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-height-auto-002c.html [ Failure ]
|
||||
|
||||
# These would need a rebaseline back from LayoutNGBlockFlow to LayoutBlockFlow
|
||||
crbug.com/864567 paint/float/float-under-inline-self-painting-change.html [ Failure ]
|
||||
|
3
third_party/blink/web_tests/TestExpectations
vendored
3
third_party/blink/web_tests/TestExpectations
vendored
@ -799,9 +799,6 @@ crbug.com/336604 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftest
|
||||
crbug.com/336604 external/wpt/css/css-flexbox/flexbox_visibility-collapse-line-wrapping.html [ Failure ]
|
||||
crbug.com/336604 external/wpt/css/css-flexbox/flexbox_visibility-collapse.html [ Failure ]
|
||||
|
||||
# These tests are incorrect, as Firefox has a bug in this area. https://bugzilla.mozilla.org/show_bug.cgi?id=1136312
|
||||
crbug.com/553838 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-height-auto-002a.html [ Failure ]
|
||||
crbug.com/553838 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-height-auto-002c.html [ Failure ]
|
||||
crbug.com/553838 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-width-auto-002a.html [ Failure ]
|
||||
crbug.com/553838 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-width-auto-002c.html [ Failure ]
|
||||
|
||||
|
Reference in New Issue
Block a user