Re: RFR: 8311895: CSS Transitions [v17]

2024-06-05 Thread Michael Strauß
On Tue, 4 Jun 2024 21:14:54 GMT, Kevin Rushforth wrote: >> I think it's fine. Another option is to link to the part of the reference >> where they are. > > I would prefer to keep them in one place (scene) and link to the ones there > (`../scene/doc-files/`). I've linked to the files in

Re: RFR: 8311895: CSS Transitions [v23]

2024-06-05 Thread Michael Strauß
t; `transition` property. However, due to limitations of JavaFX CSS, mixing both > notations doesn't work: > > .button { > transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhanceme

Re: RFR: 8311895: CSS Transitions [v22]

2024-06-05 Thread Michael Strauß
On Wed, 5 Jun 2024 17:43:46 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 62 commits: >> >> - Merge branch 'refs/heads/master' into feature/css-transi

Re: RFR: 8332895: Support interpolation for backgrounds and borders [v2]

2024-06-04 Thread Michael Strauß
ticular identity of the object > returned from the `interpolate()` method. This allows the implementation to > re-use objects and reduce the number of object allocations. Michael Strauß has updated the pull request incrementally with two additional commits since the last revision: - clean up i

Re: RFR: 8332895: Support interpolation for backgrounds and borders

2024-06-03 Thread Michael Strauß
On Mon, 3 Jun 2024 09:48:40 GMT, Florian Kirmaier wrote: > Can you elaborate on this? Are changes in the Region.background still trigger > change events? If not, is there a mechanism to get them? Like > Transform.onTransformChanged? Are the previous immutable objects like > Background and

RFR: 8332895: Support interpolation for backgrounds and borders

2024-06-02 Thread Michael Strauß
This PR completes the CSS Transitions story (see #870) by adding interpolation support for backgrounds and borders, making them targetable by transitions. More specifically, the following types will now implement `Interpolatable`. - `Insets` - `Background` - `BackgroundFill` - `BackgroundImage`

Re: RFR: 8330304: MenuBar: Invisible Menu works incorrectly with keyboard arrows [v2]

2024-05-31 Thread Michael Strauß
On Fri, 31 May 2024 15:17:19 GMT, Andy Goryachev wrote: >> The root cause is that the skin used two fields to store one entity >> (`focusedMenu` and `focusedMenuIndex`), causing mismatch when invisible >> menu(s) are present. >> >> The fix involves using a single index variable. >> >> Also

Re: RFR: 8311895: CSS Transitions [v22]

2024-05-31 Thread Michael Strauß
ations of JavaFX CSS, mixing both > notations doesn't work: > > .button { > transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request wit

Re: RFR: 8330304: MenuBar: Invisible Menu works incorrectly with keyboard arrows

2024-05-31 Thread Michael Strauß
On Thu, 30 May 2024 15:36:37 GMT, Andy Goryachev wrote: > The root cause is that the skin used two fields to store one entity > (`focusedMenu` and `focusedMenuIndex`), causing mismatch when invisible > menu(s) are present. > > The fix involves using a single index variable. > > Also wanted

Re: RFR: 8289115: Touch events is not dispatched after upgrade to JAVAFX17+

2024-05-29 Thread Michael Strauß
On Tue, 28 May 2024 08:09:41 GMT, Florian Kirmaier wrote: > I can confirm that this change fixes a Problem for more users. Actually, i > have a built with exactly the same change. So if this doesn't break anything, > it would be great to see this integrated. Feel free to approve if you think

Integrated: 8087444: CornerRadii with different horizontal and vertical values treated as uniform

2024-05-29 Thread Michael Strauß
On Tue, 28 May 2024 16:15:25 GMT, Michael Strauß wrote: > This PR fixes the incorrect computation of the `CornerRadii.uniform` flag for > the 16-argument constructor. > > I've also added tests for all other constructors. This pull request has now been integrated. Changeset: 2e1

Re: RFR: 8311895: CSS Transitions [v21]

2024-05-28 Thread Michael Strauß
ations of JavaFX CSS, mixing both > notations doesn't work: > > .button { > transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request incr

Re: RFR: 8322964: Optimize performance of CSS selector matching [v13]

2024-05-28 Thread Michael Strauß
On Tue, 28 May 2024 21:44:36 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: 8087444: CornerRadii with different horizontal and vertical values treated as uniform

2024-05-28 Thread Michael Strauß
On Tue, 28 May 2024 21:15:47 GMT, John Hendrikx wrote: >> This PR fixes the incorrect computation of the `CornerRadii.uniform` flag >> for the 16-argument constructor. >> >> I've also added tests for all other constructors. > >

Re: RFR: 8087444: CornerRadii with different horizontal and vertical values treated as uniform

2024-05-28 Thread Michael Strauß
On Tue, 28 May 2024 17:55:24 GMT, Andy Goryachev wrote: >> This PR fixes the incorrect computation of the `CornerRadii.uniform` flag >> for the 16-argument constructor. >> >> I've also added tests for all other constructors. > >

Re: RFR: 8332863: Crash in JPEG decoder if we enable MEM_STATS

2024-05-28 Thread Michael Strauß
On Fri, 24 May 2024 06:48:50 GMT, Jayathirth D V wrote: > In IJG library's jmemmgr.c file we can define MEM_STATS(by default this flag > is not defined and we don't see any issue) to enable printing of memory > statistics log. But if we enable it, we get crash while disposing IJG stored >

RFR: 8087444: CornerRadii with different horizontal and vertical values treated as uniform

2024-05-28 Thread Michael Strauß
This PR fixes the incorrect computation of the `CornerRadii.uniform` flag for the 16-argument constructor. I've also added tests for all other constructors. - Commit messages: - fixed computation of uniform flag - failing test Changes: https://git.openjdk.org/jfx/pull/1465/files

Re: RFR: 8322964: Optimize performance of CSS selector matching [v12]

2024-05-28 Thread Michael Strauß
On Tue, 28 May 2024 04:48:32 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: 8322964: Optimize performance of CSS selector matching [v12]

2024-05-28 Thread Michael Strauß
On Tue, 28 May 2024 11:01:21 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/css/FixedCapacitySet.java >> line 419: >> >>> 417: */ >>> 418: >>> 419: assert elements.length > requestedCapacity : "must have >>> more buckets than

Re: RFR: 8322964: Optimize performance of CSS selector matching [v12]

2024-05-28 Thread Michael Strauß
On Tue, 28 May 2024 04:48:32 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: 8311895: CSS Transitions [v20]

2024-05-26 Thread Michael Strauß
ations of JavaFX CSS, mixing both > notations doesn't work: > > .button { > transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request incre

Re: RFR: 8311895: CSS Transitions [v19]

2024-05-26 Thread Michael Strauß
On Sat, 25 May 2024 23:19:03 GMT, Nir Lisker wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added documentation > > modules/javafx.graphics/src/main/docs/javafx/scene/doc

Re: RFR: 8311895: CSS Transitions [v18]

2024-05-25 Thread Michael Strauß
On Sat, 25 May 2024 21:17:06 GMT, Nir Lisker wrote: > This is what I would expect, so looks good. Where is this mentioned to the > user? Good question. Since we don't have any suitable API elements for javadocs, I've added some documentation to the CSS reference. - PR Comment:

Re: RFR: 8311895: CSS Transitions [v19]

2024-05-25 Thread Michael Strauß
ations of JavaFX CSS, mixing both > notations doesn't work: > > .button { > transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull reque

Re: RFR: 8311895: CSS Transitions [v17]

2024-05-25 Thread Michael Strauß
On Sat, 25 May 2024 19:39:12 GMT, Nir Lisker wrote: > I still don't know what happens when a value is programmatically set while a > css transition is in progress. What I understood is that binding the property > will not allow the transition to start/continue, but didn't see where setting >

Re: RFR: 8311895: CSS Transitions [v17]

2024-05-25 Thread Michael Strauß
On Sat, 25 May 2024 19:35:56 GMT, Nir Lisker wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 57 commits: >> >> - Merge branch 'refs/heads/master' into feature/css-transitions &g

Re: RFR: 8311895: CSS Transitions [v17]

2024-05-25 Thread Michael Strauß
On Sat, 25 May 2024 19:28:56 GMT, Nir Lisker wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 57 commits: >> >> - Merge branch 'refs/heads/master' into feature/css-transitions &g

Re: RFR: 8311895: CSS Transitions [v17]

2024-05-25 Thread Michael Strauß
On Sat, 25 May 2024 17:40:01 GMT, Nir Lisker wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 57 commits: >> >> - Merge branch 'refs/heads/master' into feature/css-transitions &g

Re: RFR: 8311895: CSS Transitions [v17]

2024-05-25 Thread Michael Strauß
On Sat, 25 May 2024 10:40:05 GMT, Nir Lisker wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 57 commits: >> >> - Merge branch 'refs/heads/master' into feature/css-transitions &g

Re: RFR: 8311895: CSS Transitions [v18]

2024-05-25 Thread Michael Strauß
ations of JavaFX CSS, mixing both > notations doesn't work: > > .button { > transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request

Re: RFR: 8311895: CSS Transitions [v16]

2024-05-24 Thread Michael Strauß
On Fri, 24 May 2024 10:15:37 GMT, drmarmac wrote: > * Attempting to do background-color transitions doesn't work, I presume > because it's not yet `Interpolatable` in this PR. Do we need to emit a > warning in such a case? Right now the `transition` CSS code just seems to be > ignored. CSS

Re: RFR: 8311895: CSS Transitions [v16]

2024-05-24 Thread Michael Strauß
On Fri, 24 May 2024 10:02:44 GMT, drmarmac wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 53 commits: >> >> - Merge branch 'master' into feature/css-transitions >> -

Re: RFR: 8311895: CSS Transitions [v17]

2024-05-24 Thread Michael Strauß
ations of JavaFX CSS, mixing both > notations doesn't work: > > .button { > transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request wit

Re: RFR: 8319555: [TestBug] Utility for creating instruction window for manual tests [v9]

2024-05-23 Thread Michael Strauß
On Thu, 23 May 2024 16:11:42 GMT, Andy Goryachev wrote: > > Short of using a build system, how would I run a manual test with this new > > class? > > I am running from within Eclipse. Here is the command line (remove newlines) > it launches the EmojiTest. I think the key is to add the

Re: prism.maxvram limitation

2024-05-23 Thread Michael Strauß
I wonder why there's a software-defined limit in the first place, given that there doesn't seem to be a way for JavaFX to gracefully handle failed texture loads. You say that the limit is reasonable for GPUs, but why is this any different from system memory? GPUs come in all different kinds of

Re: RFR: 8319555: [TestBug] Utility for creating instruction window for manual tests [v9]

2024-05-23 Thread Michael Strauß
On Fri, 17 May 2024 19:22:39 GMT, Andy Goryachev wrote: >> ## ManualTestWindow >> >> This facility provides the base class for manual tests which displays the >> test instructions, >> the UI under test, and the Pass/Fail buttons. >> >> Example: >> >> >> public class ManualTestExample

Re: RFR: 8289115: Touch events is not dispatched after upgrade to JAVAFX17+

2024-05-22 Thread Michael Strauß
On Tue, 21 May 2024 14:25:51 GMT, Michael Strauß wrote: > This PR fixes a bug > ([JDK-8289115](https://bugs.openjdk.org/browse/JDK-8289115)) that was > introduced with #394, which changed the following line in the > `NotifyTouchInput` function (ViewContainer.cpp): > > - c

RFR: 8289115: Touch events is not dispatched after upgrade to JAVAFX17+

2024-05-21 Thread Michael Strauß
This PR fixes a bug ([JDK-8289115](https://bugs.openjdk.org/browse/JDK-8289115)) that was introduced with #394, which changed the following line in the `NotifyTouchInput` function (ViewContainer.cpp): - const bool isDirect = true; + const bool isDirect = IsTouchEvent(); `IsTouchEvent` is a

Re: RFR: 8322964: Optimize performance of CSS selector matching [v9]

2024-05-12 Thread Michael Strauß
On Mon, 11 Mar 2024 16:54:25 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: 8092102: Labeled: textTruncated property [v15]

2024-05-07 Thread Michael Strauß
On Mon, 6 May 2024 15:23:20 GMT, Andy Goryachev wrote: >> Adds **Labeled.textTruncated** property which indicates when the text is >> visually truncated (and the ellipsis string is inserted) in order to fit the >> available width. >> >> The new property is being set by the code which computes

Re: Proposal: Public InputMap (v2)

2024-05-07 Thread Michael Strauß
Hi Andy! The updated proposal seems to be a slight refinement of the original proposal, and I think most of the points raised in the previous discussion still stand. As it is, I still think that this is an exceptionally large API surface for what the feature can actually bring to the table. It's

Re: RFR: 8331616: ChangeListener is not triggered when the InvalidationListener is removed

2024-05-07 Thread Michael Strauß
On Fri, 3 May 2024 14:45:24 GMT, John Hendrikx wrote: > This PR provides a fix for the linked issue. > > The issue was that when an invalidation listener is removed, and the > `ExpressionHelper` type changes from `Generic` to `SingleChange` that it > would copy the current value of the

Re: RFR: 8311895: CSS Transitions [v16]

2024-05-02 Thread Michael Strauß
transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 53 commits: - Mer

Re: RFR: 8320563: Remove D3D9 code paths in favor of D3D9Ex [v3]

2024-04-26 Thread Michael Strauß
On Fri, 26 Apr 2024 07:53:59 GMT, Lukasz Kostyra wrote: >> JFX minimum requirements guarantee 9Ex availability, so old non-Ex paths are >> no longer needed. >> >> In multiple parts (ex. Mesh, Graphics, etc.) where the Device is acquired I >> changed the type to explicitly use

Re: RFR: 8311895: CSS Transitions [v15]

2024-03-31 Thread Michael Strauß
transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request incrementally with two additional commits since the last revision: - update 'since' tags - Fix javado

Re: RFR: 8311895: CSS Transitions [v14]

2024-03-31 Thread Michael Strauß
transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request incrementally with one additional commit since the last revision: Change javadoc comment --

Re: RFR: 8311895: CSS Transitions [v13]

2024-03-31 Thread Michael Strauß
transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 49 commits: - Merge br

Re: RFR: 8311895: CSS Transitions [v9]

2024-03-31 Thread Michael Strauß
On Tue, 14 Nov 2023 13:04:35 GMT, John Hendrikx wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Test whether two Interpolatable instances are compatible > > modules/javafx.gra

Re: RFR: 8311895: CSS Transitions [v12]

2024-03-31 Thread Michael Strauß
transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request incrementally with one additional commit since the last revision: Discard redundant transitions i

Integrated: 8325900: Emit a warning on macOS if AWT has set the NSAppearance

2024-03-29 Thread Michael Strauß
On Wed, 14 Feb 2024 21:09:39 GMT, Michael Strauß wrote: > Platform preferences detection doesn't pick up effective macOS system > preferences if AWT owns the NSApplication and has set its NSAppearance to a > fixed value. > > The workaround is to set the

Re: RFR: 8267565: Support "@3x" and greater high-density image naming convention [v2]

2024-03-27 Thread Michael Strauß
On Tue, 26 Mar 2024 21:27:49 GMT, drmarmac wrote: >> This PR extends the range of hi-res images that are loaded via naming >> convention, now including scale factors higher than `@2x`. >> Supporting these is already being >>

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

2024-03-25 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: 8311895: CSS Transitions [v2]

2024-03-18 Thread Michael Strauß
On Mon, 31 Jul 2023 13:44:28 GMT, John Hendrikx wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Make TransitionEvent final > > Some early feedback, it's a lot of code :) I've i

Re: RFR: 8311895: CSS Transitions [v11]

2024-03-18 Thread Michael Strauß
transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request incrementally with one additional commit since the last revision: Changes per review --

Re: RFR: 8311895: CSS Transitions [v9]

2024-03-18 Thread Michael Strauß
On Tue, 14 Nov 2023 09:41:08 GMT, John Hendrikx wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Test whether two Interpolatable instances are compatible > > modules/javafx.graphic

Re: RFR: 8311895: CSS Transitions [v10]

2024-03-18 Thread Michael Strauß
transition: -fx-background-color 1s; > transition-easing-function: linear; > } > > This issue should be addressed in a follow-up enhancement. Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 46 commits

Re: Validation Support

2024-03-04 Thread Michael Strauß
I would not be in favor of adding any particular data validation framework to JavaFX. Data validation comes in all kinds of different shapes and sizes, which makes it a good fit for (opinionated) third-party libraries. However, I fully agree with John that JavaFX should provide more APIs that can

Re: RFR: 8325900: Emit a warning on macOS if AWT has set the NSAppearance [v3]

2024-02-23 Thread Michael Strauß
On Mon, 19 Feb 2024 17:13:58 GMT, Anirvan Sarkar wrote: > What about SWT ? It looks like SWT also supports dark mode since version 4.12 > [1][2]. > > [1] : https://eclipse.dev/eclipse/news/4.12/platform_isv.php#dark-theme-mac > [2] : https://bugs.eclipse.org/bugs/show_bug.cgi?id=540357 I

Re: RFR: 8325900: Emit a warning on macOS if AWT has set the NSAppearance [v3]

2024-02-23 Thread Michael Strauß
On Fri, 23 Feb 2024 20:14:43 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comments > > modules/javafx.graphics/src/main/java/com/sun/gl

Re: RFR: 8325900: Emit a warning on macOS if AWT has set the NSAppearance [v4]

2024-02-23 Thread Michael Strauß
plication.appearance=system is set. This warning can be > disabled by > setting javafx.preferences.suppressAppleAwtWarning=true. Michael Strauß has updated the pull request incrementally with one additional commit since the last revision: Break warning message into separate lines - Cha

Re: RFR: 8089373: Translation from character to key code is not sufficient [v2]

2024-02-19 Thread Michael Strauß
On Fri, 9 Feb 2024 03:37:17 GMT, Martin Fox wrote: >> On Windows a common shortcut like Ctrl+'+' could only be invoked from the >> main keyboard and not the numeric keypad. Toolkit.getKeyCodeForChar did not >> have enough context to know whether it should return a result from the main >>

Re: RFR: 8325900: Emit a warning on macOS if AWT has set the NSAppearance [v3]

2024-02-17 Thread Michael Strauß
plication.appearance=system is set. This warning can be > disabled by > setting javafx.preferences.suppressAppleAwtWarning=true. Michael Strauß has updated the pull request incrementally with one additional commit since the last revision: address review comments - Changes: - all:

Re: RFR: 8325900: Emit a warning on macOS if AWT has set the NSAppearance [v2]

2024-02-14 Thread Michael Strauß
plication.appearance=system is set. This warning can be > disabled by > setting javafx.preferences.suppressAppleAwtWarning=true. Michael Strauß has updated the pull request incrementally with one additional commit since the last revision: Don't call into the native toolkit from Platfor

RFR: 8325900: Emit a warning on macOS if AWT has set the NSAppearance

2024-02-14 Thread Michael Strauß
Platform preferences detection doesn't pick up effective macOS system preferences if AWT owns the NSApplication and has set its NSAppearance to a fixed value. The workaround is to set the system property "apple.awt.application.appearance=system". If this property is not set, the following

Re: RFR: JDK-8325798: Spinner throws uncatchable exception on tab out from garbled text

2024-02-13 Thread Michael Strauß
On Tue, 13 Feb 2024 20:42:08 GMT, Marius Hanl wrote: > When a `Spinner` is configured with e.g. Integers > (`IntegerSpinnerValueFactory`) and the user types in a `String`, e.g. 'abc' > and focuses another `Node`, an exception is thrown (`NumberFormatException`). > This exception is literally

Re: [External] : Re: Platform preferences theme detection

2024-02-13 Thread Michael Strauß
The reason why the values are wrong might be that in PlatformSupport.m L105, we query [NSApp effectiveApperance], but this always seems to return the light appearance if JavaFX doesn't own the NSApplication. On Mon, Feb 12, 2024 at 6:26 PM Kevin Rushforth wrote: > > Actually, it's worse than not

Re: Platform preferences theme detection

2024-02-10 Thread Michael Strauß
Since I can't reproduce the error on macOS, it's hard to say what could be causing it. If you have the chance, maybe you could run the PlatformPreferencesChangedTest application: https://github.com/openjdk/jfx/blob/master/tests/manual/events/PlatformPreferencesChangedTest.java That might rule

Re: Platform preferences theme detection

2024-02-10 Thread Michael Strauß
Hi Christopher, the relevant preferences for color scheme detection are textColor=0x00ff and textBackgroundColor=0x on your system. That's pretty strange, I'm getting the following values on macOS Sonoma 14.3.1 M1: in light mode: textColor=0x00ff,

Preview features proposal

2024-02-07 Thread Michael Strauß
I've created a proposal that defines preview features [0]. The definition very closely matches the language used in JEP-12, but is adapted for JavaFX in some places. Additionally, I've created the internal helper class `PreviewFeature` that can be used to verify that applications have opted into

Re: Preview features for JavaFX

2024-02-06 Thread Michael Strauß
Hi Kevin, my suggestion would be to annotate and document the preview API (at least annotations do show up by default in most IDEs), and emit a one-time runtime warning when the API is used (this works for methods and constructors). This would make it quite visible to developers that they are

Preview features for JavaFX

2024-02-05 Thread Michael Strauß
The discussion around the new Platform Preferences API has brought up a potential area where the API may lack a way to detect whether a particular preference is supported on a particular operating system [0]. Discussions like these will invariably come up when new API is released, and some of the

Re: Platform preferences theme detection

2024-02-05 Thread Michael Strauß
Hi Christopher! 1) Accent color detection is not yet implemented for Linux/GTK. I think this is a fairly recent addition for Ubuntu, probably in version 22. 2) I don't see this behavior on my Ubuntu 20.04 system (need to upgrade to 23 and test again). If you have acess to JBS, feel free to open

[jfx22] Integrated: 8324879: Platform-specific preferences keys are incorrect for Windows toolkit

2024-01-30 Thread Michael Strauß
On Tue, 30 Jan 2024 19:21:50 GMT, Michael Strauß wrote: > This pull request contains a backport of commit > [af7e0571](https://github.com/openjdk/jfx/commit/af7e05716711d942df20eb1f807b384810a4a839) > from the [openjdk/jfx](https://git.openjdk.org/jfx) repository. > > T

[jfx22] RFR: 8324879: Platform-specific preferences keys are incorrect for Windows toolkit

2024-01-30 Thread Michael Strauß
This pull request contains a backport of commit [af7e0571](https://github.com/openjdk/jfx/commit/af7e05716711d942df20eb1f807b384810a4a839) from the [openjdk/jfx](https://git.openjdk.org/jfx) repository. The commit being backported was authored by Michael Strauß on 30 Jan 2024 and was reviewed

Integrated: 8324879: Platform-specific preferences keys are incorrect for Windows toolkit

2024-01-30 Thread Michael Strauß
On Tue, 30 Jan 2024 00:53:51 GMT, Michael Strauß wrote: > `WinApplication` contains mappings of platform-specific preference keys to > platform-independent keys. > These keys are incorrect (for example, `Windows.UIColor.ForegroundColor` > instead of `Windows.UIColo

Re: Binding properties to constant values

2024-01-30 Thread Michael Strauß
Hi John, the rule that values set from code are less specific than values set in author and inline styles is probably lifted from the CSS specification, which says [0]: "The UA may choose to honor presentational attributes in an HTML source document. If so, these attributes are translated to the

Binding properties to constant values

2024-01-30 Thread Michael Strauß
Hi everyone, I'm interested in hearing your thoughts on the following proposal, which could increase the expressiveness of the JavaFX Property API: Problem --- The JavaFX CSS system applies the following order of precedence to determine the value of a styleable property (in ascending

Re: RFR: 8260013: Snapshot does not work for nodes in a subscene [v4]

2024-01-29 Thread Michael Strauß
On Mon, 29 Jan 2024 09:32:06 GMT, Lukasz Kostyra wrote: >> Originally this issue showed the problem of Node being incorrectly rendered >> (clipped) when snapshotting, compared to a snapshot of the whole Scene. >> Later on there was another problem added - lights not being taken into >>

Withdrawn: 8324219: Remove incorrect documentation from Animation methods

2024-01-29 Thread Michael Strauß
On Fri, 19 Jan 2024 16:07:31 GMT, Michael Strauß wrote: > The `Animation` class states in the documentation of various methods that the > method call would be asynchronous, using language similar to: > > > {@code stop()} is an asynchronous call, the {@code Animatio

Re: RFR: JDK-8323615: PopupControl.skin.setSkin(Skin) fails to call dispose() on discarded Skin

2024-01-29 Thread Michael Strauß
On Thu, 11 Jan 2024 20:13:09 GMT, Marius Hanl wrote: > For some reason the `skinProperty` did not allow to set a new skin when it is > the same class as the previous one. > This leads to multiple issues: > 1. When creating a new skin (same class as previous), the skin will likely > install

RFR: 8324879: Platform-specific preferences keys are incorrect for Windows toolkit

2024-01-29 Thread Michael Strauß
`WinApplication` contains mappings of platform-specific preference keys to platform-independent keys. These keys are incorrect (for example, `Windows.UIColor.ForegroundColor` instead of `Windows.UIColor.Foreground`). This was not discovered during testing because the manual test application

Re: Platform preferences theme detection

2024-01-29 Thread Michael Strauß
I see that the names of the platform mappings defined in WinApplication::getPlatformKeyMappings() are simply wrong ("Windows.UIColor.ForegroundColor" instead of "Windows.UIColor.Foreground"), so the platform mappings are not applied to the properties. That's quite surprising, and it's a change

Re: Platform preferences theme detection

2024-01-29 Thread Michael Strauß
Hi Christopher! > - Should this feature work in that ea version? Yes. > - Is Windows 10 supported by the color scheme detection? Color scheme detection should be supported on Windows 10 beginning with build 10240. > - The documentation says that LIGHT is returned in case theme the >

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

2024-01-25 Thread Michael Strauß
Hi Kevin, have you considered my proposal, which is basically the same approach: it uses runLater internally to dispatch the interaction with AbstractPrimaryTimer (instead of trying to make AbstractPrimaryTimer work under concurrent access). But from the point of view of the caller, the API

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

2024-01-25 Thread Michael Strauß
be called on > the FX thread > > What does that mean exactly? > > Also, I think the "asynchronous" wording may apply to property changes > and action handlers that run at time index 0. These surely won't be ran > synchronous when calling "play", and I'm p

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

2024-01-24 Thread Michael Strauß
istinction to proposals that call for posting the play/stop calls directly to the FX thread. [0] https://bugs.openjdk.org/browse/JDK-8324658 On Wed, Jan 24, 2024 at 10:30 PM Michael Strauß wrote: > > Here's another option, which I have implemented as a proof of concept [0]: > > The

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

2024-01-24 Thread Michael Strauß
Here's another option, which I have implemented as a proof of concept [0]: The play/stop/etc. methods are currently specified to be "asynchronous". This language should be removed, such that the methods will be implied to execute synchronously from the point of view of the caller (like every

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

2024-01-24 Thread Michael Strauß
I am not in favor of option 2 if the implementation was simply "wrap the implementation in runLater", as this would be a surprising change. Consider the following code: var transition = new FadeTransition(); transition.play(); // Will always print "RUNNING" currently, but might print

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

2024-01-23 Thread Michael Strauß
Hi Jurgen, even assuming that it was as easy as you say it is, there are more problems with this proposal. 1. If non-FX thread access to some methods is allowed, this will become a permanent addition to the API and a complication we have to deal with. There are proposals to refactor the

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

2024-01-22 Thread Michael Strauß
Hi Jurgen, starting an animation on a background thread would only be safe if the object graph affected by the animation is not accessed on the background thread after calling the play() method. Any access may potentially corrupt internal state. >From what I can see in your example, you're not

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

2024-01-19 Thread Michael Strauß
Hi Jurgen, the start, stop, pause, etc. methods on the Animation class cannot reasonably work in the way you suggest. While it is generally possible to construct a JavaFX object graph on a thread other than the JavaFX application thread, this relies on the fact that JavaFX will not interfere

RFR: 8324219: Remove incorrect documentation from Animation methods

2024-01-19 Thread Michael Strauß
The `Animation` class states in the documentation of various methods that the method call would be asynchronous, using language similar to: {@code stop()} is an asynchronous call, the {@code Animation} may not stop immediately. This is factually wrong, there are no asynchronous calls. In

Re: RFR: 8324219: Remove incorrect documentation from Animation methods

2024-01-19 Thread Michael Strauß
On Fri, 19 Jan 2024 16:07:31 GMT, Michael Strauß wrote: > The `Animation` class states in the documentation of various methods that the > method call would be asynchronous, using language similar to: > > > {@code stop()} is an asynchronous call, the {@code Animatio

Re: RFR: 8322215: [win] OS events that close the stage can cause Glass to reference freed memory [v2]

2024-01-17 Thread Michael Strauß
On Wed, 17 Jan 2024 16:43:23 GMT, Martin Fox wrote: >> When a Stage is closed while processing an OS message the glass peer object >> is deleted immediately even if it's still executing member functions. As >> glass unwinds the stack and executes cleanup code it's referencing freed >> memory.

Re: RFR: 8260013: Snapshot does not work for nodes in a subscene

2024-01-15 Thread Michael Strauß
On Fri, 12 Jan 2024 14:11:14 GMT, Lukasz Kostyra wrote: > Originally this issue showed the problem of Node being incorrectly rendered > (clipped) when snapshotting, compared to a snapshot of the whole Scene. Later > on there was another problem added - lights not being taken into account if >

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v3]

2024-01-15 Thread Michael Strauß
On Sun, 14 Jan 2024 15:14:36 GMT, John Hendrikx wrote: >> If this method is not used anywhere, why do we need to expose >> `getStyleClassNames()` as new API to replace this one? I'm a bit puzzled by >> that, especially since you're saying that the API shouldn't be used. Why >> create

Re: RFR: 8322215: [win] OS events that close the stage can cause Glass to reference freed memory

2024-01-13 Thread Michael Strauß
On Wed, 20 Dec 2023 17:31:57 GMT, Martin Fox wrote: > When a Stage is closed while processing an OS message the glass peer object > is deleted immediately even if it's still executing member functions. As > glass unwinds the stack and executes cleanup code it's referencing freed > memory. >

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-13 Thread Michael Strauß
On Fri, 5 Jan 2024 01:32:04 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/javafx/css/SimpleSelector.java line 81: >> >>> 79: * @deprecated for future removal, use {@link >>> #getStyleClassNames()} instead >>> 80: */ >>> 81: public List getStyleClasses() { >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread Michael Strauß
On Thu, 4 Jan 2024 12:21:15 GMT, John Hendrikx wrote: > Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It

Re: RFR: JDK-8322795 CSS performance regression up to 10x

2024-01-03 Thread Michael Strauß
On Wed, 3 Jan 2024 01:14:13 GMT, John Hendrikx wrote: > The regression is caused by the `Collections.unmodifiableSet` wrapper not > being recognized by `BitSet`, and a fall back is done to a less optimized > version of `containsAll`. > > As this is a regression fix, I've kept the fix as small

  1   2   3   4   5   6   7   >