| 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 29664146d162b4275ef7c2a32bc532496bd38fbb..b2011d2eb5caf320f12a3904464a86aa0f5b8498 100644
|
| --- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
|
| @@ -699,14 +699,11 @@ void ObjectPainter::doCheckPaintOffset(const PaintInfo& paintInfo,
|
| const LayoutPoint& paintOffset) {
|
| DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
|
|
|
| - // TODO(pdr,wangxianzhu): Refactor to avoid the special treatment for SVGText,
|
| - // SVGInline, SVGInlineText and SVGForeignObject.
|
| - if (m_layoutObject.isSVG() && !m_layoutObject.isSVGRoot() &&
|
| - !m_layoutObject.isSVGForeignObject()) {
|
| - if (!m_layoutObject.isSVGInline() && !m_layoutObject.isSVGInlineText())
|
| - DCHECK(paintOffset == LayoutPoint());
|
| + // Actual paint offsets of SVGInline and SVGInlineText include location()
|
| + // of the containing SVGText, but PaintPropertyTreeBuilder doesn't output
|
| + // the paint offsets. TODO(wangxianzhu): Avoid the special treatment.
|
| + if (m_layoutObject.isSVGInline() || m_layoutObject.isSVGInlineText())
|
| return;
|
| - }
|
|
|
| // TODO(pdr): Let painter and paint property tree builder generate the same
|
| // paint offset for LayoutScrollbarPart. crbug.com/664249.
|
| @@ -714,9 +711,14 @@ void ObjectPainter::doCheckPaintOffset(const PaintInfo& paintInfo,
|
| return;
|
|
|
| LayoutPoint adjustedPaintOffset = paintOffset;
|
| - if (m_layoutObject.isBox())
|
| + // TODO(wangxianzhu): Avoid the special treatment for SVGText.
|
| + if (m_layoutObject.isBox() && !m_layoutObject.isSVGText())
|
| adjustedPaintOffset += toLayoutBox(m_layoutObject).location();
|
| - DCHECK(m_layoutObject.previousPaintOffset() == adjustedPaintOffset);
|
| + DCHECK(m_layoutObject.previousPaintOffset() == adjustedPaintOffset)
|
| + << " Paint offset mismatch: " << m_layoutObject.debugName()
|
| + << " from PaintPropertyTreeBuilder: "
|
| + << m_layoutObject.previousPaintOffset().toString()
|
| + << " from painter: " << adjustedPaintOffset.toString();
|
| }
|
| #endif
|
|
|
|
|