Title: [89176] trunk/LayoutTests
Revision
89176
Author
commit-qu...@webkit.org
Date
2011-06-17 15:18:10 -0700 (Fri, 17 Jun 2011)

Log Message

2011-06-17  David Grogan  <dgro...@chromium.org>

        Reviewed by Eric Seidel.

        layout test for misalignment caused by float->int rounding error
        https://bugs.webkit.org/show_bug.cgi?id=61906

        Just the layout test demonstrating the problem.  It will be a while
        until I have cycles to play around with the fix started in
        https://bugs.webkit.org/show_bug.cgi?id=22759.  And it'd be nice to
        know if this were fixed for free via the ongoing systemic int->float
        refactoring.

        * css1/units/rounding-expected.txt: Added.
        * css1/units/rounding.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89175 => 89176)


--- trunk/LayoutTests/ChangeLog	2011-06-17 21:56:38 UTC (rev 89175)
+++ trunk/LayoutTests/ChangeLog	2011-06-17 22:18:10 UTC (rev 89176)
@@ -1,3 +1,19 @@
+2011-06-17  David Grogan  <dgro...@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        layout test for misalignment caused by float->int rounding error
+        https://bugs.webkit.org/show_bug.cgi?id=61906
+
+        Just the layout test demonstrating the problem.  It will be a while
+        until I have cycles to play around with the fix started in
+        https://bugs.webkit.org/show_bug.cgi?id=22759.  And it'd be nice to
+        know if this were fixed for free via the ongoing systemic int->float
+        refactoring.
+
+        * css1/units/rounding-expected.txt: Added.
+        * css1/units/rounding.html: Added.
+
 2011-06-17  Stephen White  <senorbla...@chromium.org>
 
         Unreviewed.

Added: trunk/LayoutTests/css1/units/rounding-expected.txt (0 => 89176)


--- trunk/LayoutTests/css1/units/rounding-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/css1/units/rounding-expected.txt	2011-06-17 22:18:10 UTC (rev 89176)
@@ -0,0 +1,12 @@
+no gap below
+no gap above
+This test checks that floating point rounding doesn't cause misalignment. There should be no gap between the divs.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+FAIL divtop.bottom should be 31. Was 29.
+PASS divbottom.top is 31
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/css1/units/rounding.html (0 => 89176)


--- trunk/LayoutTests/css1/units/rounding.html	                        (rev 0)
+++ trunk/LayoutTests/css1/units/rounding.html	2011-06-17 22:18:10 UTC (rev 89176)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<link rel="stylesheet" href=""
+<style type="text/css">
+    body, div {
+        margin: 0;
+        padding: 0;
+        border: 0;
+    }
+    #top, #bottom {
+        line-height: 1.5;
+        font-size: 70%;
+        background:green;
+        color:white;
+        width:100%;
+    }
+    #top {
+        padding:.6em 0 .7em;
+    }
+    #bottom {
+      position:absolute;
+      top:2.8em;
+    }
+</style>
+</head>
+<body>
+
+<div id="top">no gap below</div>
+<div id="bottom">no gap above</div>
+
+<div id="description"></div>
+<div id="console"></div>
+<script src=""
+<script>
+
+description("This test checks that floating point rounding doesn't cause misalignment.  There should be no gap between the divs.");
+
+var divtop = document.getElementById("top").getBoundingClientRect();
+var divbottom = document.getElementById("bottom").getBoundingClientRect();
+shouldBe('divtop.bottom', '31');
+shouldBe('divbottom.top', '31');
+
+successfullyParsed = true;
+</script>
+
+<script src=""
+
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to