| Index: Source/core/timing/PerformanceRenderTiming.cpp
|
| diff --git a/Source/bindings/core/v8/custom/V8MediaQueryListCustom.cpp b/Source/core/timing/PerformanceRenderTiming.cpp
|
| similarity index 60%
|
| copy from Source/bindings/core/v8/custom/V8MediaQueryListCustom.cpp
|
| copy to Source/core/timing/PerformanceRenderTiming.cpp
|
| index a08172e509d4836d1561d502f44afe8b42720fd0..788de73946f1f17668f9b4073a5ad8441a073b05 100644
|
| --- a/Source/bindings/core/v8/custom/V8MediaQueryListCustom.cpp
|
| +++ b/Source/core/timing/PerformanceRenderTiming.cpp
|
| @@ -1,5 +1,6 @@
|
| /*
|
| * Copyright (C) 2015 Google Inc. All rights reserved.
|
| + * Copyright (C) 2015 Intel Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -29,20 +30,39 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "bindings/core/v8/V8MediaQueryList.h"
|
| +#include "core/timing/PerformanceRenderTiming.h"
|
| +
|
| +#include "core/dom/Document.h"
|
| +#include "core/loader/DocumentLoader.h"
|
|
|
| namespace blink {
|
|
|
| -void V8MediaQueryList::addListenerMethodEpilogueCustom(const v8::FunctionCallbackInfo<v8::Value>& info, MediaQueryList* impl)
|
| +static double monotonicTimeToDocumentMilliseconds(Document* document, double seconds)
|
| +{
|
| + ASSERT(seconds >= 0.0);
|
| + return document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(seconds) * 1000.0;
|
| +}
|
| +
|
| +PerformanceRenderTiming::PerformanceRenderTiming(Document* requestingDocument, unsigned sourceFrame, double startTime)
|
| + : PerformanceEntry(requestingDocument->url().string(), "render", monotonicTimeToDocumentMilliseconds(requestingDocument, startTime), monotonicTimeToDocumentMilliseconds(requestingDocument, startTime))
|
| + , m_sourceFrame(sourceFrame)
|
| + , m_requestingDocument(requestingDocument)
|
| +{
|
| +}
|
| +
|
| +PerformanceRenderTiming::~PerformanceRenderTiming()
|
| +{
|
| +}
|
| +
|
| +unsigned PerformanceRenderTiming::sourceFrame() const
|
| {
|
| - if (info.Length() >= 1 && info[0]->IsObject() && !impl->toNode())
|
| - addHiddenValueToArray(info.GetIsolate(), info.Holder(), info[0], V8EventTarget::eventListenerCacheIndex);
|
| + return m_sourceFrame;
|
| }
|
|
|
| -void V8MediaQueryList::removeListenerMethodEpilogueCustom(const v8::FunctionCallbackInfo<v8::Value>& info, MediaQueryList* impl)
|
| +void PerformanceRenderTiming::trace(Visitor* visitor)
|
| {
|
| - if (info.Length() >= 1 && info[0]->IsObject() && !impl->toNode())
|
| - removeHiddenValueFromArray(info.GetIsolate(), info.Holder(), info[0], V8EventTarget::eventListenerCacheIndex);
|
| + visitor->trace(m_requestingDocument);
|
| + PerformanceEntry::trace(visitor);
|
| }
|
|
|
| } // namespace blink
|
|
|