Index: ui/events/blink/blink_event_util.cc |
diff --git a/ui/events/blink/blink_event_util.cc b/ui/events/blink/blink_event_util.cc |
index 9a3a648ae3306e5517b87255acd1c5d0f1fac847..47ed7873c763e6f3754e7c8e90312e0dc7b905c8 100644 |
--- a/ui/events/blink/blink_event_util.cc |
+++ b/ui/events/blink/blink_event_util.cc |
@@ -103,9 +103,15 @@ WebTouchPoint CreateWebTouchPoint(const MotionEvent& event, |
DCHECK_GE(major_radius, 0); |
DCHECK_GE(minor_radius, 0); |
DCHECK_GE(major_radius, minor_radius); |
+ // Orientation lies in [-90, 90] for a touch screen or pad and in [-180, 180] |
+ // for a stylus. |
// Allow a small bound tolerance to account for floating point conversion. |
- DCHECK_GT(orientation_deg, -90.01f); |
- DCHECK_LT(orientation_deg, 90.01f); |
+ DCHECK_GT(orientation_deg, -180.01f); |
jdduke (slow)
2015/05/28 15:01:45
I spoke offline with mustaq/tdresser. We decided i
USE eero AT chromium.org
2015/05/29 10:49:30
Done.
|
+ DCHECK_LT(orientation_deg, 180.01f); |
+ if (orientation_deg >= 90.f) |
jdduke (slow)
2015/05/28 15:01:45
Let's make this a strict inequality (>, <).
USE eero AT chromium.org
2015/05/29 10:49:30
Actually, this one should not be a strict inequali
|
+ orientation_deg -= 180.f; |
+ if (orientation_deg <= -90.f) |
USE eero AT chromium.org
2015/05/29 10:49:30
But this should be a strict inequality.
Done.
|
+ orientation_deg += 180.f; |
if (orientation_deg >= 0) { |
// The case orientation_deg == 0 is handled here on purpose: although the |
// 'else' block is equivalent in this case, we want to pass the 0 value |