Changeset 77127 in webkit
- Timestamp:
- Jan 31, 2011 6:43:18 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r77126 r77127 1 2011-01-30 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: speed up network panel rendering. 6 https://bugs.webkit.org/show_bug.cgi?id=53397 7 8 * inspector/front-end/DataGrid.js: 9 (WebInspector.DataGrid.prototype.get scrollContainer): 10 * inspector/front-end/NetworkPanel.js: 11 (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor): 12 (WebInspector.NetworkPanel.prototype._positionSummaryBar): 13 (WebInspector.NetworkPanel.prototype._createTable): 14 (WebInspector.NetworkPanel.prototype._exportResource): 15 (WebInspector.NetworkPanel.prototype._onScroll): 16 * inspector/front-end/networkPanel.css: 17 (.network-sidebar .data-grid.small tr.offscreen): 18 (.network-sidebar .data-grid tr.offscreen): 19 (.network-sidebar .data-grid tr.offscreen td): 20 1 21 2011-01-31 Peter Varga <pvarga@webkit.org> 2 22 -
trunk/Source/WebCore/inspector/front-end/DataGrid.js
r74193 r77127 492 492 493 493 this._columnWidthsInitialized = false; 494 }, 495 496 get scrollContainer() 497 { 498 return this._scrollContainer; 494 499 }, 495 500 -
trunk/Source/WebCore/inspector/front-end/NetworkPanel.js
r76483 r77127 104 104 elementsToRestoreScrollPositionsFor: function() 105 105 { 106 return [this.containerElement ];106 return [this.containerElement, this._dataGrid.scrollContainer]; 107 107 }, 108 108 … … 159 159 this._sortItems(); 160 160 } 161 this._updateOffscreenRows(); 161 162 }, 162 163 … … 215 216 this._dataGrid.addEventListener("sorting changed", this._sortItems, this); 216 217 this._dataGrid.addEventListener("width changed", this._updateDividersIfNeeded, this); 218 this._dataGrid.scrollContainer.addEventListener("scroll", this._updateOffscreenRows.bind(this)); 217 219 218 220 this._patchTimelineHeader(); … … 1026 1028 var har = (new WebInspector.HAREntry(resource)).build(); 1027 1029 offerFileForDownload(JSON.stringify(har)); 1030 }, 1031 1032 _updateOffscreenRows: function(e) 1033 { 1034 var dataTableBody = this._dataGrid.dataTableBody; 1035 var rows = dataTableBody.children; 1036 var recordsCount = rows.length; 1037 if (recordsCount < 2) 1038 return; // Filler row only. 1039 1040 var visibleTop = this._dataGrid.scrollContainer.scrollTop; 1041 var visibleBottom = visibleTop + this._dataGrid.scrollContainer.offsetHeight; 1042 1043 var rowHeight = rows[0].offsetHeight; 1044 1045 // Filler is at recordsCount - 1. 1046 for (var i = 0; i < recordsCount - 1; ++i) { 1047 var row = rows[i]; 1048 // Don't touch summaty - quit instead. 1049 if (row === this._summaryBarRowNode) 1050 break; 1051 var rowIsVisible = i * rowHeight < visibleBottom && (i + 1) * rowHeight > visibleTop; 1052 if (rowIsVisible !== row.rowIsVisible) { 1053 if (rowIsVisible) 1054 row.removeStyleClass("offscreen"); 1055 else 1056 row.addStyleClass("offscreen"); 1057 row.rowIsVisible = rowIsVisible; 1058 } 1059 } 1028 1060 } 1029 1061 } -
trunk/Source/WebCore/inspector/front-end/networkPanel.css
r73145 r77127 64 64 font-size: 11px; 65 65 font-weight: bold; 66 } 67 68 .network-sidebar .data-grid.small tr.offscreen { 69 height: 21px; 70 } 71 72 .network-sidebar .data-grid tr.offscreen { 73 height: 41px; 74 } 75 76 .network-sidebar .data-grid tr.offscreen td { 77 display: none; 66 78 } 67 79
Note: See TracChangeset
for help on using the changeset viewer.