Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[A11y] Speculative fix for placeholder elements trying to add children
The crash reports are all logging placeholder elements as trying to add children but having a return value of false for CanHaveChildren(). A possible explanation is that CanHaveChildren() returned true earlier because the placeholder element.ShadowPseudoId() value was not set for the initial call. This hopefully fixes the issue by using a more robust API to check for the placeholder element. Even if it does not fix the crash, it seems cleaner and less brittle. (cherry picked from commit 926950c) Bug: 1407397 Change-Id: I59a10338525076e756e5a60cd475bdb26e75af9c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4590613 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Chris Harrelson <chrishtr@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Auto-Submit: Aaron Leventhal <aleventhal@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1154087} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4604457 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/branch-heads/5790@{#600} Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
- Loading branch information