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

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: Change comment in Event.h 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
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.h ('k') | third_party/WebKit/Source/core/events/Event.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 75354650ffca4cc03ee2ca562fd5c8d137d1b14a..93f7dd9bf1af070abfe4fc223991490c66d10ab7 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)
{
}
@@ -341,16 +340,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;
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.h ('k') | third_party/WebKit/Source/core/events/Event.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698