Bug 840916 - Back out e7d3b0866dd9 from bug 779527 as it is no longer needed. r=mbrubeck

This commit is contained in:
Kartikaya Gupta 2013-07-15 17:21:16 -04:00
Родитель fdaffab3a1
Коммит 7db39f8e1b
1 изменённых файлов: 1 добавлений и 9 удалений

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

@ -260,15 +260,7 @@ GetResolution(nsPresContext* aPresContext, const nsMediaFeature*,
{
// Resolution measures device pixels per CSS (inch/cm/pixel). We
// return it in device pixels per CSS inches.
//
// However, on platforms where the CSS viewport is not fixed to the
// screen viewport, use the device resolution instead (bug 779527).
nsIPresShell *shell = aPresContext->PresShell();
float appUnitsPerInch = shell->GetIsViewportOverridden() ?
GetDeviceContextFor(aPresContext)->AppUnitsPerPhysicalInch() :
nsPresContext::AppUnitsPerCSSInch();
float dpi = appUnitsPerInch /
float dpi = float(nsPresContext::AppUnitsPerCSSInch()) /
float(aPresContext->AppUnitsPerDevPixel());
aResult.SetFloatValue(dpi, eCSSUnit_Inch);
return NS_OK;