Summary: | Add IntPoint + IntPoint operator | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Levi Weintraub <leviw> | ||||
Component: | Layout and Rendering | Assignee: | 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
Levi Weintraub
2011-06-01 12:03:00 PDT
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. |