LibWeb/Painting: Don't paint invisible paintables

This check technically isn't necessary in
`SVGForeignObjectPaintable::paint()` because
`PaintableWithLines::paint(context, phase);` does the check already, but
I've added it there anyway to save some debugging time if someone does
add more code there. :^)
This commit is contained in:
Sam Atkins 2025-07-03 10:53:01 +01:00 committed by Alexander Kalenik
commit 994bbcaa75
Notes: github-actions[bot] 2025-07-03 10:40:15 +00:00
4 changed files with 33 additions and 0 deletions

View file

@ -32,6 +32,9 @@ constexpr float sin_60_deg = 0.866025403f;
void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const
{
if (!is_visible())
return;
if (phase == PaintPhase::Overlay)
PaintableBox::paint(context, phase);
if (phase != PaintPhase::Foreground)