diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.cpp b/Userland/Libraries/LibWeb/Layout/TextNode.cpp index b53d42d5ea..ba766ec9f9 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.cpp +++ b/Userland/Libraries/LibWeb/Layout/TextNode.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2021, Andreas Kling + * Copyright (c) 2022, Tobias Christiansen * * SPDX-License-Identifier: BSD-2-Clause */ @@ -67,7 +68,19 @@ void TextNode::paint_text_decoration(Gfx::Painter& painter, LineBoxFragment cons return; } - painter.draw_line(line_start_point, line_end_point, computed_values().color()); + switch (computed_values().text_decoration_style()) { + // FIXME: Implement the other styles + case CSS::TextDecorationStyle::Solid: + case CSS::TextDecorationStyle::Double: + case CSS::TextDecorationStyle::Dashed: + case CSS::TextDecorationStyle::Dotted: + painter.draw_line(line_start_point, line_end_point, computed_values().color()); + break; + case CSS::TextDecorationStyle::Wavy: + // FIXME: There is a thing called text-decoration-thickness which also affects the amplitude here. + painter.draw_triangle_wave(line_start_point, line_end_point, computed_values().color(), 2); + break; + } } void TextNode::paint_fragment(PaintContext& context, const LineBoxFragment& fragment, PaintPhase phase) const