Переглянути джерело

LibWeb: Update Document::is_active() for navigables

Aliaksandr Kalenik 1 рік тому
батько
коміт
bd119b92f1
1 змінених файлів з 1 додано та 3 видалено
  1. 1 3
      Userland/Libraries/LibWeb/DOM/Document.cpp

+ 1 - 3
Userland/Libraries/LibWeb/DOM/Document.cpp

@@ -2025,11 +2025,9 @@ bool Document::is_fully_active() const
     return false;
     return false;
 }
 }
 
 
-// https://html.spec.whatwg.org/multipage/browsers.html#active-document
 bool Document::is_active() const
 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
 // https://html.spec.whatwg.org/multipage/history.html#dom-document-location