Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js |
| index e94ecae18a56ead408fa37321ba8917e6885521c..4f27a8bf6e0bb6694ee2d944aed4ffad0ba95e44 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js |
| @@ -574,6 +574,8 @@ UI.ToolbarInput = class extends UI.ToolbarItem { |
| if (isSearchField) |
| this._setupSearchControls(); |
| + |
| + this._updateIfEmpty(); |
| } |
| _setupSearchControls() { |
| @@ -598,6 +600,7 @@ UI.ToolbarInput = class extends UI.ToolbarItem { |
| this.input.value = value; |
| if (notify) |
| this._onChangeCallback(); |
| + this._updateIfEmpty(); |
| } |
| /** |
| @@ -618,8 +621,13 @@ UI.ToolbarInput = class extends UI.ToolbarItem { |
| } |
| _onChangeCallback() { |
| + this._updateIfEmpty(); |
| this.dispatchEventToListeners(UI.ToolbarInput.Event.TextChanged, this.input.value); |
| } |
| + |
| + _updateIfEmpty() { |
|
phulce
2017/02/09 18:43:10
not a huge fan of the name, can we specify what we
pfeldman
2017/02/09 18:45:15
+1 _updateEmptyStyles
|
| + this.element.classList.toggle('toolbar-input-empty', !this.input.value); |
| + } |
| }; |
| UI.ToolbarInput.Event = { |