display:inline on the tbody is causing the width of the iframe to be shrunk to the...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 17 Apr 2016 01:20:00 +0000 (01:20 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 17 Apr 2016 01:20:00 +0000 (01:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=15666

Reviewed by Timothy Hatcher.

Fix a regression caused by the recent Timelines UI redesign, and
reorder TimelineDataGrid's constructor arguments now that most
timeline views no longer have an associated tree outline.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):
Reorder constructor parameters and omit optional treeOutline and
synchronizerDelegate arguments when they aren't needed.

* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
Reorder constructor arguments so that treeOutline can be optional.
(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
Nodes should be refreshed and re-inserted in the data grid without
requiring a grid synchronizer. If a synchronizer exists, re-insert
the tree element for the node. Since the syncronizer is disabled the
order of grid/tree operations doesn't matter.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js
Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js
Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js
Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js
Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js
Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js
Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js

index c670fbc..411620c 100644 (file)
@@ -1,3 +1,38 @@
+2016-04-16  Matt Baker  <mattbaker@apple.com>
+
+        display:inline on the tbody is causing the width of the iframe to be shrunk to the minimum size of its text.
+        https://bugs.webkit.org/show_bug.cgi?id=15666
+
+        Reviewed by Timothy Hatcher.
+
+        Fix a regression caused by the recent Timelines UI redesign, and
+        reorder TimelineDataGrid's constructor arguments now that most
+        timeline views no longer have an associated tree outline.
+
+        * UserInterface/Views/HeapAllocationsTimelineView.js:
+        (WebInspector.HeapAllocationsTimelineView):
+        * UserInterface/Views/LayoutTimelineView.js:
+        (WebInspector.LayoutTimelineView):
+        * UserInterface/Views/NetworkGridContentView.js:
+        (WebInspector.NetworkGridContentView):
+        * UserInterface/Views/NetworkTimelineView.js:
+        (WebInspector.NetworkTimelineView):
+        * UserInterface/Views/RenderingFrameTimelineView.js:
+        (WebInspector.RenderingFrameTimelineView):
+        * UserInterface/Views/ScriptDetailsTimelineView.js:
+        (WebInspector.ScriptDetailsTimelineView):
+        Reorder constructor parameters and omit optional treeOutline and
+        synchronizerDelegate arguments when they aren't needed.
+
+        * UserInterface/Views/TimelineDataGrid.js:
+        (WebInspector.TimelineDataGrid):
+        Reorder constructor arguments so that treeOutline can be optional.
+        (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
+        Nodes should be refreshed and re-inserted in the data grid without
+        requiring a grid synchronizer. If a synchronizer exists, re-insert
+        the tree element for the node. Since the syncronizer is disabled the
+        order of grid/tree operations doesn't matter.
+
 2016-04-15  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: sourceMappingURL not used when sourceURL is set
index 241a989..f2d9ba5 100644 (file)
@@ -75,7 +75,7 @@ WebInspector.HeapAllocationsTimelineView = class HeapAllocationsTimelineView ext
         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(null, columns);
+        this._dataGrid = new WebInspector.TimelineDataGrid(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);
index 325c41b..e1b9f99 100644 (file)
@@ -68,7 +68,7 @@ WebInspector.LayoutTimelineView = class LayoutTimelineView extends WebInspector.
         for (var column in columns)
             columns[column].sortable = true;
 
-        this._dataGrid = new WebInspector.LayoutTimelineDataGrid(null, columns);
+        this._dataGrid = new WebInspector.LayoutTimelineDataGrid(columns);
         this._dataGrid.addEventListener(WebInspector.TimelineDataGrid.Event.FiltersDidChange, this._dataGridFiltersDidChange, this);
         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
 
index 0f135df..5160f34 100644 (file)
@@ -80,7 +80,7 @@ WebInspector.NetworkGridContentView = class NetworkGridContentView extends WebIn
         for (var column in columns)
             columns[column].sortable = true;
 
-        this._dataGrid = new WebInspector.TimelineDataGrid(this._contentTreeOutline, columns);
+        this._dataGrid = new WebInspector.TimelineDataGrid(columns, this._contentTreeOutline);
         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
         this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting("network-grid-content-view-sort", "requestSent");
         this._dataGrid.sortOrderSetting = new WebInspector.Setting("network-grid-content-view-sort-order", WebInspector.DataGrid.SortOrder.Ascending);
index d4b3a22..7c61b3c 100644 (file)
@@ -87,7 +87,7 @@ WebInspector.NetworkTimelineView = class NetworkTimelineView extends WebInspecto
         for (var column in columns)
             columns[column].sortable = true;
 
-        this._dataGrid = new WebInspector.TimelineDataGrid(null, columns);
+        this._dataGrid = new WebInspector.TimelineDataGrid(columns);
         this._dataGrid.addEventListener(WebInspector.TimelineDataGrid.Event.FiltersDidChange, this._dataGridFiltersDidChange, this);
         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
         this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting("network-timeline-view-sort", "requestSent");
index 9b230c9..6e285c6 100644 (file)
@@ -76,7 +76,7 @@ WebInspector.RenderingFrameTimelineView = class RenderingFrameTimelineView exten
         for (var column in columns)
             columns[column].sortable = true;
 
-        this._dataGrid = new WebInspector.TimelineDataGrid(null, columns, this);
+        this._dataGrid = new WebInspector.TimelineDataGrid(columns);
         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
         this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting("rendering-frame-timeline-view-sort", "startTime");
         this._dataGrid.sortOrderSetting = new WebInspector.Setting("rendering-frame-timeline-view-sort-order", WebInspector.DataGrid.SortOrder.Ascending);
index 9bf526b..e0106cd 100644 (file)
@@ -71,7 +71,7 @@ WebInspector.ScriptDetailsTimelineView = class ScriptDetailsTimelineView extends
         for (var column in columns)
             columns[column].sortable = true;
 
-        this._dataGrid = new WebInspector.ScriptTimelineDataGrid(null, columns, this);
+        this._dataGrid = new WebInspector.ScriptTimelineDataGrid(columns);
         this._dataGrid.addEventListener(WebInspector.TimelineDataGrid.Event.FiltersDidChange, this._dataGridFiltersDidChange, this);
         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
         this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting("script-timeline-view-sort", "startTime");
index 00026c5..d1531b3 100644 (file)
@@ -25,7 +25,7 @@
 
 WebInspector.TimelineDataGrid = class TimelineDataGrid extends WebInspector.DataGrid
 {
-    constructor(treeOutline, columns, delegate, editCallback, deleteCallback)
+    constructor(columns, treeOutline, delegate, editCallback, deleteCallback)
     {
         super(columns, editCallback, deleteCallback);
 
@@ -226,16 +226,16 @@ WebInspector.TimelineDataGrid = class TimelineDataGrid extends WebInspector.Data
             this._scheduledDataGridNodeRefreshIdentifier = undefined;
         }
 
-        if (!this._dirtyDataGridNodes || !this._treeOutlineDataGridSynchronizer)
+        if (!this._dirtyDataGridNodes)
             return;
 
-        var selectedNode = this.selectedNode;
-        var sortComparator = this._sortComparator.bind(this);
-        var treeOutline = this._treeOutlineDataGridSynchronizer.treeOutline;
+        let selectedNode = this.selectedNode;
+        let sortComparator = this._sortComparator.bind(this);
 
-        this._treeOutlineDataGridSynchronizer.enabled = false;
+        if (this._treeOutlineDataGridSynchronizer)
+            this._treeOutlineDataGridSynchronizer.enabled = false;
 
-        for (var dataGridNode of this._dirtyDataGridNodes) {
+        for (let dataGridNode of this._dirtyDataGridNodes) {
             dataGridNode.refresh();
 
             if (!this.sortColumnIdentifier)
@@ -244,32 +244,38 @@ WebInspector.TimelineDataGrid = class TimelineDataGrid extends WebInspector.Data
             if (dataGridNode === selectedNode)
                 this._ignoreSelectionEvent = true;
 
-            var treeElement = this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode);
+            console.assert(!dataGridNode.parent || dataGridNode.parent === this);
+            if (dataGridNode.parent === this)
+                this.removeChild(dataGridNode);
+
+            let insertionIndex = insertionIndexForObjectInListSortedByFunction(dataGridNode, this.children, sortComparator);
+            this.insertChild(dataGridNode, insertionIndex);
+
+            if (dataGridNode === selectedNode) {
+                selectedNode.revealAndSelect();
+                this._ignoreSelectionEvent = false;
+            }
+
+            if (!this._treeOutlineDataGridSynchronizer)
+                continue;
+
+            let treeOutline = this._treeOutlineDataGridSynchronizer.treeOutline;
+            let treeElement = this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode);
             console.assert(treeElement);
 
             console.assert(!treeElement.parent || treeElement.parent === treeOutline);
             if (treeElement.parent === treeOutline)
                 treeOutline.removeChild(treeElement);
 
-            console.assert(!dataGridNode.parent || dataGridNode.parent === this);
-            if (dataGridNode.parent === this)
-                this.removeChild(dataGridNode);
-
-            var insertionIndex = insertionIndexForObjectInListSortedByFunction(dataGridNode, this.children, sortComparator);
             treeOutline.insertChild(treeElement, insertionIndex);
-            this.insertChild(dataGridNode, insertionIndex);
 
             // Adding the tree element back to the tree outline subjects it to filters.
             // Make sure we keep the hidden state in-sync while the synchronizer is disabled.
             dataGridNode.element.classList.toggle("hidden", treeElement.hidden);
-
-            if (dataGridNode === selectedNode) {
-                selectedNode.revealAndSelect();
-                this._ignoreSelectionEvent = false;
-            }
         }
 
-        this._treeOutlineDataGridSynchronizer.enabled = true;
+        if (this._treeOutlineDataGridSynchronizer)
+            this._treeOutlineDataGridSynchronizer.enabled = true;
 
         this._dirtyDataGridNodes = null;
     }