blob: 8b0fe0c231efa50625ea828e9c189bd14f5ffec5 [file] [log] [blame]
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="200" height="400"
id="main_svg">
<!--
REGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
https://bugs.webkit.org/show_bug.cgi?id=139690.
This SVG is included in the test svg-embedded-tooltip.html in an <embed> element.
The goal is to test the elements' titles of an embedded SVG.
-->
<!-- This is the tooltip of the rootmost SVG element when the SVG is embedded in an HTML -->
<title>outermost svg</title>
<defs>
<g id="shape">
<rect width="100" height="100" fill="yellow"/>
<circle cx="10" cy="10" r="10" fill="red">
<title>def small circle!</title>
</circle>
<circle cx="80" cy="80" r="20" fill="red">
<title>def big circle!</title>
</circle>
<g>
<rect x="20" y="20" width="40" height="40" fill="lime"/>
<circle cx="40" cy="40" r="10" fill="red">
<title>nested circle!</title>
</circle>
</g>
<title>def g element!</title>
</g>
</defs>
<g id="main_g">
<rect id="yellow_rect" width="100" height="100" fill="yellow"/>
<circle id="small_circle" cx="10" cy="10" r="10" fill="red">
<title>small circle!</title>
</circle>
<circle id="big_circle" cx="80" cy="80" r="20" fill="red">
<title>big circle!</title>
</circle>
<g id="sub_g">
<rect id="lime_rect" x="20" y="20" width="40" height="40" fill="lime"/>
<circle id="nested_circle" cx="40" cy="40" r="10" fill="red">
<title>nested circle!</title>
</circle>
</g>
<title>main g element</title>
</g>
<!-- <use> element should return the first <title> element child if it exists -->
<use id="use_with_title" xlink:href="#shape" x="0" y="120">
<title>use element!</title>
</use>
<use id="use_without_title" xlink:href="#shape" x="0" y="240"/>
</svg>