1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

LibWeb: Add fast_is<T> for CSSRule subclasses

Since we already have a type enum for these, let's use it to make
is<T> bypass dynamic_cast for CSS rules.

These were often near the top of random browser profiles.
This commit is contained in:
Andreas Kling 2021-03-18 21:50:52 +01:00
parent a078733865
commit 0d8c9024ee
3 changed files with 9 additions and 0 deletions

View file

@ -47,6 +47,9 @@ public:
virtual StringView class_name() const = 0;
virtual Type type() const = 0;
template<typename T>
bool fast_is() const = delete;
private:
};