LibWeb: Trigger a relayout after setting Element.innerHTML

In addition to tearing down the layout tree, we also want to trigger a
relayout for the changes made by setting Element.innerHTML to take
effect.
This commit is contained in:
Itamar 2022-06-24 22:43:40 +03:00 committed by Andreas Kling
parent 1d81d2e072
commit 9498555256
Notes: sideshowbarker 2024-07-17 09:41:34 +09:00

View file

@ -468,6 +468,7 @@ ExceptionOr<void> Element::set_inner_html(String const& markup)
// NOTE: Since the DOM has changed, we have to rebuild the layout tree.
document().invalidate_layout();
document().set_needs_layout();
return {};
}