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

Karthik P K kpk at openjdk.org
Mon Feb 26 11:38:06 UTC 2024


On Sun, 25 Feb 2024 13:16:06 GMT, John Hendrikx <jhendrikx at openjdk.org> 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 since the last revision:
>> 
>>  - Merge branch 'master' into rtl_hittest_issue
>>  - Code refactoring
>>  - Review comments
>>  - Fix emoji issue
>>  - Inline node issue fix
>>  - Code review changes
>>  - Fix issue with multiline text
>>  - Fix issue with RTL text within LTR text
>>  - Review changes
>>  - Fix multiline text insertion index calculation issue
>>  - ... and 3 more: https://git.openjdk.org/jfx/compare/993c5e2e...e3812732
>
> tests/system/src/test/java/test/robot/javafx/scene/RTLTextFlowCharacterIndexTest.java line 238:
> 
>> 236: 
>> 237:     @Test
>> 238:     public void testTextAndTextFlowHitInfoForRTLEnglishText() throws Exception {
> 
> I just replaced `PrismTextLayout#getHitInfo` with `return new Hit(0, 0, true);` and this test, and all the others still pass.
> 
> I think the tests should check for a given range of x values if the correct character is being returned as the hit, perhaps more inspired by the tests in https://github.com/openjdk/jfx/pull/1236

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?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1323#discussion_r1502469288


More information about the openjfx-dev mailing list