LibWeb: Don't drop entire layout tree on <input type=file> update

This was completely unnecessary, and we can just let the internal
DOM tree changes trigger partial layout updates instead.

Noticed we were repeatedly dropping layout trees on ChatGPT and this
was one of the culprits.
This commit is contained in:
Andreas Kling 2025-03-07 21:31:03 +01:00 committed by Alexander Kalenik
parent 6c6f9936e2
commit 180a58b3d2
Notes: github-actions[bot] 2025-03-08 02:38:33 +00:00
2 changed files with 1 additions and 4 deletions

View file

@ -1128,8 +1128,6 @@ void HTMLInputElement::update_file_input_shadow_tree()
} else {
m_file_label->set_text_content(MUST(String::formatted("No {} selected.", files_label)));
}
document().invalidate_layout_tree(DOM::InvalidateLayoutTreeReason::UpdateFileInputShadowTree);
}
void HTMLInputElement::create_range_input_shadow_tree()