зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1044586 - fix propagating document events to the window when the inner window has changed, r=smaug
MozReview-Commit-ID: G6yPBwbITvG --HG-- extra : rebase_source : e57e2a481d83060dcd9fbfce5b2f26c59fd7d1cf
This commit is contained in:
Родитель
efb1ecf093
Коммит
33ea64842e
|
@ -7620,9 +7620,12 @@ nsDocument::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
|||
|
||||
// Load events must not propagate to |window| object, see bug 335251.
|
||||
if (aVisitor.mEvent->mMessage != eLoad) {
|
||||
nsGlobalWindow* window = nsGlobalWindow::Cast(GetWindow());
|
||||
aVisitor.mParentTarget =
|
||||
window ? window->GetTargetForEventTargetChain() : nullptr;
|
||||
nsPIDOMWindowInner* innerWindow = GetInnerWindow();
|
||||
if (innerWindow && innerWindow->IsCurrentInnerWindow()) {
|
||||
nsGlobalWindow* window = nsGlobalWindow::Cast(GetWindow());
|
||||
aVisitor.mParentTarget =
|
||||
window ? window->GetTargetForEventTargetChain() : nullptr;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче