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

Issue 800163005: Fixed ui::TouchEvent rotation angle out-of-bound issue. (Closed)

Created:
5 years, 11 months ago by mustaq
Modified:
5 years, 9 months ago
Reviewers:
sadrul, tdresser
CC:
chromium-reviews, jdduke+watch_chromium.org, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed ui::TouchEvent rotation angle out-of-bound issue. The rotation angle in ui::TouchEvent should lie within 0 and 90 as per the spec: https://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html We have seen cases where the angle we got from hardware is not within the limits. This CL keeps the angle value sane. BUG=438256 Committed: https://crrev.com/2598c69a3c184095cdcc911b24cb47930b66c5ec Cr-Commit-Position: refs/heads/master@{#312447}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Removed few unsed setters from ui::TouchEvent #

Total comments: 9

Patch Set 3 : Tweaked ui:TouchEvent angle range, added unittests. #

Total comments: 6

Patch Set 4 : Added tests for motion_event_aura angles #

Total comments: 2

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -36 lines) Patch
M ui/events/event.h View 1 2 3 4 5 2 chunks +5 lines, -13 lines 0 comments Download
M ui/events/event.cc View 1 2 3 3 chunks +9 lines, -0 lines 0 comments Download
M ui/events/event_unittest.cc View 1 2 3 4 5 1 chunk +52 lines, -4 lines 0 comments Download
M ui/events/gestures/motion_event_aura.cc View 1 2 3 4 1 chunk +9 lines, -1 line 0 comments Download
M ui/events/gestures/motion_event_aura_unittest.cc View 1 2 3 4 6 chunks +48 lines, -18 lines 0 comments Download

Messages

Total messages: 32 (6 generated)
mustaq
ptal. I haven't checked the actual errors in angle yet, but I think clipping out-of-range ...
5 years, 11 months ago (2015-01-16 20:20:54 UTC) #2
tdresser
On 2015/01/16 20:20:54, mustaq wrote: > ptal. > > I haven't checked the actual errors ...
5 years, 11 months ago (2015-01-16 20:29:46 UTC) #3
tdresser
https://codereview.chromium.org/800163005/diff/1/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/800163005/diff/1/ui/events/event.h#newcode584 ui/events/event.h:584: // https://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html As we're in the ui layer here, ...
5 years, 11 months ago (2015-01-16 20:29:52 UTC) #4
jdduke (slow)
On 2015/01/16 20:29:52, tdresser wrote: > https://codereview.chromium.org/800163005/diff/1/ui/events/event.h > File ui/events/event.h (right): > > https://codereview.chromium.org/800163005/diff/1/ui/events/event.h#newcode584 > ...
5 years, 11 months ago (2015-01-16 20:38:15 UTC) #5
tdresser
On 2015/01/16 20:38:15, jdduke wrote: > On 2015/01/16 20:29:52, tdresser wrote: > > https://codereview.chromium.org/800163005/diff/1/ui/events/event.h > ...
5 years, 11 months ago (2015-01-16 20:42:44 UTC) #6
jdduke (slow)
On 2015/01/16 20:42:44, tdresser wrote: > On 2015/01/16 20:38:15, jdduke wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 20:49:01 UTC) #7
tdresser
On 2015/01/16 20:49:01, jdduke wrote: > On 2015/01/16 20:42:44, tdresser wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-17 14:28:10 UTC) #8
mustaq
On 2015/01/17 14:28:10, tdresser wrote: > On 2015/01/16 20:49:01, jdduke wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-19 17:15:27 UTC) #9
mustaq
ptal: made ui::TouchEvent immutable, added a few missing points in the spec, fixed -ve angle ...
5 years, 11 months ago (2015-01-19 18:24:56 UTC) #10
tdresser
On 2015/01/19 18:24:56, mustaq wrote: > ptal: made ui::TouchEvent immutable, added a few missing points ...
5 years, 11 months ago (2015-01-20 13:36:30 UTC) #11
tdresser
https://codereview.chromium.org/800163005/diff/20001/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/800163005/diff/20001/ui/events/event.cc#newcode606 ui/events/event.cc:606: void TouchEvent::fixRotationAngle() { The bounds are [-90, 90], correct? ...
5 years, 11 months ago (2015-01-20 13:36:40 UTC) #12
tdresser
On 2015/01/20 13:36:40, tdresser wrote: > https://codereview.chromium.org/800163005/diff/20001/ui/events/event.cc > File ui/events/event.cc (right): > > https://codereview.chromium.org/800163005/diff/20001/ui/events/event.cc#newcode606 > ...
5 years, 11 months ago (2015-01-20 13:38:04 UTC) #13
mustaq
On 2015/01/20 13:38:04, tdresser wrote: > On 2015/01/20 13:36:40, tdresser wrote: > > https://codereview.chromium.org/800163005/diff/20001/ui/events/event.cc > ...
5 years, 11 months ago (2015-01-20 16:26:15 UTC) #14
mustaq
ptal https://codereview.chromium.org/800163005/diff/20001/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/800163005/diff/20001/ui/events/event.cc#newcode606 ui/events/event.cc:606: void TouchEvent::fixRotationAngle() { On 2015/01/20 13:36:39, tdresser wrote: ...
5 years, 11 months ago (2015-01-20 16:26:47 UTC) #15
tdresser
https://codereview.chromium.org/800163005/diff/20001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/800163005/diff/20001/ui/events/event.h#newcode553 ui/events/event.h:553: // Radius of the X (major) axis of the ...
5 years, 11 months ago (2015-01-20 16:40:39 UTC) #16
mustaq
ptal https://codereview.chromium.org/800163005/diff/40001/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/800163005/diff/40001/ui/events/event.cc#newcode607 ui/events/event.cc:607: if (rotation_angle_ < 0) On 2015/01/20 16:40:38, tdresser ...
5 years, 11 months ago (2015-01-21 16:43:10 UTC) #19
mustaq
https://codereview.chromium.org/800163005/diff/40001/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/800163005/diff/40001/ui/events/event.cc#newcode607 ui/events/event.cc:607: if (rotation_angle_ < 0) On 2015/01/21 16:43:10, mustaq wrote: ...
5 years, 11 months ago (2015-01-21 16:54:30 UTC) #21
tdresser
LGTM with nit. https://codereview.chromium.org/800163005/diff/120001/ui/events/gestures/motion_event_aura.cc File ui/events/gestures/motion_event_aura.cc (right): https://codereview.chromium.org/800163005/diff/120001/ui/events/gestures/motion_event_aura.cc#newcode40 ui/events/gestures/motion_event_aura.cc:40: rotation_angle_rad -= (float) M_PI_2; Use static_cast<float>
5 years, 11 months ago (2015-01-21 17:09:08 UTC) #22
tdresser
On 2015/01/21 17:09:08, tdresser wrote: > LGTM with nit. > > https://codereview.chromium.org/800163005/diff/120001/ui/events/gestures/motion_event_aura.cc > File ui/events/gestures/motion_event_aura.cc ...
5 years, 11 months ago (2015-01-21 17:10:17 UTC) #23
mustaq
Created crbug.com/450655 to track unittest cleanup. https://codereview.chromium.org/800163005/diff/120001/ui/events/gestures/motion_event_aura.cc File ui/events/gestures/motion_event_aura.cc (right): https://codereview.chromium.org/800163005/diff/120001/ui/events/gestures/motion_event_aura.cc#newcode40 ui/events/gestures/motion_event_aura.cc:40: rotation_angle_rad -= (float) ...
5 years, 11 months ago (2015-01-21 18:31:55 UTC) #24
mustaq
sadrul@chromium.org: Please review changes in ui/events.
5 years, 11 months ago (2015-01-21 18:34:30 UTC) #26
sadrul
LGTM https://codereview.chromium.org/800163005/diff/140001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/800163005/diff/140001/ui/events/event.h#newcode572 ui/events/event.h:572: void fixRotationAngle(); FixRotationAngle(). Move this right after 'private:' ...
5 years, 11 months ago (2015-01-21 18:42:45 UTC) #27
mustaq
https://codereview.chromium.org/800163005/diff/140001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/800163005/diff/140001/ui/events/event.h#newcode572 ui/events/event.h:572: void fixRotationAngle(); On 2015/01/21 18:42:45, sadrul wrote: > FixRotationAngle(). ...
5 years, 11 months ago (2015-01-21 19:18:45 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/800163005/160001
5 years, 11 months ago (2015-01-21 19:21:06 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:160001)
5 years, 11 months ago (2015-01-21 20:49:21 UTC) #31
commit-bot: I haz the power
5 years, 11 months ago (2015-01-21 20:50:25 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/2598c69a3c184095cdcc911b24cb47930b66c5ec
Cr-Commit-Position: refs/heads/master@{#312447}

Powered by Google App Engine
This is Rietveld 408576698