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

Unified Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp

Issue 2465983002: Rename "paint invalidation rect" etc. to "visual rect". (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/layout/PaintInvalidationState.cpp
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
index b0c29719e53a1656b70386e24b3aa8cac523930a..5153efde1d23c2c9080d506d21f49853ef941b9e 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -437,42 +437,38 @@ PaintInvalidationState::computePositionFromPaintInvalidationBacking() const {
return LayoutPoint(point);
}
-LayoutRect PaintInvalidationState::computePaintInvalidationRectInBacking()
- const {
+LayoutRect PaintInvalidationState::computeVisualRectInBacking() const {
#if ENABLE(ASSERT)
DCHECK(!m_didUpdateForChildren);
#endif
if (m_currentObject.isSVG() && !m_currentObject.isSVGRoot())
- return computePaintInvalidationRectInBackingForSVG();
+ return computeVisualRectInBackingForSVG();
- LayoutRect rect = m_currentObject.localOverflowRectForPaintInvalidation();
+ LayoutRect rect = m_currentObject.localVisualRect();
mapLocalRectToPaintInvalidationBacking(rect);
return rect;
}
-LayoutRect PaintInvalidationState::computePaintInvalidationRectInBackingForSVG()
- const {
+LayoutRect PaintInvalidationState::computeVisualRectInBackingForSVG() const {
LayoutRect rect;
if (m_cachedOffsetsEnabled) {
- FloatRect svgRect = SVGLayoutSupport::localOverflowRectForPaintInvalidation(
- m_currentObject);
- rect = SVGLayoutSupport::transformPaintInvalidationRect(
- m_currentObject, m_svgTransform, svgRect);
+ FloatRect svgRect = SVGLayoutSupport::localVisualRect(m_currentObject);
+ rect = SVGLayoutSupport::transformVisualRect(m_currentObject,
+ m_svgTransform, svgRect);
rect.move(m_paintOffset);
if (m_clipped)
rect.intersect(m_clipRect);
#ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY
- LayoutRect slowPathRect =
- SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(
- m_currentObject, *m_paintInvalidationContainer);
+ LayoutRect slowPathRect = SVGLayoutSupport::visualRectInAncestorSpace(
+ m_currentObject, *m_paintInvalidationContainer);
assertFastPathAndSlowPathRectsEqual(rect, slowPathRect);
#endif
} else {
// TODO(wangxianzhu): Sometimes m_cachedOffsetsEnabled==false doesn't mean
// we can't use cached m_svgTransform. We can use hybrid fast path (for SVG)
// and slow path (for things above the SVGRoot).
- rect = SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(
+ rect = SVGLayoutSupport::visualRectInAncestorSpace(
m_currentObject, *m_paintInvalidationContainer);
}
@@ -597,11 +593,9 @@ void PaintInvalidationState::assertFastPathAndSlowPathRectsEqual(
return;
}
- WTFLogAlways(
- "Fast path paint invalidation rect differs from slow path: fast: %s vs "
- "slow: %s",
- fastPathRect.toString().ascii().data(),
- slowPathRect.toString().ascii().data());
+ LOG(ERROR) << "Fast path visual rect differs from slow path: fast: "
+ << fastPathRect.toString()
+ << " vs slow: " << slowPathRect.toString();
showLayoutTree(&m_currentObject);
ASSERT_NOT_REACHED();

Powered by Google App Engine
This is Rietveld 408576698