Attention is currently required from: Di Zhang.
David Baron would like Di Zhang to review this change.
Fix the traversal for dir=auto handling on <slot> to traverse what was intended.
The use of Traversal and FlatTreeTraversal for handling <slot dir=auto>,
prior to this change, starts from the first flat-tree slotted child of
the slot, and from there traverses potentially the entire rest of the
document, ignoring the stay_within argument to the function and the
slotting of children. This change fixes the traversal to traverse the
children slotted into the <slot> and their light dom descendants.
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
https://github.com/web-platform-tests/wpt/pull/29820
Bug: 576815
Change-Id: Ifc0277cff4d94a30e2dd932004a55ed54bfa60bb
---
M third_party/blink/renderer/core/html/html_element.cc
D third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window-expected.txt
2 files changed, 41 insertions(+), 13 deletions(-)
To view, visit change 4805164. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Di Zhang.
Attention is currently required from: David Baron.
2 comments:
File third_party/blink/renderer/core/html/html_element.cc:
Patch Set #5, Line 2493: CHECK(!RuntimeEnabledFeatures::CSSPseudoDirEnabled() || this == stay_within);
Add to TODO that once flag is removed, this function should only be called with self as stay_within (or remove this arg).
Patch Set #5, Line 2509: if (slotted_node->IsTextNode()) {
Should this be calling `element->ShouldAutoDirUseValue()` instead?
To view, visit change 4805164. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: David Baron.
David Baron uploaded patch set #6 to this change.
Fix the traversal for dir=auto handling on <slot> to traverse what was intended.
The use of Traversal and FlatTreeTraversal for handling <slot dir=auto>,
prior to this change, starts from the first flat-tree slotted child of
the slot, and from there traverses potentially the entire rest of the
document, ignoring the stay_within argument to the function and the
slotting of children. This change fixes the traversal to traverse the
children slotted into the <slot> and their light dom descendants.
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
https://github.com/web-platform-tests/wpt/pull/29820
Bug: 576815
Change-Id: Ifc0277cff4d94a30e2dd932004a55ed54bfa60bb
---
M third_party/blink/renderer/core/html/html_element.cc
D third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window-expected.txt
2 files changed, 43 insertions(+), 13 deletions(-)
To view, visit change 4805164. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Di Zhang.
2 comments:
File third_party/blink/renderer/core/html/html_element.cc:
Patch Set #5, Line 2493: CHECK(!RuntimeEnabledFeatures::CSSPseudoDirEnabled() || this == stay_within);
Add to TODO that once flag is removed, this function should only be called with self as stay_within […]
Done
Patch Set #5, Line 2509: if (slotted_node->IsTextNode()) {
Should this be calling `element->ShouldAutoDirUseValue()` instead?
I don't think it needs to. This part is handling text nodes, and the part below is handling elements. The part below that handles elements will make a recursive call to `ResolveAutoDirectionality`, which will call `ElementIfAutoDirShouldUseValueOrNull` for the child element.
To view, visit change 4805164. To unsubscribe, or for help writing mail filters, visit settings.
Patch set 6:Commit-Queue +2
Chromium LUCI CQ submitted this change.
Fix the traversal for dir=auto handling on <slot> to traverse what was intended.
The use of Traversal and FlatTreeTraversal for handling <slot dir=auto>,
prior to this change, starts from the first flat-tree slotted child of
the slot, and from there traverses potentially the entire rest of the
document, ignoring the stay_within argument to the function and the
slotting of children. This change fixes the traversal to traverse the
children slotted into the <slot> and their light dom descendants.
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
https://github.com/web-platform-tests/wpt/pull/29820
Bug: 576815
Change-Id: Ifc0277cff4d94a30e2dd932004a55ed54bfa60bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4805164
Reviewed-by: Di Zhang <dizh...@chromium.org>
Commit-Queue: David Baron <dba...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1202823}
---
M third_party/blink/renderer/core/html/html_element.cc
D third_party/blink/web_tests/external/wpt/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window-expected.txt
2 files changed, 43 insertions(+), 13 deletions(-)