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

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

Issue 629583002: Make compositor and blink talk in fractional scroll offset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/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 3c3dd75845240ce1c0c424648c1111c5f9aee357..f9457659d44265de14b8075e3a3cecb6ef2b9e6c 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -1056,8 +1056,11 @@ void GraphicsLayer::notifyAnimationFinished(double, WebCompositorAnimation::Targ
void GraphicsLayer::didScroll()
{
- if (m_scrollableArea)
- m_scrollableArea->scrollToOffsetWithoutAnimation(m_scrollableArea->minimumScrollPosition() + toIntSize(m_layer->layer()->scrollPosition()));
+ if (m_scrollableArea) {
+ DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + toDoubleSize(m_layer->layer()->scrollPositionDouble());
+ // FIXME: Remove the toFloatPoint(). crbug.com/414283.
+ m_scrollableArea->scrollToOffsetWithoutAnimation(toFloatPoint(newPosition));
+ }
}
} // namespace blink
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/platform/graphics/GraphicsLayerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698