| <!DOCTYPE html> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <svg height="0" font-size="100"> |
| <svg id="container1"> |
| <rect x="200" y="300" width="100" height="400"/> |
| <g id="container2"> |
| <text transform="translate(1000, 1000)"></text> |
| </g> |
| <text> </text> |
| </svg> |
| </svg> |
| <script> |
| test(function() { |
| var bbox = document.querySelector('#container1').getBBox(); |
| assert_array_equals([bbox.x, bbox.y, bbox.width, bbox.height], [200, 300, 100, 400]); |
| var bbox = document.querySelector('#container2').getBBox(); |
| assert_array_equals([bbox.x, bbox.y, bbox.width, bbox.height], [0, 0, 0, 0]); |
| }, 'Empty <text> does not contribute to ancestor bounding boxes.'); |
| </script> |