Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v8]

2023-05-22 Thread Karthik P K
On Mon, 22 May 2023 16:30:40 GMT, Kevin Rushforth wrote: > Can you file a new (P4) testbug as a follow-up issue to use it replace the > two existing uses of `firePulse`? Created [JDK-8308608](https://bugs.openjdk.org/browse/JDK-8308608) - PR Comment: https://git.openjdk.org/jfx/pu

Re: RFR: 8301312: Create implementation of NSAccessibilityButton protocol [v4]

2023-05-22 Thread Kevin Rushforth
On Wed, 17 May 2023 20:31:27 GMT, Alexander Zuev wrote: >> Add the common base component for all the new implementing native classes >> Change native peer creation to use the new base component The new code will >> instantiate new protocol implementation for the given role if it exists or >>

Re: Navigation KeyEvents consumed when there is nothing to navigate, bug?

2023-05-22 Thread John Hendrikx
I'm talking about the FX versions of these events:     /** * This event occurs when a key has been pressed. */     public static final EventType KEY_PRESSED =     new EventType(KeyEvent.ANY, "KEY_PRESSED");     /** * This event occurs when a key has been released. */

Re: RFR: 8304041: [WebView] Text on the left and right of emoji is not visible

2023-05-22 Thread Kevin Rushforth
On Thu, 6 Apr 2023 20:00:01 GMT, Phil Race wrote: > This fixes a problem with mixing Emoji and regular text in Webview. > The Prism implementation expects that Emoji will not be in the same call to > drawString as regular glyphs, > since they need very different handling. > This fix breaks up th

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v8]

2023-05-22 Thread Kevin Rushforth
On Mon, 22 May 2023 17:14:30 GMT, Andy Goryachev wrote: > what do you people think of the number of pulses parameter? is 10 enough? is > there a reasonable upper limit that's needed for any processing to settle? I think 10 should be a reasonable number of pulses for our tests. Most graphs sett

Re: RFR: 8306329 : Update ICU4C to 73.1 [v4]

2023-05-22 Thread Kevin Rushforth
On Thu, 18 May 2023 17:22:46 GMT, Hima Bindu Meda wrote: >> Updated ICU to v73.1. Verified build and sanity. No issues seen. > > Hima Bindu Meda has updated the pull request incrementally with one > additional commit since the last revision: > > Update preamble in LICENSE @johanvos @tiainen

Re: RFR: 8307316: Let JavaFX be built on unknown architectures

2023-05-22 Thread Kevin Rushforth
On Wed, 3 May 2023 16:02:34 GMT, John Neffenger wrote: > Please review these changes to the Gradle build files and the dependency > verification file. The initial version of this pull request extends the > permitted build platforms for Linux to the Java architectures `arm`, > `ppc64le`, and `s

Re: Navigation KeyEvents consumed when there is nothing to navigate, bug?

2023-05-22 Thread Michael Strauß
The only key events in WinUI are KeyDown and KeyUp (both are defined on the UIElement class). Tab keys are not consumed for both KeyDown and KeyUp (i.e. a parent element receives the events with regular KeyDown/Up handlers), while action keys are always consumed. On Mon, May 22, 2023 at 10:05 PM

Re: Navigation KeyEvents consumed when there is nothing to navigate, bug?

2023-05-22 Thread John Hendrikx
You mean KEY_TYPED or KEY_PRESSED ?  In my experience, it consumes only the PRESSED events while TYPED and RELEASED are left alone. On 22/05/2023 20:37, Michael Strauß wrote: Just to add a data point: I've tried to recreate this scenario in a WinUI 3 application. A single button, and nowhere to

Re: Navigation KeyEvents consumed when there is nothing to navigate, bug?

2023-05-22 Thread Michael Strauß
Just to add a data point: I've tried to recreate this scenario in a WinUI 3 application. A single button, and nowhere to shift focus. While the button does consume action keys (space and enter), it does not consume the tab key. Interestingly, it also doesn't consume the tab key when the focus _can_

Re: Should javafx.scene.robot.Robot be able to use nested event loops?

2023-05-22 Thread Mark Raynsford
On 2023-05-22T07:42:23 -0700 Martin Fox wrote: > Mark, > > Do you have a sample app that exhibits this behavior? I can’t reproduce it on > Mac or Windows. > > I can’t think of anything on the Robot side that would cause this. A Robot > just asks the OS to post an event. The event isn’t target

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v8]

2023-05-22 Thread Andy Goryachev
On Mon, 22 May 2023 14:21:33 GMT, Karthik P K wrote: >> Since surrogate pairs are internally considered as 2 characters and text >> field is null in `HitInfo` when `getInsertionIndex` is invoked from >> `TextFlow`, wrong insertion index was returned. >> >> Updated code to calculate insertion i

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v8]

2023-05-22 Thread Kevin Rushforth
On Mon, 22 May 2023 14:21:33 GMT, Karthik P K wrote: >> Since surrogate pairs are internally considered as 2 characters and text >> field is null in `HitInfo` when `getInsertionIndex` is invoked from >> `TextFlow`, wrong insertion index was returned. >> >> Updated code to calculate insertion i

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v8]

2023-05-22 Thread Kevin Rushforth
On Mon, 22 May 2023 14:21:33 GMT, Karthik P K wrote: >> Since surrogate pairs are internally considered as 2 characters and text >> field is null in `HitInfo` when `getInsertionIndex` is invoked from >> `TextFlow`, wrong insertion index was returned. >> >> Updated code to calculate insertion i

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v6]

2023-05-22 Thread Kevin Rushforth
On Fri, 19 May 2023 16:24:44 GMT, Andy Goryachev wrote: >> Adding `Toolkit::firePulse` is not making the tests stable. In fact I'm >> getting new failure after adding this in >> `testTextFlowInsertionIndexUsingMultipleEmojis()` test. >> >> TextFlowSurrogatePairInsertionIndexTest > >> testText

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v6]

2023-05-22 Thread Andy Goryachev
On Mon, 22 May 2023 15:52:55 GMT, Kevin Rushforth wrote: >>> could you please help me in understanding how `Util.runAndWait(() -> { });` >>> help in this case >> >> After discussing the issue with @kevinrushforth it probably won't. >> >> The idea was to replace Thread.sleep() with something th

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v6]

2023-05-22 Thread Karthik P K
On Fri, 19 May 2023 15:41:50 GMT, Andy Goryachev wrote: > For the purposes of this test, we could remove this sequence from the test, I > think. Removed red heart from the text sequence. > Another variant is to add something like that to Util and use that in place > of Thread.sleep(). This me

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v8]

2023-05-22 Thread Andy Goryachev
On Mon, 22 May 2023 14:21:33 GMT, Karthik P K wrote: >> Since surrogate pairs are internally considered as 2 characters and text >> field is null in `HitInfo` when `getInsertionIndex` is invoked from >> `TextFlow`, wrong insertion index was returned. >> >> Updated code to calculate insertion i

Re: Navigation KeyEvents consumed when there is nothing to navigate, bug?

2023-05-22 Thread Martin Fox
I assume these events are consumed so the user doesn’t encounter surprising behavior when they hit the limits of the navigable area. If the user presses a navigation key a few too many times or holds it down to auto-repeat the navigation should either stop when they hit the edge or wrap around t

Re: Should javafx.scene.robot.Robot be able to use nested event loops?

2023-05-22 Thread Martin Fox
Mark, Do you have a sample app that exhibits this behavior? I can’t reproduce it on Mac or Windows. I can’t think of anything on the Robot side that would cause this. A Robot just asks the OS to post an event. The event isn’t targeted at a specific process or window and the Robot has no contro

Re: RFR: 8301763: Adding children to wrong index leaves inconsistent state in Parent#childrenSet [v3]

2023-05-22 Thread John Hendrikx
On Mon, 22 May 2023 14:01:04 GMT, Lukasz Kostyra wrote: >> This issue happened because `childSet` member of Parent was modified during >> `onProposedChange()` call - that call did not recognize negative indexes as >> invalid, which caused an exception when actually adding the Node to a List. >>

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v8]

2023-05-22 Thread Karthik P K
> Since surrogate pairs are internally considered as 2 characters and text > field is null in `HitInfo` when `getInsertionIndex` is invoked from > `TextFlow`, wrong insertion index was returned. > > Updated code to calculate insertion index in `getHitInfo` method of > `PrismTextLayout` class wh

Re: RFR: 8301763: Adding children to wrong index leaves inconsistent state in Parent#childrenSet [v2]

2023-05-22 Thread Lukasz Kostyra
On Wed, 17 May 2023 23:15:28 GMT, John Hendrikx wrote: > A roll back mechanism would just complicate the code for very little benefit > (a correct FX application won't run into these situations, you'll only be > likely to encounter them during development). The whole mechanism surrounding > th

Re: RFR: 8301763: Adding children to wrong index leaves inconsistent state in Parent#childrenSet [v3]

2023-05-22 Thread Lukasz Kostyra
> This issue happened because `childSet` member of Parent was modified during > `onProposedChange()` call - that call did not recognize negative indexes as > invalid, which caused an exception when actually adding the Node to a List. > > This seemed like the simplest solution which doesn't rewor

Re: RFR: 8304831: TextFlow.hitTest.insertionIndex incorrect with surrogate pairs [v7]

2023-05-22 Thread Karthik P K
> Since surrogate pairs are internally considered as 2 characters and text > field is null in `HitInfo` when `getInsertionIndex` is invoked from > `TextFlow`, wrong insertion index was returned. > > Updated code to calculate insertion index in `getHitInfo` method of > `PrismTextLayout` class wh

Re: RFR: JDK-8306990: The guarantees given by Region's floor and ceiling functions should work for larger values

2023-05-22 Thread John Hendrikx
On Thu, 27 Apr 2023 11:41:40 GMT, Kevin Rushforth wrote: >> Region has floor and ceiling functions that ensure that calling them twice >> in a row will yield the same result: >> >> ceil(x) = ceil(ceil(x)) >> >> However, due to use of a constant `EPSILON` which is added/subtracted before