1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 11:25:07 +00:00
serenity/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.h
Timothy Flynn 834202aeb9 LibWeb: Move setting of Web object prototypes to initialize()
This needs to happen before prototype/constructor intitialization can be
made lazy. Otherwise, GC could run during the C++ constructor and try to
collect the object currently being created.
2023-01-10 16:08:14 +01:00

33 lines
733 B
C++

/*
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/SVG/SVGGeometryElement.h>
namespace Web::SVG {
class SVGPolylineElement final : public SVGGeometryElement {
WEB_PLATFORM_OBJECT(SVGPolylineElement, SVGGeometryElement);
public:
virtual ~SVGPolylineElement() override = default;
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
virtual Gfx::Path& get_path() override;
private:
SVGPolylineElement(DOM::Document&, DOM::QualifiedName);
virtual void initialize(JS::Realm&) override;
Optional<Gfx::Path> m_path;
Vector<Gfx::FloatPoint> m_points;
};
}