mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +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
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…
Add table
Add a link
Reference in a new issue