RFR: 8296387: [Tooltip, CSS] -fx-show-delay is only applied to the first tooltip that is shown before it is displayed [v9]
Kevin Rushforth
kcr at openjdk.org
Mon Jul 8 21:44:38 UTC 2024
On Thu, 4 Jul 2024 09:32:39 GMT, Marius Hanl <mhanl at openjdk.org> wrote:
>> This PR fixes a long standing issue where the `Tooltip` will always wait one second until it appears the very first time, even if the
>> `-fx-show-delay` was set to another value.
>>
>> The culprit is, that the `cssForced` flag is not inside `Tooltip`, but inside the `TooltipBehaviour`. So the very first `Tooltip` gets processed correctly, but after no `Tooltip` will be processed by CSS before showing, resulting in the set `-fx-show-delay` to not be applied immediately.
>>
>> Added a bunch of headful and headless tests for the behaviour since there were none before.
>
> Marius Hanl has updated the pull request incrementally with one additional commit since the last revision:
>
> add many more unit tests for Tooltip
> > org.opentest4j.AssertionFailedError: 193 <= 150 ==> expected: but was:
>
> I don't see `testShowDelayCssShowTooltipTwice()` checking for the value of 150... Where did it come from?
It's 100 (expected value) plus 50 (maximum delta). Here is the call stack:
L72: assertTrue(tooltipShowTime <= maximumTime, tooltipShowTime + " <= " + maximumTime);
L64: assertTooltipShowDelay(tooltipShowTime, expectedTime, 50);
L209: assertTooltipShowDelay(tooltipShowTime, 100);
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1394#issuecomment-2215398503
More information about the openjfx-dev
mailing list