author | Kartikaya Gupta <kgupta@mozilla.com> |
Mon, 15 Jul 2013 17:21:16 -0400 | |
changeset 138585 | 75465ea1cfb6c0a421f13a51dc3805c1432ba813 |
parent 138584 | e33505d7b796e55269441bf6bd0d5877b33b6116 |
child 138586 | 8d0087957a1d303b26ae59aa7d4659c083cc14fc |
push id | 24961 |
push user | emorley@mozilla.com |
push date | Tue, 16 Jul 2013 08:58:21 +0000 |
treeherder | mozilla-central@41ed26826acb [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mbrubeck |
bugs | 840916, 779527 |
milestone | 25.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/style/nsMediaFeatures.cpp +++ b/layout/style/nsMediaFeatures.cpp @@ -255,25 +255,17 @@ GetMonochrome(nsPresContext* aPresContex } static nsresult GetResolution(nsPresContext* aPresContext, const nsMediaFeature*, nsCSSValue& aResult) { // 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; } static nsresult GetScan(nsPresContext* aPresContext, const nsMediaFeature*, nsCSSValue& aResult)