Closed Bug 1767179 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 33890 - Add test for :has(:target) change

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Mu-An Chiou <me@muanchiou.com> wrote:

Add test for :has(:target) change

Test case: When :target changes, CSS properties via :has(:target) don't seem to be applied.

Here's a video demonstrating the problem in Safari Version 15.4 (17613.1.17.1.13).

https://user-images.githubusercontent.com/1153134/166135614-32d261e8-b4ff-48ac-aa5a-9dd10280fa84.mov

As you see the rules are there, but they only appear and the page only updates when I manually edit the stylesheet via inspector.


This doesn't seem to work in Safari nor Chrome with Experimental Web Platform features turned on.

Worth noting though–on the test page, if I manually click the fragment links, the text colors would not update (which is what this test is for). But while running the automatic test, I can see the text color changing, even though the assertions do still fail.

Component: web-platform-tests → CSS Parsing and Computation
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 1 subtests

Status Summary

Firefox

OK : 1
FAIL: 1

Chrome

OK : 1
FAIL: 1

Safari

OK : 1
FAIL: 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c9e6894cb9a
[wpt PR 33890] - Add test for :has(:target) change, a=testonly
https://hg.mozilla.org/integration/autoland/rev/69b919f12fe8
[wpt PR 33890] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.