<?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>47669</bug_id>
          
          <creation_ts>2010-10-14 07:02:32 -0700</creation_ts>
          <short_desc>Title-Element has no popup on &lt;svg&gt;-Elements, but on &lt;g&gt;</short_desc>
          <delta_ts>2010-11-10 23:06:38 -0800</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>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Holger Jeromin">bugzillawebkit</reporter>
          <assigned_to name="Rob Buis">rwlbuis</assigned_to>
          <cc>eric</cc>
    
    <cc>kling</cc>
    
    <cc>mdelaney7</cc>
    
    <cc>rwlbuis</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>294090</commentid>
    <comment_count>0</comment_count>
      <attachid>70736</attachid>
    <who name="Holger Jeromin">bugzillawebkit</who>
    <bug_when>2010-10-14 07:02:32 -0700</bug_when>
    <thetext>Created attachment 70736
SVG Demo for a title in svg and g element

The standard http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements defines:
&quot;Each container element [...] in an SVG drawing can supply [...] a ‘title’ description string&quot; where

http://www.w3.org/TR/SVG/intro.html#TermContainerElement defines an container element as
&quot;Specifically: ‘a’, ‘defs’, ‘glyph’, ‘g’, ‘marker’, ‘mask’, ‘missing-glyph’, ‘pattern’, ‘svg’, ‘switch’ and ‘symbol’.&quot;

However a title element is only rendered as a popup at mouseover in &lt;g&gt;, but not in a &lt;svg&gt; Element as you can see in the attached demo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294096</commentid>
    <comment_count>1</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-10-14 07:18:33 -0700</bug_when>
    <thetext>From SVGStyledElement::title() in WebCore/svg/SVGStyledElement.cpp:
// According to spec, we should not return titles when hovering over &lt;svg&gt; elements (those 
// &lt;title&gt; elements are the title of the document, not a tooltip) so we instantly return.
if (hasTagName(SVGNames::svgTag))
    return String();</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294112</commentid>
    <comment_count>2</comment_count>
    <who name="Holger Jeromin">bugzillawebkit</who>
    <bug_when>2010-10-14 07:56:03 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; From SVGStyledElement::title() in WebCore/svg/SVGStyledElement.cpp:
&gt; // According to spec, we should not return titles when hovering over &lt;svg&gt; elements (those 
&gt; // &lt;title&gt; elements are the title of the document, not a tooltip) so we instantly return.
&gt; if (hasTagName(SVGNames::svgTag))
&gt;     return String();

I see. 

I have not found this spec, but the title could not be the title of the document, if they are nested. The SVG Spec only references to the &quot;outermost svg element&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294602</commentid>
    <comment_count>3</comment_count>
      <attachid>70836</attachid>
    <who name="Holger Jeromin">bugzillawebkit</who>
    <bug_when>2010-10-14 23:43:25 -0700</bug_when>
    <thetext>Created attachment 70836
SVG Demo for a title in root svg, svg and g element</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294604</commentid>
    <comment_count>4</comment_count>
    <who name="Holger Jeromin">bugzillawebkit</who>
    <bug_when>2010-10-14 23:46:19 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; From SVGStyledElement::title() in WebCore/svg/SVGStyledElement.cpp:
&gt; &gt; // According to spec, we should not return titles when hovering over &lt;svg&gt; elements (those 
&gt; &gt; // &lt;title&gt; elements are the title of the document, not a tooltip) so we instantly return.
&gt; &gt; if (hasTagName(SVGNames::svgTag))
&gt; &gt;     return String();
&gt; 
&gt; I see. 
&gt; 
&gt; I have not found this spec, but the title could not be the title of the document, if they are nested. The SVG Spec only references to the &quot;outermost svg element&quot;.

Firefox 4 shows the tooltip on svg-elements, but not on the outmost svg  https://bugzilla.mozilla.org/show_bug.cgi?id=547854 

Uploaded a new testcase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295141</commentid>
    <comment_count>5</comment_count>
      <attachid>70957</attachid>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2010-10-16 09:14:17 -0700</bug_when>
    <thetext>Created attachment 70957
Trivial patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295142</commentid>
    <comment_count>6</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2010-10-16 09:15:59 -0700</bug_when>
    <thetext>I uploaded a trivial patch to provide behaviour such as FireFox 4. I waited with the testcase implementation(which should be easy by just checking the title attribute) because for instance
Opera does not give a tooltip for svg elements either.
Cheers,

Rob.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295144</commentid>
    <comment_count>7</comment_count>
      <attachid>70957</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-10-16 09:20:36 -0700</bug_when>
    <thetext>Comment on attachment 70957
Trivial patch

View in context: https://bugs.webkit.org/attachment.cgi?id=70957&amp;action=review

&gt; WebCore/svg/SVGStyledElement.cpp:72
&gt; +        SVGSVGElement* svg = static_cast&lt;SVGSVGElement*&gt;(const_cast&lt;SVGStyledElement*&gt;(this));

Would read better like this IMO:
const SVGSVGElement* svg = static_cast&lt;const SVGSVGElement*&gt;(this);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>299330</commentid>
    <comment_count>8</comment_count>
    <who name="Holger Jeromin">bugzillawebkit</who>
    <bug_when>2010-10-26 01:01:33 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; I uploaded a trivial patch to provide behaviour such as FireFox 4. I waited with the testcase implementation(which should be easy by just checking the title attribute) because for instance

Thanks.
It would be very nice, if this changes would land in the webkit source.

&gt; Opera does not give a tooltip for svg elements either.

I filed a bug in the opera bug wizard (DSK-316141) as well as in Microsoft Connect 
https://connect.microsoft.com/IE/feedback/details/614675/title-element-has-no-tooltip-on-svg-elements

Perhaps it is too late for IE9 since MS marked the beta as feature complete.
Holger</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>299729</commentid>
    <comment_count>9</comment_count>
      <attachid>70957</attachid>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2010-10-26 12:47:45 -0700</bug_when>
    <thetext>Comment on attachment 70957
Trivial patch

Looks fine, r=me but Andreas suggestion is correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307543</commentid>
    <comment_count>10</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-11-10 14:13:33 -0800</bug_when>
    <thetext>Attachment 70957 was posted by a committer and has review+, assigning to Rob Buis for commit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307736</commentid>
    <comment_count>11</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2010-11-10 23:06:38 -0800</bug_when>
    <thetext>Hi Eric,

(In reply to comment #10)
&gt; Attachment 70957 [details] was posted by a committer and has review+, assigning to Rob Buis for commit.

This was landed in r70617, I guess I forgot to close, doing that now :)
Cheers,

Rob.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>70736</attachid>
            <date>2010-10-14 07:02:32 -0700</date>
            <delta_ts>2010-10-14 07:02:32 -0700</delta_ts>
            <desc>SVG Demo for a title in svg and g element</desc>
            <filename>webkit_svgtitle_bug.svg</filename>
            <type>image/svg+xml</type>
            <size>524</size>
            <attacher name="Holger Jeromin">bugzillawebkit</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPHN2ZyB3aWR0aD0iNjAwIiBo
ZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCgk8ZyB3aWR0
aD0iMTgwIj4NCgkJPHRpdGxlPg0KCQkJVGl0bGUgb2YgdGhlIFNWRyBnIGVsZW1lbnQuDQoJCTwv
dGl0bGU+DQoJCTxyZWN0IHg9IjEwIiB5PSIxMCIgd2lkdGg9IjE1MCIgaGVpZ2h0PSI1MCIgc3R5
bGU9ImZpbGw6cmVkOyBzdHJva2U6Ymx1ZTsiLz4NCgkJPHRleHQgeD0iMjAiIHk9IjQwIj5HLUVs
ZW1lbnQ8L3RleHQ+DQoJPC9nPg0KCTxzdmcgeD0iMjAwIiB3aWR0aD0iMTgwIj4NCgkJPHRpdGxl
Pg0KCQkJVGl0bGUgb2YgdGhlIFNWRyBlbGVtZW50Lg0KCQk8L3RpdGxlPg0KCQk8cmVjdCB4PSIx
MCIgeT0iMTAiIHdpZHRoPSIxNTAiIGhlaWdodD0iNTAiIHN0eWxlPSJmaWxsOnJlZDsgc3Ryb2tl
OmJsdWU7Ii8+DQoJCTx0ZXh0IHg9IjIwIiB5PSI0MCI+U1ZHLUVsZW1lbnQ8L3RleHQ+DQoJPC9z
dmc+DQo8L3N2Zz4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>70836</attachid>
            <date>2010-10-14 23:43:25 -0700</date>
            <delta_ts>2010-10-14 23:43:25 -0700</delta_ts>
            <desc>SVG Demo for a title in root svg, svg and g element</desc>
            <filename>webkit_svgtitle_bug.svg</filename>
            <type>image/svg+xml</type>
            <size>728</size>
            <attacher name="Holger Jeromin">bugzillawebkit</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2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="0"
          >
            <attachid>70957</attachid>
            <date>2010-10-16 09:14:17 -0700</date>
            <delta_ts>2010-10-26 12:47:45 -0700</delta_ts>
            <desc>Trivial patch</desc>
            <filename>bug-47669-20101016181854.patch</filename>
            <type>text/plain</type>
            <size>1765</size>
            <attacher name="Rob Buis">rwlbuis</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
YjM1Yzg1NmI4ZDc4MTlhZjhhMjEzMzZjMWNhNjJmNTI1MDQyNGU5Zi4uNmI2YTQ5Mjc0NGJlNjcx
NmZkOTBjOWZkZWYzNDgyZmU5Y2I1M2FmNyAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cK
KysrIGIvV2ViQ29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNyBAQAorMjAxMC0xMC0xNiAgUm9i
IEJ1aXMgIDxyd2xidWlzQGdtYWlsLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkg
KE9PUFMhKS4KKworICAgICAgICBUaXRsZS1FbGVtZW50IGhhcyBubyBwb3B1cCBvbiA8c3ZnPi1F
bGVtZW50cywgYnV0IG9uIDxnPgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93
X2J1Zy5jZ2k/aWQ9NDc2NjkKKworICAgICAgICBBbGxvdyB0b29sdGlwcyBvbiBub24tcm9vdCBz
dmcgZWxlbWVudHMuCisKKyAgICAgICAgTm8gbmV3IHRlc3RzLiAoT09QUyEpCisKKyAgICAgICAg
KiBzdmcvU1ZHU3R5bGVkRWxlbWVudC5jcHA6CisgICAgICAgIChXZWJDb3JlOjpTVkdTdHlsZWRF
bGVtZW50Ojp0aXRsZSk6CisKIDIwMTAtMTAtMTUgIFJ5b3N1a2UgTml3YSAgPHJuaXdhQHdlYmtp
dC5vcmc+CiAKICAgICAgICAgUmV2aWV3Z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sKKyAgICAgICAgU1ZHU1ZHRWxlbWVudCogc3ZnID0gc3RhdGljX2Nhc3Q8U1ZHU1ZHRWxlbWVu
dCo+KGNvbnN0X2Nhc3Q8U1ZHU3R5bGVkRWxlbWVudCo+KHRoaXMpKTsKKyAgICAgICAgaWYgKHN2
Zy0+aXNPdXRlcm1vc3RTVkcoKSkKKyAgICAgICAgICAgIHJldHVybiBTdHJpbmcoKTsKKyAgICB9
CiAgICAgCiAgICAgLy8gV2FsayB1cCB0aGUgdHJlZSwgdG8gZmluZCBvdXQgd2hldGhlciB3ZSdy
ZSBpbnNpZGUgYSA8dXNlPiBzaGFkb3cgdHJlZSwgdG8gZmluZCB0aGUgcmlnaHQgdGl0bGUuCiAg
ICAgTm9kZSogcGFyZW50ID0gY29uc3RfY2FzdDxTVkdTdHlsZWRFbGVtZW50Kj4odGhpcyk7Cg==
</data>
<flag name="review"
          id="60891"
          type_id="1"
          status="+"
          setter="zimmermann"
    />
          </attachment>
      

    </bug>

</bugzilla>