window.ondevicemotion and window.ondeviceorientation

RESOLVED FIXED in Firefox 6

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

({dev-doc-complete})

unspecified
mozilla6
x86
Mac OS X
dev-doc-complete
Points:
---

Firefox Tracking Flags

(firefox6 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

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

Comment 1

6 years ago
Created attachment 542491 [details] [diff] [review]
patch v.1
Assignee: nobody → doug.turner
Attachment #542491 - Flags: review?(Olli.Pettay)

Comment 2

6 years ago
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

6 years ago
Attachment #542491 - Flags: approval-mozilla-aurora?
(Assignee)

Comment 3

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/d36b92c20241
http://hg.mozilla.org/mozilla-central/rev/d36b92c20241
Status: NEW → RESOLVED
Last Resolved: 6 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

6 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 7

6 years ago
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 8

6 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/506903048c61

thanks asa.
status-firefox6: --- → fixed
(Assignee)

Comment 9

6 years ago
merge failed.  backing out, will reland tonight.
(Assignee)

Updated

6 years ago
status-firefox6: fixed → ---
(Assignee)

Comment 10

6 years ago
backout changeset: http://hg.mozilla.org/releases/mozilla-aurora/rev/130934a607ae
(Assignee)

Comment 11

6 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/6233fbcc2166
status-firefox6: --- → fixed

Updated

6 years ago
Keywords: dev-doc-needed

Updated

6 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.
Keywords: dev-doc-needed → dev-doc-complete
Component: DOM: Other → DOM
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.