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

Unified Diff: third_party/WebKit/Source/core/events/MouseEvent.cpp

Issue 2542693002: Use WTF::TimeTicks to represent timestamp in Platform/Core event types (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/MouseEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/MouseEvent.cpp b/third_party/WebKit/Source/core/events/MouseEvent.cpp
index 1879fb075c3311a9dbb1d631a70183db6f5b861e..802e42bef4ef165cf6e460f575508ca919d28896 100644
--- a/third_party/WebKit/Source/core/events/MouseEvent.cpp
+++ b/third_party/WebKit/Source/core/events/MouseEvent.cpp
@@ -77,7 +77,7 @@ MouseEvent* MouseEvent::create(
short button,
unsigned short buttons,
EventTarget* relatedTarget,
- double platformTimeStamp,
+ TimeTicks platformTimeStamp,
PlatformMouseEvent::SyntheticEventType syntheticEventType,
const String& region,
const PlatformMouseEvent* mouseEvent) {
@@ -108,8 +108,8 @@ MouseEvent* MouseEvent::create(const AtomicString& eventType,
screenY = mouseEvent->screenY();
}
- double timestamp = underlyingEvent ? underlyingEvent->platformTimeStamp()
- : monotonicallyIncreasingTime();
+ TimeTicks timestamp =
+ underlyingEvent ? underlyingEvent->platformTimeStamp() : TimeTicks::Now();
MouseEvent* createdEvent = MouseEvent::create(
eventType, true, true, view, 0, screenX, screenY, 0, 0, 0, 0, modifiers,
0, 0, nullptr, timestamp, syntheticType, String(), nullptr);
@@ -147,7 +147,7 @@ MouseEvent::MouseEvent(
short button,
unsigned short buttons,
EventTarget* relatedTarget,
- double platformTimeStamp,
+ TimeTicks platformTimeStamp,
PlatformMouseEvent::SyntheticEventType syntheticEventType,
const String& region,
const PlatformMouseEvent* mouseEvent)
« no previous file with comments | « third_party/WebKit/Source/core/events/MouseEvent.h ('k') | third_party/WebKit/Source/core/events/MouseRelatedEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698