1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

LibWeb: Simplify type traits for SVGGraphicsElement

This commit is contained in:
Andreas Kling 2020-07-26 17:22:24 +02:00
parent e0b8b4ac67
commit 1b1537c5a6
3 changed files with 14 additions and 15 deletions

View file

@ -33,6 +33,15 @@ namespace Web::SVG {
class SVGElement : public Element {
public:
SVGElement(Document&, const FlyString& tag_name);
virtual bool is_graphics_element() const { return false; }
private:
virtual bool is_svg_element() const final { return true; }
};
}
AK_BEGIN_TYPE_TRAITS(Web::SVG::SVGElement)
static bool is_type(const Web::Node& node) { return node.is_svg_element(); }
AK_END_TYPE_TRAITS()