Bug 1130259 - Make sure the integer overload of ScrollBy calls the double one, not itself. r=kip, a=sledru
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 06 Feb 2015 11:27:15 -0500
changeset 243718 7733cfbb59a6
parent 243717 7a8703c465a7
child 243719 f430d5f985d3
push id4449
push userryanvm@gmail.com
push date2015-02-09 15:46 +0000
treeherdermozilla-beta@130e59d97b15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip, sledru
bugs1130259
milestone36.0
Bug 1130259 - Make sure the integer overload of ScrollBy calls the double one, not itself. r=kip, a=sledru
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -7239,17 +7239,17 @@ nsGlobalWindow::ScrollTo(const CSSIntPoi
                             ? nsIScrollableFrame::SMOOTH_MSD
                             : nsIScrollableFrame::INSTANT);
   }
 }
 
 NS_IMETHODIMP
 nsGlobalWindow::ScrollBy(int32_t aXScrollDif, int32_t aYScrollDif)
 {
-  ScrollBy(aXScrollDif, aYScrollDif);
+  ScrollBy(double(aXScrollDif), double(aYScrollDif));
 
   return NS_OK;
 }
 
 void
 nsGlobalWindow::ScrollBy(double aXScrollDif, double aYScrollDif)
 {
   FlushPendingNotifications(Flush_Layout);