RFR: 8320796: CssMetaData.combine() [v6]

Michael Strauß mstrauss at openjdk.org
Wed Nov 29 21:29:23 UTC 2023


On Wed, 29 Nov 2023 21:09:37 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

> But it's limited because it has been artificially limited. It's a special case of `<T> List<T> combine(List<T>, T... items)`, which is a general utility method. Just duplicating this method for specific `T`'s doesn't make it more fitting for that scope.

Functional requirements aren't the only requirements that need to be considered. The CSS system only works well enough with some performance assumptions. As of now, performance requirements are not specified anywhere, but they are certainly implied by the implementation.

I think we have two options here:
1. Specify the performance requirements for `getCssMetaData` (and its associated `getClassCssMetaData`), and provide a utility method that makes it easy to create implementations that meet those requirements.
2. Enhance the CSS system (in this case, `CssStyleHelper`) such that the metadata gathered from public API is internally represented with data structures that decouple internal performance requirements from third-party implementations (basically, copy the metadata received from `getCssMetaData` into internal arrays or some other suitable data structure).

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

PR Comment: https://git.openjdk.org/jfx/pull/1296#issuecomment-1832725271


More information about the openjfx-dev mailing list