1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibWeb: Port CanvasRenderingContext2D from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-09-06 19:41:48 +12:00 committed by Andrew Kaster
parent da1f137967
commit d312fdc2d3
8 changed files with 29 additions and 29 deletions

View file

@ -52,13 +52,13 @@ public:
Optional<Gfx::Color> as_color() const;
Gfx::Color to_color_but_fixme_should_accept_any_paint_style() const;
using JsFillOrStrokeStyle = Variant<DeprecatedString, JS::Handle<CanvasGradient>, JS::Handle<CanvasPattern>>;
using JsFillOrStrokeStyle = Variant<String, JS::Handle<CanvasGradient>, JS::Handle<CanvasPattern>>;
JsFillOrStrokeStyle to_js_fill_or_stroke_style() const
{
return m_fill_or_stroke_style.visit(
[&](Gfx::Color color) -> JsFillOrStrokeStyle {
return color.to_deprecated_string();
return MUST(String::from_deprecated_string(color.to_deprecated_string()));
},
[&](auto handle) -> JsFillOrStrokeStyle {
return handle;