| 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/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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 return false; | 477 return false; |
| 478 } | 478 } |
| 479 | 479 |
| 480 updateTargetAndRegionMapsForTouchStarts(touchInfos); | 480 updateTargetAndRegionMapsForTouchStarts(touchInfos); |
| 481 | 481 |
| 482 m_touchPressed = !allTouchesReleased; | 482 m_touchPressed = !allTouchesReleased; |
| 483 | 483 |
| 484 // If there's no document receiving touch events, or no handlers on the | 484 // If there's no document receiving touch events, or no handlers on the |
| 485 // document set to receive the events, then we can skip all the rest of | 485 // document set to receive the events, then we can skip all the rest of |
| 486 // this work. | 486 // this work. |
| 487 if (!m_touchSequenceDocument || !m_touchSequenceDocument->frameHost() || | 487 if (!m_touchSequenceDocument || !m_touchSequenceDocument->page() || |
| 488 !hasTouchHandlers( | 488 !hasTouchHandlers( |
| 489 m_touchSequenceDocument->frameHost()->eventHandlerRegistry()) || | 489 m_touchSequenceDocument->page()->eventHandlerRegistry()) || |
| 490 !m_touchSequenceDocument->frame()) { | 490 !m_touchSequenceDocument->frame()) { |
| 491 if (allTouchesReleased) { | 491 if (allTouchesReleased) { |
| 492 m_touchSequenceDocument.clear(); | 492 m_touchSequenceDocument.clear(); |
| 493 } | 493 } |
| 494 return false; | 494 return false; |
| 495 } | 495 } |
| 496 | 496 |
| 497 setAllPropertiesOfTouchInfos(touchInfos); | 497 setAllPropertiesOfTouchInfos(touchInfos); |
| 498 | 498 |
| 499 return true; | 499 return true; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 514 } | 514 } |
| 515 | 515 |
| 516 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); | 516 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); |
| 517 } | 517 } |
| 518 | 518 |
| 519 bool TouchEventManager::isAnyTouchActive() const { | 519 bool TouchEventManager::isAnyTouchActive() const { |
| 520 return m_touchPressed; | 520 return m_touchPressed; |
| 521 } | 521 } |
| 522 | 522 |
| 523 } // namespace blink | 523 } // namespace blink |
| OLD | NEW |