From dd83f17e324b91fd8acb1dcfbc7900a45eb867d5 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Mon, 9 May 2011 13:28:48 +0200 Subject: [PATCH] Bug 650694 - browser_scrollbar.js on Android fails four tests and times out [r=mbrubeck] --- mobile/chrome/content/browser.js | 3 ++- mobile/chrome/tests/browser_scrollbar.js | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mobile/chrome/content/browser.js b/mobile/chrome/content/browser.js index 1893e8f398d..5954eb8b406 100644 --- a/mobile/chrome/content/browser.js +++ b/mobile/chrome/content/browser.js @@ -2679,7 +2679,8 @@ Tab.prototype = { // Make sure the viewport height is not shorter than the window when // the page is zoomed out to show its full width. - viewportH = Math.max(viewportH, screenH * (browser.contentDocumentWidth / screenW)); + if (viewportH * this.clampZoomLevel(this.getPageZoomLevel()) < screenH) + viewportH = Math.max(viewportH, screenH * (browser.contentDocumentWidth / screenW)); if (browser.contentWindowWidth != viewportW || browser.contentWindowHeight != viewportH) browser.setWindowSize(viewportW, viewportH); diff --git a/mobile/chrome/tests/browser_scrollbar.js b/mobile/chrome/tests/browser_scrollbar.js index e0f270d1bee..0bfb3c8c644 100644 --- a/mobile/chrome/tests/browser_scrollbar.js +++ b/mobile/chrome/tests/browser_scrollbar.js @@ -87,11 +87,7 @@ gTests.push({ }, checkHorizontalScrollable: function() { - checkScrollbars(true, true); - // TODO: current code forces the height to grow so we always have visible document when - // zooming out to see the wide document - //checkScrollbars(true, false); - todo(false, "Don't cause the height to grow beyond the window height if it doesn't need to"); + checkScrollbars(true, false); waitForPageShow(testURL_01 + "vertical", gCurrentTest.checkVerticalScrollable); gOpenedTabs.push(Browser.addTab(testURL_01 + "vertical", true));