RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v3]

Karthik P K kpk at openjdk.org
Mon May 15 09:58:00 UTC 2023


On Fri, 12 May 2023 21:05:27 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> Just by looking at the code, the code paths that leave `insertionIndex=-1` in `PrismTextLayout.getHitInfo()` are on lines: 431, 450(when run==null), 472
> 
> If we can initialize insertionIndex to a positive value, then the buggy code in HitInfo.getInsertionIndex() will never get executed, and we can remove it later (in JDK-8302511).

Updated the code to initialize `insertionIndex` in `HitInfo.getInsertionIndex()`. Please check.

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

PR Comment: https://git.openjdk.org/jfx/pull/1091#issuecomment-1547540128


More information about the openjfx-dev mailing list