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

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

Issue 183803018: DevTools: Fix replace bar appearance. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed Created 6 years, 10 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
« no previous file with comments | « no previous file | Source/devtools/front_end/inspector.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/SearchableView.js
diff --git a/Source/devtools/front_end/SearchableView.js b/Source/devtools/front_end/SearchableView.js
index 7575a4cee8a0d1e4d2fbf88952c6ab56ea5c0212..a3e9816e40b276d766bb76e27ccc0c8df1043ea7 100644
--- a/Source/devtools/front_end/SearchableView.js
+++ b/Source/devtools/front_end/SearchableView.js
@@ -462,21 +462,18 @@ WebInspector.SearchableView.prototype = {
_updateSecondRowVisibility: function()
{
- if (this._replaceCheckboxElement.checked) {
- this._footerElement.classList.add("toolbar-search-replace");
- this._secondRowElement.classList.remove("hidden");
- this._prevButtonElement.classList.remove("hidden");
- this._findButtonElement.classList.remove("hidden");
- this._replaceCheckboxElement.tabIndex = -1;
+ var secondRowVisible = this._replaceCheckboxElement.checked;
+ this._footerElementContainer.classList.toggle("replaceable", secondRowVisible);
+ this._footerElement.classList.toggle("toolbar-search-replace", secondRowVisible);
+ this._secondRowElement.classList.toggle("hidden", !secondRowVisible);
+ this._prevButtonElement.classList.toggle("hidden", !secondRowVisible);
+ this._findButtonElement.classList.toggle("hidden", !secondRowVisible);
+ this._replaceCheckboxElement.tabIndex = secondRowVisible ? -1 : 0;
+
+ if (secondRowVisible)
this._replaceInputElement.focus();
- } else {
- this._footerElement.classList.remove("toolbar-search-replace");
- this._secondRowElement.classList.add("hidden");
- this._prevButtonElement.classList.add("hidden");
- this._findButtonElement.classList.add("hidden");
- this._replaceCheckboxElement.tabIndex = 0;
+ else
this._searchInputElement.focus();
- }
this.doResize();
},
« no previous file with comments | « no previous file | Source/devtools/front_end/inspector.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698