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

Unified Diff: Source/devtools/front_end/ui/ViewportControl.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/ViewportControl.js
diff --git a/Source/devtools/front_end/ui/ViewportControl.js b/Source/devtools/front_end/ui/ViewportControl.js
index e783548ae26e2f6e40d6ac7d0d4f2af481b134b5..42096a7aea4e3bb6d2611368a18b4a7bf86c801b 100644
--- a/Source/devtools/front_end/ui/ViewportControl.js
+++ b/Source/devtools/front_end/ui/ViewportControl.js
@@ -378,7 +378,7 @@ WebInspector.ViewportControl.prototype = {
return;
}
- var selection = window.getSelection();
+ var selection = this.element.window().getSelection();
var shouldRestoreSelection = this._updateSelectionModel(selection);
var visibleFrom = this.element.scrollTop;
@@ -480,7 +480,7 @@ WebInspector.ViewportControl.prototype = {
*/
_selectedText: function()
{
- this._updateSelectionModel(window.getSelection());
+ this._updateSelectionModel(this.element.window().getSelection());
if (!this._headSelection || !this._anchorSelection)
return null;

Powered by Google App Engine
This is Rietveld 408576698