Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1772)

Unified Diff: Source/core/rendering/RenderTable.cpp

Issue 26997002: Should paint border before background when bleedAvoidance is BackgroundBleedBackgroundOverBorder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index 3ac6e839dd73e13e59f768d40684bc6ecda40400..57130925a7e2fd90a7a5a3ba9978b0b88e89aeca 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -729,10 +729,16 @@ void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& p
void RenderTable::paintBackgroundWithBorderAndBoxShadow(PaintInfo& paintInfo, const LayoutRect& rect, BackgroundBleedAvoidance bleedAvoidance)
{
+ bool needToPaintBorder = !style()->hasAppearance() && style()->hasBorder() && !collapseBorders();
+ // If bleedAvoidance is BackgroundOverBorder, we need to paint borders before painting background.
+ if (bleedAvoidance == BackgroundBleedBackgroundOverBorder && needToPaintBorder)
+ paintBorder(paintInfo, rect, style());
Julien - ping for review 2013/10/25 00:29:16 Other callers pass bleedAvoidance, shouldn't be co
tasak 2013/11/27 08:20:44 Sorry. The "BackgroundOverBorder" should be "Backg
+
paintBackground(paintInfo, rect, bleedAvoidance);
paintBoxShadow(paintInfo, rect, style(), Inset);
- if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && !style()->hasAppearance() && style()->hasBorder() && !collapseBorders())
+ // If bleedAvoidance is not BackgroundOverBorder, we need to paint borders after painting background.
+ if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && needToPaintBorder)
paintBorder(paintInfo, rect, style());
}
Julien - ping for review 2013/10/25 00:29:16 This function is now very similar to the one in Re
tasak 2013/11/27 08:20:44 I see. I added collapsedBorder() to RenderBox and

Powered by Google App Engine
This is Rietveld 408576698