| Summary: | Web Inspector: Should include "Log Value" context menu item in Preview and Collapsed ObjectTree | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
| Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
Created attachment 250975 [details]
[PATCH] Proposed Fix
NOTE: The previews inside of ObjectTreePropertyTreeElement don't get originating information because the TreeElement already handles context menus.
Comment on attachment 250975 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=250975&action=review > Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js:57 > + this._previewView.setOriginatingObjectInfo(this._object, providedPropertyPath ? propertyPath : null); Is providedPropertyPath just to avoid maybe passing a non-WebInspector.PropertyPath? The assert at the top should be enough. Why not this._propertyPath? (In reply to comment #3) > Comment on attachment 250975 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=250975&action=review > > > Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js:57 > > + this._previewView.setOriginatingObjectInfo(this._object, providedPropertyPath ? propertyPath : null); > > Is providedPropertyPath just to avoid maybe passing a > non-WebInspector.PropertyPath? The assert at the top should be enough. > > Why not this._propertyPath? If a property path was not provided, we provide a default root path of "this" and in that case I do not want to pass the property path along, because it won't be accurate. Only in the case where the ObjectTree was initialized with a property path will I pass it on. I could have written "var providedPropertyPath = !!propertyPath;" but chose the more explicit route. Comment on attachment 250975 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=250975&action=review > Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js:254 > + > + contextMenu.appendSeparator(); I have a feeling this separator is not actually needed and can be removed. I'll test. |
* SUMMARY Should include "Log Value" context menu item in Preview and Collapsed ObjectTree. For instance, if I console.log("onclick", event) and I see an event I am interested in, I want to just be able to right click it and "Log Value" to get a $n reference to poke around the object. Currently "Log Value" only happens for the properties inside the expanded event.