From 8d6dc77a2fec03fa7dd56d23c85f9c61413e5c74 Mon Sep 17 00:00:00 2001 From: Brian Nicholson Date: Wed, 25 Jul 2012 15:35:37 -0700 Subject: [PATCH] Bug 775346 - Make sure DOM events match current document. r=mbrubeck --HG-- extra : rebase_source : 7d482561fd601501323ce494659e6e7f8d30eb92 --- mobile/android/chrome/content/browser.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 8393ac48fdc3..84930aad0422 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -2587,8 +2587,8 @@ Tab.prototype = { case "DOMContentLoaded": { let target = aEvent.originalTarget; - // ignore on frames - if (target.defaultView != this.browser.contentWindow) + // ignore on frames and other documents + if (target != this.browser.contentDocument) return; // Sample the background color of the page and pass it along. (This is used to draw the @@ -2633,8 +2633,8 @@ Tab.prototype = { if (!target.href || target.disabled) return; - // ignore on frames - if (target.ownerDocument.defaultView != this.browser.contentWindow) + // ignore on frames and other documents + if (target.ownerDocument != this.browser.contentDocument) return; // sanitize the rel string @@ -2687,8 +2687,8 @@ Tab.prototype = { if (!aEvent.isTrusted) return; - // ignore on frames - if (aEvent.target.defaultView != this.browser.contentWindow) + // ignore on frames and other documents + if (aEvent.originalTarget != this.browser.contentDocument) return; sendMessageToJava({