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

Unified Diff: ui/events/event.cc

Issue 1026573002: Prevent TouchEvent Crash on X (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « ui/events/event.h ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 5e7d8c86377a4d6a7c5546dcde02b6a76e6c71d4..fe58be2472f88e26052665158bf9904a65c5f50c 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -582,6 +582,21 @@ TouchEvent::TouchEvent(EventType type,
FixRotationAngle();
}
+TouchEvent::TouchEvent(const TouchEvent& copy)
+ : LocatedEvent(copy),
+ touch_id_(copy.touch_id_),
+ unique_event_id_(copy.unique_event_id_),
+ radius_x_(copy.radius_x_),
+ radius_y_(copy.radius_y_),
+ rotation_angle_(copy.rotation_angle_),
+ force_(copy.force_),
+ may_cause_scrolling_(copy.may_cause_scrolling_),
+ should_remove_native_touch_id_mapping_(false) {
+ // Copied events should not remove touch id mapping, as this either causes the
+ // mapping to be lost before the initial event has finished dispatching, or
+ // the copy to attempt to remove the mapping from a null |native_event_|.
+}
+
TouchEvent::~TouchEvent() {
// In ctor TouchEvent(native_event) we call GetTouchId() which in X11
// platform setups the tracking_id to slot mapping. So in dtor here,
« no previous file with comments | « ui/events/event.h ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698