| 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/dom/DocumentUserGestureToken.h" | 8 #include "core/dom/DocumentUserGestureToken.h" |
| 9 #include "core/editing/SelectionController.h" | 9 #include "core/editing/SelectionController.h" |
| 10 #include "core/events/GestureEvent.h" | 10 #include "core/events/GestureEvent.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 mouseUpEventResult), | 287 mouseUpEventResult), |
| 288 clickEventResult); | 288 clickEventResult); |
| 289 if (eventResult == WebInputEventResult::NotHandled && tappedNode && | 289 if (eventResult == WebInputEventResult::NotHandled && tappedNode && |
| 290 m_frame->page()) { | 290 m_frame->page()) { |
| 291 bool domTreeChanged = | 291 bool domTreeChanged = |
| 292 preDispatchDomTreeVersion != m_frame->document()->domTreeVersion(); | 292 preDispatchDomTreeVersion != m_frame->document()->domTreeVersion(); |
| 293 bool styleChanged = | 293 bool styleChanged = |
| 294 preDispatchStyleVersion != m_frame->document()->styleVersion(); | 294 preDispatchStyleVersion != m_frame->document()->styleVersion(); |
| 295 | 295 |
| 296 IntPoint tappedPositionInViewport = | 296 IntPoint tappedPositionInViewport = |
| 297 frameHost()->visualViewport().rootFrameToViewport(tappedPosition); | 297 m_frame->page()->visualViewport().rootFrameToViewport(tappedPosition); |
| 298 m_frame->chromeClient().showUnhandledTapUIIfNeeded( | 298 m_frame->chromeClient().showUnhandledTapUIIfNeeded( |
| 299 tappedPositionInViewport, tappedNode, domTreeChanged || styleChanged); | 299 tappedPositionInViewport, tappedNode, domTreeChanged || styleChanged); |
| 300 } | 300 } |
| 301 return eventResult; | 301 return eventResult; |
| 302 } | 302 } |
| 303 | 303 |
| 304 WebInputEventResult GestureManager::handleGestureLongPress( | 304 WebInputEventResult GestureManager::handleGestureLongPress( |
| 305 const GestureEventWithHitTestResults& targetedEvent) { | 305 const GestureEventWithHitTestResults& targetedEvent) { |
| 306 const WebGestureEvent& gestureEvent = targetedEvent.event(); | 306 const WebGestureEvent& gestureEvent = targetedEvent.event(); |
| 307 | 307 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 432 |
| 433 return &m_frame->page()->frameHost(); | 433 return &m_frame->page()->frameHost(); |
| 434 } | 434 } |
| 435 | 435 |
| 436 WTF::Optional<WTF::TimeTicks> GestureManager::getLastShowPressTimestamp() | 436 WTF::Optional<WTF::TimeTicks> GestureManager::getLastShowPressTimestamp() |
| 437 const { | 437 const { |
| 438 return m_lastShowPressTimestamp; | 438 return m_lastShowPressTimestamp; |
| 439 } | 439 } |
| 440 | 440 |
| 441 } // namespace blink | 441 } // namespace blink |
| OLD | NEW |