OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/events/PointerEvent.h" | 5 #include "core/events/PointerEvent.h" |
6 | 6 |
7 #include "core/dom/Element.h" | 7 #include "core/dom/Element.h" |
8 #include "core/events/EventDispatcher.h" | 8 #include "core/events/EventDispatcher.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 PointerEvent::PointerEvent() | |
13 : m_pointerId(0) | |
14 , m_width(0) | |
15 , m_height(0) | |
16 , m_pressure(0) | |
17 , m_tiltX(0) | |
18 , m_tiltY(0) | |
19 , m_isPrimary(false) | |
20 { | |
21 } | |
22 | |
23 PointerEvent::PointerEvent(const AtomicString& type, const PointerEventInit& ini
tializer) | 12 PointerEvent::PointerEvent(const AtomicString& type, const PointerEventInit& ini
tializer) |
24 : MouseEvent(type, initializer) | 13 : MouseEvent(type, initializer) |
25 , m_pointerId(0) | 14 , m_pointerId(0) |
26 , m_width(0) | 15 , m_width(0) |
27 , m_height(0) | 16 , m_height(0) |
28 , m_pressure(0) | 17 , m_pressure(0) |
29 , m_tiltX(0) | 18 , m_tiltX(0) |
30 , m_tiltY(0) | 19 , m_tiltY(0) |
31 , m_isPrimary(false) | 20 , m_isPrimary(false) |
32 { | 21 { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 return DispatchEventResult::NotCanceled; // Shouldn't happen. | 81 return DispatchEventResult::NotCanceled; // Shouldn't happen. |
93 | 82 |
94 ASSERT(!event().target() || event().target() != event().relatedTarget()); | 83 ASSERT(!event().target() || event().target() != event().relatedTarget()); |
95 | 84 |
96 event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relate
dTarget()); | 85 event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relate
dTarget()); |
97 | 86 |
98 return dispatcher.dispatch(); | 87 return dispatcher.dispatch(); |
99 } | 88 } |
100 | 89 |
101 } // namespace blink | 90 } // namespace blink |
OLD | NEW |