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

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

Issue 18187004: Don't update graphics layer positions during coordinated scrolling (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Set define in core.gyp Created 7 years, 5 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 | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/core/rendering/RenderLayerCompositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerBacking.cpp
diff --git a/Source/core/rendering/RenderLayerBacking.cpp b/Source/core/rendering/RenderLayerBacking.cpp
index e332490ad4f0ee6ef9bff8429d4990f984fda87c..c17383b2a00123ca448f717b1c47525059c73371 100644
--- a/Source/core/rendering/RenderLayerBacking.cpp
+++ b/Source/core/rendering/RenderLayerBacking.cpp
@@ -638,7 +638,6 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
IntSize adjustedScrollOffset = m_owningLayer->adjustedScrollOffset();
m_scrollingLayer->setPosition(FloatPoint(clientBox.location() - localCompositingBounds.location()));
m_scrollingLayer->setSize(clientBox.size());
- m_scrollingContentsLayer->setPosition(FloatPoint(-adjustedScrollOffset.width(), -adjustedScrollOffset.height()));
IntSize oldScrollingLayerOffset = m_scrollingLayer->offsetFromRenderer();
m_scrollingLayer->setOffsetFromRenderer(-toIntSize(clientBox.location()));
@@ -650,8 +649,19 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
m_scrollingContentsLayer->setNeedsDisplay();
IntSize scrollingContentsOffset = toIntSize(clientBox.location() - adjustedScrollOffset);
- if (scrollingContentsOffset != m_scrollingContentsLayer->offsetFromRenderer() || scrollSize != m_scrollingContentsLayer->size())
- compositor()->scrollingLayerDidChange(m_owningLayer);
+ if (scrollingContentsOffset != m_scrollingContentsLayer->offsetFromRenderer() || scrollSize != m_scrollingContentsLayer->size()) {
+ bool scrollingCoordinatorHandlesOffset = compositor()->scrollingLayerDidChange(m_owningLayer);
+
+#ifndef BLINK_SCROLLING_POSITION_NO_OFFSET
+ // FIXME: Remove when possible.
+ // Only required to stage multi-repo change.
+ scrollingCoordinatorHandlesOffset = false;
+#endif
+ if (scrollingCoordinatorHandlesOffset)
+ m_scrollingContentsLayer->setPosition(-m_owningLayer->scrollOrigin());
+ else
+ m_scrollingContentsLayer->setPosition(FloatPoint(-adjustedScrollOffset));
+ }
m_scrollingContentsLayer->setSize(scrollSize);
// FIXME: The paint offset and the scroll offset should really be separate concepts.
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/core/rendering/RenderLayerCompositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698