[Pkg-mozext-commits] [tabmixplus] 08/47: Clean collecting scroll position in AutoReload.jsm
David Prévot
taffit at moszumanska.debian.org
Fri Sep 26 20:56:59 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch upstream
in repository tabmixplus.
commit 32bd2e7e7b17b70e59e1435d57596ed7c017936c
Author: onemen <tabmix.onemen at gmail.com>
Date: Thu Sep 18 13:12:58 2014 +0300
Clean collecting scroll position in AutoReload.jsm
---
modules/AutoReload.jsm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/AutoReload.jsm b/modules/AutoReload.jsm
index 31d49c5..6f974b4 100644
--- a/modules/AutoReload.jsm
+++ b/modules/AutoReload.jsm
@@ -228,8 +228,11 @@ let AutoReload = {
if (!TabmixSvc.prefBranch.getBoolPref("reload_match_address") ||
aTab.autoReloadURI == aBrowser.currentURI.spec) {
- if (aBrowser.curScrollX || aBrowser.curScrollY)
- aBrowser[TabmixSvc.contentWindowAsCPOW].scrollTo(aBrowser.curScrollX, aBrowser.curScrollY);
+ if (aBrowser.__tabmixScrollPosition || null) {
+ let {x, y} = aBrowser.__tabmixScrollPosition;
+ aBrowser[TabmixSvc.contentWindowAsCPOW].scrollTo(x, y);
+ aBrowser.__tabmixScrollPosition = null;
+ }
if (!aTab.autoReloadEnabled)
aTab.autoReloadEnabled = true;
@@ -283,8 +286,9 @@ function _reloadTab(aTab) {
}
} catch (e) { }
- browser.curScrollX = browser[TabmixSvc.contentWindowAsCPOW].scrollX;
- browser.curScrollY = browser[TabmixSvc.contentWindowAsCPOW].scrollY;
+ let contentWindow = browser[TabmixSvc.contentWindowAsCPOW];
+ browser.__tabmixScrollPosition = {x: contentWindow.scrollX,
+ y: contentWindow.scrollY};
var loadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY |
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY |
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list