Bugzilla – Bug 16318
[Shadow]: Clarify whether apply-author-styles leaks rules across shadow DOM trees
Last modified: 2012-03-14 07:28:42 UTC
The algorithm at the start of section 7 "is used to determine whether any given rule is applicable to any DOM node".
Emphasis on *any*.
Per step 2.3.1, If RULE is an author style, in the case TREE is a shadow DOM subtree, if TREE has the apply-author-styles flag is set for TREE, RULE is applicable to NODE.
Does this mean that apply-author-styles should bleed styles from one unrelated, sibling shadow tree to another? This is probably not what is intended and should be clarified.
I think this needs to be more specific. In the case of nested (not stacked) shadow trees, when the outer shadow tree contains <style scoped> and the inner shadow tree has apply-author-styles, do the styles from the outer shadow tree apply to the inner one? Or does apply-author-styles reach into the document? Does it always reach into the document (ie does whether the outer shadow tree have apply-author-styles have any effect on the inner shadow tree?)
Oh I see. Need to know the origin of the RULE before making any decisions.
I think I've got it: http://dvcs.w3.org/hg/webcomponents/rev/ae13e1f7e155
Perfectly clear now. Thanks!