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 { |
(...skipping 19 matching lines...) Expand all Loading... |
30 if (initializer.hasTiltX()) | 30 if (initializer.hasTiltX()) |
31 m_tiltX = initializer.tiltX(); | 31 m_tiltX = initializer.tiltX(); |
32 if (initializer.hasTiltY()) | 32 if (initializer.hasTiltY()) |
33 m_tiltY = initializer.tiltY(); | 33 m_tiltY = initializer.tiltY(); |
34 if (initializer.hasPointerType()) | 34 if (initializer.hasPointerType()) |
35 m_pointerType = initializer.pointerType(); | 35 m_pointerType = initializer.pointerType(); |
36 if (initializer.hasIsPrimary()) | 36 if (initializer.hasIsPrimary()) |
37 m_isPrimary = initializer.isPrimary(); | 37 m_isPrimary = initializer.isPrimary(); |
38 if (initializer.hasCoalescedEvents()) { | 38 if (initializer.hasCoalescedEvents()) { |
39 for (auto coalescedEvent : initializer.coalescedEvents()) | 39 for (auto coalescedEvent : initializer.coalescedEvents()) |
40 m_coalescedEvents.append(coalescedEvent); | 40 m_coalescedEvents.push_back(coalescedEvent); |
41 } | 41 } |
42 } | 42 } |
43 | 43 |
44 bool PointerEvent::isMouseEvent() const { | 44 bool PointerEvent::isMouseEvent() const { |
45 return false; | 45 return false; |
46 } | 46 } |
47 | 47 |
48 bool PointerEvent::isPointerEvent() const { | 48 bool PointerEvent::isPointerEvent() const { |
49 return true; | 49 return true; |
50 } | 50 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 DCHECK(!event().target() || event().target() != event().relatedTarget()); | 86 DCHECK(!event().target() || event().target() != event().relatedTarget()); |
87 | 87 |
88 event().eventPath().adjustForRelatedTarget(dispatcher.node(), | 88 event().eventPath().adjustForRelatedTarget(dispatcher.node(), |
89 event().relatedTarget()); | 89 event().relatedTarget()); |
90 | 90 |
91 return dispatcher.dispatch(); | 91 return dispatcher.dispatch(); |
92 } | 92 } |
93 | 93 |
94 } // namespace blink | 94 } // namespace blink |
OLD | NEW |