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

Side by Side Diff: third_party/WebKit/Source/core/input/PointerEventManager.cpp

Issue 2743023002: Migrate WTF::Deque::append() to ::push_back() (Closed)
Patch Set: rebase Created 3 years, 9 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/input/PointerEventManager.h" 5 #include "core/input/PointerEventManager.h"
6 6
7 #include "core/dom/DocumentUserGestureToken.h" 7 #include "core/dom/DocumentUserGestureToken.h"
8 #include "core/dom/ElementTraversal.h" 8 #include "core/dom/ElementTraversal.h"
9 #include "core/dom/shadow/FlatTreeTraversal.h" 9 #include "core/dom/shadow/FlatTreeTraversal.h"
10 #include "core/events/MouseEvent.h" 10 #include "core/events/MouseEvent.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 399
400 // If a pointerdown has been canceled, queue the unique id to allow 400 // If a pointerdown has been canceled, queue the unique id to allow
401 // suppressing mouse events from gesture events. For mouse events 401 // suppressing mouse events from gesture events. For mouse events
402 // fired from GestureTap & GestureLongPress (which are triggered by 402 // fired from GestureTap & GestureLongPress (which are triggered by
403 // single touches only), it is enough to queue the ids only for 403 // single touches only), it is enough to queue the ids only for
404 // primary pointers. 404 // primary pointers.
405 // TODO(mustaq): What about other cases (e.g. GestureTwoFingerTap)? 405 // TODO(mustaq): What about other cases (e.g. GestureTwoFingerTap)?
406 if (result != WebInputEventResult::NotHandled && 406 if (result != WebInputEventResult::NotHandled &&
407 pointerEvent->type() == EventTypeNames::pointerdown && 407 pointerEvent->type() == EventTypeNames::pointerdown &&
408 pointerEvent->isPrimary()) { 408 pointerEvent->isPrimary()) {
409 m_touchIdsForCanceledPointerdowns.append(event.uniqueTouchEventId); 409 m_touchIdsForCanceledPointerdowns.push_back(event.uniqueTouchEventId);
410 } 410 }
411 } 411 }
412 } 412 }
413 } 413 }
414 414
415 WebInputEventResult PointerEventManager::sendTouchPointerEvent( 415 WebInputEventResult PointerEventManager::sendTouchPointerEvent(
416 EventTarget* target, 416 EventTarget* target,
417 PointerEvent* pointerEvent) { 417 PointerEvent* pointerEvent) {
418 if (m_inCanceledStateForPointerTypeTouch) 418 if (m_inCanceledStateForPointerTypeTouch)
419 return WebInputEventResult::NotHandled; 419 return WebInputEventResult::NotHandled;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 if (firstId > uniqueTouchEventId) 716 if (firstId > uniqueTouchEventId)
717 return false; 717 return false;
718 m_touchIdsForCanceledPointerdowns.takeFirst(); 718 m_touchIdsForCanceledPointerdowns.takeFirst();
719 if (firstId == uniqueTouchEventId) 719 if (firstId == uniqueTouchEventId)
720 return true; 720 return true;
721 } 721 }
722 return false; 722 return false;
723 } 723 }
724 724
725 } // namespace blink 725 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698