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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js

Issue 1817193003: [DevTools] Added regex support in search for network tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed cl issues Created 4 years, 9 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/network/NetworkLogView.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/ui/FilterBar.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js b/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
index 281deb6fa988f1abafb64348030df4321d04ce34..6a72490ad0d3c15eebfcbbd45f60958703eaec2f 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
@@ -265,6 +265,14 @@ WebInspector.TextFilterUI.prototype = {
},
/**
+ * @return {boolean}
+ */
+ isRegexChecked: function()
+ {
+ return this._supportRegex ? this._regexCheckBox.checked : false;
+ },
+
+ /**
* @return {string}
*/
value: function()
@@ -341,6 +349,11 @@ WebInspector.TextFilterUI.prototype = {
{
if (!this._suggestionBuilder)
return;
+ if (this.isRegexChecked()) {
+ if (this._suggestBox.visible())
lushnikov 2016/03/24 23:17:31 you can safely call this._suggestBox.hide() withou
+ this._suggestBox.hide();
+ return;
+ }
var suggestions = this._suggestionBuilder.buildSuggestions(this._filterInputElement);
if (suggestions && suggestions.length) {
if (this._suppressSuggestion)
@@ -369,7 +382,7 @@ WebInspector.TextFilterUI.prototype = {
this._regex = null;
this._filterInputElement.classList.remove("filter-text-invalid");
if (filterQuery) {
- if (this._supportRegex && this._regexCheckBox.checked) {
+ if (this.isRegexChecked()) {
try {
this._regex = new RegExp(filterQuery, "i");
} catch (e) {
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698