1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:17:42 +00:00

LibWeb: Update Window::parent() to use navigables

This commit is contained in:
Aliaksandr Kalenik 2023-09-07 12:52:01 +02:00 committed by Andreas Kling
parent 8d82dc3a9f
commit e54071ce89

View file

@ -902,7 +902,7 @@ JS::GCPtr<WindowProxy const> Window::top() const
JS::GCPtr<WindowProxy const> Window::parent() const
{
// 1. Let navigable be this's navigable.
auto* navigable = browsing_context();
auto navigable = this->navigable();
// 2. If navigable is null, then return null.
if (!navigable)
@ -913,7 +913,7 @@ JS::GCPtr<WindowProxy const> Window::parent() const
navigable = parent;
// 4. Return navigable's active WindowProxy.
return navigable->window_proxy();
return navigable->active_window_proxy();
}
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-frameelement