mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
LibWeb: Add BrowsingContext::container_document()
This is the "browsing context container document" from the spec.
This commit is contained in:
parent
d1100dd6bc
commit
71d7c8a353
2 changed files with 17 additions and 0 deletions
|
@ -348,4 +348,18 @@ bool BrowsingContext::decrement_cursor_position_offset()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DOM::Document* BrowsingContext::container_document()
|
||||||
|
{
|
||||||
|
if (auto* container = this->container())
|
||||||
|
return &container->document();
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
DOM::Document const* BrowsingContext::container_document() const
|
||||||
|
{
|
||||||
|
if (auto* container = this->container())
|
||||||
|
return &container->document();
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,9 @@ public:
|
||||||
void set_frame_nesting_levels(HashMap<URL, size_t> frame_nesting_levels) { m_frame_nesting_levels = move(frame_nesting_levels); };
|
void set_frame_nesting_levels(HashMap<URL, size_t> frame_nesting_levels) { m_frame_nesting_levels = move(frame_nesting_levels); };
|
||||||
HashMap<URL, size_t> const& frame_nesting_levels() const { return m_frame_nesting_levels; }
|
HashMap<URL, size_t> const& frame_nesting_levels() const { return m_frame_nesting_levels; }
|
||||||
|
|
||||||
|
DOM::Document* container_document();
|
||||||
|
DOM::Document const* container_document() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*, BrowsingContext& top_level_browsing_context);
|
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*, BrowsingContext& top_level_browsing_context);
|
||||||
explicit BrowsingContext(HTML::BrowsingContextContainer&, BrowsingContext& top_level_browsing_context);
|
explicit BrowsingContext(HTML::BrowsingContextContainer&, BrowsingContext& top_level_browsing_context);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue