mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Update layout before running intersection observations
Layout may have been invalidated by previous rendering steps (e.g. view transitions). Re-run layout before intersection observations since they need up-to-date geometry.
This commit is contained in:
committed by
Andreas Kling
parent
787a83b50a
commit
3e3fcfa41e
Notes:
github-actions[bot]
2026-02-26 20:11:17 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/3e3fcfa41ef Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8182
@@ -511,6 +511,10 @@ void EventLoop::update_the_rendering()
|
||||
|
||||
// 19. For each doc of docs, run the update intersection observations steps for doc, passing in the relative high resolution time given now and doc's relevant global object as the timestamp. [INTERSECTIONOBSERVER]
|
||||
for (auto& document : docs) {
|
||||
// NB: Layout may have been invalidated by previous steps (e.g. view transitions at step 18).
|
||||
// Re-run layout here since intersection observations need up-to-date geometry.
|
||||
document->update_layout(DOM::UpdateLayoutReason::HTMLEventLoopRenderingUpdate);
|
||||
|
||||
auto now = HighResolutionTime::relative_high_resolution_time(frame_timestamp, relevant_global_object(*document));
|
||||
document->run_the_update_intersection_observations_steps(now);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user