mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 15:19:16 +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
|
@ -94,8 +94,7 @@ Optional<Gfx::ImageCursor> CursorStyleValue::make_image_cursor(Layout::NodeWithS
|
|||
case DisplayListPlayerType::SkiaCPU: {
|
||||
auto painting_surface = Gfx::PaintingSurface::wrap_bitmap(bitmap);
|
||||
Painting::DisplayListPlayerSkia display_list_player;
|
||||
Painting::ScrollStateSnapshot scroll_state_snapshot;
|
||||
display_list_player.execute(*display_list, scroll_state_snapshot, painting_surface);
|
||||
display_list_player.execute(*display_list, {}, painting_surface);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue