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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/AdvancedSearchView.js

Issue 2377193004: [DevTools] Rework some focus code. (Closed)
Patch Set: FocusRestorer Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 */ 8 */
9 WebInspector.AdvancedSearchView = function() 9 WebInspector.AdvancedSearchView = function()
10 { 10 {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 /** 280 /**
281 * @param {boolean} finished 281 * @param {boolean} finished
282 */ 282 */
283 _searchFinished: function(finished) 283 _searchFinished: function(finished)
284 { 284 {
285 this._searchMessageElement.textContent = finished ? WebInspector.UIStrin g("Search finished.") : WebInspector.UIString("Search interrupted."); 285 this._searchMessageElement.textContent = finished ? WebInspector.UIStrin g("Search finished.") : WebInspector.UIString("Search interrupted.");
286 }, 286 },
287 287
288 focus: function() 288 focus: function()
289 { 289 {
290 WebInspector.setCurrentFocusElement(this._search); 290 this._search.focus();
291 this._search.select(); 291 this._search.select();
292 }, 292 },
293 293
294 willHide: function() 294 willHide: function()
295 { 295 {
296 this._stopSearch(); 296 this._stopSearch();
297 }, 297 },
298 298
299 /** 299 /**
300 * @param {!Event} event 300 * @param {!Event} event
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 performIndexing: function(progress) { }, 444 performIndexing: function(progress) { },
445 445
446 stopSearch: function() { }, 446 stopSearch: function() { },
447 447
448 /** 448 /**
449 * @param {!WebInspector.ProjectSearchConfig} searchConfig 449 * @param {!WebInspector.ProjectSearchConfig} searchConfig
450 * @return {!WebInspector.SearchResultsPane} 450 * @return {!WebInspector.SearchResultsPane}
451 */ 451 */
452 createSearchResultsPane: function(searchConfig) { } 452 createSearchResultsPane: function(searchConfig) { }
453 } 453 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698