Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-03-04 Thread John Hendrikx
On Mon, 4 Mar 2024 11:03:26 GMT, Karthik P K wrote: >> @andy-goryachev-oracle The coverage comes from EclEmma, an Eclipse plugin. >> Once installed, there is another way to run tests called `Coverage as...` >> just above `Run as...`. It's very useful to use it on a JUnit test to see >> if

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-03-04 Thread Karthik P K
On Thu, 29 Feb 2024 17:33:14 GMT, John Hendrikx wrote: >> @hjohn how do you get this coverage diagram? >> >> The BreakIterator is a part of the existing code, we should probably have >> this discussion outside of this PR. I agree, there might be a situation >> when the app wants to select a

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-29 Thread Andy Goryachev
On Thu, 29 Feb 2024 17:33:14 GMT, John Hendrikx wrote: >> @hjohn how do you get this coverage diagram? >> >> The BreakIterator is a part of the existing code, we should probably have >> this discussion outside of this PR. I agree, there might be a situation >> when the app wants to select a

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-29 Thread John Hendrikx
On Thu, 29 Feb 2024 15:59:58 GMT, Andy Goryachev wrote: >> I disagree on this. The code is complicated and full of branches. Manual >> testing is very error prone. However, since you restored most of the code >> to its original (which wasn't tested either) I could live with it. Still, >>

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-29 Thread Andy Goryachev
On Thu, 29 Feb 2024 13:23:40 GMT, John Hendrikx wrote: >> I believe the tests added in this PR are helpful in making sure that the >> HitInfo calculation does not give results like character index less than 0 >> or character index greater than total length of the text or out of bound >>

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-29 Thread John Hendrikx
On Tue, 27 Feb 2024 10:00:41 GMT, Karthik P K wrote: >> I'm not sure if we could write headless test for this. Could you please >> point me to a test which could be helpful for me? > > I believe the tests added in this PR are helpful in making sure that the > HitInfo calculation does not give

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-27 Thread Karthik P K
On Tue, 27 Feb 2024 05:09:20 GMT, Karthik P K wrote: >> yes, this bothered me from the start. I did have a test case in the MT with >> two text nodes with the same text, and it seemed to work correctly. or did >> I miss something? > > Actually most of the repeating text cases are handled. I

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-27 Thread Karthik P K
On Mon, 26 Feb 2024 11:35:06 GMT, Karthik P K wrote: >> tests/system/src/test/java/test/robot/javafx/scene/RTLTextFlowCharacterIndexTest.java >> line 238: >> >>> 236: >>> 237: @Test >>> 238: public void testTextAndTextFlowHitInfoForRTLEnglishText() throws >>> Exception { >> >> I

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-26 Thread Karthik P K
On Mon, 26 Feb 2024 16:22:56 GMT, Andy Goryachev wrote: >> You are right. It fails when there are repeated text nodes. I will look into >> this > > yes, this bothered me from the start. I did have a test case in the MT with > two text nodes with the same text, and it seemed to work correctly.

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-26 Thread Andy Goryachev
On Mon, 26 Feb 2024 10:40:03 GMT, Karthik P K wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/text/PrismTextLayout.java >> line 606: >> >>> 604: boolean addLtrIdx = run.getTextSpan().getText().length() >>> != run.length; >>> 605: if (r.getStart() !=

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-26 Thread John Hendrikx
On Wed, 21 Feb 2024 10:01:37 GMT, Karthik P K wrote: >> In the `getHitInfo()` method of PrismTextLayout, RTL node orientation >> conditions were not considered, hence hit test values such as character >> index and insertion index values were incorrect. >> >> Added checks for RTL orientation

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-26 Thread Karthik P K
On Sun, 25 Feb 2024 13:16:06 GMT, John Hendrikx wrote: >> Karthik P K 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 13 additional >> commits

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-26 Thread Karthik P K
On Sat, 24 Feb 2024 23:00:43 GMT, John Hendrikx wrote: >> Karthik P K 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 13 additional >> commits

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-25 Thread Karthik P K
On Sat, 24 Feb 2024 22:44:05 GMT, John Hendrikx wrote: > The character index, even in your example image above, seems to be relative > to the `Text`, not to the `TextFlow` (it is 0, even though there are clearly > 10 characters before it belonging to another `Text`), so what exactly do you >

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-25 Thread John Hendrikx
On Wed, 21 Feb 2024 10:01:37 GMT, Karthik P K wrote: >> In the `getHitInfo()` method of PrismTextLayout, RTL node orientation >> conditions were not considered, hence hit test values such as character >> index and insertion index values were incorrect. >> >> Added checks for RTL orientation

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-24 Thread John Hendrikx
On Wed, 21 Feb 2024 10:01:37 GMT, Karthik P K wrote: >> In the `getHitInfo()` method of PrismTextLayout, RTL node orientation >> conditions were not considered, hence hit test values such as character >> index and insertion index values were incorrect. >> >> Added checks for RTL orientation

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-24 Thread John Hendrikx
On Wed, 21 Feb 2024 10:01:37 GMT, Karthik P K wrote: >> In the `getHitInfo()` method of PrismTextLayout, RTL node orientation >> conditions were not considered, hence hit test values such as character >> index and insertion index values were incorrect. >> >> Added checks for RTL orientation

Re: RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v13]

2024-02-21 Thread Karthik P K
> In the `getHitInfo()` method of PrismTextLayout, RTL node orientation > conditions were not considered, hence hit test values such as character index > and insertion index values were incorrect. > > Added checks for RTL orientation of nodes and fixed the issue in > `getHitInfo()` to