| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 removePointer(pointerEvent); | 255 removePointer(pointerEvent); |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 | 258 |
| 259 void PointerEventManager::unblockTouchPointers() { | 259 void PointerEventManager::unblockTouchPointers() { |
| 260 m_inCanceledStateForPointerTypeTouch = false; | 260 m_inCanceledStateForPointerTypeTouch = false; |
| 261 } | 261 } |
| 262 | 262 |
| 263 WebInputEventResult PointerEventManager::handleTouchEvents( | 263 WebInputEventResult PointerEventManager::handleTouchEvents( |
| 264 const PlatformTouchEvent& event) { | 264 const PlatformTouchEvent& event) { |
| 265 m_frame->document()->setHasReceivedUserGesture(); |
| 265 if (event.type() == PlatformEvent::TouchScrollStarted) { | 266 if (event.type() == PlatformEvent::TouchScrollStarted) { |
| 266 blockTouchPointers(); | 267 blockTouchPointers(); |
| 267 m_touchEventManager->setTouchScrollStarted(); | 268 m_touchEventManager->setTouchScrollStarted(); |
| 268 return WebInputEventResult::HandledSystem; | 269 return WebInputEventResult::HandledSystem; |
| 269 } | 270 } |
| 270 | 271 |
| 271 bool newTouchSequence = true; | 272 bool newTouchSequence = true; |
| 272 for (const auto& touchPoint : event.touchPoints()) { | 273 for (const auto& touchPoint : event.touchPoints()) { |
| 273 if (touchPoint.state() != PlatformTouchPoint::TouchPressed) { | 274 if (touchPoint.state() != PlatformTouchPoint::TouchPressed) { |
| 274 newTouchSequence = false; | 275 newTouchSequence = false; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 DEFINE_TRACE(PointerEventManager) { | 694 DEFINE_TRACE(PointerEventManager) { |
| 694 visitor->trace(m_frame); | 695 visitor->trace(m_frame); |
| 695 visitor->trace(m_nodeUnderPointer); | 696 visitor->trace(m_nodeUnderPointer); |
| 696 visitor->trace(m_pointerCaptureTarget); | 697 visitor->trace(m_pointerCaptureTarget); |
| 697 visitor->trace(m_pendingPointerCaptureTarget); | 698 visitor->trace(m_pendingPointerCaptureTarget); |
| 698 visitor->trace(m_touchEventManager); | 699 visitor->trace(m_touchEventManager); |
| 699 visitor->trace(m_mouseEventManager); | 700 visitor->trace(m_mouseEventManager); |
| 700 } | 701 } |
| 701 | 702 |
| 702 } // namespace blink | 703 } // namespace blink |
| OLD | NEW |