| 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/html/HTMLCanvasElement.h" | 10 #include "core/html/HTMLCanvasElement.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 sendNodeTransitionEvents(nullptr, target, pointerEvent); | 310 sendNodeTransitionEvents(nullptr, target, pointerEvent); |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 314 void PointerEventManager::blockTouchPointers() | 314 void PointerEventManager::blockTouchPointers() |
| 315 { | 315 { |
| 316 if (m_inCanceledStateForPointerTypeTouch) | 316 if (m_inCanceledStateForPointerTypeTouch) |
| 317 return; | 317 return; |
| 318 m_inCanceledStateForPointerTypeTouch = true; | 318 m_inCanceledStateForPointerTypeTouch = true; |
| 319 | 319 |
| 320 HeapVector<int> touchPointerIds | 320 Vector<int> touchPointerIds |
| 321 = m_pointerEventFactory.getPointerIdsOfType(WebPointerProperties::Pointe
rType::Touch); | 321 = m_pointerEventFactory.getPointerIdsOfType(WebPointerProperties::Pointe
rType::Touch); |
| 322 | 322 |
| 323 for (int pointerId : touchPointerIds) { | 323 for (int pointerId : touchPointerIds) { |
| 324 PointerEvent* pointerEvent | 324 PointerEvent* pointerEvent |
| 325 = m_pointerEventFactory.createPointerCancelEvent( | 325 = m_pointerEventFactory.createPointerCancelEvent( |
| 326 pointerId, WebPointerProperties::PointerType::Touch); | 326 pointerId, WebPointerProperties::PointerType::Touch); |
| 327 | 327 |
| 328 ASSERT(m_nodeUnderPointer.contains(pointerId)); | 328 ASSERT(m_nodeUnderPointer.contains(pointerId)); |
| 329 EventTarget* target = m_nodeUnderPointer.get(pointerId).target; | 329 EventTarget* target = m_nodeUnderPointer.get(pointerId).target; |
| 330 | 330 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 | 632 |
| 633 DEFINE_TRACE(PointerEventManager) | 633 DEFINE_TRACE(PointerEventManager) |
| 634 { | 634 { |
| 635 visitor->trace(m_nodeUnderPointer); | 635 visitor->trace(m_nodeUnderPointer); |
| 636 visitor->trace(m_pointerCaptureTarget); | 636 visitor->trace(m_pointerCaptureTarget); |
| 637 visitor->trace(m_pendingPointerCaptureTarget); | 637 visitor->trace(m_pendingPointerCaptureTarget); |
| 638 } | 638 } |
| 639 | 639 |
| 640 | 640 |
| 641 } // namespace blink | 641 } // namespace blink |
| OLD | NEW |