Re: RFR: 8218826: TableRowSkinBase: horizontal layout broken if row has padding [v2]

2022-06-28 Thread Marius Hanl
ng list (Could be a follow up). To > support padding also when a `fixedCellSize` is set, the `compute...` methods > needs to also add the padding when a `fixedCellSize` is set (in the `if` > clauses) and the `VirtualFlow` needs to add the padding to every row instead > of using the `

Re: RFR: 8218826: TableRowSkinBase: horizontal layout broken if row has padding [v2]

2022-06-28 Thread Marius Hanl
On Tue, 21 Jun 2022 23:32:02 GMT, Michael Strauß wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8218826: changed test file to use junit5 api > > modules/javafx.controls/src/test/java/

Re: RFR: 8283346: Optimize observable ArrayList creation in FXCollections [v3]

2022-06-28 Thread Marius Hanl
On Wed, 22 Jun 2022 18:07:45 GMT, Michael Strauß wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8283346: Improved test name > > modules/javafx.base/src/main/java/javafx/collections/

Re: RFR: 8283346: Optimize observable ArrayList creation in FXCollections [v4]

2022-06-28 Thread Marius Hanl
oid tearDown() { > strings = null; > } > > @Benchmark > public ObservableList init() { > return FXCollections.observableArrayList(strings); > } > } > > > Marius Hanl has updated the pull request incrementally with one additional commit since th

Re: RFR: 8283346: Optimize observable ArrayList creation in FXCollections [v4]

2022-06-28 Thread Marius Hanl
On Tue, 28 Jun 2022 16:23:57 GMT, Nir Lisker wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8283346: add items directly to the backing list to save a change build >> caused by addin

RFR: 8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize

2022-06-28 Thread Marius Hanl
Initialize the `(Tree)TableView` when creating the measure row. This will guarantee, that we can access the `(Tree)TableView` in the `(Tree)TableRowSkin`, which is currently only null during the autosizing (It is always set otherwise). With this change, a NPE is happening as the `(Tree)TableRow`

Re: RFR: 8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize [v2]

2022-06-28 Thread Marius Hanl
the `(Tree)TableRow` must be removed after the autosizing and the > index must be set to `-1` (as for the cell) so that e.g. `cancelEdit` is not > triggered twice. Some tests catched that (see `test_rt_31015`). Marius Hanl has updated the pull request incrementally with one additional

Re: RFR: 8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize [v3]

2022-06-28 Thread Marius Hanl
the `(Tree)TableRow` must be removed after the autosizing and the > index must be set to `-1` (as for the cell) so that e.g. `cancelEdit` is not > triggered twice. Some tests catched that (see `test_rt_31015`). Marius Hanl has updated the pull request incrementally with two additional co

RFR: 8276056: Control.skin.setSkin(Skin) fails to call dispose() on discarded Skin

2022-06-29 Thread Marius Hanl
For some reason the `skinProperty` did not allow to set a new skin which 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 some children and listener but is then rejected when setting it due to

Typing space in ComboBox causes expanded list to close

2022-06-30 Thread Marius Hanl
I want to have a look on the following issue:   https://bugs.openjdk.org/browse/JDK-8209991 https://bugs.openjdk.org/browse/JDK-8087549   Currently, the ComboBox hides the popup when typing in space, even when it is editable. This is unexpected and problematic when implementing something like

Re: RFR: 8276056: Control.skin.setSkin(Skin) fails to call dispose() on discarded Skin

2022-06-30 Thread Marius Hanl
On Thu, 30 Jun 2022 16:16:32 GMT, Michael Strauß wrote: >> For some reason the `skinProperty` did not allow to set a new skin which 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 >> instal

Re: RFR: 8283346: Optimize observable ArrayList creation in FXCollections [v5]

2022-07-01 Thread Marius Hanl
oid tearDown() { > strings = null; > } > > @Benchmark > public ObservableList init() { > return FXCollections.observableArrayList(strings); > } > } > > > Marius Hanl has updated the pull request incrementally with two additional commits since the

Re: RFR: 8283346: Optimize observable ArrayList creation in FXCollections [v4]

2022-07-01 Thread Marius Hanl
On Thu, 30 Jun 2022 19:36:34 GMT, Nir Lisker wrote: > Looks good. I left a few small comments. > > I ran some benchmarks and I can reproduce the performance improvement both in > the array (varargs) and the collection variants of the method. Thanks for the review and verifying the improvement.

Re: RFR: 8283346: Optimize observable ArrayList creation in FXCollections [v6]

2022-07-01 Thread Marius Hanl
oid tearDown() { > strings = null; > } > > @Benchmark > public ObservableList init() { > return FXCollections.observableArrayList(strings); > } > } > > > Marius Hanl has updated the pull request incrementally with one additional commit since the l

Integrated: 8283346: Optimize observable ArrayList creation in FXCollections

2022-07-02 Thread Marius Hanl
On Thu, 17 Mar 2022 21:10:14 GMT, Marius Hanl wrote: > This simple PR optimizes the observable `ArrayList` creation by using the > ArrayList constructor/array size so that the underlying array will be > initialized at the correct size which will speed up the creation as the array &

Integrated: 8251483: TableCell: NPE on modifying item's list

2022-07-05 Thread Marius Hanl
On Wed, 23 Feb 2022 22:27:51 GMT, Marius Hanl wrote: > This PR fixes an issue where the item of the table row is null, although the > cell itself is not empty (non null value). > > The fix is to call `indexChanged(..)` immediately after the index was > changed, but before all

Re: RFR: 8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize [v4]

2022-07-06 Thread Marius Hanl
the `(Tree)TableRow` must be removed after the autosizing and the > index must be set to `-1` (as for the cell) so that e.g. `cancelEdit` is not > triggered twice. Some tests catched that (see `test_rt_31015`). Marius Hanl has updated the pull request with a new target base due to a

RFR: 8289751: Multiple unit test failures after JDK-8251483

2022-07-06 Thread Marius Hanl
As also discussed in the ticket, we need to disable/ignore this two tests for now. With the fix for [JDK-8251483](https://bugs.openjdk.org/browse/JDK-8251483) the table row item is never null in a non empty table cell. In the meantime with [JDK-8251480](https://bugs.openjdk.org/browse/JDK-825148

Integrated: 8289751: Multiple unit test failures after JDK-8251483

2022-07-06 Thread Marius Hanl
On Tue, 5 Jul 2022 23:09:37 GMT, Marius Hanl wrote: > As also discussed in the ticket, we need to disable/ignore this two tests for > now. > > With the fix for [JDK-8251483](https://bugs.openjdk.org/browse/JDK-8251483) > the table row item is never null in a non empty table

Re: RFR: 8289751: Multiple unit test failures after JDK-8251483

2022-07-06 Thread Marius Hanl
On Tue, 5 Jul 2022 23:21:19 GMT, Kevin Rushforth wrote: > Thank you for fixing this quickly. Thank you very much for your time as well! I am glad that I could help. - PR: https://git.openjdk.org/jfx/pull/811

Re: RFR: 8289357: (Tree)TableView is null in (Tree)TableRowSkin during autosize [v5]

2022-07-07 Thread Marius Hanl
the `(Tree)TableRow` must be removed after the autosizing and the > index must be set to `-1` (as for the cell) so that e.g. `cancelEdit` is not > triggered twice. Some tests catched that (see `test_rt_31015`). Marius Hanl has updated the pull request with a new target base due to a

Integrated: 8276056: Control.skin.setSkin(Skin) fails to call dispose() on discarded Skin

2022-07-08 Thread Marius Hanl
On Wed, 29 Jun 2022 13:35:15 GMT, Marius Hanl wrote: > For some reason the `skinProperty` did not allow to set a new skin which 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 &g

Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Marius Hanl
I had a similar idea in the past and like the idea.Ideally, setting/switching a skin is a one step process. Currently you can construct a skin for a control and set it after to a different control.Your approach sounds good, if you can set a skin by creating a new skin (with a default construc

Aw: Re: Proposal: Add Skin.install() method

2022-07-26 Thread Marius Hanl
I don't see how this fixes the underlying problem, since you could still do stuff like:control.installSkin(c -> { MySkin s = new MySkin(myOtherControl);// configure stuff return s; });So I think the super clean way would still be to have a default construc

Aw: Proposal: Bump minimum JDK version for JavaFX 20 to JDK 17

2022-07-26 Thread Marius Hanl
I think this is the right step and at the time of JavaFX 20, 1.5 years passed after the release of JDK 17 (and of course JavaFX 17), which should be enough time to upgrade to it.And even if some people can't upgrade to JDK 17 for whatever reason, running on JavaFX 19 for a bit more shouldn't

Re: RFR: 8290990: Clear .root style class from a root node that is removed from a Scene/SubScene

2022-07-28 Thread Marius Hanl
On Tue, 26 Jul 2022 02:46:15 GMT, Michael Strauß wrote: > When a node is set as the root node of a `Scene` or `SubScene`, the "root" > style class is automatically added to the node, but not cleared when the node > is later removed from the scene. > > This can lead to an incorrectly set "root"

Re: RFR: 8289397: Fix warnings: Possible accidental assignment in place of a comparison. A condition expression should not be reduced to an assignment [v2]

2022-07-29 Thread Marius Hanl
On Tue, 26 Jul 2022 22:59:26 GMT, Andy Goryachev wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/util/Utils.java line >> 875: >> >>> 873: public static boolean assertionEnabled() { >>> 874: boolean assertsEnabled = false; >>> 875: assert (assertsEnabled = true

Re: RFR: 8289605: Robot capture tests fail intermittently on Mac M1

2022-07-29 Thread Marius Hanl
On Fri, 29 Jul 2022 21:11:53 GMT, Andy Goryachev wrote: > - moving mouse pointer to stage lower right corner in order to avoid > interference with the Robot screen capture. tests/system/src/test/java/test/robot/javafx/scene/RobotTest.java line 148: > 146: double y = stage.getY() + stag

Re: RFR: JDK-8269921 Text in Textflow and listeners on bounds can cause endless loop/crash and other performance issues [v3]

2022-08-05 Thread Marius Hanl
On Tue, 26 Jul 2022 11:51:10 GMT, Florian Kirmaier wrote: >> 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

Integrated: 8218826: TableRowSkinBase: horizontal layout broken if row has padding

2022-08-05 Thread Marius Hanl
On Tue, 24 May 2022 21:25:23 GMT, Marius Hanl wrote: > This PR fixes a problem, where the layout is broken when a `(Tree)TableRow` > has padding. > As also mentioned in the ticket, the `layoutChildren` method in > `TableRowSkinBase` is implemented wrong. > > The `layoutC

Re: RFR: 8279640: ListView with null SelectionModel/FocusModel throws NPE

2022-08-05 Thread Marius Hanl
On Thu, 4 Aug 2022 21:29:49 GMT, Kevin Rushforth wrote: > As I mentioned in that JBS issue, I tend to agree that if we were starting > today with a blank sheet of paper, we might have disallowed null and defined > a "noop" selection model and/or focus model. At this point, though, it would > b

Re: RFR: 8299756: Minor updates in CSS Reference [v4]

2023-06-01 Thread Marius Hanl
On Thu, 1 Jun 2023 15:50:37 GMT, Andy Goryachev wrote: >> Minor fixes and addition of missing sections: >> >> - The 'system' font is missing from the list of generic font family names in >> the section. ✓ >> - Explicitly add text color property -fx-fill to Text section, so as not to >> confus

Re: RFR: 8293836: Rendering performance degradation at bottom of TableView with many rows [v2]

2023-06-01 Thread Marius Hanl
On Tue, 30 May 2023 10:39:28 GMT, Johan Vos wrote: >> Only update the VirtualFlow parameters in case the size of a cell has >> changed. >> >> The fixes for JDK-8298728 and JDK-8277785 introduced an unconditional >> recalculation in case the size of a cell is set. This recalculation is only >>

Re: RFR: 8293836: Rendering performance degradation at bottom of TableView with many rows [v2]

2023-06-02 Thread Marius Hanl
On Thu, 1 Jun 2023 20:30:06 GMT, Marius Hanl wrote: >> Johan Vos has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove newline > > modules/javafx.controls/src/main/java/javafx/scene/control/skin

Re: RFR: 8293836: Rendering performance degradation at bottom of TableView with many rows [v2]

2023-06-05 Thread Marius Hanl
On Fri, 2 Jun 2023 13:55:05 GMT, Kevin Rushforth wrote: >> @johanvos I still think this should be evaluated. > > Perhaps you could file a follow-up JBS issue? Filed: https://bugs.openjdk.org/browse/JDK-8309470 - PR Review Comment: https://git.openjdk.org/jfx/pull/1098#discussion_r1

Re: RFR: 8307538: Memory leak in TreeTableView when calling refresh [v7]

2023-06-06 Thread Marius Hanl
On Mon, 15 May 2023 16:12:10 GMT, Andy Goryachev wrote: >> Fixed a memory leak in TreeTableView by reverting to register**Listener >> (which is ok in this particular situation) - the leak is specific to >> TreeTableRowSkin. >> >> Added a unit test. > > Andy Goryachev has updated the pull reque

Re: RFR: 8307538: Memory leak in TreeTableView when calling refresh [v7]

2023-06-06 Thread Marius Hanl
On Mon, 15 May 2023 16:12:10 GMT, Andy Goryachev wrote: >> Fixed a memory leak in TreeTableView by reverting to register**Listener >> (which is ok in this particular situation) - the leak is specific to >> TreeTableRowSkin. >> >> Added a unit test. > > Andy Goryachev has updated the pull reque

Re: RFR: 8307538: Memory leak in TreeTableView when calling refresh [v7]

2023-06-06 Thread Marius Hanl
On Tue, 6 Jun 2023 15:56:45 GMT, Andy Goryachev wrote: >> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TreeTableRowSkin.java >> line 117: >> >>> 115: TreeTableView treeTableView = >>> getSkinnable().getTreeTableView(); >>> 116: if (treeTableView == null) { >>

RFR: 8309470: Potential performance improvements in VirtualFlow

2023-06-07 Thread Marius Hanl
This PR does two small improvements to `VirtualFlow`. Until now, the `VirtualFlow` sometimes called the `computeHeight` or `computeWidth` methods, although a fixed cell size is set and we therefore don't need to call those method (and never should do, as we may don't get the expected result and

Re: RFR: 8309470: Potential performance improvements in VirtualFlow

2023-06-07 Thread Marius Hanl
On Thu, 8 Jun 2023 00:01:02 GMT, Andy Goryachev wrote: >> This PR does two small improvements to `VirtualFlow`. >> Until now, the `VirtualFlow` sometimes called the `computeHeight` or >> `computeWidth` methods, although a fixed cell size is set and we therefore >> don't need to call those metho

Re: RFR: 8309470: Potential performance improvements in VirtualFlow [v2]

2023-06-08 Thread Marius Hanl
;t get the > expected result and mix computed sizes with the fixed cell size). > > Added tests that fail before and pass now. They check that the > `computeHeight` or `computeWidth` (non vertical flow) are never called when a > fixed cell size is set. Marius Hanl has updated th

Re: RFR: 8309470: Potential performance improvements in VirtualFlow [v2]

2023-06-08 Thread Marius Hanl
On Thu, 8 Jun 2023 06:46:28 GMT, Marius Hanl wrote: >> modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/VirtualFlowTest.java >> line 1579: >> >>> 1577: @Test >>> 1578: public void >>> testComputeWidthShouldNotBeCalledWhe

Re: RFR: 8309470: Potential performance improvements in VirtualFlow

2023-06-08 Thread Marius Hanl
On Thu, 8 Jun 2023 00:07:20 GMT, Andy Goryachev wrote: > I don't see any ill effects in the MonkeyTester. There is still a bit of lag > with 10,000,000 row model, same as before. Yeah for me as well. This is a very minor improvement and actually with this PR the following assertion is now true

Re: RFR: 8309470: Potential performance improvements in VirtualFlow [v3]

2023-06-08 Thread Marius Hanl
;t get the > expected result and mix computed sizes with the fixed cell size). > > Added tests that fail before and pass now. They check that the > `computeHeight` or `computeWidth` (non vertical flow) are never called when a > fixed cell size is set. Marius Hanl has updated th

Re: RFR: JDK-8199216: Memory leak and quadratic layout time with nested nodes (hbox) and pseudo-class in style sheet [v6]

2023-06-08 Thread Marius Hanl
On Tue, 25 Apr 2023 07:14:07 GMT, John Hendrikx wrote: >> This fix introduces immutable sets of `PseudoClass` almost everywhere, as >> they are rarely modified. These are re-used by caching them in a new class >> `ImmutablePseudoClassSetsCache`. >> >> In order to make this work, `BitSet` had

Re: RFR: 8309470: Potential performance improvements in VirtualFlow [v4]

2023-06-08 Thread Marius Hanl
;t get the > expected result and mix computed sizes with the fixed cell size). > > Added tests that fail before and pass now. They check that the > `computeHeight` or `computeWidth` (non vertical flow) are never called when a > fixed cell size is set. Marius Hanl has updated th

Re: RFR: 8309470: Potential performance improvements in VirtualFlow [v3]

2023-06-08 Thread Marius Hanl
On Thu, 8 Jun 2023 13:41:56 GMT, Karthik P K wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JDK-8309470: Improved Tests > > modules/javafx.controls/src/main/java/javafx/scene/control

Re: RFR: 8309470: Potential performance improvements in VirtualFlow [v3]

2023-06-08 Thread Marius Hanl
On Thu, 8 Jun 2023 13:41:04 GMT, Karthik P K wrote: > Tested the changes in MacOS 13.3.1, I'm seeing failure ... I added two more test that directly fail if those methods are called. You will get a better stacktrace from them. If this issue still appears, please paste it here. :)

Re: RFR: 8309470: Potential performance improvements in VirtualFlow [v5]

2023-06-08 Thread Marius Hanl
;t get the > expected result and mix computed sizes with the fixed cell size). > > Added tests that fail before and pass now. They check that the > `computeHeight` or `computeWidth` (non vertical flow) are never called when a > fixed cell size is set. Marius Hanl has updated th

Re: RFR: 8309470: Potential performance improvements in VirtualFlow [v5]

2023-06-08 Thread Marius Hanl
On Thu, 8 Jun 2023 17:44:21 GMT, Karthik P K wrote: > All the tests added here passes with the fix and fails without it. No issues > now. Could have been some problem from my end. Alright, thanks for the feedback! - PR Comment: https://git.openjdk.org/jfx/pull/1150#issuecomment-15

Integrated: 8309470: Potential performance improvements in VirtualFlow

2023-06-08 Thread Marius Hanl
On Wed, 7 Jun 2023 20:59:01 GMT, Marius Hanl wrote: > This PR does two small improvements to `VirtualFlow`. > Until now, the `VirtualFlow` sometimes called the `computeHeight` or > `computeWidth` methods, although a fixed cell size is set and we therefore > don't need to call

Re: RFR: 8306648: Update the JavaDocs to show the NEW section and DEPRECATED versions [v2]

2023-06-08 Thread Marius Hanl
On Thu, 8 Jun 2023 21:38:02 GMT, Andy Goryachev wrote: > I am somewhat divided on which version to start with. On one hand, it makes > sense to use last LTS version (or previous, if the current one is also LTS), > so 17. I think we should either start from 9 or 11. Depending on the source, Jav

Re: RFR: 8306021: Add event handler management to EventTarget [v5]

2023-06-12 Thread Marius Hanl
On Mon, 12 Jun 2023 18:17:17 GMT, Michael Strauß wrote: >> This PR adds the following methods to the `EventTarget` interface: >> 1. `addEventHandler` >> 2. `removeEventHandler` >> 3. `addEventFilter` >> 4. `removeEventFilter` > > Michael Strauß has updated the pull request incrementally with two

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-07-05 Thread Marius Hanl
On Wed, 5 Jul 2023 20:52:28 GMT, Michael Strauß wrote: >> John Hendrikx has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 16 commits: >> >> - Merge branch 'master' of https://git.openjdk.org/jfx into >>feature/immutable-pseudoc

Re: RFR: 8285700: [TreeTableView] graphic property of TreeItem is still visible after collapsing tree

2023-07-08 Thread Marius Hanl
On Fri, 7 Jul 2023 05:25:34 GMT, Karthik P K wrote: > In `TreeTableRowSkin`, graphic was not updated along with tree item update. > > Made changes to update graphics of TreeTableView row in `updateTreeItem()` > method. > > Added options in monkey tester to add graphics and subnodes to > `Tree

Re: RFR: 8285700: [TreeTableView] graphic property of TreeItem is still visible after collapsing tree [v3]

2023-07-19 Thread Marius Hanl
On Mon, 17 Jul 2023 07:06:43 GMT, Karthik P K wrote: >> In `TreeTableRowSkin`, graphic was not updated along with tree item update. >> >> Made changes to update graphics of TreeTableView row in `updateTreeItem()` >> method. >> >> Added options in monkey tester to add graphics and subnodes to

Re: RFR: 8285700: [TreeTableView] graphic property of TreeItem is still visible after collapsing tree [v4]

2023-07-20 Thread Marius Hanl
On Thu, 20 Jul 2023 06:54:14 GMT, Karthik P K wrote: >> In `TreeTableRowSkin`, graphic was not updated along with tree item update. >> >> Made changes to update graphics of TreeTableView row in `updateTreeItem()` >> method. >> >> Added options in monkey tester to add graphics and subnodes to

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

2023-07-20 Thread Marius Hanl
On Wed, 19 Jul 2023 06:02:13 GMT, Prasanta Sadhukhan wrote: >> 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. >

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: RFR: 8307536: FileAlreadyExistsException from NativeLibLoader when running concurrent applications with empty cache

2023-08-01 Thread Marius Hanl
On Mon, 31 Jul 2023 16:49:36 GMT, Andy Goryachev wrote: >> This PR adds a file lock to the cache directory, allowing access from >> multiple processes (that is, from more than one JVM) to that directory. >> >> This helps solving the issue where the cache is empty or doesn't exist yet, >> and

RFR: JDK-8313628: Column drag header, overlay and line are not correctly aligned

2023-08-02 Thread Marius Hanl
When a table has padding or the `layoutChildren` method inside the table skin is overridden (and x/y are modified), the drag drag header, column overlay and column line are not correctly aligned. The reason is that the positions were calculated incorrectly. - **Column overlay and column line** A

Re: RFR: JDK-8313628: Column drag header, overlay and line are not correctly aligned

2023-08-02 Thread Marius Hanl
On Wed, 2 Aug 2023 16:36:47 GMT, Marius Hanl wrote: > When a table has padding or the `layoutChildren` method inside the table skin > is overridden (and x/y are modified), the drag drag header, column overlay > and column line are not correctly aligned. > > The reason is tha

RFR: JDK-8311983: ListView sometimes throws an IndexOutOfBoundsException

2023-08-02 Thread Marius Hanl
An IOOBE was thrown when scrolling up via the trough (-> `VirtualScrollBar#adjustValue`). This happened only when it has bigger cells than the viewport. If the the uppermost cell with the index 0 is only visible (although not completely scrolled to the top) and then an attempt is made to scroll

Re: RFR: JDK-8311983: ListView sometimes throws an IndexOutOfBoundsException

2023-08-03 Thread Marius Hanl
On Thu, 3 Aug 2023 11:41:30 GMT, Kevin Rushforth wrote: >> An IOOBE was thrown when scrolling up via the trough (-> >> `VirtualScrollBar#adjustValue`). >> This happened only when it has bigger cells than the viewport. >> If the the uppermost cell with the index 0 is only visible (although not

Re: RFR: JDK-8311983: ListView sometimes throws an IndexOutOfBoundsException [v2]

2023-08-03 Thread Marius Hanl
ollBar` does this check, which will > never be true then: `firstVisibleCell == lastVisibleCell`). This is unrelated > to this fix. I can create a ticket when I have more information. Marius Hanl has updated the pull request incrementally with three additional commits since the last revision: - JDK-

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-03 Thread Marius Hanl
On Fri, 9 Jun 2023 12:45:02 GMT, John Hendrikx wrote: >> This fix introduces immutable sets of `PseudoClass` almost everywhere, as >> they are rarely modified. These are re-used by caching them in a new class >> `ImmutablePseudoClassSetsCache`. >> >> In order to make this work, `BitSet` had t

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-03 Thread Marius Hanl
On Fri, 9 Jun 2023 12:45:02 GMT, John Hendrikx wrote: >> This fix introduces immutable sets of `PseudoClass` almost everywhere, as >> they are rarely modified. These are re-used by caching them in a new class >> `ImmutablePseudoClassSetsCache`. >> >> In order to make this work, `BitSet` had t

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v8]

2023-08-03 Thread Marius Hanl
On Thu, 3 Aug 2023 15:18:51 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/css/BitSet.java line >> 263: >> >>> 261: >>> 262: >>> 263: /** {@inheritDoc} */ >> >> Isn't this still needed? > > There is an `@Override` annotation, javadoc will do the right t

Re: RFR: JDK-8313628: Column drag header, overlay and line are not correctly aligned

2023-08-04 Thread Marius Hanl
On Thu, 3 Aug 2023 23:02:29 GMT, Andy Goryachev wrote: >> When a table has padding or the `layoutChildren` method inside the table >> skin is overridden (and x/y are modified), the drag drag header, column >> overlay and column line are not correctly aligned. >> >> The reason is that the posit

Re: RFR: 8091153: Customize the Table Button Menu [v5]

2023-08-04 Thread Marius Hanl
On Wed, 24 May 2023 16:55:11 GMT, Marius Hanl wrote: >> This PR implements a way to override the table column menu. >> When the `cornerRegion` is pressed, it will now call the `showColumnMenu` >> method. This new method is protected and therefore can be overidden by >

Re: RFR: 8276056: Control.skin.setSkin(Skin) fails to call dispose() on discarded Skin

2023-08-04 Thread Marius Hanl
On Wed, 29 Jun 2022 13:35:15 GMT, Marius Hanl wrote: > For some reason the `skinProperty` did not allow to set a new skin which 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 &g

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

2023-08-04 Thread Marius Hanl
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 otherwise). We therefore do call the `updateItem(-1)` which will

RFR: JDK-8313799: Remove lockItemOnEdit flag from (Tree)TableCell

2023-08-04 Thread Marius Hanl
The `lockItemOnEdit` only exists inside `TreeTableCell` and `TableCell` for the sake of testing. It is only changed by some JUnit tests to remove the need of setting up the whole table framework. This PR shifts this flag from those two classes to the shim classes, which are not inside the final

RFR: JDK-8283401: ArrayIndexOutOfBoundsException when disconnecting screen(s)

2023-08-05 Thread Marius Hanl
When the `D3DPipeline` is reinitialized, the adapter ordinal of all the `Screen`s are outdated. As a consequence, when a `D3DResourceFactory` is created for a `Screen` (adapter ordinal), the code may fail with an `ArrayIndexOutOfBoundsException` as the ordinal is higher than what we would expect

Integrated: JDK-8313799: Remove lockItemOnEdit flag from (Tree)TableCell

2023-08-08 Thread Marius Hanl
On Fri, 4 Aug 2023 22:12:55 GMT, Marius Hanl wrote: > The `lockItemOnEdit` only exists inside `TreeTableCell` and `TableCell` for > the sake of testing. > It is only changed by some JUnit tests to remove the need of setting up the > whole table framework. > This PR shifts this

Re: RFR: JDK-8283401: ArrayIndexOutOfBoundsException when disconnecting screen(s)

2023-08-09 Thread Marius Hanl
On Wed, 9 Aug 2023 18:46:11 GMT, Michael Strauß wrote: > I notice that the logic to assign adapter ordinals is now duplicated in two > places in the codebase. Have you thought about moving the implementation into > the `Screen` class? I actually considered this but I really want to keep the d

Re: RFR: JDK-8283401: ArrayIndexOutOfBoundsException when disconnecting screen(s)

2023-08-11 Thread Marius Hanl
On Sat, 5 Aug 2023 13:00:36 GMT, Marius Hanl wrote: > When the `D3DPipeline` is reinitialized, the adapter ordinal of all the > `Screen`s are outdated. > As a consequence, when a `D3DResourceFactory` is created for a `Screen` > (adapter ordinal), the code may

Integrated: JDK-8283401: ArrayIndexOutOfBoundsException when disconnecting screen(s)

2023-08-11 Thread Marius Hanl
On Sat, 5 Aug 2023 13:00:36 GMT, Marius Hanl wrote: > When the `D3DPipeline` is reinitialized, the adapter ordinal of all the > `Screen`s are outdated. > As a consequence, when a `D3DResourceFactory` is created for a `Screen` > (adapter ordinal), the code may

Re: RFR: JDK-8311983: ListView sometimes throws an IndexOutOfBoundsException [v2]

2023-08-15 Thread Marius Hanl
On Tue, 15 Aug 2023 16:56:54 GMT, Andy Goryachev wrote: >> Marius Hanl has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - JDK-8311983: remove JUnit5 import >> - JDK-8311983: improve exception handling

Re: RFR: JDK-8313628: Column drag header, overlay and line are not correctly aligned

2023-08-15 Thread Marius Hanl
On Mon, 14 Aug 2023 18:36:57 GMT, Andy Goryachev wrote: >> It probably won't hurt. But since the mismatch is visible even at a normal >> scale, I didn't bothered to do so. > > ... as a safeguard for any possible regressions? Well, the question is: Is there really something to test? E.g. a lot o

Re: RFR: 8310885: Width/height of window is not set after calling sizeToScene [v2]

2023-08-16 Thread Marius Hanl
On Tue, 8 Aug 2023 09:02:07 GMT, Guillaume Tâche wrote: >> `setHeight()` / `setWidth()` were ignored if called after `sizeToScene()` >> and before `show()`. >> Now the `sizeToScene` flag is unset in these methods to ensure the right >> values are set when the window is shown. > > Guillaum

Re: RFR: 8310885: Width/height of window is not set after calling sizeToScene [v3]

2023-08-16 Thread Marius Hanl
On Wed, 16 Aug 2023 09:28:57 GMT, Guillaume Tâche wrote: >> `setHeight()` / `setWidth()` were ignored if called after `sizeToScene()` >> and before `show()`. >> Now the `sizeToScene` flag is unset in these methods to ensure the right >> values are set when the window is shown. > > Guillau

Integrated: JDK-8311983: ListView sometimes throws an IndexOutOfBoundsException

2023-08-17 Thread Marius Hanl
On Wed, 2 Aug 2023 22:21:20 GMT, Marius Hanl wrote: > An IOOBE was thrown when scrolling up via the trough (-> > `VirtualScrollBar#adjustValue`). > This happened only when it has bigger cells than the viewport. > If the the uppermost cell with the index 0 is only visibl

Re: RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v2]

2023-08-17 Thread Marius Hanl
On Fri, 18 Aug 2023 01:59:06 GMT, Michael Strauß wrote: > @Maran23 maybe you could take a look, too. Yes! It is on my list. - PR Comment: https://git.openjdk.org/jfx/pull/1210#issuecomment-1683406362

Re: RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v2]

2023-08-18 Thread Marius Hanl
On Thu, 17 Aug 2023 00:30:45 GMT, Michael Strauß wrote: >> This PR fixes an issue with the way `focusWithin` bits are adjusted in the >> scene graph. Previously, the `focusWithin` counts of all parents of a >> removed node would be decreased if the removed node has a non-zero >> `focusWithin`

Re: RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v2]

2023-08-18 Thread Marius Hanl
On Fri, 18 Aug 2023 13:38:43 GMT, Michael Strauß wrote: > That's because the table row remains `focused` even if you change the scene's > focus owner to the "focus lost" button I see. But to be honest, the table focus code is not optimal as it contains multiple focus workarounds which can be b

Re: RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v4]

2023-08-18 Thread Marius Hanl
On Fri, 18 Aug 2023 20:45:00 GMT, Michael Strauß wrote: >> This PR fixes an issue with the way `focusWithin` bits are adjusted in the >> scene graph. Previously, the `focusWithin` counts of all parents of a >> removed node would be decreased if the removed node has a non-zero >> `focusWithin`

Re: RFR: 8313956: focusWithin on parents of a newly-added focused node is not updated [v2]

2023-08-18 Thread Marius Hanl
On Fri, 18 Aug 2023 16:21:00 GMT, Michael Strauß wrote: > The `focusWithin` count cannot be negative, and there is no possible way for > applications to misuse the API to cause a negative count. If it ends up being > negative, that's because of a bug, and I think that bugs should be fixed and

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

RFR: JDK-8315569: Tests for the contract of SkinBase.layoutChildren(..)

2023-09-02 Thread Marius Hanl
This PR adds a test that verifies the `SkinBase.layoutChildren(..)` method with different scales. While not explicitly documented, this method will receive the snapped and correctly calculated x, y, width and height values, so that children of the Control can be layouted correctly without requir

Re: RFR: JDK-8315569: Tests for the contract of SkinBase.layoutChildren(..) [v2]

2023-09-02 Thread Marius Hanl
outed correctly without requiring to do many more > calculations regarding padding. Marius Hanl has updated the pull request incrementally with one additional commit since the last revision: JDK-8315569: Set a min size - Changes: - all: https://git.openjdk.org/jfx/pull/1229/fi

Re: RFR: JDK-8315569: Tests for the contract of SkinBase.layoutChildren(..) [v2]

2023-09-12 Thread Marius Hanl
On Thu, 7 Sep 2023 22:04:46 GMT, Andy Goryachev wrote: >> Marius Hanl has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JDK-8315569: Set a min size > > modules/javafx.controls/src/test/

Re: RFR: JDK-8315569: Tests for the contract of SkinBase.layoutChildren(..) [v2]

2023-09-15 Thread Marius Hanl
On Tue, 12 Sep 2023 22:48:26 GMT, Andy Goryachev wrote: >> Do you a better idea? I guess it would make sense to rename it to something >> more generic. Maybe ControlLayoutTest? > > ControlLayoutChildrenContractTest perhaps, if that's the only thing being > tested here (that is, if you don't pla

Re: RFR: JDK-8199216: Quadratic layout time with nested nodes and pseudo-class in style sheet [v10]

2023-09-15 Thread Marius Hanl
On Tue, 12 Sep 2023 23:28:37 GMT, John Hendrikx wrote: >> This fix introduces immutable sets of `PseudoClass` almost everywhere, as >> they are rarely modified. These are re-used by caching them in a new class >> `ImmutablePseudoClassSetsCache`. >> >> In order to make this work, `BitSet` had

RFR: JDK-8316590: Rendering artifact after JDK-8311983

2023-09-21 Thread Marius Hanl
Fixes the regression by basically reverting one change introduced in https://bugs.openjdk.org/browse/JDK-8311983. The problem is that it is actually required to get the size from a cell with the index -1, which technically does not exist (the accumCell is used then). Furthermore, unlike the name

Re: RFR: JDK-8316590: Rendering artifact after JDK-8311983

2023-09-22 Thread Marius Hanl
On Thu, 21 Sep 2023 19:53:57 GMT, Johan Vos wrote: > Hence, the result is that the item at "index" 0 is positioned at the wrong > offset, which is something you can detect with a test. I will check it out. More tests are always better nonetheless. I still think the existing test is good as a re

Re: RFR: JDK-8316590: Rendering artifact after JDK-8311983 [v2]

2023-09-22 Thread Marius Hanl
, since this looks like something that can be optimized. But that is > another story, not related to this fix. Marius Hanl has updated the pull request incrementally with one additional commit since the last revision: JDK-8316590: More tests - Changes: - all: https://git.ope

Re: RFR: JDK-8315569: Tests for the contract of SkinBase.layoutChildren(..) [v3]

2023-09-22 Thread Marius Hanl
outed correctly without requiring to do many more > calculations regarding padding. Marius Hanl has updated the pull request incrementally with one additional commit since the last revision: JDK-8315569: Improve test name and add 2.25 scale - Changes: - all: https://git.openjdk

Re: RFR: JDK-8316590: Rendering artifact after JDK-8311983 [v2]

2023-09-26 Thread Marius Hanl
On Sun, 24 Sep 2023 09:53:42 GMT, Johan Vos wrote: > Therefore, I think there is a huge value in PR's like this because they add > tests. I agree, more tests also means we can more confidently implement potential performance improvements in the future, as well as catch any regression when cha

Re: RFR: 8313648: JavaFX application continues to show a black screen after graphic card driver crash

2023-10-01 Thread Marius Hanl
On Sat, 5 Aug 2023 12:28:16 GMT, Thorsten Fischer wrote: > Hi, > > I did open the bug report. Some notes to this PR: > > My colleagues and I are able to reproduce this bug regularly, even though it > takes sometimes up to 3 or 4 weeks until the D3DERR_DEVICEHUNG error shows > up. We are curre

  1   2   3   4   5   6   7   >