Bug 142830 - Web Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectTreeView instead of Custom/ObjectPropertiesSection
Summary: Web Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectT...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
: 131081 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-18 12:13 PDT by Joseph Pecoraro
Modified: 2015-03-18 20:28 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (11.26 KB, patch)
2015-03-18 12:18 PDT, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff
[IMAGE] Before (411.75 KB, image/png)
2015-03-18 12:19 PDT, Joseph Pecoraro
no flags Details
[IMAGE] After (502.26 KB, image/png)
2015-03-18 12:19 PDT, Joseph Pecoraro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 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.
Comment 1 Joseph Pecoraro 2015-03-18 12:18:42 PDT
Created attachment 248949 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2015-03-18 12:19:16 PDT
Created attachment 248950 [details]
[IMAGE] Before
Comment 3 Joseph Pecoraro 2015-03-18 12:19:34 PDT
Created attachment 248951 [details]
[IMAGE] After
Comment 4 Joseph Pecoraro 2015-03-18 13:36:20 PDT
*** Bug 131081 has been marked as a duplicate of this bug. ***
Comment 5 Timothy Hatcher 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!
Comment 6 Joseph Pecoraro 2015-03-18 20:28:15 PDT
http://trac.webkit.org/changeset/181722