Bug 64833 - Bring Int/Float graphics classes closer to parity
Summary: Bring Int/Float graphics classes closer to parity
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Levi Weintraub
Depends on:
Blocks: 63567
  Show dependency treegraph
Reported: 2011-07-19 15:50 PDT by Levi Weintraub
Modified: 2011-07-20 16:18 PDT (History)
4 users (show)

See Also:

Patch (23.28 KB, patch)
2011-07-19 16:09 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Weintraub 2011-07-19 15:50:35 PDT
There are still some inconsistencies between IntPoint/FloatPoint, RoundedRect using floats, etc.
Comment 1 Simon Fraser (smfr) 2011-07-19 15:58:08 PDT
Why don't we use template classes for Point/Rect/Size?
Comment 2 Levi Weintraub 2011-07-19 16:04:29 PDT
For one, there are various overloads and implicit conversions that make sense to do from int->float but not the other way around. Functions like isZero would also need specialization for floats.
Comment 3 Levi Weintraub 2011-07-19 16:09:36 PDT
Created attachment 101405 [details]
Comment 4 James Robinson 2011-07-20 13:51:26 PDT
Comment on attachment 101405 [details]

I think this is good.  It might be worth investigating sharing more code between IntPoint/FloatPoint, but at a glance it doesn't seem trivial.  We could handle a lot of cases with partial specialization.
Comment 5 Levi Weintraub 2011-07-20 14:56:30 PDT
Comment on attachment 101405 [details]

Thanks for the review!
Comment 6 WebKit Review Bot 2011-07-20 16:18:41 PDT
Comment on attachment 101405 [details]

Clearing flags on attachment: 101405

Committed r91417: <http://trac.webkit.org/changeset/91417>
Comment 7 WebKit Review Bot 2011-07-20 16:18:46 PDT
All reviewed patches have been landed.  Closing bug.