diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-02-11 12:32:55 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-11 21:38:27 +0100 |
commit | 326a5a82ebef1146def6e04f1930ef8c054a59bf (patch) | |
tree | b79d3603cf57b75c89a822f158611af8aab24587 /Userland/Libraries/LibWeb/Layout/SVGPathBox.h | |
parent | 49fe232bc78caa7900b95f80d6823fee2cc30781 (diff) | |
download | serenity-326a5a82ebef1146def6e04f1930ef8c054a59bf.zip |
LibWeb: Move SVGPathElement methods into SVGGeometryElement
From the spec:
> Interface SVGGeometryElement represents SVG elements whose rendering
> is defined by geometry with an equivalent path, and which can be
> filled and stroked. This includes paths and the basic shapes.
- https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement
Making them all create an SVGPathBox, and return a Path from get_path(),
means we can implement the "basic shapes" using the path system we
already have. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/SVGPathBox.h')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/SVGPathBox.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/SVGPathBox.h b/Userland/Libraries/LibWeb/Layout/SVGPathBox.h index 9521c4cc03..624826d9e0 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGPathBox.h +++ b/Userland/Libraries/LibWeb/Layout/SVGPathBox.h @@ -7,17 +7,17 @@ #pragma once #include <LibWeb/Layout/SVGGraphicsBox.h> -#include <LibWeb/SVG/SVGPathElement.h> +#include <LibWeb/SVG/SVGGeometryElement.h> namespace Web::Layout { class SVGPathBox final : public SVGGraphicsBox { public: - SVGPathBox(DOM::Document&, SVG::SVGPathElement&, NonnullRefPtr<CSS::StyleProperties>); + SVGPathBox(DOM::Document&, SVG::SVGGeometryElement&, NonnullRefPtr<CSS::StyleProperties>); virtual ~SVGPathBox() override = default; - SVG::SVGPathElement& dom_node() { return verify_cast<SVG::SVGPathElement>(SVGGraphicsBox::dom_node()); } - SVG::SVGPathElement const& dom_node() const { return verify_cast<SVG::SVGPathElement>(SVGGraphicsBox::dom_node()); } + SVG::SVGGeometryElement& dom_node() { return verify_cast<SVG::SVGGeometryElement>(SVGGraphicsBox::dom_node()); } + SVG::SVGGeometryElement const& dom_node() const { return verify_cast<SVG::SVGGeometryElement>(SVGGraphicsBox::dom_node()); } virtual void paint(PaintContext& context, PaintPhase phase) override; |