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

Unified Diff: Source/devtools/front_end/ui/FilterBar.js

Issue 1173363012: DevTools: Network panel filter bar overlaps after select resource row. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: test fixed Created 5 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
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | Source/devtools/front_end/ui/filter.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/FilterBar.js
diff --git a/Source/devtools/front_end/ui/FilterBar.js b/Source/devtools/front_end/ui/FilterBar.js
index 0e50db1fcf6d88f25ea15fd224b7f86ab3be892e..69a0928f9c4b425cf039001319f3fd617a4ee597 100644
--- a/Source/devtools/front_end/ui/FilterBar.js
+++ b/Source/devtools/front_end/ui/FilterBar.js
@@ -31,20 +31,21 @@
/**
* @constructor
* @extends {WebInspector.Object}
+ * @param {string} name
+ * @param {boolean=} visibleByDefault
*/
-WebInspector.FilterBar = function()
+WebInspector.FilterBar = function(name, visibleByDefault)
{
this._filtersShown = false;
- this._element = createElementWithClass("div", "filter-bar");
+ this._element = createElementWithClass("div", "filter-bar hidden");
this._filterButton = new WebInspector.ToolbarButton(WebInspector.UIString("Filter"), "filter-toolbar-item", 3);
this._filterButton.element.addEventListener("click", this._handleFilterButtonClick.bind(this), false);
this._filters = [];
-}
-WebInspector.FilterBar.Events = {
- FiltersToggled: "FiltersToggled"
+ this._stateSetting = WebInspector.settings.createSetting("filterBar-" + name + "-toggled", !!visibleByDefault);
+ this._setState(this._stateSetting.get());
}
WebInspector.FilterBar.FilterBarState = {
@@ -55,16 +56,6 @@ WebInspector.FilterBar.FilterBarState = {
WebInspector.FilterBar.prototype = {
/**
- * @param {string} name
- * @param {boolean=} visibleByDefault
- */
- setName: function(name, visibleByDefault)
- {
- this._stateSetting = WebInspector.settings.createSetting("filterBar-" + name + "-toggled", !!visibleByDefault);
- this._setState(this._stateSetting.get());
- },
-
- /**
* @return {!WebInspector.ToolbarButton}
*/
filterButton: function()
@@ -148,7 +139,7 @@ WebInspector.FilterBar.prototype = {
this._stateSetting.set(filtersShown);
this._updateFilterButton();
- this.dispatchEventToListeners(WebInspector.FilterBar.Events.FiltersToggled, this._filtersShown);
+ this._element.classList.toggle("hidden", !this._filtersShown);
if (this._filtersShown) {
for (var i = 0; i < this._filters.length; ++i) {
if (this._filters[i] instanceof WebInspector.TextFilterUI) {
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | Source/devtools/front_end/ui/filter.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698