Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: third_party/WebKit/Source/core/paint/LineBoxListPainter.cpp

Issue 1363613002: Save previous paint offset in LayoutObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No union (many compilers don't allow constructors); Fix a typo perhaps caused by switching to combiā€¦ Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698