Bug 805761 Fix warning in layers::FrameMetrics::GetScrollOffsetInLayerPixels() r=drs
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 30 Oct 2012 10:58:29 +0900
changeset 111865 dd6b5dcd73c35a6e0e79dafcee3c391544206a4b
parent 111864 573580dd4ba80a032f89d5802caec531a62e3a30
child 111866 215b45694fffdf0aa0beaca528f7c5f4ee3ea16b
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersdrs
bugs805761
milestone19.0a1
Bug 805761 Fix warning in layers::FrameMetrics::GetScrollOffsetInLayerPixels() r=drs
gfx/layers/FrameMetrics.h
--- a/gfx/layers/FrameMetrics.h
+++ b/gfx/layers/FrameMetrics.h
@@ -80,18 +80,21 @@ public:
 
   gfxSize LayersPixelsPerCSSPixel() const
   {
     return mResolution * mDevPixelsPerCSSPixel;
   }
 
   gfx::Point GetScrollOffsetInLayerPixels() const
   {
-    return gfx::Point(mScrollOffset.x * LayersPixelsPerCSSPixel().width,
-                      mScrollOffset.y * LayersPixelsPerCSSPixel().height);
+    return gfx::Point(
+      static_cast<gfx::Float>(
+        mScrollOffset.x * LayersPixelsPerCSSPixel().width),
+      static_cast<gfx::Float>(
+        mScrollOffset.y * LayersPixelsPerCSSPixel().height));
   }
 
   // ---------------------------------------------------------------------------
   // The following metrics are all in widget space/device pixels.
   //
 
   // This is the area within the widget that we're compositing to, which means
   // that it is the visible region of this frame. It is not relative to