Bug 605618 - Scroll iframes in parent process (followup) [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Sun, 23 Jan 2011 08:49:43 -0800
changeset 67293 60dba741bb5d7550157abef50c654d47063ba87b
parent 67292 2430db7db14f9ad0878f5ac6846da39f3cea7e93
child 67294 87fc70c93e6f2535c3c7f03ade00932e18790e9b
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs605618
Bug 605618 - Scroll iframes in parent process (followup) [r=mfinkle]
mobile/chrome/content/common-ui.js
mobile/chrome/tests/browser_formsZoom.js
--- a/mobile/chrome/content/common-ui.js
+++ b/mobile/chrome/content/common-ui.js
@@ -882,17 +882,17 @@ var FormHelperUI = {
     }
 
     let browser = getBrowser();
     let zoomRect = Rect.fromRect(browser.getBoundingClientRect());
 
     this._currentCaretRect = aCaretRect;
     let caretRect = aCaretRect.clone().scale(browser.scale, browser.scale);
 
-    let scroll = browser.getPosition();
+    let scroll = browser.getRootView().getPosition();
     zoomRect = new Rect(scroll.x, scroll.y, zoomRect.width, zoomRect.height);
     if (zoomRect.contains(caretRect))
       return;
 
     let [deltaX, deltaY] = this._getOffsetForCaret(caretRect, zoomRect);
     if (deltaX != 0 || deltaY != 0)
       browser.scrollBy(deltaX, deltaY);
   },
--- a/mobile/chrome/tests/browser_formsZoom.js
+++ b/mobile/chrome/tests/browser_formsZoom.js
@@ -60,17 +60,17 @@ function waitForZoom(aCallback) {
 }
 
 function isElementVisible(aElement) {
   let elementRect = Rect.fromRect(aElement.rect);
   let caretRect = Rect.fromRect(aElement.caretRect);
 
   let browser = getBrowser();
   let zoomRect = Rect.fromRect(browser.getBoundingClientRect());
-  let scroll = browser.getPosition();
+  let scroll = browser.getRootView().getPosition();
   let browserRect = new Rect(scroll.x, scroll.y, zoomRect.width, zoomRect.height);
 
   info("CanZoom: " +Browser.selectedTab.allowZoom);
 
   info("Browser rect: " + browserRect + " - scale: " + browser.scale);
   info("Element rect: " + elementRect + " - caret rect: " + caretRect);
   info("Scale element rect: " + elementRect.clone().scale(browser.scale, browser.scale) + " - scale caretRect: " + caretRect.clone().scale(browser.scale, browser.scale));
   info("Resulting zoom rect: " + Browser._getZoomRectForPoint(elementRect.center().x, elementRect.y, browser.scale));