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

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

Issue 2772443006: Set trusted flag of coalesced events at creation (Closed)
Patch Set: Created 3 years, 9 months 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/PointerEventFactory.cpp
diff --git a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
index d38bd6f030f413255ad225d63203a4869da13a4f..4405fbf345e47c5e4c757aecc497c2926b1774b9 100644
--- a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
+++ b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
@@ -279,10 +279,14 @@ PointerEvent* PointerEventFactory::create(
DCHECK_EQ(mouseEvent.pointerType, coalescedMouseEvent.pointerType);
PointerEventInit coalescedEventInit = pointerEventInit;
+ coalescedEventInit.setCancelable(false);
+ coalescedEventInit.setBubbles(false);
updateMousePointerEventInit(coalescedMouseEvent, view,
&coalescedEventInit);
- coalescedPointerEvents.push_back(
- PointerEvent::create(pointerEventName, coalescedEventInit));
+ PointerEvent* event =
+ PointerEvent::create(pointerEventName, coalescedEventInit);
+ event->setTrusted(true);
dtapuska 2017/03/24 21:14:02 likely this deserves a comment
Navid Zolghadr 2017/03/27 15:16:16 Done.
+ coalescedPointerEvents.push_back(event);
}
pointerEventInit.setCoalescedEvents(coalescedPointerEvents);
}
@@ -330,10 +334,13 @@ PointerEvent* PointerEventFactory::create(
DCHECK_EQ(touchPoint.id, coalescedTouchPoint.id);
DCHECK_EQ(touchPoint.pointerType, coalescedTouchPoint.pointerType);
PointerEventInit coalescedEventInit = pointerEventInit;
+ coalescedEventInit.setCancelable(false);
+ coalescedEventInit.setBubbles(false);
updateTouchPointerEventInit(coalescedTouchPoint, targetFrame,
&coalescedEventInit);
- coalescedPointerEvents.push_back(
- PointerEvent::create(type, coalescedEventInit));
+ PointerEvent* event = PointerEvent::create(type, coalescedEventInit);
+ event->setTrusted(true);
dtapuska 2017/03/24 21:14:02 ditto
Navid Zolghadr 2017/03/27 15:16:16 Done.
+ coalescedPointerEvents.push_back(event);
}
pointerEventInit.setCoalescedEvents(coalescedPointerEvents);
}

Powered by Google App Engine
This is Rietveld 408576698