On Thu, 15 Jan 2026 18:32:39 GMT, Michael Strauß <[email protected]> wrote:

> for example with multiple layout phases or iteration.

That's exactly right.

To illustrate, I can point to `VFlow:1545` and `VFlow:1559` where a change in 
either scroll bar visibility triggers `layoutCells()`.  It is the 
responsibility of the developer of such a component to ensure that the layout 
converges, i.e. that the logic does not cause infinite recursion.  In the 
`VFlow` case, it does not - once the vertical scrollbar is determined to have 
shown up, it cannot disappear; same goes for  the horizontal scrollbar 
afterwards.

Speaking of the layout system snippet, I might suggest limiting the fast loop 
to a few iterations only. to guard against locking up:


if(!layoutClean) {
  int fastSteps = 2; // or 3, no more
  for(int i=0; i<fastSteps; i++) {
    doCssPass();
    doLayoutPass();
    if(layoutClean) {
      break;
    }
  }
}

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

PR Comment: https://git.openjdk.org/jfx/pull/1945#issuecomment-3756374441

Reply via email to