mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:15:07 +00:00
LibWeb: Run IntersectionObserver steps only when needed
Instead of updating IOs in every iteration of the HTML event loop, we now only do it after a relayout, or after the viewport changes.
This commit is contained in:
parent
d3f8d24abb
commit
11b4216e65
3 changed files with 8 additions and 3 deletions
|
@ -248,9 +248,7 @@ void EventLoop::process()
|
|||
});
|
||||
|
||||
// 14. For each fully active Document in docs, run the update intersection observations steps for that Document, passing in now as the timestamp. [INTERSECTIONOBSERVER]
|
||||
for_each_fully_active_document_in_docs([&](DOM::Document& document) {
|
||||
document.run_the_update_intersection_observations_steps(now);
|
||||
});
|
||||
// OPTIMIZATION: We do this automatically after layout or viewport changes, so we don't need to do it here.
|
||||
|
||||
// FIXME: 15. Invoke the mark paint timing algorithm for each Document object in docs.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue