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

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

Issue 2161693003: Remove HiResEventTimeStamp runtime flag (status=stable) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 5 months 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/Event.cpp
diff --git a/third_party/WebKit/Source/core/events/Event.cpp b/third_party/WebKit/Source/core/events/Event.cpp
index 1c5361af5ce8fb380044a3bea8b94d1643824e3f..bec313a9e7e64fb814b50842f475d282df3b226d 100644
--- a/third_party/WebKit/Source/core/events/Event.cpp
+++ b/third_party/WebKit/Source/core/events/Event.cpp
@@ -83,7 +83,6 @@ Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr
, m_handlingPassive(false)
, m_eventPhase(0)
, m_currentTarget(nullptr)
- , m_createTime(convertSecondsToDOMTimeStamp(currentTime()))
, m_platformTimeStamp(platformTimeStamp)
{
}
@@ -334,16 +333,9 @@ EventTarget* Event::currentTarget() const
double Event::timeStamp(ScriptState* scriptState) const
{
double timeStamp = 0;
- // TODO(majidvp): Get rid of m_createTime once the flag is enabled by default;
- if (UNLIKELY(RuntimeEnabledFeatures::hiResEventTimeStampEnabled())) {
- // Only expose monotonic time after changing its origin to its target
- // document's time origin.
- if (scriptState && scriptState->domWindow()) {
- Performance* performance = DOMWindowPerformance::performance(*scriptState->domWindow());
- timeStamp = performance->monotonicTimeToDOMHighResTimeStamp(m_platformTimeStamp);
- }
- } else {
- timeStamp = m_createTime;
+ if (scriptState && scriptState->domWindow()) {
+ Performance* performance = DOMWindowPerformance::performance(*scriptState->domWindow());
+ timeStamp = performance->monotonicTimeToDOMHighResTimeStamp(m_platformTimeStamp);
}
return timeStamp;

Powered by Google App Engine
This is Rietveld 408576698