From bd119b92f16be6eaf3a95f0aec73ac87dd5771e7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Mon, 14 Aug 2023 20:17:21 +0200 Subject: [PATCH] LibWeb: Update Document::is_active() for navigables --- Userland/Libraries/LibWeb/DOM/Document.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index bf111557f6..154d6cdac3 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -2025,11 +2025,9 @@ bool Document::is_fully_active() const return false; } -// https://html.spec.whatwg.org/multipage/browsers.html#active-document bool Document::is_active() const { - // A browsing context's active document is its active window's associated Document. - return browsing_context() && browsing_context()->active_document() == this; + return navigable() && navigable()->active_document() == this; } // https://html.spec.whatwg.org/multipage/history.html#dom-document-location