mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Inline CSSStyleValue::to_keyword()
Shaves 120 ms of loading time off of https://wpt.fyi/
This commit is contained in:
committed by
Andreas Kling
parent
30cbd4bcfb
commit
c53c781745
Notes:
github-actions[bot]
2025-01-28 11:25:40 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/c53c7817451 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3377
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user