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

Unified Diff: Source/core/rendering/PaintInvalidationState.cpp

Issue 566433002: Don't clip invalidation of composited scrolling contents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
Index: Source/core/rendering/PaintInvalidationState.cpp
diff --git a/Source/core/rendering/PaintInvalidationState.cpp b/Source/core/rendering/PaintInvalidationState.cpp
index 0cf83570ef9f92bcf6a1a5b3037c203eac431d87..7a9786d8169ac58ee2caf5477f4bae7a3b7b33c4 100644
--- a/Source/core/rendering/PaintInvalidationState.cpp
+++ b/Source/core/rendering/PaintInvalidationState.cpp
@@ -87,6 +87,15 @@ void PaintInvalidationState::applyClipIfNeeded(const RenderObject& renderer)
return;
const RenderBox& box = toRenderBox(renderer);
+ m_paintOffset -= box.scrolledContentOffset();
+
+ // Do not clip scroll layer contents because the compositor expects the whole layer
+ // to be always invalidated in-time.
+ if (box.usesCompositedScrolling()) {
+ ASSERT(!m_clipped); // The box should establish paint invalidation container, so no m_clipped inherited.
+ return;
+ }
+
LayoutRect clipRect(toPoint(m_paintOffset), box.layer()->size());
if (m_clipped) {
m_clipRect.intersect(clipRect);
@@ -94,7 +103,6 @@ void PaintInvalidationState::applyClipIfNeeded(const RenderObject& renderer)
m_clipRect = clipRect;
m_clipped = true;
}
- m_paintOffset -= box.scrolledContentOffset();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698