mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibWeb: Add type casting helpers for Layout::InlineNode
This commit is contained in:
parent
17e9a5e0c5
commit
d6c2a61fa1
Notes:
sideshowbarker
2024-07-19 01:04:29 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d6c2a61fa19
2 changed files with 8 additions and 0 deletions
|
@ -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()
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Add table
Reference in a new issue