summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp
index 9f49512c2b..158c21862d 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <LibWeb/HTML/Window.h>
+#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/SVG/AttributeNames.h>
#include <LibWeb/SVG/AttributeParser.h>
#include <LibWeb/SVG/SVGCircleElement.h>
@@ -14,7 +14,7 @@ namespace Web::SVG {
SVGCircleElement::SVGCircleElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: SVGGeometryElement(document, qualified_name)
{
- set_prototype(&window().cached_web_prototype("SVGCircleElement"));
+ set_prototype(&Bindings::cached_web_prototype(realm(), "SVGCircleElement"));
}
void SVGCircleElement::parse_attribute(FlyString const& name, String const& value)
@@ -77,9 +77,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::cx() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(window(), 0, m_center_x.value_or(0));
- auto anim_length = SVGLength::create(window(), 0, m_center_x.value_or(0));
- return SVGAnimatedLength::create(window(), move(base_length), move(anim_length));
+ auto base_length = SVGLength::create(realm(), 0, m_center_x.value_or(0));
+ auto anim_length = SVGLength::create(realm(), 0, m_center_x.value_or(0));
+ return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
}
// https://www.w3.org/TR/SVG11/shapes.html#CircleElementCYAttribute
@@ -87,9 +87,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::cy() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(window(), 0, m_center_y.value_or(0));
- auto anim_length = SVGLength::create(window(), 0, m_center_y.value_or(0));
- return SVGAnimatedLength::create(window(), move(base_length), move(anim_length));
+ auto base_length = SVGLength::create(realm(), 0, m_center_y.value_or(0));
+ auto anim_length = SVGLength::create(realm(), 0, m_center_y.value_or(0));
+ return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
}
// https://www.w3.org/TR/SVG11/shapes.html#CircleElementRAttribute
@@ -97,9 +97,9 @@ JS::NonnullGCPtr<SVGAnimatedLength> SVGCircleElement::r() const
{
// FIXME: Populate the unit type when it is parsed (0 here is "unknown").
// FIXME: Create a proper animated value when animations are supported.
- auto base_length = SVGLength::create(window(), 0, m_radius.value_or(0));
- auto anim_length = SVGLength::create(window(), 0, m_radius.value_or(0));
- return SVGAnimatedLength::create(window(), move(base_length), move(anim_length));
+ auto base_length = SVGLength::create(realm(), 0, m_radius.value_or(0));
+ auto anim_length = SVGLength::create(realm(), 0, m_radius.value_or(0));
+ return SVGAnimatedLength::create(realm(), move(base_length), move(anim_length));
}
}