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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2932593003: DevTools: migrate ComputedStyleWidget to shadow (Closed)
Patch Set: ac Created 3 years, 6 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
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);

Powered by Google App Engine
This is Rietveld 408576698