| 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 {
|
|
|