Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeviceOrientationEvent: Define absolute's value on error #139

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

rakuco
Copy link
Member

@rakuco rakuco commented Feb 13, 2024

We were only requiring alpha, beta, and gamma to be null. It makes sense to
also require implementations to set absolute to the same value as well.

At the time of writing, this is done for completeness' sake though:

  • Blink implements this behavior and sets absolute to false when a
    deviceorientation cannot be provided, and to true for
    deviceorientationabsolute events.
  • Gecko does not send any events if it cannot provide readings (e.g. when
    there are no sensors available).
  • WebKit only ships an iOS implementation, whose IDL does not even have an
    absolute attribute.

Fixes #119.


Preview | Diff

We were only requiring alpha, beta, and gamma to be null. It makes sense to
also require implementations to set absolute to the same value as well.

At the time of writing, this is done for completeness' sake though:
- Blink implements this behavior and sets absolute to false when a
  deviceorientation cannot be provided, and to true for
  deviceorientationabsolute events.
- Gecko does not send any events if it cannot provide readings (e.g. when
  there are no sensors available).
- WebKit only ships an iOS implementation, whose IDL does not even have an
  absolute attribute.

Fixes #119.
@rakuco rakuco requested a review from reillyeon February 13, 2024 12:30
rakuco pushed a commit to rakuco/wpt that referenced this pull request Feb 13, 2024
Test for w3c/deviceorientation#139. When a reading
cannot be provided, `absolute` needs to be set accordingly depending on the
event type we are listening to.
@rakuco
Copy link
Member Author

rakuco commented Feb 13, 2024

Accompanying web test in web-platform-tests/wpt#44557

@rakuco
Copy link
Member Author

rakuco commented Feb 13, 2024

For posterity:

  • Gecko does not send any events if it cannot provide readings (e.g. when
    there are no sensors available).
  • WebKit only ships an iOS implementation, whose IDL does not even have an
    absolute attribute.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
@rakuco rakuco merged commit c0f629e into main Feb 14, 2024
2 checks passed
@rakuco rakuco deleted the set-absolute-to-false-on-error branch February 14, 2024 17:12
rakuco pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2024
…ror (#44557)

Test for w3c/deviceorientation#139. When a reading
cannot be provided, `absolute` needs to be set accordingly depending on the
event type we are listening to.
github-actions bot added a commit that referenced this pull request Feb 14, 2024
SHA: c0f629e
Reason: push, by rakuco

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 19, 2024
…nEvent's absolute value on error, a=testonly

Automatic update from web-platform-tests
orientation-event: Test DeviceOrientationEvent's absolute value on error (#44557)

Test for w3c/deviceorientation#139. When a reading
cannot be provided, `absolute` needs to be set accordingly depending on the
event type we are listening to.
--

wpt-commits: fb4cd8f597e9b40725a51222b4627cbd6d94c528
wpt-pr: 44557
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Feb 20, 2024
…nEvent's absolute value on error, a=testonly

Automatic update from web-platform-tests
orientation-event: Test DeviceOrientationEvent's absolute value on error (#44557)

Test for w3c/deviceorientation#139. When a reading
cannot be provided, `absolute` needs to be set accordingly depending on the
event type we are listening to.
--

wpt-commits: fb4cd8f597e9b40725a51222b4627cbd6d94c528
wpt-pr: 44557

UltraBlame original commit: 7ea0f73ea84b32a3a50b42e6058419b99f4b4bc6
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Feb 20, 2024
…nEvent's absolute value on error, a=testonly

Automatic update from web-platform-tests
orientation-event: Test DeviceOrientationEvent's absolute value on error (#44557)

Test for w3c/deviceorientation#139. When a reading
cannot be provided, `absolute` needs to be set accordingly depending on the
event type we are listening to.
--

wpt-commits: fb4cd8f597e9b40725a51222b4627cbd6d94c528
wpt-pr: 44557
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 23, 2024
…ror (#44557)

Test for w3c/deviceorientation#139. When a reading
cannot be provided, `absolute` needs to be set accordingly depending on the
event type we are listening to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeviceOrientationEvent.absolute's value when data cannot be obtained
2 participants