mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
LibWeb: Paint text decoration in front of the text
Previously, the decoration was painted behind the text. This probably wasn't noticed before, as we didn't compute `text-decoration-color` values yet and the decoration had the same color anyway.
This commit is contained in:
parent
f9d66bef5d
commit
727e69fe11
Notes:
sideshowbarker
2024-07-17 17:52:26 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/727e69fe11 Pull-request: https://github.com/SerenityOS/serenity/pull/12915 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 2 additions and 2 deletions
|
@ -97,8 +97,6 @@ void TextNode::paint_fragment(PaintContext& context, const LineBoxFragment& frag
|
|||
if (document().inspected_node() == &dom_node())
|
||||
context.painter().draw_rect(enclosing_int_rect(fragment_absolute_rect), Color::Magenta);
|
||||
|
||||
paint_text_decoration(painter, fragment);
|
||||
|
||||
// FIXME: text-transform should be done already in layout, since uppercase glyphs may be wider than lowercase, etc.
|
||||
auto text = m_text_for_rendering;
|
||||
auto text_transform = computed_values().text_transform();
|
||||
|
@ -120,6 +118,8 @@ void TextNode::paint_fragment(PaintContext& context, const LineBoxFragment& frag
|
|||
painter.draw_text(enclosing_int_rect(fragment_absolute_rect), text.substring_view(fragment.start(), fragment.length()), Gfx::TextAlignment::CenterLeft, context.palette().selection_text());
|
||||
}
|
||||
|
||||
paint_text_decoration(painter, fragment);
|
||||
|
||||
paint_cursor_if_needed(context, fragment);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue