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

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

Issue 2169483002: Use scrollOrigin instead of minimumScrollPosition to calculate position. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 3 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 | « third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 59fafd85c84d2605bf8fb46e9c8d340ab60558cf..b2b48f054e2acd448886aafd59eee64eb7aae24b 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -1204,7 +1204,7 @@ void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isVis
void GraphicsLayer::didScroll()
{
if (m_scrollableArea) {
- DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + toDoubleSize(m_layer->layer()->scrollPositionDouble());
+ DoublePoint newPosition = -m_scrollableArea->scrollOrigin() + toDoubleSize(m_layer->layer()->scrollPositionDouble());
// 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.
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698