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