mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibWeb: Move DOM classes into the Web::DOM namespace
LibWeb keeps growing and the Web namespace is filling up fast. Let's put DOM stuff into Web::DOM, just like we already started doing with SVG stuff in Web::SVG.
This commit is contained in:
parent
96d13f75cf
commit
11ff9d0f17
178 changed files with 516 additions and 523 deletions
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace Web::SVG {
|
||||
|
||||
SVGElement::SVGElement(Document& document, const FlyString& tag_name)
|
||||
SVGElement::SVGElement(DOM::Document& document, const FlyString& tag_name)
|
||||
: Element(document, tag_name)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
|
||||
namespace Web::SVG {
|
||||
|
||||
class SVGElement : public Element {
|
||||
class SVGElement : public DOM::Element {
|
||||
public:
|
||||
virtual bool is_graphics_element() const { return false; }
|
||||
|
||||
protected:
|
||||
SVGElement(Document&, const FlyString& tag_name);
|
||||
SVGElement(DOM::Document&, const FlyString& tag_name);
|
||||
|
||||
private:
|
||||
virtual bool is_svg_element() const final { return true; }
|
||||
|
@ -44,5 +44,5 @@ private:
|
|||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGElement)
|
||||
static bool is_type(const Web::Node& node) { return node.is_svg_element(); }
|
||||
static bool is_type(const Web::DOM::Node& node) { return node.is_svg_element(); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace Web::SVG {
|
||||
|
||||
SVGGeometryElement::SVGGeometryElement(Document& document, const FlyString& tag_name)
|
||||
SVGGeometryElement::SVGGeometryElement(DOM::Document& document, const FlyString& tag_name)
|
||||
: SVGGraphicsElement(document, tag_name)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Web::SVG {
|
|||
class SVGGeometryElement : public SVGGraphicsElement {
|
||||
public:
|
||||
protected:
|
||||
SVGGeometryElement(Document& document, const FlyString& tag_name);
|
||||
SVGGeometryElement(DOM::Document& document, const FlyString& tag_name);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace Web::SVG {
|
||||
|
||||
SVGGraphicsElement::SVGGraphicsElement(Document& document, const FlyString& tag_name)
|
||||
SVGGraphicsElement::SVGGraphicsElement(DOM::Document& document, const FlyString& tag_name)
|
||||
: SVGElement(document, tag_name)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static const SVGPaintingContext default_painting_context = {
|
|||
|
||||
class SVGGraphicsElement : public SVGElement {
|
||||
public:
|
||||
SVGGraphicsElement(Document&, const FlyString& tag_name);
|
||||
SVGGraphicsElement(DOM::Document&, const FlyString& tag_name);
|
||||
|
||||
virtual void parse_attribute(const FlyString& name, const String& value) override;
|
||||
|
||||
|
@ -67,5 +67,5 @@ private:
|
|||
}
|
||||
|
||||
AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGGraphicsElement)
|
||||
static bool is_type(const Web::Node& node) { return is<Web::SVG::SVGElement>(node) && downcast<Web::SVG::SVGElement>(node).is_graphics_element(); }
|
||||
static bool is_type(const Web::DOM::Node& node) { return is<Web::SVG::SVGElement>(node) && downcast<Web::SVG::SVGElement>(node).is_graphics_element(); }
|
||||
AK_END_TYPE_TRAITS()
|
||||
|
|
|
@ -349,7 +349,7 @@ bool PathDataParser::match_number() const
|
|||
return !done() && (isdigit(ch()) || ch() == '-' || ch() == '+');
|
||||
}
|
||||
|
||||
SVGPathElement::SVGPathElement(Document& document, const FlyString& tag_name)
|
||||
SVGPathElement::SVGPathElement(DOM::Document& document, const FlyString& tag_name)
|
||||
: SVGGeometryElement(document, tag_name)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ private:
|
|||
|
||||
class SVGPathElement final : public SVGGeometryElement {
|
||||
public:
|
||||
SVGPathElement(Document&, const FlyString& tag_name);
|
||||
SVGPathElement(DOM::Document&, const FlyString& tag_name);
|
||||
virtual ~SVGPathElement() override = default;
|
||||
|
||||
virtual void parse_attribute(const FlyString& name, const String& value) override;
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace Web::SVG {
|
|||
|
||||
static constexpr auto max_svg_area = 16384 * 16384;
|
||||
|
||||
SVGSVGElement::SVGSVGElement(Document& document, const FlyString& tag_name)
|
||||
SVGSVGElement::SVGSVGElement(DOM::Document& document, const FlyString& tag_name)
|
||||
: SVGGraphicsElement(document, tag_name)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Web::SVG {
|
|||
|
||||
class SVGSVGElement final : public SVGGraphicsElement {
|
||||
public:
|
||||
SVGSVGElement(Document&, const FlyString& tag_name);
|
||||
SVGSVGElement(DOM::Document&, const FlyString& tag_name);
|
||||
|
||||
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue