mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Don't throw away new scroll events after processing the old ones
Dispatching scroll events could cause new scroll events to get lined up and added to `m_pending_scroll_events`. The spec then asks us to empty out that list, removing those newly added events. Prevent doing that by emptying out the list before iterating over the events. Fixes part of the WPT test `html/webappapis/scripting/event- loops/new-scroll-event-dispatched-at-next-updating-rendering-time.html`.
This commit is contained in:
committed by
Alexander Kalenik
parent
14b118c8ea
commit
3576f4a53a
Notes:
github-actions[bot]
2026-02-13 21:45:37 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/3576f4a53a7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7940 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -406,9 +406,8 @@ void EventLoop::update_the_rendering()
|
||||
}
|
||||
|
||||
// 9. For each doc of docs, run the scroll steps for doc. [CSSOMVIEW]
|
||||
for (auto& document : docs) {
|
||||
for (auto& document : docs)
|
||||
document->run_the_scroll_steps();
|
||||
}
|
||||
|
||||
// 10. For each doc of docs, evaluate media queries and report changes for doc. [CSSOMVIEW]
|
||||
for (auto& document : docs) {
|
||||
|
||||
Reference in New Issue
Block a user