Title: [100389] trunk
Revision
100389
Author
[email protected]
Date
2011-11-15 18:49:07 -0800 (Tue, 15 Nov 2011)

Log Message

Add the needed plumbing to parse display: -webkit-inline-grid
https://bugs.webkit.org/show_bug.cgi?id=72438

Reviewed by Tony Chang.

Source/WebCore:

Test: fast/css-grid-layout/display-grid-set-get.html

Added the needed constants and plugged everything together.
Again we treat display: -webkit-inline-grid like display: none
for the moment.

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

LayoutTests:

Integrated testing for display: -webkit-inline-grid into the existing test.

* fast/css-grid-layout/display-grid-set-get-expected.txt:
* fast/css-grid-layout/display-grid-set-get.html:
* fast/css-grid-layout/resources/display-grid-set-get.js:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (100388 => 100389)


--- trunk/LayoutTests/ChangeLog	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/LayoutTests/ChangeLog	2011-11-16 02:49:07 UTC (rev 100389)
@@ -1,3 +1,16 @@
+2011-11-15  Julien Chaffraix  <[email protected]>
+
+        Add the needed plumbing to parse display: -webkit-inline-grid
+        https://bugs.webkit.org/show_bug.cgi?id=72438
+
+        Reviewed by Tony Chang.
+
+        Integrated testing for display: -webkit-inline-grid into the existing test.
+
+        * fast/css-grid-layout/display-grid-set-get-expected.txt:
+        * fast/css-grid-layout/display-grid-set-get.html:
+        * fast/css-grid-layout/resources/display-grid-set-get.js:
+
 2011-11-15  Peter Kasting  <[email protected]>
 
         Maybe the reason we're fiddling with line endings is that this file

Modified: trunk/LayoutTests/fast/css-grid-layout/display-grid-set-get-expected.txt (100388 => 100389)


--- trunk/LayoutTests/fast/css-grid-layout/display-grid-set-get-expected.txt	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/LayoutTests/fast/css-grid-layout/display-grid-set-get-expected.txt	2011-11-16 02:49:07 UTC (rev 100389)
@@ -1,14 +1,17 @@
-Test that setting and getting display: grid works as expected
+Test that setting and getting display: grid and inline-grid works as expected
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
 Test getting |display| set through CSS
 PASS getComputedStyle(gridElement, '').getPropertyValue('display') is '-webkit-grid'
+PASS getComputedStyle(inlineGridElement, '').getPropertyValue('display') is '-webkit-inline-grid'
 
 Test getting and setting display through JS
 PASS getComputedStyle(element, '').getPropertyValue('display') is 'block'
 PASS getComputedStyle(element, '').getPropertyValue('display') is '-webkit-grid'
+PASS getComputedStyle(element, '').getPropertyValue('display') is 'block'
+PASS getComputedStyle(element, '').getPropertyValue('display') is '-webkit-inline-grid'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/css-grid-layout/display-grid-set-get.html (100388 => 100389)


--- trunk/LayoutTests/fast/css-grid-layout/display-grid-set-get.html	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/LayoutTests/fast/css-grid-layout/display-grid-set-get.html	2011-11-16 02:49:07 UTC (rev 100389)
@@ -3,11 +3,13 @@
 <head>
 <style>
 .grid { display: -webkit-grid; }
+.inlineGrid { display: -webkit-inline-grid; }
 </style>
 <script src=""
 </head>
 <body>
 <div class="grid" id="gridElement"></div>
+<div class="inlineGrid" id="inlineGridElement"></div>
 <script src=""
 <script src=""
 </body>

Modified: trunk/LayoutTests/fast/css-grid-layout/resources/display-grid-set-get.js (100388 => 100389)


--- trunk/LayoutTests/fast/css-grid-layout/resources/display-grid-set-get.js	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/LayoutTests/fast/css-grid-layout/resources/display-grid-set-get.js	2011-11-16 02:49:07 UTC (rev 100389)
@@ -1,8 +1,10 @@
-description('Test that setting and getting display: grid works as expected');
+description('Test that setting and getting display: grid and inline-grid works as expected');
 
 debug("Test getting |display| set through CSS");
 var gridElement = document.getElementById("gridElement");
+var inlineGridElement = document.getElementById("inlineGridElement");
 shouldBe("getComputedStyle(gridElement, '').getPropertyValue('display')", "'-webkit-grid'");
+shouldBe("getComputedStyle(inlineGridElement, '').getPropertyValue('display')", "'-webkit-inline-grid'");
 
 debug("");
 debug("Test getting and setting display through JS");
@@ -11,3 +13,9 @@
 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'");
 element.style.display = "-webkit-grid";
 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'-webkit-grid'");
+
+element = document.createElement("div");
+document.body.appendChild(element);
+shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'");
+element.style.display = "-webkit-inline-grid";
+shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'-webkit-inline-grid'");

Modified: trunk/Source/WebCore/ChangeLog (100388 => 100389)


--- trunk/Source/WebCore/ChangeLog	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/Source/WebCore/ChangeLog	2011-11-16 02:49:07 UTC (rev 100389)
@@ -1,3 +1,25 @@
+2011-11-15  Julien Chaffraix  <[email protected]>
+
+        Add the needed plumbing to parse display: -webkit-inline-grid
+        https://bugs.webkit.org/show_bug.cgi?id=72438
+
+        Reviewed by Tony Chang.
+
+        Test: fast/css-grid-layout/display-grid-set-get.html
+
+        Added the needed constants and plugged everything together.
+        Again we treat display: -webkit-inline-grid like display: none
+        for the moment.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        * css/CSSValueKeywords.in:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::createObject):
+        * rendering/style/RenderStyleConstants.h:
+
 2011-11-15  W. James MacLean  <[email protected]>
 
         [chromium] Move setVisibleRect() calls into calculateDrawTransformAndVisibility()

Modified: trunk/Source/WebCore/css/CSSParser.cpp (100388 => 100389)


--- trunk/Source/WebCore/css/CSSParser.cpp	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2011-11-16 02:49:07 UTC (rev 100389)
@@ -991,7 +991,7 @@
         if ((id >= CSSValueInline && id <= CSSValueWebkitInlineFlexbox) || id == CSSValueNone)
             validPrimitive = true;
 #if ENABLE(CSS_GRID_LAYOUT)
-        if (id == CSSValueWebkitGrid)
+        if (id == CSSValueWebkitGrid || id == CSSValueWebkitInlineGrid)
             validPrimitive = true;
 #endif
         break;

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (100388 => 100389)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2011-11-16 02:49:07 UTC (rev 100389)
@@ -1070,6 +1070,9 @@
         case GRID:
             m_value.ident = CSSValueWebkitGrid;
             break;
+        case INLINE_GRID:
+            m_value.ident = CSSValueWebkitInlineGrid;
+            break;
 #endif
         case NONE:
             m_value.ident = CSSValueNone;

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (100388 => 100389)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2011-11-16 02:49:07 UTC (rev 100389)
@@ -328,6 +328,7 @@
 -webkit-inline-flexbox
 #if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
 -webkit-grid
+-webkit-inline-grid
 #endif
 //none
 //

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (100388 => 100389)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2011-11-16 02:49:07 UTC (rev 100389)
@@ -133,6 +133,7 @@
 #if ENABLE(CSS_GRID_LAYOUT)
     // For now, we don't show grid elements.
     case GRID:
+    case INLINE_GRID:
 #endif
     case NONE:
         return 0;

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (100388 => 100389)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2011-11-16 02:38:47 UTC (rev 100388)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2011-11-16 02:49:07 UTC (rev 100389)
@@ -414,7 +414,7 @@
     TABLE_CAPTION, BOX, INLINE_BOX, 
     FLEXBOX, INLINE_FLEXBOX,
 #if ENABLE(CSS_GRID_LAYOUT)
-    GRID,
+    GRID, INLINE_GRID,
 #endif
     NONE
 };
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to