Index: Source/core/rendering/InlineFlowBox.cpp |
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp |
index 6fa18101f3e2ecf145df652a8f252a6688791318..4e33600b0723597d15686d2426a251da707a5196 100644 |
--- a/Source/core/rendering/InlineFlowBox.cpp |
+++ b/Source/core/rendering/InlineFlowBox.cpp |
@@ -1229,12 +1229,14 @@ void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, c |
void InlineFlowBox::paintBoxShadow(const PaintInfo& info, RenderStyle* s, ShadowStyle shadowStyle, const LayoutRect& paintRect) |
{ |
+ ASSERT(!renderer()->isText); |
+ BoxPainter boxPainter(toRenderBox(renderer())); |
if ((!prevLineBox() && !nextLineBox()) || !parent()) |
- boxModelObject()->paintBoxShadow(info, paintRect, s, shadowStyle); |
+ boxPainter.paintBoxShadow(info, paintRect, s, shadowStyle); |
else { |
// FIXME: We can do better here in the multi-line case. We want to push a clip so that the shadow doesn't |
// protrude incorrectly at the edges, and we want to possibly include shadows cast from the previous/following lines |
- boxModelObject()->paintBoxShadow(info, paintRect, s, shadowStyle, includeLogicalLeftEdge(), includeLogicalRightEdge()); |
+ boxPainter.paintBoxShadow(info, paintRect, s, shadowStyle, includeLogicalLeftEdge(), includeLogicalRightEdge()); |
} |
} |
@@ -1333,8 +1335,11 @@ void InlineFlowBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const Lay |
// The simple case is where we either have no border image or we are the only box for this object. |
// In those cases only a single call to draw is required. |
+ ASSERT(!renderer().isText()); |
+ BoxPainter boxPainter(toRenderBox(renderer())); |
if (!hasBorderImage || (!prevLineBox() && !nextLineBox())) { |
- boxModelObject()->paintBorder(paintInfo, paintRect, renderer().style(isFirstLineStyle()), BackgroundBleedNone, includeLogicalLeftEdge(), includeLogicalRightEdge()); |
+ |
+ boxPainter.paintBorder(paintInfo, paintRect, renderer().style(isFirstLineStyle()), BackgroundBleedNone, includeLogicalLeftEdge(), includeLogicalRightEdge()); |
} else { |
// We have a border image that spans multiple lines. |
// We need to adjust tx and ty by the width of all previous lines. |
@@ -1358,7 +1363,7 @@ void InlineFlowBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const Lay |
LayoutRect clipRect = clipRectForNinePieceImageStrip(this, borderImage, paintRect); |
GraphicsContextStateSaver stateSaver(*paintInfo.context); |
paintInfo.context->clip(clipRect); |
- boxModelObject()->paintBorder(paintInfo, LayoutRect(stripX, stripY, stripWidth, stripHeight), renderer().style(isFirstLineStyle())); |
+ boxPainter.paintBorder(paintInfo, LayoutRect(stripX, stripY, stripWidth, stripHeight), renderer().style(isFirstLineStyle())); |
} |
} |
} |
@@ -1410,8 +1415,10 @@ void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffs |
// The simple case is where we are the only box for this object. In those |
// cases only a single call to draw is required. |
+ ASSERT(!renderer().isText()); |
+ BoxPainter boxPainter(toRenderBox(renderer())); |
if (!prevLineBox() && !nextLineBox()) { |
- boxModelObject()->paintNinePieceImage(paintInfo.context, LayoutRect(adjustedPaintOffset, frameRect.size()), renderer().style(), maskNinePieceImage, compositeOp); |
+ boxPainter.paintNinePieceImage(paintInfo.context, LayoutRect(adjustedPaintOffset, frameRect.size()), renderer().style(), maskNinePieceImage, compositeOp); |
} else { |
// We have a mask image that spans multiple lines. |
// We need to adjust _tx and _ty by the width of all previous lines. |
@@ -1429,7 +1436,7 @@ void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffs |
LayoutRect clipRect = clipRectForNinePieceImageStrip(this, maskNinePieceImage, paintRect); |
GraphicsContextStateSaver stateSaver(*paintInfo.context); |
paintInfo.context->clip(clipRect); |
- boxModelObject()->paintNinePieceImage(paintInfo.context, LayoutRect(stripX, stripY, stripWidth, stripHeight), renderer().style(), maskNinePieceImage, compositeOp); |
+ boxPainter.paintNinePieceImage(paintInfo.context, LayoutRect(stripX, stripY, stripWidth, stripHeight), renderer().style(), maskNinePieceImage, compositeOp); |
} |
if (pushTransparencyLayer) |