-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error (resulting from confusing text) in auto directionality traversal #9853
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ersal. This fixes an unintended behavior in the auto directionality traversal that I wrote in 11dc4c7 (PR whatwg#9796, fixing whatwg#3699) by failing to edit existing text enough. This section 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 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. My intent when writing this was that a <slot> element in a shadow tree with a dir attribute would be skipped by the traversal, but what I actually wrote was the opposite, specifying that it would provide the result of its dir attribute as the first-strong directionality. (That was my intent because it was slightly easier to implement, I needed to pick one way or the other, and I didn't see any other reasons to pick one or the other.)
annevk
approved these changes
Oct 13, 2023
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Oct 18, 2023
…on case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc
aarongable
pushed a commit
to chromium/chromium
that referenced
this pull request
Oct 18, 2023
…on case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952754 Commit-Queue: David Baron <[email protected]> Reviewed-by: Di Zhang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1211624}
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Oct 18, 2023
…on case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952754 Commit-Queue: David Baron <[email protected]> Reviewed-by: Di Zhang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1211624}
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Oct 18, 2023
…on case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952754 Commit-Queue: David Baron <[email protected]> Reviewed-by: Di Zhang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1211624}
5 tasks
5 tasks
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Nov 1, 2023
… a <slot> dir=auto invalidation case., a=testonly Automatic update from web-platform-tests Test <slot dir> inside dir=auto, and fix a <slot> dir=auto invalidation case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952754 Commit-Queue: David Baron <[email protected]> Reviewed-by: Di Zhang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1211624} -- wpt-commits: b73abec846dc498ef0f725c61d1aa2cb52d00748 wpt-pr: 42600
ErichDonGubler
pushed a commit
to erichdongubler-mozilla/firefox
that referenced
this pull request
Nov 2, 2023
… a <slot> dir=auto invalidation case., a=testonly Automatic update from web-platform-tests Test <slot dir> inside dir=auto, and fix a <slot> dir=auto invalidation case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952754 Commit-Queue: David Baron <[email protected]> Reviewed-by: Di Zhang <[email protected]> Cr-Commit-Position: refs/heads/main@{#1211624} -- wpt-commits: b73abec846dc498ef0f725c61d1aa2cb52d00748 wpt-pr: 42600
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Nov 8, 2023
… a <slot> dir=auto invalidation case., a=testonly Automatic update from web-platform-tests Test <slot dir> inside dir=auto, and fix a <slot> dir=auto invalidation case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952754 Commit-Queue: David Baron <dbaronchromium.org> Reviewed-by: Di Zhang <dizhanggchromium.org> Cr-Commit-Position: refs/heads/main{#1211624} -- wpt-commits: b73abec846dc498ef0f725c61d1aa2cb52d00748 wpt-pr: 42600 UltraBlame original commit: 31eddf6a0ce5ea01d39c0900710c115826d1be4b
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Nov 8, 2023
… a <slot> dir=auto invalidation case., a=testonly Automatic update from web-platform-tests Test <slot dir> inside dir=auto, and fix a <slot> dir=auto invalidation case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952754 Commit-Queue: David Baron <dbaronchromium.org> Reviewed-by: Di Zhang <dizhanggchromium.org> Cr-Commit-Position: refs/heads/main{#1211624} -- wpt-commits: b73abec846dc498ef0f725c61d1aa2cb52d00748 wpt-pr: 42600 UltraBlame original commit: 31eddf6a0ce5ea01d39c0900710c115826d1be4b
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Nov 8, 2023
… a <slot> dir=auto invalidation case., a=testonly Automatic update from web-platform-tests Test <slot dir> inside dir=auto, and fix a <slot> dir=auto invalidation case. This fixes a TODO, and tests the spec editing fix proposed in whatwg/html#9853. It then fixes an invalidation case for insertion/removal of <slot> elements that shows up in that added test, and also adjusts one existing test's result to match that fix. Bug: 576815 Change-Id: I5ce68b1cc9b9b8684a9abaf494c5624601f601bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952754 Commit-Queue: David Baron <dbaronchromium.org> Reviewed-by: Di Zhang <dizhanggchromium.org> Cr-Commit-Position: refs/heads/main{#1211624} -- wpt-commits: b73abec846dc498ef0f725c61d1aa2cb52d00748 wpt-pr: 42600 UltraBlame original commit: 31eddf6a0ce5ea01d39c0900710c115826d1be4b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 an unintended behavior in the auto directionality traversal that I wrote in 11dc4c7 (PR #9796, fixing #3699) by failing to edit existing text enough.
This section 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 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.
My intent when writing this was that a element in a shadow tree with a dir attribute would be skipped by the traversal, but what I actually wrote was the opposite, specifying that it would provide the result of its dir attribute as the first-strong directionality. (That was my intent because it was slightly easier to implement, I needed to pick one way or the other, and I didn't see any other reasons to pick one or the other.)
(See WHATWG Working Mode: Changes for more details.)
/dom.html ( diff )