| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 if (mouse_down_event_result == WebInputEventResult::kNotHandled) { | 225 if (mouse_down_event_result == WebInputEventResult::kNotHandled) { |
| 226 mouse_down_event_result = mouse_event_manager_->HandleMousePressEvent( | 226 mouse_down_event_result = mouse_event_manager_->HandleMousePressEvent( |
| 227 MouseEventWithHitTestResults(fake_mouse_down, current_hit_test)); | 227 MouseEventWithHitTestResults(fake_mouse_down, current_hit_test)); |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 if (current_hit_test.InnerNode()) { | 231 if (current_hit_test.InnerNode()) { |
| 232 DCHECK(gesture_event.GetType() == WebInputEvent::kGestureTap); | 232 DCHECK(gesture_event.GetType() == WebInputEvent::kGestureTap); |
| 233 HitTestResult result = current_hit_test; | 233 HitTestResult result = current_hit_test; |
| 234 result.SetToShadowHostIfInRestrictedShadowRoot(); | 234 result.SetToShadowHostIfInRestrictedShadowRoot(); |
| 235 frame_->GetChromeClient().OnMouseDown(result.InnerNode()); | 235 frame_->GetChromeClient().OnMouseDown(*result.InnerNode()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. | 238 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. |
| 239 // http://crbug.com/398920 | 239 // http://crbug.com/398920 |
| 240 if (current_hit_test.InnerNode()) { | 240 if (current_hit_test.InnerNode()) { |
| 241 LocalFrame* main_frame = frame_->LocalFrameRoot(); | 241 LocalFrame* main_frame = frame_->LocalFrameRoot(); |
| 242 if (main_frame && main_frame->View()) | 242 if (main_frame && main_frame->View()) |
| 243 main_frame->View()->UpdateAllLifecyclePhases(); | 243 main_frame->View()->UpdateAllLifecyclePhases(); |
| 244 adjusted_point = frame_view->RootFrameToContents(tapped_position); | 244 adjusted_point = frame_view->RootFrameToContents(tapped_position); |
| 245 current_hit_test = EventHandlingUtil::HitTestResultInFrame( | 245 current_hit_test = EventHandlingUtil::HitTestResultInFrame( |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 } | 430 } |
| 431 return WebInputEventResult::kNotHandled; | 431 return WebInputEventResult::kNotHandled; |
| 432 } | 432 } |
| 433 | 433 |
| 434 WTF::Optional<WTF::TimeTicks> GestureManager::GetLastShowPressTimestamp() | 434 WTF::Optional<WTF::TimeTicks> GestureManager::GetLastShowPressTimestamp() |
| 435 const { | 435 const { |
| 436 return last_show_press_timestamp_; | 436 return last_show_press_timestamp_; |
| 437 } | 437 } |
| 438 | 438 |
| 439 } // namespace blink | 439 } // namespace blink |
| OLD | NEW |