Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors related to <slot> elements in auto directionality traversal
This fixes some related errors in the section on auto directionality traversal that I made recently in 1dc4c7557f5a4c879c1ce65b9cb59b91310bbf5 (PR #9796, fixing #3699). This list item specifies an algorithm that implementors are expected to turn into a traversal of a subtree that skips parts of the subtree. However, by describing the skipping test in the first sub-item as examining ancestors rather than ancestors-or-self, it introduces a subtle difference between the algorithm that an implementor is likely to write and what the spec describes. This change changes the test to ancestors-or-self, and removes the slot element from the list of conditions so that it is possible to reach the second sub-item for slot elements. The edit above was trying to specify the proposal in #3699 (comment). I found a case where I had intended to match that proposal but made an error: the handling of <slot> descendants in the second sub-item was intended to look at their resolved directionality, not their auto directionality. (And this is a simpler test, since the concept always exists, so there's no need to test it for null.) This corrects that error. I believe this combination of changes matches the interaction of these pieces that I intended to write: slot elements with a dir attribute (and their descendants) are skipped, whereas slot elements without a dir attribute provide the strong directionality from their host.
- Loading branch information