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

Unified Diff: ui/events/event.h

Issue 800163005: Fixed ui::TouchEvent rotation angle out-of-bound issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | ui/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index 754f5c90aaaddd879d5ae7a9888a0b2631302cd9..81b57bef60cf20e828b7f93350b792a4f0d756f3 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -550,6 +550,7 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
void set_rotation_angle(float rotation_angle) {
rotation_angle_ = rotation_angle;
+ fixRotationAngle();
}
void set_force(float force) { force_ = force; }
@@ -578,6 +579,10 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
// touchmove that exceeds the platform slop region, or a touchend that
// causes a fling). Defaults to false.
bool may_cause_scrolling_;
+
+ // Adjusts rotation_angle_ to within the spec limits:
+ // https://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html
tdresser 2015/01/16 20:29:52 As we're in the ui layer here, I don't think we wa
+ void fixRotationAngle();
};
// An interface that individual platforms can use to store additional data on
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698