On Wed, 15 Jul 2026 13:10:13 GMT, Florian Kirmaier <[email protected]> wrote:
> When ContextMenu.show(node, side, x, y) is executed, the CSS is evaluated > multiple times. > Of these 3 times, 2 process a non-final CSS state. > This leads to temporary, unnecessary changes. > > This is fixed by properly defining the stylesheets and the > ownerWindow/ownerNode properties of the context menu > before applyCss is called. The previous solution was incomplete and resulted > in unnecessary CSS calls. > > Slightly related to my other PR: https://github.com/openjdk/jfx/pull/2213 > But it is fixed in a way that works independently of it. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Just noticed that i accidentally removed a line. Readded it. Conceptional the fix is quite simple. Do all the changes which influence CSS before requesting the CSS state. Basically fixes a half implementation which was done before. Targeting the Release after makes of course sense! Now after the JFX27 Release - it would be great if this PR can get reviewed. Motivation for this was less the performance, but to ensure no temporary skin get's used, which can have side-effects on some implementations. It's now `rfr`! ------------- PR Comment: https://git.openjdk.org/jfx/pull/2215#issuecomment-4982042528 PR Comment: https://git.openjdk.org/jfx/pull/2215#issuecomment-5777803817 PR Comment: https://git.openjdk.org/jfx/pull/2215#issuecomment-6011415925
