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

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: 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
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 640748994f2cc102c31d19601cf721b0828302e2..07cd51412b75fa91b4bdf90feb659d52efbb84ad 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -727,14 +727,20 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
m_client->cancelScheduledContentIntents();
case WebInputEvent::GestureScrollEnd:
case WebInputEvent::GestureScrollUpdate:
- case WebInputEvent::GestureFlingStart:
+ case WebInputEvent::GestureFlingStart: {
// Scrolling-related gesture events invoke EventHandler recursively for each frame down
// the chain, doing a single-frame hit-test per frame. This matches handleWheelEvent.
// 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);
+ IntPoint unusedDelta = mainFrameImpl()->frame()->eventHandler().unusedDelta();
+ if (unusedDelta != IntPoint() && (event.type == WebInputEvent::GestureScrollUpdate)) {
+ IntPoint accumaltedRootOverScroll = mainFrameImpl()->frame()->eventHandler().accumaltedRootOverScroll();
+ m_client->didOverScrollOnMainThread(unusedDelta.x(), unusedDelta.y(), accumaltedRootOverScroll.x(), accumaltedRootOverScroll.y(), platformEvent.position().x(), platformEvent.position().y(), platformEvent.velocityX(), platformEvent.velocityY());
+ }
majidvp 2015/04/23 18:25:09 Overscroll should be reported on both gesture and
m_client->didHandleGestureEvent(event, eventCancelled);
return eventSwallowed;
+ }
case WebInputEvent::GesturePinchBegin:
case WebInputEvent::GesturePinchEnd:
case WebInputEvent::GesturePinchUpdate:

Powered by Google App Engine
This is Rietveld 408576698