Closed Bug 1914054 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 47697 - Fix dir=auto traversal to not apply element-only rules to ancestors

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 47697 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/47697
Details from upstream follow.

David Baron <dbaron@chromium.org> wrote:

Fix dir=auto traversal to not apply element-only rules to ancestors

This fixes Chromium code to match half of the spec update in
https://github.com/whatwg/html/issues/10488 and
https://github.com/whatwg/html/pull/10561 . I previously thought the
code was fine, but I realize a small update is needed. In particular,
the code could apply element-only rules for dir=auto to elements (in
particular, button-type inputs) that are auto-directionality
form-associated elements but were not in the list of exclusions. This
also fixes the list of exclusions to exclude specifically textarea, so
that any actual text content of input elements (but not the value) is
traversed as required by the spec.

This also removes the no-longer needed is_deferred argument to
ResolveAutoDirectionality.

Bug: 576815, 352191350
Change-Id: I7c13b9661d23f8904727c8298a8dca6360d6d732
Reviewed-on: https://chromium-review.googlesource.com/5798880
WPT-Export-Revision: d34f0a7331a6a50a9733812131d86a6bb2f09321

PR 47697 applied with additional changes from upstream: 24bea5f38d235db99296614c07bcab105825b6f8, fddc4be423e3243af4b3b4fb410361579ea97193
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 15 subtests

Status Summary

Firefox

OK : 1
PASS: 11
FAIL: 4

Chrome

OK : 1
PASS: 11
FAIL: 4

Safari

OK : 1
PASS: 10
FAIL: 5

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/dom/elements/global-attributes/dir-slots-directionality.html [wpt.fyi]
    • dir=auto slot ignores assigned nodes with dir attribute: FAIL (Chrome: FAIL, Safari: PASS)
    • dir=auto slot ignores text in bdi assigned nodes: FAIL (Chrome: FAIL, Safari: PASS)
    • dir=auto slot ignores text in value of input element children: FAIL (Chrome: FAIL, Safari: FAIL)
    • dir=auto slot is not affected by value of auto-directionality form associated elements: FAIL (Chrome: FAIL, Safari: PASS)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0b5b206a1a0 [wpt PR 47697] - Fix dir=auto traversal to not apply element-only rules to ancestors, a=testonly https://hg.mozilla.org/integration/autoland/rev/579cee7c4dab [wpt PR 47697] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.