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

2023-07-24 Thread Prasanta Sadhukhan
On Mon, 24 Jul 2023 17:15:18 GMT, Andy Goryachev wrote: >> This code is still accessing shared state (`dnd`, `pWidth`, `pHeight`, >> `scaleFactorX`, `scaleFactorY`). Without further analysis of when and where >> these values are written, it is unclear whether this is the right move. In >>

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

2023-07-24 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: CSS Transitions

2023-07-24 Thread Michael Strauß
My comments below: On Tue, Jul 25, 2023 at 1:18 AM Kevin Rushforth wrote: > > This seems like it might be a useful feature, if enough applications > would want to take advantage of it. > > If we proceed, I have a couple comments: > > * All of our existing CSS attributes use "-fx-" as a prefix.

Re: CSS Transitions

2023-07-24 Thread Kevin Rushforth
This seems like it might be a useful feature, if enough applications would want to take advantage of it. If we proceed, I have a couple comments: * All of our existing CSS attributes use "-fx-" as a prefix. My preference would be to do that for transitions as well, absent a compelling reason

Re: RFR: JDK-8290310: ChangeListener events are incorrect or misleading when a nested change occurs [v11]

2023-07-24 Thread John Hendrikx
On Mon, 24 Jul 2023 19:56:06 GMT, Michael Strauß wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix generic warnings > > modules/javafx.base/src/main/java/com/sun/javafx/binding/ListenerManager.java > line 143:

Re: RFR: JDK-8290310: ChangeListener events are incorrect or misleading when a nested change occurs [v11]

2023-07-24 Thread John Hendrikx
On Mon, 24 Jul 2023 19:58:04 GMT, Michael Strauß wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix generic warnings > > modules/javafx.base/src/main/java/com/sun/javafx/binding/ListenerManager.java > line 145:

Re: RFR: JDK-8290310: ChangeListener events are incorrect or misleading when a nested change occurs [v11]

2023-07-24 Thread Michael Strauß
On Fri, 9 Jun 2023 12:00:06 GMT, John Hendrikx wrote: >> This provides and uses a new implementation of `ExpressionHelper`, called >> `ListenerManager` with improved semantics. >> >> # Behavior >> >> |Listener...|ExpressionHelper|ListenerManager| >> |---|---|---| >> |Invocation Order|In order

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

2023-07-24 Thread Alexander Zuev
> also > 8309629: Create implementation of NSAccessibilityRadioButton protocol > > Create implementation of NSAccessibilityCheckBox and > NSAccessibilityRadioButton protocols > Add workaround for the wrong focus owner announcement with radio buttons > Add workaround for wrong magnifier text on

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Alessadro Parisi
On Tue, 30 May 2023 15:37:29 GMT, Michael Strauß wrote: > > Talking about #511 and #1014. I think that both the APIs are quite nice > > additions to JavaFX. However I was thinking, @mstr2 can't the two features > > be split? It seems to me, correct me if I'm wrong, that the Platform > >

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Alessadro Parisi
On Thu, 11 May 2023 14:38:01 GMT, Michael Strauß wrote: >> Hi all, >> >> First of all, thanks for the efforts to integrate this new API into JavaFX. >> As a style theme developer myself I think this API is missing nowadays and >> will be a good addition to the SDK! >> >> A comment not

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Pedro Duque Vieira
On Thu, 11 May 2023 14:38:01 GMT, Michael Strauß wrote: >> Hi all, >> >> First of all, thanks for the efforts to integrate this new API into JavaFX. >> As a style theme developer myself I think this API is missing nowadays and >> will be a good addition to the SDK! >> >> A comment not

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Thu, 11 May 2023 14:38:01 GMT, Michael Strauß wrote: >> Hi all, >> >> First of all, thanks for the efforts to integrate this new API into JavaFX. >> As a style theme developer myself I think this API is missing nowadays and >> will be a good addition to the SDK! >> >> A comment not

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Thu, 11 May 2023 11:38:14 GMT, Pedro Duque Vieira wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. > > Hi all, > > First of all, thanks for the efforts to integrate this new API into JavaFX. > As a style theme developer myself I

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Pedro Duque Vieira
On Thu, 2 Feb 2023 19:54:33 GMT, Michael Strauß wrote: >> Please read [this >> document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) >> for an introduction to the Platform Preferences API, and how it interacts >> with the proposed style theme and stage appearance features.

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Mon, 24 Apr 2023 19:24:31 GMT, Andy Goryachev wrote: > 1. ObservableMap. Is it unmodifiable? I'd expect it to be, since this API > exposes the properties of the underlying platform. Yes and no. It is unmodifiable as it relates to the `Map` contract: you can't add, remove, or change

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Andy Goryachev
On Thu, 2 Feb 2023 19:54:33 GMT, Michael Strauß wrote: >> Please read [this >> document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) >> for an introduction to the Platform Preferences API, and how it interacts >> with the proposed style theme and stage appearance features.

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread airsquared
On Tue, 2 May 2023 12:31:20 GMT, Michael Strauß wrote: > But what do you do when a style theme uses platform preferences to adjust its > appearance (light/dark mode), but an application either doesn't want to offer > a dark mode, or wants the _application_ (not the OS) be able to toggle >

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Mon, 24 Apr 2023 22:08:20 GMT, Andy Goryachev wrote: > I meant > > ``` > ObjectProperty Preferences.getProperty(String key); > Set listPropertyKeys(); > ``` > > it would also be nice to obtain a typed property right away. That might be > more difficult, since one needs to use a dedicated

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Wed, 3 May 2023 06:23:48 GMT, airsquared wrote: > Since this is mainly for if a user wants to adjust the preferences used in a > style theme, would it make sense to provide this feature for overriding > preferences in the style theme API? This could also give the user the option > to

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Andy Goryachev
On Mon, 24 Apr 2023 20:13:30 GMT, Michael Strauß wrote: > Do you mean that you want `Preferences.appearanceProperty()`, > `Preferences.backgroundColorProperty()` and > `Preferences.foregroundColorProperty()` to be returned as a list? For > example, by adding another method like: I meant

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread John Hendrikx
On Mon, 24 Apr 2023 06:23:41 GMT, Michael Strauß wrote: > > I'm not convinced that a delayed change + commit system is the correct way > > to do this. Properties should behave the same everywhere in JavaFX and this > > seems to change how they work quite a bit. > > Instead, I propose to look

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Mon, 24 Apr 2023 07:14:47 GMT, John Hendrikx wrote: > That's not quite what I meant. You can add listeners still and get instant > change notifications. Just like when I listen to the `backgroundProperty` of > a control, and someone changes it, I get notified instantly and the change is >

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Sun, 9 Apr 2023 20:23:55 GMT, John Hendrikx wrote: > With the preferences Map, this could work similar perhaps; set a key to > whatever you want with put, and restore it to its original value by setting > it to null. That's how the current API works, with a little bit of added complexity:

Re: RFR: 8301302: Platform preferences API [v2]

2023-07-24 Thread Michael Strauß
On Tue, 31 Jan 2023 23:04:50 GMT, Scott Palmer wrote: >> Michael Strauß has refreshed the contents of this pull request, and previous >> commits have been removed. Incremental views are not available. > > On Tue, Jan 31, 2023 at 3:00 PM Andy Goryachev ***@***.***> > wrote: > >> In the context

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Mon, 24 Apr 2023 06:01:58 GMT, John Hendrikx wrote: > I'm not convinced that a delayed change + commit system is the correct way to > do this. Properties should behave the same everywhere in JavaFX and this > seems to change how they work quite a bit. > > Instead, I propose to look at how

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread John Hendrikx
On Sun, 9 Apr 2023 17:33:42 GMT, Michael Strauß wrote: > In general, platform preferences correspond to OS-level settings and are > updated dynamically. Third-party themes might integrate platform preferences > into their look and feel, which is often what users expect to see. But > consider

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread Michael Strauß
On Thu, 2 Feb 2023 19:54:33 GMT, Michael Strauß wrote: >> Please read [this >> document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) >> for an introduction to the Platform Preferences API, and how it interacts >> with the proposed style theme and stage appearance features.

Re: RFR: 8301302: Platform preferences API [v2]

2023-07-24 Thread Michael Strauß
On Tue, 31 Jan 2023 20:18:05 GMT, Michael Strauß wrote: > 2. ObservableMap. Similarly to Node.getProperties(), I wonder if there might > be a better way to observe the changes. May be a different metaphor > (subscription?), like adding a value change listener to a specific key. We > do

Re: RFR: 8301302: Platform preferences API [v3]

2023-07-24 Thread John Hendrikx
On Thu, 2 Feb 2023 19:54:33 GMT, Michael Strauß wrote: >> Please read [this >> document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) >> for an introduction to the Platform Preferences API, and how it interacts >> with the proposed style theme and stage appearance features.

Re: RFR: 8301302: Platform preferences API [v4]

2023-07-24 Thread Michael Strauß
> Please read [this > document](https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548) for > an introduction to the Platform Preferences API, and how it interacts with > the proposed style theme and stage appearance features. Michael Strauß has updated the pull request with a new

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

2023-07-24 Thread Andy Goryachev
On Mon, 24 Jul 2023 16:08:07 GMT, Michael Strauß wrote: >> this code looks much better - eliminates TOC/TOU concern >> https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use > > This code is still accessing shared state (`dnd`, `pWidth`, `pHeight`, > `scaleFactorX`, `scaleFactorY`). Without

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

2023-07-24 Thread Michael Strauß
On Mon, 24 Jul 2023 14:48:57 GMT, Andy Goryachev wrote: >> ok > > this code looks much better - eliminates TOC/TOU concern > https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use This code is still accessing shared state (`dnd`, `pWidth`, `pHeight`, `scaleFactorX`, `scaleFactorY`).

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

2023-07-24 Thread Andy Goryachev
On Mon, 24 Jul 2023 06:55:19 GMT, Prasanta Sadhukhan wrote: >> modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line >> 1069: >> >>> 1067: >>> 1068: @Override >>> 1069: public void setEmbeddedScene(EmbeddedSceneInterface >>> embeddedScene) { >> >> Same

Withdrawn: 8269907 memory leak - Dirty Nodes / Parent removed

2023-07-24 Thread duke
On Wed, 21 Jul 2021 11:29:38 GMT, Florian Kirmaier wrote: > After thinking about this issue for some time, I've now got a solution. > I know put the scene in the state it is, before is was shown, when the > dirtyNodes are unset, the whole scene is basically considered dirty. > This has the

Re: RFR: JDK-8310681: Update WebKit to 616.1 [v2]

2023-07-24 Thread Kevin Rushforth
On Mon, 24 Jul 2023 12:43:57 GMT, Hima Bindu Meda wrote: >> Updated JavaFX Webkit to GTK WebKit 2.40 (616.1). >> Verified the updated version build, sanity tests and stability. No issues >> have been observed. > > Hima Bindu Meda has updated the pull request incrementally with one > additional

Re: RFR: JDK-8310681: Update WebKit to 616.1

2023-07-24 Thread Hima Bindu Meda
On Mon, 24 Jul 2023 02:50:30 GMT, Jay Bhaskar wrote: > > Oh, I see that now. What led me to ask this question was that there is an > > alternative implementation in `#if PLATFORM(JAVA)`, which implies that we > > removed the call to `stripLeadingAndTrailingHTMLSpaces` and that it is > > still

Re: RFR: JDK-8310681: Update WebKit to 616.1 [v2]

2023-07-24 Thread Hima Bindu Meda
> Updated JavaFX Webkit to GTK WebKit 2.40 (616.1). > Verified the updated version build, sanity tests and stability. No issues > have been observed. Hima Bindu Meda has updated the pull request incrementally with one additional commit since the last revision: Remove check for PLATFORM(JAVA)

Aw: Re: CSS Transitions

2023-07-24 Thread Marius Hanl
I think this is a good feature to have in JavaFX, especially as it makes it much easier to animate the UI.This looks good to me API wise. Since you implemented this as in modern CSS, this is also very easy for people coming from the Web.-- Marius Am 17.07.23, 21:24 schrieb "Michael Strauß" :

Re: Platform preferences API

2023-07-24 Thread John Hendrikx
I think Appearance is exactly correct as it is.  It encodes a fundamental binary aspect of visual presentations that all themes, styles, displays, posters, prints, etc. must choose between: do I present text on a light background (and so the text is dark), or do I present text on a dark

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

2023-07-24 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 [v3]

2023-07-24 Thread Prasanta Sadhukhan
On Fri, 21 Jul 2023 18:17:20 GMT, Kevin Rushforth wrote: > > The key word is **if done correctly**. One thing to look for is the > > possibility of introducing a deadlock and regression, so we may need to > > analyze the callers and perform more extensive testing. > > That is exactly my

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

2023-07-24 Thread Prasanta Sadhukhan
On Fri, 21 Jul 2023 21:30:08 GMT, Andy Goryachev wrote: >> tests/system/src/test/java/test/javafx/embed/swing/JFXPanelNPETest.java line >> 98: >> >>> 96: }); >>> 97: SwingUtilities.invokeAndWait(JFXPanelNPETest::createUI); >>> 98: for (int i = 0; i < 300; i++) { >> >>

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

2023-07-24 Thread Prasanta Sadhukhan
On Fri, 21 Jul 2023 21:45:56 GMT, John Hendrikx wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Check FXEnabled initially > > modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 1069: >