mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibWeb: Make CSSStyleRule::declaration() return a more specific type
This removes the need for some hot verify_casts in StyleComputer.
This commit is contained in:
parent
7c9368f402
commit
ce2bfb4a12
Notes:
sideshowbarker
2024-07-17 01:55:29 +09:00
Author: https://github.com/awesomekling
Commit: ce2bfb4a12
Pull-request: https://github.com/SerenityOS/serenity/pull/23637
4 changed files with 11 additions and 12 deletions
|
@ -14,12 +14,12 @@ namespace Web::CSS {
|
|||
|
||||
JS_DEFINE_ALLOCATOR(CSSStyleRule);
|
||||
|
||||
JS::NonnullGCPtr<CSSStyleRule> CSSStyleRule::create(JS::Realm& realm, Vector<NonnullRefPtr<Web::CSS::Selector>>&& selectors, CSSStyleDeclaration& declaration)
|
||||
JS::NonnullGCPtr<CSSStyleRule> CSSStyleRule::create(JS::Realm& realm, Vector<NonnullRefPtr<Web::CSS::Selector>>&& selectors, PropertyOwningCSSStyleDeclaration& declaration)
|
||||
{
|
||||
return realm.heap().allocate<CSSStyleRule>(realm, realm, move(selectors), declaration);
|
||||
}
|
||||
|
||||
CSSStyleRule::CSSStyleRule(JS::Realm& realm, Vector<NonnullRefPtr<Selector>>&& selectors, CSSStyleDeclaration& declaration)
|
||||
CSSStyleRule::CSSStyleRule(JS::Realm& realm, Vector<NonnullRefPtr<Selector>>&& selectors, PropertyOwningCSSStyleDeclaration& declaration)
|
||||
: CSSRule(realm)
|
||||
, m_selectors(move(selectors))
|
||||
, m_declaration(declaration)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue