Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make dir=auto fall back to the parent's directionality rather than ltr.
When dir=auto fails to find text with strong directionality (or a <slot> element) to determine the directionality of the element, it should fall back to the directionality that it would have inherited from its parent (or, for <slot>, its shadow host) rather than falling back to ltr. This requires updating directionality invalidation to account for the possibility that elements with dir=auto can inherit directionality. This is based on the proposed behavior described in: whatwg/html#3699 (comment) which is in the process of being specified in: whatwg/html#9554 whatwg/html#9796 This is one of two changes needed to fix the failure of: external/wpt/html/dom/elements/global-attributes/dir-shadow-41.html in the still-unlanded WPT PR at web-platform-tests#29820 Bug: 576815 Change-Id: I9fc7c85875074ad41704ab45ec70c7632c3f8d31 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4805163 Commit-Queue: David Baron <[email protected]> Reviewed-by: Di Zhang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1202893}
- Loading branch information