Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 last_scrollbar_under_mouse_ = nullptr; | 231 last_scrollbar_under_mouse_ = nullptr; |
| 232 frame_set_being_resized_ = nullptr; | 232 frame_set_being_resized_ = nullptr; |
| 233 drag_target_ = nullptr; | 233 drag_target_ = nullptr; |
| 234 should_only_fire_drag_over_event_ = false; | 234 should_only_fire_drag_over_event_ = false; |
| 235 last_mouse_down_user_gesture_token_.Clear(); | 235 last_mouse_down_user_gesture_token_.Clear(); |
| 236 capturing_mouse_events_node_ = nullptr; | 236 capturing_mouse_events_node_ = nullptr; |
| 237 pointer_event_manager_->Clear(); | 237 pointer_event_manager_->Clear(); |
| 238 scroll_manager_->Clear(); | 238 scroll_manager_->Clear(); |
| 239 gesture_manager_->Clear(); | 239 gesture_manager_->Clear(); |
| 240 mouse_event_manager_->Clear(); | 240 mouse_event_manager_->Clear(); |
| 241 mouse_wheel_event_manager_->Clear(); | |
| 241 last_deferred_tap_element_ = nullptr; | 242 last_deferred_tap_element_ = nullptr; |
| 242 event_handler_will_reset_capturing_mouse_events_node_ = false; | 243 event_handler_will_reset_capturing_mouse_events_node_ = false; |
| 243 } | 244 } |
| 244 | 245 |
| 245 void EventHandler::UpdateSelectionForMouseDrag() { | 246 void EventHandler::UpdateSelectionForMouseDrag() { |
| 246 mouse_event_manager_->UpdateSelectionForMouseDrag(); | 247 mouse_event_manager_->UpdateSelectionForMouseDrag(); |
| 247 } | 248 } |
| 248 | 249 |
| 249 void EventHandler::StartMiddleClickAutoscroll(LayoutObject* layout_object) { | 250 void EventHandler::StartMiddleClickAutoscroll(LayoutObject* layout_object) { |
| 250 DCHECK(RuntimeEnabledFeatures::MiddleClickAutoscrollEnabled()); | 251 DCHECK(RuntimeEnabledFeatures::MiddleClickAutoscrollEnabled()); |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 942 | 943 |
| 943 HitTestRequest::HitTestRequestType hit_type = HitTestRequest::kRelease; | 944 HitTestRequest::HitTestRequestType hit_type = HitTestRequest::kRelease; |
| 944 HitTestRequest request(hit_type); | 945 HitTestRequest request(hit_type); |
| 945 MouseEventWithHitTestResults mev = | 946 MouseEventWithHitTestResults mev = |
| 946 EventHandlingUtil::PerformMouseEventHitTest(frame_, request, mouse_event); | 947 EventHandlingUtil::PerformMouseEventHitTest(frame_, request, mouse_event); |
| 947 Element* mouse_release_target = mev.InnerElement(); | 948 Element* mouse_release_target = mev.InnerElement(); |
| 948 LocalFrame* subframe = capturing_mouse_events_node_.Get() | 949 LocalFrame* subframe = capturing_mouse_events_node_.Get() |
| 949 ? EventHandlingUtil::SubframeForTargetNode( | 950 ? EventHandlingUtil::SubframeForTargetNode( |
| 950 capturing_mouse_events_node_.Get()) | 951 capturing_mouse_events_node_.Get()) |
| 951 : EventHandlingUtil::SubframeForHitTestResult(mev); | 952 : EventHandlingUtil::SubframeForHitTestResult(mev); |
| 953 | |
|
bokan
2017/06/15 15:47:17
Nit: remove newline
sahel
2017/06/16 14:56:20
Done.
| |
| 952 if (event_handler_will_reset_capturing_mouse_events_node_) | 954 if (event_handler_will_reset_capturing_mouse_events_node_) |
| 953 capturing_mouse_events_node_ = nullptr; | 955 capturing_mouse_events_node_ = nullptr; |
| 954 if (subframe) | 956 if (subframe) |
| 955 return PassMouseReleaseEventToSubframe(mev, subframe); | 957 return PassMouseReleaseEventToSubframe(mev, subframe); |
| 956 | 958 |
| 957 // Mouse events will be associated with the Document where mousedown | 959 // Mouse events will be associated with the Document where mousedown |
| 958 // occurred. If, e.g., there is a mousedown, then a drag to a different | 960 // occurred. If, e.g., there is a mousedown, then a drag to a different |
| 959 // Document and mouseup there, the mouseup's gesture will be associated with | 961 // Document and mouseup there, the mouseup's gesture will be associated with |
| 960 // the mousedown's Document. It's not absolutely certain that this is the | 962 // the mousedown's Document. It's not absolutely certain that this is the |
| 961 // correct behavior. | 963 // correct behavior. |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2071 MouseEventWithHitTestResults& mev, | 2073 MouseEventWithHitTestResults& mev, |
| 2072 LocalFrame* subframe) { | 2074 LocalFrame* subframe) { |
| 2073 WebInputEventResult result = | 2075 WebInputEventResult result = |
| 2074 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); | 2076 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); |
| 2075 if (result != WebInputEventResult::kNotHandled) | 2077 if (result != WebInputEventResult::kNotHandled) |
| 2076 return result; | 2078 return result; |
| 2077 return WebInputEventResult::kHandledSystem; | 2079 return WebInputEventResult::kHandledSystem; |
| 2078 } | 2080 } |
| 2079 | 2081 |
| 2080 } // namespace blink | 2082 } // namespace blink |
| OLD | NEW |