1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

LibWeb: Add fast_is<T>() for various types stood out in a profile

This commit is contained in:
Andreas Kling 2023-03-10 21:16:18 +01:00
parent f6426cdcd4
commit 1cf5737e9e
8 changed files with 48 additions and 0 deletions

View file

@ -25,6 +25,12 @@ public:
virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
virtual void prepare_for_replaced_layout() override;
private:
virtual bool is_svg_svg_box() const final { return true; }
};
template<>
inline bool Node::fast_is<SVGSVGBox>() const { return is_svg_svg_box(); }
}