| Index: LayoutTests/svg/custom/getBBox-rect-has-one-zero-value.html
|
| diff --git a/LayoutTests/svg/custom/getBBox-rect-has-one-zero-value.html b/LayoutTests/svg/custom/getBBox-rect-has-one-zero-value.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6ed9cf58f408d4a617b6701057c5b8516bfceb5b
|
| --- /dev/null
|
| +++ b/LayoutTests/svg/custom/getBBox-rect-has-one-zero-value.html
|
| @@ -0,0 +1,41 @@
|
| +<!DOCTYPE HTML>
|
| +<html>
|
| +<!-- Test that svg bounding boxes are valid for a zero-width or zero-height rect -->
|
| + <head>
|
| + <script type="text/javascript">
|
| + function checkBoundingBoxHasZeroValue() {
|
| + if (window.testRunner)
|
| + window.testRunner.dumpAsText();
|
| + var rectBox1 = document.getElementById('rect1').getBBox();
|
| + var rectBox2 = document.getElementById('rect2').getBBox();
|
| + var rectBox3 = document.getElementById('rect3').getBBox();
|
| + var rectBox4 = document.getElementById('rect4').getBBox();
|
| + var results = "FAIL";
|
| + if (rectBox1.height == 100 && rectBox1.width == 0 &&
|
| + rectBox2.height == 0 && rectBox2.width == 100 &&
|
| + rectBox3.height == 100 && rectBox3.width == 0 &&
|
| + rectBox4.height == 0 && rectBox4.width == 100)
|
| + results = "PASS";
|
| + document.body.innerHTML = results + ", bounding box sizes are (" +
|
| + rectBox1.width + ", " + rectBox1.height + "), (" +
|
| + rectBox2.width + ", " + rectBox2.height + "), (" +
|
| + rectBox3.width + ", " + rectBox3.height + ") and (" +
|
| + rectBox4.width + ", " + rectBox4.height + ")";
|
| + }
|
| + </script>
|
| + </head>
|
| + <body onload="checkBoundingBoxHasZeroValue()">
|
| + <svg>
|
| + <rect id="rect1" height="100" width="0"/>
|
| + </svg>
|
| + <svg>
|
| + <rect id="rect2" height="0" width="100"/>
|
| + </svg>
|
| + <svg>
|
| + <rect id="rect3" vector-effect="non-scaling-stroke" height="100" width="0"/>
|
| + </svg>
|
| + <svg>
|
| + <rect id="rect4" vector-effect="non-scaling-stroke" height="0" width="100"/>
|
| + </svg>
|
| + <body>
|
| +</html>
|
|
|