Index: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
index 85b150204d3ee5e014b9fd14a5a7f23e9f03415f..ef32fd06d13b3b8a1513a9fe1e637898052bb859 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
@@ -127,16 +127,17 @@ Elements.StylesSidebarPane = class extends Elements.ElementsSidebarPane { |
* @param {string} placeholder |
* @param {!Element} container |
* @param {function(?RegExp)} filterCallback |
+ * @param {string} activeClassName |
* @return {!Element} |
*/ |
- static createPropertyFilterElement(placeholder, container, filterCallback) { |
+ static createPropertyFilterElement(placeholder, container, filterCallback, activeClassName) { |
var input = createElementWithClass('input'); |
input.placeholder = placeholder; |
function searchHandler() { |
var regex = input.value ? new RegExp(input.value.escapeForRegExp(), 'i') : null; |
filterCallback(regex); |
- container.classList.toggle('styles-filter-engaged', !!input.value); |
+ container.classList.toggle(activeClassName, !!input.value); |
} |
input.addEventListener('input', searchHandler, false); |
@@ -531,7 +532,7 @@ Elements.StylesSidebarPane = class extends Elements.ElementsSidebarPane { |
var hbox = container.createChild('div', 'hbox styles-sidebar-pane-toolbar'); |
var filterContainerElement = hbox.createChild('div', 'styles-sidebar-pane-filter-box'); |
var filterInput = Elements.StylesSidebarPane.createPropertyFilterElement( |
- Common.UIString('Filter'), hbox, this._onFilterChanged.bind(this)); |
+ Common.UIString('Filter'), hbox, this._onFilterChanged.bind(this), 'styles-filter-engaged'); |
UI.ARIAUtils.setAccessibleName(filterInput, Common.UIString('Filter Styles')); |
filterContainerElement.appendChild(filterInput); |
var toolbar = new UI.Toolbar('styles-pane-toolbar', hbox); |