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

Unified Diff: Source/devtools/front_end/ui/treeoutline.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/treeoutline.js
diff --git a/Source/devtools/front_end/ui/treeoutline.js b/Source/devtools/front_end/ui/treeoutline.js
index 7bbea86ec05debc1966dac6beae1b5ebbcea1557..0a25fd25741e50c5e98a281a2c55fd93ce568717 100644
--- a/Source/devtools/front_end/ui/treeoutline.js
+++ b/Source/devtools/front_end/ui/treeoutline.js
@@ -679,7 +679,7 @@ TreeElement.treeElementToggled = function(event)
return;
if (element._selectionStarted) {
delete element._selectionStarted
- var selection = window.getSelection();
+ var selection = element.window().getSelection();
if (selection && !selection.isCollapsed && element.isSelfOrAncestor(selection.anchorNode) && element.isSelfOrAncestor(selection.focusNode))
return;
}

Powered by Google App Engine
This is Rietveld 408576698