Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v7]

2023-08-29 Thread Kevin Rushforth
On Mon, 21 Aug 2023 18:25:08 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v7]

2023-08-21 Thread Andy Goryachev
On Mon, 21 Aug 2023 18:20:17 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v6]

2023-08-21 Thread Karthik P K
On Mon, 21 Aug 2023 14:40:09 GMT, Andy Goryachev wrote: >> Karthik P K has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments > > modules/javafx.graphics/src/main/java/com/sun/javafx/text/PrismTextLayout.java > line 782: > >>

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v7]

2023-08-21 Thread Karthik P K
> The text run selected in `PrismTextLayout::getHitInfo()` method for character > index calculation was not correct when Text node was embedded in TextFlow. > Hence wrong character index value was calculated for the same. > > Since only x, y coordinates were available in the above mentioned meth

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v6]

2023-08-21 Thread Andy Goryachev
On Mon, 21 Aug 2023 14:01:06 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v6]

2023-08-21 Thread Andy Goryachev
On Mon, 21 Aug 2023 14:01:06 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v5]

2023-08-21 Thread Karthik P K
On Wed, 16 Aug 2023 20:32:54 GMT, Andy Goryachev wrote: >> Karthik P K has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix character index calculation issue when Text node content is wrapped > > modules/javafx.graphics/src/main/java/com/

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v5]

2023-08-21 Thread Karthik P K
On Wed, 16 Aug 2023 20:15:05 GMT, Andy Goryachev wrote: >> Karthik P K has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix character index calculation issue when Text node content is wrapped > > modules/javafx.graphics/src/main/java/com/

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v6]

2023-08-21 Thread Karthik P K
> The text run selected in `PrismTextLayout::getHitInfo()` method for character > index calculation was not correct when Text node was embedded in TextFlow. > Hence wrong character index value was calculated for the same. > > Since only x, y coordinates were available in the above mentioned meth

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v5]

2023-08-16 Thread Andy Goryachev
On Tue, 8 Aug 2023 13:57:31 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v4]

2023-08-08 Thread Karthik P K
On Fri, 30 Jun 2023 14:40:14 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v5]

2023-08-08 Thread Karthik P K
> The text run selected in `PrismTextLayout::getHitInfo()` method for character > index calculation was not correct when Text node was embedded in TextFlow. > Hence wrong character index value was calculated for the same. > > Since only x, y coordinates were available in the above mentioned meth

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v4]

2023-07-03 Thread Karthik P K
On Sun, 2 Jul 2023 09:53:58 GMT, Karthik P K wrote: > However I agree that bug is present in the character index calculation like > you mentioned above. I'll work on fixing that. Correction: The character index calculation looks to be correct when x coordinate passed to it is correct. One more

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v4]

2023-07-02 Thread Karthik P K
On Fri, 30 Jun 2023 17:21:59 GMT, Andy Goryachev wrote: > Do you mean MouseVent.getX()? The x coordinate reported by `MouseEvent.getPickResult().getIntersectedPoint()` method. I can reproduce this issue in MonkeyTester as well. When I checked the `Point2D` object sent to `Text::hitTest()` met

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v4]

2023-06-30 Thread Andy Goryachev
On Fri, 30 Jun 2023 14:40:14 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v4]

2023-06-30 Thread Andy Goryachev
On Fri, 30 Jun 2023 15:56:45 GMT, Karthik P K wrote: > Looks like there is issue in MouseEvent or PickResult. Do you mean MouseVent.getX()? I cannot reproduce that (in the Monkey Tester). I've added a mouse handler to the control (Text or TextFlow, depending on the page) and ev.getX() always

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v4]

2023-06-30 Thread Karthik P K
On Fri, 30 Jun 2023 14:40:14 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v4]

2023-06-30 Thread Karthik P K
> The text run selected in `PrismTextLayout::getHitInfo()` method for character > index calculation was not correct when Text node was embedded in TextFlow. > Hence wrong character index value was calculated for the same. > > Since only x, y coordinates were available in the above mentioned meth

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v3]

2023-06-27 Thread Karthik P K
On Tue, 27 Jun 2023 17:56:09 GMT, Andy Goryachev wrote: > right. in the case of the (highlighted) emoji character - the insertion index > starts with 0 which I think cannot be correct, because all of the text should > be added as a single Text instance, see > If a Text node's content is wrappe

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v3]

2023-06-27 Thread Andy Goryachev
On Tue, 27 Jun 2023 17:49:48 GMT, Karthik P K wrote: > The insertion index is reported relative to the Text's text incase of Text > node. right. in the case of the (highlighted) emoji character - the insertion index starts with 0 which I think cannot be correct, because all of the text should

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v3]

2023-06-27 Thread Karthik P K
On Tue, 27 Jun 2023 16:13:03 GMT, Andy Goryachev wrote: > I think not only it shows incorrect insertion index when you move the mouse > across that emoji (in Text.hitTest goes from 0 to 1, while expected change is > 2), but I think it's also wrong because that emoji is the last symbol in that

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v3]

2023-06-27 Thread Andy Goryachev
On Tue, 27 Jun 2023 16:06:18 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v2]

2023-06-27 Thread Karthik P K
On Tue, 27 Jun 2023 15:30:39 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v3]

2023-06-27 Thread Karthik P K
> The text run selected in `PrismTextLayout::getHitInfo()` method for character > index calculation was not correct when Text node was embedded in TextFlow. > Hence wrong character index value was calculated for the same. > > Since only x, y coordinates were available in the above mentioned meth

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v2]

2023-06-27 Thread Karthik P K
> The text run selected in `PrismTextLayout::getHitInfo()` method for character > index calculation was not correct when Text node was embedded in TextFlow. > Hence wrong character index value was calculated for the same. > > Since only x, y coordinates were available in the above mentioned meth

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow

2023-06-22 Thread Karthik P K
On Wed, 21 Jun 2023 06:34:00 GMT, Karthik P K wrote: > The text run selected in `PrismTextLayout::getHitInfo()` method for character > index calculation was not correct when Text node was embedded in TextFlow. > Hence wrong character index value was calculated for the same. > > Since only x, y

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow

2023-06-21 Thread Karthik P K
On Wed, 21 Jun 2023 22:59:41 GMT, Andy Goryachev wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since o

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow

2023-06-21 Thread Andy Goryachev
On Wed, 21 Jun 2023 06:34:00 GMT, Karthik P K wrote: > The text run selected in `PrismTextLayout::getHitInfo()` method for character > index calculation was not correct when Text node was embedded in TextFlow. > Hence wrong character index value was calculated for the same. > > Since only x, y