Index: Source/core/rendering/InlineFlowBox.cpp |
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp |
index 2b7c1fd0f15ae785a398b3c43106ed11b87db8ea..aa71555193366c35f4b10a8ff1c42da851b65d3b 100644 |
--- a/Source/core/rendering/InlineFlowBox.cpp |
+++ b/Source/core/rendering/InlineFlowBox.cpp |
@@ -22,6 +22,7 @@ |
#include "core/CSSPropertyNames.h" |
#include "core/dom/Document.h" |
+#include "core/paint/BoxPainter.h" |
#include "core/rendering/HitTestResult.h" |
#include "core/rendering/InlineTextBox.h" |
#include "core/rendering/RenderBlock.h" |
@@ -1183,12 +1184,15 @@ void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, c |
{ |
StyleImage* img = fillLayer.image(); |
bool hasFillImage = img && img->canRender(renderer(), renderer().style()->effectiveZoom()); |
+ ASSERT(!renderer().isText()); |
+ RenderBox* box = toRenderBox(&renderer()); |
+ BoxPainter boxPainter(*box); |
if ((!hasFillImage && !renderer().style()->hasBorderRadius()) || (!prevLineBox() && !nextLineBox()) || !parent()) { |
- boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op); |
+ boxPainter.paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op); |
} else if (renderer().style()->boxDecorationBreak() == DCLONE) { |
GraphicsContextStateSaver stateSaver(*paintInfo.context); |
paintInfo.context->clip(LayoutRect(rect.x(), rect.y(), width(), height())); |
- boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op); |
+ boxPainter.paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op); |
} else { |
// We have a fill image that spans multiple lines. |
// We need to adjust tx and ty by the width of all previous lines. |
@@ -1218,7 +1222,7 @@ void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, c |
GraphicsContextStateSaver stateSaver(*paintInfo.context); |
paintInfo.context->clip(LayoutRect(rect.x(), rect.y(), width(), height())); |
- boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, LayoutRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, this, rect.size(), op); |
+ boxPainter.paintFillLayerExtended(paintInfo, c, fillLayer, LayoutRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, this, rect.size(), op); |
} |
} |