Chromium Code Reviews| 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) { |