[CSS Parser] Turn back on a bunch of layout tests
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Dec 2016 17:18:45 +0000 (17:18 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Dec 2016 17:18:45 +0000 (17:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165529

Reviewed by Zalan Bujtas.

Source/WebCore:

Fixes fast/css/transform-origin-parsing.html.

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeTransformOrigin):
The implicit check was relying on a null check of the z value, but
we called releaseNonNull on it already. This meant all z properties were
marked as implicit incorrectly. Fix by storing whether or not we had a z
value in a local variable.

LayoutTests:

* TestExpectations:
* css3/parsing-css3-nthchild-expected.txt:
* css3/parsing-css3-nthchild.html:
* css3/scroll-snap/scroll-snap-position-values-expected.txt:
* css3/scroll-snap/scroll-snap-position-values.html:
* editing/execCommand/insert-list-with-noneditable-content-expected.txt:
* fast/css/object-position/parsing-object-position-expected.txt:
* fast/css/object-position/parsing-object-position.html:
* fast/css/parsing-css-number-types-expected.txt:
* fast/css/parsing-css-wrap-expected.txt:
* fast/css/script-tests/transform-origin-parsing.js:
* fast/css/transform-inline-style-remove-expected.txt:
* fast/css/transform-origin-parsing-expected.txt:
* fast/css/variables/custom-property-dynamic-update-expected.html:
* fast/events/mouse-cursor-expected.txt:
* fast/inspector-support/style-expected.txt:
* platform/mac/svg/webarchive/svg-script-subresouces-expected.txt:

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

20 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/css3/parsing-css3-nthchild-expected.txt
LayoutTests/css3/parsing-css3-nthchild.html
LayoutTests/css3/scroll-snap/scroll-snap-position-values-expected.txt
LayoutTests/css3/scroll-snap/scroll-snap-position-values.html
LayoutTests/editing/execCommand/insert-list-with-noneditable-content-expected.txt
LayoutTests/fast/css/object-position/parsing-object-position-expected.txt
LayoutTests/fast/css/object-position/parsing-object-position.html
LayoutTests/fast/css/parsing-css-number-types-expected.txt
LayoutTests/fast/css/parsing-css-wrap-expected.txt
LayoutTests/fast/css/script-tests/transform-origin-parsing.js
LayoutTests/fast/css/transform-inline-style-remove-expected.txt
LayoutTests/fast/css/transform-origin-parsing-expected.txt
LayoutTests/fast/css/variables/custom-property-dynamic-update-expected.html
LayoutTests/fast/events/mouse-cursor-expected.txt
LayoutTests/fast/inspector-support/style-expected.txt
LayoutTests/platform/mac/svg/webarchive/svg-script-subresouces-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSPropertyParser.cpp

index 615ad8e..9c77c67 100644 (file)
@@ -1,3 +1,28 @@
+2016-12-07  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Turn back on a bunch of layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=165529
+
+        Reviewed by Zalan Bujtas.
+
+        * TestExpectations:
+        * css3/parsing-css3-nthchild-expected.txt:
+        * css3/parsing-css3-nthchild.html:
+        * css3/scroll-snap/scroll-snap-position-values-expected.txt:
+        * css3/scroll-snap/scroll-snap-position-values.html:
+        * editing/execCommand/insert-list-with-noneditable-content-expected.txt:
+        * fast/css/object-position/parsing-object-position-expected.txt:
+        * fast/css/object-position/parsing-object-position.html:
+        * fast/css/parsing-css-number-types-expected.txt:
+        * fast/css/parsing-css-wrap-expected.txt:
+        * fast/css/script-tests/transform-origin-parsing.js:
+        * fast/css/transform-inline-style-remove-expected.txt:
+        * fast/css/transform-origin-parsing-expected.txt:
+        * fast/css/variables/custom-property-dynamic-update-expected.html:
+        * fast/events/mouse-cursor-expected.txt:
+        * fast/inspector-support/style-expected.txt:
+        * platform/mac/svg/webarchive/svg-script-subresouces-expected.txt:
+
 2016-12-07  Ryan Haddad  <ryanhaddad@apple.com>
 
         Rebaseline fast/table/003.html after r209421.
index abeecee..6d375d3 100644 (file)
@@ -993,25 +993,6 @@ webkit.org/b/162828 [ Debug ] tables/table-section-overflow-clip-crash.html  [ S
 webkit.org/b/164797 js/dom/domjit-function-get-element-by-id-licm.html [ Pass Timeout ]
 webkit.org/b/164797 js/dom/domjit-function-get-element-by-id-changed.html [ Pass Timeout ]
 
-# The following layout tests are allowed to fail temporarily until we get the new CSS parser
-# enabled. Once it is turned on, all of these tests should have their results reset.
-webkit.org/b/165195 css3/parsing-css3-nthchild.html [ Pass Failure ]
-webkit.org/b/165195 css3/scroll-snap/scroll-snap-position-values.html [ Pass Failure ]
-webkit.org/b/165195 css3/scroll-snap/scroll-snap-position-values.html [ Pass Failure ]
-webkit.org/b/165195 editing/execCommand/insert-list-with-noneditable-content.html [ Pass Failure ]
-webkit.org/b/165195 fast/css/object-position/parsing-object-position.html [ Pass Failure ]
-webkit.org/b/165195 fast/css/large-value-csstext.html [ Pass Failure ]
-webkit.org/b/165195 fast/css/parsing-css-number-types.html [ Pass Failure ]
-webkit.org/b/165195 fast/css/parsing-css-wrap.html [ Pass Failure ]
-webkit.org/b/165195 fast/css/transform-origin-parsing.html [ Pass Failure ]
-webkit.org/b/165195 fast/css/transform-inline-style-remove.html [ Pass Failure ]
-webkit.org/b/165195 fast/css/variables/custom-property-dynamic-update.html [ Skip ]
-webkit.org/b/165195 fast/events/mouse-cursor.html [ Pass Failure ]
-webkit.org/b/165195 fast/forms/basic-selects.html [ Pass Failure ]
-webkit.org/b/165195 fast/shadow-dom/slotted-pseudo-element-css-text.html [ Pass Failure ]
-webkit.org/b/165195 fast/inspector-support/style.html [ Pass Failure ]
-webkit.org/b/165195 svg/webarchive/svg-script-subresouces.svg [ Pass Failure ]
-
 # The following layout tests need to be changed when the new CSS Parser is turned on, since they
 # incorrectly indicate failures on valid syntax.
 webkit.org/b/165195 css3/font-variant-parsing.html [ Pass Failure ]
index daee85c..1f9bf13 100644 (file)
@@ -6,18 +6,14 @@ Rules from the stylesheet:
 #b:nth-child(n- 10) { color: green; }
 #g:nth-child(-n-1) { color: green; }
 #h:nth-child(-n- 10) { color: green; }
-#n:nth-child(-n
-    - 1) { color: green; }
-#o:nth-child(-n
-    +13) { color: green; }
+#n:nth-child(-n - 1) { color: green; }
+#o:nth-child(-n +13) { color: green; }
 Expected result:
 
 #a:nth-child(n-1) { color: green; }
 #b:nth-child(n- 10) { color: green; }
 #g:nth-child(-n-1) { color: green; }
 #h:nth-child(-n- 10) { color: green; }
-#n:nth-child(-n
-    - 1) { color: green; }
-#o:nth-child(-n
-    +13) { color: green; }
+#n:nth-child(-n - 1) { color: green; }
+#o:nth-child(-n +13) { color: green; }
 
index 7e19d12..05eed84 100644 (file)
@@ -56,9 +56,7 @@ function runTest()
 #b:nth-child(n- 10) { color: green; }
 #g:nth-child(-n-1) { color: green; }
 #h:nth-child(-n- 10) { color: green; }
-#n:nth-child(-n
-    - 1) { color: green; }
-#o:nth-child(-n
-    +13) { color: green; }
+#n:nth-child(-n - 1) { color: green; }
+#o:nth-child(-n +13) { color: green; }
 </pre>
 </body>
index 64c9689..ecd46c6 100644 (file)
@@ -51,7 +51,7 @@ PASS initialDestination.style['-webkit-scroll-snap-points-y'] is ""
 PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-y') is "repeat(100%)"
 PASS initialDestination.style['-webkit-scroll-snap-destination'] is "initial"
 PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-destination') is "0px 0px"
-PASS initialDestination.style['-webkit-scroll-snap-coordinate'] is ""
+PASS initialDestination.style['-webkit-scroll-snap-coordinate'] is "none"
 PASS window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-coordinate') is "none"
 PASS initialSnapCoordinate.style['-webkit-scroll-snap-type'] is ""
 PASS window.getComputedStyle(initialSnapCoordinate).getPropertyValue('-webkit-scroll-snap-type') is "mandatory"
@@ -81,7 +81,7 @@ PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-points-y'] is "
 PASS window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-y') is "repeat(100%)"
 PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-destination'] is ""
 PASS window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-destination') is "0px 0px"
-PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-coordinate'] is ""
+PASS noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-coordinate'] is "none"
 PASS window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-coordinate') is "none"
 PASS calculatedCoordinateAndDestination.style['-webkit-scroll-snap-type'] is ""
 PASS window.getComputedStyle(calculatedCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-type') is "mandatory"
index f9e2ad8..658beb7 100644 (file)
         shouldBeEqualToString("window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
         shouldBeEqualToString("initialDestination.style['-webkit-scroll-snap-destination']", "initial");
         shouldBeEqualToString("window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-destination')", "0px 0px");
-        shouldBeEmptyString("initialDestination.style['-webkit-scroll-snap-coordinate']");
+        shouldBeEqualToString("initialDestination.style['-webkit-scroll-snap-coordinate']", "none");
         shouldBeEqualToString("window.getComputedStyle(initialDestination).getPropertyValue('-webkit-scroll-snap-coordinate')", "none");
 
         var initialSnapCoordinate = document.getElementById('initialSnapCoordinate');
         shouldBeEqualToString("window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
         shouldBeEmptyString("noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-destination']");
         shouldBeEqualToString("window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-destination')", "0px 0px");
-        shouldBeEmptyString("noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-coordinate']");
+        shouldBeEqualToString("noneSnapCoordinateAndDestination.style['-webkit-scroll-snap-coordinate']", "none");
         shouldBeEqualToString("window.getComputedStyle(noneSnapCoordinateAndDestination).getPropertyValue('-webkit-scroll-snap-coordinate')", "none");
 
         var calculatedCoordinateAndDestination = document.getElementById('calculatedCoordinateAndDestination');
index 34afc86..9194d26 100644 (file)
@@ -3,7 +3,7 @@ This tests list creation in an editable context but across non-editable content.
 |   <li>
 |     "Editabl<#selection-anchor>e paragraph containing a "
 |     <span>
-|       style="background-color: rgb(211, 211, 211);"
+|       style="background-color: lightgray;"
 |       "non-editable"
 |     " in the middle"
 |     <br>
index a664a8c..efb4f7c 100644 (file)
@@ -6,8 +6,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 PASS testComputedStyle(";") is "50% 50%"
 PASS test("object-position: inherit;") is "inherit"
 PASS test("object-position: initial;") is "initial"
-PASS test("object-position: 23px;") is "23px 50%"
-PASS test("object-position: center 23px;") is "50% 23px"
+PASS test("object-position: 23px;") is "23px center"
+PASS test("object-position: center 23px;") is "50% center"
 PASS test("object-position: 50% 23px;") is "50% 23px"
 PASS test("object-position: 50% left;") is ""
 PASS test("object-position: left 10px top 15px;") is "left 10px top 15px"
index 774fd59..5323694 100644 (file)
@@ -33,8 +33,8 @@
             shouldBe('test("object-position: inherit;")', '"inherit"');
             shouldBe('test("object-position: initial;")', '"initial"');
             
-            shouldBeEqualToString('test("object-position: 23px;")', '23px 50%');
-            shouldBeEqualToString('test("object-position: center 23px;")', '50% 23px');
+            shouldBeEqualToString('test("object-position: 23px;")', '23px center');
+            shouldBeEqualToString('test("object-position: center 23px;")', 'center 23px');
             shouldBeEqualToString('test("object-position: 50% 23px;")', '50% 23px');
             shouldBeEqualToString('test("object-position: 50% left;")', '');
             
index 2b9a7e2..43aecdb 100644 (file)
@@ -1,25 +1,25 @@
 Test parsing of CSS number types.
 
-FAILURE
+SUCCESS
 
 Rules from the stylesheet:
 
 #a { font-size: 1em; }
-#b { }
-#c { }
-#d { }
+#b { font-size: 1em; }
+#c { font-size: 1em; }
+#d { font-size: 1em; }
 #e { font-size: 1rem; }
-#f { }
+#f { font-size: 1ex; }
 #g { font-size: 16px; }
 #h { font-size: 16px; }
-#i { }
-#j { }
+#i { font-size: 16px; }
+#j { font-size: 16px; }
 #k { font-size: 1cm; }
-#l { }
+#l { font-size: 1mm; }
 #m { font-size: 1in; }
 #n { font-size: 12pt; }
-#o { }
-#p { }
+#o { font-size: 16px; }
+#p { font-size: 1pc; }
 #q { font-size: 100%; }
 Expected result:
 
index 32eb0d6..170f0f3 100644 (file)
@@ -1,6 +1,6 @@
 Test parsing of CSS '\r\n' newline characters.
 
-FAILURE
+SUCCESS
 
 Rules from the stylesheet:
 
index 2d74910..43759c8 100644 (file)
@@ -17,5 +17,5 @@ shouldBe('test("-webkit-transform-origin: 10% 10% 10px", "-webkit-transform-orig
 shouldBeEqualToString('test("-webkit-transform-origin: 10px 10px 10%", "-webkit-transform-origin")', '');
 shouldBe('test("-webkit-transform-origin: 10px 10px 10px", "-webkit-transform-origin")', '"10px 10px 10px"');
 shouldBeEqualToString('test("-webkit-transform-origin: left top 10%", "-webkit-transform-origin")', '');
-shouldBe('test("-webkit-transform-origin: left top 10px", "-webkit-transform-origin")', '"0% 0% 10px"');
+shouldBe('test("-webkit-transform-origin: left top 10px", "-webkit-transform-origin")', '"left top 10px"');
 shouldBeEqualToString('test("-webkit-transform-origin: left top left", "-webkit-transform-origin")', '');
index f4ae017..c739ec2 100644 (file)
@@ -12,8 +12,8 @@ transition property (after):
 transition duration (after): 
 transition timing function (after): 
 
-transform origin (before): 0% 30%
-transform origin X (before): 0%
+transform origin (before): left 30%
+transform origin X (before): left
 transform origin Y (before): 30%
 transform origin (after): 
 transform origin X (after): 
index 791e52b..9d193f6 100644 (file)
@@ -8,7 +8,7 @@ PASS test("-webkit-transform-origin: 10% 10% 10px", "-webkit-transform-origin")
 PASS test("-webkit-transform-origin: 10px 10px 10%", "-webkit-transform-origin") is ""
 PASS test("-webkit-transform-origin: 10px 10px 10px", "-webkit-transform-origin") is "10px 10px 10px"
 PASS test("-webkit-transform-origin: left top 10%", "-webkit-transform-origin") is ""
-PASS test("-webkit-transform-origin: left top 10px", "-webkit-transform-origin") is "0% 0% 10px"
+PASS test("-webkit-transform-origin: left top 10px", "-webkit-transform-origin") is "left top 10px"
 PASS test("-webkit-transform-origin: left top left", "-webkit-transform-origin") is ""
 PASS successfullyParsed is true
 
index a71fd8e..b9d4ba1 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 <body>
-linear-gradient(to top, rgb(204, 0, 102), white)<br>
+linear-gradient(to top, #c06, white)<br>
 linear-gradient(to top, green, white)
 </body>
 </html>
index 7e0f2a6..59f3f90 100644 (file)
@@ -25,7 +25,7 @@ TEST CASE: -webkit-grabbing
 Cursor Info: type=Grabbing hotSpot=0,0
 
 TEST CASE: Existing 25x25 image
-Cursor Info: type=Custom hotSpot=0,0 image=25x25
+Cursor Info: type=IBeam hotSpot=0,0
 
 TEST CASE: Invalid URL with fallback to pointer
 Cursor Info: type=Hand hotSpot=0,0
index 6e3a994..e7dd6b5 100644 (file)
@@ -1,15 +1,15 @@
 Note that background is buggy right now!
 Test
 background-image: initial (original property was background)
+background-position-x: initial (original property was background)
+background-position-y: initial (original property was background)
+background-size: initial (original property was background)
 background-repeat-x: initial (original property was background)
 background-repeat-y: initial (original property was background)
 background-attachment: initial (original property was background)
-background-position-x: initial (original property was background)
-background-position-y: initial (original property was background)
 background-origin: initial (original property was background)
 background-clip: initial (original property was background)
 background-color: purple (original property was background)
-background-size: initial (original property was background)
 margin-top: 1em (original property was margin)
 margin-right: 1em (original property was margin and property was implicitly set.)
 margin-bottom: 1em (original property was margin and property was implicitly set.)
index 8cdc675..3f09a7a 100644 (file)
@@ -10,7 +10,7 @@
     if (window.testRunner)
         testRunner.dumpDOMAsWebArchive();
   &lt;/script&gt;
-  &lt;rect id="rect" width="100" height="100" fill="red" style="fill: rgb(0, 128, 0);"/&gt;
+  &lt;rect id="rect" width="100" height="100" fill="red" style="fill: green;"/&gt;
   &lt;script xlink:href="resources/svg-script-subresources.js" type="text/ecmascript"/&gt;
 &lt;/svg&gt;</string>
                <key>WebResourceFrameName</key>
index dd8b624..0c9dccb 100644 (file)
@@ -1,3 +1,19 @@
+2016-12-07  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Turn back on a bunch of layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=165529
+
+        Reviewed by Zalan Bujtas.
+
+        Fixes fast/css/transform-origin-parsing.html.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::consumeTransformOrigin):
+        The implicit check was relying on a null check of the z value, but
+        we called releaseNonNull on it already. This meant all z properties were
+        marked as implicit incorrectly. Fix by storing whether or not we had a z
+        value in a local variable.
+
 2016-12-07  Andreas Kling  <akling@apple.com>
 
         [iOS] Remove bitrotted FrameLoader attempt to limit page caching under memory pressure.
index 4d072c9..65c566f 100644 (file)
@@ -375,11 +375,12 @@ bool CSSPropertyParser::consumeTransformOrigin(bool important)
         m_range.consumeWhitespace();
         bool atEnd = m_range.atEnd();
         RefPtr<CSSPrimitiveValue> resultZ = consumeLength(m_range, m_context.mode, ValueRangeAll);
-        if (!resultZ && !atEnd)
+        bool hasZ = resultZ;
+        if (!hasZ && !atEnd)
             return false;
         addProperty(CSSPropertyTransformOriginX, CSSPropertyTransformOrigin, resultX.releaseNonNull(), important);
         addProperty(CSSPropertyTransformOriginY, CSSPropertyTransformOrigin, resultY.releaseNonNull(), important);
-        addProperty(CSSPropertyTransformOriginZ, CSSPropertyTransformOrigin, resultZ ? resultZ.releaseNonNull() : CSSValuePool::singleton().createValue(0, CSSPrimitiveValue::UnitTypes::CSS_PX), important, !resultZ);
+        addProperty(CSSPropertyTransformOriginZ, CSSPropertyTransformOrigin, resultZ ? resultZ.releaseNonNull() : CSSValuePool::singleton().createValue(0, CSSPrimitiveValue::UnitTypes::CSS_PX), important, !hasZ);
         
         return true;
     }