[Pkg-mozext-commits] [tabmixplus] 09/13: Follow up bug 1345098 - Lazy-browser-tabs: Deal with code which would unnecessarily/prematurely bind lazy-browsers
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:28:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag 0.5.0.4pre.170525a1
in repository tabmixplus.
commit a0ebcba477782fa509dba1ed7af0eb68b1c4a0c5
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed May 24 08:37:30 2017 +0300
Follow up bug 1345098 - Lazy-browser-tabs: Deal with code which would unnecessarily/prematurely bind lazy-browsers
---
chrome/content/links/setup.js | 4 ++++
chrome/content/minit/tablib.js | 4 +++-
chrome/content/session/session.js | 14 ++++++++++++--
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/chrome/content/links/setup.js b/chrome/content/links/setup.js
index 161ca88..ee261a8 100644
--- a/chrome/content/links/setup.js
+++ b/chrome/content/links/setup.js
@@ -195,6 +195,10 @@ Tabmix.beforeStartup = function TMP_beforeStartup(tabBrowser, aTabContainer) {
tabBrowser.isBlankBrowser = function TMP_isBlankBrowser(aBrowser, aboutBlank) {
try {
+ if (Tabmix.isVersion(550) && aBrowser.hasAttribute("pending")) {
+ let tab = this.getTabForBrowser(aBrowser);
+ return TMP_SessionStore.isBlankPendingTab(tab);
+ }
if (!aBrowser || !aBrowser.currentURI)
return true;
if (aBrowser.canGoForward || aBrowser.canGoBack)
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index a696a27..be09ad4 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -1841,7 +1841,9 @@ Tabmix.tablib = {
}
try {
- TabmixSessionManager.tabScrolled(tab);
+ if (!Tabmix.isVersion(320)) {
+ TabmixSessionManager.tabScrolled(tab);
+ }
} catch (ex) {
Tabmix.assert(ex, "ERROR in TabmixSessionManager.tabScrolled");
}
diff --git a/chrome/content/session/session.js b/chrome/content/session/session.js
index e6d6d31..c046654 100644
--- a/chrome/content/session/session.js
+++ b/chrome/content/session/session.js
@@ -3423,8 +3423,12 @@ TabmixSessionManager = {
// flag. dont save tab that are in restore phase
if (!tab.hasAttribute("inrestore"))
tab.setAttribute("inrestore", "true");
- if (data.pinned)
+ if (data.pinned) {
+ if (Tabmix.isVersion(550)) {
+ gBrowser._insertBrowser(tab);
+ }
gBrowser.pinTab(tab);
+ }
this._setTabviewTab(tab, data, activeGroupId);
@@ -3518,7 +3522,9 @@ TabmixSessionManager = {
// reset tab's attributes and history
resetTab: function TMP_resetAttributes(aTab) {
let browser = gBrowser.getBrowserForTab(aTab);
- browser.stop();
+ if (!browser.hasAttribute("pending")) {
+ browser.stop();
+ }
// reset old history
if (browser.getAttribute("remote") != "true") {
let history = browser.webNavigation.sessionHistory;
@@ -3557,6 +3563,10 @@ TabmixSessionManager = {
if (!Tabmix.isVersion(410))
delete browser.__SS_data;
+ if (Tabmix.isVersion(550) && aTab.__SS_lazyData) {
+ delete aTab.__SS_lazyData;
+ }
+
// clear TabStateCache
if (Tabmix.isVersion(320)) {
let data = this.TabStateCache.get(browser) || {};
--
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