Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-07 Thread Michael Strauß
On Fri, 2 Aug 2024 16:19:15 GMT, Andy Goryachev wrote: >> modules/javafx.graphics/src/main/java/javafx/css/StyleableLongProperty.java >> line 136: >> >>> 134: @Override >>> 135: public void onUpdate(double progress) { >>> 136: set(progress < 1 ? startValue + (long)((

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-03 Thread John Hendrikx
On Fri, 2 Aug 2024 01:32:09 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/javafx/scene/layout/Border.java line >> 331: >> >>> 329: >>> 330: for (int i = 0, max = strokes.size(); i < max; i++) { >>> 331: final BorderStroke stroke = strokes.get(i); >> >

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Michael Strauß
On Fri, 2 Aug 2024 15:28:37 GMT, Andy Goryachev wrote: >> Yes, I think that's good, as it will alert us to the impact of adding a new >> enum value. We would probably need to account for the new value here >> (there's no good default we can choose). > > IllegalArgumentException? Sure, but that

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Fri, 2 Aug 2024 15:44:41 GMT, Michael Strauß wrote: >> I suggest we clarify this behavior in the method description, since this is >> a public API documentation. >> >> Simply saying "should" increases cognitive load and immediately triggers a >> question: why have this argument at all?, a

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Michael Strauß
On Fri, 2 Aug 2024 15:35:14 GMT, Andy Goryachev wrote: >> It's basically the feature level of the specification. >> Here's level 1: https://www.w3.org/TR/css-transitions-1/ (this is >> implemented in JavaFX) >> Here's level 2: https://www.w3.org/TR/css-transitions-2/ >> There seems to be an ongo

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Fri, 2 Aug 2024 01:24:56 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/javafx/animation/Interpolatable.java >> line 57: >> >>> 55: * >>> 56: * >>> 57: * (see prose) >> >> "see prose" - could you be more specific? maybe give an example?

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Thu, 1 Aug 2024 21:54:18 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed a bug > > modules/javafx.graphics/src/main/java/javafx/css/StyleableLongProperty.java > line 136: > >> 134:

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Fri, 2 Aug 2024 15:04:50 GMT, Michael Strauß wrote: >> pardon my ignorance, could you clarify what a "CSS Transition 1" is? > > It's basically the feature level of the specification. > Here's level 1: https://www.w3.org/TR/css-transitions-1/ (this is implemented > in JavaFX) > Here's level 2:

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Thu, 1 Aug 2024 22:45:43 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed a bug > > modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 9184: > >> 9182: * >> 91

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Fri, 2 Aug 2024 01:24:59 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/javafx/css/StyleableDoubleProperty.java >> line 157: >> >>> 155: @Override >>> 156: public boolean >>> updateReversingAdjustedStartValue(TransitionMediator existingMediator) { >>> 15

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Kevin Rushforth
On Fri, 2 Aug 2024 15:41:36 GMT, Michael Strauß wrote: >> I know what @kevinrushforth would say: "it is better to avoid introducing >> unrelated changes" >> >> as long as the new code omits `= null` we should be fine. >> >> (rationale for omitting: explicit initialization creates an unnecessar

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Michael Strauß
On Thu, 1 Aug 2024 22:51:06 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed a bug > > modules/javafx.graphics/src/main/java/javafx/scene/layout/Background.java > line 301: > >> 299:

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Michael Strauß
On Fri, 2 Aug 2024 15:03:48 GMT, Andy Goryachev wrote: >> _Should_ be `null` to get the non-allocating behavior if nothing is found, >> but _could_ also be non-null if we want to provide our own output map. > > I suggest we clarify this behavior in the method description, since this is a > publ

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Michael Strauß
On Fri, 2 Aug 2024 15:00:38 GMT, Andy Goryachev wrote: >> I agree. Not sure if I should remove it from all of the StyleableProperty >> implementations, as the `origin = null` is already there. > > I know what @kevinrushforth would say: "it is better to avoid introducing > unrelated changes" >

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Michael Strauß
On Thu, 1 Aug 2024 22:05:50 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed a bug > > modules/javafx.graphics/src/main/java/javafx/css/StyleableObjectProperty.java > line 210: > >> 208

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Fri, 2 Aug 2024 01:25:26 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 9010: >> >>> 9008: * >>> 9009: * @param property the {@code StyleableProperty} >>> 9010: * @param result the map into which results are stored,

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Michael Strauß
On Fri, 2 Aug 2024 14:52:21 GMT, Andy Goryachev wrote: >> CSS Transitions 1 is a feature-complete spec, and it doesn't include an >> option to specify the transition color space. That might come with CSS >> Transitions 2, but it's not there yet. I think we should revisit this once >> the featu

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Fri, 2 Aug 2024 01:25:06 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/javafx/css/StyleableObjectProperty.java >> line 273: >> >>> 271: >>> 272: private StyleOrigin origin = null; >>> 273: private TransitionController controller = null; >> >> minor: `= null` i

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-02 Thread Andy Goryachev
On Fri, 2 Aug 2024 02:13:16 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/javafx/scene/paint/Color.java line >> 1956: >> >>> 1954: >>> 1955: // If both instances are equal, return this instance to >>> prevent the creation of numerous small objects. >>> 1956:

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-01 Thread Michael Strauß
On Thu, 1 Aug 2024 23:49:08 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed a bug > > modules/javafx.graphics/src/main/java/javafx/scene/paint/Color.java line 1956: > >> 1954: >> 1955:

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-01 Thread Michael Strauß
On Thu, 1 Aug 2024 23:36:41 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed a bug > > modules/javafx.graphics/src/main/java/javafx/scene/layout/BorderConverter.java > line 270: > >> 26

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-01 Thread Michael Strauß
On Thu, 1 Aug 2024 23:21:12 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed a bug > > modules/javafx.graphics/src/main/java/javafx/scene/layout/BackgroundPosition.java > line 266: > >>

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-01 Thread Michael Strauß
On Thu, 1 Aug 2024 21:40:54 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fixed a bug > > modules/javafx.graphics/src/main/java/javafx/animation/Interpolatable.java > line 37: > >> 35: *

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-01 Thread Michael Strauß
On Thu, 1 Aug 2024 22:10:31 GMT, Kevin Rushforth wrote: > I note that PR #1471 was originally proposed to address this. Can you > highlight the differences? Are any of the comments added to that PR still > relevant? The CSS specification allows specifying separate transitions for sub-propertie

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-01 Thread Andy Goryachev
On Wed, 31 Jul 2024 19:34:12 GMT, Michael Strauß wrote: >> This PR completes the CSS Transitions story (see #870) by adding >> interpolation support for backgrounds and borders, making them targetable by >> transitions. >> >> `Background` and `Border` objects are deeply immutable, but not >>

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-08-01 Thread Kevin Rushforth
On Wed, 31 Jul 2024 19:34:12 GMT, Michael Strauß wrote: >> This PR completes the CSS Transitions story (see #870) by adding >> interpolation support for backgrounds and borders, making them targetable by >> transitions. >> >> `Background` and `Border` objects are deeply immutable, but not >>

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-07-31 Thread Michael Strauß
> This PR completes the CSS Transitions story (see #870) by adding > interpolation support for backgrounds and borders, making them targetable by > transitions. > > `Background` and `Border` objects are deeply immutable, but not > interpolatable. Consider the following `Background`, which descr

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-07-04 Thread Nir Lisker
On Tue, 4 Jun 2024 20:46:28 GMT, Kevin Rushforth wrote: > @nlisker would you be willing to be the second reviewer? I could do some of the review, but probably no time for a full one. > Since you propose interpolating objects that aren't simple sets of > floating-point fields, the overridden in

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-06-04 Thread Kevin Rushforth
On Tue, 4 Jun 2024 16:31:49 GMT, Michael Strauß wrote: >> This PR completes the CSS Transitions story (see #870) by adding >> interpolation support for backgrounds and borders, making them targetable by >> transitions. >> >> `Background` and `Border` objects are deeply immutable, but not >> i

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-06-04 Thread Michael Strauß
> This PR completes the CSS Transitions story (see #870) by adding > interpolation support for backgrounds and borders, making them targetable by > transitions. > > `Background` and `Border` objects are deeply immutable, but not > interpolatable. Consider the following `Background`, which descr