Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Issue 1747383002: Convert Devtools protocol Input timestamp to monotonic clock (Closed)

Created:
4 years, 9 months ago by majidvp
Modified:
4 years, 9 months ago
Reviewers:
samuong, dgozman
CC:
chromium-reviews, darin-cc_chromium.org, jam, pfeldman, devtools-reviews_chromium.org, Rick Byers
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Convert Devtools protocol Input timestamp to monotonic clock. Devtools protocol specifies input timestamp as a unix epoch time [1]. While chrome internally expects a monotonic timestamp that is measured since system start time. The current patch satisfies both contracts by converting received value from wall clock (base::Time) to monotonic clock (base::TimeTicks) before using it for |WebInputInput.timeStampSeconds|. [1] https://developer.chrome.com/devtools/docs/protocol/1.1/input BUG=590837 Committed: https://crrev.com/9ca5a011a3c5b1ff2856a17f60b30f7d5e977584 Cr-Commit-Position: refs/heads/master@{#380201}

Patch Set 1 #

Patch Set 2 : Add conversion for touch events #

Total comments: 2

Patch Set 3 : Fix compile issue #

Patch Set 4 : Add a layout tests #

Patch Set 5 : #

Total comments: 6

Patch Set 6 : Address feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -3 lines) Patch
M content/browser/devtools/protocol/input_handler.cc View 1 chunk +7 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html View 1 2 3 4 5 1 chunk +124 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp-expected.txt View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp View 1 2 2 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 24 (7 generated)
majidvp
4 years, 9 months ago (2016-03-02 19:54:21 UTC) #3
dgozman
Should we also change InspectorInputAgent::dispatchTouchEvent?
4 years, 9 months ago (2016-03-02 20:11:38 UTC) #4
majidvp
On 2016/03/02 20:11:38, dgozman wrote: > Should we also change InspectorInputAgent::dispatchTouchEvent? Yes we do. Added ...
4 years, 9 months ago (2016-03-07 13:42:53 UTC) #5
majidvp
https://codereview.chromium.org/1747383002/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp (right): https://codereview.chromium.org/1747383002/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp#newcode83 third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp:83: return timestamp - epochToMonotonicTimeDelta; We don't need this type ...
4 years, 9 months ago (2016-03-07 13:45:49 UTC) #6
majidvp
4 years, 9 months ago (2016-03-07 13:45:50 UTC) #7
dgozman
@samoung: could you please take a look? Won't chromedriver break because of this? https://codereview.chromium.org/1747383002/diff/20001/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp File ...
4 years, 9 months ago (2016-03-07 17:59:38 UTC) #9
samuong
ChromeDriver doesn't set the timestamp when it dispatches key/mouse/touch events, so I don't think this ...
4 years, 9 months ago (2016-03-07 19:22:15 UTC) #10
dgozman
lgtm
4 years, 9 months ago (2016-03-07 19:28:18 UTC) #11
samuong
btw does this need to be rebased to fix the compile errors?
4 years, 9 months ago (2016-03-07 20:06:56 UTC) #12
samuong
On 2016/03/07 20:06:56, samuong wrote: > btw does this need to be rebased to fix ...
4 years, 9 months ago (2016-03-07 23:40:42 UTC) #13
majidvp
On 2016/03/07 23:40:42, samuong wrote: > On 2016/03/07 20:06:56, samuong wrote: > > btw does ...
4 years, 9 months ago (2016-03-09 16:13:26 UTC) #14
dgozman
https://codereview.chromium.org/1747383002/diff/80001/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html File third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html (right): https://codereview.chromium.org/1747383002/diff/80001/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html#newcode3 third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html:3: window.addEventListener("keydown", logEvent); style: no indentation in <script> tag https://codereview.chromium.org/1747383002/diff/80001/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html#newcode9 ...
4 years, 9 months ago (2016-03-09 17:08:22 UTC) #15
majidvp
https://codereview.chromium.org/1747383002/diff/80001/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html File third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html (right): https://codereview.chromium.org/1747383002/diff/80001/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html#newcode3 third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html:3: window.addEventListener("keydown", logEvent); On 2016/03/09 17:08:21, dgozman wrote: > style: ...
4 years, 9 months ago (2016-03-09 20:09:08 UTC) #16
dgozman
still lgtm
4 years, 9 months ago (2016-03-09 20:10:13 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1747383002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1747383002/100001
4 years, 9 months ago (2016-03-09 20:17:14 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 9 months ago (2016-03-09 20:27:26 UTC) #22
commit-bot: I haz the power
4 years, 9 months ago (2016-03-09 20:29:46 UTC) #24
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/9ca5a011a3c5b1ff2856a17f60b30f7d5e977584
Cr-Commit-Position: refs/heads/master@{#380201}

Powered by Google App Engine
This is Rietveld 408576698