Title: [172757] trunk
Revision
172757
Author
[email protected]
Date
2014-08-19 13:41:08 -0700 (Tue, 19 Aug 2014)

Log Message

[CSS Shapes] A few calc() test failures in the shape-image-threshold parsing tests
https://bugs.webkit.org/show_bug.cgi?id=135926

Reviewed by Dirk Schulze.

Source/WebCore:

shape-image-threshold is a Number, so it should be parsed as one. The
default parsing doesn't support calcs, but numbers do.

No new tests, fixes exitsing test to pass.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Use
    ApplyPropertyNumber instead of ApplyPropertyDefault for
    shape-image-threshold.

LayoutTests:

* TestExpectations: Remove Failure and Crash expectations.
* css3/shapes/shape-outside/values/shape-image-threshold-001-expected.txt:
    Proper expected results now that the test passes.
* css3/shapes/shape-outside/values/shape-image-threshold-001.html:
    Adding together calcs isn't valid, so move the addition inside of
    the calc _expression_. This will also be updated upstream.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (172756 => 172757)


--- trunk/LayoutTests/ChangeLog	2014-08-19 18:57:58 UTC (rev 172756)
+++ trunk/LayoutTests/ChangeLog	2014-08-19 20:41:08 UTC (rev 172757)
@@ -1,3 +1,17 @@
+2014-08-19  Bem Jones-Bey  <[email protected]>
+
+        [CSS Shapes] A few calc() test failures in the shape-image-threshold parsing tests
+        https://bugs.webkit.org/show_bug.cgi?id=135926
+
+        Reviewed by Dirk Schulze.
+
+        * TestExpectations: Remove Failure and Crash expectations.
+        * css3/shapes/shape-outside/values/shape-image-threshold-001-expected.txt:
+            Proper expected results now that the test passes.
+        * css3/shapes/shape-outside/values/shape-image-threshold-001.html:
+            Adding together calcs isn't valid, so move the addition inside of
+            the calc _expression_. This will also be updated upstream.
+
 2014-08-19  Alexey Proskuryakov  <[email protected]>
 
         ASSERT_NOT_REACHED on css3/shapes/shape-outside/values/shape-image-threshold-001.html

Modified: trunk/LayoutTests/TestExpectations (172756 => 172757)


--- trunk/LayoutTests/TestExpectations	2014-08-19 18:57:58 UTC (rev 172756)
+++ trunk/LayoutTests/TestExpectations	2014-08-19 20:41:08 UTC (rev 172757)
@@ -154,8 +154,6 @@
 webkit.org/b/135925 css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-014.html [ ImageOnlyFailure ]
 webkit.org/b/135925 css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-015.html [ ImageOnlyFailure ]
 
-webkit.org/b/135926 css3/shapes/shape-outside/values/shape-image-threshold-001.html [ Failure ]
-
 webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-010.html [ ImageOnlyFailure ]
 webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-011.html [ ImageOnlyFailure ]
 webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-012.html [ ImageOnlyFailure ]
@@ -166,7 +164,3 @@
 webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-017.html [ ImageOnlyFailure ]
 webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-018.html [ ImageOnlyFailure ]
 webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-019.html [ ImageOnlyFailure ]
-
-[ Debug ] css3/shapes/shape-outside/values/shape-image-threshold-001.html [ Crash ]
-
-webkit.org/b/136075 [ Debug ] css3/shapes/shape-outside/values/shape-image-threshold-001.html [ Skip ]

Modified: trunk/LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-001-expected.txt (172756 => 172757)


--- trunk/LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-001-expected.txt	2014-08-19 18:57:58 UTC (rev 172756)
+++ trunk/LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-001-expected.txt	2014-08-19 20:41:08 UTC (rev 172757)
@@ -1 +1,10 @@
-PASS
\ No newline at end of file
+
+PASS calc(10/100) - inline 
+PASS calc(10/100 + 30/100) - inline 
+PASS calc(150/100) - inline 
+PASS calc(150/100 - 2) - inline 
+PASS calc(10/100) - computed 
+PASS calc(10/100 + 30/100) - computed 
+PASS calc(150/100) - computed 
+PASS calc(150/100 - 2) - computed 
+

Modified: trunk/LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-001.html (172756 => 172757)


--- trunk/LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-001.html	2014-08-19 18:57:58 UTC (rev 172756)
+++ trunk/LayoutTests/css3/shapes/shape-outside/values/shape-image-threshold-001.html	2014-08-19 20:41:08 UTC (rev 172757)
@@ -22,8 +22,8 @@
               "expected_computed": "0.1"
             },
             {
-              "actual": "calc(10/100) + calc(30/100)",
-              "expected_inline": "calc(0.1) + calc(0.3)",
+              "actual": "calc(10/100 + 30/100)",
+              "expected_inline": "calc(0.4)",
               "expected_computed": "0.4"
             },
             {

Modified: trunk/Source/WebCore/ChangeLog (172756 => 172757)


--- trunk/Source/WebCore/ChangeLog	2014-08-19 18:57:58 UTC (rev 172756)
+++ trunk/Source/WebCore/ChangeLog	2014-08-19 20:41:08 UTC (rev 172757)
@@ -1,3 +1,20 @@
+2014-08-19  Bem Jones-Bey  <[email protected]>
+
+        [CSS Shapes] A few calc() test failures in the shape-image-threshold parsing tests
+        https://bugs.webkit.org/show_bug.cgi?id=135926
+
+        Reviewed by Dirk Schulze.
+
+        shape-image-threshold is a Number, so it should be parsed as one. The
+        default parsing doesn't support calcs, but numbers do.
+
+        No new tests, fixes exitsing test to pass.
+
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Use
+            ApplyPropertyNumber instead of ApplyPropertyDefault for
+            shape-image-threshold.
+
 2014-08-18  Maciej Stachowiak  <[email protected]>
 
         Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it

Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (172756 => 172757)


--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp	2014-08-19 18:57:58 UTC (rev 172756)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp	2014-08-19 20:41:08 UTC (rev 172757)
@@ -2582,7 +2582,7 @@
     setPropertyHandler(CSSPropertyWebkitClipPath, ApplyPropertyClipPath<&RenderStyle::clipPath, &RenderStyle::setClipPath, &RenderStyle::initialClipPath>::createHandler());
 #if ENABLE(CSS_SHAPES)
     setPropertyHandler(CSSPropertyWebkitShapeMargin, ApplyPropertyLength<&RenderStyle::shapeMargin, &RenderStyle::setShapeMargin, &RenderStyle::initialShapeMargin>::createHandler());
-    setPropertyHandler(CSSPropertyWebkitShapeImageThreshold, ApplyPropertyDefault<float, &RenderStyle::shapeImageThreshold, float, &RenderStyle::setShapeImageThreshold, float, &RenderStyle::initialShapeImageThreshold>::createHandler());
+    setPropertyHandler(CSSPropertyWebkitShapeImageThreshold, ApplyPropertyNumber<float, &RenderStyle::shapeImageThreshold, &RenderStyle::setShapeImageThreshold, &RenderStyle::initialShapeImageThreshold>::createHandler());
     setPropertyHandler(CSSPropertyWebkitShapeOutside, ApplyPropertyShape<&RenderStyle::shapeOutside, &RenderStyle::setShapeOutside, &RenderStyle::initialShapeOutside>::createHandler());
 #endif
     setPropertyHandler(CSSPropertyWhiteSpace, ApplyPropertyDefault<EWhiteSpace, &RenderStyle::whiteSpace, EWhiteSpace, &RenderStyle::setWhiteSpace, EWhiteSpace, &RenderStyle::initialWhiteSpace>::createHandler());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to