Bug 907926 - Use the ClientArea when initializing the draw target in nsWindowGfx. r=Bas

This commit is contained in:
Matt Woodrow 2013-09-11 17:08:53 +12:00
Родитель a0360873d9
Коммит 1953d97bbd
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -367,10 +367,12 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
nsRefPtr<gfxContext> thebesContext;
if (gfxPlatform::GetPlatform()->SupportsAzureContentForType(mozilla::gfx::BACKEND_CAIRO)) {
RECT paintRect;
::GetClientRect(mWnd, &paintRect);
RefPtr<mozilla::gfx::DrawTarget> dt =
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(targetSurface,
mozilla::gfx::IntSize(targetSurface->GetSize().width,
targetSurface->GetSize().height));
mozilla::gfx::IntSize(paintRect.right - paintRect.left,
paintRect.bottom - paintRect.top));
thebesContext = new gfxContext(dt);
} else {
thebesContext = new gfxContext(targetSurface);