mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibWeb+WebContent: Remove unused code in BrowsingContext
This commit is contained in:
parent
cf7b775709
commit
184ae687c5
Notes:
github-actions[bot]
2025-02-18 06:38:18 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 184ae687c5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3607
Reviewed-by: https://github.com/trflynn89 ✅
4 changed files with 8 additions and 85 deletions
|
@ -6,24 +6,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
#include <LibGfx/Size.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibURL/Origin.h>
|
||||
#include <LibWeb/HTML/ActivateTab.h>
|
||||
#include <LibWeb/HTML/NavigableContainer.h>
|
||||
#include <LibWeb/HTML/SandboxingFlagSet.h>
|
||||
#include <LibWeb/HTML/SessionHistoryEntry.h>
|
||||
#include <LibWeb/HTML/TokenizedFeatures.h>
|
||||
#include <LibWeb/HTML/VisibilityState.h>
|
||||
#include <LibWeb/Platform/Timer.h>
|
||||
#include <LibWeb/TreeNode.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -42,58 +31,11 @@ public:
|
|||
|
||||
virtual ~BrowsingContext() override;
|
||||
|
||||
GC::Ref<HTML::TraversableNavigable> top_level_traversable() const;
|
||||
|
||||
GC::Ptr<BrowsingContext> first_child() const;
|
||||
GC::Ptr<BrowsingContext> next_sibling() const;
|
||||
GC::Ref<TraversableNavigable> top_level_traversable() const;
|
||||
|
||||
bool is_ancestor_of(BrowsingContext const&) const;
|
||||
bool is_familiar_with(BrowsingContext const&) const;
|
||||
|
||||
template<typename Callback>
|
||||
TraversalDecision for_each_in_inclusive_subtree(Callback callback) const
|
||||
{
|
||||
if (callback(*this) == TraversalDecision::Break)
|
||||
return TraversalDecision::Break;
|
||||
for (auto child = first_child(); child; child = child->next_sibling()) {
|
||||
if (child->for_each_in_inclusive_subtree(callback) == TraversalDecision::Break)
|
||||
return TraversalDecision::Break;
|
||||
}
|
||||
return TraversalDecision::Continue;
|
||||
}
|
||||
|
||||
template<typename Callback>
|
||||
TraversalDecision for_each_in_inclusive_subtree(Callback callback)
|
||||
{
|
||||
if (callback(*this) == TraversalDecision::Break)
|
||||
return TraversalDecision::Break;
|
||||
for (auto child = first_child(); child; child = child->next_sibling()) {
|
||||
if (child->for_each_in_inclusive_subtree(callback) == TraversalDecision::Break)
|
||||
return TraversalDecision::Break;
|
||||
}
|
||||
return TraversalDecision::Continue;
|
||||
}
|
||||
|
||||
template<typename Callback>
|
||||
TraversalDecision for_each_in_subtree(Callback callback) const
|
||||
{
|
||||
for (auto child = first_child(); child; child = child->next_sibling()) {
|
||||
if (child->for_each_in_inclusive_subtree(callback) == TraversalDecision::Break)
|
||||
return TraversalDecision::Break;
|
||||
}
|
||||
return TraversalDecision::Continue;
|
||||
}
|
||||
|
||||
template<typename Callback>
|
||||
TraversalDecision for_each_in_subtree(Callback callback)
|
||||
{
|
||||
for (auto child = first_child(); child; child = child->next_sibling()) {
|
||||
if (child->for_each_in_inclusive_subtree(callback) == TraversalDecision::Break)
|
||||
return TraversalDecision::Break;
|
||||
}
|
||||
return TraversalDecision::Continue;
|
||||
}
|
||||
|
||||
bool is_top_level() const;
|
||||
bool is_auxiliary() const { return m_is_auxiliary; }
|
||||
|
||||
|
@ -147,7 +89,7 @@ private:
|
|||
GC::Ref<Page> m_page;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/document-sequences.html#browsing-context
|
||||
GC::Ptr<HTML::WindowProxy> m_window_proxy;
|
||||
GC::Ptr<WindowProxy> m_window_proxy;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#opener-browsing-context
|
||||
GC::Ptr<BrowsingContext> m_opener_browsing_context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue