LibWeb: Don't generate a layout node for <input type="hidden">

This commit is contained in:
Andreas Kling 2020-05-04 22:33:49 +02:00
parent 8fae4ee931
commit 6886c6efa6
Notes: sideshowbarker 2024-07-19 06:59:22 +09:00

View file

@ -52,6 +52,9 @@ RefPtr<LayoutNode> HTMLInputElement::create_layout_node(const StyleProperties*)
ASSERT(frame.html_view());
auto& html_view = const_cast<HtmlView&>(*frame.html_view());
if (type() == "hidden")
return nullptr;
RefPtr<GUI::Widget> widget;
if (type() == "submit") {
auto& button = html_view.add<GUI::Button>(value());