Bug 234531

Summary: [:has() pseudo-class] :has() selector does not render on first pass?
Product: WebKit Reporter: Alex Riviere <fimion>
Component: CSSAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: brandon, cchana, koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac (Apple Silicon)   
OS: macOS 12   
Bug Depends on:    
Bug Blocks: 227702    
Attachments:
Description Flags
A video demonstrating the bug
none
Patch none

Alex Riviere
Reported 2021-12-20 15:12:13 PST
Created attachment 447653 [details] A video demonstrating the bug Hey Y'all, Just downloaded technology preview 137 to play with the new :has() selector. made this demo: https://codepen.io/fimion/pen/XWeamBQ the div surrounding the list should have a 2px solid red border. The css selector does show up in dev tools, and I can uncheck and then check the border rule, and it will then show up. I've included a video. Please let me know if you need any more information.
Attachments
A video demonstrating the bug (13.93 MB, video/quicktime)
2021-12-20 15:12 PST, Alex Riviere
no flags
Patch (3.67 KB, patch)
2021-12-22 07:35 PST, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2021-12-21 07:55:14 PST
*** Bug 234559 has been marked as a duplicate of this bug. ***
Antti Koivisto
Comment 2 2021-12-21 07:56:00 PST
Looks like a style sharing bug.
Antti Koivisto
Comment 3 2021-12-22 07:35:41 PST
EWS
Comment 4 2021-12-22 10:35:07 PST
Committed r287362 (245504@main): <https://commits.webkit.org/245504@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447804 [details].
Radar WebKit Bug Importer
Comment 5 2021-12-22 10:36:19 PST
Antti Koivisto
Comment 6 2021-12-26 12:02:44 PST
*** Bug 234642 has been marked as a duplicate of this bug. ***
Antti Koivisto
Comment 7 2022-01-03 06:32:50 PST
*** Bug 234732 has been marked as a duplicate of this bug. ***
Brandon McConnell
Comment 8 2022-01-04 07:56:06 PST
Is there a way to subscribe to this bug and be alerted when the fix is pushed to the live version of Safari TP for testing?
Antti Koivisto
Comment 9 2022-01-04 08:43:01 PST
The fix should be in the next STP. You can follow @WebKit in Twitter to get notified.
cchana
Comment 10 2022-01-09 11:49:33 PST
While I await the next STP, wanted to mention that the following selector worked but aspects of it were ignored. label:has(+ input[type="text"]) This would select _all_ labels followed by inputs, rather than only the ones that were followed by text inputs.
Alex Riviere
Comment 11 2022-01-21 07:43:48 PST
Just downloaded STP 138, this bug still exists. It has the same rendering error. Dev tools pick up on the styles correctly, but they are not rendered. https://codepen.io/fimion/pen/XWeamBQ
Antti Koivisto
Comment 12 2022-01-21 08:05:51 PST
Unfortunately STP138 was based on a rather old revision (r286944) so is missing most if the more recent fixes.
Note You need to log in before you can comment on or make changes to this bug.