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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2918053002: Move middle-click autoscroll to synthetic fling. (Closed)
Patch Set: Delete redundant cursor shape print Created 3 years, 6 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/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/public/web/WebWidgetClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 6fc9ba071362fce5c174ce9b9b7ee4721a4decac..4ada1b4d8be6773638ca7b15cd20abd940bb59b6 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -682,7 +682,8 @@ WebInputEventResult WebViewImpl::HandleGestureEvent(
->GetEventHandler()
.IsScrollbarHandlingGestures())
break;
- EndActiveFlingAnimation();
+ if (event.source_device != kWebGestureDeviceSyntheticAutoscroll)
+ EndActiveFlingAnimation();
position_on_fling_start_ = WebPoint(event.x, event.y);
global_position_on_fling_start_ =
WebPoint(event.global_x, event.global_y);
@@ -1983,10 +1984,12 @@ void WebViewImpl::BeginFrame(double last_frame_time_monotonic) {
WebGestureDevice last_fling_source_device = fling_source_device_;
EndActiveFlingAnimation();
- WebGestureEvent end_scroll_event = CreateGestureScrollEventFromFling(
- WebInputEvent::kGestureScrollEnd, last_fling_source_device);
- MainFrameImpl()->GetFrame()->GetEventHandler().HandleGestureScrollEnd(
- end_scroll_event);
+ if (last_fling_source_device != kWebGestureDeviceSyntheticAutoscroll) {
+ WebGestureEvent end_scroll_event = CreateGestureScrollEventFromFling(
+ WebInputEvent::kGestureScrollEnd, last_fling_source_device);
+ MainFrameImpl()->GetFrame()->GetEventHandler().HandleGestureScrollEnd(
+ end_scroll_event);
+ }
}
}
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/public/web/WebWidgetClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698