mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
LibWeb: Add Layout::Node::is_table() and make is<TableBox>() fast
This commit is contained in:
parent
3dd006f719
commit
aa19c4a340
2 changed files with 7 additions and 0 deletions
|
@ -92,6 +92,7 @@ public:
|
|||
virtual bool is_replaced_box() const { return false; }
|
||||
virtual bool is_list_item_marker_box() const { return false; }
|
||||
virtual bool is_table_wrapper() const { return false; }
|
||||
virtual bool is_table() const { return false; }
|
||||
|
||||
template<typename T>
|
||||
bool fast_is() const = delete;
|
||||
|
|
|
@ -24,6 +24,12 @@ public:
|
|||
return CSS::Display::from_short(CSS::Display::Short::InlineTable);
|
||||
return CSS::Display::from_short(CSS::Display::Short::Table);
|
||||
}
|
||||
|
||||
private:
|
||||
virtual bool is_table() const override { return true; }
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<TableBox>() const { return is_table(); }
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue