Bug 12567 - <text> elements ignore <a> children
Summary: <text> elements ignore <a> children
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.w3.org/Graphics/SVG/Test/2...
Keywords: SVGHitList
Depends on:
Blocks: 12500
  Show dependency treegraph
 
Reported: 2007-02-04 03:17 PST by Eric Seidel (no email)
Modified: 2007-03-20 22:31 PDT (History)
1 user (show)

See Also:


Attachments
test case (88 bytes, image/svg+xml)
2007-02-04 03:17 PST, Eric Seidel (no email)
no flags Details
partial fix (4.96 KB, patch)
2007-02-05 06:19 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
First attempt (85.72 KB, patch)
2007-03-09 13:57 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Improved patch (85.74 KB, patch)
2007-03-10 04:28 PST, Rob Buis
zimmermann: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-02-04 03:17:07 PST
<text> elements ignore <a> children

See attached test case.
Comment 1 Eric Seidel (no email) 2007-02-04 03:17:56 PST
Created attachment 12912 [details]
test case

Firefox fails this test as well.  Opera passes.
Comment 2 Eric Seidel (no email) 2007-02-04 03:59:35 PST
This also causes this test to fail:
http://www.w3.org/Graphics/SVG/Test/20061213/htmlEmbedHarness/full-struct-frag-05-t.html
Comment 3 Eric Seidel (no email) 2007-02-05 06:19:16 PST
Created attachment 12933 [details]
partial fix

This "fixes" the bug, but crashes, due to RenderSVGInlineText not expecting an element other than a TextPositioningElement.  I'm not sure if RenderSVGInline is the correct renderer for <a> to be making or not.  We'd need to hear olliej's opinion on this.

This also cleans up renderer creation, to prevent text renderers from being allowed in the wrong places.
Comment 4 Eric Seidel (no email) 2007-02-06 07:48:45 PST
This blocks at least 3-4 w3c tests, and is likely seen often "in the wild".  Adding to the SVG hit list.
Comment 5 Rob Buis 2007-03-09 13:57:30 PST
Created attachment 13567 [details]
First attempt

Based on Eric's patch, this also fixes the SVGInlineFlowBox routines and starts supporting xlink:show.
Cheers,

Rob.
Comment 6 Rob Buis 2007-03-10 04:28:23 PST
Created attachment 13575 [details]
Improved patch

I got the target attribute down in my previous patch. I checked with Opera and it seems if either target="_self" or xlink:show="new" the link opens up in a new window, so I implemented it like this in this patch.
Cheers,

Rob.
Comment 7 Nikolas Zimmermann 2007-03-11 16:25:18 PDT
Comment on attachment 13575 [details]
Improved patch

Good patch!

You mentioned that we now match Opera's behaviour - I guess FF/Batik handle it the same way?

I do think the way you implemented it and how Opera handles it makes sense though, so r=me in any way :-)

Niko
Comment 8 Rob Buis 2007-03-12 13:31:59 PDT
Landed in r20122.