Bug 223393, DOMAttrModified mutation events fired on HTMLHtmlElement while page loads (anonymous content), r+sr=sicking

This commit is contained in:
Olli.Pettay@helsinki.fi
2006-08-03 08:57:02 +00:00
parent 5c06144872
commit f1308dce8e
4 changed files with 33 additions and 11 deletions

View File

@@ -329,8 +329,10 @@ nsIContent::SetNativeAnonymous(PRBool aAnonymous)
{
if (aAnonymous) {
SetFlags(NODE_IS_ANONYMOUS);
SetFlags(NODE_IS_ANONYMOUS_FOR_EVENTS);
} else {
UnsetFlags(NODE_IS_ANONYMOUS);
UnsetFlags(NODE_IS_ANONYMOUS_FOR_EVENTS);
}
}
@@ -2013,7 +2015,7 @@ nsGenericElement::doPreHandleEvent(nsIContent* aContent,
//FIXME! Document how this event retargeting works, Bug 329124.
aVisitor.mCanHandle = PR_TRUE;
nsCOMPtr<nsIContent> parent = aContent->GetParent();
if (aContent->IsNativeAnonymous()) {
if (aContent->IsAnonymousForEvents()) {
// Don't propagate mutation events which are dispatched somewhere inside
// native anonymous content.
if (aVisitor.mEvent->eventStructType == NS_MUTATION_EVENT) {