Bug 159236 - Web Inspector: Show Shadow Root type in DOM Tree
Summary: Web Inspector: Show Shadow Root type in DOM Tree
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
Keywords: InRadar
Depends on:
Reported: 2016-06-28 16:45 PDT by Joseph Pecoraro
Modified: 2016-06-29 12:32 PDT (History)
12 users (show)

See Also:

[PATCH] Proposed Fix (16.41 KB, patch)
2016-06-28 16:50 PDT, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff
[IMAGE] Before (118.44 KB, image/png)
2016-06-28 16:51 PDT, Joseph Pecoraro
no flags Details
[IMAGE] After (119.79 KB, image/png)
2016-06-28 16:51 PDT, Joseph Pecoraro
no flags Details
[PATCH] Proposed Fix (16.56 KB, patch)
2016-06-29 11:05 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 2016-06-28 16:45:35 PDT
Show Shadow Root type in DOM Tree

<input id="host-user-agent" controls>
<div id="host-closed"></div>
<div id="host-open"></div>
<div id="no-host"></div>
(function() {
    var shadowRootClosed = document.getElementById("host-closed").attachShadow({mode: "closed"});

    var shadowRootOpen = document.getElementById("host-open").attachShadow({mode: "open"});

Steps to Reproduce:
1. Inspect test case
2. Expand all nodes in the DOM Tree
  => Should see different types of Shadow Roots under the different shadow host elements (UserAgent, Closed, and Open)
Comment 1 Radar WebKit Bug Importer 2016-06-28 16:45:59 PDT
Comment 2 Joseph Pecoraro 2016-06-28 16:50:47 PDT
Created attachment 282300 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2016-06-28 16:51:05 PDT
Created attachment 282301 [details]
[IMAGE] Before
Comment 4 Joseph Pecoraro 2016-06-28 16:51:16 PDT
Created attachment 282302 [details]
[IMAGE] After
Comment 5 Timothy Hatcher 2016-06-29 09:58:29 PDT
Comment on attachment 282300 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=282300&action=review

> Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:61
> +        case WebInspector.DOMNode.ShadowRootType.Open:
> +            return "open";
> +        case WebInspector.DOMNode.ShadowRootType.Closed:
> +            return "closed";

Title case? Localized?
Comment 6 Joseph Pecoraro 2016-06-29 11:05:48 PDT
Created attachment 282360 [details]
[PATCH] Proposed Fix

I changed to UIString names. I was making them "open" and "closed" to match the {mode: <mode>} name. But I guess we localize names in other places.
Comment 7 WebKit Commit Bot 2016-06-29 11:36:52 PDT
Comment on attachment 282360 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 282360

Committed r202634: <http://trac.webkit.org/changeset/202634>