зеркало из https://github.com/mozilla/gecko-dev.git
Bug 775346 - Make sure DOM events match current document. r=mbrubeck
--HG-- extra : rebase_source : 7d482561fd601501323ce494659e6e7f8d30eb92
This commit is contained in:
Родитель
16ad94998a
Коммит
8d6dc77a2f
|
@ -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({
|
||||
|
|
Загрузка…
Ссылка в новой задаче