RFR: 8336097: UserAgent Styles using lookups are promoted to Author level if look-up is defined in Author stylesheet
Andy Goryachev
angorya at openjdk.org
Fri Jul 12 14:57:06 UTC 2024
On Fri, 12 Jul 2024 10:25:57 GMT, John Hendrikx <jhendrikx at openjdk.org> 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);
> }
Would it be possible to create a set of tests that verify _all_ the possible combinations of priorities and stylesheets (as well as Application/Scene/Parent/inline/code)?
Also, do you think cssref.html should be updated to clarify the behavior in "Scene, Parent and SubScene Stylesheets" section?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1503#issuecomment-2225766801
More information about the openjfx-dev
mailing list