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

Issue 2542693002: Use WTF::TimeTicks to represent timestamp in Platform/Core event types (Closed)

Created:
4 years ago by majidvp
Modified:
4 years ago
Reviewers:
esprehn
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use WTF::TimeTicks to represent timestamp in Platform/Core event types This is a fairly mechanical change: - Replace WTF::monotonicallyIncreastingTime -> WTF::TimeTicks::Now() - Replace 0 -> WTF::TimeTicks() - create appropriate seconds <-> TimeTicks conversions where event timestamp needs to be used elsewhere in Blink BUG=625680 Committed: https://crrev.com/ceb9f02292f683da9bbb080918423eeda5ce8c95 Cr-Commit-Position: refs/heads/master@{#438211}

Patch Set 1 #

Patch Set 2 : Use TimeTicks in PlatformEvents #

Patch Set 3 : cl format #

Patch Set 4 : Minor fixes and revert change in histogram #

Total comments: 2

Patch Set 5 : Don't fix bug in this patch #

Total comments: 3

Patch Set 6 : Add TimeTicks::{To,In}Seconds utility functions #

Total comments: 1

Patch Set 7 : add const #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -169 lines) Patch
M third_party/WebKit/Source/core/events/CompositionEvent.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/DragEvent.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/events/DragEvent.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/events/Event.h View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/events/Event.cpp View 1 2 3 4 5 6 7 5 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/events/EventTarget.cpp View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/events/FocusEvent.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/GestureEvent.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/GestureEvent.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/KeyboardEvent.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/MouseEvent.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/events/MouseEvent.cpp View 1 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/events/MouseRelatedEvent.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/TextEvent.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/events/TouchEvent.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/events/TouchEvent.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/UIEvent.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/UIEvent.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/UIEventWithKeyState.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/UIEventWithKeyState.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/WheelEvent.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/events/WheelEvent.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/TypeAhead.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/TypeAhead.cpp View 1 3 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 2 3 4 5 6 7 5 chunks +8 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandlerTest.cpp View 1 2 6 chunks +18 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/core/input/GestureManager.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/input/GestureManager.cpp View 1 2 3 4 5 6 7 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/input/MouseEventManager.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/MouseEventManager.cpp View 1 2 3 4 5 6 7 5 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/input/TouchEventManager.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp View 1 2 3 4 5 3 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/page/AutoscrollController.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/page/AutoscrollController.cpp View 1 2 3 4 5 6 7 4 chunks +5 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/page/ContextMenuControllerTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/DragController.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webmidi/MIDIMessageEvent.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/PlatformEvent.h View 1 3 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/PlatformGestureEvent.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/PlatformMouseEvent.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetBase.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebInputEventConversion.cpp View 1 2 3 4 5 9 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 9 chunks +12 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp View 1 2 13 chunks +17 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/wtf/Time.h View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (38 generated)
majidvp
https://codereview.chromium.org/2542693002/diff/60001/third_party/WebKit/Source/web/WebInputEventConversion.cpp File third_party/WebKit/Source/web/WebInputEventConversion.cpp (right): https://codereview.chromium.org/2542693002/diff/60001/third_party/WebKit/Source/web/WebInputEventConversion.cpp#newcode75 third_party/WebKit/Source/web/WebInputEventConversion.cpp:75: I like to get rid of these once we ...
4 years ago (2016-12-05 16:37:35 UTC) #18
majidvp
esprehn@ PTAL
4 years ago (2016-12-05 16:37:55 UTC) #19
esprehn
Can you fix the bug in a separate patch with a test? Or at least ...
4 years ago (2016-12-05 17:08:11 UTC) #20
majidvp
On 2016/12/05 17:08:11, esprehn wrote: > Can you fix the bug in a separate patch ...
4 years ago (2016-12-06 15:08:27 UTC) #26
esprehn
https://codereview.chromium.org/2542693002/diff/80001/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp (right): https://codereview.chromium.org/2542693002/diff/80001/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp#newcode82 third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp:82: return TimeTicks() + TimeDelta::FromSecondsD(ticksInSeconds); I'm not a fan of ...
4 years ago (2016-12-06 22:14:19 UTC) #27
majidvp
> third_party/WebKit/Source/web/WebInputEventConversion.cpp:73: return (ticks - TimeTicks()).InSecondsF(); > Why does TimeTicks not have a ToSecondsF() method ...
4 years ago (2016-12-07 15:03:52 UTC) #28
miu
On 2016/12/07 15:03:52, majidvp wrote: > > third_party/WebKit/Source/web/WebInputEventConversion.cpp:73: return (ticks - > TimeTicks()).InSecondsF(); > > ...
4 years ago (2016-12-07 20:38:07 UTC) #29
majidvp
Thanks for the explanation. > > Option 1 - Add TimeTicks::ToSecondsF and TimeTicks::FromSeconds > > ...
4 years ago (2016-12-07 20:51:22 UTC) #30
esprehn
We don't need to follow the base api exactly, the purpose of the wrappers is ...
4 years ago (2016-12-07 20:57:29 UTC) #31
esprehn
lgtm https://codereview.chromium.org/2542693002/diff/100001/third_party/WebKit/Source/wtf/Time.h File third_party/WebKit/Source/wtf/Time.h (right): https://codereview.chromium.org/2542693002/diff/100001/third_party/WebKit/Source/wtf/Time.h#newcode49 third_party/WebKit/Source/wtf/Time.h:49: double InSeconds() { return (m_value - WrappedTimeType()).InSecondsF(); } ...
4 years ago (2016-12-12 22:12:21 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2542693002/120001
4 years ago (2016-12-13 05:29:06 UTC) #39
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/core/events/KeyboardEvent.cpp: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-13 08:07:40 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2542693002/140001
4 years ago (2016-12-13 17:34:37 UTC) #48
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years ago (2016-12-13 17:42:05 UTC) #51
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/ceb9f02292f683da9bbb080918423eeda5ce8c95 Cr-Commit-Position: refs/heads/master@{#438211}
4 years ago (2016-12-13 17:45:53 UTC) #53
brettw
I'm not objecting to this and I support work in this direction. Thanks! But for ...
4 years ago (2016-12-14 03:31:14 UTC) #54
esprehn
On 2016/12/14 at 03:31:14, brettw wrote: > I'm not objecting to this and I support ...
4 years ago (2016-12-14 03:51:29 UTC) #55
brettw
4 years ago (2016-12-15 18:32:19 UTC) #56
Message was sent while issue was closed.
That makes sense, I was misunderstanding the point of the TimeWrapper class.

Powered by Google App Engine
This is Rietveld 408576698