Bug 840916 - Back out e7d3b0866dd9 from bug 779527 as it is no longer needed. r=mbrubeck
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 15 Jul 2013 17:21:16 -0400
changeset 138585 75465ea1cfb6c0a421f13a51dc3805c1432ba813
parent 138584 e33505d7b796e55269441bf6bd0d5877b33b6116
child 138586 8d0087957a1d303b26ae59aa7d4659c083cc14fc
push id24961
push useremorley@mozilla.com
push dateTue, 16 Jul 2013 08:58:21 +0000
treeherdermozilla-central@41ed26826acb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs840916, 779527
milestone25.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
Bug 840916 - Back out e7d3b0866dd9 from bug 779527 as it is no longer needed. r=mbrubeck
layout/style/nsMediaFeatures.cpp
--- 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)