Bug 252631 - allow multiple onloads in svg content. r=sicking, sr=jst

This commit is contained in:
tor@cs.brown.edu
2005-01-26 14:28:21 +00:00
parent 7710c43cfa
commit 8508bbc2dd
3 changed files with 15 additions and 25 deletions

View File

@@ -99,6 +99,7 @@
#ifdef MOZ_SVG
#include "nsSVGAtoms.h"
#include "nsGUIEvent.h"
#endif
#define kXSLType "text/xsl"
@@ -1052,6 +1053,17 @@ nsXMLContentSink::HandleEndElement(const PRUnichar *aName)
result = NS_ERROR_HTMLPARSER_BLOCK;
}
#ifdef MOZ_SVG
if (content->GetNameSpaceID() == kNameSpaceID_SVG &&
content->HasAttr(kNameSpaceID_None, nsSVGAtoms::onload)) {
nsEventStatus status = nsEventStatus_eIgnore;
nsEvent event(NS_PAGE_LOAD);
nsIPresShell *presShell = mDocument->GetShellAt(0);
if (presShell)
presShell->HandleDOMEventWithTarget(content, &event, &status);
}
#endif
return result;
}