mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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:
committed by
Alexander Kalenik
parent
0356f1b510
commit
eae94a8a46
Notes:
github-actions[bot]
2026-03-04 18:37:01 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/eae94a8a466 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8271
@@ -960,7 +960,7 @@ void FormAssociatedTextControlElement::selection_was_changed(SelectionSource sou
|
||||
} else {
|
||||
text_paintable->set_selection_state(Painting::Paintable::SelectionState::StartAndEnd);
|
||||
}
|
||||
text_paintable->set_needs_display();
|
||||
text_paintable->set_needs_repaint();
|
||||
|
||||
// AD-HOC: Only scroll the cursor into view for UI-driven selection changes (like keyboard input). Programmatic
|
||||
// changes (input.value, setSelectionRange) do not cause the cursor to scroll into view. This matches the
|
||||
|
||||
Reference in New Issue
Block a user