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

Karthik P K kpk at openjdk.org
Thu Jan 11 10:31:37 UTC 2024


On Wed, 10 Jan 2024 23:23:14 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 1042:
>> 
>>> 1040:         int runIndex = 0;
>>> 1041:         if (runs.length != 0) {
>>> 1042:             if (this.getScene().getNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT) {
>> 
>> I think this should not refer to scene:
>> 
>> 
>> if (getNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT) {
>
> I agree. Using the scene's orientation seems conceptually wrong. Shouldn't this use `Node::getEffectiveNodeOrientation`?

Agreed. scene's orientation shouldn't be used here. 
Made changes to use `getEffectiveNodeOrientation`.

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

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


More information about the openjfx-dev mailing list