On Thu, 25 Mar 2021 03:17:37 GMT, Hsiafan <github.com+1498664+hsia...@openjdk.org> wrote:
>> I'll review this. The fix seems fine at first glance. With your patch it >> uses a similar mechanism to the attributed string case; I'm curious why >> copying the string is needed in that case, but not in this case. >> >> What testing have you done to ensure that this will not cause any >> regressions? >> >> Perhaps @prrace or @jperedadnr or @johanvos could be a second reviewer? > > I've test on macOS 11.2.3 with Chinese input method, including ascii chars, > CJK chars, emojis, and inputing ascii/cjk chars+emojis together. All works as > expected. > > The memory allocation in NSAttributedString could be eliminated either, > AFAIK. I haven't tested it, do not know how to input a NSAttributedString. As mentioned earlier, the fix works fine for me on macOS 10.15.6. About the case of `NSAttributedString`, yes it could be refactored too. However, I couldn't test it either, as I'm not sure how we could get "rich text" typed into a JavaFX input control. In any case, maybe it is better to do it in a follow-up issue? ------------- PR: https://git.openjdk.java.net/jfx/pull/436