mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
LibWeb: Fix scroll state refresh in cached display list for iframes
6507d23
introduced a bug when snapshot for iframe is saved in
`PaintNestedDisplayList` and, since display lists are immutable, it's
not possible to update before the next repaint.
This change fixes the issue by moving `ScrollStateSnapshot` for
nested display lists from `PaintNestedDisplayList` to
`HashMap<NonnullRefPtr<DisplayList>, ScrollStateSnapshot>` that is
placed into pending rendering task, making it possible to update
snapshots for all display lists before the next repaint.
This change doesn't have a test because it's really hard to make a ref
test that will specifically check scenario when scroll offset of an
iframe is advanced after display list is cached. We already have
`Tests/LibWeb/Ref/input/scroll-iframe.html` but unfortunately it did
not catch this bug.
Fixes https://github.com/LadybirdBrowser/ladybird/issues/5486
This commit is contained in:
parent
124bdce99c
commit
8569124b87
Notes:
github-actions[bot]
2025-07-26 15:54:30 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 8569124b87
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5596
18 changed files with 63 additions and 28 deletions
|
@ -6405,6 +6405,11 @@ void Document::invalidate_display_list()
|
|||
}
|
||||
}
|
||||
|
||||
RefPtr<Painting::DisplayList> Document::cached_display_list() const
|
||||
{
|
||||
return m_cached_display_list;
|
||||
}
|
||||
|
||||
RefPtr<Painting::DisplayList> Document::record_display_list(HTML::PaintConfig config)
|
||||
{
|
||||
if (m_cached_display_list && m_cached_display_list_paint_config == config) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue