diff --git a/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h b/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h
index 0f0e773256..d65da16932 100644
--- a/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h
+++ b/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h
@@ -10,6 +10,7 @@
#include
#include
+#include
namespace Web::HTML {
@@ -41,6 +42,21 @@ public:
return my_drawing_state().stroke_style.to_string();
}
+ NonnullRefPtr create_radial_gradient(double x0, double y0, double r0, double x1, double y1, double r1)
+ {
+ return CanvasGradient::create_radial(x0, y0, r0, x1, y1, r1);
+ }
+
+ NonnullRefPtr create_linear_gradient(double x0, double y0, double x1, double y1)
+ {
+ return CanvasGradient::create_linear(x0, y0, x1, y1);
+ }
+
+ NonnullRefPtr create_conic_gradient(double start_angle, double x, double y)
+ {
+ return CanvasGradient::create_conic(start_angle, x, y);
+ }
+
protected:
CanvasFillStrokeStyles() = default;
diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
index 98bb90d309..82c7a12635 100644
--- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
+++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
@@ -546,21 +546,6 @@ CanvasRenderingContext2D::PreparedText CanvasRenderingContext2D::prepare_text(St
return prepared_text;
}
-NonnullRefPtr CanvasRenderingContext2D::create_radial_gradient(double x0, double y0, double r0, double x1, double y1, double r1)
-{
- return CanvasGradient::create_radial(x0, y0, r0, x1, y1, r1);
-}
-
-NonnullRefPtr CanvasRenderingContext2D::create_linear_gradient(double x0, double y0, double x1, double y1)
-{
- return CanvasGradient::create_linear(x0, y0, x1, y1);
-}
-
-NonnullRefPtr CanvasRenderingContext2D::create_conic_gradient(double start_angle, double x, double y)
-{
- return CanvasGradient::create_conic(start_angle, x, y);
-}
-
void CanvasRenderingContext2D::clip()
{
// FIXME: Implement.
diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h
index e442a1ebcc..9aa60b1efe 100644
--- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h
+++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h
@@ -78,10 +78,6 @@ public:
RefPtr measure_text(String const& text);
- NonnullRefPtr create_radial_gradient(double x0, double y0, double r0, double x1, double y1, double r1);
- NonnullRefPtr create_linear_gradient(double x0, double y0, double x1, double y1);
- NonnullRefPtr create_conic_gradient(double start_angle, double x, double y);
-
void clip();
private: