Re: RFR: 8251928: [macos] the printer DPI always be 72, cause some content lost when print out

2025-05-29 Thread Prasanta Sadhukhan
On Wed, 28 May 2025 10:29:17 GMT, GennadiyKrivoshein wrote: > The fix for the https://bugs.openjdk.org/browse/JDK-8251928. > > **Description**. > This PR contains changes to be able to print with DPI higher than 72 on > macOS, set default CPrinterJob DPI is 300 like in the PSPrinterJob. > > As

Integrated: 8341311: [Accessibility,macOS,VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu

2025-05-29 Thread Abhishek Kumar
On Tue, 27 May 2025 17:01:16 GMT, Abhishek Kumar wrote: > VoiceOver announce incorrect number of child for a submenu of JPopupMenu when > it is visible for the first time only. After that VO is able to announce the > number of items correctly. > > **Issue:** Problem is with the a11y subsystem

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v3]

2025-05-29 Thread Abhishek Kumar
On Thu, 29 May 2025 07:03:58 GMT, Abhishek Kumar wrote: >> VoiceOver announce incorrect number of child for a submenu of JPopupMenu >> when it is visible for the first time only. After that VO is able to >> announce the number of items correctly. >> >> **Issue:** Problem is with the a11y subsy

RFR: 8358107: Rollback JDK-8357299 changeset

2025-05-29 Thread Sergey Bylokhov
The patch for [JDK-8357299](https://bugs.openjdk.org/browse/JDK-8357299) does not completely fix the regression it was intended to address. Instead of bailing out on overflow, it introduces additional logic around src and clip, which might lead to attempts to draw invalid source pixels. A test

Re: RFR: 8358107: Rollback JDK-8357299 changeset

2025-05-29 Thread Prasanta Sadhukhan
On Fri, 30 May 2025 04:11:36 GMT, Sergey Bylokhov wrote: > The patch for [JDK-8357299](https://bugs.openjdk.org/browse/JDK-8357299) does > not completely fix the regression it was intended to address. Instead of > bailing out on overflow, it introduces additional logic around src and clip, > w

Re: RFR: 8357299: Graphics copyArea doesn't copy any pixels when there is overflow

2025-05-29 Thread Sergey Bylokhov
On Fri, 30 May 2025 02:06:29 GMT, Prasanta Sadhukhan wrote: >We have not found any problem with that part of code so far.. This is incorrect because the clip bounds are relative to the destination (dst), so you cannot intersect them directly with the source (src) surface. The usage of UNSAFE_

Re: RFR: 8357299: Graphics copyArea doesn't copy any pixels when there is overflow

2025-05-29 Thread Prasanta Sadhukhan
On Thu, 29 May 2025 23:29:37 GMT, Sergey Bylokhov wrote: >> ok > >>That is because down below it anyway calls >>SurfaceData_IntersectBounds(&dstInfo.bounds, &clipInfo.bounds); > so it should clip to clipInfo.bounds there. > > In addition to intersecting dst with clip, you're also intersecting

Integrated: 8357299: Graphics copyArea doesn't copy any pixels when there is overflow

2025-05-29 Thread Prasanta Sadhukhan
On Wed, 21 May 2025 03:17:34 GMT, Prasanta Sadhukhan wrote: > Graphics copyArea overflow check bails out of copying pixels if there is > overflow. > The spec says ""If a portion of the source rectangle lies outside the bounds > of the component, or is obscured by another window or component, {

Re: RFR: 8353230: Emoji rendering regression after JDK-8208377 [v4]

2025-05-29 Thread Daniel Gredler
On Fri, 30 May 2025 00:45:36 GMT, Daniel Gredler wrote: >> src/java.desktop/share/classes/sun/print/RasterPrinterJob.java line 2485: >> >>> 2483: for (int i = 0; i < len; i++) { >>> 2484: char c = in_chars[i]; >>> 2485: if (c > '\r' || c < '\t' || c == '\u000b' ||

Re: RFR: 8353230: Emoji rendering regression after JDK-8208377 [v4]

2025-05-29 Thread Daniel Gredler
On Thu, 29 May 2025 21:55:41 GMT, Phil Race wrote: >> Daniel Gredler has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove one last now-unnecessary whitespace check inside CMap > > src/java.desktop/share/classes/sun/print/RasterPrinterJ

Re: RFR: 8357598: Toolkit.removeAWTEventListener should handle null listener in AWTEventListenerProxy [v2]

2025-05-29 Thread Damon Nguyen
On Tue, 27 May 2025 17:38:32 GMT, Sergey Bylokhov wrote: >> The issue was found here: >> https://github.com/openjdk/jdk/pull/24692#discussion_r2089545502 >> >> AWTEventListener and AWTEventListenerProxy are public classes and there's no >> assertion that EventListenerProxy.getListener() will a

Re: RFR: JDK-8357082 : Stabilize and add debug logs to CopyAreaOOB.java [v5]

2025-05-29 Thread Harshitha Onkar
> CopyAreaOOB.java was failing intermittently on some platforms on CI but > recently it started to fail more frequently on macos-aarch64 when the entire > test suite runs. > > Test failure is not reproducible when the test is run individually (multiple > times) on CI. > > Rewritten the test an

Re: RFR: JDK-8357082 : Stabilize and add debug logs to CopyAreaOOB.java [v4]

2025-05-29 Thread Harshitha Onkar
On Thu, 29 May 2025 10:52:16 GMT, Sergey Bylokhov wrote: >> Harshitha Onkar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added back screencapture code to paint method > > test/jdk/java/awt/Graphics2D/CopyAreaOOB.java line 57: > >> 55

Re: RFR: JDK-8357082 : Stabilize and add debug logs to CopyAreaOOB.java [v4]

2025-05-29 Thread Harshitha Onkar
> CopyAreaOOB.java was failing intermittently on some platforms on CI but > recently it started to fail more frequently on macos-aarch64 when the entire > test suite runs. > > Test failure is not reproducible when the test is run individually (multiple > times) on CI. > > Rewritten the test an

RFR: 8358057: Update validation of ICC_Profile header data

2025-05-29 Thread Sergey Bylokhov
The [next PR](https://github.com/openjdk/jdk/pull/23044) introduces several new methods to the ICC_Profile class: - getProfileClass(byte[]) - getColorSpaceType(byte[]) - getPCSType(byte[]) - checkRenderingIntent(byte[]) These new methods extract data directly from the provided byte array rath

Re: RFR: 8357687: Remove unnecessary Map.containsKey from GraphicsEnvironment implementations

2025-05-29 Thread Sergey Bylokhov
On Thu, 29 May 2025 22:21:12 GMT, Phil Race wrote: > it is more readable (subjective) Funny... when I first wrote this code I thought that style was better, but now I see it differently. But yeah, it is subjective. - PR Comment: https://git.openjdk.org/jdk/pull/24907#issuecomment-

Re: RFR: 8357299: Graphics copyArea doesn't copy any pixels when there is overflow

2025-05-29 Thread Sergey Bylokhov
On Wed, 21 May 2025 03:17:34 GMT, Prasanta Sadhukhan wrote: > Graphics copyArea overflow check bails out of copying pixels if there is > overflow. > The spec says ""If a portion of the source rectangle lies outside the bounds > of the component, or is obscured by another window or component, {

Re: RFR: 8357299: Graphics copyArea doesn't copy any pixels when there is overflow

2025-05-29 Thread Sergey Bylokhov
On Thu, 29 May 2025 19:04:06 GMT, Phil Race wrote: >> @prrace Since it is going to clip dstInfo.bounds to clipInfo.bounds in >> SurfaceData_IntersectBounds, I believe is not necessary to do the duplicate >> clip here. >> Let me know if you think otherwise.. > > ok >That is because down below i

Re: RFR: 8357687: Remove unnecessary Map.containsKey from GraphicsEnvironment implementations

2025-05-29 Thread Phil Race
On Sun, 27 Apr 2025 21:04:34 GMT, Andrey Turbanov wrote: > `devices` contains only non-null values. It means instead of separate > `containsKey` call we can just call `HashMap.get` and then compare result > with `null`. Myself, I like the existing code because - it is one succinct line - it is

Re: RFR: 8357696: Enhance code consistency: java.desktop/unix

2025-05-29 Thread Phil Race
On Mon, 26 May 2025 03:10:07 GMT, Sergey Bylokhov wrote: > This is a request to update the remaining parts of the java.desktop/unix > package. > The sun.awt subpackage under java.desktop/unix was previously addressed by > https://github.com/openjdk/jdk/pull/24941. > > =

Re: RFR: 8353230: Emoji rendering regression after JDK-8208377 [v4]

2025-05-29 Thread Phil Race
On Thu, 29 May 2025 11:10:38 GMT, Daniel Gredler wrote: >> It looks like this regression actually fits into a longer series of fixes / >> regressions in this area: >> >> - [JDK-4517298](https://bugs.openjdk.org/browse/JDK-4517298) fixed metrics >> for zero-width characters, but broke some liga

Re: RFR: 8357799: Improve instructions for JFileChooser/HTMLFileName.java [v2]

2025-05-29 Thread Harshitha Onkar
On Mon, 26 May 2025 17:18:06 GMT, Alexey Ivanov wrote: >> The instructions for the `javax/swing/JFileChooser/HTMLFileName.java` test >> are still not as clear. >> >> The file name in the instructions is rendered as HTML, which, I believe, is >> unexpected. It should be displayed as the plain t

Re: RFR: 8357675: Amend headless message

2025-05-29 Thread Alexey Ivanov
On Thu, 29 May 2025 18:54:17 GMT, Phil Race wrote: > BTW there's a good reason for the newline. It's there on all platforms and > has been there since at least 1.5\ > If its not there then when you do "System.out.println(new > HeadlessException("foo").getMessage());\ > and there's a default mes

Re: RFR: 8356977: UTF-8 cleanups [v2]

2025-05-29 Thread Phil Race
On Mon, 26 May 2025 08:20:19 GMT, Magnus Ihse Bursie wrote: >> I found a few other places in the code that can be cleaned up after the >> conversion to UTF-8. > > Magnus Ihse Bursie has updated the pull request incrementally with two > additional commits since the last revision: > > - Restore

Re: RFR: 8357299: Graphics copyArea doesn't copy any pixels when there is overflow

2025-05-29 Thread Phil Race
On Wed, 28 May 2025 03:29:16 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/share/native/libawt/java2d/loops/Blit.c line 85: >> >>> 83: dstInfo.bounds.x2 = UNSAFE_TO_ADD(dstx, width) >>> 84: ? clipInfo.bounds.x2 : (dstx + width); >>> 85: dstInfo.bounds.y2 = U

Re: RFR: 8357299: Graphics copyArea doesn't copy any pixels when there is overflow

2025-05-29 Thread Phil Race
On Wed, 21 May 2025 03:17:34 GMT, Prasanta Sadhukhan wrote: > Graphics copyArea overflow check bails out of copying pixels if there is > overflow. > The spec says ""If a portion of the source rectangle lies outside the bounds > of the component, or is obscured by another window or component, {

Re: RFR: 8357675: Amend headless message

2025-05-29 Thread Phil Race
On Mon, 26 May 2025 16:38:21 GMT, Alexey Ivanov wrote: > Currently, the default headless message ends with a comma instead of full > stop and has an additional line break. > > > Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException: > No X11 DISPLAY variable was set, > or no headfu

Re: RFR: 8353950: Clipboard interaction on Windows is unstable [v4]

2025-05-29 Thread Matthias Bläsing
On Thu, 29 May 2025 16:42:29 GMT, Damon Nguyen wrote: >> Matthias Bläsing has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add headful key to the jtreg description > > src/java.desktop/share/classes/sun/awt/datatransfer/SunClipboard.java

Re: RFR: 8353950: Clipboard interaction on Windows is unstable [v4]

2025-05-29 Thread Matthias Bläsing
On Thu, 29 May 2025 17:11:12 GMT, Matthias Bläsing wrote: >> - Introduce a lock into WClipboard that protects the code between >> openClipboard/closeClipboard invocations. >> The native side does not allow to open the clipboard multiple >> times or share the opened clipboard between multip

Re: RFR: 8356594: JSplitPane loses divider location when reopened via JOptionPane.createDialog() [v5]

2025-05-29 Thread Alexander Zuev
On Wed, 28 May 2025 03:21:45 GMT, Prasanta Sadhukhan wrote: >> The issue is when a JSplitPane is embedded inside a lazily-initialized >> panel, and this panel is displayed using a dialog created via >> JOptionPane.createDialog(), the divider location is not preserved when >> reopening the dia

Re: RFR: 8353950: Clipboard interaction on Windows is unstable [v3]

2025-05-29 Thread Matthias Bläsing
On Thu, 29 May 2025 16:36:47 GMT, Damon Nguyen wrote: >> Matthias Bläsing has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add crash reproducer as jtreg test > > src/java.desktop/windows/classes/sun/awt/windows/WClipboard.java line 189: >

Re: RFR: 8353950: Clipboard interaction on Windows is unstable [v3]

2025-05-29 Thread Matthias Bläsing
On Thu, 29 May 2025 16:44:48 GMT, Damon Nguyen wrote: >> Matthias Bläsing has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add crash reproducer as jtreg test > > test/jdk/java/awt/Clipboard/ConcurrentClipboardAccessTest.java line 29: > >

Re: RFR: 8353950: Clipboard interaction on Windows is unstable [v4]

2025-05-29 Thread Matthias Bläsing
> - Introduce a lock into WClipboard that protects the code between > openClipboard/closeClipboard invocations. > The native side does not allow to open the clipboard multiple > times or share the opened clipboard between multiple threads. > > - Remove of need to call openClipboard/closeClip

Re: RFR: 8353950: Clipboard interaction on Windows is unstable [v3]

2025-05-29 Thread Damon Nguyen
On Thu, 15 May 2025 16:48:47 GMT, Matthias Bläsing wrote: >> - Introduce a lock into WClipboard that protects the code between >> openClipboard/closeClipboard invocations. >> The native side does not allow to open the clipboard multiple >> times or share the opened clipboard between multip

Re: RFR: 8353950: Clipboard interaction on Windows is unstable [v2]

2025-05-29 Thread Matthias Bläsing
On Tue, 13 May 2025 02:11:14 GMT, Sergey Bylokhov wrote: >> Matthias Bläsing has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adress review comments: Update copyright years and fix whitespace in if >> condition > > is it possible to crea

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v3]

2025-05-29 Thread Alexander Zuev
On Thu, 29 May 2025 07:03:58 GMT, Abhishek Kumar wrote: >> VoiceOver announce incorrect number of child for a submenu of JPopupMenu >> when it is visible for the first time only. After that VO is able to >> announce the number of items correctly. >> >> **Issue:** Problem is with the a11y subsy

Re: RFR: 8353230: Emoji rendering regression after JDK-8208377 [v4]

2025-05-29 Thread Daniel Gredler
> It looks like this regression actually fits into a longer series of fixes / > regressions in this area: > > - [JDK-4517298](https://bugs.openjdk.org/browse/JDK-4517298) fixed metrics > for zero-width characters, but broke some ligatures / glyph substitutions > - [JDK-7017058](https://bugs.open

Re: RFR: JDK-8357082 : Stabilize and add debug logs to CopyAreaOOB.java [v3]

2025-05-29 Thread Sergey Bylokhov
On Thu, 29 May 2025 01:47:47 GMT, Harshitha Onkar wrote: >> CopyAreaOOB.java was failing intermittently on some platforms on CI but >> recently it started to fail more frequently on macos-aarch64 when the entire >> test suite runs. >> >> Test failure is not reproducible when the test is run in

Re: RFR: 8357672: Extreme font sizes can cause font substitution

2025-05-29 Thread Dmitry Markov
On Wed, 28 May 2025 20:19:42 GMT, Phil Race wrote: > Instrumenting the existing ExtremeFontSizeTest.java, it was noted that the > freetype code, when encountering a null return from getting a scaler context, > would over-interpret this as a bad font. > The test was intended to check this wasn't

Re: RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v10]

2025-05-29 Thread ScientificWare
On Mon, 9 Dec 2024 09:56:15 GMT, ScientificWare wrote: >> This is referenced in Java Bug Database as >> - [JDK-8314731 : Adds support for the alt attribute in the image type input >> HTML tag.](https://bugs.java.com/bugdatabase/view_bug?bug_id=8314731) >> >> This is tracked in JBS as >> - [JDK-

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v3]

2025-05-29 Thread Abhishek Kumar
On Wed, 28 May 2025 15:31:15 GMT, Artem Semenov wrote: >> This test is only for macOS and that is conveyed through the jtreg tag >> [here](https://github.com/openjdk/jdk/blob/a225bf4bbe75aefffa63d54d2dff5577b3268339/test/jdk/javax/accessibility/TestPopupMenuChildCount.java#L36). >> I don't thin

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v2]

2025-05-29 Thread Abhishek Kumar
On Wed, 28 May 2025 15:01:47 GMT, Artem Semenov wrote: >> Abhishek Kumar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Minor update > > src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java line 877: > >> 875: i

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v3]

2025-05-29 Thread Artem Semenov
On Thu, 29 May 2025 07:03:58 GMT, Abhishek Kumar wrote: >> VoiceOver announce incorrect number of child for a submenu of JPopupMenu >> when it is visible for the first time only. After that VO is able to >> announce the number of items correctly. >> >> Issue: Problem is with the a11y subsystem

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v2]

2025-05-29 Thread Artem Semenov
On Thu, 29 May 2025 07:00:34 GMT, Abhishek Kumar wrote: > Optimized the code to not traverse further if the desired submenu is fetched. > Verified the recent change with the test code. You could, of course, put this in the while condition, but this way is also fine. - PR Review C

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v2]

2025-05-29 Thread Abhishek Kumar
On Wed, 28 May 2025 15:25:40 GMT, Artem Semenov wrote: >> Abhishek Kumar has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Minor update > > src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/MenuAccessibility.m line > 65: > >> 63:

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v2]

2025-05-29 Thread Abhishek Kumar
On Thu, 29 May 2025 06:33:37 GMT, Abhishek Kumar wrote: >> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java line >> 877: >> >>> 875: if (ac != null) { >>> 876: Accessible aComp = null; >>> 877: for (int i = 0; i < ac.getAccessibleChildrenCount

Re: RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v3]

2025-05-29 Thread Abhishek Kumar
> VoiceOver announce incorrect number of child for a submenu of JPopupMenu when > it is visible for the first time only. After that VO is able to announce the > number of items correctly. > > Issue: Problem is with the a11y subsystem method call to get the accessible > children details. > > An