mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:12:08 +00:00
LibWeb: Delete unused document_tree_child_browsing_context_count()
The function is no longer needed with navigables.
This commit is contained in:
parent
605d24ef7d
commit
6665f0db43
4 changed files with 0 additions and 30 deletions
|
@ -881,20 +881,6 @@ BrowsingContext::ChosenBrowsingContext BrowsingContext::choose_a_browsing_contex
|
||||||
return { chosen.ptr(), window_type };
|
return { chosen.ptr(), window_type };
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/browsers.html#document-tree-child-browsing-context
|
|
||||||
size_t BrowsingContext::document_tree_child_browsing_context_count() const
|
|
||||||
{
|
|
||||||
size_t count = 0;
|
|
||||||
|
|
||||||
// A browsing context child is a document-tree child browsing context of parent if child is a child browsing context and child's container is in a document tree.
|
|
||||||
for_each_child([this, &count](BrowsingContext const& child) {
|
|
||||||
if (child.is_child_of(*this) && child.container()->in_a_document_tree())
|
|
||||||
++count;
|
|
||||||
});
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/browsers.html#child-browsing-context
|
// https://html.spec.whatwg.org/multipage/browsers.html#child-browsing-context
|
||||||
bool BrowsingContext::is_child_of(BrowsingContext const& parent) const
|
bool BrowsingContext::is_child_of(BrowsingContext const& parent) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -169,8 +169,6 @@ public:
|
||||||
|
|
||||||
ChosenBrowsingContext choose_a_browsing_context(StringView name, TokenizedFeature::NoOpener no_opener, ActivateTab = ActivateTab::Yes);
|
ChosenBrowsingContext choose_a_browsing_context(StringView name, TokenizedFeature::NoOpener no_opener, ActivateTab = ActivateTab::Yes);
|
||||||
|
|
||||||
size_t document_tree_child_browsing_context_count() const;
|
|
||||||
|
|
||||||
bool is_child_of(BrowsingContext const&) const;
|
bool is_child_of(BrowsingContext const&) const;
|
||||||
|
|
||||||
HTML::NavigableContainer* container() { return m_container; }
|
HTML::NavigableContainer* container() { return m_container; }
|
||||||
|
|
|
@ -1394,16 +1394,4 @@ JS::NonnullGCPtr<CustomElementRegistry> Window::custom_elements()
|
||||||
return JS::NonnullGCPtr { *m_custom_element_registry };
|
return JS::NonnullGCPtr { *m_custom_element_registry };
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/window-object.html#number-of-document-tree-child-browsing-contexts
|
|
||||||
size_t Window::document_tree_child_browsing_context_count() const
|
|
||||||
{
|
|
||||||
// 1. If W's browsing context is null, then return 0.
|
|
||||||
auto* this_browsing_context = associated_document().browsing_context();
|
|
||||||
if (!this_browsing_context)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// 2. Return the number of document-tree child browsing contexts of W's browsing context.
|
|
||||||
return this_browsing_context->document_tree_child_browsing_context_count();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,8 +85,6 @@ public:
|
||||||
|
|
||||||
JS::GCPtr<Navigable> navigable() const;
|
JS::GCPtr<Navigable> navigable() const;
|
||||||
|
|
||||||
size_t document_tree_child_browsing_context_count() const;
|
|
||||||
|
|
||||||
ImportMap const& import_map() const { return m_import_map; }
|
ImportMap const& import_map() const { return m_import_map; }
|
||||||
|
|
||||||
bool import_maps_allowed() const { return m_import_maps_allowed; }
|
bool import_maps_allowed() const { return m_import_maps_allowed; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue