LibWeb: Inline CSSStyleValue::to_keyword()

Shaves 120 ms of loading time off of https://wpt.fyi/
This commit is contained in:
Andreas Kling 2025-01-27 21:09:12 +01:00 committed by Andreas Kling
commit c53c781745
Notes: github-actions[bot] 2025-01-28 11:25:40 +00:00
9 changed files with 14 additions and 7 deletions

View file

@ -66,4 +66,11 @@ private:
Keyword m_keyword { Keyword::Invalid };
};
inline Keyword CSSStyleValue::to_keyword() const
{
if (is_keyword())
return static_cast<CSSKeywordValue const&>(*this).keyword();
return Keyword::Invalid;
}
}