1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

LibWeb: Add empty IDL bindings for current SVG elements

Nothing in them right now as the classes don't contain the IDL
methods.
This commit is contained in:
Luke 2020-10-02 20:57:28 +01:00 committed by Andreas Kling
parent 6351a56d27
commit 9dee140a9f
14 changed files with 62 additions and 1 deletions

View file

@ -32,6 +32,8 @@ namespace Web::SVG {
class SVGElement : public DOM::Element {
public:
using WrapperType = Bindings::SVGElementWrapper;
virtual bool is_graphics_element() const { return false; }
protected:

View file

@ -0,0 +1,3 @@
interface SVGElement : Element {
}

View file

@ -32,6 +32,8 @@ namespace Web::SVG {
class SVGGeometryElement : public SVGGraphicsElement {
public:
using WrapperType = Bindings::SVGGeometryElementWrapper;
protected:
SVGGeometryElement(DOM::Document& document, const FlyString& tag_name);
};

View file

@ -0,0 +1,3 @@
interface SVGGeometryElement : SVGGraphicsElement {
}

View file

@ -47,6 +47,8 @@ static const SVGPaintingContext default_painting_context = {
class SVGGraphicsElement : public SVGElement {
public:
using WrapperType = Bindings::SVGGraphicsElementWrapper;
SVGGraphicsElement(DOM::Document&, const FlyString& tag_name);
virtual void parse_attribute(const FlyString& name, const String& value) override;

View file

@ -0,0 +1,3 @@
interface SVGGraphicsElement : SVGElement {
}

View file

@ -104,6 +104,8 @@ private:
class SVGPathElement final : public SVGGeometryElement {
public:
using WrapperType = Bindings::SVGPathElementWrapper;
SVGPathElement(DOM::Document&, const FlyString& tag_name);
virtual ~SVGPathElement() override = default;
@ -116,3 +118,7 @@ private:
};
}
AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGPathElement)
static bool is_type(const Web::DOM::Node& node) { return node.is_svg_element() && downcast<Web::SVG::SVGElement>(node).local_name() == Web::SVG::TagNames::path; }
AK_END_TYPE_TRAITS()

View file

@ -0,0 +1,3 @@
interface SVGPathElement : SVGGeometryElement {
}

View file

@ -33,6 +33,8 @@ namespace Web::SVG {
class SVGSVGElement final : public SVGGraphicsElement {
public:
using WrapperType = Bindings::SVGSVGElementWrapper;
SVGSVGElement(DOM::Document&, const FlyString& tag_name);
virtual RefPtr<LayoutNode> create_layout_node(const CSS::StyleProperties* parent_style) override;
@ -50,3 +52,7 @@ private:
};
}
AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGSVGElement)
static bool is_type(const Web::DOM::Node& node) { return node.is_svg_element() && downcast<Web::SVG::SVGElement>(node).local_name() == Web::SVG::TagNames::svg; }
AK_END_TYPE_TRAITS()

View file

@ -0,0 +1,3 @@
interface SVGSVGElement : SVGGraphicsElement {
}