Web Inspector: Should include "Log Value" context menu item in Preview and Collapsed...
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Apr 2015 01:00:21 +0000 (01:00 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Apr 2015 01:00:21 +0000 (01:00 +0000)
commit2abdfe4859dc1b2ca749ee3e4334d4b63f508383
treefd8c41dcd7824565b6717d799116a7fd457b8cce
parent825097ed96d54429a04137f055bcbe4580d393b8
Web Inspector: Should include "Log Value" context menu item in Preview and Collapsed ObjectTree
https://bugs.webkit.org/show_bug.cgi?id=143845

Reviewed by Timothy Hatcher.

Give previews the same "Log Value" context menu so that if you just log
a bunch of objects to the console you can quickly turn that entire object
into a $n reference in the console to interact with.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype.setOriginatingObjectInfo):
(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
Provide API to refer to a RemoteObject and optional PropertyPath
that can be used to give the preview a "Log Value" context menu.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
Include the RemoteObject without a path for a preview context menu.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
Include the RemoteObject with a path if we knew it for a preview context menu.

* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement):
The context menu can never be empty, since we always added at least one item above.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js
Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js
Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js