From d98bc0da87a9b8d75564ba2aba4daa760390b41e Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 2 Aug 2023 16:35:07 +0100 Subject: [PATCH] LibWeb: Make it clearer that several line-styles are not implemented --- .../LibWeb/Painting/BorderPainting.cpp | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp index f0d12ad154..d300e39c11 100644 --- a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp +++ b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp @@ -127,10 +127,27 @@ void paint_border(PaintContext& context, BorderEdge edge, DevicePixelRect const& }; auto gfx_line_style = Gfx::Painter::LineStyle::Solid; - if (border_style == CSS::LineStyle::Dotted) + switch (border_style) { + case CSS::LineStyle::None: + case CSS::LineStyle::Hidden: + return; + case CSS::LineStyle::Dotted: gfx_line_style = Gfx::Painter::LineStyle::Dotted; - if (border_style == CSS::LineStyle::Dashed) + break; + case CSS::LineStyle::Dashed: gfx_line_style = Gfx::Painter::LineStyle::Dashed; + break; + case CSS::LineStyle::Solid: + gfx_line_style = Gfx::Painter::LineStyle::Solid; + break; + case CSS::LineStyle::Double: + case CSS::LineStyle::Groove: + case CSS::LineStyle::Ridge: + case CSS::LineStyle::Inset: + case CSS::LineStyle::Outset: + // FIXME: Implement these + break; + } if (gfx_line_style != Gfx::Painter::LineStyle::Solid) { auto [p1, p2] = points_for_edge(edge, rect);