OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <!-- Test that svg bounding boxes are valid for a zero-width or zero-height elli
pse --> |
| 4 <head> |
| 5 <script type="text/javascript"> |
| 6 function checkBoundingBoxHasZeroValue() { |
| 7 if (window.testRunner) |
| 8 window.testRunner.dumpAsText(); |
| 9 var ellipse1 = document.getElementById('ellipse1').getBBox(); |
| 10 var ellipse2 = document.getElementById('ellipse2').getBBox(); |
| 11 var ellipse3 = document.getElementById('ellipse3').getBBox(); |
| 12 var ellipse4 = document.getElementById('ellipse4').getBBox(); |
| 13 var results = "FAIL"; |
| 14 if (ellipse1.height == 100 && |
| 15 ellipse1.width == 0 && |
| 16 ellipse2.height == 0 && |
| 17 ellipse2.width == 100 && |
| 18 ellipse3.height == 100 && |
| 19 ellipse3.width == 0 && |
| 20 ellipse4.height == 0 && |
| 21 ellipse4.width == 100) |
| 22 results = "PASS"; |
| 23 document.body.innerHTML = results + ", bounding boxes sizes are
(" + |
| 24 ellipse1.width + ", " + ellipse1.height + "), (" + |
| 25 ellipse2.width + ", " + ellipse2.height + "), (" + |
| 26 ellipse3.width + ", " + ellipse3.height + ") and (" + |
| 27 ellipse4.width + ", " + ellipse4.height + ")"; |
| 28 } |
| 29 </script> |
| 30 </head> |
| 31 <body onload="checkBoundingBoxHasZeroValue()"> |
| 32 <svg> |
| 33 <ellipse id="ellipse1" cx="50" cy="100" rx="0" ry="50"/> |
| 34 <ellipse id="ellipse2" cx="50" cy="100" rx="50" ry="0"/> |
| 35 <ellipse id="ellipse3" vector-effect="non-scaling-stroke" cx="50" cy
="100" rx="0" ry="50"/> |
| 36 <ellipse id="ellipse4" vector-effect="non-scaling-stroke" cx="50" cy
="100" rx="50" ry="0"/> |
| 37 </svg> |
| 38 <body> |
| 39 </html> |
OLD | NEW |