diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-10 22:38:08 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-11 00:21:49 +0100 |
commit | ed84fbce474a86721ff85aa9559213e12bd556ba (patch) | |
tree | e87ff19b4581c0c5206a0d40831ed392b591c3ba /Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp | |
parent | 702cee3d7c36570763c5552461b9665f557bf9cc (diff) | |
download | serenity-ed84fbce474a86721ff85aa9559213e12bd556ba.zip |
LibWeb: Make Paintable ref-counted
This will allow us to use a protective NonnullRefPtr to keep paintables
alive while running arbitrary JavaScript in response to events.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp index 1179e5bbb4..0fb658b374 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/SVGSVGBox.cpp @@ -5,7 +5,7 @@ */ #include <LibWeb/Layout/SVGSVGBox.h> -#include <LibWeb/Painting/Paintable.h> +#include <LibWeb/Painting/SVGSVGPaintable.h> namespace Web::Layout { @@ -14,4 +14,9 @@ SVGSVGBox::SVGSVGBox(DOM::Document& document, SVG::SVGSVGElement& element, Nonnu { } +RefPtr<Painting::Paintable> SVGSVGBox::create_paintable() const +{ + return Painting::SVGSVGPaintable::create(*this); +} + } |