mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +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:
parent
d129e68da8
commit
311e1039b5
5 changed files with 47 additions and 45 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue