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

This commit is contained in:
Fedor 2020-10-02 10:34:38 +03:00
parent f4231994a9
commit ab0ae6cc24
1 changed files with 3 additions and 0 deletions

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;