1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:28:12 +00:00

LibWeb: Add fast_is<Layout::InitialContainingBlockBox>

This is used by Layout::Node::containing_block() which is fairly hot.
This commit is contained in:
Andreas Kling 2021-08-18 11:44:05 +02:00
parent 1268b39ba0
commit a401a0f8fe
2 changed files with 6 additions and 0 deletions

View file

@ -31,7 +31,12 @@ public:
void recompute_selection_states();
private:
virtual bool is_initial_containing_block_box() const override { return true; }
LayoutRange m_selection;
};
template<>
inline bool Node::fast_is<InitialContainingBlockBox>() const { return is_initial_containing_block_box(); }
}