mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +00:00
LibWeb: Add some fast_is<T> helpers for hot classes on GitHub :^)
This commit is contained in:
parent
74fda2a761
commit
afc5fade05
5 changed files with 16 additions and 0 deletions
|
@ -32,9 +32,14 @@ public:
|
|||
virtual bool can_have_children() const override { return false; }
|
||||
|
||||
private:
|
||||
virtual bool is_replaced_box() const final { return true; }
|
||||
|
||||
Optional<float> m_intrinsic_width;
|
||||
Optional<float> m_intrinsic_height;
|
||||
Optional<float> m_intrinsic_aspect_ratio;
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<ReplacedBox>() const { return is_replaced_box(); }
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue