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

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

Issue 2489893002: [SPv2] Track paint offset change (Closed)
Patch Set: Fix test failures 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/ObjectPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
index 98c18abd55fff2f1a4611890f8a62084acaef77c..3dc68722ebe7d3c59033d0fecb30faec18ca9300 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
@@ -694,4 +694,25 @@ void ObjectPainter::paintAllPhasesAtomically(const PaintInfo& paintInfo,
m_layoutObject.paint(info, paintOffset);
}
+#if DCHECK_IS_ON()
+void ObjectPainter::doCheckPaintOffset(const PaintInfo& paintInfo,
+ const LayoutPoint& paintOffset) {
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ return;
+ if (paintInfo.getGlobalPaintFlags() != GlobalPaintNormalPhase)
pdr. 2016/11/10 07:35:32 Is this just temporary because you're computing th
Xianzhu 2016/11/10 17:41:10 Added comments to explain this: // If we are pain
pdr. 2016/11/10 18:54:11 I don't think this is a blocking issue for this pa
Xianzhu 2016/11/10 22:51:50 Yes. For example, during printing/multicol paintin
+ return;
+ if (paintInfo.context.getPaintController().isSkippingCache())
+ return;
+ // TODO(pdr): Let painter and paint property tree builder generate the same
+ // paint offset for LayoutScrollbarPart.
chrishtr 2016/11/10 18:42:00 Is there a bug filed for this?
Xianzhu 2016/11/10 22:51:50 pdr@ just filed crbug.com/664249. Added link here.
+ if (m_layoutObject.isLayoutScrollbarPart())
+ return;
+
+ LayoutPoint adjustedPaintOffset = paintOffset;
+ if (m_layoutObject.isBox())
+ adjustedPaintOffset += toLayoutBox(m_layoutObject).location();
+ DCHECK(m_layoutObject.previousPaintOffset() == adjustedPaintOffset);
+}
+#endif
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698