summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/SVG
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-22 15:53:01 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-22 15:56:27 +0100
commit5aeab9878ebb3b9749be633e9d5812a3181141ca (patch)
treed36c2af3ff959b79ce7886a57a78357015078936 /Libraries/LibWeb/SVG
parentf358f2255fec7228b7ddf510936a2b7a150e509e (diff)
downloadserenity-5aeab9878ebb3b9749be633e9d5812a3181141ca.zip
LibWeb: Rename LayoutNode classes and move them into Layout namespace
Bring the names of various boxes closer to spec language. This should hopefully make things easier to understand and hack on. :^) Some notable changes: - LayoutNode -> Layout::Node - LayoutBox -> Layout::Box - LayoutBlock -> Layout::BlockBox - LayoutReplaced -> Layout::ReplacedBox - LayoutDocument -> Layout::InitialContainingBlockBox - LayoutText -> Layout::TextNode - LayoutInline -> Layout::InlineNode Note that this is not strictly a "box tree" as we also hang inline/text nodes in the same tree, and they don't generate boxes. (Instead, they contribute line box fragments to their containing block!)
Diffstat (limited to 'Libraries/LibWeb/SVG')
-rw-r--r--Libraries/LibWeb/SVG/SVGPathElement.cpp6
-rw-r--r--Libraries/LibWeb/SVG/SVGPathElement.h2
-rw-r--r--Libraries/LibWeb/SVG/SVGSVGElement.cpp6
-rw-r--r--Libraries/LibWeb/SVG/SVGSVGElement.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Libraries/LibWeb/SVG/SVGPathElement.cpp
index 36a2ef2fb6..a0ec408fb3 100644
--- a/Libraries/LibWeb/SVG/SVGPathElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGPathElement.cpp
@@ -29,7 +29,7 @@
#include <LibGfx/Path.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
-#include <LibWeb/Layout/LayoutSVGPath.h>
+#include <LibWeb/Layout/SVGPathBox.h>
#include <LibWeb/SVG/SVGPathElement.h>
#include <ctype.h>
@@ -430,12 +430,12 @@ SVGPathElement::SVGPathElement(DOM::Document& document, const QualifiedName& qua
{
}
-RefPtr<LayoutNode> SVGPathElement::create_layout_node(const CSS::StyleProperties* parent_style)
+RefPtr<Layout::Node> SVGPathElement::create_layout_node(const CSS::StyleProperties* parent_style)
{
auto style = document().style_resolver().resolve_style(*this, parent_style);
if (style->display() == CSS::Display::None)
return nullptr;
- return adopt(*new LayoutSVGPath(document(), *this, move(style)));
+ return adopt(*new Layout::SVGPathBox(document(), *this, move(style)));
}
void SVGPathElement::parse_attribute(const FlyString& name, const String& value)
diff --git a/Libraries/LibWeb/SVG/SVGPathElement.h b/Libraries/LibWeb/SVG/SVGPathElement.h
index 922c92b690..bca0da456d 100644
--- a/Libraries/LibWeb/SVG/SVGPathElement.h
+++ b/Libraries/LibWeb/SVG/SVGPathElement.h
@@ -109,7 +109,7 @@ public:
SVGPathElement(DOM::Document&, const QualifiedName& qualified_name);
virtual ~SVGPathElement() override = default;
- virtual RefPtr<LayoutNode> create_layout_node(const CSS::StyleProperties* parent_style) override;
+ virtual RefPtr<Layout::Node> create_layout_node(const CSS::StyleProperties* parent_style) override;
virtual void parse_attribute(const FlyString& name, const String& value) override;
diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.cpp b/Libraries/LibWeb/SVG/SVGSVGElement.cpp
index 0a0b2f75f3..cd5e1e6fbd 100644
--- a/Libraries/LibWeb/SVG/SVGSVGElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGSVGElement.cpp
@@ -28,7 +28,7 @@
#include <LibWeb/CSS/StyleResolver.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
-#include <LibWeb/Layout/LayoutSVGSVG.h>
+#include <LibWeb/Layout/SVGSVGBox.h>
#include <LibWeb/SVG/SVGPathElement.h>
#include <LibWeb/SVG/SVGSVGElement.h>
#include <ctype.h>
@@ -40,12 +40,12 @@ SVGSVGElement::SVGSVGElement(DOM::Document& document, const QualifiedName& quali
{
}
-RefPtr<LayoutNode> SVGSVGElement::create_layout_node(const CSS::StyleProperties* parent_style)
+RefPtr<Layout::Node> SVGSVGElement::create_layout_node(const CSS::StyleProperties* parent_style)
{
auto style = document().style_resolver().resolve_style(*this, parent_style);
if (style->display() == CSS::Display::None)
return nullptr;
- return adopt(*new LayoutSVGSVG(document(), *this, move(style)));
+ return adopt(*new Layout::SVGSVGBox(document(), *this, move(style)));
}
unsigned SVGSVGElement::width() const
diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.h b/Libraries/LibWeb/SVG/SVGSVGElement.h
index 82be0cada2..4478ebd617 100644
--- a/Libraries/LibWeb/SVG/SVGSVGElement.h
+++ b/Libraries/LibWeb/SVG/SVGSVGElement.h
@@ -37,7 +37,7 @@ public:
SVGSVGElement(DOM::Document&, const QualifiedName& qualified_name);
- virtual RefPtr<LayoutNode> create_layout_node(const CSS::StyleProperties* parent_style) override;
+ virtual RefPtr<Layout::Node> create_layout_node(const CSS::StyleProperties* parent_style) override;
unsigned width() const;
unsigned height() const;