On Tue, 7 Jan 2025 20:11:46 GMT, Andy Goryachev <[email protected]> wrote:
>> Michael Strauß has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains three additional
>> commits since the last revision:
>>
>> - Merge branch 'master' into fixes/css-initial-value
>> - use HashSet instead of IdentityHashMap
>> - start transitions only when not in initial CSS state
>
> modules/javafx.graphics/src/main/java/javafx/css/StyleableBooleanProperty.java
> line 74:
>
>> 72: public void applyStyle(StyleOrigin origin, Boolean v) {
>> 73: // If the value is applied for the first time, we don't start a
>> transition.
>> 74: TransitionDefinition transition = getBean() instanceof Node node
>> && !NodeHelper.isInitialCssState(node) ?
>
> minor: to simplify the code in many places, you could change `isInitialState`
> to accept an `Object` argument instead of `Node` and do an `instanceof` there.
I don't think this would work, since we need the `Node`-typed `node` variable
as an argument for `NodeHelper.findTransitionDefinition`, so we can't remove
the `instanceof` test here.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1607#discussion_r1906022456