mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
LibWeb: Throw exception if any canvas radial gradient radius is < 0
As per the specification: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-createradialgradient
This commit is contained in:
parent
8dc4e05ecf
commit
f86b66dc2d
3 changed files with 10 additions and 3 deletions
|
@ -55,7 +55,7 @@ public:
|
|||
return my_drawing_state().stroke_style.to_js_fill_or_stoke_style();
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<CanvasGradient> create_radial_gradient(double x0, double y0, double r0, double x1, double y1, double r1)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<CanvasGradient>> create_radial_gradient(double x0, double y0, double r0, double x1, double y1, double r1)
|
||||
{
|
||||
auto& realm = static_cast<IncludingClass&>(*this).realm();
|
||||
return CanvasGradient::create_radial(realm, x0, y0, r0, x1, y1, r1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue