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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 139493003: Early terminate flings when scrolling impossible (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Split up patch accordingly Created 6 years, 9 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/web/WebViewImpl.h ('k') | public/platform/WebGestureCurveTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 9bbc57e15937f157cf554080c4cbd57548f8581a..7a2610108d101f1b2a9ee74fa5f2544f70bfb61d 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -557,7 +557,7 @@ bool WebViewImpl::handleMouseWheel(LocalFrame& mainFrame, const WebMouseWheelEve
return PageWidgetEventHandler::handleMouseWheel(mainFrame, event);
}
-void WebViewImpl::scrollBy(const WebFloatSize& delta)
+bool WebViewImpl::scrollBy(const WebFloatSize& delta, const WebFloatSize& velocity)
{
if (m_flingSourceDevice == WebGestureEvent::Touchpad) {
WebMouseWheelEvent syntheticWheel;
@@ -575,7 +575,7 @@ void WebViewImpl::scrollBy(const WebFloatSize& delta)
syntheticWheel.modifiers = m_flingModifier;
if (m_page && m_page->mainFrame() && m_page->mainFrame()->view())
- handleMouseWheel(*m_page->mainFrame(), syntheticWheel);
+ return handleMouseWheel(*m_page->mainFrame(), syntheticWheel);
} else {
WebGestureEvent syntheticGestureEvent;
@@ -590,8 +590,14 @@ void WebViewImpl::scrollBy(const WebFloatSize& delta)
syntheticGestureEvent.sourceDevice = WebGestureEvent::Touchscreen;
if (m_page && m_page->mainFrame() && m_page->mainFrame()->view())
- handleGestureEvent(syntheticGestureEvent);
+ return handleGestureEvent(syntheticGestureEvent);
}
+ return false;
+}
+
+void WebViewImpl::scrollBy(const WebFloatSize& delta)
+{
+ scrollBy(delta, WebFloatSize());
}
bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/platform/WebGestureCurveTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698