RFR: 8319844 : Text/TextFlow.hitTest() is incorrect in RTL orientation [v9]
Andy Goryachev
angorya at openjdk.org
Thu Feb 8 18:25:05 UTC 2024
On Tue, 6 Feb 2024 10:31:18 GMT, Karthik P K <kpk at openjdk.org> 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 of nodes and fixed the issue in `getHitInfo()` to calculate correct hit test values.
>>
>> Added system tests to validate the changes.
>
> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
>
> Inline node issue fix
modules/javafx.graphics/src/main/java/com/sun/javafx/text/PrismTextLayout.java line 509:
> 507: TextRun r = runs[i];
> 508: if (r.getStart() != curRunStart && r.getTextSpan().getText().equals(text)
> 509: && x > r.getWidth() && textWidthPrevLine == 0) {
minor: could we move equals() after all other checks where we have logical AND `&&`?
same in lines 515, 524, 532 (and possibly somewhere else)
in other words, compute equals() only after the fast checks do not fail.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1323#discussion_r1480324450
More information about the openjfx-dev
mailing list