| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 if (mouseDownEventResult == WebInputEventResult::NotHandled) { | 223 if (mouseDownEventResult == WebInputEventResult::NotHandled) { |
| 224 mouseDownEventResult = m_mouseEventManager->handleMousePressEvent( | 224 mouseDownEventResult = m_mouseEventManager->handleMousePressEvent( |
| 225 MouseEventWithHitTestResults(fakeMouseDown, currentHitTest)); | 225 MouseEventWithHitTestResults(fakeMouseDown, currentHitTest)); |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 | 228 |
| 229 if (currentHitTest.innerNode()) { | 229 if (currentHitTest.innerNode()) { |
| 230 DCHECK(gestureEvent.type() == WebInputEvent::GestureTap); | 230 DCHECK(gestureEvent.type() == WebInputEvent::GestureTap); |
| 231 HitTestResult result = currentHitTest; | 231 HitTestResult result = currentHitTest; |
| 232 result.setToShadowHostIfInRestrictedShadowRoot(); | 232 result.setToShadowHostIfInRestrictedShadowRoot(); |
| 233 m_frame->chromeClient().onMouseDown(result.innerNode()); | 233 m_frame->chromeClient().onMouseDown(*result.innerNode()); |
| 234 } | 234 } |
| 235 | 235 |
| 236 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. | 236 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. |
| 237 // http://crbug.com/398920 | 237 // http://crbug.com/398920 |
| 238 if (currentHitTest.innerNode()) { | 238 if (currentHitTest.innerNode()) { |
| 239 LocalFrame* mainFrame = m_frame->localFrameRoot(); | 239 LocalFrame* mainFrame = m_frame->localFrameRoot(); |
| 240 if (mainFrame && mainFrame->view()) | 240 if (mainFrame && mainFrame->view()) |
| 241 mainFrame->view()->updateAllLifecyclePhases(); | 241 mainFrame->view()->updateAllLifecyclePhases(); |
| 242 adjustedPoint = frameView->rootFrameToContents(tappedPosition); | 242 adjustedPoint = frameView->rootFrameToContents(tappedPosition); |
| 243 currentHitTest = EventHandlingUtil::hitTestResultInFrame( | 243 currentHitTest = EventHandlingUtil::hitTestResultInFrame( |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 } | 424 } |
| 425 return WebInputEventResult::NotHandled; | 425 return WebInputEventResult::NotHandled; |
| 426 } | 426 } |
| 427 | 427 |
| 428 WTF::Optional<WTF::TimeTicks> GestureManager::getLastShowPressTimestamp() | 428 WTF::Optional<WTF::TimeTicks> GestureManager::getLastShowPressTimestamp() |
| 429 const { | 429 const { |
| 430 return m_lastShowPressTimestamp; | 430 return m_lastShowPressTimestamp; |
| 431 } | 431 } |
| 432 | 432 |
| 433 } // namespace blink | 433 } // namespace blink |
| OLD | NEW |