LibWeb: Add type casting helpers for Layout::InlineNode

This commit is contained in:
Andreas Kling 2020-12-03 19:14:41 +01:00
parent 17e9a5e0c5
commit d6c2a61fa1
Notes: sideshowbarker 2024-07-19 01:04:29 +09:00
2 changed files with 8 additions and 0 deletions

View file

@ -35,6 +35,13 @@ public:
InlineNode(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>);
virtual ~InlineNode() override;
virtual const char* class_name() const override { return "InlineNode"; }
private:
virtual bool is_inline_node() const final { return true; }
};
}
AK_BEGIN_TYPE_TRAITS(Web::Layout::InlineNode)
static bool is_type(const Web::Layout::Node& layout_node) { return layout_node.is_inline_node(); }
AK_END_TYPE_TRAITS()

View file

@ -101,6 +101,7 @@ public:
virtual bool is_check_box() const { return false; }
virtual bool is_button() const { return false; }
virtual bool is_list_item() const { return false; }
virtual bool is_inline_node() const { return false; }
bool has_style() const { return m_has_style; }
virtual bool can_have_children() const { return true; }