RFR: 8371067: RichTextArea: requestLayout by inline node doesn't reach VFlow

Jurgen duke at openjdk.org
Thu Nov 20 16:58:55 UTC 2025


On Thu, 20 Nov 2025 16:09:32 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/TextCell.java line 105:
>> 
>>> 103:     public void add(Node node) {
>>> 104:         flow().getChildren().add(node);
>>> 105:         embedsNode = true;
>> 
>> Is the intention that if the `TextCell` has no children (neither Text nor embedded nodes) that _getAncestorOfClass_ is bypassed ?
>> Or is this to indicate that _getAncestorOfClass_ should only be invoked if there are any embedded nodes (non Text ones) present ?
>> If the latter then note that `add(Node)` is called for both the adding of Text and embedded nodes and maybe you intended to overload the add method with add(Text) ?
>
> All this is by design.  VFlow is the component that lays out the text cells.

Umm, I find this code ambiguous - so just trying to clarify which of the two options presented you intend ?
If it's the first then maybe an alternative variable/flag name should be considered ?
If it's the second then embedsNode is always set true as soon as any content is added which means the first option is what is actually occurring ?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1975#discussion_r2546863013


More information about the openjfx-dev mailing list