mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-13 11:16:53 +00:00
LibWeb: Invalidate layout after setting Element.innerHTML
It's not enough to only relayout here, since the API can substantially change the DOM. We have to rebuild the layout tree.
This commit is contained in:
@@ -389,7 +389,9 @@ ExceptionOr<void> Element::set_inner_html(String const& markup)
|
||||
return result.exception();
|
||||
|
||||
set_needs_style_update(true);
|
||||
document().set_needs_layout();
|
||||
|
||||
// NOTE: Since the DOM has changed, we have to rebuild the layout tree.
|
||||
document().invalidate_layout();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user