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

Unified Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 1119683003: Implement requestIdleCallback API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 6f4e6ec346538fefab490d39a3bed0beb2a49eda..14eeedf372b70f825972904f7cfa4766a17d9ea9 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -1369,6 +1369,19 @@ void LocalDOMWindow::cancelAnimationFrame(int id)
d->cancelAnimationFrame(id);
}
+int LocalDOMWindow::requestIdleFrame(IdleRequestCallback* callback)
+{
+ if (Document* d = document())
esprehn 2015/06/10 07:11:42 document, don't abbreviate.
rmcilroy 2015/06/10 18:32:41 I couldn't call this document because of the funct
+ return d->requestIdleFrame(callback);
+ return 0;
+}
+
+void LocalDOMWindow::cancelIdleFrame(int id)
+{
+ if (Document* d = document())
esprehn 2015/06/10 07:11:42 ditto, also can this really be null? I don't think
rmcilroy 2015/06/10 18:32:41 clearDocument resets m_document. I'm not sure on w
+ d->cancelIdleFrame(id);
+}
+
DOMWindowCSS* LocalDOMWindow::css() const
{
if (!m_css)

Powered by Google App Engine
This is Rietveld 408576698