-
ojan@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=112652 Reviewed by Tony Chang. Source/WebCore: Tests: fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items.html fast/css-intrinsic-dimensions/intrinsic-sized-flex-items.html * platform/Length.h: (WebCore::Length::isSpecifiedOrIntrinsic): * rendering/RenderBox.cpp: (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax): (WebCore::RenderBox::computeLogicalWidthInRegion): (WebCore::RenderBox::computeLogicalWidthInRegionUsing): Pass in the Length so that RenderFlexibleBox can call this method and avoid doing a bunch of code duplication. * rendering/RenderBox.h: * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild): Instead of just calling valueForLength, call computeLogicalWidthInRegionUsing so that we properly resolve intrinsic Length types. Incidentally, this should also make viewport percentage units work. (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Resolve intrinsic min/max Lengths. Also, instead of calling minPreferredLogicalWidth for the min-width: auto case, call computeMainAxisExtentForChild to correctly compute the min intrinsic size. LayoutTests: * fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items-expected.txt: Added. * fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items.html: Added. * fast/css-intrinsic-dimensions/intrinsic-sized-flex-items-expected.txt: Added. * fast/css-intrinsic-dimensions/intrinsic-sized-flex-items.html: Added. * platform/chromium-linux/css3/flexbox/flexbox-baseline-expected.png: * platform/chromium-win/css3/flexbox/flexbox-baseline-expected.txt: This looks like a rounding difference. The new result matches the non-column result in this same test, so it looks more correct to me. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2087f498