Bug 209831 - Regression(r253357) DeviceMotionEvent acceleration and rotationRate are null
Summary: Regression(r253357) DeviceMotionEvent acceleration and rotationRate are null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
: 210261 (view as bug list)
Depends on:
Blocks: 204770
  Show dependency treegraph
 
Reported: 2020-03-31 13:57 PDT by Chris Dumez
Modified: 2020-04-09 16:06 PDT (History)
4 users (show)

See Also:


Attachments
Patch (14.40 KB, patch)
2020-03-31 14:35 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-03-31 13:57:20 PDT
DeviceMotionEvent acceleration and rotationRate are null since r253357.
Comment 1 Chris Dumez 2020-03-31 13:57:36 PDT
<rdar://problem/60720953>
Comment 2 Chris Dumez 2020-03-31 14:35:54 PDT
Created attachment 395093 [details]
Patch
Comment 3 Darin Adler 2020-03-31 14:40:52 PDT
Comment on attachment 395093 [details]
Patch

Optional seems OK. For floating point sometimes we use NaN instead as we would use null for a pointer or string.
Comment 4 Chris Dumez 2020-03-31 14:41:54 PDT
(In reply to Darin Adler from comment #3)
> Comment on attachment 395093 [details]
> Patch
> 
> Optional seems OK. For floating point sometimes we use NaN instead as we
> would use null for a pointer or string.

I personally really prefer Optional<double> than using special values like NaN. Makes the function declaration super clear.
Comment 5 EWS 2020-03-31 15:09:51 PDT
Committed r259315: <https://trac.webkit.org/changeset/259315>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395093 [details].
Comment 6 Alexey Proskuryakov 2020-04-09 16:06:19 PDT
*** Bug 210261 has been marked as a duplicate of this bug. ***