diff --git a/Libraries/LibWeb/Layout/LayoutText.cpp b/Libraries/LibWeb/Layout/LayoutText.cpp index 9103230cc5..91d262972f 100644 --- a/Libraries/LibWeb/Layout/LayoutText.cpp +++ b/Libraries/LibWeb/Layout/LayoutText.cpp @@ -84,7 +84,14 @@ void LayoutText::render_fragment(RenderingContext& context, const LineBoxFragmen if (is_underline) painter.draw_line(enclosing_int_rect(fragment.rect()).bottom_left().translated(0, 1), enclosing_int_rect(fragment.rect()).bottom_right().translated(0, 1), color); - painter.draw_text(enclosing_int_rect(fragment.rect()), m_text_for_rendering.substring_view(fragment.start(), fragment.length()), Gfx::TextAlignment::TopLeft, color); + auto text = m_text_for_rendering; + auto text_transform = style().string_or_fallback(CSS::PropertyID::TextTransform, "none"); + if (text_transform == "uppercase") + text = m_text_for_rendering.to_uppercase(); + if (text_transform == "lowercase") + text = m_text_for_rendering.to_lowercase(); + + painter.draw_text(enclosing_int_rect(fragment.rect()), text.substring_view(fragment.start(), fragment.length()), Gfx::TextAlignment::TopLeft, color); } template