Bug 252631 - allow multiple onloads in svg content. r=sicking, sr=jst
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user