| 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 } | 223 } |
| 224 if (mouseDownEventResult == WebInputEventResult::NotHandled) { | 224 if (mouseDownEventResult == WebInputEventResult::NotHandled) { |
| 225 mouseDownEventResult = m_mouseEventManager->handleMousePressEvent( | 225 mouseDownEventResult = m_mouseEventManager->handleMousePressEvent( |
| 226 MouseEventWithHitTestResults(fakeMouseDown, currentHitTest)); | 226 MouseEventWithHitTestResults(fakeMouseDown, currentHitTest)); |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 | 229 |
| 230 if (currentHitTest.innerNode()) { | 230 if (currentHitTest.innerNode()) { |
| 231 DCHECK(gestureEvent.type() == WebInputEvent::GestureTap); | 231 DCHECK(gestureEvent.type() == WebInputEvent::GestureTap); |
| 232 HitTestResult result = currentHitTest; | 232 HitTestResult result = currentHitTest; |
| 233 result.setToShadowHostIfInUserAgentShadowRoot(); | 233 result.setToShadowHostIfInRestrictedShadowRoot(); |
| 234 m_frame->chromeClient().onMouseDown(result.innerNode()); | 234 m_frame->chromeClient().onMouseDown(result.innerNode()); |
| 235 } | 235 } |
| 236 | 236 |
| 237 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. | 237 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. |
| 238 // http://crbug.com/398920 | 238 // http://crbug.com/398920 |
| 239 if (currentHitTest.innerNode()) { | 239 if (currentHitTest.innerNode()) { |
| 240 LocalFrame* mainFrame = m_frame->localFrameRoot(); | 240 LocalFrame* mainFrame = m_frame->localFrameRoot(); |
| 241 if (mainFrame && mainFrame->view()) | 241 if (mainFrame && mainFrame->view()) |
| 242 mainFrame->view()->updateAllLifecyclePhases(); | 242 mainFrame->view()->updateAllLifecyclePhases(); |
| 243 adjustedPoint = frameView->rootFrameToContents(tappedPosition); | 243 adjustedPoint = frameView->rootFrameToContents(tappedPosition); |
| (...skipping 188 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 |