1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:07:36 +00:00

LibWeb: Remove Layout::Node::set_inline()

Now that this flag is no longer used, we can stop setting it.
This commit is contained in:
Andreas Kling 2022-10-06 14:56:48 +02:00
parent 8a3ca6416d
commit a0e6882d99
12 changed files with 7 additions and 34 deletions

View file

@ -87,11 +87,7 @@ void HTMLImageElement::parse_attribute(FlyString const& name, String const& valu
RefPtr<Layout::Node> HTMLImageElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
{
auto display = style->display();
auto layout_node = adopt_ref(*new Layout::ImageBox(document(), *this, move(style), m_image_loader));
if (display.is_block_outside())
layout_node->set_inline(false);
return layout_node;
return adopt_ref(*new Layout::ImageBox(document(), *this, move(style), m_image_loader));
}
Gfx::Bitmap const* HTMLImageElement::bitmap() const

View file

@ -65,9 +65,7 @@ RefPtr<Layout::Node> HTMLInputElement::create_layout_node(NonnullRefPtr<CSS::Sty
if (type_state() == TypeAttributeState::RadioButton)
return adopt_ref(*new Layout::RadioButton(document(), *this, move(style)));
auto layout_node = adopt_ref(*new Layout::BlockContainer(document(), this, move(style)));
layout_node->set_inline(true);
return layout_node;
return adopt_ref(*new Layout::BlockContainer(document(), this, move(style)));
}
void HTMLInputElement::set_checked(bool checked, ChangeSource change_source)

View file

@ -20,9 +20,7 @@ HTMLLabelElement::~HTMLLabelElement() = default;
RefPtr<Layout::Node> HTMLLabelElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
{
auto layout_node = adopt_ref(*new Layout::Label(document(), this, move(style)));
layout_node->set_inline(true);
return layout_node;
return adopt_ref(*new Layout::Label(document(), this, move(style)));
}
}

View file

@ -25,14 +25,10 @@ HTMLProgressElement::~HTMLProgressElement() = default;
RefPtr<Layout::Node> HTMLProgressElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
{
RefPtr<Layout::Node> layout_node;
if (style->appearance().value_or(CSS::Appearance::Auto) == CSS::Appearance::None) {
layout_node = adopt_ref(*new Layout::BlockContainer(document(), this, move(style)));
layout_node->set_inline(true);
} else {
layout_node = adopt_ref(*new Layout::Progress(document(), *this, move(style)));
return adopt_ref(*new Layout::BlockContainer(document(), this, move(style)));
}
return layout_node;
return adopt_ref(*new Layout::Progress(document(), *this, move(style)));
}
bool HTMLProgressElement::using_system_appearance() const