Do not require validation messages to have a parent at all times #29376
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Validation messages are presented at the top of a document when there
is invalid entry in a form. The accessibility object for these is only
created once, and either added or removed from the root object's
children depending on whether it's currently visible. This can lead
to a situation where it's marked dirty and the serializer tries to use
it, even when it's not currently part of the tree.
This CL removes the requirement for it to have a parent, in order to
avoid DCHECK()s that require all objects but the root to have a parent,
and repairs missing parents.
Another solution could be to detach and remove the validation message
object (validation_message_axid_), when it is not in use, and create
a new one each time one is needed.
Fixed: 1216847
Change-Id: I009ee1d2c46ad989182a0a4ff0c11381508a77c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2961162
Commit-Queue: Daniel Libby <dlibby@microsoft.com>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Daniel Libby <dlibby@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#892471}