mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:27:43 +00:00
LibWeb: Specialize is<DOM::Element>() and is<Layout::Box>()
These two show up in profiles, so let's add specializations for them.
This commit is contained in:
parent
d3046a2649
commit
0fd577084f
3 changed files with 22 additions and 0 deletions
|
@ -123,6 +123,8 @@ protected:
|
|||
Vector<LineBox> m_line_boxes;
|
||||
|
||||
private:
|
||||
virtual bool is_box() const final { return true; }
|
||||
|
||||
Gfx::FloatPoint m_offset;
|
||||
Gfx::FloatSize m_size;
|
||||
|
||||
|
@ -133,3 +135,12 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
namespace AK {
|
||||
template<>
|
||||
inline bool is<Web::Layout::Box>(const Web::Layout::Node& input)
|
||||
{
|
||||
return input.is_box();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue