Fix dir=auto traversal to not apply element-only rules to ancestors #47697
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 fixes Chromium code to match half of the spec update in
whatwg/html#10488 and
whatwg/html#10561 . I previously thought the
code was fine, but I realize a small update is needed. In particular,
the code could apply element-only rules for dir=auto to elements (in
particular, button-type inputs) that are auto-directionality
form-associated elements but were not in the list of exclusions. This
also fixes the list of exclusions to exclude specifically textarea, so
that any actual text content of input elements (but not the value) is
traversed as required by the spec.
This also removes the no-longer needed is_deferred argument to
ResolveAutoDirectionality.
Bug: 576815, 352191350
Change-Id: I7c13b9661d23f8904727c8298a8dca6360d6d732
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5798880
Commit-Queue: David Baron <dbaron@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1344402}