Bug 30335
Summary: | add support for accelerometer / orientation events | ||
---|---|---|---|
Product: | WebKit | Reporter: | Patrick Mueller <pmuellr> |
Component: | WebCore JavaScript | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Enhancement | CC: | andreip, dougt, hans, marcosc, steveblock |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://dev.w3.org/geo/api/spec-source-orientation.html | ||
Bug Depends on: | 47670, 39210, 39479, 39588, 39589, 39590, 41618, 41685, 42304, 42865, 43025, 43181, 43785, 43848, 45460, 45891, 47257, 47408, 51742 | ||
Bug Blocks: |
Patrick Mueller
Firefox has added some accelerometer / orientation JavaScript events in their nightlies. It would be nice to have this for WebKit as well.
links:
- Doug Turner's blog posts (Moz developer):
http://dougt.org/wordpress/tag/mozorientation/
- demo movie
http://blip.tv/file/2711424
- Mozilla's IDL for the event:
http://mxr.mozilla.org/mozilla-central/source/widget/public/nsIAccelerometer.idl
- for reference, iPhone OS doc on accelerometer APIs:
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIAccelerometer_Class/Reference/UIAccelerometer.html
- Android doc on Sensor events, that can track acceleration and orientation as separate things
http://developer.android.com/reference/android/hardware/SensorEvent.html
Unfortunately, there's no "API" apparently for desktop macs, though accessing accelerometer data is described in "Mac OS X Internals: A Systems Approach" by Amit Singh (section 10.7.5). Accelerometers are available for some PC laptops as well, though the usage on a laptop seems a bit of a stretch.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Steve Block
There's now a draft spec for both orientation and accelerometer events. It's being developed by the Geolocation working group of which Doug is an active member. See http://dev.w3.org/geo/api/spec-source-orientation.html.
We plan to implement this in Android soon.
Steve Block
> We plan to implement this in Android soon.
By which I mean we'll contribute both the WebCore common code and the specifics for the Android port.
Patches coming soon ...
Steve Block
I'll implement DeviceOrientation in stages, with separate bugs to track each stage.
I've filed Bug 39210 to tack the addition of the bindings.
Hans Wennborg
Adding myself to the CC list.
Steve Block
Added spec link to bug's URL field
Marcos Caceres
WebKit implements the Device Orientation and Motion spec.