W3C home > Mailing lists > Public > public-device-apis-log@w3.org > September 2018

Re: [deviceorientation] Invalid IDL in DeviceMotionEventInit

From: Reilly Grant via GitHub <sysbot+gh@w3.org>
Date: Sat, 22 Sep 2018 15:15:25 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-423750994-1537629324-sysbot+gh@w3.org>
> We can update the spec but implementations will likely need to keep accepting null values for these members because both [Blink](https://chromium.googlesource.com/chromium/src/+/1e6e30b0e19a1d2d2db6e6b7184d26c741959d78/third_party/blink/renderer/modules/device_orientation/device_motion_event_init.idl) and [Gecko](https://hg.mozilla.org/mozilla-central/raw-file/ebeba937ca2a01df86d98089f2368bb975182dcc/dom/webidl/DeviceMotionEvent.webidl) mark these as optional.

Correction to this comment. Gecko does not mark these members optional. I think I need better glasses.

Chromium's behavior when the optional flag is removed is to convert `null` to `{}` and all other invalid values to `null`. I created [a patch](https://chromium-review.googlesource.com/c/chromium/src/+/1239722) removing this flag and discovered that we have web tests [that fail](https://test-results.appspot.com/data/layout_results/linux_chromium_rel_ng/193150/layout-test-results/results.html) because of this change in behavior.

GitHub Notification of comment by reillyeon
Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/54#issuecomment-423750994 using your GitHub account
Received on Saturday, 22 September 2018 15:15:27 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 22 September 2018 15:15:28 UTC