Title: [143690] trunk
Revision
143690
Author
[email protected]
Date
2013-02-21 22:25:44 -0800 (Thu, 21 Feb 2013)

Log Message

RenderTable::paintBoxDecorations sometimes draws box-shadow twice.
https://bugs.webkit.org/show_bug.cgi?id=110196

Reviewed by Simon Fraser.

Source/WebCore:

When RenderTable::paintBoxDecorations draws box-shadow, paintBackground
should not draw box-shadow. So we have to provide bleedAvoidance
parameter for RenderBox::paintBackground.

Test: fast/css/table-border-radius-with-box-shadow.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintBoxDecorations):
Provide bleedAvoidance, which determineBackgroundBleedAvoidance
returns, for paintBackground.

LayoutTests:

* fast/css/table-border-radius-with-box-shadow-expected.html: Added.
* fast/css/table-border-radius-with-box-shadow.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (143689 => 143690)


--- trunk/LayoutTests/ChangeLog	2013-02-22 06:02:37 UTC (rev 143689)
+++ trunk/LayoutTests/ChangeLog	2013-02-22 06:25:44 UTC (rev 143690)
@@ -1,3 +1,13 @@
+2013-02-21  Takashi Sakamoto  <[email protected]>
+
+        RenderTable::paintBoxDecorations sometimes draws box-shadow twice.
+        https://bugs.webkit.org/show_bug.cgi?id=110196
+
+        Reviewed by Simon Fraser.
+
+        * fast/css/table-border-radius-with-box-shadow-expected.html: Added.
+        * fast/css/table-border-radius-with-box-shadow.html: Added.
+
 2013-02-21  Ryosuke Niwa  <[email protected]>
 
         Add failing test expectations for bugs 110554 and 110555.

Added: trunk/LayoutTests/fast/css/table-border-radius-with-box-shadow-expected.html (0 => 143690)


--- trunk/LayoutTests/fast/css/table-border-radius-with-box-shadow-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/table-border-radius-with-box-shadow-expected.html	2013-02-22 06:25:44 UTC (rev 143690)
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+<head>
+  <style>
+    div {
+      width: 198px;
+      height: 98px;
+    }
+    .round {
+      border-radius: 10px;
+    }
+    .shadow {
+      box-shadow: 0 10px 2px rgba(0, 0, 0, 0.5);
+    }
+    .border {
+      border: 1px solid blue;
+    }
+  </style>
+</head>
+<body>
+  <div class="shadow border round">
+  </div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/css/table-border-radius-with-box-shadow.html (0 => 143690)


--- trunk/LayoutTests/fast/css/table-border-radius-with-box-shadow.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/table-border-radius-with-box-shadow.html	2013-02-22 06:25:44 UTC (rev 143690)
@@ -0,0 +1,27 @@
+<!doctype html>
+<html>
+<head>
+  <style>
+    table {
+      width: 200px;
+      height: 100px;
+      border-spacing: 0px;
+    }
+    .round {
+      border-radius: 10px;
+    }
+    .shadow {
+      box-shadow: 0 10px 2px rgba(0, 0, 0, 0.5);
+    }
+    .border {
+      border: 1px solid blue;
+    }
+  </style>
+</head>
+<body>
+  <!-- [bug 110196] https://bugs.webkit.org/show_bug.cgi?id=110196 -->
+  <!-- RenderTable::paintBoxDecorations sometimes draws box-shadow twice. -->
+  <table class="shadow border round">
+  </table>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (143689 => 143690)


--- trunk/Source/WebCore/ChangeLog	2013-02-22 06:02:37 UTC (rev 143689)
+++ trunk/Source/WebCore/ChangeLog	2013-02-22 06:25:44 UTC (rev 143690)
@@ -1,3 +1,21 @@
+2013-02-21  Takashi Sakamoto  <[email protected]>
+
+        RenderTable::paintBoxDecorations sometimes draws box-shadow twice.
+        https://bugs.webkit.org/show_bug.cgi?id=110196
+
+        Reviewed by Simon Fraser.
+
+        When RenderTable::paintBoxDecorations draws box-shadow, paintBackground
+        should not draw box-shadow. So we have to provide bleedAvoidance
+        parameter for RenderBox::paintBackground.
+
+        Test: fast/css/table-border-radius-with-box-shadow.html
+
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paintBoxDecorations):
+        Provide bleedAvoidance, which determineBackgroundBleedAvoidance
+        returns, for paintBackground.
+
 2013-02-21  Grzegorz Czajkowski  <[email protected]>
 
         Allow to retrieve the request data from abstract TextCheckingRequest to be accessible for WK2

Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (143689 => 143690)


--- trunk/Source/WebCore/rendering/RenderTable.cpp	2013-02-22 06:02:37 UTC (rev 143689)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp	2013-02-22 06:25:44 UTC (rev 143690)
@@ -692,9 +692,10 @@
     LayoutRect rect(paintOffset, size());
     subtractCaptionRect(rect);
 
-    if (!boxShadowShouldBeAppliedToBackground(determineBackgroundBleedAvoidance(paintInfo.context)))
+    BackgroundBleedAvoidance bleedAvoidance = determineBackgroundBleedAvoidance(paintInfo.context);
+    if (!boxShadowShouldBeAppliedToBackground(bleedAvoidance))
         paintBoxShadow(paintInfo, rect, style(), Normal);
-    paintBackground(paintInfo, rect);
+    paintBackground(paintInfo, rect, bleedAvoidance);
     paintBoxShadow(paintInfo, rect, style(), Inset);
 
     if (style()->hasBorder() && !collapseBorders())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to