mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Adopting a node into another document preserves the node's dirty style flags, but the destination ancestor chain never sees them propagate. If a style update is already pending in the new document, it can skip the adopted subtree entirely. Snapshot the subtree and child dirty bits before set_document() updates m_document, then walk the new ancestor chain and re-mark child_needs_style_update so the pending restyle still descends into the adopted subtree.