Title: [219269] trunk/Source/WebInspectorUI
Revision
219269
Author
[email protected]
Date
2017-07-07 14:33:26 -0700 (Fri, 07 Jul 2017)

Log Message

Web Inspector: REGRESSION(r217258): WebSocket resource tree elements don't show the connection status
https://bugs.webkit.org/show_bug.cgi?id=174274

Reviewed by Brian Burg.

* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement):
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype.populateContextMenu):
* UserInterface/Views/WebSocketResourceTreeElement.js:
(WebInspector.WebSocketResourceTreeElement.prototype.populateContextMenu):
Move "Log WebSocket" context menu item to WebSocketResourceTreeElement.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (219268 => 219269)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-07-07 21:30:47 UTC (rev 219268)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-07-07 21:33:26 UTC (rev 219269)
@@ -1,5 +1,20 @@
 2017-07-07  Devin Rousso  <[email protected]>
 
+        Web Inspector: REGRESSION(r217258): WebSocket resource tree elements don't show the connection status
+        https://bugs.webkit.org/show_bug.cgi?id=174274
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/FrameTreeElement.js:
+        (WebInspector.FrameTreeElement):
+        * UserInterface/Views/ResourceTreeElement.js:
+        (WebInspector.ResourceTreeElement.prototype.populateContextMenu):
+        * UserInterface/Views/WebSocketResourceTreeElement.js:
+        (WebInspector.WebSocketResourceTreeElement.prototype.populateContextMenu):
+        Move "Log WebSocket" context menu item to WebSocketResourceTreeElement.
+
+2017-07-07  Devin Rousso  <[email protected]>
+
         Web Inspector: Show all elements currently using a given CSS Canvas
         https://bugs.webkit.org/show_bug.cgi?id=173965
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js (219268 => 219269)


--- trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js	2017-07-07 21:30:47 UTC (rev 219268)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js	2017-07-07 21:33:26 UTC (rev 219269)
@@ -69,7 +69,7 @@
             if (value === WebInspector.Resource.Type.WebSocket)
                 treeElementConstructor = WebInspector.WebSocketResourceTreeElement;
 
-            this.registerFolderizeSettings(key, folderName, this._frame.resourceCollectionForType(value), forwardingConstructor);
+            this.registerFolderizeSettings(key, folderName, this._frame.resourceCollectionForType(value), treeElementConstructor);
         }
 
         this.updateParentStatus();

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js (219268 => 219269)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js	2017-07-07 21:30:47 UTC (rev 219268)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js	2017-07-07 21:33:26 UTC (rev 219269)
@@ -161,21 +161,6 @@
 
     populateContextMenu(contextMenu, event)
     {
-        if (this._resource.type === WebInspector.Resource.Type.WebSocket) {
-            contextMenu.appendItem(WebInspector.UIString("Log WebSocket"), () => {
-                WebInspector.RemoteObject.resolveWebSocket(this._resource, WebInspector.RuntimeManager.ConsoleObjectGroup, (remoteObject) => {
-                    if (!remoteObject)
-                        return;
-
-                    const text = WebInspector.UIString("Selected WebSocket");
-                    const addSpecialUserLogClass = true;
-                    WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass);
-                });
-            });
-
-            contextMenu.appendSeparator();
-        }
-
         WebInspector.appendContextMenuItemsForSourceCode(contextMenu, this._resource);
 
         super.populateContextMenu(contextMenu, event);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/WebSocketResourceTreeElement.js (219268 => 219269)


--- trunk/Source/WebInspectorUI/UserInterface/Views/WebSocketResourceTreeElement.js	2017-07-07 21:30:47 UTC (rev 219268)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/WebSocketResourceTreeElement.js	2017-07-07 21:33:26 UTC (rev 219269)
@@ -43,6 +43,24 @@
         this.resource.removeEventListener(WebInspector.WebSocketResource.Event.ReadyStateChanged, this._updateConnectionStatus, this);
     }
 
+    populateContextMenu(contextMenu, event)
+    {
+        contextMenu.appendItem(WebInspector.UIString("Log WebSocket"), () => {
+            WebInspector.RemoteObject.resolveWebSocket(this._resource, WebInspector.RuntimeManager.ConsoleObjectGroup, (remoteObject) => {
+                if (!remoteObject)
+                    return;
+
+                const text = WebInspector.UIString("Selected WebSocket");
+                const addSpecialUserLogClass = true;
+                WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass);
+            });
+        });
+
+        contextMenu.appendSeparator();
+
+        super.populateContextMenu(contextMenu, event);
+    }
+
     // Private
 
     _updateConnectionStatus()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to