mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibWeb: Add support for HTML input type=radio
This commit is contained in:
parent
274e94224d
commit
b50de19cd3
Notes:
sideshowbarker
2024-07-18 20:52:24 +09:00
Author: https://github.com/trflynn89
Commit: b50de19cd3
Pull-request: https://github.com/SerenityOS/serenity/pull/6089
5 changed files with 187 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
|||
#include <LibWeb/Layout/BlockBox.h>
|
||||
#include <LibWeb/Layout/ButtonBox.h>
|
||||
#include <LibWeb/Layout/CheckBox.h>
|
||||
#include <LibWeb/Layout/RadioButton.h>
|
||||
#include <LibWeb/Page/Frame.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
@ -77,6 +78,9 @@ RefPtr<Layout::Node> HTMLInputElement::create_layout_node()
|
|||
if (type() == "checkbox")
|
||||
return adopt(*new Layout::CheckBox(document(), *this, move(style)));
|
||||
|
||||
if (type() == "radio")
|
||||
return adopt(*new Layout::RadioButton(document(), *this, move(style)));
|
||||
|
||||
create_shadow_tree_if_needed();
|
||||
auto layout_node = adopt(*new Layout::BlockBox(document(), this, move(style)));
|
||||
layout_node->set_inline(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue