Bug 142830

Summary: Web Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectTreeView instead of Custom/ObjectPropertiesSection
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: burg, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix
timothy: review+
[IMAGE] Before
none
[IMAGE] After none

Joseph Pecoraro
Reported 2015-03-18 12:13:35 PDT
* SUMMARY Debugger Popovers and Probes should use FormattedValue/ObjectTreeView instead of Custom/ObjectPropertiesSection. Debugger Popovers: - attempt to replicate FormattedValue for primitives => FormattedValue - uses ObjectPropertiesSection for objects => ObjectTree properties only Probes: - don't style primitives => FormattedValue - uses ObjectPropertiesSection for objects => ObjectTree - doesn't have previews => give previews! These are easy conversions.
Attachments
[PATCH] Proposed Fix (11.26 KB, patch)
2015-03-18 12:18 PDT, Joseph Pecoraro
timothy: review+
[IMAGE] Before (411.75 KB, image/png)
2015-03-18 12:19 PDT, Joseph Pecoraro
no flags
[IMAGE] After (502.26 KB, image/png)
2015-03-18 12:19 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2015-03-18 12:18:42 PDT
Created attachment 248949 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 2 2015-03-18 12:19:16 PDT
Created attachment 248950 [details] [IMAGE] Before
Joseph Pecoraro
Comment 3 2015-03-18 12:19:34 PDT
Created attachment 248951 [details] [IMAGE] After
Joseph Pecoraro
Comment 4 2015-03-18 13:36:20 PDT
*** Bug 131081 has been marked as a duplicate of this bug. ***
Timothy Hatcher
Comment 5 2015-03-18 15:53:48 PDT
Comment on attachment 248949 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=248949&action=review > Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGridNode.js:89 > - if (sample instanceof WebInspector.RemoteObject) { > - switch (sample.type) { > - case "function": // FIXME: is there a better way to visualize functions? > - case "object": > - return new WebInspector.ObjectPropertiesSection(sample, WebInspector.ProbeSet.SampleObjectTitle).element; > - case "string": > - case "number": > - case "boolean": > - case "undefined": > - case "null": > - return document.createTextNode(sample.value); > - case "array": > - // FIXME: reuse existing visualization of arrays here. > - default: console.log("Don't know how to represent sample:", sample); > - } > - } > + if (sample instanceof WebInspector.RemoteObject) > + return WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject(sample, null); Beautiful!
Joseph Pecoraro
Comment 6 2015-03-18 20:28:15 PDT
Note You need to log in before you can comment on or make changes to this bug.