LibWeb: Route repaint requests through paintables, not Document

Rename Document::set_needs_display() to set_needs_repaint() and make it
private. External callers must now go through Node/Paintable which
route the request to the document internally.

Fix one existing misuse in AnimationEffect that was calling
document-level set_needs_display() instead of routing through the
target element's paintable.

This is preparation for per-paintable display list command caching:
repaint requests must go through specific paintables so their cached
command lists can be invalidated.
This commit is contained in:
Aliaksandr Kalenik
2026-03-04 16:02:14 +01:00
committed by Alexander Kalenik
parent 0356f1b510
commit eae94a8a46
Notes: github-actions[bot] 2026-03-04 18:37:01 +00:00
25 changed files with 62 additions and 79 deletions

View File

@@ -141,7 +141,7 @@ void HTMLBodyElement::attribute_changed(FlyString const& name, Optional<String>
m_background_style_value = CSS::ImageStyleValue::create(maybe_background_url.value());
m_background_style_value->on_animate = [this] {
if (paintable())
paintable()->set_needs_display();
paintable()->set_needs_repaint();
};
}
}