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

This commit is contained in:
Andreas Kling 2025-03-07 00:09:57 +01:00 committed by Alexander Kalenik
commit 2abbf99a95
Notes: github-actions[bot] 2025-03-08 02:39:00 +00:00
9 changed files with 50 additions and 12 deletions

View file

@ -146,7 +146,7 @@ WebIDL::ExceptionOr<void> CharacterData::replace_data(size_t offset, size_t coun
if (auto* layout_node = this->layout_node(); layout_node && layout_node->is_text_node())
static_cast<Layout::TextNode&>(*layout_node).invalidate_text_for_rendering();
document().set_needs_layout();
document().set_needs_layout(SetNeedsLayoutReason::CharacterDataReplaceData);
document().bump_character_data_version();
if (m_grapheme_segmenter)