From fb69f71918a2d0852b75990703ba74988f9ac087 Mon Sep 17 00:00:00 2001 From: Benjamin Stover Date: Wed, 8 Sep 2010 11:29:14 -0700 Subject: [PATCH] make pending pixels aware of screen size so that visible area is always filled --- mobile/app/mobile.js | 6 +++--- mobile/chrome/content/bindings/browser.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mobile/app/mobile.js b/mobile/app/mobile.js index 6f301ed9a75..2c47c784fdc 100644 --- a/mobile/app/mobile.js +++ b/mobile/app/mobile.js @@ -37,9 +37,9 @@ #filter substitution // for browser.xml binding -pref("toolkit.browser.cachePixelX", 800); -pref("toolkit.browser.cachePixelY", 2000); -pref("toolkit.browser.recacheRatio", 50); +pref("toolkit.browser.cachePixelX", 400); +pref("toolkit.browser.cachePixelY", 1000); +pref("toolkit.browser.recacheRatio", 60); pref("toolkit.defaultChromeURI", "chrome://browser/content/browser.xul"); pref("general.useragent.compatMode.firefox", true); diff --git a/mobile/chrome/content/bindings/browser.xml b/mobile/chrome/content/bindings/browser.xml index 2e649faaa6d..f8fc3f6003c 100644 --- a/mobile/chrome/content/bindings/browser.xml +++ b/mobile/chrome/content/bindings/browser.xml @@ -834,8 +834,8 @@ this._pendingPixelsX += x; this._pendingPixelsY += y; - if (Math.abs(this._pendingPixelsX) >= this._pendingThresholdX || - Math.abs(this._pendingPixelsY) >= this._pendingThresholdY) + if (Math.abs(this._pendingPixelsX) > Math.max(0, this._pendingThresholdX - bcr.width / 2) || + Math.abs(this._pendingPixelsY) > Math.max(0, this._pendingThresholdY - bcr.height / 2)) this._updateCacheViewport(); ]]>