| 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 c76ec67a169bd412dc1815b1b02c6edfbab2c86d..8b72f06e1b571f69b69e70c2f533a6df86418383 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"
|
| @@ -2541,4 +2542,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
|
|
|