diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-05 13:24:35 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-05 19:15:20 +0200 |
commit | 762617a028e8355ea55ec2c13f12ab9d40ea9270 (patch) | |
tree | 1e6ff774f89c42f431eb6a3f2ad2ffcbb88c0f59 /Libraries/LibWeb/DOM/Element.cpp | |
parent | d8208fd37c8fe34f1e7eb73d27f732cb9be6ea82 (diff) | |
download | serenity-762617a028e8355ea55ec2c13f12ab9d40ea9270.zip |
LibWeb: Don't create a layout node for <noscript> when scripting enabled
This makes stuff inside <noscript> correctly not show up since we run
with scripting enabled.
In the future, we can add a way to disable scripting, but for now,
Document::is_scripting_enabled() just returns true.
Diffstat (limited to 'Libraries/LibWeb/DOM/Element.cpp')
-rw-r--r-- | Libraries/LibWeb/DOM/Element.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp index 24ddcfa793..41cf9c2587 100644 --- a/Libraries/LibWeb/DOM/Element.cpp +++ b/Libraries/LibWeb/DOM/Element.cpp @@ -114,6 +114,10 @@ RefPtr<LayoutNode> Element::create_layout_node(const StyleProperties* parent_sty if (display == "none") return nullptr; + + if (tag_name() == "noscript" && document().is_scripting_enabled()) + return nullptr; + if (display == "block") return adopt(*new LayoutBlock(this, move(style))); if (display == "inline") |