Removed a bunch of bogus code that (a) did very little (b) doesn't work for image documents
This commit is contained in:
@@ -377,19 +377,7 @@ nsPresContext::GetImageGroup(nsIImageGroup*& aGroupResult)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the image group
|
// Initialize the image group
|
||||||
nsIWidget* window;
|
rv = mImageGroup->Init(mDeviceContext);
|
||||||
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);
|
|
||||||
if (NS_OK != rv) {
|
if (NS_OK != rv) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -377,19 +377,7 @@ nsPresContext::GetImageGroup(nsIImageGroup*& aGroupResult)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the image group
|
// Initialize the image group
|
||||||
nsIWidget* window;
|
rv = mImageGroup->Init(mDeviceContext);
|
||||||
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);
|
|
||||||
if (NS_OK != rv) {
|
if (NS_OK != rv) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user