Changeset 121709 in webkit


Ignore:
Timestamp:
Jul 2, 2012 3:41:33 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Behdad Esfahbod <behdad@behdad.org> 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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121708 r121709  
     12012-07-02  Behdad Esfahbod  <behdad@behdad.org>
     2
     3        LayoutUnit::epsilon() is wrong
     4        https://bugs.webkit.org/show_bug.cgi?id=90083
     5
     6        Reviewed by Eric Seidel.
     7
     8        Do division in floats, not integers.
     9
     10        No new tests. No code using the affected function.
     11
     12        * platform/FractionalLayoutUnit.h:
     13        (WebCore::FractionalLayoutUnit::epsilon):
     14
    1152012-07-02  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebCore/platform/FractionalLayoutUnit.h

    r119456 r121709  
    154154    }
    155155
    156     static float epsilon() { return 1 / kFixedPointDenominator; }
     156    static float epsilon() { return 1.0f / kFixedPointDenominator; }
    157157    static const FractionalLayoutUnit max()
    158158    {
Note: See TracChangeset for help on using the changeset viewer.