[Webkit-unassigned] [Bug 78202] [Shadow]: Expose one ShadowRoot in the Elements panel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 19 20:34:26 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78202





--- Comment #2 from Dominic Cooney <dominicc at chromium.org>  2012-02-19 20:34:25 PST ---
Does anybody have an opinion on these questions regarding multiple shadow roots? Given

var b = document.querySelector('body')
var s = new ShadowRoot(b);
var t = new ShadowRoot(b);
var u = new ShadowRoot(b);

There are three questions I am wondering about:

• When multiple shadow roots are present, should they be presented at the top-level or underneath a "shadows" node, eg. this:

V <html>
    …
    V <body>
        V (shadows)
            > (shadow)
            > (shadow)
            > (shadow)
        > <p>"Lorem ipsum …"</p>

Or this?

V <html>
    …
    V <body>
        > (shadow)
        > (shadow)
        > (shadow)
        > <p>"Lorem ipsum …"</p>

• Should they be presented before the child content, or after it? eg. this:

V <html>
    …
    V <body>
        * shadows appear here *
        > <p>"Lorem ipsum …"</p>

Or this?

V <html>
    …
    V <body>
        > <p>"Lorem ipsum …"</p>
        * shadows appear here *

• Lastly, should the "youngest" shadow be displayed closest to the child content, or furthest away from it? 

You could ask this third question as: should the "youngest" shadow be displayed at the top or at the bottom? However I’m going to argue that the question should be one of closer or farther from child content, which means displaying shadow roots oldest-to-youngest if you display them above the light children, or youngest-to-oldest if you display them below the light children.

The reason is I think you want to display the youngest shadow  closest to the light children. When you are debugging shadow DOM, you will probably want to experiment with how <content> distribution happens. Since younger shadow roots get "first dibs" on light children, I think shadow DOM in the inspector will be easier to use/understand if you put the younger shadow roots in closer proximity to the light children.

Unrelated to the question of multiple shadows:

• Should "user-agent shadows" (aka built-in shadows) be displayed in the inspector? If so, should they be presented differently somehow? Should they be displayed by default? Should there be an option not to display them? If so, where should it go?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list