<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>22500</bug_id>
          
          <creation_ts>2008-11-25 15:26:19 -0800</creation_ts>
          <short_desc>hyperlinked text parts aren&apos;t rendered</short_desc>
          <delta_ts>2011-05-17 07:35:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://kaioa.com/svg/webkit_linktest.svg</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jos Hirth">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>darabos.daniel</cc>
    
    <cc>eric</cc>
    
    <cc>jay</cc>
    
    <cc>rwlbuis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>100311</commentid>
    <comment_count>0</comment_count>
    <who name="Jos Hirth">webkit</who>
    <bug_when>2008-11-25 15:26:19 -0800</bug_when>
    <thetext>The example file contains the text &quot;foo link foo&quot; where &quot;link&quot; is wrapped with an &lt;a&gt; element whose &quot;xlink:href&quot; attribute has the value &quot;http://example.com&quot;. It basically looks like this:

&lt;text [...]&gt;
  &lt;tspan&gt;foo &lt;a xlink:href=&quot;http://example.com&quot;&gt;link&lt;/a&gt; foo&lt;/tspan&gt;
&lt;/text&gt;

--

WebKit-r38708 only renders &quot;foo foo&quot;. The same goes for current versions of Chrome and Safari.

--

Hyperlinking a whole &lt;text&gt; element does work fine though.

E.g. the following works as it should:
&lt;a [...]&gt;&lt;text [...]&gt;&lt;tspan [...]&gt;foo&lt;/tspan&gt;&lt;/text&gt;&lt;/a&gt;

While the specs don&apos;t allow a &lt;tspan&gt; as a child of &lt;a&gt;, #PCDATA is valid. See:
http://www.w3.org/TR/SVG/linking.html#Links (#PCDATA is listed first in SVG.a.content)

So something like the following should work:
&lt;text [...]&gt;&lt;tspan [...]&gt;&lt;a [...]&gt;foo&lt;/a&gt;&lt;/tspan&gt;&lt;/text&gt;

And indeed it&apos;s valid and other browsers such as Firefox or Opera display it correctly and the link is also clickable (&lt;tspan&gt; as child of &lt;a&gt; also works there - even if it isn&apos;t valid).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107663</commentid>
    <comment_count>1</comment_count>
    <who name="Daniel Darabos">darabos.daniel</who>
    <bug_when>2009-01-30 03:26:26 -0800</bug_when>
    <thetext>I can confirm this bug. FF3 displays the link and it is clickable, Chrome does not display the link at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119226</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-04-28 17:21:10 -0700</bug_when>
    <thetext>&lt;a&gt; tags are not allowed inside &lt;tspan&gt; according to the SVG 1.1 DTD:

&lt;!ENTITY % SVG.TextContent.extra.class &quot;&quot; &gt;
&lt;!ENTITY % SVG.TextContent.class
    &quot;| %SVG.tspan.qname; | %SVG.tref.qname; | %SVG.textPath.qname;
     | %SVG.altGlyph.qname; %SVG.TextContent.extra.class;&quot;
&gt;

http://www.w3.org/TR/SVG11/svgdtd.html

This looks like a bug in Firefox which we should file with mozilla.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119246</commentid>
    <comment_count>3</comment_count>
    <who name="Jos Hirth">webkit</who>
    <bug_when>2009-04-28 18:36:47 -0700</bug_when>
    <thetext>Aren&apos;t you looking at the wrong thingy?

http://www.w3.org/TR/SVG11/text.html#TSpanElement

&lt;!ENTITY % SVG.tspan.content
    &quot;( #PCDATA | %SVG.tspan.qname; | %SVG.tref.qname; | %SVG.altGlyph.qname;
     | %SVG.animate.qname; | %SVG.set.qname; | %SVG.animateColor.qname;
     | %SVG.Description.class; %SVG.Hyperlink.class;
       %SVG.tspan.extra.content; )*&quot;
&gt;

There... %SVG.Hyperlink.class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>135161</commentid>
    <comment_count>4</comment_count>
    <who name="jay">jay</who>
    <bug_when>2009-07-28 04:41:57 -0700</bug_when>
    <thetext>The example given validates using the w3c validator,

mozilla, batik and opera display the anchor content.

as stated anchor in text is supported by webkit

there is a clear use case as per the example.

#3 suggests imho correctly that the DTD already states that tspan may include an anchor:

&lt;!ENTITY % SVG.tspan.content
    &quot;( #PCDATA | %SVG.tspan.qname; | %SVG.tref.qname; | %SVG.altGlyph.qname;
     | %SVG.animate.qname; | %SVG.set.qname; | %SVG.animateColor.qname;
     | %SVG.Description.class; %SVG.Hyperlink.class;
       %SVG.tspan.extra.content; )*&quot;
&gt;

common-sense dictates that if the spec had required tspan not to contain anchor, this would be raised as an errata, and this bug could be raised with the working group.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>135162</commentid>
    <comment_count>5</comment_count>
      <attachid>33615</attachid>
    <who name="jay">jay</who>
    <bug_when>2009-07-28 04:45:53 -0700</bug_when>
    <thetext>Created attachment 33615
demonstrates text and tspan with anchors, tested on moz, opera, batik, and webkit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>404892</commentid>
    <comment_count>6</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2011-05-16 19:06:49 -0700</bug_when>
    <thetext>I think this works nowadays.
Cheers,

Rob.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>405042</commentid>
    <comment_count>7</comment_count>
    <who name="Jos Hirth">webkit</who>
    <bug_when>2011-05-17 07:27:46 -0700</bug_when>
    <thetext>Yes, it does look indeed like it was fixed in the meantime. Thanks for taking a look, Rob. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>405046</commentid>
    <comment_count>8</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2011-05-17 07:35:19 -0700</bug_when>
    <thetext>Hi Jos,

(In reply to comment #7)
&gt; Yes, it does look indeed like it was fixed in the meantime. Thanks for taking a look, Rob. :)

No problem :) I like to close old reports so we can concentrate on fixing what is still broken today :)
Cheers,

Rob.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>33615</attachid>
            <date>2009-07-28 04:45:53 -0700</date>
            <delta_ts>2009-07-28 04:45:53 -0700</delta_ts>
            <desc>demonstrates text and tspan with anchors, tested on moz, opera, batik, and webkit</desc>
            <filename>moz-webkit-text-anchor-bug.svg</filename>
            <type>image/svg+xml</type>
            <size>847</size>
            <attacher name="jay">jay</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjwh
RE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMjAwMTA5MDQvL0VOIg0KICAgICJo
dHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI+
CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjIiIGJh
c2VQcm9maWxlPSJ0aW55IgogICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5
L3hsaW5rIiB3aWR0aD0iNDAwIiBoZWlnaHQ9IjMwMCI+Cjx0aXRsZT5tb3ppbGxhIGFuZCA8L3Rp
dGxlPgogPHRleHQgZm9udC1zaXplPSIwLjdlbSIgeD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