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

Unified Diff: third_party/WebKit/Source/core/events/EventTarget.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/EventTarget.cpp
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index bf2f203ef1afdaae9122f24b56e7b07619295efb..3bfa716357b1e32fcff8671391ccaa9531842bc5 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -641,12 +641,12 @@ bool EventTarget::fireEventListeners(Event* event,
d->firingEventIterators->append(FiringEventIterator(event->type(), i, size));
double blockedEventThreshold = blockedEventsWarningThreshold(context, event);
- double now = 0.0;
+ TimeTicks now;
bool shouldReportBlockedEvent = false;
if (blockedEventThreshold) {
- now = WTF::monotonicallyIncreasingTime();
+ now = TimeTicks::Now();
shouldReportBlockedEvent =
- now - event->platformTimeStamp() > blockedEventThreshold;
+ (now - event->platformTimeStamp()).InSecondsF() > blockedEventThreshold;
}
bool firedListener = false;
@@ -697,7 +697,7 @@ bool EventTarget::fireEventListeners(Event* event,
!entry[i - 1].blockedEventWarningEmitted() &&
!event->defaultPrevented()) {
reportBlockedEvent(context, event, &entry[i - 1],
- now - event->platformTimeStamp());
+ (now - event->platformTimeStamp()).InSecondsF());
}
if (passiveForced) {
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.cpp ('k') | third_party/WebKit/Source/core/events/FocusEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698