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

Unified Diff: Source/devtools/front_end/ui/FlameChart.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/FlameChart.js
diff --git a/Source/devtools/front_end/ui/FlameChart.js b/Source/devtools/front_end/ui/FlameChart.js
index 8c539eeb72945028ec98b1a806ce756b5530ba96..d8c5a01b2516ae45ac6283a25f7ea8371fbd5b73 100644
--- a/Source/devtools/front_end/ui/FlameChart.js
+++ b/Source/devtools/front_end/ui/FlameChart.js
@@ -486,7 +486,7 @@ WebInspector.FlameChart.prototype = {
}
this._cancelAnimation();
- this._cancelWindowTimesAnimation = WebInspector.animateFunction(this._animateWindowTimes.bind(this),
+ this._cancelWindowTimesAnimation = WebInspector.animateFunction(this.element.window(), this._animateWindowTimes.bind(this),
[{from: this._timeWindowLeft, to: startTime}, {from: this._timeWindowRight, to: endTime}], 5,
this._animationCompleted.bind(this));
this._pendingAnimationTimeLeft = startTime;
@@ -1287,7 +1287,7 @@ WebInspector.FlameChart.prototype = {
{
if (this._updateTimerId || this._cancelWindowTimesAnimation)
return;
- this._updateTimerId = requestAnimationFrame(this.update.bind(this));
+ this._updateTimerId = this.element.window().requestAnimationFrame(this.update.bind(this));
},
update: function()

Powered by Google App Engine
This is Rietveld 408576698