[Webkit-unassigned] [Bug 16854] display title in tooltip onmouseover in SVG
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 13 22:13:25 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=16854
--- Comment #6 from Jeff Schiller <codedread at gmail.com> 2010-04-13 22:13:25 PST ---
Ok, I have a patch for this. Let me put together the story for tooltips in
SVG:
* if user hovers over a linked element that has a xlink:title, the
xlink:title becomes the tooltip
* if not linked, then the element under the cursor (nearest enclosing DOM
node) is checked for a <title> element and that is used
* if no title is found, then go up to the parent and look for a title, etc
This is all taken care of by WebKit's HitTestResult and adding a title() method
to SVGStyledElement.
Special cases:
* if element is a <use>, then the use's title should be the tooltip. If the
<use> does not have a title, then look into the rendered shadow content
(referenced DOM) for the title as per above
I should note that for the case of a <symbol> being referenced by a <use>, the
<symbol> itself is not checked for a <title> element. This is because the
symbol is not rendered (unlike a <g>). To solve this in the weather symbol
file, I had to move wrap the contents of the <symbol> elements in a <g> and the
tooltips showed up. I'll also attached the modified weather file.
The patch which implements all of this but does not get one case in my test
file correct:
<defs>
<ellipse id="e1">
<title>FAIL</title>
</ellipse>
</defs>
<use xlink:href="#e1">
<title>PASS</title>
</use>
Interestingly, if the <use> references a <symbol> in the above case, the
tooltip displays properly. I'm still investigating this case but I think it
should be raised as a different bug.
Can someone review the patch? Can someone suggest how this can be tested?
Since it's driven by manual user interaction I'm not sure the best approach.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list