remove physical flex-flow values to match the updated spec
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Sep 2011 21:35:30 +0000 (21:35 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Sep 2011 21:35:30 +0000 (21:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68728

Reviewed by Tony Chang.

Source/WebCore:

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EFlexFlow):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyleConstants.h:

LayoutTests:

* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/script-tests/css-properties.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@95859 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/css3/flexbox/css-properties-expected.txt
LayoutTests/css3/flexbox/script-tests/css-properties.js
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/rendering/style/RenderStyleConstants.h

index 3d9283f..deb6147 100644 (file)
@@ -1,3 +1,13 @@
+2011-09-23  Ojan Vafai  <ojan@chromium.org>
+
+        remove physical flex-flow values to match the updated spec
+        https://bugs.webkit.org/show_bug.cgi?id=68728
+
+        Reviewed by Tony Chang.
+
+        * css3/flexbox/css-properties-expected.txt:
+        * css3/flexbox/script-tests/css-properties.js:
+
 2011-09-23  Abhishek Arya  <inferno@chromium.org>
 
         Style not updated for :before, :after content
index e693a82..fb17a14 100644 (file)
@@ -54,22 +54,6 @@ PASS flexbox.style.webkitFlexFlow is "column"
 PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column"
 PASS flexbox.style.webkitFlexFlow is "column-reverse"
 PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse"
-PASS flexbox.style.webkitFlexFlow is "horizontal"
-PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "horizontal"
-PASS flexbox.style.webkitFlexFlow is "horizontal-reverse"
-PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "horizontal-reverse"
-PASS flexbox.style.webkitFlexFlow is "horizontal-ltr"
-PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "horizontal-ltr"
-PASS flexbox.style.webkitFlexFlow is "horizontal-rtl"
-PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "horizontal-rtl"
-PASS flexbox.style.webkitFlexFlow is "vertical"
-PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "vertical"
-PASS flexbox.style.webkitFlexFlow is "vertical-reverse"
-PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "vertical-reverse"
-PASS flexbox.style.webkitFlexFlow is "vertical-ttb"
-PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "vertical-ttb"
-PASS flexbox.style.webkitFlexFlow is "vertical-btt"
-PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "vertical-btt"
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 36b42bc..29139da 100644 (file)
@@ -122,36 +122,4 @@ flexbox.style.webkitFlexFlow = 'column-reverse';
 shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'column-reverse');
 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'column-reverse');
 
-flexbox.style.webkitFlexFlow = 'horizontal';
-shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'horizontal');
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'horizontal');
-
-flexbox.style.webkitFlexFlow = 'horizontal-reverse';
-shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'horizontal-reverse');
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'horizontal-reverse');
-
-flexbox.style.webkitFlexFlow = 'horizontal-ltr';
-shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'horizontal-ltr');
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'horizontal-ltr');
-
-flexbox.style.webkitFlexFlow = 'horizontal-rtl';
-shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'horizontal-rtl');
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'horizontal-rtl');
-
-flexbox.style.webkitFlexFlow = 'vertical';
-shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'vertical');
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'vertical');
-
-flexbox.style.webkitFlexFlow = 'vertical-reverse';
-shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'vertical-reverse');
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'vertical-reverse');
-
-flexbox.style.webkitFlexFlow = 'vertical-ttb';
-shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'vertical-ttb');
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'vertical-ttb');
-
-flexbox.style.webkitFlexFlow = 'vertical-btt';
-shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'vertical-btt');
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'vertical-btt');
-
 successfullyParsed = true;
index 8860965..c0387c2 100644 (file)
@@ -1,3 +1,18 @@
+2011-09-23  Ojan Vafai  <ojan@chromium.org>
+
+        remove physical flex-flow values to match the updated spec
+        https://bugs.webkit.org/show_bug.cgi?id=68728
+
+        Reviewed by Tony Chang.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator EFlexFlow):
+        * css/CSSValueKeywords.in:
+        * rendering/style/RenderStyleConstants.h:
+
 2011-09-23  Abhishek Arya  <inferno@chromium.org>
 
         Style not updated for :before, :after content
index 446e2f6..6d55a2a 100644 (file)
@@ -1589,9 +1589,7 @@ bool CSSParser::parseValue(int propId, bool important)
         break;
     case CSSPropertyWebkitFlexFlow:
         // FIXME: -webkit-flex-flow takes a second "wrap" value.    
-        validPrimitive = id == CSSValueRow || id == CSSValueRowReverse || id == CSSValueColumn || id == CSSValueColumnReverse
-            || id == CSSValueHorizontal || id == CSSValueHorizontalReverse || id == CSSValueHorizontalLtr || id == CSSValueHorizontalRtl
-            || id == CSSValueVertical || id == CSSValueVerticalReverse || id == CSSValueVerticalTtb || id == CSSValueVerticalBtt;
+        validPrimitive = id == CSSValueRow || id == CSSValueRowReverse || id == CSSValueColumn || id == CSSValueColumnReverse;
         break;
 #endif
     case CSSPropertyWebkitMarquee: {
index ebb9b9d..59d3956 100644 (file)
@@ -1159,30 +1159,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexFlow e)
     case FlowColumnReverse:
         m_value.ident = CSSValueColumnReverse;
         break;
-    case FlowHorizontal:
-        m_value.ident = CSSValueHorizontal;
-        break;
-    case FlowHorizontalReverse:
-        m_value.ident = CSSValueHorizontalReverse;
-        break;
-    case FlowHorizontalLeftToRight:
-        m_value.ident = CSSValueHorizontalLtr;
-        break;
-    case FlowHorizontalRightToLeft:
-        m_value.ident = CSSValueHorizontalRtl;
-        break;
-    case FlowVertical:
-        m_value.ident = CSSValueVertical;
-        break;
-    case FlowVerticalReverse:
-        m_value.ident = CSSValueVerticalReverse;
-        break;
-    case FlowVerticalTopToBottom:
-        m_value.ident = CSSValueVerticalTtb;
-        break;
-    case FlowVerticalBottomToTop:
-        m_value.ident = CSSValueVerticalBtt;
-        break;
     }
 }
 
@@ -1197,22 +1173,6 @@ template<> inline CSSPrimitiveValue::operator EFlexFlow() const
         return FlowColumn;
     case CSSValueColumnReverse:
         return FlowColumnReverse;
-    case CSSValueHorizontal:
-        return FlowHorizontal;
-    case CSSValueHorizontalReverse:
-        return FlowHorizontalReverse;
-    case CSSValueHorizontalLtr:
-        return FlowHorizontalLeftToRight;
-    case CSSValueHorizontalRtl:
-        return FlowHorizontalRightToLeft;
-    case CSSValueVertical:
-        return FlowVertical;
-    case CSSValueVerticalReverse:
-        return FlowVerticalReverse;
-    case CSSValueVerticalTtb:
-        return FlowVerticalTopToBottom;
-    case CSSValueVerticalBtt:
-        return FlowVerticalBottomToTop;
     default:
         ASSERT_NOT_REACHED();
         return FlowRow;
index ac14370..a0e1b01 100644 (file)
@@ -484,14 +484,6 @@ row
 row-reverse
 column
 column-reverse
-// horizontal
-horizontal-reverse
-horizontal-ltr
-horizontal-rtl
-// vertical
-vertical-reverse
-vertical-ttb
-vertical-btt
 
 // CSS_PROP_MARQUEE_DIRECTION
 forwards
index 8bb0e62..7986db9 100644 (file)
@@ -170,9 +170,7 @@ enum EBoxDirection { BNORMAL, BREVERSE };
 
 enum EFlexPack { PackStart, PackEnd, PackCenter, PackJustify };
 enum EFlexAlign { AlignStart, AlignEnd, AlignCenter, AlignStretch, AlignBaseline };
-enum EFlexFlow { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse,
-    FlowHorizontal, FlowHorizontalReverse, FlowHorizontalLeftToRight, FlowHorizontalRightToLeft,
-    FlowVertical, FlowVerticalReverse, FlowVerticalTopToBottom, FlowVerticalBottomToTop};
+enum EFlexFlow { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse};
 
 enum ETextSecurity {
     TSNONE, TSDISC, TSCIRCLE, TSSQUARE