On Sun, 17 Aug 2025 15:36:06 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

>> This PR adds the necessary logic to automatically relayout unmanaged nodes 
>> when they're dirty as specified by the documentation. Relevant sections 
>> (emphasis mine):
>> 
>> ### Parent::requestLayout
>> 
>>> If this parent is either a layout root or unmanaged, then it will be added 
>>> directly to the **scene's dirty layout list**, otherwise 
>>> requestParentLayout will be invoked.
>> 
>> ### Node::managedProperty
>> 
>>> If a managed node's layoutBounds changes, it will **automatically trigger 
>>> relayout** up the scene-graph to the **nearest layout root**
>> 
>> And:
>> 
>>> If an **unmanaged node** is of type `Parent`, it will act as a **"layout 
>>> root"**
>> 
>> From this I conclude that:
>> - A layout root is any node that is unmanaged (and of type `Parent`), or a 
>> Scene's root node
>> - Changes requiring layout in managed children that have an unmanaged parent 
>> somewhere in their ancestry should cause layout to be triggered for the 
>> affected areas
>> - Automatic relayout is triggered either by scheduling a pulse (for scene 
>> roots) or by adding a layout root to the Scene's dirty layout list
>> 
>> Note that Scene currently does not have a dirty layout list.
>> 
>> Note also that the documentation for `requestLayout` probably meant to say 
>> "**scene** root or unmanaged" instead of "**layout** root or unmanaged."
>
> There is a tiny change in the documentation, but it doesn't change the 
> meaning (a scene root is a layout root, and unmanaged nodes are layout roots; 
> there are no other types of layout roots).  Can do a CSR though if deemed 
> needed.

@hjohn would it be possible to add a unit test?

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

PR Comment: https://git.openjdk.org/jfx/pull/1874#issuecomment-3197245454

Reply via email to