summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2011-06-27 21:51:10 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2011-06-27 21:51:10 (GMT)
commitcc7f93d1a8b6350c5e0ad5a58cf78d17a51201fa (patch)
tree36de473ddbd0cb424718540a230b98a1c25a1192 /src/3rdparty/webkit/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
parente1c651f1284f1041ba5e03246686018e363d0e44 (diff)
downloadQt-cc7f93d1a8b6350c5e0ad5a58cf78d17a51201fa.zip
Qt-cc7f93d1a8b6350c5e0ad5a58cf78d17a51201fa.tar.gz
Qt-cc7f93d1a8b6350c5e0ad5a58cf78d17a51201fa.tar.bz2
Updated WebKit to d30a30ac4faadcb8b2e282e343c921f919fbca9b
Beta1 of QtWebkit 2.2. Reviewed-by: Andreas Kling
Diffstat (limited to 'src/3rdparty/webkit/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp')
-rw-r--r--src/3rdparty/webkit/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp b/src/3rdparty/webkit/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
index 985827a..c10939c 100644
--- a/src/3rdparty/webkit/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
+++ b/src/3rdparty/webkit/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
@@ -42,6 +42,12 @@ namespace WebKit {
static const int defaultTileWidth = 1024;
static const int defaultTileHeight = 1024;
+static IntPoint innerBottomRight(const IntRect& rect)
+{
+ // Actually, the rect does not contain rect.maxX(). Refer to IntRect::contain.
+ return IntPoint(rect.maxX() - 1, rect.maxY() - 1);
+}
+
PassOwnPtr<TiledDrawingAreaProxy> TiledDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy)
{
return adoptPtr(new TiledDrawingAreaProxy(webView, webPageProxy));
@@ -236,7 +242,7 @@ void TiledDrawingAreaProxy::invalidate(const IntRect& contentsDirtyRect)
IntRect dirtyRect(mapFromContents(contentsDirtyRect));
TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
- TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
+ TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
IntRect coverRect = calculateCoverRect(m_previousVisibleRect);
@@ -334,7 +340,7 @@ bool TiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext co
IntRect dirtyRect = mapFromContents(rect);
TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
- TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
+ TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
@@ -434,7 +440,7 @@ void TiledDrawingAreaProxy::createTiles()
unsigned requiredTileCount = 0;
bool hasVisibleCheckers = false;
TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(visibleRect.location());
- TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(visibleRect.maxX(), visibleRect.maxY()));
+ TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(visibleRect));
for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
TiledDrawingAreaTile::Coordinate currentCoordinate(xCoordinate, yCoordinate);