Changeset 117753 in webkit
- Timestamp:
- May 21, 2012 2:49:53 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117752 r117753 1 2012-05-21 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: expand only neighbors of the highlighted node when revealing it in heap snapshot 4 https://bugs.webkit.org/show_bug.cgi?id=86998 5 6 Reviewed by Pavel Feldman. 7 8 Only nearest nodes are expanded when a node is revealed in heap snapshot 9 summary view. 10 11 * inspector/front-end/HeapSnapshotDataGrids.js: 12 (WebInspector.HeapSnapshotSortableDataGrid.prototype.highlightNode): 13 (WebInspector.HeapSnapshotViewportDataGrid.prototype.highlightNode): 14 (WebInspector.HeapSnapshotViewportDataGrid.prototype._isScrolledIntoView): 15 * inspector/front-end/HeapSnapshotGridNodes.js: 16 (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId): 17 (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId.didGetNodePosition): 18 * inspector/front-end/ProfilesPanel.js: 19 (WebInspector.ProfilesPanel.prototype.showProfile): 20 1 21 2012-05-21 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> 2 22 -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js
r117051 r117753 87 87 highlightNode: function(node) 88 88 { 89 var prevNode = this._highlightedNode; 89 90 this._clearCurrentHighlight(); 90 91 this._highlightedNode = node; 91 92 this._highlightedNode.element.addStyleClass("highlighted-row"); 93 // If highlighted node hasn't changed reinsert it to make the highlight animation restart. 94 if (node === prevNode) { 95 var element = node.element; 96 var parent = element.parentElement; 97 var nextSibling = element.nextSibling; 98 parent.removeChild(element); 99 parent.insertBefore(element, nextSibling); 100 } 92 101 }, 93 102 … … 279 288 highlightNode: function(node) 280 289 { 281 node.element.scrollIntoViewIfNeeded(true); 282 this._nodeToHighlightAfterScroll = node; 290 if (this._isScrolledIntoView(node.element)) 291 WebInspector.HeapSnapshotSortableDataGrid.prototype.highlightNode.call(this, node); 292 else { 293 node.element.scrollIntoViewIfNeeded(true); 294 this._nodeToHighlightAfterScroll = node; 295 } 296 }, 297 298 _isScrolledIntoView: function(element) 299 { 300 var viewportTop = this.scrollContainer.scrollTop; 301 var viewportBottom = viewportTop + this.scrollContainer.clientHeight; 302 var elemTop = element.offsetTop 303 var elemBottom = elemTop + element.offsetHeight; 304 return elemBottom <= viewportBottom && elemTop >= viewportTop; 283 305 }, 284 306 -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js
r117057 r117753 729 729 revealNodeBySnapshotObjectId: function(snapshotObjectId) 730 730 { 731 function didExpand() 732 { 733 this._provider.nodePosition(snapshotObjectId, didGetNodePosition.bind(this)); 734 } 735 731 736 function didGetNodePosition(nodePosition) 732 737 { 733 if (nodePosition !== -1) 738 if (nodePosition === -1) { 739 this.collapse(); 740 callback(null); 741 } else 734 742 this._populateChildren(nodePosition, null, didPopulateChildren.bind(this, nodePosition)); 735 743 } … … 750 758 } 751 759 752 this.expand(); 753 this._provider.nodePosition(snapshotObjectId, didGetNodePosition.bind(this)); 760 this.expandWithoutPopulate(didExpand.bind(this)); 754 761 }, 755 762 -
trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js
r117581 r117753 559 559 return; 560 560 561 var view = profile.view(); 562 if (view === this.visibleView) 563 return; 564 561 565 this.closeVisibleView(); 562 563 var view = profile.view();564 566 565 567 view.show(this.profileViews);
Note: See TracChangeset
for help on using the changeset viewer.