Title: [198175] trunk/Source/WebInspectorUI
Revision
198175
Author
commit-qu...@webkit.org
Date
2016-03-14 16:35:22 -0700 (Mon, 14 Mar 2016)

Log Message

Web Inspector: REGRESSION(r197974): HeapAllocationsTimelineView broken, doesn't handle Timeline Sidebar Navigation removal
https://bugs.webkit.org/show_bug.cgi?id=155458
<rdar://problem/25150803>

Patch by Joseph Pecoraro <pecor...@apple.com> on 2016-03-14
Reviewed by Timothy Hatcher.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
(WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
Update the TimelineView now that there is no sidebar.
Remove any TreeOutline logic and replace with DataGrid logic.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (198174 => 198175)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-03-14 23:33:49 UTC (rev 198174)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-03-14 23:35:22 UTC (rev 198175)
@@ -1,5 +1,24 @@
 2016-03-14  Joseph Pecoraro  <pecor...@apple.com>
 
+        Web Inspector: REGRESSION(r197974): HeapAllocationsTimelineView broken, doesn't handle Timeline Sidebar Navigation removal
+        https://bugs.webkit.org/show_bug.cgi?id=155458
+        <rdar://problem/25150803>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/HeapAllocationsTimelineView.js:
+        (WebInspector.HeapAllocationsTimelineView):
+        (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
+        (WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
+        (WebInspector.HeapAllocationsTimelineView.prototype.layout):
+        (WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
+        (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
+        (WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
+        Update the TimelineView now that there is no sidebar.
+        Remove any TreeOutline logic and replace with DataGrid logic.
+
+2016-03-14  Joseph Pecoraro  <pecor...@apple.com>
+
         Web Inspector: REGRESSION(r198026): Can't click on Snapshot in Timeline Overview
         https://bugs.webkit.org/show_bug.cgi?id=155457
         <rdar://problem/25150706>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js (198174 => 198175)


--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js	2016-03-14 23:33:49 UTC (rev 198174)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js	2016-03-14 23:35:22 UTC (rev 198175)
@@ -75,7 +75,7 @@
         this._snapshotListPathComponent = new WebInspector.HierarchicalPathComponent(WebInspector.UIString("Snapshot List"), "snapshot-list-icon", "snapshot-list", false, false);
         this._snapshotListPathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.Clicked, this._snapshotListPathComponentClicked, this);
 
-        this._dataGrid = new WebInspector.TimelineDataGrid(this.navigationSidebarTreeOutline, columns);
+        this._dataGrid = new WebInspector.TimelineDataGrid(null, columns);
         this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting("heap-allocations-timeline-view-sort", "timestamp");
         this._dataGrid.sortOrderSetting = new WebInspector.Setting("heap-allocations-timeline-view-sort-order", WebInspector.DataGrid.SortOrder.Ascending);
         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
@@ -119,10 +119,12 @@
         this._heapSnapshotDiff = null;
         this._cancelSelectComparisonHeapSnapshots();
 
-        let treeElement = this.navigationSidebarTreeOutline.findTreeElement(heapSnapshotTimelineRecord);
-        console.assert(treeElement, "Should have a TreeElement for the HeapSnapshot");
-        if (treeElement)
-            treeElement.select();
+        for (let dataGridNode of this._dataGrid.children) {
+            if (dataGridNode.record === heapSnapshotTimelineRecord) {
+                dataGridNode.select();
+                break;
+            }
+        }
 
         let shouldManuallyTriggerContentViewUpdate = this._contentViewContainer.currentContentView && this._contentViewContainer.currentContentView.representedObject === heapSnapshotTimelineRecord.heapSnapshot;
 
@@ -172,8 +174,8 @@
             let diffComponent = new WebInspector.HierarchicalPathComponent(WebInspector.UIString("Snapshot Comparison (%d and %d)").format(firstSnapshotIdentifier, secondSnapshotIdentifier), "snapshot-diff-icon", "snapshot-diff");
             components.push(diffComponent);
         } else {
-            if (this.navigationSidebarTreeOutline.selectedTreeElement) {
-                let heapSnapshotPathComponent = new WebInspector.GeneralTreeElementPathComponent(this.navigationSidebarTreeOutline.selectedTreeElement);
+            if (this._dataGrid.selectedNode) {
+                let heapSnapshotPathComponent = new WebInspector.TimelineDataGridNodePathComponent(this._dataGrid.selectedNode);
                 heapSnapshotPathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.SiblingWasSelected, this._snapshotPathComponentSelected, this);
                 components.push(heapSnapshotPathComponent);
             }
@@ -182,12 +184,6 @@
         return components.concat(this._contentViewContainer.currentContentView.selectionPathComponents);
     }
 
-    get navigationSidebarTreeOutlineLabel()
-    {
-        // FIXME: Nothing. The sidebar will soon be removed.
-        return WebInspector.UIString("Snapshots");
-    }
-
     userSelectedRecordFromOverview(timelineRecord)
     {
         this.showHeapSnapshotTimelineRecord(timelineRecord);
@@ -204,9 +200,8 @@
         // Wait to show records until our zeroTime has been set.
         if (this._pendingRecords.length && this.zeroTime) {
             for (let heapAllocationsTimelineRecord of this._pendingRecords) {
-                let treeElement = new WebInspector.TimelineRecordTreeElement(heapAllocationsTimelineRecord);
                 let dataGridNode = new WebInspector.HeapAllocationsTimelineDataGridNode(heapAllocationsTimelineRecord, this.zeroTime, this);
-                this._dataGrid.addRowInSortOrder(treeElement, dataGridNode);
+                this._dataGrid.addRowInSortOrder(null, dataGridNode);
             }
 
             this._pendingRecords = [];
@@ -310,8 +305,8 @@
             return;
         }
 
-        if (this.navigationSidebarTreeOutline.selectedTreeElement)
-            this.navigationSidebarTreeOutline.selectedTreeElement.deselect();
+        if (this._dataGrid.selectedNode)
+            this._dataGrid.selectedNode.deselect();
 
         this._selectingComparisonHeapSnapshots = true;
         this._baselineHeapSnapshotTimelineRecord = null;
@@ -331,7 +326,7 @@
 
         let heapAllocationsTimelineRecord = dataGridNode.record;
         if (this._baselineHeapSnapshotTimelineRecord === heapAllocationsTimelineRecord) {
-            this.navigationSidebarTreeOutline.selectedTreeElement.deselect();
+            this._dataGrid.selectedNode.deselect();
             return;
         }
 
@@ -340,7 +335,7 @@
             this._baselineDataGridNode = dataGridNode;
             this._baselineDataGridNode.markAsBaseline();
             this._baselineHeapSnapshotTimelineRecord = heapAllocationsTimelineRecord;
-            this.navigationSidebarTreeOutline.selectedTreeElement.deselect();
+            this._dataGrid.selectedNode.deselect();
             this._compareHeapSnapshotHelpTextItem.text = WebInspector.UIString("Select comparison snapshot");
             this.dispatchEventToListeners(WebInspector.ContentView.Event.NavigationItemsDidChange);
             return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to