diff options
author | Moonchild <moonchild@palemoon.org> | 2020-09-23 23:45:46 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-09-23 23:45:46 +0000 |
commit | 9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f (patch) | |
tree | 831e0ae1649d6135429def03688bc93ff7c86b03 /parser/html/nsHtml5TreeBuilderCppSupplement.h | |
parent | 42f895f27f239e973c9c06241f7a58da7381353c (diff) | |
parent | f624bd1375655dea196cdcb70a9860bc5817df49 (diff) | |
download | UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.tar UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.tar.gz UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.tar.lz UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.tar.xz UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.zip |
Merge branch 'redwood' into releaseRELBASE_20200929RC_20200924
Diffstat (limited to 'parser/html/nsHtml5TreeBuilderCppSupplement.h')
-rw-r--r-- | parser/html/nsHtml5TreeBuilderCppSupplement.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/parser/html/nsHtml5TreeBuilderCppSupplement.h b/parser/html/nsHtml5TreeBuilderCppSupplement.h index 9709396c7..51966077c 100644 --- a/parser/html/nsHtml5TreeBuilderCppSupplement.h +++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h @@ -171,6 +171,8 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace, nsIAtom* aName, aAttributes->contains(nsHtml5AttributeName::ATTR_ASYNC); bool defer = aAttributes->contains(nsHtml5AttributeName::ATTR_DEFER); + bool noModule = + aAttributes->contains(nsHtml5AttributeName::ATTR_NOMODULE); mSpeculativeLoadQueue.AppendElement()->InitScript( url, charset, @@ -179,7 +181,8 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace, nsIAtom* aName, integrity, mode == NS_HTML5TREE_BUILDER_IN_HEAD, async, - defer); + defer, + noModule); mCurrentHtmlScriptIsAsyncOrDefer = async || defer; } } else if (nsHtml5Atoms::link == aName) { @@ -285,7 +288,8 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace, nsIAtom* aName, integrity, mode == NS_HTML5TREE_BUILDER_IN_HEAD, false /* async */, - false /* defer */); + false /* defer */, + false /* noModule */); } } else if (nsHtml5Atoms::style == aName) { nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement(); @@ -918,6 +922,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; |