New issue
Advanced search Search tips

Issue 590837 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 160524



Sign in to add a comment

Devtools protocols is using epoch time for timeStamp

Project Member Reported by majidvp@chromium.org, Feb 29 2016

Issue description

Devtools protocol is using a epoch timeStamp value for input events [1]. At the moment this is directly fed into WebInputEvent.timeStampSeconds fields which expects a monotonic timestamps since M49 [2]. 

This can lead to incorrect timeStamp values being populated in generated events. Though I am not seeing the effect in devtools on desktop. Perhaps it shows up when using devtool to do remote debugging (e.g., on mobile).

I suspect, it will not be easy to change all Devtools protocol clients to switch so it seems to be best to transform the received timestamp from epoch to monotonic before creating the input event.


[1]https://developer.chrome.com/devtools/docs/protocol/1.1/input
[2] https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/devtools/protocol/input_handler.cc&l=72&cl=GROK

 
Cc: dgozman@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ca5a011a3c5b1ff2856a17f60b30f7d5e977584

commit 9ca5a011a3c5b1ff2856a17f60b30f7d5e977584
Author: majidvp <majidvp@chromium.org>
Date: Wed Mar 09 20:27:17 2016

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 

Review URL: https://codereview.chromium.org/1747383002

Cr-Commit-Position: refs/heads/master@{#380201}

[modify] https://crrev.com/9ca5a011a3c5b1ff2856a17f60b30f7d5e977584/content/browser/devtools/protocol/input_handler.cc
[add] https://crrev.com/9ca5a011a3c5b1ff2856a17f60b30f7d5e977584/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp-expected.txt
[add] https://crrev.com/9ca5a011a3c5b1ff2856a17f60b30f7d5e977584/third_party/WebKit/LayoutTests/inspector-protocol/input/eventTimestamp.html
[modify] https://crrev.com/9ca5a011a3c5b1ff2856a17f60b30f7d5e977584/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp

Labels: M-51
Status: Fixed (was: Started)
Labels: Hotlist-Input-Dev

Sign in to add a comment