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

Unified Diff: ui/events/event.cc

Issue 657603002: ash: ozone: apply transformation to events outside the root window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on ToT Created 6 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: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 894d5b0f2aded44d4880e4ce2d25b043c4d4477e..ae7412cb0e5f52bb140dbf891bcd6c421a8234b3 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -950,6 +950,26 @@ ScrollEvent::ScrollEvent(EventType type,
CHECK(IsScrollEvent());
}
+ScrollEvent::ScrollEvent(EventType type,
+ const gfx::PointF& location,
+ const gfx::PointF& root_location,
+ base::TimeDelta time_stamp,
+ int flags,
+ float x_offset,
+ float y_offset,
+ float x_offset_ordinal,
+ float y_offset_ordinal,
+ int finger_count)
+ : MouseEvent(type, location, root_location, flags, 0),
+ x_offset_(x_offset),
+ y_offset_(y_offset),
+ x_offset_ordinal_(x_offset_ordinal),
+ y_offset_ordinal_(y_offset_ordinal),
+ finger_count_(finger_count) {
+ set_time_stamp(time_stamp);
+ CHECK(IsScrollEvent());
+}
+
void ScrollEvent::Scale(const float factor) {
x_offset_ *= factor;
y_offset_ *= factor;

Powered by Google App Engine
This is Rietveld 408576698