mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Make CSSRule::type()
non-virtual
All its overrides return constants, and without virtual dispatch the `qualified_layer_name` and `absolutized_selectors` functions can benefit from slightly better optimizations. `CSSRule`s aren't allocated that often, so the memory impact is minimal.
This commit is contained in:
parent
2f41be733f
commit
5c1bbd3eff
Notes:
github-actions[bot]
2024-10-28 21:56:20 +00:00
Author: https://github.com/yyny
Commit: 5c1bbd3eff
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2025
30 changed files with 23 additions and 42 deletions
|
@ -19,7 +19,7 @@ JS::NonnullGCPtr<CSSPropertyRule> CSSPropertyRule::create(JS::Realm& realm, FlyS
|
|||
}
|
||||
|
||||
CSSPropertyRule::CSSPropertyRule(JS::Realm& realm, FlyString name, FlyString syntax, bool inherits, Optional<String> initial_value)
|
||||
: CSSRule(realm)
|
||||
: CSSRule(realm, Type::Property)
|
||||
, m_name(move(name))
|
||||
, m_syntax(move(syntax))
|
||||
, m_inherits(inherits)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue