On Wed, 21 Jun 2023 06:34:00 GMT, Karthik P K <k...@openjdk.org> wrote:

> The text run selected in `PrismTextLayout::getHitInfo()` method for character 
> index calculation was not correct when hitTest was invoked for Text node in a 
> TextFlow with more than one Text child. Hence wrong character index value was 
> calculated.
> 
> Since only x, y coordinates were available in the above mentioned method, 
> sending the text as a parameter to this method is necessary so as to know if 
> the text run selected for character index calculation is correct. Along with 
> this change modified the `PrismTextLayout::getHitInfo()` method to calculate 
> the correct character index.
> 
> Added tests to validate the changes.

This pull request has now been integrated.

Changeset: 929035f1
Author:    Karthik P K <k...@openjdk.org>
URL:       
https://git.openjdk.org/jfx/commit/929035f1857d961c0a9b7b281052aace3da837cc
Stats:     710 lines in 7 files changed: 692 ins; 0 del; 18 mod

8306083: Text.hitTest is incorrect when more than one Text node in TextFlow

Reviewed-by: angorya, prr

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

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

Reply via email to