Re: Cleaning up warnings in the Mac glass code

2021-11-24 Thread Michael Strauß
That's a good idea. In general, warnings should always be treated as errors.


On Thu, Nov 25, 2021 at 2:01 AM Martin Fox  wrote:
>
> The Mac glass code generates a lot of compiler warnings. I tried cleaning 
> this up and discovered that two of the warnings are brand new, courtesy of 
> me. One of the headers in PR #651 has a typo that I didn’t catch and neither 
> did the two reviewers. The compiler generated two warnings but they were lost 
> in the sea.
>
> I turned on warnings-as-errors for the Mac glass code and waded through the 
> results. There are a couple of minor coding errors in addition to mine which 
> should be cleaned up (like passing NO to a function that requires a non-null 
> pointer). There’s also a few deprecated calls across a small handful of files 
> which have easy replacements and are probably worth fixing.
>
> Unfortunately Apple re-named a bunch of constants in 10.12 and deprecated the 
> older forms (I think this was to rationalize the naming with Swift). These 
> form the bulk of the warnings and affect multiple files. Not a fan of that 
> sort of code churn but the alternative is to live with a slew of warnings 
> forever. Apple is not going to un-deprecate those constants.
>
> You can see the changes I made in my github repository (beldenfox/jfx) in the 
> branch ‘macwarnings’. There’s multiple commits, the first and biggest 
> catching most of the easy stuff like constant renaming.
>
> In the short term it might be worth disabling deprecation warnings and 
> turning on warnings-as-errors. Then at least outright coding errors (like 
> mine!) have a chance of being caught.
>
>
>
>


Re: RFR: 8274061: Tree-/TableRowSkin: misbehavior on switching skin [v5]

2021-11-24 Thread Kevin Rushforth
On Fri, 19 Nov 2021 11:42:16 GMT, Jeanette Winzenburg  
wrote:

>> Cleanup of Tree-/TableRowSkin to support switching skins
>> 
>> The misbehavior/s
>> - memory leaks due to manually registered listeners that were not removed
>> - side-effects due to listeners still active on old skin (like NPEs)
>> 
>> Fix
>> - use skin api for all listener registration (for automatic removal in 
>> dispose)
>> - ~~do not install listeners that are not needed (fixedCellSize, same as in 
>> fix of ListCellSkin 
>> [JDK-8246745](https://bugs.openjdk.java.net/browse/JDK-8246745))~~ not 
>> handled here, see 
>> [JDK-8277000](https://bugs.openjdk.java.net/browse/JDK-8277000)
>> 
>> Added tests for each listener involved in the fix to guarantee it's still 
>> working and does not have unwanted side-effects after switching skins.
>> 
>> Note: there are pecularities in row skins (like not updating themselves on 
>> property changes of its control, throwing NPEs when not added to a 
>> VirtualFlow) which are not part of this issue but covered in 
>> [JDK-8274065](https://bugs.openjdk.java.net/browse/JDK-8274065)
>
> Jeanette Winzenburg has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   changes as requested in review

Looks good.

-

Marked as reviewed by kcr (Lead).

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


Cleaning up warnings in the Mac glass code

2021-11-24 Thread Martin Fox
The Mac glass code generates a lot of compiler warnings. I tried cleaning this 
up and discovered that two of the warnings are brand new, courtesy of me. One 
of the headers in PR #651 has a typo that I didn’t catch and neither did the 
two reviewers. The compiler generated two warnings but they were lost in the 
sea.

I turned on warnings-as-errors for the Mac glass code and waded through the 
results. There are a couple of minor coding errors in addition to mine which 
should be cleaned up (like passing NO to a function that requires a non-null 
pointer). There’s also a few deprecated calls across a small handful of files 
which have easy replacements and are probably worth fixing.

Unfortunately Apple re-named a bunch of constants in 10.12 and deprecated the 
older forms (I think this was to rationalize the naming with Swift). These form 
the bulk of the warnings and affect multiple files. Not a fan of that sort of 
code churn but the alternative is to live with a slew of warnings forever. 
Apple is not going to un-deprecate those constants.

You can see the changes I made in my github repository (beldenfox/jfx) in the 
branch ‘macwarnings’. There’s multiple commits, the first and biggest catching 
most of the easy stuff like constant renaming.

In the short term it might be worth disabling deprecation warnings and turning 
on warnings-as-errors. Then at least outright coding errors (like mine!) have a 
chance of being caught.






Re: RFR: 8277457: AccessControlException: access denied ("java.net.NetPermission" "getCookieHandler") [v2]

2021-11-24 Thread Jose Pereda
On Thu, 25 Nov 2021 00:29:36 GMT, Kevin Rushforth  wrote:

>> As indicated in the bug report, WebView needs to call to 
>> `CookieManager::getDefault` within a `doPrivileged` block so that it will 
>> work when a security manager is enabled. There are two calls in 
>> `com.sun.webkit.network.CookieJar` that are not wrapped in a `doPrivileged`.
>> 
>> I added a manual test (since it requires loading a page over http/https 
>> which we can't do in our automated tests) based on the test program that was 
>> attached to JBS.
>
> Kevin Rushforth has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Address review feedback: use method reference instead of lambda

Marked as reviewed by jpereda (Committer).

-

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


Re: RFR: 8277457: AccessControlException: access denied ("java.net.NetPermission" "getCookieHandler") [v2]

2021-11-24 Thread Kevin Rushforth
On Wed, 24 Nov 2021 23:40:01 GMT, Jose Pereda  wrote:

>> Kevin Rushforth has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Address review feedback: use method reference instead of lambda
>
> modules/javafx.web/src/main/java/com/sun/webkit/network/CookieJar.java line 
> 47:
> 
>> 45: @SuppressWarnings("removal")
>> 46: CookieHandler handler =
>> 47: 
>> AccessController.doPrivileged((PrivilegedAction) () -> 
>> CookieHandler.getDefault());
> 
> Not sure if there is a policy for this, but you could replace the lambda with 
> the method reference?

Good idea. Done.

> modules/javafx.web/src/main/java/com/sun/webkit/network/CookieJar.java line 
> 71:
> 
>> 69: @SuppressWarnings("removal")
>> 70: CookieHandler handler =
>> 71: 
>> AccessController.doPrivileged((PrivilegedAction) () -> 
>> CookieHandler.getDefault());
> 
> Same here

Done.

-

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


Re: RFR: 8277457: AccessControlException: access denied ("java.net.NetPermission" "getCookieHandler") [v2]

2021-11-24 Thread Kevin Rushforth
> As indicated in the bug report, WebView needs to call to 
> `CookieManager::getDefault` within a `doPrivileged` block so that it will 
> work when a security manager is enabled. There are two calls in 
> `com.sun.webkit.network.CookieJar` that are not wrapped in a `doPrivileged`.
> 
> I added a manual test (since it requires loading a page over http/https which 
> we can't do in our automated tests) based on the test program that was 
> attached to JBS.

Kevin Rushforth has updated the pull request incrementally with one additional 
commit since the last revision:

  Address review feedback: use method reference instead of lambda

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/681/files
  - new: https://git.openjdk.java.net/jfx/pull/681/files/ca436714..1d7a6064

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=681&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=681&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jfx/pull/681.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/681/head:pull/681

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


Re: RFR: 8276206: Rename TextBinding class to better express its purpose

2021-11-24 Thread Kevin Rushforth
On Wed, 24 Nov 2021 04:23:59 GMT, Michael Strauß  wrote:

> This PR renames `TextBinding` to `MnemonicInfo` and adds the following text 
> to its javadoc:
> 
>   /**
> 33 +* Provides information about mnemonics contained within a string.

Looks good. I'd like a review from one or both of @aghaisas or @kleopatra

-

Marked as reviewed by kcr (Lead).

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


Re: RFR: 8277457: AccessControlException: access denied ("java.net.NetPermission" "getCookieHandler")

2021-11-24 Thread Jose Pereda
On Wed, 24 Nov 2021 23:05:05 GMT, Kevin Rushforth  wrote:

> As indicated in the bug report, WebView needs to call to 
> `CookieManager::getDefault` within a `doPrivileged` block so that it will 
> work when a security manager is enabled. There are two calls in 
> `com.sun.webkit.network.CookieJar` that are not wrapped in a `doPrivileged`.
> 
> I added a manual test (since it requires loading a page over http/https which 
> we can't do in our automated tests) based on the test program that was 
> attached to JBS.

Test works fine. Minor comments only.

modules/javafx.web/src/main/java/com/sun/webkit/network/CookieJar.java line 47:

> 45: @SuppressWarnings("removal")
> 46: CookieHandler handler =
> 47: 
> AccessController.doPrivileged((PrivilegedAction) () -> 
> CookieHandler.getDefault());

Not sure if there is a policy for this, but you could replace the lambda with 
the method reference?

modules/javafx.web/src/main/java/com/sun/webkit/network/CookieJar.java line 71:

> 69: @SuppressWarnings("removal")
> 70: CookieHandler handler =
> 71: 
> AccessController.doPrivileged((PrivilegedAction) () -> 
> CookieHandler.getDefault());

Same here

-

Marked as reviewed by jpereda (Committer).

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


RFR: 8277457: AccessControlException: access denied ("java.net.NetPermission" "getCookieHandler")

2021-11-24 Thread Kevin Rushforth
As indicated in the bug report, WebView needs to call to 
`CookieManager::getDefault` within a `doPrivileged` block so that it will work 
when a security manager is enabled. There are two calls in 
`com.sun.webkit.network.CookieJar` that are not wrapped in a `doPrivileged`.

I added a manual test (since it requires loading a page over http/https which 
we can't do in our automated tests) based on the test program that was attached 
to JBS.

-

Commit messages:
 - 8277457: AccessControlException: access denied ("java.net.NetPermission" 
"getCookieHandler")

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

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


Integrated: 8277133: Dragboard contents retrieved all over again during a DND process on WebView

2021-11-24 Thread Jose Pereda
On Wed, 24 Nov 2021 10:35:50 GMT, Jose Pereda  wrote:

> This PR improves drag and drop events on a WebView node, by generating the 
> content from the dragboard only when the drag events starts, and not for 
> every drag over event.
> 
> A manual test is included that shows how the drag and drop experience 
> improves, especially when dragging online images, as the time between each 
> consecutive drag over event drops from hundreds of ms to tens of ms or even 
> lower.
> 
> This PR is somehow blocked by #668, as dragging some images fails on macOS.

This pull request has now been integrated.

Changeset: 423e1be1
Author:Jose Pereda 
URL:   
https://git.openjdk.java.net/jfx/commit/423e1be18b62b92d3a2355d91243ee6fb29f237f
Stats: 101 lines in 5 files changed: 91 ins; 0 del; 10 mod

8277133: Dragboard contents retrieved all over again during a DND process on 
WebView

Reviewed-by: kcr

-

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


Integrated: 8160597: IllegalArgumentException when we initiate drag on Image

2021-11-24 Thread Jose Pereda
On Mon, 15 Nov 2021 11:19:13 GMT, Jose Pereda  wrote:

> This PR fixes an exception that can happen when dragging an image from a 
> WebView on macOS.
> 
> Dragging an image that is directly included like `` 
> works fine, without exception. However, there are (at least) two other cases 
> when the IAE is thrown: 
> 
> - Dragging an image that is part of an hyperlink, like ``.
> - Dragging an image encoded as base64.
> 
> The IAE happens only on macOS, where a native image is created in 
> `GlassPasteboard.m` from an URL, and in those two cases the generated image 
> has 0x0 dimensions:
>  
> ``
> 
> which leads to `ByteArrayFromPixels` being called with a null byte array. 
> 
> The included test reproduces the case by directly pushing the `MacPasteboard` 
> content (instead of adding a more complex test with a webView and a drag and 
> drop gesture).

This pull request has now been integrated.

Changeset: 6e6c7119
Author:Jose Pereda 
URL:   
https://git.openjdk.java.net/jfx/commit/6e6c71190e5b9b07a323af0ab483dfc993302164
Stats: 157 lines in 5 files changed: 156 ins; 0 del; 1 mod

8160597: IllegalArgumentException when we initiate drag on Image

Reviewed-by: kcr

-

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


Re: RFR: 8277133: Dragboard contents retrieved all over again during a DND process on WebView [v2]

2021-11-24 Thread Kevin Rushforth
On Wed, 24 Nov 2021 19:42:44 GMT, Jose Pereda  wrote:

>> This PR improves drag and drop events on a WebView node, by generating the 
>> content from the dragboard only when the drag events starts, and not for 
>> every drag over event.
>> 
>> A manual test is included that shows how the drag and drop experience 
>> improves, especially when dragging online images, as the time between each 
>> consecutive drag over event drops from hundreds of ms to tens of ms or even 
>> lower.
>> 
>> This PR is somehow blocked by #668, as dragging some images fails on macOS.
>
> Jose Pereda has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Address feedback

Marked as reviewed by kcr (Lead).

-

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


Re: RFR: 8277133: Dragboard contents retrieved all over again during a DND process on WebView [v2]

2021-11-24 Thread Jose Pereda
> This PR improves drag and drop events on a WebView node, by generating the 
> content from the dragboard only when the drag events starts, and not for 
> every drag over event.
> 
> A manual test is included that shows how the drag and drop experience 
> improves, especially when dragging online images, as the time between each 
> consecutive drag over event drops from hundreds of ms to tens of ms or even 
> lower.
> 
> This PR is somehow blocked by #668, as dragging some images fails on macOS.

Jose Pereda has updated the pull request incrementally with one additional 
commit since the last revision:

  Address feedback

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/680/files
  - new: https://git.openjdk.java.net/jfx/pull/680/files/95d245e7..2d1fbbbe

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=680&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=680&range=00-01

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

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


Re: RFR: 8277133: Dragboard contents retrieved all over again during a DND process on WebView [v2]

2021-11-24 Thread Jose Pereda
On Wed, 24 Nov 2021 17:23:30 GMT, Kevin Rushforth  wrote:

>> Jose Pereda has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Address feedback
>
> modules/javafx.web/src/main/java/javafx/scene/web/WebView.java line 1291:
> 
>> 1289: setOnDragDone(event -> {
>> 1290: mimes = null;
>> 1291: values = null;
> 
> Is it possible for `OnDragDone` to be missed? If so, I wonder if it is a good 
> idea to also set `mimes` and `values` to `null` in the `OnDragDetected` 
> handler?

It makes sense. Done.

> tests/manual/web/dnd/drag.html line 13:
> 
>> 11: 
>> 12: 
>> 13: 
> 
> Minor: missing newline at end of file.

Done

-

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


Re: RFR: 8160597: IllegalArgumentException when we initiate drag on Image [v2]

2021-11-24 Thread Kevin Rushforth
On Wed, 24 Nov 2021 19:26:42 GMT, Jose Pereda  wrote:

>> This PR fixes an exception that can happen when dragging an image from a 
>> WebView on macOS.
>> 
>> Dragging an image that is directly included like `` 
>> works fine, without exception. However, there are (at least) two other cases 
>> when the IAE is thrown: 
>> 
>> - Dragging an image that is part of an hyperlink, like ``.
>> - Dragging an image encoded as base64.
>> 
>> The IAE happens only on macOS, where a native image is created in 
>> `GlassPasteboard.m` from an URL, and in those two cases the generated image 
>> has 0x0 dimensions:
>>  
>> ``
>> 
>> which leads to `ByteArrayFromPixels` being called with a null byte array. 
>> 
>> The included test reproduces the case by directly pushing the 
>> `MacPasteboard` content (instead of adding a more complex test with a 
>> webView and a drag and drop gesture).
>
> Jose Pereda has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Address feedback

Marked as reviewed by kcr (Lead).

-

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


Re: RFR: 8160597: IllegalArgumentException when we initiate drag on Image [v2]

2021-11-24 Thread Jose Pereda
On Wed, 24 Nov 2021 16:53:12 GMT, Kevin Rushforth  wrote:

>> Jose Pereda has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Address feedback
>
> tests/system/src/test/java/test/com/sun/glass/ui/mac/MacPasteboardTest.java 
> line 56:
> 
>> 54: public static void setup() throws Exception {
>> 55: Platform.startup(() -> {
>> 56: if (PlatformUtil.isMac()) {
> 
> Minor: it might be cleaner to wrap the entire body of the `setup` and 
> `teardown` methods in `if (PlatformUtil.isMac())` so that we don't even start 
> FX on platforms other than macOS.

Done

-

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


Re: RFR: 8160597: IllegalArgumentException when we initiate drag on Image [v2]

2021-11-24 Thread Jose Pereda
> This PR fixes an exception that can happen when dragging an image from a 
> WebView on macOS.
> 
> Dragging an image that is directly included like `` 
> works fine, without exception. However, there are (at least) two other cases 
> when the IAE is thrown: 
> 
> - Dragging an image that is part of an hyperlink, like ``.
> - Dragging an image encoded as base64.
> 
> The IAE happens only on macOS, where a native image is created in 
> `GlassPasteboard.m` from an URL, and in those two cases the generated image 
> has 0x0 dimensions:
>  
> ``
> 
> which leads to `ByteArrayFromPixels` being called with a null byte array. 
> 
> The included test reproduces the case by directly pushing the `MacPasteboard` 
> content (instead of adding a more complex test with a webView and a drag and 
> drop gesture).

Jose Pereda has updated the pull request incrementally with one additional 
commit since the last revision:

  Address feedback

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/668/files
  - new: https://git.openjdk.java.net/jfx/pull/668/files/19f513ef..170715e9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=668&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=668&range=00-01

  Stats: 8 lines in 1 file changed: 2 ins; 0 del; 6 mod
  Patch: https://git.openjdk.java.net/jfx/pull/668.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/668/head:pull/668

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


Re: RFR: 8276847: JSException: ReferenceError: Can't find variable: IntersectionObserver

2021-11-24 Thread Kevin Rushforth
On Wed, 10 Nov 2021 18:20:11 GMT, Jose Pereda  wrote:

> This PR enables intersection observer support for WebKit, and includes a 
> system test.

Looks good. I've tested this on all platforms and confirm that it fixes the 
issue with no regressions that I can see. I also confirm that the new test 
catches the problem (fails without and passes with the fix), and that this 
fixes [JDK-8273558](https://bugs.openjdk.java.net/browse/JDK-8273558), which 
can be closed as a duplicate.

I left one minor formatting comment, but unless there are other changes, it 
probably isn't worth changing it.

tests/system/src/test/resources/test/javafx/scene/web/testIObserver.html line 
54:

> 52: Intersection ratio: ?
> 53: 
> 54: 

Minor: missing newline at end of file

-

Marked as reviewed by kcr (Lead).

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


Re: RFR: 8277133: Dragboard contents retrieved all over again during a DND process on WebView

2021-11-24 Thread Kevin Rushforth
On Wed, 24 Nov 2021 10:35:50 GMT, Jose Pereda  wrote:

> This PR improves drag and drop events on a WebView node, by generating the 
> content from the dragboard only when the drag events starts, and not for 
> every drag over event.
> 
> A manual test is included that shows how the drag and drop experience 
> improves, especially when dragging online images, as the time between each 
> consecutive drag over event drops from hundreds of ms to tens of ms or even 
> lower.
> 
> This PR is somehow blocked by #668, as dragging some images fails on macOS.

The fix looks good with one question, although it's likely fine as is. The 
manual test looks good, too (with one minor formatting issue).

modules/javafx.web/src/main/java/javafx/scene/web/WebView.java line 1291:

> 1289: setOnDragDone(event -> {
> 1290: mimes = null;
> 1291: values = null;

Is it possible for `OnDragDone` to be missed? If so, I wonder if it is a good 
idea to also set `mimes` and `values` to `null` in the `OnDragDetected` handler?

tests/manual/web/dnd/drag.html line 13:

> 11: 
> 12: 
> 13: 

Minor: missing newline at end of file.

-

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


Re: RFR: 8160597: IllegalArgumentException when we initiate drag on Image

2021-11-24 Thread Kevin Rushforth
On Mon, 15 Nov 2021 11:19:13 GMT, Jose Pereda  wrote:

> This PR fixes an exception that can happen when dragging an image from a 
> WebView on macOS.
> 
> Dragging an image that is directly included like `` 
> works fine, without exception. However, there are (at least) two other cases 
> when the IAE is thrown: 
> 
> - Dragging an image that is part of an hyperlink, like ``.
> - Dragging an image encoded as base64.
> 
> The IAE happens only on macOS, where a native image is created in 
> `GlassPasteboard.m` from an URL, and in those two cases the generated image 
> has 0x0 dimensions:
>  
> ``
> 
> which leads to `ByteArrayFromPixels` being called with a null byte array. 
> 
> The included test reproduces the case by directly pushing the `MacPasteboard` 
> content (instead of adding a more complex test with a webView and a drag and 
> drop gesture).

The fix looks good. The test looks good with one minor comment.

tests/system/src/test/java/test/com/sun/glass/ui/mac/MacPasteboardTest.java 
line 56:

> 54: public static void setup() throws Exception {
> 55: Platform.startup(() -> {
> 56: if (PlatformUtil.isMac()) {

Minor: it might be cleaner to wrap the entire body of the `setup` and 
`teardown` methods in `if (PlatformUtil.isMac())` so that we don't even start 
FX on platforms other than macOS.

-

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


Re: RFR: 8273096: Add support for H.265/HEVC to JavaFX Media [v2]

2021-11-24 Thread Kevin Rushforth
On Tue, 16 Nov 2021 02:24:11 GMT, Alexander Matveev  
wrote:

>> - Added support for H.265/HEVC for all 3 platforms.
>>  - Support is added only for .mp4 files over FILE/HTTP/HTTPS protocols. HTTP 
>> Live Streaming with H.265/HEVC is not supported.
>>  - On Windows mfwrapper was introduced which uses Media Foundation APIs to 
>> decode HEVC.
>>  - 10 and 12-bit HEVC was tested and also supported, however due to graphics 
>> pipeline not supporting 10-bit YUV rendering we will use color converter to 
>> convert video frame to 8-bit before sending it for rendering.
>>  - Resolution upto 4k is supported.
>> 
>> Additional runtime dependency requirements:
>> Windows: Windows 10 with HEVC Video Extensions installed.
>> macOS: macOS High Sierra and later
>> Linux: at least libavcodec56 and libswscale5
>> 
>> Additional build dependency:
>> Linux: libswscale-dev
>
> Alexander Matveev has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8273096: Add support for H.265/HEVC to JavaFX Media [v3]

All my testing looks good. I confirm that the earlier reported problem on Linux 
is fixed.

I am part way through the code review and so far haven't spotted any issues.

-

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


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

2021-11-24 Thread yosbits
On Mon, 22 Nov 2021 16:25:22 GMT, Michael Strauß  wrote:

>> I could move `int max = size();` outside the loop
>
> But why? The initialization block of a `for` statement is exactly where you'd 
> put loop-scoped variables.

This change significantly improves performance because the BitSet's size () 
method is an O (N) implementation. You may be wondering because it is O (1) in 
many other collections.

-

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


RFR: 8277133: Dragboard contents retrieved all over again during a DND process on WebView

2021-11-24 Thread Jose Pereda
This PR improves drag and drop events on a WebView node, by generating the 
content from the dragboard only when the drag events starts, and not for every 
drag over event.

A manual test is included that shows how the drag and drop experience improves, 
especially when dragging online images, as the time between each consecutive 
drag over event drops from hundreds of ms to tens of ms or even lower.

This PR is somehow blocked by #668, as dragging some images fails on macOS.

-

Commit messages:
 - Add manual test
 - Generate mime/values only when drag event starts

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

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


RFR: 8191995: Regression: DatePicker must commit on focusLost

2021-11-24 Thread Marius Hanl
This PR fixes an issue where the `DatePicker` is not committing his value when 
the focus is lost. 
As the ticket also mentions, this is a regression which last worked on JavaFX 8 
and got broken by the refactoring: 
[JDK-8150946](https://bugs.openjdk.java.net/browse/JDK-8150946)

The fix is to provide the same api  to the `DatePicker` which was introduced by 
[JDK-8150946](https://bugs.openjdk.java.net/browse/JDK-8150946) for `ComboBox` 
and `Spinner`.

Note: While fixing this I found a possible bug which I tracked here: 
[JDK-8277756](https://bugs.openjdk.java.net/browse/JDK-8277756)
-> When creating a `DatePicker` with the second constructor (with `LocalDate` 
as parameter) two listener won't be added since they are only added at the 
first constructor (That's also why I added the focusProperty listener in the 
second constructor).

-

Commit messages:
 - 8191995: Regression: DatePicker must commit on focusLost

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

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