Bug 185040 - Regression(r222392?): Events can have a negative timestamp which causes app breakage
Summary: Regression(r222392?): Events can have a negative timestamp which causes app b...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://codepen.io/cdumez/pen/xjEmdX
Keywords: InRadar, Regression
Depends on:
Blocks: 154246
  Show dependency treegraph
 
Reported: 2018-04-26 12:41 PDT by Chris Dumez
Modified: 2019-02-06 09:18 PST (History)
11 users (show)

See Also:


Attachments
Patch (1.54 KB, patch)
2018-04-27 10:52 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 2018-04-26 12:41:43 PDT
Events can have a negative timestamp which causes app breakage. This may have been a regression from r222392.

To reproduce:
1. Open https://codepen.io/cdumez/pen/xjEmdX in MobileSafari
2. Tap the red box and notice that the touchstart / touchend event timestamps are positive.
3. Put MobileSafari in the background for ~5 minutes then re-open MobileSafari
4. Tap the red box again and notice that the touchstart / touchend event timestamps are now negative :(
Comment 1 Chris Dumez 2018-04-26 12:42:02 PDT
<rdar://problem/39638051>
Comment 2 Chris Dumez 2018-04-27 09:40:14 PDT
The actual fix is in UIKit when generating the touch's timestamp.

I will use this bug to do some hardening in WebKit to make sure Event.timestamp can never return a negative value.
Comment 3 Chris Dumez 2018-04-27 10:52:50 PDT
Created attachment 339005 [details]
Patch
Comment 4 WebKit Commit Bot 2018-04-27 14:21:35 PDT
Comment on attachment 339005 [details]
Patch

Clearing flags on attachment: 339005

Committed r231111: <https://trac.webkit.org/changeset/231111>
Comment 5 WebKit Commit Bot 2018-04-27 14:21:37 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Lucas Forschler 2019-02-06 09:18:25 PST
Mass move bugs into the DOM component.