Bug 626873 Navigating sometimes does not reset scale r=mfinkle
authorBenjamin Stover <bstover@mozilla.com>
Wed, 19 Jan 2011 10:03:05 -0800
changeset 2665 3c98f02d7e4c8d7e555c60a37c2819b1946b1e22
parent 2664 1c390a1b969918332145bef7e82973ddbf178845
child 2666 86d2e0b59767b3e78ef323438a7346cf86c0475c
push id2238
push userbstover@mozilla.com
push dateWed, 19 Jan 2011 18:02:37 +0000
reviewersmfinkle
bugs626873
Bug 626873 Navigating sometimes does not reset scale r=mfinkle
chrome/content/bindings/browser.js
chrome/content/bindings/browser.xml
--- a/chrome/content/bindings/browser.js
+++ b/chrome/content/bindings/browser.js
@@ -187,16 +187,19 @@ let DOMEvents =  {
         if (document.documentURIObject.spec == "about:blank")
           return;
 
         sendAsyncMessage("DOMContentLoaded", { });
         break;
 
       case "pageshow":
       case "pagehide": {
+        if (aEvent.target.defaultView != content)
+          break;
+
         let util = aEvent.target.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
                                             .getInterface(Ci.nsIDOMWindowUtils);
 
         let json = {
           windowId: util.outerWindowID,
           persisted: aEvent.persisted
         };
 
--- a/chrome/content/bindings/browser.xml
+++ b/chrome/content/bindings/browser.xml
@@ -327,18 +327,17 @@
               this.pageReport = null;
               this.updatePageReport();
             }
             // Delete the feeds cache if we're hiding the topmost page
             // (as opposed to one of its iframes).
             if (this.feeds && aMessage.target == this)
               this.feeds = null;
 
-            if (aMessage.windowId == this.contentWindowId)
-              this.scale = 1;
+            this.scale = 1;
          ]]>
         </body>
       </method>
 
       <method name="onPopupBlocked">
         <parameter name="aMessage"/>
         <body>
           <![CDATA[