Title: [144732] trunk
- Revision
- 144732
- Author
- [email protected]
- Date
- 2013-03-04 23:44:47 -0800 (Mon, 04 Mar 2013)
Log Message
getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value
https://bugs.webkit.org/show_bug.cgi?id=111018
Patch by Uday Kiran <[email protected]> on 2013-03-04
Reviewed by Alexander Pavlov.
Source/WebCore:
Test: fast/css/getPropertyValue-webkit-text-stroke.html
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
LayoutTests:
Added test for getPropertyValue("-webkit-text-stroke").
* fast/css/getPropertyValue-webkit-text-stroke-expected.txt: Added.
* fast/css/getPropertyValue-webkit-text-stroke.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (144731 => 144732)
--- trunk/LayoutTests/ChangeLog 2013-03-05 07:42:51 UTC (rev 144731)
+++ trunk/LayoutTests/ChangeLog 2013-03-05 07:44:47 UTC (rev 144732)
@@ -1,5 +1,17 @@
2013-03-04 Uday Kiran <[email protected]>
+ getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value
+ https://bugs.webkit.org/show_bug.cgi?id=111018
+
+ Reviewed by Alexander Pavlov.
+
+ Added test for getPropertyValue("-webkit-text-stroke").
+
+ * fast/css/getPropertyValue-webkit-text-stroke-expected.txt: Added.
+ * fast/css/getPropertyValue-webkit-text-stroke.html: Added.
+
+2013-03-04 Uday Kiran <[email protected]>
+
getPropertyValue for -webkit-columns returns null, should compute the shorthand value
https://bugs.webkit.org/show_bug.cgi?id=111011
Added: trunk/LayoutTests/fast/css/getPropertyValue-webkit-text-stroke-expected.txt (0 => 144732)
--- trunk/LayoutTests/fast/css/getPropertyValue-webkit-text-stroke-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/getPropertyValue-webkit-text-stroke-expected.txt 2013-03-05 07:44:47 UTC (rev 144732)
@@ -0,0 +1,18 @@
+Bug 111018: getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS webkitTextStrokeValue("text-stroke1") is "thin red"
+PASS webkitTextStrokeValue("text-stroke2") is "green"
+PASS webkitTextStrokeValue("text-stroke3") is "thin"
+PASS webkitTextStrokeValue("text-stroke4") is "1px red"
+PASS webkitTextStrokeValue("text-stroke5") is "1px black"
+NOTE: 'foo' is an illegal CSS value for '-webkit-text-stroke'.
+PASS webkitTextStrokeValue("text-stroke6") is null
+NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns null.
+PASS webkitTextStrokeValue("text-stroke7") is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/css/getPropertyValue-webkit-text-stroke.html (0 => 144732)
--- trunk/LayoutTests/fast/css/getPropertyValue-webkit-text-stroke.html (rev 0)
+++ trunk/LayoutTests/fast/css/getPropertyValue-webkit-text-stroke.html 2013-03-05 07:44:47 UTC (rev 144732)
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+</html>
+ <head>
+ <title>-webkit-text-stroke shorthand getPropertyValue test</title>
+ <style>
+ .test {
+ width: 5em;
+ height: 10em;
+ }
+ </style>
+ <script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ </script>
+ </head>
+ <body>
+ <div id="text-stroke1" class="test" style="-webkit-text-stroke: thin red;"></div>
+ <div id="text-stroke2" class="test" style="-webkit-text-stroke: green;"></div>
+ <div id="text-stroke3" class="test" style="-webkit-text-stroke: thin;"></div>
+ <div id="text-stroke4" class="test" style="-webkit-text-stroke: 1px red;"></div>
+ <div id="text-stroke5" class="test" style="-webkit-text-stroke-width: 1px; -webkit-text-stroke-color: black;"></div>
+ <div id="text-stroke6" class="test" style="-webkit-text-stroke: foo;"></div>
+ <div id="text-stroke7" class="test" style="-webkit-text-stroke-color: green;"></div>
+ <script>
+ description("<a href="" 111018: getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value</a>");
+
+ function webkitTextStrokeValue(id) {
+ var element = document.getElementById(id);
+ return element.style.getPropertyValue("-webkit-text-stroke");
+ }
+
+ shouldBeEqualToString('webkitTextStrokeValue("text-stroke1")', 'thin red');
+ shouldBeEqualToString('webkitTextStrokeValue("text-stroke2")', 'green');
+ shouldBeEqualToString('webkitTextStrokeValue("text-stroke3")', 'thin');
+ shouldBeEqualToString('webkitTextStrokeValue("text-stroke4")', '1px red');
+ shouldBeEqualToString('webkitTextStrokeValue("text-stroke5")', '1px black');
+ debug("NOTE: 'foo' is an illegal CSS value for '-webkit-text-stroke'.");
+ shouldBe('webkitTextStrokeValue("text-stroke6")', "null");
+ debug("NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns null.")
+ shouldBe('webkitTextStrokeValue("text-stroke7")', "null");
+ </script>
+ <script src=""
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (144731 => 144732)
--- trunk/Source/WebCore/ChangeLog 2013-03-05 07:42:51 UTC (rev 144731)
+++ trunk/Source/WebCore/ChangeLog 2013-03-05 07:44:47 UTC (rev 144732)
@@ -1,5 +1,17 @@
2013-03-04 Uday Kiran <[email protected]>
+ getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value
+ https://bugs.webkit.org/show_bug.cgi?id=111018
+
+ Reviewed by Alexander Pavlov.
+
+ Test: fast/css/getPropertyValue-webkit-text-stroke.html
+
+ * css/StylePropertySet.cpp:
+ (WebCore::StylePropertySet::getPropertyValue):
+
+2013-03-04 Uday Kiran <[email protected]>
+
getPropertyValue for -webkit-columns returns null, should compute the shorthand value
https://bugs.webkit.org/show_bug.cgi?id=111011
Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (144731 => 144732)
--- trunk/Source/WebCore/css/StylePropertySet.cpp 2013-03-05 07:42:51 UTC (rev 144731)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp 2013-03-05 07:44:47 UTC (rev 144732)
@@ -192,6 +192,8 @@
return getLayeredShorthandValue(webkitMaskShorthand());
case CSSPropertyWebkitTextEmphasis:
return getShorthandValue(webkitTextEmphasisShorthand());
+ case CSSPropertyWebkitTextStroke:
+ return getShorthandValue(webkitTextStrokeShorthand());
case CSSPropertyWebkitTransformOrigin:
return getShorthandValue(webkitTransformOriginShorthand());
case CSSPropertyWebkitTransition:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes