LibWeb: Add content navigable in NavigableContainer

"Each navigable container has a content navigable, which is either a
navigable or null. It is initially null."
This commit is contained in:
Aliaksandr Kalenik 2023-06-21 15:45:41 +03:00 committed by Andreas Kling
commit 21e383c24f
Notes: sideshowbarker 2024-07-17 02:55:44 +09:00

View file

@ -18,6 +18,9 @@ public:
static HashTable<NavigableContainer*>& all_instances();
JS::GCPtr<Navigable> content_navigable() { return m_content_navigable; }
JS::GCPtr<Navigable const> content_navigable() const { return m_content_navigable.ptr(); }
BrowsingContext* nested_browsing_context() { return m_nested_browsing_context; }
BrowsingContext const* nested_browsing_context() const { return m_nested_browsing_context; }
@ -43,6 +46,9 @@ protected:
JS::GCPtr<BrowsingContext> m_nested_browsing_context;
// https://html.spec.whatwg.org/multipage/document-sequences.html#content-navigable
JS::GCPtr<Navigable> m_content_navigable { nullptr };
private:
virtual bool is_navigable_container() const override { return true; }
};