Index: Source/core/frame/LocalDOMWindow.cpp |
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
index 0ffefbc9f3026c909f369bca438422e598acdad5..9df042a8d336b5adc93c71f65fe73893d1a2ccba 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); |
esprehn
2015/08/20 20:45:55
Why did you change this? document() makes a bunch
rmcilroy
2015/08/21 00:03:45
Done, but I can't call the variable "document" sin
|
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); |
esprehn
2015/08/20 20:45:55
ditto, don't change all these
rmcilroy
2015/08/21 00:03:45
Ditto.
|
+} |
+ |
+int LocalDOMWindow::requestIdleCallback(IdleRequestCallback* callback, double timeoutMillis) |
+{ |
+ if (document()) |
+ return document()->requestIdleCallback(callback, timeoutMillis); |
+ return 0; |
+} |
+ |
+void LocalDOMWindow::cancelIdleCallback(int id) |
+{ |
+ if (document()) |
esprehn
2015/08/20 20:45:55
ditto
rmcilroy
2015/08/21 00:03:45
Ditto.
|
+ document()->cancelIdleCallback(id); |
} |
bool LocalDOMWindow::addEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener> prpListener, bool useCapture) |