Re: RFR: 8319079: Missing range checks in decora [v2]

2023-10-30 Thread Jayathirth D V
> In SW pipeline path of Box/Gaussian Blur/Shadow effects we are not checking > for range when we read data from the source/destination buffers in native > code. > > We need to add appropriate range checks in native JNI code also apart from > range checks in Java side to make sure that wherever

Re: RFR: 8319079: Missing range checks in decora [v2]

2023-10-30 Thread Jayathirth D V
On Mon, 30 Oct 2023 15:16:45 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/native-decora/SSELinearConvolveShadowPeer.cc >> line 133: >> >>> 131: dstrows > srcrows) { // We should not move out of source >>> vertical bounds >>> 132: return; >>> 133: } >> >>

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v4]

2023-10-30 Thread Prasanta Sadhukhan
On Mon, 30 Oct 2023 15:23:45 GMT, Kevin Rushforth wrote: >> Yes, initialization helped..Updated the PR... >> Also, speaking of regression test, I need some time to create one.. Will it >> be ok to push the fix if found to be ok and I work on the test >> simultaneously as a separate JBS test iss

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v8]

2023-10-30 Thread Prasanta Sadhukhan
On Mon, 30 Oct 2023 14:00:56 GMT, Prasanta Sadhukhan wrote: >> FX Nodes embedded in a Swing JFXPanel does not track the component >> orientation and FX nodes remain unaffected when component orientation >> changes. >> Fix made sure JavaFX scene embedded in a JFXPanel should inherit the value

Re: [Request for Comments] Behavior / InputMap

2023-10-30 Thread Martin Fox
I was looking over the InputMap proposal with an eye toward paring it down to the bare minimum. From the perspective of a user who wants to manipulate a control without subclassing it I think there are only a few essential components. 1) Ensure the user gets events before the control does. That

Re: RFR: JDK-8187314: All Cells: must show backing data always

2023-10-30 Thread Andy Goryachev
On Fri, 4 Aug 2023 18:13:34 GMT, Marius Hanl wrote: > Before, the `updateItem` method was called with the new value that was > committed via `commitEdit()`. > This is problematic as developers may setup a commit handler via > `setOnEditCommit`, which may reject the edit (or change the value oth

Re: [Request for Comments] Behavior / InputMap

2023-10-30 Thread Andy Goryachev
Dear Kevin: Thank you for providing a summary to our (lively) discussion. Even though I think I answered these concerns, I don’t mind to have another go at it. Please find the updated proposal here (same link): https://gist.github.com/andy-goryachev-oracle/294d8e4b3094fe16f8d55f6dd8b21c09 Let

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

2023-10-30 Thread Andy Goryachev
On Mon, 30 Oct 2023 20:54:43 GMT, Michael Strauß wrote: > I added a [ticket](https://bugs.openjdk.org/browse/JDK-8319140) in JBS Thank you! - PR Comment: https://git.openjdk.org/jfx/pull/1014#issuecomment-1786031436

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

2023-10-30 Thread Michael Strauß
On Mon, 30 Oct 2023 20:19:16 GMT, Kevin Rushforth wrote: > In any case, whatever we might end up doing in this area will be a follow-up > to this feature, so maybe we could file a follow-on enhancement in JBS? > > @mstr2 Since the API is pretty much finalized, can you create the CSR? I added a

Re: Prioritized event handlers

2023-10-30 Thread Andy Goryachev
Dear Michael: Sorry for the late reply - you are absolutely right. I’ve tried to solve this issue with the InputMap internal event handler list, but your proposal looks much better, as it might provide a system-wide reliable way to manage event handler invocation order. Thank you -andy Fr

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

2023-10-30 Thread Andy Goryachev
On Sun, 29 Oct 2023 22:20:17 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 [v17]

2023-10-30 Thread Kevin Rushforth
On Sun, 29 Oct 2023 22:20:17 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 [v17]

2023-10-30 Thread John Hendrikx
On Sun, 29 Oct 2023 22:20:17 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: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text

2023-10-30 Thread John Hendrikx
On Mon, 30 Oct 2023 19:00:08 GMT, Andy Goryachev wrote: >> There are a number of tickets open related to text rendering: >> >> https://bugs.openjdk.org/browse/JDK-8314215 >> >> https://bugs.openjdk.org/browse/JDK-8145496 >> >> https://bugs.openjdk.org/browse/JDK-8129014 >> >> They have in com

Re: RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text

2023-10-30 Thread John Hendrikx
On Mon, 30 Oct 2023 19:09:17 GMT, Michael Strauß wrote: > It seems there's no browser equivalent to your proposed behavior, either. > pre-line does not preserve spaces, but your proposal does; it merely doesn't > preserve end-of-line spaces. Yeah, I missed that somehow. `pre-line` looks close

Re: Prioritized event handlers

2023-10-30 Thread Andy Goryachev
Dear Michael: Thank you, this is very helpful. Questions/Comments: 1. Does this proposal changes the way events are dispatched with respect to priority? In other words, does it first go through the list of all handlers registred on the leaf Node (high priority first, then lower, then lowest),

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

2023-10-30 Thread Andy Goryachev
On Sun, 29 Oct 2023 22:20:17 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: [External] : Re: Proof of concept pull request for Behavior API (PR 1265)

2023-10-30 Thread Andy Goryachev
Dear John: I'm unsure what the JEP format would contribute here The benefit of JEP format is a) to explicitly state the problem being solved (in the Motivation section) b) to enumerate the public APIs I have several proposals, and some are too big for a single proposal (IMHO) which would you

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

2023-10-30 Thread Michael Strauß
On Mon, 30 Oct 2023 19:02:53 GMT, Andy Goryachev wrote: > Not really. Locale can be set to one thing (at application start time), and > the input language to another, at run time. I see. Maybe the preference could expose a `Locale` instance that corresponds to the input language.

Re: RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text

2023-10-30 Thread Michael Strauß
On Mon, 30 Oct 2023 08:52:27 GMT, John Hendrikx wrote: > > I've tested `AAA BBB CCC` in Chrome, and the text is rendered pretty much > > exactly as your "before" version: > > For the current rendering that JavaFX does, there is no browser equivalent, > although `pre-wrap` comes close, JavaFX w

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

2023-10-30 Thread Andy Goryachev
On Mon, 30 Oct 2023 18:56:40 GMT, Michael Strauß wrote: > Can't you get this information from the Locale class? Not really. Locale can be set to one thing (at application start time), and the input language to another, at run time. - PR Comment: https://git.openjdk.org/jfx/pull/1

Re: RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text

2023-10-30 Thread Andy Goryachev
On Sun, 10 Sep 2023 20:50:18 GMT, John Hendrikx wrote: > There are a number of tickets open related to text rendering: > > https://bugs.openjdk.org/browse/JDK-8314215 > > https://bugs.openjdk.org/browse/JDK-8145496 > > https://bugs.openjdk.org/browse/JDK-8129014 > > They have in common that w

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

2023-10-30 Thread Michael Strauß
On Mon, 30 Oct 2023 14:54:28 GMT, Andy Goryachev wrote: > Related question: would it possible to add a parameter indicating the current > input language (that'll be a subject of a separate issue of course). > Something like { name, isRTL }. Can't you get this information from the `Locale` clas

Re: RFR: 8311216: DataURI can lose information in some charset environments [v4]

2023-10-30 Thread Andy Goryachev
On Mon, 30 Oct 2023 18:45:51 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/util/DataURI.java line >> 221: >> >>> 219: >>> 220: ExpectedCharacter expectedCharacter = >>> ExpectedCharacter.DEFAULT; >>> 221: byte[] output = new byte[computePay

Re: RFR: 8311216: DataURI can lose information in some charset environments [v4]

2023-10-30 Thread Michael Strauß
On Mon, 30 Oct 2023 15:13:26 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review changes > > modules/javafx.graphics/src/main/java/com/sun/javafx/util/DataURI.java line > 221: > >> 219:

Integrated: 8311216: DataURI can lose information in some charset environments

2023-10-30 Thread Michael Strauß
On Sat, 1 Jul 2023 22:24:09 GMT, Michael Strauß wrote: > DataURI uses the following implementation to decode the percent-encoded > payload of a "data" URI: > > > ... > String data = uri.substring(dataSeparator + 1); > Charset charset = Charset.defaultCharset(); > ... > URLDecoder.decode(data.r

Re: RFR: JDK-8284445: macOS 12 prints a warning when a function key shortcut is assigned to a menu [v2]

2023-10-30 Thread Martin Fox
On Mon, 30 Oct 2023 11:27:59 GMT, vlaaad wrote: >> This PR addresses [JDK-8284445](https://bugs.openjdk.org/browse/JDK-8284445). >> >> Context: the warning might be more important than it seems. Our JavaFX-based >> desktop app has [an issue](https://github.com/defold/defold/issues/7845) — >> w

[jfx21u] Integrated: 8314484: Update Gradle to 8.4

2023-10-30 Thread Ambarish Rapte
On Mon, 30 Oct 2023 15:32:34 GMT, Ambarish Rapte wrote: > Clean backport to jfx21. > Verified a build locally on macOS. This pull request has now been integrated. Changeset: 7f704c24 Author:Ambarish Rapte URL: https://git.openjdk.org/jfx21u/commit/7f704c24c2238f9d7bb744a20667a8c1337

Re: [jfx21u] RFR: 8314484: Update Gradle to 8.4 [v2]

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 17:44:01 GMT, Ambarish Rapte wrote: >> Clean backport to jfx21. >> Verified a build locally on macOS. > > Ambarish Rapte has updated the pull request incrementally with one additional > commit since the last revision: > > Empty commit All looks good. And I see a clean GHA

Re: [jfx21u] RFR: 8314484: Update Gradle to 8.4 [v2]

2023-10-30 Thread Ambarish Rapte
> Clean backport to jfx21. > Verified a build locally on macOS. Ambarish Rapte has updated the pull request incrementally with one additional commit since the last revision: Empty commit - Changes: - all: https://git.openjdk.org/jfx21u/pull/22/files - new: https://git.openjdk

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v8]

2023-10-30 Thread Andy Goryachev
On Mon, 30 Oct 2023 14:00:56 GMT, Prasanta Sadhukhan wrote: >> FX Nodes embedded in a Swing JFXPanel does not track the component >> orientation and FX nodes remain unaffected when component orientation >> changes. >> Fix made sure JavaFX scene embedded in a JFXPanel should inherit the value

Re: [jfx21u] RFR: 8314484: Update Gradle to 8.4

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 15:32:34 GMT, Ambarish Rapte wrote: > Clean backport to jfx21. > Verified a build locally on macOS. @arapte Can you enable GHA for your repo and then run it? - PR Comment: https://git.openjdk.org/jfx21u/pull/22#issuecomment-1785661149

Re: RFR: 8185831: Pseudo selectors do not appear to work in Node.lookupAll() [v12]

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 01:16:58 GMT, Sai Pradeep Dandem wrote: >> **Issue:** >> Using pseudo classes in programmatic query using Node.lookupAll() or >> Node.lookup() gives unexpected results. >> >> **Cause:** >> There is no check for checking the psuedo states matching in the applies() >> method

Re: RFR: 8319066: Application window not always activated in macOS 14 Sonoma [v2]

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 15:50:09 GMT, Jose Pereda wrote: >> On macOS 14. when a JavaFX application is launched from the command line it >> is not activated, and the terminal application remains active. >> >> This PR forces the application activation on macOS 14, in case the app >> didn't get activ

Re: RFR: 8319066: Application window not always activated in macOS 14 Sonoma [v2]

2023-10-30 Thread Jose Pereda
> On macOS 14. when a JavaFX application is launched from the command line it > is not activated, and the terminal application remains active. > > This PR forces the application activation on macOS 14, in case the app didn't > get activated yet (when launched from a shortcut icon, for instance).

[jfx21u] RFR: 8314484: Update Gradle to 8.4

2023-10-30 Thread Ambarish Rapte
Clean backport to jfx21. Verified a build locally on macOS. - Commit messages: - 8318115: Webkit build fails after gradle 8.4 - 8314484: Update Gradle to 8.4 - 8314486: JavaFX build uses deprecated features that will be removed in gradle 8 Changes: https://git.openjdk.org/jfx21u/

Re: RFR: JDK-8284445: macOS 12 prints a warning when a function key shortcut is assigned to a menu [v2]

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 11:27:59 GMT, vlaaad wrote: >> This PR addresses [JDK-8284445](https://bugs.openjdk.org/browse/JDK-8284445). >> >> Context: the warning might be more important than it seems. Our JavaFX-based >> desktop app has [an issue](https://github.com/defold/defold/issues/7845) — >> w

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v4]

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 13:54:30 GMT, Prasanta Sadhukhan wrote: >> This might be due to the initialization problem I pointed out or it might be >> for some other reason. Can you make the suggested change and then re-test? > > Yes, initialization helped..Updated the PR... > Also, speaking of regress

Re: RFR: JDK-8269921 TextFlow: listeners on bounds can throw NPE while computing text bounds [v5]

2023-10-30 Thread Andy Goryachev
On Mon, 30 Oct 2023 15:00:08 GMT, Florian Kirmaier wrote: >> I mean, are we missing another step? > > Yes, we are definitely missing something. > I looked at it for quite some time, without a better solution as this check. > If you'd like to investigate further - I would recommend you look into

Re: RFR: 8319079: Missing range checks in decora

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 11:22:52 GMT, Nir Lisker wrote: >> In SW pipeline path of Box/Gaussian Blur/Shadow effects we are not checking >> for range when we read data from the source/destination buffers in native >> code. >> >> We need to add appropriate range checks in native JNI code also apart f

Re: RFR: 8311216: DataURI can lose information in some charset environments [v4]

2023-10-30 Thread Andy Goryachev
On Sat, 28 Oct 2023 20:21:55 GMT, Michael Strauß wrote: >> DataURI uses the following implementation to decode the percent-encoded >> payload of a "data" URI: >> >> >> ... >> String data = uri.substring(dataSeparator + 1); >> Charset charset = Charset.defaultCharset(); >> ... >> URLDecoder.dec

Re: RFR: 8319066: Application window not activated in macOS 14 Sonoma when launched from command line

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 12:46:03 GMT, Jose Pereda wrote: > On macOS 14. when a JavaFX application is launched from the command line it > is not activated, and the terminal application remains active. > > This PR forces the application activation on macOS 14, in case the app didn't > get activated

Re: RFR: 8311216: DataURI can lose information in some charset environments [v4]

2023-10-30 Thread Andy Goryachev
On Sat, 28 Oct 2023 20:21:55 GMT, Michael Strauß wrote: >> DataURI uses the following implementation to decode the percent-encoded >> payload of a "data" URI: >> >> >> ... >> String data = uri.substring(dataSeparator + 1); >> Charset charset = Charset.defaultCharset(); >> ... >> URLDecoder.dec

Re: RFR: JDK-8269921 TextFlow: listeners on bounds can throw NPE while computing text bounds [v5]

2023-10-30 Thread Florian Kirmaier
On Wed, 25 Oct 2023 22:18:11 GMT, Andy Goryachev wrote: >> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 359: >> >>> 357: if (spanBoundsInvalid) { >>> 358: GlyphList[] runs = getRuns(); >>> 359: if (runs != null && runs.length != 0) { >>

Re: RFR: JDK-8269921 TextFlow: listeners on bounds can throw NPE while computing text bounds [v6]

2023-10-30 Thread Florian Kirmaier
> It's "a bit" complicated. > In some situations, getRuns get's called because listeners on bounds are set. > This causes TextFlow to layout to compute the runs. > Afterward, the bounds of the parents get updated. > This triggers a call to compute bounds - which cascades up to the children. > When

Re: RFR: JDK-8269921 TextFlow: listeners on bounds can throw NPE while computing text bounds [v5]

2023-10-30 Thread Florian Kirmaier
On Sat, 28 Oct 2023 03:57:05 GMT, Michael Strauß wrote: >> Florian Kirmaier 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 five additional >> c

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

2023-10-30 Thread Andy Goryachev
On Sun, 29 Oct 2023 22:20:17 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: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v4]

2023-10-30 Thread Prasanta Sadhukhan
On Mon, 30 Oct 2023 12:53:07 GMT, Kevin Rushforth wrote: >> I have made the suggested changes and updated the PR. >> But it seems the orientation of the text in the test attached in JBS is at >> the middle initially (and not at LTR or RTL) and it only begins to track the >> orientation after 1

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v8]

2023-10-30 Thread Prasanta Sadhukhan
> FX Nodes embedded in a Swing JFXPanel does not track the component > orientation and FX nodes remain unaffected when component orientation changes. > Fix made sure JavaFX scene embedded in a JFXPanel should inherit the value > from the JFXPanel. Prasanta Sadhukhan has updated the pull request

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v4]

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 07:19:54 GMT, Prasanta Sadhukhan wrote: >> Yes, you are right that JFXPanel needs to call into the stage and not the >> other way around. The general approach now looks correct, however, you'll >> need to add the orientation attribute on the JavaFX Window >> (`EmbeddedWind

RFR: 8319066: Application window not activated in macOS 14 Sonoma when launched from command line

2023-10-30 Thread Jose Pereda
On macOS 14. when a JavaFX application is launched from the command line it is not activated, and the terminal application remains active. This PR forces the application activation on macOS 14, in case the app didn't get activated yet (when launched from a shortcut icon, for instance).

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v7]

2023-10-30 Thread Kevin Rushforth
On Mon, 30 Oct 2023 07:11:54 GMT, Prasanta Sadhukhan wrote: >> FX Nodes embedded in a Swing JFXPanel does not track the component >> orientation and FX nodes remain unaffected when component orientation >> changes. >> Fix made sure JavaFX scene embedded in a JFXPanel should inherit the value

Re: RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text

2023-10-30 Thread Nir Lisker
On Sun, 10 Sep 2023 20:50:18 GMT, John Hendrikx wrote: > There are a number of tickets open related to text rendering: > > https://bugs.openjdk.org/browse/JDK-8314215 > > https://bugs.openjdk.org/browse/JDK-8145496 > > https://bugs.openjdk.org/browse/JDK-8129014 > > They have in common that w

Re: RFR: JDK-8284445: macOS 12 prints a warning when a function key shortcut is assigned to a menu

2023-10-30 Thread vlaaad
On Sun, 22 Oct 2023 21:25:45 GMT, Martin Fox wrote: >> This PR addresses [JDK-8284445](https://bugs.openjdk.org/browse/JDK-8284445). >> >> Context: the warning might be more important than it seems. Our JavaFX-based >> desktop app has [an issue](https://github.com/defold/defold/issues/7845) —

Re: RFR: JDK-8284445: macOS 12 prints a warning when a function key shortcut is assigned to a menu [v2]

2023-10-30 Thread vlaaad
> This PR addresses [JDK-8284445](https://bugs.openjdk.org/browse/JDK-8284445). > > Context: the warning might be more important than it seems. Our JavaFX-based > desktop app has [an issue](https://github.com/defold/defold/issues/7845) — > when the user opens 2 instances of the app, one of the i

Re: RFR: 8319079: Missing range checks in decora

2023-10-30 Thread Nir Lisker
On Mon, 30 Oct 2023 06:55:11 GMT, Jayathirth D V wrote: > In SW pipeline path of Box/Gaussian Blur/Shadow effects we are not checking > for range when we read data from the source/destination buffers in native > code. > > We need to add appropriate range checks in native JNI code also apart fr

Re: RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text

2023-10-30 Thread John Hendrikx
On Mon, 30 Oct 2023 05:34:54 GMT, Michael Strauß wrote: > I've tested `AAA BBB CCC` in Chrome, and the text is rendered pretty much > exactly as your "before" version: For the current rendering that JavaFX does, there is no browser equivalent, although `pre-wrap` comes close, JavaFX will take

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v4]

2023-10-30 Thread Prasanta Sadhukhan
On Sat, 28 Oct 2023 18:25:53 GMT, Kevin Rushforth wrote: >> I have tried to put in place what you suggested. Can you please take a look >> at the PR and see if it's in the right direction and suggest further. >> I have few doubts >> >> - It seems JFXPanel call EmbeddedStage interface methods an

Re: RFR: 8317836: FX nodes embedded in JFXPanel need to track component orientation [v7]

2023-10-30 Thread Prasanta Sadhukhan
> FX Nodes embedded in a Swing JFXPanel does not track the component > orientation and FX nodes remain unaffected when component orientation changes. > Fix made sure JavaFX scene embedded in a JFXPanel should inherit the value > from the JFXPanel. Prasanta Sadhukhan has updated the pull request