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

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

Issue 2752593003: Migrate WTF::Deque::first() to ::front() (Closed)
Patch Set: one more platform specific reference 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 bool PointerEventManager::isAnyTouchActive() const { 705 bool PointerEventManager::isAnyTouchActive() const {
706 return m_touchEventManager->isAnyTouchActive(); 706 return m_touchEventManager->isAnyTouchActive();
707 } 707 }
708 708
709 bool PointerEventManager::primaryPointerdownCanceled( 709 bool PointerEventManager::primaryPointerdownCanceled(
710 uint32_t uniqueTouchEventId) { 710 uint32_t uniqueTouchEventId) {
711 // It's safe to assume that uniqueTouchEventIds won't wrap back to 0 from 711 // It's safe to assume that uniqueTouchEventIds won't wrap back to 0 from
712 // 2^32-1 (>4.2 billion): even with a generous 100 unique ids per touch 712 // 2^32-1 (>4.2 billion): even with a generous 100 unique ids per touch
713 // sequence & one sequence per 10 second, it takes 13+ years to wrap back. 713 // sequence & one sequence per 10 second, it takes 13+ years to wrap back.
714 while (!m_touchIdsForCanceledPointerdowns.isEmpty()) { 714 while (!m_touchIdsForCanceledPointerdowns.isEmpty()) {
715 uint32_t firstId = m_touchIdsForCanceledPointerdowns.first(); 715 uint32_t firstId = m_touchIdsForCanceledPointerdowns.front();
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