Re: RFR: 8242361: JavaFX Web View crashes with Segmentation Fault, when HTML contains Data-URIs

2020-12-12 Thread Kevin Rushforth
On Tue, 24 Nov 2020 21:28:29 GMT, Matthias Bläsing 
 wrote:

> The code in WTF::scheduleDispatchFunctionsOnMainThread assumes, that
> the java class com.sun.webkit.MainThread can be found be the JNI
> function FindClass. This is only true if the class is loadable by the
> system class loader.
> 
> One such case is when the OpenJFX modules are loaded from a new
> ModuleLayer. To fix this, the reference to the class needs to be loaded
> from when a JNI call from Java into native code is active. In that case
> FindClass uses the classloader associated with that method.
> 
> The test code can be executed by running:
> 
> cd tests/manual/web/dataurl
> ../../../../gradlew run

I'll plan to look at this next week. I have a general question and a comment:

1. Would it be possible to turn the test into an automated one? Possibly using 
some of the same techniques that the ModuleLauncherTest does?
2. All of the new files need a proper copyright header (including the new 
`build.gradle`).

-

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


Re: RFR: 8211294: [windows] TextArea content is blurry with 125% scaling

2020-12-12 Thread Kevin Rushforth
On Sat, 12 Dec 2020 14:57:05 GMT, Kevin Rushforth  wrote:

>>> 
>>> 
>>> I hope to take a look at this, along with other pending reviews, early next 
>>> week. There is still some time to get this into 16 if we can find a robust 
>>> fix.
>> 
>> That's great news, thanks!
>
> I spent a bit of time looking at this. I think the root cause of the problem 
> is in ScrollPane itself. It is attempting to layout its children by doing a 
> snap to pixel (meaning that the final scaled translation should be an integer 
> value), but it is failing to do so. This is mostly not a problem when caching 
> is disabled, since our text rendering does sub-pixel antialiasing that looks 
> crisp even at non-integer boundaries. However, translating an 
> already-rendered image by a non-integer boundary will cause the blurriness we 
> are seeing. There is another issue with the Y translation which isn't 0 even 
> when  not using a ScrollPane.
> 
> I'll continue looking at this in the coming week.

One more comment: given the quality problems that necessarily arise when the 
translation of a cached image is not on an integer boundary, part of the 
solution might be to snap the cached image to a pixel boundary as is done in 
this PR, but we would need to ensure that this doesn't impact smooth scrolling 
of a TextArea.

-

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


Re: RFR: 8211294: [windows] TextArea content is blurry with 125% scaling

2020-12-12 Thread Kevin Rushforth
On Sat, 5 Dec 2020 11:33:46 GMT, Frederic Thevenet  
wrote:

>> I hope to take a look at this, along with other pending reviews, early next 
>> week. There is still some time to get this into 16 if we can find a robust 
>> fix.
>
>> 
>> 
>> I hope to take a look at this, along with other pending reviews, early next 
>> week. There is still some time to get this into 16 if we can find a robust 
>> fix.
> 
> That's great news, thanks!

I spent a bit of time looking at this. I think the root cause of the problem is 
in ScrollPane itself. It is attempting to layout its children by doing a snap 
to pixel (meaning that the final scaled translation should be an integer 
value), but it is failing to do so. This is mostly not a problem when caching 
is disabled, since our text rendering does sub-pixel antialiasing that looks 
crisp even at non-integer boundaries. However, translating an already-rendered 
image by a non-integer boundary will cause the blurriness we are seeing. There 
is another issue with the Y translation which isn't 0 even when  not using a 
ScrollPane.

I'll continue looking at this in the coming week.

-

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