mirror of
https://github.com/RGBCube/serenity
synced 2025-06-30 15:02:06 +00:00
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.
This commit is contained in:
parent
d8208fd37c
commit
762617a028
2 changed files with 6 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue