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

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

Issue 2489893002: [SPv2] Track paint offset change (Closed)
Patch Set: - Created 4 years, 1 month 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/BoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
index ada5aeb4ab34ea03b8b773512c1df234c180a902..477703da32f6a43e9fa7f742672c8d8f7aa6cd32 100644
--- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
@@ -22,6 +22,7 @@
#include "core/paint/BoxDecorationData.h"
#include "core/paint/LayoutObjectDrawingRecorder.h"
#include "core/paint/NinePieceImagePainter.h"
+#include "core/paint/ObjectPainter.h"
#include "core/paint/PaintInfo.h"
#include "core/paint/PaintLayer.h"
#include "core/paint/RoundedInnerRectClipper.h"
@@ -51,12 +52,17 @@ bool isPaintingBackgroundOfPaintContainerIntoScrollingContentsLayer(
void BoxPainter::paint(const PaintInfo& paintInfo,
const LayoutPoint& paintOffset) {
- LayoutPoint adjustedPaintOffset = paintOffset + m_layoutBox.location();
+ ObjectPainter(m_layoutBox).checkPaintOffset(paintInfo, paintOffset);
// Default implementation. Just pass paint through to the children.
+ paintChildren(paintInfo, paintOffset + m_layoutBox.location());
+}
+
+void BoxPainter::paintChildren(const PaintInfo& paintInfo,
+ const LayoutPoint& paintOffset) {
PaintInfo childInfo(paintInfo);
for (LayoutObject* child = m_layoutBox.slowFirstChild(); child;
child = child->nextSibling())
- child->paint(childInfo, adjustedPaintOffset);
+ child->paint(childInfo, paintOffset);
}
void BoxPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo,
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPainter.h ('k') | third_party/WebKit/Source/core/paint/FrameSetPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698