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.
Created attachment 95653 [details] Patch
(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...
(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 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.
:)
(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 on attachment 95653 [details] Patch Clearing flags on attachment: 95653 Committed r87878: <http://trac.webkit.org/changeset/87878>
All reviewed patches have been landed. Closing bug.