Bug 90083 - LayoutUnit::epsilon() is wrong
Summary: LayoutUnit::epsilon() is wrong
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Behdad Esfahbod
Depends on:
Reported: 2012-06-27 10:45 PDT by Behdad Esfahbod
Modified: 2012-07-02 15:41 PDT (History)
3 users (show)

See Also:

Patch (1.37 KB, patch)
2012-06-27 13:16 PDT, Behdad Esfahbod
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Behdad Esfahbod 2012-06-27 10:45:19 PDT
In platform/FractionalLayoutUnit.h:

    static float epsilon() { return 1 / kFixedPointDenominator; } 

That division is done as integers.  So, if SUBPIXEL_LAYOUT is enabled, epsilon() always returns zero.
Comment 1 Behdad Esfahbod 2012-06-27 13:16:09 PDT
Created attachment 149788 [details]
Comment 2 Emil A Eklund 2012-06-27 13:49:07 PDT
Looks good to me. While I'd like to see a test for this I realize it isn't really feasible to add one given that the method isn't actually used anywhere yet.

Eric, could you use your magic reviewing powers on this one?
Comment 3 Eric Seidel (no email) 2012-07-02 14:50:09 PDT
Comment on attachment 149788 [details]

Happy to.
Comment 4 WebKit Review Bot 2012-07-02 15:41:49 PDT
Comment on attachment 149788 [details]

Clearing flags on attachment: 149788

Committed r121709: <http://trac.webkit.org/changeset/121709>
Comment 5 WebKit Review Bot 2012-07-02 15:41:55 PDT
All reviewed patches have been landed.  Closing bug.