Added: trunk/LayoutTests/css3/flexbox/flex-flow-initial-expected.txt (0 => 124297)
--- trunk/LayoutTests/css3/flexbox/flex-flow-initial-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flex-flow-initial-expected.txt 2012-08-01 04:48:22 UTC (rev 124297)
@@ -0,0 +1,11 @@
+Tests that 'initial' is handled correctly for the -webkit-flex-flow shorthand.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.getComputedStyle(test1).webkitFlexDirection is "row"
+PASS window.getComputedStyle(test2).webkitFlexDirection is "row"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/css3/flexbox/flex-flow-initial.html (0 => 124297)
--- trunk/LayoutTests/css3/flexbox/flex-flow-initial.html (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flex-flow-initial.html 2012-08-01 04:48:22 UTC (rev 124297)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<style>
+#test1 {
+ -webkit-flex-flow: column;
+}
+#test1 {
+ -webkit-flex-flow: initial;
+}
+#test2 {
+ -webkit-flex-direction: column;
+}
+#test2 {
+ -webkit-flex-direction: initial;
+}
+</style>
+<span id="test1"></span>
+<span id="test2"></span>
+<script src=""
+<script>
+description("Tests that 'initial' is handled correctly for the -webkit-flex-flow shorthand.");
+value1 = window.getComputedStyle(test1).webkitFlexDirection;
+value2 = window.getComputedStyle(test2).webkitFlexDirection;
+shouldBeEqualToString('window.getComputedStyle(test1).webkitFlexDirection', 'row');
+shouldBeEqualToString('window.getComputedStyle(test2).webkitFlexDirection', 'row');
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+<script src=""
Modified: trunk/Source/WebCore/css/StyleBuilder.cpp (124296 => 124297)
--- trunk/Source/WebCore/css/StyleBuilder.cpp 2012-08-01 04:14:13 UTC (rev 124296)
+++ trunk/Source/WebCore/css/StyleBuilder.cpp 2012-08-01 04:48:22 UTC (rev 124297)
@@ -1990,8 +1990,10 @@
setPropertyHandler(CSSPropertyWebkitAlignContent, ApplyPropertyDefault<EAlignContent, &RenderStyle::alignContent, EAlignContent, &RenderStyle::setAlignContent, EAlignContent, &RenderStyle::initialAlignContent>::createHandler());
setPropertyHandler(CSSPropertyWebkitAlignItems, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignItems, EAlignItems, &RenderStyle::setAlignItems, EAlignItems, &RenderStyle::initialAlignItems>::createHandler());
setPropertyHandler(CSSPropertyWebkitAlignSelf, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignSelf, EAlignItems, &RenderStyle::setAlignSelf, EAlignItems, &RenderStyle::initialAlignSelf>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitFlex, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitFlexGrow, CSSPropertyWebkitFlexShrink, CSSPropertyWebkitFlexBasis>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlexBasis, ApplyPropertyLength<&RenderStyle::flexBasis, &RenderStyle::setFlexBasis, &RenderStyle::initialFlexBasis, AutoEnabled>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlexDirection, ApplyPropertyDefault<EFlexDirection, &RenderStyle::flexDirection, EFlexDirection, &RenderStyle::setFlexDirection, EFlexDirection, &RenderStyle::initialFlexDirection>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitFlexFlow, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitFlexDirection, CSSPropertyWebkitFlexWrap>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlexGrow, ApplyPropertyDefault<float, &RenderStyle::flexGrow, float, &RenderStyle::setFlexGrow, float, &RenderStyle::initialFlexGrow>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlexShrink, ApplyPropertyDefault<float, &RenderStyle::flexShrink, float, &RenderStyle::setFlexShrink, float, &RenderStyle::initialFlexShrink>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlexWrap, ApplyPropertyDefault<EFlexWrap, &RenderStyle::flexWrap, EFlexWrap, &RenderStyle::setFlexWrap, EFlexWrap, &RenderStyle::initialFlexWrap>::createHandler());
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (124296 => 124297)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2012-08-01 04:14:13 UTC (rev 124296)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-08-01 04:48:22 UTC (rev 124297)
@@ -4001,19 +4001,6 @@
return;
}
#endif
-#if ENABLE(CSS3_FLEXBOX)
- case CSSPropertyWebkitFlex:
- if (isInherit) {
- m_style->setFlexGrow(m_parentStyle->flexGrow());
- m_style->setFlexShrink(m_parentStyle->flexShrink());
- m_style->setFlexBasis(m_parentStyle->flexBasis());
- } else if (isInitial) {
- m_style->setFlexGrow(RenderStyle::initialFlexGrow());
- m_style->setFlexShrink(RenderStyle::initialFlexShrink());
- m_style->setFlexBasis(RenderStyle::initialFlexBasis());
- }
- return;
-#endif
case CSSPropertyInvalid:
return;
// Directional properties are resolved by resolveDirectionAwareProperty() before the switch.
@@ -4344,6 +4331,7 @@
case CSSPropertyWebkitAlignContent:
case CSSPropertyWebkitAlignItems:
case CSSPropertyWebkitAlignSelf:
+ case CSSPropertyWebkitFlex:
case CSSPropertyWebkitFlexBasis:
case CSSPropertyWebkitFlexDirection:
case CSSPropertyWebkitFlexFlow: