| Index: third_party/WebKit/Source/core/paint/LineBoxListPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/LineBoxListPainter.cpp b/third_party/WebKit/Source/core/paint/LineBoxListPainter.cpp
|
| index 9415606348ee67c0743bf2b277a57f8065b220b3..8b61ab28ffecb579041b0c1b1c7df824b4a19df7 100644
|
| --- a/third_party/WebKit/Source/core/paint/LineBoxListPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/LineBoxListPainter.cpp
|
| @@ -60,24 +60,34 @@ void LineBoxListPainter::paint(const LayoutBoxModelObject& layoutObject, const P
|
| }
|
| }
|
|
|
| -static void invalidateLineBoxPaintOffsetsInternal(PaintController& paintController, InlineFlowBox* inlineBox)
|
| +static void invalidateLineBoxPaintOffsetsInternal(const LayoutObject& layoutObject, PaintController& paintController, InlineFlowBox* inlineBox)
|
| {
|
| - paintController.invalidatePaintOffset(*inlineBox);
|
| + ASSERT(layoutObject == inlineBox->layoutObject());
|
| +
|
| + if (!inlineBox->isRootInlineBox())
|
| + paintController.invalidatePaintOffset(*inlineBox);
|
| +
|
| for (InlineBox* child = inlineBox->firstChild(); child; child = child->nextOnLine()) {
|
| + if (layoutObject != child->layoutObject())
|
| + continue;
|
| if (!child->lineLayoutItem().isText() && child->boxModelObject().hasSelfPaintingLayer())
|
| continue;
|
| if (child->isInlineFlowBox())
|
| - invalidateLineBoxPaintOffsetsInternal(paintController, toInlineFlowBox(child));
|
| + invalidateLineBoxPaintOffsetsInternal(layoutObject, paintController, toInlineFlowBox(child));
|
| else
|
| paintController.invalidatePaintOffset(*child);
|
| }
|
| }
|
|
|
| -void LineBoxListPainter::invalidateLineBoxPaintOffsets(const PaintInfo& paintInfo) const
|
| +void LineBoxListPainter::invalidateLineBoxPaintOffsets(const LayoutObject& layoutObject, const PaintInfo& paintInfo) const
|
| {
|
| PaintController& paintController = paintInfo.context.paintController();
|
| - for (InlineFlowBox* curr = m_lineBoxList.firstLineBox(); curr; curr = curr->nextLineBox())
|
| - invalidateLineBoxPaintOffsetsInternal(paintController, curr);
|
| + for (InlineFlowBox* curr = m_lineBoxList.firstLineBox(); curr; curr = curr->nextLineBox()) {
|
| + // Invalidate paint offsets of the line boxes directly contained by the layoutObject.
|
| + // The other line boxes will be handled by their direct container layout objects.
|
| + if (layoutObject == curr->layoutObject())
|
| + invalidateLineBoxPaintOffsetsInternal(layoutObject, paintController, curr);
|
| + }
|
| }
|
|
|
| } // namespace blink
|
|
|