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

Remove '?' from dictionary members of DeviceMotionEventInit #55

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

reillyeon
Copy link
Member

It is invalid for a dictionary member that resolves to a nullable type
to be marked with '?'. This change is effectively a no-op because these
fields remain nullable.

Resolves #54.

It is invalid for a dictionary member that resolves to a nullable type
to be marked with '?'. This change is effectively a no-op because these
fields remain nullable.

Resolves w3c#54.
@reillyeon reillyeon requested a review from anssiko September 22, 2018 01:27
@anssiko
Copy link
Member

anssiko commented Sep 24, 2018

Pending #54 to reach consensus, would also like to see @bzbarsky sign off this spec change to make sure we coordinate with Gecko.

Related, not specified is the expected behavior when a DeviceMotionEventInit dictionary member is undefined. I'd be fine us addressing that in this PR and discuss it in #54 to retain context.

@bzbarsky
Copy link

bzbarsky commented Sep 24, 2018

The IDL change looks fine as far as it goes. I'll follow up in #54 with some comments about what is or is not specified.

@reillyeon
Copy link
Member Author

Discussed at Devices and Sensors WG Face-to-face at TPAC 2018. Agreed to accept this change.

@reillyeon reillyeon merged commit 601807d into w3c:gh-pages Oct 23, 2018
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 21, 2018
It is invalid for a WebIDL dictionary member that resolves to a nullable
type to be marked with '?'. This change is effectively a no-op because
these fields remain nullable.

This patch implements the changes to the specification in:
w3c/deviceorientation#55

Change-Id: I43222ec37ec216f8cb2932aedbddfb307ec4374f
Reviewed-on: https://chromium-review.googlesource.com/c/1239722
Commit-Queue: Reilly Grant <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Cr-Commit-Position: refs/heads/master@{#609930}
@reillyeon reillyeon deleted the fix_nullables branch December 26, 2018 23:05
reillyeon added a commit that referenced this pull request Feb 28, 2024
This change reverts #55 and defines the default values of the
DeviceMotionEventInit as null as I believe was the original intent of
the definition before that change.

Null DeviceMotionEvent attributes have semantic meaning (they declare
that the host does not provide the given sensor) and so script should
be able to initialize an event with its attributes set to null.

Fixed #91.
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.

Invalid IDL in DeviceMotionEventInit
3 participants