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

Jurgen duke at openjdk.org
Thu Nov 20 13:12:30 UTC 2025


On Mon, 17 Nov 2025 21:46:06 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> Requesting `VFlow` re-layout when signaled by a `Node` embedded in `TextCell`.
> 
> 
> ### NOTES
> 
> - this PR depends on https://github.com/openjdk/jfx/pull/1974
> - the fix can be verified visually using the latest Monkey Tester
> 
> <img width="1232" height="741" alt="Screenshot 2025-11-17 at 13 43 12" src="https://github.com/user-attachments/assets/58b2ef77-094c-45bd-8a04-3caaa4672df1" />

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) ?

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

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


More information about the openjfx-dev mailing list