Title: [147430] trunk
Revision
147430
Author
[email protected]
Date
2013-04-02 07:41:25 -0700 (Tue, 02 Apr 2013)

Log Message

webkit fails IETC grid-column-002
https://bugs.webkit.org/show_bug.cgi?id=83907

Reviewed by Ojan Vafai.

Source/WebCore:

Tests: fast/css-grid-layout/grid-item-column-row-get-set.html
       ietestcenter/css3/grid/grid-column-002.htm

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Don't accept 0 as a valid <integer> position.

LayoutTests:

* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
Extended our testing to cover setting grid-{start|end|before|after} to 0.

* ietestcenter/css3/grid/grid-column-002.htm:
* ietestcenter/css3/grid/testRunnerEnableGrid.js: Added.
Needed to dynamically enable CSS Grid Layout for the test to pass. The file
hosts the boiler-plate code which will be common to all tests.

* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt-mac/TestExpectations:
* platform/qt/TestExpectations:
Removed grid-column-002.htm from the test expectations.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (147429 => 147430)


--- trunk/LayoutTests/ChangeLog	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/ChangeLog	2013-04-02 14:41:25 UTC (rev 147430)
@@ -1,3 +1,26 @@
+2013-04-02  Julien Chaffraix  <[email protected]>
+
+        webkit fails IETC grid-column-002
+        https://bugs.webkit.org/show_bug.cgi?id=83907
+
+        Reviewed by Ojan Vafai.
+
+        * fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
+        * fast/css-grid-layout/grid-item-column-row-get-set.html:
+        Extended our testing to cover setting grid-{start|end|before|after} to 0.
+
+        * ietestcenter/css3/grid/grid-column-002.htm:
+        * ietestcenter/css3/grid/testRunnerEnableGrid.js: Added.
+        Needed to dynamically enable CSS Grid Layout for the test to pass. The file
+        hosts the boiler-plate code which will be common to all tests.
+
+        * platform/chromium/TestExpectations:
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/qt-mac/TestExpectations:
+        * platform/qt/TestExpectations:
+        Removed grid-column-002.htm from the test expectations.
+
 2013-04-02  Thiago Marcos P. Santos  <[email protected]>
 
         [EFL] Unreviewed gardening.

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt (147429 => 147430)


--- trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt	2013-04-02 14:41:25 UTC (rev 147430)
@@ -156,6 +156,24 @@
 PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') is 'auto / auto'
 PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-before') is 'auto'
 PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-after') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-start') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-end') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-before') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-after') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-start') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-end') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-before') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-after') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-column') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-start') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-end') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') is 'auto / auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-before') is 'auto'
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-after') is 'auto'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html (147429 => 147430)


--- trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html	2013-04-02 14:41:25 UTC (rev 147430)
@@ -292,6 +292,40 @@
     shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-row')", "'auto / auto'");
     shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-before')", "'auto'");
     shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-after')", "'auto'");
+
+    // 0 is invalid.
+    element = document.createElement("div");
+    document.body.appendChild(element);
+    element.style.webkitGridColumn = "0 / 5";
+    element.style.webkitGridRow = "0 / 6";
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-column')", "'auto / auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-start')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-end')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-row')", "'auto / auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-before')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-after')", "'auto'");
+
+    element = document.createElement("div");
+    document.body.appendChild(element);
+    element.style.webkitGridColumn = "6 / 0";
+    element.style.webkitGridRow = "8 / 0";
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-column')", "'auto / auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-start')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-end')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-row')", "'auto / auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-before')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-after')", "'auto'");
+
+    element = document.createElement("div");
+    document.body.appendChild(element);
+    element.style.webkitGridColumn = "0";
+    element.style.webkitGridRow = "0";
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-column')", "'auto / auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-start')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-end')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-row')", "'auto / auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-before')", "'auto'");
+    shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-after')", "'auto'");
 </script>
 <script src=""
 </body>

Modified: trunk/LayoutTests/ietestcenter/css3/grid/grid-column-002.htm (147429 => 147430)


--- trunk/LayoutTests/ietestcenter/css3/grid/grid-column-002.htm	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/ietestcenter/css3/grid/grid-column-002.htm	2013-04-02 14:41:25 UTC (rev 147430)
@@ -33,6 +33,7 @@
         <link rel="help" href="" />
         <meta name="flags" content="ahem invalid" />
         <meta name="assert" content="The 'grid-column' with a value of '0' is invalid and inserts the grid-item in the first column." />
+        <script src=""
         <style type="text/css">
             #test
             {
@@ -78,4 +79,4 @@
             <div>XXXXX</div>
         </div>
     </body>
-</html>
\ No newline at end of file
+</html>

Added: trunk/LayoutTests/ietestcenter/css3/grid/testRunnerEnableGrid.js (0 => 147430)


--- trunk/LayoutTests/ietestcenter/css3/grid/testRunnerEnableGrid.js	                        (rev 0)
+++ trunk/LayoutTests/ietestcenter/css3/grid/testRunnerEnableGrid.js	2013-04-02 14:41:25 UTC (rev 147430)
@@ -0,0 +1,2 @@
+if (window.testRunner)
+    testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1);

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (147429 => 147430)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2013-04-02 14:41:25 UTC (rev 147430)
@@ -2872,7 +2872,6 @@
 
 # IETC grid layout
 webkit.org/b/83906 ietestcenter/css3/grid/grid-column-001.htm [ ImageOnlyFailure ]
-webkit.org/b/83907 ietestcenter/css3/grid/grid-column-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83909 ietestcenter/css3/grid/grid-column-003.htm [ ImageOnlyFailure ]
 webkit.org/b/83912 ietestcenter/css3/grid/grid-items-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83913 ietestcenter/css3/grid/grid-items-003.htm [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/efl/TestExpectations (147429 => 147430)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-04-02 14:41:25 UTC (rev 147430)
@@ -816,7 +816,6 @@
 webkit.org/b/83274 fast/repaint/transform-rotate-and-remove.html [ Pass ]
 
 webkit.org/b/83906 ietestcenter/css3/grid/grid-column-001.htm [ ImageOnlyFailure ]
-webkit.org/b/83907 ietestcenter/css3/grid/grid-column-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83909 ietestcenter/css3/grid/grid-column-003.htm [ ImageOnlyFailure ]
 webkit.org/b/83912 ietestcenter/css3/grid/grid-items-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83913 ietestcenter/css3/grid/grid-items-003.htm [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (147429 => 147430)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-04-02 14:41:25 UTC (rev 147430)
@@ -1104,7 +1104,6 @@
 Bug(GTK) editing/spelling/spelling-marker-description.html [ Failure ]
 
 webkit.org/b/83906 ietestcenter/css3/grid/grid-column-001.htm [ ImageOnlyFailure ]
-webkit.org/b/83907 ietestcenter/css3/grid/grid-column-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83909 ietestcenter/css3/grid/grid-column-003.htm [ ImageOnlyFailure ]
 webkit.org/b/83912 ietestcenter/css3/grid/grid-items-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83913 ietestcenter/css3/grid/grid-items-003.htm [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/qt/TestExpectations (147429 => 147430)


--- trunk/LayoutTests/platform/qt/TestExpectations	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2013-04-02 14:41:25 UTC (rev 147430)
@@ -2454,7 +2454,6 @@
 webkit.org/b/73766 css3/unicode-bidi-isolate-aharon-failing.html [ ImageOnlyFailure ]
 
 webkit.org/b/83906 ietestcenter/css3/grid/grid-column-001.htm [ ImageOnlyFailure ]
-webkit.org/b/83907 ietestcenter/css3/grid/grid-column-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83909 ietestcenter/css3/grid/grid-column-003.htm [ ImageOnlyFailure ]
 webkit.org/b/83912 ietestcenter/css3/grid/grid-items-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83913 ietestcenter/css3/grid/grid-items-003.htm [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/qt-mac/TestExpectations (147429 => 147430)


--- trunk/LayoutTests/platform/qt-mac/TestExpectations	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/LayoutTests/platform/qt-mac/TestExpectations	2013-04-02 14:41:25 UTC (rev 147430)
@@ -5705,7 +5705,6 @@
 webkit.org/b/82886 inspector/styles/override-screen-size.html [ Skip ]
 
 webkit.org/b/83906 ietestcenter/css3/grid/grid-column-001.htm [ ImageOnlyFailure ]
-webkit.org/b/83907 ietestcenter/css3/grid/grid-column-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83909 ietestcenter/css3/grid/grid-column-003.htm [ ImageOnlyFailure ]
 webkit.org/b/83912 ietestcenter/css3/grid/grid-items-002.htm [ ImageOnlyFailure ]
 webkit.org/b/83913 ietestcenter/css3/grid/grid-items-003.htm [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (147429 => 147430)


--- trunk/Source/WebCore/ChangeLog	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/Source/WebCore/ChangeLog	2013-04-02 14:41:25 UTC (rev 147430)
@@ -1,3 +1,17 @@
+2013-04-02  Julien Chaffraix  <[email protected]>
+
+        webkit fails IETC grid-column-002
+        https://bugs.webkit.org/show_bug.cgi?id=83907
+
+        Reviewed by Ojan Vafai.
+
+        Tests: fast/css-grid-layout/grid-item-column-row-get-set.html
+               ietestcenter/css3/grid/grid-column-002.htm
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        Don't accept 0 as a valid <integer> position.
+
 2013-04-02  Dmitry Gozman  <[email protected]>
 
         Web Inspector: allow referencing of nodes that have not been pushed to the front-end

Modified: trunk/Source/WebCore/css/CSSParser.cpp (147429 => 147430)


--- trunk/Source/WebCore/css/CSSParser.cpp	2013-04-02 14:36:15 UTC (rev 147429)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2013-04-02 14:41:25 UTC (rev 147430)
@@ -2643,7 +2643,7 @@
         if (!cssGridLayoutEnabled())
             return false;
 
-        validPrimitive = id == CSSValueAuto || validUnit(value, FInteger);
+        validPrimitive = id == CSSValueAuto || (validUnit(value, FInteger) && value->fValue);
         break;
 
     case CSSPropertyWebkitGridColumn:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to