RFR: 8137323: Incorrect parsing of mnemonic in controls text
mstr2
github.com+43553916+mstr2 at openjdk.java.net
Fri Apr 2 19:51:34 UTC 2021
This PR fixes incorrect parsing of mnemonic symbols in the following cases:
1. an escaped double underscore incorrectly shows up as a double underscore in displayed text
2. an extended mnemonic incorrectly removes a part of adjacent text
As a side effect, this PR also fixes another undocumented issue for multiline text where text metrics calculations incorrectly operate on text for which mnemonic symbols have not been processed.
This can lead to a glitch where the mnemonic underscore makes a text just long enough to wrap to a new line, but when the text is rendered, the second line shows up entirely empty. The reason for this is that for rendering, the text is laid out _after_ mnemonic symbols have been removed.
The solution is to _always_ use processed text ("_clean text_") when laying out text.
-------------
Commit messages:
- Additional test
- Fix mnemonic processing in LabeledSkinBase
- Add failing tests
Changes: https://git.openjdk.java.net/jfx/pull/453/files
Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=453&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8137323
Stats: 251 lines in 3 files changed: 120 ins; 51 del; 80 mod
Patch: https://git.openjdk.java.net/jfx/pull/453.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/453/head:pull/453
PR: https://git.openjdk.java.net/jfx/pull/453
More information about the openjfx-dev
mailing list