LibWeb: Transform ScrollFrame from a struct to a class

This commit is contained in:
Aliaksandr Kalenik 2024-09-11 22:01:44 +02:00 committed by Andreas Kling
commit 112dd4af3b
Notes: github-actions[bot] 2024-09-12 05:38:16 +00:00
6 changed files with 37 additions and 23 deletions

View file

@ -5570,10 +5570,10 @@ RefPtr<Painting::DisplayList> Document::record_display_list(PaintConfig config)
Vector<RefPtr<Painting::ScrollFrame>> scroll_state;
scroll_state.resize(viewport_paintable.scroll_state.size() + viewport_paintable.sticky_state.size());
for (auto& [_, scrollable_frame] : viewport_paintable.scroll_state) {
scroll_state[scrollable_frame->id] = scrollable_frame;
scroll_state[scrollable_frame->id()] = scrollable_frame;
}
for (auto& [_, scrollable_frame] : viewport_paintable.sticky_state) {
scroll_state[scrollable_frame->id] = scrollable_frame;
scroll_state[scrollable_frame->id()] = scrollable_frame;
}
display_list->set_scroll_state(move(scroll_state));