Skip to content
Permalink
Browse files
Web Inspector: Timeline Filter Bars are not appearing at all
https://bugs.webkit.org/show_bug.cgi?id=135740

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-07
Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline.has-non-default-filter > .navigation-bar-container):
(.data-grid.timeline > .navigation-bar-container > .navigation-bar):
(body.mac-platform.legacy .data-grid.timeline > .navigation-bar-container > .navigation-bar):
Update the positioning and height for non-legacy because the console is now taller.

* UserInterface/Views/ScopeBar.js:
(WebInspector.ScopeBar.prototype.hasNonDefaultItemSelected):
Helper to know if there is a non-default filter.

* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters):
(WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
Update scope bar visibility. If non-default we want to always show it.

(WebInspector.TimelineDataGrid.prototype._updateScopeBarForcedVisibility):
If there is a non-default filter, force showing the bar.

Canonical link: https://commits.webkit.org/153625@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JosephPecoraro authored and webkit-commit-queue committed Aug 8, 2014
1 parent edde071 commit 576c54a3a49cc8a3400ff326a0cee62d9a1108d8
Showing 4 changed files with 64 additions and 7 deletions.
@@ -1,3 +1,28 @@
2014-08-07 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Timeline Filter Bars are not appearing at all
https://bugs.webkit.org/show_bug.cgi?id=135740

Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline.has-non-default-filter > .navigation-bar-container):
(.data-grid.timeline > .navigation-bar-container > .navigation-bar):
(body.mac-platform.legacy .data-grid.timeline > .navigation-bar-container > .navigation-bar):
Update the positioning and height for non-legacy because the console is now taller.

* UserInterface/Views/ScopeBar.js:
(WebInspector.ScopeBar.prototype.hasNonDefaultItemSelected):
Helper to know if there is a non-default filter.

* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters):
(WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
Update scope bar visibility. If non-default we want to always show it.

(WebInspector.TimelineDataGrid.prototype._updateScopeBarForcedVisibility):
If there is a non-default filter, force showing the bar.

2014-08-07 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: breakpoints enabled state is not persisted across re-opening the inspector
@@ -62,6 +62,13 @@ WebInspector.ScopeBar.prototype = {
});
},

hasNonDefaultItemSelected: function()
{
return this._items.some(function(item) {
return item.selected && item !== this._defaultItem;
}, this);
},

updateLayout: function(expandOnly)
{
if (expandOnly)
@@ -148,17 +148,21 @@
visibility: hidden;
}

.data-grid.timeline.has-non-default-filter > .navigation-bar-container {
visibility: visible;
}

.data-grid.timeline:hover > .navigation-bar-container {
pointer-events: all;
visibility: visible;
}

.data-grid.timeline > .navigation-bar-container > .navigation-bar {
position: absolute;
top: 10px;
top: 4px;
left: 0;
right: 0;
height: 22px;
height: 28px;

border-bottom: none;
border-top: 1px solid rgb(200, 200, 200);
@@ -167,6 +171,11 @@
background-color: white;
}

body.mac-platform.legacy .data-grid.timeline > .navigation-bar-container > .navigation-bar {
top: 10px;
height: 22px;
}

.timeline-data-grid-tree-outline {
position: relative;
padding: 0;
@@ -35,11 +35,11 @@ WebInspector.TimelineDataGrid = function(treeOutline, columns, delegate, editCal

// Check if any of the cells can be filtered.
for (var [identifier, column] of this.columns) {
var scopeBar = columns["scopeBar"];
var scopeBar = column.scopeBar;
if (!scopeBar)
continue;
this._filterableColumns.push(identifier);
scopeBar.columnIdenfifier = identifier;
scopeBar.columnIdentifier = identifier;
scopeBar.addEventListener(WebInspector.ScopeBar.Event.SelectionChanged, this._scopeBarSelectedItemsDidChange, this);
}

@@ -49,11 +49,13 @@ WebInspector.TimelineDataGrid = function(treeOutline, columns, delegate, editCal
}

if (this._filterableColumns.length) {
var items = [new WebInspector.FlexibleSpaceNavigationItem, this.columns.get(this._filterableColumns[0])["scopeBar"], new WebInspector.FlexibleSpaceNavigationItem];
var items = [new WebInspector.FlexibleSpaceNavigationItem, this.columns.get(this._filterableColumns[0]).scopeBar, new WebInspector.FlexibleSpaceNavigationItem];
this._navigationBar = new WebInspector.NavigationBar(null, items);
var container = this.element.appendChild(document.createElement("div"));
container.className = "navigation-bar-container";
container.appendChild(this._navigationBar.element);

this._updateScopeBarForcedVisibility();
}

this.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridSelectedNodeChanged, this);
@@ -63,6 +65,7 @@ WebInspector.TimelineDataGrid = function(treeOutline, columns, delegate, editCal
}

WebInspector.TimelineDataGrid.StyleClassName = "timeline";
WebInspector.TimelineDataGrid.HasNonDefaultFilterStyleClassName = "has-non-default-filter";
WebInspector.TimelineDataGrid.DelayedPopoverShowTimeout = 250;
WebInspector.TimelineDataGrid.DelayedPopoverHideContentClearTimeout = 500;

@@ -149,7 +152,7 @@ WebInspector.TimelineDataGrid.prototype = {
console.assert(dataGridNode);

for (var identifier of this._filterableColumns) {
var scopeBar = this.columns.get(identifier)["scopeBar"];
var scopeBar = this.columns.get(identifier).scopeBar;
if (!scopeBar || scopeBar.defaultItem.selected)
continue;

@@ -353,9 +356,22 @@ WebInspector.TimelineDataGrid.prototype = {
return (value1 < value2 ? -1 : (value1 > value2 ? 1 : 0)) * sortDirection;
},

_updateScopeBarForcedVisibility: function()
{
for (var identifier of this._filterableColumns) {
var scopeBar = this.columns.get(identifier).scopeBar;
if (scopeBar) {
this.element.classList.toggle(WebInspector.TimelineDataGrid.HasNonDefaultFilterStyleClassName, scopeBar.hasNonDefaultItemSelected());
break;
}
}
},

_scopeBarSelectedItemsDidChange: function(event)
{
var columnIdentifier = event.target.columnIdenfifier;
this._updateScopeBarForcedVisibility();

var columnIdentifier = event.target.columnIdentifier;
this.dispatchEventToListeners(WebInspector.TimelineDataGrid.Event.FiltersDidChange, {columnIdentifier: columnIdentifier});
},

0 comments on commit 576c54a

Please sign in to comment.