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:
Andrew Kaster 2024-09-04 19:22:48 -06:00 committed by Andreas Kling
commit 02a56f6480
Notes: github-actions[bot] 2024-09-07 09:40:02 +00:00
10 changed files with 36 additions and 28 deletions

View file

@ -30,7 +30,7 @@ InternalAnimationTimeline::InternalAnimationTimeline(JS::Realm& realm)
{
m_current_time = 0.0;
auto& document = static_cast<HTML::Window&>(global_object()).associated_document();
auto& document = verify_cast<HTML::Window>(HTML::relevant_global_object(*this)).associated_document();
document.associate_with_timeline(*this);
}