RFR: 8345188: Support tree-structural pseudo-classes [v6]

Michael Strauß mstrauss at openjdk.org
Wed Jan 8 21:36:26 UTC 2025


On Wed, 8 Jan 2025 19:09:11 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> It will still be supported for backwards compatibility, but I see no reason to mention that now that we have the standard-conformant `:root` pseudo-class.
>
> I think we do need to mention the old selector in the CSS Ref because it is still supported.
> 
> We should also tell the developers what they need to do with the existing stylesheets, whether to update them to use the new selector, or, if we plan to support the old one indefinitely, explain that.

Maybe we should deprecate the non-standard `.root` class and mention that in the cssref?

>> One option might be to move all pseudo-class modifications to the end of the `onChange` method. This would make the code equivalent to being called after the callback has completed.
>
> Is there a possibility of introducing an infinite loop?
> 
> And if the code is moved to the end of `onChange`, might that cause a regression with the existing pseudo-classes?

It is possible, in the same way as it is possible to create an infinite loop for all cases where a listener callback modifies its obervable ad infinitum. There’s not much one can do in this case, except stop creating infinite loops.

As for regressions: nothing comes to mind. All changed pseudo-classes will be picked up when CSS runs again in the next pulse.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1652#discussion_r1907888207
PR Review Comment: https://git.openjdk.org/jfx/pull/1652#discussion_r1907887130


More information about the openjfx-dev mailing list