mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 16:27:35 +00:00
LibWeb: Add browsing context "still on its initial about:blank Document"
This commit is contained in:
parent
c4a0b7057b
commit
ffb23db57f
2 changed files with 14 additions and 0 deletions
|
@ -541,4 +541,15 @@ BrowsingContext* BrowsingContext::choose_a_browsing_context(StringView name, boo
|
||||||
return chosen;
|
return chosen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/dom.html#still-on-its-initial-about:blank-document
|
||||||
|
bool BrowsingContext::still_on_its_initial_about_blank_document() const
|
||||||
|
{
|
||||||
|
// A browsing context browsingContext is still on its initial about:blank Document
|
||||||
|
// if browsingContext's session history's size is 1
|
||||||
|
// and browsingContext's session history[0]'s document's is initial about:blank is true.
|
||||||
|
return m_session_history.size() == 1
|
||||||
|
&& m_session_history[0].document
|
||||||
|
&& m_session_history[0].document->is_initial_about_blank();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,6 +116,9 @@ public:
|
||||||
Vector<SessionHistoryEntry>& session_history() { return m_session_history; }
|
Vector<SessionHistoryEntry>& session_history() { return m_session_history; }
|
||||||
Vector<SessionHistoryEntry> const& session_history() const { return m_session_history; }
|
Vector<SessionHistoryEntry> const& session_history() const { return m_session_history; }
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/dom.html#still-on-its-initial-about:blank-document
|
||||||
|
bool still_on_its_initial_about_blank_document() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*);
|
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue