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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1352523002: Use high precision timestamp for Event.timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 2 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index a0e6f039bfb7dc6b99193ca32ac2f83e817f0ccf..ecea010c85b50f99c9a3e50f694864faa099e1da 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -105,6 +105,7 @@
#include "core/layout/LayoutView.h"
#include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h"
#include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
+#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/HistoryItem.h"
#include "core/page/ChromeClient.h"
@@ -2546,4 +2547,15 @@ void Internals::forceRestrictIFramePermissions()
RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true);
}
+double Internals::monotonicTimeToZeroBasedDocumentTime(double platformTime, ExceptionState& exceptionState)
+{
+ Document* document = contextDocument();
+ if (!document) {
+ exceptionState.throwDOMException(InvalidAccessError, "No context document is available.");
+ return 0;
+ }
+
+ return document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(platformTime);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698