| Index: content/browser/renderer_host/input/touch_emulator.cc
|
| diff --git a/content/browser/renderer_host/input/touch_emulator.cc b/content/browser/renderer_host/input/touch_emulator.cc
|
| index 42b43106c7861847092ca29d19443a0b0cdce726..c43b4bd5d719c87aa24f702c77d10a91644a3a44 100644
|
| --- a/content/browser/renderer_host/input/touch_emulator.cc
|
| +++ b/content/browser/renderer_host/input/touch_emulator.cc
|
| @@ -361,6 +361,16 @@ bool TouchEmulator::FillTouchEventAndPoint(const WebMouseEvent& mouse_event) {
|
| WebTouchEventTraits::ResetTypeAndTouchStates(
|
| eventType, mouse_event.timeStampSeconds, &touch_event_);
|
|
|
| + // On some platforms mouse event's timestamp does not necessarily relate to
|
| + // the system time at all, so use base::TimeTicks::HighResNow() if possible,
|
| + // or base::TimeTicks::Now() otherwise.
|
| + base::TimeTicks now;
|
| + if (base::TimeTicks::IsHighResNowFastAndReliable())
|
| + now = base::TimeTicks::HighResNow();
|
| + else
|
| + now = base::TimeTicks::Now();
|
| + touch_event_.timeStampSeconds = (now - base::TimeTicks()).InSecondsF();
|
| +
|
| WebTouchPoint& point = touch_event_.touches[0];
|
| point.id = 0;
|
| point.radiusX = point.radiusY = 1.f;
|
|
|