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

Side by Side Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 1989623002: Suppressed MEs for gestures from cancelled PEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a comment. Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 switch (e.sourceDevice) { 321 switch (e.sourceDevice) {
322 case WebGestureDeviceTouchpad: 322 case WebGestureDeviceTouchpad:
323 m_source = PlatformGestureSourceTouchpad; 323 m_source = PlatformGestureSourceTouchpad;
324 break; 324 break;
325 case WebGestureDeviceTouchscreen: 325 case WebGestureDeviceTouchscreen:
326 m_source = PlatformGestureSourceTouchscreen; 326 m_source = PlatformGestureSourceTouchscreen;
327 break; 327 break;
328 case WebGestureDeviceUninitialized: 328 case WebGestureDeviceUninitialized:
329 NOTREACHED(); 329 NOTREACHED();
330 } 330 }
331
332 m_uniqueTouchEventId = e.uniqueTouchEventId;
331 } 333 }
332 334
333 // MakePlatformKeyboardEvent -------------------------------------------------- 335 // MakePlatformKeyboardEvent --------------------------------------------------
334 336
335 inline PlatformEvent::EventType toPlatformKeyboardEventType(WebInputEvent::Type type) 337 inline PlatformEvent::EventType toPlatformKeyboardEventType(WebInputEvent::Type type)
336 { 338 {
337 switch (type) { 339 switch (type) {
338 case WebInputEvent::KeyUp: 340 case WebInputEvent::KeyUp:
339 return PlatformEvent::KeyUp; 341 return PlatformEvent::KeyUp;
340 case WebInputEvent::KeyDown: 342 case WebInputEvent::KeyDown:
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 m_type = toPlatformTouchEventType(event.type); 470 m_type = toPlatformTouchEventType(event.type);
469 m_modifiers = event.modifiers; 471 m_modifiers = event.modifiers;
470 m_timestamp = event.timeStampSeconds; 472 m_timestamp = event.timeStampSeconds;
471 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion; 473 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion;
472 m_dispatchedDuringFling = event.dispatchedDuringFling; 474 m_dispatchedDuringFling = event.dispatchedDuringFling;
473 475
474 for (unsigned i = 0; i < event.touchesLength; ++i) 476 for (unsigned i = 0; i < event.touchesLength; ++i)
475 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]) ); 477 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]) );
476 478
477 m_dispatchType = toPlatformDispatchType(event.dispatchType); 479 m_dispatchType = toPlatformDispatchType(event.dispatchType);
480
dtapuska 2016/06/03 15:02:11 Remove new line
mustaq 2016/06/03 20:34:45 Done.
481 m_uniqueTouchEventId = event.uniqueTouchEventId;
478 } 482 }
479 483
480 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint& location, const LayoutItem layoutItem) 484 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint& location, const LayoutItem layoutItem)
481 { 485 {
482 return layoutItem.absoluteToLocal(FloatPoint(location), UseTransforms); 486 return layoutItem.absoluteToLocal(FloatPoint(location), UseTransforms);
483 } 487 }
484 488
485 static IntPoint convertAbsoluteLocationForLayoutObject(const LayoutPoint& locati on, const LayoutItem layoutItem) 489 static IntPoint convertAbsoluteLocationForLayoutObject(const LayoutPoint& locati on, const LayoutItem layoutItem)
486 { 490 {
487 return roundedIntPoint(convertAbsoluteLocationForLayoutObjectFloat(location, layoutItem)); 491 return roundedIntPoint(convertAbsoluteLocationForLayoutObjectFloat(location, layoutItem));
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 break; 805 break;
802 case GestureSourceTouchscreen: 806 case GestureSourceTouchscreen:
803 sourceDevice = WebGestureDeviceTouchscreen; 807 sourceDevice = WebGestureDeviceTouchscreen;
804 break; 808 break;
805 case GestureSourceUninitialized: 809 case GestureSourceUninitialized:
806 NOTREACHED(); 810 NOTREACHED();
807 } 811 }
808 } 812 }
809 813
810 } // namespace blink 814 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698