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

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

Issue 1852193002: Remove LayoutView's special version mapToVisualRectInAncestorSpace(). Base URL: https://chromium.googlesource.com/chromium/src.git@SVGRootClip
Patch Set: Created 4 years, 8 months 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 | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 75d764d067454a55eeb7758f00c4bf261831c174..c833bd6ce057eae4d21b7b30fb3b0f1d14eeca07 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -99,7 +99,7 @@ PaintInvalidationState::PaintInvalidationState(const LayoutView& layoutView, Vec
return;
}
- FloatPoint point = layoutView.localToAncestorPoint(FloatPoint(), &m_paintInvalidationContainer, TraverseDocumentBoundaries | InputIsInFrameCoordinates);
+ FloatPoint point = layoutView.localToAncestorPoint(FloatPoint(), &m_paintInvalidationContainer, TraverseDocumentBoundaries);
m_paintOffset = LayoutSize(point.x(), point.y());
}
@@ -239,7 +239,7 @@ void PaintInvalidationState::updateForChildren()
// Do not clip scroll layer contents because the compositor expects the whole layer
// to be always invalidated in-time.
- if (box.usesCompositedScrolling())
+ if (box == m_paintInvalidationContainer && box.scrollsOverflow())
ASSERT(!m_clipped); // The box should establish paint invalidation container, so no m_clipped inherited.
else
addClipRectRelativeToPaintOffset(box.overflowClipRect(LayoutPoint()));
@@ -252,7 +252,7 @@ void PaintInvalidationState::updateForChildren()
static FloatPoint slowLocalToAncestorPoint(const LayoutObject& object, const LayoutBoxModelObject& ancestor, const FloatPoint& point)
{
if (object.isLayoutView())
- return toLayoutView(object).localToAncestorPoint(point, &ancestor, TraverseDocumentBoundaries | InputIsInFrameCoordinates);
+ return toLayoutView(object).localToAncestorPoint(point, &ancestor, TraverseDocumentBoundaries);
return object.localToAncestorPoint(point, &ancestor, TraverseDocumentBoundaries);
}
@@ -322,11 +322,9 @@ LayoutRect PaintInvalidationState::computePaintInvalidationRectInBackingForSVG()
static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, LayoutRect& rect)
{
- if (object.isLayoutView()) {
- toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, InputIsInFrameCoordinates, DefaultVisualRectFlags);
- } else {
- object.mapToVisualRectInAncestorSpace(&ancestor, rect);
- }
+ object.mapToVisualRectInAncestorSpace(&ancestor, rect);
+ if (ancestor.hasOverflowClip() && !toLayoutBox(ancestor).scrollsOverflow())
+ rect.intersect(toLayoutBox(ancestor).overflowClipRect(LayoutPoint()));
}
void PaintInvalidationState::mapLocalRectToPaintInvalidationBacking(LayoutRect& rect) const
@@ -342,9 +340,6 @@ void PaintInvalidationState::mapLocalRectToPaintInvalidationBacking(LayoutRect&
if (m_clipped)
rect.intersect(m_clipRect);
#if ASSERT_SAME_RESULT_SLOW_AND_FAST_PATH
- // TODO(crbug.com/597902): Slow path misses clipping of paintInvalidationContainer.
- if (m_clipped)
- slowPathRect.intersect(m_clipRect);
assertRectsEqual(m_currentObject, m_paintInvalidationContainer, rect, slowPathRect);
#endif
} else {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698