mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 380716, Crash [@ nsContentUtils::ContentIsDescendantOf], r+sr=jst
This commit is contained in:
parent
06fe86956c
commit
6575fbf571
@ -1904,13 +1904,17 @@ nsGenericElement::doPreHandleEvent(nsIContent* aContent,
|
||||
(aVisitor.mEvent->originalTarget == aContent &&
|
||||
(aVisitor.mRelatedTargetIsInAnon = IsInAnonContent(relatedTarget)))) {
|
||||
nsIContent* nonAnon = FindFirstNonAnonContent(aContent);
|
||||
nsIContent* nonAnonRelated = FindFirstNonAnonContent(relatedTarget);
|
||||
if (nonAnon == nonAnonRelated ||
|
||||
nsContentUtils::ContentIsDescendantOf(nonAnonRelated, nonAnon)) {
|
||||
aVisitor.mParentTarget = nsnull;
|
||||
// Event should not propagate to non-anon content.
|
||||
aVisitor.mCanHandle = isAnonForEvents;
|
||||
return NS_OK;
|
||||
if (nonAnon) {
|
||||
nsIContent* nonAnonRelated = FindFirstNonAnonContent(relatedTarget);
|
||||
if (nonAnonRelated) {
|
||||
if (nonAnon == nonAnonRelated ||
|
||||
nsContentUtils::ContentIsDescendantOf(nonAnonRelated, nonAnon)) {
|
||||
aVisitor.mParentTarget = nsnull;
|
||||
// Event should not propagate to non-anon content.
|
||||
aVisitor.mCanHandle = isAnonForEvents;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user