Summary: | tspan in link not working | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jeff Schiller <jeffschiller> | ||||||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | webkit | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
Jeff Schiller
2008-03-30 23:40:24 PDT
Created attachment 20230 [details]
Minimal test case
Works in Firefox and Opera...
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. 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.
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.
Comment on attachment 20520 [details]
Safer cast
Awesome.
(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. This broke again - not sure when (Safari 3.1.2) 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). Comment on attachment 20520 [details]
Safer cast
Clearing the review flag because the patch was landed.
(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. |