Bug 154246 - Use high resolution timestamp for event time
Summary: Use high resolution timestamp for event time
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
: 94987 (view as bug list)
Depends on: 185040
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-15 10:26 PST by Simon Fraser (smfr)
Modified: 2018-04-26 12:43 PDT (History)
25 users (show)

See Also:


Attachments
WIP Patch (33.17 KB, patch)
2017-09-20 13:20 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (78.93 KB, patch)
2017-09-20 16:26 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (75.53 KB, patch)
2017-09-20 16:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (77.99 KB, patch)
2017-09-20 16:45 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (78.60 KB, patch)
2017-09-20 16:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (83.23 KB, patch)
2017-09-20 17:05 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (85.42 KB, patch)
2017-09-21 08:57 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (91.21 KB, patch)
2017-09-21 09:21 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (91.61 KB, patch)
2017-09-21 09:25 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (92.11 KB, patch)
2017-09-21 09:29 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (108.66 KB, patch)
2017-09-21 09:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (108.40 KB, patch)
2017-09-21 09:44 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (113.24 KB, patch)
2017-09-21 11:53 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (114.26 KB, patch)
2017-09-21 12:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (115.07 KB, patch)
2017-09-21 12:40 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (115.83 KB, patch)
2017-09-21 12:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (116.76 KB, patch)
2017-09-21 13:31 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (116.90 KB, patch)
2017-09-21 13:49 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (116.95 KB, patch)
2017-09-22 08:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (116.77 KB, patch)
2017-09-22 09:39 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 Simon Fraser (smfr) 2016-02-15 10:26:48 PST
We should consider switching the timestamp we use for events, per:

https://developers.google.com/web/updates/2016/01/high-res-timestamps
https://github.com/whatwg/dom/issues/23
Comment 1 Simon Fraser (smfr) 2016-04-26 16:26:41 PDT
Seems like we should hold off on this until the issues discussed in https://github.com/whatwg/dom/issues/23 have been resolved.
Comment 2 Ryosuke Niwa 2016-04-26 19:12:31 PDT
There are multiple stack overflow posting about this behavior in Chrome:
http://stackoverflow.com/questions/34323019/jquery-javascript-event-timestamp-doesnt-work

A pattern of code that uses Event.prototype.timeStamp for `setTime` appears in various cookbooks:
https://github.com/andygnewman/javascript-jquery-book/blob/2de6e8b0b4755c257675d5d00300f17e3e0c26fa/c07/js/event-object.js
Comment 3 Majid Valipour 2017-09-08 09:30:55 PDT
Here is some update on this feature:

High resolution event timestamps has been shipped in Chrome since M49[1] (released March 2016) and in Firefox stable since M54 [2] (released June 2017) and in Microsoft Edge Since EdgeHTML 14 [3].  WHATWG DOM spec has been updated [4] to reflect this with appropriate tests upstreamed to web-platform-tests.

Also we have received very positive feedback from Facebook [5] about the usefulness of high resolution event timestamp in scroll performance investigations.

I think at this point it is pretty safe to make the conversion given that it has been shipping for a while in 3 major browsers and our experience so far has been that backward compatibility issues are reasonably small and manageable.



[1] https://www.chromestatus.com/feature/5523910145605632
[2] https://developer.mozilla.org/en-US/Firefox/Releases/54
[3] https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12726672/
[4] https://dom.spec.whatwg.org/#dom-event-timestamp
[5] https://github.com/whatwg/dom/issues/23#issuecomment-249319401
Comment 4 Radar WebKit Bug Importer 2017-09-08 10:23:13 PDT
<rdar://problem/34333304>
Comment 6 Majid Valipour 2017-09-20 10:52:52 PDT
And also: http://w3c-test.org/dom/events/Event-timestamp-safe-resolution.html
Comment 7 Chris Dumez 2017-09-20 13:20:16 PDT
Created attachment 321348 [details]
WIP Patch
Comment 8 Chris Dumez 2017-09-20 16:26:25 PDT
Created attachment 321384 [details]
WIP Patch
Comment 9 Chris Dumez 2017-09-20 16:36:29 PDT
Created attachment 321385 [details]
WIP Patch
Comment 10 Build Bot 2017-09-20 16:38:55 PDT
Attachment 321385 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/Event.cpp:229:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/html/TypeAhead.h:28:  wtf includes should be <wtf/file.h> instead of "wtf/file.h".  [build/include] [4]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 6 in 54 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Chris Dumez 2017-09-20 16:45:20 PDT
Created attachment 321387 [details]
WIP Patch
Comment 12 Build Bot 2017-09-20 16:47:04 PDT
Attachment 321387 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 56 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 Chris Dumez 2017-09-20 16:54:48 PDT
Created attachment 321388 [details]
WIP Patch
Comment 14 Build Bot 2017-09-20 16:56:06 PDT
Attachment 321388 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 57 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 15 Chris Dumez 2017-09-20 17:05:01 PDT
Created attachment 321390 [details]
WIP Patch
Comment 16 Build Bot 2017-09-20 17:06:09 PDT
Attachment 321390 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 8 in 59 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 17 Chris Dumez 2017-09-21 08:57:14 PDT
Created attachment 321430 [details]
WIP Patch
Comment 18 Build Bot 2017-09-21 08:58:30 PDT
Attachment 321430 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 8 in 61 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 19 Chris Dumez 2017-09-21 09:21:40 PDT
Created attachment 321432 [details]
WIP Patch
Comment 20 Build Bot 2017-09-21 09:23:55 PDT
Attachment 321432 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 64 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 21 Chris Dumez 2017-09-21 09:25:27 PDT
Created attachment 321433 [details]
WIP Patch
Comment 22 Build Bot 2017-09-21 09:27:01 PDT
Attachment 321433 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 64 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 23 Chris Dumez 2017-09-21 09:29:02 PDT
Created attachment 321435 [details]
WIP Patch
Comment 24 Build Bot 2017-09-21 09:34:07 PDT
Attachment 321435 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 65 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 25 Chris Dumez 2017-09-21 09:36:53 PDT
Created attachment 321437 [details]
Patch
Comment 26 Chris Dumez 2017-09-21 09:44:49 PDT
Created attachment 321440 [details]
Patch
Comment 27 Build Bot 2017-09-21 09:47:41 PDT
Attachment 321440 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 71 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 28 Chris Dumez 2017-09-21 11:53:51 PDT
Created attachment 321458 [details]
Patch
Comment 29 Build Bot 2017-09-21 11:55:06 PDT
Attachment 321458 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 75 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 30 Chris Dumez 2017-09-21 12:17:13 PDT
Created attachment 321462 [details]
Patch
Comment 31 Build Bot 2017-09-21 12:20:22 PDT
Attachment 321462 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 76 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 32 Chris Dumez 2017-09-21 12:40:40 PDT
Created attachment 321463 [details]
Patch
Comment 33 Build Bot 2017-09-21 12:41:50 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 34 Build Bot 2017-09-21 12:42:14 PDT
Attachment 321463 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WARNING: File exempt from style guide. Skipping: "Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp"
Total errors found: 9 in 77 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 35 Chris Dumez 2017-09-21 12:55:49 PDT
Created attachment 321466 [details]
Patch
Comment 36 Build Bot 2017-09-21 12:57:52 PDT
Attachment 321466 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WARNING: File exempt from style guide. Skipping: "Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp"
Total errors found: 9 in 78 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 37 Chris Dumez 2017-09-21 13:31:49 PDT
Created attachment 321473 [details]
Patch
Comment 38 Build Bot 2017-09-21 13:33:22 PDT
Attachment 321473 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WARNING: File exempt from style guide. Skipping: "Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp"
Total errors found: 9 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 39 Chris Dumez 2017-09-21 13:49:51 PDT
Created attachment 321474 [details]
Patch
Comment 40 Build Bot 2017-09-21 13:52:07 PDT
Attachment 321474 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WARNING: File exempt from style guide. Skipping: "Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp"
Total errors found: 9 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 41 Alex Christensen 2017-09-21 16:02:05 PDT
Comment on attachment 321474 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321474&action=review

> LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-timestamp-high-resolution-expected.txt:2
> +PASS Constructed MouseEvent timestamp should be high resolution and have the same time origin as performance.now() 

In performance.now we explicitly call reduceTimeResolution to prevent nanosecond time from being available to JavaScript.  I see no such thing in this patch.
Comment 42 Ryosuke Niwa 2017-09-21 16:11:13 PDT
Comment on attachment 321474 [details]
Patch

Yeah, we need to call reduceTimeResolution everywhere. r- because this introduces a new timing attack vulnerability.
Comment 43 Chris Dumez 2017-09-21 16:24:33 PDT
Comment on attachment 321474 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321474&action=review

> Source/WebCore/page/Performance.cpp:88
> +    return reduceTimeResolution(seconds).milliseconds();

The reduceTimeResolution() call is here...
Comment 44 Chris Dumez 2017-09-21 16:27:00 PDT
(In reply to Chris Dumez from comment #43)
> Comment on attachment 321474 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=321474&action=review
> 
> > Source/WebCore/page/Performance.cpp:88
> > +    return reduceTimeResolution(seconds).milliseconds();
> 
> The reduceTimeResolution() call is here...

And this is covered by imported/w3c/web-platform-tests/dom/events/Event-timestamp-safe-resolution.html which still passes after my change.
Comment 45 Ryosuke Niwa 2017-09-21 17:39:52 PDT
Comment on attachment 321474 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321474&action=review

> Source/WebCore/page/Performance.cpp:85
> +DOMHighResTimeStamp Performance::monotonicTimeToHighResTimeStamp(MonotonicTime timestamp) const

I don't think converts MonotonicTime to DOMHighResTimeStamp is the most interesting aspect of this function.
I'd rather focus on the fact this computes time relative to the time origin and that it reduces the resolution is more interesting & important information to communicate.
So why don't we call this something like relativeTimeFromTimeOriginInReducedResolution?
Comment 46 Chris Dumez 2017-09-22 08:55:15 PDT
Created attachment 321551 [details]
Patch
Comment 47 Build Bot 2017-09-22 08:58:20 PDT
Attachment 321551 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/PlatformMouseEvent.h:64:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm:66:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKit/Shared/gtk/WebEventFactory.cpp:143:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/page/DragController.cpp:131:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit/Shared/ios/NativeWebTouchEventIOS.mm:125:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/dom/TouchEvent.cpp:45:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
ERROR: Source/WebKitLegacy/mac/WebView/WebFrame.mm:967:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WARNING: File exempt from style guide. Skipping: "Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp"
Total errors found: 9 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 48 Chris Dumez 2017-09-22 09:39:13 PDT
Created attachment 321556 [details]
Patch
Comment 49 Chris Dumez 2017-09-22 10:13:12 PDT
Comment on attachment 321556 [details]
Patch

Clearing flags on attachment: 321556

Committed r222392: <http://trac.webkit.org/changeset/222392>
Comment 50 Chris Dumez 2017-09-22 10:13:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 51 Michael Catanzaro 2017-09-25 11:54:12 PDT
This caused bug #177444, bug #177447, and bug #177449. I won't roll it out, but if you could check and see if anything looks immediately suspicious, that would be great.
Comment 52 Chris Dumez 2017-09-25 12:21:54 PDT
(In reply to Michael Catanzaro from comment #51)
> This caused bug #177444, bug #177447, and bug #177449. I won't roll it out,
> but if you could check and see if anything looks immediately suspicious,
> that would be great.

One of them is expected. The 2 others may indicate something wrong with my patch but in GTK-specific code (since it did not cause any failures on Mac / iOS). I'll take a look at the GTK parts in this patch to see if I find what I did wrong.
Comment 53 Michael Catanzaro 2017-09-25 12:57:20 PDT
By the way, thanks a bunch for trying to update our ports!
Comment 54 Chris Dumez 2017-10-11 09:05:09 PDT
*** Bug 94987 has been marked as a duplicate of this bug. ***