| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 m_inputHandlerClient->pinchGestureUpdate(gestureEvent.data.pinchUpdate.s
cale, WebPoint(gestureEvent.x, gestureEvent.y)); | 200 m_inputHandlerClient->pinchGestureUpdate(gestureEvent.data.pinchUpdate.s
cale, WebPoint(gestureEvent.x, gestureEvent.y)); |
| 201 return DidHandle; | 201 return DidHandle; |
| 202 } else if (event.type == WebInputEvent::GestureFlingStart) { | 202 } else if (event.type == WebInputEvent::GestureFlingStart) { |
| 203 const WebGestureEvent& gestureEvent = *static_cast<const WebGestureEvent
*>(&event); | 203 const WebGestureEvent& gestureEvent = *static_cast<const WebGestureEvent
*>(&event); |
| 204 return handleGestureFling(gestureEvent); | 204 return handleGestureFling(gestureEvent); |
| 205 } else if (event.type == WebInputEvent::GestureFlingCancel) { | 205 } else if (event.type == WebInputEvent::GestureFlingCancel) { |
| 206 if (cancelCurrentFling()) | 206 if (cancelCurrentFling()) |
| 207 return DidHandle; | 207 return DidHandle; |
| 208 else if (!m_flingActiveOnMainThread) | 208 else if (!m_flingActiveOnMainThread) |
| 209 return DropEvent; | 209 return DropEvent; |
| 210 #if ENABLE(TOUCH_EVENT_TRACKING) |
| 210 } else if (event.type == WebInputEvent::TouchStart) { | 211 } else if (event.type == WebInputEvent::TouchStart) { |
| 211 const WebTouchEvent& touchEvent = *static_cast<const WebTouchEvent*>(&ev
ent); | 212 const WebTouchEvent& touchEvent = *static_cast<const WebTouchEvent*>(&ev
ent); |
| 212 if (!m_inputHandlerClient->haveTouchEventHandlersAt(touchEvent.touches[0
].position)) | 213 if (!m_inputHandlerClient->haveTouchEventHandlersAt(touchEvent.touches[0
].position)) |
| 213 return DropEvent; | 214 return DropEvent; |
| 215 #endif |
| 214 } else if (WebInputEvent::isKeyboardEventType(event.type)) { | 216 } else if (WebInputEvent::isKeyboardEventType(event.type)) { |
| 215 cancelCurrentFling(); | 217 cancelCurrentFling(); |
| 216 } | 218 } |
| 217 | 219 |
| 218 return DidNotHandle; | 220 return DidNotHandle; |
| 219 } | 221 } |
| 220 | 222 |
| 221 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
andleGestureFling(const WebGestureEvent& gestureEvent) | 223 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
andleGestureFling(const WebGestureEvent& gestureEvent) |
| 222 { | 224 { |
| 223 WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient->scr
ollBegin(WebPoint(gestureEvent.x, gestureEvent.y), WebInputHandlerClient::Scroll
InputTypeNonBubblingGesture); | 225 WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient->scr
ollBegin(WebPoint(gestureEvent.x, gestureEvent.y), WebInputHandlerClient::Scroll
InputTypeNonBubblingGesture); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 m_flingParameters.cumulativeScroll.height += increment.height; | 360 m_flingParameters.cumulativeScroll.height += increment.height; |
| 359 } | 361 } |
| 360 } | 362 } |
| 361 | 363 |
| 362 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging() | 364 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging() |
| 363 { | 365 { |
| 364 m_flingActiveOnMainThread = false; | 366 m_flingActiveOnMainThread = false; |
| 365 } | 367 } |
| 366 | 368 |
| 367 } | 369 } |
| OLD | NEW |