diff --git a/Userland/Libraries/LibWeb/HTML/Path2D.cpp b/Userland/Libraries/LibWeb/HTML/Path2D.cpp
index 9a565af378..f36c716da8 100644
--- a/Userland/Libraries/LibWeb/HTML/Path2D.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Path2D.cpp
@@ -14,13 +14,13 @@
namespace Web::HTML {
-WebIDL::ExceptionOr> Path2D::construct_impl(JS::Realm& realm, Optional, DeprecatedString>> const& path)
+WebIDL::ExceptionOr> Path2D::construct_impl(JS::Realm& realm, Optional, String>> const& path)
{
return realm.heap().allocate(realm, realm, path);
}
// https://html.spec.whatwg.org/multipage/canvas.html#dom-path2d
-Path2D::Path2D(JS::Realm& realm, Optional, DeprecatedString>> const& path)
+Path2D::Path2D(JS::Realm& realm, Optional, String>> const& path)
: PlatformObject(realm)
, CanvasPath(static_cast(*this))
{
@@ -37,7 +37,7 @@ Path2D::Path2D(JS::Realm& realm, Optional, Deprecated
}
// 4. Let svgPath be the result of parsing and interpreting path according to SVG 2's rules for path data. [SVG]
- auto path_instructions = SVG::AttributeParser::parse_path_data(path->get());
+ auto path_instructions = SVG::AttributeParser::parse_path_data(path->get());
auto svg_path = SVG::path_from_path_instructions(path_instructions);
if (!svg_path.segments().is_empty()) {
diff --git a/Userland/Libraries/LibWeb/HTML/Path2D.h b/Userland/Libraries/LibWeb/HTML/Path2D.h
index 68f287038c..1ec158a101 100644
--- a/Userland/Libraries/LibWeb/HTML/Path2D.h
+++ b/Userland/Libraries/LibWeb/HTML/Path2D.h
@@ -22,14 +22,14 @@ class Path2D final
WEB_PLATFORM_OBJECT(Path2D, Bindings::PlatformObject);
public:
- static WebIDL::ExceptionOr> construct_impl(JS::Realm&, Optional, DeprecatedString>> const& path);
+ static WebIDL::ExceptionOr> construct_impl(JS::Realm&, Optional, String>> const& path);
virtual ~Path2D() override;
WebIDL::ExceptionOr add_path(JS::NonnullGCPtr path, Geometry::DOMMatrix2DInit& transform);
private:
- Path2D(JS::Realm&, Optional, DeprecatedString>> const&);
+ Path2D(JS::Realm&, Optional, String>> const&);
virtual void initialize(JS::Realm&) override;
};
diff --git a/Userland/Libraries/LibWeb/HTML/Path2D.idl b/Userland/Libraries/LibWeb/HTML/Path2D.idl
index 8879e34018..a31a62ad97 100644
--- a/Userland/Libraries/LibWeb/HTML/Path2D.idl
+++ b/Userland/Libraries/LibWeb/HTML/Path2D.idl
@@ -2,7 +2,7 @@
#import
// https://html.spec.whatwg.org/multipage/canvas.html#path2d
-[Exposed=(Window,Worker)]
+[Exposed=(Window,Worker), UseNewAKString]
interface Path2D {
constructor(optional (Path2D or DOMString) path);