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

Issue 40393002: Android: fix the computation of device orientation angles in accordance with spec. (Closed)

Created:
7 years, 2 months ago by timvolodine
Modified:
7 years, 1 month ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, Peter Beverloo, Steve Block
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Android: fix the computation of device orientation angles in accordance with spec. Currently the alpha, beta, gamma device orientation angles are computed incorrectly in Chrome. This patch provides an implementation for the computation of these angles according to spec, see http://dev.w3.org/geo/api/spec-source-orientation.html. In particular the ranges for alpha [0,2*pi), beta [-pi,pi) and gamma [-pi/2,pi/2), with clockwise-positive rotation conventions. At present time most browsers implement the orientation angles incorrectly. For example Safari, Firefox and Opera all provide different and inconsitent results. The solution in this patch could serve as a reference implementation. BUG=244411 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232299

Patch Set 1 #

Total comments: 18

Patch Set 2 : fixed comments #

Total comments: 2

Patch Set 3 : fixed comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -30 lines) Patch
M content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java View 1 2 2 chunks +89 lines, -29 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/DeviceMotionAndOrientationTest.java View 1 3 chunks +97 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
timvolodine
7 years, 2 months ago (2013-10-24 15:26:39 UTC) #1
timvolodine
+ Marcus [because we need an owner ;) ]
7 years, 2 months ago (2013-10-24 15:28:19 UTC) #2
bulach
lgtm, just nits. also, I'd be happy to lgtm a change adding you both as ...
7 years, 2 months ago (2013-10-24 17:08:44 UTC) #3
Michael van Ouwerkerk
https://codereview.chromium.org/40393002/diff/1/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java File content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java (right): https://codereview.chromium.org/40393002/diff/1/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java#newcode231 content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java:231: * <b>R</b> = <b>Rz</b>(alpha)*<b>Rx</b>(beta)*<b>Ry</b>(gamma), Perhaps all of this documentation ...
7 years, 1 month ago (2013-10-29 16:18:06 UTC) #4
timvolodine
https://codereview.chromium.org/40393002/diff/1/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java File content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java (right): https://codereview.chromium.org/40393002/diff/1/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java#newcode231 content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java:231: * <b>R</b> = <b>Rz</b>(alpha)*<b>Rx</b>(beta)*<b>Ry</b>(gamma), On 2013/10/29 16:18:06, Michael van ...
7 years, 1 month ago (2013-10-30 14:14:46 UTC) #5
Michael van Ouwerkerk
lgtm https://codereview.chromium.org/40393002/diff/90001/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java File content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java (right): https://codereview.chromium.org/40393002/diff/90001/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java#newcode240 content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java:240: * 'pitch' angle beta is allowed to be ...
7 years, 1 month ago (2013-10-30 14:21:02 UTC) #6
timvolodine
thanks for the review guys! https://codereview.chromium.org/40393002/diff/90001/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java File content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java (right): https://codereview.chromium.org/40393002/diff/90001/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java#newcode240 content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java:240: * 'pitch' angle beta ...
7 years, 1 month ago (2013-10-30 14:40:00 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timvolodine@chromium.org/40393002/160001
7 years, 1 month ago (2013-10-31 18:32:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timvolodine@chromium.org/40393002/160001
7 years, 1 month ago (2013-10-31 23:17:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timvolodine@chromium.org/40393002/160001
7 years, 1 month ago (2013-11-01 00:15:24 UTC) #10
commit-bot: I haz the power
7 years, 1 month ago (2013-11-01 05:36:28 UTC) #11
Message was sent while issue was closed.
Change committed as 232299

Powered by Google App Engine
This is Rietveld 408576698