Integrated: 8372438: SimpleViewOnlyStyledModel: non-text paragraphs

Andy Goryachev angorya at openjdk.org
Tue Dec 9 15:35:55 UTC 2025


On Mon, 24 Nov 2025 20:23:28 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> Fixing a bug in `SimpleViewOnlyStyledModel.lastParagraph()` which breaks adding text segments after a `Region`-based paragraph.
> 
> Test cases:
> 
>     @Test
>     public void addTextAfterRegion() {
>         SimpleViewOnlyStyledModel m = new SimpleViewOnlyStyledModel();
>         m.addParagraph(() -> new Region());
>         m.addNodeSegment(() -> new Region());
>         assertEquals(2, m.size());
>     }
> 
>     @Test
>     public void addTextAfterRegionAfterText() {
>         SimpleViewOnlyStyledModel m = new SimpleViewOnlyStyledModel();
>         m.addNodeSegment(() -> new Region());
>         m.addParagraph(() -> new Region());
>         m.addSegment("text");
>         assertEquals(3, m.size());
>     }

This pull request has now been integrated.

Changeset: 03612e1b
Author:    Andy Goryachev <angorya at openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/03612e1b4855c178febe63160070af66e82f9ee1
Stats:     83 lines in 2 files changed: 67 ins; 0 del; 16 mod

8372438: SimpleViewOnlyStyledModel: non-text paragraphs

Reviewed-by: zelmidaoui, lkostyra

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

PR: https://git.openjdk.org/jfx/pull/1983


More information about the openjfx-dev mailing list