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

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

Issue 14296003: Remove TOUCH_EVENTS and TOUCH_EVENT_TRACKING compile-time flags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase. Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
211 } else if (event.type == WebInputEvent::TouchStart) { 210 } else if (event.type == WebInputEvent::TouchStart) {
212 const WebTouchEvent& touchEvent = *static_cast<const WebTouchEvent*>(&ev ent); 211 const WebTouchEvent& touchEvent = *static_cast<const WebTouchEvent*>(&ev ent);
213 if (!m_inputHandlerClient->haveTouchEventHandlersAt(touchEvent.touches[0 ].position)) 212 if (!m_inputHandlerClient->haveTouchEventHandlersAt(touchEvent.touches[0 ].position))
214 return DropEvent; 213 return DropEvent;
215 #endif
216 } else if (WebInputEvent::isKeyboardEventType(event.type)) { 214 } else if (WebInputEvent::isKeyboardEventType(event.type)) {
217 cancelCurrentFling(); 215 cancelCurrentFling();
218 } 216 }
219 217
220 return DidNotHandle; 218 return DidNotHandle;
221 } 219 }
222 220
223 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h andleGestureFling(const WebGestureEvent& gestureEvent) 221 WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h andleGestureFling(const WebGestureEvent& gestureEvent)
224 { 222 {
225 WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient->scr ollBegin(WebPoint(gestureEvent.x, gestureEvent.y), WebInputHandlerClient::Scroll InputTypeNonBubblingGesture); 223 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
360 m_flingParameters.cumulativeScroll.height += increment.height; 358 m_flingParameters.cumulativeScroll.height += increment.height;
361 } 359 }
362 } 360 }
363 361
364 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging() 362 void WebCompositorInputHandlerImpl::mainThreadHasStoppedFlinging()
365 { 363 {
366 m_flingActiveOnMainThread = false; 364 m_flingActiveOnMainThread = false;
367 } 365 }
368 366
369 } 367 }
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/PageWidgetDelegate.cpp ('k') | Source/WebKit/chromium/src/WebInputEventConversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698