Bug 105992 - Use toSize() to convert from Int/FloatPoint to Int/FloatSize
Summary: Use toSize() to convert from Int/FloatPoint to Int/FloatSize
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Steve Block
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 20:55 PST by Steve Block
Modified: 2013-01-07 23:48 PST (History)
6 users (show)

See Also:


Attachments
Patch (7.52 KB, patch)
2013-01-02 20:58 PST, Steve Block
no flags Details | Formatted Diff | Diff
Patch (8.87 KB, patch)
2013-01-06 21:23 PST, Steve Block
no flags Details | Formatted Diff | Diff
Patch (8.89 KB, patch)
2013-01-07 22:01 PST, Steve Block
no flags Details | Formatted Diff | Diff
Patch (8.92 KB, patch)
2013-01-07 22:41 PST, Steve Block
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Block 2013-01-02 20:55:05 PST
Use toSize() to convert from Int/FloatPoint to Int/FloatSize
Comment 1 Steve Block 2013-01-02 20:58:00 PST
Created attachment 181142 [details]
Patch
Comment 2 Steve Block 2013-01-02 22:11:48 PST
Using toSize() seems easier to read than using operator- with a zero Int/FloatPoint.
Comment 3 Steve Block 2013-01-06 21:23:13 PST
Created attachment 181475 [details]
Patch
Comment 4 Kentaro Hara 2013-01-07 21:48:57 PST
Comment on attachment 181475 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181475&action=review

> Source/WebCore/platform/graphics/FloatPoint.h:266
> +inline FloatSize toSize(const FloatPoint& a)

Maybe toFloatSize() is a better name? Other method names around here clarify Int or Float.
Comment 5 Steve Block 2013-01-07 22:00:03 PST
Comment on attachment 181475 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181475&action=review

>> Source/WebCore/platform/graphics/FloatPoint.h:266
>> +inline FloatSize toSize(const FloatPoint& a)
> 
> Maybe toFloatSize() is a better name? Other method names around here clarify Int or Float.

Sure. I'll rename IntSize toSize(const IntPoint&) in a follow-up patch.
Comment 6 Kentaro Hara 2013-01-07 22:01:11 PST
Comment on attachment 181475 [details]
Patch

OK, please fix it in a follow-up patch.
Comment 7 Steve Block 2013-01-07 22:01:21 PST
Created attachment 181639 [details]
Patch
Comment 8 Steve Block 2013-01-07 22:41:42 PST
Created attachment 181647 [details]
Patch
Comment 9 Steve Block 2013-01-07 22:41:58 PST
rebased
Comment 10 WebKit Review Bot 2013-01-07 23:48:19 PST
Comment on attachment 181647 [details]
Patch

Clearing flags on attachment: 181647

Committed r139037: <http://trac.webkit.org/changeset/139037>
Comment 11 WebKit Review Bot 2013-01-07 23:48:23 PST
All reviewed patches have been landed.  Closing bug.