Bug 61876

Summary: Add IntPoint + IntPoint operator
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, darin, eae, eric, mjs, morrita, simon.fraser, vivekjkumar266
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60318    
Attachments:
Description Flags
Patch none

Levi Weintraub
Reported 2011-06-01 12:03:00 PDT
There are a lot of places where it'd be really handy to add two IntPoints together to return an IntPoint, particularly as part of our move away from tx/ty int offsets.
Attachments
Patch (2.16 KB, patch)
2011-06-01 13:49 PDT, Levi Weintraub
no flags
Levi Weintraub
Comment 1 2011-06-01 13:49:24 PDT
Hajime Morrita
Comment 2 2011-06-01 18:43:00 PDT
(In reply to comment #1) > Created an attachment (id=95653) [details] > Patch Someone might say that adding two points doesn't make sense. In that case, another idea is to provide IntSize IntPoint::toSize(). There is no big difference though - it's a matter of preference...
Emil A Eklund
Comment 3 2011-06-01 18:48:15 PDT
(In reply to comment #2) > Someone might say that adding two points doesn't make sense. > In that case, another idea is to provide IntSize IntPoint::toSize(). > There is no big difference though - it's a matter of preference... Strictly logically speaking you're right and this isn't ideal. Given that we use IntPoint as an offset in quite a few places though it would be very convenient to allow IntPoint + IntPoint. We already have a IntSize toSize(IntPoint) method but it adds extra overhead as it has to create a copy.
Hajime Morrita
Comment 4 2011-06-01 18:51:42 PDT
Comment on attachment 95653 [details] Patch Yeah, my last comment is as a logical troll ;-) I agree that this change is convenient and has no harm.
Emil A Eklund
Comment 5 2011-06-01 18:52:27 PDT
:)
Levi Weintraub
Comment 6 2011-06-01 19:43:54 PDT
(In reply to comment #4) > (From update of attachment 95653 [details]) > Yeah, my last comment is as a logical troll ;-) > I agree that this change is convenient and has no harm. Thanks for the review :)
WebKit Commit Bot
Comment 7 2011-06-01 21:51:21 PDT
Comment on attachment 95653 [details] Patch Clearing flags on attachment: 95653 Committed r87878: <http://trac.webkit.org/changeset/87878>
WebKit Commit Bot
Comment 8 2011-06-01 21:51:26 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.