diff --git a/mozilla/layout/base/nsPresContext.cpp b/mozilla/layout/base/nsPresContext.cpp index a0c417c25b9..eed568212b2 100644 --- a/mozilla/layout/base/nsPresContext.cpp +++ b/mozilla/layout/base/nsPresContext.cpp @@ -377,19 +377,7 @@ nsPresContext::GetImageGroup(nsIImageGroup*& aGroupResult) } // Initialize the image group - nsIWidget* window; - nsIFrame* rootFrame; - rootFrame = mShell->GetRootFrame(); - rootFrame->GetWindow(window); - nsIRenderingContext* drawCtx = window->GetRenderingContext(); - float app2dev; - mDeviceContext->GetAppUnitsToDevUnits(app2dev); - drawCtx->Scale(app2dev, app2dev); - NS_RELEASE(drawCtx); - nsIDeviceContext* deviceCtx = window->GetDeviceContext(); - rv = mImageGroup->Init(deviceCtx); - NS_RELEASE(deviceCtx); - NS_RELEASE(window); + rv = mImageGroup->Init(mDeviceContext); if (NS_OK != rv) { return rv; } diff --git a/mozilla/layout/base/src/nsPresContext.cpp b/mozilla/layout/base/src/nsPresContext.cpp index a0c417c25b9..eed568212b2 100644 --- a/mozilla/layout/base/src/nsPresContext.cpp +++ b/mozilla/layout/base/src/nsPresContext.cpp @@ -377,19 +377,7 @@ nsPresContext::GetImageGroup(nsIImageGroup*& aGroupResult) } // Initialize the image group - nsIWidget* window; - nsIFrame* rootFrame; - rootFrame = mShell->GetRootFrame(); - rootFrame->GetWindow(window); - nsIRenderingContext* drawCtx = window->GetRenderingContext(); - float app2dev; - mDeviceContext->GetAppUnitsToDevUnits(app2dev); - drawCtx->Scale(app2dev, app2dev); - NS_RELEASE(drawCtx); - nsIDeviceContext* deviceCtx = window->GetDeviceContext(); - rv = mImageGroup->Init(deviceCtx); - NS_RELEASE(deviceCtx); - NS_RELEASE(window); + rv = mImageGroup->Init(mDeviceContext); if (NS_OK != rv) { return rv; }