Title: [144145] trunk
- Revision
- 144145
- Author
- commit-qu...@webkit.org
- Date
- 2013-02-26 22:14:15 -0800 (Tue, 26 Feb 2013)
Log Message
getPropertyValue for -webkit-margin-collapse returns null, should compute the shorthand value
https://bugs.webkit.org/show_bug.cgi?id=110903
Patch by Uday Kiran <udayki...@motorola.com> on 2013-02-26
Reviewed by Alexander Pavlov.
Source/WebCore:
getPropertyValue("-webkit-margin-collapse") should compute shorthand value
when -webkit-margin-collapse is specified in CSS.
Test: fast/css/getPropertyValue-webkit-margin-collapse.html
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
LayoutTests:
Added test for getPropertyValue("-webkit-margin-collapse").
* fast/css/getPropertyValue-webkit-margin-collapse-expected.txt: Added.
* fast/css/getPropertyValue-webkit-margin-collapse.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (144144 => 144145)
--- trunk/LayoutTests/ChangeLog 2013-02-27 06:06:28 UTC (rev 144144)
+++ trunk/LayoutTests/ChangeLog 2013-02-27 06:14:15 UTC (rev 144145)
@@ -1,5 +1,17 @@
2013-02-26 Uday Kiran <udayki...@motorola.com>
+ getPropertyValue for -webkit-margin-collapse returns null, should compute the shorthand value
+ https://bugs.webkit.org/show_bug.cgi?id=110903
+
+ Reviewed by Alexander Pavlov.
+
+ Added test for getPropertyValue("-webkit-margin-collapse").
+
+ * fast/css/getPropertyValue-webkit-margin-collapse-expected.txt: Added.
+ * fast/css/getPropertyValue-webkit-margin-collapse.html: Added.
+
+2013-02-26 Uday Kiran <udayki...@motorola.com>
+
getPropertyValue for -webkit-marquee returns null, should compute the shorthand value
https://bugs.webkit.org/show_bug.cgi?id=110816
Added: trunk/LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse-expected.txt (0 => 144145)
--- trunk/LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse-expected.txt 2013-02-27 06:14:15 UTC (rev 144145)
@@ -0,0 +1,16 @@
+Bug 110903: getPropertyValue for -webkit-margin-collapse returns null, should compute the shorthand value
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS webkitMarginCollapseValue("margin-collapse1") is 'collapse separate'
+PASS webkitMarginCollapseValue("margin-collapse2") is 'discard discard'
+PASS webkitMarginCollapseValue("margin-collapse3") is 'discard separate'
+NOTE: 'foo' is an illegal CSS value for '-webkit-margin-collapse'.
+PASS webkitMarginCollapseValue("margin-collapse4") is null
+NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns null.
+PASS webkitMarginCollapseValue("margin-collapse5") is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse.html (0 => 144145)
--- trunk/LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse.html (rev 0)
+++ trunk/LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse.html 2013-02-27 06:14:15 UTC (rev 144145)
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+</html>
+ <head>
+ <title>-webkit-margin-collapse shorthand getPropertyValue test</title>
+ <style>
+ .test {
+ display: inline-block;
+ width: 5em;
+ height: 10em;
+ }
+ </style>
+ <script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ </script>
+ </head>
+ <body>
+ <div id="margin-collapse1" class="test" style="-webkit-margin-collapse: collapse separate;"></div>
+ <div id="margin-collapse2" class="test" style="-webkit-margin-collapse: discard;"></div>
+ <div id="margin-collapse3" class="test" style="-webkit-margin-before-collapse: discard; -webkit-margin-after-collapse: separate;"></div>
+ <div id="margin-collapse4" class="test" style="-webkit-margin-collapse: foo;"></div>
+ <div id="margin-collapse5" class="test" style="-webkit-margin-before-collapse: collapse;"></div>
+ <script>
+ description("<a href="" 110903: getPropertyValue for -webkit-margin-collapse returns null, should compute the shorthand value</a>");
+
+ function webkitMarginCollapseValue(id) {
+ var element = document.getElementById(id);
+ return element.style.getPropertyValue("-webkit-margin-collapse");
+ }
+
+ shouldBe('webkitMarginCollapseValue("margin-collapse1")', "'collapse separate'");
+ shouldBe('webkitMarginCollapseValue("margin-collapse2")', "'discard discard'");
+ shouldBe('webkitMarginCollapseValue("margin-collapse3")', "'discard separate'");
+ debug("NOTE: 'foo' is an illegal CSS value for '-webkit-margin-collapse'.");
+ shouldBe('webkitMarginCollapseValue("margin-collapse4")', "null");
+ debug("NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns null.")
+ shouldBe('webkitMarginCollapseValue("margin-collapse5")', "null");
+ </script>
+ <script src=""
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (144144 => 144145)
--- trunk/Source/WebCore/ChangeLog 2013-02-27 06:06:28 UTC (rev 144144)
+++ trunk/Source/WebCore/ChangeLog 2013-02-27 06:14:15 UTC (rev 144145)
@@ -1,5 +1,20 @@
2013-02-26 Uday Kiran <udayki...@motorola.com>
+ getPropertyValue for -webkit-margin-collapse returns null, should compute the shorthand value
+ https://bugs.webkit.org/show_bug.cgi?id=110903
+
+ Reviewed by Alexander Pavlov.
+
+ getPropertyValue("-webkit-margin-collapse") should compute shorthand value
+ when -webkit-margin-collapse is specified in CSS.
+
+ Test: fast/css/getPropertyValue-webkit-margin-collapse.html
+
+ * css/StylePropertySet.cpp:
+ (WebCore::StylePropertySet::getPropertyValue):
+
+2013-02-26 Uday Kiran <udayki...@motorola.com>
+
getPropertyValue for -webkit-marquee returns null, should compute the shorthand value
https://bugs.webkit.org/show_bug.cgi?id=110816
Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (144144 => 144145)
--- trunk/Source/WebCore/css/StylePropertySet.cpp 2013-02-27 06:06:28 UTC (rev 144144)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp 2013-02-27 06:14:15 UTC (rev 144145)
@@ -168,6 +168,8 @@
return fontValue();
case CSSPropertyMargin:
return get4Values(marginShorthand());
+ case CSSPropertyWebkitMarginCollapse:
+ return getShorthandValue(webkitMarginCollapseShorthand());
case CSSPropertyOverflow:
return getCommonValue(overflowShorthand());
case CSSPropertyPadding:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes