summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-23 01:02:29 +0000
committerMoonchild <moonchild@palemoon.org>2020-09-23 01:02:29 +0000
commit4d999e03a305999bb83946f7c947998237e2534c (patch)
tree37238b70f89e8e961f6f823dbeed627a4dcf2d6b
parent04ccc4b12407c4fd747eeea67bed4b919dd2ca77 (diff)
downloaduxp-4d999e03a305999bb83946f7c947998237e2534c.tar.gz
[SVG] Only fire the SVG onload when scripting is enabled and allowed
-rw-r--r--parser/html/nsHtml5TreeBuilderCppSupplement.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/parser/html/nsHtml5TreeBuilderCppSupplement.h b/parser/html/nsHtml5TreeBuilderCppSupplement.h
index aa6767e427..96b69e4b1a 100644
--- a/parser/html/nsHtml5TreeBuilderCppSupplement.h
+++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h
@@ -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;