Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8342233: Regression: TextInputControl selection is backwards in RTL mode #1609

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

andy-goryachev-oracle
Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle commented Oct 25, 2024

A fix for JDK-8319844 Text/TextFlow.hitTest() is incorrect in RTL orientation

introduced a regression in the TextArea/TextField/PasswordField in the RTL mode (who would have thunked that RTL-oriented text components sends MouseEvents with flipped x coordinates to some of its children, but not the others?).

The fix is to flip the x coordinates when needed in the TextAreaSkin/TextFieldSkin.


I tried to devise a headful test, but it is currently blocked by JDK-8189167

The fix can be tested manually using the Monkey Tester, with the headful test to be added probably as a part of JDK-8326869 .


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8342233: Regression: TextInputControl selection is backwards in RTL mode (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1609/head:pull/1609
$ git checkout pull/1609

Update a local copy of the PR:
$ git checkout pull/1609
$ git pull https://git.openjdk.org/jfx.git pull/1609/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1609

View PR using the GUI difftool:
$ git pr show -t 1609

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1609.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 25, 2024

👋 Welcome back angorya! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 25, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Oct 25, 2024

⚠️ @andy-goryachev-oracle This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

return getInsertionPoint(paragraphNode,
x - paragraphNode.getLayoutX(),
y - paragraphNode.getLayoutY());
if (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like empty opening brackets in conditions but i guess it is not explicitly prohibited. Aside of that fix looks reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants