mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 06:32:26 +02:00
LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
This commit is contained in:
@@ -12,10 +12,9 @@
|
||||
namespace Web::SVG {
|
||||
|
||||
class SVGLineElement final : public SVGGeometryElement {
|
||||
public:
|
||||
using WrapperType = Bindings::SVGLineElementWrapper;
|
||||
WEB_PLATFORM_OBJECT(SVGLineElement, SVGGraphicsElement);
|
||||
|
||||
SVGLineElement(DOM::Document&, DOM::QualifiedName);
|
||||
public:
|
||||
virtual ~SVGLineElement() override = default;
|
||||
|
||||
virtual void parse_attribute(FlyString const& name, String const& value) override;
|
||||
@@ -28,6 +27,8 @@ public:
|
||||
NonnullRefPtr<SVGAnimatedLength> y2() const;
|
||||
|
||||
private:
|
||||
SVGLineElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
Optional<Gfx::Path> m_path;
|
||||
|
||||
Optional<float> m_x1;
|
||||
@@ -37,3 +38,5 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
WRAPPER_HACK(SVGLineElement, Web::SVG)
|
||||
|
||||
Reference in New Issue
Block a user