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

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

Issue 1856993004: Let mapToVisualRectInAncestorSpace apply ancestor clip if not scrollsOverflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Saturated
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 | « no previous file | 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 4ba7f63c8f90aac44e0554d93c6ec335be1f8e18..984fc3dc30d68897abfc3cbf453fa74bf2941a45 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -373,10 +373,7 @@ LayoutRect PaintInvalidationState::computePaintInvalidationRectInBackingForSVG()
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.
LayoutRect slowPathRect = SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(m_currentObject, *m_paintInvalidationContainer);
- if (m_clipped)
- slowPathRect.intersect(m_clipRect);
assertRectsEqual(m_currentObject, m_paintInvalidationContainer, rect, slowPathRect);
#endif
} else {
@@ -397,6 +394,10 @@ static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const
} else {
object.mapToVisualRectInAncestorSpace(&ancestor, rect);
}
+
+ // LayoutObject::mapToVisualRectInAncestorSpace() doesn't apply overflow clip of ancestor.
chrishtr 2016/04/06 23:18:19 Do any other call sites of mapToVisualRectInAncest
Xianzhu 2016/04/06 23:37:33 Didn't think of this. Just looked at several calls
+ if (ancestor.isBox() && !ancestor.isLayoutView() && !toLayoutBox(ancestor).scrollsOverflow())
+ rect.intersect(toLayoutBox(ancestor).overflowClipRect(LayoutPoint()));
}
void PaintInvalidationState::mapLocalRectToPaintInvalidationBacking(LayoutRect& rect) const
@@ -412,9 +413,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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698