Bug 209831

Summary: Regression(r253357) DeviceMotionEvent acceleration and rotationRate are null
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: boris.stodic, darin, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 204770    
Attachments:
Description Flags
Patch none

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. ***