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 324b3b9486542619cdb254b77c6973acba72631e..936e97db6016a6e3e8abdf3e4fdfa27530f8deae 100644 |
--- a/third_party/WebKit/Source/core/paint/LineBoxListPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/LineBoxListPainter.cpp |
@@ -14,6 +14,7 @@ |
#include "core/paint/InlinePainter.h" |
#include "core/paint/ObjectPainter.h" |
#include "core/paint/PaintInfo.h" |
+#include "platform/graphics/paint/DisplayItemList.h" |
namespace blink { |
@@ -62,4 +63,24 @@ void LineBoxListPainter::paint(LayoutBoxModelObject* layoutObject, const PaintIn |
} |
} |
+static void invalidateLineBoxPaintOffsetsInternal(DisplayItemList* displayItemList, InlineFlowBox* inlineBox) |
+{ |
+ displayItemList->invalidatePaintOffset(*inlineBox); |
+ for (InlineBox* child = inlineBox->firstChild(); child; child = child->nextOnLine()) { |
+ if (!child->lineLayoutItem().isText() && child->boxModelObject().hasSelfPaintingLayer()) |
+ continue; |
+ if (child->isInlineFlowBox()) |
+ invalidateLineBoxPaintOffsetsInternal(displayItemList, toInlineFlowBox(child)); |
+ else |
+ displayItemList->invalidatePaintOffset(*child); |
+ } |
+} |
+ |
+void LineBoxListPainter::invalidateLineBoxPaintOffsets(const PaintInfo& paintInfo) const |
+{ |
+ DisplayItemList* displayItemList = paintInfo.context->displayItemList(); |
+ for (InlineFlowBox* curr = m_lineBoxList.firstLineBox(); curr; curr = curr->nextLineBox()) |
+ invalidateLineBoxPaintOffsetsInternal(displayItemList, curr); |
+} |
+ |
} // namespace blink |