mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:37:34 +00:00
LibWeb: Remove unused BrowsingContext::document_family*()
This commit is contained in:
parent
38cb15ff49
commit
8e669c14c8
2 changed files with 0 additions and 32 deletions
|
@ -747,35 +747,6 @@ BrowsingContext const* BrowsingContext::the_one_permitted_sandboxed_navigator()
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/browsers.html#document-family
|
|
||||||
Vector<JS::Handle<DOM::Document>> BrowsingContext::document_family() const
|
|
||||||
{
|
|
||||||
HashTable<DOM::Document*> documents;
|
|
||||||
for (auto& entry : m_session_history) {
|
|
||||||
if (!entry->document_state->document())
|
|
||||||
continue;
|
|
||||||
if (documents.set(const_cast<DOM::Document*>(entry->document_state->document().ptr())) == AK::HashSetResult::ReplacedExistingEntry)
|
|
||||||
continue;
|
|
||||||
for (auto& context : entry->document_state->document()->list_of_descendant_browsing_contexts()) {
|
|
||||||
for (auto& document : context->document_family()) {
|
|
||||||
documents.set(document.ptr());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector<JS::Handle<DOM::Document>> family;
|
|
||||||
for (auto* document : documents) {
|
|
||||||
family.append(*document);
|
|
||||||
}
|
|
||||||
return family;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/browsers.html#document-family
|
|
||||||
bool BrowsingContext::document_family_contains(DOM::Document const& document) const
|
|
||||||
{
|
|
||||||
return document_family().first_matching([&](auto& entry) { return entry.ptr() == &document; }).has_value();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BrowsingContext::append_child(JS::NonnullGCPtr<BrowsingContext> child)
|
void BrowsingContext::append_child(JS::NonnullGCPtr<BrowsingContext> child)
|
||||||
{
|
{
|
||||||
VERIFY(!child->m_parent);
|
VERIFY(!child->m_parent);
|
||||||
|
|
|
@ -191,9 +191,6 @@ public:
|
||||||
// https://html.spec.whatwg.org/multipage/origin.html#one-permitted-sandboxed-navigator
|
// https://html.spec.whatwg.org/multipage/origin.html#one-permitted-sandboxed-navigator
|
||||||
BrowsingContext const* the_one_permitted_sandboxed_navigator() const;
|
BrowsingContext const* the_one_permitted_sandboxed_navigator() const;
|
||||||
|
|
||||||
Vector<JS::Handle<DOM::Document>> document_family() const;
|
|
||||||
bool document_family_contains(DOM::Document const&) const;
|
|
||||||
|
|
||||||
bool has_been_discarded() const { return m_has_been_discarded; }
|
bool has_been_discarded() const { return m_has_been_discarded; }
|
||||||
|
|
||||||
Optional<AK::URL> const& creator_url() const { return m_creator_url; }
|
Optional<AK::URL> const& creator_url() const { return m_creator_url; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue