mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-22 19:12:53 +00:00
LibWeb/CSS: Combine the CSSRuleList constructors
This commit is contained in:
parent
3d1665cc80
commit
9465492edf
Notes:
github-actions[bot]
2025-04-23 10:40:08 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9465492edf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4354
7 changed files with 19 additions and 25 deletions
|
@ -33,7 +33,7 @@ GC::Ref<CSSStyleSheet> CSSStyleSheet::create(JS::Realm& realm, CSSRuleList& rule
|
|||
WebIDL::ExceptionOr<GC::Ref<CSSStyleSheet>> CSSStyleSheet::construct_impl(JS::Realm& realm, Optional<CSSStyleSheetInit> const& options)
|
||||
{
|
||||
// 1. Construct a new CSSStyleSheet object sheet.
|
||||
auto sheet = create(realm, CSSRuleList::create_empty(realm), CSS::MediaList::create(realm, {}), {});
|
||||
auto sheet = create(realm, CSSRuleList::create(realm), CSS::MediaList::create(realm, {}), {});
|
||||
|
||||
// 2. Set sheet’s location to the base URL of the associated Document for the current principal global object.
|
||||
auto associated_document = as<HTML::Window>(HTML::current_principal_global_object()).document();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue