Fix HTML directionality inheritance for empty <bdi> elements with no dir attribute. #43933
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.
Suggestion cannot be applied right now. Please check back later.
This correctly initializes the flag indicating that the HTML
directionality is inherited from the parent for <bdi> elements, which
behaves like it has dir=auto by default. Even without this change, it
gets initialized correctly when a dir attribute is changed or when the
text content of the element changes.
This also clears the same flag when the dir attribute changes. This
should affect some other cases of dir attribute changes, but we somehow
didn't hit it until fixing the previous bug exposed the problem.
This fixes the failure of a test that I added in
#43896 in response to
noticing and fixing an error I made in the HTML spec in
whatwg/html#10005 .
Bug: 576815
Change-Id: I3006d45079694d90dd178f8c439e22f6419bd992
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5186678
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: David Baron <dbaron@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1246176}