Title: [144485] trunk
Revision
144485
Author
[email protected]
Date
2013-03-01 12:49:51 -0800 (Fri, 01 Mar 2013)

Log Message

getComputedStyle not implemented for -webkit-column-rule shorthand
https://bugs.webkit.org/show_bug.cgi?id=111203

Patch by Uday Kiran <[email protected]> on 2013-03-01
Reviewed by Alexis Menard.

Source/WebCore:

Implement getComputedStyle for -webkit-column-rule property.

Test: fast/css/getComputedStyle/getComputedStyle-column-rule.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

LayoutTests:

Add test to check getComputedStyle for -webkit-column-rule.

* fast/css/getComputedStyle/getComputedStyle-column-rule-expected.txt: Added.
* fast/css/getComputedStyle/getComputedStyle-column-rule.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (144484 => 144485)


--- trunk/LayoutTests/ChangeLog	2013-03-01 20:46:20 UTC (rev 144484)
+++ trunk/LayoutTests/ChangeLog	2013-03-01 20:49:51 UTC (rev 144485)
@@ -1,3 +1,15 @@
+2013-03-01  Uday Kiran  <[email protected]>
+
+        getComputedStyle not implemented for -webkit-column-rule shorthand
+        https://bugs.webkit.org/show_bug.cgi?id=111203
+
+        Reviewed by Alexis Menard.
+
+        Add test to check getComputedStyle for -webkit-column-rule.
+
+        * fast/css/getComputedStyle/getComputedStyle-column-rule-expected.txt: Added.
+        * fast/css/getComputedStyle/getComputedStyle-column-rule.html: Added.
+
 2013-03-01  Adrienne Walker  <[email protected]>
 
         [chromium] Mark rtl-iframe-absolute-overflow-scrolled as flaky.

Added: trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-column-rule-expected.txt (0 => 144485)


--- trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-column-rule-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-column-rule-expected.txt	2013-03-01 20:49:51 UTC (rev 144485)
@@ -0,0 +1,51 @@
+Test to make sure -webkit-column-rule property returns CSSValueList properly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS computedStyle.getPropertyValue('-webkit-column-rule') is "1px dotted rgb(0, 0, 0)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').toString() is "[object CSSValueList]"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText is "1px dotted rgb(0, 0, 0)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').length is 3
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX) is 1
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue() is "dotted"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyValue('-webkit-column-rule') is "0px none rgb(255, 0, 0)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').toString() is "[object CSSValueList]"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText is "0px none rgb(255, 0, 0)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').length is 3
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue() is "none"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyValue('-webkit-column-rule') is "3px dashed rgb(255, 0, 0)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').toString() is "[object CSSValueList]"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText is "3px dashed rgb(255, 0, 0)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').length is 3
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX) is 3
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue() is "dashed"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyValue('-webkit-column-rule') is "0px none rgb(0, 0, 255)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').toString() is "[object CSSValueList]"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText is "0px none rgb(0, 0, 255)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').length is 3
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue() is "none"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
+PASS computedStyle.getPropertyValue('-webkit-column-rule') is "0px hidden rgb(0, 0, 255)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').toString() is "[object CSSValueList]"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText is "0px hidden rgb(0, 0, 255)"
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').length is 3
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX) is 0
+PASS computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue() is "hidden"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-column-rule.html (0 => 144485)


--- trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-column-rule.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-column-rule.html	2013-03-01 20:49:51 UTC (rev 144485)
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<script>
+
+description("Test to make sure -webkit-column-rule property returns CSSValueList properly.")
+
+var testContainer = document.createElement("div");
+testContainer.contentEditable = true;
+document.body.appendChild(testContainer);
+
+testContainer.innerHTML = '<div id="test" style="-webkit-column-rule: thin dotted black;">hello</div>';
+
+e = document.getElementById('test');
+computedStyle = window.getComputedStyle(e, null);
+
+shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '1px dotted rgb(0, 0, 0)');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').toString()", '[object CSSValueList]');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText", '1px dotted rgb(0, 0, 0)');
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').length", "3");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX)", "1");
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue()", "dotted");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+
+e.style.webkitColumnRule="10px red";
+shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px none rgb(255, 0, 0)');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').toString()", '[object CSSValueList]');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText", '0px none rgb(255, 0, 0)');
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').length", "3");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX)", "0");
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue()", "none");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+
+e.style.webkitColumnRuleWidth="medium"
+e.style.webkitColumnRuleStyle="dashed"
+shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '3px dashed rgb(255, 0, 0)');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').toString()", '[object CSSValueList]');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText", '3px dashed rgb(255, 0, 0)');
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').length", "3");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX)", "3");
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue()", "dashed");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+
+e.style.webkitColumnRule="10px dotted blue"
+e.style.webkitColumnRuleStyle="none";
+shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px none rgb(0, 0, 255)');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').toString()", '[object CSSValueList]');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText", '0px none rgb(0, 0, 255)');
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').length", "3");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX)", "0");
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue()", "none");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
+
+e.style.webkitColumnRuleStyle="hidden";
+shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px hidden rgb(0, 0, 255)');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').toString()", '[object CSSValueList]');
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').cssText", '0px hidden rgb(0, 0, 255)');
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').length", "3");
+shouldBe("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(0).getFloatValue(CSSPrimitiveValue.CSS_PX)", "0");
+shouldBeEqualToString("computedStyle.getPropertyCSSValue('-webkit-column-rule').item(1).getStringValue()", "hidden");
+
+document.body.removeChild(testContainer);
+
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (144484 => 144485)


--- trunk/Source/WebCore/ChangeLog	2013-03-01 20:46:20 UTC (rev 144484)
+++ trunk/Source/WebCore/ChangeLog	2013-03-01 20:49:51 UTC (rev 144485)
@@ -1,3 +1,17 @@
+2013-03-01  Uday Kiran  <[email protected]>
+
+        getComputedStyle not implemented for -webkit-column-rule shorthand
+        https://bugs.webkit.org/show_bug.cgi?id=111203
+
+        Reviewed by Alexis Menard.
+
+        Implement getComputedStyle for -webkit-column-rule property.
+
+        Test: fast/css/getComputedStyle/getComputedStyle-column-rule.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
 2013-02-28  David Hyatt  <[email protected]>
 
         REGRESSION(r144318) 1-7% perf. regression on SVG/SvgHitTesting

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (144484 => 144485)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2013-03-01 20:46:20 UTC (rev 144484)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2013-03-01 20:49:51 UTC (rev 144485)
@@ -2671,6 +2671,8 @@
             return getCSSPropertyValuesForShorthandProperties(borderTopShorthand());
         case CSSPropertyBorderWidth:
             return getCSSPropertyValuesForSidesShorthand(borderWidthShorthand());
+        case CSSPropertyWebkitColumnRule:
+            return getCSSPropertyValuesForShorthandProperties(webkitColumnRuleShorthand());
         case CSSPropertyListStyle:
             return getCSSPropertyValuesForShorthandProperties(listStyleShorthand());
         case CSSPropertyMargin:
@@ -2753,7 +2755,6 @@
         case CSSPropertyWebkitAnimation:
         case CSSPropertyWebkitBorderRadius:
         case CSSPropertyWebkitColumns:
-        case CSSPropertyWebkitColumnRule:
         case CSSPropertyWebkitMarginCollapse:
         case CSSPropertyWebkitMarquee:
         case CSSPropertyWebkitMarqueeSpeed:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to