Closed Bug 1876163 Opened 2 years ago Closed 1 year ago

implement recent HTML spec changes to directionality and shadow DOM

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: dbaron, Assigned: vhilla)

References

(Blocks 2 open bugs)

Details

(Keywords: dev-doc-complete)

Attachments

(5 files)

There were a bunch of recent HTML spec changes related to directionality (and, in small ways, language) and their inheritance and interaction with Shadow DOM. The most substantive changes were in https://github.com/whatwg/html/pull/9796 but there were also other changes that I've linked in the "See Also" field.

Keywords: dev-doc-needed
Assignee: nobody → vhilla
Assignee: vhilla → nobody
Assignee: nobody → vhilla
Status: NEW → ASSIGNED
Attachment #9398126 - Attachment description: Bug 1876163 - Part 3: Slot auto directionality for dynamic changes. r=#dom-core → Bug 1876163 - Part 4: Slot auto directionality for dynamic changes. r=#dom-core
Attachment #9398127 - Attachment description: Bug 1876163 - Part 4: Consider input / textarea children of dir=auto slot. r=#dom-core → Bug 1876163 - Part 5: Consider input / textarea children of dir=auto slot. r=#dom-core
See Also: → 1896667
Attachment #9400504 - Attachment description: Bug 1876163 - Part 3: Track whether node affects dir=auto ancestors of assigned slot. r=emilio,smaug → Bug 1876163 - Part 3: Track whether node affects assigned dir=auto slot of ancestor. r=emilio,smaug
Blocks: 1903732
Pushed by vhilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/613c14c84d7a Part 1: Refactor and add more text directionality tests. r=emilio https://hg.mozilla.org/integration/autoland/rev/66a9df8d3bd2 Part 2: Update static case of compute auto directionality. r=emilio,smaug https://hg.mozilla.org/integration/autoland/rev/763a627a0504 Part 3: Track whether node affects assigned dir=auto slot of ancestor. r=emilio,smaug https://hg.mozilla.org/integration/autoland/rev/166e0ae30792 Part 4: Slot auto directionality for dynamic changes. r=smaug,emilio https://hg.mozilla.org/integration/autoland/rev/160c9642bf7a Part 5: Consider input / textarea children of dir=auto slot. r=smaug
Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.
Flags: needinfo?(james)
Flags: needinfo?(aborovova)
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/47069 for changes under testing/web-platform/tests
Flags: needinfo?(james)
Flags: needinfo?(aborovova)
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot

It took longer than I hoped, but I finally had a chance to look at the three tests that were added in this bug that Chromium is failing.

I have fixes for two of them.

But I think this test is testing something that was a mistake in the spec:
https://github.com/web-platform-tests/wpt/blob/b6bca1a1aa8042d6651dc8ac9a0541cd506377b2/html/dom/elements/global-attributes/dir-auto-dynamic-changes.window.js#L381

If I'm understanding this test correctly, it looks to me like it is assuming that a form element being "auto-directionality form associated" influences the dir=auto state on other elements. However, I think being "auto-directionality form associated" was intended to influence what dir=auto does on the element itself, but not have any effect on dir=auto on ancestors.

However, the spec text has special handling for slot elements because what matters is their assigned nodes and not their children -- but I think that traversal was intended to be like a traversal of children, but differ only in that it traverses the assigned nodes rather than the children. So I think that spec text's reference to the auto directionality of the child is wrong, and the spec probably needs to be fixed to make that traversal (step 2 in https://html.spec.whatwg.org/multipage/dom.html#auto-directionality) behave more like traversal of children.

Does that make sense?

I created https://github.com/whatwg/html/pull/10561 for a spec update, so probably better to discuss there rather than here.

Asscoiated pull requests

See Also: → 2015010
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: