mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +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:
parent
a078733865
commit
0d8c9024ee
3 changed files with 9 additions and 0 deletions
|
@ -60,4 +60,7 @@ private:
|
|||
RefPtr<CSSStyleSheet> m_style_sheet;
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool CSSRule::fast_is<CSSImportRule>() const { return type() == CSSRule::Type::Import; }
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue