Bug 370210 - SVG onload attribute broken since incremental XML landing.
r=hsivonen, sr=sicking git-svn-id: svn://10.0.0.236/trunk@221077 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c383fc5cc0
commit
cd7fb65143
@ -1099,18 +1099,6 @@ nsXMLContentSink::HandleEndElement(const PRUnichar *aName)
|
||||
mState = eXMLContentSinkState_InEpilog;
|
||||
}
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
if (content->GetNameSpaceID() == kNameSpaceID_SVG &&
|
||||
content->HasAttr(kNameSpaceID_None, nsGkAtoms::onload)) {
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent event(PR_TRUE, NS_SVG_LOAD);
|
||||
event.eventStructType = NS_SVG_EVENT;
|
||||
nsIPresShell *presShell = mDocument->GetShellAt(0);
|
||||
if (presShell)
|
||||
presShell->HandleDOMEventWithTarget(content, &event, &status);
|
||||
}
|
||||
#endif
|
||||
|
||||
PRInt32 stackLen = mContentStack.Length();
|
||||
if (mNotifyLevel >= stackLen) {
|
||||
if (numFlushed < content->GetChildCount()) {
|
||||
@ -1120,6 +1108,20 @@ nsXMLContentSink::HandleEndElement(const PRUnichar *aName)
|
||||
}
|
||||
DidAddContent();
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
if (content->GetNameSpaceID() == kNameSpaceID_SVG &&
|
||||
content->HasAttr(kNameSpaceID_None, nsGkAtoms::onload)) {
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsEvent event(PR_TRUE, NS_SVG_LOAD);
|
||||
event.eventStructType = NS_SVG_EVENT;
|
||||
nsIPresShell *presShell = mDocument->GetShellAt(0);
|
||||
if (presShell) {
|
||||
FlushTags();
|
||||
presShell->HandleDOMEventWithTarget(content, &event, &status);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return NS_SUCCEEDED(result) ? DidProcessATokenImpl() : result;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user