Changeset 55228 in webkit
- Timestamp:
- Feb 25, 2010 3:48:30 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55227 r55228 1 2010-02-24 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Simon Fraser. 4 Patch by Antonio Gomes <tonikitoo@webkit.org> 5 6 Add a convenient center() method to IntRect 7 https://bugs.webkit.org/show_bug.cgi?id=35346 8 9 As it is a convenience method, and implemention is 10 based on FloatRect's one, patch does not provide a 11 layout test. 12 13 * platform/graphics/IntRect.h: 14 (WebCore::IntRect::center): 15 1 16 2010-02-25 Andrey Kosyakov <caseq@chromium.org> 2 17 -
trunk/WebCore/platform/graphics/IntRect.h
r52791 r55228 106 106 int bottom() const { return y() + height(); } 107 107 108 // NOTE: The result is rounded to integer values, and thus may be not the exact 109 // center point. 110 IntPoint center() const { return IntPoint(x() + width() / 2, y() + height() / 2); } 111 108 112 void move(const IntSize& s) { m_location += s; } 109 113 void move(int dx, int dy) { m_location.move(dx, dy); }
Note: See TracChangeset
for help on using the changeset viewer.