RESOLVED FIXED 18230
tspan in link not working
https://bugs.webkit.org/show_bug.cgi?id=18230
Summary tspan in link not working
Jeff Schiller
Reported 2008-03-30 23:40:24 PDT
The following construct does not render: <text><a><tspan>foo</tspan></a></text> If I remove the <a> or the <tspan> it renders fine.
Attachments
Minimal test case (379 bytes, image/svg+xml)
2008-03-30 23:42 PDT, Jeff Schiller
no flags
First attempt (6.46 KB, patch)
2008-04-03 00:16 PDT, Rob Buis
eric: review-
Safer cast (6.49 KB, patch)
2008-04-13 23:49 PDT, Rob Buis
no flags
Jeff Schiller
Comment 1 2008-03-30 23:42:15 PDT
Created attachment 20230 [details] Minimal test case Works in Firefox and Opera...
Rob Buis
Comment 2 2008-04-03 00:16:47 PDT
Created attachment 20308 [details] First attempt Implement the errata given at: http://www.w3.org/2003/01/REC-SVG11-20030114-errata#linking-text-environment This change of behaviour implements the Minimal test case, I also included a testcase that tests the possible content of the <a> when contained in a <text>. Cheers, Rob.
Eric Seidel (no email)
Comment 3 2008-04-13 22:32:37 PDT
Comment on attachment 20308 [details] First attempt This is *great*. But I don't think it's safe to assume that your parent is always an SVG element: if (static_cast<SVGElement*>(parent())) I bet that it's possible to add an SVGAElement into an arbitrary XML DOM and we don't prevent that. Whether we should is another question. You'll need to check the type of the parent before making the case. r- for the potential crasher.
Rob Buis
Comment 4 2008-04-13 23:49:08 PDT
Created attachment 20520 [details] Safer cast I did not check but I a convinced it will crash in mixed content, this cast is safer. Cheers, Rob.
Eric Seidel (no email)
Comment 5 2008-04-13 23:50:35 PDT
Comment on attachment 20520 [details] Safer cast Awesome.
Darin Adler
Comment 6 2008-04-14 08:38:07 PDT
(In reply to comment #3) > I bet that it's possible to add an SVGAElement into an arbitrary XML DOM and we > don't prevent that. Whether we should is another question. We definitely shouldn't prevent that. Keep in mind that in XML you can have arbitrary content, any element child with any element as parent, in markup without any DOM calls.
Rob Buis
Comment 7 2008-05-02 23:02:59 PDT
Landed in r31859.
Jeff Schiller
Comment 8 2008-07-24 08:52:06 PDT
This broke again - not sure when (Safari 3.1.2)
Jeff Schiller
Comment 9 2008-07-24 08:58:19 PDT
Hm, works in a more recent WebKit build (34603). Which build of WebKit is Safari 3.1 using? This might be FIXED after all (just not in Safari yet).
mitz
Comment 10 2008-07-25 13:12:24 PDT
Comment on attachment 20520 [details] Safer cast Clearing the review flag because the patch was landed.
Robert Blaut
Comment 11 2008-07-29 04:54:25 PDT
(In reply to comment #9) > Hm, works in a more recent WebKit build (34603). Which build of WebKit is > Safari 3.1 using? Safari 3.1 was build from branched source tree of WebKit: http://trac.webkit.org/browser/branches/Safari-3-1-branch. The bug is fixed only in trunk for now: http://trac.webkit.org/browser/trunk >This might be FIXED after all (just not in Safari yet). Indeed.
Note You need to log in before you can comment on or make changes to this bug.