1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:17:35 +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

@ -13,7 +13,6 @@ namespace Web::Layout {
BreakNode::BreakNode(DOM::Document& document, HTML::HTMLBRElement& element, NonnullRefPtr<CSS::StyleProperties> style)
: Layout::NodeWithStyleAndBoxModelMetrics(document, &element, move(style))
{
set_inline(true);
}
BreakNode::~BreakNode() = default;

View file

@ -17,7 +17,6 @@ namespace Web::Layout {
InlineNode::InlineNode(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
: Layout::NodeWithStyleAndBoxModelMetrics(document, element, move(style))
{
set_inline(true);
}
InlineNode::~InlineNode() = default;

View file

@ -579,8 +579,6 @@ String Node::debug_description() const
return builder.to_string();
}
void Node::set_inline(bool) { }
bool Node::is_inline() const
{
if (!has_style()) {

View file

@ -68,9 +68,6 @@ public:
virtual bool can_have_children() const { return true; }
// FIXME: Remove this.
void set_inline(bool);
bool is_inline() const;
bool is_inline_block() const;

View file

@ -14,8 +14,6 @@ namespace Web::Layout {
ReplacedBox::ReplacedBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style)
: Box(document, &element, move(style))
{
// FIXME: Allow non-inline replaced elements.
set_inline(true);
}
ReplacedBox::~ReplacedBox() = default;

View file

@ -18,7 +18,6 @@ namespace Web::Layout {
TextNode::TextNode(DOM::Document& document, DOM::Text& text)
: Node(document, &text)
{
set_inline(true);
}
TextNode::~TextNode() = default;

View file

@ -254,8 +254,6 @@ void TreeBuilder::create_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
int child_index = layout_node->parent()->index_of_child<ListItemBox>(*layout_node).value();
auto marker_style = style_computer.compute_style(element, CSS::Selector::PseudoElement::Marker);
auto list_item_marker = adopt_ref(*new ListItemMarkerBox(document, layout_node->computed_values().list_style_type(), child_index + 1, *marker_style));
if (layout_node->first_child())
list_item_marker->set_inline(layout_node->first_child()->is_inline());
static_cast<ListItemBox&>(*layout_node).set_marker(list_item_marker);
element.set_pseudo_element_node({}, CSS::Selector::PseudoElement::Marker, list_item_marker);
layout_node->append_child(move(list_item_marker));