flex-item-align: stretch should only grow, never shrink
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Mar 2012 00:16:37 +0000 (00:16 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Mar 2012 00:16:37 +0000 (00:16 +0000)
commit216d00d708e9f2ffe3556e34760c40861e9882ad
tree3179c6b4c3be4c3ba3478182a26f354659e6d25c
parenta3d1ff659bee0213df601c22ec2b858c1dda25c4
flex-item-align: stretch should only grow, never shrink
https://bugs.webkit.org/show_bug.cgi?id=80882

Reviewed by Ojan Vafai.

Source/WebCore:

New test cases in css3/flexbox/flex-align-stretch.html.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::alignChildren): Move stretch code into a separate function.
(WebCore::RenderFlexibleBox::alignChildStretch): Add an early return if our height is shrinking.
(WebCore):
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):

LayoutTests:

* css3/flexbox/child-overflow-expected.html:
* css3/flexbox/child-overflow.html: For cases that overflow the height, we now just overflow rather than reducing the height.
* css3/flexbox/flex-align-stretch-expected.txt:
* css3/flexbox/flex-align-stretch.html: New test cases.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/child-overflow-expected.html
LayoutTests/css3/flexbox/child-overflow.html
LayoutTests/css3/flexbox/flex-align-stretch-expected.txt
LayoutTests/css3/flexbox/flex-align-stretch.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h