window.ondevicemotion and window.ondeviceorientation

RESOLVED FIXED in Firefox 6

Status

()

defect
RESOLVED FIXED
8 years ago
3 months ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

({dev-doc-complete})

unspecified
mozilla6
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox6 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

8 years ago
webkit is supporting ondevicemotion and ondeviceorientation on the window object.  we should do similar for compatibility.
Assignee

Comment 1

8 years ago
Posted patch patch v.1Splinter Review
Assignee: nobody → doug.turner
Attachment #542491 - Flags: review?(Olli.Pettay)
Comment on attachment 542491 [details] [diff] [review]
patch v.1

r=me if you add tests for this new feature.
Attachment #542491 - Flags: review?(Olli.Pettay) → review+
Assignee

Updated

8 years ago
Attachment #542491 - Flags: approval-mozilla-aurora?
http://hg.mozilla.org/mozilla-central/rev/d36b92c20241
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Comment on attachment 542491 [details] [diff] [review]
patch v.1

Discussed in triage today - we didn't have dougt around so it might need a re-nom if we got it wrong, but it felt like straight-additive change which isn't what Aurora is for, and we didn't see a strong reason to rush this, given that it will hit aurora in next week's migration anyhow. Re-nom if needed.
Attachment #542491 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
Assignee

Comment 6

8 years ago
Comment on attachment 542491 [details] [diff] [review]
patch v.1

Sorry -- I didn't include a reason or risk assestment:

basically this change is a alias from window.ondevicemotion --> addEventListener("devicemotion", ...

This is a simple patch which gets us access to more sites that support device motion and orientation.  The iphone (and other webkits) use this style: window.onevent.  We didn't implement it as it wasn't outlined in the spec, but, given website compat, we feel that it is important to us.

So, if we take this small change, we get device motion functionality on sites that work on the iphone.  If we don't, it will appear broken for a few more weeks.

Ideally, this device motion (which has landed for ff6) could be a high level feature -- we are now supporting the new w3c spec.  However, without this aliasing that I mentioned, it might appear broken to many users.


The risk is low.  There are tests to ensure that the events fire.  The patch is modeled after a similar alias we did for onhashchange.
Attachment #542491 - Flags: approval-mozilla-aurora- → approval-mozilla-aurora?
Comment on attachment 542491 [details] [diff] [review]
patch v.1

From the jaws of defeat!! Thanks for the more detailed information Doug. We have reversed ourselves.
Attachment #542491 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee

Comment 9

8 years ago
merge failed.  backing out, will reland tonight.
Assignee

Updated

8 years ago

Updated

8 years ago
Keywords: dev-doc-needed

Updated

8 years ago
Depends on: 615597
This is landed into Firefox 6, so target is mozilla6.
Target Milestone: mozilla7 → mozilla6
Documentation added:

https://developer.mozilla.org/en/DOM/window.ondevicemotion
https://developer.mozilla.org/en/DOM/window.ondeviceorientation

And mentioned on Firefox 7 for developers.

Still a work in progress in that I need to add examples, which are coming. I'm working on the event docs, which will cover examples. That's being tracked by the doc needed for bug 615597, so I'm marking this one as done.
Component: DOM: Other → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.