Skip to content

Commit

Permalink
Don't update style on new focused element if it isn't in the same doc
Browse files Browse the repository at this point in the history
This fixes a DCHECK when an iframe is moved out of the active document
from within the synchronous onblur event.

Fixed: 1204223
Change-Id: Ifda36722099554d327998b4cfd27e35aa379651c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2873191
Auto-Submit: Mason Freed <[email protected]>
Commit-Queue: Rune Lillesveen <[email protected]>
Reviewed-by: Rune Lillesveen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#879742}
  • Loading branch information
mfreed7 authored and chromium-wpt-export-bot committed May 6, 2021
1 parent 7f6dfe9 commit 6a96f5c
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
This test passes if it does not crash.
<script>
var doc1 = document.documentElement;
let iframe1 = document.createElement("iframe");
doc1.appendChild(iframe1);
separateDoc = document.implementation.createDocument("", null);
iframe1.addEventListener("DOMFocusOut", function () { separateDoc.adoptNode(iframe1); });
iframe1.focus();
iframe1 = document.createElement("iframe");
doc1.appendChild(iframe1);
iframe1.focus();
</script>

0 comments on commit 6a96f5c

Please sign in to comment.