mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
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:
parent
1d81d2e072
commit
9498555256
Notes:
sideshowbarker
2024-07-17 09:41:34 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/9498555256 Pull-request: https://github.com/SerenityOS/serenity/pull/14379
1 changed files with 1 additions and 0 deletions
|
@ -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 {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue