forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When an ancestor suddenly becomes a leaf, prune descendants
Otherwise, reparenting errors occur when the descendants are accessed, as it is impossible to have a leaf object with children. Bug: 1205275 Change-Id: Iff94622994840bbe77d28ac67ef234250945602e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2876448 Commit-Queue: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#880122}
- Loading branch information
1 parent
35fd1f3
commit db50d61
Showing
5 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
content/test/data/accessibility/regression/missing-parent-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rootWebArea name='done' | ||
++genericContainer ignored | ||
++++genericContainer | ||
++++++image |
32 changes: 32 additions & 0 deletions
32
content/test/data/accessibility/regression/missing-parent.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- | ||
@WAIT-FOR:done | ||
--> | ||
<!-- Applying the class "strange" turns <col> into a LayoutImage, which | ||
cannot have children, yet a preexisting descendants exists that tries to | ||
find its parent, triggering a DCHECK --> | ||
<style> | ||
.strange { text-align: center; content: url(data:image/png,aaa); } | ||
</style> | ||
|
||
<foo></foo> | ||
|
||
<script> | ||
const col = document.createElement('col'); | ||
const span = document.createElement('span'); | ||
const bar = document.createElement('bar'); | ||
const baz = document.createElement('baz'); | ||
|
||
// Create structure manually as parser will refuse: | ||
// <foo><col><span><bar> | ||
document.querySelector('foo').appendChild(col); | ||
col.appendChild(span); | ||
span.appendChild(bar); | ||
bar.appendChild(baz); | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
setTimeout(() => { | ||
document.querySelector('foo').className = 'strange'; | ||
document.title = 'done'; | ||
}, 50); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters