initial flex value should be 1 1 auto
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2012 03:32:47 +0000 (03:32 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Jun 2012 03:32:47 +0000 (03:32 +0000)
commite9a4b5da34ff77ddc1ae7c1516ab232696a20ea6
treeadc75044a3add79c4ce8696c17ace9918fa82d99
parente01285b2d301e088c2472f00e173a88570baa1bf
initial flex value should be 1 1 auto
https://bugs.webkit.org/show_bug.cgi?id=86526

Source/WebCore:

Reviewed by Ojan Vafai.

Also, if -webkit-flex is used to set the positive flex to 0 and
the negative flex is omitted, the negative flex is set to 0.

New test cases in: flex-property-parsing.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFlex):
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyFlex::applyValue):
* rendering/style/RenderStyle.h:

LayoutTests:

In most tests, I added a CSS rule to default -webkit-flex: none.
In a few tests, -webkit-flex didn't include the negative flex value
and it was becoming 1, causing negative flexing. I fixed those by
explicitly stating the negative flex as 0.

Reviewed by Ojan Vafai.

* css3/flexbox/align-absolute-child.html:
* css3/flexbox/auto-margins.html:
* css3/flexbox/flex-algorithm-with-margins.html:
* css3/flexbox/flex-algorithm.html:
* css3/flexbox/flex-align-end.html:
* css3/flexbox/flex-flow-auto-margins.html:
* css3/flexbox/flex-flow-orientations.html:
* css3/flexbox/flex-flow-overflow.html:
* css3/flexbox/flex-pack.html:
* css3/flexbox/flex-property-parsing-expected.txt:
* css3/flexbox/flex-property-parsing.html:
* css3/flexbox/flexbox-overflow-auto-expected.html:
* css3/flexbox/flexbox-overflow-auto.html:
* css3/flexbox/multiline-column-auto.html:
* css3/flexbox/multiline-pack.html:
* css3/flexbox/multiline-shrink-to-fit.html:
* css3/flexbox/multiline.html:
* css3/flexbox/nested-stretch.html:
* css3/flexbox/orthogonal-flex-directions.html:
* css3/flexbox/position-absolute-child.html:
* css3/flexbox/preferred-widths-orthogonal.html:
* css3/flexbox/true-centering.html:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-linux-x86/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-linux/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-mac-leopard/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-mac-leopard/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-mac-snowleopard/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-mac/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-win-vista/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-win-xp/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/gtk/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt:
* platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/qt/svg/css/getComputedStyle-basic-expected.txt:
* platform/win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
57 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/align-absolute-child.html
LayoutTests/css3/flexbox/auto-margins.html
LayoutTests/css3/flexbox/flex-algorithm-with-margins.html
LayoutTests/css3/flexbox/flex-algorithm.html
LayoutTests/css3/flexbox/flex-align-end.html
LayoutTests/css3/flexbox/flex-flow-auto-margins.html
LayoutTests/css3/flexbox/flex-flow-orientations.html
LayoutTests/css3/flexbox/flex-flow-overflow.html
LayoutTests/css3/flexbox/flex-pack.html
LayoutTests/css3/flexbox/flex-property-parsing-expected.txt
LayoutTests/css3/flexbox/flex-property-parsing.html
LayoutTests/css3/flexbox/flexbox-overflow-auto-expected.html
LayoutTests/css3/flexbox/flexbox-overflow-auto.html
LayoutTests/css3/flexbox/multiline-column-auto.html
LayoutTests/css3/flexbox/multiline-pack.html
LayoutTests/css3/flexbox/multiline-shrink-to-fit.html
LayoutTests/css3/flexbox/multiline.html
LayoutTests/css3/flexbox/nested-stretch.html
LayoutTests/css3/flexbox/orthogonal-flex-directions.html
LayoutTests/css3/flexbox/position-absolute-child.html
LayoutTests/css3/flexbox/preferred-widths-orthogonal.html
LayoutTests/css3/flexbox/true-centering.html
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/fast/multicol/span/clone-flexbox-expected.txt
LayoutTests/platform/chromium-linux-x86/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium-linux/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium-mac-leopard/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/chromium-mac-leopard/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium-mac-snowleopard/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium-mac/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/chromium-mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/chromium-mac/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium-win-vista/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium-win-xp/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium/fast/multicol/span/clone-flexbox-expected.txt
LayoutTests/platform/gtk/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/gtk/fast/multicol/span/clone-flexbox-expected.txt
LayoutTests/platform/gtk/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/mac/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/qt/fast/multicol/span/clone-flexbox-expected.txt
LayoutTests/platform/qt/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/win/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/transitions/flex-transitions.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/StyleBuilder.cpp
Source/WebCore/rendering/style/RenderStyle.h