Title: [199262] trunk/Source/WebInspectorUI
Revision
199262
Author
[email protected]
Date
2016-04-08 19:32:16 -0700 (Fri, 08 Apr 2016)

Log Message

Web Inspector: Allocation snapshot hover persists after switching tabs
https://bugs.webkit.org/show_bug.cgi?id=156430
<rdar://problem/25633800>

Patch by Joseph Pecoraro <[email protected]> on 2016-04-08
Reviewed by Timothy Hatcher.

* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Don't show the popover if the tree is no longer visible.

* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView.prototype.shown):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get visible):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.shown):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
Give the tree a visible state and have its containing ContentView
update it with normal ContentView shown/hidden.

* UserInterface/Views/Popover.js:
We are presenting while we were dismissing, so completely clear the
dismissing state.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (199261 => 199262)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-04-09 01:20:29 UTC (rev 199261)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-04-09 02:32:16 UTC (rev 199262)
@@ -1,5 +1,31 @@
 2016-04-08  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Allocation snapshot hover persists after switching tabs
+        https://bugs.webkit.org/show_bug.cgi?id=156430
+        <rdar://problem/25633800>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
+        Don't show the popover if the tree is no longer visible.
+
+        * UserInterface/Views/HeapSnapshotInstancesContentView.js:
+        (WebInspector.HeapSnapshotInstancesContentView.prototype.shown):
+        * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
+        (WebInspector.HeapSnapshotInstancesDataGridTree):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get visible):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.shown):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
+        Give the tree a visible state and have its containing ContentView
+        update it with normal ContentView shown/hidden.
+
+        * UserInterface/Views/Popover.js:
+        We are presenting while we were dismissing, so completely clear the
+        dismissing state.
+
+2016-04-08  Joseph Pecoraro  <[email protected]>
+
         JSContext Inspector: Fix asserts and uncaught exception showing Timeline Tab
         https://bugs.webkit.org/show_bug.cgi?id=156411
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js (199261 => 199262)


--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js	2016-04-09 01:20:29 UTC (rev 199261)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js	2016-04-09 02:32:16 UTC (rev 199262)
@@ -286,6 +286,9 @@
         }
 
         this._node.shortestGCRootPath((path) => {
+            if (!this._tree.visible)
+                return;
+
             if (path.length)
                 appendPath(path);
             else if (this._node.gcRoot) {
@@ -295,7 +298,7 @@
                 let emptyElement = popoverContentElement.appendChild(document.createElement("div"));
                 emptyElement.textContent = WebInspector.UIString("This object is referenced by internal objects");
             }
-            
+
             this._tree.popover.presentNewContentWithFrame(popoverContentElement, targetFrame.pad(2), [WebInspector.RectEdge.MAX_Y, WebInspector.RectEdge.MIN_Y, WebInspector.RectEdge.MAX_X]);
         });
     }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js (199261 => 199262)


--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js	2016-04-09 01:20:29 UTC (rev 199261)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js	2016-04-09 02:32:16 UTC (rev 199262)
@@ -96,6 +96,13 @@
 
     // Protected
 
+    shown()
+    {
+        super.shown();
+
+        this._heapSnapshotDataGridTree.shown();
+    }
+
     hidden()
     {
         super.hidden();

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js (199261 => 199262)


--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js	2016-04-09 01:20:29 UTC (rev 199261)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js	2016-04-09 02:32:16 UTC (rev 199262)
@@ -37,6 +37,7 @@
         this._sortComparator = sortComparator;
         this._includeInternalObjects = includeInternalObjects;
 
+        this._visible = false;
         this._popover = null;
         this._popoverNode = null;
 
@@ -85,6 +86,11 @@
         this.sort();
     }
 
+    get visible()
+    {
+        return this._visible;
+    }
+
     get popover()
     {
         if (!this._popover)
@@ -140,8 +146,15 @@
         }
     }
 
+    shown()
+    {
+        this._visible = true;
+    }
+
     hidden()
     {
+        this._visible = false;
+
         if (this._popover && this._popover.visible)
             this._popover.dismiss();
     }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Popover.js (199261 => 199262)


--- trunk/Source/WebInspectorUI/UserInterface/Views/Popover.js	2016-04-09 01:20:29 UTC (rev 199261)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Popover.js	2016-04-09 02:32:16 UTC (rev 199262)
@@ -188,6 +188,8 @@
         else
             this._element.classList.remove(WebInspector.Popover.FadeOutClassName);
 
+        this._dismissing = false;
+
         if (this._contentNeedsUpdate) {
             // Reset CSS properties on element so that the element may be sized to fit its content.
             this._element.style.removeProperty("left");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to