+2011-02-04 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Network panel filtering is broken.
+ https://bugs.webkit.org/show_bug.cgi?id=53764
+
+ * inspector/front-end/NetworkPanel.js:
+ (WebInspector.NetworkPanel.prototype._sortItems):
+ (WebInspector.NetworkPanel.prototype._sortByTimeline):
+ (WebInspector.NetworkPanel.prototype._filter):
+ (WebInspector.NetworkPanel.prototype._updateOffscreenRows):
+ (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
+ (WebInspector.NetworkDataGridNode.prototype.get selectable):
+ (WebInspector.NetworkTotalGridNode.prototype.isFilteredOut):
+ (WebInspector.NetworkTotalGridNode.prototype.get selectable):
+
2011-02-04 Andrey Kosyakov <caseq@chromium.org>
Reviewed by Pavel Feldman.
this._dataGrid.sortNodes(sortingFunction, this._dataGrid.sortOrder === "descending");
this._timelineSortSelector.selectedIndex = 0;
+ this._updateOffscreenRows();
},
_sortByTimeline: function()
else
this._timelineGrid.showEventDividers();
this._dataGrid.markColumnAsSortedBy("timeline", "ascending");
+ this._updateOffscreenRows();
},
_createFilterStatusBarItems: function()
target.addStyleClass("selected");
this._showCategory(target.category);
}
+ this._updateOffscreenRows();
},
_scheduleRefresh: function()
var visibleTop = this._dataGrid.scrollContainer.scrollTop;
var visibleBottom = visibleTop + this._dataGrid.scrollContainer.offsetHeight;
- var rowHeight = rows[0].offsetHeight;
+ var rowHeight = 0;
// Filler is at recordsCount - 1.
+ var unfilteredRowIndex = 0;
for (var i = 0; i < recordsCount - 1; ++i) {
var row = rows[i];
// Don't touch summaty - quit instead.
- if (row === this._summaryBarRowNode)
+ if (this._summaryBarRowNode && row === this._summaryBarRowNode.element)
break;
- var rowIsVisible = i * rowHeight < visibleBottom && (i + 1) * rowHeight > visibleTop;
+
+ var dataGridNode = this._dataGrid.dataGridNodeFromNode(row);
+ if (dataGridNode.isFilteredOut()) {
+ row.removeStyleClass("offscreen");
+ continue;
+ }
+
+ if (!rowHeight)
+ rowHeight = row.offsetHeight;
+
+ var rowIsVisible = unfilteredRowIndex * rowHeight < visibleBottom && (unfilteredRowIndex + 1) * rowHeight > visibleTop;
if (rowIsVisible !== row.rowIsVisible) {
if (rowIsVisible)
row.removeStyleClass("offscreen");
row.addStyleClass("offscreen");
row.rowIsVisible = rowIsVisible;
}
+ unfilteredRowIndex++;
}
}
}
this._nameCell.addEventListener("click", this.select.bind(this), false);
},
+ isFilteredOut: function()
+ {
+ if (!this._panel._hiddenCategories.all)
+ return false;
+ return this._resource.category.name in this._panel._hiddenCategories;
+ },
+
select: function()
{
this._panel._showResource(this._resource);
{
if (!this._panel._viewingResourceMode)
return false;
- if (!this._panel._hiddenCategories.all)
- return true;
- if (this._panel._hiddenCategories[this._resource.category.name])
- return false;
- return true;
+ return !this.isFilteredOut();
},
_createDivInTD: function(columnIdentifier)
}
WebInspector.NetworkTotalGridNode.prototype = {
+ isFilteredOut: function()
+ {
+ return false;
+ },
+
+ get selectable()
+ {
+ return false;
+ },
+
createCells: function()
{
var td = document.createElement("td");