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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/FilteredUISourceCodeListDelegate.js

Issue 2628413002: DevTools: remove initial progress bar flash when opening Ctrl+P. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/quick_open/FilteredListWidget.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/FilteredUISourceCodeListDelegate.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/FilteredUISourceCodeListDelegate.js b/third_party/WebKit/Source/devtools/front_end/sources/FilteredUISourceCodeListDelegate.js
index 86f9371d34151b3339c5a0e246296e0d115e9762..8286ee15e6b391fd672ac3ce79fbf1e9a43ee318 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/FilteredUISourceCodeListDelegate.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/FilteredUISourceCodeListDelegate.js
@@ -183,9 +183,9 @@ Sources.FilteredUISourceCodeListDelegate = class extends QuickOpen.FilteredListW
* @return {string}
*/
rewriteQuery(query) {
- if (!query)
- return query;
- query = query.trim();
+ query = query ? query.trim() : '';
+ if (!query || query === ':')
+ return '';
var lineNumberMatch = query.match(/^([^:]+)((?::[^:]*){0,2})$/);
this._queryLineNumberAndColumnNumber = lineNumberMatch ? lineNumberMatch[2] : '';
return lineNumberMatch ? lineNumberMatch[1] : query;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/quick_open/FilteredListWidget.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698