On Wed, 7 Oct 2026 12:58:36 GMT, Marius Hanl <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/CssStyleHelper.java line
>> 227:
>>
>>> 225: // The css set properties carry over, so those no longer
>>> styled are reset when the styles are applied.
>>> 226: if (currentHelper != null) {
>>> 227:
>>> helper.cacheContainer.cssSetProperties.putAll(currentHelper.cacheContainer.cssSetProperties);
>>
>> we'll have a regression: here we copy old properties (even those removed),
>> mixing them with the new.
>>
>> example:
>> 1. style translateX in the stylesheet (.old), style opacity in .new
>> (removing translateX)
>> 2. applyCss()
>> 3. add a listener to translateX which sets opacity
>> 4. set style to .new on the root, applyCss()
>
> I had a look and did some research, that seems to be a preexisting issue
> (kind of). It is unspecified what happens in this scenario, e.g. which css
> property is applied first -> run listener -> change a css property -> the
> loop may not even process the change.
>
> This might be another case where it would make sense to first fix this issue
> on a seperate branch. I feel like this is an endless story, taking more time
> than I have ever had hoped.
One thing we could do then is to write a test, make sure it fails in master,
and file a bug.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2225#discussion_r4208224686