OLD | NEW |
(Empty) | |
| 1 <svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="h
ttp://www.w3.org/2000/svg"> |
| 2 <script src="../../resources/ahem.js"></script> |
| 3 <text id="text" x="10" y="1em">AAA <tspan id="tspan">BBB</tspan> CCC</text> |
| 4 <defs> |
| 5 <style type="text/css"> |
| 6 <![CDATA[ |
| 7 text { |
| 8 font-family: Ahem; |
| 9 font-size: 40px; |
| 10 } |
| 11 ]]> |
| 12 </style> |
| 13 <script type="text/javascript"> |
| 14 <![CDATA[ |
| 15 function runTest() { |
| 16 if (window.testRunner) |
| 17 testRunner.dumpAsText(); |
| 18 |
| 19 // (15,15) is within an 'A' glyph cell of #text. |
| 20 // (110,15) is within a 'B' glyph cell of #tspan. |
| 21 var text = document.getElementById("text"); |
| 22 if (document.elementFromPoint(15, 15) === text && document.eleme
ntFromPoint(110, 15) === document.getElementById("tspan")) |
| 23 text.textContent = "PASS"; |
| 24 else |
| 25 text.textContent = "FAIL"; |
| 26 } |
| 27 ]]> |
| 28 </script> |
| 29 </defs> |
| 30 </svg> |
OLD | NEW |