Title: [113770] trunk
Revision
113770
Author
[email protected]
Date
2012-04-10 14:41:08 -0700 (Tue, 10 Apr 2012)

Log Message

CSS box-shadow default color should be something other than transparent
https://bugs.webkit.org/show_bug.cgi?id=58511

Patch by Dave Tharp <[email protected]> on 2012-04-10
Reviewed by Simon Fraser.

Source/WebCore:

If box-shadow or text-shadow color is not specified, color defaults to
the value specified in the 'color' property of the element (as specified in W3C
spec).

Test: fast/text/text-shadow-no-default-color.html. Also existing
tests ietestcenter/css3/box-shadow-002 and ietestcenter/css3/box-shadow-003

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):

LayoutTests:

Added new test for the case where no color is specified for text
shadow. This test and two others are marked as expected fail pending
rebaseline.

* fast/text/text-shadow-no-default-color.html: Added.
* platform/chromium/test_expectations.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (113769 => 113770)


--- trunk/LayoutTests/ChangeLog	2012-04-10 21:28:57 UTC (rev 113769)
+++ trunk/LayoutTests/ChangeLog	2012-04-10 21:41:08 UTC (rev 113770)
@@ -1,3 +1,17 @@
+2012-04-10  Dave Tharp  <[email protected]>
+
+        CSS box-shadow default color should be something other than transparent
+        https://bugs.webkit.org/show_bug.cgi?id=58511
+
+        Reviewed by Simon Fraser.
+
+        Added new test for the case where no color is specified for text 
+        shadow. This test and two others are marked as expected fail pending
+        rebaseline.
+
+        * fast/text/text-shadow-no-default-color.html: Added.
+        * platform/chromium/test_expectations.txt:
+
 2012-04-10  Chris Rogers  <[email protected]>
 
         AudioParam must support connections from audio-rate signals

Added: trunk/LayoutTests/fast/text/text-shadow-no-default-color.html (0 => 113770)


--- trunk/LayoutTests/fast/text/text-shadow-no-default-color.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/text-shadow-no-default-color.html	2012-04-10 21:41:08 UTC (rev 113770)
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+        <title>CSS Test: The 'text-shadow' property applied with no color specified</title>
+        <link rel="author" title="Codeaurora" href=""
+        <link rel="help" href=""
+        <meta name="flags" content="">
+        <meta name="assert" content="The 'text-shadow' property should get it's color from the color property if not specified in the text-shadow definition.">
+        <style type="text/css">
+            #test
+            {
+                font-size: 30px;
+                font-family: Ahem;
+                margin: 25px;
+                color: green;
+                text-shadow: 10px 35px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there are two green rectangles on the page.</p>
+        <div id="test">FillerText</div>
+    </body>
+</html>

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (113769 => 113770)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-04-10 21:28:57 UTC (rev 113769)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-04-10 21:41:08 UTC (rev 113770)
@@ -3798,6 +3798,11 @@
 BUGWK19688 SKIP : fast/images/exif-orientation.html = FAIL
 BUGWK19688 SKIP : fast/images/exif-orientation-css.html = FAIL
 
+// Temp: need to rebaseline.
+BUGWK58511 : ietestcenter/css3/bordersbackgrounds/box-shadow-002.htm = IMAGE
+BUGWK58511 : ietestcenter/css3/bordersbackgrounds/box-shadow-003.htm = IMAGE
+BUGWK58511 : fast/text/text-shadow-no-default-color.html = FAIL MISSING
+
 BUGCR122448 : media/video-seek-past-end-paused.html = PASS TEXT
 
 BUGCR122462 WIN LINUX : http/tests/inspector/inspect-element.html = TEXT

Modified: trunk/Source/WebCore/ChangeLog (113769 => 113770)


--- trunk/Source/WebCore/ChangeLog	2012-04-10 21:28:57 UTC (rev 113769)
+++ trunk/Source/WebCore/ChangeLog	2012-04-10 21:41:08 UTC (rev 113770)
@@ -1,3 +1,20 @@
+2012-04-10  Dave Tharp  <[email protected]>
+
+        CSS box-shadow default color should be something other than transparent
+        https://bugs.webkit.org/show_bug.cgi?id=58511
+
+        Reviewed by Simon Fraser.
+
+        If box-shadow or text-shadow color is not specified, color defaults to 
+        the value specified in the 'color' property of the element (as specified in W3C 
+        spec).
+
+        Test: fast/text/text-shadow-no-default-color.html. Also existing
+        tests ietestcenter/css3/box-shadow-002 and ietestcenter/css3/box-shadow-003
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::collectMatchingRulesForList):
+
 2012-04-10  Chris Rogers  <[email protected]>
 
         AudioParam must support connections from audio-rate signals

Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (113769 => 113770)


--- trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-04-10 21:28:57 UTC (rev 113769)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-04-10 21:41:08 UTC (rev 113770)
@@ -3437,6 +3437,9 @@
             Color color;
             if (item->color)
                 color = colorFromPrimitiveValue(item->color.get());
+            else if (m_style)
+                color = m_style->color();
+
             OwnPtr<ShadowData> shadowData = adoptPtr(new ShadowData(x, y, blur, spread, shadowStyle, id == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparent));
             if (id == CSSPropertyTextShadow)
                 m_style->setTextShadow(shadowData.release(), i.index()); // add to the list if this is not the first entry
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to