On Thu, 28 May 2026 12:33:07 GMT, Lukasz Kostyra <[email protected]> wrote:
>> Michael Strauß has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> stale animation hardening
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TitledPaneSkin.java
> line 298:
>
>> 296: transitionStartValue = getTransition();
>> 297: doAnimationTransition();
>> 298: } else {
>
> I'm wondering if we should also check here if the `timeline` is valid and if
> it is cancel it. Is there a chance `reducedMotion` could be changed to false
> while we are midway through animating the transition?
The question whether `reducedMotion` can change while an animation is in
progress is not important: we don't observe the current reduced-motion value,
we only sample it once when the animation starts. Allowing an animation to run
to completion should always be correct behavior.
However, there is a related problem how we deal with "stale" animations, that
is, running animations that are preempted by a new animation. In general, the
previous animation should be canceled, and the animated value should either be
replaced with the new value, or reconciled with the current value. I've added a
bit of code in some places to better clean up old animations.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2177#discussion_r3318696442