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

Unified Diff: Source/core/timing/PerformanceCompositeTiming.cpp

Issue 908453003: Blink changes to record interest rects for http://w3c.github.io/frame-timing/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update LayoutTests for new properties Created 5 years, 7 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 | « Source/core/timing/PerformanceCompositeTiming.h ('k') | Source/core/timing/PerformanceCompositeTiming.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/timing/PerformanceCompositeTiming.cpp
diff --git a/Source/bindings/core/v8/custom/V8MediaQueryListCustom.cpp b/Source/core/timing/PerformanceCompositeTiming.cpp
similarity index 60%
copy from Source/bindings/core/v8/custom/V8MediaQueryListCustom.cpp
copy to Source/core/timing/PerformanceCompositeTiming.cpp
index a08172e509d4836d1561d502f44afe8b42720fd0..856476962040207b75d2c22671f5d4a967612b97 100644
--- a/Source/bindings/core/v8/custom/V8MediaQueryListCustom.cpp
+++ b/Source/core/timing/PerformanceCompositeTiming.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/PerformanceCompositeTiming.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;
+}
+
+PerformanceCompositeTiming::PerformanceCompositeTiming(Document* requestingDocument, unsigned sourceFrame, double startTime)
+ : PerformanceEntry(requestingDocument->url().string(), "composite", monotonicTimeToDocumentMilliseconds(requestingDocument, startTime), monotonicTimeToDocumentMilliseconds(requestingDocument, startTime))
+ , m_sourceFrame(sourceFrame)
+ , m_requestingDocument(requestingDocument)
+{
+}
+
+PerformanceCompositeTiming::~PerformanceCompositeTiming()
+{
+}
+
+unsigned PerformanceCompositeTiming::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)
+DEFINE_TRACE(PerformanceCompositeTiming)
{
- 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
« no previous file with comments | « Source/core/timing/PerformanceCompositeTiming.h ('k') | Source/core/timing/PerformanceCompositeTiming.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698