Index: LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html |
diff --git a/LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html b/LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html |
index bb56e0aaf162ff2450add55e8ec5dfeccf47e7ec..b6601cdb1687275dbed73a512d074c65db9b641e 100644 |
--- a/LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html |
+++ b/LayoutTests/fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html |
@@ -53,6 +53,7 @@ |
<span id="s1">X</span></br><span id="s2">X</span><br/><span id="s3">X</span> |
</div> |
</div> |
+<div id="console"></div> |
</body> |
<script> |
function elementRect(elementId) |
@@ -68,22 +69,23 @@ function elementRect(elementId) |
function marginEllipseRightXIntercept(y, cx, rx, ry) |
{ |
var containerWidth = document.getElementById("container").getBoundingClientRect().width; |
- return String( SubPixelLayout.roundLineRight(containerWidth - (cx + rx * Math.sqrt(1 - Math.pow((ry - y) / ry, 2)))) ); |
+ var f = SubPixelLayout.snapToLayoutUnit(containerWidth - (cx + rx * Math.sqrt(1 - Math.pow((ry - y) / ry, 2)))); |
+ return String( Math.floor(f) ); |
} |
// In the ".right" tests below, it's the lower edge of the 20px Ahem glyph that that defines the element rect's left edge. |
// That's why the Y coordinate in each of those tests is 20 greater than the ".top" test. |
-SubPixelLayout.initSubPixelLayout(); |
+var quiet = true; // PASS output depends on SubPixelLayout.isEnabled() |
shouldBe("elementRect('s1').top", "0"); |
-shouldBe("elementRect('s1').right", marginEllipseRightXIntercept(20, 225, 225, 125)); |
+shouldBe("elementRect('s1').right", marginEllipseRightXIntercept(20, 225, 225, 125), quiet); |
shouldBe("elementRect('s2').top", "20"); |
-shouldBe("elementRect('s2').right", marginEllipseRightXIntercept(40, 225, 225, 125)); |
+shouldBe("elementRect('s2').right", marginEllipseRightXIntercept(40, 225, 225, 125), quiet); |
shouldBe("elementRect('s3').top", "40"); |
-shouldBe("elementRect('s3').right", marginEllipseRightXIntercept(60, 225, 225, 125)); |
+shouldBe("elementRect('s3').right", marginEllipseRightXIntercept(60, 225, 225, 125), quiet); |
</script> |
</html> |