Closed Bug 1462175 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 11038 - Make device orientation event pump match wpt test

Categories

(Core :: DOM: Device Interfaces, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 11038 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/w3c/web-platform-tests/pull/11038
Details from upstream follow.

Robbie McElrath <rmcelrath@chromium.org> wrote:
>  Make device orientation event pump match wpt test
>  
>  This changes the behavior of the deviceorientationabsolute event when the
>  orientation sensor can't be read from. Currently if no sensor is available, we
>  fire a null event with the 'absolute' property set to true if the event being
>  listened to is deviceorientationabsolute, and false if it's deviceorientation.
>  
>  From the spec:
>  https://w3c.github.io/deviceorientation/spec-source-orientation.html
>  "Implementations that are unable to provide all three angles must set the values
>  of the unknown angles to null. If any angles are provided, the absolute property
>  must be set appropriately. If an implementation can never provide orientation
>  information, the event should be fired with the alpha, beta and gamma attributes
>  set to null."
>  
>  It doesn't specify what the value of the 'absolute' property should be if the
>  sensor isn't available. This CL changes the current behavior to set it to false
>  instead of true for deviceorientationabsolute events because
>   a) There's a WPT test that asserts the absolute property is false.
>   b) The spec says that the other fields should be null, which is their default
>      value, so it's consistent for the absolute property to be its default value
>      as well.
>  
>  Bug: 774183, 802815
>  Change-Id: I3694e2b774aa0e4a8a9f7d0328e2aad8b37775e6
>  Reviewed-on: https://chromium-review.googlesource.com/1062650
>  WPT-Export-Revision: ea7ad0f04596f10ec359850471224f84b15816de
Component: web-platform-tests → DOM: Device Interfaces
Product: Testing → Core
Ran 1 tests and 1 subtests
TIMEOUT: 1
NOTRUN : 1
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6a95f950cf63
[wpt PR 11038] - Make deviceorientationabsoluteevent WPT test match spec, a=testonly
https://hg.mozilla.org/mozilla-central/rev/6a95f950cf63
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.