LibWeb: Remove BrowsingContext pointer from Layout::Node

It's no longer needed.
This commit is contained in:
Aliaksandr Kalenik 2024-10-14 03:09:14 +02:00 committed by Andreas Kling
parent 55f0dc823f
commit 910f9c2c09
Notes: github-actions[bot] 2024-10-14 05:13:31 +00:00
2 changed files with 0 additions and 20 deletions

View file

@ -11,7 +11,6 @@
#include <LibWeb/CSS/StyleValues/BackgroundSizeStyleValue.h>
#include <LibWeb/CSS/StyleValues/BorderRadiusStyleValue.h>
#include <LibWeb/CSS/StyleValues/CSSKeywordValue.h>
#include <LibWeb/CSS/StyleValues/EdgeStyleValue.h>
#include <LibWeb/CSS/StyleValues/IntegerStyleValue.h>
#include <LibWeb/CSS/StyleValues/LengthStyleValue.h>
#include <LibWeb/CSS/StyleValues/MathDepthStyleValue.h>
@ -23,7 +22,6 @@
#include <LibWeb/CSS/StyleValues/URLStyleValue.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Dump.h>
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/HTML/HTMLHtmlElement.h>
#include <LibWeb/Layout/BlockContainer.h>
#include <LibWeb/Layout/FormattingContext.h>
@ -31,7 +29,6 @@
#include <LibWeb/Layout/TableWrapper.h>
#include <LibWeb/Layout/TextNode.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Page/Page.h>
#include <LibWeb/Painting/InlinePaintable.h>
#include <LibWeb/Platform/FontPlugin.h>
@ -39,7 +36,6 @@ namespace Web::Layout {
Node::Node(DOM::Document& document, DOM::Node* node)
: m_dom_node(node ? *node : document)
, m_browsing_context(*document.browsing_context())
, m_anonymous(node == nullptr)
{
if (node)
@ -54,7 +50,6 @@ void Node::visit_edges(Cell::Visitor& visitor)
visitor.visit(m_dom_node);
visitor.visit(m_paintable);
visitor.visit(m_pseudo_element_generator);
visitor.visit(m_browsing_context);
TreeNode::visit_edges(visitor);
}
@ -207,16 +202,6 @@ bool Node::establishes_stacking_context() const
return computed_values().opacity() < 1.0f;
}
HTML::BrowsingContext const& Node::browsing_context() const
{
return *m_browsing_context;
}
HTML::BrowsingContext& Node::browsing_context()
{
return *m_browsing_context;
}
JS::GCPtr<HTML::Navigable> Node::navigable() const
{
return document().navigable();

View file

@ -73,9 +73,6 @@ public:
DOM::Document& document();
DOM::Document const& document() const;
HTML::BrowsingContext const& browsing_context() const;
HTML::BrowsingContext& browsing_context();
JS::GCPtr<HTML::Navigable> navigable() const;
Viewport const& root() const;
@ -186,8 +183,6 @@ private:
JS::NonnullGCPtr<DOM::Node> m_dom_node;
JS::GCPtr<Painting::Paintable> m_paintable;
JS::NonnullGCPtr<HTML::BrowsingContext> m_browsing_context;
JS::GCPtr<DOM::Element> m_pseudo_element_generator;
bool m_anonymous { false };