Re: RFR: 8280840: Update libFFI to 3.4.2

2022-02-23 Thread Alexander Matveev
On Sat, 19 Feb 2022 07:45:43 GMT, Alexander Matveev  
wrote:

> LibFFI updated to 3.4.2. No additional changes to our code, libffi code or 
> build system were required. Tested on all platforms.

[v2] - Fixed TAB issue.
[v3] - Fixed space alignment issue in aarch64/ffitarget.h.

-

PR: https://git.openjdk.java.net/jfx/pull/738


Re: RFR: 8280840: Update libFFI to 3.4.2 [v2]

2022-02-23 Thread Alexander Matveev
> LibFFI updated to 3.4.2. No additional changes to our code, libffi code or 
> build system were required. Tested on all platforms.

Alexander Matveev has updated the pull request incrementally with one 
additional commit since the last revision:

  8280840: Update libFFI to 3.4.2 [v3]

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/738/files
  - new: https://git.openjdk.java.net/jfx/pull/738/files/2ca3a52a..a06a3e65

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx=738=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx=738=00-01

  Stats: 9 lines in 1 file changed: 0 ins; 0 del; 9 mod
  Patch: https://git.openjdk.java.net/jfx/pull/738.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/738/head:pull/738

PR: https://git.openjdk.java.net/jfx/pull/738


RFR: 8280840: Update libFFI to 3.4.2

2022-02-23 Thread Alexander Matveev
LibFFI updated to 3.4.2. No additional changes to our code, libffi code or 
build system were required. Tested on all platforms.

-

Commit messages:
 - 8280840: Update libFFI to 3.4.2 [v2]
 - 8280840: Update libFFI to 3.4.2

Changes: https://git.openjdk.java.net/jfx/pull/738/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx=738=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8280840
  Stats: 3463 lines in 34 files changed: 927 ins; 38 del; 2498 mod
  Patch: https://git.openjdk.java.net/jfx/pull/738.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/738/head:pull/738

PR: https://git.openjdk.java.net/jfx/pull/738


Re: Check if a label is ellipsized and then add a tooltip

2022-02-23 Thread Kevin Rushforth
I don't know of a way to determine whether the text of a labeled is 
currently being displayed truncated with ellipses. There isn't a 
(read-only) overrun or displayedText property, either of which would 
allow an app to know.


The only thing I can think of to work around this is to estimate the 
size that the text would need and compare it to the available size.


-- Kevin


On 2/23/2022 5:03 AM, Davide Perini wrote:

Hi,
I have a label inside a gridpane.

It is possible to check if the label is ellipsized and if yes, add a 
tootltip to let the user read the entire label when overing the label 
with the mouse?


Thanks
Davide




Re: ArrayIndexOutOfBoundsException when disconnecting screen

2022-02-23 Thread Kevin Rushforth
I spent a fair bit of time simulating and testing the 
D3DERR_DEVICEREMOVED cases for RDP disconnect to fix JDK-8239589 [1], 
but detaching a screen, which will change the number of active adapters, 
is a somewhat different case (I'm not sure how easy it would be to 
simulate it). It's very likely that it isn't handled in a robust manner. 
Do you know whether you need to disconnect 2 screens to reproduce this, 
or would disconnecting a single external monitor cause it?


Based on the stack trace, it looks like the D3DResourceFactory array has 
been recreated with the reduced number of adapters (1), but the old 
screen is still being used by the instance of PPSRenderer.


Can you file a bug with the stack trace, and as much information about 
how to reproduce it as you can.


-- Kevin

[1] https://bugs.openjdk.java.net/browse/JDK-8239589


On 2/23/2022 3:35 AM, Marius Hanl wrote:

I get an ArrayIndexOutOfBoundsException sometimes when I disconnect my
screen(s).
Setup: I have a laptop with a docking station attached. The docking
station is connected to two screen, so when I disconnect it 2 screen
will be 'lost'.

The following stacktrace is visible and the application is completely
black and unresponsive:
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for
length 1
at
com.sun.prism.d3d.D3DPipeline.getD3DResourceFactory(D3DPipeline.java:21
7)
at
com.sun.prism.d3d.D3DPipeline.getResourceFactory(D3DPipeline.java:284)
at
com.sun.scenario.effect.impl.prism.ps.PPSRenderer.validate(PPSRenderer.
java:101)
at
com.sun.scenario.effect.impl.prism.ps.PPSRenderer.getCompatibleImage(PP
SRenderer.java:221)
at
com.sun.scenario.effect.impl.prism.ps.PPSRenderer.getCompatibleImage(PP
SRenderer.java:67)
at
com.sun.scenario.effect.Effect.getCompatibleImage(Effect.java:479)
at
com.sun.javafx.sg.prism.NodeEffectInput.getImageDataForBoundedNode(Node
EffectInput.java:228)
at
com.sun.javafx.sg.prism.NodeEffectInput.filter(NodeEffectInput.java:131
)
at
com.sun.scenario.effect.FilterEffect.filter(FilterEffect.java:185)
at com.sun.scenario.effect.Offset.filter(Offset.java:160)
at com.sun.scenario.effect.Merge.filter(Merge.java:148)
at
com.sun.scenario.effect.DelegateEffect.filter(DelegateEffect.java:70)
at
com.sun.scenario.effect.impl.prism.PrEffectHelper.render(PrEffectHelper
.java:166)
at
com.sun.javafx.sg.prism.EffectFilter.render(EffectFilter.java:61)
at com.sun.javafx.sg.prism.NGNode.renderEffect(NGNode.java:2384)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2069)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at
com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
... ( a lot of doRender(..), renderContent(..) calls... )
at
com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)
at
com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:329)
at
com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:
92)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors
.java:515)
at
java.base/java.util.concurrent.FutureTask.runAndReset$$$capture(FutureT
ask.java:305)
at
java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolE
xecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool
Executor.java:628)
at
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumR
enderer.java:126)
at java.base/java.lang.Thread.run(Thread.java:829)

---
---

Now my question:
A naive fix would be an array check here but does someone has more
information about the code here?
And more interesting: Is there a way to write tests for this? Maybe
with simulating/faking screens and then 'faking' a screen disconnect?

-- Marius




Re: RFR: 8251483: TableCell: NPE on modifying item's list [v2]

2022-02-23 Thread Marius Hanl
> 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 `indexProperty()` listener are notified.
> The then notified listener in `TableRowSkinBase` will update the underlying 
> cells, which will eventually result in an call to  `updateItem(..)`, where 
> the NPE happened (and now not anymore, since the table row is now correctly 
> setup before).
> 
> There is one special case: When the index didn't changed at all, we manually 
> call `indexChanged(..)` (basically just like before) since when a property is 
> not changed, `invalidated()` is not called, but we need to notify subclasses 
> that `updateIndex(..)` was called.

Marius Hanl has updated the pull request incrementally with one additional 
commit since the last revision:

  8251483: Updated copyright year

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/741/files
  - new: https://git.openjdk.java.net/jfx/pull/741/files/5f65b82c..23921bf2

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx=741=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx=741=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/741.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/741/head:pull/741

PR: https://git.openjdk.java.net/jfx/pull/741


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

2022-02-23 Thread Marius Hanl
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 `indexProperty()` listener are notified.
The then notified listener in `TableRowSkinBase` will update the underlying 
cells, which will eventually result in an call to  `updateItem(..)`, where the 
NPE happened (and now not anymore, since the table row is now correctly setup 
before).

There is one special case: When the index didn't changed at all, we manually 
call `indexChanged(..)` (basically just like before) since when a property is 
not changed, `invalidated()` is not called, but we need to notify subclasses 
that `updateIndex(..)` was called.

-

Commit messages:
 - 8251483: indexChanged(..) is now called earlier to update the underlying 
item first before the listener which reacts to the index change are notified.

Changes: https://git.openjdk.java.net/jfx/pull/741/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx=741=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8251483
  Stats: 75 lines in 3 files changed: 67 ins; 0 del; 8 mod
  Patch: https://git.openjdk.java.net/jfx/pull/741.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/741/head:pull/741

PR: https://git.openjdk.java.net/jfx/pull/741


Integrated: 8279228 Leak in ScrollPaneSkin, related to touch events

2022-02-23 Thread Florian Kirmaier
On Thu, 23 Dec 2021 17:43:19 GMT, Florian Kirmaier  
wrote:

> Fixing memoryleak, related to touch events in ScrollPaneWhen touchDetected or 
> mouseDown is true, the sbTouch animation is running, 
> and the node is removed from the Scene, then the animation will never stop, 
> causing a memory leak.
> A simple fix is to also check, whether the Node is visible, by checking the 
> "isTreeShowing" property.

This pull request has now been integrated.

Changeset: adf1da42
Author:Florian Kirmaier 
Committer: Kevin Rushforth 
URL:   
https://git.openjdk.java.net/jfx/commit/adf1da42de07aba5af07c67a4e756db52203256d
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod

8279228: Leak in ScrollPaneSkin, related to touch events

Reviewed-by: aghaisas, kcr

-

PR: https://git.openjdk.java.net/jfx/pull/701


Re: RFR: 8279228 Leak in ScrollPaneSkin, related to touch events

2022-02-23 Thread Kevin Rushforth
On Thu, 23 Dec 2021 17:43:19 GMT, Florian Kirmaier  
wrote:

> Fixing memoryleak, related to touch events in ScrollPaneWhen touchDetected or 
> mouseDown is true, the sbTouch animation is running, 
> and the node is removed from the Scene, then the animation will never stop, 
> causing a memory leak.
> A simple fix is to also check, whether the Node is visible, by checking the 
> "isTreeShowing" property.

Marked as reviewed by kcr (Lead).

-

PR: https://git.openjdk.java.net/jfx/pull/701


Check if a label is ellipsized and then add a tooltip

2022-02-23 Thread Davide Perini

Hi,
I have a label inside a gridpane.

It is possible to check if the label is ellipsized and if yes, add a 
tootltip to let the user read the entire label when overing the label with 
the mouse?


Thanks
Davide


ArrayIndexOutOfBoundsException when disconnecting screen

2022-02-23 Thread Marius Hanl
   I get an ArrayIndexOutOfBoundsException sometimes when I disconnect my
   screen(s).
   Setup: I have a laptop with a docking station attached. The docking
   station is connected to two screen, so when I disconnect it 2 screen
   will be 'lost'.

   The following stacktrace is visible and the application is completely
   black and unresponsive:
   java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for
   length 1
   at
   com.sun.prism.d3d.D3DPipeline.getD3DResourceFactory(D3DPipeline.java:21
   7)
   at
   com.sun.prism.d3d.D3DPipeline.getResourceFactory(D3DPipeline.java:284)
   at
   com.sun.scenario.effect.impl.prism.ps.PPSRenderer.validate(PPSRenderer.
   java:101)
   at
   com.sun.scenario.effect.impl.prism.ps.PPSRenderer.getCompatibleImage(PP
   SRenderer.java:221)
   at
   com.sun.scenario.effect.impl.prism.ps.PPSRenderer.getCompatibleImage(PP
   SRenderer.java:67)
   at
   com.sun.scenario.effect.Effect.getCompatibleImage(Effect.java:479)
   at
   com.sun.javafx.sg.prism.NodeEffectInput.getImageDataForBoundedNode(Node
   EffectInput.java:228)
   at
   com.sun.javafx.sg.prism.NodeEffectInput.filter(NodeEffectInput.java:131
   )
   at
   com.sun.scenario.effect.FilterEffect.filter(FilterEffect.java:185)
   at com.sun.scenario.effect.Offset.filter(Offset.java:160)
   at com.sun.scenario.effect.Merge.filter(Merge.java:148)
   at
   com.sun.scenario.effect.DelegateEffect.filter(DelegateEffect.java:70)
   at
   com.sun.scenario.effect.impl.prism.PrEffectHelper.render(PrEffectHelper
   .java:166)
   at
   com.sun.javafx.sg.prism.EffectFilter.render(EffectFilter.java:61)
   at com.sun.javafx.sg.prism.NGNode.renderEffect(NGNode.java:2384)
   at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2069)
   at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
   at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
   at
   com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
   at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
   ... ( a lot of doRender(..), renderContent(..) calls... )
   at
   com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)
   at
   com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:329)
   at
   com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:
   92)
   at
   java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors
   .java:515)
   at
   java.base/java.util.concurrent.FutureTask.runAndReset$$$capture(FutureT
   ask.java:305)
   at
   java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
   at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
   at
   java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolE
   xecutor.java:1128)
   at
   java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool
   Executor.java:628)
   at
   com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumR
   enderer.java:126)
   at java.base/java.lang.Thread.run(Thread.java:829)

   ---
   ---

   Now my question:
   A naive fix would be an array check here but does someone has more
   information about the code here?
   And more interesting: Is there a way to write tests for this? Maybe
   with simulating/faking screens and then 'faking' a screen disconnect?

   -- Marius


Re: RFR: 8282100: Missed top/left bouncing for ScrollPane on Raspberry Pi with Touchscreen

2022-02-23 Thread Ajit Ghaisas
On Fri, 18 Feb 2022 15:21:49 GMT, Alexander Scherbatiy  
wrote:

> There is the bouncing when scrolling a node on a ScrollPane to the 
> right/bottom (the node on the scroll pane is scrolled further than its 
> width/height so the background is visible and then automatically is scrolled 
> back to the node bounds) on Raspberry Pi with Touchscreen.
> There is no bouncing when node is scrolled to the left/top.
> 
> The fix updates ScrollPaneSkin.updatePosX()/updatePosY() methods to not 
> discard out of the range top/left minX/Y values in case the touch is 
> supported.

The change looks correct. I verified that it does not have any side effect on 
non-touch devices (it is obvious from the code changes as well).
 
I did not test on the platform this PR is intended for.

-

Marked as reviewed by aghaisas (Reviewer).

PR: https://git.openjdk.java.net/jfx/pull/736


Integrated: 8282099: Cherry-pick WebKit 613.1 stabilization fixes (2)

2022-02-23 Thread Ambarish Rapte
On Tue, 22 Feb 2022 17:15:19 GMT, Ambarish Rapte  wrote:

> Include additional stabilization fixes of WebKit 613.1
> Sanity testing did not show any concerns.

This pull request has now been integrated.

Changeset: 6f201f7a
Author:Ambarish Rapte 
URL:   
https://git.openjdk.java.net/jfx/commit/6f201f7a02dba14328d183e7d0db5dede4416ce4
Stats: 186 lines in 11 files changed: 116 ins; 33 del; 37 mod

8282099: Cherry-pick WebKit 613.1 stabilization fixes (2)

Reviewed-by: kcr, jvos

-

PR: https://git.openjdk.java.net/jfx/pull/740