mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 00:13:02 +00:00
LibWeb: Inline CSSStyleValue::to_keyword()
Shaves 120 ms of loading time off of https://wpt.fyi/
This commit is contained in:
parent
30cbd4bcfb
commit
c53c781745
Notes:
github-actions[bot]
2025-01-28 11:25:40 +00:00
Author: https://github.com/awesomekling
Commit: c53c781745
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3377
9 changed files with 14 additions and 7 deletions
|
@ -364,13 +364,6 @@ bool CSSStyleValue::has_auto() const
|
|||
return is_keyword() && as_keyword().keyword() == Keyword::Auto;
|
||||
}
|
||||
|
||||
Keyword CSSStyleValue::to_keyword() const
|
||||
{
|
||||
if (is_keyword())
|
||||
return as_keyword().keyword();
|
||||
return Keyword::Invalid;
|
||||
}
|
||||
|
||||
int CSSStyleValue::to_font_weight() const
|
||||
{
|
||||
if (is_keyword()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue