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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h

Issue 2019583002: Don't include scroll offset in offsetFromLayoutObject for scrolling contents layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
index 7a9e6e537ae852acc77d46b34645018d4045ab4e..3cb13a2426113fc0cbabb786f862990589e0655c 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
@@ -128,6 +128,8 @@ public:
void setContentsNeedDisplay();
// LayoutRect is in the coordinate space of the layer's layout object.
void setContentsNeedDisplayInRect(const LayoutRect&, PaintInvalidationReason, const DisplayItemClient&);
+ // Invalidates just scrolling content layers.
+ void setScrollingContentsNeedDisplayInRect(const LayoutRect&, PaintInvalidationReason, const DisplayItemClient&);
// This is called only if we are tracking paint invalidation for testing, or ENABLE(ASSERT)
// for error checking and debugging.
@@ -216,6 +218,8 @@ public:
void updateScrollingBlockSelection();
+ void adjustForCompositedScrolling(const GraphicsLayer*, IntSize& offset) const;
+
private:
IntRect recomputeInterestRect(const GraphicsLayer*) const;
static bool interestRectChangedEnoughToRepaint(const IntRect& previousInterestRect, const IntRect& newInterestRect, const IntSize& layerSize);
@@ -440,6 +444,11 @@ private:
LayoutRect m_compositedBounds;
LayoutSize m_contentOffsetInCompositingLayer;
+
+ // We keep track of the scrolling contents offset, so that when it changes we can notify the ScrollingCoordinator, which
+ // passes on main-thread scrolling updates to the compositor.
+ DoubleSize m_scrollingContentsOffset;
+
unsigned m_contentOffsetInCompositingLayerDirty : 1;
unsigned m_pendingUpdateScope : 2;

Powered by Google App Engine
This is Rietveld 408576698