RFR: 8279640: ListView with null SelectionModel/FocusModel throws NPE

2022-01-07 Thread Marius Hanl
This PR fixes a bunch of NPEs when a null `SelectionModel` or `FocusModel` is 
set on a `ListView`.

The following NPEs are fixed (all are also covered by exactly one test case):
NPEs with null selection model:
- Mouse click on a `ListCell`
- SPACE key press
- KP_UP (arrow up) key press
- HOME key press
- END key press
- BACK_SLASH + CTRL key press

NPEs with null focus model:
- SPACE key press
- Select an items: getSelectionModel().select(1)
- Clear-Select an item and add one after: 
listView.getSelectionModel().clearAndSelect(1); listView.getItems().add("3");

-

Commit messages:
 - 8279640: ListView with null SelectionModel/FocusModel throws NPE

Changes: https://git.openjdk.java.net/jfx/pull/711/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=711&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279640
  Stats: 145 lines in 4 files changed: 130 ins; 2 del; 13 mod
  Patch: https://git.openjdk.java.net/jfx/pull/711.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/711/head:pull/711

PR: https://git.openjdk.java.net/jfx/pull/711


Re: RFR: 8274066: Polygon filled outside its area when very large coordinates are used

2022-01-07 Thread Laurent Bourgès
On Fri, 7 Jan 2022 23:35:37 GMT, Kevin Rushforth  wrote:

> Would a targeted test for the failing case from the bug report make sense?

I agree the rule is to have a test, I will write a basic test derived from 
user's case asap.

-

PR: https://git.openjdk.java.net/jfx/pull/674


Re: RFR: 8274066: Polygon filled outside its area when very large coordinates are used

2022-01-07 Thread Kevin Rushforth
On Wed, 17 Nov 2021 22:05:25 GMT, Laurent Bourgès  wrote:

> Changelog for this MarlinFX 0.9.4.5 release:
> 
> The Marlin-renderer 0.9.4.5 release provides bug fixes on Marlin's path 
> clipper:
> - removed simple-precision (float) variant
> - improved Stroker to handle huge coordinates, up to 1E15
> - improved PathClipFilter (filler) to handle huge coordinates, up to 1E15
> 
> 
> This is the Marlin-renderer 0.9.4.3 release providing few bug / enhancement 
> fixes in the MarlinRenderingEngine:
> - Update DPQS to latest OpenJDK 14 patch
> - Improve cubic curve offset computation
> 
> 
> The Marlin-renderer 0.9.4.2 release provides a single long-standing bug fix 
> in the MarlinRenderingEngine: 
> - JDK-8230728, https://bugs.openjdk.java.net/browse/JDK-8230728.
> 
> 
> Marlin-renderer 0.9.4.1 provides only a single bug fix in the path clipper, 
> reported first against JavaFX 11: 
> - JDK-8226789, https://bugs.openjdk.java.net/browse/JDK-8226789.
> 
> 
> This is the Marlin-renderer 0.9.4 release providing an updated Dual Pivot 
> Quick Sort (19.05) as its internal sorter faster than the Marlin's optimized 
> MergeSort (x-position + edge indices) for arrays larger than 256.
> 
> Special Thanks to Vladimir Yaroslavskiy that provided me up-to-date DPQS 
> 19.05 with many variants, improving almost-sorted datasets. We are 
> collaborating to provide a complete Sort framework (15 algorithms, many 
> various datasets, JMH benchmarks) publicly on github:
> see https://github.com/bourgesl/nearly-optimal-mergesort-code

Would a targeted test for the failing case from the bug report make sense?

-

PR: https://git.openjdk.java.net/jfx/pull/674


Re: RFR: 8274066: Polygon filled outside its area when very large coordinates are used

2022-01-07 Thread Laurent Bourgès
On Wed, 17 Nov 2021 22:05:25 GMT, Laurent Bourgès  wrote:

> Changelog for this MarlinFX 0.9.4.5 release:
> 
> The Marlin-renderer 0.9.4.5 release provides bug fixes on Marlin's path 
> clipper:
> - removed simple-precision (float) variant
> - improved Stroker to handle huge coordinates, up to 1E15
> - improved PathClipFilter (filler) to handle huge coordinates, up to 1E15
> 
> 
> This is the Marlin-renderer 0.9.4.3 release providing few bug / enhancement 
> fixes in the MarlinRenderingEngine:
> - Update DPQS to latest OpenJDK 14 patch
> - Improve cubic curve offset computation
> 
> 
> The Marlin-renderer 0.9.4.2 release provides a single long-standing bug fix 
> in the MarlinRenderingEngine: 
> - JDK-8230728, https://bugs.openjdk.java.net/browse/JDK-8230728.
> 
> 
> Marlin-renderer 0.9.4.1 provides only a single bug fix in the path clipper, 
> reported first against JavaFX 11: 
> - JDK-8226789, https://bugs.openjdk.java.net/browse/JDK-8226789.
> 
> 
> This is the Marlin-renderer 0.9.4 release providing an updated Dual Pivot 
> Quick Sort (19.05) as its internal sorter faster than the Marlin's optimized 
> MergeSort (x-position + edge indices) for arrays larger than 256.
> 
> Special Thanks to Vladimir Yaroslavskiy that provided me up-to-date DPQS 
> 19.05 with many variants, improving almost-sorted datasets. We are 
> collaborating to provide a complete Sort framework (15 algorithms, many 
> various datasets, JMH benchmarks) publicly on github:
> see https://github.com/bourgesl/nearly-optimal-mergesort-code

Sorry I forgot to explain why I did not write any new test:
- I wrote a quadrant test in my own project that tests this clipper bug 
exhaustively, using all combinations, but it was visual, not automated like a 
robot.
- existing ClipShapeTest already validates using a fuzzy testing approach all 
clipper possible cases with small coords in range [-300, 300]. The new clipper 
algorithm in this patch still passes this hardness test on small coords, so no 
regression is present. I tested up to 10^6 random shapes for every test cases 
(order 1,2,3) + all cap/join/fill combinations.
To conclude, I decided to skip writing another test for this bug.

Cheers

-

PR: https://git.openjdk.java.net/jfx/pull/674


RFR: 8273339: IOOBE with ListChangeListener added to the selectedItems list of a TableView

2022-01-07 Thread Jose Pereda
This PR converts the change's `from` field from a list of tablePositions into a 
list of selected indices of rows.

It includes two tests for TableView and one for TreeTableView (the second test 
wasn't included due to an 
[issue|https://bugs.openjdk.java.net/browse/JDK-8232825] with key navigation), 
that pass with this PR and fail without it.

-

Commit messages:
 - Convert change from list of tablePosition to list of rows

Changes: https://git.openjdk.java.net/jfx/pull/710/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=710&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273339
  Stats: 147 lines in 3 files changed: 143 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jfx/pull/710.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/710/head:pull/710

PR: https://git.openjdk.java.net/jfx/pull/710


RFR: 8273336: Clicking a selected cell from a group of selected cells in a TableView clears the selected items list but remains selected

2022-01-07 Thread Jose Pereda
This PR adds a predicate to TableView and TreeTableView selection models order 
to remove rows from the selection only when there are no selected cells in that 
given row, when cell selection is enabled.

Two tests have been added as well, that fail without this PR and pass with it.

-

Commit messages:
 - Add a predicate to remove rows from selection based on selected cells

Changes: https://git.openjdk.java.net/jfx/pull/709/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=709&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273336
  Stats: 113 lines in 5 files changed: 110 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jfx/pull/709.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/709/head:pull/709

PR: https://git.openjdk.java.net/jfx/pull/709


RFR: 8273998: Clarify specification for Window properties controlled by the window manager

2022-01-07 Thread Kevin Rushforth
Update the API specification for the `Window` and `Stage` classes to clarify 
that the values for some properties and methods can be changed or ignored by 
the platform. Several of the properties already have a comment to the effect 
that the value can change externally, and thus the properties are not bindable, 
but this should be clarified further and for all such properties and methods.

See the Description of the JBS issues for this bug and its associated CSR for 
more details.

-

Commit messages:
 - additional doc updates
 - 8273998: Clarify specification for Window properties controlled by the 
window manager

Changes: https://git.openjdk.java.net/jfx/pull/708/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=708&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273998
  Stats: 84 lines in 2 files changed: 59 ins; 4 del; 21 mod
  Patch: https://git.openjdk.java.net/jfx/pull/708.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/708/head:pull/708

PR: https://git.openjdk.java.net/jfx/pull/708


Re: RFR: 8279228 Leak in ScrollPaneSkin, related to touch events

2022-01-07 Thread Florian Kirmaier
On Thu, 23 Dec 2021 17:43:19 GMT, Florian Kirmaier  
wrote:

> Fixing memoryleak, related to touch events in ScrollPaneWhen touchDetected or 
> mouseDown is true, the sbTouch animation is running, 
> and the node is removed from the Scene, then the animation will never stop, 
> causing a memory leak.
> A simple fix is to also check, whether the Node is visible, by checking the 
> "isTreeShowing" property.

1.)
It's not only called at the beginning of the `startSBReleasedAnimation`, but 
whenever the animation is repeated, which is the cause for the leak. It happens 
when `touchDetected == true || mouseDown == true` is true. The animation is 
then basically restarted every frame. With my change, it also checks whether 
the node is still visible, which fixes the problem.

2.)
It's probably possible if there is a way to simulate Touch Events. The Robot 
doesn't seem to support it. A test would also require a way to set the 
"IS_TOUCH_SUPPORTED" property.
Honestly, I don't think it's a good time investment, because the fix is quite 
simple. I don't even know exactly when it happens - I've just made sure it no 
longer loops the animation when the ScrollPane is no longer visible.

I've also applied the fix in an affected application, and it clearly fixes the 
problem.

-

PR: https://git.openjdk.java.net/jfx/pull/701


Re: RFR: 8279615: Change JavaFX release version to 19

2022-01-07 Thread Johan Vos
On Fri, 7 Jan 2022 12:55:33 GMT, Kevin Rushforth  wrote:

> Bump the version number of JavaFX to 19. I will integrate this immediately 
> after forking the `jfx18` stabilization branch, which is scheduled for 
> Thursday, January 13, 2022 at 16:00 UTC.

ok (once 18 is branched)

-

Marked as reviewed by jvos (Reviewer).

PR: https://git.openjdk.java.net/jfx/pull/707


Re: RFR: 8279615: Change JavaFX release version to 19

2022-01-07 Thread Ambarish Rapte
On Fri, 7 Jan 2022 12:55:33 GMT, Kevin Rushforth  wrote:

> Bump the version number of JavaFX to 19. I will integrate this immediately 
> after forking the `jfx18` stabilization branch, which is scheduled for 
> Thursday, January 13, 2021 at 16:00 UTC.

Marked as reviewed by arapte (Reviewer).

-

PR: https://git.openjdk.java.net/jfx/pull/707


RFR: 8279615: Change JavaFX release version to 19

2022-01-07 Thread Kevin Rushforth
Bump the version number of JavaFX to 19. I will integrate this immediately 
after forking the `jfx18` stabilization branch, which is scheduled for 
Thursday, January 13, 2021 at 16:00 UTC.

-

Commit messages:
 - 8279615: Change JavaFX release version to 19

Changes: https://git.openjdk.java.net/jfx/pull/707/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=707&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279615
  Stats: 5 lines in 3 files changed: 0 ins; 0 del; 5 mod
  Patch: https://git.openjdk.java.net/jfx/pull/707.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/707/head:pull/707

PR: https://git.openjdk.java.net/jfx/pull/707


Integrated: 8267059: Gradle :clean and :apps tasks fail on Windows if ANT_HOME contains spaces

2022-01-07 Thread Michael Strauß
On Thu, 13 May 2021 00:07:15 GMT, Michael Strauß  wrote:

> This PR fixes an issue when building OpenJFX on Windows and command-line 
> arguments contain paths with spaces.
> 
> The problem is that on Windows, `ant` is invoked via `cmd`, which leads to 
> quotes being interpreted twice. This can be fixed with the option `cmd /s`, 
> which prevents interpreting quotes on the rest of the command line. The 
> result is as if the rest of the command line had been typed verbatim at the 
> command prompt.

This pull request has now been integrated.

Changeset: 487e4b17
Author:Michael Strauß 
Committer: Kevin Rushforth 
URL:   
https://git.openjdk.java.net/jfx/commit/487e4b17e6bfca754f8fccf2f720a1bf686d1102
Stats: 45 lines in 1 file changed: 27 ins; 15 del; 3 mod

8267059: Gradle :clean and :apps tasks fail on Windows if ANT_HOME contains 
spaces

Reviewed-by: kcr, sykora

-

PR: https://git.openjdk.java.net/jfx/pull/499


Re: RFR: 8197991: Selecting many items in a TableView is very slow [v6]

2022-01-07 Thread Kevin Rushforth
On Fri, 7 Jan 2022 08:04:53 GMT, Abhinay Agarwal  wrote:

>> This work improves the performance of `MultipleSelectionModel`  over large 
>> data sets by caching some values and avoiding unnecessary calls to 
>> `SelectedIndicesList#size`. It further improves the performance by reducing 
>> the number of iterations required to find the index of an element in the 
>> BitSet.
>> 
>> The work is based on [an abandoned 
>> patch](https://github.com/openjdk/jfx/pull/127) submitted by @yososs
>> 
>> There are currently 2 manual tests for this fix.
>
> Abhinay Agarwal has updated the pull request incrementally with two 
> additional commits since the last revision:
> 
>  - Format code and reduce test size
>  - Add size assertion to test

Looks good.

-

Marked as reviewed by kcr (Lead).

PR: https://git.openjdk.java.net/jfx/pull/673


Re: RFR: 8274066: Polygon filled outside its area when very large coordinates are used

2022-01-07 Thread Johan Vos
On Wed, 17 Nov 2021 22:05:25 GMT, Laurent Bourgès  wrote:

> Draft PR to see how big is the MarlinFX 0.9.4.5 patch (DPQS, Path clipper 
> fixes to handle huge coords)

@bourgesl can you rename the title of this PR to 
8274066: Polygon filled outside its area when very large coordinates are used

-

PR: https://git.openjdk.java.net/jfx/pull/674


Re: RFR: 8274066: Polygon filled outside its area when very large coordinates are used

2022-01-07 Thread Laurent Bourgès
On Wed, 17 Nov 2021 22:05:25 GMT, Laurent Bourgès  wrote:

> Draft PR to see how big is the MarlinFX 0.9.4.5 patch (DPQS, Path clipper 
> fixes to handle huge coords)

I will add changelog asap

-

PR: https://git.openjdk.java.net/jfx/pull/674


RFR: 8274066: Polygon filled outside its area when very large coordinates are used

2022-01-07 Thread Laurent Bourgès
Draft PR to see how big is the MarlinFX 0.9.4.5 patch (DPQS, Path clipper fixes 
to handle huge coords)

-

Commit messages:
 - fixed jcheck warning (tab)
 - Merge branch 'openjdk:master' into marlinFX-0.9.4.5
 - minor changes (syntax, warnings) + merge with marlin 0.9.4.5 (jdk)
 - fixed bad IntArrayCache usages + clean white spaces
 - initial marlinFX 0.9.4.5 for openjfx 18

Changes: https://git.openjdk.java.net/jfx/pull/674/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=674&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8274066
  Stats: 4086 lines in 31 files changed: 2594 ins; 1218 del; 274 mod
  Patch: https://git.openjdk.java.net/jfx/pull/674.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/674/head:pull/674

PR: https://git.openjdk.java.net/jfx/pull/674


Re: RFR: 8267059: Gradle :clean and :apps tasks fail on Windows if ANT_HOME contains spaces [v2]

2022-01-07 Thread Joeri Sykora
On Fri, 4 Jun 2021 05:04:17 GMT, Michael Strauß  wrote:

>> This PR fixes an issue when building OpenJFX on Windows and command-line 
>> arguments contain paths with spaces.
>> 
>> The problem is that on Windows, `ant` is invoked via `cmd`, which leads to 
>> quotes being interpreted twice. This can be fixed with the option `cmd /s`, 
>> which prevents interpreting quotes on the rest of the command line. The 
>> result is as if the rest of the command line had been typed verbatim at the 
>> command prompt.
>
> Michael Strauß has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains two additional 
> commits since the last revision:
> 
>  - Merge branch 'master' into fixes/JDK-8267059
>  - Use cmd /s option when building on Windows

Marked as reviewed by sykora (Author).

I've tested these changes and I can confirm that it works as expected.

-

PR: https://git.openjdk.java.net/jfx/pull/499


Re: RFR: 8197991: Selecting many items in a TableView is very slow [v6]

2022-01-07 Thread Abhinay Agarwal
> This work improves the performance of `MultipleSelectionModel`  over large 
> data sets by caching some values and avoiding unnecessary calls to 
> `SelectedIndicesList#size`. It further improves the performance by reducing 
> the number of iterations required to find the index of an element in the 
> BitSet.
> 
> The work is based on [an abandoned 
> patch](https://github.com/openjdk/jfx/pull/127) submitted by @yososs
> 
> There are currently 2 manual tests for this fix.

Abhinay Agarwal has updated the pull request incrementally with two additional 
commits since the last revision:

 - Format code and reduce test size
 - Add size assertion to test

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/673/files
  - new: https://git.openjdk.java.net/jfx/pull/673/files/741aa92f..30fb31c4

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=673&range=05
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=673&range=04-05

  Stats: 16 lines in 3 files changed: 0 ins; 0 del; 16 mod
  Patch: https://git.openjdk.java.net/jfx/pull/673.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/673/head:pull/673

PR: https://git.openjdk.java.net/jfx/pull/673