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

Unified Diff: Source/devtools/front_end/ui/SearchableView.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/SearchableView.js
diff --git a/Source/devtools/front_end/ui/SearchableView.js b/Source/devtools/front_end/ui/SearchableView.js
index 90b51c29b9bbf54e134a17e3b94feac806604f8a..6c34648df08910607dbfcab7b2a0314be562db6c 100644
--- a/Source/devtools/front_end/ui/SearchableView.js
+++ b/Source/devtools/front_end/ui/SearchableView.js
@@ -454,7 +454,7 @@ WebInspector.SearchableView.prototype = {
var queryCandidate;
if (WebInspector.currentFocusElement() !== this._searchInputElement) {
- var selection = window.getSelection();
+ var selection = this._searchInputElement.window().getSelection();
if (selection.rangeCount)
queryCandidate = selection.toString().replace(/\r?\n.*/, "");
}
@@ -483,7 +483,7 @@ WebInspector.SearchableView.prototype = {
*/
_onSearchFieldManualFocus: function(event)
{
- WebInspector.setCurrentFocusElement(event.target);
+ WebInspector.setCurrentFocusElement(/** @type {?Node} */ (event.target));
},
/**

Powered by Google App Engine
This is Rietveld 408576698