1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 08:27:35 +00:00

LibWeb: Remove unecessary dependence on Window from SVG classes

These classes only needed Window to get at its realm. Pass a realm
directly to construct SCG classes.
This commit is contained in:
Andrew Kaster 2022-09-25 18:04:39 -06:00 committed by Linus Groh
parent 62a8c26b73
commit 320dddde6a
20 changed files with 87 additions and 93 deletions

View file

@ -86,7 +86,7 @@ namespace Web::SVG {
SVGPathElement::SVGPathElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: SVGGeometryElement(document, move(qualified_name))
{
set_prototype(&window().cached_web_prototype("SVGPathElement"));
set_prototype(&Bindings::cached_web_prototype(realm(), "SVGPathElement"));
}
void SVGPathElement::parse_attribute(FlyString const& name, String const& value)