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

Side by Side Diff: Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp

Issue 14678013: Forward velocity to the fling gesture handler. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/Platform/chromium/public/WebInputHandlerClient.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h andleGestureFling(const WebGestureEvent& gestureEvent) 219 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h andleGestureFling(const WebGestureEvent& gestureEvent)
220 { 220 {
221 WebInputHandlerClient::ScrollStatus scrollStatus; 221 WebInputHandlerClient::ScrollStatus scrollStatus;
222 222
223 if (gestureEvent.sourceDevice == WebGestureEvent::Touchpad) { 223 if (gestureEvent.sourceDevice == WebGestureEvent::Touchpad) {
224 scrollStatus = m_inputHandlerClient->scrollBegin(WebPoint(gestureEvent.x , gestureEvent.y), WebInputHandlerClient::ScrollInputTypeNonBubblingGesture); 224 scrollStatus = m_inputHandlerClient->scrollBegin(WebPoint(gestureEvent.x , gestureEvent.y), WebInputHandlerClient::ScrollInputTypeNonBubblingGesture);
225 } else { 225 } else {
226 if (!m_gestureScrollOnImplThread) { 226 if (!m_gestureScrollOnImplThread) {
227 scrollStatus = WebInputHandlerClient::ScrollStatusOnMainThread; 227 scrollStatus = WebInputHandlerClient::ScrollStatusOnMainThread;
228 } else { 228 } else {
229 scrollStatus = m_inputHandlerClient->flingScrollBegin(); 229 scrollStatus = m_inputHandlerClient->flingScrollBegin(WebFloatSize(g estureEvent.data.flingStart.velocityX, gestureEvent.data.flingStart.velocityY));
230 } 230 }
231 } 231 }
232 232
233 #ifndef NDEBUG 233 #ifndef NDEBUG
234 m_expectScrollUpdateEnd = false; 234 m_expectScrollUpdateEnd = false;
235 #endif 235 #endif
236 236
237 switch (scrollStatus) { 237 switch (scrollStatus) {
238 case WebInputHandlerClient::ScrollStatusStarted: { 238 case WebInputHandlerClient::ScrollStatusStarted: {
239 if (gestureEvent.sourceDevice == WebGestureEvent::Touchpad) 239 if (gestureEvent.sourceDevice == WebGestureEvent::Touchpad)
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 TRACE_EVENT2("webkit", "WebCompositorInputHandlerImpl::notifyCurrentFlingVel ocity", "vx", velocity.width, "vy", velocity.height); 382 TRACE_EVENT2("webkit", "WebCompositorInputHandlerImpl::notifyCurrentFlingVel ocity", "vx", velocity.width, "vy", velocity.height);
383 m_inputHandlerClient->notifyCurrentFlingVelocity(toClientScrollIncrement(vel ocity)); 383 m_inputHandlerClient->notifyCurrentFlingVelocity(toClientScrollIncrement(vel ocity));
384 } 384 }
385 385
386 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging() 386 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging()
387 { 387 {
388 m_flingActiveOnMainThread = false; 388 m_flingActiveOnMainThread = false;
389 } 389 }
390 390
391 } 391 }
OLDNEW
« no previous file with comments | « Source/Platform/chromium/public/WebInputHandlerClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698