Bug 864219. nsCocoaWindow::DoResize should be explicit about converting doubles to ints. r=jfkthame
authorTimothy Nikkel <tnikkel@gmail.com>
Mon, 22 Apr 2013 15:18:28 -0500
changeset 129501 70a8fceb17092c3b2fafefa352ace7b134352386
parent 129500 f88be52706627a2b794c2e651a34f5608f3cf2d9
child 129502 43d1b14e89206692b51a1d3efb853b13e5b425d7
push idunknown
push userunknown
push dateunknown
reviewersjfkthame
bugs864219
milestone23.0a1
Bug 864219. nsCocoaWindow::DoResize should be explicit about converting doubles to ints. r=jfkthame
widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -1339,17 +1339,17 @@ nsresult nsCocoaWindow::DoResize(double 
 
   // ConstrainSize operates in device pixels, so we need to convert using
   // the backing scale factor here
   CGFloat scale = BackingScaleFactor();
   int32_t width = NSToIntRound(aWidth * scale);
   int32_t height = NSToIntRound(aHeight * scale);
   ConstrainSize(&width, &height);
 
-  nsIntRect newBounds(aX, aY,
+  nsIntRect newBounds(NSToIntRound(aX), NSToIntRound(aY),
                       NSToIntRound(width / scale),
                       NSToIntRound(height / scale));
 
   // constrain to the screen that contains the largest area of the new rect
   FitRectToVisibleAreaForScreen(newBounds,
                                 aConstrainToCurrentScreen ?
                                   [mWindow screen] : nullptr,
                                 mUsesNativeFullScreen);