Re: RFR: 8255248: NullPointerException in JFXPanel due to race condition in HostContainer [v7]

2023-08-29 Thread Prasanta Sadhukhan
> Due to transient datatype of scenePeer, it can become null which can result > in NPE in scenarios where scene is continuously been reset and set, which > warrants a null check, as is done in other places for the same variable. Prasanta Sadhukhan has updated the pull request incrementally with

Re: RFR: 8255248: NullPointerException in JFXPanel due to race condition in HostContainer [v6]

2023-08-29 Thread Prasanta Sadhukhan
> Due to transient datatype of scenePeer, it can become null which can result > in NPE in scenarios where scene is continuously been reset and set, which > warrants a null check, as is done in other places for the same variable. Prasanta Sadhukhan has updated the pull request with a new target b

Re: [JavaFX 3D ( | Feature Request)] Setting Texture Nearest-Sampling on PhongMaterial

2023-08-29 Thread Nir Lisker
I managed to hack my way through the D3D pipeline and set the filters when the maps are loaded into the material. Took screenshots: https://imgur.com/YAzkrxP https://imgur.com/SMlWqTr I will need to do some more work to wire it properly, but conceptually it works. We also need to finalize the API

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Alexander Zuev
On Tue, 29 Aug 2023 19:45:32 GMT, Andy Goryachev wrote: > what I meant is that commented out logging statements should be left in the > code, so the reviewers can uncomment them and test. like this: > > ``` > // System.err.println("it works"); > ``` Did that. I would just appreciate if you or

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol [v2]

2023-08-29 Thread Alexander Zuev
> Create implementation for Slider and Stepper accessibility protocols. > Fix mapping. > Fix performAction parameter type in declaration. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Add commented out debug statements. -

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Alexander Zuev
On Tue, 29 Aug 2023 15:18:20 GMT, Kevin Rushforth wrote: > Having said that, it would be helpful for Alex to list the controls that will > use the new implementation, so reviewers can test it manually. I will definitely do that in the future. In this case you are right the controls are Spinner

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Andy Goryachev
On Tue, 29 Aug 2023 10:10:54 GMT, Alexander Zuev wrote: > Create implementation for Slider and Stepper accessibility protocols. > Fix mapping. > Fix performAction parameter type in declaration. what I meant is that commented out logging statements should be left in the code, so the reviewers ca

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Alexander Zuev
On Tue, 29 Aug 2023 15:55:13 GMT, Andy Goryachev wrote: > perhaps the logging statements should be added (commented out) as a part of > this PR. I can do that - i usually refrained from doing so because code would look not very clean but basically the only way to tell that it goes trough the n

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Johan Vos
On Mon, 28 Aug 2023 04:58:31 GMT, Jayathirth D V wrote: > At multiple places in native glass code we don't have appropriate NULL checks > which might result in null pointer access. > > Added appropriate checks and all test run is green. the ios changes are fine. In general, I'm still worried a

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

2023-08-29 Thread Kevin Rushforth
On Mon, 21 Aug 2023 18:25:08 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: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Andy Goryachev
On Tue, 29 Aug 2023 10:10:54 GMT, Alexander Zuev wrote: > Create implementation for Slider and Stepper accessibility protocols. > Fix mapping. > Fix performAction parameter type in declaration. perhaps the logging statements should be added (commented out) as a part of this PR. -

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Kevin Rushforth
On Tue, 29 Aug 2023 10:10:54 GMT, Alexander Zuev wrote: > Create implementation for Slider and Stepper accessibility protocols. > Fix mapping. > Fix performAction parameter type in declaration. Yes, you read it correctly. Good question about how you can tell that it is going through the new imp

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Andy Goryachev
On Tue, 29 Aug 2023 10:10:54 GMT, Alexander Zuev wrote: > Create implementation for Slider and Stepper accessibility protocols. > Fix mapping. > Fix performAction parameter type in declaration. Thank you for clarification, Kevin. The two linked tickets, and the associated umbrella tickets talk a

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Kevin Rushforth
On Tue, 29 Aug 2023 14:59:41 GMT, Andy Goryachev wrote: > should there be an automated test for the added functionality? Automated testing of the screen reader is not feasible. Even if it were, it would be a separate enhancement to add accessibility tests. Btw, this PR isn't providing new func

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Andy Goryachev
On Tue, 29 Aug 2023 10:10:54 GMT, Alexander Zuev wrote: > Create implementation for Slider and Stepper accessibility protocols. > Fix mapping. > Fix performAction parameter type in declaration. should there be an automated test for the added functionality? - PR Comment: https://git

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Kevin Rushforth
On Tue, 29 Aug 2023 12:56:35 GMT, Johan Vos wrote: >> The idea is to avoid the crash entirely. If we actually hit this case, it is >> very likely that other calls will also run out of memory. Returning to Java >> as quickly as possible will let any pending OOME be thrown. A library should >> n

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Johan Vos
On Tue, 29 Aug 2023 12:33:53 GMT, Kevin Rushforth wrote: >> I agree a crash due to a null pointer is not desired, as that gives very >> little info to the developer. >> If that malloc fails, it is an indication that there is a major chance that >> we are in serious trouble. In that case, simpl

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Kevin Rushforth
On Tue, 29 Aug 2023 08:07:49 GMT, Johan Vos wrote: >> That's a good question. Since this is a void method (thus there is no way to >> signal an error), the ideal thing would be to throw an `OutOfMemoryError` >> before returning, but if a malloc of this small size were to fail, we might >> not

Re: HEADS-UP: Threading restriction for Animation play, pause, stop now enforced

2023-08-29 Thread John Hendrikx
I think that we should realize that almost all JavaFX public class (controls, properties, listeners, etc) are not thread safe. This means that they must be manipulated by a single thread at all times.  This can be the FX thread, but it can also be another thread, as long as there never are two

Re: RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Kevin Rushforth
On Tue, 29 Aug 2023 10:10:54 GMT, Alexander Zuev wrote: > Create implementation for Slider and Stepper accessibility protocols. > Fix mapping. > Fix performAction parameter type in declaration. Reviewers: @arapte @andy-goryachev-oracle - PR Comment: https://git.openjdk.org/jfx/pull

Re: RFR: 8315217 JavaFX: make Printer.printableArea(paper) public

2023-08-29 Thread Kevin Rushforth
On Tue, 29 Aug 2023 09:09:30 GMT, Florian Kirmaier wrote: > We sometimes want to access the printable area for a given paper. > The printable area is currently defined in com.sun.javafx.print.PrinterImpl > and we would like to make it accessible to javafx.print.Printer. > We would also return t

Re: RFR: 8262518: SwingNode.setContent does not close previous content, resulting in memory leak [v5]

2023-08-29 Thread Kevin Rushforth
On Fri, 25 Aug 2023 03:36:53 GMT, Prasanta Sadhukhan wrote: >> Issue is when setting the content of a SwingNode, the old content is not >> garbage collected owing to the fact >> JLightweightFrame is never being released by SwingNodeDisposer >> >> The SwingNodeDisposer holds an hard pointer to

Accessibility on Linux

2023-08-29 Thread Thiago Milczarek Sayão
Hi, The company I work for has some people with low vision. The main complaint is that the text cursor is not followed on screen amplification (ZOOM). I did a quick look and ATK (Accessibility Toolkit) might handle this. Would this contribution be welcomed? I still don't know the amount of work

Page size inaccurate/broken, which solution?

2023-08-29 Thread Florian Kirmaier
Hi JavaFX Developer! The Problem: On the class java.print.Page, the methods “getWidth" and “getHeight" don’t return the correct values. Especially it causes problems when the Paper is defined in mm. This happens mainly because of this method, which rounds down to full points: private double get

RFR: 8313556: Create implementation of NSAccessibilitySlider protocol

2023-08-29 Thread Alexander Zuev
Create implementation for Slider and Stepper accessibility protocols. Fix mapping. Fix performAction parameter type in declaration. - Commit messages: - 8313556: Create implementation of NSAccessibilitySlider protocol Changes: https://git.openjdk.org/jfx/pull/1226/files Webrev: ht

Re: HEADS-UP: Threading restriction for Animation play, pause, stop now enforced

2023-08-29 Thread Jurgen Doll
Thanks for the heads-up Kevin, I gave it a spin and found that generally because I use Task to load my fxml views I had problems. Some of these I could resolve by wrapping the offending line with runlater in the fxml initialise method. This reminded me though of the days when Tooltips had

RFR: 8315217 JavaFX: make Printer.printableArea(paper) public

2023-08-29 Thread Florian Kirmaier
We sometimes want to access the printable area for a given paper. The printable area is currently defined in com.sun.javafx.print.PrinterImpl and we would like to make it accessible to javafx.print.Printer. We would also return the value in points instead of inches for a more consistent API. RF

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Johan Vos
On Mon, 28 Aug 2023 21:28:01 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/native-glass/gtk/GlassApplication.cpp line >> 270: >> >>> 268: // we release this context in call_runnable >>> 269: } else { >>> 270: fprintf(stderr, "malloc failed in >>> GtkApplic

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Marius Hanl
On Mon, 28 Aug 2023 04:58:31 GMT, Jayathirth D V wrote: > At multiple places in native glass code we don't have appropriate NULL checks > which might result in null pointer access. > > Added appropriate checks and all test run is green. modules/javafx.graphics/src/main/native-glass/gtk/GlassAp