[Webkit-unassigned] [Bug 44227] New: Event of a Use element points to SVGElementInstance

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 18 19:19:24 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44227

           Summary: Event of a Use element points to SVGElementInstance
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: SVG
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ccprog at gmx.de
                CC: zimmermann at kde.org


Created an attachment (id=64802)
 --> (https://bugs.webkit.org/attachment.cgi?id=64802)
Test case

(actually tested with Safari 5 on Windows and Epiphany 2.30 on Linux)

Set an event listener on a Use element, for example like this:
<use id="useElement" onclick="alert(evt.target.toString())"
  xlink:href="#sourceElement" />

The reported target object should be [object SVGUseElement]
That would result in evt.target.id="useElement"

Instead, you get [object SVGElementInstance]
As a consequence, evt.target.id=undefined and only evt.target.correspondingUseElement="useElement"

Comment: The SVG 1.1 spec states "If event attributes are assigned to referenced elements, then the actual target for the event will be the SVGElementInstance object within the "instance tree" corresponding to the given referenced element."
This could be misunderstood as if an event attribute on a _referencing_ <use> element should also point to the shadow tree, but what actually is said there only concerns the event attributes on the _referenced_ element.

The Attachment is a test file with several different constellations of <use> elements and event listener attachments. All of them end up with [object SVGElementInstance], even if the event attribute is on a parent element of the <use>.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list