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

This commit is contained in:
Andreas Kling 2025-03-05 21:04:20 +01:00 committed by Alexander Kalenik
parent c333042e63
commit 415079bc11
Notes: github-actions[bot] 2025-03-08 02:39:05 +00:00
8 changed files with 46 additions and 12 deletions

View file

@ -1129,7 +1129,7 @@ void HTMLInputElement::update_file_input_shadow_tree()
m_file_label->set_text_content(MUST(String::formatted("No {} selected.", files_label)));
}
document().invalidate_layout_tree();
document().invalidate_layout_tree(DOM::InvalidateLayoutTreeReason::UpdateFileInputShadowTree);
}
void HTMLInputElement::create_range_input_shadow_tree()
@ -1458,7 +1458,7 @@ WebIDL::ExceptionOr<void> HTMLInputElement::handle_src_attribute(String const& v
});
m_load_event_delayer.clear();
document().invalidate_layout_tree();
document().invalidate_layout_tree(DOM::InvalidateLayoutTreeReason::HTMLInputElementSrcAttributeChange);
},
[this, &realm]() {
// 2. Otherwise, if the fetching process fails without a response from the remote server, or completes but the