Re: Issue in test struct-use-205-t.svg

On Tue, 21 Oct 2008 15:25:14 +0200, Niklas Hagelroth <niklas.hagelroth@ikivo.com> wrote:

> Hi SVG WG,
>
> 
>
> We've found an issue with the "at-risk" test struct-use-205-t.svg.
>
> 
>
> The last subtest in the file assumes that the outermost use-element is
> the "nesteduse"-element. We argue that it is in fact element "u3" which
> always is the outermost use and it will always be so, hence the first
> test in the u3 handler should be:
>
> 
>
> if(evt.target.correspondingUseElement == document.getElementById("u3"))
>
> instead of
>
> if(!evt.target.correspondingUseElement)
>
> 
>
> 
>
> See the definition of the correspondingUseElement attribute:
>
>
> [[
>
> readonly SVGUseElement correspondingUseElement
>
>     The corresponding 'use' element to which this SVGElementInstance
> object belongs. When 'use' elements are nested (e.g., a 'use' references
> another 'use' which references a graphics element such as a 'rect'),
> then the correspondingUseElement is the outermost 'use' (i.e., the one
> which indirectly references the 'rect', not the one with the direct
> reference).
>
> ]]

Right, but that isn't what's tested. What is tested is that when the SVGElementInstance is orphaned (= the corresponding use element is no longer pointing to the particular element that generated this SVGElementInstace) the SVGElementInstance no longer has the reference to the use element.

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 Tuesday, 21 October 2008 13:56:31 UTC