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

Unified Diff: Source/devtools/front_end/ConsoleView.js

Issue 72863002: [DevTools] Added regex support to console filters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « no previous file | Source/devtools/front_end/FilterBar.js » ('j') | Source/devtools/front_end/FilterBar.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ConsoleView.js
diff --git a/Source/devtools/front_end/ConsoleView.js b/Source/devtools/front_end/ConsoleView.js
index f34d4ec829b4d3e5f61caca99e9fcf9d1a532d55..748219def4896683abb0e235f65dccf071f6e8a8 100644
--- a/Source/devtools/front_end/ConsoleView.js
+++ b/Source/devtools/front_end/ConsoleView.js
@@ -785,7 +785,7 @@ WebInspector.ConsoleViewFilter.Events = {
WebInspector.ConsoleViewFilter.prototype = {
addFilters: function(filterBar)
{
- this._textFilterUI = new WebInspector.TextFilterUI();
+ this._textFilterUI = new WebInspector.TextFilterUI(true);
this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._textFilterChanged, this);
filterBar.addFilter(this._textFilterUI);
@@ -802,11 +802,7 @@ WebInspector.ConsoleViewFilter.prototype = {
_textFilterChanged: function(event)
{
- var query = this._textFilterUI.value();
- if (!query)
- delete this._filterRegex;
- else
- this._filterRegex = createPlainTextSearchRegex(query, "gi");
+ this._filterRegex = this._textFilterUI.regex();
this._filterChanged();
},
@@ -890,7 +886,7 @@ WebInspector.ConsoleViewFilter.prototype = {
WebInspector.settings.messageURLFilters.set(this._messageURLFilters);
this._messageLevelFilters = {};
WebInspector.settings.messageLevelFilters.set(this._messageLevelFilters);
- this._filterChanged();
+ this._textFilterUI.setValue(""); // Would fire FilterChanged event to update visible messages.
},
/**
« no previous file with comments | « no previous file | Source/devtools/front_end/FilterBar.js » ('j') | Source/devtools/front_end/FilterBar.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698