[SVG] Only fire the SVG onload when scripting is enabled and allowed

This commit is contained in:
Moonchild 2020-09-23 01:02:29 +00:00 committed by roytam1
commit ba9802a724

View file

@ -945,6 +945,9 @@ nsHtml5TreeBuilder::elementPopped(int32_t aNamespace, nsIAtom* aName, nsIContent
}
if (aNamespace == kNameSpaceID_SVG) {
if (aName == nsHtml5Atoms::svg) {
if (!scriptingEnabled || mPreventScriptExecution) {
return;
}
if (mBuilder) {
nsHtml5TreeOperation::SvgLoad(static_cast<nsIContent*>(aElement));
return;