Implement new flex property and deprecate flex function
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2012 22:34:03 +0000 (22:34 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2012 22:34:03 +0000 (22:34 +0000)
commitffc8459ea270e0de93a8bd35c566435ca9708c11
tree16d40e7becd7db6a2be38ee642d17da184e10cc1
parentd2a6b0c4c1b34a80baf1de4e0f5d75d6cd0a276f
Implement new flex property and deprecate flex function
https://bugs.webkit.org/show_bug.cgi?id=82128

Reviewed by Ojan Vafai.

Source/WebCore:

No new tests. Tests were updated to use the new syntax and they should
all pass.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::preferredFlexLengthForChild): Grab the
preferred size and if it's auto, fall back to width or height.
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::positiveFlexForChild): Use the value from the flex property.
(WebCore::RenderFlexibleBox::negativeFlexForChild): Use the value from the flex property.
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
* rendering/RenderFlexibleBox.h:

LayoutTests:

Update tests to use the -webkit-flex: propery instead of the function.
In most cases this was just a simple find & replace, but in a few cases
we had to clear the flex value.

* css3/flexbox/auto-height-dynamic.html:
* css3/flexbox/child-overflow.html:
* css3/flexbox/columns-auto-size.html:
* css3/flexbox/cross-axis-scrollbar.html:
* css3/flexbox/flex-algorithm-min-max.html:
* css3/flexbox/flex-algorithm-with-margins.html:
* css3/flexbox/flex-algorithm.html:
* css3/flexbox/flex-align-column.html:
* css3/flexbox/flex-align-max.html:
* css3/flexbox/flex-align-percent-height.html:
* css3/flexbox/flex-align-stretch.html:
* css3/flexbox/flex-align-vertical-writing-mode.html:
* css3/flexbox/flex-align.html:
* css3/flexbox/flex-flow-border.html:
* css3/flexbox/flex-flow-margins-auto-size-expected.txt: This test had expected failures that needed to be updated.
* css3/flexbox/flex-flow-margins-auto-size.html:
* css3/flexbox/flex-flow-margins.html:
* css3/flexbox/flex-flow-overflow.html:
* css3/flexbox/flex-flow-padding.html:
* css3/flexbox/flex-flow.html:
* css3/flexbox/flex-no-flex.html:
* css3/flexbox/flex-order.html:
* css3/flexbox/flex-pack.html:
* css3/flexbox/line-wrapping.html:
* css3/flexbox/multiline-align.html:
* css3/flexbox/multiline-line-pack-horizontal-column.html:
* css3/flexbox/multiline-reverse-wrap-baseline.html:
* css3/flexbox/multiline-reverse-wrap-overflow.html:
* css3/flexbox/multiline.html:
* css3/flexbox/orthogonal-flex-directions.html:
* css3/flexbox/position-absolute-child.html:
* css3/flexbox/repaint-rtl-column.html:
* css3/flexbox/repaint.html:
* css3/flexbox/writing-modes.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
38 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/auto-height-dynamic.html
LayoutTests/css3/flexbox/child-overflow.html
LayoutTests/css3/flexbox/columns-auto-size.html
LayoutTests/css3/flexbox/cross-axis-scrollbar.html
LayoutTests/css3/flexbox/flex-algorithm-min-max.html
LayoutTests/css3/flexbox/flex-algorithm-with-margins.html
LayoutTests/css3/flexbox/flex-algorithm.html
LayoutTests/css3/flexbox/flex-align-column.html
LayoutTests/css3/flexbox/flex-align-max.html
LayoutTests/css3/flexbox/flex-align-percent-height.html
LayoutTests/css3/flexbox/flex-align-stretch.html
LayoutTests/css3/flexbox/flex-align-vertical-writing-mode.html
LayoutTests/css3/flexbox/flex-align.html
LayoutTests/css3/flexbox/flex-flow-border.html
LayoutTests/css3/flexbox/flex-flow-margins-auto-size-expected.txt
LayoutTests/css3/flexbox/flex-flow-margins-auto-size.html
LayoutTests/css3/flexbox/flex-flow-margins.html
LayoutTests/css3/flexbox/flex-flow-overflow.html
LayoutTests/css3/flexbox/flex-flow-padding.html
LayoutTests/css3/flexbox/flex-flow.html
LayoutTests/css3/flexbox/flex-no-flex.html
LayoutTests/css3/flexbox/flex-order.html
LayoutTests/css3/flexbox/flex-pack.html
LayoutTests/css3/flexbox/line-wrapping.html
LayoutTests/css3/flexbox/multiline-align.html
LayoutTests/css3/flexbox/multiline-line-pack-horizontal-column.html
LayoutTests/css3/flexbox/multiline-reverse-wrap-baseline.html
LayoutTests/css3/flexbox/multiline-reverse-wrap-overflow.html
LayoutTests/css3/flexbox/multiline.html
LayoutTests/css3/flexbox/orthogonal-flex-directions.html
LayoutTests/css3/flexbox/position-absolute-child.html
LayoutTests/css3/flexbox/repaint-rtl-column.html
LayoutTests/css3/flexbox/repaint.html
LayoutTests/css3/flexbox/writing-modes.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h