Bug 334216, Tabs opened in the background from bookmarks have no generic icon. This makes non-bubbling events to be propagate back to the bindingParent(s) , r=sicking,sr=bz

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-05-18 17:49:39 +00:00
parent 5425e04fb3
commit ed1098af8f

View File

@ -458,16 +458,16 @@ nsEventTargetChainItem::HandleEventTargetChain(nsEventChainPostVisitor& aVisitor
// Bubble
aVisitor.mEvent->flags &= ~NS_EVENT_FLAG_CAPTURE;
if (!(aVisitor.mEvent->flags & NS_EVENT_FLAG_CANT_BUBBLE)) {
item = item->mParent;
while (item) {
nsISupports* newTarget = item->GetNewTarget();
if (newTarget) {
// Item is at anonymous boundary. Need to retarget for the current item
// and for parent items.
aVisitor.mEvent->target = newTarget;
}
item = item->mParent;
while (item) {
nsISupports* newTarget = item->GetNewTarget();
if (newTarget) {
// Item is at anonymous boundary. Need to retarget for the current item
// and for parent items.
aVisitor.mEvent->target = newTarget;
}
if (!(aVisitor.mEvent->flags & NS_EVENT_FLAG_CANT_BUBBLE) || newTarget) {
if ((!(aVisitor.mEvent->flags & NS_EVENT_FLAG_NO_CONTENT_DISPATCH) ||
item->ForceContentDispatch()) &&
(!(aFlags & NS_EVENT_FLAG_SYSTEM_EVENT) ||
@ -478,8 +478,8 @@ nsEventTargetChainItem::HandleEventTargetChain(nsEventChainPostVisitor& aVisitor
if (aFlags & NS_EVENT_FLAG_SYSTEM_EVENT) {
item->PostHandleEvent(aVisitor);
}
item = item->mParent;
}
item = item->mParent;
}
aVisitor.mEvent->flags &= ~NS_EVENT_FLAG_BUBBLE;