flexbox flexing implementation should match the spec
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 21:45:58 +0000 (21:45 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 21:45:58 +0000 (21:45 +0000)
commit52f0b6e024a7521c26424346c0afb2221ebbe4d6
treeefc17bdad0237d0ea3c94d2b5e3255054d42de17
parent677ae9d988aa5584cb8de8cfa35589c0cf388d0d
flexbox flexing implementation should match the spec
https://bugs.webkit.org/show_bug.cgi?id=70796

Reviewed by Ojan Vafai.

Source/WebCore:

Match the algorithm in the spec. Handling min/max constraints are slightly improved.
http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths

New test cases in css3/flexbox/flex-algorithm-min-max.html.

* rendering/RenderFlexibleBox.cpp:
(WebCore::adjustFlexSizeForMinAndMax): Step 5 of resolving flexible lengths.
(WebCore):
(WebCore::RenderFlexibleBox::Violation::Violation):
(RenderFlexibleBox::Violation):
(WebCore::RenderFlexibleBox::freezeViolations): Used by step 6.
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
* rendering/RenderFlexibleBox.h:

LayoutTests:

* css3/flexbox/flex-algorithm-min-max-expected.txt:
* css3/flexbox/flex-algorithm-min-max.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/flex-algorithm-min-max-expected.txt
LayoutTests/css3/flexbox/flex-algorithm-min-max.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h