Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1305)

Unified Diff: third_party/WebKit/Source/core/events/PointerEvent.cpp

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Creating CoalescedWebInputEvent Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/PointerEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/PointerEvent.cpp b/third_party/WebKit/Source/core/events/PointerEvent.cpp
index 4d63b1e14d0e8cf43088b6d10b846c4241a96d63..66f8b63497c42d9d1518aeaeb06303be2852d0dd 100644
--- a/third_party/WebKit/Source/core/events/PointerEvent.cpp
+++ b/third_party/WebKit/Source/core/events/PointerEvent.cpp
@@ -11,6 +11,18 @@ namespace blink {
PointerEvent::PointerEvent(const AtomicString& type,
const PointerEventInit& initializer)
+ : PointerEvent(type, initializer, true) {
+ if (initializer.hasCoalescedEventInits()) {
+ for (auto coalescedEventInit : initializer.coalescedEventInits()) {
+ m_coalescedEvents.append(
+ new PointerEvent(type, coalescedEventInit, true));
+ }
+ }
+}
+
+PointerEvent::PointerEvent(const AtomicString& type,
+ const PointerEventInit& initializer,
+ bool)
: MouseEvent(type, initializer),
m_pointerId(0),
m_width(0),
@@ -49,7 +61,12 @@ EventDispatchMediator* PointerEvent::createMediator() {
return PointerEventDispatchMediator::create(this);
}
+HeapVector<Member<PointerEvent>> PointerEvent::getCoalescedEvents() const {
+ return m_coalescedEvents;
+}
+
DEFINE_TRACE(PointerEvent) {
+ visitor->trace(m_coalescedEvents);
MouseEvent::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698