OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <svg height="0" font-size="100"> |
| 5 <svg id="container1"> |
| 6 <rect x="200" y="300" width="100" height="400"/> |
| 7 <g id="container2"> |
| 8 <text transform="translate(1000, 1000)"></text> |
| 9 </g> |
| 10 <text> </text> |
| 11 </svg> |
| 12 </svg> |
| 13 <script> |
| 14 test(function() { |
| 15 var bbox = document.querySelector('#container1').getBBox(); |
| 16 assert_array_equals([bbox.x, bbox.y, bbox.width, bbox.height], [200, 300, 100,
400]); |
| 17 var bbox = document.querySelector('#container2').getBBox(); |
| 18 assert_array_equals([bbox.x, bbox.y, bbox.width, bbox.height], [0, 0, 0, 0]); |
| 19 }, 'Empty <text> does not contribute to ancestor bounding boxes.'); |
| 20 </script> |
OLD | NEW |