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

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: Rebased 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 switch (e.sourceDevice) { 338 switch (e.sourceDevice) {
339 case WebGestureDeviceTouchpad: 339 case WebGestureDeviceTouchpad:
340 m_source = PlatformGestureSourceTouchpad; 340 m_source = PlatformGestureSourceTouchpad;
341 break; 341 break;
342 case WebGestureDeviceTouchscreen: 342 case WebGestureDeviceTouchscreen:
343 m_source = PlatformGestureSourceTouchscreen; 343 m_source = PlatformGestureSourceTouchscreen;
344 break; 344 break;
345 case WebGestureDeviceUninitialized: 345 case WebGestureDeviceUninitialized:
346 NOTREACHED(); 346 NOTREACHED();
347 } 347 }
348
349 m_uniqueTouchEventId = e.uniqueTouchEventId;
348 } 350 }
349 351
350 // MakePlatformKeyboardEvent -------------------------------------------------- 352 // MakePlatformKeyboardEvent --------------------------------------------------
351 353
352 inline PlatformEvent::EventType toPlatformKeyboardEventType(WebInputEvent::Type type) 354 inline PlatformEvent::EventType toPlatformKeyboardEventType(WebInputEvent::Type type)
353 { 355 {
354 switch (type) { 356 switch (type) {
355 case WebInputEvent::KeyUp: 357 case WebInputEvent::KeyUp:
356 return PlatformEvent::KeyUp; 358 return PlatformEvent::KeyUp;
357 case WebInputEvent::KeyDown: 359 case WebInputEvent::KeyDown:
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 m_type = toPlatformTouchEventType(event.type); 487 m_type = toPlatformTouchEventType(event.type);
486 m_modifiers = event.modifiers; 488 m_modifiers = event.modifiers;
487 m_timestamp = event.timeStampSeconds; 489 m_timestamp = event.timeStampSeconds;
488 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion; 490 m_causesScrollingIfUncanceled = event.movedBeyondSlopRegion;
489 m_dispatchedDuringFling = event.dispatchedDuringFling; 491 m_dispatchedDuringFling = event.dispatchedDuringFling;
490 492
491 for (unsigned i = 0; i < event.touchesLength; ++i) 493 for (unsigned i = 0; i < event.touchesLength; ++i)
492 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]) ); 494 m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touches[i]) );
493 495
494 m_dispatchType = toPlatformDispatchType(event.dispatchType); 496 m_dispatchType = toPlatformDispatchType(event.dispatchType);
497 m_uniqueTouchEventId = event.uniqueTouchEventId;
495 } 498 }
496 499
497 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint& location, const LayoutItem layoutItem) 500 static FloatPoint convertAbsoluteLocationForLayoutObjectFloat(const LayoutPoint& location, const LayoutItem layoutItem)
498 { 501 {
499 return layoutItem.absoluteToLocal(FloatPoint(location), UseTransforms); 502 return layoutItem.absoluteToLocal(FloatPoint(location), UseTransforms);
500 } 503 }
501 504
502 static IntPoint convertAbsoluteLocationForLayoutObject(const LayoutPoint& locati on, const LayoutItem layoutItem) 505 static IntPoint convertAbsoluteLocationForLayoutObject(const LayoutPoint& locati on, const LayoutItem layoutItem)
503 { 506 {
504 return roundedIntPoint(convertAbsoluteLocationForLayoutObjectFloat(location, layoutItem)); 507 return roundedIntPoint(convertAbsoluteLocationForLayoutObjectFloat(location, layoutItem));
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 break; 821 break;
819 case GestureSourceTouchscreen: 822 case GestureSourceTouchscreen:
820 sourceDevice = WebGestureDeviceTouchscreen; 823 sourceDevice = WebGestureDeviceTouchscreen;
821 break; 824 break;
822 case GestureSourceUninitialized: 825 case GestureSourceUninitialized:
823 NOTREACHED(); 826 NOTREACHED();
824 } 827 }
825 } 828 }
826 829
827 } // namespace blink 830 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEvent.cpp ('k') | third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698