Re: [SVGMobile12] Rendering tree

Quoting Bjoern Hoehrmann <derhoermi@gmx.net>:
> * Anne van Kesteren wrote:
>> That doesn't answer my  question. Must display='none' be set on the element
>> itself? Can it be set on some ancestor? Can it be "indirectly" set 
>> through CSS
>> (for UAs that support CSS)?
>
> The referenced subtree is considered in isolation for all purposes of
> SVG processing (style inheritance, event lister invocation, etc), so
> while you can set styles on ancestors of the referenced subtree, it
> won't have an effect on the instance tree.

Also not if these are properties that are inherited?


> Likewise, if you register an
> event listener on an ancestor, and a event is dispatched to an element
> instance, the listener won't be invoked.

That sounds logical, thanks.


> You rather pretend the isolated
> referenced subtree is a child of the use element for all purposes of SVG
> processing, so styles set on the use element or its ancestors do have an
> effect on the instance tree, just like event listeners on ancestors of
> the use element would be triggered when events are dispatched to an
> element instance.

Ok.


> So if your question is whether the display="none" in
>
>  <g display="none">
>    <rect xml:id="test" ... />
>  </g>
>  ...
>  <use xlink:href="#test"
>
> is insufficient to disable rendering of the rect element and all its
> instances, then the answer is "yes".

Ok, makes sense I guess.


> Using style sheets to manipulate
> specified values rather than presentation attributes makes no difference
> whatsoever in SVG's styling model.

How about rect:hover { fill:lime } ? Or selectors that depend on the context
like circle + rect { fill:lime } ? Are the styles mapped at some point 
(which?)
to the element they are applied to and then "copied" to the isolated 
sub-tree of
the <use> element?


-- 
Anne van Kesteren
<http://annevankesteren.nl/>

Received on Thursday, 19 January 2006 12:17:55 UTC