Closed Bug 2086851 Opened 1 month ago Closed 17 days ago

[wpt-sync] Sync PR 64100 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=326761

Categories

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

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ahmad Saleem <ahmad.saleem792+github@gmail.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=326761

WebKit export from bug: :<!---->dir(<!---->)<!----> of a \<<!---->bdi><!----> without a dir attribute takes its ancestor'<!---->s direction when the ancestor'<!---->s dir changes

<pre>
:dir() of a <bdi> without a dir attribute takes its ancestor's direction when the ancestor's dir changes

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

When an element's dir attribute changes, updateEffectiveTextDirectionOfDescendants()
propagates the new direction to its descendants, stopping only at elements whose dir
attribute is in a valid state. A <bdi> element with no dir attribute behaves as
dir=auto, so its directionality comes from its own contents, not from its parent.
Because the walk didn't stop at it, the <bdi> and its subtree took the ancestor's
direction and matched the wrong :dir() pseudo-class. updateHasDirAutoFlagForSubtree()
already skips <bdi> elements for this reason.

Skip <bdi> elements and their subtrees in updateEffectiveTextDirectionOfDescendants().

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=326761">https://bugs.webkit.org/show_bug.cgi?id=326761</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/323439@main">https://commits.webkit.org/323439@main</a>
</pre>

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 34 tests and 30 subtests

Status Summary

Firefox

OK : 1[GitHub] 32[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 4[GitHub] 125[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 126[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 7

Chrome

OK : 1
PASS: 4

Safari

OK : 1
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 17 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.