|Summary:||Add IntPoint + IntPoint operator|
|Product:||WebKit||Reporter:||Levi Weintraub <leviw>|
|Component:||Layout and Rendering||Assignee:||Levi Weintraub <leviw>|
|Severity:||Normal||CC:||ap, commit-queue, darin, eae, eric, mjs, morrita, simon.fraser, vivekjkumar266|
|Version:||528+ (Nightly build)|
|Bug Depends on:|
Description Levi Weintraub 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.
Comment 2 Hajime Morrita 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...
Comment 3 Emil A Eklund 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.
Comment 4 Hajime Morrita 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.
Comment 5 Emil A Eklund 2011-06-01 18:52:27 PDT
Comment 6 Levi Weintraub 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 :)
Comment 7 WebKit Commit Bot 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>
Comment 8 WebKit Commit Bot 2011-06-01 21:51:26 PDT
All reviewed patches have been landed. Closing bug.