Bug 145188

Summary: Web Inspector: Slightly better node previews in arrays
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2015-05-19 15:10:32 PDT
* SUMMARY
Slightly better node previews in arrays. Without getting access to the full node, we can at least provide slightly better node previews.

* TEST
div = document.createElement('div'); div.className = 'foo bar';
span = document.createElement('span'); span.id = 'foo';
input = document.createElement('input'); input.type = 'password';
text = document.createTextNode('text content');
comment = document.createComment('comment content');
[document.body, div, span, input, text, comment]

* CURRENT
▶︎ [body, div.foo.bar, span#foo, input, #text, #comment]

* EXPECTED
▶︎ [<body>, <div class="foo bar">, <span id="foo">, <input type="password">, #text "text content", <!--comment content-->]

* NOTES
- console.dir(span) should still use the smaller string: ▶︎ span#foo { ... }
- ultimately we should consider fetching these node objects and replacing them with real DOM Tree Outlines, or styling this preview string to effectively make it look like the DOM Tree Outline even though it is backed by a non-real node.
Comment 1 Radar WebKit Bug Importer 2015-05-19 15:11:35 PDT
<rdar://problem/21027125>
Comment 2 Joseph Pecoraro 2015-05-19 15:26:29 PDT
Created attachment 253408 [details]
[PATCH] Proposed Fix
Comment 3 WebKit Commit Bot 2015-05-20 08:46:13 PDT
Comment on attachment 253408 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 253408

Committed r184635: <http://trac.webkit.org/changeset/184635>
Comment 4 WebKit Commit Bot 2015-05-20 08:46:18 PDT
All reviewed patches have been landed.  Closing bug.