LibWeb: Invalidate document style when a node is removed
This forces us to recompute style everywhere, since all kinds of selectors may produce different results now. In the future, we should look at narrowing down the invalidation that occurs here, but for now let's just invalidate everything and make the results correct before worrying about performance.
This commit is contained in:
parent
04311ca7f1
commit
c988cbb8b1
Notes:
sideshowbarker
2024-07-17 17:39:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c988cbb8b1
1 changed files with 2 additions and 0 deletions
|
@ -427,6 +427,8 @@ void Node::remove(bool suppress_observers)
|
|||
}
|
||||
|
||||
parent->children_changed();
|
||||
|
||||
document().invalidate_style();
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-node-replace
|
||||
|
|
Loading…
Add table
Reference in a new issue