RFR: 8307363: TextFlow.underlineShape() [v2]

Kevin Rushforth kcr at openjdk.org
Wed May 10 23:17:48 UTC 2023


On Wed, 10 May 2023 20:48:22 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Adding TextFlow.underlineShape() to add support for a spellchecker-like decoration, using 
>> 
>> getRange(start, end, TextLayout.TYPE_UNDERLINE);
>> 
>> 
>> which mirrors an existing method in Text with exactly the same signature.
>
> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
> 
>  - Merge branch 'master' into 8307363.underline
>  - added test
>  - use the same javadoc as in Text
>  - whitespace
>  - 8307363: text flow underline shape

Test looks good with a couple comments. I'll give it a quick test drive.

tests/system/src/test/java/test/javafx/scene/text/TextFlowNodeTest.java line 57:

> 55:         } catch (InterruptedException ex) {
> 56:             Assert.fail("Unexpected exception: " + ex);
> 57:         }

Can this be replaced with `Util.startup()`?

tests/system/src/test/java/test/javafx/scene/text/TextFlowNodeTest.java line 70:

> 68:         PathElement[] p = f.underlineShape(0, 0);
> 69:         Assert.assertNotNull(p);
> 70:         Assert.assertEquals(p.length, 0);

Arguments are switched (expected value comes first).

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

PR Review: https://git.openjdk.org/jfx/pull/1127#pullrequestreview-1421479704
PR Review Comment: https://git.openjdk.org/jfx/pull/1127#discussion_r1190466485
PR Review Comment: https://git.openjdk.org/jfx/pull/1127#discussion_r1190466766


More information about the openjfx-dev mailing list