Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix :has() invalidation bug on wiping an element by means of innerHTML
There is a bug on :has() invalidation when removing both element and non-element nodes by assigning new text to element.innerHTML because ChildrenChangeType::kAllChildrenRemoved is not handled in Element::ChildChanged(). <style> div:has(span) { color: red } </style> <div id="target"> This is a text <span> with span </span></div> <script> target.innerHTML = "This is a text"; </script> Fixed the bug by handling the ChildrenChangeType::kAllChildrenRemoved in Element::ChildChanged(). Bug: 1366369 Change-Id: Ibe450fcd37005dd892c4939188aa39428a8565c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3910212 Commit-Queue: Byungwoo Lee <[email protected]> Reviewed-by: Rune Lillesveen <[email protected]> Cr-Commit-Position: refs/heads/main@{#1050523}
- Loading branch information