| Index: LayoutTests/fast/shapes/shape-inside/shape-inside-polygon-padding-003.html
|
| diff --git a/LayoutTests/fast/shapes/shape-inside/shape-inside-polygon-padding-003.html b/LayoutTests/fast/shapes/shape-inside/shape-inside-polygon-padding-003.html
|
| deleted file mode 100644
|
| index 5698acc6276d2519872a48fe8b6cea7eb72fcb8b..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/fast/shapes/shape-inside/shape-inside-polygon-padding-003.html
|
| +++ /dev/null
|
| @@ -1,85 +0,0 @@
|
| -<!DOCTYPE html>
|
| -<html>
|
| -<head>
|
| -<script src="../../../resources/js-test.js"></script>
|
| -<script src="../resources/subpixel-utils.js"></script>
|
| -<style>
|
| - #shape-inside {
|
| - position: relative;
|
| - margin: 0;
|
| - padding: 0;
|
| - width: 500px;
|
| - height: 500px;
|
| - shape-inside: polygon(0px 0px, 400px 0px, 400px 350px, 0px 350px, 200px 175px);
|
| - shape-padding: 50px;
|
| - font: 50px/1 Ahem, sans-serif;
|
| - color: green;
|
| - }
|
| -
|
| - #shape-outline {
|
| - position: absolute;
|
| - top: 0px;
|
| - left: 0px;
|
| - width: 500px;
|
| - height: 500px;
|
| - }
|
| -</style>
|
| -</head>
|
| -<body>
|
| - <div id="shape-inside">
|
| - <svg id="shape-outline" xmlns="http://www.w3.org/2000/svg">
|
| - <polygon points="0,0 400,0 400,350 0,350 200,175" stroke="blue" fill="none"/>
|
| - <!--
|
| - In the expressions below, a is the angle the upper reflex edge makes with the x axis:
|
| - a = Math.atan2(175, 200)
|
| -
|
| - The X coordinate of the first (and last) inner path vertex is:
|
| - x = 50 / Math.tan(a) + 50 / Math.sin(a);
|
| -
|
| - The X coordinates and y coordinate of the arc's endpoints are
|
| - x = 200 +/- 50 * Math.sin(a);
|
| - y = 175 + 50 * Math.sin(a);
|
| - -->
|
| - <path d="M 133.07 50 L 350 50 L 350 300 L 133.07 300 L 237.63 207.92 A 50 50 0 0 0 237.63 142.07 L 133.07 50" stroke="blue" fill="none"/>
|
| - </svg>
|
| - <span id="a">XXX</span><br/><br/><span id="b">XX</span><br/><br/><span id="c">XXX</span>
|
| - </div>
|
| - <div id="console"></div>
|
| -</body>
|
| -<script>
|
| - function shapeInsideRect(elementId)
|
| - {
|
| - var s = document.getElementById("shape-inside").getBoundingClientRect();
|
| - var r = document.getElementById(elementId).getBoundingClientRect();
|
| - return {left: r.left - s.left, top: r.top - s.top, width: r.width, height: r.height};
|
| - }
|
| -
|
| - /*
|
| - The left edge of span's 'a' and 'c' should begin at the padded (inset) edge that corresponds to
|
| - the shape-inside polygon edge which goes from 175,200 to 0,0. The expected value is 191.215, which is
|
| -
|
| - a = Math.atan2(175, 200)
|
| - left = 2 * 50 * (200 / 175) + (50 / Math.sin(a))
|
| -
|
| - The perpindicular distance between the polygon edge and the padded edge is 50 (the shape-padding value),
|
| - and a is the angle between the edges and the X axis, so 50/Math.sin(a), is the horizontal distance
|
| - between the polygon edge and its padded edge.
|
| -
|
| - */
|
| -
|
| - var quiet = true; // PASS output depends on SubPixelLayout.isEnabled()
|
| -
|
| - shouldBe("shapeInsideRect('a').top", "50");
|
| - shouldBeCloseTo("shapeInsideRect('a').left", SubPixelLayout.snapToLayoutUnit(190.215), 1, quiet);
|
| - shouldBe("shapeInsideRect('a').width", "150");
|
| -
|
| - shouldBe("shapeInsideRect('b').top", "150");
|
| - shouldBeCloseTo("shapeInsideRect('b').left", 250, 1)
|
| - shouldBe("shapeInsideRect('b').width", "100");
|
| -
|
| - shouldBe("shapeInsideRect('c').top", "250");
|
| - shouldBeCloseTo("shapeInsideRect('c').left", SubPixelLayout.snapToLayoutUnit(190.215), 1, quiet);
|
| - shouldBe("shapeInsideRect('c').width", "150");
|
| -</script>
|
| -</html>
|
| -
|
|
|