Closed Bug 1014581 Opened 9 years ago Closed 9 years ago
Update Vibration API to conform to latest W3C spec
The current Vibration implementation should be updated to match the latest spec (and to match Chrome). The following needs to be supported from : 4. "If the length of pattern is greater than max length, truncate pattern, leaving only the first max length entries." Currently, we return false. "7. For each entry in pattern whose value is greater than max duration, set the entry's value to max duration." Not sure what we do here, but I'm told it's not right. Relevant bits of code: http://lxr.mozilla.org/mozilla-central/source/dom/base/Navigator.cpp#793 http://lxr.mozilla.org/mozilla-central/source/dom/base/Navigator.cpp#797  http://www.w3.org/TR/vibration/#dfn-processing-vibration-patterns
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [good first bug]
Version: 31 Branch → Trunk
This looks like a better good-next than good-first. Marcos, would you be willing to mentor this bug?
Whiteboard: [good first bug] → [good next bug]
I'm happy to help answer questions related to the specification if needed (I'm the spec editor).
(In reply to Mike Hoye [:mhoye] from comment #1) > This looks like a better good-next than good-first. Marcos, would you be > willing to mentor this bug? I'm still not confident enough with the process of getting things in Gecko to be able to mentor this bug. Also, as this involves c++, I won't really be able to help much (I'm mostly a JS shop).
Taking the bug. I have a patch for this but can't upload it yet. Will do ASAP. Though, Anssi, as long as you are around, it seems that the step 6 isn't followed by Gecko. Do you know the rationale of that step?
Status: NEW → ASSIGNED
QA Contact: mounir
Attachment #8428635 - Flags: review?(bugs) → review+
Target Milestone: --- → mozilla32
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(In reply to Mounir Lamouri (:mounir) from comment #4) > Taking the bug. I have a patch for this but can't upload it yet. Will do > ASAP. > > Though, Anssi, as long as you are around, it seems that the step 6 isn't > followed by Gecko. Do you know the rationale of that step? The rationale: http://www.w3.org/2009/dap/track/issues/149 The full story: http://lists.w3.org/Archives/Public/public-device-apis/2014May/0046.html Mounir - thanks for the patch!
Oups, there was a typo that smaug and I missed. Landed a fix here: https://hg.mozilla.org/integration/mozilla-inbound/rev/0ea62f66f109
Lawrence added it in the release notes with "Vibration API updated to latest W3C spec" as wording.
You need to log in before you can comment on or make changes to this bug.