On Sun, 16 Mar 2025 19:03:32 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

>> 8350917: Allow parent nodes to provide CSS styleable properties for child 
>> nodes
>
> modules/javafx.graphics/src/main/java/javafx/scene/layout/Pane.java line 234:
> 
>> 232:             }
>> 233: 
>> 234:             if (value != null) {
> 
> How would the value ever be anything other than a `StyleableObjectProperty`, 
> since `setChildConstraint()` always creates a `StyleableObjectProperty`?

Yeah, this is not handled well. It was intended to mimic a standard value with 
the property being created (like the lazy property pattern), but it doesn't 
work here.

In theory, as the property map is public, one could set the key to something 
else (not easily mind you, you'd need to iterate to find the keys as they're no 
longer predictable `String`s).  So, I'll remove this code, and just ignore any 
bad value and proceed with returning the default value.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1714#discussion_r1997731065

Reply via email to