зеркало из https://github.com/mozilla/gecko-dev.git
Bug 840916 - Back out e7d3b0866dd9 from bug 779527 as it is no longer needed. r=mbrubeck
This commit is contained in:
Родитель
fdaffab3a1
Коммит
7db39f8e1b
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче