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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 1840113005: Move viewport actions into an ApplyScroll callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase over my own changes Created 4 years, 8 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: third_party/WebKit/Source/core/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index 6134b5c08ff7808aa552eda99792ae1ea266c4a1..b39d631e4bd9f9b6988e09d6dd504e8a4b2d64b3 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -1032,10 +1032,16 @@ bool LayoutView::allowsOverflowClip() const
ScrollResult LayoutView::scroll(ScrollGranularity granularity, const FloatSize& delta)
{
+ // TODO(bokan): This should never get called on the main frame but it
+ // currently does via the Windows pan scrolling path. That should go through
+ // a more normalized EventHandler-like scrolling path and we should
+ // ASSERT(!frame()->isMainFrame()) here. All main frame scrolling should
+ // be handled by the ViewportScrollCallback.
+
if (!frameView())
- return ScrollResult();
+ return ScrollResult(false, false, delta.width(), delta.height());
- return frame()->applyScrollDelta(granularity, delta, false);
+ return frameView()->getScrollableArea()->userScroll(granularity, delta);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698