Title: [103780] trunk
Revision
103780
Author
alexis.men...@openbossa.org
Date
2011-12-28 13:26:35 -0800 (Wed, 28 Dec 2011)

Log Message

getComputedStyle for border-color is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75324

Reviewed by Andreas Kling.

Source/WebCore:

Implement getComputedStyle for border-color.

Test: fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html

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

LayoutTests:

Add test to cover that we return correct values.

* fast/css/getComputedStyle/getComputedStyle-border-color-shorthand-expected.txt: Added.
* fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (103779 => 103780)


--- trunk/LayoutTests/ChangeLog	2011-12-28 21:12:23 UTC (rev 103779)
+++ trunk/LayoutTests/ChangeLog	2011-12-28 21:26:35 UTC (rev 103780)
@@ -1,3 +1,15 @@
+2011-12-28  Alexis Menard  <alexis.men...@openbossa.org>
+
+        getComputedStyle for border-color is not implemented.
+        https://bugs.webkit.org/show_bug.cgi?id=75324
+
+        Reviewed by Andreas Kling.
+
+        Add test to cover that we return correct values.
+
+        * fast/css/getComputedStyle/getComputedStyle-border-color-shorthand-expected.txt: Added.
+        * fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html: Added.
+
 2011-12-28  Robert Hogan  <rob...@webkit.org>
 
         [Qt] fails fast/inline/nested-text-descendants.html

Added: trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-color-shorthand-expected.txt (0 => 103780)


--- trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-color-shorthand-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-color-shorthand-expected.txt	2011-12-28 21:26:35 UTC (rev 103780)
@@ -0,0 +1,73 @@
+Test to make sure border-color shorthand property returns CSSValueList properly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS computedStyle.getPropertyValue('border-color') is 'rgb(255, 0, 0) rgb(0, 0, 255) rgb(0, 128, 0) rgb(255, 255, 255)'
+PASS computedStyle.getPropertyCSSValue('border-color').toString() is '[object CSSValueList]'
+PASS computedStyle.getPropertyCSSValue('border-color').length is 4
+PASS computedStyle.getPropertyCSSValue('border-color').cssText is 'rgb(255, 0, 0) rgb(0, 0, 255) rgb(0, 128, 0) rgb(255, 255, 255)'
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
+PASS computedStyle.getPropertyValue('border-color') is 'rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0)'
+PASS computedStyle.getPropertyCSSValue('border-color').toString() is '[object CSSValueList]'
+PASS computedStyle.getPropertyCSSValue('border-color').length is 4
+PASS computedStyle.getPropertyCSSValue('border-color').cssText is 'rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0)'
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyValue('border-color') is 'rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102)'
+PASS computedStyle.getPropertyCSSValue('border-color').toString() is '[object CSSValueList]'
+PASS computedStyle.getPropertyCSSValue('border-color').length is 4
+PASS computedStyle.getPropertyCSSValue('border-color').cssText is 'rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102)'
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 102
+PASS computedStyle.getPropertyValue('border-color') is 'rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0)'
+PASS computedStyle.getPropertyCSSValue('border-color').toString() is '[object CSSValueList]'
+PASS computedStyle.getPropertyCSSValue('border-color').length is 4
+PASS computedStyle.getPropertyCSSValue('border-color').cssText is 'rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0)'
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html (0 => 103780)


--- trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html	2011-12-28 21:26:35 UTC (rev 103780)
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<script>
+
+description("Test to make sure border-color shorthand property returns CSSValueList properly.")
+
+var testContainer = document.createElement("div");
+testContainer.contentEditable = true;
+document.body.appendChild(testContainer);
+
+testContainer.innerHTML = '<div id="test">hello</div>';
+
+e = document.getElementById('test');
+computedStyle = window.getComputedStyle(e, null);
+
+e.style.borderColor = "red blue green white";
+shouldBe("computedStyle.getPropertyValue('border-color')", "'rgb(255, 0, 0) rgb(0, 0, 255) rgb(0, 128, 0) rgb(255, 255, 255)'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').toString()", "'[object CSSValueList]'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').length", "4");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').cssText", "'rgb(255, 0, 0) rgb(0, 0, 255) rgb(0, 128, 0) rgb(255, 255, 255)'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "128");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255");
+
+e.style.borderColor = "black";
+shouldBe("computedStyle.getPropertyValue('border-color')", "'rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0)'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').toString()", "'[object CSSValueList]'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').length", "4");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').cssText", "'rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0)'");;
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+
+e.style.borderColor = "rgb(102, 102, 102)";
+shouldBe("computedStyle.getPropertyValue('border-color')", "'rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102)'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').toString()", "'[object CSSValueList]'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').length", "4");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').cssText", "'rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102)'");;
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "102");
+
+e.style.borderColor = "";
+e.style.color = "black";
+e.style.border = "solid";
+shouldBe("computedStyle.getPropertyValue('border-color')", "'rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0)'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').toString()", "'[object CSSValueList]'");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').length", "4");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').cssText", "'rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0)'");;
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(1).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(2).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+shouldBe("computedStyle.getPropertyCSSValue('border-color').item(3).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0");
+document.body.removeChild(testContainer);
+
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (103779 => 103780)


--- trunk/Source/WebCore/ChangeLog	2011-12-28 21:12:23 UTC (rev 103779)
+++ trunk/Source/WebCore/ChangeLog	2011-12-28 21:26:35 UTC (rev 103780)
@@ -1,3 +1,17 @@
+2011-12-28  Alexis Menard  <alexis.men...@openbossa.org>
+
+        getComputedStyle for border-color is not implemented.
+        https://bugs.webkit.org/show_bug.cgi?id=75324
+
+        Reviewed by Andreas Kling.
+
+        Implement getComputedStyle for border-color.
+
+        Test: fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
 2011-12-28  Darin Adler  <da...@apple.com>
 
         Use OwnPtr to handle lifetime and deletion of FontFace objects

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (103779 => 103780)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2011-12-28 21:12:23 UTC (rev 103779)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2011-12-28 21:26:35 UTC (rev 103780)
@@ -2144,8 +2144,11 @@
                                         CSSPropertyBorderBottomColor };
             return getCSSPropertyValuesForShorthandProperties(properties, WTF_ARRAY_LENGTH(properties));
         }
-        case CSSPropertyBorderColor:
-            break;
+        case CSSPropertyBorderColor: {
+            const int properties[4] = { CSSPropertyBorderTopColor, CSSPropertyBorderRightColor,
+                                        CSSPropertyBorderBottomColor, CSSPropertyBorderLeftColor };
+            return getCSSPropertyValuesForShorthandProperties(properties, WTF_ARRAY_LENGTH(properties));
+        }
         case CSSPropertyBorderLeft: {
             const int properties[3] = { CSSPropertyBorderLeftWidth, CSSPropertyBorderLeftStyle,
                                         CSSPropertyBorderLeftColor };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to