OLD | NEW |
---|---|
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/ElementTraversal.h" | 7 #include "core/dom/ElementTraversal.h" |
8 #include "core/dom/shadow/FlatTreeTraversal.h" | 8 #include "core/dom/shadow/FlatTreeTraversal.h" |
9 #include "core/events/MouseEvent.h" | 9 #include "core/events/MouseEvent.h" |
10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 removePointer(pointerEvent); | 280 removePointer(pointerEvent); |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 void PointerEventManager::unblockTouchPointers() { | 284 void PointerEventManager::unblockTouchPointers() { |
285 m_inCanceledStateForPointerTypeTouch = false; | 285 m_inCanceledStateForPointerTypeTouch = false; |
286 } | 286 } |
287 | 287 |
288 WebInputEventResult PointerEventManager::handleTouchEvents( | 288 WebInputEventResult PointerEventManager::handleTouchEvents( |
289 const PlatformTouchEvent& event) { | 289 const PlatformTouchEvent& event) { |
290 // TODO(japhet): UserGestureIndicator should setHasReceivedUserGesture() | |
291 // on the Document. | |
292 if (UserGestureIndicator::processingUserGesture()) | |
Rick Byers
2016/10/06 16:26:47
I think this is also always the root frame documen
| |
293 m_frame->document()->setHasReceivedUserGesture(); | |
290 if (event.type() == PlatformEvent::TouchScrollStarted) { | 294 if (event.type() == PlatformEvent::TouchScrollStarted) { |
291 blockTouchPointers(); | 295 blockTouchPointers(); |
292 m_touchEventManager->setTouchScrollStarted(); | 296 m_touchEventManager->setTouchScrollStarted(); |
293 return WebInputEventResult::HandledSystem; | 297 return WebInputEventResult::HandledSystem; |
294 } | 298 } |
295 | 299 |
296 bool newTouchSequence = true; | 300 bool newTouchSequence = true; |
297 for (const auto& touchPoint : event.touchPoints()) { | 301 for (const auto& touchPoint : event.touchPoints()) { |
298 if (touchPoint.state() != PlatformTouchPoint::TouchPressed) { | 302 if (touchPoint.state() != PlatformTouchPoint::TouchPressed) { |
299 newTouchSequence = false; | 303 newTouchSequence = false; |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
674 return true; | 678 return true; |
675 } | 679 } |
676 return false; | 680 return false; |
677 } | 681 } |
678 | 682 |
679 EventTarget* PointerEventManager::getMouseCapturingNode() { | 683 EventTarget* PointerEventManager::getMouseCapturingNode() { |
680 return getCapturingNode(PointerEventFactory::s_mouseId); | 684 return getCapturingNode(PointerEventFactory::s_mouseId); |
681 } | 685 } |
682 | 686 |
683 } // namespace blink | 687 } // namespace blink |
OLD | NEW |