Bug 99893

Summary: When there are two elements with the same ID, xlink:href should refer to the first.
Product: WebKit Reporter: Philip Rogers <pdr>
Component: SVGAssignee: Ryosuke Niwa <rniwa>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, dino, fmalita, mmaxfield, rniwa, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: 420+   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=139155
Attachments:
Description Flags
Testcase none

Philip Rogers
Reported 2012-10-19 17:25:38 PDT
Created attachment 169732 [details] Testcase When there are two elements with the same ID, xlink:href should refer to the first, even if they are added to the document out of order. Our current resource tracking implementation in SVGDocumentExtensions.cpp does not handle the case when a duplicate ID is added after (in document time) but before (in document order). See the attached testcase for an example. <tref xlink:href="abcd"/> <text id="abcd"> </text> <-- tref should point to the first text, even if it is dynamically added after the other duplicated id. <text id="abcd"> </text>
Attachments
Testcase (1.19 KB, text/html)
2012-10-19 17:25 PDT, Philip Rogers
no flags
Florin Malita
Comment 1 2012-12-01 07:14:37 PST
(In reply to comment #0) > When there are two elements with the same ID, xlink:href should refer to the first Is this behavior required by some spec? I can't easily find it, and I would have thought this is undefined.
Ryosuke Niwa
Comment 2 2018-11-22 21:34:56 PST
This bug still exists.
Ahmad Saleem
Comment 3 2022-07-13 03:40:31 PDT
I am reproduce this bug in Safari 15.5 on macOS 12.4 using attached test case. It shows "FAIL" in green text while all other browsers (Chrome Canary 105 and Firefox Nightly 104) does not show anything at all (not even PASS). Thanks!
Radar WebKit Bug Importer
Comment 4 2022-07-15 15:39:52 PDT
Ryosuke Niwa
Comment 5 2023-07-27 10:19:11 PDT
Note You need to log in before you can comment on or make changes to this bug.