[Pkg-mozext-commits] [nosquint] 01/04: Update tab detach kludge logic to work with Firefox 20

David Prévot taffit at moszumanska.debian.org
Tue Apr 28 01:41:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 2.1.9
in repository nosquint.

commit 93a26d9f46304894ed1af0ab9200613bb2c76904
Author: Jason Tackaberry <tack at urandom.ca>
Date:   Sat Apr 20 10:18:51 2013 -0400

    Update tab detach kludge logic to work with Firefox 20
    
    This regression was reported by a user using Firefox 20 but it's probable
    the problem started in an earlier version.
    
    Fixes #78.
---
 src/content/interfaces.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/content/interfaces.js b/src/content/interfaces.js
index 4465815..6ebee1c 100644
--- a/src/content/interfaces.js
+++ b/src/content/interfaces.js
@@ -25,6 +25,7 @@ NoSquint.interfaces = NoSquint.ns(function() { with (NoSquint) {
         this.id = 'NoSquint.interfaces.ProgressListener';
         this.browser = browser;
         this.contentType = null;
+        this.attachTimeout = null;
     }
 
     this.ProgressListener.prototype = {
@@ -130,8 +131,8 @@ NoSquint.interfaces = NoSquint.ns(function() { with (NoSquint) {
                     else
                         this.styleApplied = true;
                 }
-            } else if (state & Components.interfaces.nsIWebProgressListener.STATE_IS_DOCUMENT &&
-                       this.browser.getUserData('nosquint').site == null && !is30()) {
+            } else if (state & Components.interfaces.nsIWebProgressListener.STATE_STOP && astatus &&
+                       this.attachTimeout == null) {
                 /* Kludge: when moving a tab from one window to another, the
                  * listener previously created and attached in
                  * NSQ.browser.attach() seems to either stop working or gets
@@ -141,7 +142,7 @@ NoSquint.interfaces = NoSquint.ns(function() { with (NoSquint) {
                  * the listener isn't working, NoSquint doesn't hear about it.
                  *
                  * The specific magical incantation to deal with this seems to
-                 * be handling STATE_IS_DOCUMENT when site=null.  After a 0ms
+                 * be handling STATE_STOP with a non-zero aStatus.  After a 0ms
                  * timer, we try to re-add this listener ('this').  If it
                  * fails, we assume the listener from attach() is still there
                  * and everything is cool after all.  Otherwise, regenerate the
@@ -154,7 +155,8 @@ NoSquint.interfaces = NoSquint.ns(function() { with (NoSquint) {
                  */
                 var browser = this.browser;
                 var listener = this;
-                setTimeout(function() {
+                this.attachTimeout = setTimeout(function() {
+                    listener.attachTimeout = null;
                     try {
                         browser.addProgressListener(listener);
                     } catch (err) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/nosquint.git



More information about the Pkg-mozext-commits mailing list