| 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/PointerEventManager.h" | 5 #include "core/input/PointerEventManager.h" |
| 6 | 6 |
| 7 #include "core/dom/ElementTraversal.h" | 7 #include "core/dom/ElementTraversal.h" |
| 8 #include "core/dom/UserGestureIndicator.h" | 8 #include "core/dom/UserGestureIndicator.h" |
| 9 #include "core/dom/shadow/FlatTreeTraversal.h" | 9 #include "core/dom/shadow/FlatTreeTraversal.h" |
| 10 #include "core/events/MouseEvent.h" | 10 #include "core/events/MouseEvent.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 node_under_pointer_.at(pointer_id).target; | 157 node_under_pointer_.at(pointer_id).target; |
| 158 if (target_under_pointer == target) { | 158 if (target_under_pointer == target) { |
| 159 node_under_pointer_.Set( | 159 node_under_pointer_.Set( |
| 160 pointer_id, | 160 pointer_id, |
| 161 EventTargetAttributes(target_under_pointer, | 161 EventTargetAttributes(target_under_pointer, |
| 162 event_type == EventTypeNames::pointerover)); | 162 event_type == EventTypeNames::pointerover)); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 if (!frame_ || !frame_->GetPage() || | 166 if (!frame_ || !frame_->GetPage() || |
| 167 !HasPointerEventListener(frame_->GetPage()->GetEventHandlerRegistry()) || | 167 !HasPointerEventListener(frame_->GetPage()->GetEventHandlerRegistry())) |
| 168 !RuntimeEnabledFeatures::PointerEventEnabled()) | |
| 169 return WebInputEventResult::kNotHandled; | 168 return WebInputEventResult::kNotHandled; |
| 170 | 169 |
| 171 if (!check_for_listener || target->HasEventListeners(event_type)) { | 170 if (!check_for_listener || target->HasEventListeners(event_type)) { |
| 172 UseCounter::Count(frame_, UseCounter::kPointerEventDispatch); | 171 UseCounter::Count(frame_, UseCounter::kPointerEventDispatch); |
| 173 if (event_type == EventTypeNames::pointerdown) | 172 if (event_type == EventTypeNames::pointerdown) |
| 174 UseCounter::Count(frame_, UseCounter::kPointerEventDispatchPointerDown); | 173 UseCounter::Count(frame_, UseCounter::kPointerEventDispatchPointerDown); |
| 175 | 174 |
| 176 DCHECK(!dispatching_pointer_id_); | 175 DCHECK(!dispatching_pointer_id_); |
| 177 AutoReset<int> dispatch_holder(&dispatching_pointer_id_, pointer_id); | 176 AutoReset<int> dispatch_holder(&dispatching_pointer_id_, pointer_id); |
| 178 DispatchEventResult dispatch_result = target->DispatchEvent(pointer_event); | 177 DispatchEventResult dispatch_result = target->DispatchEvent(pointer_event); |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 if (first_id > unique_touch_event_id) | 751 if (first_id > unique_touch_event_id) |
| 753 return false; | 752 return false; |
| 754 touch_ids_for_canceled_pointerdowns_.TakeFirst(); | 753 touch_ids_for_canceled_pointerdowns_.TakeFirst(); |
| 755 if (first_id == unique_touch_event_id) | 754 if (first_id == unique_touch_event_id) |
| 756 return true; | 755 return true; |
| 757 } | 756 } |
| 758 return false; | 757 return false; |
| 759 } | 758 } |
| 760 | 759 |
| 761 } // namespace blink | 760 } // namespace blink |
| OLD | NEW |