[Bug 19684] [Shadow]: shadow reference combinator should be css function.

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

--- Comment #5 from Dimitri Glazkov <dglazkov@chromium.org> ---
(In reply to comment #4)
> I read reference combinator again.
> So I think, I probably misunderstood "host language" and "reference".
> 
> (1) reference combinator especially depends on the first value.
> (2) the attribute is solved in the context of the first value.
> 
> So if "content /select/ div.special" is given, since currently "select"
> attribute is used by only <content>, we can know only <content> has valid
> host language / valid reference about /select/.
> 
> From the viewpoint of implementation, we should know whether some given
> attribute is valid for some element. RuleSets are registered with TREESCOPE
> according to the context.
> 
> I think, this might be bike-shedding. But I found one implementation
> problem, fallback case - idref. 
> 
> If ".some /select/ div.special" is given in some shadow root stylesheet and
> "<div class=some select=#a>" and "<div class=special id=a>" exists in the
> shadow root's subtree,
> 
> <#shadow-root>
>    <style>
>    .some /select/ div.special { color: red; }
>    </style>
>    <div class=some select=#a></div>
>    <div class=special></div>
> </#shadow-root>
> 
> Since the "<div class=some>" has no host languages and no valid context for
> "select", we have to see idref as fallback. The spec says:
> 
> "Unless the host language defines a different syntax for expressing this
> relationship, this relationship is considered to exist if the value of the
> specified attribute on the first element is an IDREF or an ID selector
> referencing the second element. "

This is not how interpret the spec. We (the host language) define /select/ as
something that _only_ applies to <content> element and matches results of the
distribution.

However, I think the selectors4 spec could use some finer language here. I'll
file a bug.

> But web developers will not probably add "select" to other elements except
> "<content>". So we would not see such fallback case...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 24 October 2012 15:29:03 UTC