Skip to content

Commit

Permalink
Fix crash in moveBefore
Browse files Browse the repository at this point in the history
This crash was created because when we move inputs around some of their
(shadow) descendants are text fragments, and FlatTreeParentChanged
doesn't like that. Made it so that FlatTreeParentChanged only works on
elements/text nodes.

Bug: 352081025
Change-Id: Ied34f1e66817fde8625b56dbbf2ed05e62eb68bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5691651
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1325460}
  • Loading branch information
noamr authored and sadym-chromium committed Jul 18, 2024
1 parent c34a15c commit 7029cb1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dom/nodes/moveBefore/tentative/input-moveBefore-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<body>
<input id="input">
<script>
window.onload = () => {
document.body.moveBefore(document.querySelector("#input"), null);
};
</script>

0 comments on commit 7029cb1

Please sign in to comment.