Index: sky/engine/core/rendering/RenderBox.cpp |
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp |
index 59acacea1dcec48cc0d953072615bd69f7344d5b..c7d70da18919727a3a876f49f452242438096332 100644 |
--- a/sky/engine/core/rendering/RenderBox.cpp |
+++ b/sky/engine/core/rendering/RenderBox.cpp |
@@ -994,19 +994,24 @@ BackgroundBleedAvoidance RenderBox::determineBackgroundBleedAvoidance(GraphicsCo |
return BackgroundBleedClipBackground; |
} |
-void RenderBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
+void RenderBox::paintCustomPainting(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
{ |
LayoutRect paintRect = borderBoxRect(); |
paintRect.moveBy(paintOffset); |
- paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, paintRect); |
// TODO(abarth): Currently we only draw m_customPainting if we happen to |
- // have a box decoration or a background. Instead, we should probably have |
- // another function like paintBoxDecorationBackground that subclasses can |
- // call to draw m_customPainting. |
+ // have a box decoration or a background. |
if (m_customPainting) |
paintInfo.context->drawDisplayList(m_customPainting.get(), paintRect.location()); |
} |
+void RenderBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
+{ |
+ LayoutRect paintRect = borderBoxRect(); |
+ paintRect.moveBy(paintOffset); |
+ paintBoxDecorationBackgroundWithRect(paintInfo, paintOffset, paintRect); |
+ paintCustomPainting(paintInfo, paintOffset); |
+} |
+ |
void RenderBox::paintBoxDecorationBackgroundWithRect(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const LayoutRect& paintRect) |
{ |
RenderStyle* style = this->style(); |