Title: [89712] trunk
Revision
89712
Author
[email protected]
Date
2011-06-24 16:39:35 -0700 (Fri, 24 Jun 2011)

Log Message

2011-06-24  Tony Chang  <[email protected]>

        Reviewed by Ojan Vafai.

        add flexbox and inline-flexbox as possible CSS display values
        https://bugs.webkit.org/show_bug.cgi?id=63361

        * css3/flexbox/display-property-expected.txt: Added.
        * css3/flexbox/display-property.html: Added.
        * css3/flexbox/script-tests/display-property.js: Added.
        (testFlex):
2011-06-24  Tony Chang  <[email protected]>

        Reviewed by Ojan Vafai.

        add flexbox and inline-flexbox as possible CSS display values
        https://bugs.webkit.org/show_bug.cgi?id=63361

        Test: css3/flexbox/display-property.html

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        * css/CSSValueKeywords.in:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89711 => 89712)


--- trunk/LayoutTests/ChangeLog	2011-06-24 23:06:01 UTC (rev 89711)
+++ trunk/LayoutTests/ChangeLog	2011-06-24 23:39:35 UTC (rev 89712)
@@ -1,3 +1,15 @@
+2011-06-24  Tony Chang  <[email protected]>
+
+        Reviewed by Ojan Vafai.
+
+        add flexbox and inline-flexbox as possible CSS display values
+        https://bugs.webkit.org/show_bug.cgi?id=63361
+
+        * css3/flexbox/display-property-expected.txt: Added.
+        * css3/flexbox/display-property.html: Added.
+        * css3/flexbox/script-tests/display-property.js: Added.
+        (testFlex):
+
 2011-06-24  Adrienne Walker  <[email protected]>
 
         Reviewed by Simon Fraser.

Added: trunk/LayoutTests/css3/flexbox/display-property-expected.txt (0 => 89712)


--- trunk/LayoutTests/css3/flexbox/display-property-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/css3/flexbox/display-property-expected.txt	2011-06-24 23:39:35 UTC (rev 89712)
@@ -0,0 +1,14 @@
+Tests being able to set the display to -webkit-flexbox and -webkit-inline-flexbox.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS div.style.display is "-webkit-flexbox"
+PASS div.style.display is "inline"
+PASS div.style.display is "-webkit-inline-flexbox"
+PASS div.style.display is "-webkit-inline-flexbox"
+PASS div.style.display is "block"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/css3/flexbox/display-property.html (0 => 89712)


--- trunk/LayoutTests/css3/flexbox/display-property.html	                        (rev 0)
+++ trunk/LayoutTests/css3/flexbox/display-property.html	2011-06-24 23:39:35 UTC (rev 89712)
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src=""
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/css3/flexbox/script-tests/display-property.js (0 => 89712)


--- trunk/LayoutTests/css3/flexbox/script-tests/display-property.js	                        (rev 0)
+++ trunk/LayoutTests/css3/flexbox/script-tests/display-property.js	2011-06-24 23:39:35 UTC (rev 89712)
@@ -0,0 +1,20 @@
+description('Tests being able to set the display to -webkit-flexbox and -webkit-inline-flexbox.');
+
+var div = document.createElement('div');
+
+div.style.display = '-webkit-flexbox';
+shouldBeEqualToString('div.style.display', '-webkit-flexbox');
+
+div.style.display = 'inline';
+shouldBeEqualToString('div.style.display', 'inline');
+
+div.style.display = '-webkit-inline-flexbox';
+shouldBeEqualToString('div.style.display', '-webkit-inline-flexbox');
+
+div.style.display = 'junk';
+shouldBeEqualToString('div.style.display', '-webkit-inline-flexbox');
+
+div.style.display = 'block';
+shouldBeEqualToString('div.style.display', 'block');
+
+successfullyParsed = true;

Modified: trunk/Source/WebCore/ChangeLog (89711 => 89712)


--- trunk/Source/WebCore/ChangeLog	2011-06-24 23:06:01 UTC (rev 89711)
+++ trunk/Source/WebCore/ChangeLog	2011-06-24 23:39:35 UTC (rev 89712)
@@ -1,3 +1,16 @@
+2011-06-24  Tony Chang  <[email protected]>
+
+        Reviewed by Ojan Vafai.
+
+        add flexbox and inline-flexbox as possible CSS display values
+        https://bugs.webkit.org/show_bug.cgi?id=63361
+
+        Test: css3/flexbox/display-property.html
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSValueKeywords.in:
+
 2011-06-24  Anna Cavender  <[email protected]>
 
         Reviewed by Eric Carlson.

Modified: trunk/Source/WebCore/css/CSSParser.cpp (89711 => 89712)


--- trunk/Source/WebCore/css/CSSParser.cpp	2011-06-24 23:06:01 UTC (rev 89711)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2011-06-24 23:39:35 UTC (rev 89712)
@@ -969,13 +969,17 @@
     case CSSPropertyDisplay:
         // inline | block | list-item | run-in | inline-block | table |
         // inline-table | table-row-group | table-header-group | table-footer-group | table-row |
-        // table-column-group | table-column | table-cell | table-caption | box | inline-box | none | inherit
+        // table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none | inherit
 #if ENABLE(WCSS)
         if ((id >= CSSValueInline && id <= CSSValueWapMarquee) || id == CSSValueNone)
 #else
         if ((id >= CSSValueInline && id <= CSSValueWebkitInlineBox) || id == CSSValueNone)
 #endif
             validPrimitive = true;
+#if ENABLE(CSS3_FLEXBOX)
+        if (id == CSSValueWebkitFlexbox || id == CSSValueWebkitInlineFlexbox)
+            validPrimitive = true;
+#endif
         break;
 
     case CSSPropertyDirection:            // ltr | rtl | inherit

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (89711 => 89712)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2011-06-24 23:06:01 UTC (rev 89711)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2011-06-24 23:39:35 UTC (rev 89712)
@@ -324,6 +324,8 @@
 -webkit-box
 -webkit-inline-box
 -wap-marquee
+-webkit-flexbox
+-webkit-inline-flexbox
 //none
 //
 // CSS_PROP_CURSOR:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to