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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 1056983004: OverscrollGlow for mainThread-{BLINK CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 5 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
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.cpp ('k') | public/web/WebWidgetClient.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 870913bbd6e4a9e2bfee1a1f3deac1a83680c753..e3cec21323d309818d2b7570dee52ce354d2e260 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -727,6 +727,13 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
// Perhaps we could simplify things by rewriting scroll handling to work inner frame
// out, and then unify with other gesture events.
eventSwallowed = mainFrameImpl()->frame()->eventHandler().handleGestureScrollEvent(platformEvent);
+ {
+ FloatPoint unusedDelta = mainFrameImpl()->frame()->eventHandler().unusedDelta();
+ if (unusedDelta != FloatPoint() && (event.type == WebInputEvent::GestureScrollUpdate)) {
+ FloatPoint accumaltedRootOverScroll = mainFrameImpl()->frame()->eventHandler().accumulatedRootOverScroll();
+ m_client->didOverScrollOnMainThread(unusedDelta.x(), unusedDelta.y(), accumaltedRootOverScroll.x(), accumaltedRootOverScroll.y(), platformEvent.position().x(), platformEvent.position().y(), platformEvent.velocityX(), platformEvent.velocityY());
aelias_OOO_until_Jul13 2015/05/01 04:45:04 Can this be called directly from handleGestureScro
MuVen 2015/05/04 09:04:18 Done.
+ }
+ }
m_client->didHandleGestureEvent(event, eventCancelled);
return eventSwallowed;
case WebInputEvent::GesturePinchBegin:
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.cpp ('k') | public/web/WebWidgetClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698