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

Unified Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Build fix Created 5 years, 6 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/modules/accessibility/AXScrollbar.cpp ('k') | Source/platform/graphics/GraphicsLayerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index 8d47b9406905e1fd2bbee892796194169828eb5b..aa293079f3c08e1eb19ef284a47bd1d93323ca6c 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -1151,9 +1151,10 @@ void GraphicsLayer::didScroll()
{
if (m_scrollableArea) {
DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + toDoubleSize(m_layer->layer()->scrollPositionDouble());
- bool cancelProgrammaticAnimations = false;
- // FIXME: Remove the toFloatPoint(). crbug.com/414283.
- m_scrollableArea->scrollToOffsetWithoutAnimation(toFloatPoint(newPosition), cancelProgrammaticAnimations);
+
+ // FrameView::setScrollPosition doesn't work for compositor commits (interacts poorly with programmatic scroll animations)
+ // so we need to use the ScrollableArea version. The FrameView method should go away soon anyway.
+ m_scrollableArea->ScrollableArea::setScrollPosition(newPosition, CompositorScroll);
}
}
« no previous file with comments | « Source/modules/accessibility/AXScrollbar.cpp ('k') | Source/platform/graphics/GraphicsLayerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698