Title: [167935] trunk
Revision
167935
Author
zol...@webkit.org
Date
2014-04-29 09:16:11 -0700 (Tue, 29 Apr 2014)

Log Message

[CSS Shapes] complex calc values for shape-margin return null for computed style
https://bugs.webkit.org/show_bug.cgi?id=132313

Reviewed by Bem Jones-Bey.

Source/WebCore:
We need to pass RenderStyle* to the cssValuePool when parsing
shape-margin in order to use calc() as a parameter.

I've added the new test case to parsing-shape-margin.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):

LayoutTests:
* fast/shapes/parsing/parsing-shape-margin.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (167934 => 167935)


--- trunk/LayoutTests/ChangeLog	2014-04-29 16:15:14 UTC (rev 167934)
+++ trunk/LayoutTests/ChangeLog	2014-04-29 16:16:11 UTC (rev 167935)
@@ -1,3 +1,12 @@
+2014-04-29  Zoltan Horvath  <zol...@webkit.org>
+
+        [CSS Shapes] complex calc values for shape-margin return null for computed style
+        https://bugs.webkit.org/show_bug.cgi?id=132313
+
+        Reviewed by Bem Jones-Bey.
+
+        * fast/shapes/parsing/parsing-shape-margin.html:
+
 2014-04-29  Chris Fleizach  <cfleiz...@apple.com>
 
         AX: Row span info is wrong for table cells when a footer section is placed above a body section

Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-margin-expected.txt (167934 => 167935)


--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-margin-expected.txt	2014-04-29 16:15:14 UTC (rev 167934)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-margin-expected.txt	2014-04-29 16:16:11 UTC (rev 167935)
@@ -21,6 +21,7 @@
 PASS getComputedStyleValue("-webkit-shape-margin", "-5em") is "0px"
 PASS getComputedStyleValue("-webkit-shape-margin", "identifier") is "0px"
 PASS getComputedStyleValue("-webkit-shape-margin", "'string'") is "0px"
+PASS getComputedStyleValue("-webkit-shape-margin", "calc(25%*3 - 10in)") is "calc(75% - 960px)"
 PASS getChildComputedStyle("-webkit-shape-margin", "0", "0") is "0px"
 PASS getChildComputedStyle("-webkit-shape-margin", "0", "1px") is "1px"
 PASS getChildComputedStyle("-webkit-shape-margin", "1px", "-1em") is "0px"

Modified: trunk/LayoutTests/fast/shapes/parsing/parsing-shape-margin.html (167934 => 167935)


--- trunk/LayoutTests/fast/shapes/parsing/parsing-shape-margin.html	2014-04-29 16:15:14 UTC (rev 167934)
+++ trunk/LayoutTests/fast/shapes/parsing/parsing-shape-margin.html	2014-04-29 16:16:11 UTC (rev 167935)
@@ -27,7 +27,8 @@
      ["-webkit-shape-margin", "1px", "1px"],
      ["-webkit-shape-margin", "-5em", "0px"],
      ["-webkit-shape-margin", "identifier", "0px"],
-     ["-webkit-shape-margin", "\'string\'", "0px"]]
+     ["-webkit-shape-margin", "\'string\'", "0px"],
+     ["-webkit-shape-margin", "calc(25%*3 - 10in)", "calc(75% - 960px)"]]
 );
 
 applyToEachArglist(

Modified: trunk/Source/WebCore/ChangeLog (167934 => 167935)


--- trunk/Source/WebCore/ChangeLog	2014-04-29 16:15:14 UTC (rev 167934)
+++ trunk/Source/WebCore/ChangeLog	2014-04-29 16:16:11 UTC (rev 167935)
@@ -1,3 +1,18 @@
+2014-04-29  Zoltan Horvath  <zol...@webkit.org>
+
+        [CSS Shapes] complex calc values for shape-margin return null for computed style
+        https://bugs.webkit.org/show_bug.cgi?id=132313
+
+        Reviewed by Bem Jones-Bey.
+
+        We need to pass RenderStyle* to the cssValuePool when parsing
+        shape-margin in order to use calc() as a parameter.
+
+        I've added the new test case to parsing-shape-margin.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+
 2014-04-29  Chris Fleizach  <cfleiz...@apple.com>
 
         AX: Row span info is wrong for table cells when a footer section is placed above a body section

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (167934 => 167935)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2014-04-29 16:15:14 UTC (rev 167934)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2014-04-29 16:16:11 UTC (rev 167935)
@@ -2806,7 +2806,7 @@
 #endif
 #if ENABLE(CSS_SHAPES)
         case CSSPropertyWebkitShapeMargin:
-            return cssValuePool().createValue(style->shapeMargin());
+            return cssValuePool().createValue(style->shapeMargin(), style.get());
         case CSSPropertyWebkitShapeImageThreshold:
             return cssValuePool().createValue(style->shapeImageThreshold(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitShapeOutside:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to