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

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

Issue 2701553002: Touchmoves should not be suppressed if the touchstart is consumed (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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 ? HandledTouches 285 ? HandledTouches
286 : UnhandledTouches); 286 : UnhandledTouches);
287 } 287 }
288 } 288 }
289 eventResult = EventHandlingUtil::mergeEventResult( 289 eventResult = EventHandlingUtil::mergeEventResult(
290 eventResult, 290 eventResult,
291 EventHandlingUtil::toWebInputEventResult(domDispatchResult)); 291 EventHandlingUtil::toWebInputEventResult(domDispatchResult));
292 } 292 }
293 } 293 }
294 294
295 if (m_suppressingTouchmovesWithinSlop &&
296 eventResult != WebInputEventResult::NotHandled) {
mustaq 2017/02/16 17:06:26 This "!=NotHandled " applies only to touchstarts b
lanwei 2017/02/16 19:48:59 Done.
mustaq 2017/02/16 21:09:53 Let me clarify a bit: this condition is met only f
297 m_suppressingTouchmovesWithinSlop = false;
298 }
299
295 return eventResult; 300 return eventResult;
296 } 301 }
297 302
298 void TouchEventManager::updateTargetAndRegionMapsForTouchStarts( 303 void TouchEventManager::updateTargetAndRegionMapsForTouchStarts(
299 HeapVector<TouchInfo>& touchInfos) { 304 HeapVector<TouchInfo>& touchInfos) {
300 for (auto& touchInfo : touchInfos) { 305 for (auto& touchInfo : touchInfos) {
301 // Touch events implicitly capture to the touched node, and don't change 306 // Touch events implicitly capture to the touched node, and don't change
302 // active/hover states themselves (Gesture events do). So we only need 307 // active/hover states themselves (Gesture events do). So we only need
303 // to hit-test on touchstart and when the target could be different than 308 // to hit-test on touchstart and when the target could be different than
304 // the corresponding pointer event target. 309 // the corresponding pointer event target.
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 517 }
513 518
514 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); 519 return dispatchTouchEvents(event, touchInfos, allTouchesReleased);
515 } 520 }
516 521
517 bool TouchEventManager::isAnyTouchActive() const { 522 bool TouchEventManager::isAnyTouchActive() const {
518 return m_touchPressed; 523 return m_touchPressed;
519 } 524 }
520 525
521 } // namespace blink 526 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698