[Pkg-mozext-commits] [tabmixplus] 03/13: Follow up bug 1345090 - Modify SessionStore to restore tabs with 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 80a06ce8759f385e2c3d890feac0be6236ef280f
Author: onemen <tabmix.onemen at gmail.com>
Date:   Fri May 12 15:40:17 2017 +0300

    Follow up bug 1345090 - Modify SessionStore to restore tabs with lazy-browsers
---
 chrome/content/tabmix.js | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 0967921..40ee4ad 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -261,7 +261,7 @@ var TMP_eventListener = {
         TabmixSessionManager.onWindowClose(!Tabmix.numberOfWindows());
         break;
       case "SSTabRestoring":
-        this.onSSTabRestoring(aEvent);
+        this.onSSTabRestoring(aEvent.target);
         break;
       case "TabOpen":
         this.onTabOpen(aEvent);
@@ -611,15 +611,14 @@ var TMP_eventListener = {
     setTimeout(() => TabmixTabbar.updateScrollStatus(), 2500);
   },
 
-  onSSTabRestoring: function TMP_EL_onSSTabRestoring(aEvent) {
-    var tab = aEvent.target;
+  onSSTabRestoring: function TMP_EL_onSSTabRestoring(tab) {
     Tabmix.restoreTabState(tab);
     TabmixSessionManager.restoreHistoryComplete(tab);
 
     gBrowser.ensureTabIsVisible(gBrowser.selectedTab, false);
 
     // don't mark new tab as unread
-    var url = tab.linkedBrowser.currentURI.spec;
+    let url = tab.__SS_lazyData ? tab.__SS_lazyData.url : tab.linkedBrowser.currentURI.spec;
     if (url == TabmixSvc.aboutBlank || url == TabmixSvc.aboutNewtab)
       tab.setAttribute("visited", true);
   },
@@ -788,6 +787,13 @@ var TMP_eventListener = {
   // when more the one tabs opened at once
   lastTimeTabOpened: 0,
   onTabOpen_delayUpdateTabBar: function TMP_EL_onTabOpen_delayUpdateTabBar(aTab) {
+    if (aTab.__SS_lazyData) {
+      this.onSSTabRestoring(aTab);
+      if (aTab.label == "about:blank") {
+        aTab.label = gBrowser.mStringBundle.getString("tabs.emptyTabTitle");
+        gBrowser._tabAttrModified(aTab, ["label"]);
+      }
+    }
     // cache tab width, we use our own key since Pale Moon doesn't have permanentKey
     aTab.tabmixKey = {};
     this.tabWidthCache.set(aTab.tabmixKey, aTab.boxObject.width);

-- 
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