RFR: 8185887: TableRowSkinBase fails to correctly virtualize cells in horizontal direction [v4]

Marius Hanl mhanl at openjdk.org
Fri Jan 17 08:56:43 UTC 2025


On Thu, 16 Jan 2025 22:46:39 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Good to know, we should document your solution in more detail (and with the concrete fix -> code snippet from the RTA) together with the HSB bug as a new ticket probably? Then we may already have a potential solution with code, and of course a ticket that tracks the bug, if we do not have already (I think I saw a similar bug already, but not 100% sure).
>
> VFlow LL1529-1555
> 
> 
>         // scroll bars
>         boolean vsbVisible = useContentHeight ?
>             false :
>             (topCellIndex() > 0) ?
>                 true :
>                 (arrangementHeight + contentPaddingTop + contentPaddingBottom) > viewPortHeight;
> 
>         if (vsbVisible != vscroll.isVisible()) {
>             vscroll.setVisible(vsbVisible);
>             // do another layout pass with the scrollbar updated
>             layoutCells();
>             return;
>         }
>         if (vsbVisible) {
>             width -= vsbWidth;
>         }
> 
>         boolean hsbVisible = (wrap || useContentWidth) ?
>             false :
>             (unwrappedWidth + contentPaddingLeft + contentPaddingRight) > viewPortWidth;
> 
>         if (hscroll.isVisible() != hsbVisible) {
>             hscroll.setVisible(hsbVisible);
>             // do another layout pass with the scrollbar updated
>             layoutCells();
>             return;
>         }
> 
> 
> 
> https://github.com/andy-goryachev-oracle/jfx/blob/d07d408fa79e25a02b0d5e2f9aeb3990a7136077/modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/VFlow.java#L1529

Thanks. That makes sense IMO. Can probably also be applied to the `VirtualFlow`.
Just need to be careful that we never can run in a stack overflow ofc. :)

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1644#discussion_r1919766327


More information about the openjfx-dev mailing list