| Index: Source/core/frame/LocalDOMWindow.cpp
|
| diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
|
| index 3f052418afcb3beefa9ca0a011a9b52324478bac..ffba1f8008809cf24919a52ef67aa83ca3251dac 100644
|
| --- a/Source/core/frame/LocalDOMWindow.cpp
|
| +++ b/Source/core/frame/LocalDOMWindow.cpp
|
| @@ -1264,23 +1264,36 @@ void LocalDOMWindow::resizeTo(int width, int height) const
|
| int LocalDOMWindow::requestAnimationFrame(FrameRequestCallback* callback)
|
| {
|
| callback->m_useLegacyTimeBase = false;
|
| - if (Document* d = document())
|
| - return d->requestAnimationFrame(callback);
|
| + if (document())
|
| + return document()->requestAnimationFrame(callback);
|
| return 0;
|
| }
|
|
|
| int LocalDOMWindow::webkitRequestAnimationFrame(FrameRequestCallback* callback)
|
| {
|
| callback->m_useLegacyTimeBase = true;
|
| - if (Document* d = document())
|
| - return d->requestAnimationFrame(callback);
|
| + if (document())
|
| + return document()->requestAnimationFrame(callback);
|
| return 0;
|
| }
|
|
|
| void LocalDOMWindow::cancelAnimationFrame(int id)
|
| {
|
| - if (Document* d = document())
|
| - d->cancelAnimationFrame(id);
|
| + if (document())
|
| + document()->cancelAnimationFrame(id);
|
| +}
|
| +
|
| +int LocalDOMWindow::requestIdleCallback(IdleRequestCallback* callback, double timeout)
|
| +{
|
| + if (document())
|
| + return document()->requestIdleCallback(callback, timeout);
|
| + return 0;
|
| +}
|
| +
|
| +void LocalDOMWindow::cancelIdleCallback(int id)
|
| +{
|
| + if (document())
|
| + document()->cancelIdleCallback(id);
|
| }
|
|
|
| bool LocalDOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> prpListener, bool useCapture)
|
|
|