Title: [121709] trunk/Source/WebCore
Revision
121709
Author
[email protected]
Date
2012-07-02 15:41:33 -0700 (Mon, 02 Jul 2012)

Log Message

LayoutUnit::epsilon() is wrong
https://bugs.webkit.org/show_bug.cgi?id=90083

Patch by Behdad Esfahbod <[email protected]> on 2012-07-02
Reviewed by Eric Seidel.

Do division in floats, not integers.

No new tests. No code using the affected function.

* platform/FractionalLayoutUnit.h:
(WebCore::FractionalLayoutUnit::epsilon):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121708 => 121709)


--- trunk/Source/WebCore/ChangeLog	2012-07-02 22:14:54 UTC (rev 121708)
+++ trunk/Source/WebCore/ChangeLog	2012-07-02 22:41:33 UTC (rev 121709)
@@ -1,3 +1,17 @@
+2012-07-02  Behdad Esfahbod  <[email protected]>
+
+        LayoutUnit::epsilon() is wrong
+        https://bugs.webkit.org/show_bug.cgi?id=90083
+
+        Reviewed by Eric Seidel.
+
+        Do division in floats, not integers.
+
+        No new tests. No code using the affected function.
+
+        * platform/FractionalLayoutUnit.h:
+        (WebCore::FractionalLayoutUnit::epsilon):
+
 2012-07-02  Tim Horton  <[email protected]>
 
         Compositing layer sync should cause deferred repaints to be fired immediately

Modified: trunk/Source/WebCore/platform/FractionalLayoutUnit.h (121708 => 121709)


--- trunk/Source/WebCore/platform/FractionalLayoutUnit.h	2012-07-02 22:14:54 UTC (rev 121708)
+++ trunk/Source/WebCore/platform/FractionalLayoutUnit.h	2012-07-02 22:41:33 UTC (rev 121709)
@@ -153,7 +153,7 @@
         return toInt();
     }
 
-    static float epsilon() { return 1 / kFixedPointDenominator; }
+    static float epsilon() { return 1.0f / kFixedPointDenominator; }
     static const FractionalLayoutUnit max()
     {
         FractionalLayoutUnit m;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to