Re: <use> test struct-use-12-f_hover.svg

On Mon, 03 May 2010 20:38:12 +0200, Patrick Dengler <patd@microsoft.com>  
wrote:

> Here is the <use> test that I promised from the last telecon; we decided  
> to keep it separate mostly because the other <use> case was running out  
> of room and this will take at least 6 more circles to fully get the  
> point across and this case requires interaction, so it will need  
> separate directions.
>
> Let me know if this is in the right direction. Right now only Firefox  
> passes (we took the path of Opera), but we do think this is the right  
> interoperation of the spec and the right expected developer experience.
>
> I would have posted it but I am still wrestling with the toolset.

I've checked it in here for easy access:

   http://dev.w3.org/SVG/profiles/1.1F2/ua-tests/struct-use-hover.svg

Like we discussed in the last telecon the browser behaviour is  
inconsistent on this testcase.

Safari 4.0:
- Only draws first circle with the active fill when that is  
hovered/clicked, other circles are unaffected always

Opera 10.5:
- Draws all three circles with the active fill when first circle is  
hovered/clicked, other circles don't trigger anything.

Firefox 3.7:
- Behaves as the test expects

 From http://www.w3.org/TR/SVG11/struct.html#UseElement :

[[
For user agents that support Styling with CSS, the conceptual deep cloning  
of the referenced element into a non-exposed DOM tree also copies any  
property values resulting from the CSS cascade [CSS2-CASCADE] on the  
referenced element and its contents. CSS2 selectors can be applied to the  
original (i.e., referenced) elements because they are part of the formal  
document structure. CSS2 selectors cannot be applied to the (conceptually)  
cloned DOM tree because its contents are not part of the formal document  
structure.
]]

So passing the test == the spec needs to be changed. At least that's what  
I read out of the last sentence there.

A note: it's also possible to work around the "css selectors can't apply  
to shadowtrees" issue by letting the style cascade down from the <use>  
element, that is: by changing the selectors. That should provide somewhat  
more consistent behaviour.

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Monday, 3 May 2010 21:36:12 UTC