Bug 1128467 - Take scale factors into account when computing image size even if we aren't snapping. r=roc
authorSeth Fowler <seth@mozilla.com>
Wed, 25 Mar 2015 18:12:58 -0700
changeset 266087 f778ed14214557aa9c07aecea6b4ee42e769d8af
parent 266086 628e263e2205022d933a57cf7a4baca14835c9a0
child 266088 0bf7f53464d6a587eb5bed4f1027facea3ba206e
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1128467
milestone39.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 1128467 - Take scale factors into account when computing image size even if we aren't snapping. r=roc
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -5873,17 +5873,17 @@ ComputeSnappedImageDrawingParameters(gfx
       return SnappedImageDrawingParameters();
     }
   } else {
     didSnap = false;
     fill = devPixelFill;
   }
 
   gfxSize destScale = didSnap ? gfxSize(currentMatrix._11, currentMatrix._22)
-                              : gfxSize(1.0, 1.0);
+                              : currentMatrix.ScaleFactors(true);
   gfxSize appUnitScaledDest(dest.width * destScale.width,
                             dest.height * destScale.height);
   gfxSize scaledDest = appUnitScaledDest / aAppUnitsPerDevPixel;
   gfxSize snappedScaledDest =
     gfxSize(NSAppUnitsToIntPixels(appUnitScaledDest.width, aAppUnitsPerDevPixel),
             NSAppUnitsToIntPixels(appUnitScaledDest.height, aAppUnitsPerDevPixel));
 
   if (scaledDest.IsEmpty() || snappedScaledDest.IsEmpty()) {