| 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/GestureManager.h" | 5 #include "core/input/GestureManager.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/editing/SelectionController.h" | 8 #include "core/editing/SelectionController.h" |
| 9 #include "core/events/GestureEvent.h" | 9 #include "core/events/GestureEvent.h" |
| 10 #include "core/frame/FrameHost.h" | 10 #include "core/frame/FrameHost.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 WebInputEventResult GestureManager::handleGestureTap( | 133 WebInputEventResult GestureManager::handleGestureTap( |
| 134 const GestureEventWithHitTestResults& targetedEvent) { | 134 const GestureEventWithHitTestResults& targetedEvent) { |
| 135 FrameView* frameView(m_frame->view()); | 135 FrameView* frameView(m_frame->view()); |
| 136 const PlatformGestureEvent& gestureEvent = targetedEvent.event(); | 136 const PlatformGestureEvent& gestureEvent = targetedEvent.event(); |
| 137 HitTestRequest::HitTestRequestType hitType = | 137 HitTestRequest::HitTestRequestType hitType = |
| 138 getHitTypeForGestureType(gestureEvent.type()); | 138 getHitTypeForGestureType(gestureEvent.type()); |
| 139 uint64_t preDispatchDomTreeVersion = m_frame->document()->domTreeVersion(); | 139 uint64_t preDispatchDomTreeVersion = m_frame->document()->domTreeVersion(); |
| 140 uint64_t preDispatchStyleVersion = m_frame->document()->styleVersion(); | 140 uint64_t preDispatchStyleVersion = m_frame->document()->styleVersion(); |
| 141 | 141 |
| 142 UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture); | 142 UserGestureIndicator gestureIndicator(UserGestureToken::create()); |
| 143 | 143 |
| 144 HitTestResult currentHitTest = targetedEvent.hitTestResult(); | 144 HitTestResult currentHitTest = targetedEvent.hitTestResult(); |
| 145 | 145 |
| 146 // We use the adjusted position so the application isn't surprised to see a | 146 // We use the adjusted position so the application isn't surprised to see a |
| 147 // event with co-ordinates outside the target's bounds. | 147 // event with co-ordinates outside the target's bounds. |
| 148 IntPoint adjustedPoint = | 148 IntPoint adjustedPoint = |
| 149 frameView->rootFrameToContents(gestureEvent.position()); | 149 frameView->rootFrameToContents(gestureEvent.position()); |
| 150 | 150 |
| 151 const unsigned modifiers = gestureEvent.getModifiers(); | 151 const unsigned modifiers = gestureEvent.getModifiers(); |
| 152 | 152 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 return nullptr; | 418 return nullptr; |
| 419 | 419 |
| 420 return &m_frame->page()->frameHost(); | 420 return &m_frame->page()->frameHost(); |
| 421 } | 421 } |
| 422 | 422 |
| 423 double GestureManager::getLastShowPressTimestamp() const { | 423 double GestureManager::getLastShowPressTimestamp() const { |
| 424 return m_lastShowPressTimestamp; | 424 return m_lastShowPressTimestamp; |
| 425 } | 425 } |
| 426 | 426 |
| 427 } // namespace blink | 427 } // namespace blink |
| OLD | NEW |