On Thu, 23 Jul 2026 19:12:39 GMT, Andy Goryachev <[email protected]> wrote:

>> A property always evaluates the same, as this is dictated by the stylesheet, 
>> not by the presence or absence of a property in the CSS metadata. So the 
>> stylesheet says: `xyz` must be `5` here, and if you replace the skin and it 
>> has the same property, that evaluation is still correct.
>> 
>> There may be a problem if that new property is of a different type (I didn't 
>> test), but I consider that beyond the scope of this fix as that has never 
>> worked. If you see an easy solution, I can consider adding it -- my primary 
>> goal was to fix the customer found regression that seemed to have been due 
>> to #1076 but in reality has been there much longer, only less visible.
>
> I have to admit it's a rather contrived scenario, so I am not concerned.  The 
> devs  can always work around this by using different property names.
> 
> Maybe just add a comment pointing to this scenario?

I added this to `StyleCacheEntry`:

> Entries are (currently) keyed purely by property name, with no check that a 
> cached value's type still matches what the current lookup expects. This is 
> harmless as long as every {@code Styleable} that could share an entry agrees 
> on the type behind a given property name (which is generally standard for CSS 
> properties). It is not a problem for two different {@code CssMetaData} 
> instances to have the same property name, only if their types would also 
> differ.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2218#discussion_r3641957969

Reply via email to