Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions modules/javafx.graphics/src/main/java/javafx/scene/Parent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ private void markDirtyLayout(boolean local, boolean forceParentLayout) {
* rendered. This is batched up asynchronously to happen once per
* "pulse", or frame of animation.
* <p>
* If this parent is either a layout root or unmanaged, then it will be
* If this parent is either a scene root or unmanaged, then it will be
* added directly to the scene's dirty layout list, otherwise requestParentLayout
* will be invoked.
* @since JavaFX 8.0
Expand Down Expand Up @@ -1066,7 +1066,15 @@ void requestParentLayout(boolean forceParentLayout) {
if (!layoutRoot) {
final Parent p = getParent();
if (p != null && (!p.performingLayout || forceParentLayout)) {
p.requestLayout();

/*
* The forceParentLayout flag must be propagated to mark all ancestors
* as needing layout. Failure to do so while performingLayout is true
* would stop the propagation mid-tree. This leaves some nodes as needing
* layout, while its ancestors are clean, which is an inconsistent state.
*/

p.requestLayout(forceParentLayout);
}
}
}
Expand Down