diff --git a/Libraries/LibWeb/DOM/HTMLInputElement.cpp b/Libraries/LibWeb/DOM/HTMLInputElement.cpp index 5523d9d287..bf77944f57 100644 --- a/Libraries/LibWeb/DOM/HTMLInputElement.cpp +++ b/Libraries/LibWeb/DOM/HTMLInputElement.cpp @@ -46,7 +46,7 @@ HTMLInputElement::~HTMLInputElement() { } -RefPtr HTMLInputElement::create_layout_node(const StyleProperties*) const +RefPtr HTMLInputElement::create_layout_node(const StyleProperties* parent_style) const { ASSERT(document().frame()); auto& frame = *document().frame(); @@ -55,6 +55,11 @@ RefPtr HTMLInputElement::create_layout_node(const StyleProperties*) if (type() == "hidden") return nullptr; + auto style = document().style_resolver().resolve_style(*this, parent_style); + auto display = style->string_or_fallback(CSS::PropertyID::Display, "inline"); + if (display == "none") + return nullptr; + RefPtr widget; if (type() == "submit") { auto& button = page_view.add(value());