Changeset 162564 in webkit
- Timestamp:
- Jan 22, 2014 3:27:06 PM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r162561 r162564 1 2014-01-22 Timothy Hatcher <timothy@apple.com> 2 3 Improve collapsing of TimelineDataGridNode graphs up to ancestors. 4 5 https://bugs.webkit.org/show_bug.cgi?id=127440 6 7 Reviewed by Joseph Pecoraro. 8 9 * UserInterface/TimelineDataGridNode.js: 10 (WebInspector.TimelineDataGridNode.prototype.collapse): 11 (WebInspector.TimelineDataGridNode.prototype.createCellContent): 12 (WebInspector.TimelineDataGridNode.prototype.refresh): 13 (WebInspector.TimelineDataGridNode.prototype.needsGraphRefresh): 14 Notify the next visible ancestor it needs to refresh. Use needsGraphRefresh so ancestors 15 are notified instead of directly calling refreshGraph in some places. 16 1 17 2014-01-22 Timothy Hatcher <timothy@apple.com> 2 18 -
trunk/Source/WebInspectorUI/UserInterface/TimelineDataGridNode.js
r162560 r162564 69 69 WebInspector.DataGridNode.prototype.collapse.call(this); 70 70 71 if (!this.revealed) 72 return; 73 71 74 // Refresh to show child bars in our graph now that we collapsed. 72 75 this.refreshGraph(); … … 95 98 { 96 99 if (columnIdentifier === "graph" && this._graphDataSource) { 97 this. refreshGraph();100 this.needsGraphRefresh(); 98 101 return this._graphContainerElement; 99 102 } … … 209 212 { 210 213 if (this._graphDataSource && this._graphOnly) { 211 this. refreshGraph();214 this.needsGraphRefresh(); 212 215 return; 213 216 } … … 226 229 } 227 230 228 if (!this.revealed) { 229 // We are not visible, but an ancestor will be drawing our graph. 230 // Notify the next visible ancestor to refresh their graph. 231 var ancestor = this; 232 while (ancestor && !ancestor.root) { 233 if (ancestor.revealed && ancestor instanceof WebInspector.TimelineDataGridNode) { 234 ancestor.refreshGraph(); 235 return; 236 } 237 238 ancestor = ancestor.parent; 239 } 240 241 return; 242 } 231 // We are not visible, but an ancestor will draw our graph. 232 // They need notified by using our needsGraphRefresh. 233 console.assert(this.revealed); 234 if (!this.revealed) 235 return; 243 236 244 237 var startTime = this._graphDataSource.startTime; … … 337 330 needsGraphRefresh: function() 338 331 { 332 if (!this.revealed) { 333 // We are not visible, but an ancestor will be drawing our graph. 334 // Notify the next visible ancestor that their graph needs to refresh. 335 var ancestor = this; 336 while (ancestor && !ancestor.root) { 337 if (ancestor.revealed && ancestor instanceof WebInspector.TimelineDataGridNode) { 338 ancestor.needsGraphRefresh(); 339 return; 340 } 341 342 ancestor = ancestor.parent; 343 } 344 345 return; 346 } 347 339 348 if (!this._graphDataSource || this._scheduledGraphRefreshIdentifier) 340 349 return;
Note: See TracChangeset
for help on using the changeset viewer.