1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

LibWeb: Remove unecessary dependence on Window from HTML classes

These classes only needed Window to get at its realm. Pass a realm
directly to construct HTML classes.
This commit is contained in:
Andrew Kaster 2022-09-25 16:38:21 -06:00 committed by Linus Groh
parent a2ccb00e1d
commit f0c5f77f99
122 changed files with 334 additions and 317 deletions

View file

@ -368,8 +368,10 @@ void EventLoop::unregister_environment_settings_object(Badge<EnvironmentSettings
Vector<JS::Handle<HTML::Window>> EventLoop::same_loop_windows() const
{
Vector<JS::Handle<HTML::Window>> windows;
for (auto& document : documents_in_this_event_loop())
windows.append(JS::make_handle(document->window()));
for (auto& document : documents_in_this_event_loop()) {
if (document->is_fully_active())
windows.append(JS::make_handle(document->window()));
}
return windows;
}