Re: RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v2]

2023-08-16 Thread Michael Strauß
> This PR fixes an issue with the way `focusWithin` bits are adjusted in the > scene graph. Previously, the `focusWithin` counts of all parents of a removed > node would be decreased if the removed node has a non-zero `focusWithin` > count. This PR adds logic for the opposite scenario: the

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-16 Thread Andy Goryachev
On Tue, 8 Aug 2023 23:44:58 GMT, Jose Pereda wrote: >> So far, BorderPane does the calculation for the children min/pref >> width/height taken into account only the margin applied to them, if any, but >> not the total padding that could be applied as well to the BorderPane itself. >> >>

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-16 Thread Andy Goryachev
On Tue, 8 Aug 2023 23:44:58 GMT, Jose Pereda wrote: >> So far, BorderPane does the calculation for the children min/pref >> width/height taken into account only the margin applied to them, if any, but >> not the total padding that could be applied as well to the BorderPane itself. >> >>

Re: RFR: 8306083: Text.hitTest is incorrect when Text node is present in TextFlow [v5]

2023-08-16 Thread Andy Goryachev
On Tue, 8 Aug 2023 13:57:31 GMT, Karthik P K wrote: >> The text run selected in `PrismTextLayout::getHitInfo()` method for >> character index calculation was not correct when Text node was embedded in >> TextFlow. Hence wrong character index value was calculated for the same. >> >> Since only

Re: RFR: 8309558: Create implementation of NSAccessibilityCheckBox protocol [v3]

2023-08-16 Thread Kevin Rushforth
On Mon, 14 Aug 2023 18:38:39 GMT, Alexander Zuev wrote: >> also >> 8309629: Create implementation of NSAccessibilityRadioButton protocol >> >> Create implementation of NSAccessibilityCheckBox and >> NSAccessibilityRadioButton protocols >> Add workaround for the wrong focus owner announcement

Integrated: 8310885: Width/height of window is not set after calling sizeToScene

2023-08-16 Thread Guillaume Tâche
On Thu, 3 Aug 2023 14:57:50 GMT, Guillaume Tâche wrote: > `setHeight()` / `setWidth()` were ignored if called after `sizeToScene()` and > before `show()`. > Now the `sizeToScene` flag is unset in these methods to ensure the right > values are set when the window is shown. This pull

Re: RFR: 8309558: Create implementation of NSAccessibilityCheckBox protocol [v3]

2023-08-16 Thread Ambarish Rapte
On Mon, 14 Aug 2023 18:38:39 GMT, Alexander Zuev wrote: >> also >> 8309629: Create implementation of NSAccessibilityRadioButton protocol >> >> Create implementation of NSAccessibilityCheckBox and >> NSAccessibilityRadioButton protocols >> Add workaround for the wrong focus owner announcement

Re: RFR: 8310885: Width/height of window is not set after calling sizeToScene [v3]

2023-08-16 Thread Ambarish Rapte
On Wed, 16 Aug 2023 09:28:57 GMT, Guillaume Tâche wrote: >> `setHeight()` / `setWidth()` were ignored if called after `sizeToScene()` >> and before `show()`. >> Now the `sizeToScene` flag is unset in these methods to ensure the right >> values are set when the window is shown. > >

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-16 Thread John Hendrikx
On Wed, 16 Aug 2023 14:06:16 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/javafx/css/Match.java line 1: >> >>> 1: /* >> >> The compare method seems wrong. I think it should delegate to >> `Integer.compare`. >> >> `specificity` should also be made `private`. > > These

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-16 Thread John Hendrikx
On Wed, 16 Aug 2023 13:16:19 GMT, Jose Pereda wrote: >> You could check this yourself if you want. The `BitSet` class had problems >> in many places, was largely untested and, to be very honest, should never >> have passed code review. It violated the `Set` contract almost everywhere, >>

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-16 Thread John Hendrikx
On Wed, 16 Aug 2023 02:02:02 GMT, Nir Lisker wrote: >> John Hendrikx has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 16 commits: >> >> - Merge branch 'master' of https://git.openjdk.org/jfx into >>

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-16 Thread John Hendrikx
On Wed, 16 Aug 2023 05:02:36 GMT, Nir Lisker wrote: >> Almost, but the key is also the copied set. In your version the key is the >> original object, which may be a modifiable set. If the key is modified, the >> cache will not function correctly anymore. >> >> I had a different version

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-16 Thread Jose Pereda
On Tue, 15 Aug 2023 23:05:38 GMT, John Hendrikx wrote: >> The original ("broken") version has been working fine, and no bugs have been >> reported so far, and there would be a reason to have a custom implementation >> instead of the one in `AbstractSet` in the first place. >> >> I'm not

Integrated: 8314266: Several test failures after fix for JDK-8159048

2023-08-16 Thread Jose Pereda
On Wed, 16 Aug 2023 12:11:54 GMT, Jose Pereda wrote: > This PR fixes some failing tests that started failing after the check on > animations being played on the JavaFX thread was enforced, by simply wrapping > the `play` call with `Platform.runLater` This pull request has now been integrated.

Re: RFR: 8314266: Several test failures after fix for JDK-8159048

2023-08-16 Thread Kevin Rushforth
On Wed, 16 Aug 2023 12:11:54 GMT, Jose Pereda wrote: > This PR fixes some failing tests that started failing after the check on > animations being played on the JavaFX thread was enforced, by simply wrapping > the `play` call with `Platform.runLater` LGTM - Marked as reviewed by

RFR: 8314266: Several test failures after fix for JDK-8159048

2023-08-16 Thread Jose Pereda
This PR fixes some failing tests that started failing after the check on animations being played on the JavaFX thread was enforced, by simply wrapping the `play` call with `Platform.runLater` - Commit messages: - Run timelines on JavaFX thread Changes:

Re: RFR: 8310885: Width/height of window is not set after calling sizeToScene [v3]

2023-08-16 Thread Marius Hanl
On Wed, 16 Aug 2023 09:28:57 GMT, Guillaume Tâche wrote: >> `setHeight()` / `setWidth()` were ignored if called after `sizeToScene()` >> and before `show()`. >> Now the `sizeToScene` flag is unset in these methods to ensure the right >> values are set when the window is shown. > >

Re: RFR: 8274932: Render scales in EmbeddedWindow are not properly updated [v10]

2023-08-16 Thread Kevin Rushforth
On Wed, 16 Aug 2023 06:01:45 GMT, Prasanta Sadhukhan wrote: >> When the JavaFX scene is set before it is really shown, then the scale >> factors are not properly propagated to the EmbeddedWindow, resulting in >> showing wrong scales. >> Fix is made to update scales to EmbeddedWindow > >

Re: RFR: 8310885: Width/height of window is not set after calling sizeToScene [v2]

2023-08-16 Thread Guillaume Tâche
On Wed, 16 Aug 2023 07:08:10 GMT, Marius Hanl wrote: >> Guillaume Tâche has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8310885: Fixes review comment > > modules/javafx.graphics/src/test/java/test/javafx/stage/WindowTest.java line >

Re: RFR: 8310885: Width/height of window is not set after calling sizeToScene [v3]

2023-08-16 Thread Guillaume Tâche
> `setHeight()` / `setWidth()` were ignored if called after `sizeToScene()` and > before `show()`. > Now the `sizeToScene` flag is unset in these methods to ensure the right > values are set when the window is shown. Guillaume Tâche has updated the pull request incrementally with one

Re: RFR: 8310885: Width/height of window is not set after calling sizeToScene [v2]

2023-08-16 Thread Marius Hanl
On Tue, 8 Aug 2023 09:02:07 GMT, Guillaume Tâche wrote: >> `setHeight()` / `setWidth()` were ignored if called after `sizeToScene()` >> and before `show()`. >> Now the `sizeToScene` flag is unset in these methods to ensure the right >> values are set when the window is shown. > >

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-16 Thread Nir Lisker
On Tue, 15 Aug 2023 19:33:20 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/css/ImmutablePseudoClassSetsCache.java >> line 61: >> >>> 59: CACHE.put(copy, copy); >>> 60: >>> 61: return copy; >> >> Isn't this just `return

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-16 Thread Nir Lisker
On Fri, 9 Jun 2023 12:45:02 GMT, John Hendrikx wrote: >> This fix introduces immutable sets of `PseudoClass` almost everywhere, as >> they are rarely modified. These are re-used by caching them in a new class >> `ImmutablePseudoClassSetsCache`. >> >> In order to make this work, `BitSet` had

Re: RFR: 8310885: Width/height of window is not set after calling sizeToScene [v2]

2023-08-16 Thread Lukasz Kostyra
On Tue, 8 Aug 2023 09:02:07 GMT, Guillaume Tâche wrote: >> `setHeight()` / `setWidth()` were ignored if called after `sizeToScene()` >> and before `show()`. >> Now the `sizeToScene` flag is unset in these methods to ensure the right >> values are set when the window is shown. > >

Re: RFR: 8274932: Render scales in EmbeddedWindow are not properly updated [v9]

2023-08-16 Thread Prasanta Sadhukhan
On Tue, 15 Aug 2023 14:41:16 GMT, Andy Goryachev wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Duplicate code removal > > modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 630: > >>

Re: RFR: 8274932: Render scales in EmbeddedWindow are not properly updated [v10]

2023-08-16 Thread Prasanta Sadhukhan
> When the JavaFX scene is set before it is really shown, then the scale > factors are not properly propagated to the EmbeddedWindow, resulting in > showing wrong scales. > Fix is made to update scales to EmbeddedWindow Prasanta Sadhukhan has updated the pull request incrementally with one