| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |