Bug 876562. Fix scrollport size calculation that didn't make a lot of sense. r=kats a=akeybl
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 14 Jun 2013 10:53:39 -0500
changeset 142901 15c47873f860d90cba4b0933ced8158395689127
parent 142900 b77b99444e5614cd3c1dea161e33402651c33d88
child 142902 ee9cc4f09fb6393d39b1676a4fe77c2921202e70
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats, akeybl
bugs876562
milestone23.0a2
Bug 876562. Fix scrollport size calculation that didn't make a lot of sense. r=kats a=akeybl It was taking the min over two values that weren't in the same unit (the first in CSS pixels, the second in dev pixels).
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -2931,18 +2931,18 @@ Tab.prototype = {
       screenWidth = gScreenWidth - gViewportMargins.left - gViewportMargins.right;
       viewportWidth = screenWidth / zoom;
     }
 
     // Make sure the aspect ratio of the screen is maintained when setting
     // the clamping scroll-port size.
     let factor = Math.min(viewportWidth / screenWidth, pageWidth / screenWidth,
                           viewportHeight / screenHeight, pageHeight / screenHeight);
-    let scrollPortWidth = Math.min(screenWidth * factor, pageWidth * zoom);
-    let scrollPortHeight = Math.min(screenHeight * factor, pageHeight * zoom);
+    let scrollPortWidth = screenWidth * factor;
+    let scrollPortHeight = screenHeight * factor;
 
     let win = this.browser.contentWindow;
     win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).
         setScrollPositionClampingScrollPortSize(scrollPortWidth, scrollPortHeight);
   },
 
   setViewport: function(aViewport) {
     // Transform coordinates based on zoom