Title: [214387] trunk/Source/WebInspectorUI
Revision
214387
Author
[email protected]
Date
2017-03-24 16:43:56 -0700 (Fri, 24 Mar 2017)

Log Message

Web Inspector: Adding a WebSocket message may change the currently selected resource
https://bugs.webkit.org/show_bug.cgi?id=170036
<rdar://problem/31231463>

Reviewed by Joseph Pecoraro.

Calling increaseSize on a resource may cause a WebInspector.TimelineDataGrid#TimelineDataGrid#_refreshDirtyDataGridNodes call.
Make sure _refreshDirtyDataGridNodes preserves selection of a treeElement.

* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
Re-attaching treeElement causes it to lose selection. Select it again after re-attaching.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (214386 => 214387)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-03-24 23:32:14 UTC (rev 214386)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-03-24 23:43:56 UTC (rev 214387)
@@ -1,3 +1,18 @@
+2017-03-24  Nikita Vasilyev  <[email protected]>
+
+        Web Inspector: Adding a WebSocket message may change the currently selected resource
+        https://bugs.webkit.org/show_bug.cgi?id=170036
+        <rdar://problem/31231463>
+
+        Reviewed by Joseph Pecoraro.
+
+        Calling increaseSize on a resource may cause a WebInspector.TimelineDataGrid#TimelineDataGrid#_refreshDirtyDataGridNodes call.
+        Make sure _refreshDirtyDataGridNodes preserves selection of a treeElement.
+
+        * UserInterface/Views/TimelineDataGrid.js:
+        (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
+        Re-attaching treeElement causes it to lose selection. Select it again after re-attaching.
+
 2017-03-24  Devin Rousso  <[email protected]>
 
         Web Inspector: add context menu item to log content of WebSocket frame

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js (214386 => 214387)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js	2017-03-24 23:32:14 UTC (rev 214386)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js	2017-03-24 23:43:56 UTC (rev 214387)
@@ -267,6 +267,8 @@
             let treeElement = this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode);
             console.assert(treeElement);
 
+            let wasSelected = treeElement.selected;
+
             console.assert(!treeElement.parent || treeElement.parent === treeOutline);
             if (treeElement.parent === treeOutline)
                 treeOutline.removeChild(treeElement);
@@ -273,6 +275,9 @@
 
             treeOutline.insertChild(treeElement, insertionIndex);
 
+            if (wasSelected)
+                treeElement.select();
+
             // 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);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to