LibWeb: Add opt-in tracing of update_layout() calls with reason

This commit is contained in:
Andreas Kling 2025-03-05 20:50:05 +01:00 committed by Alexander Kalenik
commit c333042e63
Notes: github-actions[bot] 2025-03-08 02:39:13 +00:00
21 changed files with 137 additions and 52 deletions

View file

@ -1157,7 +1157,7 @@ GC::Ref<Geometry::DOMRectList> Range::get_client_rects()
if (!start_container()->document().navigable())
return Geometry::DOMRectList::create(realm(), {});
start_container()->document().update_layout();
start_container()->document().update_layout(DOM::UpdateLayoutReason::RangeGetClientRects);
update_associated_selection();
Vector<GC::Root<Geometry::DOMRect>> rects;
// FIXME: take Range collapsed into consideration