Chromium Code Reviews| 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 |