mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibWeb: Remove uses of obsolete PlatformObject::global_object()
This API is a relic from the time when it was important for objects to have easy access to the Window, and to know it was the global object. We now have more spec-related concepts like relevant_global_object and current_global_object to pull the Window out of thin air.
This commit is contained in:
committed by
Andreas Kling
parent
4df280689b
commit
02a56f6480
@@ -34,7 +34,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<CSSStyleSheet>> CSSStyleSheet::construct_im
|
||||
auto sheet = create(realm, CSSRuleList::create_empty(realm), CSS::MediaList::create(realm, {}), {});
|
||||
|
||||
// 2. Set sheet’s location to the base URL of the associated Document for the current global object.
|
||||
auto associated_document = sheet->global_object().document();
|
||||
auto associated_document = verify_cast<HTML::Window>(HTML::current_global_object()).document();
|
||||
sheet->set_location(MUST(associated_document->base_url().to_string()));
|
||||
|
||||
// 3. Set sheet’s stylesheet base URL to the baseURL attribute value from options.
|
||||
|
||||
Reference in New Issue
Block a user