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

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

Issue 2513293002: Revert of Avoid special handling of LayoutSVGForeignObject about its paint offset (Closed)
Patch Set: Rebase (with good parts kept) 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d51dbd3c0c76ac0868a6b0d4a12cf1335b6e4750..00b1c4d2e0ca3867e5e260152bb22f28c877cc1c 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
@@ -699,11 +699,14 @@ void ObjectPainter::doCheckPaintOffset(const PaintInfo& paintInfo,
const LayoutPoint& paintOffset) {
DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
- // 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())
+ // 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());
return;
+ }
// TODO(pdr): Let painter and paint property tree builder generate the same
// paint offset for LayoutScrollbarPart. crbug.com/664249.
@@ -711,8 +714,7 @@ void ObjectPainter::doCheckPaintOffset(const PaintInfo& paintInfo,
return;
LayoutPoint adjustedPaintOffset = paintOffset;
- // TODO(wangxianzhu): Avoid the special treatment for SVGText.
- if (m_layoutObject.isBox() && !m_layoutObject.isSVGText())
+ if (m_layoutObject.isBox())
adjustedPaintOffset += toLayoutBox(m_layoutObject).location();
DCHECK(m_layoutObject.previousPaintOffset() == adjustedPaintOffset)
<< " Paint offset mismatch: " << m_layoutObject.debugName()
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698