Bug 145188 - Web Inspector: Slightly better node previews in arrays
Summary: Web Inspector: Slightly better node previews in arrays
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: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-19 15:10 PDT by Joseph Pecoraro
Modified: 2015-05-20 08:46 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (12.48 KB, patch)
2015-05-19 15:26 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.