Bug 177805: Fix the use of units in Gecko. r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219640 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2666,15 +2666,8 @@ nsHTMLDocument::GetPixelDimensions(nsIPresShell* aShell,
|
||||
size = frame->GetSize();
|
||||
}
|
||||
|
||||
// Convert from twips to pixels
|
||||
nsPresContext *context = aShell->GetPresContext();
|
||||
if (context) {
|
||||
float scale;
|
||||
scale = context->TwipsToPixels();
|
||||
|
||||
*aWidth = NSTwipsToIntPixels(size.width, scale);
|
||||
*aHeight = NSTwipsToIntPixels(size.height, scale);
|
||||
}
|
||||
*aWidth = nsPresContext::AppUnitsToIntCSSPixels(size.width);
|
||||
*aHeight = nsPresContext::AppUnitsToIntCSSPixels(size.height);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user