mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 20:29:42 +00:00
LibWeb: Paint line box fragments during all paint phases
Fragment painting was very limited by only being called during the foreground paint phase. We now paint fragments as part of every phase (and the phase is passed to paint_fragment() of course!)
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
void LineBoxFragment::paint(PaintContext& context)
|
||||
void LineBoxFragment::paint(PaintContext& context, PaintPhase phase)
|
||||
{
|
||||
for (auto* ancestor = layout_node().parent(); ancestor; ancestor = ancestor->parent()) {
|
||||
if (!ancestor->is_visible())
|
||||
@@ -42,7 +42,7 @@ void LineBoxFragment::paint(PaintContext& context)
|
||||
}
|
||||
|
||||
if (is<TextNode>(layout_node()))
|
||||
downcast<TextNode>(layout_node()).paint_fragment(context, *this);
|
||||
downcast<TextNode>(layout_node()).paint_fragment(context, *this, phase);
|
||||
}
|
||||
|
||||
bool LineBoxFragment::ends_in_whitespace() const
|
||||
|
||||
Reference in New Issue
Block a user