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

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: ifdefs, expectations, rtl fixes 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
Index: Source/core/rendering/RenderLayerBacking.cpp
diff --git a/Source/core/rendering/RenderLayerBacking.cpp b/Source/core/rendering/RenderLayerBacking.cpp
index 36789394ce302648fe6ea751c0d5c606bb6d038d..71f01cd242b505133ed1f1e515aee3546141c381 100644
--- a/Source/core/rendering/RenderLayerBacking.cpp
+++ b/Source/core/rendering/RenderLayerBacking.cpp
@@ -679,7 +679,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()));
@@ -691,8 +690,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
jamesr 2013/07/09 23:39:38 i think you want to add something to core.gyp to s
enne (OOO) 2013/07/09 23:43:47 I added a define here: https://codereview.chromium
+ // 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.

Powered by Google App Engine
This is Rietveld 408576698