Bug 641426. Part 2: Remove a bunch of direct gfxRect::pos/size usage. r=joe

This commit is contained in:
Robert O'Callahan
2011-04-19 15:07:21 +12:00
parent e43243e84a
commit ffd5268cd1
30 changed files with 164 additions and 170 deletions

View File

@@ -1059,7 +1059,7 @@ ToOutsideIntRect(const gfxRect &aRect)
{
gfxRect r = aRect;
r.RoundOut();
return nsIntRect(r.pos.x, r.pos.y, r.size.width, r.size.height);
return nsIntRect(r.X(), r.Y(), r.Width(), r.Height());
}
static nsIntRect
@@ -1067,7 +1067,7 @@ ToInsideIntRect(const gfxRect& aRect)
{
gfxRect r = aRect;
r.RoundIn();
return nsIntRect(r.pos.x, r.pos.y, r.size.width, r.size.height);
return nsIntRect(r.X(), r.Y(), r.Width(), r.Height());
}
/**
@@ -1194,11 +1194,11 @@ BasicLayerManager::PushGroupWithCachedSurface(gfxContext *aTarget,
nsRefPtr<gfxContext> ctx =
mCachedSurface.Get(aContent,
gfxIntSize(clip.size.width, clip.size.height),
gfxIntSize(clip.Width(), clip.Height()),
currentSurf);
/* Align our buffer for the original surface */
ctx->Translate(-clip.pos);
*aSavedOffset = clip.pos;
ctx->Translate(-clip.TopLeft());
*aSavedOffset = clip.TopLeft();
ctx->Multiply(saveMatrix.Matrix());
return ctx.forget();
}