Title: [144730] trunk
- Revision
- 144730
- Author
- [email protected]
- Date
- 2013-03-04 23:33:23 -0800 (Mon, 04 Mar 2013)
Log Message
getPropertyValue for -webkit-columns returns null, should compute the shorthand value
https://bugs.webkit.org/show_bug.cgi?id=111011
Patch by Uday Kiran <[email protected]> on 2013-03-04
Reviewed by Alexander Pavlov.
Source/WebCore:
Test: fast/css/getPropertyValue-columns.html
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
LayoutTests:
Added test for getPropertyValue("-webkit-columns").
* fast/css/getPropertyValue-columns-expected.txt: Added.
* fast/css/getPropertyValue-columns.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (144729 => 144730)
--- trunk/LayoutTests/ChangeLog 2013-03-05 07:31:56 UTC (rev 144729)
+++ trunk/LayoutTests/ChangeLog 2013-03-05 07:33:23 UTC (rev 144730)
@@ -1,3 +1,15 @@
+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
+
+ Reviewed by Alexander Pavlov.
+
+ Added test for getPropertyValue("-webkit-columns").
+
+ * fast/css/getPropertyValue-columns-expected.txt: Added.
+ * fast/css/getPropertyValue-columns.html: Added.
+
2013-03-04 Vsevolod Vlasov <[email protected]>
Web Inspector: Do not accumulate file system files, add them to workspace immediately
Added: trunk/LayoutTests/fast/css/getPropertyValue-columns-expected.txt (0 => 144730)
--- trunk/LayoutTests/fast/css/getPropertyValue-columns-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/getPropertyValue-columns-expected.txt 2013-03-05 07:33:23 UTC (rev 144730)
@@ -0,0 +1,20 @@
+Bug 111011: getPropertyValue for -webkit-columns returns null, should compute the shorthand value
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS webkitColumnsValue("columns1") is "10px"
+PASS webkitColumnsValue("columns2") is "10"
+PASS webkitColumnsValue("columns3") is "10px auto"
+PASS webkitColumnsValue("columns4") is "auto"
+PASS webkitColumnsValue("columns5") is "auto 2"
+PASS webkitColumnsValue("columns6") is "10px 2"
+PASS webkitColumnsValue("columns7") is "auto auto"
+NOTE: 'foo' is an illegal CSS value for '-webkit-columns'.
+PASS webkitColumnsValue("columns8") is null
+NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns null.
+PASS webkitColumnsValue("columns9") is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/css/getPropertyValue-columns.html (0 => 144730)
--- trunk/LayoutTests/fast/css/getPropertyValue-columns.html (rev 0)
+++ trunk/LayoutTests/fast/css/getPropertyValue-columns.html 2013-03-05 07:33:23 UTC (rev 144730)
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML>
+</html>
+ <head>
+ <title>-webkit-columns shorthand getPropertyValue test</title>
+ <style>
+ .test {
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+ <script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ </script>
+ </head>
+ <body>
+ <div id="columns1" class="test" style="-webkit-columns: 10px;"></div>
+ <div id="columns2" class="test" style="-webkit-columns: 10;"></div>
+ <div id="columns3" class="test" style="-webkit-columns: 10px auto;"></div>
+ <div id="columns4" class="test" style="-webkit-columns: auto;"></div>
+ <div id="columns5" class="test" style="-webkit-columns: auto 2;"></div>
+ <div id="columns6" class="test" style="-webkit-column-width: 10px; -webkit-column-count: 2;"></div>
+ <div id="columns7" class="test" style="-webkit-column-width: auto; -webkit-column-count: auto;"></div>
+ <div id="columns8" class="test" style="-webkit-columns: foo;"></div>
+ <div id="columns9" class="test" style="-webkit-column-width: 10px;"></div>
+ <script>
+ description("<a href="" 111011: getPropertyValue for -webkit-columns returns null, should compute the shorthand value</a>");
+
+ function webkitColumnsValue(id) {
+ var element = document.getElementById(id);
+ return element.style.getPropertyValue("-webkit-columns");
+ }
+
+ shouldBeEqualToString('webkitColumnsValue("columns1")', '10px');
+ shouldBeEqualToString('webkitColumnsValue("columns2")', '10');
+ shouldBeEqualToString('webkitColumnsValue("columns3")', '10px auto');
+ shouldBeEqualToString('webkitColumnsValue("columns4")', 'auto');
+ shouldBeEqualToString('webkitColumnsValue("columns5")', 'auto 2');
+ shouldBeEqualToString('webkitColumnsValue("columns6")', '10px 2');
+ shouldBeEqualToString('webkitColumnsValue("columns7")', 'auto auto');
+ debug("NOTE: 'foo' is an illegal CSS value for '-webkit-columns'.");
+ shouldBe('webkitColumnsValue("columns8")', "null");
+ debug("NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns null.")
+ shouldBe('webkitColumnsValue("columns9")', "null");
+ </script>
+ <script src=""
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (144729 => 144730)
--- trunk/Source/WebCore/ChangeLog 2013-03-05 07:31:56 UTC (rev 144729)
+++ trunk/Source/WebCore/ChangeLog 2013-03-05 07:33:23 UTC (rev 144730)
@@ -1,3 +1,15 @@
+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
+
+ Reviewed by Alexander Pavlov.
+
+ Test: fast/css/getPropertyValue-columns.html
+
+ * css/StylePropertySet.cpp:
+ (WebCore::StylePropertySet::getPropertyValue):
+
2013-03-04 Vsevolod Vlasov <[email protected]>
Web Inspector: Do not accumulate file system files, add them to workspace immediately
Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (144729 => 144730)
--- trunk/Source/WebCore/css/StylePropertySet.cpp 2013-03-05 07:31:56 UTC (rev 144729)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp 2013-03-05 07:33:23 UTC (rev 144730)
@@ -162,6 +162,8 @@
return get4Values(borderStyleShorthand());
case CSSPropertyWebkitColumnRule:
return getShorthandValue(webkitColumnRuleShorthand());
+ case CSSPropertyWebkitColumns:
+ return getShorthandValue(webkitColumnsShorthand());
case CSSPropertyWebkitFlex:
return getShorthandValue(webkitFlexShorthand());
case CSSPropertyWebkitFlexFlow:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes