Commit 9c0f68b1 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

blink: changes min size for webkit-box

webkit-box treats a min-size of auto as 0. This adds that logic
to FlexLayoutAlgorithm.

BUG=993813
TEST=fast/css/deprecated-flexbox-auto-min-size.html

Change-Id: I80eb42616575891d4a99450f6d1fd515ba3c39a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1799389Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695840}
parent 67cf612a
......@@ -592,6 +592,12 @@ bool FlexLayoutAlgorithm::ShouldApplyMinSizeAutoForChild(
if (!min.IsAuto())
return false;
// webkit-box treats min-size: auto as 0.
if (StyleRef().Display() == EDisplay::kWebkitBox ||
StyleRef().Display() == EDisplay::kWebkitInlineBox) {
return false;
}
return !child.ShouldApplySizeContainment() &&
!child.DisplayLockInducesSizeContainment() &&
MainAxisOverflowForChild(child) == EOverflow::kVisible;
......
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