[Pkg-mozext-commits] [adblock-plus] 320/464: Topic 11234: UI not shown in popup windows

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:29 UTC 2014


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

taffit pushed a commit to branch master
in repository adblock-plus.

commit bd988b4850ec34bcbb4b055e9f209ef33d1e2d08
Author: Thomas Greiner <thomas at greinr.com>
Date:   Wed Oct 31 10:32:24 2012 +0100

    Topic 11234: UI not shown in popup windows
    
    --HG--
    extra : rebase_source : 0e1772d9b352f42f1a2994b3587f94deb8d87ac6
---
 lib/windowObserver.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/windowObserver.js b/lib/windowObserver.js
index 1db194d..92c64e0 100644
--- a/lib/windowObserver.js
+++ b/lib/windowObserver.js
@@ -34,7 +34,7 @@ function WindowObserver(listener, when)
       this.observe(window, "domwindowopened", null);
   }
 
-  Services.ww.registerNotification(this);
+  Services.obs.addObserver(this, "chrome-document-global-created", true);
 
   this._shutdownHandler = function()
   {
@@ -42,7 +42,7 @@ function WindowObserver(listener, when)
     while (e.hasMoreElements())
       this._listener.removeFromWindow(e.getNext().QueryInterface(Ci.nsIDOMWindow));
 
-    Services.ww.unregisterNotification(this);
+    Services.obs.removeObserver(this, "chrome-document-global-created");
   }.bind(this);
   onShutdown.add(this._shutdownHandler);
 }
@@ -64,7 +64,8 @@ WindowObserver.prototype =
 
   observe: function(subject, topic, data)
   {
-    if (topic == "domwindowopened")
+    // Make sure page is not about:blank (work-around for bug 795961)
+    if (subject instanceof Ci.nsIDOMWindow && subject.location.href !== "about:blank")
     {
       if (this._when == "start")
       {

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



More information about the Pkg-mozext-commits mailing list