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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 10 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/TouchEventManager.h" 5 #include "core/input/TouchEventManager.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/events/TouchEvent.h" 8 #include "core/events/TouchEvent.h"
9 #include "core/frame/Deprecation.h" 9 #include "core/frame/Deprecation.h"
10 #include "core/frame/EventHandlerRegistry.h" 10 #include "core/frame/EventHandlerRegistry.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // the user had several points touched but did not move them all) should 157 // the user had several points touched but did not move them all) should
158 // never be in the |changedTouches| list so we do not handle them 158 // never be in the |changedTouches| list so we do not handle them
159 // explicitly here. See https://bugs.webkit.org/show_bug.cgi?id=37609 159 // explicitly here. See https://bugs.webkit.org/show_bug.cgi?id=37609
160 // for further discussion about the TouchStationary state. 160 // for further discussion about the TouchStationary state.
161 if (pointState != PlatformTouchPoint::TouchStationary && 161 if (pointState != PlatformTouchPoint::TouchStationary &&
162 touchInfo.knownTarget) { 162 touchInfo.knownTarget) {
163 ASSERT(pointState < PlatformTouchPoint::TouchStateEnd); 163 ASSERT(pointState < PlatformTouchPoint::TouchStateEnd);
164 if (!changedTouches[pointState].m_touches) 164 if (!changedTouches[pointState].m_touches)
165 changedTouches[pointState].m_touches = TouchList::create(); 165 changedTouches[pointState].m_touches = TouchList::create();
166 changedTouches[pointState].m_touches->append(touch); 166 changedTouches[pointState].m_touches->append(touch);
167 changedTouches[pointState].m_targets.add(touchInfo.touchNode); 167 changedTouches[pointState].m_targets.insert(touchInfo.touchNode);
168 changedTouches[pointState].m_pointerType = 168 changedTouches[pointState].m_pointerType =
169 point.pointerProperties().pointerType; 169 point.pointerProperties().pointerType;
170 } 170 }
171 } 171 }
172 172
173 if (allTouchesReleased) { 173 if (allTouchesReleased) {
174 m_touchSequenceDocument.clear(); 174 m_touchSequenceDocument.clear();
175 m_currentTouchAction = TouchActionAuto; 175 m_currentTouchAction = TouchActionAuto;
176 } 176 }
177 177
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 505 }
506 506
507 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); 507 return dispatchTouchEvents(event, touchInfos, allTouchesReleased);
508 } 508 }
509 509
510 bool TouchEventManager::isAnyTouchActive() const { 510 bool TouchEventManager::isAnyTouchActive() const {
511 return m_touchPressed; 511 return m_touchPressed;
512 } 512 }
513 513
514 } // namespace blink 514 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698