1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:57:36 +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 JS::GCPtr<WindowProxy const> Window::parent() const
{ {
// 1. Let navigable be this's navigable. // 1. Let navigable be this's navigable.
auto* navigable = browsing_context(); auto navigable = this->navigable();
// 2. If navigable is null, then return null. // 2. If navigable is null, then return null.
if (!navigable) if (!navigable)
@ -913,7 +913,7 @@ JS::GCPtr<WindowProxy const> Window::parent() const
navigable = parent; navigable = parent;
// 4. Return navigable's active WindowProxy. // 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 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-frameelement