[Bug 17591] New: [Shadow]: Should insertion point nodes have styles?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17591

           Summary: [Shadow]: Should insertion point nodes have styles?
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
        AssignedTo: dglazkov@chromium.org
        ReportedBy: tasak@google.com
         QAContact: public-webapps-bugzilla@w3.org


According to the shadow dom spec:
http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles,
insertion point nodes have styles:

- the styles of the insertion point node are inherited by those child nodes of
the shadow host that are assigned to this insertion point
- the styles of the shadow insertion point node are inherited by the child
nodes of the shadow root of the shadow DOM subtree, distributed to this shadow
insertion point

I think, this behavior looks natural for web developers.

However, the spec also says:
"To enable composition of shadow host's children and the shadow DOM subtree, a
notion of insertion points is added to the abstraction. An insertion point is a
defined location in the shadow DOM subtree, to which the shadow host's children
are transposed when rendering."
in
http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-dom-subtrees

So no insertion point nodes appear in a composed tree. If insertion point nodes
have styles and the styles are inherited by distributed nodes, styles of nodes,
which are not in a composed tree, will affect rendering result. I think, it
looks a little odd.

The following is an example:

<div>
   <span>This is an example.</span>
</div>

And a shadow root is attached to the div and the shadow root's innerHTML is:

<div>!!!!
  <content style="color: red"></content>
!!!!</div>

What color is the text: "This is an example."?

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 25 June 2012 05:57:01 UTC