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

Unified Diff: Source/devtools/front_end/ui/SplitView.js

Issue 727823002: [DevTools] Ban getSelection, requestAnimationFrame, cancelAnimationFrame global functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/devtools/front_end/ui/SplitView.js
diff --git a/Source/devtools/front_end/ui/SplitView.js b/Source/devtools/front_end/ui/SplitView.js
index b052e97cf3e5fdd9e6412e02489b4015a3dfbce0..e92b3e0f5600a4d666f5cbf59b5e1c631db0a31c 100644
--- a/Source/devtools/front_end/ui/SplitView.js
+++ b/Source/devtools/front_end/ui/SplitView.js
@@ -527,10 +527,10 @@ WebInspector.SplitView.prototype = {
this.dispatchEventToListeners(WebInspector.SplitView.Events.SidebarSizeChanged, this.sidebarSize());
return;
}
- this._animationFrameHandle = window.requestAnimationFrame(boundAnimationFrame);
+ this._animationFrameHandle = this.element.window().requestAnimationFrame(boundAnimationFrame);
}
boundAnimationFrame = animationFrame.bind(this);
- this._animationFrameHandle = window.requestAnimationFrame(boundAnimationFrame);
+ this._animationFrameHandle = this.element.window().requestAnimationFrame(boundAnimationFrame);
},
_cancelAnimation: function()
@@ -542,7 +542,7 @@ WebInspector.SplitView.prototype = {
this.element.style.removeProperty("transition");
if (this._animationFrameHandle) {
- window.cancelAnimationFrame(this._animationFrameHandle);
+ this.element.window().cancelAnimationFrame(this._animationFrameHandle);
delete this._animationFrameHandle;
}
if (this._animationCallback) {

Powered by Google App Engine
This is Rietveld 408576698