Closed Bug 1860136 Opened 6 months ago Closed 6 months ago

:has selector - Invalidation does not affect pseudoelement generation

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

VERIFIED FIXED
121 Branch
Tracking Status
firefox121 --- verified
firefox122 --- verified

People

(Reporter: dshin, Assigned: dshin)

References

Details

Attachments

(2 files)

(Based on issue mentioned here)

STR: Run attached test case
Expected: "Hi" should dis/appear every second
Actual: "Hi" never appears

Assignee: nobody → dshin
Blocks: has-pseudo
Severity: -- → S3
Status: NEW → ASSIGNED

Just in case: I did play a bit with the minimal case, and found out that the minimal workaround could be to have a selector that matches the same element with the same :has() but without the pseudo: just by having it, the other selector with the pseudo starts to work: https://codepen.io/kizu/pen/wvNwWGo

Also, was a bit tricky to debug on CodePen, as it seems that sometimes (not always?) editing the styles pane did trigger something, making the case with the pseudo-element to work.

Pushed by dshin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d02d47db8d23
Fix up check for subject/non-subject match in relative selector invalidation. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/42685 for changes under testing/web-platform/tests

(In reply to Roman Komarov from comment #1)

Just in case: I did play a bit with the minimal case, and found out that the minimal workaround could be to have a selector that matches the same element with the same :has() but without the pseudo: just by having it, the other selector with the pseudo starts to work: https://codepen.io/kizu/pen/wvNwWGo
Also, was a bit tricky to debug on CodePen, as it seems that sometimes (not always?) editing the styles pane did trigger something, making the case with the pseudo-element to work.

(A bit late, but...)
Yeah, if any other selector happens to trigger invalidation on the right element (i.e. the "parent" of the pseudoelement), it look as if it works correctly, but the underlying problem is not being able to invalidate on its own.
From the author's perspective, I agree that it just seems inconsistent and frustrating. At least the silver lining is that this in and of itself tends to be a telltale sign of this type of bug.

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Upstream PR merged by moz-wptsync-bot
Flags: qe-verify+

Reproduced on an affected Nightly build from 2023-10-19, on Win 11.
Verified as fixed on Firefox 121.0b3 (20231124091512) and 122.0a1 (20231126211752)on Win 10, Ubuntu 22 and macOS 11.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1874066
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: