зеркало из https://github.com/mozilla/gecko-dev.git
Bug 335251, prevent load events to propagate to window, r=bz, sr=jst
This commit is contained in:
Родитель
dd95e269cd
Коммит
1b31151599
|
@ -3974,7 +3974,13 @@ nsDocument::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
|||
// FIXME! This is a hack to make middle mouse paste working also in Editor.
|
||||
// Bug 329119
|
||||
aVisitor.mForceContentDispatch = PR_TRUE;
|
||||
aVisitor.mParentTarget = GetWindow();
|
||||
|
||||
// Load events must not propagate to |window| object, see bug 335251.
|
||||
if (!(aVisitor.mEvent->message == NS_IMAGE_LOAD ||
|
||||
aVisitor.mEvent->message == NS_PAGE_LOAD ||
|
||||
aVisitor.mEvent->message == NS_SCRIPT_LOAD)) {
|
||||
aVisitor.mParentTarget = GetWindow();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1721,9 +1721,7 @@ nsGlobalWindow::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
|||
}
|
||||
|
||||
// Check chrome document capture here.
|
||||
// XXX The chrome can not handle this, see bug 51211
|
||||
// FIXME Fix this for other *LOAD events, bug 329514.
|
||||
if (mChromeEventHandler && msg != NS_IMAGE_LOAD) {
|
||||
if (mChromeEventHandler) {
|
||||
aVisitor.mParentTarget = mChromeEventHandler;
|
||||
aVisitor.mParentIsChromeHandler = PR_TRUE;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче