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

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: Add TimeTicks::{To,In}Seconds utility functions 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 4b272b815d8d1ef8c4b6e19c9ce8d380cd0f98e8..f8913cd1ef4bd8f2c0fe86b4a2f204015eaf57fb 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -642,12 +642,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;
@@ -698,7 +698,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) {

Powered by Google App Engine
This is Rietveld 408576698