On Mon, 15 Jul 2024 12:10:27 GMT, John Hendrikx <[email protected]> wrote:
>> This change removes the origin determination from `resolveLookups`.
>> Instead, the origin from the style is used.
>>
>> Although a comment in the code alluded that this may cause problem with
>> `INLINE` styles, this is not the case. Whenever a `Node` is associated with
>> a `CssStyleHelper`, a suitable shared cache is determined for its use. This
>> already takes into account the presence of an inline style, and only nodes
>> with the same inline style can share such a cache. See `Cache#getStyleMap`
>> and specifically this fragment where an additional selector is added for the
>> inline style:
>>
>> if (hasInlineStyle) {
>> Selector selector =
>> cacheContainer.getInlineStyleSelector(inlineStyle);
>> if (selector != null) selectors.add(selector);
>> }
>
> John Hendrikx has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Add test case
Thank you for the detailed writeup! I did not know about
`Region.getUserAgentStylesheet()`, especially about its doc "Some JavaFX CSS
implementations may choose to cache this response for an indefinite period of
time, and therefore there should be no expectation around when this method is
called." How are we supposed to implement dynamically changing styles??
Do I understand you correctly that `Scene.setUserAgentStylesheet()` completely
replaces modena.css for that Scene? And then Scene.getStylesheets() will lay
on top of that, having higher priority?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1503#issuecomment-2236860652