Bug 962249 followup - Fix the bug of Window.scroll{Max,Min}{X,Y} that they incorrectly return app units instead of css pixels. r=roc
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 29 Oct 2015 09:35:10 +0900
changeset 305311 78a27c3cdb414e50a1ec6cfa9b2f169129cbaa53
parent 305310 16108f891268a5205d5e67b50e73d0dba30e7737
child 305312 01ae6c388605ece6feea6d96cc31e3bd27e9a1d7
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs962249
milestone44.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 962249 followup - Fix the bug of Window.scroll{Max,Min}{X,Y} that they incorrectly return app units instead of css pixels. r=roc
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -5502,17 +5502,18 @@ nsGlobalWindow::CheckSecurityLeftAndTop(
 
 int32_t
 nsGlobalWindow::GetScrollBoundaryOuter(Side aSide)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   FlushPendingNotifications(Flush_Layout);
   if (nsIScrollableFrame *sf = GetScrollFrame()) {
-    return sf->GetScrollRange().Edge(aSide);
+    return nsPresContext::
+      AppUnitsToIntCSSPixels(sf->GetScrollRange().Edge(aSide));
   }
   return 0;
 }
 
 int32_t
 nsGlobalWindow::GetScrollMinX(ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());