FloatRect has the same and according to https://bugs.webkit.org/show_bug.cgi?id=18662#c63 that is something acceptable. "to make this code more readable. You could also add IntPoint IntRect::center() const if you like (FloatRect has one)." patch coming.
Created attachment 49399 [details] patch 0.1
Comment on attachment 49399 [details] patch 0.1 r=me, but perhaps note in a comment that the center point suffers from rounding.
simon, would + // NOTE: The result is rounded to integer values, and thus can be not the exact + // center point. + IntPoint center() const { return IntPoint(x() + width() / 2, y() + height() / 2); } be ok ?
I'd change: "can be not the exact center point" to "may not be the exact center point".
(In reply to comment #4) > I'd change: "can be not the exact center point" to "may not be the exact center > point". landed in r55228 thx simon and kenneth