[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
tonikitoo at webkit.org
tonikitoo at webkit.org
Wed Mar 17 17:59:08 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 9b7349d05e2fa9266d41c967f2425564a4292119
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Feb 25 11:48:30 2010 +0000
Add a convenient center() method to IntRect
https://bugs.webkit.org/show_bug.cgi?id=35346
Reviewed by Simon Fraser.
Patch by Antonio Gomes <tonikitoo at webkit.org>
As it is a convenience method, and implemention is
based on FloatRect's one, patch does not provide a
layout test.
* platform/graphics/IntRect.h:
(WebCore::IntRect::center):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index aeae057..848bcbe 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-02-24 Antonio Gomes <tonikitoo at webkit.org>
+
+ Reviewed by Simon Fraser.
+ Patch by Antonio Gomes <tonikitoo at webkit.org>
+
+ Add a convenient center() method to IntRect
+ https://bugs.webkit.org/show_bug.cgi?id=35346
+
+ As it is a convenience method, and implemention is
+ based on FloatRect's one, patch does not provide a
+ layout test.
+
+ * platform/graphics/IntRect.h:
+ (WebCore::IntRect::center):
+
2010-02-25 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/graphics/IntRect.h b/WebCore/platform/graphics/IntRect.h
index e3633df..514d161 100644
--- a/WebCore/platform/graphics/IntRect.h
+++ b/WebCore/platform/graphics/IntRect.h
@@ -105,6 +105,10 @@ public:
int right() const { return x() + width(); }
int bottom() const { return y() + height(); }
+ // NOTE: The result is rounded to integer values, and thus may be not the exact
+ // center point.
+ IntPoint center() const { return IntPoint(x() + width() / 2, y() + height() / 2); }
+
void move(const IntSize& s) { m_location += s; }
void move(int dx, int dy) { m_location.move(dx, dy); }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list