Bug 66148 - Replace == comparison with epsilon aware roughlyEquals for LayoutUnits
Summary: Replace == comparison with epsilon aware roughlyEquals for LayoutUnits
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 63656
  Show dependency treegraph
 
Reported: 2011-08-12 11:01 PDT by Emil A Eklund
Modified: 2011-11-01 17:04 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emil A Eklund 2011-08-12 11:01:13 PDT
Once we move to float we can no longer safely use == to compare two LayoutUnits.
Comment 1 Alexey Proskuryakov 2011-08-12 21:10:51 PDT
So, are we decided that we move to floats, not to fixed precision numbers?

Rough equality has a number of highly undesirable features - it's not transitive, it breaks with zoom etc.
Comment 2 Emil A Eklund 2011-08-15 10:22:02 PDT
No firm decision yet, we have a prototype running on trunk that we are running a set of tests against to see if it's feasible to use floats throughout and help us discover problems.

We're currently leaning towards using floats as both javascript and the graphics sub system operates on floating point but we'll revisit this before committing to go down that path.

This bug is for tracking places where we might need to change how we do comparisons if we decide to go with floats.
Comment 3 Emil A Eklund 2011-11-01 17:04:47 PDT
No longer applicable as we decided to go with fixed point.